(()=>{var t={320:t=>{"use strict";var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var a,c,u,s,l,f,h,p=e.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(u in c=(a=p.pop()).value,s=a.cost,l=t[c]||{})l.hasOwnProperty(u)&&(f=s+l[u],h=i[u],(void 0===i[u]||h>f)&&(i[u]=f,p.push(u,f),o[u]=c));if(void 0!==r&&void 0===i[r]){var d=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(d)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},583:(t,e,n)=>{const r=n(333),o=n(157),i=n(280),a=n(375);function c(t,e,n,i,a){const c=[].slice.call(arguments,1),u=c.length,s="function"==typeof c[u-1];if(!s&&!r())throw new Error("Callback required as last argument");if(!s){if(u<1)throw new Error("Too few arguments provided");return 1===u?(n=e,e=i=void 0):2!==u||e.getContext||(i=n,n=e,e=void 0),new Promise((function(r,a){try{const a=o.create(n,i);r(t(a,e,i))}catch(t){a(t)}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(a=n,n=e,e=i=void 0):3===u&&(e.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=n,n=e,e=void 0));try{const r=o.create(n,i);a(null,t(r,e,i))}catch(t){a(t)}}e.create=o.create,e.toCanvas=c.bind(null,i.render),e.toDataURL=c.bind(null,i.renderToDataURL),e.toString=c.bind(null,(function(t,e,n){return a.render(t,n)}))},333:t=>{t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},421:(t,e,n)=>{const r=n(886).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7];for(let t=1;t<e-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}},433:(t,e,n)=>{const r=n(208),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=r.ALPHANUMERIC,this.data=t}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},t.exports=i},899:t=>{function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},820:t=>{function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}e.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},822:(t,e,n)=>{const r=n(208);function o(t){this.mode=r.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},t.exports=o},518:(t,e,n)=>{const r=n(953),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}}},953:(t,e)=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},756:(t,e,n)=>{const r=n(886).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},565:(t,e,n)=>{const r=n(886),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)}},731:(t,e)=>{const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},861:(t,e,n)=>{const r=n(208),o=n(886);function i(t){this.mode=r.KANJI,this.data=t}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=i},332:(t,e)=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let n=0,r=0,o=0,i=null,a=null;for(let c=0;c<e;c++){r=o=0,i=a=null;for(let u=0;u<e;u++){let e=t.get(c,u);e===i?r++:(r>=5&&(n+=r-5+3),i=e,r=1),e=t.get(u,c),e===a?o++:(o>=5&&(n+=o-5+3),a=e,o=1)}r>=5&&(n+=r-5+3),o>=5&&(n+=o-5+3)}return n},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let o=0;o<e-1;o++){const e=t.get(r,o)+t.get(r,o+1)+t.get(r+1,o)+t.get(r+1,o+1);4!==e&&0!==e||n++}return 3*n},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,o=0;for(let i=0;i<e;i++){r=o=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(i,a),a>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|t.get(a,i),a>=10&&(1488===o||93===o)&&n++}return 40*n},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return 10*Math.abs(Math.ceil(100*e/n/5)-10)},e.applyMask=function(t,e){const r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,n(t,i,o))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<i&&(i=r,o=a)}return o}},208:(t,e,n)=>{const r=n(878),o=n(44);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},357:(t,e,n)=>{const r=n(208);function o(t){this.mode=r.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},t.exports=o},713:(t,e,n)=>{const r=n(731);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)n[o+i]^=r.mul(t[o],e[i]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let o=0;o<e.length;o++)n[o]^=r.mul(e[o],t);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let o=0;o<t;o++)n=e.mul(n,new Uint8Array([1,r.exp(o)]));return n}},157:(t,e,n)=>{const r=n(886),o=n(953),i=n(899),a=n(820),c=n(421),u=n(756),s=n(332),l=n(518),f=n(764),h=n(427),p=n(565),d=n(208),y=n(801);function m(t,e,n){const r=t.size,o=p.getEncodedBits(e,n);let i,a;for(i=0;i<15;i++)a=1==(o>>i&1),i<6?t.set(i,8,a,!0):i<8?t.set(i+1,8,a,!0):t.set(r-15+i,8,a,!0),i<8?t.set(8,r-i-1,a,!0):i<9?t.set(8,15-i-1+1,a,!0):t.set(8,15-i-1,a,!0);t.set(r-8,8,1,!0)}function g(t,e,n,o){let p;if(Array.isArray(t))p=y.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=y.rawSplit(t);r=h.getBestVersionForData(e,n)}p=y.fromString(t,r||40)}}const g=h.getBestVersionForData(p,n);if(!g)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<g)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+g+".\n")}else e=g;const b=function(t,e,n){const o=new i;n.forEach((function(e){o.put(e.mode.bit,4),o.put(e.getLength(),d.getCharCountIndicator(e.mode,t)),e.write(o)}));const a=8*(r.getSymbolTotalCodewords(t)-l.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const c=(a-o.getLengthInBits())/8;for(let t=0;t<c;t++)o.put(t%2?17:236,8);return function(t,e,n){const o=r.getSymbolTotalCodewords(e),i=o-l.getTotalCodewordsCount(e,n),a=l.getBlocksCount(e,n),c=a-o%a,u=Math.floor(o/a),s=Math.floor(i/a),h=s+1,p=u-s,d=new f(p);let y=0;const m=new Array(a),g=new Array(a);let b=0;const v=new Uint8Array(t.buffer);for(let t=0;t<a;t++){const e=t<c?s:h;m[t]=v.slice(y,y+e),g[t]=d.encode(m[t]),y+=e,b=Math.max(b,e)}const w=new Uint8Array(o);let C,E,S=0;for(C=0;C<b;C++)for(E=0;E<a;E++)C<m[E].length&&(w[S++]=m[E][C]);for(C=0;C<p;C++)for(E=0;E<a;E++)w[S++]=g[E][C];return w}(o,t,e)}(e,n,p),v=r.getSymbolSize(e),w=new a(v);return function(t,e){const n=t.size,r=u.getPositions(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(w,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(w),function(t,e){const n=c.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(w,e),m(w,n,0),e>=7&&function(t,e){const n=t.size,r=h.getEncodedBits(e);let o,i,a;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,a=1==(r>>e&1),t.set(o,i,a,!0),t.set(i,o,a,!0)}(w,e),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,a=0;for(let c=n-1;c>0;c-=2)for(6===c&&c--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,c-n)){let r=!1;a<e.length&&(r=1==(e[a]>>>i&1)),t.set(o,c-n,r),i--,-1===i&&(a++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(w,b),isNaN(o)&&(o=s.getBestMask(w,m.bind(null,w,n))),s.applyMask(o,w),m(w,n,o),{modules:w,version:e,errorCorrectionLevel:n,maskPattern:o,segments:p}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,i,a=o.M;return void 0!==e&&(a=o.from(e.errorCorrectionLevel,o.M),n=h.from(e.version),i=s.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),g(t,n,a,i)}},764:(t,e,n)=>{const r=n(713);function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(n,o),t}return n},t.exports=o},44:(t,e)=>{const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(o,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),c=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return i.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return c.test(t)}},801:(t,e,n)=>{const r=n(208),o=n(357),i=n(433),a=n(822),c=n(861),u=n(44),s=n(886),l=n(320);function f(t){return unescape(encodeURIComponent(t)).length}function h(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function p(t){const e=h(u.NUMERIC,r.NUMERIC,t),n=h(u.ALPHANUMERIC,r.ALPHANUMERIC,t);let o,i;return s.isKanjiModeEnabled()?(o=h(u.BYTE,r.BYTE,t),i=h(u.KANJI,r.KANJI,t)):(o=h(u.BYTE_KANJI,r.BYTE,t),i=[]),e.concat(n,o,i).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function d(t,e){switch(e){case r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return c.getBitsLength(t);case r.BYTE:return a.getBitsLength(t)}}function y(t,e){let n;const u=r.getBestModeForData(t);if(n=r.from(e,u),n!==r.BYTE&&n.bit<u.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(u));switch(n!==r.KANJI||s.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(t);case r.ALPHANUMERIC:return new i(t);case r.KANJI:return new c(t);case r.BYTE:return new a(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(y(e,null)):e.data&&t.push(y(e.data,e.mode)),t}),[])},e.fromString=function(t,n){const o=function(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:f(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:f(o.data)}])}}return e}(p(t,s.isKanjiModeEnabled())),i=function(t,e){const n={},o={start:{}};let i=["start"];for(let a=0;a<t.length;a++){const c=t[a],u=[];for(let t=0;t<c.length;t++){const s=c[t],l=""+a+t;u.push(l),n[l]={node:s,lastCount:0},o[l]={};for(let t=0;t<i.length;t++){const a=i[t];n[a]&&n[a].node.mode===s.mode?(o[a][l]=d(n[a].lastCount+s.length,s.mode)-d(n[a].lastCount,s.mode),n[a].lastCount+=s.length):(n[a]&&(n[a].lastCount=s.length),o[a][l]=d(s.length,s.mode)+4+r.getCharCountIndicator(s.mode,e))}}i=u}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:n}}(o,n),a=l.find_path(i.map,"start","end"),c=[];for(let t=1;t<a.length-1;t++)c.push(i.table[a[t]].node);return e.fromArray(c.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[]))},e.rawSplit=function(t){return e.fromArray(p(t,s.isKanjiModeEnabled()))}},886:(t,e)=>{let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}},878:(t,e)=>{e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},427:(t,e,n)=>{const r=n(886),o=n(518),i=n(953),a=n(208),c=n(878),u=r.getBCHDigit(7973);function s(t,e){return a.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;return t.forEach((function(t){const r=s(t.mode,e);n+=r+t.getBitsLength()})),n}e.from=function(t,e){return c.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!c.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);const i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===a.MIXED)return i;const u=i-s(n,t);switch(n){case a.NUMERIC:return Math.floor(u/10*3);case a.ALPHANUMERIC:return Math.floor(u/11*2);case a.KANJI:return Math.floor(u/13);case a.BYTE:default:return Math.floor(u/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(l(t,r)<=e.getCapacity(r,n,a.MIXED))return r}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!c.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-u>=0;)e^=7973<<r.getBCHDigit(e)-u;return t<<12|e}},280:(t,e,n)=>{const r=n(726);e.render=function(t,e,n){let o=n,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);const a=r.getImageWidth(t.modules.size,o),c=i.getContext("2d"),u=c.createImageData(a,a);return r.qrToImageData(u.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(c,i,a),c.putImageData(u,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),a=o.type||"image/png",c=o.rendererOpts||{};return i.toDataURL(a,c.quality)}},375:(t,e,n)=>{const r=n(726);function o(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const a=r.getOptions(e),c=t.modules.size,u=t.modules.data,s=c+2*a.margin,l=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",f="<path "+o(a.color.dark,"stroke")+' d="'+function(t,e,n){let r="",o=0,a=!1,c=0;for(let u=0;u<t.length;u++){const s=Math.floor(u%e),l=Math.floor(u/e);s||a||(a=!0),t[u]?(c++,u>0&&s>0&&t[u-1]||(r+=a?i("M",s+n,.5+l+n):i("m",o,0),o=0,a=!1),s+1<e&&t[u+1]||(r+=i("h",c),c=0)):o++}return r}(u,c,a.margin)+'"/>',h='viewBox="0 0 '+s+" "+s+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+l+f+"</svg>\n";return"function"==typeof n&&n(null,p),p}},726:(t,e)=>{function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const o=n.modules.size,i=n.modules.data,a=e.getScale(o,r),c=Math.floor((o+2*r.margin)*a),u=r.margin*a,s=[r.color.light,r.color.dark];for(let e=0;e<c;e++)for(let n=0;n<c;n++){let l=4*(e*c+n),f=r.color.light;e>=u&&n>=u&&e<c-u&&n<c-u&&(f=s[i[Math.floor((e-u)/a)*o+Math.floor((n-u)/a)]?1:0]),t[l++]=f.r,t[l++]=f.g,t[l++]=f.b,t[l]=f.a}}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=window.wp.apiFetch;var e=n.n(t);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],u=!0,s=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t,e)||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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function c(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}var u=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.stages=e,this.start=null},(e=[{key:"begin",value:function(){this.start=new Date}},{key:"interval",value:function(){for(var t=new Date,e=Math.floor((t-this.start)/1e3),n=1e3,r=0,i=Object.entries(this.stages);r<i.length;r++){var a=o(i[r],2),c=a[0],u=a[1];if(!(e>=parseInt(c)))break;n=u}return n}}])&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();const s=u;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function f(){f=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new N(r||[]);return o(a,"_invoke",{value:O(t,n,c)}),a}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",m="executing",g="completed",b={};function v(){}function w(){}function C(){}var E={};s(E,a,(function(){return this}));var S=Object.getPrototypeOf,T=S&&S(S(x([])));T&&T!==n&&r.call(T,a)&&(E=T);var k=C.prototype=v.prototype=Object.create(E);function P(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,n,r){var o=d;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var u=M(c,r);if(u){if(u===b)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var s=p(e,n,r);if("normal"===s.type){if(o=r.done?g:y,s.arg===b)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=g,r.method="throw",r.arg=s.arg)}}}function M(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,M(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var i=p(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,b;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,b):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function x(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(l(e)+" is not iterable")}return w.prototype=C,o(k,"constructor",{value:C,configurable:!0}),o(C,"constructor",{value:w,configurable:!0}),w.displayName=s(C,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,s(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},P(A.prototype),s(A.prototype,c,(function(){return this})),e.AsyncIterator=A,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new A(h(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},P(k),s(k,u,"Generator"),s(k,a,(function(){return this})),s(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=x,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:x(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),b}},e}function h(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function p(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){h(i,r,o,a,c,"next",t)}function c(t){h(i,r,o,a,c,"throw",t)}a(void 0)}))}}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function y(t,e,n){return(e=m(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}var g=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=document.getElementById("twint-modal"),this.intervalHanlder=new s({0:5e3,5:2e3,600:1e4,3600:0}),this.modal=e,this.processing=!1,this.finished=!1,this.stopped=!1,this.pairing=null,this.callbacks={}}return n=t,r=[{key:"setPairing",value:function(t){this.pairing=t}},{key:"addCallBack",value:function(t,e){this.callbacks[t]=e}},{key:"start",value:function(){this.stopped=!1,this.finished=!1,this.processing=!1,this.intervalHanlder.begin(),this.modal.isExpress()?this.modal.addCallback(Qt.EVENT_MODAL_CLOSED,this.onModalClosed.bind(this)):this.modal.addCallback(Qt.EVENT_MODAL_CLOSED,this.onRegularCheckoutCloseModal.bind(this)),this.onProcessing()}},{key:"onModalClosed",value:(i=p(f().mark((function t(){var e;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.stop(),this.finished){t.next=6;break}return e=this,t.next=5,this.cancelPayment((function(t){!0!==t.success&&setTimeout((function(){return e.check(!0)}),500)}));case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"cancelPayment",value:function(t){return this.processing=!0,e()({path:"/twint/v1/payment/cancel",method:"POST",data:{pairingId:this.pairing},cache:"no-store",parse:!1}).then((function(t){if(!t.ok)throw new Error("Network response was not ok");return t.json()})).then((function(e){return t(e)})).catch((function(t){console.error("Error:",t)}))}},{key:"stop",value:function(){this.stopped=!0}},{key:"onProcessing",value:function(){if(this.finished=!1,!this.processing&&!this.stopped){var t=this.intervalHanlder.interval();t>0&&setTimeout(this.check.bind(this),t)}}},{key:"onPaid",value:function(e){this.finished=!0;var n=this.callbacks[t.EVENT_PAID];n&&n(e)}},{key:"onCancelled",value:function(){this.finished=!0;var e=this.callbacks[t.EVENT_CANCELLED];e&&"function"==typeof e&&e()}},{key:"onFailed",value:function(){this.finished=!0;var e=this.callbacks[t.EVENT_FAILED];e&&"function"==typeof e&&e()}},{key:"onFinish",value:function(t){return this.finished=!0,t.finish&&"PAID"===t.status?this.onPaid(t):t.finish&&"FAILED"===t.status?this.onFailed():this.onCancelled(t)}},{key:"isIOS",value:function(){var t=window.navigator.userAgent,e=window.navigator.platform;return/iPad|iPhone|iPod/.test(t)||"MacIntel"===e&&navigator.maxTouchPoints>1}},{key:"check",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t||!this.stopped&&!this.processing){var n,r,o=this;this.processing=!0;var i={path:"/twint/v1/payment/status",method:"POST",data:{pairingId:this.pairing},cache:"no-store",parse:!1};this.isIOS()&&"undefined"!=typeof AbortController&&(n=new AbortController,r=setTimeout((function(){return n.abort()}),3e3),i.signal=n.signal),e()(i).then((function(t){if(r&&clearTimeout(r),o.processing=!1,!t.ok)throw new Error("Network response was not ok");return t.json()})).then((function(e){if(!0===e.finish)return o.onFinish(e);!t&&o.onProcessing()})).catch((function(t){r&&clearTimeout(r),o.processing=!1,("AbortError"===t.name||t.code&&"fetch_error"===t.code)&&o.check()}))}}},{key:"onRegularCheckoutCloseModal",value:(o=p(f().mark((function t(){var e;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.finished){t.next=5;break}return e=this,t.next=4,this.cancelPayment((function(t){!0===t.success?location.reload():setTimeout((function(){return e.check(!0)}),500)}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})}],r&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}();y(g,"EVENT_CANCELLED","cancelled"),y(g,"EVENT_PAID","paid"),y(g,"EVENT_FAILED","failed");const b=g,{entries:v,setPrototypeOf:w,isFrozen:C,getPrototypeOf:E,getOwnPropertyDescriptor:S}=Object;let{freeze:T,seal:k,create:P}=Object,{apply:A,construct:O}="undefined"!=typeof Reflect&&Reflect;T||(T=function(t){return t}),k||(k=function(t){return t}),A||(A=function(t,e,n){return t.apply(e,n)}),O||(O=function(t,e){return new t(...e)});const M=H(Array.prototype.forEach),_=H(Array.prototype.pop),L=H(Array.prototype.push),N=H(String.prototype.toLowerCase),x=H(String.prototype.toString),j=H(String.prototype.match),R=H(String.prototype.replace),I=H(String.prototype.indexOf),D=H(String.prototype.trim),B=H(Object.prototype.hasOwnProperty),U=H(RegExp.prototype.test),F=(z=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return O(z,e)});var z;function H(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return A(t,e,r)}}function q(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N;w&&w(t,null);let r=e.length;for(;r--;){let o=e[r];if("string"==typeof o){const t=n(o);t!==o&&(C(e)||(e[r]=t),o=t)}t[o]=!0}return t}function Y(t){for(let e=0;e<t.length;e++)B(t,e)||(t[e]=null);return t}function G(t){const e=P(null);for(const[n,r]of v(t))B(t,n)&&(Array.isArray(r)?e[n]=Y(r):r&&"object"==typeof r&&r.constructor===Object?e[n]=G(r):e[n]=r);return e}function K(t,e){for(;null!==t;){const n=S(t,e);if(n){if(n.get)return H(n.get);if("function"==typeof n.value)return H(n.value)}t=E(t)}return function(){return null}}const V=T(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),W=T(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),J=T(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Q=T(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),X=T(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),$=T(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Z=T(["#text"]),tt=T(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),et=T(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),nt=T(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),rt=T(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ot=k(/\{\{[\w\W]*|[\w\W]*\}\}/gm),it=k(/<%[\w\W]*|[\w\W]*%>/gm),at=k(/\$\{[\w\W]*}/gm),ct=k(/^data-[\-\w.\u00B7-\uFFFF]+$/),ut=k(/^aria-[\-\w]+$/),st=k(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lt=k(/^(?:\w+script|data):/i),ft=k(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ht=k(/^html$/i),pt=k(/^[a-z][.\w]*(-[.\w]+)+$/i);var dt=Object.freeze({__proto__:null,ARIA_ATTR:ut,ATTR_WHITESPACE:ft,CUSTOM_ELEMENT:pt,DATA_ATTR:ct,DOCTYPE_NAME:ht,ERB_EXPR:it,IS_ALLOWED_URI:st,IS_SCRIPT_OR_DATA:lt,MUSTACHE_EXPR:ot,TMPLIT_EXPR:at});const yt=function(){return"undefined"==typeof window?null:window};var mt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yt();const n=e=>t(e);if(n.version="3.2.3",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;let{document:r}=e;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:c,Node:u,Element:s,NodeFilter:l,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:d}=e,y=s.prototype,m=K(y,"cloneNode"),g=K(y,"remove"),b=K(y,"nextSibling"),w=K(y,"childNodes"),C=K(y,"parentNode");if("function"==typeof c){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let E,S="";const{implementation:k,createNodeIterator:A,createDocumentFragment:O,getElementsByTagName:z}=r,{importNode:H}=o;let Y={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof v&&"function"==typeof C&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:ot,ERB_EXPR:it,TMPLIT_EXPR:at,DATA_ATTR:ct,ARIA_ATTR:ut,IS_SCRIPT_OR_DATA:lt,ATTR_WHITESPACE:ft,CUSTOM_ELEMENT:pt}=dt;let{IS_ALLOWED_URI:mt}=dt,gt=null;const bt=q({},[...V,...W,...J,...X,...Z]);let vt=null;const wt=q({},[...tt,...et,...nt,...rt]);let Ct=Object.seal(P(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Et=null,St=null,Tt=!0,kt=!0,Pt=!1,At=!0,Ot=!1,Mt=!0,_t=!1,Lt=!1,Nt=!1,xt=!1,jt=!1,Rt=!1,It=!0,Dt=!1,Bt=!0,Ut=!1,Ft={},zt=null;const Ht=q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let qt=null;const Yt=q({},["audio","video","img","source","image","track"]);let Gt=null;const Kt=q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vt="http://www.w3.org/1998/Math/MathML",Wt="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml";let Qt=Jt,Xt=!1,$t=null;const Zt=q({},[Vt,Wt,Jt],x);let te=q({},["mi","mo","mn","ms","mtext"]),ee=q({},["annotation-xml"]);const ne=q({},["title","style","font","a","script"]);let re=null;const oe=["application/xhtml+xml","text/html"];let ie=null,ae=null;const ce=r.createElement("form"),ue=function(t){return t instanceof RegExp||t instanceof Function},se=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ae||ae!==t){if(t&&"object"==typeof t||(t={}),t=G(t),re=-1===oe.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,ie="application/xhtml+xml"===re?x:N,gt=B(t,"ALLOWED_TAGS")?q({},t.ALLOWED_TAGS,ie):bt,vt=B(t,"ALLOWED_ATTR")?q({},t.ALLOWED_ATTR,ie):wt,$t=B(t,"ALLOWED_NAMESPACES")?q({},t.ALLOWED_NAMESPACES,x):Zt,Gt=B(t,"ADD_URI_SAFE_ATTR")?q(G(Kt),t.ADD_URI_SAFE_ATTR,ie):Kt,qt=B(t,"ADD_DATA_URI_TAGS")?q(G(Yt),t.ADD_DATA_URI_TAGS,ie):Yt,zt=B(t,"FORBID_CONTENTS")?q({},t.FORBID_CONTENTS,ie):Ht,Et=B(t,"FORBID_TAGS")?q({},t.FORBID_TAGS,ie):{},St=B(t,"FORBID_ATTR")?q({},t.FORBID_ATTR,ie):{},Ft=!!B(t,"USE_PROFILES")&&t.USE_PROFILES,Tt=!1!==t.ALLOW_ARIA_ATTR,kt=!1!==t.ALLOW_DATA_ATTR,Pt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,At=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Ot=t.SAFE_FOR_TEMPLATES||!1,Mt=!1!==t.SAFE_FOR_XML,_t=t.WHOLE_DOCUMENT||!1,xt=t.RETURN_DOM||!1,jt=t.RETURN_DOM_FRAGMENT||!1,Rt=t.RETURN_TRUSTED_TYPE||!1,Nt=t.FORCE_BODY||!1,It=!1!==t.SANITIZE_DOM,Dt=t.SANITIZE_NAMED_PROPS||!1,Bt=!1!==t.KEEP_CONTENT,Ut=t.IN_PLACE||!1,mt=t.ALLOWED_URI_REGEXP||st,Qt=t.NAMESPACE||Jt,te=t.MATHML_TEXT_INTEGRATION_POINTS||te,ee=t.HTML_INTEGRATION_POINTS||ee,Ct=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ue(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ct.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ue(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ct.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ct.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ot&&(kt=!1),jt&&(xt=!0),Ft&&(gt=q({},Z),vt=[],!0===Ft.html&&(q(gt,V),q(vt,tt)),!0===Ft.svg&&(q(gt,W),q(vt,et),q(vt,rt)),!0===Ft.svgFilters&&(q(gt,J),q(vt,et),q(vt,rt)),!0===Ft.mathMl&&(q(gt,X),q(vt,nt),q(vt,rt))),t.ADD_TAGS&&(gt===bt&&(gt=G(gt)),q(gt,t.ADD_TAGS,ie)),t.ADD_ATTR&&(vt===wt&&(vt=G(vt)),q(vt,t.ADD_ATTR,ie)),t.ADD_URI_SAFE_ATTR&&q(Gt,t.ADD_URI_SAFE_ATTR,ie),t.FORBID_CONTENTS&&(zt===Ht&&(zt=G(zt)),q(zt,t.FORBID_CONTENTS,ie)),Bt&&(gt["#text"]=!0),_t&&q(gt,["html","head","body"]),gt.table&&(q(gt,["tbody"]),delete Et.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw F('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw F('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=t.TRUSTED_TYPES_POLICY,S=E.createHTML("")}else void 0===E&&(E=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(d,i)),null!==E&&"string"==typeof S&&(S=E.createHTML(""));T&&T(t),ae=t}},le=q({},[...W,...J,...Q]),fe=q({},[...X,...$]),he=function(t){L(n.removed,{element:t});try{C(t).removeChild(t)}catch(e){g(t)}},pe=function(t,e){try{L(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){L(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(xt||jt)try{he(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},de=function(t){let e=null,n=null;if(Nt)t="<remove></remove>"+t;else{const e=j(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===re&&Qt===Jt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=E?E.createHTML(t):t;if(Qt===Jt)try{e=(new p).parseFromString(o,re)}catch(t){}if(!e||!e.documentElement){e=k.createDocument(Qt,"template",null);try{e.documentElement.innerHTML=Xt?S:o}catch(t){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Qt===Jt?z.call(e,_t?"html":"body")[0]:_t?e.documentElement:i},ye=function(t){return A.call(t.ownerDocument||t,t,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},me=function(t){return t instanceof h&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof f)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},ge=function(t){return"function"==typeof u&&t instanceof u};function be(t,e,r){M(t,(t=>{t.call(n,e,r,ae)}))}const ve=function(t){let e=null;if(be(Y.beforeSanitizeElements,t,null),me(t))return he(t),!0;const r=ie(t.nodeName);if(be(Y.uponSanitizeElement,t,{tagName:r,allowedTags:gt}),t.hasChildNodes()&&!ge(t.firstElementChild)&&U(/<[/\w]/g,t.innerHTML)&&U(/<[/\w]/g,t.textContent))return he(t),!0;if(7===t.nodeType)return he(t),!0;if(Mt&&8===t.nodeType&&U(/<[/\w]/g,t.data))return he(t),!0;if(!gt[r]||Et[r]){if(!Et[r]&&Ce(r)){if(Ct.tagNameCheck instanceof RegExp&&U(Ct.tagNameCheck,r))return!1;if(Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(r))return!1}if(Bt&&!zt[r]){const e=C(t)||t.parentNode,n=w(t)||t.childNodes;if(n&&e)for(let r=n.length-1;r>=0;--r){const o=m(n[r],!0);o.__removalCount=(t.__removalCount||0)+1,e.insertBefore(o,b(t))}}return he(t),!0}return t instanceof s&&!function(t){let e=C(t);e&&e.tagName||(e={namespaceURI:Qt,tagName:"template"});const n=N(t.tagName),r=N(e.tagName);return!!$t[t.namespaceURI]&&(t.namespaceURI===Wt?e.namespaceURI===Jt?"svg"===n:e.namespaceURI===Vt?"svg"===n&&("annotation-xml"===r||te[r]):Boolean(le[n]):t.namespaceURI===Vt?e.namespaceURI===Jt?"math"===n:e.namespaceURI===Wt?"math"===n&&ee[r]:Boolean(fe[n]):t.namespaceURI===Jt?!(e.namespaceURI===Wt&&!ee[r])&&!(e.namespaceURI===Vt&&!te[r])&&!fe[n]&&(ne[n]||!le[n]):!("application/xhtml+xml"!==re||!$t[t.namespaceURI]))}(t)?(he(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!U(/<\/no(script|embed|frames)/i,t.innerHTML)?(Ot&&3===t.nodeType&&(e=t.textContent,M([ot,it,at],(t=>{e=R(e,t," ")})),t.textContent!==e&&(L(n.removed,{element:t.cloneNode()}),t.textContent=e)),be(Y.afterSanitizeElements,t,null),!1):(he(t),!0)},we=function(t,e,n){if(It&&("id"===e||"name"===e)&&(n in r||n in ce))return!1;if(kt&&!St[e]&&U(ct,e));else if(Tt&&U(ut,e));else if(!vt[e]||St[e]){if(!(Ce(t)&&(Ct.tagNameCheck instanceof RegExp&&U(Ct.tagNameCheck,t)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(t))&&(Ct.attributeNameCheck instanceof RegExp&&U(Ct.attributeNameCheck,e)||Ct.attributeNameCheck instanceof Function&&Ct.attributeNameCheck(e))||"is"===e&&Ct.allowCustomizedBuiltInElements&&(Ct.tagNameCheck instanceof RegExp&&U(Ct.tagNameCheck,n)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(n))))return!1}else if(Gt[e]);else if(U(mt,R(n,ft,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==I(n,"data:")||!qt[t])if(Pt&&!U(lt,R(n,ft,"")));else if(n)return!1;return!0},Ce=function(t){return"annotation-xml"!==t&&j(t,pt)},Ee=function(t){be(Y.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||me(t))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:vt,forceKeepAttr:void 0};let o=e.length;for(;o--;){const i=e[o],{name:a,namespaceURI:c,value:u}=i,s=ie(a);let l="value"===a?u:D(u);if(r.attrName=s,r.attrValue=l,r.keepAttr=!0,r.forceKeepAttr=void 0,be(Y.uponSanitizeAttribute,t,r),l=r.attrValue,!Dt||"id"!==s&&"name"!==s||(pe(a,t),l="user-content-"+l),Mt&&U(/((--!?|])>)|<\/(style|title)/i,l)){pe(a,t);continue}if(r.forceKeepAttr)continue;if(pe(a,t),!r.keepAttr)continue;if(!At&&U(/\/>/i,l)){pe(a,t);continue}Ot&&M([ot,it,at],(t=>{l=R(l,t," ")}));const f=ie(t.nodeName);if(we(f,s,l)){if(E&&"object"==typeof d&&"function"==typeof d.getAttributeType)if(c);else switch(d.getAttributeType(f,s)){case"TrustedHTML":l=E.createHTML(l);break;case"TrustedScriptURL":l=E.createScriptURL(l)}try{c?t.setAttributeNS(c,a,l):t.setAttribute(a,l),me(t)?he(t):_(n.removed)}catch(t){}}}be(Y.afterSanitizeAttributes,t,null)},Se=function t(e){let n=null;const r=ye(e);for(be(Y.beforeSanitizeShadowDOM,e,null);n=r.nextNode();)be(Y.uponSanitizeShadowNode,n,null),ve(n),Ee(n),n.content instanceof a&&t(n.content);be(Y.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,c=null,s=null;if(Xt=!t,Xt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ge(t)){if("function"!=typeof t.toString)throw F("toString is not a function");if("string"!=typeof(t=t.toString()))throw F("dirty is not a string, aborting")}if(!n.isSupported)return t;if(Lt||se(e),n.removed=[],"string"==typeof t&&(Ut=!1),Ut){if(t.nodeName){const e=ie(t.nodeName);if(!gt[e]||Et[e])throw F("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)r=de("\x3c!----\x3e"),i=r.ownerDocument.importNode(t,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!xt&&!Ot&&!_t&&-1===t.indexOf("<"))return E&&Rt?E.createHTML(t):t;if(r=de(t),!r)return xt?null:Rt?S:""}r&&Nt&&he(r.firstChild);const l=ye(Ut?t:r);for(;c=l.nextNode();)ve(c),Ee(c),c.content instanceof a&&Se(c.content);if(Ut)return t;if(xt){if(jt)for(s=O.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(vt.shadowroot||vt.shadowrootmode)&&(s=H.call(o,s,!0)),s}let f=_t?r.outerHTML:r.innerHTML;return _t&&gt["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&U(ht,r.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+f),Ot&&M([ot,it,at],(t=>{f=R(f,t," ")})),E&&Rt?E.createHTML(f):f},n.setConfig=function(){se(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Lt=!0},n.clearConfig=function(){ae=null,Lt=!1},n.isValidAttribute=function(t,e,n){ae||se({});const r=ie(t),o=ie(e);return we(r,o,n)},n.addHook=function(t,e){"function"==typeof e&&L(Y[t],e)},n.removeHook=function(t){return _(Y[t])},n.removeHooks=function(t){Y[t]=[]},n.removeAllHooks=function(){Y={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function gt(t){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(t)}function bt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,vt(r.key),r)}}function vt(t){var e=function(t){if("object"!=gt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gt(e)?e:e+""}var wt=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.shadow=e,this.input=this.shadow.querySelector("#".concat("qr-token")),this.button=this.shadow.querySelector("#".concat("twint-copy-btn")),this.button.addEventListener("click",this.onClick.bind(this))},(e=[{key:"onClick",value:function(t){t.preventDefault(),this.copyToClipboard(this.input.value)}},{key:"copyToClipboard",value:function(t){var e=this;try{navigator.clipboard.writeText(t).then((function(){e.onCopied()})).catch((function(t){console.error("Failed to copy text: ",t)}))}catch(t){}}},{key:"onCopied",value:function(){this.button.innerHTML=mt.sanitize(this.button.getAttribute("data-copied")),this.button.classList.add("copied"),this.button.classList.add("tw-border-green-500"),this.button.classList.add("tw-text-green-500"),this.input.disabled=!0,setTimeout(this.reset.bind(this),1e4)}},{key:"reset",value:function(){this.button.innerHTML=mt.sanitize(this.button.getAttribute("data-default")),this.button.classList.remove("copied"),this.button.classList.remove("tw-border-green-500"),this.button.classList.remove("tw-text-green-500")}}])&&bt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();const Ct=wt;function Et(t){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(t)}function St(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Tt(r.key),r)}}function Tt(t){var e=function(t){if("object"!=Et(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Et(e)?e:e+""}var kt=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.shadow=e},(e=[{key:"init",value:function(){}},{key:"setToken",value:function(t){this.token=t}}])&&St(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();const Pt=kt;function At(t){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(t)}function Ot(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Mt(r.key),r)}}function Mt(t){var e=function(t){if("object"!=At(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=At(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==At(e)?e:e+""}function _t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_t=function(){return!!t})()}function Lt(t){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lt(t)}function Nt(t,e){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Nt(t,e)}var xt=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=Lt(e),function(t,e){if(e&&("object"==At(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_t()?Reflect.construct(e,n||[],Lt(t).constructor):e.apply(t,n))}(this,e,[t])).button=n.shadow.querySelector("#twint-addroid-button"),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nt(t,e)}(e,t),n=e,(r=[{key:"init",value:function(){this.button&&(this.button.href=this.button.getAttribute("data-href").replace("--TOKEN--",this.token),this.button.click())}}])&&Ot(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Pt);const jt=xt;function Rt(t){return Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rt(t)}function It(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Dt(r.key),r)}}function Dt(t){var e=function(t){if("object"!=Rt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Rt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rt(e)?e:e+""}function Bt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Bt=function(){return!!t})()}function Ut(t){return Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ut(t)}function Ft(t,e){return Ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ft(t,e)}var zt=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=Ut(e),function(t,e){if(e&&("object"==Rt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Bt()?Reflect.construct(e,n||[],Ut(t).constructor):e.apply(t,n))}(this,e,[t])).container=n.shadow.querySelector("#twint-ios-container"),n.registeredEvents=!1,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ft(t,e)}(e,t),n=e,(r=[{key:"init",value:function(){var t=this;this.container&&!this.registeredEvents&&(this.banks=this.container.querySelectorAll("img"),this.banks&&this.banks.forEach((function(e){e.addEventListener("touchend",(function(n){t.onClickedBank(n,e)}))})),this.appLinksElements=this.container.querySelector("select"),this.appLinksElements&&this.appLinksElements.addEventListener("change",this.onChangeAppList.bind(this)),this.registeredEvents=!0)}},{key:"onChangeAppList",value:function(t){var e=t.target,n=e.options[e.selectedIndex].value;this.openAppBank(n)}},{key:"onClickedBank",value:function(t,e){var n=e.getAttribute("data-link");this.openAppBank(n)}},{key:"openAppBank",value:function(t){if(t){t=t.replace("--TOKEN--",this.token);try{window.location.replace(t);var e=setInterval((function(){clearInterval(e)}),2e3)}catch(t){}}}}])&&It(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Pt);const Ht=zt;function qt(t){return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qt(t)}function Yt(){Yt=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new _(r||[]);return o(a,"_invoke",{value:P(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function b(){}function v(){}var w={};s(w,a,(function(){return this}));var C=Object.getPrototypeOf,E=C&&C(C(L([])));E&&E!==n&&r.call(E,a)&&(w=E);var S=v.prototype=g.prototype=Object.create(w);function T(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function n(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==qt(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var u=A(c,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var s=f(e,n,r);if("normal"===s.type){if(o=r.done?y:p,s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=y,r.method="throw",r.arg=s.arg)}}}function A(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(qt(e)+" is not iterable")}return b.prototype=v,o(S,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},T(k.prototype),s(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new k(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},T(S),s(S,u,"Generator"),s(S,a,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;M(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Gt(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function Kt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Wt(r.key),r)}}function Vt(t,e,n){return(e=Wt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wt(t){var e=function(t){if("object"!=qt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qt(e)?e:e+""}var Jt=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.shadow=e,this.element=this.shadow.querySelector("#twint-modal"),this.closeBtn=this.element.querySelector("#twint-close"),this.statusRefresher=new b(this),this.tokenCopier=new Ct(this.shadow),this.connectors=[],this.connectors.push(new jt(this.shadow)),this.connectors.push(new Ht(this.shadow)),this.registerEvents(),this.checkout=n,this.callbacks={}}return e=t,n=[{key:"isExpress",value:function(){return this.checkout===t.TYPE_EXPRESS_CHECKOUT}},{key:"getData",value:function(){return{label:this.element.getAttribute("data-exist-label"),message:this.element.getAttribute("data-exist-message")}}},{key:"setContent",value:function(t){this.content=t}},{key:"addCallback",value:function(t,e){"function"==typeof e&&(this.callbacks[t]=e)}},{key:"show",value:function(){var t=this;if(this.content.token){this.closeBtn.disabled=!1,this.closeBtn.style.cursor="pointer",this.closeBtn.querySelector("span").innerHTML=mt.sanitize(this.closeBtn.getAttribute("data-default")),this.tokenCopier.reset(),this.content.render();var e=this.element.querySelector("#qr-modal-content");this.element.querySelector("#payment-error").style.display="none",e.style.display="block",this.element.style.display="flex",this.connectors.forEach((function(e){e.setToken(t.content.token),e.init()})),this.statusRefresher.setPairing(this.content.pairing),this.statusRefresher.addCallBack(b.EVENT_CANCELLED,this.close.bind(this)),this.statusRefresher.addCallBack(b.EVENT_PAID,this.onPaid.bind(this)),this.statusRefresher.addCallBack(b.EVENT_FAILED,this.onFailed.bind(this)),this.statusRefresher.start()}}},{key:"close",value:(r=Yt().mark((function e(){var n;return Yt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.closeBtn.disabled=!0,this.closeBtn.style.cursor="wait",this.closeBtn.querySelector("span").innerHTML=mt.sanitize(this.closeBtn.getAttribute("data-cancelling")),!(n=this.callbacks[t.EVENT_MODAL_CLOSED])){e.next=7;break}return e.next=7,n();case 7:if(!this.isExpress()){e.next=10;break}return this.element.style.display="none",e.abrupt("return");case 10:setTimeout((function(){return window.location.reload()}),1e3);case 11:case"end":return e.stop()}}),e,this)})),o=function(){var t=this,e=arguments;return new Promise((function(n,o){var i=r.apply(t,e);function a(t){Gt(i,n,o,a,c,"next",t)}function c(t){Gt(i,n,o,a,c,"throw",t)}a(void 0)}))},function(){return o.apply(this,arguments)})},{key:"registerEvents",value:function(){this.closeBtn.addEventListener("click",this.close.bind(this))}},{key:"refreshMiniCart",value:function(){try{document.body.classList.contains("woocommerce-cart")||(jQuery(document.body).trigger("wc_fragment_refresh"),jQuery(document.body).trigger("added_to_cart"),jQuery(document.body).trigger("wc-blocks_added_to_cart"))}catch(t){console.error(t)}}},{key:"openMiniCart",value:function(){for(var t=0,e=[".wc-block-mini-cart__button",".woofc-cart-trigger"];t<e.length;t++){var n=jQuery(e[t]);if(n.length){n.trigger("click");break}}}},{key:"onPaid",value:function(t){this.refreshMiniCart(),this.closeBtn.querySelector("span").innerHTML=mt.sanitize(this.closeBtn.getAttribute("data-success")),location.href=t.extra.redirect}},{key:"onFailed",value:function(){this.closeBtn.querySelector("span").innerHTML=mt.sanitize(this.closeBtn.getAttribute("data-success"));var t=this.element.querySelector("#qr-modal-content");this.element.querySelector("#payment-error").style.display="block",t.style.display="none"}},{key:"continue",value:function(){this.closeBtn.innerHTML=mt.sanitize(this.closeBtn.getAttribute("data-success"))}}],n&&Kt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r,o}();Vt(Jt,"EVENT_MODAL_CLOSED","CLOSED"),Vt(Jt,"TYPE_EXPRESS_CHECKOUT","EC"),Vt(Jt,"TYPE_REGULAR_CHECKOUT","RC");const Qt=Jt;function Xt(t){return Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xt(t)}function $t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Zt(r.key),r)}}function Zt(t){var e=function(t){if("object"!=Xt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Xt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xt(e)?e:e+""}var te=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.getButtons(),this.registerEvents()},(e=[{key:"getButtons",value:function(){this.buttons=document.querySelectorAll(".twint-button")}},{key:"registerEvents",value:function(){var t=this;this.buttons.forEach((function(e){if(e.classList.contains("PDP")||e.classList.contains("PLP")){var n=new MutationObserver((function(n){n.forEach((function(n){if("class"===n.attributeName){var r=n.target.classList.contains("disabled");t.syncButtonState(e,r)}}))})),r=e.previousElementSibling;!r||"BUTTON"!==r.tagName&&"A"!==r.tagName||n.observe(r,{attributes:!0})}}))}},{key:"syncButtonState",value:function(t,e){t.disabled=e}}])&&$t(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();const ee=te;var ne=n(583);function re(t){return re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},re(t)}function oe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ie(r.key),r)}}function ie(t){var e=function(t){if("object"!=re(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=re(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==re(e)?e:e+""}var ae=function(){return t=function t(e,n,r,o){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.shadow=e,this.token=n,this.amount=r,this.pairing=o,this.isExpress=i},(e=[{key:"render",value:function(){this.renderAmount(),this.renderToken(),this.renderQr(),this.adjustGuides()}},{key:"renderAmount",value:function(){var t=this.shadow.querySelector("#twint-amount");t&&(t.innerHTML=mt.sanitize(this.amount))}},{key:"renderToken",value:function(){var t=this.shadow.querySelector("#qr-token");t&&(t.value=this.token)}},{key:"renderQr",value:function(){var t=this.shadow.querySelector("#qrcode");t.innerHTML="",ne.toCanvas(t,this.token,{width:300,height:300,colorDark:"#000000",colorLight:"#ffffff"})}},{key:"adjustGuides",value:function(){var t=this.shadow.querySelector("#twint-guide-contact"),e=t.parentElement;this.isExpress?(t.classList.remove("tw-hidden"),t.closest(".twint-mobile")?e.classList.remove("md:tw-grid-cols-2"):e.classList.add("md:tw-grid-cols-2")):(t.classList.add("tw-hidden"),e.classList.remove("md:tw-grid-cols-2"))}}])&&oe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();const ce=ae,ue=["M0 0"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 125.9000015258789,268.7250061035156 125.9000015258789,268.7250061035156"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 126.25900268554688,268.5169982910156 126.93599700927734,268.12701416015625"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 126.70899963378906,268.25799560546875 128.1840057373047,267.406005859375"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 127.35099792480469,267.8869934082031 129.91299438476562,266.4070129394531"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 128.17599487304688,267.4100036621094 132.05999755859375,265.1659851074219"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 129.25100708007812,266.78900146484375 134.75900268554688,263.60699462890625"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 130.51100158691406,266.0610046386719 137.8070068359375,261.84698486328125"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 132.031005859375,265.1839904785156 141.33799743652344,259.8070068359375"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 133.802001953125,264.1600036621094 145.28399658203125,257.52801513671875"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 135.8520050048828,262.97601318359375 149.64500427246094,255.00799560546875"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 138.20899963378906,261.614013671875 154.42300415039062,252.24899291992188"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 140.91200256347656,260.0530090332031 159.61500549316406,249.24899291992188"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 143.927001953125,258.31201171875 165.08399963378906,246.08999633789062"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 147.38299560546875,256.31500244140625 170.968994140625,242.6909942626953"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 151.35499572753906,254.02099609375 177.27000427246094,239.05099487304688"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 155.84800720214844,251.42599487304688 183.8470001220703,235.2519989013672"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 160.97900390625,248.46200561523438 190.7010040283203,231.29299926757812"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 167.04600524902344,244.95700073242188 197.97000122070312,227.093994140625"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 174.24899291992188,240.79600524902344 205.51699829101562,222.73399353027344"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 183.14700317382812,235.656005859375 213.34100341796875,218.21499633789062"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 195.06100463867188,228.7740020751953 221.44200134277344,213.53500366210938"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 216.61199951171875,216.3249969482422 229.88699340820312,208.65699768066406"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 231.5,207.72500610351562 231.5,207.72500610351562 C233.64500427246094,206.50900268554688 235.48399353027344,204.01499938964844 236.35699462890625,201.41299438476562"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,195.70799255371094 236.89999389648438,191.24200439453125"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,191.32899475097656 236.89999389648438,180.68800354003906"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,186.30599975585938 236.89999389648438,169.81399536132812"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,180.66299438476562 236.89999389648438,158.77999877929688"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,174.25999450683594 236.89999389648438,147.50599670410156"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,166.87600708007812 236.89999389648438,135.91299438476562"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,158.3459930419922 236.89999389648438,124.16000366210938"," M125.9000015258789,268.7250061035156 C125.9000015258789,268.7250061035156 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,148.23500061035156 236.89999389648438,112.24600219726562"," M128.04299926757812,267.48699951171875 C143.02699279785156,258.8320007324219 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,135.58999633789062 236.89999389648438,100.09400177001953"," M130.74400329589844,265.927001953125 C151.45399475097656,253.96400451660156 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,118.27300262451172 236.89999389648438,87.86000061035156"," M134.4149932861328,263.8059997558594 C159.52200317382812,249.30299377441406 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,76.0199966430664 236.88099670410156,75.70800018310547 236.84300231933594,75.39199829101562"," M139.05299377441406,261.12701416015625 C167.35699462890625,244.77699279785156 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 230.7989959716797,66.5199966430664 229.50999450683594,65.7760009765625"," M144.5919952392578,257.927001953125 C174.92100524902344,240.4080047607422 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 226.42599487304688,63.99399948120117 218.5030059814453,59.41699981689453"," M151.02999877929688,254.20899963378906 C182.26300048828125,236.16700744628906 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 221.38900756835938,61.08399963378906 207.4250030517578,53.018001556396484"," M158.36900329589844,249.968994140625 C189.4040069580078,232.04200744628906 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 215.63800048828125,57.762001037597656 196.20899963378906,46.53900146484375"," M166.468994140625,245.2899932861328 C196.24000549316406,228.09300231933594 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 209.093994140625,53.981998443603516 184.9239959716797,40.02000045776367"," M175.39999389648438,240.13099670410156 C202.85299682617188,224.2729949951172 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 201.51499938964844,49.604000091552734 173.50100708007812,33.422000885009766"," M185.09300231933594,234.53199768066406 C209.19900512695312,220.60699462890625 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 192.70700073242188,44.51599884033203 162.14599609375,26.863000869750977"," M195.47799682617188,228.5330047607422 C215.23899841308594,217.1179962158203 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 181.86599731445312,38.25400161743164 150.6540069580078,20.224000930786133"," M206.55499267578125,222.13499450683594 C220.9669952392578,213.8090057373047 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 167.52099609375,29.966999053955078 139.16200256347656,13.586000442504883"," M218.3249969482422,215.33599853515625 C226.35000610351562,210.6999969482422 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 141.47000122070312,14.918999671936035 127.66699981689453,6.946000099182129"," M230.6490020751953,208.2169952392578 C231.20599365234375,207.89500427246094 231.5,207.72500610351562 231.5,207.72500610351562 C234.5,206.02499389648438 236.89999389648438,201.8249969482422 236.89999389648438,198.3249969482422 C236.89999389648438,198.3249969482422 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9010009765625,4.22599983215332 118.00499725341797,4.224999904632568 115.00399780273438,5.922999858856201"," M236.89999389648438,195.71800231933594 C236.89999389648438,178.0290069580078 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 110.53600311279297,8.503000259399414 103.44400024414062,12.600000381469727"," M236.89999389648438,180.1280059814453 C236.89999389648438,146.11900329589844 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 105.38200378417969,11.480999946594238 91.94999694824219,19.239999771118164"," M236.89999389648438,164.05599975585938 C236.89999389648438,127.97000122070312 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 99.54399871826172,14.852999687194824 80.45800018310547,25.878000259399414"," M236.89999389648438,147.3470001220703 C236.89999389648438,113.9020004272461 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 92.9280014038086,18.674999237060547 68.96499633789062,32.516998291015625"," M236.89999389648438,130.23599243164062 C236.89999389648438,102.27300262451172 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 85.4489974975586,22.9950008392334 57.611000061035156,39.07600021362305"," M236.89999389648438,112.56600189208984 C236.89999389648438,92.23600006103516 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 76.66300201416016,28.06999969482422 46.1879997253418,45.67499923706055"," M236.89999389648438,94.49600219726562 C236.89999389648438,83.55599975585938 236.89999389648438,76.32499694824219 236.89999389648438,76.32499694824219 C236.89999389648438,72.92500305175781 234.5,68.625 231.5,66.92500305175781 C231.5,66.92500305175781 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 66.1520004272461,34.141998291015625 34.902000427246094,52.194000244140625"," M236.89700317382812,76.10900115966797 C236.7989959716797,72.74500274658203 234.43699645996094,68.58899688720703 231.5,66.92500305175781 C231.5,66.92500305175781 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 52.529998779296875,42.01100158691406 23.68600082397461,58.67300033569336"," M224.802001953125,63.055999755859375 C201.5760040283203,49.638999938964844 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 30.284000396728516,54.861000061035156 12.607999801635742,65.0719985961914"," M208.25599670410156,53.49800109863281 C177.16400146484375,35.53799819946289 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 9.399999618530273,66.92500305175781 9.399999618530273,66.92500305175781 C7.0329999923706055,68.26699829101562 5.039000034332275,71.22699737548828 4.302999973297119,74.08699798583984"," M191.5709991455078,43.86000061035156 C161.66799926757812,26.586000442504883 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 9.399999618530273,66.92500305175781 9.399999618530273,66.92500305175781 C6.400000095367432,68.625 4,72.92500305175781 4,76.32499694824219 C4,76.32499694824219 4,80.25 4,86.69100189208984"," M174.60800170898438,34.06100082397461 C149.63999938964844,19.638999938964844 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 9.399999618530273,66.92500305175781 9.399999618530273,66.92500305175781 C6.400000095367432,68.625 4,72.92500305175781 4,76.32499694824219 C4,76.32499694824219 4,85.65899658203125 4,99.16400146484375"," M157.50799560546875,24.183000564575195 C139.7969970703125,13.95300006866455 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 9.399999618530273,66.92500305175781 9.399999618530273,66.92500305175781 C6.400000095367432,68.625 4,72.92500305175781 4,76.32499694824219 C4,76.32499694824219 4,91.62999725341797 4,111.39700317382812"," M140.33700561523438,14.265000343322754 C131.593994140625,9.21399974822998 125.9000015258789,5.925000190734863 125.9000015258789,5.925000190734863 C122.9000015258789,4.224999904632568 118,4.224999904632568 115,5.925000190734863 C115,5.925000190734863 9.399999618530273,66.92500305175781 9.399999618530273,66.92500305175781 C6.400000095367432,68.625 4,72.92500305175781 4,76.32499694824219 C4,76.32499694824219 4,98.27300262451172 4,123.55000305175781"," M122.78199768066406,4.853000164031982 C120.125,4.379000186920166 117.0979995727539,4.736000061035156 115,5.925000190734863 C115,5.925000190734863 9.399999618530273,66.92500305175781 9.399999618530273,66.92500305175781 C6.400000095367432,68.625 4,72.92500305175781 4,76.32499694824219 C4,76.32499694824219 4,105.59700012207031 4,135.46400451660156"," M104.62000274658203,11.920999526977539 C78.00399780273438,27.29599952697754 9.399999618530273,66.92500305175781 9.399999618530273,66.92500305175781 C6.400000095367432,68.625 4,72.92500305175781 4,76.32499694824219 C4,76.32499694824219 4,113.80500030517578 4,147.2169952392578"," M87.24299621582031,21.958999633789062 C55.95500183105469,40.03200149536133 9.399999618530273,66.92500305175781 9.399999618530273,66.92500305175781 C6.400000095367432,68.625 4,72.92500305175781 4,76.32499694824219 C4,76.32499694824219 4,123.17500305175781 4,158.81100463867188"," M69.93499755859375,31.957000732421875 C41.22600173950195,48.540000915527344 9.399999618530273,66.92500305175781 9.399999618530273,66.92500305175781 C6.400000095367432,68.625 4,72.92500305175781 4,76.32499694824219 C4,76.32499694824219 4,134.04800415039062 4,170.08399963378906"," M52.76499938964844,41.875 C29.857999801635742,55.106998443603516 9.399999618530273,66.92500305175781 9.399999618530273,66.92500305175781 C6.400000095367432,68.625 4,72.92500305175781 4,76.32499694824219 C4,76.32499694824219 4,147.49400329589844 4,181.1179962158203"," M35.66400146484375,51.75400161743164 C20.579999923706055,60.46699905395508 9.399999618530273,66.92500305175781 9.399999618530273,66.92500305175781 C6.400000095367432,68.625 4,72.92500305175781 4,76.32499694824219 C4,76.32499694824219 4,166.96800231933594 4,191.9929962158203"," M18.70199966430664,61.551998138427734 C12.930999755859375,64.88500213623047 9.399999618530273,66.92500305175781 9.399999618530273,66.92500305175781 C6.400000095367432,68.625 4,72.92500305175781 4,76.32499694824219 C4,76.32499694824219 4,198.3249969482422 4,198.3249969482422 C4,199.61900329589844 4.3480000495910645,201.04400634765625 4.943999767303467,202.40699768066406"," M4.433000087738037,73.625 C4.1539998054504395,74.54499816894531 4,75.46399688720703 4,76.32499694824219 C4,76.32499694824219 4,198.3249969482422 4,198.3249969482422 C4,201.72500610351562 6.400000095367432,206.02499389648438 9.399999618530273,207.72500610351562 C9.399999618530273,207.72500610351562 10.380999565124512,208.29200744628906 12.154000282287598,209.3159942626953"," M4,92.60800170898438 C4,125.83200073242188 4,198.3249969482422 4,198.3249969482422 C4,201.72500610351562 6.400000095367432,206.02499389648438 9.399999618530273,207.72500610351562 C9.399999618530273,207.72500610351562 13.802000045776367,210.26800537109375 20.80900001525879,214.31500244140625"," M4,111.31700134277344 C4,147.36599731445312 4,198.3249969482422 4,198.3249969482422 C4,201.72500610351562 6.400000095367432,206.02499389648438 9.399999618530273,207.72500610351562 C9.399999618530273,207.72500610351562 17.518999099731445,212.4149932861328 29.2549991607666,219.19500732421875"," M4,129.6269989013672 C4,162.46400451660156 4,198.3249969482422 4,198.3249969482422 C4,201.72500610351562 6.400000095367432,206.02499389648438 9.399999618530273,207.72500610351562 C9.399999618530273,207.72500610351562 21.42300033569336,214.6699981689453 37.35599899291992,223.87399291992188"," M4,147.53700256347656 C4,174.2779998779297 4,198.3249969482422 4,198.3249969482422 C4,201.72500610351562 6.400000095367432,206.02499389648438 9.399999618530273,207.72500610351562 C9.399999618530273,207.72500610351562 25.52899932861328,217.04200744628906 45.18000030517578,228.39300537109375"," M4,164.9669952392578 C4,183.8979949951172 4,198.3249969482422 4,198.3249969482422 C4,201.72500610351562 6.400000095367432,206.02499389648438 9.399999618530273,207.72500610351562 C9.399999618530273,207.72500610351562 29.834999084472656,219.5290069580078 52.72600173950195,232.7519989013672"," M4,181.83799743652344 C4,191.8300018310547 4,198.3249969482422 4,198.3249969482422 C4,201.72500610351562 6.400000095367432,206.02499389648438 9.399999618530273,207.72500610351562 C9.399999618530273,207.72500610351562 34.349998474121094,222.13800048828125 59.99599838256836,236.95199584960938"," M4,198.22999572753906 C4,198.29299926757812 4,198.3249969482422 4,198.3249969482422 C4,201.72500610351562 6.400000095367432,206.02499389648438 9.399999618530273,207.72500610351562 C9.399999618530273,207.72500610351562 38.994998931884766,224.82000732421875 66.8499984741211,240.91099548339844"," M13.12399959564209,209.87600708007812 C22.812999725341797,215.47300720214844 49.70500183105469,231.0070037841797 73.427001953125,244.7100067138672"," M26.139999389648438,217.39500427246094 C40.49300003051758,225.68600463867188 61.654998779296875,237.91000366210938 79.72699737548828,248.35000610351562"," M38.60200119018555,224.593994140625 C53.24700164794922,233.05299377441406 70.94100189208984,243.2740020751953 85.61199951171875,251.74899291992188"," M50.303001403808594,231.35299682617188 C64.0989990234375,239.32200622558594 79.03800201416016,247.9510040283203 91.08100128173828,254.9080047607422"," M61.380001068115234,237.75100708007812 C73.88500213623047,244.97500610351562 86.4520034790039,252.23399353027344 96.27300262451172,257.9070129394531"," M71.69599914550781,243.7100067138672 C82.72200012207031,250.0800018310547 93.1760025024414,256.1189880371094 101.05000305175781,260.6669921875"," M81.18099975585938,249.18899536132812 C90.70700073242188,254.69200134277344 99.28099822998047,259.6449890136719 105.41300201416016,263.18701171875"," M89.90399932861328,254.22900390625 C97.98600006103516,258.8970031738281 104.86000061035156,262.8680114746094 109.35900115966797,265.46600341796875"," M97.72799682617188,258.74798583984375 C104.67400360107422,262.760009765625 110.08999633789062,265.88800048828125 112.89099884033203,267.5069885253906"," M104.6510009765625,262.74700927734375 C111.03900146484375,266.43701171875 115,268.7250061035156 115,268.7250061035156 C115.30599975585938,268.89801025390625 115.63099670410156,269.0539855957031 115.97200012207031,269.1919860839844"," M110.67500305175781,266.22601318359375 C113.43099975585938,267.8179931640625 115,268.7250061035156 115,268.7250061035156 C116.12899780273438,269.364990234375 117.52799987792969,269.7640075683594 118.99400329589844,269.9219970703125"," M115.6780014038086,269.0669860839844 C117.35099792480469,269.8139953613281 119.4530029296875,270.1130065917969 121.46800231933594,269.9620056152344"," M120.11000061035156,269.9960021972656 C121.24199676513672,270.02398681640625 122.38200378417969,269.9119873046875 123.44200134277344,269.6600036621094"," M123.36399841308594,269.6789855957031 C123.86900329589844,269.56298828125 124.35600280761719,269.4150085449219 124.81600189208984,269.2359924316406"," M125.25800323486328,269.04998779296875 C125.38099670410156,268.9949951171875 125.5009994506836,268.93701171875 125.61900329589844,268.87701416015625"];function se(t){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},se(t)}function le(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,he(r.key),r)}}function fe(t,e,n){return(e=he(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function he(t){var e=function(t){if("object"!=se(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==se(e)?e:e+""}var pe=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=document.getElementById("twint-loading"),t.container=document.getElementById("twint-animation")}return e=t,(n=[{key:"start",value:function(){this.element.classList.add("active"),t.animation||(t.animation=setInterval(this.changePoints.bind(this),20))}},{key:"stop",value:function(){this.element.classList.remove("active"),t.animation&&(clearInterval(t.animation),t.animation=null)}},{key:"changePoints",value:function(){t.container.setAttribute("d",String(ue[t.index])),t.index++,t.index>=ue.length&&(t.index=0)}}])&&le(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();fe(pe,"animation",null),fe(pe,"index",0),fe(pe,"container",null);const de=pe;function ye(t){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ye(t)}function me(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,be(r.key),r)}}function ge(t,e,n){return(e=be(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function be(t){var e=function(t){if("object"!=ye(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ye(e)?e:e+""}var ve=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),t.spinner||(t.spinner=new de)}return n=t,r=[{key:"handle",value:function(n,r,o){t.processing||(t.processing=!0,t.spinner.start(),e()({path:"/twint/v1/express/checkout",method:"POST",data:n.getParams(),cache:"no-store",parse:!1}).then((function(e){if(t.processing=!1,t.spinner.stop(),!e.ok)throw new Error("Network response was not ok");return e.json()})).then((function(t){return"success"in t&&!1===t.success?o(t):r(t)})).catch((function(e){t.processing=!1,t.spinner.stop(),console.error("Error:",e),o(e)})))}}],r&&me(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}();ge(ve,"spinner",void 0),ge(ve,"processing",!1);const we=ve;function Ce(t){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ce(t)}function Ee(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Se(r.key),r)}}function Se(t){var e=function(t){if("object"!=Ce(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ce(e)?e:e+""}var Te=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.button=e},(e=[{key:"getParams",value:function(){return{}}}])&&Ee(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();const ke=Te;function Pe(t){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pe(t)}function Ae(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Oe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Me(t,e,n){return(e=Le(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Le(r.key),r)}}function Le(t){var e=function(t){if("object"!=Pe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pe(e)?e:e+""}function Ne(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ne=function(){return!!t})()}function xe(t){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xe(t)}function je(t,e){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},je(t,e)}var Re=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=xe(e),function(t,e){if(e&&("object"==Pe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ne()?Reflect.construct(e,n||[],xe(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&je(t,e)}(e,t),n=e,r=[{key:"getParams",value:function(){var t=this.button.closest("form");if(!t)throw new Error("Cannot find product form");var e=new FormData(t),n=this.parseFormData(e);if(!n.product_id){var r=t.querySelector('[name="add-to-cart"]');r&&(n.product_id=r.value)}return this.mapping(n)}},{key:"mapping",value:function(t){var e,n=[];for(var r in t)r.startsWith("attribute_")&&n.push({attribute:r.replace("attribute_",""),value:t[r]});return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Oe(Object(n),!0).forEach((function(e){Me(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({id:null!==(e=t.variation_id)&&void 0!==e?e:t.product_id,quantity:t.quantity,variation:n},t)}},{key:"parseFormData",value:function(t){return Array.from(t.entries()).reduce((function(t,e){var n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],u=!0,s=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ae(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(t,e):void 0}}(t,e)||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.")}()}(e,2),r=n[0],o=n[1],i=r.replace("[]","");return r.endsWith("[]")?(t[i]=t[i]||[],t[i].push(o)):t[i]=o,t}),{})}}],r&&_e(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ke);const Ie=Re;function De(t){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},De(t)}function Be(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ue(r.key),r)}}function Ue(t){var e=function(t){if("object"!=De(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=De(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==De(e)?e:e+""}function Fe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fe=function(){return!!t})()}function ze(t){return ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ze(t)}function He(t,e){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},He(t,e)}var qe=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=ze(e),function(t,e){if(e&&("object"==De(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Fe()?Reflect.construct(e,n||[],ze(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&He(t,e)}(e,t),n=e,(r=[{key:"getParams",value:function(){var t=this.button.previousElementSibling;if(!t.getAttribute("data-block-name")){for(var e=this.button.parentElement.children,n=null,r=0;r<e.length;r++){for(var o=0;o<e[r].classList.length;o++)if("ajax_add_to_cart"===e[r].classList[o]){n=e[r];break}if(null!==n)break}if(null!==n){var i,a,c,u=null===(i=n.attributes["data-product_id"])||void 0===i?void 0:i.value;return{quantity:null!==(a=null===(c=n.attributes["data-quantity"])||void 0===c?void 0:c.value)&&void 0!==a?a:1,id:u}}throw new Error("Cannot find parent product box")}var s=t.getAttribute("data-wc-context");return this.mapping(JSON.parse(s))}},{key:"mapping",value:function(t){var e=this.button?this.button.querySelector('input[name="fme_cpffw_nonce"]'):null,n=e?e.value:"";return{quantity:t.quantityToAdd,id:t.productId,fme_cpffw_nonce:n}}}])&&Be(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ke);const Ye=qe;function Ge(t){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ge(t)}function Ke(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ve(r.key),r)}}function Ve(t){var e=function(t){if("object"!=Ge(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ge(e)?e:e+""}function We(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(We=function(){return!!t})()}function Je(t){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Je(t)}function Qe(t,e){return Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qe(t,e)}var Xe=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=Je(e),function(t,e){if(e&&("object"==Ge(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,We()?Reflect.construct(e,n||[],Je(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qe(t,e)}(e,t),n=e,(r=[{key:"getParams",value:function(){return{full:!0}}}])&&Ke(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(ke);const $e=Xe;function Ze(t){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(t)}function tn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,en(r.key),r)}}function en(t){var e=function(t){if("object"!=Ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ze(e)?e:e+""}var nn=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return e=t,n=[{key:"getContext",value:function(e){return t.inPDP(e)?new Ie(e):t.inPLP(e)?new Ye(e):t.inCart(e)?new $e(e):new ke(e)}},{key:"inPDP",value:function(t){return t.classList.contains("PDP")}},{key:"inPLP",value:function(t){return t.classList.contains("PLP")}},{key:"inCart",value:function(t){return t.classList.contains("mini-cart")||t.classList.contains("cart")}}],null&&tn(e.prototype,null),n&&tn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();const rn=nn;function on(t){return on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},on(t)}function an(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,cn(r.key),r)}}function cn(t){var e=function(t){if("object"!=on(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=on(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==on(e)?e:e+""}var un,sn,ln,fn=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.buttonManager=new ee,this.checkoutAction=new we}return e=t,n=[{key:"handle",value:function(){this.init(),this.registerEvents()}},{key:"registerEvents",value:function(){var t=this;this.buttonManager.buttons.forEach((function(e){e.addEventListener("click",t.onButtonClicked.bind(t))})),document.querySelector("body").addEventListener("click",(function(e){e.target&&e.target.matches(".twint")&&t.onButtonClicked(e)}))}},{key:"onButtonClicked",value:function(t){t.preventDefault(),t.stopPropagation();var e=t.target.closest(".twint-button"),n=document.querySelector('[name="add-to-cart"]');n&&n.disabled||this.checkoutAction.handle(rn.getContext(e),this.onSuccessCallback.bind(this),this.onFailureCallback.bind(this))}},{key:"onSuccessCallback",value:function(e){if(t.modal.refreshMiniCart(),e.openMiniCart)return this.showMessageAndOpenMiniCart();t.modal.setContent(new ce(this.shadow,e.token,e.amount,e.pairing,!0)),t.modal.show()}},{key:"onFailureCallback",value:function(t){if(console.log("Cannot perform express checkout"),"success"in t&&!1===t.success){var e=t.message;this.showMessage(e,"woocommerce-error")}}},{key:"init",value:function(){this.shadow=window.twintShadowRoot,t.modal||(t.modal=new Qt(this.shadow,Qt.TYPE_EXPRESS_CHECKOUT))}},{key:"showMessage",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=document.querySelector(".woocommerce-notices-wrapper");n&&(n.innerHTML=mt.sanitize('<div class="woocommerce-message '+e+'" role="alert">              \n            <div class="wc-block-components-notice-banner__content">'+t+"</div>\n        </div>"),n.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}))}},{key:"showMessageAndOpenMiniCart",value:function(){try{var e=t.modal.getData(),n='<a href="'.concat(window.twintExpress.cartUrl,'" tabindex="1" class="button wc-forward wp-element-button">\n                      ').concat(e.label,"\n                    </a>\n                    ").concat(e.message);this.showMessage(n,"woocommerce-info is-success"),t.modal.openMiniCart()}catch(t){console.error("Cannot show message box",t)}}}],n&&an(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();un=fn,ln=void 0,(sn=cn(sn="modal"))in un?Object.defineProperty(un,sn,{value:ln,enumerable:!0,configurable:!0,writable:!0}):un[sn]=ln,document.addEventListener("DOMContentLoaded",(function(){(new fn).handle()}))})()})();