var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
/* Version: dfec757 */
(()=>{var B=Object.create;var O=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,tt=Object.prototype.hasOwnProperty;var M=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var et=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of K(e))!tt.call(t,o)&&o!==r&&O(t,o,{get:()=>e[o],enumerable:!(n=Q(e,o))||n.enumerable});return t};var rt=(t,e,r)=>(r=t!=null?B(Z(t)):{},et(e||!t||!t.__esModule?O(r,"default",{value:t,enumerable:!0}):r,t));var q=M(s=>{"use strict";var x=Symbol.for("react.transitional.element"),nt=Symbol.for("react.portal"),ot=Symbol.for("react.fragment"),st=Symbol.for("react.strict_mode"),it=Symbol.for("react.profiler"),at=Symbol.for("react.consumer"),ut=Symbol.for("react.context"),ct=Symbol.for("react.forward_ref"),pt=Symbol.for("react.suspense"),ft=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),P=Symbol.iterator;function mt(t){return t===null||typeof t!="object"?null:(t=P&&t[P]||t["@@iterator"],typeof t=="function"?t:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,$={};function d(t,e,r){this.props=t,this.context=e,this.refs=$,this.updater=r||k}d.prototype.isReactComponent={};d.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};d.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function j(){}j.prototype=d.prototype;function A(t,e,r){this.props=t,this.context=e,this.refs=$,this.updater=r||k}var S=A.prototype=new j;S.constructor=A;F(S,d.prototype);S.isPureReactComponent=!0;var L=Array.isArray,a={H:null,A:null,T:null,S:null,V:null},G=Object.prototype.hasOwnProperty;function w(t,e,r,n,o,u){return r=u.ref,{$$typeof:x,type:t,key:e,ref:r!==void 0?r:null,props:u}}function lt(t,e){return w(t.type,e,void 0,void 0,void 0,t.props)}function C(t){return typeof t=="object"&&t!==null&&t.$$typeof===x}function dt(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var U=/\/+/g;function R(t,e){return typeof t=="object"&&t!==null&&t.key!=null?dt(""+t.key):e.toString(36)}function Y(){}function gt(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(Y,Y):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function l(t,e,r,n,o){var u=typeof t;(u==="undefined"||u==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(u){case"bigint":case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case x:case nt:i=!0;break;case H:return i=t._init,l(i(t._payload),e,r,n,o)}}if(i)return o=o(t),i=n===""?"."+R(t,0):n,L(o)?(r="",i!=null&&(r=i.replace(U,"$&/")+"/"),l(o,e,r,"",function(z){return z})):o!=null&&(C(o)&&(o=lt(o,r+(o.key==null||t&&t.key===o.key?"":(""+o.key).replace(U,"$&/")+"/")+i)),e.push(o)),1;i=0;var m=n===""?".":n+":";if(L(t))for(var c=0;c<t.length;c++)n=t[c],u=m+R(n,c),i+=l(n,e,r,u,o);else if(c=mt(t),typeof c=="function")for(t=c.call(t),c=0;!(n=t.next()).done;)n=n.value,u=m+R(n,c++),i+=l(n,e,r,u,o);else if(u==="object"){if(typeof t.then=="function")return l(gt(t),e,r,n,o);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return i}function y(t,e,r){if(t==null)return t;var n=[],o=0;return l(t,n,"","",function(u){return e.call(r,u,o++)}),n}function Et(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var W=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function _t(){}s.Children={map:y,forEach:function(t,e,r){y(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return y(t,function(){e++}),e},toArray:function(t){return y(t,function(e){return e})||[]},only:function(t){if(!C(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};s.Component=d;s.Fragment=ot;s.Profiler=it;s.PureComponent=A;s.StrictMode=st;s.Suspense=pt;s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a;s.__COMPILER_RUNTIME={__proto__:null,c:function(t){return a.H.useMemoCache(t)}};s.cache=function(t){return function(){return t.apply(null,arguments)}};s.cloneElement=function(t,e,r){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var n=F({},t.props),o=t.key,u=void 0;if(e!=null)for(i in e.ref!==void 0&&(u=void 0),e.key!==void 0&&(o=""+e.key),e)!G.call(e,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&e.ref===void 0||(n[i]=e[i]);var i=arguments.length-2;if(i===1)n.children=r;else if(1<i){for(var m=Array(i),c=0;c<i;c++)m[c]=arguments[c+2];n.children=m}return w(t.type,o,void 0,void 0,u,n)};s.createContext=function(t){return t={$$typeof:ut,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:at,_context:t},t};s.createElement=function(t,e,r){var n,o={},u=null;if(e!=null)for(n in e.key!==void 0&&(u=""+e.key),e)G.call(e,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(o[n]=e[n]);var i=arguments.length-2;if(i===1)o.children=r;else if(1<i){for(var m=Array(i),c=0;c<i;c++)m[c]=arguments[c+2];o.children=m}if(t&&t.defaultProps)for(n in i=t.defaultProps,i)o[n]===void 0&&(o[n]=i[n]);return w(t,u,void 0,void 0,null,o)};s.createRef=function(){return{current:null}};s.forwardRef=function(t){return{$$typeof:ct,render:t}};s.isValidElement=C;s.lazy=function(t){return{$$typeof:H,_payload:{_status:-1,_result:t},_init:Et}};s.memo=function(t,e){return{$$typeof:ft,type:t,compare:e===void 0?null:e}};s.startTransition=function(t){var e=a.T,r={};a.T=r;try{var n=t(),o=a.S;o!==null&&o(r,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(_t,W)}catch(u){W(u)}finally{a.T=e}};s.unstable_useCacheRefresh=function(){return a.H.useCacheRefresh()};s.use=function(t){return a.H.use(t)};s.useActionState=function(t,e,r){return a.H.useActionState(t,e,r)};s.useCallback=function(t,e){return a.H.useCallback(t,e)};s.useContext=function(t){return a.H.useContext(t)};s.useDebugValue=function(){};s.useDeferredValue=function(t,e){return a.H.useDeferredValue(t,e)};s.useEffect=function(t,e,r){var n=a.H;if(typeof r=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return n.useEffect(t,e)};s.useId=function(){return a.H.useId()};s.useImperativeHandle=function(t,e,r){return a.H.useImperativeHandle(t,e,r)};s.useInsertionEffect=function(t,e){return a.H.useInsertionEffect(t,e)};s.useLayoutEffect=function(t,e){return a.H.useLayoutEffect(t,e)};s.useMemo=function(t,e){return a.H.useMemo(t,e)};s.useOptimistic=function(t,e){return a.H.useOptimistic(t,e)};s.useReducer=function(t,e,r){return a.H.useReducer(t,e,r)};s.useRef=function(t){return a.H.useRef(t)};s.useState=function(t){return a.H.useState(t)};s.useSyncExternalStore=function(t,e,r){return a.H.useSyncExternalStore(t,e,r)};s.useTransition=function(){return a.H.useTransition()};s.version="19.1.0"});var J=M((Ut,V)=>{"use strict";V.exports=q()});var N="https://api.emergepay.chargeitpro.com",b="https://api.emergepay.chargeitpro.com/virtualterminal/v1";var _=class{static debug(e){}};function h(t){try{let{origin:e}=new URL(t);return e}catch{return _.debug("Failed to parse url origin"),null}}function D(t){if(t==null)return!0;if(t.length>0)return!1;if(t.length===0||typeof t!="object")return!0;for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}var v=(t,e)=>{for(let r of e)if(r.includes("*")){let[n,o]=r.split("*");if(t.startsWith(n)&&t.endsWith(o))return!0}else if(t===r)return!0;return!1};var X=rt(J(),1);var g=class{_callbacks;allowedDomains;constructor(e){this.allowedDomains=e||[],this.addMessageListener(),this._callbacks={}}on(e,r){this.registerCallback(e,r)}sendToTarget(e,r,n){e.postMessage(n.toString(),r)}updateAllowedDomains(e){this.allowedDomains=e||[]}addMessageListener(){window.addEventListener("message",this.processMessage.bind(this),!1)}processMessage(e){if(!v(e.origin,this.allowedDomains))return;let r;try{r=JSON.parse(e.data)}catch{return}let n=r.data||{};this.invokeCallbacks(r.action,n,e)}invokeCallbacks(e,r,n){this._callbacks[e]&&this._callbacks[e].forEach(o=>{D(r)?o(null,n):o(r,n)})}registerCallback(e,r){this._callbacks[e]=this._callbacks[e]||[],this._callbacks[e].push(r)}};var T=class extends g{childWindows;_messageQueue;constructor(e){super(e),this.setupChildReadyListener(),this.childWindows=[],this._messageQueue=[]}sendToChildren(e){if(this.childWindows.length===0){console.warn("Attempted to send a message in ParentMessageBroker but no childWindows have registered."),console.log("Queueing message to be sent to first child that registers."),this._messageQueue.push(e);return}this.childWindows.forEach(r=>{super.sendToTarget(r.window,r.origin,e)})}emptyChildWindows(){this.childWindows=[]}setupChildReadyListener(){this.on(0,this.registerChildWindow.bind(this))}registerChildWindow(e,r){let n={window:r.source,origin:r.origin};this.childWindows.push(n),this.childWindows.length===1&&this._messageQueue.forEach(o=>{super.sendToTarget(n.window,n.origin,o)})}processMessage(e){super.processMessage(e)}};var E=class{_iframeDomain=N;_messages;_onTransactionSuccess=null;_onTransactionFailure=null;_onSwitchToManualEntry=null;_environmentUrl;constructor(e){this.configure(e),this.setupMessageListener()}configure(e){let{environmentUrl:r}=e;this._messages&&this._messages.emptyChildWindows(),this.setUpEnvironmentUrl(r),this.setUpCallbacks(e)}getUrl(e){if(!e)throw new Error("No transaction token supplied!");return`${this._environmentUrl||b}/transactions/${e}/page`}setUpEnvironmentUrl(e){this._environmentUrl=e,e&&(this._iframeDomain=h(e),this._messages&&(this._messages.emptyChildWindows(),this._messages.updateAllowedDomains([this._iframeDomain])))}setUpCallbacks(e){let{onTransactionSuccess:r,onTransactionFailure:n,onSwitchToManualEntry:o}=e;if(r&&typeof r!="function")throw new Error("onTransactionSuccess must be a function!");if(n&&typeof n!="function")throw new Error("onTransactionFailure must be a function!");if(o&&typeof o!="function")throw new Error("onSwitchToManualEntry must be a function!");this._onTransactionSuccess=r||(()=>{}),this._onTransactionFailure=n||(()=>{}),this._onSwitchToManualEntry=o||(()=>{})}onTransactionSuccess(e){this._onTransactionSuccess(e.approvalData)}onTransactionFailure(e){this._onTransactionFailure(e.failureData)}onSwitchToManualEntry(){this._onSwitchToManualEntry()}setupMessageListener(){this._messages=new T([this._iframeDomain]),this._messages.on(4,this.onTransactionSuccess.bind(this)),this._messages.on(5,this.onTransactionFailure.bind(this)),this._messages.on(19,this.onSwitchToManualEntry.bind(this))}};var I=class{static _instance;constructor(){}static init(e){return this._instance?this._instance.configure(e):this._instance=new E(e),this._instance}};window.emergepay=E;window.emergepayUrlPage=I;})();
/*! Bundled license information:

react/cjs/react.production.js:
  (**
   * @license React
   * react.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/

}