xendit-components-web 0.0.7 → 0.0.9

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.
@@ -1,7 +1,7 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Xendit={})}(this,function(e){"use strict";var t,n,r,a,o,i,d,s,l,c,u,h,p,f={},m=[],$=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,_=Array.isArray;function g(e,t){for(var n in t)e[n]=t[n];return e}function y(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(e,n,r){var a,o,i,d={};for(i in n)"key"==i?a=n[i]:"ref"==i?o=n[i]:d[i]=n[i];if(arguments.length>2&&(d.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===d[i]&&(d[i]=e.defaultProps[i]);return v(e,d,a,o,null)}function v(e,t,a,o,i){var d={type:e,props:t,key:a,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++r:i,__i:-1,__u:0};return null==i&&null!=n.vnode&&n.vnode(d),d}function x(e){return e.children}function k(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?w(e):null}function C(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return C(e)}}function E(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!P.__r++||o!=n.debounceRendering)&&((o=n.debounceRendering)||i)(P)}function P(){for(var e,t,r,o,i,s,l,c=1;a.length;)a.length>c&&a.sort(d),e=a.shift(),c=a.length,e.__d&&(r=void 0,o=void 0,i=(o=(t=e).__v).__e,s=[],l=[],t.__P&&((r=g({},o)).__v=o.__v+1,n.vnode&&n.vnode(r),L(t.__P,r,o,t.__n,t.__P.namespaceURI,32&o.__u?[i]:null,s,null==i?w(o):i,!!(32&o.__u),l),r.__v=o.__v,r.__.__k[r.__i]=r,D(s,r,l),o.__e=o.__=null,r.__e!=i&&C(r)));P.__r=0}function S(e,t,n,r,a,o,i,d,s,l,c){var u,h,p,$,g,y,b,k=r&&r.__k||m,C=t.length;for(s=function(e,t,n,r,a){var o,i,d,s,l,c=n.length,u=c,h=0;for(e.__k=new Array(a),o=0;o<a;o++)null!=(i=t[o])&&"boolean"!=typeof i&&"function"!=typeof i?(s=o+h,(i=e.__k[o]="string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?v(null,i,null,null,null):_(i)?v(x,{children:i},null,null,null):null==i.constructor&&i.__b>0?v(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,d=null,-1!=(l=i.__i=A(i,n,s,u))&&(u--,(d=n[l])&&(d.__u|=2)),null==d||null==d.__v?(-1==l&&(a>c?h--:a<c&&h++),"function"!=typeof i.type&&(i.__u|=4)):l!=s&&(l==s-1?h--:l==s+1?h++:(l>s?h--:h++,i.__u|=4))):e.__k[o]=null;if(u)for(o=0;o<c;o++)null!=(d=n[o])&&!(2&d.__u)&&(d.__e==r&&(r=w(d)),j(d,d));return r}(n,t,k,s,C),u=0;u<C;u++)null!=(p=n.__k[u])&&(h=-1==p.__i?f:k[p.__i]||f,p.__i=u,y=L(e,p,h,a,o,i,d,s,l,c),$=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&B(h.ref,null,p),c.push(p.ref,p.__c||$,p)),null==g&&null!=$&&(g=$),(b=!!(4&p.__u))||h.__k===p.__k?s=N(p,s,e,b):"function"==typeof p.type&&void 0!==y?s=y:$&&(s=$.nextSibling),p.__u&=-7);return n.__e=g,s}function N(e,t,n,r){var a,o;if("function"==typeof e.type){for(a=e.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=e,t=N(a[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=w(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function T(e,t){return t=t||[],null==e||"boolean"==typeof e||(_(e)?e.some(function(e){T(e,t)}):t.push(e)),t}function A(e,t,n,r){var a,o,i,d=e.key,s=e.type,l=t[n],c=null!=l&&!(2&l.__u);if(null===l&&null==e.key||c&&d==l.key&&s==l.type)return n;if(r>(c?1:0))for(a=n-1,o=n+1;a>=0||o<t.length;)if(null!=(l=t[i=a>=0?a--:o++])&&!(2&l.__u)&&d==l.key&&s==l.type)return i;return-1}function O(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||$.test(t)?n:n+"px"}function I(e,t,n,r,a){var o,i;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||O(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||O(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(s,"$1")),i=t.toLowerCase(),t=i in e||"onFocusOut"==t||"onFocusIn"==t?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=l,e.addEventListener(t,o?u:c,o)):e.removeEventListener(t,o?u:c,o);else{if("http://www.w3.org/2000/svg"==a)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function R(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=l++;else if(t.t<r.u)return;return r(n.event?n.event(t):t)}}}function L(e,t,r,a,o,i,d,s,l,c){var u,h,p,f,m,$,b,v,w,C,E,P,N,T,A,O,I,R=t.type;if(null!=t.constructor)return null;128&r.__u&&(l=!!(32&r.__u),i=[s=t.__e=r.__e]),(u=n.__b)&&u(t);e:if("function"==typeof R)try{if(v=t.props,w="prototype"in R&&R.prototype.render,C=(u=R.contextType)&&a[u.__c],E=u?C?C.props.value:u.__:a,r.__c?b=(h=t.__c=r.__c).__=h.__E:(w?t.__c=h=new R(v,E):(t.__c=h=new k(v,E),h.constructor=R,h.render=q),C&&C.sub(h),h.props=v,h.state||(h.state={}),h.context=E,h.__n=a,p=h.__d=!0,h.__h=[],h._sb=[]),w&&null==h.__s&&(h.__s=h.state),w&&null!=R.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=g({},h.__s)),g(h.__s,R.getDerivedStateFromProps(v,h.__s))),f=h.props,m=h.state,h.__v=t,p)w&&null==R.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),w&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(w&&null==R.getDerivedStateFromProps&&v!==f&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(v,E),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(v,h.__s,E)||t.__v==r.__v){for(t.__v!=r.__v&&(h.props=v,h.state=h.__s,h.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&d.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(v,h.__s,E),w&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(f,m,$)})}if(h.context=E,h.props=v,h.__P=e,h.__e=!1,N=n.__r,T=0,w){for(h.state=h.__s,h.__d=!1,N&&N(t),u=h.render(h.props,h.state,h.context),A=0;A<h._sb.length;A++)h.__h.push(h._sb[A]);h._sb=[]}else do{h.__d=!1,N&&N(t),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++T<25);h.state=h.__s,null!=h.getChildContext&&(a=g(g({},a),h.getChildContext())),w&&!p&&null!=h.getSnapshotBeforeUpdate&&($=h.getSnapshotBeforeUpdate(f,m)),O=u,null!=u&&u.type===x&&null==u.key&&(O=U(u.props.children)),s=S(e,_(O)?O:[O],t,r,a,o,i,d,s,l,c),h.base=t.__e,t.__u&=-161,h.__h.length&&d.push(h),b&&(h.__E=h.__=null)}catch(e){if(t.__v=null,l||null!=i)if(e.then){for(t.__u|=l?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;i[i.indexOf(s)]=null,t.__e=s}else{for(I=i.length;I--;)y(i[I]);M(t)}else t.__e=r.__e,t.__k=r.__k,e.then||M(t);n.__e(e,t,r)}else null==i&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=F(r.__e,t,r,a,o,i,d,l,c);return(u=n.diffed)&&u(t),128&t.__u?void 0:s}function M(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(M)}function D(e,t,r){for(var a=0;a<r.length;a++)B(r[a],r[++a],r[++a]);n.__c&&n.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){n.__e(e,t.__v)}})}function U(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:_(e)?e.map(U):g({},e)}function F(e,r,a,o,i,d,s,l,c){var u,h,p,m,$,g,b,v=a.props,x=r.props,k=r.type;if("svg"==k?i="http://www.w3.org/2000/svg":"math"==k?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=d)for(u=0;u<d.length;u++)if(($=d[u])&&"setAttribute"in $==!!k&&(k?$.localName==k:3==$.nodeType)){e=$,d[u]=null;break}if(null==e){if(null==k)return document.createTextNode(x);e=document.createElementNS(i,k,x.is&&x),l&&(n.__m&&n.__m(r,d),l=!1),d=null}if(null==k)v===x||l&&e.data==x||(e.data=x);else{if(d=d&&t.call(e.childNodes),v=a.props||f,!l&&null!=d)for(v={},u=0;u<e.attributes.length;u++)v[($=e.attributes[u]).name]=$.value;for(u in v)if($=v[u],"children"==u);else if("dangerouslySetInnerHTML"==u)p=$;else if(!(u in x)){if("value"==u&&"defaultValue"in x||"checked"==u&&"defaultChecked"in x)continue;I(e,u,null,$,i)}for(u in x)$=x[u],"children"==u?m=$:"dangerouslySetInnerHTML"==u?h=$:"value"==u?g=$:"checked"==u?b=$:l&&"function"!=typeof $||v[u]===$||I(e,u,$,v[u],i);if(h)l||p&&(h.__html==p.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),r.__k=[];else if(p&&(e.innerHTML=""),S("template"==r.type?e.content:e,_(m)?m:[m],r,a,o,"foreignObject"==k?"http://www.w3.org/1999/xhtml":i,d,s,d?d[0]:a.__k&&w(a,0),l,c),null!=d)for(u=d.length;u--;)y(d[u]);l||(u="value","progress"==k&&null==g?e.removeAttribute("value"):null!=g&&(g!==e[u]||"progress"==k&&!g||"option"==k&&g!=v[u])&&I(e,u,g,v[u],i),u="checked",null!=b&&b!=e[u]&&I(e,u,b,v[u],i))}return e}function B(e,t,r){try{if("function"==typeof e){var a="function"==typeof e.__u;a&&e.__u(),a&&null==t||(e.__u=e(t))}else e.current=t}catch(e){n.__e(e,r)}}function j(e,t,r){var a,o;if(n.unmount&&n.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||B(a,null,t)),null!=(a=e.__c)){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(e){n.__e(e,t)}a.base=a.__P=null}if(a=e.__k)for(o=0;o<a.length;o++)a[o]&&j(a[o],t,r||"function"!=typeof e.type);r||y(e.__e),e.__c=e.__=e.__e=void 0}function q(e,t,n){return this.constructor(e,n)}function K(e,r,a){var o,i,d;r==document&&(r=document.documentElement),n.__&&n.__(e,r),o=!1?null:r.__k,i=[],d=[],L(r,e=r.__k=b(x,null,[e]),o||f,f,r.namespaceURI,o?null:r.firstChild?t.call(r.childNodes):null,i,o?o.__e:r.firstChild,false,d),D(i,e,d)}function V(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,E(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+h++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}t=m.slice,n={__e:function(e,t,n,r){for(var a,o,i;t=t.__;)if((a=t.__c)&&!a.__)try{if((o=a.constructor)&&null!=o.getDerivedStateFromError&&(a.setState(o.getDerivedStateFromError(e)),i=a.__d),null!=a.componentDidCatch&&(a.componentDidCatch(e,r||{}),i=a.__d),i)return a.__E=a}catch(t){e=t}throw e}},r=0,k.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=g({},this.state),"function"==typeof e&&(e=e(g({},n),this.props)),e&&g(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),E(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},k.prototype.render=x,a=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=function(e,t){return e.__v.__b-t.__v.__b},P.__r=0,s=/(PointerCapture)$|Capture$/i,l=0,c=R(!1),u=R(!0),h=0,null!=(p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0)&&p.__PREACT_DEVTOOLS__&&p.__PREACT_DEVTOOLS__.attachPreact("10.27.2",n,{Fragment:x,Component:k});var G={};function H(e){return e.type===x?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var W=[],X=[];function Y(){return W.length>0?W[W.length-1]:null}var z=!0;function Z(e){return"function"==typeof e.type&&e.type!=x}function J(e){for(var t=[e],n=e;null!=n.__o;)t.push(n.__o),n=n.__o;return t.reduce(function(e,t){e+=" in "+H(t);var n=t.__source;return n?e+=" (at "+n.fileName+":"+n.lineNumber+")":z&&console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons."),z=!1,e+"\n"},"")}var Q="function"==typeof WeakMap;function ee(e){var t=[];return e.__k?(e.__k.forEach(function(e){e&&"function"==typeof e.type?t.push.apply(t,ee(e)):e&&"string"==typeof e.type&&t.push(e.type)}),t):t}function te(e){return e?"function"==typeof e.type?null==e.__?null!=e.__e&&null!=e.__e.parentNode?e.__e.parentNode.localName:"":te(e.__):e.type:""}var ne=k.prototype.setState;function re(e){return"table"===e||"tfoot"===e||"tbody"===e||"thead"===e||"td"===e||"tr"===e||"th"===e}k.prototype.setState=function(e,t){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+J(Y())),ne.call(this,e,t)};var ae=/^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/,oe=k.prototype.forceUpdate;function ie(e){var t=e.props,n=H(e),r="";for(var a in t)if(t.hasOwnProperty(a)&&"children"!==a){var o=t[a];"function"==typeof o&&(o="function "+(o.displayName||o.name)+"() {}"),o=Object(o)!==o||o.toString?o+"":Object.prototype.toString.call(o),r+=" "+a+"="+JSON.stringify(o)}var i=t.children;return"<"+n+r+(i&&i.length?">..</"+n+">":" />")}k.prototype.forceUpdate=function(e){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+J(Y())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+J(this.__v)),oe.call(this,e)},n.__m=function(e,t){var n=e.type,r=t.map(function(e){return e&&e.localName}).filter(Boolean);console.error('Expected a DOM node of type "'+n+'" but found "'+r.join(", ")+"\" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n"+J(e))},function(){!function(){var e=n.__b,t=n.diffed,r=n.__,a=n.vnode,o=n.__r;n.diffed=function(e){Z(e)&&X.pop(),W.pop(),t&&t(e)},n.__b=function(t){Z(t)&&W.push(t),e&&e(t)},n.__=function(e,t){X=[],r&&r(e,t)},n.vnode=function(e){e.__o=X.length>0?X[X.length-1]:null,a&&a(e)},n.__r=function(e){Z(e)&&X.push(e),o&&o(e)}}();var e=!1,t=n.__b,r=n.diffed,a=n.vnode,o=n.__r,i=n.__e,d=n.__,s=n.__h,l=Q?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,c=[];n.__e=function(e,t,n,r){if(t&&t.__c&&"function"==typeof e.then){var a=e;e=new Error("Missing Suspense. The throwing component was: "+H(t));for(var o=t;o;o=o.__)if(o.__c&&o.__c.__c){e=a;break}if(e instanceof Error)throw e}try{(r=r||{}).componentStack=J(t),i(e,t,n,r),"function"!=typeof e.then&&setTimeout(function(){throw e})}catch(e){throw e}},n.__=function(e,t){if(!t)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var n;switch(t.nodeType){case 1:case 11:case 9:n=!0;break;default:n=!1}if(!n){var r=H(e);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+t+" instead: render(<"+r+" />, "+t+");")}d&&d(e,t)},n.__b=function(n){var r=n.type;if(e=!0,void 0===r)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+ie(n)+"\n\n"+J(n));if(null!=r&&"object"==typeof r){if(void 0!==r.__k&&void 0!==r.__e)throw new Error("Invalid type passed to createElement(): "+r+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+H(n)+" = "+ie(r)+";\n let vnode = <My"+H(n)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+J(n));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if(void 0!==n.ref&&"function"!=typeof n.ref&&"object"!=typeof n.ref&&!("$$typeof"in n))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof n.ref+"] instead\n"+ie(n)+"\n\n"+J(n));if("string"==typeof n.type)for(var a in n.props)if("o"===a[0]&&"n"===a[1]&&"function"!=typeof n.props[a]&&null!=n.props[a])throw new Error("Component's \""+a+'" property should be a function, but got ['+typeof n.props[a]+"] instead\n"+ie(n)+"\n\n"+J(n));if("function"==typeof n.type&&n.type.propTypes){if("Lazy"===n.type.displayName&&l&&!l.lazyPropTypes.has(n.type)){var o="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var i=n.type();l.lazyPropTypes.set(n.type,!0),console.warn(o+"Component wrapped in lazy() is "+H(i))}catch(e){console.warn(o+"We will log the wrapped component's name once it is loaded.")}}var d=n.props;n.type.__f&&delete(d=function(e,t){for(var n in t)e[n]=t[n];return e}({},d)).ref,function(e,t,n,r,a){Object.keys(e).forEach(function(n){var o;try{o=e[n](t,n,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){o=e}o&&!(o.message in G)&&(G[o.message]=!0,console.error("Failed prop type: "+o.message+(a&&"\n"+a()||"")))})}(n.type.propTypes,d,0,H(n),function(){return J(n)})}t&&t(n)};var u,h=0;n.__r=function(t){o&&o(t),e=!0;var n=t.__c;if(n===u?h++:h=1,h>=25)throw new Error("Too many re-renders. This is limited to prevent an infinite loop which may lock up your browser. The component causing this is: "+H(t));u=n},n.__h=function(t,n,r){if(!t||!e)throw new Error("Hook can only be invoked from render methods.");s&&s(t,n,r)};var p=function(e,t){return{get:function(){var n="get"+e+t;c&&c.indexOf(n)<0&&(c.push(n),console.warn("getting vnode."+e+" is deprecated, "+t))},set:function(){var n="set"+e+t;c&&c.indexOf(n)<0&&(c.push(n),console.warn("setting vnode."+e+" is not allowed, "+t))}}},f={nodeName:p("nodeName","use vnode.type"),attributes:p("attributes","use vnode.props"),children:p("children","use vnode.props.children")},m=Object.create({},f);n.vnode=function(e){var t=e.props;if(null!==e.type&&null!=t&&("__source"in t||"__self"in t)){var n=e.props={};for(var r in t){var o=t[r];"__source"===r?e.__source=o:"__self"===r?e.__self=o:n[r]=o}}e.__proto__=m,a&&a(e)},n.diffed=function(t){var n,a=t.type,o=t.__;if(t.__k&&t.__k.forEach(function(e){if("object"==typeof e&&e&&void 0===e.type){var n=Object.keys(e).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+n+"}.\n\n"+J(t))}}),t.__c===u&&(h=0),"string"==typeof a&&(re(a)||"p"===a||"a"===a||"button"===a)){var i=te(o);if(""!==i&&re(a))"table"===a&&"td"!==i&&re(i)?console.error("Improper nesting of table. Your <table> should not have a table-node parent."+ie(t)+"\n\n"+J(t)):"thead"!==a&&"tfoot"!==a&&"tbody"!==a||"table"===i?"tr"===a&&"thead"!==i&&"tfoot"!==i&&"tbody"!==i?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent."+ie(t)+"\n\n"+J(t)):"td"===a&&"tr"!==i?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+ie(t)+"\n\n"+J(t)):"th"===a&&"tr"!==i&&console.error("Improper nesting of table. Your <th> should have a <tr>."+ie(t)+"\n\n"+J(t)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+ie(t)+"\n\n"+J(t));else if("p"===a){var d=ee(t).filter(function(e){return ae.test(e)});d.length&&console.error("Improper nesting of paragraph. Your <p> should not have "+d.join(", ")+" as child-elements."+ie(t)+"\n\n"+J(t))}else"a"!==a&&"button"!==a||-1!==ee(t).indexOf(a)&&console.error("Improper nesting of interactive content. Your <"+a+"> should not have other "+("a"===a?"anchor":"button")+" tags as child-elements."+ie(t)+"\n\n"+J(t))}if(e=!1,r&&r(t),null!=t.__k)for(var s=[],l=0;l<t.__k.length;l++){var c=t.__k[l];if(c&&null!=c.key){var p=c.key;if(-1!==s.indexOf(p)){console.error('Following component has two or more children with the same key attribute: "'+p+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+ie(t)+"\n\n"+J(t));break}s.push(p)}}if(null!=t.__c&&null!=t.__c.__H){var f=t.__c.__H.__;if(f)for(var m=0;m<f.length;m+=1){var $=f[m];if($.__H)for(var _=0;_<$.__H.length;_++)if((n=$.__H[_])!=n){var g=H(t);console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index "+m+" in component "+g+" was called with NaN.")}}}}}();var de,se,le,ce,ue=0,he=[],pe=n,fe=pe.__b,me=pe.__r,$e=pe.diffed,_e=pe.__c,ge=pe.unmount,ye=pe.__;function be(e,t){pe.__h&&pe.__h(se,e,ue||t),ue=0;var n=se.__H||(se.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ve(e){return ue=1,function(e,t,n){var r=be(de++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Re(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=se,!se.__f)){var a=function(e,t,n){if(!r.__c.__H)return!0;var a=r.__c.__H.__.filter(function(e){return!!e.__c});if(a.every(function(e){return!e.__N}))return!o||o.call(this,e,t,n);var i=r.__c.props!==e;return a.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),o&&o.call(this,e,t,n)||i};se.__f=!0;var o=se.shouldComponentUpdate,i=se.componentWillUpdate;se.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,a(e,t,n),o=r}i&&i.call(this,e,t,n)},se.shouldComponentUpdate=a}return r.__N||r.__}(Re,e)}function xe(e,t){var n=be(de++,3);!pe.__s&&Ie(n.__H,t)&&(n.__=e,n.u=t,se.__H.__h.push(n))}function ke(e,t){var n=be(de++,4);!pe.__s&&Ie(n.__H,t)&&(n.__=e,n.u=t,se.__h.push(n))}function we(e){return ue=5,Ce(function(){return{current:e}},[])}function Ce(e,t){var n=be(de++,7);return Ie(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ee(e,t){return ue=8,Ce(function(){return e},t)}function Pe(e){var t=se.context[e.__c],n=be(de++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(se)),t.props.value):e.__}function Se(){for(var e;e=he.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ae),e.__H.__h.forEach(Oe),e.__H.__h=[]}catch(t){e.__H.__h=[],pe.__e(t,e.__v)}}pe.__b=function(e){se=null,fe&&fe(e)},pe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ye&&ye(e,t)},pe.__r=function(e){me&&me(e),de=0;var t=(se=e.__c).__H;t&&(le===se?(t.__h=[],se.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(Ae),t.__h.forEach(Oe),t.__h=[],de=0)),le=se},pe.diffed=function(e){$e&&$e(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==he.push(t)&&ce===pe.requestAnimationFrame||((ce=pe.requestAnimationFrame)||Te)(Se)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),le=se=null},pe.__c=function(e,t){t.some(function(e){try{e.__h.forEach(Ae),e.__h=e.__h.filter(function(e){return!e.__||Oe(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],pe.__e(n,e.__v)}}),_e&&_e(e,t)},pe.unmount=function(e){ge&&ge(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{Ae(e)}catch(e){t=e}}),n.__H=void 0,t&&pe.__e(t,n.__v))};var Ne="function"==typeof requestAnimationFrame;function Te(e){var t,n=function(){clearTimeout(r),Ne&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ne&&(t=requestAnimationFrame(n))}function Ae(e){var t=se,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),se=t}function Oe(e){var t=se;e.__c=e.__(),se=t}function Ie(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Re(e,t){return"function"==typeof t?t(e):t}function Le(e,t){for(var n in t)e[n]=t[n];return e}function Me(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function De(e,t){this.props=e,this.context=t}(De.prototype=new k).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return Me(this.props,e)||Me(this.state,t)};var Ue=n.__b;n.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ue&&Ue(e)};var Fe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Be=n.__e;n.__e=function(e,t,n,r){if(e.then)for(var a,o=t;o=o.__;)if((a=o.__c)&&a.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),a.__c(e,t);Be(e,t,n,r)};var je=n.unmount;function qe(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=Le({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return qe(e,t,n)})),e}function Ke(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Ke(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Ve(){this.__u=0,this.o=null,this.__b=null}function Ge(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function He(){this.i=null,this.l=null}n.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),je&&je(e)},(Ve.prototype=new k).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var a=Ge(r.__v),o=!1,i=function(){o||(o=!0,n.__R=null,a?a(d):d())};n.__R=i;var d=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Ke(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},Ve.prototype.componentWillUnmount=function(){this.o=[]},Ve.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=qe(this.__b,n,r.__O=r.__P)}this.__b=null}var a=t.__a&&b(x,null,e.fallback);return a&&(a.__u&=-33),[b(x,null,t.__a?null:e.children),a]};var We=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(He.prototype=new k).__a=function(e){var t=this,n=Ge(t.__v),r=t.l.get(e);return r[0]++,function(a){var o=function(){t.props.revealOrder?(r.push(a),We(t,e,r)):a()};n?n(o):o()}},He.prototype.render=function(e){this.i=null,this.l=new Map;var t=T(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},He.prototype.componentDidUpdate=He.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){We(e,n,t)})};var Xe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ye=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ze=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ze=/[A-Z0-9]/g,Je="undefined"!=typeof document,Qe=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};k.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(k.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var et=n.event;function tt(){}function nt(){return this.cancelBubble}function rt(){return this.defaultPrevented}n.event=function(e){return et&&(e=et(e)),e.persist=tt,e.isPropagationStopped=nt,e.isDefaultPrevented=rt,e.nativeEvent=e};var at={enumerable:!1,configurable:!0,get:function(){return this.class}},ot=n.vnode;n.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},a=-1===n.indexOf("-");for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||Je&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var d=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"translate"===d&&"no"===i?i=!1:"o"===d[0]&&"n"===d[1]?"ondoubleclick"===d?o="ondblclick":"onchange"!==d||"input"!==n&&"textarea"!==n||Qe(t.type)?"onfocus"===d?o="onfocusin":"onblur"===d?o="onfocusout":ze.test(o)&&(o=d):d=o="oninput":a&&Ye.test(o)?o=o.replace(Ze,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===d&&r[o=d]&&(o="oninputCapture"),r[o]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=T(t.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),"select"==n&&null!=r.defaultValue&&(r.value=T(t.children).forEach(function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",at)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Xe,ot&&ot(e)};var it=n.__r;n.__r=function(e){it&&it(e),e.__c};var dt=n.diffed;n.diffed=function(e){dt&&dt(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var st=0;function lt(e,t,r,a,o,i){t||(t={});var d,s,l=t;if("ref"in l)for(s in l={},t)"ref"==s?d=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:d,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--st,__i:-1,__u:0,__source:o,__self:i};if("function"==typeof e&&(d=e.defaultProps))for(s in d)void 0===l[s]&&(l[s]=d[s]);return n.vnode&&n.vnode(c),c}const ct=e=>{const{name:t,size:n,direction:r}=e;let a;switch(r){case"left":a="rotate(0 12 12)";break;case"right":a="rotate(180 12 12)";break;case"up":a="rotate(90 12 12)";break;case"down":a="rotate(-90 12 12)"}return lt("svg",{className:`xendit-icon ${e.className??""}`,width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"none",children:lt("g",{transform:a,children:ht.find(e=>e.name===t)?.node??null})})};function ut(e,t,n){return{name:e,node:lt("g",{id:`xendit-icon-${e}`,transform:`scale(${1/n} ${1/n})`,children:t})}}const ht=[ut("chevron",lt("path",{d:"M15 19.5L7.5 12L15 4.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),1),ut("check",lt("path",{d:"M13.5 4.5L6.5 11.5L3 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),16/24),ut("x",lt(x,{children:[lt("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),lt("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),1),ut("card",lt("path",{fill:"currentColor",d:"M17.5 3.75H2.5C2.16848 3.75 1.85054 3.8817 1.61612 4.11612C1.3817 4.35054 1.25 4.66848 1.25 5V15C1.25 15.3315 1.3817 15.6495 1.61612 15.8839C1.85054 16.1183 2.16848 16.25 2.5 16.25H17.5C17.8315 16.25 18.1495 16.1183 18.3839 15.8839C18.6183 15.6495 18.75 15.3315 18.75 15V5C18.75 4.66848 18.6183 4.35054 18.3839 4.11612C18.1495 3.8817 17.8315 3.75 17.5 3.75ZM10.625 13.75H9.375C9.20924 13.75 9.05027 13.6842 8.93306 13.5669C8.81585 13.4497 8.75 13.2908 8.75 13.125C8.75 12.9592 8.81585 12.8003 8.93306 12.6831C9.05027 12.5658 9.20924 12.5 9.375 12.5H10.625C10.7908 12.5 10.9497 12.5658 11.0669 12.6831C11.1842 12.8003 11.25 12.9592 11.25 13.125C11.25 13.2908 11.1842 13.4497 11.0669 13.5669C10.9497 13.6842 10.7908 13.75 10.625 13.75ZM15.625 13.75H13.125C12.9592 13.75 12.8003 13.6842 12.6831 13.5669C12.5658 13.4497 12.5 13.2908 12.5 13.125C12.5 12.9592 12.5658 12.8003 12.6831 12.6831C12.8003 12.5658 12.9592 12.5 13.125 12.5H15.625C15.7908 12.5 15.9497 12.5658 16.0669 12.6831C16.1842 12.8003 16.25 12.9592 16.25 13.125C16.25 13.2908 16.1842 13.4497 16.0669 13.5669C15.9497 13.6842 15.7908 13.75 15.625 13.75ZM2.5 6.875V5H17.5V6.875H2.5Z"}),20/24),ut("dummy",lt("path",{fill:"currentColor",d:"M17.5 11.875V15C17.5 15.3315 17.3683 15.6495 17.1339 15.8839C16.8995 16.1183 16.5815 16.25 16.25 16.25H3.75C3.41848 16.25 3.10054 16.1183 2.86612 15.8839C2.6317 15.6495 2.5 15.3315 2.5 15V11.875C2.5 11.5435 2.6317 11.2255 2.86612 10.9911C3.10054 10.7567 3.41848 10.625 3.75 10.625H16.25C16.5815 10.625 16.8995 10.7567 17.1339 10.9911C17.3683 11.2255 17.5 11.5435 17.5 11.875ZM16.25 3.75H3.75C3.41848 3.75 3.10054 3.8817 2.86612 4.11612C2.6317 4.35054 2.5 4.66848 2.5 5V8.125C2.5 8.45652 2.6317 8.77446 2.86612 9.00888C3.10054 9.2433 3.41848 9.375 3.75 9.375H16.25C16.5815 9.375 16.8995 9.2433 17.1339 9.00888C17.3683 8.77446 17.5 8.45652 17.5 8.125V5C17.5 4.66848 17.3683 4.35054 17.1339 4.11612C16.8995 3.8817 16.5815 3.75 16.25 3.75Z"}),20/24)];const pt=Symbol("xendit-internal"),ft=e=>lt("div",{class:"xendit-accordion",children:e.children});function mt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $t,_t={exports:{}};
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Xendit={})}(this,function(e){"use strict";var t,n,a,r,i,o,d,s,l,c,u,h,p,f={},m=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$=Array.isArray;function g(e,t){for(var n in t)e[n]=t[n];return e}function y(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(e,n,a){var r,i,o,d={};for(o in n)"key"==o?r=n[o]:"ref"==o?i=n[o]:d[o]=n[o];if(arguments.length>2&&(d.children=arguments.length>3?t.call(arguments,2):a),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===d[o]&&(d[o]=e.defaultProps[o]);return v(e,d,r,i,null)}function v(e,t,r,i,o){var d={type:e,props:t,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++a:o,__i:-1,__u:0};return null==o&&null!=n.vnode&&n.vnode(d),d}function x(e){return e.children}function w(e,t){this.props=e,this.context=t}function k(e,t){if(null==t)return e.__?k(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?k(e):null}function C(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return C(e)}}function E(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!S.__r++||i!=n.debounceRendering)&&((i=n.debounceRendering)||o)(S)}function S(){for(var e,t,a,i,o,s,l,c=1;r.length;)r.length>c&&r.sort(d),e=r.shift(),c=r.length,e.__d&&(a=void 0,i=void 0,o=(i=(t=e).__v).__e,s=[],l=[],t.__P&&((a=g({},i)).__v=i.__v+1,n.vnode&&n.vnode(a),L(t.__P,a,i,t.__n,t.__P.namespaceURI,32&i.__u?[o]:null,s,null==o?k(i):o,!!(32&i.__u),l),a.__v=i.__v,a.__.__k[a.__i]=a,D(s,a,l),i.__e=i.__=null,a.__e!=o&&C(a)));S.__r=0}function P(e,t,n,a,r,i,o,d,s,l,c){var u,h,p,_,g,y,b,w=a&&a.__k||m,C=t.length;for(s=function(e,t,n,a,r){var i,o,d,s,l,c=n.length,u=c,h=0;for(e.__k=new Array(r),i=0;i<r;i++)null!=(o=t[i])&&"boolean"!=typeof o&&"function"!=typeof o?(s=i+h,(o=e.__k[i]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?v(null,o,null,null,null):$(o)?v(x,{children:o},null,null,null):null==o.constructor&&o.__b>0?v(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,d=null,-1!=(l=o.__i=R(o,n,s,u))&&(u--,(d=n[l])&&(d.__u|=2)),null==d||null==d.__v?(-1==l&&(r>c?h--:r<c&&h++),"function"!=typeof o.type&&(o.__u|=4)):l!=s&&(l==s-1?h--:l==s+1?h++:(l>s?h--:h++,o.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<c;i++)null!=(d=n[i])&&!(2&d.__u)&&(d.__e==a&&(a=k(d)),j(d,d));return a}(n,t,w,s,C),u=0;u<C;u++)null!=(p=n.__k[u])&&(h=-1==p.__i?f:w[p.__i]||f,p.__i=u,y=L(e,p,h,r,i,o,d,s,l,c),_=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&B(h.ref,null,p),c.push(p.ref,p.__c||_,p)),null==g&&null!=_&&(g=_),(b=!!(4&p.__u))||h.__k===p.__k?s=N(p,s,e,b):"function"==typeof p.type&&void 0!==y?s=y:_&&(s=_.nextSibling),p.__u&=-7);return n.__e=g,s}function N(e,t,n,a){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=N(r[i],t,n,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=k(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function T(e,t){return t=t||[],null==e||"boolean"==typeof e||($(e)?e.some(function(e){T(e,t)}):t.push(e)),t}function R(e,t,n,a){var r,i,o,d=e.key,s=e.type,l=t[n],c=null!=l&&!(2&l.__u);if(null===l&&null==e.key||c&&d==l.key&&s==l.type)return n;if(a>(c?1:0))for(r=n-1,i=n+1;r>=0||i<t.length;)if(null!=(l=t[o=r>=0?r--:i++])&&!(2&l.__u)&&d==l.key&&s==l.type)return o;return-1}function A(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||_.test(t)?n:n+"px"}function O(e,t,n,a,r){var i,o;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof a&&(e.style.cssText=a=""),a)for(t in a)n&&t in n||A(e.style,t,"");if(n)for(t in n)a&&n[t]==a[t]||A(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(s,"$1")),o=t.toLowerCase(),t=o in e||"onFocusOut"==t||"onFocusIn"==t?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?a?n.u=a.u:(n.u=l,e.addEventListener(t,i?u:c,i)):e.removeEventListener(t,i?u:c,i);else{if("http://www.w3.org/2000/svg"==r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function I(e){return function(t){if(this.l){var a=this.l[t.type+e];if(null==t.t)t.t=l++;else if(t.t<a.u)return;return a(n.event?n.event(t):t)}}}function L(e,t,a,r,i,o,d,s,l,c){var u,h,p,f,m,_,b,v,k,C,E,S,N,T,R,A,O,I=t.type;if(null!=t.constructor)return null;128&a.__u&&(l=!!(32&a.__u),o=[s=t.__e=a.__e]),(u=n.__b)&&u(t);e:if("function"==typeof I)try{if(v=t.props,k="prototype"in I&&I.prototype.render,C=(u=I.contextType)&&r[u.__c],E=u?C?C.props.value:u.__:r,a.__c?b=(h=t.__c=a.__c).__=h.__E:(k?t.__c=h=new I(v,E):(t.__c=h=new w(v,E),h.constructor=I,h.render=q),C&&C.sub(h),h.props=v,h.state||(h.state={}),h.context=E,h.__n=r,p=h.__d=!0,h.__h=[],h._sb=[]),k&&null==h.__s&&(h.__s=h.state),k&&null!=I.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=g({},h.__s)),g(h.__s,I.getDerivedStateFromProps(v,h.__s))),f=h.props,m=h.state,h.__v=t,p)k&&null==I.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),k&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(k&&null==I.getDerivedStateFromProps&&v!==f&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(v,E),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(v,h.__s,E)||t.__v==a.__v){for(t.__v!=a.__v&&(h.props=v,h.state=h.__s,h.__d=!1),t.__e=a.__e,t.__k=a.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<h._sb.length;S++)h.__h.push(h._sb[S]);h._sb=[],h.__h.length&&d.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(v,h.__s,E),k&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(f,m,_)})}if(h.context=E,h.props=v,h.__P=e,h.__e=!1,N=n.__r,T=0,k){for(h.state=h.__s,h.__d=!1,N&&N(t),u=h.render(h.props,h.state,h.context),R=0;R<h._sb.length;R++)h.__h.push(h._sb[R]);h._sb=[]}else do{h.__d=!1,N&&N(t),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++T<25);h.state=h.__s,null!=h.getChildContext&&(r=g(g({},r),h.getChildContext())),k&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(f,m)),A=u,null!=u&&u.type===x&&null==u.key&&(A=U(u.props.children)),s=P(e,$(A)?A:[A],t,a,r,i,o,d,s,l,c),h.base=t.__e,t.__u&=-161,h.__h.length&&d.push(h),b&&(h.__E=h.__=null)}catch(e){if(t.__v=null,l||null!=o)if(e.then){for(t.__u|=l?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(O=o.length;O--;)y(o[O]);M(t)}else t.__e=a.__e,t.__k=a.__k,e.then||M(t);n.__e(e,t,a)}else null==o&&t.__v==a.__v?(t.__k=a.__k,t.__e=a.__e):s=t.__e=F(a.__e,t,a,r,i,o,d,l,c);return(u=n.diffed)&&u(t),128&t.__u?void 0:s}function M(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(M)}function D(e,t,a){for(var r=0;r<a.length;r++)B(a[r],a[++r],a[++r]);n.__c&&n.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){n.__e(e,t.__v)}})}function U(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:$(e)?e.map(U):g({},e)}function F(e,a,r,i,o,d,s,l,c){var u,h,p,m,_,g,b,v=r.props,x=a.props,w=a.type;if("svg"==w?o="http://www.w3.org/2000/svg":"math"==w?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=d)for(u=0;u<d.length;u++)if((_=d[u])&&"setAttribute"in _==!!w&&(w?_.localName==w:3==_.nodeType)){e=_,d[u]=null;break}if(null==e){if(null==w)return document.createTextNode(x);e=document.createElementNS(o,w,x.is&&x),l&&(n.__m&&n.__m(a,d),l=!1),d=null}if(null==w)v===x||l&&e.data==x||(e.data=x);else{if(d=d&&t.call(e.childNodes),v=r.props||f,!l&&null!=d)for(v={},u=0;u<e.attributes.length;u++)v[(_=e.attributes[u]).name]=_.value;for(u in v)if(_=v[u],"children"==u);else if("dangerouslySetInnerHTML"==u)p=_;else if(!(u in x)){if("value"==u&&"defaultValue"in x||"checked"==u&&"defaultChecked"in x)continue;O(e,u,null,_,o)}for(u in x)_=x[u],"children"==u?m=_:"dangerouslySetInnerHTML"==u?h=_:"value"==u?g=_:"checked"==u?b=_:l&&"function"!=typeof _||v[u]===_||O(e,u,_,v[u],o);if(h)l||p&&(h.__html==p.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),a.__k=[];else if(p&&(e.innerHTML=""),P("template"==a.type?e.content:e,$(m)?m:[m],a,r,i,"foreignObject"==w?"http://www.w3.org/1999/xhtml":o,d,s,d?d[0]:r.__k&&k(r,0),l,c),null!=d)for(u=d.length;u--;)y(d[u]);l||(u="value","progress"==w&&null==g?e.removeAttribute("value"):null!=g&&(g!==e[u]||"progress"==w&&!g||"option"==w&&g!=v[u])&&O(e,u,g,v[u],o),u="checked",null!=b&&b!=e[u]&&O(e,u,b,v[u],o))}return e}function B(e,t,a){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){n.__e(e,a)}}function j(e,t,a){var r,i;if(n.unmount&&n.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||B(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){n.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&j(r[i],t,a||"function"!=typeof e.type);a||y(e.__e),e.__c=e.__=e.__e=void 0}function q(e,t,n){return this.constructor(e,n)}function K(e,a,r){var i,o,d;a==document&&(a=document.documentElement),n.__&&n.__(e,a),i=!1?null:a.__k,o=[],d=[],L(a,e=a.__k=b(x,null,[e]),i||f,f,a.namespaceURI,i?null:a.firstChild?t.call(a.childNodes):null,o,i?i.__e:a.firstChild,false,d),D(o,e,d)}function V(e){function t(e){var n,a;return this.getChildContext||(n=new Set,(a={})[t.__c]=this,this.getChildContext=function(){return a},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,E(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+h++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}t=m.slice,n={__e:function(e,t,n,a){for(var r,i,o;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),o=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,a||{}),o=r.__d),o)return r.__E=r}catch(t){e=t}throw e}},a=0,w.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=g({},this.state),"function"==typeof e&&(e=e(g({},n),this.props)),e&&g(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),E(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},w.prototype.render=x,r=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=function(e,t){return e.__v.__b-t.__v.__b},S.__r=0,s=/(PointerCapture)$|Capture$/i,l=0,c=I(!1),u=I(!0),h=0,null!=(p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0)&&p.__PREACT_DEVTOOLS__&&p.__PREACT_DEVTOOLS__.attachPreact("10.27.2",n,{Fragment:x,Component:w});var G={};function H(e){return e.type===x?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var W=[],X=[];function Y(){return W.length>0?W[W.length-1]:null}var z=!0;function Z(e){return"function"==typeof e.type&&e.type!=x}function J(e){for(var t=[e],n=e;null!=n.__o;)t.push(n.__o),n=n.__o;return t.reduce(function(e,t){e+=" in "+H(t);var n=t.__source;return n?e+=" (at "+n.fileName+":"+n.lineNumber+")":z&&console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons."),z=!1,e+"\n"},"")}var Q="function"==typeof WeakMap;function ee(e){var t=[];return e.__k?(e.__k.forEach(function(e){e&&"function"==typeof e.type?t.push.apply(t,ee(e)):e&&"string"==typeof e.type&&t.push(e.type)}),t):t}function te(e){return e?"function"==typeof e.type?null==e.__?null!=e.__e&&null!=e.__e.parentNode?e.__e.parentNode.localName:"":te(e.__):e.type:""}var ne=w.prototype.setState;function ae(e){return"table"===e||"tfoot"===e||"tbody"===e||"thead"===e||"td"===e||"tr"===e||"th"===e}w.prototype.setState=function(e,t){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+J(Y())),ne.call(this,e,t)};var re=/^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/,ie=w.prototype.forceUpdate;function oe(e){var t=e.props,n=H(e),a="";for(var r in t)if(t.hasOwnProperty(r)&&"children"!==r){var i=t[r];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),a+=" "+r+"="+JSON.stringify(i)}var o=t.children;return"<"+n+a+(o&&o.length?">..</"+n+">":" />")}w.prototype.forceUpdate=function(e){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+J(Y())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+J(this.__v)),ie.call(this,e)},n.__m=function(e,t){var n=e.type,a=t.map(function(e){return e&&e.localName}).filter(Boolean);console.error('Expected a DOM node of type "'+n+'" but found "'+a.join(", ")+"\" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n"+J(e))},function(){!function(){var e=n.__b,t=n.diffed,a=n.__,r=n.vnode,i=n.__r;n.diffed=function(e){Z(e)&&X.pop(),W.pop(),t&&t(e)},n.__b=function(t){Z(t)&&W.push(t),e&&e(t)},n.__=function(e,t){X=[],a&&a(e,t)},n.vnode=function(e){e.__o=X.length>0?X[X.length-1]:null,r&&r(e)},n.__r=function(e){Z(e)&&X.push(e),i&&i(e)}}();var e=!1,t=n.__b,a=n.diffed,r=n.vnode,i=n.__r,o=n.__e,d=n.__,s=n.__h,l=Q?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,c=[];n.__e=function(e,t,n,a){if(t&&t.__c&&"function"==typeof e.then){var r=e;e=new Error("Missing Suspense. The throwing component was: "+H(t));for(var i=t;i;i=i.__)if(i.__c&&i.__c.__c){e=r;break}if(e instanceof Error)throw e}try{(a=a||{}).componentStack=J(t),o(e,t,n,a),"function"!=typeof e.then&&setTimeout(function(){throw e})}catch(e){throw e}},n.__=function(e,t){if(!t)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var n;switch(t.nodeType){case 1:case 11:case 9:n=!0;break;default:n=!1}if(!n){var a=H(e);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+t+" instead: render(<"+a+" />, "+t+");")}d&&d(e,t)},n.__b=function(n){var a=n.type;if(e=!0,void 0===a)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+oe(n)+"\n\n"+J(n));if(null!=a&&"object"==typeof a){if(void 0!==a.__k&&void 0!==a.__e)throw new Error("Invalid type passed to createElement(): "+a+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+H(n)+" = "+oe(a)+";\n let vnode = <My"+H(n)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+J(n));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(a)?"array":a))}if(void 0!==n.ref&&"function"!=typeof n.ref&&"object"!=typeof n.ref&&!("$$typeof"in n))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof n.ref+"] instead\n"+oe(n)+"\n\n"+J(n));if("string"==typeof n.type)for(var r in n.props)if("o"===r[0]&&"n"===r[1]&&"function"!=typeof n.props[r]&&null!=n.props[r])throw new Error("Component's \""+r+'" property should be a function, but got ['+typeof n.props[r]+"] instead\n"+oe(n)+"\n\n"+J(n));if("function"==typeof n.type&&n.type.propTypes){if("Lazy"===n.type.displayName&&l&&!l.lazyPropTypes.has(n.type)){var i="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var o=n.type();l.lazyPropTypes.set(n.type,!0),console.warn(i+"Component wrapped in lazy() is "+H(o))}catch(e){console.warn(i+"We will log the wrapped component's name once it is loaded.")}}var d=n.props;n.type.__f&&delete(d=function(e,t){for(var n in t)e[n]=t[n];return e}({},d)).ref,function(e,t,n,a,r){Object.keys(e).forEach(function(n){var i;try{i=e[n](t,n,a,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){i=e}i&&!(i.message in G)&&(G[i.message]=!0,console.error("Failed prop type: "+i.message+(r&&"\n"+r()||"")))})}(n.type.propTypes,d,0,H(n),function(){return J(n)})}t&&t(n)};var u,h=0;n.__r=function(t){i&&i(t),e=!0;var n=t.__c;if(n===u?h++:h=1,h>=25)throw new Error("Too many re-renders. This is limited to prevent an infinite loop which may lock up your browser. The component causing this is: "+H(t));u=n},n.__h=function(t,n,a){if(!t||!e)throw new Error("Hook can only be invoked from render methods.");s&&s(t,n,a)};var p=function(e,t){return{get:function(){var n="get"+e+t;c&&c.indexOf(n)<0&&(c.push(n),console.warn("getting vnode."+e+" is deprecated, "+t))},set:function(){var n="set"+e+t;c&&c.indexOf(n)<0&&(c.push(n),console.warn("setting vnode."+e+" is not allowed, "+t))}}},f={nodeName:p("nodeName","use vnode.type"),attributes:p("attributes","use vnode.props"),children:p("children","use vnode.props.children")},m=Object.create({},f);n.vnode=function(e){var t=e.props;if(null!==e.type&&null!=t&&("__source"in t||"__self"in t)){var n=e.props={};for(var a in t){var i=t[a];"__source"===a?e.__source=i:"__self"===a?e.__self=i:n[a]=i}}e.__proto__=m,r&&r(e)},n.diffed=function(t){var n,r=t.type,i=t.__;if(t.__k&&t.__k.forEach(function(e){if("object"==typeof e&&e&&void 0===e.type){var n=Object.keys(e).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+n+"}.\n\n"+J(t))}}),t.__c===u&&(h=0),"string"==typeof r&&(ae(r)||"p"===r||"a"===r||"button"===r)){var o=te(i);if(""!==o&&ae(r))"table"===r&&"td"!==o&&ae(o)?console.error("Improper nesting of table. Your <table> should not have a table-node parent."+oe(t)+"\n\n"+J(t)):"thead"!==r&&"tfoot"!==r&&"tbody"!==r||"table"===o?"tr"===r&&"thead"!==o&&"tfoot"!==o&&"tbody"!==o?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent."+oe(t)+"\n\n"+J(t)):"td"===r&&"tr"!==o?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+oe(t)+"\n\n"+J(t)):"th"===r&&"tr"!==o&&console.error("Improper nesting of table. Your <th> should have a <tr>."+oe(t)+"\n\n"+J(t)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+oe(t)+"\n\n"+J(t));else if("p"===r){var d=ee(t).filter(function(e){return re.test(e)});d.length&&console.error("Improper nesting of paragraph. Your <p> should not have "+d.join(", ")+" as child-elements."+oe(t)+"\n\n"+J(t))}else"a"!==r&&"button"!==r||-1!==ee(t).indexOf(r)&&console.error("Improper nesting of interactive content. Your <"+r+"> should not have other "+("a"===r?"anchor":"button")+" tags as child-elements."+oe(t)+"\n\n"+J(t))}if(e=!1,a&&a(t),null!=t.__k)for(var s=[],l=0;l<t.__k.length;l++){var c=t.__k[l];if(c&&null!=c.key){var p=c.key;if(-1!==s.indexOf(p)){console.error('Following component has two or more children with the same key attribute: "'+p+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+oe(t)+"\n\n"+J(t));break}s.push(p)}}if(null!=t.__c&&null!=t.__c.__H){var f=t.__c.__H.__;if(f)for(var m=0;m<f.length;m+=1){var _=f[m];if(_.__H)for(var $=0;$<_.__H.length;$++)if((n=_.__H[$])!=n){var g=H(t);console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index "+m+" in component "+g+" was called with NaN.")}}}}}();var de,se,le,ce,ue=0,he=[],pe=n,fe=pe.__b,me=pe.__r,_e=pe.diffed,$e=pe.__c,ge=pe.unmount,ye=pe.__;function be(e,t){pe.__h&&pe.__h(se,e,ue||t),ue=0;var n=se.__H||(se.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ve(e){return ue=1,function(e,t,n){var a=be(de++,2);if(a.t=e,!a.__c&&(a.__=[n?n(t):Ie(void 0,t),function(e){var t=a.__N?a.__N[0]:a.__[0],n=a.t(t,e);t!==n&&(a.__N=[n,a.__[1]],a.__c.setState({}))}],a.__c=se,!se.__f)){var r=function(e,t,n){if(!a.__c.__H)return!0;var r=a.__c.__H.__.filter(function(e){return!!e.__c});if(r.every(function(e){return!e.__N}))return!i||i.call(this,e,t,n);var o=a.__c.props!==e;return r.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),i&&i.call(this,e,t,n)||o};se.__f=!0;var i=se.shouldComponentUpdate,o=se.componentWillUpdate;se.componentWillUpdate=function(e,t,n){if(this.__e){var a=i;i=void 0,r(e,t,n),i=a}o&&o.call(this,e,t,n)},se.shouldComponentUpdate=r}return a.__N||a.__}(Ie,e)}function xe(e,t){var n=be(de++,3);!pe.__s&&Oe(n.__H,t)&&(n.__=e,n.u=t,se.__H.__h.push(n))}function we(e,t){var n=be(de++,4);!pe.__s&&Oe(n.__H,t)&&(n.__=e,n.u=t,se.__h.push(n))}function ke(e){return ue=5,Ce(function(){return{current:e}},[])}function Ce(e,t){var n=be(de++,7);return Oe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ee(e,t){return ue=8,Ce(function(){return e},t)}function Se(e){var t=se.context[e.__c],n=be(de++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(se)),t.props.value):e.__}function Pe(){for(var e;e=he.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Re),e.__H.__h.forEach(Ae),e.__H.__h=[]}catch(t){e.__H.__h=[],pe.__e(t,e.__v)}}pe.__b=function(e){se=null,fe&&fe(e)},pe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ye&&ye(e,t)},pe.__r=function(e){me&&me(e),de=0;var t=(se=e.__c).__H;t&&(le===se?(t.__h=[],se.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(Re),t.__h.forEach(Ae),t.__h=[],de=0)),le=se},pe.diffed=function(e){_e&&_e(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==he.push(t)&&ce===pe.requestAnimationFrame||((ce=pe.requestAnimationFrame)||Te)(Pe)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),le=se=null},pe.__c=function(e,t){t.some(function(e){try{e.__h.forEach(Re),e.__h=e.__h.filter(function(e){return!e.__||Ae(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],pe.__e(n,e.__v)}}),$e&&$e(e,t)},pe.unmount=function(e){ge&&ge(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{Re(e)}catch(e){t=e}}),n.__H=void 0,t&&pe.__e(t,n.__v))};var Ne="function"==typeof requestAnimationFrame;function Te(e){var t,n=function(){clearTimeout(a),Ne&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(n,35);Ne&&(t=requestAnimationFrame(n))}function Re(e){var t=se,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),se=t}function Ae(e){var t=se;e.__c=e.__(),se=t}function Oe(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Ie(e,t){return"function"==typeof t?t(e):t}function Le(e,t){for(var n in t)e[n]=t[n];return e}function Me(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var a in t)if("__source"!==a&&e[a]!==t[a])return!0;return!1}function De(e,t){this.props=e,this.context=t}(De.prototype=new w).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return Me(this.props,e)||Me(this.state,t)};var Ue=n.__b;n.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ue&&Ue(e)};var Fe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Be=n.__e;n.__e=function(e,t,n,a){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);Be(e,t,n,a)};var je=n.unmount;function qe(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=Le({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return qe(e,t,n)})),e}function Ke(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Ke(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Ve(){this.__u=0,this.o=null,this.__b=null}function Ge(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function He(){this.i=null,this.l=null}n.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),je&&je(e)},(Ve.prototype=new w).__c=function(e,t){var n=t.__c,a=this;null==a.o&&(a.o=[]),a.o.push(n);var r=Ge(a.__v),i=!1,o=function(){i||(i=!0,n.__R=null,r?r(d):d())};n.__R=o;var d=function(){if(! --a.__u){if(a.state.__a){var e=a.state.__a;a.__v.__k[0]=Ke(e,e.__c.__P,e.__c.__O)}var t;for(a.setState({__a:a.__b=null});t=a.o.pop();)t.forceUpdate()}};a.__u++||32&t.__u||a.setState({__a:a.__b=a.__v.__k[0]}),e.then(o,o)},Ve.prototype.componentWillUnmount=function(){this.o=[]},Ve.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),a=this.__v.__k[0].__c;this.__v.__k[0]=qe(this.__b,n,a.__O=a.__P)}this.__b=null}var r=t.__a&&b(x,null,e.fallback);return r&&(r.__u&=-33),[b(x,null,t.__a?null:e.children),r]};var We=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(He.prototype=new w).__a=function(e){var t=this,n=Ge(t.__v),a=t.l.get(e);return a[0]++,function(r){var i=function(){t.props.revealOrder?(a.push(r),We(t,e,a)):r()};n?n(i):i()}},He.prototype.render=function(e){this.i=null,this.l=new Map;var t=T(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},He.prototype.componentDidUpdate=He.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){We(e,n,t)})};var Xe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ye=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ze=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ze=/[A-Z0-9]/g,Je="undefined"!=typeof document,Qe=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var et=n.event;function tt(){}function nt(){return this.cancelBubble}function at(){return this.defaultPrevented}n.event=function(e){return et&&(e=et(e)),e.persist=tt,e.isPropagationStopped=nt,e.isDefaultPrevented=at,e.nativeEvent=e};var rt={enumerable:!1,configurable:!0,get:function(){return this.class}},it=n.vnode;n.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,a={},r=-1===n.indexOf("-");for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||Je&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var d=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"translate"===d&&"no"===o?o=!1:"o"===d[0]&&"n"===d[1]?"ondoubleclick"===d?i="ondblclick":"onchange"!==d||"input"!==n&&"textarea"!==n||Qe(t.type)?"onfocus"===d?i="onfocusin":"onblur"===d?i="onfocusout":ze.test(i)&&(i=d):d=i="oninput":r&&Ye.test(i)?i=i.replace(Ze,"-$&").toLowerCase():null===o&&(o=void 0),"oninput"===d&&a[i=d]&&(i="oninputCapture"),a[i]=o}}"select"==n&&a.multiple&&Array.isArray(a.value)&&(a.value=T(t.children).forEach(function(e){e.props.selected=-1!=a.value.indexOf(e.props.value)})),"select"==n&&null!=a.defaultValue&&(a.value=T(t.children).forEach(function(e){e.props.selected=a.multiple?-1!=a.defaultValue.indexOf(e.props.value):a.defaultValue==e.props.value})),t.class&&!t.className?(a.class=t.class,Object.defineProperty(a,"className",rt)):(t.className&&!t.class||t.class&&t.className)&&(a.class=a.className=t.className),e.props=a}(e),e.$$typeof=Xe,it&&it(e)};var ot=n.__r;n.__r=function(e){ot&&ot(e),e.__c};var dt=n.diffed;n.diffed=function(e){dt&&dt(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var st=0;function lt(e,t,a,r,i,o){t||(t={});var d,s,l=t;if("ref"in l)for(s in l={},t)"ref"==s?d=t[s]:l[s]=t[s];var c={type:e,props:l,key:a,ref:d,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--st,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(d=e.defaultProps))for(s in d)void 0===l[s]&&(l[s]=d[s]);return n.vnode&&n.vnode(c),c}const ct=e=>{const{name:t,size:n,direction:a}=e;let r;switch(a){case"left":r="rotate(0 12 12)";break;case"right":r="rotate(180 12 12)";break;case"up":r="rotate(90 12 12)";break;case"down":r="rotate(-90 12 12)"}return lt("svg",{className:`xendit-icon ${e.className??""}`,width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"none",children:lt("g",{transform:r,children:ht.find(e=>e.name===t)?.node??null})})};function ut(e,t,n){return{name:e,node:lt("g",{id:`xendit-icon-${e}`,transform:`scale(${1/n} ${1/n})`,children:t})}}const ht=[ut("chevron",lt("path",{d:"M15 19.5L7.5 12L15 4.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),1),ut("check",lt("path",{d:"M13.5 4.5L6.5 11.5L3 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),16/24),ut("x",lt(x,{children:[lt("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),lt("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),1),ut("card",lt("path",{fill:"currentColor",d:"M17.5 3.75H2.5C2.16848 3.75 1.85054 3.8817 1.61612 4.11612C1.3817 4.35054 1.25 4.66848 1.25 5V15C1.25 15.3315 1.3817 15.6495 1.61612 15.8839C1.85054 16.1183 2.16848 16.25 2.5 16.25H17.5C17.8315 16.25 18.1495 16.1183 18.3839 15.8839C18.6183 15.6495 18.75 15.3315 18.75 15V5C18.75 4.66848 18.6183 4.35054 18.3839 4.11612C18.1495 3.8817 17.8315 3.75 17.5 3.75ZM10.625 13.75H9.375C9.20924 13.75 9.05027 13.6842 8.93306 13.5669C8.81585 13.4497 8.75 13.2908 8.75 13.125C8.75 12.9592 8.81585 12.8003 8.93306 12.6831C9.05027 12.5658 9.20924 12.5 9.375 12.5H10.625C10.7908 12.5 10.9497 12.5658 11.0669 12.6831C11.1842 12.8003 11.25 12.9592 11.25 13.125C11.25 13.2908 11.1842 13.4497 11.0669 13.5669C10.9497 13.6842 10.7908 13.75 10.625 13.75ZM15.625 13.75H13.125C12.9592 13.75 12.8003 13.6842 12.6831 13.5669C12.5658 13.4497 12.5 13.2908 12.5 13.125C12.5 12.9592 12.5658 12.8003 12.6831 12.6831C12.8003 12.5658 12.9592 12.5 13.125 12.5H15.625C15.7908 12.5 15.9497 12.5658 16.0669 12.6831C16.1842 12.8003 16.25 12.9592 16.25 13.125C16.25 13.2908 16.1842 13.4497 16.0669 13.5669C15.9497 13.6842 15.7908 13.75 15.625 13.75ZM2.5 6.875V5H17.5V6.875H2.5Z"}),20/24),ut("dummy",lt("path",{fill:"currentColor",d:"M17.5 11.875V15C17.5 15.3315 17.3683 15.6495 17.1339 15.8839C16.8995 16.1183 16.5815 16.25 16.25 16.25H3.75C3.41848 16.25 3.10054 16.1183 2.86612 15.8839C2.6317 15.6495 2.5 15.3315 2.5 15V11.875C2.5 11.5435 2.6317 11.2255 2.86612 10.9911C3.10054 10.7567 3.41848 10.625 3.75 10.625H16.25C16.5815 10.625 16.8995 10.7567 17.1339 10.9911C17.3683 11.2255 17.5 11.5435 17.5 11.875ZM16.25 3.75H3.75C3.41848 3.75 3.10054 3.8817 2.86612 4.11612C2.6317 4.35054 2.5 4.66848 2.5 5V8.125C2.5 8.45652 2.6317 8.77446 2.86612 9.00888C3.10054 9.2433 3.41848 9.375 3.75 9.375H16.25C16.5815 9.375 16.8995 9.2433 17.1339 9.00888C17.3683 8.77446 17.5 8.45652 17.5 8.125V5C17.5 4.66848 17.3683 4.35054 17.1339 4.11612C16.8995 3.8817 16.5815 3.75 16.25 3.75Z"}),20/24)];let pt=!1;const ft=Symbol("xendit-internal"),mt=e=>lt("div",{class:"xendit-accordion",children:e.children});function _t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $t,gt={exports:{}};
2
2
  /*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
5
5
  http://jedwatson.github.io/classnames
6
- */var gt=($t||($t=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var o in e)t.call(e,o)&&e[o]&&(r=a(r,o));return r}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(_t)),_t.exports),yt=mt(gt);const bt=e=>{const{id:t,title:n,subtitle:r,disabled:a,open:o,onClick:i,children:d}=e,s=o?"up":"down",l=Ee(()=>{a||i(t)},[a,i,t]),c=Ee(e=>{"Enter"!==e.key&&" "!==e.key||(l(),e.preventDefault())},[l]),u=Ee(()=>{l()},[l]);return lt("div",{className:yt("xendit-accordion-item",a?"xendit-accordion-item-disabled":"",o?"xendit-accordion-item-open":"xendit-accordion-item-closed"),children:[lt("div",{className:"xendit-accordion-item-header",onClick:u,onKeyDown:c,role:"button",tabIndex:a?-1:0,children:[lt(ct,{className:"xendit-accordion-item-header-icon",name:"dummy",size:24}),lt("div",{className:"xendit-accordion-item-header-title xendit-text-16 xendit-text-bold",children:[n,r?lt("div",{className:"xendit-accordion-item-header-subtitle xendit-text-14",children:r}):null]}),lt(ct,{className:"xendit-accordion-item-chevron",name:"chevron",size:24,direction:s})]}),lt("div",{className:"xendit-accordion-item-content",inert:!o,children:lt("div",{className:"xendit-accordion-item-padding",children:d})})]})},vt=V(null);vt.displayName="SessionContext";const xt=V(null);xt.displayName="BusinessContext";const kt=V(null);kt.displayName="CustomerContext";const wt=V(null);wt.displayName="ChannelsContext";const Ct=V(null);Ct.displayName="ChannelUiGroupsContext";const Et=V({cardNumber:null,details:null});Et.displayName="CardDetailsContext";const Pt=V(null);Pt.displayName="SdkContext";const St=V({channel:null,channelProperties:null});St.displayName="CurrentChannelContext";const Nt=()=>{const e=Pe(vt);if(null===e)throw new Error("useSession must be used within a XenditSessionProvider");return e},Tt=()=>{const e=Pe(wt);if(null===e)throw new Error("useChannels must be used within a XenditSessionProvider");return e},At=()=>Pe(Et),Ot=()=>{const e=Pe(Pt);if(null===e)throw new Error("useSdk must be used within a XenditSessionProvider");return e},It=()=>Pe(St),Rt=({children:e,data:t,sdk:n})=>{const{session:r,business:a,customer:o,channels:i,channelUiGroups:d}=t,s=n.getCurrentChannel()?.[pt]?.[0]??null,l=n[pt].liveComponents.paymentChannels.get(n.getCurrentChannel()?.[pt]?.[0]?.channel_code??"")?.channelProperties??null;return lt(Pt.Provider,{value:n,children:lt(St.Provider,{value:{channel:s,channelProperties:l},children:lt(vt.Provider,{value:r,children:lt(xt.Provider,{value:a,children:lt(kt.Provider,{value:o,children:lt(wt.Provider,{value:i,children:lt(Ct.Provider,{value:d,children:lt(Et.Provider,{value:t.cardDetails,children:e})})})})})})})})},Lt=300;function Mt(e){if(null==e)throw new Error("Assertion failed: argument is null or undefined; this is a bug, please contact support.")}function Dt(e,t){if(e!==t)throw new Error("Assertion failed; this is a bug, please contact support.")}function Ut(e){return new Promise(t=>setTimeout(t,1*e))}class AbortError extends Error{constructor(){super("AbortError"),this.name="AbortError"}}function Ft(e){return e instanceof AbortError&&"AbortError"===e.name}function Bt(e,t){return new Promise((n,r)=>{function a(){t.removeEventListener("abort",a),clearTimeout(o),r(new AbortError)}const o=setTimeout(()=>{t.removeEventListener("abort",a),n()},1*e);t.aborted?a():t.addEventListener("abort",a)})}const jt="mock",qt={pl:"https://checkout-ui-gateway.xendit.co",pd:"https://checkout-ui-gateway-prod-dev.xendit.co",sl:"https://checkout-ui-gateway-live.stg.tidnex.dev",sd:"https://checkout-ui-gateway-dev.stg.tidnex.dev"};function Kt(e){return qt[e]??null}function Vt(e){const t=we();return ke(()=>{t.current=e}),t.current}function Gt(e){let t;if("string"==typeof e.channel_property)t=e.channel_property;else{t=Object.values(e.channel_property).join("__")}return t}function Ht(e){if(e instanceof Error)return e.stack??e.message;if("string"==typeof e)return e;try{return`Unknown error: ${JSON.stringify(e)}`}catch{return"Unknown error"}}function Wt(e){for(const t of Object.keys(e)){if("symbol"==typeof t)continue;const n=Object.getOwnPropertyDescriptor(e,t);void 0!==n&&("function"!=typeof n.get&&void 0===n.value&&delete e[t])}return e}function Xt(e,t){let n=e;if(!t)return;if(Array.isArray(n))throw new Error("Getting values from channel property arrays is not supported.");let r=t;for(;;){if(!r||"object"!=typeof r||Array.isArray(r))return;const e=n.indexOf(".");if(-1===e)return r?r[n]:void 0;{const t=n.slice(0,e);r=r?r[t]:void 0,n=n.slice(e+1)}}}const Yt=new WeakMap;let zt=1;function Zt(){return`xendit-id-${we(Math.random().toString(36).substring(2,10)).current}`}function Jt(e,t){return Mt(e.length>0),Mt(e.length<=2),2===e.length?t?(Mt(!0===e[1].allow_save),e[1]):(Mt(!1===e[0].allow_save),e[0]):e[0]}function Qt(e,t){if("PAY"!==e.session_type)return!0;const n=e.amount,r=t.min_amount??0,a=t.max_amount??Number.MAX_VALUE;return!(n<r||n>a)}function en(e){Object.defineProperty(e,pt,{enumerable:!1,writable:!1,configurable:!1,value:e[pt]})}const tn={CARDS:!0};const nn=e=>{const{id:t,options:n,onChange:r,defaultIndex:a=-1,selectedIndex:o,className:i,placeholder:d}=e,s=Zt(),l=t||s,c="number"==typeof o,[u,h]=ve(a),p=c?o:u,[f,m]=ve(p>=0?p:0),[$,_]=ve(!1),[g,y]=ve(""),b=we(null),v=we(null),x=we(null),k=we(null),w=Ce(()=>{const e=(e,t)=>({option:e,originalIndex:t});if(!g)return n.map(e);const t=n.map(e).filter(({option:e})=>{const t=g.toLowerCase();return e.title.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.value.toLowerCase().includes(t)});return t.length>0?t:n.map(e)},[g,n]),C=`${l}-label`,E=`${l}-listbox`,P=Math.max(0,Math.min(w.length-1,f)),S=w[P]?`${l}-opt-${P}`:`${l}-opt-none`;xe(()=>{if(!$)return;const e=e=>{const t=b.current;t&&(t.contains(e.target)||_(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[$]),xe(()=>{$&&p>=0&&m(p)},[$,p]);const N=Ee(e=>{e?.scrollIntoView({block:"end",behavior:"instant"})},[]),T=Ee((e,t)=>{if(!0===t)return;const a=n[e];a&&(c||h(e),r(a,e),_(!1),v.current?.focus())},[c,r,n]),A=Ee(()=>{$||(_(!0),queueMicrotask(()=>k.current?.focus()))},[$]),O=Ee(()=>{$&&(_(!1),y(""),v.current?.focus())},[$]),I=Ee(e=>{"ArrowDown"!==e.key&&"ArrowUp"!==e.key&&" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),A())},[A]),R=Ee(e=>{const t="dropdown-search-input"===e.target?.id;if("Escape"===e.key)return e.preventDefault(),void O();if("Enter"===e.key||" "===e.key){if(t&&" "===e.key)return;e.preventDefault();const n=w[P];return void(n&&T(n.originalIndex,n.option.disabled))}return"ArrowDown"===e.key?(e.preventDefault(),void m(e=>Math.min(w.length-1,e+1))):"ArrowUp"===e.key?(e.preventDefault(),void m(e=>Math.max(0,e-1))):"Home"===e.key?(e.preventDefault(),void m(0)):"End"===e.key?(e.preventDefault(),void m(w.length-1)):void 0},[P,O,T,w]),L=Ee(e=>{T(Number(e.currentTarget.dataset.index),Boolean(e.currentTarget.dataset.disabled))},[T]),M=p>=0?n[p]:void 0;return lt("div",{ref:b,className:`xendit-dropdown ${i??""}`,children:[lt("button",{id:l,ref:v,type:"button",className:M?.leadingAsset?"xendit-dropdown-has-asset":"","aria-controls":E,"aria-expanded":$?"true":"false",onClick:()=>$?O():A(),onKeyDown:e=>I(e),children:[M?.leadingAsset?M.leadingAsset:null,lt("span",M?{className:"xendit-dropdown-button-title xendit-text-14",children:M.shortTitle??M.title}:{className:"xendit-dropdown-button-title xendit-text-14 xendit-text-secondary",children:d}),lt(ct,{className:"xendit-dropdown-chevron",name:"chevron",size:16,direction:"down"})]}),$?lt("div",{className:"xendit-dropdown-menu",onClick:O,children:[lt("div",{className:"xendit-dropdown-search",children:lt("input",{ref:k,id:"dropdown-search-input",placeholder:"Search..",value:g,onInput:e=>{y(e.target.value),m(0)},onClick:e=>e.stopPropagation(),onKeyDown:R})}),lt("ul",{ref:x,id:E,role:"listbox",tabIndex:-1,"aria-labelledby":C,"aria-activedescendant":S,onKeyDown:R,children:w.map(({option:e,originalIndex:t},n)=>{const r=t===p,a=n===P;return lt("li",{role:"option","data-index":t,"data-disabled":!!e.disabled||void 0,"aria-disabled":!!e.disabled||void 0,"aria-selected":r,onClick:L,ref:a?N:void 0,children:lt("div",{className:`xendit-dropdown-item xendit-text-14 ${a?"is-active":""} ${e.leadingAsset?"xendit-dropdown-has-asset":""} ${e.disabled?"xendit-dropdown-item-disabled":""}`,children:[e.leadingAsset?e.leadingAsset:null,lt("div",{className:"xendit-dropdown-item-text xendit-text-14",children:[lt("span",{className:"xendit-dropdown-item-title",children:e.title}),e.description&&lt("span",{className:"xendit-dropdown-item-description xendit-text-12",children:e.description})]}),r?lt(ct,{name:"check",size:16,className:"xendit-dropdown-item-selected"}):null]})},t)})})]}):null]})};function rn(e){return function(e,t){if(e===t)throw new Error("Assertion failed; this is a bug, please contact support.")}(e.session_type,"AUTHORIZATION"),Dt(e.mode,"COMPONENTS"),Wt({id:e.payment_session_id,description:e.description||void 0,sessionType:e.session_type,mode:e.mode,referenceId:e.reference_id,country:e.country,currency:e.currency,amount:e.amount,channelProperties:e.channel_properties||void 0,expiresAt:new Date(e.expires_at),locale:e.locale,status:e.status,items:e.items?.map(e=>Wt({type:e.type,referenceId:e.reference_id,name:e.name,netUnitAmount:e.net_unit_amount,quantity:e.quantity,url:e.url,imageUrl:e.image_url,category:e.category,subcategory:e.subcategory,description:e.description,metadata:e.metadata}))})}function an(e,t,n,r){const a=Wt({groupId:e.id,label:e.label,get channels(){return(t[e.id]||[]).map(e=>dn(e,t,n,r))},[pt]:e});return en(a),a}function on(e,t){return dn(e,{},{},t)}function dn(e,t,n,r){Mt(!r.pairChannels.paired[e.channel_code]);const a=Wt({channelCode:r.pairChannels.pairs[e.channel_code]?.map(e=>e.channel_code)??e.channel_code,brandName:e.brand_name,brandColor:e.brand_color,brandLogoUrl:e.brand_logo_url,get uiGroup(){if(!n[e.ui_group])throw new Error("UI group not found");return an(n[e.ui_group],t,n,r)},minAmount:e.min_amount,maxAmount:e.max_amount,cardBrands:e.card?.brands.map(e=>({name:e.name,logoUrl:e.logo_url})),[pt]:r.pairChannels.pairs[e.channel_code]??[e]});return en(a),a}function sn(e){const t={};for(const n of e)t[n.id]=n;return t}function ln(e,t){if(t.pairChannels.paired[e.channel_code])return!1;if(t.options.filterMinMax&&!Qt(t.session,e))return!1;const n=t.options.filter;return!(n&&!function(e,t){if("string"==typeof e&&t===e)return!0;if(Array.isArray(e)&&e.includes(t))return!0;if(e instanceof RegExp&&e.test(t))return!0;return!1}(n,e.channel_code))}function cn(e,t){const n={};for(const r of e){if(!ln(r,t))continue;const e=r.ui_group;n[e]||(n[e]=[]),n[e].push(r)}return n}function un(e){const t=new Map;for(const n of e){const e=n.brand_name;t.has(e)||t.set(e,[]),t.get(e).push(n)}const n={},r={};for(const[e,a]of t)for(const e of a){if(!1===a[0].allow_save){const t=a.find(t=>e.channel_code!==t.channel_code&&e.ui_group===t.ui_group&&!0===t.allow_save);t&&(n[e.channel_code]=[e,t],r[t.channel_code]=!0)}}return{pairs:n,paired:r}}const hn=e=>{const{group:t,open:n}=e,r=Ot(),{t:a}=r,o=Nt(),i=o.session_type,d=Zt(),s=we(null),l=we(null),c=It().channel?.channel_code??null,[u,h]=ve(null),p=Tt(),f=Ce(()=>un(p),[p]),m=Ce(()=>({pairChannels:f,session:{amount:o.amount,session_type:o.session_type},options:{filterMinMax:!1}}),[f,o.amount,o.session_type]),$=Ce(()=>p.filter(e=>e.ui_group===t.id&&!f.paired[e.channel_code]),[p,t.id,f]);ke(()=>{if(s.current)if(u){if(n){const e=r.createChannelComponent(on(u,m));l.current=e,e.parentElement!==s.current&&s.current.replaceChildren(e)}}else s.current.replaceChildren()},[u,r,n,m]);const _=Vt(n);ke(()=>{n&&!_&&(1===$.length&&null===u?h($[0]):u&&c!==u.channel_code?r.setCurrentChannel(on(u,m)):u||r.setCurrentChannel(null))},[$,u,n,_,r,c,m]);const g=Vt(c)??null;ke(()=>{if(c!==g){if(null===c)return;if(c!==u?.channel_code){const e=$.find(e=>e.channel_code===c);e&&h(e)}}},[$,u?.channel_code,g,r,c]);const y=$.map(e=>({leadingAsset:lt("img",{className:"xendit-channel-logo",src:e.brand_logo_url},e.channel_code),title:e.brand_name,value:e.channel_code,disabled:!Qt(o,e),description:pn(a,o,e)||void 0}));return lt("div",{className:"xendit-channel-picker-group",children:[1===$.length&&"CARDS"===$[0].channel_code?null:lt("div",{className:"xendit-channel-form-field-group",children:[lt("label",{htmlFor:d,className:"xendit-text-14",children:"SAVE"===i?a("payment_methods.add_payment_method",{groupName:t.label??"",ns:"session"}):a("payment_methods.pay_with")}),lt(nn,{id:d,selectedIndex:y.findIndex(e=>e.value===u?.channel_code)??0,options:y,onChange:e=>{const t=p.find(t=>t.channel_code===e.value)||null;h(t)},placeholder:a("payment_methods.select_channel_placeholder",{groupName:t.label,ns:"session"})})]}),u?lt("div",{ref:s}):null]})};function pn(e,t,n){return Qt(t,n)?null:n.min_amount&&t.amount<n.min_amount?e("payment_methods.channel_disabled_amount_too_small"):e("payment_methods.channel_disabled_amount_too_large")}const fn=e=>{const t=Ot(),n=Nt(),r=(()=>{const e=Pe(Ct);if(null===e)throw new Error("useChannelUiGroups must be used within a XenditSessionProvider");return e})(),a=It().channel,o=Tt(),{t:i}=Ot(),d=Ce(()=>cn(o,{options:{filterMinMax:!1},pairChannels:un(o),session:n}),[o,n]),s=we(null),[l,c]=ve(null),[u,h]=ve(!1),p=Ee(e=>{if(l===e){const t=r[e].id;s.current?.dispatchEvent(new XenditClearCurrentChannelEvent(t)),c(null)}else c(e);h(!0)},[r,l]),f=Vt(a);return ke(()=>{if(a!==f&&!u)if(null===a)c(null);else{const e=r.findIndex(e=>a.ui_group===e.id);-1!==e&&c(e)}h(!1)},[a,r,f,l,u]),"ACTIVE"!==t.getSdkStatus()||"ACTIVE"!==n.status?null:lt("div",{ref:s,children:lt(ft,{children:r.filter(e=>(d[e.id]||[]).length>0).map((e,t)=>{const r=l===t,a=function(e,t,n,r){let a=null;for(const o of n)if(o.ui_group===t.id){if(Qt(e,o))return null;a=pn(r,e,o)}return a}(n,e,o,i),d=null!==a;return lt(bt,{id:t,title:e.label,subtitle:a??void 0,open:r,disabled:d,onClick:p,children:lt(hn,{group:e,open:r})},t)})})})};class XenditClearCurrentChannelEvent extends Event{static type="xendit-clear-current-channel";uiGroup;constructor(e){super(XenditClearCurrentChannelEvent.type,{bubbles:!0,composed:!0}),this.uiGroup=e}}class InternalUpdateWorldState extends Event{data;static type="xendit-update-world-state";constructor(e){super(InternalUpdateWorldState.type,{bubbles:!1}),this.data=e}}class InternalInputValidateEvent extends CustomEvent{static type="xendit-internal-input-validate";constructor(e){super(InternalInputValidateEvent.type,{detail:{value:e}})}}class InternalBehaviorTreeUpdateEvent extends Event{static type="xendit-internal-behavior-tree-update";constructor(){super(InternalBehaviorTreeUpdateEvent.type,{})}}class InternalNeedsRerenderEvent extends Event{static type="xendit-internal-needs-rerender";constructor(){super(InternalNeedsRerenderEvent.type,{})}}var mn={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:[19]|2[2-46-9]|3[3-9])|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:(?:18|4[0679]|5[03])\\d|2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9]))\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["3052(?:0[0-8]|[1-9]\\d)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|983)[2-47-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function $n(e,t){var n=Array.prototype.slice.call(t);return n.push(mn),e.apply(this,n)}function _n(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),a=0;a<3;a++){var o=Number(n[a]),i=Number(r[a]);if(o>i)return 1;if(i>o)return-1;if(!isNaN(o)&&isNaN(i))return 1;if(isNaN(o)&&!isNaN(i))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var gn={}.constructor;function yn(e){return null!=e&&e.constructor===gn}function bn(e){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bn(e)}function vn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xn(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kn(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kn(e){var t=function(e,t){if("object"!=bn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=bn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==bn(t)?t:t+""}var wn=" ext. ",Cn=/^\d+$/,En=function(){return xn(function e(t){vn(this,e),On(t),this.metadata=t,Ln.call(this,t)},[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&Cn.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new Pn(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new Pn(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),Pn=function(){return xn(function e(t,n){vn(this,e),this.globalMetadataObject=n,this.metadata=t,Ln.call(this,n.metadata)},[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map(function(t){return new Sn(t,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&An(this.types(),e))return new Tn(An(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?wn:this.metadata[13]||wn}}])}(),Sn=function(){return xn(function e(t,n){vn(this,e),this._format=t,this.metadata=n},[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||Nn.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),Nn=/^\(?\$1\)?$/,Tn=function(){return xn(function e(t,n){vn(this,e),this.type=t,this.metadata=n},[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function An(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function On(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!yn(e)||!yn(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(yn(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+In(e)+": "+e,"."))}var In=function(e){return bn(e)};function Rn(e,t){if((t=new En(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function Ln(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===_n(t,"1.2.0")?this.v2=!0:-1===_n(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function Mn(e,t,n){return function(e,t,n,r){t&&(r=new En(r.metadata)).selectNumberingPlan(t);var a=r.type(n),o=a&&a.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";var i=e.length,d=o[0];if(d===i)return"IS_POSSIBLE";if(d>i)return"TOO_SHORT";if(o[o.length-1]<i)return"TOO_LONG";return o.indexOf(i,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,t,void 0,n)}function Dn(e,t,n){return"IS_POSSIBLE"===Mn(e,t,n)}function Un(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function Fn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Bn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bn(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var jn=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function qn(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new En(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(Un(r,n.nationalNumberPattern())){if(Kn(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Kn(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var a,o=Fn(jn);!(a=o()).done;){var i=a.value;if(Kn(r,i,n))return i}}}}function Kn(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&Un(e,t.pattern()))}function Vn(e,t,n){var r=new En(n).getCountryCodesForCallingCode(e);return r?r.filter(function(e){return function(e,t,n){var r=new En(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)}):[]}var Gn="0-90-9٠-٩۰-۹",Hn="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~"),Wn=new RegExp("(["+Gn+"])");function Xn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Yn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yn(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function zn(e,t){var n=t.nationalNumber,r=t.metadata,a=r.getCountryCodesForCallingCode(e);if(a)return 1===a.length?a[0]:function(e,t){var n=t.countries,r=t.metadata;r=new En(r);for(var a,o=Xn(n);!(a=o()).done;){var i=a.value;if(r.selectNumberingPlan(i),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return i}else if(qn({phone:e,country:i},void 0,r.metadata))return i}}(n,{countries:a,metadata:r.metadata})}function Zn(e,t,n){var r=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var a,o,i,d=r.length-1,s=d>0&&r[d];if(t.nationalPrefixTransformRule()&&s)a=e.replace(n,t.nationalPrefixTransformRule()),d>1&&(o=r[1]);else{var l=r[0];a=e.slice(l.length),s&&(o=r[1])}if(s){var c=e.indexOf(r[1]);e.slice(0,c)===t.numberingPlan.nationalPrefix()&&(i=t.numberingPlan.nationalPrefix())}else i=r[0];return{nationalNumber:a,nationalPrefix:i,carrierCode:o}}}return{nationalNumber:e}}(e,n),a=r.carrierCode,o=r.nationalNumber;if(o!==e){if(!function(e,t,n){if(Un(e,n.nationalNumberPattern())&&!Un(t,n.nationalNumberPattern()))return!1;return!0}(e,o,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=zn(n.numberingPlan.callingCode(),{nationalNumber:o,metadata:n})),!function(e,t,n){switch(Mn(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,n)))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:a}}function Jn(e,t,n,r,a){if(!e)return{};var o;if("+"!==e[0]){var i=function(e,t,n,r){if(t){var a=new En(r);a.selectNumberingPlan(t,n);var o=new RegExp(a.IDDPrefix());if(0===e.search(o)){var i=(e=e.slice(e.match(o)[0].length)).match(Wn);if(!(i&&null!=i[1]&&i[1].length>0&&"0"===i[1]))return e}}}(e,n,r,a);if(!i||i===e){if(n||r){var d=function(e,t,n,r,a){var o=n?Rn(n,a):r;if(0===e.indexOf(o)){(a=new En(a)).selectNumberingPlan(n,o);var i=e.slice(o.length),d=Zn(i,t,a).nationalNumber,s=Zn(e,t,a).nationalNumber;if(!Un(s,a.nationalNumberPattern())&&Un(d,a.nationalNumberPattern())||"TOO_LONG"===Mn(s,t,a))return{countryCallingCode:o,number:i}}return{number:e}}(e,t,n,r,a),s=d.countryCallingCode,l=d.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:l}}return{number:e}}o=!0,e="+"+i}if("0"===e[1])return{};a=new En(a);for(var c=2;c-1<=3&&c<=e.length;){var u=e.slice(1,c);if(a.hasCallingCode(u))return a.selectNumberingPlan(u),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(c)};c++}return{}}var Qn=/(\$\d)/;function er(e,t,n){var r=n.useInternationalFormat,a=n.withNationalPrefix,o=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(Qn,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(new RegExp("[".concat(Hn,"]+"),"g")," ").trim()}(o):o}var tr=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var nr=function(e){return"([".concat(Gn,"]{1,").concat(e,"})")};function rr(e){var t="[  \\t,]*",n="[:\\..]?[  \\t,-]*",r="#?",a="[  \\t]*";return";ext="+nr("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+nr("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+nr("9")+r)+"|"+("[- ]+"+nr("6")+"#")+"|"+(a+"(?:,{2}|;)"+n+nr("15")+r)+"|"+(a+"(?:,)+"+n+nr("9")+r)}var ar="["+Gn+"]{2}",or="[++]{0,1}(?:["+Hn+"]*["+Gn+"]){3,}["+Hn+Gn+"]*",ir=new RegExp("^[++]{0,1}(?:["+Hn+"]*["+Gn+"]){1,2}$","i"),dr=or+"(?:"+rr()+")?",sr=new RegExp("^"+ar+"$|^"+dr+"$","i");var lr={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function cr(e,t,n,r){if(n=n?function(){for(var e=1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var a in n[e])n[0][a]=n[e][a];e++}return n[0]}({},lr,n):lr,r=new En(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var a,o=r.countryCallingCode(),i=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return i?hr(a=ur(i,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return i?(a=ur(i,null,"INTERNATIONAL",r,n),hr(a="+".concat(o," ").concat(a),e.ext,r,n.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(i);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(o).concat(i),ext:e.ext});case"IDD":if(!n.fromCountry)return;var d=function(e,t,n,r,a){var o=Rn(r,a.metadata);if(o===n){var i=ur(e,t,"NATIONAL",a);return"1"===n?n+" "+i:i}var d=function(e,t,n){var r=new En(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():tr.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,a.metadata);if(d)return"".concat(d," ").concat(n," ").concat(ur(e,null,"INTERNATIONAL",a))}(i,e.carrierCode,o,n.fromCountry,r);return hr(d,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function ur(e,t,n,r,a){var o,i,d=(o=r.formats(),i=e,function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(o,function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==i.search(t))return!1}return Un(i,e.pattern())}));return d?er(e,d,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!d.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!a||!1!==a.nationalPrefix}):e}function hr(e,t,n,r){return t?r(e,t,n):e}function pr(e){return pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pr(e)}function fr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fr(Object(n),!0).forEach(function(t){$r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $r(e,t,n){return(t=gr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gr(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gr(e){var t=function(e,t){if("object"!=pr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=pr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==pr(t)?t:t+""}var yr=function(){return _r(function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("First argument is required");if("string"!=typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(yn(n)&&yn(n.countries)){r=n;var a=t;if(!vr.test(a))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=Jn(a,void 0,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw new TypeError("`nationalNumber` argument must be a string");On(r);var i=function(e,t){var n,r,a=new En(t);br(e)?(n=e,a.selectNumberingPlan(n),r=a.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),d=i.country,s=i.countryCallingCode;this.country=d,this.countryCallingCode=s,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Vn(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new En(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return Dn(e.phone||e.nationalNumber,e.country,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,t,n){return t=t||{},(n=new En(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==qn(e,t,n.metadata):Un(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new En(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return qn(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return cr(this,e,t?mr(mr({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])}(),br=function(e){return/^[A-Z]{2}$/.test(e)};var vr=/^\+\d+$/;function xr(e){return xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xr(e)}function kr(e,t,n){return t=Pr(t),function(e,t){if(t&&("object"==xr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Cr()?Reflect.construct(t,n||[],Pr(e).constructor):t.apply(e,n))}function wr(e){var t="function"==typeof Map?new Map:void 0;return wr=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Cr())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&Er(a,n.prototype),a}(e,arguments,Pr(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Er(n,e)},wr(e)}function Cr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Cr=function(){return!!e})()}function Er(e,t){return Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Er(e,t)}function Pr(e){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pr(e)}var Sr=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=kr(this,t,[e]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Er(e,t)}(t,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(t)}(wr(Error)),Nr=new RegExp("(?:"+rr()+")$","i");var Tr={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Ar(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Or(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Or(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Or(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ir(e){for(var t,n="",r=Ar(e.split(""));!(t=r()).done;){n+=Rr(t.value,n)||""}return n}function Rr(e,t,n){if("+"===e){if(t)return;return"+"}return function(e){return Tr[e]}(e)}var Lr="(["+Gn+"]|[\\-\\.\\(\\)]?)",Mr=new RegExp("^\\+"+Lr+"*["+Gn+"]"+Lr+"*$","g"),Dr=new RegExp("^("+("["+Gn+"]+((\\-)*["+Gn+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+Gn+"])*")+"\\.?$","g"),Ur="tel:",Fr=";phone-context=";function Br(e,t){var n,r=t.extractFormattedPhoneNumber,a=function(e){var t=e.indexOf(Fr);if(t<0)return null;var n=t+15;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(Mr.test(e)||Dr.test(e))}(a))throw new Sr("NOT_A_NUMBER");if(null===a)n=r(e)||"";else{n="","+"===a.charAt(0)&&(n+=a);var o,i=e.indexOf(Ur);o=i>=0?i+4:0;var d=e.indexOf(Fr);n+=e.substring(o,d)}var s=n.indexOf(";isub=");if(s>0&&(n=n.substring(0,s)),""!==n)return n}var jr=new RegExp("[++"+Gn+"]"),qr=new RegExp("[^"+Gn+"#]+$");function Kr(e,t,n){if(t=t||{},n=new En(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new Sr("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=Br(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>250){if(n)throw new Sr("TOO_LONG");return}if(!1===t)return e;var r=e.search(jr);if(r<0)return;return e.slice(r).replace(qr,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&sr.test(e)}(r))return function(e){return ir.test(e)}(r)?{error:"TOO_SHORT"}:{};var a=function(e){var t=e.search(Nr);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(Nr),a=1;a<r.length;){if(r[a])return{number:n,ext:r[a]};a++}}(r);if(a.ext)return a;return{number:r}}(e,t.v2,t.extract),a=r.number,o=r.ext,i=r.error;if(!a){if(t.v2){if("TOO_SHORT"===i)throw new Sr("TOO_SHORT");throw new Sr("NOT_A_NUMBER")}return{}}var d=function(e,t,n,r){var a,o=Jn(Ir(e),void 0,t,n,r.metadata),i=o.countryCallingCodeSource,d=o.countryCallingCode,s=o.number;if(d)r.selectNumberingPlan(d);else{if(!s||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(a=t),d=n||Rn(t,r.metadata)}if(!s)return{countryCallingCodeSource:i,countryCallingCode:d};var l=Zn(Ir(s),a,r),c=l.nationalNumber,u=l.carrierCode,h=zn(d,{nationalNumber:c,metadata:r});h&&(a=h,"001"===h||r.selectNumberingPlan(a));return{country:a,countryCallingCode:d,countryCallingCodeSource:i,nationalNumber:c,carrierCode:u}}(a,t.defaultCountry,t.defaultCallingCode,n),s=d.country,l=d.nationalNumber,c=d.countryCallingCode,u=d.countryCallingCodeSource,h=d.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new Sr("INVALID_COUNTRY");return{}}if(!l||l.length<2){if(t.v2)throw new Sr("TOO_SHORT");return{}}if(l.length>17){if(t.v2)throw new Sr("TOO_LONG");return{}}if(t.v2){var p=new yr(c,l,n.metadata);return s&&(p.country=s),h&&(p.carrierCode=h),o&&(p.ext=o),p.__countryCallingCodeSource=u,p}var f=!!(t.extended?n.hasSelectedNumberingPlan():s)&&Un(l,n.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:c,carrierCode:h,valid:f,possible:!!f||!(!0!==t.extended||!n.possibleLengths()||!Dn(l,s,n)),phone:l,ext:o}:f?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(s,l,o):{}}function Vr(e){return Vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vr(e)}function Gr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gr(Object(n),!0).forEach(function(t){Wr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Wr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Vr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Vr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Vr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xr(e){return Xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xr(e)}function Yr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Xr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Xr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,d=[],s=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(s=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);s=!0);}catch(e){l=!0,a=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw a}}return d}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Jr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qr(e){var t,n,r,a=Zr(Array.prototype.slice.call(e),4),o=a[0],i=a[1],d=a[2],s=a[3];if("string"!=typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,i&&"string"!=typeof i){if(!yn(i))throw new Error("Invalid second argument: ".concat(i));d?(n=i,r=d):r=i}else s?(n=d,r=s):(n=void 0,r=d),i&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yr(Object(n),!0).forEach(function(t){zr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({defaultCountry:i},n));return{text:t,options:n,metadata:r}}function ea(e){return ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ea(e)}function ta(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function na(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ta(Object(n),!0).forEach(function(t){ra(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ta(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ra(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=ea(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=ea(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ea(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aa(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=na(na({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return Kr(e,Hr(Hr({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof Sr))throw e}}function oa(){var e=Qr(arguments);return aa(e.text,e.options,e.metadata)}function ia(e){return new En(e).getCountries()}function da(e,t,n){if(t[e])return new yr(e,t[e],n)}function sa(){return $n(oa,arguments)}function la(){return $n(Rn,arguments)}function ca(e){return e.startsWith("/")&&e.endsWith("/")?e.slice(1,-1):e}function ua(e,t){if(e.required&&0===t.trim().length)return{localeKey:"validation.required"};switch(e.type.name){case"credit_card_number":case"credit_card_expiry":case"credit_card_cvn":case"country":case"province":case"dropdown":return;case"phone_number":return(e=>{const t=e?.trim();if(!t)return;const n=sa(t);return n&&n.isValid()?void 0:{localeKey:"validation.generic_invalid"}})(t);case"email":return(e=>{const t=e.trim();if(t.length>0&&!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[A-Za-z]{2,}$/.test(t))return{localeKey:"validation.generic_invalid"}})(t);case"postal_code":return(e=>{const t=e.trim();if(0!==t.length)return/^(?![-\s]+)[A-Za-z0-9\s-]+$/.test(t)?void 0:{localeKey:"validation.generic_invalid"}})(t);case"text":return((e,t)=>{const n=t.trim();if(Array.isArray(e.type.regex_validators))for(const t of e.type.regex_validators)if(!new RegExp(ca(t.regex)).test(n))return{value:t.message};return void 0!==e.type.min_length&&n.length<e.type.min_length?{localeKey:"validation.text_too_short"}:n.length>e.type.max_length?{localeKey:"validation.text_too_long"}:void 0})(e,t);default:throw e.type,new Error(`Unsupported input type: ${e.type.name}; this is a bug, please contact support.`)}}function ha(e,t){const n=t.split("."),r=e[n[0]];if(void 0!==r){if("object"!=typeof r||Array.isArray(r)){if(1!==n.length)throw new Error(`Attempted to read channel property "${t}" expecting an object but found a primitive value; this is a bug, please contact support.`);return r}return ha(r,n.slice(1).join("."))}}const pa=({countryCode:e,size:t=16})=>lt("div",{style:{width:`${t}px`,height:`${t}px`,borderRadius:"50%",backgroundImage:`url(https://assets.xendit.co/payment-session/flags/circle/${e.toLowerCase()}.svg)`,backgroundSize:"cover",backgroundPosition:"center"}}),fa=e=>{const{field:t,onChange:n,onError:r}=e,a=Gt(t),[o,i]=ve(void 0),d=ma.findIndex(e=>e.value===o),s=we(null),l=Ee(e=>{const n=ua(t,e)??null;return r&&r(a,n),n},[t,a,r]);xe(()=>{const e=s.current;if(!e)return;const t=e=>{const t=e.detail.value;l(t)};return e.addEventListener(InternalInputValidateEvent.type,t),()=>{e.removeEventListener(InternalInputValidateEvent.type,t)}},[a,l]),$a(e=>{if(s.current){const t=ma.find(t=>t.value===e);t&&c(t)}});const c=Ee(e=>{i(e.value),s.current&&(s.current.value=e.value),n()},[n]);return lt("div",{children:[lt("input",{type:"hidden",name:a,defaultValue:"",ref:s}),lt(nn,{id:a,options:ma,onChange:c,placeholder:t.placeholder,selectedIndex:d})]})},ma=function(){return $n(ia,arguments)}().map(e=>({title:new Intl.DisplayNames(["en"],{type:"region"}).of(e),value:e,leadingAsset:lt(pa,{countryCode:e})})).sort((e,t)=>e.title.localeCompare(t.title));function $a(e){const t=At(),n=t.details?.country_codes[0],r=Vt(n);ke(()=>{n&&n!==r&&e(n)})}const _a=e=>{const{field:t,onChange:n}=e,r=Gt(t);if(!function(e){return"dropdown"===e.type.name}(t))throw new Error("DropdownField expects field.type.name to be 'dropdown'");return lt(nn,{id:r,placeholder:t.placeholder,options:(a=t.type.options,a.map(e=>({title:e.label,description:e.subtitle,value:e.value}))),onChange:n});var a};const ga="undefined"!=typeof window&&window.HTMLElement?window.HTMLElement:EventTarget;class XenditFormAssociatedFocusTrap extends ga{static tag="xendit-form-associated-focus-trap";static formAssociated=!0;internals;constructor(){super(),this.internals=this.attachInternals()}}var ya;ya=XenditFormAssociatedFocusTrap,"undefined"!=typeof window&&window.customElements&&customElements.define(ya.tag,ya);Mt("https://localhost:4444/secure-iframe.html");const ba=new URL("https://localhost:4444/secure-iframe.html"),va=ba.toString(),xa=ba.origin,ka=e=>{const{field:t,onChange:n,onError:r}=e,a=Ot(),o=Gt(t),i=Nt(),d=we(null),s=we(null),[l,c]=ve(),[u,h]=ve(!1),[p,f]=ve(!1),[m,$]=ve({empty:!0,valid:!1,validationErrorCodes:[]}),[_,g]=ve(null),{card:y}=Vo()??{},b=Ee(e=>{const n=(a=e,i=t.required,a.empty&&i?{localeKey:"validation.required"}:a.validationErrorCodes?.length?a.validationErrorCodes[0]??null:null);var a,i;r&&r(o,n)},[t.required,o,r]),v=Ee(e=>{$(t=>{const n=((e,t)=>e?{valid:e.valid,empty:e.empty,validationErrorCodes:e.validationErrorCodes??[]}:t)(e,t);return!p&&e||b(n),n})},[b,p]);xe(()=>{if(!s.current)return;const e=s.current,t=()=>{b({empty:m.empty,validationErrorCodes:m.validationErrorCodes}),f(!0)};return e.addEventListener(InternalInputValidateEvent.type,t),()=>{e.removeEventListener(InternalInputValidateEvent.type,t)}},[b,m]);const k=Ee(e=>{if(!d.current)return;const r=d.current.contentWindow;if(e.source!==r)return;if(e.origin!==xa)return;const a=e.data;switch(a.type){case"xendit-iframe-ready":c(a.ecdhPublicKey);break;case"xendit-iframe-change":{if(!s.current)return;v(a),g(a.cardBrand);const e=a.encrypted,t=1,r=e.map(e=>a.empty?"":["xendit-encrypted",t,l,e.iv,e.value].join("-"));if(0===r.length)break;s.current.value=r.length>1?JSON.stringify(r):r[0],n?.();break}case"xendit-iframe-focus":h(!0);break;case"xendit-iframe-blur":m.empty||f(!0),v(),h(!1);break;case"xendit-iframe-failed-init":console.error(`Iframe field for ${t.channel_property} failed to initialize securely`)}},[t.channel_property,v,l,n,m.empty]),w=Ee(()=>{d.current?.contentWindow&&d.current.contentWindow.postMessage({type:"xendit-iframe-focus"},xa)},[]);xe(()=>(window.addEventListener("message",k),()=>{window.removeEventListener("message",k)}),[k]);const C=new URL(va);C.searchParams.set("input_type",t.type.name),C.searchParams.set("embedder",window.location.origin),C.searchParams.set("session_id",i.payment_session_id),C.searchParams.set("pk",a[pt].sdkKey.publicKey),C.searchParams.set("sig",a[pt].sdkKey.signature),a[pt].options.iframeFieldAppearance&&C.searchParams.set("appearance",JSON.stringify(a[pt].options.iframeFieldAppearance));return lt(x,{children:lt("div",{className:`xendit-iframe-container ${u?"xendit-field-focus":""}`,children:[lt(XenditFormAssociatedFocusTrap.tag,{id:o,onFocus:w,tabIndex:-1}),lt("input",{type:"hidden",name:o,defaultValue:"",ref:s}),lt("iframe",{src:C.toString(),ref:d,sandbox:"allow-scripts allow-same-origin"}),"credit_card_number"===t.type.name&&y&&lt(wa,{cardsBrandList:y.brands,selectedCardBrand:_})]})})},wa=({cardsBrandList:e,selectedCardBrand:t})=>{if(!e)return null;const n=e.find(e=>e.name===t)?.logo_url;return lt("div",{className:"xendit-card-brands-list",children:t?n&&lt("img",{className:"xendit-card-brand-logo",src:n,alt:t}):e.map(({name:e,logo_url:t})=>lt("img",{className:"xendit-card-brand-logo",src:t,alt:e},e))})};var Ca={AC:"40123",AD:"312345",AE:"501234567",AF:"701234567",AG:"2684641234",AI:"2642351234",AL:"672123456",AM:"77123456",AO:"923123456",AR:"91123456789",AS:"6847331234",AT:"664123456",AU:"412345678",AW:"5601234",AX:"412345678",AZ:"401234567",BA:"61123456",BB:"2462501234",BD:"1812345678",BE:"470123456",BF:"70123456",BG:"43012345",BH:"36001234",BI:"79561234",BJ:"0195123456",BL:"690001234",BM:"4413701234",BN:"7123456",BO:"71234567",BQ:"3181234",BR:"11961234567",BS:"2423591234",BT:"17123456",BW:"71123456",BY:"294911911",BZ:"6221234",CA:"5062345678",CC:"412345678",CD:"991234567",CF:"70012345",CG:"061234567",CH:"781234567",CI:"0123456789",CK:"71234",CL:"221234567",CM:"671234567",CN:"13123456789",CO:"3211234567",CR:"83123456",CU:"51234567",CV:"9911234",CW:"95181234",CX:"412345678",CY:"96123456",CZ:"601123456",DE:"15123456789",DJ:"77831001",DK:"34412345",DM:"7672251234",DO:"8092345678",DZ:"551234567",EC:"991234567",EE:"51234567",EG:"1001234567",EH:"650123456",ER:"7123456",ES:"612345678",ET:"911234567",FI:"412345678",FJ:"7012345",FK:"51234",FM:"3501234",FO:"211234",FR:"612345678",GA:"06031234",GB:"7400123456",GD:"4734031234",GE:"555123456",GF:"694201234",GG:"7781123456",GH:"231234567",GI:"57123456",GL:"221234",GM:"3012345",GN:"601123456",GP:"690001234",GQ:"222123456",GR:"6912345678",GT:"51234567",GU:"6713001234",GW:"955012345",GY:"6091234",HK:"51234567",HN:"91234567",HR:"921234567",HT:"34101234",HU:"201234567",ID:"812345678",IE:"850123456",IL:"502345678",IM:"7924123456",IN:"8123456789",IO:"3801234",IQ:"7912345678",IR:"9123456789",IS:"6111234",IT:"3123456789",JE:"7797712345",JM:"8762101234",JO:"790123456",JP:"9012345678",KE:"712123456",KG:"700123456",KH:"91234567",KI:"72001234",KM:"3212345",KN:"8697652917",KP:"1921234567",KR:"1020000000",KW:"50012345",KY:"3453231234",KZ:"7710009998",LA:"2023123456",LB:"71123456",LC:"7582845678",LI:"660234567",LK:"712345678",LR:"770123456",LS:"50123456",LT:"61234567",LU:"628123456",LV:"21234567",LY:"912345678",MA:"650123456",MC:"612345678",MD:"62112345",ME:"60123456",MF:"690001234",MG:"321234567",MH:"2351234",MK:"72345678",ML:"65012345",MM:"92123456",MN:"88123456",MO:"66123456",MP:"6702345678",MQ:"696201234",MR:"22123456",MS:"6644923456",MT:"96961234",MU:"52512345",MV:"7712345",MW:"991234567",MX:"2221234567",MY:"123456789",MZ:"821234567",NA:"811234567",NC:"751234",NE:"93123456",NF:"381234",NG:"8021234567",NI:"81234567",NL:"612345678",NO:"40612345",NP:"9841234567",NR:"5551234",NU:"8884012",NZ:"211234567",OM:"92123456",PA:"61234567",PE:"912345678",PF:"87123456",PG:"70123456",PH:"9051234567",PK:"3012345678",PL:"512345678",PM:"551234",PR:"7872345678",PS:"599123456",PT:"912345678",PW:"6201234",PY:"961456789",QA:"33123456",RE:"692123456",RO:"712034567",RS:"601234567",RU:"9123456789",RW:"720123456",SA:"512345678",SB:"7421234",SC:"2510123",SD:"911231234",SE:"701234567",SG:"81234567",SH:"51234",SI:"31234567",SJ:"41234567",SK:"912123456",SL:"25123456",SM:"66661212",SN:"701234567",SO:"71123456",SR:"7412345",SS:"977123456",ST:"9812345",SV:"70123456",SX:"7215205678",SY:"944567890",SZ:"76123456",TA:"8999",TC:"6492311234",TD:"63012345",TG:"90112345",TH:"812345678",TJ:"917123456",TK:"7290",TL:"77212345",TM:"66123456",TN:"20123456",TO:"7715123",TR:"5012345678",TT:"8682911234",TV:"901234",TW:"912345678",TZ:"621234567",UA:"501234567",UG:"712345678",US:"2015550123",UY:"94231234",UZ:"912345678",VA:"3123456789",VC:"7844301234",VE:"4121234567",VG:"2843001234",VI:"3406421234",VN:"912345678",VU:"5912345",WF:"821234",WS:"7212345",XK:"43201234",YE:"712345678",YT:"639012345",ZA:"711234567",ZM:"955123456",ZW:"712345678"};const Ea=e=>{const{field:t,onChange:n,onError:r}=e,a=Gt(t),o=Nt(),i=we(null),[d,s]=ve(!1),[l,c]=ve(o.country),u=Ce(()=>{const e=Pa.findIndex(e=>e.value===l);return-1===e?0:e},[l]),h=Pa[u],[p,f]=ve(""),m=we(null),$=Ee((e,t)=>{const n=Sa(e,t);return n?n.number:`+${e.dial}${t}`},[]),_=Ee((e,n)=>{const o=$(e,n),i=ua(t,n.length?o:"")??null;r&&r(a,i)},[t,$,a,r]),g=Ee((e,t)=>{i.current&&(i.current.value=$(e,t))},[$]);function y(e){const t=e;c(t.value),g(t,p),d&&_(t,p),n()}return xe(()=>{const e=i.current;if(!e)return;const t=e=>{const t=e.detail.value;_(h,t)};return e.addEventListener(InternalInputValidateEvent.type,t),()=>{e.removeEventListener(InternalInputValidateEvent.type,t)}},[a,_,h]),$a(e=>{const t=Pa.find(t=>t.value===e);t&&t.value!==l&&y(t)}),lt("div",{className:"xendit-input-phone",children:[lt("div",{className:"xendit-combobox",children:[lt(nn,{options:Pa,selectedIndex:u,onChange:y}),lt("input",{id:a,ref:m,type:"tel",inputMode:"tel",placeholder:function(){return $n(da,arguments)}(h.value,Ca)?.formatInternational()?.replace(`+${la(h.value)} `,"")||"",className:"xendit-text-14 xendit-phone-number-input",onBlur:function(){s(!0),function(){const e=Sa(h,p);if(e){const t=e.formatInternational();f(t.replace(`+${la(h.value)} `,""))}}(),_(h,p)},onChange:function(e){const t=e.target.value;f(t),g(h,t),s(!0),_(h,t),n()},value:p,autoComplete:"tel"})]}),lt("input",{type:"hidden",name:a,ref:i})]})},Pa=ma.map(e=>{const t=la(e.value);return t?{...e,shortTitle:`+${t}`,title:`${e.title} (+${t})`,dial:t}:null}).filter(e=>Boolean(e)),Sa=(e,t)=>{const n=sa(t,e.value);return n&&n.isPossible()?n:null};function Na(e){return{title:e.name,value:e.value}}const Ta=[{name:"Alabama",value:"AL"},{name:"Alaska",value:"AK"},{name:"American Samoa",value:"AS"},{name:"Arizona",value:"AZ"},{name:"Arkansas",value:"AR"},{name:"California",value:"CA"},{name:"Colorado",value:"CO"},{name:"Connecticut",value:"CT"},{name:"Delaware",value:"DE"},{name:"District Of Columbia",value:"DC"},{name:"Federated States Of Micronesia",value:"FM"},{name:"Florida",value:"FL"},{name:"Georgia",value:"GA"},{name:"Guam",value:"GU"},{name:"Hawaii",value:"HI"},{name:"Idaho",value:"ID"},{name:"Illinois",value:"IL"},{name:"Indiana",value:"IN"},{name:"Iowa",value:"IA"},{name:"Kansas",value:"KS"},{name:"Kentucky",value:"KY"},{name:"Louisiana",value:"LA"},{name:"Maine",value:"ME"},{name:"Marshall Islands",value:"MH"},{name:"Maryland",value:"MD"},{name:"Massachusetts",value:"MA"},{name:"Michigan",value:"MI"},{name:"Minnesota",value:"MN"},{name:"Mississippi",value:"MS"},{name:"Missouri",value:"MO"},{name:"Montana",value:"MT"},{name:"Nebraska",value:"NE"},{name:"Nevada",value:"NV"},{name:"New Hampshire",value:"NH"},{name:"New Jersey",value:"NJ"},{name:"New Mexico",value:"NM"},{name:"New York",value:"NY"},{name:"North Carolina",value:"NC"},{name:"North Dakota",value:"ND"},{name:"Northern Mariana Islands",value:"MP"},{name:"Ohio",value:"OH"},{name:"Oklahoma",value:"OK"},{name:"Oregon",value:"OR"},{name:"Palau",value:"PW"},{name:"Pennsylvania",value:"PA"},{name:"Puerto Rico",value:"PR"},{name:"Rhode Island",value:"RI"},{name:"South Carolina",value:"SC"},{name:"South Dakota",value:"SD"},{name:"Tennessee",value:"TN"},{name:"Texas",value:"TX"},{name:"Utah",value:"UT"},{name:"Vermont",value:"VT"},{name:"Virgin Islands",value:"VI"},{name:"Virginia",value:"VA"},{name:"Washington",value:"WA"},{name:"West Virginia",value:"WV"},{name:"Wisconsin",value:"WI"},{name:"Wyoming",value:"WY"}].map(Na),Aa=[{name:"Alberta",value:"AB"},{name:"British Columbia",value:"BC"},{name:"Manitoba",value:"MB"},{name:"New Brunswick",value:"NB"},{name:"Newfoundland and Labrador",value:"NL"},{name:"Northwest Territories",value:"NT"},{name:"Nova Scotia",value:"NS"},{name:"Nunavut",value:"NU"},{name:"Ontario",value:"ON"},{name:"Prince Edward Island",value:"PE"},{name:"Quebec",value:"QC"},{name:"Saskatchewan",value:"SK"},{name:"Yukon Territory",value:"YT"}].map(Na),Oa=[{name:"Avon"},{name:"Bedfordshire"},{name:"Berkshire"},{name:"Buckinghamshire"},{name:"Cambridgeshire"},{name:"Cheshire"},{name:"Cleveland"},{name:"Cornwall"},{name:"Cumbria"},{name:"Derbyshire"},{name:"Devon"},{name:"Dorset"},{name:"Durham"},{name:"East Sussex"},{name:"Essex"},{name:"Gloucestershire"},{name:"Hampshire"},{name:"Herefordshire"},{name:"Hertfordshire"},{name:"Isle of Wight"},{name:"Kent"},{name:"Lancashire"},{name:"Leicestershire"},{name:"Lincolnshire"},{name:"London"},{name:"Merseyside"},{name:"Norfolk"},{name:"Northamptonshire"},{name:"Northumberland"},{name:"North Yorkshire"},{name:"Nottinghamshire"},{name:"Oxfordshire"},{name:"Rutland"},{name:"Shropshire"},{name:"Somerset"},{name:"South Yorkshire"},{name:"Staffordshire"},{name:"Suffolk"},{name:"Surrey"},{name:"Tyne and Wear"},{name:"Warwickshire"},{name:"West Midlands"},{name:"West Sussex"},{name:"West Yorkshire"},{name:"Wiltshire"},{name:"Worcestershire"},{name:"Clwyd"},{name:"Dyfed"},{name:"Gwent"},{name:"Gwynedd"},{name:"Mid Glamorgan"},{name:"Powys"},{name:"South Glamorgan"},{name:"West Glamorgan"},{name:"Aberdeenshire"},{name:"Angus"},{name:"Argyll"},{name:"Ayrshire"},{name:"Banffshire"},{name:"Berwickshire"},{name:"Bute"},{name:"Caithness"},{name:"Clackmannanshire"},{name:"Dumfriesshire"},{name:"Dunbartonshire"},{name:"East Lothian"},{name:"Fife"},{name:"Inverness-shire"},{name:"Kincardineshire"},{name:"Kinross-shire"},{name:"Kirkcudbrightshire"},{name:"Lanarkshire"},{name:"Midlothian"},{name:"Moray"},{name:"Nairnshire"},{name:"Orkney"},{name:"Peeblesshire"},{name:"Perthshire"},{name:"Renfrewshire"},{name:"Ross-shire"},{name:"Roxburghshire"},{name:"Selkirkshire"},{name:"Shetland"},{name:"Stirlingshire"},{name:"Sutherland"},{name:"West Lothian"},{name:"Wigtownshire"},{name:"Antrim"},{name:"Armagh"},{name:"Down"},{name:"Fermanagh"},{name:"Londonderry"},{name:"Tyrone"}].map(e=>({title:e.name,value:e.name})),Ia=e=>{const{field:t,onChange:n,onError:r}=e,a=Gt(t),o=Nt(),i=Vo()?.form,d=Ro(),s=we(null),l=Ee(e=>{const n=ua(t,e)??null;return r&&r(a,n),n},[t,a,r]);xe(()=>{const e=s.current;if(!e)return;const t=e=>{const t=e.detail.value;l(t)};return e.addEventListener(InternalInputValidateEvent.type,t),()=>{e.removeEventListener(InternalInputValidateEvent.type,t)}},[a,l]);const c=Ee(()=>{s.current&&(s.current.value=""),n()},[n]),u=Ee(e=>{s.current&&(s.current.value=e.value,l(s.current.value)),n()},[n,l]),h=Ee(e=>{s.current&&(s.current.value=e.target.value,l(s.current.value)),n()},[n,l]),p=function(e){switch(e){case"US":return Ta;case"CA":return Aa;case"GB":return Oa;default:return null}}(function(e,t,n,r){if(t)for(let r=0;r<t.length;r++){const a=t[r];if(r>0&&a===e){const e=t[r-1];if("country"===e.type.name){const t=Xt(e.channel_property,n);if(t&&"string"==typeof t)return t}}}return r.country}(t,i??[],d??{},o)),f=Vt(p);return ke(()=>{f!==p&&c()},[c,p,f]),lt(x,{children:[lt("input",{type:"hidden",name:a,defaultValue:"",ref:s}),p?lt(nn,{id:a,options:p,onChange:u,placeholder:t.placeholder},(m=p,Yt.has(m)||Yt.set(m,zt++),Yt.get(m).toString())):lt("input",{type:"text",id:a,onChange:h,placeholder:t.placeholder,className:"xendit-input xendit-text-14"})]});var m};const Ra=e=>{const{field:t,onChange:n,onError:r}=e,a=Gt(t),[o,i]=ve(!1),d=we(null);const s=Ee(e=>{const n=ua(t,e)??null;return r&&r(a,n),i(!0),n},[t,a,r]);return xe(()=>{const e=d.current;if(!e)return;const t=e=>{const t=e.detail.value;s(t)};return e.addEventListener(InternalInputValidateEvent.type,t),()=>{e.removeEventListener(InternalInputValidateEvent.type,t)}},[a,s]),lt(x,{children:lt("input",{id:a,name:a,ref:d,type:"text",placeholder:t.placeholder,className:"xendit-text-14",onBlur:function(e){const t=e.target.value;t&&s(t)},onChange:function(e){if(n(),!o)return;const t=e.target.value;s(t)},minLength:La(t)?t.type.min_length:void 0,maxLength:La(t)?t.type.max_length:void 0})})};function La(e){return"text"===e.type.name}const Ma=e=>{const{field:t,className:n}=e;return lt("div",{className:`${n} xendit-channel-form-field xendit-form-field-span-${t.span}`,children:function(){switch(t.type.name){case"credit_card_number":case"credit_card_expiry":case"credit_card_cvn":return lt(ka,{...e});case"phone_number":return lt(Ea,{...e});case"text":case"email":case"postal_code":return lt(Ra,{...e});case"dropdown":return lt(_a,{...e});case"country":return lt(fa,{...e});case"province":return lt(Ia,{...e})}}()})},Da=e=>"string"==typeof e,Ua=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Fa=e=>null==e?"":""+e,Ba=/###/g,ja=e=>e&&e.indexOf("###")>-1?e.replace(Ba,"."):e,qa=e=>!e||Da(e),Ka=(e,t,n)=>{const r=Da(t)?t.split("."):t;let a=0;for(;a<r.length-1;){if(qa(e))return{};const t=ja(r[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return qa(e)?{}:{obj:e,k:ja(r[a])}},Va=(e,t,n)=>{const{obj:r,k:a}=Ka(e,t,Object);if(void 0!==r||1===t.length)return void(r[a]=n);let o=t[t.length-1],i=t.slice(0,t.length-1),d=Ka(e,i,Object);for(;void 0===d.obj&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),d=Ka(e,i,Object),d?.obj&&void 0!==d.obj[`${d.k}.${o}`]&&(d.obj=void 0);d.obj[`${d.k}.${o}`]=n},Ga=(e,t)=>{const{obj:n,k:r}=Ka(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Ha=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?Da(e[r])||e[r]instanceof String||Da(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Ha(e[r],t[r],n):e[r]=t[r]);return e},Wa=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Xa={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Ya=e=>Da(e)?e.replace(/[&<>"'\/]/g,e=>Xa[e]):e;const za=[" ",",","?","!",";"],Za=new class RegExpCache{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Ja=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let a=e;for(let e=0;e<r.length;){if(!a||"object"!=typeof a)return;let t,o="";for(let i=e;i<r.length;++i)if(i!==e&&(o+=n),o+=r[i],t=a[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&i<r.length-1)continue;e+=i-e+1;break}a=t}return a},Qa=e=>e?.replace("_","-"),eo={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Logger{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||eo,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(Da(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Logger(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Logger(this.logger,e)}}var to=new Logger;class EventEmitter{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let a=0;a<r;a++)n.apply(n,[e,...t])})}}}class ResourceStore extends EventEmitter{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const a=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;e.indexOf(".")>-1?i=e.split("."):(i=[e,t],n&&(Array.isArray(n)?i.push(...n):Da(n)&&a?i.push(...n.split(a)):i.push(n)));const d=Ga(this.data,i);return!d&&!t&&!n&&e.indexOf(".")>-1&&(e=i[0],t=i[1],n=i.slice(2).join(".")),!d&&o&&Da(n)?Ja(this.data?.[e]?.[t],n,a):d}addResource(e,t,n,r,a={silent:!1}){const o=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator;let i=[e,t];n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split("."),r=t,t=i[1]),this.addNamespaces(t),Va(this.data,i,r),a.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(Da(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,a,o={silent:!1,skipCopy:!1}){let i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),r=n,n=t,t=i[1]),this.addNamespaces(t);let d=Ga(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Ha(d,n,a):d={...d,...n},Va(this.data,i,d),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var no={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,a){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,a)??t}),t}};const ro=Symbol("i18next/PATH_KEY");function ao(e,t){const{[ro]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,a)=>(n?.revoke?.(),a===ro?e:(e.push(a),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const oo={},io=e=>!Da(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Translator extends EventEmitter{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=to.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);if(void 0===r?.res)return!1;const a=io(r.res);return!1!==n.returnObjects||!a}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,i=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=za.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const a=Za.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!a.test(e);if(!o){const t=e.indexOf(n);t>0&&!a.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!i){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Da(a)?[a]:a};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(a=o.shift()),e=o.join(r)}return{key:e,namespaces:Da(a)?[a]:a}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=ao(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const a=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:i,namespaces:d}=this.extractFromKey(e[e.length-1],r),s=d[d.length-1];let l=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===l&&(l=":");const c=r.lng||this.language,u=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===c?.toLowerCase())return u?a?{res:`${s}${l}${i}`,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(r)}:`${s}${l}${i}`:a?{res:i,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(r)}:i;const h=this.resolve(e,r);let p=h?.res;const f=h?.usedKey||i,m=h?.exactUsedKey||i,$=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,g=void 0!==r.count&&!Da(r.count),y=Translator.hasDefaultValue(r),b=g?this.pluralResolver.getSuffix(c,r.count,r):"",v=r.ordinal&&g?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",x=g&&!r.ordinal&&0===r.count,k=x&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${b}`]||r[`defaultValue${v}`]||r.defaultValue;let w=p;_&&!p&&y&&(w=k);const C=io(w),E=Object.prototype.toString.apply(w);if(!(_&&w&&C&&["[object Number]","[object Function]","[object RegExp]"].indexOf(E)<0)||Da($)&&Array.isArray(w))if(_&&Da($)&&Array.isArray(p))p=p.join($),p&&(p=this.extendTranslation(p,e,r,n));else{let t=!1,a=!1;!this.isValidLookup(p)&&y&&(t=!0,p=k),this.isValidLookup(p)||(a=!0,p=i);const d=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:p,u=y&&k!==p&&this.options.updateMissing;if(a||t||u){if(this.logger.log(u?"updateKey":"missingKey",c,s,i,u?k:p),o){const e=this.resolve(i,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const a=y&&n!==p?n:d;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,t,a,u,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,s,t,a,u,r),this.emit("missingKey",e,s,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&g?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);x&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],i+t,r[`defaultValue${t}`]||k)})}):n(e,i,k))}p=this.extendTranslation(p,e,r,h,n),a&&p===i&&this.options.appendNamespaceToMissingKey&&(p=`${s}${l}${i}`),(a||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}${l}${i}`:i,t?p:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,w,{...r,ns:d}):`key '${i} (${this.language})' returned an object instead of string.`;return a?(h.res=e,h.usedParams=this.getUsedParamsDetails(r),h):e}if(o){const e=Array.isArray(w),t=e?[]:{},n=e?m:f;for(const e in w)if(Object.prototype.hasOwnProperty.call(w,e)){const a=`${n}${o}${e}`;t[e]=y&&!p?this.translate(a,{...r,defaultValue:io(k)?k[e]:void 0,joinArrays:!1,ns:d}):this.translate(a,{...r,joinArrays:!1,ns:d}),t[e]===a&&(t[e]=w[e])}p=t}}return a?(h.res=p,h.usedParams=this.getUsedParamsDetails(r),h):p}extendTranslation(e,t,n,r,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o=Da(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let i;if(o){const t=e.match(this.interpolator.nestingRegexp);i=t&&t.length}let d=n.replace&&!Da(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language||r.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);i<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>a?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,i=Da(o)?[o]:o;return null!=e&&i?.length&&!1!==n.applyPostProcessor&&(e=no.handle(i,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,a,o,i;return Da(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const d=this.extractFromKey(e,t),s=d.key;r=s;let l=d.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==t.count&&!Da(t.count),u=c&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(Da(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(i=e,oo[`${p[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(i)||(oo[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(r=>{if(this.isValidLookup(n))return;o=r;const i=[s];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,s,r,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,a=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(a)&&i.push(s+e.replace(a,this.options.pluralSeparator)),i.push(s+e),u&&i.push(s+n)),h){const r=`${s}${this.options.contextSeparator||"_"}${t.context}`;i.push(r),c&&(t.ordinal&&0===e.indexOf(a)&&i.push(r+e.replace(a,this.options.pluralSeparator)),i.push(r+e),u&&i.push(r+n))}}let d;for(;d=i.pop();)this.isValidLookup(n)||(a=d,n=this.getResource(r,e,d,t))}))})}),{res:n,usedKey:r,exactUsedKey:a,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Da(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class LanguageUtil{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=to.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Qa(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Qa(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Da(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Da(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],a=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Da(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):Da(e)&&a(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&a(this.formatLanguageCode(e))}),r}}const so={zero:0,one:1,two:2,few:3,many:4,other:5},lo={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=to.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Qa("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:r});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),lo;if(!e.match(/-|_/))return lo;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[a]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>so[e]-so[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const co=(e,t,n,r=".",a=!0)=>{let o=((e,t,n)=>{const r=Ga(e,n);return void 0!==r?r:Ga(t,n)})(e,t,n);return!o&&a&&Da(n)&&(o=Ja(e,n,r),void 0===o&&(o=Ja(t,n,r))),o},uo=e=>e.replace(/\$/g,"$$$$");class Interpolator{constructor(e={}){this.logger=to.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:a,prefixEscaped:o,suffix:i,suffixEscaped:d,formatSeparator:s,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:u,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:m,maxReplaces:$,alwaysFormat:_}=e.interpolation;this.escape=void 0!==t?t:Ya,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=a?Wa(a):o||"{{",this.suffix=i?Wa(i):d||"}}",this.formatSeparator=s||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=u?Wa(u):h||Wa("$t("),this.nestingSuffix=p?Wa(p):f||Wa(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=$||1e3,this.alwaysFormat=void 0!==_&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let a,o,i;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},s=e=>{if(e.indexOf(this.formatSeparator)<0){const a=co(t,d,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(a,void 0,n,{...r,...t,interpolationkey:e}):a}const a=e.split(this.formatSeparator),o=a.shift().trim(),i=a.join(this.formatSeparator).trim();return this.format(co(t,d,o,this.options.keySeparator,this.options.ignoreJSONStructure),i,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>uo(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?uo(this.escape(e)):uo(e)}].forEach(t=>{for(i=0;a=t.regex.exec(e);){const n=a[1].trim();if(o=s(n),void 0===o)if("function"==typeof l){const t=l(e,a,r);o=Da(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(c){o=a[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else Da(o)||this.useRawValueToEscape||(o=Fa(o));const d=t.safeValue(o);if(e=e.replace(a[0],d),c?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,a,o;const i=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let a=`{${r[1]}`;e=r[0],a=this.interpolate(a,o);const i=a.match(/'/g),d=a.match(/"/g);((i?.length??0)%2==0&&!d||d.length%2!=0)&&(a=a.replace(/'/g,'"'));try{o=JSON.parse(a),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${a}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let d=[];o={...n},o=o.replace&&!Da(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const s=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==s&&(d=r[1].slice(s).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,s)),a=t(i.call(this,r[1].trim(),o),o),a&&r[0]===e&&!Da(a))return a;Da(a)||(a=Fa(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),d.length&&(a=d.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}const ho=e=>{const t={};return(n,r,a)=>{let o=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(o={...o,[a.interpolationkey]:void 0});const i=r+JSON.stringify(o);let d=t[i];return d||(d=e(Qa(r),a),t[i]=d),d(n)}},po=e=>(t,n,r)=>e(Qa(n),r)(t);class Formatter{constructor(e={}){this.logger=to.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?ho:po;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ho(t)}format(e,t,n,r={}){const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(e=>e.indexOf(")")>-1)){const e=a.findIndex(e=>e.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,e)].join(this.formatSeparator)}const o=a.reduce((e,t)=>{const{formatName:a,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const a=r[1].substring(0,r[1].length-1);"currency"===t&&a.indexOf(":")<0?n.currency||(n.currency=a.trim()):"relativetime"===t&&a.indexOf(":")<0?n.range||(n.range=a.trim()):a.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),a=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=a),"false"===a&&(n[o]=!1),"true"===a&&(n[o]=!0),isNaN(a)||(n[o]=parseInt(a,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[a]){let t=e;try{const i=r?.formatParams?.[r.interpolationkey]||{},d=i.locale||i.lng||r.locale||r.lng||n;t=this.formats[a](e,d,{...o,...r,...i})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${a}`),e},e);return o}}class Connector extends EventEmitter{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=to.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const a={},o={},i={},d={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const i=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[i]=2:this.state[i]<0||(1===this.state[i]?void 0===o[i]&&(o[i]=!0):(this.state[i]=1,r=!1,void 0===o[i]&&(o[i]=!0),void 0===a[i]&&(a[i]=!0),void 0===d[t]&&(d[t]=!0)))}),r||(i[e]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(d)}}loaded(e,t,n){const r=e.split("|"),a=r[0],o=r[1];t&&this.emit("failedLoading",a,o,t),!t&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const i={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:a}=Ka(e,t,Object);r[a]=r[a]||[],r[a].push(n)})(n.loaded,[a],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{i[e]||(i[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===i[e][t]&&(i[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,a=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:a,callback:o});this.readingCalls++;const i=(i,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}i&&d&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*a,o)},a):o(i,d)},d=this.backend[n].bind(this.backend);if(2!==d.length)return d(e,t,i);try{const n=d(e,t);n&&"function"==typeof n.then?n.then(e=>i(null,e)).catch(i):i(null,n)}catch(e){i(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Da(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Da(t)&&(t=[t]);const a=this.queueLoad(e,t,n,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],a=n[1];this.read(r,a,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${a} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${a} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,a,o={},i=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const d={...o,isUpdate:a},s=this.backend.create.bind(this.backend);if(s.length<6)try{let a;a=5===s.length?s(e,t,n,r,d):s(e,t,n,r),a&&"function"==typeof a.then?a.then(e=>i(null,e)).catch(i):i(null,a)}catch(e){i(e)}else s(e,t,n,r,i,d)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const fo=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Da(e[1])&&(t.defaultValue=e[1]),Da(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),mo=e=>(Da(e.ns)&&(e.ns=[e.ns]),Da(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Da(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),$o=()=>{};class I18n extends EventEmitter{constructor(e={},t){var n;if(super(),this.options=mo(e),this.services={},this.logger=to,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(Da(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=fo();this.options={...n,...this.options,...mo(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?to.init(r(this.modules.logger),this.options):to.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Formatter;const t=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const a=this.services;a.logger=to,a.resourceStore=this.store,a.languageUtils=t,a.pluralResolver=new PluralResolver(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(a.formatter=r(e),a.formatter.init&&a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new Interpolator(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new Connector(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(a.languageDetector=r(this.modules.languageDetector),a.languageDetector.init&&a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=r(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=$o),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const a=Ua(),o=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),a}loadResources(e,t=$o){let n=t;const r=Da(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===r?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=Ua();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=$o),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&no.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Ua();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(a,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(a,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Da(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Da(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{a(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...a)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(a)):{...t},o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);const i=this.options.keySeparator||".";let d;return o.keyPrefix&&Array.isArray(e)?d=e.map(e=>("function"==typeof e&&(e=ao(e,{...this.options,...t})),`${o.keyPrefix}${i}${e}`)):("function"==typeof e&&(e=ao(e,{...this.options,...t})),d=o.keyPrefix?`${o.keyPrefix}${i}${e}`:e),this.t(d,o)};return Da(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(a,e)))}loadNamespaces(e,t){const n=Ua();return this.options.ns?(Da(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Ua();Da(e)&&(e=[e]);const r=this.options.preload||[],a=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=r.concat(a),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new LanguageUtil(fo());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new I18n(e,t);return n.createInstance=I18n.createInstance,n}cloneInstance(e={},t=$o){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new I18n(r);void 0===e.debug&&void 0===e.prefix||(a.logger=a.logger.clone(e));if(["store","services","language"].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});a.store=new ResourceStore(e,r),a.services.resourceStore=a.store}return a.translator=new Translator(a.services,r),a.translator.on("*",(e,...t)=>{a.emit(e,...t)}),a.init(r,t),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const _o=I18n.createInstance(),go=_o.createInstance;_o.dir,_o.init,_o.loadResources,_o.reloadResources,_o.use,_o.changeLanguage,_o.getFixedT,_o.t,_o.exists,_o.setDefaultNamespace,_o.hasLoadedNamespace,_o.loadNamespaces,_o.loadLanguages;var yo={session:{"validation.card_cvn_invalid":"CVN is not valid","validation.card_expiry_invalid":"Card expiry is not valid","validation.card_number_incomplete":"Card number is incomplete","validation.card_number_invalid":"Card number is not valid","validation.generic_invalid":"{{field}} is not valid","validation.required":"{{field}} is required","validation.text_too_long":"{{field}} is too long","validation.text_too_short":"{{field}} is too short","payment.save_checkbox_label":"Save for faster payment next time","payment_methods.add_payment_method":"Add payment method","payment_methods.channel_disabled_amount_too_large":"Not available for this payment","payment_methods.channel_disabled_amount_too_small":"Not available for this payment","payment_methods.pay_with":"Pay with","payment_methods.select_channel_placeholder":"Select {{groupName}}","default_error.message_1":"There was a problem with the request.","default_error.message_2":"Please try again later.","default_error.title":"Error","failure_code.account_access_blocked":"Your payment was declined. Please try again or use a different payment method.","failure_code.account_already_linked":"Your account has already been linked. Please use a different payment method.","failure_code.account_not_activated":"Your payment couldn’t be processed because your account hasn’t been activated. Please activate your account and try again.","failure_code.authentication_failed":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.capture_amount_exceeded":"Your payment couldn't be processed. Please make sure your payment details are correct and try again, or use a different payment method.","failure_code.card_declined":"Your card was declined. Please try again with another card or payment method.","failure_code.channel_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.declined_by_issuer":"Your payment was declined. Please try again or use a different payment method.","failure_code.declined_by_processor":"Your payment was declined. Please try again or use a different payment method.","failure_code.expired_card":"Your card was declined because it is expired. Please try again or use a different payment method.","failure_code.expired_otp":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.failure_details_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.inactive_or_unauthorized_card":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.insufficient_balance":"Your payment couldn’t be processed because your account balance is insufficient. Please make sure you have enough funds and try again.","failure_code.invalid_account_details":"Your payment information is incorrect. Please double-check your card details or try a different payment method.","failure_code.invalid_cvv":"The CVN entered was incorrect. Please try again.","failure_code.invalid_merchant_settings":"Your payment couldn’t be processed. Please contact the seller or try a different payment method.","failure_code.invalid_otp":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.invalid_token":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.issuer_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.otp_attempt_counts_exceeded":"Your payment couldn’t be processed because there were too many failed OTP attempts. Please make the payment again or use a different payment method.","failure_code.partner_timeout_error":"Your payment couldn't be processed. Please try again or use a different payment method.","failure_code.payment_amount_limits_exceeded":"Your payment couldn’t be processed because you’ve exceeded your transaction limit. Please use a different payment method.","failure_code.payment_attempt_counts_exceeded":"Your payment couldn’t be processed due to too many failed attempts.","failure_code.payment_request_expired":"Your payment couldn’t be processed because the link has expired. Please try again or use a different payment method.","failure_code.processor_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.server_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.stolen_card":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.suspected_fraudulent":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.timeout_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.user_declined_payment":"Your payment was declined. Please try again or use a different payment method.","failure_code.user_device_unreachable":"Your payment couldn’t be processed due to a network issue. Please try again or use a different payment method.","failure_code.user_did_not_authorize":"Your payment couldn’t be processed because it wasn’t authorized in time. Please try again.",failure_code_unknown:"A failure occurred with code {{failureCode}}","payment_request_status.canceled.subtext":"Please try to check out again or contact the seller if the problem persists.","payment_request_status.canceled.title":"This page is no longer available","payment_request_status.expired.subtext":"Your payment couldn’t be processed. Please try again or use a different payment method.","payment_request_status.expired.title":"Payment unsuccessful","payment_request_status.failed.subtext":"Your payment couldn't be processed. Please try a different payment method or submit an inquiry to the seller by sharing your Unique Identifiers.","payment_request_status.failed.title":"Payment failed","payment_token_status.canceled.subtext":"Please try again or use a different payment method.","payment_token_status.canceled.title":"Payment method couldn't be added","payment_token_status.expired.subtext":"Please try again or use a different payment method.","payment_token_status.expired.title":"Payment method couldn't be added","payment_token_status.failed.subtext":"Your payment couldn't be processed. Please try a different payment method or submit an inquiry to the seller by sharing your Unique Identifiers.","payment_token_status.failed.title":"Payment method couldn't be added"}},bo={session:{"validation.card_cvn_invalid":"CVN tidak valid","validation.card_expiry_invalid":"Tanggal kedaluwarsa kartu tidak valid","validation.card_number_incomplete":"Nomor kartu tidak lengkap","validation.card_number_invalid":"Nomor kartu tidak valid","validation.generic_invalid":"{{field}} tidak valid","validation.required":"{{field}} wajib diisi","validation.text_too_long":"{{field}} terlalu panjang","validation.text_too_short":"{{field}} terlalu pendek","payment.save_checkbox_label":"Simpan untuk pembayaran lebih cepat lain kali","payment_methods.add_payment_method":"Tambah metode pembayaran","payment_methods.channel_disabled_amount_too_large":"Tidak tersedia untuk pembayaran ini","payment_methods.channel_disabled_amount_too_small":"Tidak tersedia untuk pembayaran ini","payment_methods.pay_with":"Bayar dengan","payment_methods.select_channel_placeholder":"Pilih {{groupName}}","default_error.message_1":"Ada masalah dengan permintaan ini.","default_error.message_2":"Silakan coba lagi nanti.","default_error.title":"Error","failure_code.account_access_blocked":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.account_already_linked":"Akun Anda sudah di-link. Silakan gunakan metode pembayaran lain.","failure_code.account_not_activated":"Pembayaran Anda tidak dapat diproses karena akun Anda belum diaktifkan. Harap aktifkan akun Anda dan coba lagi.","failure_code.authentication_failed":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.capture_amount_exceeded":"Pembayaran Anda tidak dapat diproses. Pastikan detail pembayaran Anda benar dan coba lagi, atau gunakan metode pembayaran lain.","failure_code.card_declined":"Kartu Anda ditolak. Silakan coba lagi dengan kartu atau metode pembayaran lain.","failure_code.channel_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.declined_by_issuer":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.declined_by_processor":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.expired_card":"Kartu Anda ditolak karena sudah kedaluwarsa. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.expired_otp":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.failure_details_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.inactive_or_unauthorized_card":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.insufficient_balance":"Pembayaran Anda tidak dapat diproses karena saldo akun Anda tidak mencukupi. Pastikan Anda memiliki dana yang cukup dan coba lagi.","failure_code.invalid_account_details":"Informasi pembayaran Anda salah. Harap periksa kembali detail kartu Anda atau coba gunakan metode pembayaran lain.","failure_code.invalid_cvv":"CVN yang dimasukkan salah. Silakan coba lagi.","failure_code.invalid_merchant_settings":"Pembayaran Anda tidak dapat diproses. Silakan hubungi penjual atau coba metode pembayaran lain.","failure_code.invalid_otp":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.invalid_token":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.issuer_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.otp_attempt_counts_exceeded":"Pembayaran Anda tidak dapat diproses karena terlalu banyak percobaan OTP yang gagal. Harap lakukan pembayaran lagi atau gunakan metode pembayaran lain.","failure_code.partner_timeout_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.payment_amount_limits_exceeded":"Pembayaran Anda tidak dapat diproses karena Anda telah melampaui batas transaksi. Silakan gunakan metode pembayaran lain.","failure_code.payment_attempt_counts_exceeded":"Pembayaran Anda tidak dapat diproses karena terlalu banyak percobaan yang gagal.","failure_code.payment_request_expired":"Pembayaran Anda tidak dapat diproses karena link telah kedaluwarsa. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.processor_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.server_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.stolen_card":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.suspected_fraudulent":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.timeout_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_declined_payment":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_device_unreachable":"Pembayaran Anda tidak dapat diproses karena masalah jaringan. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_did_not_authorize":"Pembayaran Anda tidak dapat diproses karena waktu pembayaran telah habis. Silakan coba lagi.",failure_code_unknown:"Terjadi kegagalan dengan kode {{failureCode}}","payment_request_status.canceled.subtext":"Silakan coba check out lagi atau hubungi penjual jika masalah terus berlanjut.","payment_request_status.canceled.title":"Halaman ini tidak tersedia lagi","payment_request_status.expired.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","payment_request_status.expired.title":"Pembayaran tidak berhasil","payment_request_status.failed.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba metode pembayaran lain atau ajukan pertanyaan kepada penjual dengan membagikan ID Unik Anda.","payment_request_status.failed.title":"Pembayaran gagal","payment_token_status.canceled.subtext":"Silakan coba lagi atau gunakan metode pembayaran lain.","payment_token_status.canceled.title":"Metode pembayaran tidak dapat ditambahkan","payment_token_status.expired.subtext":"Silakan coba lagi atau gunakan metode pembayaran lain.","payment_token_status.expired.title":"Metode pembayaran tidak dapat ditambahkan","payment_token_status.failed.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba metode pembayaran lain atau ajukan pertanyaan kepada penjual dengan membagikan ID Unik Anda.","payment_token_status.failed.title":"Metode pembayaran tidak dapat ditambahkan"}},vo={session:{"validation.card_cvn_invalid":"CVN ไม่ถูกต้อง","validation.card_expiry_invalid":"วันหมดอายุของบัตรไม่ถูกต้อง","validation.card_number_incomplete":"หมายเลขบัตรไม่ครบถ้วน","validation.card_number_invalid":"หมายเลขบัตรไม่ถูกต้อง","validation.generic_invalid":"{{field}} ไม่ถูกต้อง","validation.required":"กรุณากรอก {{field}}","validation.text_too_long":"{{field}} ยาวเกินไป","validation.text_too_short":"{{field}} สั้นเกินไป","payment.save_checkbox_label":"บันทึกไว้สำหรับการชำระเงินที่เร็วขึ้นในครั้งถัดไป","payment_methods.add_payment_method":"เพิ่มวิธีการชำระเงิน","payment_methods.channel_disabled_amount_too_large":"ไม่สามารถใช้ได้กับการชำระเงินนี้","payment_methods.channel_disabled_amount_too_small":"ไม่สามารถใช้ได้กับการชำระเงินนี้","payment_methods.pay_with":"ชำระเงินด้วย","payment_methods.select_channel_placeholder":"เลือก {{groupName}}","default_error.message_1":"มีปัญหาในการประมวลผลคำขอ","default_error.message_2":"โปรดลองอีกครั้งในภายหลัง","default_error.title":"ข้อผิดพลาด","failure_code.account_access_blocked":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.account_already_linked":"บัญชีนี้มีการเชื่อมต่อไว้แล้ว กรุณาเลือกวิธีการชำระเงินอื่น","failure_code.account_not_activated":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากบัญชีของคุณยังไม่ได้เปิดใช้งาน กรุณาเปิดใช้งานบัญชีและลองใหม่อีกครั้ง","failure_code.authentication_failed":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.capture_amount_exceeded":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาตรวจสอบรายละเอียดการชำระเงินให้ถูกต้องแล้วลองใหม่อีกครั้ง หรือใช้วิธีการชำระเงินอื่น","failure_code.card_declined":"บัตรของคุณถูกปฏิเสธ กรุณาลองใหม่ด้วยบัตรหรือวิธีการชำระเงินอื่น","failure_code.channel_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.declined_by_issuer":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.declined_by_processor":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.expired_card":"บัตรของคุณถูกปฏิเสธเนื่องจากบัตรหมดอายุ กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","failure_code.expired_otp":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.failure_details_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.inactive_or_unauthorized_card":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.insufficient_balance":"ไม่สามารถดำเนินการชำระเงินได้ เนื่องจากยอดเงินในบัญชีไม่เพียงพอ กรุณาตรวจสอบให้แน่ใจว่ามียอดเงินเพียงพอแล้วลองใหม่อีกครั้ง","failure_code.invalid_account_details":"ข้อมูลการชำระเงินไม่ถูกต้อง กรุณาตรวจสอบรายละเอียดบัตรอีกครั้ง หรือใช้วิธีการชำระเงินอื่น","failure_code.invalid_cvv":"CVN ที่กรอกไม่ถูกต้อง กรุณาลองใหม่อีกครั้ง","failure_code.invalid_merchant_settings":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาติดต่อผู้ขายหรือลองใช้วิธีชำระเงินอื่น","failure_code.invalid_otp":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.invalid_token":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.issuer_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.otp_attempt_counts_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากมีการกรอกรหัส OTP ผิดพลาดมากเกินไป กรุณาชำระเงินใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.partner_timeout_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.payment_amount_limits_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากคุณทำธุรกรรมเกินขีดจำกัด กรุณาใช้วิธีชำระเงินอื่น","failure_code.payment_attempt_counts_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากพยายามล้มเหลวหลายครั้งเกินไป","failure_code.payment_request_expired":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากลิงก์หมดอายุแล้ว กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.processor_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.server_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.stolen_card":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.suspected_fraudulent":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.timeout_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_declined_payment":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_device_unreachable":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากปัญหาเครือข่าย กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_did_not_authorize":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากไม่ได้รับการอนุมัติภายในเวลาที่กำหนด กรุณาลองใหม่อีกครั้ง",failure_code_unknown:"เกิดข้อผิดพลาดขึ้น (รหัส: {{failureCode}})","payment_request_status.canceled.subtext":"กรุณาลองชำระเงินอีกครั้ง หรือ ติดต่อผู้ขายหากปัญหายังคงเกิดขึ้น","payment_request_status.canceled.title":"หน้านี้ไม่สามารถใช้งานได้แล้ว","payment_request_status.expired.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือลองใช้วิธีชำระเงินอื่น","payment_request_status.expired.title":"ชำระเงินไม่สำเร็จ","payment_request_status.failed.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใช้วิธีการชำระเงินอื่น หรือส่งคำถามไปยังผู้ขายโดยแชร์ Unique Identifiers ของคุณ","payment_request_status.failed.title":"ชำระเงินไม่สำเร็จ","payment_token_status.canceled.subtext":"กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","payment_token_status.canceled.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","payment_token_status.expired.subtext":"กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","payment_token_status.expired.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","payment_token_status.failed.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใช้วิธีการชำระเงินอื่น หรือส่งคำถามไปยังผู้ขายโดยแชร์ Unique Identifiers ของคุณ","payment_token_status.failed.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้"}},xo={session:{"validation.card_cvn_invalid":"CVN không hợp lệ","validation.card_expiry_invalid":"Ngày hết hạn thẻ không hợp lệ","validation.card_number_incomplete":"Số thẻ chưa đầy đủ","validation.card_number_invalid":"Số thẻ không hợp lệ","validation.generic_invalid":"{{field}} không hợp lệ","validation.required":"Vui lòng nhập {{field}}","validation.text_too_long":"{{field}} quá dài","validation.text_too_short":"{{field}} quá ngắn","payment.save_checkbox_label":"Lưu để thanh toán nhanh hơn lần sau","payment_methods.add_payment_method":"Thêm phương thức thanh toán","payment_methods.channel_disabled_amount_too_large":"Không khả dụng cho khoản thanh toán này","payment_methods.channel_disabled_amount_too_small":"Không khả dụng cho khoản thanh toán này","payment_methods.pay_with":"Thanh toán bằng","payment_methods.select_channel_placeholder":"Chọn {{groupName}}","default_error.message_1":"Có vấn đề với yêu cầu.","default_error.message_2":"Vui lòng thử lại sau.","default_error.title":"Lỗi","failure_code.account_access_blocked":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.account_already_linked":"Tài khoản của bạn đã được liên kết. Vui lòng dùng phương thức khác.","failure_code.account_not_activated":"Không thể thực hiện thanh toán vì tài khoản chưa được kích hoạt. Vui lòng kích hoạt và thử lại.","failure_code.authentication_failed":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.capture_amount_exceeded":"Không thể thực hiện thanh toán. Vui lòng kiểm tra thông tin thanh toán và thử lại, hoặc dùng phương thức khác.","failure_code.card_declined":"Thẻ của bạn đã bị từ chối. Vui lòng thử lại bằng thẻ khác hoặc phương thức khác.","failure_code.channel_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.declined_by_issuer":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.declined_by_processor":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.expired_card":"Thẻ của bạn bị từ chối do đã hết hạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.expired_otp":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.failure_details_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.inactive_or_unauthorized_card":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.insufficient_balance":"Không thể thực hiện thanh toán vì số dư tài khoản không đủ. Vui lòng nạp thêm tiền và thử lại.","failure_code.invalid_account_details":"Thông tin thanh toán không chính xác. Vui lòng kiểm tra lại hoặc dùng phương thức khác.","failure_code.invalid_cvv":"Mã CVN nhập không đúng. Vui lòng thử lại.","failure_code.invalid_merchant_settings":"Không thể thực hiện thanh toán. Vui lòng liên hệ người bán hoặc dùng phương thức khác.","failure_code.invalid_otp":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.invalid_token":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.issuer_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.otp_attempt_counts_exceeded":"Không thể thực hiện thanh toán vì đã nhập sai OTP quá nhiều lần. Vui lòng thanh toán lại hoặc dùng phương thức khác.","failure_code.partner_timeout_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.payment_amount_limits_exceeded":"Không thể thực hiện thanh toán vì bạn đã vượt quá hạn mức giao dịch. Vui lòng dùng phương thức khác.","failure_code.payment_attempt_counts_exceeded":"Không thể thực hiện thanh toán do quá nhiều lần thử thất bại.","failure_code.payment_request_expired":"Không thể thực hiện thanh toán vì liên kết đã hết hạn. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.processor_error":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.server_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.stolen_card":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.suspected_fraudulent":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.timeout_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_declined_payment":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_device_unreachable":"Không thể thực hiện thanh toán do sự cố mạng. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_did_not_authorize":"Không thể thực hiện thanh toán vì không được xác nhận kịp thời. Vui lòng thử lại.",failure_code_unknown:"Có lỗi xảy ra với mã {{failureCode}}","payment_request_status.canceled.subtext":"Vui lòng thử thanh toán lại hoặc liên hệ người bán nếu vấn đề vẫn tiếp diễn.","payment_request_status.canceled.title":"Trang này không còn khả dụng","payment_request_status.expired.subtext":"Thanh toán của bạn không thể xử lý. Vui lòng thử lại hoặc chọn phương thức khác.","payment_request_status.expired.title":"Thanh toán không thành công","payment_request_status.failed.subtext":"Không thể thực hiện thanh toán. Vui lòng thử phương thức khác hoặc gửi yêu cầu đến người bán bằng cách chia sẻ Mã định danh duy nhất.","payment_request_status.failed.title":"Thanh toán thất bại","payment_token_status.canceled.subtext":"Vui lòng thử lại hoặc dùng phương thức khác.","payment_token_status.canceled.title":"Không thể thêm phương thức thanh toán","payment_token_status.expired.subtext":"Vui lòng thử lại hoặc dùng phương thức khác.","payment_token_status.expired.title":"Không thể thêm phương thức thanh toán","payment_token_status.failed.subtext":"Không thể thực hiện thanh toán. Vui lòng thử phương thức khác hoặc gửi yêu cầu đến người bán bằng cách chia sẻ Mã định danh duy nhất.","payment_token_status.failed.title":"Không thể thêm phương thức thanh toán"}};const ko="field-radius-bl-0",wo="field-radius-br-0",Co="field-radius-tl-0",Eo="field-radius-tr-0",Po="field-collapse-r",So="field-collapse-l",No="field-collapse-t",To="field-collapse-b",Ao=({fieldGroup:e,groupIndex:t,handleFieldChanged:n})=>{const{t:r}=Ot(),[a,o]=ve({}),i=e.map(e=>e.span),d=Math.ceil(e.reduce((e,t)=>e+t.span,0)/2),s=Ee((e,t)=>{o(n=>t?{...n,[e]:t}:(()=>{const t={...n};return delete t[e],t})())},[]),l=Object.keys(a).length>0;return lt("div",{className:"xendit-channel-form-field-group",children:[lt("label",{htmlFor:Gt(e[0]),className:"xendit-text-14",children:e[0].group_label??e[0].label??""}),lt("div",{className:"xendit-form-field-group "+(l?"invalid":""),children:e.map((e,t)=>{const r=(e=>{const t=i.slice(0,e).reduce((e,t)=>e+t,0),n=0===e?0:Math.floor(t/2);return{fieldPositionBySpan:t,fieldRow:n,fieldColumn:t%2,isLastRow:n===d-1}})(t),a=((e,t,n)=>{const{fieldPositionBySpan:r,fieldRow:a,fieldColumn:o,isLastRow:s}=n;return yt({[ko]:d>a+1||r%2==1,[wo]:!!i[t+1],[Co]:t>0,[Eo]:!(0===a&&1===o||0===a&&0===o&&2===e.span),[Po]:1===e.span&&0===o,[So]:1===e.span&&1===o,[No]:r>=2,[To]:!s})})(e,t,r);return lt(Ma,{className:a,field:e,onChange:n,onError:s},t)})},t),l&&(()=>{const t=e.find(e=>a[Gt(e)]);if(!t)return null;const n=a[Gt(t)];if(!n)return null;const o=((e,t,n)=>t?(e=>"object"==typeof e&&null!==e&&"localeKey"in e)(t)?e(t.localeKey,{field:n.label}):t.value:null)(r,n,t);return lt("span",{className:"xendit-error-message xendit-text-12",children:o})})()]})},Oo=function(e){function t(t){var n=Le({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Fe,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}(({form:e,onChannelPropertiesChanged:t},n)=>{const r=Nt(),a=At(),o=we(null),[i,d]=ve(null);!function(e,t,n){ue=6,ke(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}(n,()=>({validate(){const e=o.current;e&&Array.from(e.elements).filter(e=>e instanceof HTMLInputElement).forEach(e=>{e.name&&e.dispatchEvent(new InternalInputValidateEvent(e.value))})}}));const s=Ee(()=>{if(!o.current)return{};return function(e){const t={};for(const[n,r]of e){if(r instanceof Blob)continue;const e=n.split("__"),a=Lo(e,r);e:for(const n of e){const e=n.split(".");let r=t;for(;e.length>1;){const t=e.shift();let n=r[t];if(void 0===n&&(n=r[t]={}),n&&"object"==typeof n){if(Array.isArray(n))continue e;r=n}}const o=a.length?a.shift():"";r[e[0]]=o}}return t}(new FormData(o.current).entries())},[]),l=Ee(()=>{if(!o.current)return;const e=s();d(e),t(e)},[s,t]),c=function(e,t,n){const r=Ce(()=>Mo(e.session_type,t,n?.require_billing_information??!1),[n?.require_billing_information,t,e.session_type]);return r}(r,e,a.details??null),u=Vt(c);xe(()=>{u!==c&&l()},[c,l,u]);const h=function(e){const t=[[]];for(const n of e)1!==n.span||1!==t[t.length-1].length||1!==t[t.length-1][0].span?n.join?t[t.length-1].push(n):t.push([n]):t[t.length-1].push(n);return t}(c).filter(e=>e.length);return 0===h.length?null:lt("div",{class:"xendit-channel-form",children:lt("form",{ref:o,children:lt(Io.Provider,{value:i,children:h.map((e,t)=>lt(Ao,{fieldGroup:e,groupIndex:t,handleFieldChanged:l},t))})})})}),Io=V(null),Ro=()=>Pe(Io);function Lo(e,t){if(0===e.length)return[];if(1===e.length)return[t];if(""===t)return[];try{return JSON.parse(t)}catch(e){return[t]}}function Mo(e,t,n){return t.filter(t=>{if(t.flags?.require_billing_information){if("PAY"!==e)return!1;if(!n)return!1}return!0})}const Do=e=>{const t=we(null),n=we(null),r=void 0!==HTMLElement.prototype.animate;return ke(()=>{r&&(t.current?.animate(Uo,Fo),n.current?.animate(Bo,jo))},[r]),lt("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[lt("g",{opacity:"0.5",children:[lt("path",{d:"M8.79453 10.2303C7.1791 10.2303 5.86953 11.5399 5.86953 13.1553V28.9503C5.86953 31.535 7.96484 33.6303 10.5495 33.6303H26.3445C27.96 33.6303 29.2695 32.3208 29.2695 30.7053",fill:"#F1F1F1"}),lt("path",{d:"M8.79453 10.2303V10.2303C7.1791 10.2303 5.86953 11.5399 5.86953 13.1553V28.9503C5.86953 31.535 7.96484 33.6303 10.5495 33.6303H26.3445C27.96 33.6303 29.2695 32.3208 29.2695 30.7053V30.7053",stroke:"#D0D0D0",strokeWidth:"1.755",strokeLinecap:"round",strokeLinejoin:"round"})]}),lt("g",{ref:n,style:{transformOrigin:"20px 20px"},children:[lt("path",{d:"M28.8177 6.00256H14.7777C12.193 6.00256 10.0977 8.09787 10.0977 10.6826V24.7226C10.0977 27.3073 12.193 29.4026 14.7777 29.4026H28.8177C31.4023 29.4026 33.4977 27.3073 33.4977 24.7226V10.6826C33.4977 8.09787 31.4024 6.00256 28.8177 6.00256Z",fill:"white",stroke:"#EDEDED",strokeWidth:"1.755",strokeLinecap:"round",strokeLinejoin:"round"}),lt("g",{style:{transformOrigin:"10px 30px"},ref:t,children:[lt("path",{d:"M26.7697 20.5301V12.7301H18.9697",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"}),lt("path",{d:"M17.4102 22.0901L26.7702 12.7301",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]})},Uo=[{transform:"scale(0.1)"},{transform:"scale(1)"}],Fo={duration:500,easing:"ease-out"},Bo=[{transform:"rotate(0deg)"},{transform:"rotate(5deg)"},{transform:"rotate(-5deg)"},{transform:"rotate(0deg)"}],jo={duration:1e3,easing:"ease-out",iterations:1/0,delay:2e3},qo=e=>{const{id:t,label:n,checked:r,onChange:a,disabled:o}=e,i=Zt(),d=t||i;return lt("div",{className:"xendit-checkbox",children:[lt("div",{className:"xendit-checkbox-box",children:[lt("input",{id:d,type:"checkbox",onChange:e=>{a?.(e)},checked:r,disabled:o}),lt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:"xendit-checkbox-graphic",children:lt("polyline",{points:"40 144 96 200 224 72",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"16"})})]}),lt("label",{htmlFor:d,className:"xendit-text-14",children:n})]})},Ko=V(null),Vo=()=>{const e=Pe(Ko);if(void 0===e)throw new Error("useChannel must be used within a ChannelProvider");return e},Go=e=>{const{channels:t,savePaymentMethod:n,formRef:r}=e,a=we(null),o=Ot(),{t:i}=o,d=Nt(),s=t[0],l=t.length>1,c=Jt(t,n),u=function(e){if(e&&2===e.length)return[e[0],e[1]];return null}(c.instructions),h="OPTIONAL"===d.allow_save_payment_method&&(c.allow_save||l);return"ACTIVE"!==o.getSdkStatus()||"ACTIVE"!==d.status?null:lt(Ko.Provider,{value:c,children:lt("div",{className:"xendit-payment-channel",ref:a,children:[lt(Oo,{ref:r,form:c.form,onChannelPropertiesChanged:e=>{const t=new XenditChannelPropertiesChangedEvent(s.channel_code,e);a.current?.dispatchEvent(t)}}),h&&lt(qo,{label:i("payment.save_checkbox_label"),onChange:e=>{const t=e.target?.checked;a.current?.dispatchEvent(new XenditSavePaymentMethodChangedEvent(s.channel_code,t))},checked:n}),u?lt("div",{className:"xendit-payment-channel-instructions",children:[lt(Do,{}),lt("div",{className:"xendit-payment-channel-instructions-text xendit-text-12",children:u.map((e,t)=>lt("p",{className:0===t?"xendit-text-semibold":void 0,children:e},t))})]}):null]})})};class XenditChannelPropertiesChangedEvent extends Event{static type="xendit-channel-properties-changed";channel;channelProperties;constructor(e,t){super(XenditChannelPropertiesChangedEvent.type,{bubbles:!0,composed:!0}),this.channel=e,this.channelProperties=t}}class XenditSavePaymentMethodChangedEvent extends Event{static type="xendit-save-payment-method-changed";channel;savePaymentMethod;constructor(e,t){super(XenditSavePaymentMethodChangedEvent.type,{bubbles:!0,composed:!0}),this.channel=e,this.savePaymentMethod=t}}class NetworkError extends Error{errorResponse;constructor(e){super(e.message),this.errorResponse=e}}function Ho(e){const t=new URLSearchParams;return t.append("payload",JSON.stringify(e)),t}function Wo(e,t,n){return async function(...r){let a,o,i,d,s;switch(e){case"GET":[a,o,i,s]=r;break;case"POST":[a,d,o,i,s]=r;break;default:throw new Error(`Unable to call endpoint with method ${e}; this is a bug, please contact support.`)}const l="v0.0.7";Mt(l),Mt(l.startsWith("v"));const c=a.hostId;if(c===jt)throw new Error("A network request was made in mock mode; this is a bug.");const u=Kt(c);if(!u)throw new Error(`Unknown hostId ${c} in sdkKey; this is a bug, please contact support.`);const h=new URL(t(o),u);if(n&&!i)throw new Error("Query string argument is missing; this is a bug, please contact support.");const p=n?.(i)??new URLSearchParams;p.set("components_version",l),h.search=p.toString();const f={method:e,body:d?Ho(d):void 0,headers:{"Content-Type":"application/x-www-form-urlencoded"},signal:s},m=await fetch(h,f);if(!m.ok){const e=await m.json();if(!e||!e.error_code)throw new Error("Unexpected error response from server");throw new NetworkError(e)}return m.json()}}const Xo=Wo("GET",e=>`/api/sessions/${e}`),Yo=Wo("POST",()=>"/api/sessions/payment_tokens"),zo=Wo("POST",()=>"/api/sessions/payment_requests"),Zo=Wo("POST",e=>`/api/sessions/${e.sessionAuthKey}/payment_requests/${e.paymentRequestId}/simulate`),Jo=Wo("GET",e=>`/api/sessions/${e}/poll`,e=>new URLSearchParams(e?{token_request_id:e}:{})),Qo=Wo("POST",e=>`/api/sessions/${e}/card_info`);function ei(e,t,n){return{impl:e,key:t??"",child:n,instance:void 0}}class BehaviorTree{fn;bb;root=ei(class{});updating=!1;again=!1;constructor(e,t){this.fn=e,this.bb=t}update(){if(this.again=!0,this.updating)return;let e=0;try{for(this.updating=!0;this.again;){this.again=!1,e+=1,ti(e);const t=this.root??void 0,n=this.fn(this.bb);this.root=n,ni(t,n,this.bb,0)}}finally{this.updating=!1}}findBehavior(e){let t=this.root;for(;t;){if(t.impl===e)return t.instance?t.instance:null;t=t.child}return null}}function ti(e){if(e>32)throw new Error("Max recursion depth exceeded; this is a bug, please contact support.")}function ni(e,t,n,r){ti(r);void 0===e||void 0===t||e.impl!==t.impl||e.key!==t.key?(e&&ai(e,r+1),t&&ri(t,n,r+1)):(t&&(t.instance=e?.instance),e&&(e.instance=void 0),ni(e?.child,t?.child,n,r+1),t?.instance?.update?.())}function ri(e,t,n){ti(n),e.instance=new e.impl(t,e.key),e.instance.enter?.(),e.child&&ri(e.child,t,n+1)}function ai(e,t){ti(t),e.child&&ai(e.child,t+1),e.instance?.exit?.(),e.instance=void 0}class ActionCompletedBehavior{bb;constructor(e){this.bb=e}enter(){}}class ActionIframeBehavior{bb;url;cleanupFn=null;constructor(e,t){this.bb=e,this.url=t}enter(){this.cleanupFn=this.bb.sdkEvents.ensureHasActionContainer(),this.bb.sdkEvents.populateActionContainerWithIframe(this.url,this.bb.mock,e=>{this.cleanupActionContainer(!1),this.updateMocksOnIframeCompletion("success"===e.mockStatus),this.bb.actionCompleted=!0,this.bb.pollImmediatelyRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)})}updateMocksOnIframeCompletion(e){this.bb.mock&&(e?this.bb.sdkEvents.scheduleMockUpdate("ACTION_SUCCESS"):this.bb.sdkEvents.scheduleMockUpdate("ACTION_FAILURE"))}cleanupActionContainer(e){this.cleanupFn&&(this.cleanupFn(e),this.cleanupFn=null)}exit(){this.cleanupActionContainer(!1),this.bb.sdkEvents.emptyActionContainer()}}class CardInfoBehavior{bb;cardDetailsRequest=null;constructor(e){this.bb=e}enter(){this.lookupCardDetails()}update(){this.lookupCardDetails()}exit(){this.abortLookupCardDetails()}abortLookupCardDetails(){this.cardDetailsRequest&&(this.cardDetailsRequest.abortController.abort(new AbortError),this.cardDetailsRequest=null)}lookupCardDetails(){const e=function(e){const t=Xt("card_details.card_number",e);return"string"!=typeof t?null:t}(this.bb.channelProperties);if(!e)return;if(this.cardDetailsRequest?.cardNumber===e)return;if(this.bb.world?.cardDetails?.cardNumber===e)return;this.cardDetailsRequest&&this.abortLookupCardDetails();const t=new AbortController,n=Bt(300,t.signal).then(()=>this.bb.mock?{schemes:["VISA"],country_codes:["US"],require_billing_information:!0}:Qo(this.bb.sdkKey,{card_number:e},this.bb.sdkKey.sessionAuthKey,void 0,t.signal)).then(t=>{this.bb.dispatchEvent(new InternalUpdateWorldState({cardDetails:{cardNumber:e,details:t}}))}).catch(e=>{if(!Ft(e))throw e});this.cardDetailsRequest={cardNumber:e,promise:n,abortController:t}}}class XenditInitEvent extends Event{static type="init";constructor(){super(XenditInitEvent.type,{})}}class XenditFatalErrorEvent extends Event{message;static type="fatal-error";constructor(e){super(XenditFatalErrorEvent.type,{}),this.message=e}}class XenditReadyEvent extends Event{channelCode;static type="submission-ready";constructor(e){super(XenditReadyEvent.type,{}),this.channelCode=e}}class XenditNotReadyEvent extends Event{static type="submission-not-ready";constructor(){super(XenditNotReadyEvent.type,{})}}class XenditSubmissionBeginEvent extends Event{static type="submission-begin";constructor(){super(XenditSubmissionBeginEvent.type,{})}}class XenditSubmissionEndEvent extends Event{reason;userErrorMessage;developerErrorMessage;static type="submission-end";constructor(e,t,n){super(XenditSubmissionEndEvent.type,{}),this.reason=e,this.userErrorMessage=t,this.developerErrorMessage=n}}class XenditActionBeginEvent extends Event{static type="action-begin";constructor(){super(XenditActionBeginEvent.type,{})}}class XenditActionEndEvent extends Event{static type="action-end";constructor(){super(XenditActionEndEvent.type,{})}}class XenditWillRedirectEvent extends Event{static type="will-redirect";constructor(){super(XenditWillRedirectEvent.type,{})}}class XenditSessionCompleteEvent extends Event{static type="session-complete";constructor(){super(XenditSessionCompleteEvent.type,{})}}class XenditSessionExpiredOrCanceledEvent extends Event{static type="session-expired-or-canceled";constructor(){super(XenditSessionExpiredOrCanceledEvent.type,{})}}class XenditPaymentRequestCreatedEvent extends Event{paymentRequestId;static type="payment-request-created";constructor(e){super(XenditPaymentRequestCreatedEvent.type,{}),this.paymentRequestId=e}}class XenditPaymentTokenCreatedEvent extends Event{paymentTokenId;static type="payment-token-created";constructor(e){super(XenditPaymentTokenCreatedEvent.type,{}),this.paymentTokenId=e}}class XenditPaymentRequestDiscardedEvent extends Event{paymentRequestId;static type="payment-request-discarded";constructor(e){super(XenditPaymentRequestDiscardedEvent.type,{}),this.paymentRequestId=e}}class XenditPaymentTokenDiscardedEvent extends Event{paymentTokenId;static type="payment-token-discarded";constructor(e){super(XenditPaymentTokenDiscardedEvent.type,{}),this.paymentTokenId=e}}class ChannelValidBehavior{bb;lastChannelCode=null;constructor(e){this.bb=e}enter(){this.sendReadyEventIfChanged()}update(){this.sendReadyEventIfChanged()}sendReadyEventIfChanged(){const e=this.bb.channel?.channel_code??null;e&&e!==this.lastChannelCode&&(this.bb.dispatchEvent(new XenditReadyEvent(e)),this.lastChannelCode=e)}exit(){this.bb.dispatchEvent(new XenditNotReadyEvent)}}class ChannelInvalidBehavior{bb;channelCode;constructor(e,t){this.bb=e,this.channelCode=t}enter(){}}var oi;function ii(e){return"payment_request_id"in e?{id:e.payment_request_id,type:oi.PaymentRequest,entity:e}:{id:e.payment_token_id,type:oi.PaymentToken,entity:e}}function di(e,t,n){return`${e===oi.PaymentRequest?"payment_request":"payment_token"}_status.${t.toLowerCase()}.${n}`}!function(e){e.PaymentRequest="REQUEST",e.PaymentToken="TOKEN"}(oi||(oi={}));class PollWorker{sdkKey;sdk;sessionTokenRequestId;onPollResult;started=!1;stopped=!1;constructor(e,t,n,r){this.sdkKey=e,this.sdk=t,this.sessionTokenRequestId=n,this.onPollResult=r}async start(){if(this.stopped)throw new Error("PollWorker has been stopped, make a new instance instead of calling start again");this.started=!0;for await(const e of async function*(e,t,n=2){yield 0;let r=e;for(let e=1;e<t;e++)r*=n,await Ut(r),yield e}(5e3,100,1.06)){if(this.stopped)return;let e;if(this.sdk.isMock()){if(!(this.sdk instanceof XenditComponentsTest&&this.sdk.nextMockUpdate))continue;await Ut(Lt),e=this.sdk.nextMockUpdate,this.sdk.nextMockUpdate=null}else try{e=await Jo(this.sdkKey,this.sdkKey.sessionAuthKey,this.sessionTokenRequestId)}catch(e){continue}if(this.stopped)return;if(!e.session)throw new Error("Session is not defined");let t=null;e.payment_token?t=ii(e.payment_token):e.payment_request&&(t=ii(e.payment_request)),this.onPollResult(e,t),await Ut(1)}}isPolling(){return this.started&&!this.stopped}stop(){this.started=!1,this.stopped=!0}}class PePendingBehavior{bb;pollWorker;constructor(e){this.bb=e,this.pollWorker=new PollWorker(this.bb.sdkKey,this.bb.sdkEvents.sdk,this.bb.world?.sessionTokenRequestId??null,this.onPollResult)}enter(){this.pollWorker.start()}exit(){this.pollWorker.stop()}onPollResult=(e,t)=>{this.bb.sdkEvents.updateWorld({session:e.session,paymentEntity:t??void 0,succeededChannel:e.succeeded_channel??null})}}class PeRequiresActionBehavior{bb;pollWorker=null;canCreateActionContainer=!0;constructor(e){this.bb=e,this.resetPolling()}enter(){this.bb.sdkEvents.setHasAction(!0),this.canCreateActionContainer=!1,this.pollWorker?.start()}update(){this.bb.pollImmediatelyRequested&&(this.bb.pollImmediatelyRequested=!1,this.resetPolling())}exit(){this.pollWorker?.stop(),this.bb.sdkEvents.setHasAction(!1),this.bb.actionCompleted=!1}onPollResult=(e,t)=>{this.bb.sdkEvents.updateWorld({session:e.session,paymentEntity:t??void 0,succeededChannel:e.succeeded_channel??null})};resetPolling(){const e=this.pollWorker?.isPolling()??!1;this.pollWorker?.stop(),this.pollWorker=new PollWorker(this.bb.sdkKey,this.bb.sdkEvents.sdk,this.bb.world?.sessionTokenRequestId??null,this.onPollResult),e&&this.pollWorker.start()}}class PeFailedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.submissionRequested=!1,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}class SdkLoadingBehavior{bb;constructor(e){this.bb=e}enter(){}}class SdkActiveBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditInitEvent),this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}exit(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}}class SdkFatalErrorBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditFatalErrorEvent(this.bb.sdkFatalErrorMessage??"Unknown error"))}}class SessionActiveBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}exit(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}}class SessionCompletedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.sdkEvents.setSessionState("COMPLETED")}}class SessionFailedBehavior{bb;constructor(e){this.bb=e}enter(){Mt(this.bb.world?.session),this.bb.sdkEvents.setSessionState(this.bb.world.session.status)}}class SimulatePaymentBehavior{bb;exited=!1;simulationRequest=null;constructor(e){this.bb=e}enter(){this.simulatePayment()}exit(){this.exited=!0,this.bb.simulatePaymentRequested=!1,this.abortSimulation()}abortSimulation(){this.simulationRequest&&(this.simulationRequest.abortController.abort(new AbortError),this.simulationRequest=null)}simulatePayment(){if(this.simulationRequest&&this.abortSimulation(),!this.bb.channel)throw new Error("Channel is missing");if(!this.bb.world?.paymentEntity)throw new Error("Payment entity is missing");if(this.bb.world?.paymentEntity?.type!==oi.PaymentRequest)throw new Error("Payment entity is not a payment request");const e=this.bb.world?.paymentEntity.id,t=this.bb.channel?.channel_code;if(this.bb.mock)throw new Error("Simulate payment not supported for mock mode");const n=new AbortController,r=Zo(this.bb.sdkKey,{channel_code:t},{sessionAuthKey:this.bb.sdkKey.sessionAuthKey,paymentRequestId:e},void 0,n.signal).then(()=>{this.bb.actionCompleted=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}).catch(e=>{Ft(e)||this.exited||(this.bb.simulatePaymentRequested=!1,console.error("Simulate Payment failed:",e))});this.simulationRequest={promise:r,abortController:n}}}function si(){return`session-${ui(32)}-mock-MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEyCADI5pdf6KmN8+Fxl2ES3yolUKXunNeY3gGScGNEvDcrcHAPKxIInAo5DVnDvTtYtqZvx/bu7HLeBJNMXwHhie/uyNEtT8dSaLc9bd0WSlYdxI+iUsTv2Qu0LiiPrZs-NKf7whM9meUs/eRCvG0oc180MDiyeli3kH6EQ3ZahECHsZQi5G2IpH6vk3cYMtf01Y1L4OBn1SZCOv1kwpjIUet4DJeoTwwq2nM5b+K7rD+/WFTi3AEX4NWJNkKi0a91`}function li(){const e=(new Date).toISOString(),t=new Date(Date.now()+2592e6).toISOString();return{session:{payment_session_id:`ps-${ui(24)}`,created:e,updated:e,status:"ACTIVE",reference_id:ci(),description:"Test session",currency:"IDR",amount:1e4,country:"ID",expires_at:t,session_type:"PAY",mode:"COMPONENTS",locale:"en",business_id:ui(24),customer_id:`cust-${ci()}`,capture_method:"AUTOMATIC",allow_save_payment_method:"OPTIONAL",items:[{reference_id:ci(),type:"DIGITAL_PRODUCT",name:"Item 1",net_unit_amount:5e4,quantity:1,category:""},{reference_id:ci(),type:"DIGITAL_SERVICE",name:"Item 2",net_unit_amount:5e4,quantity:1,category:""}]},business:{name:"Components Mock Merchant",country_of_operation:"Indonesia",merchant_profile_picture_url:"https://placehold.co/256x256.png?text=Logo"},customer:{type:"INDIVIDUAL",id:`cust-${ci()}`,email:"exa**@example.com",mobile_number:null,phone_number:null,individual_detail:{given_names:"exa********",surname:null},business_detail:null},channels:[{brand_name:"Cards",channel_code:"CARDS",brand_logo_url:"https://assets.xendit.co/payment-session/logos/CARDS.svg",ui_group:"cards",allow_pay_without_save:!0,allow_save:!0,brand_color:"#000000",min_amount:5e3,max_amount:2e8,requires_customer_details:!1,card:{brands:[{name:"VISA",logo_url:"https://assets.xendit.co/payment-session/logos/VISA.svg"},{name:"MASTERCARD",logo_url:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg"},{name:"JCB",logo_url:"https://assets.xendit.co/payment-session/logos/JCB.svg"}]},form:[{group_label:"Card Details",label:"Card Number",placeholder:"1234 1234 1234 1234",type:{name:"credit_card_number"},channel_property:"card_details.card_number",required:!0,span:2},{label:"Card Expiry Date",placeholder:"MM/YY",type:{name:"credit_card_expiry"},channel_property:["card_details.expiry_month","card_details.expiry_year"],required:!0,span:1,join:!0},{label:"CVN",placeholder:"CVV",type:{name:"credit_card_cvn"},channel_property:"card_details.cvn",required:!0,span:1,join:!0},{group_label:"Cardholder Name",label:"First Name",placeholder:"First Name",type:{name:"text",min_length:1,max_length:50,regex_validators:[{regex:"/^[a-zA-Z\\u00C0-\\u017F\\s]+$/",message:"Invalid input. Please use alphabetic characters only"}]},channel_property:"card_details.cardholder_first_name",required:!0,span:1},{label:"Last Name",placeholder:"Last Name",type:{name:"text",min_length:1,max_length:50,regex_validators:[{regex:"/^[ -~]+$/",message:"Invalid input. Please use alphabetic characters only"}]},channel_property:"card_details.cardholder_last_name",required:!0,span:1},{label:"Email",placeholder:"john.doe@example.com",type:{name:"email"},channel_property:"card_details.cardholder_email",required:!0,span:2},{label:"Mobile Number",placeholder:"8000032341",type:{name:"phone_number"},channel_property:"card_details.cardholder_phone_number",required:!0,span:2},{group_label:"Billing Address",label:"First Name",placeholder:"First Name",type:{name:"text",max_length:255},channel_property:"billing_information.first_name",span:1,required:!0,flags:{require_billing_information:!0}},{label:"Last Name",placeholder:"Last Name",type:{name:"text",max_length:255},channel_property:"billing_information.last_name",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Email",placeholder:"Email",type:{name:"text",max_length:255},channel_property:"billing_information.email",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"billing_information.country",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Province",placeholder:"State / Province",type:{name:"province"},channel_property:"billing_information.province_state",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"City",placeholder:"City",type:{name:"text",max_length:255},channel_property:"billing_information.city",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Address Line 1",placeholder:"Address Line 1",type:{name:"text",max_length:255},channel_property:"billing_information.street_line1",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Address Line 2",placeholder:"Address Line 2",type:{name:"text",max_length:255},channel_property:"billing_information.street_line2",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Postal Code",placeholder:"Postal Code",type:{name:"postal_code"},channel_property:"billing_information.postal_code",span:2,required:!0,flags:{require_billing_information:!0},join:!0}],instructions:["Mock Cards channel","This mock channel behaves similarly to the production CARDS channel."]},{brand_name:"Mock E-Wallet Channel",channel_code:"MOCK_EWALLET",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["Mock E-Wallet channel","This mock channel behaves similarly to production E-Wallets channels with no user input."]},{brand_name:"Mock E-Wallet Channel (Phone input)",channel_code:"MOCK_EWALLET_WITH_PHONE",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Phone Number",placeholder:"123 123 132",type:{name:"phone_number"},channel_property:"phone_number_field",required:!0,span:2}],instructions:["Mock E-Wallet channel","This mock channel behaves similarly to production E-Wallets channels with a phone number input."]},{brand_name:"Mock QR Channel",channel_code:"MOCK_QR",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["Mock QR channel","This mock channel behaves similarly to production QR channels."]},{brand_name:"Mock Direct Debit Channel",channel_code:"MOCK_DIRECT_DEBIT",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["Mock Direct Debit channel","This mock channel behaves similarly to production Direct Debit channels."]},{brand_name:"Mock OTC Channel",channel_code:"MOCK_OTC",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Payer Name",placeholder:"Payer Name",type:{name:"text",max_length:50},channel_property:"payer_name",required:!0,span:2}],instructions:["Mock OTC channel","This mock channel behaves similarly to production OTC channels."]},{brand_name:"Input Test",channel_code:"UI_INPUT_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Card Number (Iframe)",placeholder:"1234 1234 1234 1234",type:{name:"credit_card_number"},channel_property:"card_number",required:!1,span:2},{label:"Card Expiry Date (Iframe)",placeholder:"MM/YY",type:{name:"credit_card_expiry"},channel_property:["expiry_month","expiry_year"],required:!1,span:2},{label:"CVN (Iframe)",placeholder:"CVV",type:{name:"credit_card_cvn"},channel_property:"cvn",required:!1,span:2},{label:"Text",placeholder:"Text",type:{name:"text",max_length:50},channel_property:"text_field",required:!1,span:2},{label:"Phone Number",placeholder:"123 123 123",type:{name:"phone_number"},channel_property:"phone_number_field",required:!1,span:2},{label:"Email",placeholder:"test@example.com",type:{name:"email"},channel_property:"email_field",required:!1,span:2},{label:"Postal Code",placeholder:"123456",type:{name:"postal_code"},channel_property:"postal_code_field",required:!1,span:2},{label:"Country",placeholder:"Select",type:{name:"country"},channel_property:"country_field",required:!1,span:2},{label:"Dropdown",placeholder:"Select",type:{name:"dropdown",options:[{label:"Option 1",value:"option_1"},{label:"Option 2",value:"option_2"},{label:"Option 3",value:"option_3"}]},channel_property:"dropdown_field",required:!1,span:2},{label:"Dropdown With Icons",placeholder:"Select",type:{name:"dropdown",options:[{label:"Option 1",value:"option_1",icon_url:"https://placehold.co/16"},{label:"Option 2",value:"option_2",icon_url:"https://placehold.co/16"},{label:"Option 3",value:"option_3",icon_url:"https://placehold.co/16"}]},channel_property:"dropdown_field_with_icons",required:!1,span:2}],instructions:["This test demonstrates basic usage of all input types.","All fields here are optional and blank values should pass validation."]},{brand_name:"Field Grouping Test",channel_code:"UI_FIELD_GROUPING_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{group_label:"Vertical Grouping",label:"Top",placeholder:"Top",type:{name:"text",max_length:50},channel_property:"a1",required:!1,span:2},{label:"Middle",placeholder:"Middle",type:{name:"text",max_length:50},channel_property:"a2",required:!1,span:2,join:!0},{label:"Bottom",placeholder:"Bottom",type:{name:"text",max_length:50},channel_property:"a3",required:!1,span:2,join:!0},{group_label:"Horizontal Grouping",label:"Text",placeholder:"Left",type:{name:"text",max_length:50},channel_property:"b1",required:!1,span:1},{label:"Text",placeholder:"Right",type:{name:"text",max_length:50},channel_property:"b1",required:!1,span:1,join:!0},{group_label:"Mixed Grouping",label:"Text",placeholder:"Top Left",type:{name:"text",max_length:50},channel_property:"c1",required:!1,span:1},{label:"Text",placeholder:"Top Right",type:{name:"text",max_length:50},channel_property:"c2",required:!1,span:1,join:!0},{label:"Text",placeholder:"Middle Left",type:{name:"text",max_length:50},channel_property:"c3",required:!1,span:1,join:!0},{label:"Text",placeholder:"Middle Right",type:{name:"text",max_length:50},channel_property:"c4",required:!1,span:1,join:!0},{label:"Text",placeholder:"Bottom Left",type:{name:"text",max_length:50},channel_property:"c5",required:!1,span:1,join:!0},{label:"Text",placeholder:"Bottom Right",type:{name:"text",max_length:50},channel_property:"c6",required:!1,span:1,join:!0}],instructions:["This test demonstrates field grouping.","Fields can be 1 or 2 cells wide and can be grouped in any arrangement."]},{brand_name:"Text Validation Test",channel_code:"UI_TEXT_VALIDATION_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Required Text Field",placeholder:"Required",type:{name:"text",max_length:50},channel_property:"required",required:!0,span:2},{label:"Validate Minimum Length (5)",placeholder:"Min 5 characters",type:{name:"text",min_length:5,max_length:50},channel_property:"min_5_chars",required:!1,span:2},{label:"Validate Using Regexp (/^[a-zA-Z0-9]+$/)",placeholder:"Alphanumeric only",type:{name:"text",max_length:50,regex_validators:[{regex:"/^[a-zA-Z0-9]+$/",message:"Invalid input. Please use alphanumeric characters only"}]},channel_property:"regexp_validation",required:!1,span:2}],instructions:["This test demonstrates text field validation.","Fields should validate on blur or `submit()` or `revealValidationErrors()`. Blurring a blank field does not trigger validation."]},{brand_name:"State/Province Field Test",channel_code:"UI_STATE_PROVINCE_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{group_label:"Country + State/Province Fields",label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"country_field",required:!0,span:2},{label:"State / Province",placeholder:"State / Province",type:{name:"province"},channel_property:"province_field",required:!0,span:2,join:!0},{group_label:"Country + State/Province Fields (Horizontal Grouping)",label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"country_field_2",required:!0,span:1},{label:"State / Province",placeholder:"State / Province",type:{name:"province"},channel_property:"province_field_2",required:!0,span:1,join:!0}],instructions:["This test demonstrates the country + state/province field combination.","Selecting certain countries (US, CA, GB) should change the state/province field to a dropdown with predefined options."]},{brand_name:"Conditional Field Test",channel_code:"UI_CONDITIONAL_FIELD_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Toggle Hidden Field",placeholder:"Select",type:{name:"dropdown",options:[{label:"Show",value:"show"},{label:"Hide",value:"hide"}]},channel_property:"toggle",required:!0,span:2},{label:"Conditional Field",placeholder:"This field is conditionally shown",type:{name:"text",max_length:50},channel_property:"conditional_field",required:!0,span:2,join:!0,display_if:[["toggle","equals","show"]]}],instructions:["This test demonstrates conditional field display based on another field's value.","The second field should only appear if 'Show' is selected in the first field."]},{brand_name:"Save Payment Details Test",channel_code:"UI_SAVE_PAYMENT_DETAILS_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!0,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel supports both one-time payment and pay-and-save.","A checkbox should be displayed."]},{brand_name:"Paired Channels Test",channel_code:"UI_PAIRED_CHANNELS_TEST_1",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"This should show if the save checkbox is unchecked",placeholder:"Unchecked",type:{name:"text",max_length:50},channel_property:"nonsave",required:!1,span:2}],instructions:["This channel does not support save, but has a paired channel that does.","Changing the save checkbox switches between the two channels."]},{brand_name:"Paired Channels Test",channel_code:"UI_PAIRED_CHANNELS_TEST_2",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!0,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"This should show if the save checkbox is checked",placeholder:"Checked",type:{name:"text",max_length:50},channel_property:"save",required:!1,span:2}],instructions:["This channel can only be used for pay-and-save, but has a paired channel that supports one time payment.","Changing the save checkbox switches between the two channels."]},{brand_name:"Banner Test",channel_code:"UI_BANNER_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,banner:{image_url:"https://placehold.co/256x32.png?text=Banner",alt_text:""},form:[],instructions:["This channel has a banner image.","It should be displayed above this text."]},{brand_name:"Single Item Test",channel_code:"GROUP_SINGLE_ITEM_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"single_item",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel is in a group by itself.","The channel picker should automatically select it when the group is opened."]},{brand_name:"Disabled Group Test",channel_code:"GROUP_DISABLED_GROUP_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:999999999,max_amount:9999999999,requires_customer_details:!1,form:[],instructions:["This channel is in a disabled group.","Since all channels in this group are disabled, the group should not be selectable. You should never see this text because creating this channel will throw an error."]},{brand_name:"Partial Disabled Group (Enabled)",channel_code:"GROUP_PARTIAL_DISABLED_1",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"partial_disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel is in a partially disabled group.","This channel is enabled, but the other channel in the group is disabled. This channel should be automatically selected by the channel picker because it's the only enabled option."]},{brand_name:"Partial Disabled Group (Disabled)",channel_code:"GROUP_PARTIAL_DISABLED_2",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"partial_disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:999999999,max_amount:9999999999,requires_customer_details:!1,form:[],instructions:["This channel is in a partially disabled group.","This channel is disabled. You should never see this text because creating this channel will throw an error."]}],channel_ui_groups:[{id:"cards",label:"Mock Cards",icon_url:"https://assets.xendit.co/payment-session/logos/CARDS.svg"},{id:"other",label:"Other Mock Channels",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"ui_tests",label:"Channel UI Test Cases",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"single_item",label:"Mock Single Item Group",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"disabled",label:"Mock Disabled Group",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"partial_disabled",label:"Mock Partial Disabled Group",icon_url:"https://placehold.co/48x48.png?text=Logo"}]}}function ci(){return[ui(8),ui(4),ui(4),ui(4),ui(12)].join("-")}function ui(e){Mt(e%2==0);const t=function(e){const t=new Uint8Array(e);for(let n=0;n<e;n++)t[n]=Math.floor(256*Math.random());return t}(e/2);return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}function hi(e){const t=li(),n=e.type===oi.PaymentRequest?e.entity:void 0,r=e.type===oi.PaymentToken?e.entity:void 0;return{session:{...t.session,status:"COMPLETED",payment_request_id:n?.payment_request_id,payment_token_id:r?.payment_token_id},payment_request:fi(n,"SUCCEEDED"),payment_token:fi(r,"ACTIVE"),succeeded_channel:{channel_code:e.entity.channel_code,logo_url:"https://placehold.co/48"}}}function pi(e){const t=li(),n=e.type===oi.PaymentRequest?e.entity:void 0,r=e.type===oi.PaymentToken?e.entity:void 0;return{session:{...t.session,status:"ACTIVE"},payment_request:fi(n,"FAILED"),payment_token:fi(r,"FAILED")}}function fi(e,t){return e?{...e,status:t}:e}function mi(e){return{payment_request_id:`pr-${ci()}`,status:"REQUIRES_ACTION",channel_code:e,actions:[{type:"REDIRECT_CUSTOMER",descriptor:"WEB_URL",value:"https://example.com/redirect"}],session_token_request_id:ci()}}function $i(e){return{payment_token_id:`pt-${ci()}`,status:"REQUIRES_ACTION",channel_code:e,actions:[{type:"REDIRECT_CUSTOMER",descriptor:"WEB_URL",value:"https://example.com/redirect"}],session_token_request_id:ci()}}var _i=Object.freeze({__proto__:null,makeTestBffData:li,makeTestPaymentRequest:mi,makeTestPaymentToken:$i,makeTestPollResponseForFailure:pi,makeTestPollResponseForSuccess:hi,makeTestSdkKey:si,withPaymentEntityStatus:fi});class SubmissionBehavior{bb;exited=!1;submission=null;submissionError=null;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditSubmissionBeginEvent),this.bb.sdkEvents.scheduleMockUpdate("NONE"),this.submit()}exit(){this.exited=!0,Mt(this.bb.world?.session);const e=this.bb.sdkEvents.sdk.t,t=this.bb.world.paymentEntity;if("COMPLETED"!==this.bb.world.session.status&&t){switch(t.type){case oi.PaymentRequest:this.bb.dispatchEvent(new XenditPaymentRequestDiscardedEvent(t.id));break;case oi.PaymentToken:this.bb.dispatchEvent(new XenditPaymentTokenDiscardedEvent(t.id))}this.bb.sdkEvents.updateWorld({paymentEntity:null,sessionTokenRequestId:null})}let n,r,a;"ACTIVE"!==this.bb.world.session.status?n=`SESSION_${this.bb.world.session.status}`:!t||"FAILED"!==t.entity.status&&"CANCELED"!==t.entity.status&&"EXPIRED"!==t.entity.status?this.submissionError?(n="REQUEST_FAILED",this.submissionError instanceof NetworkError?(r=[this.submissionError.errorResponse.error_content?.title,this.submissionError.errorResponse.error_content?.message_1,this.submissionError.errorResponse.error_content?.message_2].filter(e=>void 0!==e),a={type:"ERROR",code:this.submissionError.errorResponse.error_code||"UNKNOWN"}):(r=function(e){return[e("default_error.title"),e("default_error.message_1"),e("default_error.message_2")]}(e),a={type:"NETWORK_ERROR",code:"NETWORK_ERROR"})):n=this.submission?"REQUEST_ABORTED":"ACTION_ABORTED":(n=`PAYMENT_${t.type}_${t.entity.status}`,r=function(e,t,n,r){const a=e(di(t,n,"title")),o=r?e(function(e){return`failure_code.${e.toLowerCase()}`}(r),e("failure_code_unknown",{failureCode:r})):e(di(t,n,"subtext"));return[a,o]}(e,t.type,t.entity.status,t.entity.failure_code),a={type:"FAILURE",code:t.entity.failure_code??"UNKNOWN"}),this.bb.dispatchEvent(new XenditSubmissionEndEvent(n,r,a)),this.submission&&(this.submission?.abortController.abort(new AbortError),this.submission=null),this.bb.submissionRequested=!1,this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}submit(){if(!this.bb.world?.session||!this.bb.channel)throw new Error("Session object missing");const e="OPTIONAL"===this.bb.world.session.allow_save_payment_method&&this.bb.channel?.allow_save,t=this.bb.world?.session?.session_type,n=this.bb.channel.channel_code,r=this.bb.channelProperties??{},a=new AbortController,o=async function(e,t,n,r,a,o,i){let d;if(t)switch(n){case"PAY":await Bt(Lt,o.signal),d=mi(r);break;case"SAVE":await Bt(Lt,o.signal),d=$i(r);break;default:throw new Error(`The session type ${n} is not supported.`)}else switch(n){case"PAY":d=await zo(e,{session_id:e.sessionAuthKey,channel_code:r,channel_properties:a,save_payment_method:i},null,null,o.signal);break;case"SAVE":d=await Yo(e,{session_id:e.sessionAuthKey,channel_code:r,channel_properties:a},null,null,o.signal);break;default:throw new Error(`The session type ${n} is not supported.`)}return ii(d)}(this.bb.sdkKey,this.bb.mock,t,n,r,a,e?this.bb.savePaymentMethod??!1:void 0).then(e=>{switch(this.submission=null,e.type){case oi.PaymentRequest:this.bb.dispatchEvent(new XenditPaymentRequestCreatedEvent(e.id));break;case oi.PaymentToken:this.bb.dispatchEvent(new XenditPaymentTokenCreatedEvent(e.id))}this.bb.sdkEvents.updateWorld({paymentEntity:e,sessionTokenRequestId:e.entity.session_token_request_id})}).catch(e=>{Ft(e)||(console.error("Submission failed:",e),this.exited||(this.bb.submissionRequested=!1,this.submissionError=e,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)))});this.submission={abortController:a,promise:o}}}function gi(e){switch(e.sdkStatus){case"LOADING":return ei(SdkLoadingBehavior);case"ACTIVE":if(!e.world?.session)throw new Error("Session is required when SDK is active");return ei(SdkActiveBehavior,"active",function(e){if(!e.world?.session)throw new Error("Session is required to create behavior tree for session");switch(e.world.session.status){case"ACTIVE":return ei(SessionActiveBehavior,"active",e.submissionRequested?function(e){if(!e.world)throw new Error("SDK not initialized in behaviorTreeForSubmission");return ei(SubmissionBehavior,"submission",e.world.paymentEntity&&null!==e.world.sessionTokenRequestId?function(e){if(!e.world?.paymentEntity)throw new Error("Payment entity is required to create behavior tree for payment entity");switch(e.world.paymentEntity.entity.status){case"PENDING":return ei(PePendingBehavior);case"REQUIRES_ACTION":return ei(PeRequiresActionBehavior,e.world.paymentEntity.id,function(e){if(!e.world?.paymentEntity)throw new Error("Payment entity is missing");if(e.actionCompleted)return ei(ActionCompletedBehavior);if(e.simulatePaymentRequested)return ei(SimulatePaymentBehavior);const t=(n=e.world.paymentEntity.entity.actions,n[0]);var n;switch(t.type){case"REDIRECT_CUSTOMER":switch(t.descriptor){case"WEB_URL":return ei(ActionIframeBehavior,t.value);case"DEEPLINK_URL":case"WEB_GOOGLE_PAYLINK":throw new Error(`Unsupported action type ${t.type} ${t.descriptor}`)}break;case"PRESENT_TO_CUSTOMER":switch(t.descriptor){case"QR_STRING":case"PAYMENT_CODE":case"VIRTUAL_ACCOUNT_NUMBER":throw new Error(`Unsupported action type ${t.type} ${t.descriptor}`)}break;case"API_POST_REQUEST":switch(t.descriptor){case"CAPTURE_PAYMENT":case"VALIDATE_OTP":case"RESEND_OTP":throw new Error(`Unsupported action type ${t.type} ${t.descriptor}`)}}throw new Error(`Unknown action type: ${t.type} ${t.descriptor}`)}(e));case"FAILED":case"EXPIRED":case"CANCELED":return ei(PeFailedBehavior);case"ACCEPTING_PAYMENTS":throw new Error("Status ACCEPTING_PAYMENTS should not happen");case"AUTHORIZED":case"ACTIVE":case"SUCCEEDED":return ei(PePendingBehavior,e.world.paymentEntity.id);default:throw e.world.paymentEntity.entity,new Error(`Unknown payment entity status: ${e.world.paymentEntity.entity.status}`)}}(e):void 0)}(e):function(e){if(!e.channel||!e.world?.session)return;const t=e.world.cardDetails.details?.require_billing_information??!1,n=function(e,t,n,r){n||(n={});for(const a of Mo(e,t.form,r)){const e=Array.isArray(a.channel_property)?a.channel_property:[a.channel_property];for(const t of e){let e=ha(n,t);if(void 0===e||""===e){if(a.required)return!1;e=""}if("string"==typeof e&&ua(a,e))return!1}}return!0}(e.world.session.session_type,e.channel,e.channelProperties??null,t),r=ei(n?ChannelValidBehavior:ChannelInvalidBehavior);return"CARDS"===e.channel.channel_code?ei(CardInfoBehavior,"card-info",r):r}(e));case"COMPLETED":return ei(SessionCompletedBehavior);case"EXPIRED":case"CANCELED":return ei(SessionFailedBehavior,e.world.session.status);default:throw e.world.session.status,new Error(`Unknown session status: ${e.world.session.status}`)}}(e));case"FATAL_ERROR":return ei(SdkFatalErrorBehavior);default:throw e.sdkStatus,new Error(`Unknown SDK status: ${e.sdkStatus}`)}}function yi(e){const{url:t,mock:n,onIframeComplete:r}=e,a=we(null),o=Ee(e=>{if(!a.current)return;const t=a.current.contentWindow;e.source===t&&"xendit-iframe-action-complete"===e.data?.type&&r(e.data)},[r]);return xe(()=>(window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}),[o]),lt("iframe",n?{ref:a,srcDoc:bi,width:"250",height:"400",className:"xendit-action-iframe"}:{ref:a,src:t,width:"500",height:"600",className:"xendit-action-iframe"})}const bi="\n <html>\n <head>\n <title>Xendit Mock Action Iframe</title>\n </head>\n <body>\n <p>This is a mock action iframe.</p>\n <p>Click the button below to simulate completion of the action.</p>\n <button onclick=\"parent.postMessage({type: 'xendit-iframe-action-complete', mockStatus: 'success'}, '*')\">\n Simulate Success\n </button>\n <button onclick=\"parent.postMessage({type: 'xendit-iframe-action-complete', mockStatus: 'fail'}, '*')\">\n Simulate Failure\n </button>\n </body>\n </html>\n",vi=e=>{const{title:t,onClose:n,children:r}=e,a=we(!1),o=we(!1),i=we(null),d=we(null),s=Ee(()=>{a.current||(a.current=!0,n())},[n]),l=Ee(()=>{if(!i.current||!d.current||o.current)return;o.current=!0,d.current.animate(wi,xi);i.current.animate(Ei,xi).onfinish=s},[s]),c=Ee(e=>{e.target===e.currentTarget&&l()},[l]);return ke(()=>{d.current?.animate(ki,xi),i.current?.animate(Ci,xi)},[]),ke(()=>{e.close&&l()},[e.close,l]),lt("div",{className:"xendit-dialog-backdrop",onClick:c,ref:d,children:lt("div",{className:"xendit-dialog",ref:i,children:[lt("div",{className:"xendit-dialog-header xendit-text-16 xendit-text-semibold",children:[t,lt("button",{"aria-label":"Close",onClick:l,children:lt(ct,{name:"x",size:24})})]}),lt("div",{className:"xendit-dialog-body",children:r})]})})},xi={duration:200,easing:"ease-in-out",fill:"forwards"},ki=[{backgroundColor:"rgba(0, 0, 0, 0)"},{backgroundColor:"rgba(0, 0, 0, 0.5)"}],wi=ki.slice().reverse(),Ci=[{opacity:0,transform:"scale(0.9) translateY(-20px)"},{opacity:1,transform:""}],Ei=Ci.slice().reverse();function Pi(e){const{sdk:t,title:n,onClose:r}=e,a=we(null);return ke(()=>{const e=t.createActionContainerComponent(pt);return a.current?.replaceChildren(e),()=>{t.destroyComponent(e)}},[t]),lt(vi,{title:n,onClose:r,close:e.close,children:lt("div",{ref:a})})}class SdkEventManager{sdk;hasInFlightRequest=!1;submitting=!1;action=!1;constructor(e){this.sdk=e}updateWorld(e){this.sdk.dispatchEvent(new InternalUpdateWorldState(e))}scheduleMockUpdate(e){if(this.sdk.isMock()&&this.sdk instanceof XenditComponentsTest)switch(this.sdk.assertInitialized(),e){case"NONE":this.sdk.nextMockUpdate=null;break;case"ACTION_SUCCESS":if(!this.sdk[pt].worldState.paymentEntity)break;this.sdk.nextMockUpdate=hi(this.sdk[pt].worldState.paymentEntity);break;case"ACTION_FAILURE":if(!this.sdk[pt].worldState.paymentEntity)break;this.sdk.nextMockUpdate=pi(this.sdk[pt].worldState.paymentEntity)}}setInitialized(){this.sdk.dispatchEvent(new XenditInitEvent)}setHasAction(e){this.action!==e&&(this.action=e,e?this.sdk.dispatchEvent(new XenditActionBeginEvent):this.sdk.dispatchEvent(new XenditActionEndEvent))}setSessionState(e){"COMPLETED"===e?this.sdk.dispatchEvent(new XenditSessionCompleteEvent):this.sdk.dispatchEvent(new XenditSessionExpiredOrCanceledEvent)}setWillRedirect(){this.sdk.dispatchEvent(new XenditWillRedirectEvent)}ensureHasActionContainer(){if(this.sdk[pt].liveComponents.actionContainer)return()=>{this.emptyActionContainer()};let e=!1,t=!1;const n=document.createElement("div");n.setAttribute("class","xendit-default-action-container");const r={sdk:this.sdk,title:"Complete your payment",onClose:()=>{e=!0,K(null,n),n.remove(),t||this.sdk.abortSubmission()}};return K(b(Pi,r),n),document.body.appendChild(n),a=>{a||(t=!0),e||K(b(Pi,{...r,close:!0}),n)}}emptyActionContainer(){const e=this.sdk[pt].liveComponents.actionContainer;e&&K(null,e)}populateActionContainerWithIframe(e,t,n){const r=this.sdk[pt].liveComponents.actionContainer;if(!r)throw new Error("Trying to populate action container, but it is missing; A default action container should have been created. This is a bug, please contact support.");K(b(yi,{url:e,mock:t,onIframeComplete:n}),r)}}const Si={IDR:"id",VND:"vi",BRL:"pt-BR",RUB:"ru",CZK:"cs",RON:"ro",UAH:"uk",CLP:"es-CL",COP:"es-CO",UYU:"es-UY",ARS:"es-AR",INR:"hi-IN",NPR:"hi-IN",LKR:"hi-IN",BDT:"hi-IN"},Ni={USD:"US$",CAD:"CA$",EUR:"€",AFN:"؋",ALL:"Lek",AMD:"֏",ARS:"AR$",AUD:"AU$",AZN:"₼",BAM:"KM",BDT:"৳",BIF:"FBu",BND:"BN$",BOB:"Bs",BRL:"R$",BWP:"P",BYN:"Br",BZD:"BZ$",CDF:"FrCD",CHF:"CHF",CLP:"CL$",CNY:"CN¥",COP:"CO$",CRC:"₡",CVE:"CV$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",ERN:"Nfk",ETB:"Br",GBP:"£",GEL:"₾",GHS:"GH₵",GNF:"FG",GTQ:"Q",HKD:"HK$",HNL:"L",HUF:"Ft",IDR:"Rp",ILS:"₪",INR:"₹",IRR:"IRR",ISK:"kr",JMD:"J$",JPY:"¥",KES:"Ksh",KHR:"៛",KMF:"FC",KRW:"₩",KZT:"₸",LKR:"SL Re",MDL:"lei",MGA:"MGA",MKD:"MKD",MMK:"K",MOP:"MOP$",MUR:"₨",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"रु",NZD:"NZ$",PAB:"B/.",PEN:"S/.",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"₲",RON:"RON",RSD:"RSD",RUB:"₽",RWF:"FR",SDG:"SDG",SEK:"kr",SGD:"S$",SOS:"Ssh",THB:"฿",TOP:"T$",TRY:"TL",TTD:"TT$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",UYU:"$U",UZS:"сум",VND:"₫",XAF:"FCFA",XOF:"CFA",ZAR:"R",ZMW:"K",ZWL:"ZWL$"},Ti={ALL:"1 $",BAM:"1 $",BYN:"1 $",CZK:"1 $",DKK:"1 $",GEL:"1 $",HUF:"1 $",ISK:"1 $",IRR:"1 $",KHR:"1$",MDL:"1 $",MKD:"1 $",NOK:"1 $",PLN:"1 $",RON:"1 $",RSD:"1 $",RUB:"1$",SEK:"1 $",UZS:"1 $",VND:"1$"},Ai={BHD:3,JOD:3,KWD:3,LYD:3,OMR:3,TND:3};class XenditComponents extends EventTarget{t=e=>{throw new Error("Localization used before initialization; this is a bug.")};[pt];constructor(e){if(super(),"undefined"==typeof window||"undefined"==typeof document)throw new Error("XenditComponents can only be instantiated in a browser");const t=new SdkEventManager(this),n=function(e){if(!e)throw new Error("The componentsSdkKey option is missing; check the constructor parameters.");const t=e.split("-");if(t.length<4||t[2]!==jt&&null===Kt(t[2]))throw new Error("The componentsSdkKey option has the wrong format. Ensure you pass the value returned from the `components_sdk_key` property of the `POST /sessions` response.");return{sessionAuthKey:[t[0],t[1]].join("-"),hostId:t[2],publicKey:t[3],signature:t[4]}}(e.sessionClientKey);this[pt]={sdkKey:n,options:e,worldState:null,eventManager:t,liveComponents:{channelPicker:null,paymentChannels:new Map,actionContainer:null},behaviorTree:new BehaviorTree(gi,{sdkEvents:t,sdkKey:n,mock:this.isMock(),sdkStatus:"LOADING",sdkFatalErrorMessage:null,channel:null,channelProperties:null,dispatchEvent:this.dispatchEvent.bind(this),world:null,submissionRequested:!1,simulatePaymentRequested:!1,actionCompleted:!1,pollImmediatelyRequested:!1,savePaymentMethod:null}),currentChannelCode:null},en(this),this.behaviorTreeUpdate(),this.addEventListener(InternalUpdateWorldState.type,this.onUpdateWorldState.bind(this)),this.addEventListener(InternalBehaviorTreeUpdateEvent.type,this.behaviorTreeUpdate.bind(this));let r=!1;this.addEventListener(InternalNeedsRerenderEvent.type,()=>{r||(r=!0,queueMicrotask(()=>{r=!1,this.rerenderAllComponents(),this.syncInertAttribute()}))}),this.initializeAsync()}async initializeAsync(){let e;try{e=await Xo(this[pt].sdkKey,this[pt].sdkKey.sessionAuthKey),e.channels=e.channels.filter(e=>tn[e.channel_code])}catch(e){return this[pt].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[pt].behaviorTree.bb.sdkFatalErrorMessage=Ht(e),void this.behaviorTreeUpdate()}this.dispatchEvent(new InternalUpdateWorldState({business:e.business,customer:e.customer,session:e.session,channels:e.channels,channelUiGroups:e.channel_ui_groups,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null,cardDetails:{cardNumber:null,details:null}}))}assertInitialized(){if(!this[pt].worldState)throw new Error("The session data is not loaded. Listen for the `init` event. Only `createChannelPickerComponent` can be called before initialization.")}isMock(){return!1}findChannel(e){this.assertInitialized();return this[pt].worldState.channels.find(t=>t.channel_code===e)??null}onUpdateWorldState(e){const t=e.data;this[pt].worldState=function(e,t){const n={...e};for(const e of Object.keys(t)){const r=t[e];void 0!==r&&(n[e]=r)}return n}(this[pt].worldState??{},t);const n=this[pt].worldState.session.locale,r=(e=>{const t=go();return t.init({lng:e,fallbackLng:"en",supportedLngs:["en","id","th","vi"],debug:!1,defaultNS:"session",interpolation:{escapeValue:!1},resources:{en:yo,id:bo,th:vo,vi:xo}}),t})(n);this.t=r.getFixedT(n,"session"),this.behaviorTreeUpdate(),this.rerenderAllComponents()}behaviorTreeUpdate(){const e=this[pt].behaviorTree.bb;"LOADING"===e.sdkStatus&&this[pt].worldState&&(e.sdkStatus="ACTIVE"),e.world=this[pt].worldState;const t=this[pt].currentChannelCode?this[pt].liveComponents.paymentChannels.get(this[pt].currentChannelCode):null;e.channel=t?Jt(t.channel[pt],t.savePaymentMethod):null,e.channelProperties=t?t.channelProperties:null,e.savePaymentMethod=t?t.savePaymentMethod:null;try{this[pt].behaviorTree.update()}catch(e){this[pt].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[pt].behaviorTree.bb.sdkFatalErrorMessage=Ht(e),this[pt].behaviorTree.update()}}getSdkStatus(){return this[pt].behaviorTree.bb.sdkStatus}rerenderAllComponents(){this.renderChannelPicker();for(const e of this[pt].liveComponents.paymentChannels.keys())this.renderPaymentChannel(e)}getSession(){return this.assertInitialized(),rn(this[pt].worldState.session)}getCustomer(){return this.assertInitialized(),this[pt].worldState.customer?(Dt((e=this[pt].worldState.customer).type,"INDIVIDUAL"),Mt(e.individual_detail),{id:e.id,type:e.type,email:e.email??void 0,mobileNumber:e.mobile_number??void 0,individualDetail:{givenNames:e.individual_detail.given_names??void 0,surname:e.individual_detail.surname??void 0}}):null;var e}getActiveChannelGroups(e){return this.assertInitialized(),function(e,t,n){const r=sn(t),a=cn(e,n);return t.filter(e=>a[e.id]?.length).map(e=>an(e,a,r,n))}(this[pt].worldState.channels,this[pt].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[pt].worldState.session,pairChannels:un(this[pt].worldState.channels)})}getActiveChannels(e){return this.assertInitialized(),function(e,t,n){const r=sn(t),a=cn(e,n);return e.filter(e=>ln(e,n)).map(e=>dn(e,a,r,n))}(this[pt].worldState.channels,this[pt].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[pt].worldState.session,pairChannels:un(this[pt].worldState.channels)})}createChannelPickerComponent(){this[pt].liveComponents.channelPicker&&this.destroyComponent(this[pt].liveComponents.channelPicker);const e=document.createElement("xendit-channel-picker");return this[pt].liveComponents.channelPicker=e,this[pt].worldState&&this.renderChannelPicker(),this.setupUiEventsForChannelPicker(e),e}renderChannelPicker(){this.assertInitialized();const e=this[pt].liveComponents.channelPicker;e&&K(b(Rt,{data:this[pt].worldState,sdk:this,children:b(fn,{})}),e)}setupUiEventsForChannelPicker(e){e.addEventListener(XenditClearCurrentChannelEvent.type,e=>{this.assertInitialized();const t=e,n=this[pt].currentChannelCode;if(!n)return;const r=this[pt].worldState.channels.find(e=>e.channel_code===n);r&&r.ui_group===t.uiGroup&&this.setCurrentChannel(null)})}createChannelComponent(e,t=!0){if(this.assertInitialized(),!Qt(this[pt].worldState.session,e[pt][0]))throw new Error("Cannot create channel component: `session.amount` is outside of the channel's min/max amount.");const n=e[pt][0].channel_code,r=this[pt].liveComponents.paymentChannels.get(n);let a,o={current:null};return r?(a=r.element,o=r.channelFormRef):(a=document.createElement("xendit-payment-channel"),a.setAttribute("inert",""),this.setupUiEventsForPaymentChannel(a),this[pt].liveComponents.paymentChannels.set(n,{element:a,channel:e,channelProperties:null,channelFormRef:o,savePaymentMethod:!1})),this.renderPaymentChannel(n),t&&this.setCurrentChannel(e),a}renderPaymentChannel(e){this.assertInitialized();const t=this[pt].liveComponents.paymentChannels.get(e);if(!t)return;const n=t.channel;K(b(Rt,{data:this[pt].worldState,sdk:this,children:b(Go,{channels:n[pt],savePaymentMethod:t.savePaymentMethod,formRef:t.channelFormRef})}),t.element)}getCurrentChannel(){const e=this[pt].currentChannelCode;return e?this.getActiveChannels().find(t=>{if(t.channelCode===e||Array.isArray(t.channelCode)&&t.channelCode.includes(e))return!0})??null:null}setCurrentChannel(e){const t=this[pt].currentChannelCode,n=e?.[pt][0].channel_code??null;if(t===n)return;let r=null;e&&n&&(r=this[pt].liveComponents.paymentChannels.get(n)??null,r||(this.createChannelComponent(e,!1),r=this[pt].liveComponents.paymentChannels.get(n)??null)),this[pt].currentChannelCode=n,this.behaviorTreeUpdate(),this.syncInertAttribute()}syncInertAttribute(){const e=this[pt].behaviorTree.bb.submissionRequested,t=this[pt].liveComponents.paymentChannels;for(const[n,r]of t){(Array.isArray(r.channel.channelCode)?r.channel.channelCode[0]:r.channel.channelCode)!==this[pt].currentChannelCode||e?r.element.setAttribute("inert",""):r.element.hasAttribute("inert")&&r.element.removeAttribute("inert")}}setupUiEventsForPaymentChannel(e){e.addEventListener(XenditChannelPropertiesChangedEvent.type,e=>{const t=e,n=t.channel,r=this[pt].liveComponents.paymentChannels.get(n);r&&(r.channelProperties=t.channelProperties,this.behaviorTreeUpdate())}),e.addEventListener(XenditSavePaymentMethodChangedEvent.type,e=>{const t=e,n=t.channel,r=this[pt].liveComponents.paymentChannels.get(n);r&&(r.savePaymentMethod=t.savePaymentMethod,this.behaviorTreeUpdate(),this.rerenderAllComponents())})}showValidationErrors(){if(!this[pt].behaviorTree.findBehavior(ChannelInvalidBehavior))return;const e=this[pt].currentChannelCode;if(!e)return;const t=this[pt].liveComponents.paymentChannels.get(e);if(!t)throw new Error("Current channel is set but component is missing; this is a bug, please contact support.");const n=t.channelFormRef.current;n?.validate()}createActionContainerComponent(e){this.assertInitialized(),this[pt].liveComponents.actionContainer&&this.destroyComponent(this[pt].liveComponents.actionContainer);const t=this[pt].behaviorTree.findBehavior(PeRequiresActionBehavior);if(e!==pt&&t&&!t.canCreateActionContainer)throw new Error("Unable to create action container; there is an action in progress. Create an action before or during the `action-begin` event.");const n=document.createElement("xendit-action-container");return this[pt].liveComponents.actionContainer=n,n}destroyComponent(e){if(!e.tagName.startsWith("XENDIT-"))throw new Error("Unable to destroy component; only elements created by this SDK can be destroyed.");if(this[pt].liveComponents.channelPicker===e)return this[pt].liveComponents.channelPicker=null,K(null,e),void e.remove();for(const[t,n]of this[pt].liveComponents.paymentChannels)if(n.element===e)return this[pt].liveComponents.paymentChannels.delete(t),this[pt].currentChannelCode===t&&this.setCurrentChannel(null),K(null,e),void e.remove();if(this[pt].liveComponents.actionContainer===e)return this[pt].liveComponents.actionContainer=null,K(null,e),void e.remove();throw new Error("Unable to destroy component; component not found. It may have already been destroyed.")}submit(){this.assertInitialized();if(!this[pt].behaviorTree.findBehavior(SessionActiveBehavior))throw new Error("Unable to submit; the session is not in the active state. Listen to the `session-complete` and `session-expired-or-canceled` events and display success or failure states accordingly.");const e=this[pt].currentChannelCode;if(!e)throw new Error("Unable to submit; there is no current payment channel. Create a payment component with `createChannelComponent` or make an existing one active with `setCurrentChannel`.");if(!this[pt].liveComponents.paymentChannels.get(e))throw new Error("Current channel is set but component is missing; this is a bug, please contact support.");this.showValidationErrors();if(this[pt].behaviorTree.findBehavior(ChannelInvalidBehavior))throw new Error("Unable to submit; the form for the current channel has errors. Listen to the `submission-ready` and `submission-not-ready` events, do not allow submission while in the not-ready state.");if(!this[pt].behaviorTree.findBehavior(ChannelValidBehavior))throw new Error("Unable to submit; the SDK is not in a valid state for submission. Listen to the `submission-ready` and `submission-not-ready` events, do not allow submission while in the not-ready state.");this[pt].behaviorTree.bb.submissionRequested=!0,this.behaviorTreeUpdate(),this.syncInertAttribute()}abortSubmission(){this.assertInitialized();this[pt].behaviorTree.findBehavior(SubmissionBehavior)&&(this[pt].behaviorTree.bb.submissionRequested=!1,this.behaviorTreeUpdate())}simulatePayment(){if(this.assertInitialized(),"PAY"!==this[pt].worldState.session.session_type)throw new Error('Unable to simulate payment, the session type is not "PAY".');if(!this[pt].behaviorTree.findBehavior(PeRequiresActionBehavior))throw new Error("Unable to simulate payment; there is no action in progress. You can simulate payments any time between the `action-begin` and `action-end` events.");const e=this[pt].worldState.paymentEntity;if(!e)throw new Error("The PeRequiresActionBehavior is present but there is no payment entity. This is a bug, please contact support.");const t=this.findChannel(e.entity.channel_code);if(!t)throw new Error("Channel not found; this is a bug, please contact support.");if(!function(e){switch(e.pm_type){case"QR_CODE":case"VIRTUAL_ACCOUNT":case"OVER_THE_COUNTER":return!0;default:return!1}}(t))throw new Error("Unable to simulate payment; the payment channel does not support simulation.");this[pt].behaviorTree.bb.simulatePaymentRequested=!0,this.behaviorTreeUpdate()}getState(){const e=this[pt].currentChannelCode,t=this[pt].liveComponents.paymentChannels.get(e??"");return{channelCode:e,channelProperties:t?.channelProperties||null,behaviorTree:this[pt].behaviorTree}}addEventListener(e,t,n){return super.addEventListener(e,t,n)}removeEventListener(e,t,n){return super.removeEventListener(e,t,n)}static amountFormat(e,t){return function(e,t){let n="";const r=e<0,a=Si[t]??"en",o=Ai[t]??2;if(n=new Intl.NumberFormat(a,{style:"decimal",minimumFractionDigits:o,maximumFractionDigits:20}).format(Math.abs(e)),n=n.replace(/(\.|,)000?$/,""),Ni[t]){const e=Ni[t]??t;n=(Ti[t]??"$1").replace("$",e).replace("1",n)}else n=t+" "+n;return r&&(n="-"+n),n}(e,t)}}class XenditComponentsTest extends XenditComponents{nextMockUpdate=null;constructor(e){super({...e,sessionClientKey:si()})}async initializeAsync(){await Ut(Lt);const e=(await Promise.resolve().then(function(){return _i})).makeTestBffData();this.dispatchEvent(new InternalUpdateWorldState({business:e.business,customer:e.customer,session:e.session,channels:e.channels,channelUiGroups:e.channel_ui_groups,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null,cardDetails:{cardNumber:null,details:null}}))}isMock(){return!0}}"undefined"==typeof window||"undefined"==typeof document||(function(){const e=document.createElement("style");e.textContent='@font-face {\n font-family: "Proxima Nova";\n font-style: normal;\n font-weight: 300;\n font-display: swap;\n src:\n local("Proxima Nova Light"),\n local("Proxima Nova"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_light.otf")\n format("opentype");\n}\n\n@font-face {\n font-family: "Proxima Nova";\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src:\n local("Proximanova Regular"),\n local("Proxima Nova"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_regular.ttf")\n format("truetype");\n}\n\n@font-face {\n font-family: "Proxima Nova";\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src:\n local("Proxima Nova Bold"),\n local("Proxima Nova"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_bold.otf")\n format("opentype"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_boldit.otf")\n format("opentype"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_extrabold.otf")\n format("opentype");\n}\n\n@font-face {\n font-family: "Proxima Nova";\n font-style: normal;\n font-weight: 900;\n font-display: swap;\n src:\n local("Proxima Nova Black"),\n local("Proxima Nova"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_black.otf")\n format("opentype"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_blackit.otf")\n format("opentype"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_black.ttf")\n format("truetype");\n}\n\n/* variables */\nhtml {\n --xendit-font-family: "Proxima Nova", sans-serif;\n --xendit-color-primary: #1762ee;\n --xendit-color-text: #252525;\n --xendit-color-text-secondary: #585858;\n --xendit-color-text-placeholder: #7d7d7d;\n --xendit-color-disabled: #f7f7f7;\n --xendit-color-danger: #d1414d;\n --xendit-color-border: rgba(0, 0, 0, 0.05);\n --xendit-color-border-subtle: rgba(243, 243, 243);\n --xendit-color-border-default: #ededed;\n --xendit-color-background: #ffffff;\n --xendit-focus-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n --xendit-animation-duration: 0.3s;\n --xendit-animation-ease: ease-in-out;\n --xendit-radius-1: 8px;\n --xendit-z-index-focus: 2;\n\n /* Browser-specific border collapse margins */\n --xendit-border-collapse-offset: -0.5px; /* Default for Chrome/Edge */\n --xendit-border-collapse-webkit-gecko: -1.5px; /* Fix Safari and Firefox subpixel rendering */\n}\n\n/* Set default font for root components */\nxendit-channel-picker,\nxendit-action-container,\nxendit-payment-channel {\n display: block;\n unicode-bidi: isolate;\n font-family: var(--xendit-font-family, sans-serif);\n color: var(--xendit-color-text);\n}\n\n.xendit-default-action-container {\n font-family: var(--xendit-font-family, sans-serif);\n}\n\nxendit-action-container {\n background-color: var(--xendit-color-background);\n}\n\nxendit-payment-channel button,\nxendit-payment-channel textarea,\nxendit-payment-channel select,\nxendit-payment-channel input,\nxendit-payment-channel input::placeholder {\n font-family: inherit;\n}\n\nxendit-payment-channel input::placeholder,\nxendit-payment-channel textarea::placeholder,\nxendit-payment-channel select::placeholder {\n color: var(--xendit-color-text-placeholder);\n}\n\n/* Reusable typography classes */\n.xendit-text-12 {\n font-size: 12px;\n line-height: 16px;\n letter-spacing: -0.01px;\n}\n\n.xendit-text-14 {\n font-size: 14px;\n line-height: 16px;\n letter-spacing: -0.09px;\n}\n\n.xendit-text-16 {\n font-size: 16px;\n line-height: 16px;\n letter-spacing: -0.09px;\n}\n\n.xendit-text-12,\n.xendit-text-14,\n.xendit-text-16 {\n font-weight: 400;\n}\n\n.xendit-text-semibold {\n font-weight: 600;\n}\n\n.xendit-text-bold {\n font-weight: 700;\n}\n\n.xendit-text-secondary {\n color: var(--xendit-color-text-secondary);\n}\n\n/* Accordion component */\n\n.xendit-accordion {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-accordion-item {\n border: 1px solid var(--xendit-color-border);\n border-radius: 8px;\n background: var(--xendit-color-background);\n}\n\n.xendit-accordion-item-header {\n display: grid;\n grid-template-columns: auto 1fr auto;\n grid-gap: 16px;\n align-items: center;\n cursor: pointer;\n padding: 24px 16px;\n color: var(--xendit-color-text);\n border-radius: 8px;\n}\n\n.xendit-accordion-item-disabled.xendit-accordion-item {\n background-color: var(--xendit-color-disabled);\n border-color: var(--xendit-color-disabled);\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-header {\n cursor: not-allowed;\n}\n\n.xendit-accordion-item-header-title {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-header-title,\n.xendit-accordion-item-disabled .xendit-accordion-item-header-icon {\n opacity: 0.5;\n}\n\n.xendit-accordion-item.xendit-accordion-item-open\n .xendit-accordion-item-header {\n color: var(--xendit-color-primary);\n}\n\n.xendit-accordion-item-chevron {\n color: var(--xendit-color-text);\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-chevron {\n display: none;\n}\n\n.xendit-accordion-item-chevron g {\n transition: transform var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n\n.xendit-accordion-item-header:focus-visible {\n border-radius: 8px;\n box-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n outline: none;\n}\n\n.xendit-accordion-item-content {\n overflow: hidden;\n transition: height var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n\n.xendit-accordion-item.xendit-accordion-item-closed\n .xendit-accordion-item-content {\n height: 0;\n}\n\n.xendit-accordion-item.xendit-accordion-item-open\n .xendit-accordion-item-content {\n height: calc-size(auto, size);\n}\n\n.xendit-accordion-item-padding {\n padding: 16px;\n}\n\n/* Channel picker group */\n\n.xendit-channel-picker-group {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-channel-picker-group select {\n border: 1px solid var(--xendit-color-border);\n border-radius: 8px;\n padding: 12px;\n appearance: none;\n outline: none;\n}\n\n.xendit-channel-picker-group select:focus {\n box-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n}\n\n.xendit-channel-logo {\n width: 24px;\n height: 16px;\n margin: -5px 0;\n padding: 4px;\n border: 1px solid var(--xendit-color-border-default);\n border-radius: 4px;\n background-color: white; /* always white, not --xendit-color-background */\n object-fit: contain;\n}\n\n/* Payment channel */\n\nxendit-payment-channel[inert] {\n filter: opacity(0.5) grayscale(1);\n}\n\n.xendit-payment-channel {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-payment-channel-instructions {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-gap: 12px;\n color: var(--xendit-color-text-secondary);\n}\n\n.xendit-payment-channel-instructions-text {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 4px;\n}\n\n.xendit-payment-channel-instructions-text p {\n margin: 0;\n}\n\n/* Forms */\n\n.xendit-channel-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-channel-form > form {\n display: contents;\n}\n\n.xendit-form-field-group {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.xendit-channel-form-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-channel-form-field-group {\n display: grid;\n gap: 8px;\n}\n\n.xendit-channel-form-field-group label {\n width: fit-content;\n cursor: pointer;\n}\n\n.xendit-form-field-group.invalid .xendit-channel-form-field input,\n.xendit-form-field-group.invalid\n .xendit-channel-form-field\n .xendit-iframe-container,\n.xendit-form-field-group.invalid .xendit-dropdown button {\n border: 1px solid var(--xendit-color-danger);\n}\n\n.xendit-channel-form-field input:not([type="checkbox"]),\n.xendit-channel-form-field select,\n.xendit-channel-form-field .xendit-iframe-container {\n display: flex;\n border: 1px solid var(--xendit-color-border-subtle);\n background: var(--xendit-color-background);\n border-radius: 8px;\n padding: 12px;\n appearance: none;\n}\n\n/* TODO: Refine these class usages */\n.xendit-channel-form-field.field-radius-tl-0 input,\n.xendit-channel-form-field.field-radius-tl-0 button,\n.xendit-channel-form-field.field-radius-tl-0 .xendit-iframe-container {\n border-top-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-tr-0 input,\n.xendit-channel-form-field.field-radius-tr-0 button,\n.xendit-channel-form-field.field-radius-tr-0 .xendit-iframe-container {\n border-top-right-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-bl-0 input,\n.xendit-channel-form-field.field-radius-bl-0 button,\n.xendit-channel-form-field.field-radius-bl-0 .xendit-iframe-container {\n border-bottom-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-br-0 input,\n.xendit-channel-form-field.field-radius-br-0 button,\n.xendit-channel-form-field.field-radius-br-0 .xendit-iframe-container {\n border-bottom-right-radius: 0;\n}\n\n.xendit-channel-form-field.field-collapse-l,\n.xendit-channel-form-field.field-collapse-l {\n margin-left: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-r,\n.xendit-channel-form-field.field-collapse-r {\n margin-right: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-l .xendit-iframe-container {\n margin-left: calc(var(--xendit-border-collapse-offset) * 2);\n width: calc(100% + abs(var(--xendit-border-collapse-offset) * 2));\n}\n\n.xendit-channel-form-field.field-collapse-r .xendit-iframe-container {\n margin-right: 0;\n}\n\n.xendit-channel-form-field.field-collapse-t input,\n.xendit-channel-form-field.field-collapse-t button,\n.xendit-channel-form-field.field-collapse-t .xendit-iframe-container {\n margin-top: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-b input,\n.xendit-channel-form-field.field-collapse-b button,\n.xendit-channel-form-field.field-collapse-b .xendit-iframe-container {\n margin-bottom: var(--xendit-border-collapse-offset);\n}\n\n/* Safari and Firefox specific adjustments */\n@supports (font: -apple-system-body) or (-moz-appearance: none) {\n .xendit-channel-form-field.field-collapse-l .xendit-iframe-container {\n margin-left: 0;\n width: 100%;\n }\n\n .xendit-channel-form-field.field-collapse-b input,\n .xendit-channel-form-field.field-collapse-b button {\n margin-bottom: var(--xendit-border-collapse-webkit-gecko);\n height: calc(100% + abs(var(--xendit-border-collapse-webkit-gecko) * 2));\n }\n}\n\n.xendit-channel-form-field.field-collapse-r .xendit-iframe-container:focus {\n border-right: none;\n}\n\n.xendit-channel-form-field.field-collapse-l .xendit-iframe-container:focus {\n border-left: none;\n}\n/* Ends TODO */\n\n.xendit-card-brand-logo {\n width: 24px;\n height: 16px;\n border: 1px solid var(--xendit-color-border-default);\n border-radius: 4px;\n padding: 4px;\n background-color: white; /* always white, not --xendit-color-background */\n}\n\n.xendit-card-brands-list {\n display: flex;\n align-items: center;\n padding: 8px 12px;\n gap: 4px;\n}\n\n.xendit-channel-form-field input:focus,\n.xendit-channel-form-field select:focus,\n.xendit-channel-form-field .xendit-iframe-container.xendit-field-focus {\n border-color: var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\n outline: none;\n z-index: var(--xendit-z-index-focus);\n}\n\n.xendit-channel-form-field button:focus {\n position: relative;\n z-index: var(--xendit-z-index-focus);\n}\n\n.xendit-channel-form-field .xendit-iframe-container {\n height: 40px;\n width: 100%;\n padding: 0;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.xendit-channel-form-field .xendit-iframe-container iframe {\n height: 40px;\n width: 100%;\n border: none;\n min-width: 0;\n}\n\n.xendit-channel-form-field.xendit-form-field-span-1 {\n grid-column: span 1;\n}\n\n.xendit-channel-form-field.xendit-form-field-span-2 {\n grid-column: span 2;\n}\n\n.xendit-checkbox {\n display: flex;\n align-items: center;\n}\n\n.xendit-checkbox-box {\n display: flex;\n}\n\n.xendit-checkbox input {\n width: 16px;\n height: 16px;\n margin: 0;\n cursor: pointer;\n}\n\n.xendit-checkbox label {\n cursor: pointer;\n padding-left: 8px;\n}\n\n.xendit-checkbox input {\n opacity: 0;\n position: absolute;\n}\n\n.xendit-checkbox input + .xendit-checkbox-graphic {\n width: 16px;\n height: 16px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n box-sizing: border-box;\n color: transparent;\n}\n\n.xendit-checkbox input:checked + .xendit-checkbox-graphic {\n color: var(--xendit-color-background);\n background-color: var(--xendit-color-primary);\n border-color: var(--xendit-color-primary);\n}\n\n/* Dialog */\n\n.xendit-dialog-backdrop {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n padding: 48px;\n justify-content: center;\n align-items: center;\n}\n\n.xendit-dialog-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: var(--xendit-color-background);\n padding: 8px 0;\n gap: 16px;\n line-height: 24px;\n}\n\n.xendit-dialog-header button {\n background: none;\n border: none;\n color: var(--xendit-color-background);\n cursor: pointer;\n padding: 0;\n}\n\n.xendit-dialog-body {\n display: flex;\n background-color: var(--xendit-color-background);\n border-radius: 8px;\n padding: 8px;\n}\n\n.xendit-error-message {\n color: var(--xendit-color-danger);\n}\n\n/* Phone input Dropdown */\n.xendit-input-phone .xendit-combobox {\n display: flex;\n gap: 8px;\n}\n\n.xendit-phone-number-input {\n width: 100%;\n}\n\n.xendit-input-phone .xendit-dropdown button {\n width: 64px;\n}\n\n.xendit-input-phone .xendit-dropdown button .xendit-dropdown-button-title {\n display: none;\n}\n\n.xendit-dropdown .xendit-dropdown-search input {\n padding: 8px;\n border: 1px solid var(--xendit-color-border-subtle);\n border-radius: var(--xendit-radius-1);\n box-sizing: border-box;\n}\n\n.xendit-dropdown-search input:focus {\n outline: none;\n border-color: var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\n}\n\n/* Phone input Dropdown ends */\n\n/* Dropdown */\n.xendit-dropdown button {\n width: 100%;\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: 8px;\n text-align: left;\n background-color: var(--xendit-color-background);\n border: 1px solid var(--xendit-color-border-subtle);\n border-radius: var(--xendit-radius-1);\n justify-content: space-between;\n padding: 12px;\n cursor: pointer;\n}\n\n.xendit-dropdown button.xendit-dropdown-has-asset {\n grid-template-columns: auto 1fr auto;\n}\n\n.xendit-dropdown button:disabled {\n background: var(--xendit-color-disabled);\n}\n\n.xendit-dropdown button:focus {\n outline: none;\n border: 1px solid var(--xendit-color-primary);\n box-shadow: 0px 0px 0px 2px #1762ee26;\n}\n\n.xendit-dropdown-menu {\n position: absolute;\n z-index: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: 168px;\n width: 257px;\n padding: 4px;\n margin: 4px 0;\n background-color: var(--xendit-color-background);\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n list-style: none;\n box-shadow: 0px 4px 8px 0px #25252514;\n overflow-y: auto;\n}\n\n.xendit-dropdown-menu ul {\n list-style: none;\n padding: 4px;\n margin-top: 0;\n}\n\n.xendit-dropdown-search {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.xendit-dropdown-search input {\n width: 100%;\n}\n\n.xendit-dropdown-item {\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: 8px;\n padding: 8px 12px 8px 4px;\n border-radius: var(--xendit-radius-1);\n cursor: pointer;\n z-index: 0;\n --xendit-dropdown-item-hover-color: var(--xendit-color-background);\n --xendit-dropdown-item-hover-bg-color: var(--xendit-color-primary);\n}\n\n.xendit-dropdown-item-disabled {\n --xendit-dropdown-item-hover-color: var(--xendit-color-text);\n --xendit-dropdown-item-hover-bg-color: var(--xendit-color-disabled);\n}\n\n.xendit-dropdown-item:hover {\n background-color: var(--xendit-dropdown-item-hover-bg-color);\n}\n\n.xendit-dropdown-item:hover .xendit-dropdown-item-text,\n.xendit-dropdown-item:hover .xendit-dropdown-item-description {\n color: var(--xendit-dropdown-item-hover-color);\n}\n\n.xendit-dropdown-item-selected {\n color: var(--xendit-color-primary);\n}\n\n.xendit-dropdown-item:hover .xendit-dropdown-item-selected {\n color: var(--xendit-dropdown-item-hover-color);\n}\n\n.xendit-dropdown-item.xendit-dropdown-has-asset {\n grid-template-columns: auto 1fr auto;\n}\n\n.xendit-dropdown-item-text {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.xendit-dropdown-item-disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.xendit-dropdown-item-disabled:hover,\n.xendit-dropdown-item-disabled.is-active {\n background-color: var(--xendit-color-disabled);\n}\n\n/* Dropdown ends */\n';const t=document.querySelector("style, link");t?t.insertAdjacentElement("beforebegin",e):document.head.appendChild(e)}(),function(){const e=document.createElement("svg");e.id="xendit-icon-set",e.style.display="none",K(lt("defs",{children:ht.map(e=>e.node)}),e),document.head.appendChild(e)}()),e.XenditActionBeginEvent=XenditActionBeginEvent,e.XenditActionEndEvent=XenditActionEndEvent,e.XenditComponents=XenditComponents,e.XenditComponentsTest=XenditComponentsTest,e.XenditFatalErrorEvent=XenditFatalErrorEvent,e.XenditInitEvent=XenditInitEvent,e.XenditNotReadyEvent=XenditNotReadyEvent,e.XenditPaymentRequestCreatedEvent=XenditPaymentRequestCreatedEvent,e.XenditPaymentRequestDiscardedEvent=XenditPaymentRequestDiscardedEvent,e.XenditPaymentTokenCreatedEvent=XenditPaymentTokenCreatedEvent,e.XenditPaymentTokenDiscardedEvent=XenditPaymentTokenDiscardedEvent,e.XenditReadyEvent=XenditReadyEvent,e.XenditSessionCompleteEvent=XenditSessionCompleteEvent,e.XenditSessionExpiredOrCanceledEvent=XenditSessionExpiredOrCanceledEvent,e.XenditSubmissionBeginEvent=XenditSubmissionBeginEvent,e.XenditSubmissionEndEvent=XenditSubmissionEndEvent,e.XenditWillRedirectEvent=XenditWillRedirectEvent});
6
+ */var yt=($t||($t=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=r(e,a(n)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var a="";for(var i in e)t.call(e,i)&&e[i]&&(a=r(a,i));return a}function r(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(gt)),gt.exports),bt=_t(yt);const vt=e=>{const{id:t,title:n,subtitle:a,disabled:r,open:i,onClick:o,children:d}=e,s=i?"up":"down",l=Ee(()=>{r||o(t)},[r,o,t]),c=Ee(e=>{"Enter"!==e.key&&" "!==e.key||(l(),e.preventDefault())},[l]),u=Ee(()=>{l()},[l]);return lt("div",{className:bt("xendit-accordion-item",r?"xendit-accordion-item-disabled":"",i?"xendit-accordion-item-open":"xendit-accordion-item-closed"),children:[lt("div",{className:"xendit-accordion-item-header",onClick:u,onKeyDown:c,role:"button",tabIndex:r?-1:0,children:[lt(ct,{className:"xendit-accordion-item-header-icon",name:"dummy",size:24}),lt("div",{className:"xendit-accordion-item-header-title xendit-text-16 xendit-text-bold",children:[n,a?lt("div",{className:"xendit-accordion-item-header-subtitle xendit-text-14",children:a}):null]}),lt(ct,{className:"xendit-accordion-item-chevron",name:"chevron",size:24,direction:s})]}),lt("div",{className:"xendit-accordion-item-content",inert:!i,children:lt("div",{className:"xendit-accordion-item-padding",children:d})})]})},xt=V(null);xt.displayName="SessionContext";const wt=V(null);wt.displayName="BusinessContext";const kt=V(null);kt.displayName="CustomerContext";const Ct=V(null);Ct.displayName="ChannelsContext";const Et=V(null);Et.displayName="ChannelUiGroupsContext";const St=V({cardNumber:null,details:null});St.displayName="CardDetailsContext";const Pt=V(null);Pt.displayName="SdkContext";const Nt=V(null);Nt.displayName="CurrentChannelContext";const Tt=()=>{const e=Se(xt);if(null===e)throw new Error("useSession must be used within a XenditSessionProvider");return e},Rt=()=>{const e=Se(Ct);if(null===e)throw new Error("useChannels must be used within a XenditSessionProvider");return e},At=()=>Se(St),Ot=()=>{const e=Se(Pt);if(null===e)throw new Error("useSdk must be used within a XenditSessionProvider");return e},It=()=>Se(Nt),Lt=({children:e,data:t,sdk:n})=>{const{session:a,business:r,customer:i,channels:o,channelUiGroups:d}=t,s=n.getCurrentChannel()?.[ft]?.[0]??null;return lt(Pt.Provider,{value:n,children:lt(Nt.Provider,{value:s,children:lt(xt.Provider,{value:a,children:lt(wt.Provider,{value:r,children:lt(kt.Provider,{value:i,children:lt(Ct.Provider,{value:o,children:lt(Et.Provider,{value:d,children:lt(St.Provider,{value:t.cardDetails,children:e})})})})})})})})},Mt=300;function Dt(e){if(null==e)throw new Error("Assertion failed: argument is null or undefined; this is a bug, please contact support.")}function Ut(e,t){if(e!==t)throw new Error("Assertion failed; this is a bug, please contact support.")}function Ft(e){return new Promise(t=>setTimeout(t,1*e))}class AbortError extends Error{constructor(){super("AbortError"),this.name="AbortError"}}function Bt(e){return e instanceof AbortError&&"AbortError"===e.name}function jt(e,t){return new Promise((n,a)=>{function r(){t.removeEventListener("abort",r),clearTimeout(i),a(new AbortError)}const i=setTimeout(()=>{t.removeEventListener("abort",r),n()},1*e);t.aborted?r():t.addEventListener("abort",r)})}function qt(e){if(!e.length)throw new Error("Cannot search the actions list because it's empty.");const t=e.find(e=>{switch(e.type){case"REDIRECT_CUSTOMER":switch(e.descriptor){case"WEB_URL":return!0;case"DEEPLINK_URL":return function(){const e=navigator.userAgent;if(!e)return!1;if(/android/i.test(e))return!0;if(/iPad|iPhone|iPod/.test(e))return!0;return!1}();case"WEB_GOOGLE_PAYLINK":return!1}break;case"PRESENT_TO_CUSTOMER":return!0;case"API_POST_REQUEST":return!1}return!1});return t||e[0]}const Kt="mock",Vt={pl:"https://checkout-ui-gateway.xendit.co",pd:"https://checkout-ui-gateway-prod-dev.xendit.co",sl:"https://checkout-ui-gateway-live.stg.tidnex.dev",sd:"https://checkout-ui-gateway-dev.stg.tidnex.dev"};function Gt(e){return Vt[e]??null}function Ht(e){const t=ke();return we(()=>{t.current=e}),t.current}function Wt(e){let t;if("string"==typeof e.channel_property)t=e.channel_property;else{t=Object.values(e.channel_property).join("__")}return t}function Xt(e){if(e instanceof Error)return e.stack??e.message;if("string"==typeof e)return e;try{return`Unknown error: ${JSON.stringify(e)}`}catch{return"Unknown error"}}function Yt(e){for(const t of Object.keys(e)){if("symbol"==typeof t)continue;const n=Object.getOwnPropertyDescriptor(e,t);void 0!==n&&("function"!=typeof n.get&&void 0===n.value&&delete e[t])}return e}function zt(e,t){let n=e;if(!t)return;if(Array.isArray(n))throw new Error("Getting values from channel property arrays is not supported.");let a=t;for(;;){if(!a||"object"!=typeof a||Array.isArray(a))return;const e=n.indexOf(".");if(-1===e)return a?a[n]:void 0;{const t=n.slice(0,e);a=a?a[t]:void 0,n=n.slice(e+1)}}}const Zt=new WeakMap;let Jt=1;function Qt(){return`xendit-id-${ke(Math.random().toString(36).substring(2,10)).current}`}function en(e,t){return Dt(e.length>0),Dt(e.length<=2),2===e.length?t?(Dt(!0===e[1].allow_save),e[1]):(Dt(!1===e[0].allow_save),e[0]):e[0]}function tn(e,t){if("PAY"!==e.session_type)return!0;const n=e.amount,a=t.min_amount??0,r=t.max_amount??Number.MAX_VALUE;return!(n<a||n>r)}function nn(e){Object.defineProperty(e,ft,{enumerable:!1,writable:!1,configurable:!1,value:e[ft]})}const an={CARDS:!0};const rn=e=>{const{id:t,options:n,onChange:a,defaultIndex:r=-1,selectedIndex:i,className:o,placeholder:d}=e,s=Qt(),l=t||s,c="number"==typeof i,[u,h]=ve(r),p=c?i:u,[f,m]=ve(p>=0?p:0),[_,$]=ve(!1),[g,y]=ve(""),b=ke(null),v=ke(null),x=ke(null),w=ke(null),k=Ce(()=>{const e=(e,t)=>({option:e,originalIndex:t});if(!g)return n.map(e);const t=n.map(e).filter(({option:e})=>{const t=g.toLowerCase();return e.title.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.value.toLowerCase().includes(t)});return t.length>0?t:n.map(e)},[g,n]),C=`${l}-label`,E=`${l}-listbox`,S=Math.max(0,Math.min(k.length-1,f)),P=k[S]?`${l}-opt-${S}`:`${l}-opt-none`;xe(()=>{if(!_)return;const e=e=>{const t=b.current;t&&(t.contains(e.target)||$(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[_]),xe(()=>{_&&p>=0&&m(p)},[_,p]);const N=Ee(e=>{e?.scrollIntoView({block:"end",behavior:"instant"})},[]),T=Ee((e,t)=>{if(!0===t)return;const r=n[e];r&&(c||h(e),a(r,e),$(!1),v.current?.focus())},[c,a,n]),R=Ee(()=>{_||($(!0),queueMicrotask(()=>w.current?.focus()))},[_]),A=Ee(()=>{_&&($(!1),y(""),v.current?.focus())},[_]),O=Ee(e=>{"ArrowDown"!==e.key&&"ArrowUp"!==e.key&&" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),R())},[R]),I=Ee(e=>{const t="dropdown-search-input"===e.target?.id;if("Escape"===e.key)return e.preventDefault(),void A();if("Enter"===e.key||" "===e.key){if(t&&" "===e.key)return;e.preventDefault();const n=k[S];return void(n&&T(n.originalIndex,n.option.disabled))}return"ArrowDown"===e.key?(e.preventDefault(),void m(e=>Math.min(k.length-1,e+1))):"ArrowUp"===e.key?(e.preventDefault(),void m(e=>Math.max(0,e-1))):"Home"===e.key?(e.preventDefault(),void m(0)):"End"===e.key?(e.preventDefault(),void m(k.length-1)):void 0},[S,A,T,k]),L=Ee(e=>{T(Number(e.currentTarget.dataset.index),Boolean(e.currentTarget.dataset.disabled))},[T]),M=p>=0?n[p]:void 0;return lt("div",{ref:b,className:`xendit-dropdown ${o??""}`,children:[lt("button",{id:l,ref:v,type:"button",className:M?.leadingAsset?"xendit-dropdown-has-asset":"","aria-controls":E,"aria-expanded":_?"true":"false",onClick:()=>_?A():R(),onKeyDown:e=>O(e),children:[M?.leadingAsset?M.leadingAsset:null,lt("span",M?{className:"xendit-dropdown-button-title xendit-text-14",children:M.shortTitle??M.title}:{className:"xendit-dropdown-button-title xendit-text-14 xendit-text-secondary",children:d}),lt(ct,{className:"xendit-dropdown-chevron",name:"chevron",size:16,direction:"down"})]}),_?lt("div",{className:"xendit-dropdown-menu",onClick:A,children:[lt("div",{className:"xendit-dropdown-search",children:lt("input",{ref:w,id:"dropdown-search-input",placeholder:"Search..",value:g,onInput:e=>{y(e.target.value),m(0)},onClick:e=>e.stopPropagation(),onKeyDown:I})}),lt("ul",{ref:x,id:E,role:"listbox",tabIndex:-1,"aria-labelledby":C,"aria-activedescendant":P,onKeyDown:I,children:k.map(({option:e,originalIndex:t},n)=>{const a=t===p,r=n===S;return lt("li",{role:"option","data-index":t,"data-disabled":!!e.disabled||void 0,"aria-disabled":!!e.disabled||void 0,"aria-selected":a,onClick:L,ref:r?N:void 0,children:lt("div",{className:`xendit-dropdown-item xendit-text-14 ${r?"is-active":""} ${e.leadingAsset?"xendit-dropdown-has-asset":""} ${e.disabled?"xendit-dropdown-item-disabled":""}`,children:[e.leadingAsset?e.leadingAsset:null,lt("div",{className:"xendit-dropdown-item-text xendit-text-14",children:[lt("span",{className:"xendit-dropdown-item-title",children:e.title}),e.description&&lt("span",{className:"xendit-dropdown-item-description xendit-text-12",children:e.description})]}),a?lt(ct,{name:"check",size:16,className:"xendit-dropdown-item-selected"}):null]})},t)})})]}):null]})};function on(e){return function(e,t){if(e===t)throw new Error("Assertion failed; this is a bug, please contact support.")}(e.session_type,"AUTHORIZATION"),Ut(e.mode,"COMPONENTS"),Yt({id:e.payment_session_id,description:e.description||void 0,sessionType:e.session_type,mode:e.mode,referenceId:e.reference_id,country:e.country,currency:e.currency,amount:e.amount,channelProperties:e.channel_properties||void 0,expiresAt:new Date(e.expires_at),locale:e.locale,status:e.status,items:e.items?.map(e=>Yt({type:e.type,referenceId:e.reference_id,name:e.name,netUnitAmount:e.net_unit_amount,quantity:e.quantity,url:e.url,imageUrl:e.image_url,category:e.category,subcategory:e.subcategory,description:e.description,metadata:e.metadata}))})}function dn(e,t,n,a){const r=Yt({groupId:e.id,label:e.label,get channels(){return(t[e.id]||[]).map(e=>ln(e,t,n,a))},[ft]:e});return nn(r),r}function sn(e,t){return ln(e,{},{},t)}function ln(e,t,n,a){Dt(!a.pairChannels.paired[e.channel_code]);const r=Yt({channelCode:a.pairChannels.pairs[e.channel_code]?.map(e=>e.channel_code)??e.channel_code,brandName:e.brand_name,brandColor:e.brand_color,brandLogoUrl:e.brand_logo_url,get uiGroup(){if(!n[e.ui_group])throw new Error("UI group not found");return dn(n[e.ui_group],t,n,a)},minAmount:e.min_amount,maxAmount:e.max_amount,cardBrands:e.card?.brands.map(e=>({name:e.name,logoUrl:e.logo_url})),[ft]:a.pairChannels.pairs[e.channel_code]??[e]});return nn(r),r}function cn(e){const t={};for(const n of e)t[n.id]=n;return t}function un(e,t){if(t.pairChannels.paired[e.channel_code])return!1;if(t.options.filterMinMax&&!tn(t.session,e))return!1;const n=t.options.filter;return!(n&&!function(e,t){if("string"==typeof e&&t===e)return!0;if(Array.isArray(e)&&e.includes(t))return!0;if(e instanceof RegExp&&e.test(t))return!0;return!1}(n,e.channel_code))}function hn(e,t){const n={};for(const a of e){if(!un(a,t))continue;const e=a.ui_group;n[e]||(n[e]=[]),n[e].push(a)}return n}function pn(e){const t=new Map;for(const n of e){const e=n.brand_name;t.has(e)||t.set(e,[]),t.get(e).push(n)}const n={},a={};for(const[e,r]of t)for(const e of r){if(!1===r[0].allow_save){const t=r.find(t=>e.channel_code!==t.channel_code&&e.ui_group===t.ui_group&&!0===t.allow_save);t&&(n[e.channel_code]=[e,t],a[t.channel_code]=!0)}}return{pairs:n,paired:a}}const fn=e=>{const{group:t,open:n}=e,a=Ot(),{t:r}=a,i=Tt(),o=Rt(),d=It(),s=i.session_type,l=Qt(),[c,u]=ve(null),h=ke(null),[p,f]=ve(!1),m=ke(null),_=Ce(()=>pn(o),[o]),$=Ce(()=>({pairChannels:_,session:{amount:i.amount,session_type:i.session_type},options:{filterMinMax:!1}}),[_,i.amount,i.session_type]),g=Ce(()=>o.filter(e=>un(e,$)&&e.ui_group===t.id),[o,t.id,$]);we(()=>{if(!h.current)return;if(!d)return;if(!n)return;g.find(e=>e.channel_code===d.channel_code)&&(m.current=a.createChannelComponent(sn(d,$)),m.current.parentElement!==h.current&&(f(!0),h.current.replaceChildren(m.current)))},[g,d,$,n,a]);const y=Ht(n);we(()=>{if(n&&!y&&null===d&&null!==c){const e=g.find(e=>e.channel_code===c);e&&a.setCurrentChannel(sn(e,$))}},[g,d,c,$,n,y,a]);const b=Ee(e=>{const t=o.find(t=>t.channel_code===e.value)||null;u(t?.channel_code??null),a.setCurrentChannel(t?sn(t,$):null)},[o,$,a]),v=Ce(()=>g.map(e=>({leadingAsset:lt("img",{className:"xendit-channel-logo",src:e.brand_logo_url},e.channel_code),title:e.brand_name,value:e.channel_code,disabled:!tn(i,e),description:mn(r,i,e)||void 0})),[g,i,r]);return lt("div",{className:"xendit-channel-picker-group",children:[1===g.length&&"CARDS"===g[0].channel_code?null:lt("div",{className:"xendit-channel-form-field-group",children:[lt("label",{htmlFor:l,className:"xendit-text-14",children:"SAVE"===s?r("payment_methods.add_payment_method",{groupName:t.label??"",ns:"session"}):r("payment_methods.pay_with")}),lt(rn,{id:l,selectedIndex:function(){const e=v.findIndex(e=>e.value===d?.channel_code);if(-1!==e)return e;const t=v.findIndex(e=>e.value===c);return-1!==t?t:-1}(),options:v,onChange:b,placeholder:r("payment_methods.select_channel_placeholder",{groupName:t.label,ns:"session"})})]}),lt("div",{style:{display:p?"":"none"},ref:h})]})};function mn(e,t,n){return tn(t,n)?null:n.min_amount&&t.amount<n.min_amount?e("payment_methods.channel_disabled_amount_too_small"):e("payment_methods.channel_disabled_amount_too_large")}const _n=e=>{const t=Ot(),n=Tt(),a=(()=>{const e=Se(Et);if(null===e)throw new Error("useChannelUiGroups must be used within a XenditSessionProvider");return e})(),r=It(),i=Rt(),{t:o}=Ot(),d=Ce(()=>hn(i,{options:{filterMinMax:!1},pairChannels:pn(i),session:n}),[i,n]),s=ke(null),l=Ce(()=>pn(i),[i]),c=Ce(()=>({pairChannels:l,session:{amount:n.amount,session_type:n.session_type},options:{filterMinMax:!1}}),[l,n.amount,n.session_type]),u=r?.ui_group??null,[h,p]=ve(null),f=Ee(e=>{if(u===e||h===e)u===e&&s.current?.dispatchEvent(new XenditClearCurrentChannelEvent(e)),h===e&&p(null);else{const r=a.find(t=>t.id===e);Dt(r);const s=$n(n,r,i,o).enabledChannels;if(0===s)return;if(1===s){const n=d[e][0];t.setCurrentChannel(sn(n,c)),p(null)}else p(e),t.setCurrentChannel(null)}},[a,i,d,c,h,t,u,n,o]);return we(()=>{null!==r&&null!==h&&p(null)},[r,h]),"ACTIVE"!==t.getSdkStatus()||"ACTIVE"!==n.status?null:lt("div",{ref:s,children:lt(mt,{children:a.filter(e=>(d[e.id]||[]).length>0).map(e=>{const t=null!==u?u===e.id:h===e.id,a=$n(n,e,i,o),r=0===a.enabledChannels,d=a.firstDisabledChannelReason;return lt(vt,{id:e.id,title:e.label,subtitle:d??void 0,open:t,disabled:r,onClick:f,children:lt(fn,{group:e,open:t})},e.id)})})})};function $n(e,t,n,a){let r=null,i=0;for(const o of n)o.ui_group===t.id&&(tn(e,o)?i++:null===r&&(r=mn(a,e,o)));return{enabledChannels:i,firstDisabledChannelReason:r}}class XenditClearCurrentChannelEvent extends Event{static type="xendit-clear-current-channel";uiGroup;constructor(e){super(XenditClearCurrentChannelEvent.type,{bubbles:!0,composed:!0}),this.uiGroup=e}}var gn={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:[19]|2[2-46-9]|3[3-9])|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:(?:18|4[0679]|5[03])\\d|2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9]))\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["3052(?:0[0-8]|[1-9]\\d)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|983)[2-47-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function yn(e,t){var n=Array.prototype.slice.call(t);return n.push(gn),e.apply(this,n)}function bn(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),a=t[0].split("."),r=0;r<3;r++){var i=Number(n[r]),o=Number(a[r]);if(i>o)return 1;if(o>i)return-1;if(!isNaN(i)&&isNaN(o))return 1;if(isNaN(i)&&!isNaN(o))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var vn={}.constructor;function xn(e){return null!=e&&e.constructor===vn}function wn(e){return wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wn(e)}function kn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cn(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,En(a.key),a)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function En(e){var t=function(e,t){if("object"!=wn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=wn(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==wn(t)?t:t+""}var Sn=" ext. ",Pn=/^\d+$/,Nn=function(){return Cn(function e(t){kn(this,e),Ln(t),this.metadata=t,Un.call(this,t)},[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&Pn.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new Tn(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new Tn(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var a=this.countryCallingCodes()[e];if(a&&1===a.length&&"001"===a[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),Tn=function(){return Cn(function e(t,n){kn(this,e),this.globalMetadataObject=n,this.metadata=t,Un.call(this,n.metadata)},[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map(function(t){return new Rn(t,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&In(this.types(),e))return new On(In(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?Sn:this.metadata[13]||Sn}}])}(),Rn=function(){return Cn(function e(t,n){kn(this,e),this._format=t,this.metadata=n},[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||An.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),An=/^\(?\$1\)?$/,On=function(){return Cn(function e(t,n){kn(this,e),this.type=t,this.metadata=n},[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function In(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function Ln(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!xn(e)||!xn(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(xn(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Mn(e)+": "+e,"."))}var Mn=function(e){return wn(e)};function Dn(e,t){if((t=new Nn(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function Un(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===bn(t,"1.2.0")?this.v2=!0:-1===bn(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function Fn(e,t,n){return function(e,t,n,a){t&&(a=new Nn(a.metadata)).selectNumberingPlan(t);var r=a.type(n),i=r&&r.possibleLengths()||a.possibleLengths();if(!i)return"IS_POSSIBLE";var o=e.length,d=i[0];if(d===o)return"IS_POSSIBLE";if(d>o)return"TOO_SHORT";if(i[i.length-1]<o)return"TOO_LONG";return i.indexOf(o,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,t,void 0,n)}function Bn(e,t,n){return"IS_POSSIBLE"===Fn(e,t,n)}function jn(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function qn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Kn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kn(e,t):void 0}}(e))||t){n&&(e=n);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}var Vn=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Gn(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new Nn(n)).selectNumberingPlan(e.country,e.countryCallingCode);var a=t.v2?e.nationalNumber:e.phone;if(jn(a,n.nationalNumberPattern())){if(Hn(a,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Hn(a,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var r,i=qn(Vn);!(r=i()).done;){var o=r.value;if(Hn(a,o,n))return o}}}}function Hn(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&jn(e,t.pattern()))}function Wn(e,t,n){var a=new Nn(n).getCountryCodesForCallingCode(e);return a?a.filter(function(e){return function(e,t,n){var a=new Nn(n);if(a.selectNumberingPlan(t),a.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)}):[]}var Xn="0-90-9٠-٩۰-۹",Yn="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~"),zn=new RegExp("(["+Xn+"])");function Zn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Jn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jn(e,t):void 0}}(e))||t){n&&(e=n);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function Qn(e,t){var n=t.nationalNumber,a=t.metadata,r=a.getCountryCodesForCallingCode(e);if(r)return 1===r.length?r[0]:function(e,t){var n=t.countries,a=t.metadata;a=new Nn(a);for(var r,i=Zn(n);!(r=i()).done;){var o=r.value;if(a.selectNumberingPlan(o),a.leadingDigits()){if(e&&0===e.search(a.leadingDigits()))return o}else if(Gn({phone:e,country:o},void 0,a.metadata))return o}}(n,{countries:r,metadata:a.metadata})}function ea(e,t,n){var a=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),a=n.exec(e);if(a){var r,i,o,d=a.length-1,s=d>0&&a[d];if(t.nationalPrefixTransformRule()&&s)r=e.replace(n,t.nationalPrefixTransformRule()),d>1&&(i=a[1]);else{var l=a[0];r=e.slice(l.length),s&&(i=a[1])}if(s){var c=e.indexOf(a[1]);e.slice(0,c)===t.numberingPlan.nationalPrefix()&&(o=t.numberingPlan.nationalPrefix())}else o=a[0];return{nationalNumber:r,nationalPrefix:o,carrierCode:i}}}return{nationalNumber:e}}(e,n),r=a.carrierCode,i=a.nationalNumber;if(i!==e){if(!function(e,t,n){if(jn(e,n.nationalNumberPattern())&&!jn(t,n.nationalNumberPattern()))return!1;return!0}(e,i,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=Qn(n.numberingPlan.callingCode(),{nationalNumber:i,metadata:n})),!function(e,t,n){switch(Fn(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(i,t,n)))return{nationalNumber:e}}return{nationalNumber:i,carrierCode:r}}function ta(e,t,n,a,r){if(!e)return{};var i;if("+"!==e[0]){var o=function(e,t,n,a){if(t){var r=new Nn(a);r.selectNumberingPlan(t,n);var i=new RegExp(r.IDDPrefix());if(0===e.search(i)){var o=(e=e.slice(e.match(i)[0].length)).match(zn);if(!(o&&null!=o[1]&&o[1].length>0&&"0"===o[1]))return e}}}(e,n,a,r);if(!o||o===e){if(n||a){var d=function(e,t,n,a,r){var i=n?Dn(n,r):a;if(0===e.indexOf(i)){(r=new Nn(r)).selectNumberingPlan(n,i);var o=e.slice(i.length),d=ea(o,t,r).nationalNumber,s=ea(e,t,r).nationalNumber;if(!jn(s,r.nationalNumberPattern())&&jn(d,r.nationalNumberPattern())||"TOO_LONG"===Fn(s,t,r))return{countryCallingCode:i,number:o}}return{number:e}}(e,t,n,a,r),s=d.countryCallingCode,l=d.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:l}}return{number:e}}i=!0,e="+"+o}if("0"===e[1])return{};r=new Nn(r);for(var c=2;c-1<=3&&c<=e.length;){var u=e.slice(1,c);if(r.hasCallingCode(u))return r.selectNumberingPlan(u),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(c)};c++}return{}}var na=/(\$\d)/;function aa(e,t,n){var a=n.useInternationalFormat,r=n.withNationalPrefix,i=e.replace(new RegExp(t.pattern()),a?t.internationalFormat():r&&t.nationalPrefixFormattingRule()?t.format().replace(na,t.nationalPrefixFormattingRule()):t.format());return a?function(e){return e.replace(new RegExp("[".concat(Yn,"]+"),"g")," ").trim()}(i):i}var ra=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var ia=function(e){return"([".concat(Xn,"]{1,").concat(e,"})")};function oa(e){var t="[  \\t,]*",n="[:\\..]?[  \\t,-]*",a="#?",r="[  \\t]*";return";ext="+ia("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+ia("20")+a)+"|"+(t+"(?:[xx##~~]|int|int)"+n+ia("9")+a)+"|"+("[- ]+"+ia("6")+"#")+"|"+(r+"(?:,{2}|;)"+n+ia("15")+a)+"|"+(r+"(?:,)+"+n+ia("9")+a)}var da="["+Xn+"]{2}",sa="[++]{0,1}(?:["+Yn+"]*["+Xn+"]){3,}["+Yn+Xn+"]*",la=new RegExp("^[++]{0,1}(?:["+Yn+"]*["+Xn+"]){1,2}$","i"),ca=sa+"(?:"+oa()+")?",ua=new RegExp("^"+da+"$|^"+ca+"$","i");var ha={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function pa(e,t,n,a){if(n=n?function(){for(var e=1,t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];for(;e<n.length;){if(n[e])for(var r in n[e])n[0][r]=n[e][r];e++}return n[0]}({},ha,n):ha,a=new Nn(a),e.country&&"001"!==e.country){if(!a.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));a.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";a.selectNumberingPlan(e.countryCallingCode)}var r,i=a.countryCallingCode(),o=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return o?ma(r=fa(o,e.carrierCode,"NATIONAL",a,n),e.ext,a,n.formatExtension):"";case"INTERNATIONAL":return o?(r=fa(o,null,"INTERNATIONAL",a,n),ma(r="+".concat(i," ").concat(r),e.ext,a,n.formatExtension)):"+".concat(i);case"E.164":return"+".concat(i).concat(o);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(i).concat(o),ext:e.ext});case"IDD":if(!n.fromCountry)return;var d=function(e,t,n,a,r){var i=Dn(a,r.metadata);if(i===n){var o=fa(e,t,"NATIONAL",r);return"1"===n?n+" "+o:o}var d=function(e,t,n){var a=new Nn(n);return a.selectNumberingPlan(e,t),a.defaultIDDPrefix()?a.defaultIDDPrefix():ra.test(a.IDDPrefix())?a.IDDPrefix():void 0}(a,void 0,r.metadata);if(d)return"".concat(d," ").concat(n," ").concat(fa(e,null,"INTERNATIONAL",r))}(o,e.carrierCode,i,n.fromCountry,a);return ma(d,e.ext,a,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function fa(e,t,n,a,r){var i,o,d=(i=a.formats(),o=e,function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(i,function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==o.search(t))return!1}return jn(o,e.pattern())}));return d?aa(e,d,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!d.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!r||!1!==r.nationalPrefix}):e}function ma(e,t,n,a){return t?a(e,t,n):e}function _a(e){return _a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_a(e)}function $a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function ga(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$a(Object(n),!0).forEach(function(t){ya(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ya(e,t,n){return(t=va(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ba(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,va(a.key),a)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function va(e){var t=function(e,t){if("object"!=_a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=_a(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==_a(t)?t:t+""}var xa=function(){return ba(function e(t,n,a){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("First argument is required");if("string"!=typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(xn(n)&&xn(n.countries)){a=n;var r=t;if(!ka.test(r))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var i=ta(r,void 0,void 0,void 0,a);if(t=i.countryCallingCode,!(n=i.number))throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw new TypeError("`nationalNumber` argument must be a string");Ln(a);var o=function(e,t){var n,a,r=new Nn(t);wa(e)?(n=e,r.selectNumberingPlan(n),a=r.countryCallingCode()):a=e;return{country:n,countryCallingCode:a}}(t,a),d=o.country,s=o.countryCallingCode;this.country=d,this.countryCallingCode=s,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return a}},[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Wn(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new Nn(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return Bn(e.phone||e.nationalNumber,e.country,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,t,n){return t=t||{},(n=new Nn(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==Gn(e,t,n.metadata):jn(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new Nn(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return Gn(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return pa(this,e,t?ga(ga({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])}(),wa=function(e){return/^[A-Z]{2}$/.test(e)};var ka=/^\+\d+$/;function Ca(e){return Ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ca(e)}function Ea(e,t,n){return t=Ta(t),function(e,t){if(t&&("object"==Ca(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pa()?Reflect.construct(t,n||[],Ta(e).constructor):t.apply(e,n))}function Sa(e){var t="function"==typeof Map?new Map:void 0;return Sa=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Pa())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,t);var r=new(e.bind.apply(e,a));return n&&Na(r,n.prototype),r}(e,arguments,Ta(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Na(n,e)},Sa(e)}function Pa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pa=function(){return!!e})()}function Na(e,t){return Na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Na(e,t)}function Ta(e){return Ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ta(e)}var Ra=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=Ea(this,t,[e]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Na(e,t)}(t,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(t)}(Sa(Error)),Aa=new RegExp("(?:"+oa()+")$","i");var Oa={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Ia(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return La(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?La(e,t):void 0}}(e))||t){n&&(e=n);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function La(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function Ma(e){for(var t,n="",a=Ia(e.split(""));!(t=a()).done;){n+=Da(t.value,n)||""}return n}function Da(e,t,n){if("+"===e){if(t)return;return"+"}return function(e){return Oa[e]}(e)}var Ua="(["+Xn+"]|[\\-\\.\\(\\)]?)",Fa=new RegExp("^\\+"+Ua+"*["+Xn+"]"+Ua+"*$","g"),Ba=new RegExp("^("+("["+Xn+"]+((\\-)*["+Xn+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+Xn+"])*")+"\\.?$","g"),ja="tel:",qa=";phone-context=";function Ka(e,t){var n,a=t.extractFormattedPhoneNumber,r=function(e){var t=e.indexOf(qa);if(t<0)return null;var n=t+15;if(n>=e.length)return"";var a=e.indexOf(";",n);return a>=0?e.substring(n,a):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(Fa.test(e)||Ba.test(e))}(r))throw new Ra("NOT_A_NUMBER");if(null===r)n=a(e)||"";else{n="","+"===r.charAt(0)&&(n+=r);var i,o=e.indexOf(ja);i=o>=0?o+4:0;var d=e.indexOf(qa);n+=e.substring(i,d)}var s=n.indexOf(";isub=");if(s>0&&(n=n.substring(0,s)),""!==n)return n}var Va=new RegExp("[++"+Xn+"]"),Ga=new RegExp("[^"+Xn+"#]+$");function Ha(e,t,n){if(t=t||{},n=new Nn(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new Ra("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var a=function(e,t,n){var a=Ka(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>250){if(n)throw new Ra("TOO_LONG");return}if(!1===t)return e;var a=e.search(Va);if(a<0)return;return e.slice(a).replace(Ga,"")}(e,n,t)}});if(!a)return{};if(!function(e){return e.length>=2&&ua.test(e)}(a))return function(e){return la.test(e)}(a)?{error:"TOO_SHORT"}:{};var r=function(e){var t=e.search(Aa);if(t<0)return{};for(var n=e.slice(0,t),a=e.match(Aa),r=1;r<a.length;){if(a[r])return{number:n,ext:a[r]};r++}}(a);if(r.ext)return r;return{number:a}}(e,t.v2,t.extract),r=a.number,i=a.ext,o=a.error;if(!r){if(t.v2){if("TOO_SHORT"===o)throw new Ra("TOO_SHORT");throw new Ra("NOT_A_NUMBER")}return{}}var d=function(e,t,n,a){var r,i=ta(Ma(e),void 0,t,n,a.metadata),o=i.countryCallingCodeSource,d=i.countryCallingCode,s=i.number;if(d)a.selectNumberingPlan(d);else{if(!s||!t&&!n)return{};a.selectNumberingPlan(t,n),t&&(r=t),d=n||Dn(t,a.metadata)}if(!s)return{countryCallingCodeSource:o,countryCallingCode:d};var l=ea(Ma(s),r,a),c=l.nationalNumber,u=l.carrierCode,h=Qn(d,{nationalNumber:c,metadata:a});h&&(r=h,"001"===h||a.selectNumberingPlan(r));return{country:r,countryCallingCode:d,countryCallingCodeSource:o,nationalNumber:c,carrierCode:u}}(r,t.defaultCountry,t.defaultCallingCode,n),s=d.country,l=d.nationalNumber,c=d.countryCallingCode,u=d.countryCallingCodeSource,h=d.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new Ra("INVALID_COUNTRY");return{}}if(!l||l.length<2){if(t.v2)throw new Ra("TOO_SHORT");return{}}if(l.length>17){if(t.v2)throw new Ra("TOO_LONG");return{}}if(t.v2){var p=new xa(c,l,n.metadata);return s&&(p.country=s),h&&(p.carrierCode=h),i&&(p.ext=i),p.__countryCallingCodeSource=u,p}var f=!!(t.extended?n.hasSelectedNumberingPlan():s)&&jn(l,n.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:c,carrierCode:h,valid:f,possible:!!f||!(!0!==t.extended||!n.possibleLengths()||!Bn(l,s,n)),phone:l,ext:i}:f?function(e,t,n){var a={country:e,phone:t};n&&(a.ext=n);return a}(s,l,i):{}}function Wa(e){return Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wa(e)}function Xa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function Ya(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xa(Object(n),!0).forEach(function(t){za(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function za(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Wa(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=Wa(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Wa(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Za(e){return Za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Za(e)}function Ja(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function Qa(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Za(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=Za(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Za(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function er(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,d=[],s=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(s=(a=i.call(n)).done)&&(d.push(a.value),d.length!==t);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw r}}return d}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function nr(e){var t,n,a,r=er(Array.prototype.slice.call(e),4),i=r[0],o=r[1],d=r[2],s=r[3];if("string"!=typeof i)throw new TypeError("A text for parsing must be a string.");if(t=i,o&&"string"!=typeof o){if(!xn(o))throw new Error("Invalid second argument: ".concat(o));d?(n=o,a=d):a=o}else s?(n=d,a=s):(n=void 0,a=d),o&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ja(Object(n),!0).forEach(function(t){Qa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ja(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({defaultCountry:o},n));return{text:t,options:n,metadata:a}}function ar(e){return ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ar(e)}function rr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function ir(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rr(Object(n),!0).forEach(function(t){or(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function or(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=ar(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=ar(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ar(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dr(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=ir(ir({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return Ha(e,Ya(Ya({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof Ra))throw e}}function sr(){var e=nr(arguments);return dr(e.text,e.options,e.metadata)}function lr(e){return new Nn(e).getCountries()}function cr(e,t,n){if(t[e])return new xa(e,t[e],n)}function ur(){return yn(sr,arguments)}function hr(){return yn(Dn,arguments)}const pr=({countryCode:e,size:t=16})=>lt("div",{style:{width:`${t}px`,height:`${t}px`,borderRadius:"50%",backgroundImage:`url(https://assets.xendit.co/payment-session/flags/circle/${e.toLowerCase()}.svg)`,backgroundSize:"cover",backgroundPosition:"center"}}),fr=e=>{const{field:t,onChange:n}=e,a=Wt(t),[r,i]=ve(void 0),o=mr.findIndex(e=>e.value===r),d=ke(null);_r(e=>{if(d.current){const t=mr.find(t=>t.value===e);t&&s(t)}});const s=Ee(e=>{i(e.value),d.current&&(d.current.value=e.value),n()},[n]);return lt("div",{children:[lt("input",{type:"hidden",name:a,defaultValue:"",ref:d}),lt(rn,{id:a,options:mr,onChange:s,placeholder:t.placeholder,selectedIndex:o})]})},mr=function(){return yn(lr,arguments)}().map(e=>({title:new Intl.DisplayNames(["en"],{type:"region"}).of(e),value:e,leadingAsset:lt(pr,{countryCode:e})})).sort((e,t)=>e.title.localeCompare(t.title));function _r(e){const t=At(),n=t.details?.country_codes[0],a=Ht(n);we(()=>{n&&n!==a&&e(n)})}const $r=e=>{const{field:t,onChange:n}=e,a=Wt(t);if(!function(e){return"dropdown"===e.type.name}(t))throw new Error("DropdownField expects field.type.name to be 'dropdown'");return lt(rn,{id:a,placeholder:t.placeholder,options:(r=t.type.options,r.map(e=>({title:e.label,description:e.subtitle,value:e.value}))),onChange:n});var r};const gr="undefined"!=typeof window&&window.HTMLElement?window.HTMLElement:EventTarget;class XenditFormAssociatedFocusTrap extends gr{static tag="xendit-form-associated-focus-trap";static formAssociated=!0;internals;constructor(){super(),this.internals=this.attachInternals()}}var yr;yr=XenditFormAssociatedFocusTrap,"undefined"!=typeof window&&window.customElements&&customElements.define(yr.tag,yr);class InternalUpdateWorldState extends Event{data;static type="xendit-update-world-state";constructor(e){super(InternalUpdateWorldState.type,{bubbles:!1}),this.data=e}}class InternalSetFieldTouchedEvent extends Event{static type="xendit-internal-set-field-touched";constructor(){super(InternalSetFieldTouchedEvent.type,{bubbles:!0})}}class InternalBehaviorTreeUpdateEvent extends Event{static type="xendit-internal-behavior-tree-update";constructor(){super(InternalBehaviorTreeUpdateEvent.type,{})}}class InternalNeedsRerenderEvent extends Event{static type="xendit-internal-needs-rerender";constructor(){super(InternalNeedsRerenderEvent.type,{})}}class InternalScheduleMockUpdateEvent extends Event{mockData;static type="xendit-internal-schedule-mock-update";constructor(e){super(InternalScheduleMockUpdateEvent.type,{}),this.mockData=e}}Dt("https://localhost:4444/secure-iframe.html");const br=new URL("https://localhost:4444/secure-iframe.html"),vr=br.toString(),xr=br.origin,wr=e=>{const{field:t,onChange:n}=e,a=Ot(),r=Wt(t),i=Tt(),o=ke(null),d=ke(null),[s,l]=ve(),[c,u]=ve(!1),[h,p]=ve(null),{card:f}=Xi()??{},m=Ee(e=>{if(!o.current)return;const a=o.current.contentWindow;if(e.source!==a)return;if(e.origin!==xr)return;const r=e.data;switch(r.type){case"xendit-iframe-ready":l(r.ecdhPublicKey);break;case"xendit-iframe-change":{if(!d.current)return;p(r.cardBrand);const e=r.encrypted,t=1,a=e.map(e=>{if(r.empty)return"";const n=["xendit-encrypted",t,s,e.iv,e.value];return!r.valid&&r.validationErrorCodes.length&&n.push("invalid",btoa(r.validationErrorCodes[0].localeKey)),n.join("-")});if(0===a.length)break;d.current.value=a.length>1?JSON.stringify(a):a[0],n?.();break}case"xendit-iframe-focus":u(!0);break;case"xendit-iframe-blur":u(!1),d.current?.dispatchEvent(new InternalSetFieldTouchedEvent);break;case"xendit-iframe-failed-init":console.error(`Iframe field for ${t.channel_property} failed to initialize securely`)}},[t.channel_property,s,n]),_=Ee(()=>{o.current?.contentWindow&&o.current.contentWindow.postMessage({type:"xendit-iframe-focus"},xr)},[]);xe(()=>(window.addEventListener("message",m),()=>{window.removeEventListener("message",m)}),[m]);const $=new URL(vr);$.searchParams.set("input_type",t.type.name),$.searchParams.set("embedder",window.location.origin),$.searchParams.set("session_id",i.payment_session_id),$.searchParams.set("pk",a[ft].sdkKey.publicKey),$.searchParams.set("sig",a[ft].sdkKey.signature),a[ft].options.iframeFieldAppearance&&$.searchParams.set("appearance",JSON.stringify(a[ft].options.iframeFieldAppearance));return lt("div",{className:`xendit-iframe-container ${c?"xendit-field-focus":""}`,children:[lt(XenditFormAssociatedFocusTrap.tag,{id:r,onFocus:_,tabIndex:-1}),lt("input",{type:"hidden",name:r,defaultValue:"",ref:d}),lt("iframe",{src:$.toString(),ref:o,sandbox:"allow-scripts allow-same-origin"}),"credit_card_number"===t.type.name&&f&&lt(kr,{cardsBrandList:f.brands,selectedCardBrand:h})]})},kr=({cardsBrandList:e,selectedCardBrand:t})=>{if(!e)return null;const n=e.find(e=>e.name===t)?.logo_url;return lt("div",{className:"xendit-card-brands-list",children:t?n&&lt("img",{className:"xendit-card-brand-logo",src:n,alt:t}):e.map(({name:e,logo_url:t})=>lt("img",{className:"xendit-card-brand-logo",src:t,alt:e},e))})};var Cr={AC:"40123",AD:"312345",AE:"501234567",AF:"701234567",AG:"2684641234",AI:"2642351234",AL:"672123456",AM:"77123456",AO:"923123456",AR:"91123456789",AS:"6847331234",AT:"664123456",AU:"412345678",AW:"5601234",AX:"412345678",AZ:"401234567",BA:"61123456",BB:"2462501234",BD:"1812345678",BE:"470123456",BF:"70123456",BG:"43012345",BH:"36001234",BI:"79561234",BJ:"0195123456",BL:"690001234",BM:"4413701234",BN:"7123456",BO:"71234567",BQ:"3181234",BR:"11961234567",BS:"2423591234",BT:"17123456",BW:"71123456",BY:"294911911",BZ:"6221234",CA:"5062345678",CC:"412345678",CD:"991234567",CF:"70012345",CG:"061234567",CH:"781234567",CI:"0123456789",CK:"71234",CL:"221234567",CM:"671234567",CN:"13123456789",CO:"3211234567",CR:"83123456",CU:"51234567",CV:"9911234",CW:"95181234",CX:"412345678",CY:"96123456",CZ:"601123456",DE:"15123456789",DJ:"77831001",DK:"34412345",DM:"7672251234",DO:"8092345678",DZ:"551234567",EC:"991234567",EE:"51234567",EG:"1001234567",EH:"650123456",ER:"7123456",ES:"612345678",ET:"911234567",FI:"412345678",FJ:"7012345",FK:"51234",FM:"3501234",FO:"211234",FR:"612345678",GA:"06031234",GB:"7400123456",GD:"4734031234",GE:"555123456",GF:"694201234",GG:"7781123456",GH:"231234567",GI:"57123456",GL:"221234",GM:"3012345",GN:"601123456",GP:"690001234",GQ:"222123456",GR:"6912345678",GT:"51234567",GU:"6713001234",GW:"955012345",GY:"6091234",HK:"51234567",HN:"91234567",HR:"921234567",HT:"34101234",HU:"201234567",ID:"812345678",IE:"850123456",IL:"502345678",IM:"7924123456",IN:"8123456789",IO:"3801234",IQ:"7912345678",IR:"9123456789",IS:"6111234",IT:"3123456789",JE:"7797712345",JM:"8762101234",JO:"790123456",JP:"9012345678",KE:"712123456",KG:"700123456",KH:"91234567",KI:"72001234",KM:"3212345",KN:"8697652917",KP:"1921234567",KR:"1020000000",KW:"50012345",KY:"3453231234",KZ:"7710009998",LA:"2023123456",LB:"71123456",LC:"7582845678",LI:"660234567",LK:"712345678",LR:"770123456",LS:"50123456",LT:"61234567",LU:"628123456",LV:"21234567",LY:"912345678",MA:"650123456",MC:"612345678",MD:"62112345",ME:"60123456",MF:"690001234",MG:"321234567",MH:"2351234",MK:"72345678",ML:"65012345",MM:"92123456",MN:"88123456",MO:"66123456",MP:"6702345678",MQ:"696201234",MR:"22123456",MS:"6644923456",MT:"96961234",MU:"52512345",MV:"7712345",MW:"991234567",MX:"2221234567",MY:"123456789",MZ:"821234567",NA:"811234567",NC:"751234",NE:"93123456",NF:"381234",NG:"8021234567",NI:"81234567",NL:"612345678",NO:"40612345",NP:"9841234567",NR:"5551234",NU:"8884012",NZ:"211234567",OM:"92123456",PA:"61234567",PE:"912345678",PF:"87123456",PG:"70123456",PH:"9051234567",PK:"3012345678",PL:"512345678",PM:"551234",PR:"7872345678",PS:"599123456",PT:"912345678",PW:"6201234",PY:"961456789",QA:"33123456",RE:"692123456",RO:"712034567",RS:"601234567",RU:"9123456789",RW:"720123456",SA:"512345678",SB:"7421234",SC:"2510123",SD:"911231234",SE:"701234567",SG:"81234567",SH:"51234",SI:"31234567",SJ:"41234567",SK:"912123456",SL:"25123456",SM:"66661212",SN:"701234567",SO:"71123456",SR:"7412345",SS:"977123456",ST:"9812345",SV:"70123456",SX:"7215205678",SY:"944567890",SZ:"76123456",TA:"8999",TC:"6492311234",TD:"63012345",TG:"90112345",TH:"812345678",TJ:"917123456",TK:"7290",TL:"77212345",TM:"66123456",TN:"20123456",TO:"7715123",TR:"5012345678",TT:"8682911234",TV:"901234",TW:"912345678",TZ:"621234567",UA:"501234567",UG:"712345678",US:"2015550123",UY:"94231234",UZ:"912345678",VA:"3123456789",VC:"7844301234",VE:"4121234567",VG:"2843001234",VI:"3406421234",VN:"912345678",VU:"5912345",WF:"821234",WS:"7212345",XK:"43201234",YE:"712345678",YT:"639012345",ZA:"711234567",ZM:"955123456",ZW:"712345678"};const Er=e=>{const{field:t,onChange:n}=e,a=Wt(t),r=Tt(),i=ke(null),[o,d]=ve(r.country),s=Ce(()=>{const e=Sr.findIndex(e=>e.value===o);return-1===e?0:e},[o]),l=Sr[s],[c,u]=ve(""),h=ke(null),p=Ee((e,t)=>{const n=Pr(e,t);return n?n.number:`+${e.dial}${t}`},[]),f=Ee((e,t)=>{i.current&&(i.current.value=p(e,t))},[p]);function m(e){const t=e;d(t.value),f(t,c),n()}return _r(e=>{const t=Sr.find(t=>t.value===e);t&&t.value!==o&&m(t)}),lt("div",{className:"xendit-input-phone",children:[lt("div",{className:"xendit-combobox",children:[lt(rn,{options:Sr,selectedIndex:s,onChange:m}),lt("input",{id:a,ref:h,type:"tel",inputMode:"tel",placeholder:function(){return yn(cr,arguments)}(l.value,Cr)?.formatInternational()?.replace(`+${hr(l.value)} `,"")||"",className:"xendit-text-14 xendit-phone-number-input",onBlur:function(e){!function(){const e=Pr(l,c);if(e){const t=e.formatInternational();u(t.replace(`+${hr(l.value)} `,""))}}(),e.currentTarget?.value&&h.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},onChange:function(e){const t=e.target.value;u(t),f(l,t),n()},value:c,autoComplete:"tel"})]}),lt("input",{type:"hidden",name:a,ref:i})]})},Sr=mr.map(e=>{const t=hr(e.value);return t?{...e,shortTitle:`+${t}`,title:`${e.title} (+${t})`,dial:t}:null}).filter(e=>Boolean(e)),Pr=(e,t)=>{const n=ur(t,e.value);return n&&n.isPossible()?n:null};function Nr(e){return{title:e.name,value:e.value}}const Tr=[{name:"Alabama",value:"AL"},{name:"Alaska",value:"AK"},{name:"American Samoa",value:"AS"},{name:"Arizona",value:"AZ"},{name:"Arkansas",value:"AR"},{name:"California",value:"CA"},{name:"Colorado",value:"CO"},{name:"Connecticut",value:"CT"},{name:"Delaware",value:"DE"},{name:"District Of Columbia",value:"DC"},{name:"Federated States Of Micronesia",value:"FM"},{name:"Florida",value:"FL"},{name:"Georgia",value:"GA"},{name:"Guam",value:"GU"},{name:"Hawaii",value:"HI"},{name:"Idaho",value:"ID"},{name:"Illinois",value:"IL"},{name:"Indiana",value:"IN"},{name:"Iowa",value:"IA"},{name:"Kansas",value:"KS"},{name:"Kentucky",value:"KY"},{name:"Louisiana",value:"LA"},{name:"Maine",value:"ME"},{name:"Marshall Islands",value:"MH"},{name:"Maryland",value:"MD"},{name:"Massachusetts",value:"MA"},{name:"Michigan",value:"MI"},{name:"Minnesota",value:"MN"},{name:"Mississippi",value:"MS"},{name:"Missouri",value:"MO"},{name:"Montana",value:"MT"},{name:"Nebraska",value:"NE"},{name:"Nevada",value:"NV"},{name:"New Hampshire",value:"NH"},{name:"New Jersey",value:"NJ"},{name:"New Mexico",value:"NM"},{name:"New York",value:"NY"},{name:"North Carolina",value:"NC"},{name:"North Dakota",value:"ND"},{name:"Northern Mariana Islands",value:"MP"},{name:"Ohio",value:"OH"},{name:"Oklahoma",value:"OK"},{name:"Oregon",value:"OR"},{name:"Palau",value:"PW"},{name:"Pennsylvania",value:"PA"},{name:"Puerto Rico",value:"PR"},{name:"Rhode Island",value:"RI"},{name:"South Carolina",value:"SC"},{name:"South Dakota",value:"SD"},{name:"Tennessee",value:"TN"},{name:"Texas",value:"TX"},{name:"Utah",value:"UT"},{name:"Vermont",value:"VT"},{name:"Virgin Islands",value:"VI"},{name:"Virginia",value:"VA"},{name:"Washington",value:"WA"},{name:"West Virginia",value:"WV"},{name:"Wisconsin",value:"WI"},{name:"Wyoming",value:"WY"}].map(Nr),Rr=[{name:"Alberta",value:"AB"},{name:"British Columbia",value:"BC"},{name:"Manitoba",value:"MB"},{name:"New Brunswick",value:"NB"},{name:"Newfoundland and Labrador",value:"NL"},{name:"Northwest Territories",value:"NT"},{name:"Nova Scotia",value:"NS"},{name:"Nunavut",value:"NU"},{name:"Ontario",value:"ON"},{name:"Prince Edward Island",value:"PE"},{name:"Quebec",value:"QC"},{name:"Saskatchewan",value:"SK"},{name:"Yukon Territory",value:"YT"}].map(Nr),Ar=[{name:"Avon"},{name:"Bedfordshire"},{name:"Berkshire"},{name:"Buckinghamshire"},{name:"Cambridgeshire"},{name:"Cheshire"},{name:"Cleveland"},{name:"Cornwall"},{name:"Cumbria"},{name:"Derbyshire"},{name:"Devon"},{name:"Dorset"},{name:"Durham"},{name:"East Sussex"},{name:"Essex"},{name:"Gloucestershire"},{name:"Hampshire"},{name:"Herefordshire"},{name:"Hertfordshire"},{name:"Isle of Wight"},{name:"Kent"},{name:"Lancashire"},{name:"Leicestershire"},{name:"Lincolnshire"},{name:"London"},{name:"Merseyside"},{name:"Norfolk"},{name:"Northamptonshire"},{name:"Northumberland"},{name:"North Yorkshire"},{name:"Nottinghamshire"},{name:"Oxfordshire"},{name:"Rutland"},{name:"Shropshire"},{name:"Somerset"},{name:"South Yorkshire"},{name:"Staffordshire"},{name:"Suffolk"},{name:"Surrey"},{name:"Tyne and Wear"},{name:"Warwickshire"},{name:"West Midlands"},{name:"West Sussex"},{name:"West Yorkshire"},{name:"Wiltshire"},{name:"Worcestershire"},{name:"Clwyd"},{name:"Dyfed"},{name:"Gwent"},{name:"Gwynedd"},{name:"Mid Glamorgan"},{name:"Powys"},{name:"South Glamorgan"},{name:"West Glamorgan"},{name:"Aberdeenshire"},{name:"Angus"},{name:"Argyll"},{name:"Ayrshire"},{name:"Banffshire"},{name:"Berwickshire"},{name:"Bute"},{name:"Caithness"},{name:"Clackmannanshire"},{name:"Dumfriesshire"},{name:"Dunbartonshire"},{name:"East Lothian"},{name:"Fife"},{name:"Inverness-shire"},{name:"Kincardineshire"},{name:"Kinross-shire"},{name:"Kirkcudbrightshire"},{name:"Lanarkshire"},{name:"Midlothian"},{name:"Moray"},{name:"Nairnshire"},{name:"Orkney"},{name:"Peeblesshire"},{name:"Perthshire"},{name:"Renfrewshire"},{name:"Ross-shire"},{name:"Roxburghshire"},{name:"Selkirkshire"},{name:"Shetland"},{name:"Stirlingshire"},{name:"Sutherland"},{name:"West Lothian"},{name:"Wigtownshire"},{name:"Antrim"},{name:"Armagh"},{name:"Down"},{name:"Fermanagh"},{name:"Londonderry"},{name:"Tyrone"}].map(e=>({title:e.name,value:e.name})),Or=e=>{const{field:t,onChange:n}=e,a=Wt(t),r=Tt(),i=Xi()?.form,o=Ui(),d=ke(null),s=Ee(()=>{d.current&&(d.current.value=""),n()},[n]),l=Ee(e=>{d.current&&(d.current.value=e.value),n(),d.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},[n]),c=Ee(e=>{d.current&&(d.current.value=e.target.value),n(),d.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},[n]),u=function(e){switch(e){case"US":return Tr;case"CA":return Rr;case"GB":return Ar;default:return null}}(function(e,t,n,a){if(t)for(let a=0;a<t.length;a++){const r=t[a];if(a>0&&r===e){const e=t[a-1];if("country"===e.type.name){const t=zt(e.channel_property,n);if(t&&"string"==typeof t)return t}}}return a.country}(t,i??[],o??{},r)),h=Ht(u);return we(()=>{h!==u&&s()},[s,u,h]),lt(x,{children:[lt("input",{type:"hidden",name:a,defaultValue:"",ref:d}),u?lt(rn,{id:a,options:u,onChange:l,placeholder:t.placeholder},(p=u,Zt.has(p)||Zt.set(p,Jt++),Zt.get(p).toString())):lt("input",{type:"text",id:a,onChange:c,placeholder:t.placeholder,className:"xendit-input xendit-text-14"})]});var p};const Ir=e=>{const{field:t,onChange:n}=e,a=Wt(t),r=ke(null);return lt("input",{id:a,name:a,ref:r,type:"text",placeholder:t.placeholder,className:"xendit-text-14",onBlur:function(e){e.currentTarget?.value&&r.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},onChange:function(e){n()},minLength:Lr(t)?t.type.min_length:void 0,maxLength:Lr(t)?t.type.max_length:void 0})};function Lr(e){return"text"===e.type.name}const Mr=e=>{const{field:t,className:n}=e;return lt("div",{className:`${n} xendit-channel-form-field xendit-form-field-span-${t.span}`,children:function(){switch(t.type.name){case"credit_card_number":case"credit_card_expiry":case"credit_card_cvn":return lt(wr,{...e});case"phone_number":return lt(Er,{...e});case"text":case"email":case"postal_code":return lt(Ir,{...e});case"dropdown":return lt($r,{...e});case"country":return lt(fr,{...e});case"province":return lt(Or,{...e})}}()})},Dr=e=>"string"==typeof e,Ur=()=>{let e,t;const n=new Promise((n,a)=>{e=n,t=a});return n.resolve=e,n.reject=t,n},Fr=e=>null==e?"":""+e,Br=/###/g,jr=e=>e&&e.indexOf("###")>-1?e.replace(Br,"."):e,qr=e=>!e||Dr(e),Kr=(e,t,n)=>{const a=Dr(t)?t.split("."):t;let r=0;for(;r<a.length-1;){if(qr(e))return{};const t=jr(a[r]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++r}return qr(e)?{}:{obj:e,k:jr(a[r])}},Vr=(e,t,n)=>{const{obj:a,k:r}=Kr(e,t,Object);if(void 0!==a||1===t.length)return void(a[r]=n);let i=t[t.length-1],o=t.slice(0,t.length-1),d=Kr(e,o,Object);for(;void 0===d.obj&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),d=Kr(e,o,Object),d?.obj&&void 0!==d.obj[`${d.k}.${i}`]&&(d.obj=void 0);d.obj[`${d.k}.${i}`]=n},Gr=(e,t)=>{const{obj:n,k:a}=Kr(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,a))return n[a]},Hr=(e,t,n)=>{for(const a in t)"__proto__"!==a&&"constructor"!==a&&(a in e?Dr(e[a])||e[a]instanceof String||Dr(t[a])||t[a]instanceof String?n&&(e[a]=t[a]):Hr(e[a],t[a],n):e[a]=t[a]);return e},Wr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Xr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Yr=e=>Dr(e)?e.replace(/[&<>"'\/]/g,e=>Xr[e]):e;const zr=[" ",",","?","!",";"],Zr=new class RegExpCache{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Jr=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const a=t.split(n);let r=e;for(let e=0;e<a.length;){if(!r||"object"!=typeof r)return;let t,i="";for(let o=e;o<a.length;++o)if(o!==e&&(i+=n),i+=a[o],t=r[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&o<a.length-1)continue;e+=o-e+1;break}r=t}return r},Qr=e=>e?.replace("_","-"),ei={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Logger{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||ei,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,a){return a&&!this.debug?null:(Dr(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Logger(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Logger(this.logger,e)}}var ti=new Logger;class EventEmitter{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let a=0;a<n;a++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,a])=>{for(let r=0;r<a;r++)n.apply(n,[e,...t])})}}}class ResourceStore extends EventEmitter{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,a={}){const r=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,i=void 0!==a.ignoreJSONStructure?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):Dr(n)&&r?o.push(...n.split(r)):o.push(n)));const d=Gr(this.data,o);return!d&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),!d&&i&&Dr(n)?Jr(this.data?.[e]?.[t],n,r):d}addResource(e,t,n,a,r={silent:!1}){const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator;let o=[e,t];n&&(o=o.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(o=e.split("."),a=t,t=o[1]),this.addNamespaces(t),Vr(this.data,o,a),r.silent||this.emit("added",e,t,n,a)}addResources(e,t,n,a={silent:!1}){for(const a in n)(Dr(n[a])||Array.isArray(n[a]))&&this.addResource(e,t,a,n[a],{silent:!0});a.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,a,r,i={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),a=n,n=t,t=o[1]),this.addNamespaces(t);let d=Gr(this.data,o)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),a?Hr(d,n,r):d={...d,...n},Vr(this.data,o,d),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var ni={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,a,r){return e.forEach(e=>{t=this.processors[e]?.process(t,n,a,r)??t}),t}};const ai=Symbol("i18next/PATH_KEY");function ri(e,t){const{[ai]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(a,r)=>(n?.revoke?.(),r===ai?e:(e.push(r),n=Proxy.revocable(a,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const ii={},oi=e=>!Dr(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Translator extends EventEmitter{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=ti.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const a=this.resolve(e,n);if(void 0===a?.res)return!1;const r=oi(a.res);return!1!==n.returnObjects||!r}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,o=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const a=zr.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===a.length)return!0;const r=Zr.getRegExp(`(${a.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!r.test(e);if(!i){const t=e.indexOf(n);t>0&&!r.test(e.substring(0,t))&&(i=!0)}return i})(e,n,a));if(i&&!o){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Dr(r)?[r]:r};const i=e.split(n);(n!==a||n===a&&this.options.ns.indexOf(i[0])>-1)&&(r=i.shift()),e=i.join(a)}return{key:e,namespaces:Dr(r)?[r]:r}}translate(e,t,n){let a="object"==typeof t?{...t}:t;if("object"!=typeof a&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof a&&(a={...a}),a||(a={}),null==e)return"";"function"==typeof e&&(e=ri(e,{...this.options,...a})),Array.isArray(e)||(e=[String(e)]);const r=void 0!==a.returnDetails?a.returnDetails:this.options.returnDetails,i=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,{key:o,namespaces:d}=this.extractFromKey(e[e.length-1],a),s=d[d.length-1];let l=void 0!==a.nsSeparator?a.nsSeparator:this.options.nsSeparator;void 0===l&&(l=":");const c=a.lng||this.language,u=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===c?.toLowerCase())return u?r?{res:`${s}${l}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(a)}:`${s}${l}${o}`:r?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(a)}:o;const h=this.resolve(e,a);let p=h?.res;const f=h?.usedKey||o,m=h?.exactUsedKey||o,_=void 0!==a.joinArrays?a.joinArrays:this.options.joinArrays,$=!this.i18nFormat||this.i18nFormat.handleAsObject,g=void 0!==a.count&&!Dr(a.count),y=Translator.hasDefaultValue(a),b=g?this.pluralResolver.getSuffix(c,a.count,a):"",v=a.ordinal&&g?this.pluralResolver.getSuffix(c,a.count,{ordinal:!1}):"",x=g&&!a.ordinal&&0===a.count,w=x&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${b}`]||a[`defaultValue${v}`]||a.defaultValue;let k=p;$&&!p&&y&&(k=w);const C=oi(k),E=Object.prototype.toString.apply(k);if(!($&&k&&C&&["[object Number]","[object Function]","[object RegExp]"].indexOf(E)<0)||Dr(_)&&Array.isArray(k))if($&&Dr(_)&&Array.isArray(p))p=p.join(_),p&&(p=this.extendTranslation(p,e,a,n));else{let t=!1,r=!1;!this.isValidLookup(p)&&y&&(t=!0,p=w),this.isValidLookup(p)||(r=!0,p=o);const d=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:p,u=y&&w!==p&&this.options.updateMissing;if(r||t||u){if(this.logger.log(u?"updateKey":"missingKey",c,s,o,u?w:p),i){const e=this.resolve(o,{...a,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(a.lng||this.language):e.push(a.lng||this.language);const n=(e,t,n)=>{const r=y&&n!==p?n:d;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,t,r,u,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,s,t,r,u,a),this.emit("missingKey",e,s,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&g?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,a);x&&a[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],o+t,a[`defaultValue${t}`]||w)})}):n(e,o,w))}p=this.extendTranslation(p,e,a,h,n),r&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${s}${l}${o}`),(r||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}${l}${o}`:o,t?p:void 0,a))}else{if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,k,{...a,ns:d}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(h.res=e,h.usedParams=this.getUsedParamsDetails(a),h):e}if(i){const e=Array.isArray(k),t=e?[]:{},n=e?m:f;for(const e in k)if(Object.prototype.hasOwnProperty.call(k,e)){const r=`${n}${i}${e}`;t[e]=y&&!p?this.translate(r,{...a,defaultValue:oi(w)?w[e]:void 0,joinArrays:!1,ns:d}):this.translate(r,{...a,joinArrays:!1,ns:d}),t[e]===r&&(t[e]=k[e])}p=t}}return r?(h.res=p,h.usedParams=this.getUsedParamsDetails(a),h):p}extendTranslation(e,t,n,a,r){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const i=Dr(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let o;if(i){const t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let d=n.replace&&!Dr(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language||a.usedLng,n),i){const t=e.match(this.interpolator.nestingRegexp);o<(t&&t.length)&&(n.nest=!1)}!n.lng&&a&&a.res&&(n.lng=this.language||a.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>r?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,o=Dr(i)?[i]:i;return null!=e&&o?.length&&!1!==n.applyPostProcessor&&(e=ni.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,a,r,i,o;return Dr(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const d=this.extractFromKey(e,t),s=d.key;a=s;let l=d.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==t.count&&!Dr(t.count),u=c&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(Dr(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,ii[`${p[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(o)||(ii[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${a}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(a=>{if(this.isValidLookup(n))return;i=a;const o=[s];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,s,a,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(a,t.count,t));const n=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(r)&&o.push(s+e.replace(r,this.options.pluralSeparator)),o.push(s+e),u&&o.push(s+n)),h){const a=`${s}${this.options.contextSeparator||"_"}${t.context}`;o.push(a),c&&(t.ordinal&&0===e.indexOf(r)&&o.push(a+e.replace(r,this.options.pluralSeparator)),o.push(a+e),u&&o.push(a+n))}}let d;for(;d=o.pop();)this.isValidLookup(n)||(r=d,n=this.getResource(a,e,d,t))}))})}),{res:n,usedKey:a,exactUsedKey:r,usedLng:i,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,a={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,a):this.resourceStore.getResource(e,t,n,a)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Dr(e.replace);let a=n?e.replace:e;if(n&&void 0!==e.count&&(a.count=e.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!n){a={...a};for(const e of t)delete a[e]}return a}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class LanguageUtil{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ti.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Qr(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Qr(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Dr(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const a=this.getLanguagePartFromCode(e);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(e=>e===a?e:e.indexOf("-")<0&&a.indexOf("-")<0?void 0:e.indexOf("-")>0&&a.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===a||0===e.indexOf(a)&&a.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Dr(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),a=[],r=e=>{e&&(this.isSupportedCode(e)?a.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Dr(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):Dr(e)&&r(this.formatLanguageCode(e)),n.forEach(e=>{a.indexOf(e)<0&&r(this.formatLanguageCode(e))}),a}}const di={zero:0,one:1,two:2,few:3,many:4,other:5},si={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ti.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Qr("dev"===e?"en":e),a=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:a});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let i;try{i=new Intl.PluralRules(n,{type:a})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),si;if(!e.match(/-|_/))return si;const a=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(a,t)}return this.pluralRulesCache[r]=i,i}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>di[e]-di[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const a=this.getRule(e,n);return a?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const li=(e,t,n,a=".",r=!0)=>{let i=((e,t,n)=>{const a=Gr(e,n);return void 0!==a?a:Gr(t,n)})(e,t,n);return!i&&r&&Dr(n)&&(i=Jr(e,n,a),void 0===i&&(i=Jr(t,n,a))),i},ci=e=>e.replace(/\$/g,"$$$$");class Interpolator{constructor(e={}){this.logger=ti.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:a,prefix:r,prefixEscaped:i,suffix:o,suffixEscaped:d,formatSeparator:s,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:u,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:m,maxReplaces:_,alwaysFormat:$}=e.interpolation;this.escape=void 0!==t?t:Yr,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==a&&a,this.prefix=r?Wr(r):i||"{{",this.suffix=o?Wr(o):d||"}}",this.formatSeparator=s||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=u?Wr(u):h||Wr("$t("),this.nestingSuffix=p?Wr(p):f||Wr(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=_||1e3,this.alwaysFormat=void 0!==$&&$,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,a){let r,i,o;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},s=e=>{if(e.indexOf(this.formatSeparator)<0){const r=li(t,d,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,n,{...a,...t,interpolationkey:e}):r}const r=e.split(this.formatSeparator),i=r.shift().trim(),o=r.join(this.formatSeparator).trim();return this.format(li(t,d,i,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...a,...t,interpolationkey:i})};this.resetRegExp();const l=a?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=void 0!==a?.interpolation?.skipOnVariables?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>ci(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?ci(this.escape(e)):ci(e)}].forEach(t=>{for(o=0;r=t.regex.exec(e);){const n=r[1].trim();if(i=s(n),void 0===i)if("function"==typeof l){const t=l(e,r,a);i=Dr(t)?t:""}else if(a&&Object.prototype.hasOwnProperty.call(a,n))i="";else{if(c){i=r[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else Dr(i)||this.useRawValueToEscape||(i=Fr(i));const d=t.safeValue(i);if(e=e.replace(r[0],d),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let a,r,i;const o=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const a=e.split(new RegExp(`${n}[ ]*{`));let r=`{${a[1]}`;e=a[0],r=this.interpolate(r,i);const o=r.match(/'/g),d=r.match(/"/g);((o?.length??0)%2==0&&!d||d.length%2!=0)&&(r=r.replace(/'/g,'"'));try{i=JSON.parse(r),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${r}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;a=this.nestingRegexp.exec(e);){let d=[];i={...n},i=i.replace&&!Dr(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const s=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(-1!==s&&(d=a[1].slice(s).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),a[1]=a[1].slice(0,s)),r=t(o.call(this,a[1].trim(),i),i),r&&a[0]===e&&!Dr(r))return r;Dr(r)||(r=Fr(r)),r||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),r=""),d.length&&(r=d.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:a[1].trim()}),r.trim())),e=e.replace(a[0],r),this.regexp.lastIndex=0}return e}}const ui=e=>{const t={};return(n,a,r)=>{let i=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(i={...i,[r.interpolationkey]:void 0});const o=a+JSON.stringify(i);let d=t[o];return d||(d=e(Qr(a),r),t[o]=d),d(n)}},hi=e=>(t,n,a)=>e(Qr(n),a)(t);class Formatter{constructor(e={}){this.logger=ti.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?ui:hi;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ui(t)}format(e,t,n,a={}){const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(e=>e.indexOf(")")>-1)){const e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}const i=r.reduce((e,t)=>{const{formatName:r,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const a=e.split("(");t=a[0].toLowerCase().trim();const r=a[1].substring(0,a[1].length-1);"currency"===t&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):"relativetime"===t&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(e=>{if(e){const[t,...a]=e.split(":"),r=a.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=r),"false"===r&&(n[i]=!1),"true"===r&&(n[i]=!0),isNaN(r)||(n[i]=parseInt(r,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[r]){let t=e;try{const o=a?.formatParams?.[a.interpolationkey]||{},d=o.locale||o.lng||a.locale||a.lng||n;t=this.formats[r](e,d,{...i,...a,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e);return i}}class Connector extends EventEmitter{constructor(e,t,n,a={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=a,this.logger=ti.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,a.backend,a)}queueLoad(e,t,n,a){const r={},i={},o={},d={};return e.forEach(e=>{let a=!0;t.forEach(t=>{const o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===i[o]&&(i[o]=!0):(this.state[o]=1,a=!1,void 0===i[o]&&(i[o]=!0),void 0===r[o]&&(r[o]=!0),void 0===d[t]&&(d[t]=!0)))}),a||(o[e]=!0)}),(Object.keys(r).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(r),pending:Object.keys(i),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(d)}}loaded(e,t,n){const a=e.split("|"),r=a[0],i=a[1];t&&this.emit("failedLoading",r,i,t),!t&&n&&this.store.addResourceBundle(r,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const o={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:a,k:r}=Kr(e,t,Object);a[r]=a[r]||[],a[r].push(n)})(n.loaded,[r],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===o[e][t]&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,a=0,r=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:a,wait:r,callback:i});this.readingCalls++;const o=(o,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&d&&a<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,a+1,2*r,i)},r):i(o,d)},d=this.backend[n].bind(this.backend);if(2!==d.length)return d(e,t,o);try{const n=d(e,t);n&&"function"==typeof n.then?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}}prepareLoading(e,t,n={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();Dr(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Dr(t)&&(t=[t]);const r=this.queueLoad(e,t,n,a);if(!r.toLoad.length)return r.pending.length||a(),null;r.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),a=n[0],r=n[1];this.read(a,r,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${r} for language ${a} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${r} for language ${a}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,a,r,i={},o=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const d={...i,isUpdate:r},s=this.backend.create.bind(this.backend);if(s.length<6)try{let r;r=5===s.length?s(e,t,n,a,d):s(e,t,n,a),r&&"function"==typeof r.then?r.then(e=>o(null,e)).catch(o):o(null,r)}catch(e){o(e)}else s(e,t,n,a,o,d)}e&&e[0]&&this.store.addResource(e[0],t,n,a)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const pi=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Dr(e[1])&&(t.defaultValue=e[1]),Dr(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),fi=e=>(Dr(e.ns)&&(e.ns=[e.ns]),Dr(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Dr(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),mi=()=>{};class I18n extends EventEmitter{constructor(e={},t){var n;if(super(),this.options=fi(e),this.services={},this.logger=ti,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(Dr(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=pi();this.options={...n,...this.options,...fi(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const a=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?ti.init(a(this.modules.logger),this.options):ti.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Formatter;const t=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const r=this.services;r.logger=ti,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new PluralResolver(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(r.formatter=a(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new Interpolator(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new Connector(a(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=a(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=a(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=mi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const r=Ur(),i=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),r.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?i():setTimeout(i,0),r}loadResources(e,t=mi){let n=t;const a=Dr(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===a?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(a)t(a);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const a=Ur();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=mi),this.services.backendConnector.reload(e,t,e=>{a.resolve(),n(e)}),a}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&ni.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Ur();this.emit("languageChanging",e);const a=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},r=(r,i)=>{i?this.isLanguageChangingTo===e&&(a(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(r,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Dr(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Dr(t)?[t]:t);i&&(this.language||a(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{r(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const a=(e,t,...r)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t},i.lng=i.lng||a.lng,i.lngs=i.lngs||a.lngs,i.ns=i.ns||a.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||a.keyPrefix);const o=this.options.keySeparator||".";let d;return i.keyPrefix&&Array.isArray(e)?d=e.map(e=>("function"==typeof e&&(e=ri(e,{...this.options,...t})),`${i.keyPrefix}${o}${e}`)):("function"==typeof e&&(e=ri(e,{...this.options,...t})),d=i.keyPrefix?`${i.keyPrefix}${o}${e}`:e),this.t(d,i)};return Dr(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],a=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||a&&!i(r,e)))}loadNamespaces(e,t){const n=Ur();return this.options.ns?(Dr(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Ur();Dr(e)&&(e=[e]);const a=this.options.preload||[],r=e.filter(e=>a.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return r.length?(this.options.preload=a.concat(r),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new LanguageUtil(pi());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new I18n(e,t);return n.createInstance=I18n.createInstance,n}cloneInstance(e={},t=mi){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},r=new I18n(a);void 0===e.debug&&void 0===e.prefix||(r.logger=r.logger.clone(e));if(["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,a)=>(n[a]={...e[t][a]},n),e[t]),e),{});r.store=new ResourceStore(e,a),r.services.resourceStore=r.store}return r.translator=new Translator(r.services,a),r.translator.on("*",(e,...t)=>{r.emit(e,...t)}),r.init(a,t),r.translator.options=a,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const _i=I18n.createInstance(),$i=_i.createInstance;_i.dir,_i.init,_i.loadResources,_i.reloadResources,_i.use,_i.changeLanguage,_i.getFixedT,_i.t,_i.exists,_i.setDefaultNamespace,_i.hasLoadedNamespace,_i.loadNamespaces,_i.loadLanguages;var gi={session:{"validation.card_cvn_invalid":"CVN is not valid","validation.card_expiry_invalid":"Card expiry is not valid","validation.card_number_incomplete":"Card number is incomplete","validation.card_number_invalid":"Card number is not valid","validation.generic_invalid":"{{field}} is not valid","validation.required":"{{field}} is required","validation.text_too_long":"{{field}} is too long","validation.text_too_short":"{{field}} is too short","payment.save_checkbox_label":"Save for faster payment next time","payment_methods.add_payment_method":"Add payment method","payment_methods.channel_disabled_amount_too_large":"Not available for this payment","payment_methods.channel_disabled_amount_too_small":"Not available for this payment","payment_methods.pay_with":"Pay with","payment_methods.select_channel_placeholder":"Select {{groupName}}","default_error.message_1":"There was a problem with the request.","default_error.message_2":"Please try again later.","default_error.title":"Error","failure_code.account_access_blocked":"Your payment was declined. Please try again or use a different payment method.","failure_code.account_already_linked":"Your account has already been linked. Please use a different payment method.","failure_code.account_not_activated":"Your payment couldn’t be processed because your account hasn’t been activated. Please activate your account and try again.","failure_code.authentication_failed":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.capture_amount_exceeded":"Your payment couldn't be processed. Please make sure your payment details are correct and try again, or use a different payment method.","failure_code.card_declined":"Your card was declined. Please try again with another card or payment method.","failure_code.channel_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.declined_by_issuer":"Your payment was declined. Please try again or use a different payment method.","failure_code.declined_by_processor":"Your payment was declined. Please try again or use a different payment method.","failure_code.expired_card":"Your card was declined because it is expired. Please try again or use a different payment method.","failure_code.expired_otp":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.failure_details_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.inactive_or_unauthorized_card":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.insufficient_balance":"Your payment couldn’t be processed because your account balance is insufficient. Please make sure you have enough funds and try again.","failure_code.invalid_account_details":"Your payment information is incorrect. Please double-check your card details or try a different payment method.","failure_code.invalid_cvv":"The CVN entered was incorrect. Please try again.","failure_code.invalid_merchant_settings":"Your payment couldn’t be processed. Please contact the seller or try a different payment method.","failure_code.invalid_otp":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.invalid_token":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.issuer_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.otp_attempt_counts_exceeded":"Your payment couldn’t be processed because there were too many failed OTP attempts. Please make the payment again or use a different payment method.","failure_code.partner_timeout_error":"Your payment couldn't be processed. Please try again or use a different payment method.","failure_code.payment_amount_limits_exceeded":"Your payment couldn’t be processed because you’ve exceeded your transaction limit. Please use a different payment method.","failure_code.payment_attempt_counts_exceeded":"Your payment couldn’t be processed due to too many failed attempts.","failure_code.payment_request_expired":"Your payment couldn’t be processed because the link has expired. Please try again or use a different payment method.","failure_code.processor_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.server_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.stolen_card":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.suspected_fraudulent":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.timeout_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.user_declined_payment":"Your payment was declined. Please try again or use a different payment method.","failure_code.user_device_unreachable":"Your payment couldn’t be processed due to a network issue. Please try again or use a different payment method.","failure_code.user_did_not_authorize":"Your payment couldn’t be processed because it wasn’t authorized in time. Please try again.",failure_code_unknown:"A failure occurred with code {{failureCode}}","payment_request_status.canceled.subtext":"Please try to check out again or contact the seller if the problem persists.","payment_request_status.canceled.title":"This page is no longer available","payment_request_status.expired.subtext":"Your payment couldn’t be processed. Please try again or use a different payment method.","payment_request_status.expired.title":"Payment unsuccessful","payment_request_status.failed.subtext":"Your payment couldn't be processed. Please try a different payment method or submit an inquiry to the seller by sharing your Unique Identifiers.","payment_request_status.failed.title":"Payment failed","payment_token_status.canceled.subtext":"Please try again or use a different payment method.","payment_token_status.canceled.title":"Payment method couldn't be added","payment_token_status.expired.subtext":"Please try again or use a different payment method.","payment_token_status.expired.title":"Payment method couldn't be added","payment_token_status.failed.subtext":"Your payment couldn't be processed. Please try a different payment method or submit an inquiry to the seller by sharing your Unique Identifiers.","payment_token_status.failed.title":"Payment method couldn't be added"}},yi={session:{"validation.card_cvn_invalid":"CVN tidak valid","validation.card_expiry_invalid":"Tanggal kedaluwarsa kartu tidak valid","validation.card_number_incomplete":"Nomor kartu tidak lengkap","validation.card_number_invalid":"Nomor kartu tidak valid","validation.generic_invalid":"{{field}} tidak valid","validation.required":"{{field}} wajib diisi","validation.text_too_long":"{{field}} terlalu panjang","validation.text_too_short":"{{field}} terlalu pendek","payment.save_checkbox_label":"Simpan untuk pembayaran lebih cepat lain kali","payment_methods.add_payment_method":"Tambah metode pembayaran","payment_methods.channel_disabled_amount_too_large":"Tidak tersedia untuk pembayaran ini","payment_methods.channel_disabled_amount_too_small":"Tidak tersedia untuk pembayaran ini","payment_methods.pay_with":"Bayar dengan","payment_methods.select_channel_placeholder":"Pilih {{groupName}}","default_error.message_1":"Ada masalah dengan permintaan ini.","default_error.message_2":"Silakan coba lagi nanti.","default_error.title":"Error","failure_code.account_access_blocked":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.account_already_linked":"Akun Anda sudah di-link. Silakan gunakan metode pembayaran lain.","failure_code.account_not_activated":"Pembayaran Anda tidak dapat diproses karena akun Anda belum diaktifkan. Harap aktifkan akun Anda dan coba lagi.","failure_code.authentication_failed":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.capture_amount_exceeded":"Pembayaran Anda tidak dapat diproses. Pastikan detail pembayaran Anda benar dan coba lagi, atau gunakan metode pembayaran lain.","failure_code.card_declined":"Kartu Anda ditolak. Silakan coba lagi dengan kartu atau metode pembayaran lain.","failure_code.channel_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.declined_by_issuer":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.declined_by_processor":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.expired_card":"Kartu Anda ditolak karena sudah kedaluwarsa. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.expired_otp":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.failure_details_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.inactive_or_unauthorized_card":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.insufficient_balance":"Pembayaran Anda tidak dapat diproses karena saldo akun Anda tidak mencukupi. Pastikan Anda memiliki dana yang cukup dan coba lagi.","failure_code.invalid_account_details":"Informasi pembayaran Anda salah. Harap periksa kembali detail kartu Anda atau coba gunakan metode pembayaran lain.","failure_code.invalid_cvv":"CVN yang dimasukkan salah. Silakan coba lagi.","failure_code.invalid_merchant_settings":"Pembayaran Anda tidak dapat diproses. Silakan hubungi penjual atau coba metode pembayaran lain.","failure_code.invalid_otp":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.invalid_token":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.issuer_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.otp_attempt_counts_exceeded":"Pembayaran Anda tidak dapat diproses karena terlalu banyak percobaan OTP yang gagal. Harap lakukan pembayaran lagi atau gunakan metode pembayaran lain.","failure_code.partner_timeout_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.payment_amount_limits_exceeded":"Pembayaran Anda tidak dapat diproses karena Anda telah melampaui batas transaksi. Silakan gunakan metode pembayaran lain.","failure_code.payment_attempt_counts_exceeded":"Pembayaran Anda tidak dapat diproses karena terlalu banyak percobaan yang gagal.","failure_code.payment_request_expired":"Pembayaran Anda tidak dapat diproses karena link telah kedaluwarsa. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.processor_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.server_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.stolen_card":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.suspected_fraudulent":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.timeout_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_declined_payment":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_device_unreachable":"Pembayaran Anda tidak dapat diproses karena masalah jaringan. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_did_not_authorize":"Pembayaran Anda tidak dapat diproses karena waktu pembayaran telah habis. Silakan coba lagi.",failure_code_unknown:"Terjadi kegagalan dengan kode {{failureCode}}","payment_request_status.canceled.subtext":"Silakan coba check out lagi atau hubungi penjual jika masalah terus berlanjut.","payment_request_status.canceled.title":"Halaman ini tidak tersedia lagi","payment_request_status.expired.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","payment_request_status.expired.title":"Pembayaran tidak berhasil","payment_request_status.failed.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba metode pembayaran lain atau ajukan pertanyaan kepada penjual dengan membagikan ID Unik Anda.","payment_request_status.failed.title":"Pembayaran gagal","payment_token_status.canceled.subtext":"Silakan coba lagi atau gunakan metode pembayaran lain.","payment_token_status.canceled.title":"Metode pembayaran tidak dapat ditambahkan","payment_token_status.expired.subtext":"Silakan coba lagi atau gunakan metode pembayaran lain.","payment_token_status.expired.title":"Metode pembayaran tidak dapat ditambahkan","payment_token_status.failed.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba metode pembayaran lain atau ajukan pertanyaan kepada penjual dengan membagikan ID Unik Anda.","payment_token_status.failed.title":"Metode pembayaran tidak dapat ditambahkan"}},bi={session:{"validation.card_cvn_invalid":"CVN ไม่ถูกต้อง","validation.card_expiry_invalid":"วันหมดอายุของบัตรไม่ถูกต้อง","validation.card_number_incomplete":"หมายเลขบัตรไม่ครบถ้วน","validation.card_number_invalid":"หมายเลขบัตรไม่ถูกต้อง","validation.generic_invalid":"{{field}} ไม่ถูกต้อง","validation.required":"กรุณากรอก {{field}}","validation.text_too_long":"{{field}} ยาวเกินไป","validation.text_too_short":"{{field}} สั้นเกินไป","payment.save_checkbox_label":"บันทึกไว้สำหรับการชำระเงินที่เร็วขึ้นในครั้งถัดไป","payment_methods.add_payment_method":"เพิ่มวิธีการชำระเงิน","payment_methods.channel_disabled_amount_too_large":"ไม่สามารถใช้ได้กับการชำระเงินนี้","payment_methods.channel_disabled_amount_too_small":"ไม่สามารถใช้ได้กับการชำระเงินนี้","payment_methods.pay_with":"ชำระเงินด้วย","payment_methods.select_channel_placeholder":"เลือก {{groupName}}","default_error.message_1":"มีปัญหาในการประมวลผลคำขอ","default_error.message_2":"โปรดลองอีกครั้งในภายหลัง","default_error.title":"ข้อผิดพลาด","failure_code.account_access_blocked":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.account_already_linked":"บัญชีนี้มีการเชื่อมต่อไว้แล้ว กรุณาเลือกวิธีการชำระเงินอื่น","failure_code.account_not_activated":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากบัญชีของคุณยังไม่ได้เปิดใช้งาน กรุณาเปิดใช้งานบัญชีและลองใหม่อีกครั้ง","failure_code.authentication_failed":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.capture_amount_exceeded":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาตรวจสอบรายละเอียดการชำระเงินให้ถูกต้องแล้วลองใหม่อีกครั้ง หรือใช้วิธีการชำระเงินอื่น","failure_code.card_declined":"บัตรของคุณถูกปฏิเสธ กรุณาลองใหม่ด้วยบัตรหรือวิธีการชำระเงินอื่น","failure_code.channel_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.declined_by_issuer":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.declined_by_processor":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.expired_card":"บัตรของคุณถูกปฏิเสธเนื่องจากบัตรหมดอายุ กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","failure_code.expired_otp":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.failure_details_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.inactive_or_unauthorized_card":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.insufficient_balance":"ไม่สามารถดำเนินการชำระเงินได้ เนื่องจากยอดเงินในบัญชีไม่เพียงพอ กรุณาตรวจสอบให้แน่ใจว่ามียอดเงินเพียงพอแล้วลองใหม่อีกครั้ง","failure_code.invalid_account_details":"ข้อมูลการชำระเงินไม่ถูกต้อง กรุณาตรวจสอบรายละเอียดบัตรอีกครั้ง หรือใช้วิธีการชำระเงินอื่น","failure_code.invalid_cvv":"CVN ที่กรอกไม่ถูกต้อง กรุณาลองใหม่อีกครั้ง","failure_code.invalid_merchant_settings":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาติดต่อผู้ขายหรือลองใช้วิธีชำระเงินอื่น","failure_code.invalid_otp":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.invalid_token":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.issuer_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.otp_attempt_counts_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากมีการกรอกรหัส OTP ผิดพลาดมากเกินไป กรุณาชำระเงินใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.partner_timeout_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.payment_amount_limits_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากคุณทำธุรกรรมเกินขีดจำกัด กรุณาใช้วิธีชำระเงินอื่น","failure_code.payment_attempt_counts_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากพยายามล้มเหลวหลายครั้งเกินไป","failure_code.payment_request_expired":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากลิงก์หมดอายุแล้ว กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.processor_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.server_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.stolen_card":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.suspected_fraudulent":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.timeout_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_declined_payment":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_device_unreachable":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากปัญหาเครือข่าย กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_did_not_authorize":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากไม่ได้รับการอนุมัติภายในเวลาที่กำหนด กรุณาลองใหม่อีกครั้ง",failure_code_unknown:"เกิดข้อผิดพลาดขึ้น (รหัส: {{failureCode}})","payment_request_status.canceled.subtext":"กรุณาลองชำระเงินอีกครั้ง หรือ ติดต่อผู้ขายหากปัญหายังคงเกิดขึ้น","payment_request_status.canceled.title":"หน้านี้ไม่สามารถใช้งานได้แล้ว","payment_request_status.expired.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือลองใช้วิธีชำระเงินอื่น","payment_request_status.expired.title":"ชำระเงินไม่สำเร็จ","payment_request_status.failed.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใช้วิธีการชำระเงินอื่น หรือส่งคำถามไปยังผู้ขายโดยแชร์ Unique Identifiers ของคุณ","payment_request_status.failed.title":"ชำระเงินไม่สำเร็จ","payment_token_status.canceled.subtext":"กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","payment_token_status.canceled.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","payment_token_status.expired.subtext":"กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","payment_token_status.expired.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","payment_token_status.failed.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใช้วิธีการชำระเงินอื่น หรือส่งคำถามไปยังผู้ขายโดยแชร์ Unique Identifiers ของคุณ","payment_token_status.failed.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้"}},vi={session:{"validation.card_cvn_invalid":"CVN không hợp lệ","validation.card_expiry_invalid":"Ngày hết hạn thẻ không hợp lệ","validation.card_number_incomplete":"Số thẻ chưa đầy đủ","validation.card_number_invalid":"Số thẻ không hợp lệ","validation.generic_invalid":"{{field}} không hợp lệ","validation.required":"Vui lòng nhập {{field}}","validation.text_too_long":"{{field}} quá dài","validation.text_too_short":"{{field}} quá ngắn","payment.save_checkbox_label":"Lưu để thanh toán nhanh hơn lần sau","payment_methods.add_payment_method":"Thêm phương thức thanh toán","payment_methods.channel_disabled_amount_too_large":"Không khả dụng cho khoản thanh toán này","payment_methods.channel_disabled_amount_too_small":"Không khả dụng cho khoản thanh toán này","payment_methods.pay_with":"Thanh toán bằng","payment_methods.select_channel_placeholder":"Chọn {{groupName}}","default_error.message_1":"Có vấn đề với yêu cầu.","default_error.message_2":"Vui lòng thử lại sau.","default_error.title":"Lỗi","failure_code.account_access_blocked":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.account_already_linked":"Tài khoản của bạn đã được liên kết. Vui lòng dùng phương thức khác.","failure_code.account_not_activated":"Không thể thực hiện thanh toán vì tài khoản chưa được kích hoạt. Vui lòng kích hoạt và thử lại.","failure_code.authentication_failed":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.capture_amount_exceeded":"Không thể thực hiện thanh toán. Vui lòng kiểm tra thông tin thanh toán và thử lại, hoặc dùng phương thức khác.","failure_code.card_declined":"Thẻ của bạn đã bị từ chối. Vui lòng thử lại bằng thẻ khác hoặc phương thức khác.","failure_code.channel_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.declined_by_issuer":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.declined_by_processor":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.expired_card":"Thẻ của bạn bị từ chối do đã hết hạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.expired_otp":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.failure_details_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.inactive_or_unauthorized_card":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.insufficient_balance":"Không thể thực hiện thanh toán vì số dư tài khoản không đủ. Vui lòng nạp thêm tiền và thử lại.","failure_code.invalid_account_details":"Thông tin thanh toán không chính xác. Vui lòng kiểm tra lại hoặc dùng phương thức khác.","failure_code.invalid_cvv":"Mã CVN nhập không đúng. Vui lòng thử lại.","failure_code.invalid_merchant_settings":"Không thể thực hiện thanh toán. Vui lòng liên hệ người bán hoặc dùng phương thức khác.","failure_code.invalid_otp":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.invalid_token":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.issuer_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.otp_attempt_counts_exceeded":"Không thể thực hiện thanh toán vì đã nhập sai OTP quá nhiều lần. Vui lòng thanh toán lại hoặc dùng phương thức khác.","failure_code.partner_timeout_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.payment_amount_limits_exceeded":"Không thể thực hiện thanh toán vì bạn đã vượt quá hạn mức giao dịch. Vui lòng dùng phương thức khác.","failure_code.payment_attempt_counts_exceeded":"Không thể thực hiện thanh toán do quá nhiều lần thử thất bại.","failure_code.payment_request_expired":"Không thể thực hiện thanh toán vì liên kết đã hết hạn. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.processor_error":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.server_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.stolen_card":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.suspected_fraudulent":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.timeout_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_declined_payment":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_device_unreachable":"Không thể thực hiện thanh toán do sự cố mạng. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_did_not_authorize":"Không thể thực hiện thanh toán vì không được xác nhận kịp thời. Vui lòng thử lại.",failure_code_unknown:"Có lỗi xảy ra với mã {{failureCode}}","payment_request_status.canceled.subtext":"Vui lòng thử thanh toán lại hoặc liên hệ người bán nếu vấn đề vẫn tiếp diễn.","payment_request_status.canceled.title":"Trang này không còn khả dụng","payment_request_status.expired.subtext":"Thanh toán của bạn không thể xử lý. Vui lòng thử lại hoặc chọn phương thức khác.","payment_request_status.expired.title":"Thanh toán không thành công","payment_request_status.failed.subtext":"Không thể thực hiện thanh toán. Vui lòng thử phương thức khác hoặc gửi yêu cầu đến người bán bằng cách chia sẻ Mã định danh duy nhất.","payment_request_status.failed.title":"Thanh toán thất bại","payment_token_status.canceled.subtext":"Vui lòng thử lại hoặc dùng phương thức khác.","payment_token_status.canceled.title":"Không thể thêm phương thức thanh toán","payment_token_status.expired.subtext":"Vui lòng thử lại hoặc dùng phương thức khác.","payment_token_status.expired.title":"Không thể thêm phương thức thanh toán","payment_token_status.failed.subtext":"Không thể thực hiện thanh toán. Vui lòng thử phương thức khác hoặc gửi yêu cầu đến người bán bằng cách chia sẻ Mã định danh duy nhất.","payment_token_status.failed.title":"Không thể thêm phương thức thanh toán"}};const xi=(e,t,n)=>t?(e=>"object"==typeof e&&null!==e&&"localeKey"in e)(t)?e(t.localeKey,{field:n.label}):t.value:null;function wi(e){return e.startsWith("/")&&e.endsWith("/")?e.slice(1,-1):e}function ki(e,t){if(0===t.length)return e.required?{localeKey:"validation.required"}:void 0;switch(e.type.name){case"credit_card_number":case"credit_card_expiry":case"credit_card_cvn":return function(e){const t=e.split("-");if("xendit"!==t[0]||"encrypted"!==t[1])throw new Error("Unexpected value in encrypted field, this is a bug, please contact support.");if(6!==t.length){if(8===t.length&&"invalid"===t[6]){const e=t[7];return{localeKey:atob(e)}}throw new Error("Unexpected value in encrypted field, this is a bug, please contact support.")}}(t);case"phone_number":return(e=>{const t=ur(e);if(!t||!t.isValid())return{localeKey:"validation.generic_invalid"}})(t);case"email":return(e=>{if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[A-Za-z]{2,}$/.test(e))return{localeKey:"validation.generic_invalid"}})(t);case"postal_code":return(e=>{if(!/^(?![-\s]+)[A-Za-z0-9\s-]+$/.test(e))return{localeKey:"validation.generic_invalid"}})(t);case"text":return((e,t)=>{if(Array.isArray(e.type.regex_validators))for(const n of e.type.regex_validators)if(!new RegExp(wi(n.regex)).test(t))return{value:n.message};return void 0!==e.type.min_length&&t.length<e.type.min_length?{localeKey:"validation.text_too_short"}:t.length>e.type.max_length?{localeKey:"validation.text_too_long"}:void 0})(e,t);case"country":case"province":case"dropdown":return;default:throw e.type,new Error(`Unsupported input type: ${e.type.name}; this is a bug, please contact support.`)}}function Ci(e,t){const n=Array.isArray(e.channel_property)?e.channel_property:[e.channel_property];for(const a of n){let n=Ei(t,a);if(void 0===n&&(n=""),"string"!=typeof n)continue;const r=ki(e,n);if(r)return r}}function Ei(e,t){const n=t.split("."),a=e[n[0]];if(void 0!==a){if("object"!=typeof a||Array.isArray(a)){if(1!==n.length)throw new Error(`Attempted to read channel property "${t}" expecting an object but found a primitive value; this is a bug, please contact support.`);return a}return Ei(a,n.slice(1).join("."))}}const Si="field-radius-bl-0",Pi="field-radius-br-0",Ni="field-radius-tl-0",Ti="field-radius-tr-0",Ri="field-collapse-r",Ai="field-collapse-l",Oi="field-collapse-t",Ii="field-collapse-b",Li=({fieldGroup:e,groupIndex:t,handleFieldChanged:n,channelProperties:a})=>{const{t:r}=Ot(),i=ke(null),[o,d]=ve({}),s=e.map(e=>e.span),l=Math.ceil(e.reduce((e,t)=>e+t.span,0)/2);we(()=>{const e=i.current;if(e)return e.addEventListener(InternalSetFieldTouchedEvent.type,t),()=>{e.removeEventListener(InternalSetFieldTouchedEvent.type,t)};function t(e){const t=e.target.name;d(e=>({...e,[t]:!0}))}},[]);const c=(()=>{for(const t of e){if(!o[Wt(t)])continue;const e=Ci(t,a??{});if(e)return lt("span",{className:"xendit-error-message xendit-text-12",children:xi(r,e,t)})}return null})();return lt("div",{className:"xendit-channel-form-field-group",children:[lt("label",{htmlFor:Wt(e[0]),className:"xendit-text-14",children:e[0].group_label??e[0].label??""}),lt("div",{ref:i,className:"xendit-form-field-group "+(c?"invalid":""),children:e.map((e,t)=>{const a=(e=>{const t=s.slice(0,e).reduce((e,t)=>e+t,0),n=0===e?0:Math.floor(t/2);return{fieldPositionBySpan:t,fieldRow:n,fieldColumn:t%2,isLastRow:n===l-1}})(t),r=((e,t,n)=>{const{fieldPositionBySpan:a,fieldRow:r,fieldColumn:i,isLastRow:o}=n;return bt({[Si]:l>r+1||a%2==1,[Pi]:!!s[t+1],[Ni]:t>0,[Ti]:!(0===r&&1===i||0===r&&0===i&&2===e.span),[Ri]:1===e.span&&0===i,[Ai]:1===e.span&&1===i,[Oi]:a>=2,[Ii]:!o})})(e,t,a);return lt(Mr,{className:r,field:e,onChange:n},t)})},t),c]})},Mi=function(e){function t(t){var n=Le({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Fe,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}(({form:e,onChannelPropertiesChanged:t},n)=>{const a=Tt(),r=At(),i=ke(null),[o,d]=ve(null);!function(e,t,n){ue=6,we(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}(n,()=>({setAllFieldsTouched(){const e=i.current;e&&Array.from(e.elements).filter(e=>e instanceof HTMLInputElement).forEach(e=>{e.name&&e.dispatchEvent(new InternalSetFieldTouchedEvent)})}}));const s=Ee(()=>{if(!i.current)return{};return function(e){const t={};for(const[n,a]of e){if(a instanceof Blob)continue;const e=n.split("__"),r=Fi(e,a);e:for(const n of e){const e=n.split(".");let a=t;for(;e.length>1;){const t=e.shift();let n=a[t];if(void 0===n&&(n=a[t]={}),n&&"object"==typeof n){if(Array.isArray(n))continue e;a=n}}const i=r.length?r.shift():"";a[e[0]]=i}}return t}(new FormData(i.current).entries())},[]),l=Ee(()=>{if(!i.current)return;const e=s();d(e),t(e)},[s,t]),c=function(e,t,n){const a=Ce(()=>Bi(e.session_type,t,n?.require_billing_information??!1),[n?.require_billing_information,t,e.session_type]);return a}(a,e,r.details??null),u=Ht(c);xe(()=>{u!==c&&l()},[c,l,u]);const h=function(e){const t=[[]];for(const n of e)1!==n.span||1!==t[t.length-1].length||1!==t[t.length-1][0].span?n.join?t[t.length-1].push(n):t.push([n]):t[t.length-1].push(n);return t}(c).filter(e=>e.length);return 0===h.length?null:lt("div",{class:"xendit-channel-form",children:lt("form",{ref:i,children:lt(Di.Provider,{value:o,children:h.map((e,t)=>lt(Li,{fieldGroup:e,groupIndex:t,handleFieldChanged:l,channelProperties:o},t))})})})}),Di=V(null),Ui=()=>Se(Di);function Fi(e,t){if(0===e.length)return[];if(1===e.length)return[t];if(""===t)return[];try{return JSON.parse(t)}catch(e){return[t]}}function Bi(e,t,n){return t.filter(t=>{if(t.flags?.require_billing_information){if("PAY"!==e)return!1;if(!n)return!1}return!0})}const ji=e=>{const t=ke(null),n=ke(null),a=void 0!==HTMLElement.prototype.animate;return we(()=>{a&&(t.current?.animate(qi,Ki),n.current?.animate(Vi,Gi))},[a]),lt("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[lt("g",{opacity:"0.5",children:[lt("path",{d:"M8.79453 10.2303C7.1791 10.2303 5.86953 11.5399 5.86953 13.1553V28.9503C5.86953 31.535 7.96484 33.6303 10.5495 33.6303H26.3445C27.96 33.6303 29.2695 32.3208 29.2695 30.7053",fill:"#F1F1F1"}),lt("path",{d:"M8.79453 10.2303V10.2303C7.1791 10.2303 5.86953 11.5399 5.86953 13.1553V28.9503C5.86953 31.535 7.96484 33.6303 10.5495 33.6303H26.3445C27.96 33.6303 29.2695 32.3208 29.2695 30.7053V30.7053",stroke:"#D0D0D0",strokeWidth:"1.755",strokeLinecap:"round",strokeLinejoin:"round"})]}),lt("g",{ref:n,style:{transformOrigin:"20px 20px"},children:[lt("path",{d:"M28.8177 6.00256H14.7777C12.193 6.00256 10.0977 8.09787 10.0977 10.6826V24.7226C10.0977 27.3073 12.193 29.4026 14.7777 29.4026H28.8177C31.4023 29.4026 33.4977 27.3073 33.4977 24.7226V10.6826C33.4977 8.09787 31.4024 6.00256 28.8177 6.00256Z",fill:"white",stroke:"#EDEDED",strokeWidth:"1.755",strokeLinecap:"round",strokeLinejoin:"round"}),lt("g",{style:{transformOrigin:"10px 30px"},ref:t,children:[lt("path",{d:"M26.7697 20.5301V12.7301H18.9697",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"}),lt("path",{d:"M17.4102 22.0901L26.7702 12.7301",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]})},qi=[{transform:"scale(0.1)"},{transform:"scale(1)"}],Ki={duration:500,easing:"ease-out"},Vi=[{transform:"rotate(0deg)"},{transform:"rotate(5deg)"},{transform:"rotate(-5deg)"},{transform:"rotate(0deg)"}],Gi={duration:1e3,easing:"ease-out",iterations:1/0,delay:2e3},Hi=e=>{const{id:t,label:n,checked:a,onChange:r,disabled:i}=e,o=Qt(),d=t||o;return lt("div",{className:"xendit-checkbox",children:[lt("div",{className:"xendit-checkbox-box",children:[lt("input",{id:d,type:"checkbox",onChange:e=>{r?.(e)},checked:a,disabled:i}),lt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:"xendit-checkbox-graphic",children:lt("polyline",{points:"40 144 96 200 224 72",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"16"})})]}),lt("label",{htmlFor:d,className:"xendit-text-14",children:n})]})},Wi=V(null),Xi=()=>{const e=Se(Wi);if(void 0===e)throw new Error("useChannel must be used within a ChannelProvider");return e},Yi=e=>{const{channels:t,savePaymentMethod:n,formRef:a}=e,r=ke(null),i=Ot(),{t:o}=i,d=Tt(),s=t[0],l=t.length>1,c=en(t,n),u=function(e){if(e&&2===e.length)return[e[0],e[1]];return null}(c.instructions),h="OPTIONAL"===d.allow_save_payment_method&&(c.allow_save||l);return"ACTIVE"!==i.getSdkStatus()||"ACTIVE"!==d.status?null:lt(Wi.Provider,{value:c,children:lt("div",{className:"xendit-payment-channel",ref:r,children:[lt(Mi,{ref:a,form:c.form,onChannelPropertiesChanged:e=>{const t=new XenditChannelPropertiesChangedEvent(s.channel_code,e);r.current?.dispatchEvent(t)}}),h&&lt(Hi,{label:o("payment.save_checkbox_label"),onChange:e=>{const t=e.target?.checked;r.current?.dispatchEvent(new XenditSavePaymentMethodChangedEvent(s.channel_code,t))},checked:n}),u?lt("div",{className:"xendit-payment-channel-instructions",children:[lt(ji,{}),lt("div",{className:"xendit-payment-channel-instructions-text xendit-text-12",children:u.map((e,t)=>lt("p",{className:0===t?"xendit-text-semibold":void 0,children:e},t))})]}):null]})})};class XenditChannelPropertiesChangedEvent extends Event{static type="xendit-channel-properties-changed";channel;channelProperties;constructor(e,t){super(XenditChannelPropertiesChangedEvent.type,{bubbles:!0,composed:!0}),this.channel=e,this.channelProperties=t}}class XenditSavePaymentMethodChangedEvent extends Event{static type="xendit-save-payment-method-changed";channel;savePaymentMethod;constructor(e,t){super(XenditSavePaymentMethodChangedEvent.type,{bubbles:!0,composed:!0}),this.channel=e,this.savePaymentMethod=t}}class NetworkError extends Error{errorResponse;constructor(e){super(e.message),this.errorResponse=e}}function zi(e){const t=new URLSearchParams;return t.append("payload",JSON.stringify(e)),t}function Zi(e,t,n){return async function(...a){let r,i,o,d,s;switch(e){case"GET":[r,i,o,s]=a;break;case"POST":[r,d,i,o,s]=a;break;default:throw new Error(`Unable to call endpoint with method ${e}; this is a bug, please contact support.`)}const l="v0.0.9";Dt(l),Dt(l.startsWith("v"));const c=r.hostId;if(c===Kt)throw new Error("A network request was made in mock mode; this is a bug.");const u=Gt(c);if(!u)throw new Error(`Unknown hostId ${c} in sdkKey; this is a bug, please contact support.`);const h=new URL(t(i),u);if(n&&!o)throw new Error("Query string argument is missing; this is a bug, please contact support.");const p=n?.(o)??new URLSearchParams;p.set("components_version",l),h.search=p.toString();const f={method:e,body:d?zi(d):void 0,headers:{"Content-Type":"application/x-www-form-urlencoded"},signal:s},m=await fetch(h,f);if(!m.ok){const e=await m.json();if(!e||!e.error_code)throw new Error("Unexpected error response from server");throw new NetworkError(e)}return m.json()}}const Ji=Zi("GET",e=>`/api/sessions/${e}`),Qi=Zi("POST",()=>"/api/sessions/payment_tokens"),eo=Zi("POST",()=>"/api/sessions/payment_requests"),to=Zi("POST",e=>`/api/sessions/${e.sessionAuthKey}/payment_requests/${e.paymentRequestId}/simulate`),no=Zi("GET",e=>`/api/sessions/${e}/poll`,e=>new URLSearchParams(e?{token_request_id:e}:{})),ao=Zi("POST",e=>`/api/sessions/${e}/card_info`);function ro(e,t,n){return{impl:e,key:t??"",child:n,instance:void 0}}class BehaviorTree{fn;bb;root=ro(class{});updating=!1;again=!1;constructor(e,t){this.fn=e,this.bb=t}update(){if(this.again=!0,this.updating)return;let e=0;try{for(this.updating=!0;this.again;){this.again=!1,e+=1,io(e);const t=this.root??void 0,n=this.fn(this.bb);this.root=n,oo(t,n,this.bb,0)}}finally{this.updating=!1}}findBehavior(e){let t=this.root;for(;t;){if(t.impl===e)return t.instance?t.instance:null;t=t.child}return null}}function io(e){if(e>32)throw new Error("Max recursion depth exceeded; this is a bug, please contact support.")}function oo(e,t,n,a){io(a);void 0===e||void 0===t||e.impl!==t.impl||e.key!==t.key?(e&&lo(e,a+1),t&&so(t,n,a+1)):(t&&(t.instance=e?.instance),e&&(e.instance=void 0),oo(e?.child,t?.child,n,a+1),t?.instance?.update?.())}function so(e,t,n){io(n),e.instance=new e.impl(t,e.key),e.instance.enter?.(),e.child&&so(e.child,t,n+1)}function lo(e,t){io(t),e.child&&lo(e.child,t+1),e.instance?.exit?.(),e.instance=void 0}class XenditInitEvent extends Event{static type="init";constructor(){super(XenditInitEvent.type,{})}}class XenditFatalErrorEvent extends Event{message;static type="fatal-error";constructor(e){super(XenditFatalErrorEvent.type,{}),this.message=e}}class XenditReadyEvent extends Event{channelCode;static type="submission-ready";constructor(e){super(XenditReadyEvent.type,{}),this.channelCode=e}}class XenditNotReadyEvent extends Event{static type="submission-not-ready";constructor(){super(XenditNotReadyEvent.type,{})}}class XenditSubmissionBeginEvent extends Event{static type="submission-begin";constructor(){super(XenditSubmissionBeginEvent.type,{})}}class XenditSubmissionEndEvent extends Event{reason;userErrorMessage;developerErrorMessage;static type="submission-end";constructor(e,t,n){super(XenditSubmissionEndEvent.type,{}),this.reason=e,this.userErrorMessage=t,this.developerErrorMessage=n}}class XenditActionBeginEvent extends Event{static type="action-begin";constructor(){super(XenditActionBeginEvent.type,{})}}class XenditActionEndEvent extends Event{static type="action-end";constructor(){super(XenditActionEndEvent.type,{})}}class XenditWillRedirectEvent extends Event{static type="will-redirect";constructor(){super(XenditWillRedirectEvent.type,{})}}class XenditSessionCompleteEvent extends Event{static type="session-complete";constructor(){super(XenditSessionCompleteEvent.type,{})}}class XenditSessionExpiredOrCanceledEvent extends Event{static type="session-expired-or-canceled";constructor(){super(XenditSessionExpiredOrCanceledEvent.type,{})}}class XenditPaymentRequestCreatedEvent extends Event{paymentRequestId;static type="payment-request-created";constructor(e){super(XenditPaymentRequestCreatedEvent.type,{}),this.paymentRequestId=e}}class XenditPaymentTokenCreatedEvent extends Event{paymentTokenId;static type="payment-token-created";constructor(e){super(XenditPaymentTokenCreatedEvent.type,{}),this.paymentTokenId=e}}class XenditPaymentRequestDiscardedEvent extends Event{paymentRequestId;static type="payment-request-discarded";constructor(e){super(XenditPaymentRequestDiscardedEvent.type,{}),this.paymentRequestId=e}}class XenditPaymentTokenDiscardedEvent extends Event{paymentTokenId;static type="payment-token-discarded";constructor(e){super(XenditPaymentTokenDiscardedEvent.type,{}),this.paymentTokenId=e}}var co;function uo(e){return"payment_request_id"in e?{id:e.payment_request_id,type:co.PaymentRequest,entity:e}:{id:e.payment_token_id,type:co.PaymentToken,entity:e}}function ho(e,t,n){return`${e===co.PaymentRequest?"payment_request":"payment_token"}_status.${t.toLowerCase()}.${n}`}!function(e){e.PaymentRequest="REQUEST",e.PaymentToken="TOKEN"}(co||(co={}));function po(){return`session-${mo(32)}-mock-MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEyCADI5pdf6KmN8+Fxl2ES3yolUKXunNeY3gGScGNEvDcrcHAPKxIInAo5DVnDvTtYtqZvx/bu7HLeBJNMXwHhie/uyNEtT8dSaLc9bd0WSlYdxI+iUsTv2Qu0LiiPrZs-NKf7whM9meUs/eRCvG0oc180MDiyeli3kH6EQ3ZahECHsZQi5G2IpH6vk3cYMtf01Y1L4OBn1SZCOv1kwpjIUet4DJeoTwwq2nM5b+K7rD+/WFTi3AEX4NWJNkKi0a91`}function fo(){return[mo(8),mo(4),mo(4),mo(4),mo(12)].join("-")}function mo(e){Dt(e%2==0);const t=function(e){const t=new Uint8Array(e);for(let n=0;n<e;n++)t[n]=Math.floor(256*Math.random());return t}(e/2);return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}function _o(e,t){const n=t.type===co.PaymentRequest?t.entity:void 0,a=t.type===co.PaymentToken?t.entity:void 0;return{session:{...e,status:"COMPLETED",payment_request_id:n?.payment_request_id,payment_token_id:a?.payment_token_id},payment_request:go(n,"SUCCEEDED"),payment_token:go(a,"ACTIVE"),succeeded_channel:{channel_code:t.entity.channel_code,logo_url:"https://placehold.co/48"}}}function $o(e,t){const n=t.type===co.PaymentRequest?t.entity:void 0,a=t.type===co.PaymentToken?t.entity:void 0;return{session:{...e,status:"ACTIVE"},payment_request:go(n,"FAILED"),payment_token:go(a,"FAILED")}}function go(e,t){return e?{...e,status:t}:e}function yo(e,t){return t?{payment_request_id:`pr-${fo()}`,status:"REQUIRES_ACTION",channel_code:e,actions:vo(t),session_token_request_id:fo()}:{payment_request_id:`pr-${fo()}`,status:"SUCCEEDED",channel_code:e,actions:[],session_token_request_id:fo()}}function bo(e,t){return t?{payment_token_id:`pt-${fo()}`,status:"REQUIRES_ACTION",channel_code:e,actions:vo(t),session_token_request_id:fo()}:{payment_token_id:`pt-${fo()}`,status:"ACTIVE",channel_code:e,actions:[],session_token_request_id:fo()}}function vo(e){return e?[xo(e)]:[]}function xo(e){switch(e){case"IFRAME":return{type:"REDIRECT_CUSTOMER",descriptor:"WEB_URL",value:"https://example.com/iframe",iframe_capable:!0};case"REDIRECT":return{type:"REDIRECT_CUSTOMER",descriptor:"WEB_URL",value:"https://example.com/redirect",iframe_capable:!1};case"QR":return{type:"PRESENT_TO_CUSTOMER",descriptor:"QR_STRING",value:"https://example.com/qr-code-data",action_title:"Pay with QR Code",action_subtitle:"Scan the QR code below",action_graphic:"",instructions:null};case"BARCODE":return{type:"PRESENT_TO_CUSTOMER",descriptor:"PAYMENT_CODE",value:"1234567890",action_title:"Pay at a Store",action_subtitle:"Show this barcode to the cashier",action_graphic:"",instructions:null};case"VA":return{type:"PRESENT_TO_CUSTOMER",descriptor:"VIRTUAL_ACCOUNT_NUMBER",value:"1234567890",action_title:"Pay with Virtual Account",action_subtitle:"Protect yourself from fraud - ensure all details are correct",action_graphic:"",instructions:null}}throw new Error(`Unknown mock action type: ${e}`)}var wo=Object.freeze({__proto__:null,makeMockActions:vo,makeOneMockAction:xo,makeTestBffData:function(){const e=(new Date).toISOString(),t=new Date(Date.now()+2592e6).toISOString();return{session:{payment_session_id:`ps-${mo(24)}`,created:e,updated:e,status:"ACTIVE",reference_id:fo(),description:"Test session",currency:"IDR",amount:1e4,country:"ID",expires_at:t,session_type:"PAY",mode:"COMPONENTS",locale:"en",business_id:mo(24),customer_id:`cust-${fo()}`,capture_method:"AUTOMATIC",allow_save_payment_method:"OPTIONAL",items:[{reference_id:fo(),type:"DIGITAL_PRODUCT",name:"Item 1",net_unit_amount:5e4,quantity:1,category:""},{reference_id:fo(),type:"DIGITAL_SERVICE",name:"Item 2",net_unit_amount:5e4,quantity:1,category:""}]},business:{name:"Components Mock Merchant",country_of_operation:"Indonesia",merchant_profile_picture_url:"https://placehold.co/256x256.png?text=Logo"},customer:{type:"INDIVIDUAL",id:`cust-${fo()}`,email:"exa**@example.com",mobile_number:null,phone_number:null,individual_detail:{given_names:"exa********",surname:null},business_detail:null},channels:[{brand_name:"Cards",channel_code:"CARDS",brand_logo_url:"https://assets.xendit.co/payment-session/logos/CARDS.svg",ui_group:"cards",allow_pay_without_save:!0,allow_save:!0,brand_color:"#000000",min_amount:5e3,max_amount:2e8,requires_customer_details:!1,_mock_action_type:"IFRAME",card:{brands:[{name:"VISA",logo_url:"https://assets.xendit.co/payment-session/logos/VISA.svg"},{name:"MASTERCARD",logo_url:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg"},{name:"JCB",logo_url:"https://assets.xendit.co/payment-session/logos/JCB.svg"}]},form:[{group_label:"Card Details",label:"Card Number",placeholder:"1234 1234 1234 1234",type:{name:"credit_card_number"},channel_property:"card_details.card_number",required:!0,span:2},{label:"Card Expiry Date",placeholder:"MM/YY",type:{name:"credit_card_expiry"},channel_property:["card_details.expiry_month","card_details.expiry_year"],required:!0,span:1,join:!0},{label:"CVN",placeholder:"CVV",type:{name:"credit_card_cvn"},channel_property:"card_details.cvn",required:!0,span:1,join:!0},{group_label:"Cardholder Name",label:"First Name",placeholder:"First Name",type:{name:"text",min_length:1,max_length:50,regex_validators:[{regex:"/^[a-zA-Z\\u00C0-\\u017F\\s]+$/",message:"Invalid input. Please use alphabetic characters only"}]},channel_property:"card_details.cardholder_first_name",required:!0,span:1},{label:"Last Name",placeholder:"Last Name",type:{name:"text",min_length:1,max_length:50,regex_validators:[{regex:"/^[ -~]+$/",message:"Invalid input. Please use alphabetic characters only"}]},channel_property:"card_details.cardholder_last_name",required:!0,span:1},{label:"Email",placeholder:"john.doe@example.com",type:{name:"email"},channel_property:"card_details.cardholder_email",required:!0,span:2},{label:"Mobile Number",placeholder:"8000032341",type:{name:"phone_number"},channel_property:"card_details.cardholder_phone_number",required:!0,span:2},{group_label:"Billing Address",label:"First Name",placeholder:"First Name",type:{name:"text",max_length:255},channel_property:"billing_information.first_name",span:1,required:!0,flags:{require_billing_information:!0}},{label:"Last Name",placeholder:"Last Name",type:{name:"text",max_length:255},channel_property:"billing_information.last_name",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Email",placeholder:"Email",type:{name:"text",max_length:255},channel_property:"billing_information.email",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"billing_information.country",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Province",placeholder:"State / Province",type:{name:"province"},channel_property:"billing_information.province_state",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"City",placeholder:"City",type:{name:"text",max_length:255},channel_property:"billing_information.city",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Address Line 1",placeholder:"Address Line 1",type:{name:"text",max_length:255},channel_property:"billing_information.street_line1",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Address Line 2",placeholder:"Address Line 2",type:{name:"text",max_length:255},channel_property:"billing_information.street_line2",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Postal Code",placeholder:"Postal Code",type:{name:"postal_code"},channel_property:"billing_information.postal_code",span:2,required:!0,flags:{require_billing_information:!0},join:!0}],instructions:["Mock Cards channel","This mock channel behaves similarly to the production CARDS channel."]},{brand_name:"Mock E-Wallet Channel",channel_code:"MOCK_EWALLET",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"REDIRECT",form:[],instructions:["Mock E-Wallet channel","This mock channel behaves similarly to production E-Wallets channels with no user input."]},{brand_name:"Mock E-Wallet Channel (Phone input)",channel_code:"MOCK_EWALLET_WITH_PHONE",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"REDIRECT",form:[{label:"Phone Number",placeholder:"123 123 132",type:{name:"phone_number"},channel_property:"phone_number_field",required:!0,span:2}],instructions:["Mock E-Wallet channel","This mock channel behaves similarly to production E-Wallets channels with a phone number input."]},{brand_name:"Mock QR Channel",channel_code:"MOCK_QR",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"QR",form:[],instructions:["Mock QR channel","This mock channel behaves similarly to production QR channels."]},{brand_name:"Mock Direct Debit Channel",channel_code:"MOCK_DIRECT_DEBIT",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["Mock Direct Debit channel","This mock channel behaves similarly to production Direct Debit channels."]},{brand_name:"Mock OTC Channel",channel_code:"MOCK_OTC",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"BARCODE",form:[{label:"Payer Name",placeholder:"Payer Name",type:{name:"text",max_length:50},channel_property:"payer_name",required:!0,span:2}],instructions:["Mock OTC channel","This mock channel behaves similarly to production OTC channels."]},{brand_name:"Input Test",channel_code:"UI_INPUT_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Card Number (Iframe)",placeholder:"1234 1234 1234 1234",type:{name:"credit_card_number"},channel_property:"card_number",required:!1,span:2},{label:"Card Expiry Date (Iframe)",placeholder:"MM/YY",type:{name:"credit_card_expiry"},channel_property:["expiry_month","expiry_year"],required:!1,span:2},{label:"CVN (Iframe)",placeholder:"CVV",type:{name:"credit_card_cvn"},channel_property:"cvn",required:!1,span:2},{label:"Text",placeholder:"Text",type:{name:"text",max_length:50},channel_property:"text_field",required:!1,span:2},{label:"Phone Number",placeholder:"123 123 123",type:{name:"phone_number"},channel_property:"phone_number_field",required:!1,span:2},{label:"Email",placeholder:"test@example.com",type:{name:"email"},channel_property:"email_field",required:!1,span:2},{label:"Postal Code",placeholder:"123456",type:{name:"postal_code"},channel_property:"postal_code_field",required:!1,span:2},{label:"Country",placeholder:"Select",type:{name:"country"},channel_property:"country_field",required:!1,span:2},{label:"Dropdown",placeholder:"Select",type:{name:"dropdown",options:[{label:"Option 1",value:"option_1"},{label:"Option 2",value:"option_2"},{label:"Option 3",value:"option_3"}]},channel_property:"dropdown_field",required:!1,span:2},{label:"Dropdown With Icons",placeholder:"Select",type:{name:"dropdown",options:[{label:"Option 1",value:"option_1",icon_url:"https://placehold.co/16"},{label:"Option 2",value:"option_2",icon_url:"https://placehold.co/16"},{label:"Option 3",value:"option_3",icon_url:"https://placehold.co/16"}]},channel_property:"dropdown_field_with_icons",required:!1,span:2}],instructions:["This test demonstrates basic usage of all input types.","All fields here are optional and blank values should pass validation."]},{brand_name:"Field Grouping Test",channel_code:"UI_FIELD_GROUPING_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{group_label:"Vertical Grouping",label:"Top",placeholder:"Top",type:{name:"text",max_length:50},channel_property:"a1",required:!1,span:2},{label:"Middle",placeholder:"Middle",type:{name:"text",max_length:50},channel_property:"a2",required:!1,span:2,join:!0},{label:"Bottom",placeholder:"Bottom",type:{name:"text",max_length:50},channel_property:"a3",required:!1,span:2,join:!0},{group_label:"Horizontal Grouping",label:"Text",placeholder:"Left",type:{name:"text",max_length:50},channel_property:"b1",required:!1,span:1},{label:"Text",placeholder:"Right",type:{name:"text",max_length:50},channel_property:"b1",required:!1,span:1,join:!0},{group_label:"Mixed Grouping",label:"Text",placeholder:"Top Left",type:{name:"text",max_length:50},channel_property:"c1",required:!1,span:1},{label:"Text",placeholder:"Top Right",type:{name:"text",max_length:50},channel_property:"c2",required:!1,span:1,join:!0},{label:"Text",placeholder:"Middle Left",type:{name:"text",max_length:50},channel_property:"c3",required:!1,span:1,join:!0},{label:"Text",placeholder:"Middle Right",type:{name:"text",max_length:50},channel_property:"c4",required:!1,span:1,join:!0},{label:"Text",placeholder:"Bottom Left",type:{name:"text",max_length:50},channel_property:"c5",required:!1,span:1,join:!0},{label:"Text",placeholder:"Bottom Right",type:{name:"text",max_length:50},channel_property:"c6",required:!1,span:1,join:!0}],instructions:["This test demonstrates field grouping.","Fields can be 1 or 2 cells wide and can be grouped in any arrangement."]},{brand_name:"Text Validation Test",channel_code:"UI_TEXT_VALIDATION_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Required Text Field",placeholder:"Required",type:{name:"text",max_length:50},channel_property:"required",required:!0,span:2},{label:"Validate Minimum Length (5)",placeholder:"Min 5 characters",type:{name:"text",min_length:5,max_length:50},channel_property:"min_5_chars",required:!1,span:2},{label:"Validate Using Regexp (/^[a-zA-Z0-9]+$/)",placeholder:"Alphanumeric only",type:{name:"text",max_length:50,regex_validators:[{regex:"/^[a-zA-Z0-9]+$/",message:"Invalid input. Please use alphanumeric characters only"}]},channel_property:"regexp_validation",required:!1,span:2}],instructions:["This test demonstrates text field validation.","Fields should validate on blur or `submit()` or `revealValidationErrors()`. Blurring a blank field does not trigger validation."]},{brand_name:"State/Province Field Test",channel_code:"UI_STATE_PROVINCE_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{group_label:"Country + State/Province Fields",label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"country_field",required:!0,span:2},{label:"State / Province",placeholder:"State / Province",type:{name:"province"},channel_property:"province_field",required:!0,span:2,join:!0},{group_label:"Country + State/Province Fields (Horizontal Grouping)",label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"country_field_2",required:!0,span:1},{label:"State / Province",placeholder:"State / Province",type:{name:"province"},channel_property:"province_field_2",required:!0,span:1,join:!0}],instructions:["This test demonstrates the country + state/province field combination.","Selecting certain countries (US, CA, GB) should change the state/province field to a dropdown with predefined options."]},{brand_name:"Conditional Field Test",channel_code:"UI_CONDITIONAL_FIELD_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Toggle Hidden Field",placeholder:"Select",type:{name:"dropdown",options:[{label:"Show",value:"show"},{label:"Hide",value:"hide"}]},channel_property:"toggle",required:!0,span:2},{label:"Conditional Field",placeholder:"This field is conditionally shown",type:{name:"text",max_length:50},channel_property:"conditional_field",required:!0,span:2,join:!0,display_if:[["toggle","equals","show"]]}],instructions:["This test demonstrates conditional field display based on another field's value.","The second field should only appear if 'Show' is selected in the first field."]},{brand_name:"Save Payment Details Test",channel_code:"UI_SAVE_PAYMENT_DETAILS_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!0,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel supports both one-time payment and pay-and-save.","A checkbox should be displayed."]},{brand_name:"Paired Channels Test",channel_code:"UI_PAIRED_CHANNELS_TEST_1",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"This should show if the save checkbox is unchecked",placeholder:"Unchecked",type:{name:"text",max_length:50},channel_property:"nonsave",required:!1,span:2}],instructions:["This channel does not support save, but has a paired channel that does.","Changing the save checkbox switches between the two channels."]},{brand_name:"Paired Channels Test",channel_code:"UI_PAIRED_CHANNELS_TEST_2",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!0,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"This should show if the save checkbox is checked",placeholder:"Checked",type:{name:"text",max_length:50},channel_property:"save",required:!1,span:2}],instructions:["This channel can only be used for pay-and-save, but has a paired channel that supports one time payment.","Changing the save checkbox switches between the two channels."]},{brand_name:"Banner Test",channel_code:"UI_BANNER_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,banner:{image_url:"https://placehold.co/256x32.png?text=Banner",alt_text:""},form:[],instructions:["This channel has a banner image.","It should be displayed above this text."]},{brand_name:"Single Item Test",channel_code:"GROUP_SINGLE_ITEM_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"single_item",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel is in a group by itself.","The channel picker should automatically select it when the group is opened."]},{brand_name:"Disabled Group Test",channel_code:"GROUP_DISABLED_GROUP_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:999999999,max_amount:9999999999,requires_customer_details:!1,form:[],instructions:["This channel is in a disabled group.","Since all channels in this group are disabled, the group should not be selectable. You should never see this text because creating this channel will throw an error."]},{brand_name:"Partial Disabled Group (Enabled)",channel_code:"GROUP_PARTIAL_DISABLED_1",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"partial_disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel is in a partially disabled group.","This channel is enabled, but the other channel in the group is disabled. This channel should be automatically selected by the channel picker because it's the only enabled option."]},{brand_name:"Partial Disabled Group (Disabled)",channel_code:"GROUP_PARTIAL_DISABLED_2",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"partial_disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:999999999,max_amount:9999999999,requires_customer_details:!1,form:[],instructions:["This channel is in a partially disabled group.","This channel is disabled. You should never see this text because creating this channel will throw an error."]}],channel_ui_groups:[{id:"cards",label:"Mock Cards",icon_url:"https://assets.xendit.co/payment-session/logos/CARDS.svg"},{id:"other",label:"Other Mock Channels",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"ui_tests",label:"Channel UI Test Cases",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"single_item",label:"Mock Single Item Group",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"disabled",label:"Mock Disabled Group",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"partial_disabled",label:"Mock Partial Disabled Group",icon_url:"https://placehold.co/48x48.png?text=Logo"}]}},makeTestPaymentRequest:yo,makeTestPaymentToken:bo,makeTestPollResponseForFailure:$o,makeTestPollResponseForSuccess:_o,makeTestSdkKey:po,withPaymentEntityStatus:go});function ko(e){const{url:t,mock:n,onIframeComplete:a}=e,r=ke(null),i=Ee(e=>{if(!r.current)return;const t=r.current.contentWindow;e.source===t&&"xendit-iframe-action-complete"===e.data?.type&&a(e.data)},[a]);return xe(()=>(window.addEventListener("message",i),()=>{window.removeEventListener("message",i)}),[i]),lt("iframe",n?{ref:r,srcDoc:Co,className:"xendit-action-iframe"}:{ref:r,src:t,className:"xendit-action-iframe"})}const Co="\n <html>\n <head>\n <title>Xendit Mock Action Iframe</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n font-size: 14px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n p {\n margin: 0;\n }\n .buttons {\n display: flex;\n gap: 8px;\n }\n button {\n font-size: 12px;\n display: flex;\n align-items: center;\n text-align: left;\n background-color: white;\n border: 1px solid rgba(243, 243, 243);\n border-radius: 4px;\n justify-content: space-between;\n padding: 4px;\n cursor: pointer;\n }\n button:hover {\n border-color: #1762ee;\n background-color: #1762ee;\n color: white;\n }\n </style>\n </head>\n <body>\n <p>This is a mock action page.</p>\n <p>Normally, this would be a 3DS authentication page.</p>\n <p>Click a button below to simulate the result of the action.</p>\n <div class=\"buttons\">\n <button onclick=\"parent.postMessage({type: 'xendit-iframe-action-complete', mockStatus: 'success'}, '*')\">\n Simulate Success\n </button>\n <button onclick=\"parent.postMessage({type: 'xendit-iframe-action-complete', mockStatus: 'fail'}, '*')\">\n Simulate Failure\n </button>\n </div>\n </body>\n </html>\n",Eo=e=>{const{title:t,onClose:n,children:a}=e,r=ke(!1),i=ke(!1),o=ke(null),d=ke(null),s=Ee(()=>{r.current||(r.current=!0,n())},[n]),l=Ee(()=>{if(!o.current||!d.current||i.current)return;i.current=!0,d.current.animate(No,So);o.current.animate(Ro,So).onfinish=s},[s]);return we(()=>{d.current?.animate(Po,So),o.current?.animate(To,So)},[]),we(()=>{e.close&&l()},[e.close,l]),lt("div",{className:"xendit-dialog-backdrop",ref:d,children:lt("div",{className:"xendit-dialog",ref:o,children:[lt("div",{className:"xendit-dialog-header xendit-text-16 xendit-text-semibold",children:[t,lt("button",{"aria-label":"Close",onClick:l,children:lt(ct,{name:"x",size:24})})]}),lt("div",{className:"xendit-dialog-body",children:a})]})})},So={duration:200,easing:"ease-in-out",fill:"forwards"},Po=[{backgroundColor:"rgba(0, 0, 0, 0)"},{backgroundColor:"rgba(0, 0, 0, 0.5)"}],No=Po.slice().reverse(),To=[{opacity:0,transform:"scale(0.9) translateY(-20px)"},{opacity:1,transform:""}],Ro=To.slice().reverse();function Ao(e){const{sdk:t,title:n,onClose:a}=e,r=ke(null);return we(()=>{const e=t.createActionContainerComponent(ft);return r.current?.replaceChildren(e),()=>{t.destroyComponent(e)}},[t]),lt(Eo,{title:n,onClose:a,close:e.close,children:lt("div",{className:"xendit-default-action-container",ref:r})})}class ActionCompletedBehavior{bb;constructor(e){this.bb=e}enter(){}}class ActionRedirectBehavior{bb;url;constructor(e,t){this.bb=e,this.url=t}enter(){this.bb.dispatchEvent(new XenditWillRedirectEvent),window.location.href=this.url}}class ActionIframeBehavior{bb;url;cleanupFn=null;constructor(e,t){this.bb=e,this.url=t}enter(){this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainerWithIframe(this.url,this.bb.mock,e=>{this.cleanupActionContainer(!1),this.updateMocksOnIframeCompletion("success"===e.mockStatus),this.bb.actionCompleted=!0,this.bb.pollImmediatelyRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)})}updateMocksOnIframeCompletion(e){Dt(this.bb.world?.paymentEntity),this.bb.mock&&(e?this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(_o(this.bb.world.session,this.bb.world.paymentEntity))):this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent($o(this.bb.world.session,this.bb.world.paymentEntity))))}cleanupActionContainer(e){this.cleanupFn&&(this.cleanupFn(e),this.cleanupFn=null)}ensureHasActionContainer(){if(this.bb.sdk[ft].liveComponents.actionContainer)return()=>{this.emptyActionContainer()};let e=!1,t=!1;const n=document.createElement("div");n.setAttribute("class","xendit-default-action-container");const a={sdk:this.bb.sdk,title:"Complete your payment",onClose:()=>{e=!0,K(null,n),n.remove(),t||this.bb.sdk.abortSubmission()}};return K(b(Ao,a),n),document.body.appendChild(n),r=>{r||(t=!0),e||K(b(Ao,{...a,close:!0}),n)}}emptyActionContainer(){const e=this.bb.sdk[ft].liveComponents.actionContainer;e&&K(null,e)}populateActionContainerWithIframe(e,t,n){const a=this.bb.sdk[ft].liveComponents.actionContainer;if(!a)throw new Error("Trying to populate action container, but it is missing; A default action container should have been created. This is a bug, please contact support.");K(b(ko,{url:e,mock:t,onIframeComplete:n}),a)}exit(){this.cleanupActionContainer(!1),this.emptyActionContainer()}}class CardInfoBehavior{bb;cardDetailsRequest=null;constructor(e){this.bb=e}enter(){this.lookupCardDetails()}update(){this.lookupCardDetails()}exit(){this.abortLookupCardDetails()}abortLookupCardDetails(){this.cardDetailsRequest&&(this.cardDetailsRequest.abortController.abort(new AbortError),this.cardDetailsRequest=null)}lookupCardDetails(){const e=function(e){const t=zt("card_details.card_number",e);return"string"!=typeof t?null:t}(this.bb.channelProperties);if(!e)return;if(this.cardDetailsRequest?.cardNumber===e)return;if(this.bb.world?.cardDetails?.cardNumber===e)return;this.cardDetailsRequest&&this.abortLookupCardDetails();const t=new AbortController,n=jt(300,t.signal).then(()=>{if(this.bb.mock)return{schemes:["VISA"],country_codes:["ID"],require_billing_information:!1};{const n=e.split("-").slice(0,6).join("-");return ao(this.bb.sdkKey,{card_number:n},this.bb.sdkKey.sessionAuthKey,void 0,t.signal)}}).then(t=>{this.bb.dispatchEvent(new InternalUpdateWorldState({cardDetails:{cardNumber:e,details:t}}))}).catch(e=>{if(!Bt(e))throw e});this.cardDetailsRequest={cardNumber:e,promise:n,abortController:t}}}class ChannelValidBehavior{bb;lastChannelCode=null;constructor(e){this.bb=e}enter(){this.sendReadyEventIfChanged()}update(){this.sendReadyEventIfChanged()}sendReadyEventIfChanged(){const e=this.bb.channel?.channel_code??null;e&&e!==this.lastChannelCode&&(this.bb.dispatchEvent(new XenditReadyEvent(e)),this.lastChannelCode=e)}exit(){this.bb.dispatchEvent(new XenditNotReadyEvent)}}class ChannelInvalidBehavior{bb;channelCode;constructor(e,t){this.bb=e,this.channelCode=t}enter(){}}class PollWorker{sdkKey;sdk;sessionTokenRequestId;onPollResult;started=!1;stopped=!1;constructor(e,t,n,a){this.sdkKey=e,this.sdk=t,this.sessionTokenRequestId=n,this.onPollResult=a}async start(){if(this.stopped)throw new Error("PollWorker has been stopped, make a new instance instead of calling start again");this.started=!0;for await(const e of async function*(e,t,n=2){yield 0;let a=e;for(let e=1;e<t;e++)a*=n,await Ft(a),yield e}(5e3,100,1.06)){if(this.stopped)return;let e;if(this.sdk.isMock()){if(!(this.sdk instanceof XenditComponentsTest&&this.sdk.nextMockUpdate))continue;await Ft(Mt),e=this.sdk.nextMockUpdate,this.sdk.nextMockUpdate=null}else try{e=await no(this.sdkKey,this.sdkKey.sessionAuthKey,this.sessionTokenRequestId)}catch(e){continue}if(this.stopped)return;if(!e.session)throw new Error("Session is not defined");let t=null;e.payment_token?t=uo(e.payment_token):e.payment_request&&(t=uo(e.payment_request)),this.onPollResult(e,t),await Ft(1)}}isPolling(){return this.started&&!this.stopped}stop(){this.started=!1,this.stopped=!0}}class PePendingBehavior{bb;pollWorker;constructor(e){this.bb=e,this.pollWorker=new PollWorker(this.bb.sdkKey,this.bb.sdk,this.bb.world?.sessionTokenRequestId??null,this.onPollResult)}enter(){if(this.bb.mock)switch(Dt(this.bb.world?.paymentEntity),this.bb.world?.paymentEntity.entity.status){case"ACTIVE":case"AUTHORIZED":case"SUCCEEDED":this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(_o(this.bb.world.session,this.bb.world.paymentEntity)));break;case"FAILED":case"CANCELED":case"EXPIRED":this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent($o(this.bb.world.session,this.bb.world.paymentEntity)))}this.pollWorker.start()}exit(){this.pollWorker.stop()}onPollResult=(e,t)=>{this.bb.dispatchEvent(new InternalUpdateWorldState({session:e.session,paymentEntity:t??void 0,succeededChannel:e.succeeded_channel??null}))}}class PeRequiresActionBehavior{bb;pollWorker=null;canCreateActionContainer=!0;constructor(e){this.bb=e,this.resetPolling()}enter(){this.bb.dispatchEvent(new XenditActionBeginEvent),this.canCreateActionContainer=!1,this.pollWorker?.start()}update(){this.bb.pollImmediatelyRequested&&(this.bb.pollImmediatelyRequested=!1,this.resetPolling())}exit(){this.pollWorker?.stop(),this.bb.dispatchEvent(new XenditActionEndEvent),this.bb.actionCompleted=!1}onPollResult=(e,t)=>{this.bb.dispatchEvent(new InternalUpdateWorldState({session:e.session,paymentEntity:t??void 0,succeededChannel:e.succeeded_channel??null}))};resetPolling(){const e=this.pollWorker?.isPolling()??!1;this.pollWorker?.stop(),this.pollWorker=new PollWorker(this.bb.sdkKey,this.bb.sdk,this.bb.world?.sessionTokenRequestId??null,this.onPollResult),e&&this.pollWorker.start()}}class PeFailedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.submissionRequested=!1,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}class SdkLoadingBehavior{bb;constructor(e){this.bb=e}enter(){}}class SdkActiveBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditInitEvent),this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}exit(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}}class SdkFatalErrorBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditFatalErrorEvent(this.bb.sdkFatalErrorMessage??"Unknown error"))}}class SessionActiveBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}exit(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}}class SessionCompletedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditSessionCompleteEvent)}}class SessionFailedBehavior{bb;constructor(e){this.bb=e}enter(){Dt(this.bb.world?.session),this.bb.dispatchEvent(new XenditSessionExpiredOrCanceledEvent)}}class SimulatePaymentBehavior{bb;exited=!1;simulationRequest=null;constructor(e){this.bb=e}enter(){this.simulatePayment()}exit(){this.exited=!0,this.bb.simulatePaymentRequested=!1,this.abortSimulation()}abortSimulation(){this.simulationRequest&&(this.simulationRequest.abortController.abort(new AbortError),this.simulationRequest=null)}simulatePayment(){if(this.simulationRequest&&this.abortSimulation(),!this.bb.channel)throw new Error("Channel is missing");if(!this.bb.world?.paymentEntity)throw new Error("Payment entity is missing");if(this.bb.world?.paymentEntity?.type!==co.PaymentRequest)throw new Error("Payment entity is not a payment request");const e=this.bb.world?.paymentEntity.id,t=this.bb.channel?.channel_code;if(this.bb.mock)throw new Error("Simulate payment not supported for mock mode");const n=new AbortController,a=to(this.bb.sdkKey,{channel_code:t},{sessionAuthKey:this.bb.sdkKey.sessionAuthKey,paymentRequestId:e},void 0,n.signal).then(()=>{this.bb.actionCompleted=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}).catch(e=>{Bt(e)||this.exited||(this.bb.simulatePaymentRequested=!1,console.error("Simulate Payment failed:",e))});this.simulationRequest={promise:a,abortController:n}}}class SubmissionBehavior{bb;exited=!1;submission=null;submissionError=null;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditSubmissionBeginEvent),this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(null)),this.submit()}exit(){this.exited=!0,Dt(this.bb.world?.session);const e=this.bb.sdk.t,t=this.bb.world.paymentEntity;if("COMPLETED"!==this.bb.world.session.status&&t){switch(t.type){case co.PaymentRequest:this.bb.dispatchEvent(new XenditPaymentRequestDiscardedEvent(t.id));break;case co.PaymentToken:this.bb.dispatchEvent(new XenditPaymentTokenDiscardedEvent(t.id))}this.bb.dispatchEvent(new InternalUpdateWorldState({paymentEntity:null,sessionTokenRequestId:null}))}let n,a,r;"ACTIVE"!==this.bb.world.session.status?n=`SESSION_${this.bb.world.session.status}`:!t||"FAILED"!==t.entity.status&&"CANCELED"!==t.entity.status&&"EXPIRED"!==t.entity.status?this.submissionError?(n="REQUEST_FAILED",this.submissionError instanceof NetworkError?(a=[this.submissionError.errorResponse.error_content?.title,this.submissionError.errorResponse.error_content?.message_1,this.submissionError.errorResponse.error_content?.message_2].filter(e=>void 0!==e),r={type:"ERROR",code:this.submissionError.errorResponse.error_code||"UNKNOWN"}):(a=function(e){return[e("default_error.title"),e("default_error.message_1"),e("default_error.message_2")]}(e),r={type:"NETWORK_ERROR",code:"NETWORK_ERROR"})):n=this.submission?"REQUEST_ABORTED":"ACTION_ABORTED":(n=`PAYMENT_${t.type}_${t.entity.status}`,a=function(e,t,n,a){const r=e(ho(t,n,"title")),i=a?e(function(e){return`failure_code.${e.toLowerCase()}`}(a),e("failure_code_unknown",{failureCode:a})):e(ho(t,n,"subtext"));return[r,i]}(e,t.type,t.entity.status,t.entity.failure_code),r={type:"FAILURE",code:t.entity.failure_code??"UNKNOWN"}),this.bb.dispatchEvent(new XenditSubmissionEndEvent(n,a,r)),this.submission&&(this.submission?.abortController.abort(new AbortError),this.submission=null),this.bb.submissionRequested=!1,this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}submit(){if(!this.bb.world?.session||!this.bb.channel)throw new Error("Session object missing");const e="OPTIONAL"===this.bb.world.session.allow_save_payment_method&&this.bb.channel?.allow_save,t=this.bb.world?.session?.session_type,n=this.bb.channel.channel_code,a=this.bb.channel._mock_action_type,r=this.bb.channelProperties??{},i=new AbortController,o=async function(e,t,n,a,r,i,o,d){let s;if(t)switch(n){case"PAY":await jt(Mt,o.signal),s=yo(a,r);break;case"SAVE":await jt(Mt,o.signal),s=bo(a,r);break;default:throw new Error(`The session type ${n} is not supported.`)}else switch(n){case"PAY":s=await eo(e,{session_id:e.sessionAuthKey,channel_code:a,channel_properties:i,save_payment_method:d},null,null,o.signal);break;case"SAVE":s=await Qi(e,{session_id:e.sessionAuthKey,channel_code:a,channel_properties:i},null,null,o.signal);break;default:throw new Error(`The session type ${n} is not supported.`)}return uo(s)}(this.bb.sdkKey,this.bb.mock,t,n,a,r,i,e?this.bb.savePaymentMethod??!1:void 0).then(e=>{switch(this.submission=null,e.type){case co.PaymentRequest:this.bb.dispatchEvent(new XenditPaymentRequestCreatedEvent(e.id));break;case co.PaymentToken:this.bb.dispatchEvent(new XenditPaymentTokenCreatedEvent(e.id))}this.bb.dispatchEvent(new InternalUpdateWorldState({paymentEntity:e,sessionTokenRequestId:e.entity.session_token_request_id}))}).catch(e=>{Bt(e)||(console.error("Submission failed:",e),this.exited||(this.bb.submissionRequested=!1,this.submissionError=e,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)))});this.submission={abortController:i,promise:o}}}function Oo(e){switch(e.sdkStatus){case"LOADING":return ro(SdkLoadingBehavior);case"ACTIVE":if(!e.world?.session)throw new Error("Session is required when SDK is active");return ro(SdkActiveBehavior,"active",function(e){if(!e.world?.session)throw new Error("Session is required to create behavior tree for session");switch(e.world.session.status){case"ACTIVE":return ro(SessionActiveBehavior,"active",e.submissionRequested?function(e){if(!e.world)throw new Error("SDK not initialized in behaviorTreeForSubmission");return ro(SubmissionBehavior,"submission",e.world.paymentEntity&&null!==e.world.sessionTokenRequestId?function(e){if(!e.world?.paymentEntity)throw new Error("Payment entity is required to create behavior tree for payment entity");switch(e.world.paymentEntity.entity.status){case"PENDING":return ro(PePendingBehavior);case"REQUIRES_ACTION":return ro(PeRequiresActionBehavior,e.world.paymentEntity.id,function(e){if(!e.world?.paymentEntity)throw new Error("Payment entity is missing");if(!e.world.paymentEntity.entity.actions.length)throw new Error("No actions available while in ACTION_REQUIRED state");if(e.actionCompleted)return ro(ActionCompletedBehavior);if(e.simulatePaymentRequested)return ro(SimulatePaymentBehavior);const t=qt(e.world.paymentEntity.entity.actions);switch(t.type){case"REDIRECT_CUSTOMER":switch(t.descriptor){case"WEB_URL":return function(e){return"REDIRECT_CUSTOMER"===e.type&&!1!==e.iframe_capable}(t)?ro(ActionIframeBehavior,t.value):ro(ActionRedirectBehavior,t.value);case"DEEPLINK_URL":case"WEB_GOOGLE_PAYLINK":throw new Error(`Unsupported action type ${t.type} ${t.descriptor}`)}break;case"PRESENT_TO_CUSTOMER":switch(t.descriptor){case"QR_STRING":case"PAYMENT_CODE":case"VIRTUAL_ACCOUNT_NUMBER":throw new Error(`Unsupported action type ${t.type} ${t.descriptor}`)}break;case"API_POST_REQUEST":switch(t.descriptor){case"CAPTURE_PAYMENT":case"VALIDATE_OTP":case"RESEND_OTP":throw new Error(`Unsupported action type ${t.type} ${t.descriptor}`)}}throw new Error(`Unknown action type: ${t.type} ${t.descriptor}`)}(e));case"FAILED":case"EXPIRED":case"CANCELED":return ro(PeFailedBehavior);case"ACCEPTING_PAYMENTS":throw new Error("Status ACCEPTING_PAYMENTS should not happen");case"AUTHORIZED":case"ACTIVE":case"SUCCEEDED":return ro(PePendingBehavior,e.world.paymentEntity.id);default:throw e.world.paymentEntity.entity,new Error(`Unknown payment entity status: ${e.world.paymentEntity.entity.status}`)}}(e):void 0)}(e):function(e){if(!e.channel||!e.world?.session)return;const t=e.world.cardDetails.details?.require_billing_information??!1,n=function(e,t,n,a){n||(n={});for(const r of Bi(e,t.form,a))if(Ci(r,n))return!1;return!0}(e.world.session.session_type,e.channel,e.channelProperties??null,t),a=ro(n?ChannelValidBehavior:ChannelInvalidBehavior);return"CARDS"===e.channel.channel_code?ro(CardInfoBehavior,"card-info",a):a}(e));case"COMPLETED":return ro(SessionCompletedBehavior);case"EXPIRED":case"CANCELED":return ro(SessionFailedBehavior,e.world.session.status);default:throw e.world.session.status,new Error(`Unknown session status: ${e.world.session.status}`)}}(e));case"FATAL_ERROR":return ro(SdkFatalErrorBehavior);default:throw e.sdkStatus,new Error(`Unknown SDK status: ${e.sdkStatus}`)}}const Io={IDR:"id",VND:"vi",BRL:"pt-BR",RUB:"ru",CZK:"cs",RON:"ro",UAH:"uk",CLP:"es-CL",COP:"es-CO",UYU:"es-UY",ARS:"es-AR",INR:"hi-IN",NPR:"hi-IN",LKR:"hi-IN",BDT:"hi-IN"},Lo={USD:"US$",CAD:"CA$",EUR:"€",AFN:"؋",ALL:"Lek",AMD:"֏",ARS:"AR$",AUD:"AU$",AZN:"₼",BAM:"KM",BDT:"৳",BIF:"FBu",BND:"BN$",BOB:"Bs",BRL:"R$",BWP:"P",BYN:"Br",BZD:"BZ$",CDF:"FrCD",CHF:"CHF",CLP:"CL$",CNY:"CN¥",COP:"CO$",CRC:"₡",CVE:"CV$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",ERN:"Nfk",ETB:"Br",GBP:"£",GEL:"₾",GHS:"GH₵",GNF:"FG",GTQ:"Q",HKD:"HK$",HNL:"L",HUF:"Ft",IDR:"Rp",ILS:"₪",INR:"₹",IRR:"IRR",ISK:"kr",JMD:"J$",JPY:"¥",KES:"Ksh",KHR:"៛",KMF:"FC",KRW:"₩",KZT:"₸",LKR:"SL Re",MDL:"lei",MGA:"MGA",MKD:"MKD",MMK:"K",MOP:"MOP$",MUR:"₨",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"रु",NZD:"NZ$",PAB:"B/.",PEN:"S/.",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"₲",RON:"RON",RSD:"RSD",RUB:"₽",RWF:"FR",SDG:"SDG",SEK:"kr",SGD:"S$",SOS:"Ssh",THB:"฿",TOP:"T$",TRY:"TL",TTD:"TT$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",UYU:"$U",UZS:"сум",VND:"₫",XAF:"FCFA",XOF:"CFA",ZAR:"R",ZMW:"K",ZWL:"ZWL$"},Mo={ALL:"1 $",BAM:"1 $",BYN:"1 $",CZK:"1 $",DKK:"1 $",GEL:"1 $",HUF:"1 $",ISK:"1 $",IRR:"1 $",KHR:"1$",MDL:"1 $",MKD:"1 $",NOK:"1 $",PLN:"1 $",RON:"1 $",RSD:"1 $",RUB:"1$",SEK:"1 $",UZS:"1 $",VND:"1$"},Do={BHD:3,JOD:3,KWD:3,LYD:3,OMR:3,TND:3};class XenditComponents extends EventTarget{t=e=>{throw new Error("Localization used before initialization; this is a bug.")};[ft];constructor(e){if(super(),"undefined"==typeof window||"undefined"==typeof document)throw new Error("XenditComponents can only be instantiated in a browser");const t=function(e){if(!e)throw new Error("The componentsSdkKey option is missing; check the constructor parameters.");const t=e.split("-");if(t.length<4||t[2]!==Kt&&null===Gt(t[2]))throw new Error("The componentsSdkKey option has the wrong format. Ensure you pass the value returned from the `components_sdk_key` property of the `POST /sessions` response.");return{sessionAuthKey:[t[0],t[1]].join("-"),hostId:t[2],publicKey:t[3],signature:t[4]}}(e.componentsSdkKey);this[ft]={sdkKey:t,options:e,worldState:null,liveComponents:{channelPicker:null,paymentChannels:new Map,actionContainer:null},behaviorTree:new BehaviorTree(Oo,{sdk:this,sdkKey:t,mock:this.isMock(),sdkStatus:"LOADING",sdkFatalErrorMessage:null,channel:null,channelProperties:null,dispatchEvent:this.dispatchEvent.bind(this),world:null,submissionRequested:!1,simulatePaymentRequested:!1,actionCompleted:!1,pollImmediatelyRequested:!1,savePaymentMethod:null}),currentChannelCode:null},nn(this),this.behaviorTreeUpdate(),this.addEventListener(InternalUpdateWorldState.type,this.onUpdateWorldState.bind(this)),this.addEventListener(InternalBehaviorTreeUpdateEvent.type,this.behaviorTreeUpdate.bind(this));let n=!1;this.addEventListener(InternalNeedsRerenderEvent.type,()=>{n||(n=!0,queueMicrotask(()=>{n=!1,this.rerenderAllComponents(),this.syncInertAttribute()}))}),this.initializeAsync()}async initializeAsync(){let e;try{e=await Ji(this[ft].sdkKey,this[ft].sdkKey.sessionAuthKey),e.channels=e.channels.filter(e=>an[e.channel_code])}catch(e){return this[ft].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[ft].behaviorTree.bb.sdkFatalErrorMessage=Xt(e),void this.behaviorTreeUpdate()}this.dispatchEvent(new InternalUpdateWorldState({business:e.business,customer:e.customer,session:e.session,channels:e.channels,channelUiGroups:e.channel_ui_groups,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null,cardDetails:{cardNumber:null,details:null}}))}assertInitialized(){if(!this[ft].worldState)throw new Error("The session data is not loaded. Listen for the `init` event. Only `createChannelPickerComponent` can be called before initialization.")}isMock(){return!1}findChannel(e){this.assertInitialized();return this[ft].worldState.channels.find(t=>t.channel_code===e)??null}onUpdateWorldState(e){const t=e.data;this[ft].worldState=function(e,t){const n={...e};for(const e of Object.keys(t)){const a=t[e];void 0!==a&&(n[e]=a)}return n}(this[ft].worldState??{},t);const n=this[ft].worldState.session.locale,a=(e=>{const t=$i();return t.init({lng:e,fallbackLng:"en",supportedLngs:["en","id","th","vi"],debug:!1,defaultNS:"session",interpolation:{escapeValue:!1},resources:{en:gi,id:yi,th:bi,vi:vi}}),t})(n);this.t=a.getFixedT(n,"session"),this.behaviorTreeUpdate(),this.rerenderAllComponents()}behaviorTreeUpdate(){const e=this[ft].behaviorTree.bb;"LOADING"===e.sdkStatus&&this[ft].worldState&&(e.sdkStatus="ACTIVE"),e.world=this[ft].worldState;const t=this[ft].currentChannelCode?this[ft].liveComponents.paymentChannels.get(this[ft].currentChannelCode):null;e.channel=t?en(t.channel[ft],t.savePaymentMethod):null,e.channelProperties=t?t.channelProperties:null,e.savePaymentMethod=t?t.savePaymentMethod:null;try{this[ft].behaviorTree.update()}catch(e){this[ft].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[ft].behaviorTree.bb.sdkFatalErrorMessage=Xt(e),this[ft].behaviorTree.update()}}getSdkStatus(){return this[ft].behaviorTree.bb.sdkStatus}rerenderAllComponents(){this.renderChannelPicker();for(const e of this[ft].liveComponents.paymentChannels.keys())this.renderPaymentChannel(e)}getSession(){return this.assertInitialized(),on(this[ft].worldState.session)}getCustomer(){return this.assertInitialized(),this[ft].worldState.customer?(Ut((e=this[ft].worldState.customer).type,"INDIVIDUAL"),Dt(e.individual_detail),{id:e.id,type:e.type,email:e.email??void 0,mobileNumber:e.mobile_number??void 0,individualDetail:{givenNames:e.individual_detail.given_names??void 0,surname:e.individual_detail.surname??void 0}}):null;var e}getActiveChannelGroups(e){return this.assertInitialized(),function(e,t,n){const a=cn(t),r=hn(e,n);return t.filter(e=>r[e.id]?.length).map(e=>dn(e,r,a,n))}(this[ft].worldState.channels,this[ft].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[ft].worldState.session,pairChannels:pn(this[ft].worldState.channels)})}getActiveChannels(e){return this.assertInitialized(),function(e,t,n){const a=cn(t),r=hn(e,n);return e.filter(e=>un(e,n)).map(e=>ln(e,r,a,n))}(this[ft].worldState.channels,this[ft].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[ft].worldState.session,pairChannels:pn(this[ft].worldState.channels)})}createChannelPickerComponent(){this[ft].liveComponents.channelPicker&&this.destroyComponent(this[ft].liveComponents.channelPicker);const e=document.createElement("xendit-channel-picker");return this[ft].liveComponents.channelPicker=e,this[ft].worldState&&this.renderChannelPicker(),this.setupUiEventsForChannelPicker(e),e}renderChannelPicker(){this.assertInitialized();const e=this[ft].liveComponents.channelPicker;e&&K(b(Lt,{data:this[ft].worldState,sdk:this,children:b(_n,{})}),e)}setupUiEventsForChannelPicker(e){e.addEventListener(XenditClearCurrentChannelEvent.type,e=>{this.assertInitialized();const t=e,n=this[ft].currentChannelCode;if(!n)return;const a=this[ft].worldState.channels.find(e=>e.channel_code===n);a&&a.ui_group===t.uiGroup&&this.setCurrentChannel(null)})}createChannelComponent(e,t=!0){if(this.assertInitialized(),!tn(this[ft].worldState.session,e[ft][0]))throw new Error("Cannot create channel component: `session.amount` is outside of the channel's min/max amount.");const n=e[ft][0].channel_code;t&&(this[ft].currentChannelCode=n);const a=this[ft].liveComponents.paymentChannels.get(n);let r,i={current:null};return a?(r=a.element,i=a.channelFormRef):(r=document.createElement("xendit-payment-channel"),r.setAttribute("data-channel-code",n),r.setAttribute("inert",""),this.setupUiEventsForPaymentChannel(r),this[ft].liveComponents.paymentChannels.set(n,{element:r,channel:e,channelProperties:null,channelFormRef:i,savePaymentMethod:!1})),this.renderPaymentChannel(n),t&&(this.behaviorTreeUpdate(),this.syncInertAttribute()),this.dispatchEvent(new InternalNeedsRerenderEvent),r}renderPaymentChannel(e){this.assertInitialized();const t=this[ft].liveComponents.paymentChannels.get(e);if(!t)return;const n=t.channel;K(b(Lt,{data:this[ft].worldState,sdk:this,children:b(Yi,{channels:n[ft],savePaymentMethod:t.savePaymentMethod,formRef:t.channelFormRef})}),t.element)}getCurrentChannel(){const e=this[ft].currentChannelCode;return e?this.getActiveChannels().find(t=>{if(t.channelCode===e||Array.isArray(t.channelCode)&&t.channelCode.includes(e))return!0})??null:null}setCurrentChannel(e){const t=this[ft].currentChannelCode,n=e?.[ft][0].channel_code??null;if(t===n)return;this[ft].currentChannelCode=n;let a=null;e&&n&&(a=this[ft].liveComponents.paymentChannels.get(n)??null,a||(this.createChannelComponent(e,!1),a=this[ft].liveComponents.paymentChannels.get(n)??null)),this.behaviorTreeUpdate(),this.syncInertAttribute(),this.renderChannelPicker()}syncInertAttribute(){const e=this[ft].behaviorTree.bb.submissionRequested,t=this[ft].liveComponents.paymentChannels;for(const[n,a]of t){(Array.isArray(a.channel.channelCode)?a.channel.channelCode[0]:a.channel.channelCode)!==this[ft].currentChannelCode||e?a.element.setAttribute("inert",""):a.element.hasAttribute("inert")&&a.element.removeAttribute("inert")}}setupUiEventsForPaymentChannel(e){e.addEventListener(XenditChannelPropertiesChangedEvent.type,e=>{const t=e,n=t.channel,a=this[ft].liveComponents.paymentChannels.get(n);a&&(a.channelProperties=t.channelProperties,this.behaviorTreeUpdate())}),e.addEventListener(XenditSavePaymentMethodChangedEvent.type,e=>{const t=e,n=t.channel,a=this[ft].liveComponents.paymentChannels.get(n);a&&(a.savePaymentMethod=t.savePaymentMethod,this.behaviorTreeUpdate(),this.rerenderAllComponents())})}showValidationErrors(){if(!this[ft].behaviorTree.findBehavior(ChannelInvalidBehavior))return;const e=this[ft].currentChannelCode;if(!e)return;const t=this[ft].liveComponents.paymentChannels.get(e);if(!t)throw new Error("Current channel is set but component is missing; this is a bug, please contact support.");const n=t.channelFormRef.current;n?.setAllFieldsTouched()}createActionContainerComponent(e){this.assertInitialized(),this[ft].liveComponents.actionContainer&&this.destroyComponent(this[ft].liveComponents.actionContainer);const t=this[ft].behaviorTree.findBehavior(PeRequiresActionBehavior);if(e!==ft&&t&&!t.canCreateActionContainer)throw new Error("Unable to create action container; there is an action in progress. Create an action before or during the `action-begin` event.");const n=document.createElement("xendit-action-container");return this[ft].liveComponents.actionContainer=n,n}destroyComponent(e){if(!e.tagName.startsWith("XENDIT-"))throw new Error("Unable to destroy component; only elements created by this SDK can be destroyed.");if(this[ft].liveComponents.channelPicker===e)return this[ft].liveComponents.channelPicker=null,K(null,e),void e.remove();for(const[t,n]of this[ft].liveComponents.paymentChannels)if(n.element===e)return this[ft].liveComponents.paymentChannels.delete(t),this[ft].currentChannelCode===t&&this.setCurrentChannel(null),K(null,e),void e.remove();if(this[ft].liveComponents.actionContainer===e)return this[ft].liveComponents.actionContainer=null,K(null,e),void e.remove();throw new Error("Unable to destroy component; component not found. It may have already been destroyed.")}submit(){this.assertInitialized();if(!this[ft].behaviorTree.findBehavior(SessionActiveBehavior))throw new Error("Unable to submit; the session is not in the active state. Listen to the `session-complete` and `session-expired-or-canceled` events and display success or failure states accordingly.");const e=this[ft].currentChannelCode;if(!e)throw new Error("Unable to submit; there is no current payment channel. Create a payment component with `createChannelComponent` or make an existing one active with `setCurrentChannel`.");if(!this[ft].liveComponents.paymentChannels.get(e))throw new Error("Current channel is set but component is missing; this is a bug, please contact support.");this.showValidationErrors();if(this[ft].behaviorTree.findBehavior(ChannelInvalidBehavior))throw new Error("Unable to submit; the form for the current channel has errors. Listen to the `submission-ready` and `submission-not-ready` events, do not allow submission while in the not-ready state.");if(!this[ft].behaviorTree.findBehavior(ChannelValidBehavior))throw new Error("Unable to submit; the SDK is not in a valid state for submission. Listen to the `submission-ready` and `submission-not-ready` events, do not allow submission while in the not-ready state.");this[ft].behaviorTree.bb.submissionRequested=!0,this.behaviorTreeUpdate(),this.syncInertAttribute()}abortSubmission(){this.assertInitialized();this[ft].behaviorTree.findBehavior(SubmissionBehavior)&&(this[ft].behaviorTree.bb.submissionRequested=!1,this.behaviorTreeUpdate())}simulatePayment(){if(this.assertInitialized(),"PAY"!==this[ft].worldState.session.session_type)throw new Error('Unable to simulate payment, the session type is not "PAY".');if(!this[ft].behaviorTree.findBehavior(PeRequiresActionBehavior))throw new Error("Unable to simulate payment; there is no action in progress. You can simulate payments any time between the `action-begin` and `action-end` events.");const e=this[ft].worldState.paymentEntity;if(!e)throw new Error("The PeRequiresActionBehavior is present but there is no payment entity. This is a bug, please contact support.");const t=this.findChannel(e.entity.channel_code);if(!t)throw new Error("Channel not found; this is a bug, please contact support.");if(!function(e){switch(e.pm_type){case"QR_CODE":case"VIRTUAL_ACCOUNT":case"OVER_THE_COUNTER":return!0;default:return!1}}(t))throw new Error("Unable to simulate payment; the payment channel does not support simulation.");this[ft].behaviorTree.bb.simulatePaymentRequested=!0,this.behaviorTreeUpdate()}getState(){const e=this[ft].currentChannelCode,t=this[ft].liveComponents.paymentChannels.get(e??"");return{channelCode:e,channelProperties:t?.channelProperties||null,behaviorTree:this[ft].behaviorTree}}addEventListener(e,t,n){return super.addEventListener(e,t,n)}removeEventListener(e,t,n){return super.removeEventListener(e,t,n)}static amountFormat(e,t){return function(e,t){let n="";const a=e<0,r=Io[t]??"en",i=Do[t]??2;if(n=new Intl.NumberFormat(r,{style:"decimal",minimumFractionDigits:i,maximumFractionDigits:20}).format(Math.abs(e)),n=n.replace(/(\.|,)000?$/,""),Lo[t]){const e=Lo[t]??t;n=(Mo[t]??"$1").replace("$",e).replace("1",n)}else n=t+" "+n;return a&&(n="-"+n),n}(e,t)}}class XenditComponentsTest extends XenditComponents{nextMockUpdate=null;constructor(e){super({...e,componentsSdkKey:po()}),this.addEventListener(InternalScheduleMockUpdateEvent.type,this.setNextMockUpdate.bind(this))}async initializeAsync(){await Ft(Mt);const e=(await Promise.resolve().then(function(){return wo})).makeTestBffData();this.dispatchEvent(new InternalUpdateWorldState({business:e.business,customer:e.customer,session:e.session,channels:e.channels,channelUiGroups:e.channel_ui_groups,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null,cardDetails:{cardNumber:null,details:null}}))}isMock(){return!0}setNextMockUpdate(e){const t=e;this.nextMockUpdate=t.mockData}}"undefined"==typeof window||"undefined"==typeof document||(pt||(pt=!0,n.debounceRendering=e=>queueMicrotask(e)),function(){const e=document.createElement("style");e.textContent='@font-face {\n font-family: "Proxima Nova";\n font-style: normal;\n font-weight: 300;\n font-display: swap;\n src:\n local("Proxima Nova Light"),\n local("Proxima Nova"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_light.otf")\n format("opentype");\n}\n\n@font-face {\n font-family: "Proxima Nova";\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src:\n local("Proximanova Regular"),\n local("Proxima Nova"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_regular.ttf")\n format("truetype");\n}\n\n@font-face {\n font-family: "Proxima Nova";\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src:\n local("Proxima Nova Bold"),\n local("Proxima Nova"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_bold.otf")\n format("opentype"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_boldit.otf")\n format("opentype"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_extrabold.otf")\n format("opentype");\n}\n\n@font-face {\n font-family: "Proxima Nova";\n font-style: normal;\n font-weight: 900;\n font-display: swap;\n src:\n local("Proxima Nova Black"),\n local("Proxima Nova"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_black.otf")\n format("opentype"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_blackit.otf")\n format("opentype"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_black.ttf")\n format("truetype");\n}\n\n/* variables */\nhtml {\n --xendit-font-family: "Proxima Nova", sans-serif;\n --xendit-color-primary: #1762ee;\n --xendit-color-text: #252525;\n --xendit-color-text-secondary: #585858;\n --xendit-color-text-placeholder: #7d7d7d;\n --xendit-color-disabled: #f7f7f7;\n --xendit-color-danger: #d1414d;\n --xendit-color-border: #f3f3f3;\n --xendit-color-background: #ffffff;\n --xendit-focus-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n --xendit-animation-duration: 0.3s;\n --xendit-animation-ease: ease-in-out;\n --xendit-radius-1: 8px;\n --xendit-z-index-focus: 2;\n\n /* Browser-specific border collapse margins */\n --xendit-border-collapse-offset: -0.5px; /* Default for Chrome/Edge */\n --xendit-border-collapse-webkit-gecko: -1.5px; /* Fix Safari and Firefox subpixel rendering */\n}\n\n/* Set default font for root components */\nxendit-channel-picker,\nxendit-action-container,\nxendit-payment-channel {\n display: block;\n unicode-bidi: isolate;\n font-family: var(--xendit-font-family, sans-serif);\n color: var(--xendit-color-text);\n}\n\n.xendit-default-action-container {\n font-family: var(--xendit-font-family, sans-serif);\n}\n\nxendit-action-container {\n background-color: var(--xendit-color-background);\n flex: 1; /* Action container usually wants to stretch to fit, assuming the parent is a flexbox. */\n}\n\nxendit-payment-channel button,\nxendit-payment-channel textarea,\nxendit-payment-channel select,\nxendit-payment-channel input,\nxendit-payment-channel input::placeholder {\n font-family: inherit;\n}\n\nxendit-payment-channel input::placeholder,\nxendit-payment-channel textarea::placeholder,\nxendit-payment-channel select::placeholder {\n color: var(--xendit-color-text-placeholder);\n}\n\n/* Reusable typography classes */\n.xendit-text-12 {\n font-size: 12px;\n line-height: 16px;\n letter-spacing: -0.01px;\n}\n\n.xendit-text-14 {\n font-size: 14px;\n line-height: 16px;\n letter-spacing: -0.09px;\n}\n\n.xendit-text-16 {\n font-size: 16px;\n line-height: 16px;\n letter-spacing: -0.09px;\n}\n\n.xendit-text-12,\n.xendit-text-14,\n.xendit-text-16 {\n font-weight: 400;\n}\n\n.xendit-text-semibold {\n font-weight: 600;\n}\n\n.xendit-text-bold {\n font-weight: 700;\n}\n\n.xendit-text-secondary {\n color: var(--xendit-color-text-secondary);\n}\n\n/* Accordion component */\n\n.xendit-accordion {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-accordion-item {\n border: 1px solid var(--xendit-color-border);\n border-radius: 8px;\n background: var(--xendit-color-background);\n}\n\n.xendit-accordion-item-header {\n display: grid;\n grid-template-columns: auto 1fr auto;\n grid-gap: 16px;\n align-items: center;\n cursor: pointer;\n padding: 24px 16px;\n color: var(--xendit-color-text);\n border-radius: 8px;\n}\n\n.xendit-accordion-item-disabled.xendit-accordion-item {\n background-color: var(--xendit-color-disabled);\n border-color: var(--xendit-color-disabled);\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-header {\n cursor: not-allowed;\n}\n\n.xendit-accordion-item-header-title {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-header-title,\n.xendit-accordion-item-disabled .xendit-accordion-item-header-icon {\n opacity: 0.5;\n}\n\n.xendit-accordion-item.xendit-accordion-item-open\n .xendit-accordion-item-header {\n color: var(--xendit-color-primary);\n}\n\n.xendit-accordion-item-chevron {\n color: var(--xendit-color-text);\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-chevron {\n display: none;\n}\n\n.xendit-accordion-item-chevron g {\n transition: transform var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n\n.xendit-accordion-item-header:focus-visible {\n border-radius: 8px;\n box-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n outline: none;\n}\n\n.xendit-accordion-item-content {\n overflow: hidden;\n transition: height var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n\n.xendit-accordion-item.xendit-accordion-item-closed\n .xendit-accordion-item-content {\n height: 0;\n}\n\n.xendit-accordion-item.xendit-accordion-item-open\n .xendit-accordion-item-content {\n height: calc-size(auto, size);\n}\n\n.xendit-accordion-item-padding {\n padding: 16px;\n}\n\n/* Channel picker group */\n\n.xendit-channel-picker-group {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-channel-picker-group select {\n border: 1px solid var(--xendit-color-border);\n border-radius: 8px;\n padding: 12px;\n appearance: none;\n outline: none;\n}\n\n.xendit-channel-picker-group select:focus {\n box-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n}\n\n.xendit-channel-logo {\n width: 24px;\n height: 16px;\n margin: -5px 0;\n padding: 4px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n background-color: white; /* always white, not --xendit-color-background */\n object-fit: contain;\n}\n\n/* Payment channel */\n\nxendit-payment-channel[inert] {\n filter: opacity(0.5) grayscale(1);\n}\n\n.xendit-payment-channel {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-payment-channel-instructions {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-gap: 12px;\n color: var(--xendit-color-text-secondary);\n}\n\n.xendit-payment-channel-instructions-text {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 4px;\n}\n\n.xendit-payment-channel-instructions-text p {\n margin: 0;\n}\n\n/* Forms */\n\n.xendit-channel-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-channel-form > form {\n display: contents;\n}\n\n.xendit-form-field-group {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.xendit-channel-form-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-channel-form-field-group {\n display: grid;\n gap: 8px;\n}\n\n.xendit-channel-form-field-group label {\n width: fit-content;\n cursor: pointer;\n}\n\n.xendit-form-field-group.invalid .xendit-channel-form-field input,\n.xendit-form-field-group.invalid\n .xendit-channel-form-field\n .xendit-iframe-container,\n.xendit-form-field-group.invalid .xendit-dropdown button {\n border: 1px solid var(--xendit-color-danger);\n}\n\n.xendit-channel-form-field input:not([type="checkbox"]),\n.xendit-channel-form-field select,\n.xendit-channel-form-field .xendit-iframe-container {\n display: flex;\n border: 1px solid var(--xendit-color-border);\n background: var(--xendit-color-background);\n border-radius: 8px;\n padding: 12px;\n appearance: none;\n}\n\n/* TODO: Refine these class usages */\n.xendit-channel-form-field.field-radius-tl-0 input,\n.xendit-channel-form-field.field-radius-tl-0 button,\n.xendit-channel-form-field.field-radius-tl-0 .xendit-iframe-container {\n border-top-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-tr-0 input,\n.xendit-channel-form-field.field-radius-tr-0 button,\n.xendit-channel-form-field.field-radius-tr-0 .xendit-iframe-container {\n border-top-right-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-bl-0 input,\n.xendit-channel-form-field.field-radius-bl-0 button,\n.xendit-channel-form-field.field-radius-bl-0 .xendit-iframe-container {\n border-bottom-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-br-0 input,\n.xendit-channel-form-field.field-radius-br-0 button,\n.xendit-channel-form-field.field-radius-br-0 .xendit-iframe-container {\n border-bottom-right-radius: 0;\n}\n\n.xendit-channel-form-field.field-collapse-l,\n.xendit-channel-form-field.field-collapse-l {\n margin-left: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-r,\n.xendit-channel-form-field.field-collapse-r {\n margin-right: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-l .xendit-iframe-container {\n margin-left: calc(var(--xendit-border-collapse-offset) * 2);\n width: calc(100% + abs(var(--xendit-border-collapse-offset) * 2));\n}\n\n.xendit-channel-form-field.field-collapse-r .xendit-iframe-container {\n margin-right: 0;\n}\n\n.xendit-channel-form-field.field-collapse-t input,\n.xendit-channel-form-field.field-collapse-t button,\n.xendit-channel-form-field.field-collapse-t .xendit-iframe-container {\n margin-top: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-b input,\n.xendit-channel-form-field.field-collapse-b button,\n.xendit-channel-form-field.field-collapse-b .xendit-iframe-container {\n margin-bottom: var(--xendit-border-collapse-offset);\n}\n\n/* Safari and Firefox specific adjustments */\n@supports (font: -apple-system-body) or (-moz-appearance: none) {\n .xendit-channel-form-field.field-collapse-l .xendit-iframe-container {\n margin-left: 0;\n width: 100%;\n }\n\n .xendit-channel-form-field.field-collapse-b input,\n .xendit-channel-form-field.field-collapse-b button {\n margin-bottom: var(--xendit-border-collapse-webkit-gecko);\n height: calc(100% + abs(var(--xendit-border-collapse-webkit-gecko) * 2));\n }\n}\n\n.xendit-channel-form-field.field-collapse-r .xendit-iframe-container:focus {\n border-right: none;\n}\n\n.xendit-channel-form-field.field-collapse-l .xendit-iframe-container:focus {\n border-left: none;\n}\n/* Ends TODO */\n\n.xendit-card-brand-logo {\n width: 24px;\n height: 16px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n padding: 4px;\n background-color: white; /* always white, not --xendit-color-background */\n}\n\n.xendit-card-brands-list {\n display: flex;\n align-items: center;\n padding: 8px 12px;\n gap: 4px;\n}\n\n.xendit-channel-form-field input:focus,\n.xendit-channel-form-field select:focus,\n.xendit-channel-form-field .xendit-iframe-container.xendit-field-focus {\n border-color: var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\n outline: none;\n z-index: var(--xendit-z-index-focus);\n}\n\n.xendit-channel-form-field button:focus {\n position: relative;\n z-index: var(--xendit-z-index-focus);\n}\n\n.xendit-channel-form-field .xendit-iframe-container {\n height: 40px;\n width: 100%;\n padding: 0;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.xendit-channel-form-field .xendit-iframe-container iframe {\n height: 40px;\n width: 100%;\n border: none;\n min-width: 0;\n}\n\n.xendit-channel-form-field.xendit-form-field-span-1 {\n grid-column: span 1;\n}\n\n.xendit-channel-form-field.xendit-form-field-span-2 {\n grid-column: span 2;\n}\n\n.xendit-checkbox {\n display: flex;\n align-items: center;\n}\n\n.xendit-checkbox-box {\n display: flex;\n}\n\n.xendit-checkbox input {\n width: 16px;\n height: 16px;\n margin: 0;\n cursor: pointer;\n}\n\n.xendit-checkbox label {\n cursor: pointer;\n padding-left: 8px;\n}\n\n.xendit-checkbox input {\n opacity: 0;\n position: absolute;\n}\n\n.xendit-checkbox input + .xendit-checkbox-graphic {\n width: 16px;\n height: 16px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n box-sizing: border-box;\n color: transparent;\n}\n\n.xendit-checkbox input:checked + .xendit-checkbox-graphic {\n color: var(--xendit-color-background);\n background-color: var(--xendit-color-primary);\n border-color: var(--xendit-color-primary);\n}\n\n/* Dialog */\n\n.xendit-dialog-backdrop {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n padding: 48px;\n justify-content: center;\n align-items: center;\n}\n\n.xendit-dialog-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: var(--xendit-color-background);\n padding: 8px 0;\n gap: 16px;\n line-height: 24px;\n}\n\n.xendit-dialog-header button {\n background: none;\n border: none;\n color: var(--xendit-color-background);\n cursor: pointer;\n padding: 0;\n}\n\n.xendit-dialog-body {\n display: flex;\n background-color: var(--xendit-color-background);\n border-radius: 8px;\n padding: 8px;\n}\n\n.xendit-error-message {\n color: var(--xendit-color-danger);\n}\n\n/* Phone input Dropdown */\n.xendit-input-phone .xendit-combobox {\n display: flex;\n gap: 8px;\n}\n\n.xendit-phone-number-input {\n width: 100%;\n}\n\n.xendit-input-phone .xendit-dropdown button {\n width: 64px;\n}\n\n.xendit-input-phone .xendit-dropdown button .xendit-dropdown-button-title {\n display: none;\n}\n\n.xendit-dropdown .xendit-dropdown-search input {\n padding: 8px;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n box-sizing: border-box;\n}\n\n.xendit-dropdown-search input:focus {\n outline: none;\n border-color: var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\n}\n\n/* Phone input Dropdown ends */\n\n/* Dropdown */\n.xendit-dropdown button {\n width: 100%;\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: 8px;\n text-align: left;\n background-color: var(--xendit-color-background);\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n justify-content: space-between;\n padding: 12px;\n cursor: pointer;\n}\n\n.xendit-dropdown button.xendit-dropdown-has-asset {\n grid-template-columns: auto 1fr auto;\n}\n\n.xendit-dropdown button:disabled {\n background: var(--xendit-color-disabled);\n}\n\n.xendit-dropdown button:focus {\n outline: none;\n border: 1px solid var(--xendit-color-primary);\n box-shadow: 0px 0px 0px 2px #1762ee26;\n}\n\n.xendit-dropdown-menu {\n position: absolute;\n z-index: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: 168px;\n width: 257px;\n padding: 4px;\n margin: 4px 0;\n background-color: var(--xendit-color-background);\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n list-style: none;\n box-shadow: 0px 4px 8px 0px #25252514;\n overflow-y: auto;\n}\n\n.xendit-dropdown-menu ul {\n list-style: none;\n padding: 4px;\n margin-top: 0;\n}\n\n.xendit-dropdown-search {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.xendit-dropdown-search input {\n width: 100%;\n}\n\n.xendit-dropdown-item {\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: 8px;\n padding: 8px 12px 8px 4px;\n border-radius: var(--xendit-radius-1);\n cursor: pointer;\n z-index: 0;\n --xendit-dropdown-item-hover-color: var(--xendit-color-background);\n --xendit-dropdown-item-hover-bg-color: var(--xendit-color-primary);\n}\n\n.xendit-dropdown-item-disabled {\n --xendit-dropdown-item-hover-color: var(--xendit-color-text);\n --xendit-dropdown-item-hover-bg-color: var(--xendit-color-disabled);\n}\n\n.xendit-dropdown-item:hover {\n background-color: var(--xendit-dropdown-item-hover-bg-color);\n}\n\n.xendit-dropdown-item:hover .xendit-dropdown-item-text,\n.xendit-dropdown-item:hover .xendit-dropdown-item-description {\n color: var(--xendit-dropdown-item-hover-color);\n}\n\n.xendit-dropdown-item-selected {\n color: var(--xendit-color-primary);\n}\n\n.xendit-dropdown-item:hover .xendit-dropdown-item-selected {\n color: var(--xendit-dropdown-item-hover-color);\n}\n\n.xendit-dropdown-item.xendit-dropdown-has-asset {\n grid-template-columns: auto 1fr auto;\n}\n\n.xendit-dropdown-item-text {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.xendit-dropdown-item-disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.xendit-dropdown-item-disabled:hover,\n.xendit-dropdown-item-disabled.is-active {\n background-color: var(--xendit-color-disabled);\n}\n\n/* Dropdown ends */\n\n.xendit-action-iframe {\n border: none;\n width: 100%;\n height: 100%;\n}\n\n.xendit-default-action-container {\n display: flex;\n width: calc(min(100vw - 64px, 400px));\n height: calc(min(100vh - 64px, 600px));\n border: none;\n}\n';const t=document.querySelector("style, link");t?t.insertAdjacentElement("beforebegin",e):document.head.appendChild(e)}(),function(){const e=document.createElement("svg");e.id="xendit-icon-set",e.style.display="none",K(lt("defs",{children:ht.map(e=>e.node)}),e),document.head.appendChild(e)}()),e.XenditActionBeginEvent=XenditActionBeginEvent,e.XenditActionEndEvent=XenditActionEndEvent,e.XenditComponents=XenditComponents,e.XenditComponentsTest=XenditComponentsTest,e.XenditFatalErrorEvent=XenditFatalErrorEvent,e.XenditInitEvent=XenditInitEvent,e.XenditNotReadyEvent=XenditNotReadyEvent,e.XenditPaymentRequestCreatedEvent=XenditPaymentRequestCreatedEvent,e.XenditPaymentRequestDiscardedEvent=XenditPaymentRequestDiscardedEvent,e.XenditPaymentTokenCreatedEvent=XenditPaymentTokenCreatedEvent,e.XenditPaymentTokenDiscardedEvent=XenditPaymentTokenDiscardedEvent,e.XenditReadyEvent=XenditReadyEvent,e.XenditSessionCompleteEvent=XenditSessionCompleteEvent,e.XenditSessionExpiredOrCanceledEvent=XenditSessionExpiredOrCanceledEvent,e.XenditSubmissionBeginEvent=XenditSubmissionBeginEvent,e.XenditSubmissionEndEvent=XenditSubmissionEndEvent,e.XenditWillRedirectEvent=XenditWillRedirectEvent});
7
7
  //# sourceMappingURL=index.umd.js.map