@one-payments/web-components 1.5.4 → 1.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1674 -1400
- package/dist/one-payment.browser.iife.js +565 -204
- package/dist/one-payment.browser.iife.js.map +1 -1
- package/dist/one-payment.d.ts +30 -0
- package/dist/one-payment.d.ts.map +1 -1
- package/dist/one-payment.js +314 -9
- package/dist/one-payment.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var OnePayments=function(
|
|
1
|
+
var OnePayments=function(t){"use strict";
|
|
2
2
|
/*!
|
|
3
|
-
* @one-payments/web-components v1.
|
|
3
|
+
* @one-payments/web-components v1.5.6
|
|
4
4
|
* Browser CDN Bundle (IIFE)
|
|
5
5
|
*
|
|
6
6
|
* This bundle is designed for direct browser usage via <script> tag.
|
|
7
7
|
* For React/Vue/Angular apps, use the ESM package instead.
|
|
8
8
|
*
|
|
9
|
-
* (c)
|
|
9
|
+
* (c) 2026 One Payments
|
|
10
10
|
* Released under the MIT License
|
|
11
|
-
*/var t;const r=globalThis,n=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),o=new WeakMap;let s=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(n&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=o.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&o.set(t,e))}return e}toString(){return this.cssText}};const a=n?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new s("string"==typeof e?e:e+"",void 0,i))(t)})(e):e,{is:l,defineProperty:d,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:u,getPrototypeOf:p}=Object,m=globalThis,f=m.trustedTypes,g=f?f.emptyScript:"",y=m.reactiveElementPolyfillSupport,v=(e,t)=>e,b={toAttribute(e,t){switch(t){case Boolean:e=e?g:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(n){r=null}}return r}},w=(e,t)=>!l(e,t),x={attribute:!0,type:String,converter:b,reflect:!1,useDefault:!1,hasChanged:w};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),m.litPropertyMetadata??(m.litPropertyMetadata=new WeakMap);let k=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=x){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&d(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:i}=c(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:n,set(t){const o=null==n?void 0:n.call(this);null==i||i.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??x}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const e=p(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const e=this.properties,t=[...h(e),...u(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const e=this._$Eu(t,r);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(a(e))}else void 0!==e&&t.push(a(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(e=this.constructor.l)||e.forEach(e=>e(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),void 0!==this.renderRoot&&this.isConnected&&(null==(t=e.hostConnected)||t.call(e))}removeController(e){var t;null==(t=this._$EO)||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(n)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const n of t){const t=document.createElement("style"),i=r.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(e=this._$EO)||e.forEach(e=>{var t;return null==(t=e.hostConnected)?void 0:t.call(e)})}enableUpdating(e){}disconnectedCallback(){var e;null==(e=this._$EO)||e.forEach(e=>{var t;return null==(t=e.hostDisconnected)?void 0:t.call(e)})}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){var r;const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(void 0!==i&&!0===n.reflect){const o=(void 0!==(null==(r=n.converter)?void 0:r.toAttribute)?n.converter:b).toAttribute(t,n.type);this._$Em=e,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){var r,n;const i=this.constructor,o=i._$Eh.get(e);if(void 0!==o&&this._$Em!==o){const e=i.getPropertyOptions(o),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null==(r=e.converter)?void 0:r.fromAttribute)?e.converter:b;this._$Em=o;const a=s.fromAttribute(t,e.type);this[o]=a??(null==(n=this._$Ej)?void 0:n.get(o))??a,this._$Em=null}}requestUpdate(e,t,r){var n;if(void 0!==e){const i=this.constructor,o=this[e];if(r??(r=i.getPropertyOptions(e)),!((r.hasChanged??w)(o,t)||r.useDefault&&r.reflect&&o===(null==(n=this._$Ej)?void 0:n.get(e))&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:n,wrapped:i},o){r&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),!0!==i||void 0!==o)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e){const{wrapped:e}=r,n=this[t];!0!==e||this._$AL.has(t)||void 0===n||this.C(t,void 0,r,n)}}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),null==(e=this._$EO)||e.forEach(e=>{var t;return null==(t=e.hostUpdate)?void 0:t.call(e)}),this.update(r)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;null==(t=this._$EO)||t.forEach(e=>{var t;return null==(t=e.hostUpdated)?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}};k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[v("elementProperties")]=new Map,k[v("finalized")]=new Map,null==y||y({ReactiveElement:k}),(m.reactiveElementVersions??(m.reactiveElementVersions=[])).push("2.1.1");const S=globalThis,E=S.trustedTypes,P=E?E.createPolicy("lit-html",{createHTML:e=>e}):void 0,C="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,I="?"+A,M=`<${I}>`,T=document,F=()=>T.createComment(""),L=e=>null===e||"object"!=typeof e&&"function"!=typeof e,D=Array.isArray,N="[ \t\n\f\r]",R=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,U=/>/g,q=RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,j=/"/g,O=/^(?:script|style|textarea|title)$/i,H=(K=1,(e,...t)=>({_$litType$:K,strings:e,values:t})),Z=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),Y=new WeakMap,W=T.createTreeWalker(T,129);var K;function Q(e,t){if(!D(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==P?P.createHTML(t):t}class X{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,o=0;const s=e.length-1,a=this.parts,[l,d]=((e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"<svg>":3===t?"<math>":"",s=R;for(let a=0;a<r;a++){const t=e[a];let r,l,d=-1,c=0;for(;c<t.length&&(s.lastIndex=c,l=s.exec(t),null!==l);)c=s.lastIndex,s===R?"!--"===l[1]?s=B:void 0!==l[1]?s=U:void 0!==l[2]?(O.test(l[2])&&(i=RegExp("</"+l[2],"g")),s=q):void 0!==l[3]&&(s=q):s===q?">"===l[0]?(s=i??R,d=-1):void 0===l[1]?d=-2:(d=s.lastIndex-l[2].length,r=l[1],s=void 0===l[3]?q:'"'===l[3]?j:z):s===j||s===z?s=q:s===B||s===U?s=R:(s=q,i=void 0);const h=s===q&&e[a+1].startsWith("/>")?" ":"";o+=s===R?t+M:d>=0?(n.push(r),t.slice(0,d)+C+t.slice(d)+A+h):t+A+(-2===d?a:h)}return[Q(e,o+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]})(e,t);if(this.el=X.createElement(l,r),W.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=W.nextNode())&&a.length<s;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(C)){const t=d[o++],r=n.getAttribute(e).split(A),s=/([.?@])?(.*)/.exec(t);a.push({type:1,index:i,name:s[2],strings:r,ctor:"."===s[1]?ee:"?"===s[1]?te:"@"===s[1]?re:_}),n.removeAttribute(e)}else e.startsWith(A)&&(a.push({type:6,index:i}),n.removeAttribute(e));if(O.test(n.tagName)){const e=n.textContent.split(A),t=e.length-1;if(t>0){n.textContent=E?E.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],F()),W.nextNode(),a.push({type:2,index:++i});n.append(e[t],F())}}}else if(8===n.nodeType)if(n.data===I)a.push({type:2,index:i});else{let e=-1;for(;-1!==(e=n.data.indexOf(A,e+1));)a.push({type:7,index:i}),e+=A.length-1}i++}}static createElement(e,t){const r=T.createElement("template");return r.innerHTML=e,r}}function $(e,t,r=e,n){var i,o;if(t===Z)return t;let s=void 0!==n?null==(i=r._$Co)?void 0:i[n]:r._$Cl;const a=L(t)?void 0:t._$litDirective$;return(null==s?void 0:s.constructor)!==a&&(null==(o=null==s?void 0:s._$AO)||o.call(s,!1),void 0===a?s=void 0:(s=new a(e),s._$AT(e,r,n)),void 0!==n?(r._$Co??(r._$Co=[]))[n]=s:r._$Cl=s),void 0!==s&&(t=$(e,s._$AS(e,t.values),s,n)),t}class J{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=((null==e?void 0:e.creationScope)??T).importNode(t,!0);W.currentNode=n;let i=W.nextNode(),o=0,s=0,a=r[0];for(;void 0!==a;){if(o===a.index){let t;2===a.type?t=new G(i,i.nextSibling,this,e):1===a.type?t=new a.ctor(i,a.name,a.strings,this,e):6===a.type&&(t=new ne(i,this,e)),this._$AV.push(t),a=r[++s]}o!==(null==a?void 0:a.index)&&(i=W.nextNode(),o++)}return W.currentNode=T,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class G{get _$AU(){var e;return(null==(e=this._$AM)?void 0:e._$AU)??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=(null==n?void 0:n.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===(null==e?void 0:e.nodeType)&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=$(this,e,t),L(e)?e===V||null==e||""===e?(this._$AH!==V&&this._$AR(),this._$AH=V):e!==this._$AH&&e!==Z&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>D(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==V&&L(this._$AH)?this._$AA.nextSibling.data=e:this.T(T.createTextNode(e)),this._$AH=e}$(e){var t;const{values:r,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=X.createElement(Q(n.h,n.h[0]),this.options)),n);if((null==(t=this._$AH)?void 0:t._$AD)===i)this._$AH.p(r);else{const e=new J(i,this),t=e.u(this.options);e.p(r),this.T(t),this._$AH=e}}_$AC(e){let t=Y.get(e.strings);return void 0===t&&Y.set(e.strings,t=new X(e)),t}k(e){D(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new G(this.O(F()),this.O(F()),this,this.options)):r=t[n],r._$AI(i),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){var r;for(null==(r=this._$AP)||r.call(this,!1,!0,t);e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cv=e,null==(t=this._$AP)||t.call(this,e))}}class _{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,i){this.type=1,this._$AH=V,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=V}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=$(this,e,t,0),o=!L(e)||e!==this._$AH&&e!==Z,o&&(this._$AH=e);else{const n=e;let s,a;for(e=i[0],s=0;s<i.length-1;s++)a=$(this,n[r+s],t,s),a===Z&&(a=this._$AH[s]),o||(o=!L(a)||a!==this._$AH[s]),a===V?e=V:e!==V&&(e+=(a??"")+i[s+1]),this._$AH[s]=a}o&&!n&&this.j(e)}j(e){e===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ee extends _{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===V?void 0:e}}class te extends _{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==V)}}class re extends _{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}_$AI(e,t=this){if((e=$(this,e,t,0)??V)===Z)return;const r=this._$AH,n=e===V&&r!==V||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==V&&(r===V||n);n&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;"function"==typeof this._$AH?this._$AH.call((null==(t=this.options)?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}}class ne{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){$(this,e)}}const ie=S.litHtmlPolyfillSupport;null==ie||ie(X,G),(S.litHtmlVersions??(S.litHtmlVersions=[])).push("3.3.1");const oe=globalThis;class se extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,r)=>{const n=(null==r?void 0:r.renderBefore)??t;let i=n._$litPart$;if(void 0===i){const e=(null==r?void 0:r.renderBefore)??null;n._$litPart$=i=new G(t.insertBefore(F(),e),e,void 0,r??{})}return i._$AI(e),i})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null==(e=this._$Do)||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this._$Do)||e.setConnected(!1)}render(){return Z}}se._$litElement$=!0,se.finalized=!0,null==(t=oe.litElementHydrateSupport)||t.call(oe,{LitElement:se});const ae=oe.litElementPolyfillSupport;null==ae||ae({LitElement:se}),(oe.litElementVersions??(oe.litElementVersions=[])).push("4.2.1");const le={attribute:!0,type:String,converter:b,reflect:!1,hasChanged:w},de=(e=le,t,r)=>{const{kind:n,metadata:i}=r;let o=globalThis.litPropertyMetadata.get(i);if(void 0===o&&globalThis.litPropertyMetadata.set(i,o=new Map),"setter"===n&&((e=Object.create(e)).wrapped=!0),o.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const i=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,i,e)},init(t){return void 0!==t&&this.C(n,void 0,e,t),t}}}if("setter"===n){const{name:n}=r;return function(r){const i=this[n];t.call(this,r),this.requestUpdate(n,i,e)}}throw Error("Unsupported decorator location: "+n)};function ce(e){return(t,r)=>"object"==typeof r?de(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function he(e){return ce({...e,state:!0,attribute:!1})}const ue="card",pe="paynow",me="idle",fe="initializing",ge="ready",ye="processing",ve="requires_action",be="succeeded",we="failed";class xe{constructor(e,t,r,n,i={},o){this.isPolling=!1,this.attempts=0,this.startTime=0,this.pollTimeoutId=null,this.adapters=e,this.baseUrl=t,this.token=r,this.onStatusUpdate=n,this.onPollStart=o,this.config={interval:i.interval??3e3,maxAttempts:i.maxAttempts??60,timeout:i.timeout??18e4,ignore3DS:i.ignore3DS??!1,ignoreQR:i.ignoreQR??!1}}start(){this.isPolling||(this.isPolling=!0,this.attempts=0,this.startTime=this.adapters.timer.now(),this.scheduleNextPoll())}stop(){this.isPolling=!1,null!==this.pollTimeoutId&&(clearTimeout(this.pollTimeoutId),this.pollTimeoutId=null)}get active(){return this.isPolling}get attemptCount(){return this.attempts}scheduleNextPoll(){if(!this.isPolling)return;if(this.attempts>=this.config.maxAttempts)return this.stop(),void this.onStatusUpdate({status:"failed",paymentIntentId:"",error:{code:"POLLING_MAX_ATTEMPTS",message:`Maximum polling attempts (${this.config.maxAttempts}) exceeded`}});if(this.adapters.timer.now()-this.startTime>=this.config.timeout)return this.stop(),void this.onStatusUpdate({status:"failed",paymentIntentId:"",error:{code:"POLLING_TIMEOUT",message:`Polling timeout (${this.config.timeout}ms) exceeded`}});this.pollTimeoutId=setTimeout(()=>{this.poll()},this.config.interval)}async poll(){if(this.isPolling){this.attempts++,this.onPollStart&&this.onPollStart();try{const t=await this.adapters.http.get(`${this.baseUrl}/payment-intent/get-payment-data`,{"x-token":this.token}),r={status:(e=t.result.status,"paid"===e?"succeeded":e),paymentIntentId:t.result.paymentIntentId||"",...void 0!==t.result.amount&&{amount:t.result.amount},...void 0!==t.result.currency&&{currency:t.result.currency},...void 0!==t.result.metadata&&{metadata:t.result.metadata},...void 0!==t.result.nextActionUrl&&{nextActionUrl:t.result.nextActionUrl},...void 0!==t.result.qrCode&&{qrCode:t.result.qrCode}};if(t.result.nextActionUrl&&!this.config.ignore3DS)return this.stop(),void this.onStatusUpdate(r);if(t.result.qrCode&&!this.config.ignoreQR)return this.stop(),void this.onStatusUpdate(r);if("succeeded"===t.result.status||"failed"===t.result.status||"paid"===t.result.status)return this.stop(),void this.onStatusUpdate(r);this.scheduleNextPoll()}catch(t){const e={status:"processing",paymentIntentId:"",error:{code:"POLLING_ERROR",message:t instanceof Error?t.message:"Unknown polling error"}};this.onStatusUpdate(e),this.scheduleNextPoll()}var e}}}class ke{constructor(e,t){this.state={status:me},this.subscribers=new Set,this.eventListeners={},this.paymentToken=null,this.paymentIntentId=null,this.pollingService=null,this.ignore3DSInPolling=!1,this.ignoreQRInPolling=!1,this.config=e,this.adapters=t}getApiBaseUrl(){return this.config.apiBaseUrl??function(e){switch(e){case"prod":return"https://public.prod.one.ooo";case"demo":return"https://public.demo.one.ooo";default:return"https://public.dev.one.ooo"}}(this.config.environment)}getState(){return this.state}subscribe(e){return this.subscribers.add(e),e(this.state),()=>{this.subscribers.delete(e)}}on(e,t){this.eventListeners[e]||(this.eventListeners[e]=[]);const r=this.eventListeners[e];return r.push(t),()=>{const e=r.indexOf(t);e>-1&&r.splice(e,1)}}async initialize(e){this.setState({status:fe}),this.emit({type:"initialize",payload:e});try{const t={amount:e.amount,currency:e.currency,notes:e.notes,orderId:e.orderId},r=JSON.stringify(t),n=await this.adapters.crypto.hmacSHA256(this.config.secretKey,r),i=await this.adapters.http.post(`${this.getApiBaseUrl()}/payment-intent/create`,t,{"x-api-key":this.config.apiKey,"x-signature":n}),o=new URL(i.result.redirectUrl).searchParams.get("token");if(!o)throw new Error("No token found in redirectUrl");this.paymentToken=o,this.paymentIntentId=i.result.paymentIntentId;const s=await this.adapters.http.get(`${this.getApiBaseUrl()}/payment-intent/get-payment-data`,{"x-token":this.paymentToken}),a=await this.adapters.http.get(`${this.getApiBaseUrl()}/payment-intent/available-methods`,{"x-token":this.paymentToken}),l={id:this.paymentIntentId,amount:s.result.customerAmount||e.amount,currency:s.result.currency||e.currency,status:ge,...e.metadata&&{metadata:e.metadata}},d=a.result.paymentMethods.map((e,t)=>{let r=null;const n=e.type.toLowerCase(),i=e.capabilities||[];return n.includes("card")?r="card":(n.includes("paynow")||n.includes("bank transfer")||i.includes("payments_pay_now"))&&(r="paynow"),null===r?null:{id:r,enabled:!0,priority:t}}).filter(e=>null!==e);return this.setState({status:ge,paymentIntent:l,availableMethods:d}),this.emit({type:"initialized",payload:{paymentIntent:l,paymentData:s.result}}),l}catch(t){const e={code:"INITIALIZATION_FAILED",message:t instanceof Error?t.message:"Unknown error",timestamp:this.adapters.timer.now()};throw this.setState({status:we,error:e}),this.emit({type:"payment_failed",payload:{error:e}}),t}}async submitPayment(e,t){var r,n,i,o,s;const a=this.state;if("ready"!==a.status)throw new Error("Cannot submit payment: SDK not in ready state");if(!this.paymentToken)throw new Error("Cannot submit payment: No payment token available");this.ignore3DSInPolling=!1,this.ignoreQRInPolling=!1,this.setState({status:ye,paymentIntent:a.paymentIntent,selectedMethod:e,availableMethods:a.availableMethods}),this.emit({type:"payment_processing",payload:{paymentIntent:a.paymentIntent,methodId:e}});try{const r={firstName:String(t.firstName),lastName:String(t.lastName),email:String(t.email),paymentMethod:"card"===e?{type:"card",card:{number:String(t.cardNumber),expiryMonth:String(t.expiryMonth),expiryYear:String(t.expiryYear),cvc:String(t.cvv)}}:{type:"qr"}};return await this.adapters.http.patch(`${this.getApiBaseUrl()}/payment-intent/confirm`,r,{"x-token":this.paymentToken}),this.startPolling(),{id:this.paymentIntentId||"",amount:a.paymentIntent.amount,currency:a.paymentIntent.currency,status:ye}}catch(l){let e="Unknown error",t="PAYMENT_FAILED";if(l instanceof Error)try{if(function(e){return e instanceof Error&&("response"in e&&"object"==typeof e.response&&null!==e.response||"data"in e&&"object"==typeof e.data&&null!==e.data)}(l)){const a=null==(r=l.response)?void 0:r.data,d=l.data;a?(e=a.message||(null==(n=a.error)?void 0:n.message)||l.message,t=a.code||(null==(i=a.error)?void 0:i.code)||t):d?(e=d.message||(null==(o=d.error)?void 0:o.message)||l.message,t=d.code||(null==(s=d.error)?void 0:s.code)||t):e=l.message}else e=l.message}catch{e=l.message}const d={code:t,message:e,timestamp:this.adapters.timer.now()};throw this.setState({status:we,error:d,paymentIntent:a.paymentIntent}),this.emit({type:"payment_failed",payload:{error:d,paymentIntent:a.paymentIntent}}),l}}resumePolling(){this.paymentToken&&(this.ignore3DSInPolling=!0,this.ignoreQRInPolling=!0,this.startPolling())}destroy(){this.stopPolling(),this.subscribers.clear(),Object.keys(this.eventListeners).forEach(e=>{delete this.eventListeners[e]})}startPolling(){this.paymentToken&&(this.stopPolling(),this.pollingService=new xe(this.adapters,this.getApiBaseUrl(),this.paymentToken,this.handlePollingUpdate.bind(this),{interval:4e3,maxAttempts:100,timeout:4e5,ignore3DS:this.ignore3DSInPolling,ignoreQR:this.ignoreQRInPolling},this.handlePollStart.bind(this)),this.pollingService.start())}stopPolling(){this.pollingService&&(this.pollingService.stop(),this.pollingService=null)}handlePollStart(){this.emit({type:"poll_started",payload:{}})}handlePollingUpdate(e){if(e.error)return void console.error("Polling error:",e.error);const t=this.state;if("processing"!==t.status&&"requires_action"!==t.status)return void this.stopPolling();if(e.qrCode&&!this.ignoreQRInPolling)return void this.emit({type:"qr_code_received",payload:{qrCode:e.qrCode,methodId:t.selectedMethod}});if(e.nextActionUrl&&!this.ignore3DSInPolling){if("paynow"===t.selectedMethod&&!this.ignoreQRInPolling)return void this.emit({type:"qr_code_received",payload:{qrCode:e.nextActionUrl,methodId:t.selectedMethod}});const r={id:e.paymentIntentId,amount:e.amount??t.paymentIntent.amount,currency:e.currency??t.paymentIntent.currency,status:ve,...e.metadata&&{metadata:e.metadata}};return this.setState({status:ve,paymentIntent:r,actionUrl:e.nextActionUrl,selectedMethod:t.selectedMethod,availableMethods:t.availableMethods}),void this.emit({type:"payment_requires_action",payload:{paymentIntent:r,actionUrl:e.nextActionUrl,methodId:t.selectedMethod}})}const r={id:e.paymentIntentId,amount:e.amount??t.paymentIntent.amount,currency:e.currency??t.paymentIntent.currency,status:e.status,...e.metadata&&{metadata:e.metadata}};if("succeeded"===e.status)this.stopPolling(),this.setState({status:be,paymentIntent:r,selectedMethod:t.selectedMethod}),this.emit({type:"payment_succeeded",payload:{paymentIntent:r,methodId:t.selectedMethod}});else if("failed"===e.status){this.stopPolling();const t={code:"PAYMENT_FAILED",message:e.error&&"object"==typeof e.error&&null!==e.error&&"message"in e.error?String(e.error.message):"Payment failed",timestamp:this.adapters.timer.now()};this.setState({status:we,error:t,paymentIntent:r}),this.emit({type:"payment_failed",payload:{error:t,paymentIntent:r}})}}setState(e){const t=this.state.status;this.state=e,this.subscribers.forEach(e=>{e(this.state)}),t!==e.status&&this.emit({type:"state_changed",payload:{previousStatus:t,currentStatus:e.status}})}emit(e){const t=this.eventListeners[e.type];void 0!==t&&t.forEach(t=>{t(e)})}}var Se="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Ee=function(e,t,r,n,i,o,s,a,l,d){var c=this;c.numeralDecimalMark=e||".",c.numeralIntegerScale=t>0?t:0,c.numeralDecimalScale=r>=0?r:2,c.numeralThousandsGroupStyle=n||Ee.groupStyle.thousand,c.numeralPositiveOnly=!!i,c.stripLeadingZeroes=!1!==o,c.prefix=s||""===s?s:"",c.signBeforePrefix=!!a,c.tailPrefix=!!l,c.delimiter=d||""===d?d:",",c.delimiterRE=d?new RegExp("\\"+d,"g"):""};Ee.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"},Ee.prototype={getRawValue:function(e){return e.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(e){var t,r,n,i,o=this,s="";switch(e=e.replace(/[A-Za-z]/g,"").replace(o.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",o.numeralPositiveOnly?"":"-").replace("M",o.numeralDecimalMark),o.stripLeadingZeroes&&(e=e.replace(/^(-)?0+(?=\d)/,"$1")),r="-"===e.slice(0,1)?"-":"",n=void 0!==o.prefix?o.signBeforePrefix?r+o.prefix:o.prefix+r:r,i=e,e.indexOf(o.numeralDecimalMark)>=0&&(i=(t=e.split(o.numeralDecimalMark))[0],s=o.numeralDecimalMark+t[1].slice(0,o.numeralDecimalScale)),"-"===r&&(i=i.slice(1)),o.numeralIntegerScale>0&&(i=i.slice(0,o.numeralIntegerScale)),o.numeralThousandsGroupStyle){case Ee.groupStyle.lakh:i=i.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+o.delimiter);break;case Ee.groupStyle.wan:i=i.replace(/(\d)(?=(\d{4})+$)/g,"$1"+o.delimiter);break;case Ee.groupStyle.thousand:i=i.replace(/(\d)(?=(\d{3})+$)/g,"$1"+o.delimiter)}return o.tailPrefix?r+i.toString()+(o.numeralDecimalScale>0?s.toString():"")+o.prefix:n+i.toString()+(o.numeralDecimalScale>0?s.toString():"")}};var Pe=Ee,Ce=function(e,t,r){var n=this;n.date=[],n.blocks=[],n.datePattern=e,n.dateMin=t.split("-").reverse().map(function(e){return parseInt(e,10)}),2===n.dateMin.length&&n.dateMin.unshift(0),n.dateMax=r.split("-").reverse().map(function(e){return parseInt(e,10)}),2===n.dateMax.length&&n.dateMax.unshift(0),n.initBlocks()};Ce.prototype={initBlocks:function(){var e=this;e.datePattern.forEach(function(t){"Y"===t?e.blocks.push(4):e.blocks.push(2)})},getISOFormatDate:function(){var e=this,t=e.date;return t[2]?t[2]+"-"+e.addLeadingZero(t[1])+"-"+e.addLeadingZero(t[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(e){var t=this,r="";return e=e.replace(/[^\d]/g,""),t.blocks.forEach(function(n,i){if(e.length>0){var o=e.slice(0,n),s=o.slice(0,1),a=e.slice(n);switch(t.datePattern[i]){case"d":"00"===o?o="01":parseInt(s,10)>3?o="0"+s:parseInt(o,10)>31&&(o="31");break;case"m":"00"===o?o="01":parseInt(s,10)>1?o="0"+s:parseInt(o,10)>12&&(o="12")}r+=o,e=a}}),this.getFixedDateString(r)},getFixedDateString:function(e){var t,r,n,i=this,o=i.datePattern,s=[],a=0,l=0,d=0,c=0,h=0,u=0,p=!1;return 4===e.length&&"y"!==o[0].toLowerCase()&&"y"!==o[1].toLowerCase()&&(h=2-(c="d"===o[0]?0:2),t=parseInt(e.slice(c,c+2),10),r=parseInt(e.slice(h,h+2),10),s=this.getFixedDate(t,r,0)),8===e.length&&(o.forEach(function(e,t){switch(e){case"d":a=t;break;case"m":l=t;break;default:d=t}}),u=2*d,c=a<=d?2*a:2*a+2,h=l<=d?2*l:2*l+2,t=parseInt(e.slice(c,c+2),10),r=parseInt(e.slice(h,h+2),10),n=parseInt(e.slice(u,u+4),10),p=4===e.slice(u,u+4).length,s=this.getFixedDate(t,r,n)),4!==e.length||"y"!==o[0]&&"y"!==o[1]||(u=2-(h="m"===o[0]?0:2),r=parseInt(e.slice(h,h+2),10),n=parseInt(e.slice(u,u+2),10),p=2===e.slice(u,u+2).length,s=[0,r,n]),6!==e.length||"Y"!==o[0]&&"Y"!==o[1]||(u=2-.5*(h="m"===o[0]?0:4),r=parseInt(e.slice(h,h+2),10),n=parseInt(e.slice(u,u+4),10),p=4===e.slice(u,u+4).length,s=[0,r,n]),s=i.getRangeFixedDate(s),i.date=s,0===s.length?e:o.reduce(function(e,t){switch(t){case"d":return e+(0===s[0]?"":i.addLeadingZero(s[0]));case"m":return e+(0===s[1]?"":i.addLeadingZero(s[1]));case"y":return e+(p?i.addLeadingZeroForYear(s[2],!1):"");case"Y":return e+(p?i.addLeadingZeroForYear(s[2],!0):"")}},"")},getRangeFixedDate:function(e){var t=this,r=t.datePattern,n=t.dateMin||[],i=t.dateMax||[];return!e.length||n.length<3&&i.length<3||r.find(function(e){return"y"===e.toLowerCase()})&&0===e[2]?e:i.length&&(i[2]<e[2]||i[2]===e[2]&&(i[1]<e[1]||i[1]===e[1]&&i[0]<e[0]))?i:n.length&&(n[2]>e[2]||n[2]===e[2]&&(n[1]>e[1]||n[1]===e[1]&&n[0]>e[0]))?n:e},getFixedDate:function(e,t,r){return e=Math.min(e,31),t=Math.min(t,12),r=parseInt(r||0,10),(t<7&&t%2==0||t>8&&t%2==1)&&(e=Math.min(e,2===t?this.isLeapYear(r)?29:28:30)),[e,t,r]},isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},addLeadingZero:function(e){return(e<10?"0":"")+e},addLeadingZeroForYear:function(e,t){return t?(e<10?"000":e<100?"00":e<1e3?"0":"")+e:(e<10?"0":"")+e}};var Ae=Ce,Ie=function(e,t){var r=this;r.time=[],r.blocks=[],r.timePattern=e,r.timeFormat=t,r.initBlocks()};Ie.prototype={initBlocks:function(){var e=this;e.timePattern.forEach(function(){e.blocks.push(2)})},getISOFormatTime:function(){var e=this,t=e.time;return t[2]?e.addLeadingZero(t[0])+":"+e.addLeadingZero(t[1])+":"+e.addLeadingZero(t[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){return"12"===String(this.timeFormat)?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(e){var t=this,r="";e=e.replace(/[^\d]/g,"");var n=t.getTimeFormatOptions();return t.blocks.forEach(function(i,o){if(e.length>0){var s=e.slice(0,i),a=s.slice(0,1),l=e.slice(i);switch(t.timePattern[o]){case"h":parseInt(a,10)>n.maxHourFirstDigit?s="0"+a:parseInt(s,10)>n.maxHours&&(s=n.maxHours+"");break;case"m":case"s":parseInt(a,10)>n.maxMinutesFirstDigit?s="0"+a:parseInt(s,10)>n.maxMinutes&&(s=n.maxMinutes+"")}r+=s,e=l}}),this.getFixedTimeString(r)},getFixedTimeString:function(e){var t,r,n,i=this,o=i.timePattern,s=[],a=0,l=0,d=0,c=0,h=0,u=0;return 6===e.length&&(o.forEach(function(e,t){switch(e){case"s":a=2*t;break;case"m":l=2*t;break;case"h":d=2*t}}),u=d,h=l,c=a,t=parseInt(e.slice(c,c+2),10),r=parseInt(e.slice(h,h+2),10),n=parseInt(e.slice(u,u+2),10),s=this.getFixedTime(n,r,t)),4===e.length&&i.timePattern.indexOf("s")<0&&(o.forEach(function(e,t){switch(e){case"m":l=2*t;break;case"h":d=2*t}}),u=d,h=l,t=0,r=parseInt(e.slice(h,h+2),10),n=parseInt(e.slice(u,u+2),10),s=this.getFixedTime(n,r,t)),i.time=s,0===s.length?e:o.reduce(function(e,t){switch(t){case"s":return e+i.addLeadingZero(s[2]);case"m":return e+i.addLeadingZero(s[1]);case"h":return e+i.addLeadingZero(s[0])}},"")},getFixedTime:function(e,t,r){return r=Math.min(parseInt(r||0,10),60),t=Math.min(t,60),[e=Math.min(e,60),t,r]},addLeadingZero:function(e){return(e<10?"0":"")+e}};var Me=Ie,Te=function(e,t){var r=this;r.delimiter=t||""===t?t:" ",r.delimiterRE=t?new RegExp("\\"+t,"g"):"",r.formatter=e};Te.prototype={setFormatter:function(e){this.formatter=e},format:function(e){var t=this;t.formatter.clear();for(var r,n="",i=!1,o=0,s=(e=(e=(e=e.replace(/[^\d+]/g,"")).replace(/^\+/,"B").replace(/\+/g,"").replace("B","+")).replace(t.delimiterRE,"")).length;o<s;o++)r=t.formatter.inputDigit(e.charAt(o)),/[\s()-]/g.test(r)?(n=r,i=!0):i||(n=r);return n=(n=n.replace(/[()]/g,"")).replace(/[\s-]/g,t.delimiter)}};var Fe=Te,Le={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(e){var t=e.reduce(function(e,t){return e+t},0);return e.concat(19-t)},getInfo:function(e,t){var r=Le.blocks,n=Le.re;for(var i in t=!!t,n)if(n[i].test(e)){var o=r[i];return{type:i,blocks:t?this.getStrictBlocks(o):o}}return{type:"unknown",blocks:t?this.getStrictBlocks(r.general):r.general}}},De=Le,Ne={noop:function(){},strip:function(e,t){return e.replace(t,"")},getPostDelimiter:function(e,t,r){if(0===r.length)return e.slice(-t.length)===t?t:"";var n="";return r.forEach(function(t){e.slice(-t.length)===t&&(n=t)}),n},getDelimiterREByDelimiter:function(e){return new RegExp(e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(e,t,r,n,i){return t.length===e?r.length:e+this.getPositionOffset(e,t,r,n,i)},getPositionOffset:function(e,t,r,n,i){var o,s,a;return o=this.stripDelimiters(t.slice(0,e),n,i),s=this.stripDelimiters(r.slice(0,e),n,i),0!==(a=o.length-s.length)?a/Math.abs(a):0},stripDelimiters:function(e,t,r){var n=this;if(0===r.length){var i=t?n.getDelimiterREByDelimiter(t):"";return e.replace(i,"")}return r.forEach(function(t){t.split("").forEach(function(t){e=e.replace(n.getDelimiterREByDelimiter(t),"")})}),e},headStr:function(e,t){return e.slice(0,t)},getMaxLength:function(e){return e.reduce(function(e,t){return e+t},0)},getPrefixStrippedValue:function(e,t,r,n,i,o,s,a,l){if(0===r)return e;if(e===t&&""!==e)return"";if(l&&"-"==e.slice(0,1)){var d="-"==n.slice(0,1)?n.slice(1):n;return"-"+this.getPrefixStrippedValue(e.slice(1),t,r,d,i,o,s,a,l)}if(n.slice(0,r)!==t&&!a)return s&&!n&&e?e:"";if(n.slice(-r)!==t&&a)return s&&!n&&e?e:"";var c=this.stripDelimiters(n,i,o);return e.slice(0,r)===t||a?e.slice(-r)!==t&&a?c.slice(0,-r-1):a?e.slice(0,-r):e.slice(r):c.slice(r)},getFirstDiffIndex:function(e,t){for(var r=0;e.charAt(r)===t.charAt(r);)if(""===e.charAt(r++))return-1;return r},getFormattedValue:function(e,t,r,n,i,o){var s="",a=i.length>0,l="";return 0===r?e:(t.forEach(function(t,d){if(e.length>0){var c=e.slice(0,t),h=e.slice(t);l=a?i[o?d-1:d]||l:n,o?(d>0&&(s+=l),s+=c):(s+=c,c.length===t&&d<r-1&&(s+=l)),e=h}}),s)},fixPrefixCursor:function(e,t,r,n){if(e){var i=e.value,o=r||n[0]||" ";if(e.setSelectionRange&&t&&!(t.length+o.length<=i.length)){var s=2*i.length;setTimeout(function(){e.setSelectionRange(s,s)},1)}}},checkFullSelection:function(e){try{return(window.getSelection()||document.getSelection()||{}).toString().length===e.length}catch(t){}return!1},setSelection:function(e,t,r){if(e===this.getActiveElement(r)&&!(e&&e.value.length<=t))if(e.createTextRange){var n=e.createTextRange();n.move("character",t),n.select()}else try{e.setSelectionRange(t,t)}catch(i){console.warn("The input element type does not support selection")}},getActiveElement:function(e){var t=e.activeElement;return t&&t.shadowRoot?this.getActiveElement(t.shadowRoot):t},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(e,t){return!!(this.isAndroid()&&e&&t)&&t===e.slice(0,-1)}},Re={assign:function(e,t){return t=t||{},(e=e||{}).creditCard=!!t.creditCard,e.creditCardStrictMode=!!t.creditCardStrictMode,e.creditCardType="",e.onCreditCardTypeChanged=t.onCreditCardTypeChanged||function(){},e.phone=!!t.phone,e.phoneRegionCode=t.phoneRegionCode||"AU",e.phoneFormatter={},e.time=!!t.time,e.timePattern=t.timePattern||["h","m","s"],e.timeFormat=t.timeFormat||"24",e.timeFormatter={},e.date=!!t.date,e.datePattern=t.datePattern||["d","m","Y"],e.dateMin=t.dateMin||"",e.dateMax=t.dateMax||"",e.dateFormatter={},e.numeral=!!t.numeral,e.numeralIntegerScale=t.numeralIntegerScale>0?t.numeralIntegerScale:0,e.numeralDecimalScale=t.numeralDecimalScale>=0?t.numeralDecimalScale:2,e.numeralDecimalMark=t.numeralDecimalMark||".",e.numeralThousandsGroupStyle=t.numeralThousandsGroupStyle||"thousand",e.numeralPositiveOnly=!!t.numeralPositiveOnly,e.stripLeadingZeroes=!1!==t.stripLeadingZeroes,e.signBeforePrefix=!!t.signBeforePrefix,e.tailPrefix=!!t.tailPrefix,e.swapHiddenInput=!!t.swapHiddenInput,e.numericOnly=e.creditCard||e.date||!!t.numericOnly,e.uppercase=!!t.uppercase,e.lowercase=!!t.lowercase,e.prefix=e.creditCard||e.date?"":t.prefix||"",e.noImmediatePrefix=!!t.noImmediatePrefix,e.prefixLength=e.prefix.length,e.rawValueTrimPrefix=!!t.rawValueTrimPrefix,e.copyDelimiter=!!t.copyDelimiter,e.initValue=void 0!==t.initValue&&null!==t.initValue?t.initValue.toString():"",e.delimiter=t.delimiter||""===t.delimiter?t.delimiter:t.date?"/":t.time?":":t.numeral?",":(t.phone," "),e.delimiterLength=e.delimiter.length,e.delimiterLazyShow=!!t.delimiterLazyShow,e.delimiters=t.delimiters||[],e.blocks=t.blocks||[],e.blocksLength=e.blocks.length,e.root="object"==typeof Se&&Se?Se:window,e.document=t.document||e.root.document,e.maxLength=0,e.backspace=!1,e.result="",e.onValueChanged=t.onValueChanged||function(){},e}},Be=function(e,t){var r=this,n=!1;if("string"==typeof e?(r.element=document.querySelector(e),n=document.querySelectorAll(e).length>1):void 0!==e.length&&e.length>0?(r.element=e[0],n=e.length>1):r.element=e,!r.element)throw new Error("[cleave.js] Please check the element");if(n)try{console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.")}catch(i){}t.initValue=r.element.value,r.properties=Be.DefaultProperties.assign({},t),r.init()};Be.prototype={init:function(){var e=this,t=e.properties;t.numeral||t.phone||t.creditCard||t.time||t.date||0!==t.blocksLength||t.prefix?(t.maxLength=Be.Util.getMaxLength(t.blocks),e.isAndroid=Be.Util.isAndroid(),e.lastInputValue="",e.isBackward="",e.onChangeListener=e.onChange.bind(e),e.onKeyDownListener=e.onKeyDown.bind(e),e.onFocusListener=e.onFocus.bind(e),e.onCutListener=e.onCut.bind(e),e.onCopyListener=e.onCopy.bind(e),e.initSwapHiddenInput(),e.element.addEventListener("input",e.onChangeListener),e.element.addEventListener("keydown",e.onKeyDownListener),e.element.addEventListener("focus",e.onFocusListener),e.element.addEventListener("cut",e.onCutListener),e.element.addEventListener("copy",e.onCopyListener),e.initPhoneFormatter(),e.initDateFormatter(),e.initTimeFormatter(),e.initNumeralFormatter(),(t.initValue||t.prefix&&!t.noImmediatePrefix)&&e.onInput(t.initValue)):e.onInput(t.initValue)},initSwapHiddenInput:function(){var e=this;if(e.properties.swapHiddenInput){var t=e.element.cloneNode(!0);e.element.parentNode.insertBefore(t,e.element),e.elementSwapHidden=e.element,e.elementSwapHidden.type="hidden",e.element=t,e.element.id=""}},initNumeralFormatter:function(){var e=this.properties;e.numeral&&(e.numeralFormatter=new Be.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter))},initTimeFormatter:function(){var e=this.properties;e.time&&(e.timeFormatter=new Be.TimeFormatter(e.timePattern,e.timeFormat),e.blocks=e.timeFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=Be.Util.getMaxLength(e.blocks))},initDateFormatter:function(){var e=this.properties;e.date&&(e.dateFormatter=new Be.DateFormatter(e.datePattern,e.dateMin,e.dateMax),e.blocks=e.dateFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=Be.Util.getMaxLength(e.blocks))},initPhoneFormatter:function(){var e=this.properties;if(e.phone)try{e.phoneFormatter=new Be.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch(t){throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(e){var t=this,r=e.which||e.keyCode;t.lastInputValue=t.element.value,t.isBackward=8===r},onChange:function(e){var t=this,r=t.properties,n=Be.Util;t.isBackward=t.isBackward||"deleteContentBackward"===e.inputType;var i=n.getPostDelimiter(t.lastInputValue,r.delimiter,r.delimiters);t.isBackward&&i?r.postDelimiterBackspace=i:r.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var e=this,t=e.properties;e.lastInputValue=e.element.value,t.prefix&&t.noImmediatePrefix&&!e.element.value&&this.onInput(t.prefix),Be.Util.fixPrefixCursor(e.element,t.prefix,t.delimiter,t.delimiters)},onCut:function(e){Be.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(e),this.onInput(""))},onCopy:function(e){Be.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(e)},copyClipboardData:function(e){var t=this.properties,r=Be.Util,n=this.element.value,i="";i=t.copyDelimiter?n:r.stripDelimiters(n,t.delimiter,t.delimiters);try{e.clipboardData?e.clipboardData.setData("Text",i):window.clipboardData.setData("Text",i),e.preventDefault()}catch(o){}},onInput:function(e){var t=this,r=t.properties,n=Be.Util,i=n.getPostDelimiter(e,r.delimiter,r.delimiters);return r.numeral||!r.postDelimiterBackspace||i||(e=n.headStr(e,e.length-r.postDelimiterBackspace.length)),r.phone?(!r.prefix||r.noImmediatePrefix&&!e.length?r.result=r.phoneFormatter.format(e):r.result=r.prefix+r.phoneFormatter.format(e).slice(r.prefix.length),void t.updateValueState()):r.numeral?(r.prefix&&r.noImmediatePrefix&&0===e.length?r.result="":r.result=r.numeralFormatter.format(e),void t.updateValueState()):(r.date&&(e=r.dateFormatter.getValidatedDate(e)),r.time&&(e=r.timeFormatter.getValidatedTime(e)),e=n.stripDelimiters(e,r.delimiter,r.delimiters),e=n.getPrefixStrippedValue(e,r.prefix,r.prefixLength,r.result,r.delimiter,r.delimiters,r.noImmediatePrefix,r.tailPrefix,r.signBeforePrefix),e=r.numericOnly?n.strip(e,/[^\d]/g):e,e=r.uppercase?e.toUpperCase():e,e=r.lowercase?e.toLowerCase():e,r.prefix&&(r.tailPrefix?e+=r.prefix:e=r.prefix+e,0===r.blocksLength)?(r.result=e,void t.updateValueState()):(r.creditCard&&t.updateCreditCardPropsByValue(e),e=n.headStr(e,r.maxLength),r.result=n.getFormattedValue(e,r.blocks,r.blocksLength,r.delimiter,r.delimiters,r.delimiterLazyShow),void t.updateValueState()))},updateCreditCardPropsByValue:function(e){var t,r=this.properties,n=Be.Util;n.headStr(r.result,4)!==n.headStr(e,4)&&(t=Be.CreditCardDetector.getInfo(e,r.creditCardStrictMode),r.blocks=t.blocks,r.blocksLength=r.blocks.length,r.maxLength=n.getMaxLength(r.blocks),r.creditCardType!==t.type&&(r.creditCardType=t.type,r.onCreditCardTypeChanged.call(this,r.creditCardType)))},updateValueState:function(){var e=this,t=Be.Util,r=e.properties;if(e.element){var n=e.element.selectionEnd,i=e.element.value,o=r.result;n=t.getNextCursorPosition(n,i,o,r.delimiter,r.delimiters),e.isAndroid?window.setTimeout(function(){e.element.value=o,t.setSelection(e.element,n,r.document,!1),e.callOnValueChanged()},1):(e.element.value=o,r.swapHiddenInput&&(e.elementSwapHidden.value=e.getRawValue()),t.setSelection(e.element,n,r.document,!1),e.callOnValueChanged())}},callOnValueChanged:function(){var e=this,t=e.properties;t.onValueChanged.call(e,{target:{name:e.element.name,value:t.result,rawValue:e.getRawValue()}})},setPhoneRegionCode:function(e){var t=this;t.properties.phoneRegionCode=e,t.initPhoneFormatter(),t.onChange()},setRawValue:function(e){var t=this,r=t.properties;e=null!=e?e.toString():"",r.numeral&&(e=e.replace(".",r.numeralDecimalMark)),r.postDelimiterBackspace=!1,t.element.value=e,t.onInput(e)},getRawValue:function(){var e=this.properties,t=Be.Util,r=this.element.value;return e.rawValueTrimPrefix&&(r=t.getPrefixStrippedValue(r,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)),r=e.numeral?e.numeralFormatter.getRawValue(r):t.stripDelimiters(r,e.delimiter,e.delimiters)},getISOFormatDate:function(){var e=this.properties;return e.date?e.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var e=this.properties;return e.time?e.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var e=this;e.element.removeEventListener("input",e.onChangeListener),e.element.removeEventListener("keydown",e.onKeyDownListener),e.element.removeEventListener("focus",e.onFocusListener),e.element.removeEventListener("cut",e.onCutListener),e.element.removeEventListener("copy",e.onCopyListener)},toString:function(){return"[Cleave Object]"}},Be.NumeralFormatter=Pe,Be.DateFormatter=Ae,Be.TimeFormatter=Me,Be.PhoneFormatter=Fe,Be.CreditCardDetector=De,Be.Util=Ne,Be.DefaultProperties=Re,("object"==typeof Se&&Se?Se:window).Cleave=Be;var Ue=Be,qe={},ze={},je={};let Oe;const He=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];je.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},je.getSymbolTotalCodewords=function(e){return He[e]},je.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},je.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');Oe=e},je.isKanjiModeEnabled=function(){return void 0!==Oe},je.toSJIS=function(e){return Oe(e)};var Ze,Ve={};function Ye(){this.buffer=[],this.length=0}(Ze=Ve).L={bit:1},Ze.M={bit:0},Ze.Q={bit:3},Ze.H={bit:2},Ze.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},Ze.from=function(e,t){if(Ze.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return Ze.L;case"m":case"medium":return Ze.M;case"q":case"quartile":return Ze.Q;case"h":case"high":return Ze.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(r){return t}},Ye.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var We=Ye;function Ke(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Ke.prototype.set=function(e,t,r,n){const i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},Ke.prototype.get=function(e,t){return this.data[e*this.size+t]},Ke.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},Ke.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Qe=Ke,Xe={};!function(e){const t=je.getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const r=Math.floor(e/7)+2,n=t(e),i=145===n?26:2*Math.ceil((n-13)/(2*r-2)),o=[n-7];for(let t=1;t<r-1;t++)o[t]=o[t-1]-i;return o.push(6),o.reverse()},e.getPositions=function(t){const r=[],n=e.getRowColCoords(t),i=n.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)0===e&&0===t||0===e&&t===i-1||e===i-1&&0===t||r.push([n[e],n[t]]);return r}}(Xe);var $e={};const Je=je.getSymbolSize;$e.getPositions=function(e){const t=Je(e);return[[0,0],[t-7,0],[0,t-7]]};var Ge={};!function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t=3,r=3,n=40,i=10;function o(t,r,n){switch(t){case e.Patterns.PATTERN000:return(r+n)%2==0;case e.Patterns.PATTERN001:return r%2==0;case e.Patterns.PATTERN010:return n%3==0;case e.Patterns.PATTERN011:return(r+n)%3==0;case e.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2==0;case e.Patterns.PATTERN101:return r*n%2+r*n%3==0;case e.Patterns.PATTERN110:return(r*n%2+r*n%3)%2==0;case e.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){const r=e.size;let n=0,i=0,o=0,s=null,a=null;for(let l=0;l<r;l++){i=o=0,s=a=null;for(let d=0;d<r;d++){let r=e.get(l,d);r===s?i++:(i>=5&&(n+=t+(i-5)),s=r,i=1),r=e.get(d,l),r===a?o++:(o>=5&&(n+=t+(o-5)),a=r,o=1)}i>=5&&(n+=t+(i-5)),o>=5&&(n+=t+(o-5))}return n},e.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){const t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);4!==t&&0!==t||n++}return n*r},e.getPenaltyN3=function(e){const t=e.size;let r=0,i=0,o=0;for(let n=0;n<t;n++){i=o=0;for(let s=0;s<t;s++)i=i<<1&2047|e.get(n,s),s>=10&&(1488===i||93===i)&&r++,o=o<<1&2047|e.get(s,n),s>=10&&(1488===o||93===o)&&r++}return r*n},e.getPenaltyN4=function(e){let t=0;const r=e.data.length;for(let n=0;n<r;n++)t+=e.data[n];return Math.abs(Math.ceil(100*t/r/5)-10)*i},e.applyMask=function(e,t){const r=t.size;for(let n=0;n<r;n++)for(let i=0;i<r;i++)t.isReserved(i,n)||t.xor(i,n,o(e,i,n))},e.getBestMask=function(t,r){const n=Object.keys(e.Patterns).length;let i=0,o=1/0;for(let s=0;s<n;s++){r(s),e.applyMask(s,t);const n=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(s,t),n<o&&(o=n,i=s)}return i}}(Ge);var _e={};const et=Ve,tt=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],rt=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];_e.getBlocksCount=function(e,t){switch(t){case et.L:return tt[4*(e-1)+0];case et.M:return tt[4*(e-1)+1];case et.Q:return tt[4*(e-1)+2];case et.H:return tt[4*(e-1)+3];default:return}},_e.getTotalCodewordsCount=function(e,t){switch(t){case et.L:return rt[4*(e-1)+0];case et.M:return rt[4*(e-1)+1];case et.Q:return rt[4*(e-1)+2];case et.H:return rt[4*(e-1)+3];default:return}};var nt={},it={};const ot=new Uint8Array(512),st=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)ot[t]=e,st[e]=t,e<<=1,256&e&&(e^=285);for(let t=255;t<512;t++)ot[t]=ot[t-255]}(),it.log=function(e){if(e<1)throw new Error("log("+e+")");return st[e]},it.exp=function(e){return ot[e]},it.mul=function(e,t){return 0===e||0===t?0:ot[st[e]+st[t]]},function(e){const t=it;e.mul=function(e,r){const n=new Uint8Array(e.length+r.length-1);for(let i=0;i<e.length;i++)for(let o=0;o<r.length;o++)n[i+o]^=t.mul(e[i],r[o]);return n},e.mod=function(e,r){let n=new Uint8Array(e);for(;n.length-r.length>=0;){const e=n[0];for(let o=0;o<r.length;o++)n[o]^=t.mul(r[o],e);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},e.generateECPolynomial=function(r){let n=new Uint8Array([1]);for(let i=0;i<r;i++)n=e.mul(n,new Uint8Array([1,t.exp(i)]));return n}}(nt);const at=nt;function lt(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}lt.prototype.initialize=function(e){this.degree=e,this.genPoly=at.generateECPolynomial(this.degree)},lt.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=at.mod(t,this.genPoly),n=this.degree-r.length;if(n>0){const e=new Uint8Array(this.degree);return e.set(r,n),e}return r};var dt=lt,ct={},ht={},ut={isValid:function(e){return!isNaN(e)&&e>=1&&e<=40}},pt={};const mt="[0-9]+";let ft="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ft=ft.replace(/u/g,"\\u");const gt="(?:(?![A-Z0-9 $%*+\\-./:]|"+ft+")(?:.|[\r\n]))+";pt.KANJI=new RegExp(ft,"g"),pt.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),pt.BYTE=new RegExp(gt,"g"),pt.NUMERIC=new RegExp(mt,"g"),pt.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const yt=new RegExp("^"+ft+"$"),vt=new RegExp("^"+mt+"$"),bt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");pt.testKanji=function(e){return yt.test(e)},pt.testNumeric=function(e){return vt.test(e)},pt.testAlphanumeric=function(e){return bt.test(e)},function(e){const t=ut,r=pt;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,r){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?e.ccBits[0]:r<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return r.testNumeric(t)?e.NUMERIC:r.testAlphanumeric(t)?e.ALPHANUMERIC:r.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,r){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(n){return r}}}(ht),function(e){const t=je,r=_e,n=Ve,i=ht,o=ut,s=t.getBCHDigit(7973);function a(e,t){return i.getCharCountIndicator(e,t)+4}function l(e,t){let r=0;return e.forEach(function(e){const n=a(e.mode,t);r+=n+e.getBitsLength()}),r}e.from=function(e,t){return o.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,n,s){if(!o.isValid(e))throw new Error("Invalid QR Code version");void 0===s&&(s=i.BYTE);const l=8*(t.getSymbolTotalCodewords(e)-r.getTotalCodewordsCount(e,n));if(s===i.MIXED)return l;const d=l-a(s,e);switch(s){case i.NUMERIC:return Math.floor(d/10*3);case i.ALPHANUMERIC:return Math.floor(d/11*2);case i.KANJI:return Math.floor(d/13);case i.BYTE:default:return Math.floor(d/8)}},e.getBestVersionForData=function(t,r){let o;const s=n.from(r,n.M);if(Array.isArray(t)){if(t.length>1)return function(t,r){for(let n=1;n<=40;n++)if(l(t,n)<=e.getCapacity(n,r,i.MIXED))return n}(t,s);if(0===t.length)return 1;o=t[0]}else o=t;return function(t,r,n){for(let i=1;i<=40;i++)if(r<=e.getCapacity(i,n,t))return i}(o.mode,o.getLength(),s)},e.getEncodedBits=function(e){if(!o.isValid(e)||e<7)throw new Error("Invalid QR Code version");let r=e<<12;for(;t.getBCHDigit(r)-s>=0;)r^=7973<<t.getBCHDigit(r)-s;return e<<12|r}}(ct);var wt={};const xt=je,kt=xt.getBCHDigit(1335);wt.getEncodedBits=function(e,t){const r=e.bit<<3|t;let n=r<<10;for(;xt.getBCHDigit(n)-kt>=0;)n^=1335<<xt.getBCHDigit(n)-kt;return 21522^(r<<10|n)};var St={};const Et=ht;function Pt(e){this.mode=Et.NUMERIC,this.data=e.toString()}Pt.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},Pt.prototype.getLength=function(){return this.data.length},Pt.prototype.getBitsLength=function(){return Pt.getBitsLength(this.data.length)},Pt.prototype.write=function(e){let t,r,n;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),n=parseInt(r,10),e.put(n,10);const i=this.data.length-t;i>0&&(r=this.data.substr(t),n=parseInt(r,10),e.put(n,3*i+1))};var Ct=Pt;const At=ht,It=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Mt(e){this.mode=At.ALPHANUMERIC,this.data=e}Mt.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},Mt.prototype.getLength=function(){return this.data.length},Mt.prototype.getBitsLength=function(){return Mt.getBitsLength(this.data.length)},Mt.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*It.indexOf(this.data[t]);r+=It.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(It.indexOf(this.data[t]),6)};var Tt=Mt;const Ft=ht;function Lt(e){this.mode=Ft.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}Lt.getBitsLength=function(e){return 8*e},Lt.prototype.getLength=function(){return this.data.length},Lt.prototype.getBitsLength=function(){return Lt.getBitsLength(this.data.length)},Lt.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)};var Dt=Lt;const Nt=ht,Rt=je;function Bt(e){this.mode=Nt.KANJI,this.data=e}Bt.getBitsLength=function(e){return 13*e},Bt.prototype.getLength=function(){return this.data.length},Bt.prototype.getBitsLength=function(){return Bt.getBitsLength(this.data.length)},Bt.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=Rt.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}};var Ut,qt=Bt,zt={exports:{}};Ut={single_source_shortest_paths:function(e,t,r){var n={},i={};i[t]=0;var o,s,a,l,d,c,h,u=Ut.PriorityQueue.make();for(u.push(t,0);!u.empty();)for(a in s=(o=u.pop()).value,l=o.cost,d=e[s]||{})d.hasOwnProperty(a)&&(c=l+d[a],h=i[a],(void 0===i[a]||h>c)&&(i[a]=c,u.push(a,c),n[a]=s));if(void 0!==r&&void 0===i[r]){var p=["Could not find a path from ",t," to ",r,"."].join("");throw new Error(p)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,t,r){var n=Ut.single_source_shortest_paths(e,t,r);return Ut.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(e){var t,r=Ut.PriorityQueue,n={};for(t in e=e||{},r)r.hasOwnProperty(t)&&(n[t]=r[t]);return n.queue=[],n.sorter=e.sorter||r.default_sorter,n},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}},zt.exports=Ut;var jt=zt.exports;!function(e){const t=ht,r=Ct,n=Tt,i=Dt,o=qt,s=pt,a=je,l=jt;function d(e){return unescape(encodeURIComponent(e)).length}function c(e,t,r){const n=[];let i;for(;null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function h(e){const r=c(s.NUMERIC,t.NUMERIC,e),n=c(s.ALPHANUMERIC,t.ALPHANUMERIC,e);let i,o;a.isKanjiModeEnabled()?(i=c(s.BYTE,t.BYTE,e),o=c(s.KANJI,t.KANJI,e)):(i=c(s.BYTE_KANJI,t.BYTE,e),o=[]);return r.concat(n,i,o).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function u(e,s){switch(s){case t.NUMERIC:return r.getBitsLength(e);case t.ALPHANUMERIC:return n.getBitsLength(e);case t.KANJI:return o.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e,s){let l;const d=t.getBestModeForData(e);if(l=t.from(s,d),l!==t.BYTE&&l.bit<d.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(l)+".\n Suggested mode is: "+t.toString(d));switch(l!==t.KANJI||a.isKanjiModeEnabled()||(l=t.BYTE),l){case t.NUMERIC:return new r(e);case t.ALPHANUMERIC:return new n(e);case t.KANJI:return new o(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(p(t,null)):t.data&&e.push(p(t.data,t.mode)),e},[])},e.fromString=function(r,n){const i=function(e){const r=[];for(let n=0;n<e.length;n++){const i=e[n];switch(i.mode){case t.NUMERIC:r.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:r.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:r.push([i,{data:i.data,mode:t.BYTE,length:d(i.data)}]);break;case t.BYTE:r.push([{data:i.data,mode:t.BYTE,length:d(i.data)}])}}return r}(h(r,a.isKanjiModeEnabled())),o=function(e,r){const n={},i={start:{}};let o=["start"];for(let s=0;s<e.length;s++){const a=e[s],l=[];for(let e=0;e<a.length;e++){const d=a[e],c=""+s+e;l.push(c),n[c]={node:d,lastCount:0},i[c]={};for(let e=0;e<o.length;e++){const s=o[e];n[s]&&n[s].node.mode===d.mode?(i[s][c]=u(n[s].lastCount+d.length,d.mode)-u(n[s].lastCount,d.mode),n[s].lastCount+=d.length):(n[s]&&(n[s].lastCount=d.length),i[s][c]=u(d.length,d.mode)+4+t.getCharCountIndicator(d.mode,r))}}o=l}for(let t=0;t<o.length;t++)i[o[t]].end=0;return{map:i,table:n}}(i,n),s=l.find_path(o.map,"start","end"),c=[];for(let e=1;e<s.length-1;e++)c.push(o.table[s[e]].node);return e.fromArray(function(e){return e.reduce(function(e,t){const r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(c))},e.rawSplit=function(t){return e.fromArray(h(t,a.isKanjiModeEnabled()))}}(St);const Ot=je,Ht=Ve,Zt=We,Vt=Qe,Yt=Xe,Wt=$e,Kt=Ge,Qt=_e,Xt=dt,$t=ct,Jt=wt,Gt=ht,_t=St;function er(e,t,r){const n=e.size,i=Jt.getEncodedBits(t,r);let o,s;for(o=0;o<15;o++)s=1==(i>>o&1),o<6?e.set(o,8,s,!0):o<8?e.set(o+1,8,s,!0):e.set(n-15+o,8,s,!0),o<8?e.set(8,n-o-1,s,!0):o<9?e.set(8,15-o-1+1,s,!0):e.set(8,15-o-1,s,!0);e.set(n-8,8,1,!0)}function tr(e,t,r){const n=new Zt;r.forEach(function(t){n.put(t.mode.bit,4),n.put(t.getLength(),Gt.getCharCountIndicator(t.mode,e)),t.write(n)});const i=8*(Ot.getSymbolTotalCodewords(e)-Qt.getTotalCodewordsCount(e,t));for(n.getLengthInBits()+4<=i&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);const o=(i-n.getLengthInBits())/8;for(let s=0;s<o;s++)n.put(s%2?17:236,8);return function(e,t,r){const n=Ot.getSymbolTotalCodewords(t),i=Qt.getTotalCodewordsCount(t,r),o=n-i,s=Qt.getBlocksCount(t,r),a=n%s,l=s-a,d=Math.floor(n/s),c=Math.floor(o/s),h=c+1,u=d-c,p=new Xt(u);let m=0;const f=new Array(s),g=new Array(s);let y=0;const v=new Uint8Array(e.buffer);for(let S=0;S<s;S++){const e=S<l?c:h;f[S]=v.slice(m,m+e),g[S]=p.encode(f[S]),m+=e,y=Math.max(y,e)}const b=new Uint8Array(n);let w,x,k=0;for(w=0;w<y;w++)for(x=0;x<s;x++)w<f[x].length&&(b[k++]=f[x][w]);for(w=0;w<u;w++)for(x=0;x<s;x++)b[k++]=g[x][w];return b}(n,e,t)}function rr(e,t,r,n){let i;if(Array.isArray(e))i=_t.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let n=t;if(!n){const t=_t.rawSplit(e);n=$t.getBestVersionForData(t,r)}i=_t.fromString(e,n||40)}}const o=$t.getBestVersionForData(i,r);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<o)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+o+".\n")}else t=o;const s=tr(t,r,i),a=Ot.getSymbolSize(t),l=new Vt(a);return function(e,t){const r=e.size,n=Wt.getPositions(t);for(let i=0;i<n.length;i++){const t=n[i][0],o=n[i][1];for(let n=-1;n<=7;n++)if(!(t+n<=-1||r<=t+n))for(let i=-1;i<=7;i++)o+i<=-1||r<=o+i||(n>=0&&n<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===n||6===n)||n>=2&&n<=4&&i>=2&&i<=4?e.set(t+n,o+i,!0,!0):e.set(t+n,o+i,!1,!0))}}(l,t),function(e){const t=e.size;for(let r=8;r<t-8;r++){const t=r%2==0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}(l),function(e,t){const r=Yt.getPositions(t);for(let n=0;n<r.length;n++){const t=r[n][0],i=r[n][1];for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)-2===r||2===r||-2===n||2===n||0===r&&0===n?e.set(t+r,i+n,!0,!0):e.set(t+r,i+n,!1,!0)}}(l,t),er(l,r,0),t>=7&&function(e,t){const r=e.size,n=$t.getEncodedBits(t);let i,o,s;for(let a=0;a<18;a++)i=Math.floor(a/3),o=a%3+r-8-3,s=1==(n>>a&1),e.set(i,o,s,!0),e.set(o,i,s,!0)}(l,t),function(e,t){const r=e.size;let n=-1,i=r-1,o=7,s=0;for(let a=r-1;a>0;a-=2)for(6===a&&a--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,a-r)){let n=!1;s<t.length&&(n=1==(t[s]>>>o&1)),e.set(i,a-r,n),o--,-1===o&&(s++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}(l,s),isNaN(n)&&(n=Kt.getBestMask(l,er.bind(null,l,r))),Kt.applyMask(n,l),er(l,r,n),{modules:l,version:t,errorCorrectionLevel:r,maskPattern:n,segments:i}}ze.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let r,n,i=Ht.M;return void 0!==t&&(i=Ht.from(t.errorCorrectionLevel,Ht.M),r=$t.from(t.version),n=Kt.from(t.maskPattern),t.toSJISFunc&&Ot.setToSJISFunction(t.toSJISFunc)),rr(e,r,i,n)};var nr={},ir={};!function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const r=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:r,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,r){const n=e.getScale(t,r);return Math.floor((t+2*r.margin)*n)},e.qrToImageData=function(t,r,n){const i=r.modules.size,o=r.modules.data,s=e.getScale(i,n),a=Math.floor((i+2*n.margin)*s),l=n.margin*s,d=[n.color.light,n.color.dark];for(let e=0;e<a;e++)for(let r=0;r<a;r++){let c=4*(e*a+r),h=n.color.light;if(e>=l&&r>=l&&e<a-l&&r<a-l){h=d[o[Math.floor((e-l)/s)*i+Math.floor((r-l)/s)]?1:0]}t[c++]=h.r,t[c++]=h.g,t[c++]=h.b,t[c]=h.a}}}(ir),function(e){const t=ir;e.render=function(e,r,n){let i=n,o=r;void 0!==i||r&&r.getContext||(i=r,r=void 0),r||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=t.getOptions(i);const s=t.getImageWidth(e.modules.size,i),a=o.getContext("2d"),l=a.createImageData(s,s);return t.qrToImageData(l.data,e,i),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(a,o,s),a.putImageData(l,0,0),o},e.renderToDataURL=function(t,r,n){let i=n;void 0!==i||r&&r.getContext||(i=r,r=void 0),i||(i={});const o=e.render(t,r,i),s=i.type||"image/png",a=i.rendererOpts||{};return o.toDataURL(s,a.quality)}}(nr);var or={};const sr=ir;function ar(e,t){const r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function lr(e,t,r){let n=e+t;return void 0!==r&&(n+=" "+r),n}or.render=function(e,t,r){const n=sr.getOptions(t),i=e.modules.size,o=e.modules.data,s=i+2*n.margin,a=n.color.light.a?"<path "+ar(n.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",l="<path "+ar(n.color.dark,"stroke")+' d="'+function(e,t,r){let n="",i=0,o=!1,s=0;for(let a=0;a<e.length;a++){const l=Math.floor(a%t),d=Math.floor(a/t);l||o||(o=!0),e[a]?(s++,a>0&&l>0&&e[a-1]||(n+=o?lr("M",l+r,.5+d+r):lr("m",i,0),i=0,o=!1),l+1<t&&e[a+1]||(n+=lr("h",s),s=0)):i++}return n}(o,i,n.margin)+'"/>',d='viewBox="0 0 '+s+" "+s+'"',c='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+d+' shape-rendering="crispEdges">'+a+l+"</svg>\n";return"function"==typeof r&&r(null,c),c};const dr=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then},cr=ze,hr=nr,ur=or;function pr(e,t,r,n,i){const o=[].slice.call(arguments,1),s=o.length,a="function"==typeof o[s-1];if(!a&&!dr())throw new Error("Callback required as last argument");if(!a){if(s<1)throw new Error("Too few arguments provided");return 1===s?(r=t,t=n=void 0):2!==s||t.getContext||(n=r,r=t,t=void 0),new Promise(function(i,o){try{const o=cr.create(r,n);i(e(o,t,n))}catch(s){o(s)}})}if(s<2)throw new Error("Too few arguments provided");2===s?(i=r,r=t,t=n=void 0):3===s&&(t.getContext&&void 0===i?(i=n,n=void 0):(i=n,n=r,r=t,t=void 0));try{const o=cr.create(r,n);i(null,e(o,t,n))}catch(l){i(l)}}qe.create=cr.create,qe.toCanvas=pr.bind(null,hr.render),qe.toDataURL=pr.bind(null,hr.renderToDataURL),qe.toString=pr.bind(null,function(e,t,r){return ur.render(e,r)});var mr=Object.defineProperty,fr=Object.getOwnPropertyDescriptor,gr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?fr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&mr(t,r,o),o};let yr=class extends se{constructor(){super(...arguments),this.currentState={status:"idle"},this.selectedMethod=null,this.cardFormData={cardNumber:"",expiry:"",cvv:"",cardholderName:""},this.formErrors={},this.paymentData=null,this.feesExpanded=!1,this.isInitializing=!0,this.cardBrand="unknown",this.paymentLocked=!1,this.show3DSModal=!1,this.showQRModal=!1,this.nextActionUrl=null,this.qrCode=null,this.qrCodeDataUrl=null,this.qrAutoResumeTimer=null,this.qrPollingInProgress=!1,this.sdk=null,this.isInitialized=!1,this.cardNumberCleave=null,this.expiryCleave=null,this.leaveEventsCounter=0,this.previousState=null,this.handle3DSPostMessage=e=>{"ON_AWX_3DS_START_PAGE_LEAVE"===e.data&&(this.leaveEventsCounter++,this.leaveEventsCounter>1&&this.handle3DSComplete())}}hasAllRequiredProps(){return!!(this.config&&this.adapters&&this.amount&&this.currency&&this.orderId)&&(!(!this.firstName||"string"!=typeof this.firstName||""===this.firstName.trim())&&(!(!this.lastName||"string"!=typeof this.lastName||""===this.lastName.trim())&&!(!this.email||"string"!=typeof this.email||""===this.email.trim())))}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this.handle3DSPostMessage),this.addEventListener("force-close-3ds-modal",()=>{this.show3DSModal&&(this.show3DSModal=!1,this.nextActionUrl=null,this.leaveEventsCounter=0)})}firstUpdated(){this.initializeSDK()}updated(e){super.updated(e),!this.isInitialized&&this.hasAllRequiredProps()&&(console.info("[OnePayment] All required props now available. Initializing SDK..."),this.initializeSDK())}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this.sdk)||e.destroy(),this.isInitialized=!1,this.destroyCleave(),window.removeEventListener("message",this.handle3DSPostMessage),null!==this.qrAutoResumeTimer&&clearTimeout(this.qrAutoResumeTimer)}setupCleave(){setTimeout(()=>{var e,t;const r=null==(e=this.shadowRoot)?void 0:e.querySelector("#cardNumber"),n=null==(t=this.shadowRoot)?void 0:t.querySelector("#expiry");r&&!this.cardNumberCleave&&(this.cardNumberCleave=new Ue(r,{creditCard:!0,delimiter:" ",onCreditCardTypeChanged:e=>{this.cardBrand={visa:"visa",mastercard:"mastercard",amex:"amex",discover:"discover"}[e]||"unknown"}})),n&&!this.expiryCleave&&(this.expiryCleave=new Ue(n,{date:!0,datePattern:["m","y"],delimiter:"/"}))},50)}destroyCleave(){this.cardNumberCleave&&(this.cardNumberCleave.destroy(),this.cardNumberCleave=null),this.expiryCleave&&(this.expiryCleave.destroy(),this.expiryCleave=null)}getFilteredPaymentMethods(){const e=("ready"===this.currentState.status||"processing"===this.currentState.status||"requires_action"===this.currentState.status)&&this.currentState.availableMethods||[];return 0===e.length?[]:e.filter(e=>{var t;return!(null==(t=this.excludePaymentMethods)?void 0:t.includes(e.id))}).map(e=>{if(e.id===pe){if("SGD"!==this.getTransactionData().currency)return{id:e.id,enabled:!1,disabledReason:"PayNow is only available for SGD currency"}}return{id:e.id,enabled:!0}})}initializeSDK(){var e;this.config&&this.adapters&&this.amount&&this.currency&&this.orderId?this.firstName&&"string"==typeof this.firstName&&""!==this.firstName.trim()?this.lastName&&"string"==typeof this.lastName&&""!==this.lastName.trim()?this.email&&"string"==typeof this.email&&""!==this.email.trim()?this.isInitialized||(this.isInitialized=!0,null==(e=this.sdk)||e.destroy(),this.sdk=new ke(this.config,this.adapters),this.sdk.subscribe(e=>{var t;"requires_action"===(null==(t=this.previousState)?void 0:t.status)&&"requires_action"!==e.status&&this.show3DSModal&&(this.show3DSModal=!1,this.nextActionUrl=null,this.leaveEventsCounter=0,this.sdk&&this.sdk.resumePolling()),this.previousState=e,this.currentState=e,this.dispatchEvent(new CustomEvent("state-change",{detail:{state:e},bubbles:!0,composed:!0}))}),this.sdk.on("payment_succeeded",e=>{this.dispatchEvent(new CustomEvent("payment-success",{detail:{paymentIntentId:e.payload.paymentIntent.id},bubbles:!0,composed:!0}))}),this.sdk.on("payment_failed",e=>{this.dispatchEvent(new CustomEvent("payment-error",{detail:{error:e.payload.error.message},bubbles:!0,composed:!0}))}),this.sdk.on("initialized",e=>{this.paymentData=e.payload.paymentData,this.isInitializing=!1}),this.sdk.on("payment_requires_action",e=>{this.nextActionUrl=e.payload.actionUrl,this.show3DSModal=!0,this.paymentLocked=!0,this.leaveEventsCounter=0}),this.sdk.on("poll_started",()=>{const e="undefined"!=typeof window&&"ReactNativeWebView"in window;this.show3DSModal&&e&&(this.show3DSModal=!1,this.nextActionUrl=null,this.leaveEventsCounter=0,this.sdk&&this.sdk.resumePolling())}),this.sdk.on("qr_code_received",async e=>{if(this.qrCode=e.payload.qrCode,!this.qrCode)return;const t=this.qrCode.startsWith("http://")||this.qrCode.startsWith("https://"),r=this.qrCode.startsWith("data:image");if(t||r)this.qrCodeDataUrl=this.qrCode;else try{const e=await qe.toDataURL(this.qrCode,{width:300,margin:2,color:{dark:"#000000",light:"#FFFFFF"}});this.qrCodeDataUrl=e}catch(n){this.qrCodeDataUrl=null}this.showQRModal=!0,this.paymentLocked=!0,this.qrAutoResumeTimer=window.setTimeout(()=>{this.handleQRScanned()},1e4)}),this.sdk.initialize({amount:this.amount,currency:this.currency,orderId:this.orderId})):console.error("OnePayment: email is required and must be a non-empty string. Customer information is required for all payment methods."):console.error("OnePayment: lastName is required and must be a non-empty string. Customer information is required for all payment methods."):console.error("OnePayment: firstName is required and must be a non-empty string. Customer information is required for all payment methods."):console.error("OnePayment: Missing required props. Ensure config, adapters, amount, currency, and orderId are provided.")}handleMethodSelect(e){this.paymentLocked||(this.selectedMethod=e)}handleQRScanned(){null!==this.qrAutoResumeTimer&&(clearTimeout(this.qrAutoResumeTimer),this.qrAutoResumeTimer=null),this.qrPollingInProgress=!0,this.sdk&&this.sdk.resumePolling()}handle3DSComplete(){this.show3DSModal=!1,this.nextActionUrl=null,this.leaveEventsCounter=0,this.sdk&&this.sdk.resumePolling()}handleInputChange(e,t){if(this.cardFormData={...this.cardFormData,[e]:t},this.formErrors[e]){const t={...this.formErrors};delete t[e],this.formErrors=t}}luhnCheck(e){const t=e.replace(/\s/g,"");if(!/^\d+$/.test(t))return!1;let r=0,n=!1;for(let i=t.length-1;i>=0;i--){const e=t.charAt(i);if(!e)continue;let o=parseInt(e,10);n&&(o*=2,o>9&&(o-=9)),r+=o,n=!n}return r%10==0}validateExpiry(e){const t=e.trim();if(!/^\d{1,2}\/\d{2}$/.test(t))return{valid:!1,error:"Invalid format (MM/YY)"};const r=t.split("/"),n=r[0],i=r[1];if(!n||!i)return{valid:!1,error:"Invalid format (MM/YY)"};const o=parseInt(n,10);if(o<1||o>12)return{valid:!1,error:"Invalid month (01-12)"};const s=new Date,a=s.getFullYear(),l=s.getMonth()+1;let d;if(2!==i.length)return{valid:!1,error:"Invalid year format"};{const e=parseInt(i,10),t=a%100,r=100*Math.floor(a/100);if(e<t){d=t-e>80?r+100+e:r+e}else d=r+e}return d<a||d===a&&o<l?{valid:!1,error:"Card has expired"}:{valid:!0}}validateCardForm(){const e={};if(this.cardFormData.cardNumber.trim()?this.luhnCheck(this.cardFormData.cardNumber)||(e.cardNumber="Invalid card number"):e.cardNumber="Please enter card number",this.cardFormData.expiry.trim()){const t=this.validateExpiry(this.cardFormData.expiry);t.valid||(e.expiry=t.error)}else e.expiry="Please enter expiry date";return this.cardFormData.cvv.trim()||(e.cvv="Please enter CVV"),this.cardFormData.cardholderName.trim()||(e.cardholderName="Please enter cardholder name"),this.formErrors=e,0===Object.keys(e).length}handleCardPayment(){if(!this.sdk||"ready"!==this.currentState.status)return;if(!this.validateCardForm())return;this.paymentLocked=!0;const e=this.cardFormData.expiry.split("/"),t=(e[0]||"").trim(),r=`20${(e[1]||"").trim().substring(0,2)}`;this.sdk.submitPayment(ue,{cardNumber:this.cardFormData.cardNumber.replace(/\s/g,""),expiryMonth:t,expiryYear:r,cvv:this.cardFormData.cvv,firstName:this.firstName,lastName:this.lastName,email:this.email})}handlePayNowPayment(){this.sdk&&"ready"===this.currentState.status&&(this.paymentLocked=!0,this.sdk.submitPayment(pe,{firstName:this.firstName,lastName:this.lastName,email:this.email}))}getTransactionData(){var e;const t=this.paymentData;if(!t)return{currency:this.currency,charge:this.amount,fees:0,feeBreakdown:{transactionFee:0,merchantFee:0,merchantFeeLabel:""},netAmount:this.amount};const r=null==(e=t.fees)?void 0:e.find(e=>"merchant"===e.owner),n="number"==typeof t.totalFee?t.totalFee:Number(t.totalFee)||0,i="number"==typeof t.totalSystemFee?t.totalSystemFee:Number(t.totalSystemFee)||0,o=null!=t.initialAmount?"number"==typeof t.initialAmount?t.initialAmount:Number(t.initialAmount)||0:this.amount,s=null!=t.customerAmount?"number"==typeof t.customerAmount?t.customerAmount:Number(t.customerAmount)||0:o,a=n-i;return{currency:t.currency||this.currency,charge:o,fees:n,feeBreakdown:{transactionFee:a,merchantFee:a,merchantFeeLabel:(r?"percentage"===r.type?`${r.value}%`:`${r.value} ${r.currency}`:"")||"0%"},netAmount:s}}renderTransactionDetailsSkeleton(){return H`
|
|
11
|
+
*/var e;const r=globalThis,i=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),o=new WeakMap;let s=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const r=void 0!==e&&1===e.length;r&&(t=o.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&o.set(e,t))}return t}toString(){return this.cssText}};const a=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new s("string"==typeof t?t:t+"",void 0,n))(e)})(t):t,{is:l,defineProperty:d,getOwnPropertyDescriptor:c,getOwnPropertyNames:u,getOwnPropertySymbols:h,getPrototypeOf:p}=Object,m=globalThis,g=m.trustedTypes,f=g?g.emptyScript:"",y=m.reactiveElementPolyfillSupport,v=(t,e)=>t,b={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(i){r=null}}return r}},w=(t,e)=>!l(t,e),x={attribute:!0,type:String,converter:b,reflect:!1,useDefault:!1,hasChanged:w};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),m.litPropertyMetadata??(m.litPropertyMetadata=new WeakMap);let k=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=x){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,e);void 0!==i&&d(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){const{get:i,set:n}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const o=null==i?void 0:i.call(this);null==n||n.call(this,e),this.requestUpdate(t,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??x}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const t=this.properties,e=[...u(t),...h(t)];for(const r of e)this.createProperty(r,t[r])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,r]of e)this.elementProperties.set(t,r)}this._$Eh=new Map;for(const[e,r]of this.elementProperties){const t=this._$Eu(e,r);void 0!==t&&this._$Eh.set(t,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eu(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach(t=>t(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(e=t.hostConnected)||e.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(i)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const i of e){const e=document.createElement("style"),n=r.litNonce;void 0!==n&&e.setAttribute("nonce",n),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)})}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)})}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){var r;const i=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,i);if(void 0!==n&&!0===i.reflect){const o=(void 0!==(null==(r=i.converter)?void 0:r.toAttribute)?i.converter:b).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){var r,i;const n=this.constructor,o=n._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=n.getPropertyOptions(o),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(r=t.converter)?void 0:r.fromAttribute)?t.converter:b;this._$Em=o;const a=s.fromAttribute(e,t.type);this[o]=a??(null==(i=this._$Ej)?void 0:i.get(o))??a,this._$Em=null}}requestUpdate(t,e,r){var i;if(void 0!==t){const n=this.constructor,o=this[t];if(r??(r=n.getPropertyOptions(t)),!((r.hasChanged??w)(o,e)||r.useDefault&&r.reflect&&o===(null==(i=this._$Ej)?void 0:i.get(t))&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,e,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:i,wrapped:n},o){r&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==n||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,r]of t){const{wrapped:t}=r,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,r,i)}}let e=!1;const r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)}),this.update(r)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(r)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach(t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[v("elementProperties")]=new Map,k[v("finalized")]=new Map,null==y||y({ReactiveElement:k}),(m.reactiveElementVersions??(m.reactiveElementVersions=[])).push("2.1.1");const S=globalThis,P=S.trustedTypes,C=P?P.createPolicy("lit-html",{createHTML:t=>t}):void 0,A="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,E="?"+$,_=`<${E}>`,I=document,M=()=>I.createComment(""),N=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,D="[ \t\n\f\r]",R=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,L=/-->/g,U=/>/g,B=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),F=/'/g,z=/"/g,q=/^(?:script|style|textarea|title)$/i,O=(Q=1,(t,...e)=>({_$litType$:Q,strings:t,values:e})),H=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),V=new WeakMap,Y=I.createTreeWalker(I,129);var Q;function K(t,e){if(!T(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==C?C.createHTML(e):e}class G{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let n=0,o=0;const s=t.length-1,a=this.parts,[l,d]=((t,e)=>{const r=t.length-1,i=[];let n,o=2===e?"<svg>":3===e?"<math>":"",s=R;for(let a=0;a<r;a++){const e=t[a];let r,l,d=-1,c=0;for(;c<e.length&&(s.lastIndex=c,l=s.exec(e),null!==l);)c=s.lastIndex,s===R?"!--"===l[1]?s=L:void 0!==l[1]?s=U:void 0!==l[2]?(q.test(l[2])&&(n=RegExp("</"+l[2],"g")),s=B):void 0!==l[3]&&(s=B):s===B?">"===l[0]?(s=n??R,d=-1):void 0===l[1]?d=-2:(d=s.lastIndex-l[2].length,r=l[1],s=void 0===l[3]?B:'"'===l[3]?z:F):s===z||s===F?s=B:s===L||s===U?s=R:(s=B,n=void 0);const u=s===B&&t[a+1].startsWith("/>")?" ":"";o+=s===R?e+_:d>=0?(i.push(r),e.slice(0,d)+A+e.slice(d)+$+u):e+$+(-2===d?a:u)}return[K(t,o+(t[r]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]})(t,e);if(this.el=G.createElement(l,r),Y.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=Y.nextNode())&&a.length<s;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(A)){const e=d[o++],r=i.getAttribute(t).split($),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:s[2],strings:r,ctor:"."===s[1]?tt:"?"===s[1]?et:"@"===s[1]?rt:X}),i.removeAttribute(t)}else t.startsWith($)&&(a.push({type:6,index:n}),i.removeAttribute(t));if(q.test(i.tagName)){const t=i.textContent.split($),e=t.length-1;if(e>0){i.textContent=P?P.emptyScript:"";for(let r=0;r<e;r++)i.append(t[r],M()),Y.nextNode(),a.push({type:2,index:++n});i.append(t[e],M())}}}else if(8===i.nodeType)if(i.data===E)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf($,t+1));)a.push({type:7,index:n}),t+=$.length-1}n++}}static createElement(t,e){const r=I.createElement("template");return r.innerHTML=t,r}}function J(t,e,r=t,i){var n,o;if(e===H)return e;let s=void 0!==i?null==(n=r._$Co)?void 0:n[i]:r._$Cl;const a=N(e)?void 0:e._$litDirective$;return(null==s?void 0:s.constructor)!==a&&(null==(o=null==s?void 0:s._$AO)||o.call(s,!1),void 0===a?s=void 0:(s=new a(t),s._$AT(t,r,i)),void 0!==i?(r._$Co??(r._$Co=[]))[i]=s:r._$Cl=s),void 0!==s&&(e=J(t,s._$AS(t,e.values),s,i)),e}class Z{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,i=((null==t?void 0:t.creationScope)??I).importNode(e,!0);Y.currentNode=i;let n=Y.nextNode(),o=0,s=0,a=r[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new W(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new it(n,this,t)),this._$AV.push(e),a=r[++s]}o!==(null==a?void 0:a.index)&&(n=Y.nextNode(),o++)}return Y.currentNode=I,i}p(t){let e=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class W{get _$AU(){var t;return(null==(t=this._$AM)?void 0:t._$AU)??this._$Cv}constructor(t,e,r,i){this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this._$Cv=(null==i?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=J(this,t,e),N(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==H&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>T(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==j&&N(this._$AH)?this._$AA.nextSibling.data=t:this.T(I.createTextNode(t)),this._$AH=t}$(t){var e;const{values:r,_$litType$:i}=t,n="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=G.createElement(K(i.h,i.h[0]),this.options)),i);if((null==(e=this._$AH)?void 0:e._$AD)===n)this._$AH.p(r);else{const t=new Z(n,this),e=t.u(this.options);t.p(r),this.T(e),this._$AH=t}}_$AC(t){let e=V.get(t.strings);return void 0===e&&V.set(t.strings,e=new G(t)),e}k(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,i=0;for(const n of t)i===e.length?e.push(r=new W(this.O(M()),this.O(M()),this,this.options)):r=e[i],r._$AI(n),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var r;for(null==(r=this._$AP)||r.call(this,!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class X{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,n){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=j}_$AI(t,e=this,r,i){const n=this.strings;let o=!1;if(void 0===n)t=J(this,t,e,0),o=!N(t)||t!==this._$AH&&t!==H,o&&(this._$AH=t);else{const i=t;let s,a;for(t=n[0],s=0;s<n.length-1;s++)a=J(this,i[r+s],e,s),a===H&&(a=this._$AH[s]),o||(o=!N(a)||a!==this._$AH[s]),a===j?t=j:t!==j&&(t+=(a??"")+n[s+1]),this._$AH[s]=a}o&&!i&&this.j(t)}j(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends X{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===j?void 0:t}}class et extends X{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==j)}}class rt extends X{constructor(t,e,r,i,n){super(t,e,r,i,n),this.type=5}_$AI(t,e=this){if((t=J(this,t,e,0)??j)===H)return;const r=this._$AH,i=t===j&&r!==j||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==j&&(r===j||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;"function"==typeof this._$AH?this._$AH.call((null==(e=this.options)?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){J(this,t)}}const nt=S.litHtmlPolyfillSupport;null==nt||nt(G,W),(S.litHtmlVersions??(S.litHtmlVersions=[])).push("3.3.1");const ot=globalThis;class st extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,r)=>{const i=(null==r?void 0:r.renderBefore)??e;let n=i._$litPart$;if(void 0===n){const t=(null==r?void 0:r.renderBefore)??null;i._$litPart$=n=new W(e.insertBefore(M(),t),t,void 0,r??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return H}}st._$litElement$=!0,st.finalized=!0,null==(e=ot.litElementHydrateSupport)||e.call(ot,{LitElement:st});const at=ot.litElementPolyfillSupport;null==at||at({LitElement:st}),(ot.litElementVersions??(ot.litElementVersions=[])).push("4.2.1");const lt={attribute:!0,type:String,converter:b,reflect:!1,hasChanged:w},dt=(t=lt,e,r)=>{const{kind:i,metadata:n}=r;let o=globalThis.litPropertyMetadata.get(n);if(void 0===o&&globalThis.litPropertyMetadata.set(n,o=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),o.set(r.name,t),"accessor"===i){const{name:i}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(i,n,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=r;return function(r){const n=this[i];e.call(this,r),this.requestUpdate(i,n,t)}}throw Error("Unsupported decorator location: "+i)};function ct(t){return(e,r)=>"object"==typeof r?dt(t,e,r):((t,e,r)=>{const i=e.hasOwnProperty(r);return e.constructor.createProperty(r,t),i?Object.getOwnPropertyDescriptor(e,r):void 0})(t,e,r)}function ut(t){return ct({...t,state:!0,attribute:!1})}const ht="card",pt="paynow",mt="promptpay",gt="duitnow",ft="gopay",yt="boost",vt="shopeepay",bt="atom",wt="dana",xt="tng",kt="idle",St="initializing",Pt="ready",Ct="processing",At="requires_action",$t="succeeded",Et="failed";class _t{constructor(t,e,r,i,n={},o){this.isPolling=!1,this.attempts=0,this.startTime=0,this.pollTimeoutId=null,this.adapters=t,this.baseUrl=e,this.token=r,this.onStatusUpdate=i,this.onPollStart=o,this.config={interval:n.interval??3e3,maxAttempts:n.maxAttempts??60,timeout:n.timeout??18e4,ignore3DS:n.ignore3DS??!1,ignoreQR:n.ignoreQR??!1}}start(){this.isPolling||(this.isPolling=!0,this.attempts=0,this.startTime=this.adapters.timer.now(),this.scheduleNextPoll())}stop(){this.isPolling=!1,null!==this.pollTimeoutId&&(clearTimeout(this.pollTimeoutId),this.pollTimeoutId=null)}get active(){return this.isPolling}get attemptCount(){return this.attempts}scheduleNextPoll(){if(!this.isPolling)return;if(this.attempts>=this.config.maxAttempts)return this.stop(),void this.onStatusUpdate({status:"failed",paymentIntentId:"",error:{code:"POLLING_MAX_ATTEMPTS",message:`Maximum polling attempts (${this.config.maxAttempts}) exceeded`}});if(this.adapters.timer.now()-this.startTime>=this.config.timeout)return this.stop(),void this.onStatusUpdate({status:"failed",paymentIntentId:"",error:{code:"POLLING_TIMEOUT",message:`Polling timeout (${this.config.timeout}ms) exceeded`}});this.pollTimeoutId=setTimeout(()=>{this.poll()},this.config.interval)}async poll(){if(this.isPolling){this.attempts++,this.onPollStart&&this.onPollStart();try{const e=await this.adapters.http.get(`${this.baseUrl}/payment-intent/get-payment-data`,{"x-token":this.token}),r={status:(t=e.result.status,"paid"===t?"succeeded":t),paymentIntentId:e.result.paymentIntentId||"",...void 0!==e.result.amount&&{amount:e.result.amount},...void 0!==e.result.currency&&{currency:e.result.currency},...void 0!==e.result.metadata&&{metadata:e.result.metadata},...void 0!==e.result.nextActionUrl&&{nextActionUrl:e.result.nextActionUrl},...void 0!==e.result.qrCode&&{qrCode:e.result.qrCode}};if(e.result.nextActionUrl&&!this.config.ignore3DS)return this.stop(),void this.onStatusUpdate(r);if(e.result.qrCode&&!this.config.ignoreQR)return this.stop(),void this.onStatusUpdate(r);if("succeeded"===e.result.status||"failed"===e.result.status||"paid"===e.result.status)return this.stop(),void this.onStatusUpdate(r);this.scheduleNextPoll()}catch(e){const t={status:"processing",paymentIntentId:"",error:{code:"POLLING_ERROR",message:e instanceof Error?e.message:"Unknown polling error"}};this.onStatusUpdate(t),this.scheduleNextPoll()}var t}}}class It{constructor(t,e){this.state={status:kt},this.subscribers=new Set,this.eventListeners={},this.paymentToken=null,this.paymentIntentId=null,this.pollingService=null,this.ignore3DSInPolling=!1,this.ignoreQRInPolling=!1,this.config=t,this.adapters=e}getApiBaseUrl(){return this.config.apiBaseUrl??function(t){switch(t){case"prod":return"https://public.prod.one.ooo";case"demo":return"https://public.demo.one.ooo";default:return"https://public.dev.one.ooo"}}(this.config.environment)}getState(){return this.state}subscribe(t){return this.subscribers.add(t),t(this.state),()=>{this.subscribers.delete(t)}}on(t,e){this.eventListeners[t]||(this.eventListeners[t]=[]);const r=this.eventListeners[t];return r.push(e),()=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)}}async initialize(t){this.setState({status:St}),this.emit({type:"initialize",payload:t});try{const e={amount:t.amount,currency:t.currency,notes:t.notes,orderId:t.orderId},r=JSON.stringify(e),i=await this.adapters.crypto.hmacSHA256(this.config.secretKey,r),n=await this.adapters.http.post(`${this.getApiBaseUrl()}/payment-intent/create`,e,{"x-api-key":this.config.apiKey,"x-signature":i}),o=new URL(n.result.redirectUrl).searchParams.get("token");if(!o)throw new Error("No token found in redirectUrl");this.paymentToken=o,this.paymentIntentId=n.result.paymentIntentId;const s=await this.adapters.http.get(`${this.getApiBaseUrl()}/payment-intent/get-payment-data`,{"x-token":this.paymentToken}),a=await this.adapters.http.get(`${this.getApiBaseUrl()}/payment-intent/available-methods`,{"x-token":this.paymentToken}),l={id:this.paymentIntentId,amount:s.result.customerAmount||t.amount,currency:s.result.currency||t.currency,status:Pt,...t.metadata&&{metadata:t.metadata}},d=[];let c=0;return a.result.paymentMethods.forEach(t=>{const e=t.type.toLowerCase(),r=t.capabilities||[];e.includes("card")&&d.push({id:"card",enabled:!0,priority:c++}),(e.includes("paynow")||r.includes("payments_pay_now"))&&d.push({id:"paynow",enabled:!0,priority:c++}),(e.includes("promptpay")||e.includes("prompt pay")||r.includes("payments_prompt_pay"))&&d.push({id:"promptpay",enabled:!0,priority:c++}),(e.includes("duitnow")||e.includes("duit now")||r.includes("payments_duit_now"))&&d.push({id:"duitnow",enabled:!0,priority:c++}),(e.includes("gopay")||e.includes("go pay")||r.includes("payments_go_pay"))&&d.push({id:"gopay",enabled:!0,priority:c++}),(e.includes("boost")||r.includes("payments_boost"))&&d.push({id:"boost",enabled:!0,priority:c++}),(e.includes("shopeepay")||e.includes("shopee pay")||e.includes("shopee_pay")||r.includes("payments_shopee_pay"))&&d.push({id:"shopeepay",enabled:!0,priority:c++}),(e.includes("atom")||e.includes("atome")||r.includes("payments_atome"))&&d.push({id:"atom",enabled:!0,priority:c++}),(e.includes("dana")||r.includes("payments_dana"))&&d.push({id:"dana",enabled:!0,priority:c++}),(e.includes("tng")||e.includes("touch")||r.includes("payments_tng"))&&d.push({id:"tng",enabled:!0,priority:c++})}),this.setState({status:Pt,paymentIntent:l,availableMethods:d}),this.emit({type:"initialized",payload:{paymentIntent:l,paymentData:s.result}}),l}catch(e){const t={code:"INITIALIZATION_FAILED",message:e instanceof Error?e.message:"Unknown error",timestamp:this.adapters.timer.now()};throw this.setState({status:Et,error:t}),this.emit({type:"payment_failed",payload:{error:t}}),e}}async submitPayment(t,e){var r,i,n,o,s;const a=this.state;if("ready"!==a.status)throw new Error("Cannot submit payment: SDK not in ready state");if(!this.paymentToken)throw new Error("Cannot submit payment: No payment token available");this.ignore3DSInPolling=!1,this.ignoreQRInPolling=!1,this.setState({status:Ct,paymentIntent:a.paymentIntent,selectedMethod:t,availableMethods:a.availableMethods}),this.emit({type:"payment_processing",payload:{paymentIntent:a.paymentIntent,methodId:t}});try{const r=t=>{switch(t){case"paynow":default:return"qr";case"promptpay":return"prompt_pay";case"duitnow":return"duit_now";case"gopay":return"go_pay";case"boost":return"boost";case"shopeepay":return"shopee_pay";case"atom":return"atome";case"dana":return"dana";case"tng":return"tng"}},i={firstName:String(e.firstName),lastName:String(e.lastName),email:String(e.email),phoneNumber:String(e.phoneNumber),paymentMethod:"card"===t?{type:"card",card:{number:String(e.cardNumber),expiryMonth:String(e.expiryMonth),expiryYear:String(e.expiryYear),cvc:String(e.cvv)}}:{type:r(t)}};return await this.adapters.http.patch(`${this.getApiBaseUrl()}/payment-intent/confirm`,i,{"x-token":this.paymentToken}),this.startPolling(),{id:this.paymentIntentId||"",amount:a.paymentIntent.amount,currency:a.paymentIntent.currency,status:Ct}}catch(l){let t="Unknown error",e="PAYMENT_FAILED";if(l instanceof Error)try{if(function(t){return t instanceof Error&&("response"in t&&"object"==typeof t.response&&null!==t.response||"data"in t&&"object"==typeof t.data&&null!==t.data)}(l)){const a=null==(r=l.response)?void 0:r.data,d=l.data;a?(t=a.message||(null==(i=a.error)?void 0:i.message)||l.message,e=a.code||(null==(n=a.error)?void 0:n.code)||e):d?(t=d.message||(null==(o=d.error)?void 0:o.message)||l.message,e=d.code||(null==(s=d.error)?void 0:s.code)||e):t=l.message}else t=l.message}catch{t=l.message}const d={code:e,message:t,timestamp:this.adapters.timer.now()};throw this.setState({status:Et,error:d,paymentIntent:a.paymentIntent}),this.emit({type:"payment_failed",payload:{error:d,paymentIntent:a.paymentIntent}}),l}}resumePolling(){this.paymentToken&&(this.ignore3DSInPolling=!0,this.ignoreQRInPolling=!0,this.startPolling())}destroy(){this.stopPolling(),this.subscribers.clear(),Object.keys(this.eventListeners).forEach(t=>{delete this.eventListeners[t]})}startPolling(){this.paymentToken&&(this.stopPolling(),this.pollingService=new _t(this.adapters,this.getApiBaseUrl(),this.paymentToken,this.handlePollingUpdate.bind(this),{interval:4e3,maxAttempts:100,timeout:4e5,ignore3DS:this.ignore3DSInPolling,ignoreQR:this.ignoreQRInPolling},this.handlePollStart.bind(this)),this.pollingService.start())}stopPolling(){this.pollingService&&(this.pollingService.stop(),this.pollingService=null)}handlePollStart(){this.emit({type:"poll_started",payload:{}})}handlePollingUpdate(t){if(t.error)return;const e=this.state;if("processing"!==e.status&&"requires_action"!==e.status)return void this.stopPolling();const r="promptpay"===e.selectedMethod||"duitnow"===e.selectedMethod||"gopay"===e.selectedMethod||"boost"===e.selectedMethod||"shopeepay"===e.selectedMethod||"atom"===e.selectedMethod||"dana"===e.selectedMethod||"tng"===e.selectedMethod;if(t.qrCode&&!this.ignoreQRInPolling&&!r)return void this.emit({type:"qr_code_received",payload:{qrCode:t.qrCode,methodId:e.selectedMethod}});if(t.nextActionUrl&&!this.ignore3DSInPolling){if("promptpay"===e.selectedMethod)return this.stopPolling(),void this.emit({type:"promptpay_redirect",payload:{redirectUrl:t.nextActionUrl,methodId:e.selectedMethod}});if("duitnow"===e.selectedMethod)return this.stopPolling(),void this.emit({type:"duitnow_redirect",payload:{redirectUrl:t.nextActionUrl,methodId:e.selectedMethod}});if("gopay"===e.selectedMethod)return this.stopPolling(),void this.emit({type:"gopay_redirect",payload:{redirectUrl:t.nextActionUrl,methodId:e.selectedMethod}});if("boost"===e.selectedMethod)return this.stopPolling(),void this.emit({type:"boost_redirect",payload:{redirectUrl:t.nextActionUrl,methodId:e.selectedMethod}});if("shopeepay"===e.selectedMethod)return this.stopPolling(),void this.emit({type:"shopeepay_redirect",payload:{redirectUrl:t.nextActionUrl,methodId:e.selectedMethod}});if("atom"===e.selectedMethod)return this.stopPolling(),void this.emit({type:"atom_redirect",payload:{redirectUrl:t.nextActionUrl,methodId:e.selectedMethod}});if("dana"===e.selectedMethod)return this.stopPolling(),void this.emit({type:"dana_redirect",payload:{redirectUrl:t.nextActionUrl,methodId:e.selectedMethod}});if("tng"===e.selectedMethod)return this.stopPolling(),void this.emit({type:"tng_redirect",payload:{redirectUrl:t.nextActionUrl,methodId:e.selectedMethod}});if("paynow"===e.selectedMethod&&!this.ignoreQRInPolling)return void this.emit({type:"qr_code_received",payload:{qrCode:t.nextActionUrl,methodId:e.selectedMethod}});const r={id:t.paymentIntentId,amount:t.amount??e.paymentIntent.amount,currency:t.currency??e.paymentIntent.currency,status:At,...t.metadata&&{metadata:t.metadata}};return this.setState({status:At,paymentIntent:r,actionUrl:t.nextActionUrl,selectedMethod:e.selectedMethod,availableMethods:e.availableMethods}),void this.emit({type:"payment_requires_action",payload:{paymentIntent:r,actionUrl:t.nextActionUrl,methodId:e.selectedMethod}})}const i={id:t.paymentIntentId,amount:t.amount??e.paymentIntent.amount,currency:t.currency??e.paymentIntent.currency,status:t.status,...t.metadata&&{metadata:t.metadata}};if("succeeded"===t.status)this.stopPolling(),this.setState({status:$t,paymentIntent:i,selectedMethod:e.selectedMethod}),this.emit({type:"payment_succeeded",payload:{paymentIntent:i,methodId:e.selectedMethod}});else if("failed"===t.status){this.stopPolling();const e={code:"PAYMENT_FAILED",message:t.error&&"object"==typeof t.error&&null!==t.error&&"message"in t.error?String(t.error.message):"Payment failed",timestamp:this.adapters.timer.now()};this.setState({status:Et,error:e,paymentIntent:i}),this.emit({type:"payment_failed",payload:{error:e,paymentIntent:i}})}}setState(t){const e=this.state.status;this.state=t,this.subscribers.forEach(t=>{t(this.state)}),e!==t.status&&this.emit({type:"state_changed",payload:{previousStatus:e,currentStatus:t.status}})}emit(t){const e=this.eventListeners[t.type];void 0!==e&&e.forEach(e=>{e(t)})}}var Mt="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Nt=function(t,e,r,i,n,o,s,a,l,d){var c=this;c.numeralDecimalMark=t||".",c.numeralIntegerScale=e>0?e:0,c.numeralDecimalScale=r>=0?r:2,c.numeralThousandsGroupStyle=i||Nt.groupStyle.thousand,c.numeralPositiveOnly=!!n,c.stripLeadingZeroes=!1!==o,c.prefix=s||""===s?s:"",c.signBeforePrefix=!!a,c.tailPrefix=!!l,c.delimiter=d||""===d?d:",",c.delimiterRE=d?new RegExp("\\"+d,"g"):""};Nt.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"},Nt.prototype={getRawValue:function(t){return t.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(t){var e,r,i,n,o=this,s="";switch(t=t.replace(/[A-Za-z]/g,"").replace(o.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",o.numeralPositiveOnly?"":"-").replace("M",o.numeralDecimalMark),o.stripLeadingZeroes&&(t=t.replace(/^(-)?0+(?=\d)/,"$1")),r="-"===t.slice(0,1)?"-":"",i=void 0!==o.prefix?o.signBeforePrefix?r+o.prefix:o.prefix+r:r,n=t,t.indexOf(o.numeralDecimalMark)>=0&&(n=(e=t.split(o.numeralDecimalMark))[0],s=o.numeralDecimalMark+e[1].slice(0,o.numeralDecimalScale)),"-"===r&&(n=n.slice(1)),o.numeralIntegerScale>0&&(n=n.slice(0,o.numeralIntegerScale)),o.numeralThousandsGroupStyle){case Nt.groupStyle.lakh:n=n.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+o.delimiter);break;case Nt.groupStyle.wan:n=n.replace(/(\d)(?=(\d{4})+$)/g,"$1"+o.delimiter);break;case Nt.groupStyle.thousand:n=n.replace(/(\d)(?=(\d{3})+$)/g,"$1"+o.delimiter)}return o.tailPrefix?r+n.toString()+(o.numeralDecimalScale>0?s.toString():"")+o.prefix:i+n.toString()+(o.numeralDecimalScale>0?s.toString():"")}};var Tt=Nt,Dt=function(t,e,r){var i=this;i.date=[],i.blocks=[],i.datePattern=t,i.dateMin=e.split("-").reverse().map(function(t){return parseInt(t,10)}),2===i.dateMin.length&&i.dateMin.unshift(0),i.dateMax=r.split("-").reverse().map(function(t){return parseInt(t,10)}),2===i.dateMax.length&&i.dateMax.unshift(0),i.initBlocks()};Dt.prototype={initBlocks:function(){var t=this;t.datePattern.forEach(function(e){"Y"===e?t.blocks.push(4):t.blocks.push(2)})},getISOFormatDate:function(){var t=this,e=t.date;return e[2]?e[2]+"-"+t.addLeadingZero(e[1])+"-"+t.addLeadingZero(e[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(t){var e=this,r="";return t=t.replace(/[^\d]/g,""),e.blocks.forEach(function(i,n){if(t.length>0){var o=t.slice(0,i),s=o.slice(0,1),a=t.slice(i);switch(e.datePattern[n]){case"d":"00"===o?o="01":parseInt(s,10)>3?o="0"+s:parseInt(o,10)>31&&(o="31");break;case"m":"00"===o?o="01":parseInt(s,10)>1?o="0"+s:parseInt(o,10)>12&&(o="12")}r+=o,t=a}}),this.getFixedDateString(r)},getFixedDateString:function(t){var e,r,i,n=this,o=n.datePattern,s=[],a=0,l=0,d=0,c=0,u=0,h=0,p=!1;return 4===t.length&&"y"!==o[0].toLowerCase()&&"y"!==o[1].toLowerCase()&&(u=2-(c="d"===o[0]?0:2),e=parseInt(t.slice(c,c+2),10),r=parseInt(t.slice(u,u+2),10),s=this.getFixedDate(e,r,0)),8===t.length&&(o.forEach(function(t,e){switch(t){case"d":a=e;break;case"m":l=e;break;default:d=e}}),h=2*d,c=a<=d?2*a:2*a+2,u=l<=d?2*l:2*l+2,e=parseInt(t.slice(c,c+2),10),r=parseInt(t.slice(u,u+2),10),i=parseInt(t.slice(h,h+4),10),p=4===t.slice(h,h+4).length,s=this.getFixedDate(e,r,i)),4!==t.length||"y"!==o[0]&&"y"!==o[1]||(h=2-(u="m"===o[0]?0:2),r=parseInt(t.slice(u,u+2),10),i=parseInt(t.slice(h,h+2),10),p=2===t.slice(h,h+2).length,s=[0,r,i]),6!==t.length||"Y"!==o[0]&&"Y"!==o[1]||(h=2-.5*(u="m"===o[0]?0:4),r=parseInt(t.slice(u,u+2),10),i=parseInt(t.slice(h,h+4),10),p=4===t.slice(h,h+4).length,s=[0,r,i]),s=n.getRangeFixedDate(s),n.date=s,0===s.length?t:o.reduce(function(t,e){switch(e){case"d":return t+(0===s[0]?"":n.addLeadingZero(s[0]));case"m":return t+(0===s[1]?"":n.addLeadingZero(s[1]));case"y":return t+(p?n.addLeadingZeroForYear(s[2],!1):"");case"Y":return t+(p?n.addLeadingZeroForYear(s[2],!0):"")}},"")},getRangeFixedDate:function(t){var e=this,r=e.datePattern,i=e.dateMin||[],n=e.dateMax||[];return!t.length||i.length<3&&n.length<3||r.find(function(t){return"y"===t.toLowerCase()})&&0===t[2]?t:n.length&&(n[2]<t[2]||n[2]===t[2]&&(n[1]<t[1]||n[1]===t[1]&&n[0]<t[0]))?n:i.length&&(i[2]>t[2]||i[2]===t[2]&&(i[1]>t[1]||i[1]===t[1]&&i[0]>t[0]))?i:t},getFixedDate:function(t,e,r){return t=Math.min(t,31),e=Math.min(e,12),r=parseInt(r||0,10),(e<7&&e%2==0||e>8&&e%2==1)&&(t=Math.min(t,2===e?this.isLeapYear(r)?29:28:30)),[t,e,r]},isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},addLeadingZero:function(t){return(t<10?"0":"")+t},addLeadingZeroForYear:function(t,e){return e?(t<10?"000":t<100?"00":t<1e3?"0":"")+t:(t<10?"0":"")+t}};var Rt=Dt,Lt=function(t,e){var r=this;r.time=[],r.blocks=[],r.timePattern=t,r.timeFormat=e,r.initBlocks()};Lt.prototype={initBlocks:function(){var t=this;t.timePattern.forEach(function(){t.blocks.push(2)})},getISOFormatTime:function(){var t=this,e=t.time;return e[2]?t.addLeadingZero(e[0])+":"+t.addLeadingZero(e[1])+":"+t.addLeadingZero(e[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){return"12"===String(this.timeFormat)?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(t){var e=this,r="";t=t.replace(/[^\d]/g,"");var i=e.getTimeFormatOptions();return e.blocks.forEach(function(n,o){if(t.length>0){var s=t.slice(0,n),a=s.slice(0,1),l=t.slice(n);switch(e.timePattern[o]){case"h":parseInt(a,10)>i.maxHourFirstDigit?s="0"+a:parseInt(s,10)>i.maxHours&&(s=i.maxHours+"");break;case"m":case"s":parseInt(a,10)>i.maxMinutesFirstDigit?s="0"+a:parseInt(s,10)>i.maxMinutes&&(s=i.maxMinutes+"")}r+=s,t=l}}),this.getFixedTimeString(r)},getFixedTimeString:function(t){var e,r,i,n=this,o=n.timePattern,s=[],a=0,l=0,d=0,c=0,u=0,h=0;return 6===t.length&&(o.forEach(function(t,e){switch(t){case"s":a=2*e;break;case"m":l=2*e;break;case"h":d=2*e}}),h=d,u=l,c=a,e=parseInt(t.slice(c,c+2),10),r=parseInt(t.slice(u,u+2),10),i=parseInt(t.slice(h,h+2),10),s=this.getFixedTime(i,r,e)),4===t.length&&n.timePattern.indexOf("s")<0&&(o.forEach(function(t,e){switch(t){case"m":l=2*e;break;case"h":d=2*e}}),h=d,u=l,e=0,r=parseInt(t.slice(u,u+2),10),i=parseInt(t.slice(h,h+2),10),s=this.getFixedTime(i,r,e)),n.time=s,0===s.length?t:o.reduce(function(t,e){switch(e){case"s":return t+n.addLeadingZero(s[2]);case"m":return t+n.addLeadingZero(s[1]);case"h":return t+n.addLeadingZero(s[0])}},"")},getFixedTime:function(t,e,r){return r=Math.min(parseInt(r||0,10),60),e=Math.min(e,60),[t=Math.min(t,60),e,r]},addLeadingZero:function(t){return(t<10?"0":"")+t}};var Ut=Lt,Bt=function(t,e){var r=this;r.delimiter=e||""===e?e:" ",r.delimiterRE=e?new RegExp("\\"+e,"g"):"",r.formatter=t};Bt.prototype={setFormatter:function(t){this.formatter=t},format:function(t){var e=this;e.formatter.clear();for(var r,i="",n=!1,o=0,s=(t=(t=(t=t.replace(/[^\d+]/g,"")).replace(/^\+/,"B").replace(/\+/g,"").replace("B","+")).replace(e.delimiterRE,"")).length;o<s;o++)r=e.formatter.inputDigit(t.charAt(o)),/[\s()-]/g.test(r)?(i=r,n=!0):n||(i=r);return i=(i=i.replace(/[()]/g,"")).replace(/[\s-]/g,e.delimiter)}};var Ft=Bt,zt={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(t){var e=t.reduce(function(t,e){return t+e},0);return t.concat(19-e)},getInfo:function(t,e){var r=zt.blocks,i=zt.re;for(var n in e=!!e,i)if(i[n].test(t)){var o=r[n];return{type:n,blocks:e?this.getStrictBlocks(o):o}}return{type:"unknown",blocks:e?this.getStrictBlocks(r.general):r.general}}},qt=zt,Ot={noop:function(){},strip:function(t,e){return t.replace(e,"")},getPostDelimiter:function(t,e,r){if(0===r.length)return t.slice(-e.length)===e?e:"";var i="";return r.forEach(function(e){t.slice(-e.length)===e&&(i=e)}),i},getDelimiterREByDelimiter:function(t){return new RegExp(t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(t,e,r,i,n){return e.length===t?r.length:t+this.getPositionOffset(t,e,r,i,n)},getPositionOffset:function(t,e,r,i,n){var o,s,a;return o=this.stripDelimiters(e.slice(0,t),i,n),s=this.stripDelimiters(r.slice(0,t),i,n),0!==(a=o.length-s.length)?a/Math.abs(a):0},stripDelimiters:function(t,e,r){var i=this;if(0===r.length){var n=e?i.getDelimiterREByDelimiter(e):"";return t.replace(n,"")}return r.forEach(function(e){e.split("").forEach(function(e){t=t.replace(i.getDelimiterREByDelimiter(e),"")})}),t},headStr:function(t,e){return t.slice(0,e)},getMaxLength:function(t){return t.reduce(function(t,e){return t+e},0)},getPrefixStrippedValue:function(t,e,r,i,n,o,s,a,l){if(0===r)return t;if(t===e&&""!==t)return"";if(l&&"-"==t.slice(0,1)){var d="-"==i.slice(0,1)?i.slice(1):i;return"-"+this.getPrefixStrippedValue(t.slice(1),e,r,d,n,o,s,a,l)}if(i.slice(0,r)!==e&&!a)return s&&!i&&t?t:"";if(i.slice(-r)!==e&&a)return s&&!i&&t?t:"";var c=this.stripDelimiters(i,n,o);return t.slice(0,r)===e||a?t.slice(-r)!==e&&a?c.slice(0,-r-1):a?t.slice(0,-r):t.slice(r):c.slice(r)},getFirstDiffIndex:function(t,e){for(var r=0;t.charAt(r)===e.charAt(r);)if(""===t.charAt(r++))return-1;return r},getFormattedValue:function(t,e,r,i,n,o){var s="",a=n.length>0,l="";return 0===r?t:(e.forEach(function(e,d){if(t.length>0){var c=t.slice(0,e),u=t.slice(e);l=a?n[o?d-1:d]||l:i,o?(d>0&&(s+=l),s+=c):(s+=c,c.length===e&&d<r-1&&(s+=l)),t=u}}),s)},fixPrefixCursor:function(t,e,r,i){if(t){var n=t.value,o=r||i[0]||" ";if(t.setSelectionRange&&e&&!(e.length+o.length<=n.length)){var s=2*n.length;setTimeout(function(){t.setSelectionRange(s,s)},1)}}},checkFullSelection:function(t){try{return(window.getSelection()||document.getSelection()||{}).toString().length===t.length}catch(e){}return!1},setSelection:function(t,e,r){if(t===this.getActiveElement(r)&&!(t&&t.value.length<=e))if(t.createTextRange){var i=t.createTextRange();i.move("character",e),i.select()}else try{t.setSelectionRange(e,e)}catch(n){console.warn("The input element type does not support selection")}},getActiveElement:function(t){var e=t.activeElement;return e&&e.shadowRoot?this.getActiveElement(e.shadowRoot):e},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(t,e){return!!(this.isAndroid()&&t&&e)&&e===t.slice(0,-1)}},Ht={assign:function(t,e){return e=e||{},(t=t||{}).creditCard=!!e.creditCard,t.creditCardStrictMode=!!e.creditCardStrictMode,t.creditCardType="",t.onCreditCardTypeChanged=e.onCreditCardTypeChanged||function(){},t.phone=!!e.phone,t.phoneRegionCode=e.phoneRegionCode||"AU",t.phoneFormatter={},t.time=!!e.time,t.timePattern=e.timePattern||["h","m","s"],t.timeFormat=e.timeFormat||"24",t.timeFormatter={},t.date=!!e.date,t.datePattern=e.datePattern||["d","m","Y"],t.dateMin=e.dateMin||"",t.dateMax=e.dateMax||"",t.dateFormatter={},t.numeral=!!e.numeral,t.numeralIntegerScale=e.numeralIntegerScale>0?e.numeralIntegerScale:0,t.numeralDecimalScale=e.numeralDecimalScale>=0?e.numeralDecimalScale:2,t.numeralDecimalMark=e.numeralDecimalMark||".",t.numeralThousandsGroupStyle=e.numeralThousandsGroupStyle||"thousand",t.numeralPositiveOnly=!!e.numeralPositiveOnly,t.stripLeadingZeroes=!1!==e.stripLeadingZeroes,t.signBeforePrefix=!!e.signBeforePrefix,t.tailPrefix=!!e.tailPrefix,t.swapHiddenInput=!!e.swapHiddenInput,t.numericOnly=t.creditCard||t.date||!!e.numericOnly,t.uppercase=!!e.uppercase,t.lowercase=!!e.lowercase,t.prefix=t.creditCard||t.date?"":e.prefix||"",t.noImmediatePrefix=!!e.noImmediatePrefix,t.prefixLength=t.prefix.length,t.rawValueTrimPrefix=!!e.rawValueTrimPrefix,t.copyDelimiter=!!e.copyDelimiter,t.initValue=void 0!==e.initValue&&null!==e.initValue?e.initValue.toString():"",t.delimiter=e.delimiter||""===e.delimiter?e.delimiter:e.date?"/":e.time?":":e.numeral?",":(e.phone," "),t.delimiterLength=t.delimiter.length,t.delimiterLazyShow=!!e.delimiterLazyShow,t.delimiters=e.delimiters||[],t.blocks=e.blocks||[],t.blocksLength=t.blocks.length,t.root="object"==typeof Mt&&Mt?Mt:window,t.document=e.document||t.root.document,t.maxLength=0,t.backspace=!1,t.result="",t.onValueChanged=e.onValueChanged||function(){},t}},jt=function(t,e){var r=this,i=!1;if("string"==typeof t?(r.element=document.querySelector(t),i=document.querySelectorAll(t).length>1):void 0!==t.length&&t.length>0?(r.element=t[0],i=t.length>1):r.element=t,!r.element)throw new Error("[cleave.js] Please check the element");if(i)try{console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.")}catch(n){}e.initValue=r.element.value,r.properties=jt.DefaultProperties.assign({},e),r.init()};jt.prototype={init:function(){var t=this,e=t.properties;e.numeral||e.phone||e.creditCard||e.time||e.date||0!==e.blocksLength||e.prefix?(e.maxLength=jt.Util.getMaxLength(e.blocks),t.isAndroid=jt.Util.isAndroid(),t.lastInputValue="",t.isBackward="",t.onChangeListener=t.onChange.bind(t),t.onKeyDownListener=t.onKeyDown.bind(t),t.onFocusListener=t.onFocus.bind(t),t.onCutListener=t.onCut.bind(t),t.onCopyListener=t.onCopy.bind(t),t.initSwapHiddenInput(),t.element.addEventListener("input",t.onChangeListener),t.element.addEventListener("keydown",t.onKeyDownListener),t.element.addEventListener("focus",t.onFocusListener),t.element.addEventListener("cut",t.onCutListener),t.element.addEventListener("copy",t.onCopyListener),t.initPhoneFormatter(),t.initDateFormatter(),t.initTimeFormatter(),t.initNumeralFormatter(),(e.initValue||e.prefix&&!e.noImmediatePrefix)&&t.onInput(e.initValue)):t.onInput(e.initValue)},initSwapHiddenInput:function(){var t=this;if(t.properties.swapHiddenInput){var e=t.element.cloneNode(!0);t.element.parentNode.insertBefore(e,t.element),t.elementSwapHidden=t.element,t.elementSwapHidden.type="hidden",t.element=e,t.element.id=""}},initNumeralFormatter:function(){var t=this.properties;t.numeral&&(t.numeralFormatter=new jt.NumeralFormatter(t.numeralDecimalMark,t.numeralIntegerScale,t.numeralDecimalScale,t.numeralThousandsGroupStyle,t.numeralPositiveOnly,t.stripLeadingZeroes,t.prefix,t.signBeforePrefix,t.tailPrefix,t.delimiter))},initTimeFormatter:function(){var t=this.properties;t.time&&(t.timeFormatter=new jt.TimeFormatter(t.timePattern,t.timeFormat),t.blocks=t.timeFormatter.getBlocks(),t.blocksLength=t.blocks.length,t.maxLength=jt.Util.getMaxLength(t.blocks))},initDateFormatter:function(){var t=this.properties;t.date&&(t.dateFormatter=new jt.DateFormatter(t.datePattern,t.dateMin,t.dateMax),t.blocks=t.dateFormatter.getBlocks(),t.blocksLength=t.blocks.length,t.maxLength=jt.Util.getMaxLength(t.blocks))},initPhoneFormatter:function(){var t=this.properties;if(t.phone)try{t.phoneFormatter=new jt.PhoneFormatter(new t.root.Cleave.AsYouTypeFormatter(t.phoneRegionCode),t.delimiter)}catch(e){throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(t){var e=this,r=t.which||t.keyCode;e.lastInputValue=e.element.value,e.isBackward=8===r},onChange:function(t){var e=this,r=e.properties,i=jt.Util;e.isBackward=e.isBackward||"deleteContentBackward"===t.inputType;var n=i.getPostDelimiter(e.lastInputValue,r.delimiter,r.delimiters);e.isBackward&&n?r.postDelimiterBackspace=n:r.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var t=this,e=t.properties;t.lastInputValue=t.element.value,e.prefix&&e.noImmediatePrefix&&!t.element.value&&this.onInput(e.prefix),jt.Util.fixPrefixCursor(t.element,e.prefix,e.delimiter,e.delimiters)},onCut:function(t){jt.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(t),this.onInput(""))},onCopy:function(t){jt.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(t)},copyClipboardData:function(t){var e=this.properties,r=jt.Util,i=this.element.value,n="";n=e.copyDelimiter?i:r.stripDelimiters(i,e.delimiter,e.delimiters);try{t.clipboardData?t.clipboardData.setData("Text",n):window.clipboardData.setData("Text",n),t.preventDefault()}catch(o){}},onInput:function(t){var e=this,r=e.properties,i=jt.Util,n=i.getPostDelimiter(t,r.delimiter,r.delimiters);return r.numeral||!r.postDelimiterBackspace||n||(t=i.headStr(t,t.length-r.postDelimiterBackspace.length)),r.phone?(!r.prefix||r.noImmediatePrefix&&!t.length?r.result=r.phoneFormatter.format(t):r.result=r.prefix+r.phoneFormatter.format(t).slice(r.prefix.length),void e.updateValueState()):r.numeral?(r.prefix&&r.noImmediatePrefix&&0===t.length?r.result="":r.result=r.numeralFormatter.format(t),void e.updateValueState()):(r.date&&(t=r.dateFormatter.getValidatedDate(t)),r.time&&(t=r.timeFormatter.getValidatedTime(t)),t=i.stripDelimiters(t,r.delimiter,r.delimiters),t=i.getPrefixStrippedValue(t,r.prefix,r.prefixLength,r.result,r.delimiter,r.delimiters,r.noImmediatePrefix,r.tailPrefix,r.signBeforePrefix),t=r.numericOnly?i.strip(t,/[^\d]/g):t,t=r.uppercase?t.toUpperCase():t,t=r.lowercase?t.toLowerCase():t,r.prefix&&(r.tailPrefix?t+=r.prefix:t=r.prefix+t,0===r.blocksLength)?(r.result=t,void e.updateValueState()):(r.creditCard&&e.updateCreditCardPropsByValue(t),t=i.headStr(t,r.maxLength),r.result=i.getFormattedValue(t,r.blocks,r.blocksLength,r.delimiter,r.delimiters,r.delimiterLazyShow),void e.updateValueState()))},updateCreditCardPropsByValue:function(t){var e,r=this.properties,i=jt.Util;i.headStr(r.result,4)!==i.headStr(t,4)&&(e=jt.CreditCardDetector.getInfo(t,r.creditCardStrictMode),r.blocks=e.blocks,r.blocksLength=r.blocks.length,r.maxLength=i.getMaxLength(r.blocks),r.creditCardType!==e.type&&(r.creditCardType=e.type,r.onCreditCardTypeChanged.call(this,r.creditCardType)))},updateValueState:function(){var t=this,e=jt.Util,r=t.properties;if(t.element){var i=t.element.selectionEnd,n=t.element.value,o=r.result;i=e.getNextCursorPosition(i,n,o,r.delimiter,r.delimiters),t.isAndroid?window.setTimeout(function(){t.element.value=o,e.setSelection(t.element,i,r.document,!1),t.callOnValueChanged()},1):(t.element.value=o,r.swapHiddenInput&&(t.elementSwapHidden.value=t.getRawValue()),e.setSelection(t.element,i,r.document,!1),t.callOnValueChanged())}},callOnValueChanged:function(){var t=this,e=t.properties;e.onValueChanged.call(t,{target:{name:t.element.name,value:e.result,rawValue:t.getRawValue()}})},setPhoneRegionCode:function(t){var e=this;e.properties.phoneRegionCode=t,e.initPhoneFormatter(),e.onChange()},setRawValue:function(t){var e=this,r=e.properties;t=null!=t?t.toString():"",r.numeral&&(t=t.replace(".",r.numeralDecimalMark)),r.postDelimiterBackspace=!1,e.element.value=t,e.onInput(t)},getRawValue:function(){var t=this.properties,e=jt.Util,r=this.element.value;return t.rawValueTrimPrefix&&(r=e.getPrefixStrippedValue(r,t.prefix,t.prefixLength,t.result,t.delimiter,t.delimiters,t.noImmediatePrefix,t.tailPrefix,t.signBeforePrefix)),r=t.numeral?t.numeralFormatter.getRawValue(r):e.stripDelimiters(r,t.delimiter,t.delimiters)},getISOFormatDate:function(){var t=this.properties;return t.date?t.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var t=this.properties;return t.time?t.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var t=this;t.element.removeEventListener("input",t.onChangeListener),t.element.removeEventListener("keydown",t.onKeyDownListener),t.element.removeEventListener("focus",t.onFocusListener),t.element.removeEventListener("cut",t.onCutListener),t.element.removeEventListener("copy",t.onCopyListener)},toString:function(){return"[Cleave Object]"}},jt.NumeralFormatter=Tt,jt.DateFormatter=Rt,jt.TimeFormatter=Ut,jt.PhoneFormatter=Ft,jt.CreditCardDetector=qt,jt.Util=Ot,jt.DefaultProperties=Ht,("object"==typeof Mt&&Mt?Mt:window).Cleave=jt;var Vt=jt,Yt={},Qt={},Kt={};let Gt;const Jt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Kt.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},Kt.getSymbolTotalCodewords=function(t){return Jt[t]},Kt.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},Kt.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');Gt=t},Kt.isKanjiModeEnabled=function(){return void 0!==Gt},Kt.toSJIS=function(t){return Gt(t)};var Zt,Wt={};function Xt(){this.buffer=[],this.length=0}(Zt=Wt).L={bit:1},Zt.M={bit:0},Zt.Q={bit:3},Zt.H={bit:2},Zt.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},Zt.from=function(t,e){if(Zt.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return Zt.L;case"m":case"medium":return Zt.M;case"q":case"quartile":return Zt.Q;case"h":case"high":return Zt.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(r){return e}},Xt.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var te=Xt;function ee(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}ee.prototype.set=function(t,e,r,i){const n=t*this.size+e;this.data[n]=r,i&&(this.reservedBit[n]=!0)},ee.prototype.get=function(t,e){return this.data[t*this.size+e]},ee.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r},ee.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var re=ee,ie={};!function(t){const e=Kt.getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const r=Math.floor(t/7)+2,i=e(t),n=145===i?26:2*Math.ceil((i-13)/(2*r-2)),o=[i-7];for(let e=1;e<r-1;e++)o[e]=o[e-1]-n;return o.push(6),o.reverse()},t.getPositions=function(e){const r=[],i=t.getRowColCoords(e),n=i.length;for(let t=0;t<n;t++)for(let e=0;e<n;e++)0===t&&0===e||0===t&&e===n-1||t===n-1&&0===e||r.push([i[t],i[e]]);return r}}(ie);var ne={};const oe=Kt.getSymbolSize;ne.getPositions=function(t){const e=oe(t);return[[0,0],[e-7,0],[0,e-7]]};var se={};!function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e=3,r=3,i=40,n=10;function o(e,r,i){switch(e){case t.Patterns.PATTERN000:return(r+i)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return i%3==0;case t.Patterns.PATTERN011:return(r+i)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(i/3))%2==0;case t.Patterns.PATTERN101:return r*i%2+r*i%3==0;case t.Patterns.PATTERN110:return(r*i%2+r*i%3)%2==0;case t.Patterns.PATTERN111:return(r*i%3+(r+i)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(t){const r=t.size;let i=0,n=0,o=0,s=null,a=null;for(let l=0;l<r;l++){n=o=0,s=a=null;for(let d=0;d<r;d++){let r=t.get(l,d);r===s?n++:(n>=5&&(i+=e+(n-5)),s=r,n=1),r=t.get(d,l),r===a?o++:(o>=5&&(i+=e+(o-5)),a=r,o=1)}n>=5&&(i+=e+(n-5)),o>=5&&(i+=e+(o-5))}return i},t.getPenaltyN2=function(t){const e=t.size;let i=0;for(let r=0;r<e-1;r++)for(let n=0;n<e-1;n++){const e=t.get(r,n)+t.get(r,n+1)+t.get(r+1,n)+t.get(r+1,n+1);4!==e&&0!==e||i++}return i*r},t.getPenaltyN3=function(t){const e=t.size;let r=0,n=0,o=0;for(let i=0;i<e;i++){n=o=0;for(let s=0;s<e;s++)n=n<<1&2047|t.get(i,s),s>=10&&(1488===n||93===n)&&r++,o=o<<1&2047|t.get(s,i),s>=10&&(1488===o||93===o)&&r++}return r*i},t.getPenaltyN4=function(t){let e=0;const r=t.data.length;for(let i=0;i<r;i++)e+=t.data[i];return Math.abs(Math.ceil(100*e/r/5)-10)*n},t.applyMask=function(t,e){const r=e.size;for(let i=0;i<r;i++)for(let n=0;n<r;n++)e.isReserved(n,i)||e.xor(n,i,o(t,n,i))},t.getBestMask=function(e,r){const i=Object.keys(t.Patterns).length;let n=0,o=1/0;for(let s=0;s<i;s++){r(s),t.applyMask(s,e);const i=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),i<o&&(o=i,n=s)}return n}}(se);var ae={};const le=Wt,de=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],ce=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];ae.getBlocksCount=function(t,e){switch(e){case le.L:return de[4*(t-1)+0];case le.M:return de[4*(t-1)+1];case le.Q:return de[4*(t-1)+2];case le.H:return de[4*(t-1)+3];default:return}},ae.getTotalCodewordsCount=function(t,e){switch(e){case le.L:return ce[4*(t-1)+0];case le.M:return ce[4*(t-1)+1];case le.Q:return ce[4*(t-1)+2];case le.H:return ce[4*(t-1)+3];default:return}};var ue={},he={};const pe=new Uint8Array(512),me=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)pe[e]=t,me[t]=e,t<<=1,256&t&&(t^=285);for(let e=255;e<512;e++)pe[e]=pe[e-255]}(),he.log=function(t){if(t<1)throw new Error("log("+t+")");return me[t]},he.exp=function(t){return pe[t]},he.mul=function(t,e){return 0===t||0===e?0:pe[me[t]+me[e]]},function(t){const e=he;t.mul=function(t,r){const i=new Uint8Array(t.length+r.length-1);for(let n=0;n<t.length;n++)for(let o=0;o<r.length;o++)i[n+o]^=e.mul(t[n],r[o]);return i},t.mod=function(t,r){let i=new Uint8Array(t);for(;i.length-r.length>=0;){const t=i[0];for(let o=0;o<r.length;o++)i[o]^=e.mul(r[o],t);let n=0;for(;n<i.length&&0===i[n];)n++;i=i.slice(n)}return i},t.generateECPolynomial=function(r){let i=new Uint8Array([1]);for(let n=0;n<r;n++)i=t.mul(i,new Uint8Array([1,e.exp(n)]));return i}}(ue);const ge=ue;function fe(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}fe.prototype.initialize=function(t){this.degree=t,this.genPoly=ge.generateECPolynomial(this.degree)},fe.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const r=ge.mod(e,this.genPoly),i=this.degree-r.length;if(i>0){const t=new Uint8Array(this.degree);return t.set(r,i),t}return r};var ye=fe,ve={},be={},we={isValid:function(t){return!isNaN(t)&&t>=1&&t<=40}},xe={};const ke="[0-9]+";let Se="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Se=Se.replace(/u/g,"\\u");const Pe="(?:(?![A-Z0-9 $%*+\\-./:]|"+Se+")(?:.|[\r\n]))+";xe.KANJI=new RegExp(Se,"g"),xe.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),xe.BYTE=new RegExp(Pe,"g"),xe.NUMERIC=new RegExp(ke,"g"),xe.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const Ce=new RegExp("^"+Se+"$"),Ae=new RegExp("^"+ke+"$"),$e=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");xe.testKanji=function(t){return Ce.test(t)},xe.testNumeric=function(t){return Ae.test(t)},xe.testAlphanumeric=function(t){return $e.test(t)},function(t){const e=we,r=xe;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,r){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!e.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?t.ccBits[0]:r<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(e){return r.testNumeric(e)?t.NUMERIC:r.testAlphanumeric(e)?t.ALPHANUMERIC:r.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(i){return r}}}(be),function(t){const e=Kt,r=ae,i=Wt,n=be,o=we,s=e.getBCHDigit(7973);function a(t,e){return n.getCharCountIndicator(t,e)+4}function l(t,e){let r=0;return t.forEach(function(t){const i=a(t.mode,e);r+=i+t.getBitsLength()}),r}t.from=function(t,e){return o.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,i,s){if(!o.isValid(t))throw new Error("Invalid QR Code version");void 0===s&&(s=n.BYTE);const l=8*(e.getSymbolTotalCodewords(t)-r.getTotalCodewordsCount(t,i));if(s===n.MIXED)return l;const d=l-a(s,t);switch(s){case n.NUMERIC:return Math.floor(d/10*3);case n.ALPHANUMERIC:return Math.floor(d/11*2);case n.KANJI:return Math.floor(d/13);case n.BYTE:default:return Math.floor(d/8)}},t.getBestVersionForData=function(e,r){let o;const s=i.from(r,i.M);if(Array.isArray(e)){if(e.length>1)return function(e,r){for(let i=1;i<=40;i++)if(l(e,i)<=t.getCapacity(i,r,n.MIXED))return i}(e,s);if(0===e.length)return 1;o=e[0]}else o=e;return function(e,r,i){for(let n=1;n<=40;n++)if(r<=t.getCapacity(n,i,e))return n}(o.mode,o.getLength(),s)},t.getEncodedBits=function(t){if(!o.isValid(t)||t<7)throw new Error("Invalid QR Code version");let r=t<<12;for(;e.getBCHDigit(r)-s>=0;)r^=7973<<e.getBCHDigit(r)-s;return t<<12|r}}(ve);var Ee={};const _e=Kt,Ie=_e.getBCHDigit(1335);Ee.getEncodedBits=function(t,e){const r=t.bit<<3|e;let i=r<<10;for(;_e.getBCHDigit(i)-Ie>=0;)i^=1335<<_e.getBCHDigit(i)-Ie;return 21522^(r<<10|i)};var Me={};const Ne=be;function Te(t){this.mode=Ne.NUMERIC,this.data=t.toString()}Te.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},Te.prototype.getLength=function(){return this.data.length},Te.prototype.getBitsLength=function(){return Te.getBitsLength(this.data.length)},Te.prototype.write=function(t){let e,r,i;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),i=parseInt(r,10),t.put(i,10);const n=this.data.length-e;n>0&&(r=this.data.substr(e),i=parseInt(r,10),t.put(i,3*n+1))};var De=Te;const Re=be,Le=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Ue(t){this.mode=Re.ALPHANUMERIC,this.data=t}Ue.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},Ue.prototype.getLength=function(){return this.data.length},Ue.prototype.getBitsLength=function(){return Ue.getBitsLength(this.data.length)},Ue.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let r=45*Le.indexOf(this.data[e]);r+=Le.indexOf(this.data[e+1]),t.put(r,11)}this.data.length%2&&t.put(Le.indexOf(this.data[e]),6)};var Be=Ue;const Fe=be;function ze(t){this.mode=Fe.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}ze.getBitsLength=function(t){return 8*t},ze.prototype.getLength=function(){return this.data.length},ze.prototype.getBitsLength=function(){return ze.getBitsLength(this.data.length)},ze.prototype.write=function(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)};var qe=ze;const Oe=be,He=Kt;function je(t){this.mode=Oe.KANJI,this.data=t}je.getBitsLength=function(t){return 13*t},je.prototype.getLength=function(){return this.data.length},je.prototype.getBitsLength=function(){return je.getBitsLength(this.data.length)},je.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let r=He.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}};var Ve,Ye=je,Qe={exports:{}};Ve={single_source_shortest_paths:function(t,e,r){var i={},n={};n[e]=0;var o,s,a,l,d,c,u,h=Ve.PriorityQueue.make();for(h.push(e,0);!h.empty();)for(a in s=(o=h.pop()).value,l=o.cost,d=t[s]||{})d.hasOwnProperty(a)&&(c=l+d[a],u=n[a],(void 0===n[a]||u>c)&&(n[a]=c,h.push(a,c),i[a]=s));if(void 0!==r&&void 0===n[r]){var p=["Could not find a path from ",e," to ",r,"."].join("");throw new Error(p)}return i},extract_shortest_path_from_predecessor_list:function(t,e){for(var r=[],i=e;i;)r.push(i),t[i],i=t[i];return r.reverse(),r},find_path:function(t,e,r){var i=Ve.single_source_shortest_paths(t,e,r);return Ve.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(t){var e,r=Ve.PriorityQueue,i={};for(e in t=t||{},r)r.hasOwnProperty(e)&&(i[e]=r[e]);return i.queue=[],i.sorter=t.sorter||r.default_sorter,i},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var r={value:t,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}},Qe.exports=Ve;var Ke=Qe.exports;!function(t){const e=be,r=De,i=Be,n=qe,o=Ye,s=xe,a=Kt,l=Ke;function d(t){return unescape(encodeURIComponent(t)).length}function c(t,e,r){const i=[];let n;for(;null!==(n=t.exec(r));)i.push({data:n[0],index:n.index,mode:e,length:n[0].length});return i}function u(t){const r=c(s.NUMERIC,e.NUMERIC,t),i=c(s.ALPHANUMERIC,e.ALPHANUMERIC,t);let n,o;a.isKanjiModeEnabled()?(n=c(s.BYTE,e.BYTE,t),o=c(s.KANJI,e.KANJI,t)):(n=c(s.BYTE_KANJI,e.BYTE,t),o=[]);return r.concat(i,n,o).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function h(t,s){switch(s){case e.NUMERIC:return r.getBitsLength(t);case e.ALPHANUMERIC:return i.getBitsLength(t);case e.KANJI:return o.getBitsLength(t);case e.BYTE:return n.getBitsLength(t)}}function p(t,s){let l;const d=e.getBestModeForData(t);if(l=e.from(s,d),l!==e.BYTE&&l.bit<d.bit)throw new Error('"'+t+'" cannot be encoded with mode '+e.toString(l)+".\n Suggested mode is: "+e.toString(d));switch(l!==e.KANJI||a.isKanjiModeEnabled()||(l=e.BYTE),l){case e.NUMERIC:return new r(t);case e.ALPHANUMERIC:return new i(t);case e.KANJI:return new o(t);case e.BYTE:return new n(t)}}t.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(p(e,null)):e.data&&t.push(p(e.data,e.mode)),t},[])},t.fromString=function(r,i){const n=function(t){const r=[];for(let i=0;i<t.length;i++){const n=t[i];switch(n.mode){case e.NUMERIC:r.push([n,{data:n.data,mode:e.ALPHANUMERIC,length:n.length},{data:n.data,mode:e.BYTE,length:n.length}]);break;case e.ALPHANUMERIC:r.push([n,{data:n.data,mode:e.BYTE,length:n.length}]);break;case e.KANJI:r.push([n,{data:n.data,mode:e.BYTE,length:d(n.data)}]);break;case e.BYTE:r.push([{data:n.data,mode:e.BYTE,length:d(n.data)}])}}return r}(u(r,a.isKanjiModeEnabled())),o=function(t,r){const i={},n={start:{}};let o=["start"];for(let s=0;s<t.length;s++){const a=t[s],l=[];for(let t=0;t<a.length;t++){const d=a[t],c=""+s+t;l.push(c),i[c]={node:d,lastCount:0},n[c]={};for(let t=0;t<o.length;t++){const s=o[t];i[s]&&i[s].node.mode===d.mode?(n[s][c]=h(i[s].lastCount+d.length,d.mode)-h(i[s].lastCount,d.mode),i[s].lastCount+=d.length):(i[s]&&(i[s].lastCount=d.length),n[s][c]=h(d.length,d.mode)+4+e.getCharCountIndicator(d.mode,r))}}o=l}for(let e=0;e<o.length;e++)n[o[e]].end=0;return{map:n,table:i}}(n,i),s=l.find_path(o.map,"start","end"),c=[];for(let t=1;t<s.length-1;t++)c.push(o.table[s[t]].node);return t.fromArray(function(t){return t.reduce(function(t,e){const r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}(c))},t.rawSplit=function(e){return t.fromArray(u(e,a.isKanjiModeEnabled()))}}(Me);const Ge=Kt,Je=Wt,Ze=te,We=re,Xe=ie,tr=ne,er=se,rr=ae,ir=ye,nr=ve,or=Ee,sr=be,ar=Me;function lr(t,e,r){const i=t.size,n=or.getEncodedBits(e,r);let o,s;for(o=0;o<15;o++)s=1==(n>>o&1),o<6?t.set(o,8,s,!0):o<8?t.set(o+1,8,s,!0):t.set(i-15+o,8,s,!0),o<8?t.set(8,i-o-1,s,!0):o<9?t.set(8,15-o-1+1,s,!0):t.set(8,15-o-1,s,!0);t.set(i-8,8,1,!0)}function dr(t,e,r){const i=new Ze;r.forEach(function(e){i.put(e.mode.bit,4),i.put(e.getLength(),sr.getCharCountIndicator(e.mode,t)),e.write(i)});const n=8*(Ge.getSymbolTotalCodewords(t)-rr.getTotalCodewordsCount(t,e));for(i.getLengthInBits()+4<=n&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const o=(n-i.getLengthInBits())/8;for(let s=0;s<o;s++)i.put(s%2?17:236,8);return function(t,e,r){const i=Ge.getSymbolTotalCodewords(e),n=rr.getTotalCodewordsCount(e,r),o=i-n,s=rr.getBlocksCount(e,r),a=i%s,l=s-a,d=Math.floor(i/s),c=Math.floor(o/s),u=c+1,h=d-c,p=new ir(h);let m=0;const g=new Array(s),f=new Array(s);let y=0;const v=new Uint8Array(t.buffer);for(let S=0;S<s;S++){const t=S<l?c:u;g[S]=v.slice(m,m+t),f[S]=p.encode(g[S]),m+=t,y=Math.max(y,t)}const b=new Uint8Array(i);let w,x,k=0;for(w=0;w<y;w++)for(x=0;x<s;x++)w<g[x].length&&(b[k++]=g[x][w]);for(w=0;w<h;w++)for(x=0;x<s;x++)b[k++]=f[x][w];return b}(i,t,e)}function cr(t,e,r,i){let n;if(Array.isArray(t))n=ar.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let i=e;if(!i){const e=ar.rawSplit(t);i=nr.getBestVersionForData(e,r)}n=ar.fromString(t,i||40)}}const o=nr.getBestVersionForData(n,r);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<o)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+o+".\n")}else e=o;const s=dr(e,r,n),a=Ge.getSymbolSize(e),l=new We(a);return function(t,e){const r=t.size,i=tr.getPositions(e);for(let n=0;n<i.length;n++){const e=i[n][0],o=i[n][1];for(let i=-1;i<=7;i++)if(!(e+i<=-1||r<=e+i))for(let n=-1;n<=7;n++)o+n<=-1||r<=o+n||(i>=0&&i<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===i||6===i)||i>=2&&i<=4&&n>=2&&n<=4?t.set(e+i,o+n,!0,!0):t.set(e+i,o+n,!1,!0))}}(l,e),function(t){const e=t.size;for(let r=8;r<e-8;r++){const e=r%2==0;t.set(r,6,e,!0),t.set(6,r,e,!0)}}(l),function(t,e){const r=Xe.getPositions(e);for(let i=0;i<r.length;i++){const e=r[i][0],n=r[i][1];for(let r=-2;r<=2;r++)for(let i=-2;i<=2;i++)-2===r||2===r||-2===i||2===i||0===r&&0===i?t.set(e+r,n+i,!0,!0):t.set(e+r,n+i,!1,!0)}}(l,e),lr(l,r,0),e>=7&&function(t,e){const r=t.size,i=nr.getEncodedBits(e);let n,o,s;for(let a=0;a<18;a++)n=Math.floor(a/3),o=a%3+r-8-3,s=1==(i>>a&1),t.set(n,o,s,!0),t.set(o,n,s,!0)}(l,e),function(t,e){const r=t.size;let i=-1,n=r-1,o=7,s=0;for(let a=r-1;a>0;a-=2)for(6===a&&a--;;){for(let r=0;r<2;r++)if(!t.isReserved(n,a-r)){let i=!1;s<e.length&&(i=1==(e[s]>>>o&1)),t.set(n,a-r,i),o--,-1===o&&(s++,o=7)}if(n+=i,n<0||r<=n){n-=i,i=-i;break}}}(l,s),isNaN(i)&&(i=er.getBestMask(l,lr.bind(null,l,r))),er.applyMask(i,l),lr(l,r,i),{modules:l,version:e,errorCorrectionLevel:r,maskPattern:i,segments:n}}Qt.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let r,i,n=Je.M;return void 0!==e&&(n=Je.from(e.errorCorrectionLevel,Je.M),r=nr.from(e.version),i=er.from(e.maskPattern),e.toSJISFunc&&Ge.setToSJISFunction(e.toSJISFunc)),cr(t,r,n,i)};var ur={},hr={};!function(t){function e(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");const r=parseInt(e.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const r=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,i=t.width&&t.width>=21?t.width:void 0,n=t.scale||4;return{width:i,scale:i?4:n,margin:r,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},t.getImageWidth=function(e,r){const i=t.getScale(e,r);return Math.floor((e+2*r.margin)*i)},t.qrToImageData=function(e,r,i){const n=r.modules.size,o=r.modules.data,s=t.getScale(n,i),a=Math.floor((n+2*i.margin)*s),l=i.margin*s,d=[i.color.light,i.color.dark];for(let t=0;t<a;t++)for(let r=0;r<a;r++){let c=4*(t*a+r),u=i.color.light;if(t>=l&&r>=l&&t<a-l&&r<a-l){u=d[o[Math.floor((t-l)/s)*n+Math.floor((r-l)/s)]?1:0]}e[c++]=u.r,e[c++]=u.g,e[c++]=u.b,e[c]=u.a}}}(hr),function(t){const e=hr;t.render=function(t,r,i){let n=i,o=r;void 0!==n||r&&r.getContext||(n=r,r=void 0),r||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),n=e.getOptions(n);const s=e.getImageWidth(t.modules.size,n),a=o.getContext("2d"),l=a.createImageData(s,s);return e.qrToImageData(l.data,t,n),function(t,e,r){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=r,e.width=r,e.style.height=r+"px",e.style.width=r+"px"}(a,o,s),a.putImageData(l,0,0),o},t.renderToDataURL=function(e,r,i){let n=i;void 0!==n||r&&r.getContext||(n=r,r=void 0),n||(n={});const o=t.render(e,r,n),s=n.type||"image/png",a=n.rendererOpts||{};return o.toDataURL(s,a.quality)}}(ur);var pr={};const mr=hr;function gr(t,e){const r=t.a/255,i=e+'="'+t.hex+'"';return r<1?i+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':i}function fr(t,e,r){let i=t+e;return void 0!==r&&(i+=" "+r),i}pr.render=function(t,e,r){const i=mr.getOptions(e),n=t.modules.size,o=t.modules.data,s=n+2*i.margin,a=i.color.light.a?"<path "+gr(i.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",l="<path "+gr(i.color.dark,"stroke")+' d="'+function(t,e,r){let i="",n=0,o=!1,s=0;for(let a=0;a<t.length;a++){const l=Math.floor(a%e),d=Math.floor(a/e);l||o||(o=!0),t[a]?(s++,a>0&&l>0&&t[a-1]||(i+=o?fr("M",l+r,.5+d+r):fr("m",n,0),n=0,o=!1),l+1<e&&t[a+1]||(i+=fr("h",s),s=0)):n++}return i}(o,n,i.margin)+'"/>',d='viewBox="0 0 '+s+" "+s+'"',c='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+d+' shape-rendering="crispEdges">'+a+l+"</svg>\n";return"function"==typeof r&&r(null,c),c};const yr=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then},vr=Qt,br=ur,wr=pr;function xr(t,e,r,i,n){const o=[].slice.call(arguments,1),s=o.length,a="function"==typeof o[s-1];if(!a&&!yr())throw new Error("Callback required as last argument");if(!a){if(s<1)throw new Error("Too few arguments provided");return 1===s?(r=e,e=i=void 0):2!==s||e.getContext||(i=r,r=e,e=void 0),new Promise(function(n,o){try{const o=vr.create(r,i);n(t(o,e,i))}catch(s){o(s)}})}if(s<2)throw new Error("Too few arguments provided");2===s?(n=r,r=e,e=i=void 0):3===s&&(e.getContext&&void 0===n?(n=i,i=void 0):(n=i,i=r,r=e,e=void 0));try{const o=vr.create(r,i);n(null,t(o,e,i))}catch(l){n(l)}}Yt.create=vr.create,Yt.toCanvas=xr.bind(null,br.render),Yt.toDataURL=xr.bind(null,br.renderToDataURL),Yt.toString=xr.bind(null,function(t,e,r){return wr.render(t,r)});var kr=Object.defineProperty,Sr=Object.getOwnPropertyDescriptor,Pr=(t,e,r,i)=>{for(var n,o=i>1?void 0:i?Sr(e,r):e,s=t.length-1;s>=0;s--)(n=t[s])&&(o=(i?n(e,r,o):n(o))||o);return i&&o&&kr(e,r,o),o};let Cr=class extends st{constructor(){super(...arguments),this.currentState={status:"idle"},this.selectedMethod=null,this.cardFormData={cardNumber:"",expiry:"",cvv:"",cardholderName:""},this.formErrors={},this.paymentData=null,this.feesExpanded=!1,this.isInitializing=!0,this.cardBrand="unknown",this.paymentLocked=!1,this.show3DSModal=!1,this.showQRModal=!1,this.nextActionUrl=null,this.qrCode=null,this.qrCodeDataUrl=null,this.qrAutoResumeTimer=null,this.qrPollingInProgress=!1,this.sdk=null,this.isInitialized=!1,this.cardNumberCleave=null,this.expiryCleave=null,this.leaveEventsCounter=0,this.previousState=null,this.cssVariableMap={colorPrimary:"--op-color-primary",colorPrimaryHover:"--op-color-primary-hover",colorPrimaryText:"--op-color-primary-text",colorBackground:"--op-color-background",colorSurface:"--op-color-surface",colorText:"--op-color-text",colorTextSecondary:"--op-color-text-secondary",colorDanger:"--op-color-danger",colorSuccess:"--op-color-success",colorWarning:"--op-color-warning",colorBorder:"--op-color-border",colorBorderFocus:"--op-color-border-focus",fontFamily:"--op-font-family",fontSize:"--op-font-size",fontSizeSmall:"--op-font-size-sm",borderRadius:"--op-border-radius",borderRadiusLarge:"--op-border-radius-lg",spacingUnit:"--op-spacing-unit",boxShadow:"--op-box-shadow",boxShadowLarge:"--op-box-shadow-lg"},this.themeMediaQuery=null,this.themeMediaQueryHandler=null,this.handle3DSPostMessage=t=>{"ON_AWX_3DS_START_PAGE_LEAVE"===t.data&&(this.leaveEventsCounter++,this.leaveEventsCounter>1&&this.handle3DSComplete())}}hasAllRequiredProps(){return!!(this.config&&this.adapters&&this.amount&&this.currency&&this.orderId)&&(!(!this.firstName||"string"!=typeof this.firstName||""===this.firstName.trim())&&(!(!this.lastName||"string"!=typeof this.lastName||""===this.lastName.trim())&&(!(!this.email||"string"!=typeof this.email||""===this.email.trim())&&!(!this.phoneNumber||"string"!=typeof this.phoneNumber||""===this.phoneNumber.trim()))))}applyAppearance(){if(!this.appearance)return void this.removeAttribute("data-theme");const{theme:t,variables:e}=this.appearance;if(t)if("auto"===t){const t=window.matchMedia("(prefers-color-scheme: dark)").matches;this.dataset.theme=t?"dark":"light",this.setupThemeMediaQueryListener()}else this.dataset.theme=t;e&&this.applyCssVariables(e)}applyCssVariables(t){for(const[e,r]of Object.entries(this.cssVariableMap)){const i=t[e];null!=i?this.style.setProperty(r,i):this.style.removeProperty(r)}}setupThemeMediaQueryListener(){this.cleanupThemeMediaQueryListener(),this.themeMediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.themeMediaQueryHandler=t=>{var e;"auto"===(null==(e=this.appearance)?void 0:e.theme)&&(this.dataset.theme=t.matches?"dark":"light")},this.themeMediaQuery.addEventListener("change",this.themeMediaQueryHandler)}cleanupThemeMediaQueryListener(){this.themeMediaQuery&&this.themeMediaQueryHandler&&(this.themeMediaQuery.removeEventListener("change",this.themeMediaQueryHandler),this.themeMediaQuery=null,this.themeMediaQueryHandler=null)}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this.handle3DSPostMessage),this.addEventListener("force-close-3ds-modal",()=>{this.show3DSModal&&(this.show3DSModal=!1,this.nextActionUrl=null,this.leaveEventsCounter=0)})}firstUpdated(){this.applyAppearance(),this.initializeSDK()}updated(t){super.updated(t),t.has("appearance")&&this.applyAppearance(),!this.isInitialized&&this.hasAllRequiredProps()&&(console.info("[OnePayment] All required props now available. Initializing SDK..."),this.initializeSDK())}disconnectedCallback(){var t;super.disconnectedCallback(),this.cleanupThemeMediaQueryListener(),null==(t=this.sdk)||t.destroy(),this.isInitialized=!1,this.destroyCleave(),window.removeEventListener("message",this.handle3DSPostMessage),null!==this.qrAutoResumeTimer&&clearTimeout(this.qrAutoResumeTimer)}setupCleave(){setTimeout(()=>{var t,e;const r=null==(t=this.shadowRoot)?void 0:t.querySelector("#cardNumber"),i=null==(e=this.shadowRoot)?void 0:e.querySelector("#expiry");r&&!this.cardNumberCleave&&(this.cardNumberCleave=new Vt(r,{creditCard:!0,delimiter:" ",onCreditCardTypeChanged:t=>{this.cardBrand={visa:"visa",mastercard:"mastercard",amex:"amex",discover:"discover"}[t]||"unknown"}})),i&&!this.expiryCleave&&(this.expiryCleave=new Vt(i,{date:!0,datePattern:["m","y"],delimiter:"/"}))},50)}destroyCleave(){this.cardNumberCleave&&(this.cardNumberCleave.destroy(),this.cardNumberCleave=null),this.expiryCleave&&(this.expiryCleave.destroy(),this.expiryCleave=null)}getFilteredPaymentMethods(){const t=("ready"===this.currentState.status||"processing"===this.currentState.status||"requires_action"===this.currentState.status)&&this.currentState.availableMethods||[];return 0===t.length?[]:t.filter(t=>{var e;return!(null==(e=this.excludePaymentMethods)?void 0:e.includes(t.id))}).map(t=>{if(t.id===pt){if("SGD"!==this.getTransactionData().currency)return{id:t.id,enabled:!1,disabledReason:"PayNow is only available for SGD currency"}}if(t.id===mt){if("THB"!==this.getTransactionData().currency)return{id:t.id,enabled:!1,disabledReason:"PromptPay is only available for THB currency"}}if(t.id===gt){if("MYR"!==this.getTransactionData().currency)return{id:t.id,enabled:!1,disabledReason:"DuitNow is only available for MYR currency"}}if(t.id===ft){if("IDR"!==this.getTransactionData().currency)return{id:t.id,enabled:!1,disabledReason:"GoPay is only available for IDR currency"}}if(t.id===yt){if("MYR"!==this.getTransactionData().currency)return{id:t.id,enabled:!1,disabledReason:"Boost is only available for MYR currency"}}if(t.id===vt){if("MYR"!==this.getTransactionData().currency)return{id:t.id,enabled:!1,disabledReason:"ShopeePay is only available for MYR currency"}}if(t.id===bt){const e=this.getTransactionData().currency;if("SGD"!==e&&"MYR"!==e)return{id:t.id,enabled:!1,disabledReason:"Atom is only available for SGD and MYR currencies"}}if(t.id===wt){if("IDR"!==this.getTransactionData().currency)return{id:t.id,enabled:!1,disabledReason:"Dana is only available for IDR currency"}}if(t.id===xt){if("MYR"!==this.getTransactionData().currency)return{id:t.id,enabled:!1,disabledReason:"Touch 'n Go is only available for MYR currency"}}return{id:t.id,enabled:!0}})}initializeSDK(){var t;this.config&&this.adapters&&this.amount&&this.currency&&this.orderId?this.firstName&&"string"==typeof this.firstName&&""!==this.firstName.trim()?this.lastName&&"string"==typeof this.lastName&&""!==this.lastName.trim()?this.email&&"string"==typeof this.email&&""!==this.email.trim()?this.isInitialized||(this.isInitialized=!0,null==(t=this.sdk)||t.destroy(),this.sdk=new It(this.config,this.adapters),this.sdk.subscribe(t=>{var e;"requires_action"===(null==(e=this.previousState)?void 0:e.status)&&"requires_action"!==t.status&&this.show3DSModal&&(this.show3DSModal=!1,this.nextActionUrl=null,this.leaveEventsCounter=0,this.sdk&&this.sdk.resumePolling()),this.previousState=t,this.currentState=t,this.dispatchEvent(new CustomEvent("state-change",{detail:{state:t},bubbles:!0,composed:!0}))}),this.sdk.on("payment_succeeded",t=>{this.dispatchEvent(new CustomEvent("payment-success",{detail:{paymentIntentId:t.payload.paymentIntent.id},bubbles:!0,composed:!0}))}),this.sdk.on("payment_failed",t=>{this.dispatchEvent(new CustomEvent("payment-error",{detail:{error:t.payload.error.message},bubbles:!0,composed:!0}))}),this.sdk.on("initialized",t=>{var e;if(this.paymentData=t.payload.paymentData,this.isInitializing=!1,null==(e=t.payload.paymentData)?void 0:e.sessionId){if(!document.getElementById("airwallex-fraud-api")){const e=document.createElement("script");e.src="https://static.airwallex.com/webapp/fraud/device-fingerprint/index.js",e.async=!0,e.setAttribute("data-order-session-id",t.payload.paymentData.sessionId),e.setAttribute("id","airwallex-fraud-api"),document.body.appendChild(e)}}}),this.sdk.on("payment_requires_action",t=>{this.nextActionUrl=t.payload.actionUrl,this.show3DSModal=!0,this.paymentLocked=!0,this.leaveEventsCounter=0}),this.sdk.on("poll_started",()=>{const t="undefined"!=typeof window&&"ReactNativeWebView"in window;this.show3DSModal&&t&&(this.show3DSModal=!1,this.nextActionUrl=null,this.leaveEventsCounter=0,this.sdk&&this.sdk.resumePolling())}),this.sdk.on("qr_code_received",async t=>{if(this.qrCode=t.payload.qrCode,!this.qrCode)return;const e=this.qrCode.startsWith("http://")||this.qrCode.startsWith("https://"),r=this.qrCode.startsWith("data:image");if(e||r)this.qrCodeDataUrl=this.qrCode;else try{const t=await Yt.toDataURL(this.qrCode,{width:300,margin:2,color:{dark:"#000000",light:"#FFFFFF"}});this.qrCodeDataUrl=t}catch(i){this.qrCodeDataUrl=null}this.showQRModal=!0,this.paymentLocked=!0,this.qrAutoResumeTimer=window.setTimeout(()=>{this.handleQRScanned()},1e4)}),this.sdk.on("promptpay_redirect",t=>{const{redirectUrl:e}=t.payload;e&&(window.location.href=e)}),this.sdk.on("duitnow_redirect",t=>{const{redirectUrl:e}=t.payload;e&&(window.location.href=e)}),this.sdk.on("gopay_redirect",t=>{const{redirectUrl:e}=t.payload;e&&(window.location.href=e)}),this.sdk.on("boost_redirect",t=>{const{redirectUrl:e}=t.payload;e&&(window.location.href=e)}),this.sdk.on("shopeepay_redirect",t=>{const{redirectUrl:e}=t.payload;e&&(window.location.href=e)}),this.sdk.on("atom_redirect",t=>{const{redirectUrl:e}=t.payload;e&&(window.location.href=e)}),this.sdk.on("dana_redirect",t=>{console.log("[WebComponent] dana_redirect event received:",t.payload);const{redirectUrl:e}=t.payload;e&&(console.log("[WebComponent] Redirecting to Dana URL:",e),window.location.href=e)}),this.sdk.on("tng_redirect",t=>{console.log("[WebComponent] tng_redirect event received:",t.payload);const{redirectUrl:e}=t.payload;e&&(console.log("[WebComponent] Redirecting to TnG URL:",e),window.location.href=e)}),this.sdk.initialize({amount:this.amount,currency:this.currency,orderId:this.orderId})):console.error("OnePayment: email is required and must be a non-empty string. Customer information is required for all payment methods."):console.error("OnePayment: lastName is required and must be a non-empty string. Customer information is required for all payment methods."):console.error("OnePayment: firstName is required and must be a non-empty string. Customer information is required for all payment methods."):console.error("OnePayment: Missing required props. Ensure config, adapters, amount, currency, and orderId are provided.")}handleMethodSelect(t){this.paymentLocked||(this.selectedMethod=t)}handleQRScanned(){null!==this.qrAutoResumeTimer&&(clearTimeout(this.qrAutoResumeTimer),this.qrAutoResumeTimer=null),this.qrPollingInProgress=!0,this.sdk&&this.sdk.resumePolling()}handle3DSComplete(){this.show3DSModal=!1,this.nextActionUrl=null,this.leaveEventsCounter=0,this.sdk&&this.sdk.resumePolling()}handleInputChange(t,e){if(this.cardFormData={...this.cardFormData,[t]:e},this.formErrors[t]){const e={...this.formErrors};delete e[t],this.formErrors=e}}luhnCheck(t){const e=t.replace(/\s/g,"");if(!/^\d+$/.test(e))return!1;let r=0,i=!1;for(let n=e.length-1;n>=0;n--){const t=e.charAt(n);if(!t)continue;let o=parseInt(t,10);i&&(o*=2,o>9&&(o-=9)),r+=o,i=!i}return r%10==0}validateExpiry(t){const e=t.trim();if(!/^\d{1,2}\/\d{2}$/.test(e))return{valid:!1,error:"Invalid format (MM/YY)"};const r=e.split("/"),i=r[0],n=r[1];if(!i||!n)return{valid:!1,error:"Invalid format (MM/YY)"};const o=parseInt(i,10);if(o<1||o>12)return{valid:!1,error:"Invalid month (01-12)"};const s=new Date,a=s.getFullYear(),l=s.getMonth()+1;let d;if(2!==n.length)return{valid:!1,error:"Invalid year format"};{const t=parseInt(n,10),e=a%100,r=100*Math.floor(a/100);if(t<e){d=e-t>80?r+100+t:r+t}else d=r+t}return d<a||d===a&&o<l?{valid:!1,error:"Card has expired"}:{valid:!0}}validateCardForm(){const t={};if(this.cardFormData.cardNumber.trim()?this.luhnCheck(this.cardFormData.cardNumber)||(t.cardNumber="Invalid card number"):t.cardNumber="Please enter card number",this.cardFormData.expiry.trim()){const e=this.validateExpiry(this.cardFormData.expiry);e.valid||(t.expiry=e.error)}else t.expiry="Please enter expiry date";return this.cardFormData.cvv.trim()||(t.cvv="Please enter CVV"),this.cardFormData.cardholderName.trim()||(t.cardholderName="Please enter cardholder name"),this.formErrors=t,0===Object.keys(t).length}handleCardPayment(){if(!this.sdk||"ready"!==this.currentState.status)return;if(!this.validateCardForm())return;this.paymentLocked=!0;const t=this.cardFormData.expiry.split("/"),e=(t[0]||"").trim(),r=`20${(t[1]||"").trim().substring(0,2)}`;this.sdk.submitPayment(ht,{cardNumber:this.cardFormData.cardNumber.replace(/\s/g,""),expiryMonth:e,expiryYear:r,cvv:this.cardFormData.cvv,firstName:this.firstName,lastName:this.lastName,email:this.email,phoneNumber:this.phoneNumber})}handlePayNowPayment(){this.sdk&&"ready"===this.currentState.status&&(this.paymentLocked=!0,this.sdk.submitPayment(pt,{firstName:this.firstName,lastName:this.lastName,email:this.email,phoneNumber:this.phoneNumber}))}handlePromptPayPayment(){this.sdk&&"ready"===this.currentState.status&&(this.paymentLocked=!0,this.sdk.submitPayment(mt,{firstName:this.firstName,lastName:this.lastName,email:this.email,phoneNumber:this.phoneNumber}))}handleDuitNowPayment(){this.sdk&&"ready"===this.currentState.status&&(this.paymentLocked=!0,this.sdk.submitPayment(gt,{firstName:this.firstName,lastName:this.lastName,email:this.email,phoneNumber:this.phoneNumber}))}handleGoPayPayment(){this.sdk&&"ready"===this.currentState.status&&(this.paymentLocked=!0,this.sdk.submitPayment(ft,{firstName:this.firstName,lastName:this.lastName,email:this.email,phoneNumber:this.phoneNumber}))}handleBoostPayment(){this.sdk&&"ready"===this.currentState.status&&(this.paymentLocked=!0,this.sdk.submitPayment(yt,{firstName:this.firstName,lastName:this.lastName,email:this.email,phoneNumber:this.phoneNumber}))}handleShopeePayPayment(){this.sdk&&"ready"===this.currentState.status&&(this.paymentLocked=!0,this.sdk.submitPayment(vt,{firstName:this.firstName,lastName:this.lastName,email:this.email,phoneNumber:this.phoneNumber}))}handleAtomPayment(){this.sdk&&"ready"===this.currentState.status&&(this.paymentLocked=!0,this.sdk.submitPayment(bt,{firstName:this.firstName,lastName:this.lastName,email:this.email,phoneNumber:this.phoneNumber}))}handleDanaPayment(){this.sdk&&"ready"===this.currentState.status&&(this.paymentLocked=!0,this.sdk.submitPayment(wt,{firstName:this.firstName,lastName:this.lastName,email:this.email,phoneNumber:this.phoneNumber}))}handleTngPayment(){this.sdk&&"ready"===this.currentState.status&&(this.paymentLocked=!0,this.sdk.submitPayment(xt,{firstName:this.firstName,lastName:this.lastName,email:this.email,phoneNumber:this.phoneNumber}))}getPayButtonAmount(){const t=this.getTransactionData();return`${this.currency} ${t.netAmount.toFixed(2)}`}getTransactionData(){var t;const e=this.paymentData;if(!e)return{currency:this.currency,charge:this.amount,fees:0,feeBreakdown:{transactionFee:0,merchantFee:0,merchantFeeLabel:""},netAmount:this.amount};const r=null==(t=e.fees)?void 0:t.find(t=>"merchant"===t.owner),i="number"==typeof e.totalFee?e.totalFee:Number(e.totalFee)||0,n="number"==typeof e.totalSystemFee?e.totalSystemFee:Number(e.totalSystemFee)||0,o=null!=e.initialAmount?"number"==typeof e.initialAmount?e.initialAmount:Number(e.initialAmount)||0:this.amount,s=null!=e.customerAmount?"number"==typeof e.customerAmount?e.customerAmount:Number(e.customerAmount)||0:o,a=i-n;return{currency:e.currency||this.currency,charge:o,fees:i,feeBreakdown:{transactionFee:a,merchantFee:a,merchantFeeLabel:(r?"percentage"===r.type?`${r.value}%`:`${r.value} ${r.currency}`:"")||"0%"},netAmount:s}}renderTransactionDetailsSkeleton(){return O`
|
|
12
12
|
<div class="skeleton-transaction">
|
|
13
13
|
<div class="skeleton skeleton-title"></div>
|
|
14
14
|
<div class="skeleton-row">
|
|
@@ -29,7 +29,7 @@ var OnePayments=function(e){"use strict";
|
|
|
29
29
|
<div class="skeleton skeleton-net-value"></div>
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
32
|
-
`}renderPaymentMethodsSkeleton(){return
|
|
32
|
+
`}renderPaymentMethodsSkeleton(){return O`
|
|
33
33
|
<div>
|
|
34
34
|
<div class="skeleton-method">
|
|
35
35
|
<div class="skeleton skeleton-radio"></div>
|
|
@@ -42,25 +42,25 @@ var OnePayments=function(e){"use strict";
|
|
|
42
42
|
<div class="skeleton skeleton-method-name"></div>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
|
-
`}renderSkeletons(){const
|
|
46
|
-
<div class="payment-element" style="${
|
|
45
|
+
`}renderSkeletons(){const t=[this.width?`--one-payment-width: ${this.width}`:"",this.maxWidth?`--one-payment-max-width: ${this.maxWidth}`:""].filter(Boolean).join("; ");return O`
|
|
46
|
+
<div class="payment-element" style="${t}">
|
|
47
47
|
${this.renderTransactionDetailsSkeleton()}
|
|
48
48
|
<div class="header">Select a payment method</div>
|
|
49
49
|
${this.renderPaymentMethodsSkeleton()}
|
|
50
50
|
</div>
|
|
51
|
-
`}renderTransactionDetails(){const
|
|
51
|
+
`}renderTransactionDetails(){const t=this.getTransactionData(),e=t=>t.toFixed(2);return O`
|
|
52
52
|
<div class="transaction-details">
|
|
53
53
|
<h2 class="transaction-title">Transaction details</h2>
|
|
54
54
|
|
|
55
55
|
<div class="details-grid">
|
|
56
56
|
<div class="details-row">
|
|
57
57
|
<span class="details-label">Currency:</span>
|
|
58
|
-
<span class="details-value">${
|
|
58
|
+
<span class="details-value">${t.currency}</span>
|
|
59
59
|
</div>
|
|
60
60
|
|
|
61
61
|
<div class="details-row">
|
|
62
62
|
<span class="details-label">Charge:</span>
|
|
63
|
-
<span class="details-value">${t
|
|
63
|
+
<span class="details-value">${e(t.charge)}</span>
|
|
64
64
|
</div>
|
|
65
65
|
|
|
66
66
|
<div class="details-row">
|
|
@@ -72,28 +72,25 @@ var OnePayments=function(e){"use strict";
|
|
|
72
72
|
>
|
|
73
73
|
<span class="details-label"> Fees ${this.feesExpanded?"∧":"∨"} </span>
|
|
74
74
|
</button>
|
|
75
|
-
<span class="details-value">${t
|
|
75
|
+
<span class="details-value">${e(t.fees)}</span>
|
|
76
76
|
</div>
|
|
77
77
|
|
|
78
78
|
<div
|
|
79
79
|
class="fee-breakdown"
|
|
80
80
|
style=${`\n max-height: ${this.feesExpanded?"200px":"0"};\n opacity: ${this.feesExpanded?1:0};\n margin-top: ${this.feesExpanded?"0.625rem":"0"};\n `}
|
|
81
81
|
>
|
|
82
|
-
${
|
|
82
|
+
${t.feeBreakdown?O`
|
|
83
83
|
<div class="fee-breakdown-inner">
|
|
84
84
|
<div class="breakdown-row">
|
|
85
85
|
<span class="breakdown-label">Transaction fee:</span>
|
|
86
86
|
<span class="breakdown-value">
|
|
87
|
-
${t
|
|
87
|
+
${e(t.feeBreakdown.transactionFee)}
|
|
88
88
|
</span>
|
|
89
89
|
</div>
|
|
90
90
|
<div class="breakdown-row">
|
|
91
|
-
<span class="breakdown-label">
|
|
92
|
-
Merchant
|
|
93
|
-
fee${e.feeBreakdown.merchantFeeLabel?` (${e.feeBreakdown.merchantFeeLabel})`:""}:
|
|
94
|
-
</span>
|
|
91
|
+
<span class="breakdown-label">Merchant fee:</span>
|
|
95
92
|
<span class="breakdown-value">
|
|
96
|
-
${t
|
|
93
|
+
${e(t.feeBreakdown.merchantFee)}
|
|
97
94
|
</span>
|
|
98
95
|
</div>
|
|
99
96
|
</div>
|
|
@@ -105,10 +102,10 @@ var OnePayments=function(e){"use strict";
|
|
|
105
102
|
|
|
106
103
|
<div class="net-amount-row">
|
|
107
104
|
<span class="net-label">Net amount:</span>
|
|
108
|
-
<span class="net-value">${t
|
|
105
|
+
<span class="net-value">${e(t.netAmount)}</span>
|
|
109
106
|
</div>
|
|
110
107
|
</div>
|
|
111
|
-
`}renderCardForm(){setTimeout(()=>this.setupCleave(),0);const
|
|
108
|
+
`}renderCardForm(){setTimeout(()=>this.setupCleave(),0);const t="amex"===this.cardBrand?4:3,e="amex"===this.cardBrand?"1234":"123";return O`
|
|
112
109
|
<div class="card-form">
|
|
113
110
|
<h4 class="form-title">Card Information</h4>
|
|
114
111
|
<div class="form-fields">
|
|
@@ -121,9 +118,9 @@ var OnePayments=function(e){"use strict";
|
|
|
121
118
|
class="input ${this.formErrors.cardNumber?"input-error":""}"
|
|
122
119
|
placeholder="1234 1234 1234 1234"
|
|
123
120
|
.value=${this.cardFormData.cardNumber}
|
|
124
|
-
@input=${
|
|
121
|
+
@input=${t=>this.handleInputChange("cardNumber",t.target.value)}
|
|
125
122
|
/>
|
|
126
|
-
${this.formErrors.cardNumber?
|
|
123
|
+
${this.formErrors.cardNumber?O`<div class="error-message">${this.formErrors.cardNumber}</div>`:""}
|
|
127
124
|
</div>
|
|
128
125
|
|
|
129
126
|
<!-- Single Expiry Field -->
|
|
@@ -135,9 +132,9 @@ var OnePayments=function(e){"use strict";
|
|
|
135
132
|
class="input ${this.formErrors.expiry?"input-error":""}"
|
|
136
133
|
placeholder="MM/YY"
|
|
137
134
|
.value=${this.cardFormData.expiry}
|
|
138
|
-
@input=${
|
|
135
|
+
@input=${t=>{const e=t.target;setTimeout(()=>{this.handleInputChange("expiry",e.value)},0)}}
|
|
139
136
|
/>
|
|
140
|
-
${this.formErrors.expiry?
|
|
137
|
+
${this.formErrors.expiry?O`<div class="error-message">${this.formErrors.expiry}</div>`:""}
|
|
141
138
|
</div>
|
|
142
139
|
|
|
143
140
|
<!-- CVV -->
|
|
@@ -146,12 +143,12 @@ var OnePayments=function(e){"use strict";
|
|
|
146
143
|
<input
|
|
147
144
|
type="text"
|
|
148
145
|
class="input ${this.formErrors.cvv?"input-error":""}"
|
|
149
|
-
placeholder="${
|
|
150
|
-
maxlength="${
|
|
146
|
+
placeholder="${e}"
|
|
147
|
+
maxlength="${t}"
|
|
151
148
|
.value=${this.cardFormData.cvv}
|
|
152
|
-
@input=${
|
|
149
|
+
@input=${t=>{const e=t.target.value.replace(/\D/g,"");t.target.value=e,this.handleInputChange("cvv",e)}}
|
|
153
150
|
/>
|
|
154
|
-
${this.formErrors.cvv?
|
|
151
|
+
${this.formErrors.cvv?O`<div class="error-message">${this.formErrors.cvv}</div>`:""}
|
|
155
152
|
</div>
|
|
156
153
|
|
|
157
154
|
<!-- Cardholder Name -->
|
|
@@ -162,9 +159,9 @@ var OnePayments=function(e){"use strict";
|
|
|
162
159
|
class="input ${this.formErrors.cardholderName?"input-error":""}"
|
|
163
160
|
placeholder="JOHN DOE"
|
|
164
161
|
.value=${this.cardFormData.cardholderName}
|
|
165
|
-
@input=${
|
|
162
|
+
@input=${t=>{const e=t.target.value.replace(/[^A-Za-z\s]/g,"").toUpperCase();t.target.value=e,this.handleInputChange("cardholderName",e)}}
|
|
166
163
|
/>
|
|
167
|
-
${this.formErrors.cardholderName?
|
|
164
|
+
${this.formErrors.cardholderName?O`<div class="error-message">${this.formErrors.cardholderName}</div>`:""}
|
|
168
165
|
</div>
|
|
169
166
|
</div>
|
|
170
167
|
|
|
@@ -174,11 +171,11 @@ var OnePayments=function(e){"use strict";
|
|
|
174
171
|
@click=${this.handleCardPayment}
|
|
175
172
|
?disabled=${"processing"===this.currentState.status||"requires_action"===this.currentState.status}
|
|
176
173
|
>
|
|
177
|
-
${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"Processing...":`Pay ${this.
|
|
174
|
+
${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"Processing...":`Pay ${this.getPayButtonAmount()}`}
|
|
178
175
|
</button>
|
|
179
176
|
</div>
|
|
180
177
|
</div>
|
|
181
|
-
`}renderPayNowContent(){return this.showQRModal&&this.qrCodeDataUrl?
|
|
178
|
+
`}renderPayNowContent(){return this.showQRModal&&this.qrCodeDataUrl?O`
|
|
182
179
|
<div class="paynow-container">
|
|
183
180
|
<!-- Render generated QR code image -->
|
|
184
181
|
<div class="qr-code-wrapper">
|
|
@@ -193,7 +190,7 @@ var OnePayments=function(e){"use strict";
|
|
|
193
190
|
${this.qrPollingInProgress?"Verifying...":"I Have Scanned the QR Code"}
|
|
194
191
|
</button>
|
|
195
192
|
</div>
|
|
196
|
-
`:
|
|
193
|
+
`:O`
|
|
197
194
|
<div class="paynow-container">
|
|
198
195
|
<div class="paynow-instructions">
|
|
199
196
|
<h3 class="instructions-title">How to Pay by QR:</h3>
|
|
@@ -216,12 +213,276 @@ var OnePayments=function(e){"use strict";
|
|
|
216
213
|
@click=${this.handlePayNowPayment}
|
|
217
214
|
?disabled=${"processing"===this.currentState.status||"requires_action"===this.currentState.status}
|
|
218
215
|
>
|
|
219
|
-
${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"Processing...":`Pay ${this.
|
|
216
|
+
${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"Processing...":`Pay ${this.getPayButtonAmount()}`}
|
|
217
|
+
</button>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
`}renderPromptPayContent(){return O`
|
|
222
|
+
<div class="paynow-container">
|
|
223
|
+
<div class="paynow-instructions">
|
|
224
|
+
<h3 class="instructions-title">How to Pay with PromptPay:</h3>
|
|
225
|
+
|
|
226
|
+
<div class="instruction-steps">
|
|
227
|
+
<div class="instruction-step">
|
|
228
|
+
<div class="step-number">1</div>
|
|
229
|
+
<p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<div class="instruction-step">
|
|
233
|
+
<div class="step-number">2</div>
|
|
234
|
+
<p class="step-text">Scan the QR code with your banking app.</p>
|
|
235
|
+
</div>
|
|
236
|
+
|
|
237
|
+
<div class="instruction-step">
|
|
238
|
+
<div class="step-number">3</div>
|
|
239
|
+
<p class="step-text">You'll be redirected back automatically.</p>
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
|
|
243
|
+
<div class="submit-section">
|
|
244
|
+
<button
|
|
245
|
+
class="pay-button ${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"loading":""}"
|
|
246
|
+
@click=${this.handlePromptPayPayment}
|
|
247
|
+
?disabled=${"processing"===this.currentState.status||"requires_action"===this.currentState.status}
|
|
248
|
+
>
|
|
249
|
+
${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"Redirecting...":`Pay ${this.getPayButtonAmount()}`}
|
|
250
|
+
</button>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
`}renderDuitNowContent(){return O`
|
|
255
|
+
<div class="paynow-container">
|
|
256
|
+
<div class="paynow-instructions">
|
|
257
|
+
<h3 class="instructions-title">How to Pay with DuitNow:</h3>
|
|
258
|
+
|
|
259
|
+
<div class="instruction-steps">
|
|
260
|
+
<div class="instruction-step">
|
|
261
|
+
<div class="step-number">1</div>
|
|
262
|
+
<p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
|
|
263
|
+
</div>
|
|
264
|
+
|
|
265
|
+
<div class="instruction-step">
|
|
266
|
+
<div class="step-number">2</div>
|
|
267
|
+
<p class="step-text">Scan the QR code with your banking app.</p>
|
|
268
|
+
</div>
|
|
269
|
+
|
|
270
|
+
<div class="instruction-step">
|
|
271
|
+
<div class="step-number">3</div>
|
|
272
|
+
<p class="step-text">You'll be redirected back automatically.</p>
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
<div class="submit-section">
|
|
277
|
+
<button
|
|
278
|
+
class="pay-button ${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"loading":""}"
|
|
279
|
+
@click=${this.handleDuitNowPayment}
|
|
280
|
+
?disabled=${"processing"===this.currentState.status||"requires_action"===this.currentState.status}
|
|
281
|
+
>
|
|
282
|
+
${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"Redirecting...":`Pay ${this.getPayButtonAmount()}`}
|
|
283
|
+
</button>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
`}renderGoPayContent(){return O`
|
|
288
|
+
<div class="paynow-container">
|
|
289
|
+
<div class="paynow-instructions">
|
|
290
|
+
<h3 class="instructions-title">How to Pay with GoPay:</h3>
|
|
291
|
+
|
|
292
|
+
<div class="instruction-steps">
|
|
293
|
+
<div class="instruction-step">
|
|
294
|
+
<div class="step-number">1</div>
|
|
295
|
+
<p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
|
|
296
|
+
</div>
|
|
297
|
+
|
|
298
|
+
<div class="instruction-step">
|
|
299
|
+
<div class="step-number">2</div>
|
|
300
|
+
<p class="step-text">Complete payment in your Gojek app.</p>
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<div class="instruction-step">
|
|
304
|
+
<div class="step-number">3</div>
|
|
305
|
+
<p class="step-text">You'll be redirected back automatically.</p>
|
|
306
|
+
</div>
|
|
307
|
+
</div>
|
|
308
|
+
|
|
309
|
+
<div class="submit-section">
|
|
310
|
+
<button
|
|
311
|
+
class="pay-button ${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"loading":""}"
|
|
312
|
+
@click=${this.handleGoPayPayment}
|
|
313
|
+
?disabled=${"processing"===this.currentState.status||"requires_action"===this.currentState.status}
|
|
314
|
+
>
|
|
315
|
+
${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"Redirecting...":`Pay ${this.getPayButtonAmount()}`}
|
|
316
|
+
</button>
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
`}renderBoostContent(){return O`
|
|
321
|
+
<div class="paynow-container">
|
|
322
|
+
<div class="paynow-instructions">
|
|
323
|
+
<h3 class="instructions-title">How to Pay with Boost:</h3>
|
|
324
|
+
|
|
325
|
+
<div class="instruction-steps">
|
|
326
|
+
<div class="instruction-step">
|
|
327
|
+
<div class="step-number">1</div>
|
|
328
|
+
<p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
<div class="instruction-step">
|
|
332
|
+
<div class="step-number">2</div>
|
|
333
|
+
<p class="step-text">Complete payment in your Boost app.</p>
|
|
334
|
+
</div>
|
|
335
|
+
|
|
336
|
+
<div class="instruction-step">
|
|
337
|
+
<div class="step-number">3</div>
|
|
338
|
+
<p class="step-text">You'll be redirected back automatically.</p>
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
|
|
342
|
+
<div class="submit-section">
|
|
343
|
+
<button
|
|
344
|
+
class="pay-button ${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"loading":""}"
|
|
345
|
+
@click=${this.handleBoostPayment}
|
|
346
|
+
?disabled=${"processing"===this.currentState.status||"requires_action"===this.currentState.status}
|
|
347
|
+
>
|
|
348
|
+
${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"Redirecting...":`Pay ${this.getPayButtonAmount()}`}
|
|
349
|
+
</button>
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
</div>
|
|
353
|
+
`}renderShopeePayContent(){return O`
|
|
354
|
+
<div class="paynow-container">
|
|
355
|
+
<div class="paynow-instructions">
|
|
356
|
+
<h3 class="instructions-title">How to Pay with ShopeePay:</h3>
|
|
357
|
+
|
|
358
|
+
<div class="instruction-steps">
|
|
359
|
+
<div class="instruction-step">
|
|
360
|
+
<div class="step-number">1</div>
|
|
361
|
+
<p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
|
|
362
|
+
</div>
|
|
363
|
+
|
|
364
|
+
<div class="instruction-step">
|
|
365
|
+
<div class="step-number">2</div>
|
|
366
|
+
<p class="step-text">Complete payment in your Shopee app.</p>
|
|
367
|
+
</div>
|
|
368
|
+
|
|
369
|
+
<div class="instruction-step">
|
|
370
|
+
<div class="step-number">3</div>
|
|
371
|
+
<p class="step-text">You'll be redirected back automatically.</p>
|
|
372
|
+
</div>
|
|
373
|
+
</div>
|
|
374
|
+
|
|
375
|
+
<div class="submit-section">
|
|
376
|
+
<button
|
|
377
|
+
class="pay-button ${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"loading":""}"
|
|
378
|
+
@click=${this.handleShopeePayPayment}
|
|
379
|
+
?disabled=${"processing"===this.currentState.status||"requires_action"===this.currentState.status}
|
|
380
|
+
>
|
|
381
|
+
${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"Redirecting...":`Pay ${this.getPayButtonAmount()}`}
|
|
382
|
+
</button>
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
`}renderAtomContent(){return O`
|
|
387
|
+
<div class="paynow-container">
|
|
388
|
+
<div class="paynow-instructions">
|
|
389
|
+
<h3 class="instructions-title">How to Pay with Atome:</h3>
|
|
390
|
+
|
|
391
|
+
<div class="instruction-steps">
|
|
392
|
+
<div class="instruction-step">
|
|
393
|
+
<div class="step-number">1</div>
|
|
394
|
+
<p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
|
|
395
|
+
</div>
|
|
396
|
+
|
|
397
|
+
<div class="instruction-step">
|
|
398
|
+
<div class="step-number">2</div>
|
|
399
|
+
<p class="step-text">Complete the payment on the external page.</p>
|
|
400
|
+
</div>
|
|
401
|
+
|
|
402
|
+
<div class="instruction-step">
|
|
403
|
+
<div class="step-number">3</div>
|
|
404
|
+
<p class="step-text">You'll be redirected back automatically.</p>
|
|
405
|
+
</div>
|
|
406
|
+
</div>
|
|
407
|
+
|
|
408
|
+
<div class="submit-section">
|
|
409
|
+
<button
|
|
410
|
+
class="pay-button ${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"loading":""}"
|
|
411
|
+
@click=${this.handleAtomPayment}
|
|
412
|
+
?disabled=${"processing"===this.currentState.status||"requires_action"===this.currentState.status}
|
|
413
|
+
>
|
|
414
|
+
${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"Redirecting...":`Pay ${this.getPayButtonAmount()}`}
|
|
415
|
+
</button>
|
|
416
|
+
</div>
|
|
417
|
+
</div>
|
|
418
|
+
</div>
|
|
419
|
+
`}renderDanaContent(){return O`
|
|
420
|
+
<div class="paynow-container">
|
|
421
|
+
<div class="paynow-instructions">
|
|
422
|
+
<h3 class="instructions-title">How to Pay with Dana:</h3>
|
|
423
|
+
|
|
424
|
+
<div class="instruction-steps">
|
|
425
|
+
<div class="instruction-step">
|
|
426
|
+
<div class="step-number">1</div>
|
|
427
|
+
<p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
|
|
428
|
+
</div>
|
|
429
|
+
|
|
430
|
+
<div class="instruction-step">
|
|
431
|
+
<div class="step-number">2</div>
|
|
432
|
+
<p class="step-text">Complete the payment in the Dana app.</p>
|
|
433
|
+
</div>
|
|
434
|
+
|
|
435
|
+
<div class="instruction-step">
|
|
436
|
+
<div class="step-number">3</div>
|
|
437
|
+
<p class="step-text">You'll be redirected back automatically.</p>
|
|
438
|
+
</div>
|
|
439
|
+
</div>
|
|
440
|
+
|
|
441
|
+
<div class="submit-section">
|
|
442
|
+
<button
|
|
443
|
+
class="pay-button ${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"loading":""}"
|
|
444
|
+
@click=${this.handleDanaPayment}
|
|
445
|
+
?disabled=${"processing"===this.currentState.status||"requires_action"===this.currentState.status}
|
|
446
|
+
>
|
|
447
|
+
${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"Redirecting...":`Pay ${this.getPayButtonAmount()}`}
|
|
220
448
|
</button>
|
|
221
449
|
</div>
|
|
222
450
|
</div>
|
|
223
451
|
</div>
|
|
224
|
-
`}
|
|
452
|
+
`}renderTngContent(){return O`
|
|
453
|
+
<div class="paynow-container">
|
|
454
|
+
<div class="paynow-instructions">
|
|
455
|
+
<h3 class="instructions-title">How to Pay with Touch 'n Go:</h3>
|
|
456
|
+
|
|
457
|
+
<div class="instruction-steps">
|
|
458
|
+
<div class="instruction-step">
|
|
459
|
+
<div class="step-number">1</div>
|
|
460
|
+
<p class="step-text">Click <strong>"Pay"</strong> to go to the payment page.</p>
|
|
461
|
+
</div>
|
|
462
|
+
|
|
463
|
+
<div class="instruction-step">
|
|
464
|
+
<div class="step-number">2</div>
|
|
465
|
+
<p class="step-text">Complete the payment in the Touch 'n Go eWallet app.</p>
|
|
466
|
+
</div>
|
|
467
|
+
|
|
468
|
+
<div class="instruction-step">
|
|
469
|
+
<div class="step-number">3</div>
|
|
470
|
+
<p class="step-text">You'll be redirected back automatically.</p>
|
|
471
|
+
</div>
|
|
472
|
+
</div>
|
|
473
|
+
|
|
474
|
+
<div class="submit-section">
|
|
475
|
+
<button
|
|
476
|
+
class="pay-button ${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"loading":""}"
|
|
477
|
+
@click=${this.handleTngPayment}
|
|
478
|
+
?disabled=${"processing"===this.currentState.status||"requires_action"===this.currentState.status}
|
|
479
|
+
>
|
|
480
|
+
${"processing"===this.currentState.status||"requires_action"===this.currentState.status?"Redirecting...":`Pay ${this.getPayButtonAmount()}`}
|
|
481
|
+
</button>
|
|
482
|
+
</div>
|
|
483
|
+
</div>
|
|
484
|
+
</div>
|
|
485
|
+
`}render3DSModal(){return this.show3DSModal&&this.nextActionUrl?O`
|
|
225
486
|
<div class="modal-overlay">
|
|
226
487
|
<div class="modal-content iframe-modal">
|
|
227
488
|
<iframe
|
|
@@ -232,50 +493,50 @@ var OnePayments=function(e){"use strict";
|
|
|
232
493
|
></iframe>
|
|
233
494
|
</div>
|
|
234
495
|
</div>
|
|
235
|
-
`:null}renderStatusBlock(){if("succeeded"===this.currentState.status)return
|
|
496
|
+
`:null}renderStatusBlock(){if("succeeded"===this.currentState.status){const t=this.getTransactionData(),e=t.netAmount.toFixed(2);return O`
|
|
236
497
|
<div class="result-card success">
|
|
237
498
|
<div class="result-icon-wrapper">
|
|
238
499
|
<div class="result-icon">✓</div>
|
|
239
500
|
</div>
|
|
240
501
|
<h2 class="result-title">Payment Successful</h2>
|
|
241
502
|
<p class="result-message">
|
|
242
|
-
Your payment of ${
|
|
503
|
+
Your payment of ${t.currency} ${e} has been processed
|
|
243
504
|
successfully.
|
|
244
505
|
</p>
|
|
245
506
|
</div>
|
|
246
|
-
|
|
507
|
+
`}if("failed"===this.currentState.status){const t=this.currentState.error?this.currentState.error.message:"An error occurred while processing your payment";return O`
|
|
247
508
|
<div class="result-card error">
|
|
248
509
|
<div class="result-icon-wrapper">
|
|
249
510
|
<div class="result-icon">✕</div>
|
|
250
511
|
</div>
|
|
251
512
|
<h2 class="result-title">Payment Failed</h2>
|
|
252
|
-
<p class="result-message">${
|
|
513
|
+
<p class="result-message">${t}</p>
|
|
253
514
|
</div>
|
|
254
|
-
`}return null}render(){if(("idle"===this.currentState.status||"initializing"===this.currentState.status)&&this.isInitializing&&!this.paymentData)return this.renderSkeletons();const
|
|
255
|
-
<div class="payment-element" style="${
|
|
515
|
+
`}return null}render(){if(("idle"===this.currentState.status||"initializing"===this.currentState.status)&&this.isInitializing&&!this.paymentData)return this.renderSkeletons();const t="succeeded"===this.currentState.status||"failed"===this.currentState.status,e=!t,r=this.getFilteredPaymentMethods();if(r.length>0){const t=r.some(t=>t.id===this.selectedMethod&&t.enabled);if(!this.selectedMethod||!t){const t=r.find(t=>t.enabled);t&&this.selectedMethod!==t.id&&(this.selectedMethod=t.id)}}const i=[this.width?`--one-payment-width: ${this.width}`:"",this.maxWidth?`--one-payment-max-width: ${this.maxWidth}`:""].filter(Boolean).join("; ");return O`
|
|
516
|
+
<div class="payment-element" style="${i}">
|
|
256
517
|
${this.renderTransactionDetails()}
|
|
257
|
-
${
|
|
518
|
+
${e?O`
|
|
258
519
|
<div class="header">Select a payment method</div>
|
|
259
520
|
<div class="payment-methods-list">
|
|
260
|
-
${r.map(
|
|
521
|
+
${r.map(t=>{const e=this.selectedMethod===t.id,r=!t.enabled||this.paymentLocked&&!e;return O`
|
|
261
522
|
<div
|
|
262
523
|
class="payment-method-item"
|
|
263
|
-
${
|
|
524
|
+
${t.disabledReason?O`data-tooltip="${t.disabledReason}"`:""}
|
|
264
525
|
>
|
|
265
526
|
<div
|
|
266
|
-
class="method-header ${
|
|
267
|
-
@click=${()=>
|
|
527
|
+
class="method-header ${e?"selected":""} ${r?"disabled":""}"
|
|
528
|
+
@click=${()=>t.enabled&&this.handleMethodSelect(t.id)}
|
|
268
529
|
>
|
|
269
530
|
<input
|
|
270
531
|
type="radio"
|
|
271
532
|
class="radio"
|
|
272
533
|
name="payment-method"
|
|
273
|
-
.checked=${
|
|
534
|
+
.checked=${e}
|
|
274
535
|
?disabled=${r}
|
|
275
|
-
@click=${e=>e.stopPropagation()}
|
|
536
|
+
@click=${e=>{e.stopPropagation(),t.enabled&&this.handleMethodSelect(t.id)}}
|
|
276
537
|
/>
|
|
277
|
-
<span class="method-name">${
|
|
278
|
-
${
|
|
538
|
+
<span class="method-name">${(t=>{switch(t){case ht:return"Card";case pt:return"PayNow";case mt:return"PromptPay";case gt:return"DuitNow";case ft:return"GoPay";case yt:return"Boost";case vt:return"ShopeePay";case bt:return"Atome";case wt:return"Dana";case xt:return"Touch 'n Go";default:return t}})(t.id)}</span>
|
|
539
|
+
${i=t.id,i===ht?O`
|
|
279
540
|
<div class="method-icon-right">
|
|
280
541
|
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
281
542
|
<path
|
|
@@ -288,29 +549,114 @@ var OnePayments=function(e){"use strict";
|
|
|
288
549
|
/>
|
|
289
550
|
</svg>
|
|
290
551
|
</div>
|
|
291
|
-
`:
|
|
552
|
+
`:i===pt?O`
|
|
292
553
|
<div class="method-icon-right">
|
|
293
|
-
<img src="${"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALEAAABxCAYAAACawUJxAAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADY3SURBVHgB7X0HnBRF+vZb1d0TN+ccyEgGRREDnp53KuqdHsYzYODMqCiKcc0ooGDW0zOdn4E7wxnxzFkBT7KEZXfZ3dmcJ3d31VfVM7M7G2amZ3YW+cs+/Iadnq6qru5+qupNVQXw2wKKc9poyotHvsHm3S8hBv5SoOqpyX+c5sHUC3ECBYJMxOhohD1tX3dsavP/jLpPxxf8XpQz807McDhdhSrC8kCJJEpFs8Fc90rjfxrYIWYfEqZMdFLGSblYcWXJCCkQAfx+raJBWN30/s+B+kD0wMeNOk40N5EJet+FREWxS/VUf9L1CX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gd+R1TbL3mWtaAj5eTOdFRWpmu6V4xAZXlXTxstFX3gJB43Qv3fJX/2BkE0e7z4TwtsiyLNEdTe66ulKz+0qy4+q3tAJrMyBZMkdX6VumPq0+uf5iPnoO8v8L4k0D99hsO/0EjMskysWna0+TQifzby+c92K5VzWBeoIO236IiMgwgYIHYvAqKgc93lBH2HyESmfqVyUkLJzsKfLhvjv9dAuPRQIJp3GJDvIz37aHgUt/sLdBbREBjicPFYW1+0+TQb8FHl5x81Ho++yywYRd+mLuFl5FBz9gJ9Zr84Yhp0DsJaG7rL6bvMK6sbnmxOf9VP4IAMPFQE5ojmHVLQ9+yj4VHc7m9vWid+LWhEPrTi7NscKj1whCEPqb61rLtXsNT+/ipEZr5mJgAXS5nMJCicULDhBj5lfm/tdPqbwVA4HvZVBBoseb/kqTUOofPYDq+dCJq+RZEe0aKvSKBHtPD91lu08GlyVE0SzEKBlLr+5ZaPjyizveMCfUP2MPpgfyJxAFpP90R22cSRSblvtyitI1yqh2Btz5+A3WDIZGStAzZgEZdI2e0/u3aeeNbuVV/D3hEffrPYH0nMEeAWWZZ/3axJ5hHPe4hnTLPSBiISNCNYnImsaXEJohGVCInN65w1F59VueKt4HrAMGLG/kriALpFjMsy54063nrUXWYJ/6VFbhUd4NY65m63XV/RAgWLGSHMZojPhzNAgZSuOuSm/35rL795se2fP8EweeOK/Z3EAXR72fh/D+XdNL0Q0uenmxPnMqtccQf1IA/p0hw9vTVhduwXkrU518xnYBHMkCZYqUBIS4239YNWr+25x3PWf71+/Xq573WGER8Mk7g/ehFtwYwFUvKu6qIM6/gJFpEeoFJawhwSORliosnIXAE2pcklgdAsIrFKUJVt5WrFlo+xrWK9bb1zoPKGMYxhDGMYwxjGMIaxz+H/Az2jvqCLQeXsAAAAAElFTkSuQmCC"}" alt="PayNow" />
|
|
554
|
+
<img src="${"https://images.ctfassets.net/c3n7jozh84hr/2A5qlS6JkUsOyFVPzQ0KlK/22b497afd71030ef1a44a52394b15027/______2022-06-30_11.03.43.png"}" alt="PayNow" style="width: 45px; height: auto;" />
|
|
294
555
|
</div>
|
|
295
|
-
`:
|
|
556
|
+
`:i===mt?O`
|
|
557
|
+
<div class="method-icon-right">
|
|
558
|
+
<img src="${"https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/xLSOJpNvMp7cBKdvDln0B/eb2f53a0a3f2317750739dceff9df413/______2022-06-30_10.59.00.png"}" alt="PromptPay" style="width: 45px; height: auto;" />
|
|
559
|
+
</div>
|
|
560
|
+
`:i===gt?O`
|
|
561
|
+
<div class="method-icon-right">
|
|
562
|
+
<img src="${"https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/4Iq13VoxktB3amHFbQK1yb/f2fe12add0dac233d56c22cf5651c65c/image-20220630-030728.png"}" alt="DuitNow" style="width: 45px; height: auto;" />
|
|
563
|
+
</div>
|
|
564
|
+
`:i===ft?O`
|
|
565
|
+
<div class="method-icon-right">
|
|
566
|
+
<img src="${"https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/mjau5Tqscwu9tbhRLFbmJ/a66cd2894060b2d3a94b75d7f4e65355/______2022-07-04_17.05.18.png"}" alt="GoPay" style="width: 45px; height: auto;" />
|
|
567
|
+
</div>
|
|
568
|
+
`:i===yt?O`
|
|
569
|
+
<div class="method-icon-right">
|
|
570
|
+
<img src="${"https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/1M4DBVFhOrkprPmjxZwS7M/c4a90840d3846b926d3a5524392435fe/Boost.svg"}" alt="Boost" style="width: 45px; height: auto;" />
|
|
571
|
+
</div>
|
|
572
|
+
`:i===vt?O`
|
|
573
|
+
<div class="method-icon-right">
|
|
574
|
+
<img src="${"https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/1BYCLeHNQEyPXBjlIdu09h/71d67c5be3975f77091bf45c7ab58f65/ShopeePay.svg"}" alt="ShopeePay" style="width: 45px; height: auto;" />
|
|
575
|
+
</div>
|
|
576
|
+
`:i===bt?O`
|
|
577
|
+
<div class="method-icon-right">
|
|
578
|
+
<img src="${"https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/61LYQ3RuziTGisarZgaAV1/309f3f1e569609dd0b0095857d6382b5/__2022-05-31_11.44.42.png"}" alt="Atome" style="width: 45px; height: auto;" />
|
|
579
|
+
</div>
|
|
580
|
+
`:i===wt?O`
|
|
581
|
+
<div class="method-icon-right">
|
|
582
|
+
<img src="${"https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/79Uj5xItEZE7L51j2oh6IV/6af4cfefdd65834305931fd16f652d87/DANA.svg"}" alt="Dana" style="width: 45px; height: auto;" />
|
|
583
|
+
</div>
|
|
584
|
+
`:i===xt?O`
|
|
585
|
+
<div class="method-icon-right">
|
|
586
|
+
<img src="${"https://www.airwallex.com/docs/assets/contentful/images.ctfassets.net/c3n7jozh84hr/15FHwC4H3W0JrNvsqy6TWH/5d18aa44231c55d6457389e17ac7ea0c/TnG.svg"}" alt="Touch 'n Go" style="width: 45px; height: auto;" />
|
|
587
|
+
</div>
|
|
588
|
+
`:null}
|
|
296
589
|
</div>
|
|
297
|
-
${
|
|
298
|
-
${
|
|
590
|
+
${e?O`<div class="method-content">
|
|
591
|
+
${t.id===ht?this.renderCardForm():t.id===pt?this.renderPayNowContent():t.id===mt?this.renderPromptPayContent():t.id===gt?this.renderDuitNowContent():t.id===ft?this.renderGoPayContent():t.id===yt?this.renderBoostContent():t.id===vt?this.renderShopeePayContent():t.id===bt?this.renderAtomContent():t.id===wt?this.renderDanaContent():t.id===xt?this.renderTngContent():null}
|
|
299
592
|
</div>`:""}
|
|
300
593
|
</div>
|
|
301
|
-
`;var
|
|
594
|
+
`;var i})}
|
|
302
595
|
</div>
|
|
303
596
|
`:""}
|
|
304
|
-
${
|
|
597
|
+
${t?this.renderStatusBlock():""}
|
|
305
598
|
</div>
|
|
306
599
|
|
|
307
600
|
${this.render3DSModal()}
|
|
308
|
-
`}};async function
|
|
601
|
+
`}};async function Ar(t){var e;try{const r=await t.json();return r.message||(null==(e=r.error)?void 0:e.message)||r.error||t.statusText}catch{return t.statusText}}Cr.styles=((t,...e)=>{const r=1===t.length?t[0]:e.reduce((e,r,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[i+1],t[0]);return new s(r,t,n)})`
|
|
602
|
+
/* ═══════════════════════════════════════════════════════════════
|
|
603
|
+
CSS CUSTOM PROPERTIES (Theming)
|
|
604
|
+
═══════════════════════════════════════════════════════════════ */
|
|
605
|
+
|
|
309
606
|
:host {
|
|
310
|
-
|
|
311
|
-
|
|
607
|
+
/* ─── Color Tokens (Light Theme Default) ─── */
|
|
608
|
+
--op-color-primary: #2a2327;
|
|
609
|
+
--op-color-primary-hover: #1a1517;
|
|
610
|
+
--op-color-primary-text: #ffbe32;
|
|
611
|
+
--op-color-background: #ffffff;
|
|
612
|
+
--op-color-surface: #f9fafb;
|
|
613
|
+
--op-color-text: #1f2937;
|
|
614
|
+
--op-color-text-secondary: #6b7280;
|
|
615
|
+
--op-color-danger: #ef4444;
|
|
616
|
+
--op-color-success: #10b981;
|
|
617
|
+
--op-color-warning: #f59e0b;
|
|
618
|
+
--op-color-border: #e5e7eb;
|
|
619
|
+
--op-color-border-focus: #2a2327;
|
|
620
|
+
|
|
621
|
+
/* ─── Typography Tokens ─── */
|
|
622
|
+
--op-font-family:
|
|
312
623
|
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
624
|
+
--op-font-size: 16px;
|
|
625
|
+
--op-font-size-sm: 14px;
|
|
626
|
+
--op-font-size-xs: 12px;
|
|
627
|
+
|
|
628
|
+
/* ─── Layout Tokens ─── */
|
|
629
|
+
--op-border-radius: 8px;
|
|
630
|
+
--op-border-radius-lg: 40px;
|
|
631
|
+
--op-spacing-unit: 4px;
|
|
632
|
+
--op-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
633
|
+
--op-box-shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
634
|
+
--op-transition: 0.2s ease;
|
|
635
|
+
|
|
636
|
+
/* ─── Base Styles ─── */
|
|
637
|
+
display: block;
|
|
638
|
+
font-family: var(--op-font-family);
|
|
313
639
|
box-sizing: border-box;
|
|
640
|
+
background-color: var(--op-color-background);
|
|
641
|
+
color: var(--op-color-text);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/* ─── Dark Theme ─── */
|
|
645
|
+
:host([data-theme='dark']) {
|
|
646
|
+
--op-color-primary: #ffbe32;
|
|
647
|
+
--op-color-primary-hover: #ffd666;
|
|
648
|
+
--op-color-primary-text: #1a1517;
|
|
649
|
+
--op-color-background: #1a1517;
|
|
650
|
+
--op-color-surface: #2a2327;
|
|
651
|
+
--op-color-text: #f9fafb;
|
|
652
|
+
--op-color-text-secondary: #9ca3af;
|
|
653
|
+
--op-color-danger: #f87171;
|
|
654
|
+
--op-color-success: #34d399;
|
|
655
|
+
--op-color-warning: #fbbf24;
|
|
656
|
+
--op-color-border: #4b5563;
|
|
657
|
+
--op-color-border-focus: #ffbe32;
|
|
658
|
+
--op-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
659
|
+
--op-box-shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.4);
|
|
314
660
|
}
|
|
315
661
|
|
|
316
662
|
* {
|
|
@@ -322,15 +668,16 @@ var OnePayments=function(e){"use strict";
|
|
|
322
668
|
width: var(--one-payment-width, 100%);
|
|
323
669
|
max-width: var(--one-payment-max-width, none);
|
|
324
670
|
min-width: 320px;
|
|
671
|
+
padding: 20px;
|
|
325
672
|
}
|
|
326
673
|
|
|
327
674
|
.header {
|
|
328
675
|
text-align: left;
|
|
329
676
|
padding: 1rem 0;
|
|
330
|
-
color:
|
|
331
|
-
font-size:
|
|
677
|
+
color: var(--op-color-text-secondary);
|
|
678
|
+
font-size: var(--op-font-size-sm);
|
|
332
679
|
font-weight: 400;
|
|
333
|
-
border-bottom: 1px solid
|
|
680
|
+
border-bottom: 1px solid var(--op-color-border);
|
|
334
681
|
margin-bottom: 1rem;
|
|
335
682
|
}
|
|
336
683
|
|
|
@@ -343,10 +690,10 @@ var OnePayments=function(e){"use strict";
|
|
|
343
690
|
}
|
|
344
691
|
|
|
345
692
|
.payment-method-item {
|
|
346
|
-
border: 1px solid
|
|
347
|
-
border-radius:
|
|
693
|
+
border: 1px solid var(--op-color-border);
|
|
694
|
+
border-radius: var(--op-border-radius);
|
|
348
695
|
overflow: visible;
|
|
349
|
-
background:
|
|
696
|
+
background: var(--op-color-background);
|
|
350
697
|
width: 100%;
|
|
351
698
|
}
|
|
352
699
|
|
|
@@ -354,20 +701,20 @@ var OnePayments=function(e){"use strict";
|
|
|
354
701
|
display: flex;
|
|
355
702
|
align-items: center;
|
|
356
703
|
padding: 1rem 1.25rem;
|
|
357
|
-
background:
|
|
704
|
+
background: var(--op-color-background);
|
|
358
705
|
cursor: pointer;
|
|
359
|
-
transition: background-color
|
|
706
|
+
transition: background-color var(--op-transition);
|
|
360
707
|
user-select: none;
|
|
361
708
|
width: 100%;
|
|
362
|
-
border-radius:
|
|
709
|
+
border-radius: var(--op-border-radius) var(--op-border-radius) 0 0;
|
|
363
710
|
}
|
|
364
711
|
|
|
365
712
|
.method-header:hover {
|
|
366
|
-
background-color:
|
|
713
|
+
background-color: var(--op-color-surface);
|
|
367
714
|
}
|
|
368
715
|
|
|
369
716
|
.method-header.selected {
|
|
370
|
-
background-color:
|
|
717
|
+
background-color: var(--op-color-surface);
|
|
371
718
|
}
|
|
372
719
|
|
|
373
720
|
.radio {
|
|
@@ -378,20 +725,20 @@ var OnePayments=function(e){"use strict";
|
|
|
378
725
|
margin-right: 10px;
|
|
379
726
|
flex-shrink: 0;
|
|
380
727
|
cursor: pointer;
|
|
381
|
-
accent-color:
|
|
728
|
+
accent-color: var(--op-color-primary);
|
|
382
729
|
-webkit-appearance: none;
|
|
383
730
|
-moz-appearance: none;
|
|
384
731
|
appearance: none;
|
|
385
|
-
border: 2px solid
|
|
732
|
+
border: 2px solid var(--op-color-border);
|
|
386
733
|
border-radius: 50%;
|
|
387
|
-
background-color:
|
|
734
|
+
background-color: var(--op-color-background);
|
|
388
735
|
position: relative;
|
|
389
|
-
transition: border-color
|
|
736
|
+
transition: border-color var(--op-transition);
|
|
390
737
|
}
|
|
391
738
|
|
|
392
739
|
.radio:checked {
|
|
393
|
-
border-color:
|
|
394
|
-
background-color:
|
|
740
|
+
border-color: var(--op-color-primary);
|
|
741
|
+
background-color: var(--op-color-background);
|
|
395
742
|
}
|
|
396
743
|
|
|
397
744
|
.radio:checked::after {
|
|
@@ -403,11 +750,11 @@ var OnePayments=function(e){"use strict";
|
|
|
403
750
|
width: 0.625rem;
|
|
404
751
|
height: 0.625rem;
|
|
405
752
|
border-radius: 50%;
|
|
406
|
-
background-color:
|
|
753
|
+
background-color: var(--op-color-primary);
|
|
407
754
|
}
|
|
408
755
|
|
|
409
756
|
.radio:hover:not(:disabled) {
|
|
410
|
-
border-color:
|
|
757
|
+
border-color: var(--op-color-text-secondary);
|
|
411
758
|
}
|
|
412
759
|
|
|
413
760
|
.method-icon {
|
|
@@ -419,7 +766,7 @@ var OnePayments=function(e){"use strict";
|
|
|
419
766
|
justify-content: center;
|
|
420
767
|
font-size: 1.25rem;
|
|
421
768
|
flex-shrink: 0;
|
|
422
|
-
color:
|
|
769
|
+
color: var(--op-color-text-secondary);
|
|
423
770
|
margin-right: 0.625rem;
|
|
424
771
|
}
|
|
425
772
|
|
|
@@ -431,7 +778,8 @@ var OnePayments=function(e){"use strict";
|
|
|
431
778
|
align-items: center;
|
|
432
779
|
justify-content: center;
|
|
433
780
|
flex-shrink: 0;
|
|
434
|
-
color:
|
|
781
|
+
color: var(--op-color-text-secondary);
|
|
782
|
+
margin-left: 0.5rem;
|
|
435
783
|
}
|
|
436
784
|
|
|
437
785
|
.method-icon-right svg {
|
|
@@ -446,9 +794,9 @@ var OnePayments=function(e){"use strict";
|
|
|
446
794
|
}
|
|
447
795
|
|
|
448
796
|
.method-name {
|
|
449
|
-
font-size:
|
|
797
|
+
font-size: var(--op-font-size);
|
|
450
798
|
font-weight: 500;
|
|
451
|
-
color:
|
|
799
|
+
color: var(--op-color-text);
|
|
452
800
|
flex-shrink: 0;
|
|
453
801
|
text-align: left;
|
|
454
802
|
margin-right: 10px;
|
|
@@ -457,8 +805,8 @@ var OnePayments=function(e){"use strict";
|
|
|
457
805
|
/* Accordion Content */
|
|
458
806
|
.method-content {
|
|
459
807
|
padding: 1.5rem;
|
|
460
|
-
background-color:
|
|
461
|
-
border-top: 1px solid
|
|
808
|
+
background-color: var(--op-color-background);
|
|
809
|
+
border-top: 1px solid var(--op-color-border);
|
|
462
810
|
width: 100%;
|
|
463
811
|
overflow: visible;
|
|
464
812
|
}
|
|
@@ -470,9 +818,9 @@ var OnePayments=function(e){"use strict";
|
|
|
470
818
|
}
|
|
471
819
|
|
|
472
820
|
.form-title {
|
|
473
|
-
font-size:
|
|
821
|
+
font-size: var(--op-font-size);
|
|
474
822
|
font-weight: 500;
|
|
475
|
-
color:
|
|
823
|
+
color: var(--op-color-text);
|
|
476
824
|
margin: 0 0 1rem 0;
|
|
477
825
|
text-align: left;
|
|
478
826
|
}
|
|
@@ -491,22 +839,23 @@ var OnePayments=function(e){"use strict";
|
|
|
491
839
|
.form-label {
|
|
492
840
|
display: block;
|
|
493
841
|
margin-bottom: 0.5rem;
|
|
494
|
-
font-size:
|
|
842
|
+
font-size: var(--op-font-size-sm);
|
|
495
843
|
font-weight: 500;
|
|
496
|
-
color:
|
|
844
|
+
color: var(--op-color-text);
|
|
497
845
|
text-align: left;
|
|
498
846
|
}
|
|
499
847
|
|
|
500
848
|
.input {
|
|
501
849
|
width: 100%;
|
|
502
850
|
padding: 0.75rem;
|
|
503
|
-
border: 1px solid
|
|
504
|
-
border-radius:
|
|
505
|
-
font-size:
|
|
851
|
+
border: 1px solid var(--op-color-border);
|
|
852
|
+
border-radius: calc(var(--op-border-radius) / 2);
|
|
853
|
+
font-size: var(--op-font-size);
|
|
854
|
+
font-family: var(--op-font-family);
|
|
506
855
|
line-height: 1.25rem;
|
|
507
|
-
background:
|
|
508
|
-
color:
|
|
509
|
-
transition: all
|
|
856
|
+
background: var(--op-color-background);
|
|
857
|
+
color: var(--op-color-text);
|
|
858
|
+
transition: all var(--op-transition);
|
|
510
859
|
-webkit-appearance: none;
|
|
511
860
|
-moz-appearance: none;
|
|
512
861
|
appearance: none;
|
|
@@ -514,24 +863,24 @@ var OnePayments=function(e){"use strict";
|
|
|
514
863
|
|
|
515
864
|
.input:focus {
|
|
516
865
|
outline: none;
|
|
517
|
-
border-color:
|
|
866
|
+
border-color: var(--op-color-border-focus);
|
|
518
867
|
box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
|
|
519
868
|
}
|
|
520
869
|
|
|
521
870
|
.input::placeholder {
|
|
522
|
-
color:
|
|
871
|
+
color: var(--op-color-text-secondary);
|
|
523
872
|
}
|
|
524
873
|
|
|
525
874
|
.input:hover:not(:focus) {
|
|
526
|
-
border-color:
|
|
875
|
+
border-color: var(--op-color-text-secondary);
|
|
527
876
|
}
|
|
528
877
|
|
|
529
878
|
.input.input-error {
|
|
530
|
-
border-color:
|
|
879
|
+
border-color: var(--op-color-danger);
|
|
531
880
|
}
|
|
532
881
|
|
|
533
882
|
.input.input-error:focus {
|
|
534
|
-
border-color:
|
|
883
|
+
border-color: var(--op-color-danger);
|
|
535
884
|
box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
|
|
536
885
|
}
|
|
537
886
|
|
|
@@ -544,8 +893,8 @@ var OnePayments=function(e){"use strict";
|
|
|
544
893
|
|
|
545
894
|
.error-message {
|
|
546
895
|
margin-top: 0.25rem;
|
|
547
|
-
color:
|
|
548
|
-
font-size:
|
|
896
|
+
color: var(--op-color-danger);
|
|
897
|
+
font-size: var(--op-font-size-xs);
|
|
549
898
|
line-height: 1.25;
|
|
550
899
|
}
|
|
551
900
|
|
|
@@ -563,21 +912,21 @@ var OnePayments=function(e){"use strict";
|
|
|
563
912
|
padding: 10px 24px;
|
|
564
913
|
font-size: 18px;
|
|
565
914
|
font-weight: 650;
|
|
566
|
-
color:
|
|
915
|
+
color: var(--op-color-primary-text);
|
|
567
916
|
line-height: normal;
|
|
568
917
|
border: 0;
|
|
569
|
-
border-radius:
|
|
918
|
+
border-radius: var(--op-border-radius-lg);
|
|
570
919
|
text-decoration: none;
|
|
571
920
|
transition:
|
|
572
|
-
background-color
|
|
573
|
-
border-color
|
|
574
|
-
color
|
|
575
|
-
opacity
|
|
921
|
+
background-color var(--op-transition),
|
|
922
|
+
border-color var(--op-transition),
|
|
923
|
+
color var(--op-transition),
|
|
924
|
+
opacity var(--op-transition);
|
|
576
925
|
overflow: hidden;
|
|
577
926
|
user-select: none;
|
|
578
927
|
position: relative;
|
|
579
928
|
cursor: pointer;
|
|
580
|
-
background-color:
|
|
929
|
+
background-color: var(--op-color-primary);
|
|
581
930
|
white-space: nowrap;
|
|
582
931
|
letter-spacing: 0;
|
|
583
932
|
-webkit-appearance: none;
|
|
@@ -587,13 +936,12 @@ var OnePayments=function(e){"use strict";
|
|
|
587
936
|
|
|
588
937
|
.pay-button:disabled {
|
|
589
938
|
cursor: not-allowed;
|
|
590
|
-
|
|
591
|
-
background-color: rgba(42, 35, 39, 0.8);
|
|
939
|
+
opacity: 0.7;
|
|
592
940
|
}
|
|
593
941
|
|
|
594
942
|
.pay-button:not(:disabled):hover,
|
|
595
943
|
.pay-button:not(:disabled):focus-visible {
|
|
596
|
-
background-color:
|
|
944
|
+
background-color: var(--op-color-primary-hover);
|
|
597
945
|
}
|
|
598
946
|
|
|
599
947
|
.pay-button:not(:disabled):active {
|
|
@@ -619,7 +967,7 @@ var OnePayments=function(e){"use strict";
|
|
|
619
967
|
margin-left: -10px;
|
|
620
968
|
margin-top: -10px;
|
|
621
969
|
border: 2px solid transparent;
|
|
622
|
-
border-top-color:
|
|
970
|
+
border-top-color: var(--op-color-primary-text);
|
|
623
971
|
border-radius: 50%;
|
|
624
972
|
animation: button-spinner 0.8s linear infinite;
|
|
625
973
|
}
|
|
@@ -659,7 +1007,7 @@ var OnePayments=function(e){"use strict";
|
|
|
659
1007
|
}
|
|
660
1008
|
|
|
661
1009
|
.processing-text {
|
|
662
|
-
color:
|
|
1010
|
+
color: var(--op-color-text-secondary);
|
|
663
1011
|
margin: 0;
|
|
664
1012
|
}
|
|
665
1013
|
|
|
@@ -678,32 +1026,31 @@ var OnePayments=function(e){"use strict";
|
|
|
678
1026
|
padding: 10px 24px;
|
|
679
1027
|
font-size: 18px;
|
|
680
1028
|
font-weight: 650;
|
|
681
|
-
color:
|
|
1029
|
+
color: var(--op-color-primary-text);
|
|
682
1030
|
line-height: normal;
|
|
683
1031
|
border: 0;
|
|
684
|
-
border-radius:
|
|
1032
|
+
border-radius: var(--op-border-radius-lg);
|
|
685
1033
|
text-decoration: none;
|
|
686
1034
|
transition:
|
|
687
|
-
background-color
|
|
1035
|
+
background-color var(--op-transition),
|
|
688
1036
|
transform 0.05s ease;
|
|
689
1037
|
overflow: hidden;
|
|
690
1038
|
user-select: none;
|
|
691
1039
|
position: relative;
|
|
692
1040
|
cursor: pointer;
|
|
693
|
-
background-color:
|
|
1041
|
+
background-color: var(--op-color-primary);
|
|
694
1042
|
white-space: nowrap;
|
|
695
1043
|
letter-spacing: 0;
|
|
696
1044
|
}
|
|
697
1045
|
|
|
698
1046
|
.paynow-container .scanned-button:disabled {
|
|
699
1047
|
cursor: not-allowed;
|
|
700
|
-
|
|
701
|
-
background-color: rgba(42, 35, 39, 0.8);
|
|
1048
|
+
opacity: 0.7;
|
|
702
1049
|
}
|
|
703
1050
|
|
|
704
1051
|
.paynow-container .scanned-button:not(:disabled):hover,
|
|
705
1052
|
.paynow-container .scanned-button:not(:disabled):focus-visible {
|
|
706
|
-
background-color:
|
|
1053
|
+
background-color: var(--op-color-primary-hover);
|
|
707
1054
|
}
|
|
708
1055
|
|
|
709
1056
|
.paynow-container .scanned-button:not(:disabled):active {
|
|
@@ -717,9 +1064,9 @@ var OnePayments=function(e){"use strict";
|
|
|
717
1064
|
}
|
|
718
1065
|
|
|
719
1066
|
.instructions-title {
|
|
720
|
-
font-size:
|
|
1067
|
+
font-size: var(--op-font-size);
|
|
721
1068
|
font-weight: 600;
|
|
722
|
-
color:
|
|
1069
|
+
color: var(--op-color-text);
|
|
723
1070
|
margin: 0 0 1.5rem 0;
|
|
724
1071
|
text-align: left;
|
|
725
1072
|
}
|
|
@@ -746,9 +1093,9 @@ var OnePayments=function(e){"use strict";
|
|
|
746
1093
|
height: 1.75rem;
|
|
747
1094
|
min-width: 1.75rem;
|
|
748
1095
|
border-radius: 50%;
|
|
749
|
-
background-color:
|
|
750
|
-
color:
|
|
751
|
-
font-size:
|
|
1096
|
+
background-color: var(--op-color-primary);
|
|
1097
|
+
color: var(--op-color-background);
|
|
1098
|
+
font-size: var(--op-font-size-sm);
|
|
752
1099
|
font-weight: 600;
|
|
753
1100
|
flex-shrink: 0;
|
|
754
1101
|
}
|
|
@@ -757,7 +1104,7 @@ var OnePayments=function(e){"use strict";
|
|
|
757
1104
|
flex: 1;
|
|
758
1105
|
margin: 0;
|
|
759
1106
|
padding-top: 0.125rem;
|
|
760
|
-
color:
|
|
1107
|
+
color: var(--op-color-text);
|
|
761
1108
|
font-size: 0.9375rem;
|
|
762
1109
|
line-height: 1.5;
|
|
763
1110
|
}
|
|
@@ -768,8 +1115,8 @@ var OnePayments=function(e){"use strict";
|
|
|
768
1115
|
}
|
|
769
1116
|
|
|
770
1117
|
.qr-instruction {
|
|
771
|
-
color:
|
|
772
|
-
font-size:
|
|
1118
|
+
color: var(--op-color-text-secondary);
|
|
1119
|
+
font-size: var(--op-font-size-sm);
|
|
773
1120
|
margin-bottom: 1.5rem;
|
|
774
1121
|
line-height: 1.5;
|
|
775
1122
|
}
|
|
@@ -781,33 +1128,33 @@ var OnePayments=function(e){"use strict";
|
|
|
781
1128
|
}
|
|
782
1129
|
|
|
783
1130
|
.qr-canvas {
|
|
784
|
-
border: 4px solid
|
|
785
|
-
border-radius:
|
|
1131
|
+
border: 4px solid var(--op-color-surface);
|
|
1132
|
+
border-radius: var(--op-border-radius);
|
|
786
1133
|
padding: 16px;
|
|
787
|
-
background:
|
|
788
|
-
box-shadow:
|
|
1134
|
+
background: var(--op-color-background);
|
|
1135
|
+
box-shadow: var(--op-box-shadow-lg);
|
|
789
1136
|
width: 200px;
|
|
790
1137
|
height: 200px;
|
|
791
1138
|
display: flex;
|
|
792
1139
|
align-items: center;
|
|
793
1140
|
justify-content: center;
|
|
794
|
-
color:
|
|
1141
|
+
color: var(--op-color-text-secondary);
|
|
795
1142
|
}
|
|
796
1143
|
|
|
797
1144
|
.scanned-button {
|
|
798
1145
|
padding: 12px 24px;
|
|
799
|
-
background:
|
|
800
|
-
color:
|
|
1146
|
+
background: var(--op-color-success);
|
|
1147
|
+
color: var(--op-color-background);
|
|
801
1148
|
border: none;
|
|
802
|
-
border-radius:
|
|
803
|
-
font-size:
|
|
1149
|
+
border-radius: var(--op-border-radius);
|
|
1150
|
+
font-size: var(--op-font-size);
|
|
804
1151
|
font-weight: 600;
|
|
805
1152
|
cursor: pointer;
|
|
806
|
-
transition: all
|
|
1153
|
+
transition: all var(--op-transition);
|
|
807
1154
|
}
|
|
808
1155
|
|
|
809
1156
|
.scanned-button:hover:not(:disabled) {
|
|
810
|
-
|
|
1157
|
+
filter: brightness(0.9);
|
|
811
1158
|
transform: translateY(-2px);
|
|
812
1159
|
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
|
|
813
1160
|
}
|
|
@@ -825,25 +1172,25 @@ var OnePayments=function(e){"use strict";
|
|
|
825
1172
|
|
|
826
1173
|
/* Result Status Block - Replaces payment methods when succeeded/failed */
|
|
827
1174
|
.result-card {
|
|
828
|
-
background:
|
|
829
|
-
border-radius:
|
|
1175
|
+
background: var(--op-color-background);
|
|
1176
|
+
border-radius: var(--op-border-radius);
|
|
830
1177
|
padding: 40px;
|
|
831
1178
|
width: 100%;
|
|
832
1179
|
text-align: center;
|
|
833
|
-
box-shadow:
|
|
1180
|
+
box-shadow: var(--op-box-shadow-lg);
|
|
834
1181
|
border: 2px solid transparent;
|
|
835
|
-
transition: all
|
|
1182
|
+
transition: all var(--op-transition);
|
|
836
1183
|
margin-top: 0;
|
|
837
1184
|
}
|
|
838
1185
|
|
|
839
1186
|
.result-card.success {
|
|
840
|
-
border-color:
|
|
841
|
-
background:
|
|
1187
|
+
border-color: var(--op-color-success);
|
|
1188
|
+
background: var(--op-color-background);
|
|
842
1189
|
}
|
|
843
1190
|
|
|
844
1191
|
.result-card.error {
|
|
845
|
-
border-color:
|
|
846
|
-
background:
|
|
1192
|
+
border-color: var(--op-color-danger);
|
|
1193
|
+
background: var(--op-color-background);
|
|
847
1194
|
}
|
|
848
1195
|
|
|
849
1196
|
.result-icon-wrapper {
|
|
@@ -858,11 +1205,11 @@ var OnePayments=function(e){"use strict";
|
|
|
858
1205
|
}
|
|
859
1206
|
|
|
860
1207
|
.result-card.success .result-icon-wrapper {
|
|
861
|
-
background:
|
|
1208
|
+
background: var(--op-color-success);
|
|
862
1209
|
}
|
|
863
1210
|
|
|
864
1211
|
.result-card.error .result-icon-wrapper {
|
|
865
|
-
background:
|
|
1212
|
+
background: var(--op-color-danger);
|
|
866
1213
|
}
|
|
867
1214
|
|
|
868
1215
|
@keyframes scaleIn {
|
|
@@ -886,13 +1233,13 @@ var OnePayments=function(e){"use strict";
|
|
|
886
1233
|
margin: 0 0 12px 0;
|
|
887
1234
|
font-size: 28px;
|
|
888
1235
|
font-weight: 700;
|
|
889
|
-
color:
|
|
1236
|
+
color: var(--op-color-text);
|
|
890
1237
|
}
|
|
891
1238
|
|
|
892
1239
|
.result-message {
|
|
893
1240
|
margin: 0 0 32px 0;
|
|
894
|
-
font-size:
|
|
895
|
-
color:
|
|
1241
|
+
font-size: var(--op-font-size);
|
|
1242
|
+
color: var(--op-color-text-secondary);
|
|
896
1243
|
line-height: 1.5;
|
|
897
1244
|
}
|
|
898
1245
|
|
|
@@ -1004,16 +1351,16 @@ var OnePayments=function(e){"use strict";
|
|
|
1004
1351
|
/* Transaction Details */
|
|
1005
1352
|
.transaction-details {
|
|
1006
1353
|
padding: 1.25rem;
|
|
1007
|
-
background:
|
|
1008
|
-
border: 1px solid
|
|
1009
|
-
border-radius:
|
|
1354
|
+
background: var(--op-color-surface);
|
|
1355
|
+
border: 1px solid var(--op-color-border);
|
|
1356
|
+
border-radius: var(--op-border-radius);
|
|
1010
1357
|
margin-bottom: 1rem;
|
|
1011
1358
|
}
|
|
1012
1359
|
|
|
1013
1360
|
.transaction-title {
|
|
1014
1361
|
font-size: 1.125rem;
|
|
1015
1362
|
font-weight: 600;
|
|
1016
|
-
color:
|
|
1363
|
+
color: var(--op-color-text);
|
|
1017
1364
|
margin: 0 0 1rem 0;
|
|
1018
1365
|
line-height: 1.2;
|
|
1019
1366
|
}
|
|
@@ -1031,15 +1378,15 @@ var OnePayments=function(e){"use strict";
|
|
|
1031
1378
|
}
|
|
1032
1379
|
|
|
1033
1380
|
.details-label {
|
|
1034
|
-
font-size:
|
|
1381
|
+
font-size: var(--op-font-size-sm);
|
|
1035
1382
|
font-weight: 500;
|
|
1036
|
-
color:
|
|
1383
|
+
color: var(--op-color-text-secondary);
|
|
1037
1384
|
}
|
|
1038
1385
|
|
|
1039
1386
|
.details-value {
|
|
1040
|
-
font-size:
|
|
1387
|
+
font-size: var(--op-font-size-sm);
|
|
1041
1388
|
font-weight: 600;
|
|
1042
|
-
color:
|
|
1389
|
+
color: var(--op-color-text);
|
|
1043
1390
|
text-align: right;
|
|
1044
1391
|
}
|
|
1045
1392
|
|
|
@@ -1075,7 +1422,7 @@ var OnePayments=function(e){"use strict";
|
|
|
1075
1422
|
left: 0.9375rem;
|
|
1076
1423
|
top: 0.625rem;
|
|
1077
1424
|
bottom: 0.625rem;
|
|
1078
|
-
border-left: 2px solid
|
|
1425
|
+
border-left: 2px solid var(--op-color-border);
|
|
1079
1426
|
}
|
|
1080
1427
|
|
|
1081
1428
|
.fee-breakdown-inner {
|
|
@@ -1105,7 +1452,7 @@ var OnePayments=function(e){"use strict";
|
|
|
1105
1452
|
width: 10px;
|
|
1106
1453
|
height: 10px;
|
|
1107
1454
|
border-radius: 50%;
|
|
1108
|
-
background:
|
|
1455
|
+
background: var(--op-color-border);
|
|
1109
1456
|
}
|
|
1110
1457
|
|
|
1111
1458
|
.breakdown-row:first-child::after {
|
|
@@ -1116,7 +1463,7 @@ var OnePayments=function(e){"use strict";
|
|
|
1116
1463
|
transform: translateY(-50%);
|
|
1117
1464
|
width: 1rem;
|
|
1118
1465
|
height: 2px;
|
|
1119
|
-
background:
|
|
1466
|
+
background: var(--op-color-border);
|
|
1120
1467
|
}
|
|
1121
1468
|
|
|
1122
1469
|
.breakdown-row:nth-child(2) {
|
|
@@ -1132,7 +1479,7 @@ var OnePayments=function(e){"use strict";
|
|
|
1132
1479
|
transform: translateY(-60%);
|
|
1133
1480
|
width: 1.5rem;
|
|
1134
1481
|
height: 2px;
|
|
1135
|
-
background:
|
|
1482
|
+
background: var(--op-color-border);
|
|
1136
1483
|
}
|
|
1137
1484
|
|
|
1138
1485
|
.breakdown-row:nth-child(2)::after {
|
|
@@ -1142,25 +1489,25 @@ var OnePayments=function(e){"use strict";
|
|
|
1142
1489
|
top: calc(60% - 0.25rem);
|
|
1143
1490
|
border-top: 4px solid transparent;
|
|
1144
1491
|
border-bottom: 4px solid transparent;
|
|
1145
|
-
border-left: 6px solid
|
|
1492
|
+
border-left: 6px solid var(--op-color-border);
|
|
1146
1493
|
}
|
|
1147
1494
|
|
|
1148
1495
|
.breakdown-label {
|
|
1149
|
-
font-size:
|
|
1496
|
+
font-size: var(--op-font-size-sm);
|
|
1150
1497
|
font-weight: 400;
|
|
1151
|
-
color:
|
|
1498
|
+
color: var(--op-color-text-secondary);
|
|
1152
1499
|
}
|
|
1153
1500
|
|
|
1154
1501
|
.breakdown-value {
|
|
1155
|
-
font-size:
|
|
1502
|
+
font-size: var(--op-font-size-sm);
|
|
1156
1503
|
font-weight: 500;
|
|
1157
|
-
color:
|
|
1504
|
+
color: var(--op-color-text);
|
|
1158
1505
|
text-align: right;
|
|
1159
1506
|
}
|
|
1160
1507
|
|
|
1161
1508
|
.transaction-divider {
|
|
1162
1509
|
height: 1px;
|
|
1163
|
-
background:
|
|
1510
|
+
background: var(--op-color-border);
|
|
1164
1511
|
margin: 1rem 0;
|
|
1165
1512
|
}
|
|
1166
1513
|
|
|
@@ -1171,21 +1518,26 @@ var OnePayments=function(e){"use strict";
|
|
|
1171
1518
|
}
|
|
1172
1519
|
|
|
1173
1520
|
.net-label {
|
|
1174
|
-
font-size:
|
|
1521
|
+
font-size: var(--op-font-size);
|
|
1175
1522
|
font-weight: 600;
|
|
1176
|
-
color:
|
|
1523
|
+
color: var(--op-color-text);
|
|
1177
1524
|
}
|
|
1178
1525
|
|
|
1179
1526
|
.net-value {
|
|
1180
1527
|
font-size: 1.25rem;
|
|
1181
1528
|
font-weight: 700;
|
|
1182
|
-
color:
|
|
1529
|
+
color: var(--op-color-text);
|
|
1183
1530
|
text-align: right;
|
|
1184
1531
|
}
|
|
1185
1532
|
|
|
1186
1533
|
/* Skeleton Loading */
|
|
1187
1534
|
.skeleton {
|
|
1188
|
-
background: linear-gradient(
|
|
1535
|
+
background: linear-gradient(
|
|
1536
|
+
90deg,
|
|
1537
|
+
var(--op-color-surface) 25%,
|
|
1538
|
+
var(--op-color-border) 50%,
|
|
1539
|
+
var(--op-color-surface) 75%
|
|
1540
|
+
);
|
|
1189
1541
|
background-size: 200% 100%;
|
|
1190
1542
|
animation: shimmer 1.5s infinite;
|
|
1191
1543
|
border-radius: 0.25rem;
|
|
@@ -1202,9 +1554,9 @@ var OnePayments=function(e){"use strict";
|
|
|
1202
1554
|
|
|
1203
1555
|
.skeleton-transaction {
|
|
1204
1556
|
padding: 1.25rem;
|
|
1205
|
-
background:
|
|
1206
|
-
border: 1px solid
|
|
1207
|
-
border-radius:
|
|
1557
|
+
background: var(--op-color-surface);
|
|
1558
|
+
border: 1px solid var(--op-color-border);
|
|
1559
|
+
border-radius: var(--op-border-radius);
|
|
1208
1560
|
margin-bottom: 1rem;
|
|
1209
1561
|
}
|
|
1210
1562
|
|
|
@@ -1232,7 +1584,7 @@ var OnePayments=function(e){"use strict";
|
|
|
1232
1584
|
|
|
1233
1585
|
.skeleton-divider {
|
|
1234
1586
|
height: 1px;
|
|
1235
|
-
background:
|
|
1587
|
+
background: var(--op-color-border);
|
|
1236
1588
|
margin: 1rem 0;
|
|
1237
1589
|
}
|
|
1238
1590
|
|
|
@@ -1253,10 +1605,10 @@ var OnePayments=function(e){"use strict";
|
|
|
1253
1605
|
}
|
|
1254
1606
|
|
|
1255
1607
|
.skeleton-method {
|
|
1256
|
-
border: 1px solid
|
|
1257
|
-
border-radius:
|
|
1608
|
+
border: 1px solid var(--op-color-border);
|
|
1609
|
+
border-radius: var(--op-border-radius);
|
|
1258
1610
|
padding: 1rem 1.25rem;
|
|
1259
|
-
background:
|
|
1611
|
+
background: var(--op-color-background);
|
|
1260
1612
|
margin-bottom: 1rem;
|
|
1261
1613
|
display: flex;
|
|
1262
1614
|
align-items: center;
|
|
@@ -1302,8 +1654,8 @@ var OnePayments=function(e){"use strict";
|
|
|
1302
1654
|
width: 100%;
|
|
1303
1655
|
max-width: 500px;
|
|
1304
1656
|
max-height: 90vh;
|
|
1305
|
-
background:
|
|
1306
|
-
border-radius:
|
|
1657
|
+
background: var(--op-color-background);
|
|
1658
|
+
border-radius: var(--op-border-radius);
|
|
1307
1659
|
overflow-y: auto;
|
|
1308
1660
|
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
|
1309
1661
|
}
|
|
@@ -1339,10 +1691,10 @@ var OnePayments=function(e){"use strict";
|
|
|
1339
1691
|
.modal-content .qr-code-section .scanned-button {
|
|
1340
1692
|
width: 100%;
|
|
1341
1693
|
padding: 16px 24px;
|
|
1342
|
-
background:
|
|
1343
|
-
color:
|
|
1694
|
+
background: var(--op-color-success);
|
|
1695
|
+
color: var(--op-color-background);
|
|
1344
1696
|
border: none;
|
|
1345
|
-
border-radius:
|
|
1697
|
+
border-radius: var(--op-border-radius);
|
|
1346
1698
|
font-size: 18px;
|
|
1347
1699
|
font-weight: 700;
|
|
1348
1700
|
cursor: pointer;
|
|
@@ -1359,14 +1711,18 @@ var OnePayments=function(e){"use strict";
|
|
|
1359
1711
|
max-height: 85vh;
|
|
1360
1712
|
padding: 0;
|
|
1361
1713
|
overflow: hidden;
|
|
1362
|
-
background: linear-gradient(
|
|
1714
|
+
background: linear-gradient(
|
|
1715
|
+
to bottom,
|
|
1716
|
+
var(--op-color-background) 0%,
|
|
1717
|
+
var(--op-color-surface) 100%
|
|
1718
|
+
);
|
|
1363
1719
|
}
|
|
1364
1720
|
|
|
1365
1721
|
.qr-iframe-container {
|
|
1366
1722
|
flex: 1;
|
|
1367
1723
|
width: 100%;
|
|
1368
1724
|
overflow: hidden;
|
|
1369
|
-
background:
|
|
1725
|
+
background: var(--op-color-background);
|
|
1370
1726
|
position: relative;
|
|
1371
1727
|
}
|
|
1372
1728
|
|
|
@@ -1374,13 +1730,17 @@ var OnePayments=function(e){"use strict";
|
|
|
1374
1730
|
width: 100%;
|
|
1375
1731
|
height: 100%;
|
|
1376
1732
|
border: none;
|
|
1377
|
-
background:
|
|
1733
|
+
background: var(--op-color-background);
|
|
1378
1734
|
}
|
|
1379
1735
|
|
|
1380
1736
|
.qr-button-container {
|
|
1381
1737
|
padding: 2rem 2.5rem;
|
|
1382
|
-
background: linear-gradient(
|
|
1383
|
-
|
|
1738
|
+
background: linear-gradient(
|
|
1739
|
+
to top,
|
|
1740
|
+
var(--op-color-background) 0%,
|
|
1741
|
+
var(--op-color-surface) 100%
|
|
1742
|
+
);
|
|
1743
|
+
border-top: 1px solid var(--op-color-border);
|
|
1384
1744
|
display: flex;
|
|
1385
1745
|
flex-direction: column;
|
|
1386
1746
|
gap: 1rem;
|
|
@@ -1406,7 +1766,7 @@ var OnePayments=function(e){"use strict";
|
|
|
1406
1766
|
}
|
|
1407
1767
|
|
|
1408
1768
|
.qr-button-hint {
|
|
1409
|
-
color:
|
|
1769
|
+
color: var(--op-color-text-secondary);
|
|
1410
1770
|
font-size: 14px;
|
|
1411
1771
|
font-weight: 500;
|
|
1412
1772
|
text-align: center;
|
|
@@ -1419,8 +1779,8 @@ var OnePayments=function(e){"use strict";
|
|
|
1419
1779
|
width: 100%;
|
|
1420
1780
|
max-width: 420px;
|
|
1421
1781
|
padding: 20px 40px;
|
|
1422
|
-
background:
|
|
1423
|
-
color:
|
|
1782
|
+
background: var(--op-color-success);
|
|
1783
|
+
color: #ffffff;
|
|
1424
1784
|
border: none;
|
|
1425
1785
|
border-radius: 16px;
|
|
1426
1786
|
font-size: 17px;
|
|
@@ -1453,7 +1813,8 @@ var OnePayments=function(e){"use strict";
|
|
|
1453
1813
|
}
|
|
1454
1814
|
|
|
1455
1815
|
.qr-button-container .scanned-button:hover {
|
|
1456
|
-
background:
|
|
1816
|
+
background: var(--op-color-success);
|
|
1817
|
+
filter: brightness(0.9);
|
|
1457
1818
|
transform: translateY(-3px);
|
|
1458
1819
|
box-shadow:
|
|
1459
1820
|
0 12px 32px rgba(16, 185, 129, 0.45),
|
|
@@ -1488,15 +1849,15 @@ var OnePayments=function(e){"use strict";
|
|
|
1488
1849
|
height: 450px;
|
|
1489
1850
|
border-radius: 8px;
|
|
1490
1851
|
overflow: hidden;
|
|
1491
|
-
background:
|
|
1492
|
-
border: 1px solid
|
|
1852
|
+
background: var(--op-color-background);
|
|
1853
|
+
border: 1px solid var(--op-color-border);
|
|
1493
1854
|
}
|
|
1494
1855
|
|
|
1495
1856
|
.qr-iframe-inline {
|
|
1496
1857
|
width: 100%;
|
|
1497
1858
|
height: 100%;
|
|
1498
1859
|
border: none;
|
|
1499
|
-
background:
|
|
1860
|
+
background: var(--op-color-background);
|
|
1500
1861
|
}
|
|
1501
1862
|
|
|
1502
1863
|
.radio:disabled {
|
|
@@ -1510,7 +1871,7 @@ var OnePayments=function(e){"use strict";
|
|
|
1510
1871
|
}
|
|
1511
1872
|
|
|
1512
1873
|
.method-header.disabled:hover {
|
|
1513
|
-
background-color:
|
|
1874
|
+
background-color: var(--op-color-background);
|
|
1514
1875
|
}
|
|
1515
1876
|
|
|
1516
1877
|
/* Tooltip for disabled payment methods */
|
|
@@ -1526,8 +1887,8 @@ var OnePayments=function(e){"use strict";
|
|
|
1526
1887
|
transform: translateX(-50%);
|
|
1527
1888
|
margin-top: 0.5rem;
|
|
1528
1889
|
padding: 0.5rem 0.75rem;
|
|
1529
|
-
background:
|
|
1530
|
-
color:
|
|
1890
|
+
background: var(--op-color-text);
|
|
1891
|
+
color: var(--op-color-background);
|
|
1531
1892
|
font-size: 0.875rem;
|
|
1532
1893
|
line-height: 1.25rem;
|
|
1533
1894
|
border-radius: 0.375rem;
|
|
@@ -1545,7 +1906,7 @@ var OnePayments=function(e){"use strict";
|
|
|
1545
1906
|
transform: translateX(-50%);
|
|
1546
1907
|
margin-top: 0.25rem;
|
|
1547
1908
|
border: 5px solid transparent;
|
|
1548
|
-
border-bottom-color:
|
|
1909
|
+
border-bottom-color: var(--op-color-text);
|
|
1549
1910
|
z-index: 1001;
|
|
1550
1911
|
}
|
|
1551
1912
|
|
|
@@ -1559,5 +1920,5 @@ var OnePayments=function(e){"use strict";
|
|
|
1559
1920
|
transform: translateX(-50%) translateY(0);
|
|
1560
1921
|
}
|
|
1561
1922
|
}
|
|
1562
|
-
`,
|
|
1923
|
+
`,Pr([ct({type:Object})],Cr.prototype,"config",2),Pr([ct({type:Object})],Cr.prototype,"adapters",2),Pr([ct({type:Number})],Cr.prototype,"amount",2),Pr([ct({type:String})],Cr.prototype,"currency",2),Pr([ct({type:String})],Cr.prototype,"orderId",2),Pr([ct({type:String})],Cr.prototype,"firstName",2),Pr([ct({type:String})],Cr.prototype,"lastName",2),Pr([ct({type:String})],Cr.prototype,"email",2),Pr([ct({type:String})],Cr.prototype,"phoneNumber",2),Pr([ct({type:Array})],Cr.prototype,"excludePaymentMethods",2),Pr([ct({type:String})],Cr.prototype,"width",2),Pr([ct({type:String})],Cr.prototype,"maxWidth",2),Pr([ct({type:Object})],Cr.prototype,"appearance",2),Pr([ut()],Cr.prototype,"currentState",2),Pr([ut()],Cr.prototype,"selectedMethod",2),Pr([ut()],Cr.prototype,"cardFormData",2),Pr([ut()],Cr.prototype,"formErrors",2),Pr([ut()],Cr.prototype,"paymentData",2),Pr([ut()],Cr.prototype,"feesExpanded",2),Pr([ut()],Cr.prototype,"isInitializing",2),Pr([ut()],Cr.prototype,"cardBrand",2),Pr([ut()],Cr.prototype,"paymentLocked",2),Pr([ut()],Cr.prototype,"show3DSModal",2),Pr([ut()],Cr.prototype,"showQRModal",2),Pr([ut()],Cr.prototype,"nextActionUrl",2),Pr([ut()],Cr.prototype,"qrCode",2),Pr([ut()],Cr.prototype,"qrCodeDataUrl",2),Pr([ut()],Cr.prototype,"qrAutoResumeTimer",2),Pr([ut()],Cr.prototype,"qrPollingInProgress",2),Cr=Pr([(t=>(e,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)})("one-payment")],Cr);class $r{async get(t,e){const r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",...e}});if(!r.ok){const t=await Ar(r);throw new Error(t)}return await r.json()}async post(t,e,r){const i=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",...r},body:JSON.stringify(e)});if(!i.ok){const t=await Ar(i);throw new Error(t)}return await i.json()}async put(t,e,r){const i=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json",...r},body:JSON.stringify(e)});if(!i.ok){const t=await Ar(i);throw new Error(t)}return await i.json()}async patch(t,e,r){const i=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json",...r},body:JSON.stringify(e)});if(!i.ok){const t=await Ar(i);throw new Error(t)}return await i.json()}async delete(t,e){const r=await fetch(t,{method:"DELETE",headers:{"Content-Type":"application/json",...e}});if(!r.ok){const t=await Ar(r);throw new Error(t)}return await r.json()}}class Er{constructor(t="one-payments:"){this.prefix=t}async get(t){return localStorage.getItem(this.prefix+t)}async set(t,e){localStorage.setItem(this.prefix+t,e)}async remove(t){localStorage.removeItem(this.prefix+t)}async clear(){Object.keys(localStorage).forEach(t=>{t.startsWith(this.prefix)&&localStorage.removeItem(t)})}}class _r{async sha256(t){const e="string"==typeof t?(new TextEncoder).encode(t):t,r=await crypto.subtle.digest("SHA-256",e);return this.bufferToHex(r)}async hmacSHA256(t,e){const r=new TextEncoder,i=r.encode(t),n=r.encode(e),o=await crypto.subtle.importKey("raw",i,{name:"HMAC",hash:"SHA-256"},!1,["sign"]),s=await crypto.subtle.sign("HMAC",o,n);return this.bufferToHex(s)}uuid(){return crypto.randomUUID()}randomBytes(t){return crypto.getRandomValues(new Uint8Array(t))}bufferToHex(t){return Array.from(new Uint8Array(t)).map(t=>t.toString(16).padStart(2,"0")).join("")}}class Ir{now(){return Date.now()}async delay(t){return new Promise(e=>{setTimeout(e,t)})}}function Mr(){return{http:new $r,storage:new Er,crypto:new _r,timer:new Ir}}const Nr="one-payment",Tr="1.5.6";!function(){if("undefined"==typeof customElements)return console.error("[OnePayments] customElements API is not available in this environment. This bundle is designed for browser environments only."),!1;if(customElements.get(Nr))return console.info(`[OnePayments] <${Nr}> is already registered. Skipping re-registration.`),!0;try{return customElements.define(Nr,Cr),console.info(`[OnePayments] Registered <${Nr}> custom element (v${Tr})`),!0}catch(t){return console.error(`[OnePayments] Failed to register <${Nr}>:`,t),!1}}();const Dr={createWebAdapters:Mr,TAG_NAME:Nr,VERSION:Tr,isRegistered:()=>"undefined"!=typeof customElements&&void 0!==customElements.get(Nr),whenDefined:()=>"undefined"==typeof customElements?Promise.reject(new Error("customElements API is not available")):customElements.whenDefined(Nr)};return"undefined"!=typeof window&&(window.OnePayments?console.warn("[OnePayments] window.OnePayments already exists. The bundle may have been loaded multiple times. Using existing reference."):window.OnePayments=Dr),t.OnePayments=Dr,t.TAG_NAME=Nr,t.VERSION=Tr,t.createWebAdapters=Mr,t.default=Dr,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),t}({});
|
|
1563
1924
|
//# sourceMappingURL=one-payment.browser.iife.js.map
|