@everymatrix/cashier-page 1.56.0 → 1.56.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{CashierConfirmModal-DjJI47WY.js → CashierConfirmModal-B0WZGuf5.js} +48 -41
- package/components/{CashierConfirmModal-CnmhfysD.js → CashierConfirmModal-BErwh2fQ.js} +49 -42
- package/components/{CashierConfirmModal-B_XfWSC2.cjs → CashierConfirmModal-BVT51ZOp.cjs} +1 -1
- package/components/{CashierError-CcFXZ705.js → CashierError-DoHJAf67.js} +524 -502
- package/components/{CashierError-BhW9Bd5u.js → CashierError-Dyf5BWS1.js} +523 -501
- package/components/{CashierError-wHAQP3_C.cjs → CashierError-YmV_PQP8.cjs} +16 -3
- package/components/{CashierHeader-BKrGT2Ae.cjs → CashierHeader-B-wIMGOV.cjs} +1 -1
- package/components/{CashierHeader-B_qUwnRz.js → CashierHeader-C8XVzyv9.js} +42 -42
- package/components/{CashierHeader-BUMem-fU.js → CashierHeader-Dm79zFE4.js} +44 -44
- package/components/{CashierIframeRedirect-DK3-V6GJ.js → CashierIframeRedirect-B_5Lg8hb.js} +33 -33
- package/components/{CashierIframeRedirect-BDIr-k4X.cjs → CashierIframeRedirect-CXErmVjw.cjs} +1 -1
- package/components/{CashierIframeRedirect-DiWIODGM.js → CashierIframeRedirect-D7qTJ1C9.js} +32 -32
- package/components/CashierMethodDetails-Ba0LNaer.cjs +18 -0
- package/components/{CashierMethodDetails-B5Y9sYOg.js → CashierMethodDetails-C6upoqd2.js} +1810 -1773
- package/components/{CashierMethodDetails-C-KT1A-h.js → CashierMethodDetails-T4mbzimW.js} +1870 -1833
- package/components/{CashierMethodsList-CbNajSX5.js → CashierMethodsList-6aZ0rauJ.js} +92 -92
- package/components/{CashierMethodsList-DCPVijk5.cjs → CashierMethodsList-Ds7TEIYj.cjs} +1 -1
- package/components/{CashierMethodsList-Q3OYWKGV.js → CashierMethodsList-K1Zqnlt7.js} +67 -67
- package/components/{CashierModal-B9SMcvPJ.cjs → CashierModal-BhCdxWcE.cjs} +1 -1
- package/components/{CashierModal-DoTNxAOf.js → CashierModal-CpN2LT2L.js} +31 -31
- package/components/{CashierModal-BQ75P20m.js → CashierModal-DB1wg0l3.js} +37 -37
- package/components/{CashierNotifications-BdcWgN-t.js → CashierNotifications-B5qfr68o.js} +18 -18
- package/components/{CashierNotifications-C5qqk3s5.cjs → CashierNotifications-BVAanyOB.cjs} +1 -1
- package/components/{CashierNotifications-DVCfwUo9.js → CashierNotifications-BmAkkuzD.js} +19 -19
- package/components/{CashierPage-BGaDrX6p.js → CashierPage-BjqZ6dGk.js} +68 -68
- package/components/{CashierPage-Ckv_ecQa.js → CashierPage-C87OKpcE.js} +66 -66
- package/components/{CashierPage-C67H_0uR.cjs → CashierPage-DtW2NNtj.cjs} +1 -1
- package/components/{CashierReceiptPage-bBNHsfW5.cjs → CashierReceiptPage-BH5T05dg.cjs} +1 -1
- package/components/{CashierReceiptPage-Cjz4isz4.js → CashierReceiptPage-BOTRblW6.js} +215 -202
- package/components/{CashierReceiptPage-B6Ot4u-u.js → CashierReceiptPage-BsbiLGZK.js} +191 -179
- package/components/{CashierSessionExpirationModal-CWKlvhPF.cjs → CashierSessionExpirationModal-CxpesQtf.cjs} +2 -2
- package/components/{CashierSessionExpirationModal-CbrAJQvx.js → CashierSessionExpirationModal-DZgsGvVp.js} +60 -49
- package/components/{CashierSessionExpirationModal-8p7dxVmt.js → CashierSessionExpirationModal-V8MYd-oY.js} +60 -49
- package/components/{CashierSpinner-Y3YCsQEf.js → CashierSpinner-BI29nSq_.js} +25 -25
- package/components/{CashierSpinner-Cv-DKF1H.js → CashierSpinner-FzCMnj7X.js} +26 -26
- package/components/{CashierSpinner-CxYzgF3b.cjs → CashierSpinner-H763izjz.cjs} +1 -1
- package/components/CashierTransactionHistory-BdyrNKgd.cjs +1 -0
- package/components/CashierTransactionHistory-CVMw2IN2.js +569 -0
- package/components/CashierTransactionHistory-DB8hgPpZ.js +569 -0
- package/components/{CashierVerifications-Cqc-k576.js → CashierVerifications-BOYrzIos.js} +72 -72
- package/components/{CashierVerifications-D-3Ycigl.cjs → CashierVerifications-BXTVbpjh.cjs} +1 -1
- package/components/{CashierVerifications-DL2hsNCJ.js → CashierVerifications-qhXfC9Fa.js} +26 -26
- package/components/{CashierVideoModal-CBBnFyqd.cjs → CashierVideoModal-CjR0Fzuu.cjs} +1 -1
- package/components/{CashierVideoModal-DkujQ3WY.js → CashierVideoModal-DGBQZz-C.js} +33 -33
- package/components/{CashierVideoModal-YsTJSZa7.js → CashierVideoModal-DPG12DK0.js} +37 -37
- package/es2015/cashier-page.cjs +1 -1
- package/es2015/cashier-page.js +1 -1
- package/esnext/cashier-page.js +1 -1
- package/package.json +1 -1
- package/components/CashierMethodDetails-D8AGMiCO.cjs +0 -18
- package/components/CashierTransactionHistory-DRX91Hoc.cjs +0 -1
- package/components/CashierTransactionHistory-DmVVMYYd.js +0 -567
- package/components/CashierTransactionHistory-SjIsxvK5.js +0 -567
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ye=Object.defineProperty,be=Object.defineProperties;var Me=Object.getOwnPropertyDescriptors;var K=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable;var Q=(n,t,s)=>t in n?ye(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s,G=(n,t)=>{for(var s in t||(t={}))ve.call(t,s)&&Q(n,s,t[s]);if(K)for(var s of K(t))Le.call(t,s)&&Q(n,s,t[s]);return n},V=(n,t)=>be(n,Me(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CashierConfirmModal-B_XfWSC2.cjs"),q=require("./CashierError-wHAQP3_C.cjs"),Y=require("./CashierMethodDetails-D8AGMiCO.cjs");function $(n,t){q.addMessages(n,t)}function ke(n){q.init({fallbackLocale:"en"}),q.$locale.set(n)}const ee={en:{generalMin:"Min",generalMax:"Max",showAll:"SHOW ALL",showLess:"SHOW LESS",error:"Error",noPaymentMethods:"No payment methods available"},uk:{generalMin:"Мін",generalMax:"Макс"},hr:{generalMin:"Minimalno",generalMax:"Maksimalno",showAll:"Prikaži sve",showLess:"Prikaži manje"},tr:{generalMin:"Min",generalMax:"Maks",showAll:"HEPSİNİ GÖSTER",showLess:"DAHA AZ GÖSTER",error:"Hata",noPaymentMethods:"Hiçbir ödeme yöntemi mevcut değil"},"en-us":{generalMin:"Min",generalMax:"Max",showAll:"SHOW ALL",showLess:"SHOW LESS"}};function Ce(n){e.append_styles(n,"svelte-1wlv0rl","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CashierMethodList{display:flex;flex-direction:column;background:var(--emw--color-background, #fff);box-shadow:0 0 4px var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));width:100%;border-radius:var(--mmw--border-radius-medium-plus, 6px);container-name:method-list;container-type:inline-size}.SelectorWrapper{display:flex;flex-direction:row;align-items:center;justify-content:left;cursor:pointer;position:relative;height:var(--mmw-method-height, 80px);box-sizing:border-box;border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);padding:0 var(--emw--spacing-small, 12px)}.SelectorWrapper:first-child{border-radius:var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px) 0 0}.SelectorWrapper:last-child{border-radius:0 0 var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px)}.SelectorWrapper.checked{background:var(--emw--color-background-secondary, #F9F8F8)}.SelectorWrapper:not(.checked):hover{background:linear-gradient(0, var(--emw--color-background-secondary, #F9F8F8) 0%, var(--emw--color-background, #fff) 100%)}.MethodLogo{display:flex;justify-content:center;align-items:center;margin-right:var(--mmw--spacing-small, 14px);width:var(--mmw-logo-width, 110px);min-height:var(--mmw-logo-height, 64px);background:var(--emw--color-background, #FFF);border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--mmw--border-radius-medium-plus, 6px);overflow:hidden;max-height:calc(100% - var(--emw--spacing-small, 12px) - var(--emw--spacing-small, 12px))}.MethodLogo img{width:100%;height:100%}.MethodTitle{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-medium, 16px);word-break:break-all}.MethodLimits{display:flex;flex-direction:column;align-items:flex-end;margin-left:auto}.Limits{max-width:100%;white-space:nowrap;font-size:var(--emw--font-size-small, 14px);line-height:var(--emw--line-height-xl, 24px);color:var(--mmw--color-grey-290, #666);font-weight:var(--emw--font-weight-normal, 400);font-style:normal}.EmptyContentMessageWrapper{display:flex;flex-direction:column;box-sizing:border-box;background:var(--emw--color-gray-50, #F7F8FA);border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);padding:var(--emw--spacing-small, 12px);max-height:500px}.EmptyContentMessageHeader{display:flex;gap:4px;align-items:end}.EmptyContentMessageTitle{font-size:var(--emw--font-size-small, 16px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--emw--color-warning, rgb(250, 146, 0))}.EmptyContentMessageText{word-break:break-word;padding:var(--emw--spacing-small, 12px) calc(var(--emw--spacing-small, 12px) / 2);font-size:var(--emw--font-size-small, 14px)}.EmptyContentMessageDesktop p{font-size:var(--emw--font-size-medium, 16px)}.IconWarning{width:30px;display:flex}.IconWarning svg{height:18px;fill:var(--emw--color-warning, rgb(250, 146, 0))}.ShowAllButton{cursor:pointer;color:var(--mmw--color-grey-290, #666);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);font-family:inherit;background:var(--emw--color-gray-50, #F7F8FA);line-height:normal;border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin:var(--emw--spacing-small, 12px) auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}.ShowAllButton:hover{background:var(--emw--color-background, #fff)}@container method-list (width < 450px){.MethodLogo{min-width:var(--mmw-logo-small-width, 90px);min-height:var(--mmw-logo--small-height, 50px);overflow:hidden}.CashierMethodList .MethodTitle{display:inline-block;flex-grow:1;font-size:var(--emw--font-size-medium, 16px);line-height:120%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.CashierMethodList .MethodLimits .Limits{flex-shrink:0;font-size:var(--emw--font-size-x-small, 12px)}}@container method-list (max-width: 300px){.Limits{display:none}}")}function te(n,t,s){const a=n.slice();return a[48]=t[s],a[50]=s,a}function ne(n){let t;return{c(){t=e.element("cashier-spinner"),e.set_custom_element_data(t,"clientstylingurl",n[4]),e.set_custom_element_data(t,"clientstyling",n[3])},m(s,a){e.insert(s,t,a)},p(s,a){a[0]&16&&e.set_custom_element_data(t,"clientstylingurl",s[4]),a[0]&8&&e.set_custom_element_data(t,"clientstyling",s[3])},d(s){s&&e.detach(t)}}}function se(n){let t,s,a,m,o=e.ensure_array_like(n[8]),r=[];for(let c=0;c<o.length;c+=1)r[c]=le(te(n,o,c));let i=n[13]&&!n[12]&&ie(n),d=n[7]&&oe(n);return{c(){t=e.element("div"),s=e.element("div");for(let c=0;c<r.length;c+=1)r[c].c();a=e.space(),i&&i.c(),m=e.space(),d&&d.c(),e.attr(s,"class","CashierMethodList"),e.attr(t,"class","CashierMethodListWidget")},m(c,g){e.insert(c,t,g),e.append(t,s);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(s,null);e.append(s,a),i&&i.m(s,null),e.append(t,m),d&&d.m(t,null),n[27](t)},p(c,g){if(g[0]&115008){o=e.ensure_array_like(c[8]);let u;for(u=0;u<o.length;u+=1){const p=te(c,o,u);r[u]?r[u].p(p,g):(r[u]=le(p),r[u].c(),r[u].m(s,a))}for(;u<r.length;u+=1)r[u].d(1);r.length=o.length}c[13]&&!c[12]?i?i.p(c,g):(i=ie(c),i.c(),i.m(s,null)):i&&(i.d(1),i=null),c[7]?d?d.p(c,g):(d=oe(c),d.c(),d.m(t,null)):d&&(d.d(1),d=null)},d(c){c&&e.detach(t),e.destroy_each(r,c),i&&i.d(),d&&d.d(),n[27](null)}}}function le(n){let t,s,a,m,o,r,i,d,c=(n[48].Label||n[48].Name)+"",g,u,p,f,k=n[14]("generalMin")+"",S,b,M=n[15].format(n[48].DisplayCurrency.MinAmountLimit)+"",C,x,y=n[48].DisplayCurrency.Name+"",E,W,v,T=n[14]("generalMax")+"",A,D,P=n[15].format(n[48].DisplayCurrency.MaxAmountLimit)+"",N,U,F=n[48].DisplayCurrency.Name+"",j,O,R;function B(){return n[25](n[48])}return{c(){t=e.element("div"),s=e.element("div"),a=e.element("img"),r=e.space(),i=e.element("div"),d=e.element("span"),g=e.text(c),u=e.space(),p=e.element("div"),f=e.element("span"),S=e.text(k),b=e.space(),C=e.text(M),x=e.space(),E=e.text(y),W=e.space(),v=e.element("span"),A=e.text(T),D=e.space(),N=e.text(P),U=e.space(),j=e.text(F),e.src_url_equal(a.src,m=n[48].LogoUrl)||e.attr(a,"src",m),e.attr(a,"alt",o=n[48].Label),e.attr(s,"class","MethodLogo"),e.attr(i,"class","MethodTitle"),e.attr(f,"class","Limits"),e.attr(v,"class","Limits"),e.attr(p,"class","MethodLimits"),e.attr(t,"class","SelectorWrapper"),e.toggle_class(t,"checked",n[6]===n[48].Name)},m(z,_){e.insert(z,t,_),e.append(t,s),e.append(s,a),e.append(t,r),e.append(t,i),e.append(i,d),e.append(d,g),e.append(t,u),e.append(t,p),e.append(p,f),e.append(f,S),e.append(f,b),e.append(f,C),e.append(f,x),e.append(f,E),e.append(p,W),e.append(p,v),e.append(v,A),e.append(v,D),e.append(v,N),e.append(v,U),e.append(v,j),O||(R=[e.listen(t,"click",B),e.listen(t,"keyup",xe)],O=!0)},p(z,_){n=z,_[0]&256&&!e.src_url_equal(a.src,m=n[48].LogoUrl)&&e.attr(a,"src",m),_[0]&256&&o!==(o=n[48].Label)&&e.attr(a,"alt",o),_[0]&256&&c!==(c=(n[48].Label||n[48].Name)+"")&&e.set_data(g,c),_[0]&16384&&k!==(k=n[14]("generalMin")+"")&&e.set_data(S,k),_[0]&256&&M!==(M=n[15].format(n[48].DisplayCurrency.MinAmountLimit)+"")&&e.set_data(C,M),_[0]&256&&y!==(y=n[48].DisplayCurrency.Name+"")&&e.set_data(E,y),_[0]&16384&&T!==(T=n[14]("generalMax")+"")&&e.set_data(A,T),_[0]&256&&P!==(P=n[15].format(n[48].DisplayCurrency.MaxAmountLimit)+"")&&e.set_data(N,P),_[0]&256&&F!==(F=n[48].DisplayCurrency.Name+"")&&e.set_data(j,F),_[0]&320&&e.toggle_class(t,"checked",n[6]===n[48].Name)},d(z){z&&e.detach(t),O=!1,e.run_all(R)}}}function ie(n){let t,s,a,m,o,r=n[14]("error")+"",i,d,c,g=n[14]("noPaymentMethods")+"",u;return{c(){t=e.element("div"),s=e.element("div"),a=e.element("div"),a.innerHTML='<svg fill="currentColor" height="200px" width="200px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 294.995 294.995" xml:space="preserve" stroke="#fa9200"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><g><path d="M291.874,248.279L165.605,26.526c-4.007-7.037-10.776-11.26-18.107-11.26s-14.101,4.202-18.107,11.239L3.121,248.238 c-3.979,6.989-4.164,15.013-0.493,21.326c3.67,6.313,10.663,10.165,18.705,10.165h252.329c8.042,0,15.035-3.852,18.705-10.165 C296.038,263.251,295.854,255.268,291.874,248.279z M146.665,86.229c9.665,0,17.5,7.835,17.5,17.5v63c0,9.665-7.835,17.5-17.5,17.5 c-9.665,0-17.5-7.835-17.5-17.5v-63C129.165,94.064,137,86.229,146.665,86.229z M147.498,204.005c9.665,0,17.5,7.835,17.5,17.5 c0,9.665-7.835,17.5-17.5,17.5c-9.665,0-17.5-7.835-17.5-17.5C129.998,211.84,137.833,204.005,147.498,204.005z"></path></g></g></svg>',m=e.space(),o=e.element("p"),i=e.text(r),d=e.space(),c=e.element("p"),u=e.text(g),e.attr(a,"class","IconWarning"),e.attr(o,"class","EmptyContentMessageTitle"),e.attr(s,"class","EmptyContentMessageHeader"),e.attr(c,"class","EmptyContentMessageText"),e.attr(t,"class","EmptyContentMessageWrapper"),e.toggle_class(t,"EmptyContentMessageDesktop",n[11])},m(p,f){e.insert(p,t,f),e.append(t,s),e.append(s,a),e.append(s,m),e.append(s,o),e.append(o,i),e.append(t,d),e.append(t,c),e.append(c,u)},p(p,f){f[0]&16384&&r!==(r=p[14]("error")+"")&&e.set_data(i,r),f[0]&16384&&g!==(g=p[14]("noPaymentMethods")+"")&&e.set_data(u,g),f[0]&2048&&e.toggle_class(t,"EmptyContentMessageDesktop",p[11])},d(p){p&&e.detach(t)}}}function oe(n){let t,s,a,m;return{c(){t=e.element("div"),s=e.text(n[7]),e.attr(t,"class","ShowAllButton")},m(o,r){e.insert(o,t,r),e.append(t,s),a||(m=e.listen(t,"click",n[26]),a=!0)},p(o,r){r[0]&128&&e.set_data(s,o[7])},d(o){o&&e.detach(t),a=!1,m()}}}function re(n){let t,s,a;return{c(){t=e.element("cashier-error"),s=e.element("span"),a=e.text(n[10]),e.attr(s,"slot","text"),e.set_custom_element_data(t,"lang",n[0]),e.set_custom_element_data(t,"assetsurl",n[1]),e.set_custom_element_data(t,"translationurl",n[2]),e.set_custom_element_data(t,"clientstylingurl",n[4]),e.set_custom_element_data(t,"clientstyling",n[3]),e.set_custom_element_data(t,"hidebuttons","true")},m(m,o){e.insert(m,t,o),e.append(t,s),e.append(s,a)},p(m,o){o[0]&1024&&e.set_data(a,m[10]),o[0]&1&&e.set_custom_element_data(t,"lang",m[0]),o[0]&2&&e.set_custom_element_data(t,"assetsurl",m[1]),o[0]&4&&e.set_custom_element_data(t,"translationurl",m[2]),o[0]&16&&e.set_custom_element_data(t,"clientstylingurl",m[4]),o[0]&8&&e.set_custom_element_data(t,"clientstyling",m[3])},d(m){m&&e.detach(t)}}}function Se(n){let t,s,a,m=n[12]&&ne(n),o=(n[9]||n[11])&&se(n),r=n[10]&&re(n);return{c(){m&&m.c(),t=e.space(),o&&o.c(),s=e.space(),r&&r.c(),a=e.empty()},m(i,d){m&&m.m(i,d),e.insert(i,t,d),o&&o.m(i,d),e.insert(i,s,d),r&&r.m(i,d),e.insert(i,a,d)},p(i,d){i[12]?m?m.p(i,d):(m=ne(i),m.c(),m.m(t.parentNode,t)):m&&(m.d(1),m=null),i[9]||i[11]?o?o.p(i,d):(o=se(i),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null),i[10]?r?r.p(i,d):(r=re(i),r.c(),r.m(a.parentNode,a)):r&&(r.d(1),r=null)},i:e.noop,o:e.noop,d(i){i&&(e.detach(t),e.detach(s),e.detach(a)),m&&m.d(i),o&&o.d(i),r&&r.d(i)}}}const xe=()=>{};function Ee(n,t,s){let a;e.component_subscribe(n,q.$format,l=>s(14,a=l)),Y.dayjs.extend(Y.utc);let{lang:m="en"}=t,{local:o="en-US"}=t,{endpoint:r}=t,{session:i}=t,{customerid:d}=t,{assetsurl:c}=t,{currency:g}=t,{numberofmethodsshown:u}=t,{translationurl:p=""}=t,{clientstyling:f=""}=t,{clientstylingurl:k=""}=t,{ismobileview:S}=t,b=[],M,C,x="",y=[],E=!0,W=new Intl.NumberFormat(o,{minimumFractionDigits:2}),v="",T,A=!0,D=!1,P=!1;var N;(function(l){l.PlayerSessionIsNotValid="PlayerSessionIsNotValid",l.Success="Success",l.JwtTokenError="JwtTokenError"})(N||(N={})),e.createEventDispatcher();const U=()=>{let l=p;if(l)return fetch(l).then(h=>h.json()).then(h=>{Object.keys(h).forEach(L=>{$(L,h[L])})}).catch(h=>{console.log(h)})};Object.keys(ee).forEach(l=>{$(l,ee[l])});const F=()=>{ke(m)},j=()=>{s(12,D=!0);const l=new URL(`${r}/v1/player/${d}/payment/GetPaymentMetadata`),h=new Headers;h.append("accept","application/json"),h.append("Content-Type","application/json"),h.append("X-Client-Request-Timestamp",Y.dayjs.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));const L={method:"POST",headers:h,body:JSON.stringify({XPaymentSessionToken:i,Currency:g,Tags:{UserAgent:window.navigator.userAgent}})};fetch(l,L).then(w=>w.json()).then(w=>{var H;if(w.error){s(10,v=w.error);return}if(w.ResponseCode!==N.Success){T=w.ResponseCode,z();return}b=(H=w.PaymentMethods)!=null&&H.Ordering?O(w):R(w),s(7,x=u&&+u>0&&b.length>+u?a("showAll"):""),s(8,y=x?b.slice(0,+u):b),window.postMessage({type:"StartSessionCountdown",paymentMethodName:b[0].Name,xPaymentSessionToken:w.XPaymentSessionToken},window.location.href),window.postMessage({type:"DataLoading",isDataLoaded:!1})}).finally(()=>{s(12,D=!1),window.postMessage({type:"DataLoading",isDataLoaded:!0}),s(13,P=!y.length)})},O=l=>{const h=[];return l.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach(L=>{const w=l.PaymentMethods.PaymentMethods.find(H=>H.Name===L);if(w){const H=(w==null?void 0:w.Logos.find(I=>I.LogoType==="Desktop"))||{},_e=(w==null?void 0:w.Logos.find(I=>I.LogoType==="Mobile"))||{},Z=A?H:_e;h.push(V(G({},w),{LogoUrl:Z.LogoUrl?`https:${Z.LogoUrl}`:""}))}}),h},R=l=>l.PaymentMethods.PaymentMethods.map(h=>V(G({},h),{LogoUrl:h.Logos&&h.Logos.length&&h.Logos[0].LogoUrl?`https:${h.Logos[0].LogoUrl}`:""})),B=l=>{s(6,C=l.Name),window.postMessage({type:"SelectPayMeth",details:l},window.location.href),dispatchEvent(new CustomEvent("selectPayMeth",{detail:l,bubbles:!0,cancelable:!0,composed:!0}))},z=()=>{window.postMessage({type:"ErrorResponseCode",errorResponseCode:T},window.location.href)},_=()=>{s(11,A=S==="false")},J=()=>{y==b?de():me()},me=()=>{s(8,y=b),s(7,x=a("showLess"))},de=()=>{s(8,y=b.slice(0,+u)),C&&!y.find(l=>l.Name===C)&&y.splice(0,0,b.find(l=>l.Name===C)),s(7,x=a("showAll"))},ce=()=>{s(9,E=!0)},ue=l=>{s(9,E=!l.hideMethodsList)},he=()=>{let l=document.createElement("style");l.innerHTML=f,M.appendChild(l)},pe=()=>{let l=new URL(k),h=document.createElement("style");fetch(l.href).then(L=>L.text()).then(L=>{h.innerHTML=L,setTimeout(()=>{M.appendChild(h)},1),setTimeout(()=>{},500)})};e.onMount(()=>(window.addEventListener("message",X,!1),()=>{window.removeEventListener("message",X,!1)}));const X=l=>{switch(l.data.type){case"BackToMethodList":ce();break;case"HideMethodsList":ue(l.data.details);break}},ge=l=>B(l),fe=()=>J();function we(l){e.binding_callbacks[l?"unshift":"push"](()=>{M=l,s(5,M)})}return n.$$set=l=>{"lang"in l&&s(0,m=l.lang),"local"in l&&s(18,o=l.local),"endpoint"in l&&s(19,r=l.endpoint),"session"in l&&s(20,i=l.session),"customerid"in l&&s(21,d=l.customerid),"assetsurl"in l&&s(1,c=l.assetsurl),"currency"in l&&s(22,g=l.currency),"numberofmethodsshown"in l&&s(23,u=l.numberofmethodsshown),"translationurl"in l&&s(2,p=l.translationurl),"clientstyling"in l&&s(3,f=l.clientstyling),"clientstylingurl"in l&&s(4,k=l.clientstylingurl),"ismobileview"in l&&s(24,S=l.ismobileview)},n.$$.update=()=>{n.$$.dirty[0]&3670016&&r&&i&&d&&j(),n.$$.dirty[0]&1&&m&&F(),n.$$.dirty[0]&40&&f&&M&&he(),n.$$.dirty[0]&48&&k&&M&&pe(),n.$$.dirty[0]&16777216&&S&&_(),n.$$.dirty[0]&5&&m&&p&&U()},[m,c,p,f,k,M,C,x,y,E,v,A,D,P,a,W,B,J,o,r,i,d,g,u,S,ge,fe,we]}class ae extends e.SvelteComponent{constructor(t){super(),e.init(this,t,Ee,Se,e.safe_not_equal,{lang:0,local:18,endpoint:19,session:20,customerid:21,assetsurl:1,currency:22,numberofmethodsshown:23,translationurl:2,clientstyling:3,clientstylingurl:4,ismobileview:24},Ce,[-1,-1])}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),e.flush()}get local(){return this.$$.ctx[18]}set local(t){this.$$set({local:t}),e.flush()}get endpoint(){return this.$$.ctx[19]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get session(){return this.$$.ctx[20]}set session(t){this.$$set({session:t}),e.flush()}get customerid(){return this.$$.ctx[21]}set customerid(t){this.$$set({customerid:t}),e.flush()}get assetsurl(){return this.$$.ctx[1]}set assetsurl(t){this.$$set({assetsurl:t}),e.flush()}get currency(){return this.$$.ctx[22]}set currency(t){this.$$set({currency:t}),e.flush()}get numberofmethodsshown(){return this.$$.ctx[23]}set numberofmethodsshown(t){this.$$set({numberofmethodsshown:t}),e.flush()}get translationurl(){return this.$$.ctx[2]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get clientstyling(){return this.$$.ctx[3]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[4]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get ismobileview(){return this.$$.ctx[24]}set ismobileview(t){this.$$set({ismobileview:t}),e.flush()}}e.create_custom_element(ae,{lang:{},local:{},endpoint:{},session:{},customerid:{},assetsurl:{},currency:{},numberofmethodsshown:{},translationurl:{},clientstyling:{},clientstylingurl:{},ismobileview:{}},[],[],!0);exports.default=ae;
|
|
1
|
+
"use strict";var ye=Object.defineProperty,be=Object.defineProperties;var Me=Object.getOwnPropertyDescriptors;var K=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable;var Q=(n,t,s)=>t in n?ye(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s,G=(n,t)=>{for(var s in t||(t={}))ve.call(t,s)&&Q(n,s,t[s]);if(K)for(var s of K(t))Le.call(t,s)&&Q(n,s,t[s]);return n},V=(n,t)=>be(n,Me(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CashierConfirmModal-BVT51ZOp.cjs"),q=require("./CashierError-YmV_PQP8.cjs"),Y=require("./CashierMethodDetails-Ba0LNaer.cjs");function $(n,t){q.addMessages(n,t)}function ke(n){q.init({fallbackLocale:"en"}),q.$locale.set(n)}const ee={en:{generalMin:"Min",generalMax:"Max",showAll:"SHOW ALL",showLess:"SHOW LESS",error:"Error",noPaymentMethods:"No payment methods available"},uk:{generalMin:"Мін",generalMax:"Макс"},hr:{generalMin:"Minimalno",generalMax:"Maksimalno",showAll:"Prikaži sve",showLess:"Prikaži manje"},tr:{generalMin:"Min",generalMax:"Maks",showAll:"HEPSİNİ GÖSTER",showLess:"DAHA AZ GÖSTER",error:"Hata",noPaymentMethods:"Hiçbir ödeme yöntemi mevcut değil"},"en-us":{generalMin:"Min",generalMax:"Max",showAll:"SHOW ALL",showLess:"SHOW LESS"}};function Ce(n){e.append_styles(n,"svelte-1wlv0rl","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CashierMethodList{display:flex;flex-direction:column;background:var(--emw--color-background, #fff);box-shadow:0 0 4px var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));width:100%;border-radius:var(--mmw--border-radius-medium-plus, 6px);container-name:method-list;container-type:inline-size}.SelectorWrapper{display:flex;flex-direction:row;align-items:center;justify-content:left;cursor:pointer;position:relative;height:var(--mmw-method-height, 80px);box-sizing:border-box;border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);padding:0 var(--emw--spacing-small, 12px)}.SelectorWrapper:first-child{border-radius:var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px) 0 0}.SelectorWrapper:last-child{border-radius:0 0 var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px)}.SelectorWrapper.checked{background:var(--emw--color-background-secondary, #F9F8F8)}.SelectorWrapper:not(.checked):hover{background:linear-gradient(0, var(--emw--color-background-secondary, #F9F8F8) 0%, var(--emw--color-background, #fff) 100%)}.MethodLogo{display:flex;justify-content:center;align-items:center;margin-right:var(--mmw--spacing-small, 14px);width:var(--mmw-logo-width, 110px);min-height:var(--mmw-logo-height, 64px);background:var(--emw--color-background, #FFF);border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--mmw--border-radius-medium-plus, 6px);overflow:hidden;max-height:calc(100% - var(--emw--spacing-small, 12px) - var(--emw--spacing-small, 12px))}.MethodLogo img{width:100%;height:100%}.MethodTitle{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-medium, 16px);word-break:break-all}.MethodLimits{display:flex;flex-direction:column;align-items:flex-end;margin-left:auto}.Limits{max-width:100%;white-space:nowrap;font-size:var(--emw--font-size-small, 14px);line-height:var(--emw--line-height-xl, 24px);color:var(--mmw--color-grey-290, #666);font-weight:var(--emw--font-weight-normal, 400);font-style:normal}.EmptyContentMessageWrapper{display:flex;flex-direction:column;box-sizing:border-box;background:var(--emw--color-gray-50, #F7F8FA);border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);padding:var(--emw--spacing-small, 12px);max-height:500px}.EmptyContentMessageHeader{display:flex;gap:4px;align-items:end}.EmptyContentMessageTitle{font-size:var(--emw--font-size-small, 16px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--emw--color-warning, rgb(250, 146, 0))}.EmptyContentMessageText{word-break:break-word;padding:var(--emw--spacing-small, 12px) calc(var(--emw--spacing-small, 12px) / 2);font-size:var(--emw--font-size-small, 14px)}.EmptyContentMessageDesktop p{font-size:var(--emw--font-size-medium, 16px)}.IconWarning{width:30px;display:flex}.IconWarning svg{height:18px;fill:var(--emw--color-warning, rgb(250, 146, 0))}.ShowAllButton{cursor:pointer;color:var(--mmw--color-grey-290, #666);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);font-family:inherit;background:var(--emw--color-gray-50, #F7F8FA);line-height:normal;border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin:var(--emw--spacing-small, 12px) auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}.ShowAllButton:hover{background:var(--emw--color-background, #fff)}@container method-list (width < 450px){.MethodLogo{min-width:var(--mmw-logo-small-width, 90px);min-height:var(--mmw-logo--small-height, 50px);overflow:hidden}.CashierMethodList .MethodTitle{display:inline-block;flex-grow:1;font-size:var(--emw--font-size-medium, 16px);line-height:120%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.CashierMethodList .MethodLimits .Limits{flex-shrink:0;font-size:var(--emw--font-size-x-small, 12px)}}@container method-list (max-width: 300px){.Limits{display:none}}")}function te(n,t,s){const a=n.slice();return a[48]=t[s],a[50]=s,a}function ne(n){let t;return{c(){t=e.element("cashier-spinner"),e.set_custom_element_data(t,"clientstylingurl",n[4]),e.set_custom_element_data(t,"clientstyling",n[3])},m(s,a){e.insert(s,t,a)},p(s,a){a[0]&16&&e.set_custom_element_data(t,"clientstylingurl",s[4]),a[0]&8&&e.set_custom_element_data(t,"clientstyling",s[3])},d(s){s&&e.detach(t)}}}function se(n){let t,s,a,m,o=e.ensure_array_like(n[8]),r=[];for(let c=0;c<o.length;c+=1)r[c]=le(te(n,o,c));let i=n[13]&&!n[12]&&ie(n),d=n[7]&&oe(n);return{c(){t=e.element("div"),s=e.element("div");for(let c=0;c<r.length;c+=1)r[c].c();a=e.space(),i&&i.c(),m=e.space(),d&&d.c(),e.attr(s,"class","CashierMethodList"),e.attr(t,"class","CashierMethodListWidget")},m(c,g){e.insert(c,t,g),e.append(t,s);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(s,null);e.append(s,a),i&&i.m(s,null),e.append(t,m),d&&d.m(t,null),n[27](t)},p(c,g){if(g[0]&115008){o=e.ensure_array_like(c[8]);let u;for(u=0;u<o.length;u+=1){const p=te(c,o,u);r[u]?r[u].p(p,g):(r[u]=le(p),r[u].c(),r[u].m(s,a))}for(;u<r.length;u+=1)r[u].d(1);r.length=o.length}c[13]&&!c[12]?i?i.p(c,g):(i=ie(c),i.c(),i.m(s,null)):i&&(i.d(1),i=null),c[7]?d?d.p(c,g):(d=oe(c),d.c(),d.m(t,null)):d&&(d.d(1),d=null)},d(c){c&&e.detach(t),e.destroy_each(r,c),i&&i.d(),d&&d.d(),n[27](null)}}}function le(n){let t,s,a,m,o,r,i,d,c=(n[48].Label||n[48].Name)+"",g,u,p,f,k=n[14]("generalMin")+"",S,b,M=n[15].format(n[48].DisplayCurrency.MinAmountLimit)+"",C,x,y=n[48].DisplayCurrency.Name+"",E,W,v,T=n[14]("generalMax")+"",A,D,P=n[15].format(n[48].DisplayCurrency.MaxAmountLimit)+"",N,U,F=n[48].DisplayCurrency.Name+"",j,O,R;function B(){return n[25](n[48])}return{c(){t=e.element("div"),s=e.element("div"),a=e.element("img"),r=e.space(),i=e.element("div"),d=e.element("span"),g=e.text(c),u=e.space(),p=e.element("div"),f=e.element("span"),S=e.text(k),b=e.space(),C=e.text(M),x=e.space(),E=e.text(y),W=e.space(),v=e.element("span"),A=e.text(T),D=e.space(),N=e.text(P),U=e.space(),j=e.text(F),e.src_url_equal(a.src,m=n[48].LogoUrl)||e.attr(a,"src",m),e.attr(a,"alt",o=n[48].Label),e.attr(s,"class","MethodLogo"),e.attr(i,"class","MethodTitle"),e.attr(f,"class","Limits"),e.attr(v,"class","Limits"),e.attr(p,"class","MethodLimits"),e.attr(t,"class","SelectorWrapper"),e.toggle_class(t,"checked",n[6]===n[48].Name)},m(z,_){e.insert(z,t,_),e.append(t,s),e.append(s,a),e.append(t,r),e.append(t,i),e.append(i,d),e.append(d,g),e.append(t,u),e.append(t,p),e.append(p,f),e.append(f,S),e.append(f,b),e.append(f,C),e.append(f,x),e.append(f,E),e.append(p,W),e.append(p,v),e.append(v,A),e.append(v,D),e.append(v,N),e.append(v,U),e.append(v,j),O||(R=[e.listen(t,"click",B),e.listen(t,"keyup",xe)],O=!0)},p(z,_){n=z,_[0]&256&&!e.src_url_equal(a.src,m=n[48].LogoUrl)&&e.attr(a,"src",m),_[0]&256&&o!==(o=n[48].Label)&&e.attr(a,"alt",o),_[0]&256&&c!==(c=(n[48].Label||n[48].Name)+"")&&e.set_data(g,c),_[0]&16384&&k!==(k=n[14]("generalMin")+"")&&e.set_data(S,k),_[0]&256&&M!==(M=n[15].format(n[48].DisplayCurrency.MinAmountLimit)+"")&&e.set_data(C,M),_[0]&256&&y!==(y=n[48].DisplayCurrency.Name+"")&&e.set_data(E,y),_[0]&16384&&T!==(T=n[14]("generalMax")+"")&&e.set_data(A,T),_[0]&256&&P!==(P=n[15].format(n[48].DisplayCurrency.MaxAmountLimit)+"")&&e.set_data(N,P),_[0]&256&&F!==(F=n[48].DisplayCurrency.Name+"")&&e.set_data(j,F),_[0]&320&&e.toggle_class(t,"checked",n[6]===n[48].Name)},d(z){z&&e.detach(t),O=!1,e.run_all(R)}}}function ie(n){let t,s,a,m,o,r=n[14]("error")+"",i,d,c,g=n[14]("noPaymentMethods")+"",u;return{c(){t=e.element("div"),s=e.element("div"),a=e.element("div"),a.innerHTML='<svg fill="currentColor" height="200px" width="200px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 294.995 294.995" xml:space="preserve" stroke="#fa9200"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><g><path d="M291.874,248.279L165.605,26.526c-4.007-7.037-10.776-11.26-18.107-11.26s-14.101,4.202-18.107,11.239L3.121,248.238 c-3.979,6.989-4.164,15.013-0.493,21.326c3.67,6.313,10.663,10.165,18.705,10.165h252.329c8.042,0,15.035-3.852,18.705-10.165 C296.038,263.251,295.854,255.268,291.874,248.279z M146.665,86.229c9.665,0,17.5,7.835,17.5,17.5v63c0,9.665-7.835,17.5-17.5,17.5 c-9.665,0-17.5-7.835-17.5-17.5v-63C129.165,94.064,137,86.229,146.665,86.229z M147.498,204.005c9.665,0,17.5,7.835,17.5,17.5 c0,9.665-7.835,17.5-17.5,17.5c-9.665,0-17.5-7.835-17.5-17.5C129.998,211.84,137.833,204.005,147.498,204.005z"></path></g></g></svg>',m=e.space(),o=e.element("p"),i=e.text(r),d=e.space(),c=e.element("p"),u=e.text(g),e.attr(a,"class","IconWarning"),e.attr(o,"class","EmptyContentMessageTitle"),e.attr(s,"class","EmptyContentMessageHeader"),e.attr(c,"class","EmptyContentMessageText"),e.attr(t,"class","EmptyContentMessageWrapper"),e.toggle_class(t,"EmptyContentMessageDesktop",n[11])},m(p,f){e.insert(p,t,f),e.append(t,s),e.append(s,a),e.append(s,m),e.append(s,o),e.append(o,i),e.append(t,d),e.append(t,c),e.append(c,u)},p(p,f){f[0]&16384&&r!==(r=p[14]("error")+"")&&e.set_data(i,r),f[0]&16384&&g!==(g=p[14]("noPaymentMethods")+"")&&e.set_data(u,g),f[0]&2048&&e.toggle_class(t,"EmptyContentMessageDesktop",p[11])},d(p){p&&e.detach(t)}}}function oe(n){let t,s,a,m;return{c(){t=e.element("div"),s=e.text(n[7]),e.attr(t,"class","ShowAllButton")},m(o,r){e.insert(o,t,r),e.append(t,s),a||(m=e.listen(t,"click",n[26]),a=!0)},p(o,r){r[0]&128&&e.set_data(s,o[7])},d(o){o&&e.detach(t),a=!1,m()}}}function re(n){let t,s,a;return{c(){t=e.element("cashier-error"),s=e.element("span"),a=e.text(n[10]),e.attr(s,"slot","text"),e.set_custom_element_data(t,"lang",n[0]),e.set_custom_element_data(t,"assetsurl",n[1]),e.set_custom_element_data(t,"translationurl",n[2]),e.set_custom_element_data(t,"clientstylingurl",n[4]),e.set_custom_element_data(t,"clientstyling",n[3]),e.set_custom_element_data(t,"hidebuttons","true")},m(m,o){e.insert(m,t,o),e.append(t,s),e.append(s,a)},p(m,o){o[0]&1024&&e.set_data(a,m[10]),o[0]&1&&e.set_custom_element_data(t,"lang",m[0]),o[0]&2&&e.set_custom_element_data(t,"assetsurl",m[1]),o[0]&4&&e.set_custom_element_data(t,"translationurl",m[2]),o[0]&16&&e.set_custom_element_data(t,"clientstylingurl",m[4]),o[0]&8&&e.set_custom_element_data(t,"clientstyling",m[3])},d(m){m&&e.detach(t)}}}function Se(n){let t,s,a,m=n[12]&&ne(n),o=(n[9]||n[11])&&se(n),r=n[10]&&re(n);return{c(){m&&m.c(),t=e.space(),o&&o.c(),s=e.space(),r&&r.c(),a=e.empty()},m(i,d){m&&m.m(i,d),e.insert(i,t,d),o&&o.m(i,d),e.insert(i,s,d),r&&r.m(i,d),e.insert(i,a,d)},p(i,d){i[12]?m?m.p(i,d):(m=ne(i),m.c(),m.m(t.parentNode,t)):m&&(m.d(1),m=null),i[9]||i[11]?o?o.p(i,d):(o=se(i),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null),i[10]?r?r.p(i,d):(r=re(i),r.c(),r.m(a.parentNode,a)):r&&(r.d(1),r=null)},i:e.noop,o:e.noop,d(i){i&&(e.detach(t),e.detach(s),e.detach(a)),m&&m.d(i),o&&o.d(i),r&&r.d(i)}}}const xe=()=>{};function Ee(n,t,s){let a;e.component_subscribe(n,q.$format,l=>s(14,a=l)),Y.dayjs.extend(Y.utc);let{lang:m="en"}=t,{local:o="en-US"}=t,{endpoint:r}=t,{session:i}=t,{customerid:d}=t,{assetsurl:c}=t,{currency:g}=t,{numberofmethodsshown:u}=t,{translationurl:p=""}=t,{clientstyling:f=""}=t,{clientstylingurl:k=""}=t,{ismobileview:S}=t,b=[],M,C,x="",y=[],E=!0,W=new Intl.NumberFormat(o,{minimumFractionDigits:2}),v="",T,A=!0,D=!1,P=!1;var N;(function(l){l.PlayerSessionIsNotValid="PlayerSessionIsNotValid",l.Success="Success",l.JwtTokenError="JwtTokenError"})(N||(N={})),e.createEventDispatcher();const U=()=>{let l=p;if(l)return fetch(l).then(h=>h.json()).then(h=>{Object.keys(h).forEach(L=>{$(L,h[L])})}).catch(h=>{console.log(h)})};Object.keys(ee).forEach(l=>{$(l,ee[l])});const F=()=>{ke(m)},j=()=>{s(12,D=!0);const l=new URL(`${r}/v1/player/${d}/payment/GetPaymentMetadata`),h=new Headers;h.append("accept","application/json"),h.append("Content-Type","application/json"),h.append("X-Client-Request-Timestamp",Y.dayjs.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));const L={method:"POST",headers:h,body:JSON.stringify({XPaymentSessionToken:i,Currency:g,Tags:{UserAgent:window.navigator.userAgent}})};fetch(l,L).then(w=>w.json()).then(w=>{var H;if(w.error){s(10,v=w.error);return}if(w.ResponseCode!==N.Success){T=w.ResponseCode,z();return}b=(H=w.PaymentMethods)!=null&&H.Ordering?O(w):R(w),s(7,x=u&&+u>0&&b.length>+u?a("showAll"):""),s(8,y=x?b.slice(0,+u):b),window.postMessage({type:"StartSessionCountdown",paymentMethodName:b[0].Name,xPaymentSessionToken:w.XPaymentSessionToken},window.location.href),window.postMessage({type:"DataLoading",isDataLoaded:!1})}).finally(()=>{s(12,D=!1),window.postMessage({type:"DataLoading",isDataLoaded:!0}),s(13,P=!y.length)})},O=l=>{const h=[];return l.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach(L=>{const w=l.PaymentMethods.PaymentMethods.find(H=>H.Name===L);if(w){const H=(w==null?void 0:w.Logos.find(I=>I.LogoType==="Desktop"))||{},_e=(w==null?void 0:w.Logos.find(I=>I.LogoType==="Mobile"))||{},Z=A?H:_e;h.push(V(G({},w),{LogoUrl:Z.LogoUrl?`https:${Z.LogoUrl}`:""}))}}),h},R=l=>l.PaymentMethods.PaymentMethods.map(h=>V(G({},h),{LogoUrl:h.Logos&&h.Logos.length&&h.Logos[0].LogoUrl?`https:${h.Logos[0].LogoUrl}`:""})),B=l=>{s(6,C=l.Name),window.postMessage({type:"SelectPayMeth",details:l},window.location.href),dispatchEvent(new CustomEvent("selectPayMeth",{detail:l,bubbles:!0,cancelable:!0,composed:!0}))},z=()=>{window.postMessage({type:"ErrorResponseCode",errorResponseCode:T},window.location.href)},_=()=>{s(11,A=S==="false")},J=()=>{y==b?de():me()},me=()=>{s(8,y=b),s(7,x=a("showLess"))},de=()=>{s(8,y=b.slice(0,+u)),C&&!y.find(l=>l.Name===C)&&y.splice(0,0,b.find(l=>l.Name===C)),s(7,x=a("showAll"))},ce=()=>{s(9,E=!0)},ue=l=>{s(9,E=!l.hideMethodsList)},he=()=>{let l=document.createElement("style");l.innerHTML=f,M.appendChild(l)},pe=()=>{let l=new URL(k),h=document.createElement("style");fetch(l.href).then(L=>L.text()).then(L=>{h.innerHTML=L,setTimeout(()=>{M.appendChild(h)},1),setTimeout(()=>{},500)})};e.onMount(()=>(window.addEventListener("message",X,!1),()=>{window.removeEventListener("message",X,!1)}));const X=l=>{switch(l.data.type){case"BackToMethodList":ce();break;case"HideMethodsList":ue(l.data.details);break}},ge=l=>B(l),fe=()=>J();function we(l){e.binding_callbacks[l?"unshift":"push"](()=>{M=l,s(5,M)})}return n.$$set=l=>{"lang"in l&&s(0,m=l.lang),"local"in l&&s(18,o=l.local),"endpoint"in l&&s(19,r=l.endpoint),"session"in l&&s(20,i=l.session),"customerid"in l&&s(21,d=l.customerid),"assetsurl"in l&&s(1,c=l.assetsurl),"currency"in l&&s(22,g=l.currency),"numberofmethodsshown"in l&&s(23,u=l.numberofmethodsshown),"translationurl"in l&&s(2,p=l.translationurl),"clientstyling"in l&&s(3,f=l.clientstyling),"clientstylingurl"in l&&s(4,k=l.clientstylingurl),"ismobileview"in l&&s(24,S=l.ismobileview)},n.$$.update=()=>{n.$$.dirty[0]&3670016&&r&&i&&d&&j(),n.$$.dirty[0]&1&&m&&F(),n.$$.dirty[0]&40&&f&&M&&he(),n.$$.dirty[0]&48&&k&&M&&pe(),n.$$.dirty[0]&16777216&&S&&_(),n.$$.dirty[0]&5&&m&&p&&U()},[m,c,p,f,k,M,C,x,y,E,v,A,D,P,a,W,B,J,o,r,i,d,g,u,S,ge,fe,we]}class ae extends e.SvelteComponent{constructor(t){super(),e.init(this,t,Ee,Se,e.safe_not_equal,{lang:0,local:18,endpoint:19,session:20,customerid:21,assetsurl:1,currency:22,numberofmethodsshown:23,translationurl:2,clientstyling:3,clientstylingurl:4,ismobileview:24},Ce,[-1,-1])}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),e.flush()}get local(){return this.$$.ctx[18]}set local(t){this.$$set({local:t}),e.flush()}get endpoint(){return this.$$.ctx[19]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get session(){return this.$$.ctx[20]}set session(t){this.$$set({session:t}),e.flush()}get customerid(){return this.$$.ctx[21]}set customerid(t){this.$$set({customerid:t}),e.flush()}get assetsurl(){return this.$$.ctx[1]}set assetsurl(t){this.$$set({assetsurl:t}),e.flush()}get currency(){return this.$$.ctx[22]}set currency(t){this.$$set({currency:t}),e.flush()}get numberofmethodsshown(){return this.$$.ctx[23]}set numberofmethodsshown(t){this.$$set({numberofmethodsshown:t}),e.flush()}get translationurl(){return this.$$.ctx[2]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get clientstyling(){return this.$$.ctx[3]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[4]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get ismobileview(){return this.$$.ctx[24]}set ismobileview(t){this.$$set({ismobileview:t}),e.flush()}}e.create_custom_element(ae,{lang:{},local:{},endpoint:{},session:{},customerid:{},assetsurl:{},currency:{},numberofmethodsshown:{},translationurl:{},clientstyling:{},clientstylingurl:{},ismobileview:{}},[],[],!0);exports.default=ae;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
var Pe = Object.defineProperty, Ne = Object.defineProperties;
|
|
2
2
|
var ze = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var oe = Object.getOwnPropertySymbols;
|
|
4
|
-
var De = Object.prototype.hasOwnProperty,
|
|
4
|
+
var De = Object.prototype.hasOwnProperty, Fe = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var re = (t, e, s) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, ee = (t, e) => {
|
|
6
6
|
for (var s in e || (e = {}))
|
|
7
7
|
De.call(e, s) && re(t, s, e[s]);
|
|
8
8
|
if (oe)
|
|
9
9
|
for (var s of oe(e))
|
|
10
|
-
|
|
10
|
+
Fe.call(e, s) && re(t, s, e[s]);
|
|
11
11
|
return t;
|
|
12
12
|
}, te = (t, e) => Ne(t, ze(e));
|
|
13
|
-
import { S as
|
|
14
|
-
import { a as
|
|
15
|
-
import { d as de, u as Ze } from "./CashierMethodDetails-
|
|
13
|
+
import { S as He, b as We, f as S, c as je, a as Oe, d as Ue, h as _, x as Re, k as z, n as ae, v as D, w as Be, Q as Ie, G as Ge, g as b, E as v, K as me, j as y, l as d, M as Ve, y as x, D as ce, I as Z, A as se, z as T, r as qe, C as Ye } from "./CashierConfirmModal-BErwh2fQ.js";
|
|
14
|
+
import { a as Je, i as Xe, $ as Ke, b as Qe } from "./CashierError-DoHJAf67.js";
|
|
15
|
+
import { d as de, u as Ze } from "./CashierMethodDetails-T4mbzimW.js";
|
|
16
16
|
function ue(t, e) {
|
|
17
|
-
|
|
17
|
+
Je(t, e);
|
|
18
18
|
}
|
|
19
19
|
function $e(t) {
|
|
20
20
|
Xe({
|
|
@@ -79,7 +79,7 @@ function fe(t) {
|
|
|
79
79
|
);
|
|
80
80
|
},
|
|
81
81
|
m(s, r) {
|
|
82
|
-
|
|
82
|
+
z(s, e, r);
|
|
83
83
|
},
|
|
84
84
|
p(s, r) {
|
|
85
85
|
r[0] & /*clientstylingurl*/
|
|
@@ -97,7 +97,7 @@ function fe(t) {
|
|
|
97
97
|
);
|
|
98
98
|
},
|
|
99
99
|
d(s) {
|
|
100
|
-
s &&
|
|
100
|
+
s && D(e);
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
}
|
|
@@ -124,7 +124,7 @@ function pe(t) {
|
|
|
124
124
|
r = _(), i && i.c(), a = _(), m && m.c(), y(s, "class", "CashierMethodList"), y(e, "class", "CashierMethodListWidget");
|
|
125
125
|
},
|
|
126
126
|
m(c, f) {
|
|
127
|
-
|
|
127
|
+
z(c, e, f), d(e, s);
|
|
128
128
|
for (let u = 0; u < o.length; u += 1)
|
|
129
129
|
o[u] && o[u].m(s, null);
|
|
130
130
|
d(s, r), i && i.m(s, null), d(e, a), m && m.m(e, null), t[27](e);
|
|
@@ -151,7 +151,7 @@ function pe(t) {
|
|
|
151
151
|
c[7] ? m ? m.p(c, f) : (m = be(c), m.c(), m.m(e, null)) : m && (m.d(1), m = null);
|
|
152
152
|
},
|
|
153
153
|
d(c) {
|
|
154
|
-
c &&
|
|
154
|
+
c && D(e), Ve(o, c), i && i.d(), m && m.d(), t[27](null);
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
157
|
}
|
|
@@ -163,19 +163,19 @@ function we(t) {
|
|
|
163
163
|
), f, u, h, p, P = (
|
|
164
164
|
/*$_*/
|
|
165
165
|
t[14]("generalMin") + ""
|
|
166
|
-
),
|
|
166
|
+
), F, k, C = (
|
|
167
167
|
/*formatter*/
|
|
168
168
|
t[15].format(
|
|
169
169
|
/*payMeth*/
|
|
170
170
|
t[48].DisplayCurrency.MinAmountLimit
|
|
171
171
|
) + ""
|
|
172
|
-
), N,
|
|
172
|
+
), N, H, L = (
|
|
173
173
|
/*payMeth*/
|
|
174
174
|
t[48].DisplayCurrency.Name + ""
|
|
175
|
-
), W,
|
|
175
|
+
), W, J, E, j = (
|
|
176
176
|
/*$_*/
|
|
177
177
|
t[14]("generalMax") + ""
|
|
178
|
-
),
|
|
178
|
+
), O, I, U = (
|
|
179
179
|
/*formatter*/
|
|
180
180
|
t[15].format(
|
|
181
181
|
/*payMeth*/
|
|
@@ -184,7 +184,7 @@ function we(t) {
|
|
|
184
184
|
), R, X, G = (
|
|
185
185
|
/*payMeth*/
|
|
186
186
|
t[48].DisplayCurrency.Name + ""
|
|
187
|
-
), q,
|
|
187
|
+
), q, Y, K;
|
|
188
188
|
function Q() {
|
|
189
189
|
return (
|
|
190
190
|
/*click_handler*/
|
|
@@ -196,7 +196,7 @@ function we(t) {
|
|
|
196
196
|
}
|
|
197
197
|
return {
|
|
198
198
|
c() {
|
|
199
|
-
e = b("div"), s = b("div"), r = b("img"), o = _(), i = b("div"), m = b("span"), f =
|
|
199
|
+
e = b("div"), s = b("div"), r = b("img"), o = _(), i = b("div"), m = b("span"), f = x(c), u = _(), h = b("div"), p = b("span"), F = x(P), k = _(), N = x(C), H = _(), W = x(L), J = _(), E = b("span"), O = x(j), I = _(), R = x(U), X = _(), q = x(G), ce(r.src, a = /*payMeth*/
|
|
200
200
|
t[48].LogoUrl) || y(r, "src", a), y(r, "alt", l = /*payMeth*/
|
|
201
201
|
t[48].Label), y(s, "class", "MethodLogo"), y(i, "class", "MethodTitle"), y(p, "class", "Limits"), y(E, "class", "Limits"), y(h, "class", "MethodLimits"), y(e, "class", "SelectorWrapper"), Z(
|
|
202
202
|
e,
|
|
@@ -207,10 +207,10 @@ function we(t) {
|
|
|
207
207
|
);
|
|
208
208
|
},
|
|
209
209
|
m(B, M) {
|
|
210
|
-
|
|
210
|
+
z(B, e, M), d(e, s), d(s, r), d(e, o), d(e, i), d(i, m), d(m, f), d(e, u), d(e, h), d(h, p), d(p, F), d(p, k), d(p, N), d(p, H), d(p, W), d(h, J), d(h, E), d(E, O), d(E, I), d(E, R), d(E, X), d(E, q), Y || (K = [
|
|
211
211
|
se(e, "click", Q),
|
|
212
212
|
se(e, "keyup", st)
|
|
213
|
-
],
|
|
213
|
+
], Y = !0);
|
|
214
214
|
},
|
|
215
215
|
p(B, M) {
|
|
216
216
|
t = B, M[0] & /*paymentMethodsToShow*/
|
|
@@ -220,25 +220,25 @@ function we(t) {
|
|
|
220
220
|
t[48].Label) && y(r, "alt", l), M[0] & /*paymentMethodsToShow*/
|
|
221
221
|
256 && c !== (c = /*payMeth*/
|
|
222
222
|
(t[48].Label || /*payMeth*/
|
|
223
|
-
t[48].Name) + "") &&
|
|
223
|
+
t[48].Name) + "") && T(f, c), M[0] & /*$_*/
|
|
224
224
|
16384 && P !== (P = /*$_*/
|
|
225
|
-
t[14]("generalMin") + "") &&
|
|
225
|
+
t[14]("generalMin") + "") && T(F, P), M[0] & /*paymentMethodsToShow*/
|
|
226
226
|
256 && C !== (C = /*formatter*/
|
|
227
227
|
t[15].format(
|
|
228
228
|
/*payMeth*/
|
|
229
229
|
t[48].DisplayCurrency.MinAmountLimit
|
|
230
|
-
) + "") &&
|
|
230
|
+
) + "") && T(N, C), M[0] & /*paymentMethodsToShow*/
|
|
231
231
|
256 && L !== (L = /*payMeth*/
|
|
232
|
-
t[48].DisplayCurrency.Name + "") &&
|
|
233
|
-
16384 &&
|
|
234
|
-
t[14]("generalMax") + "") &&
|
|
235
|
-
256 &&
|
|
232
|
+
t[48].DisplayCurrency.Name + "") && T(W, L), M[0] & /*$_*/
|
|
233
|
+
16384 && j !== (j = /*$_*/
|
|
234
|
+
t[14]("generalMax") + "") && T(O, j), M[0] & /*paymentMethodsToShow*/
|
|
235
|
+
256 && U !== (U = /*formatter*/
|
|
236
236
|
t[15].format(
|
|
237
237
|
/*payMeth*/
|
|
238
238
|
t[48].DisplayCurrency.MaxAmountLimit
|
|
239
|
-
) + "") &&
|
|
239
|
+
) + "") && T(R, U), M[0] & /*paymentMethodsToShow*/
|
|
240
240
|
256 && G !== (G = /*payMeth*/
|
|
241
|
-
t[48].DisplayCurrency.Name + "") &&
|
|
241
|
+
t[48].DisplayCurrency.Name + "") && T(q, G), M[0] & /*selectedPaymentMethod, paymentMethodsToShow*/
|
|
242
242
|
320 && Z(
|
|
243
243
|
e,
|
|
244
244
|
"checked",
|
|
@@ -248,7 +248,7 @@ function we(t) {
|
|
|
248
248
|
);
|
|
249
249
|
},
|
|
250
250
|
d(B) {
|
|
251
|
-
B &&
|
|
251
|
+
B && D(e), Y = !1, qe(K);
|
|
252
252
|
}
|
|
253
253
|
};
|
|
254
254
|
}
|
|
@@ -262,7 +262,7 @@ function ye(t) {
|
|
|
262
262
|
), u;
|
|
263
263
|
return {
|
|
264
264
|
c() {
|
|
265
|
-
e = b("div"), s = b("div"), r = b("div"), r.innerHTML = '<svg fill="currentColor" height="200px" width="200px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 294.995 294.995" xml:space="preserve" stroke="#fa9200"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><g><path d="M291.874,248.279L165.605,26.526c-4.007-7.037-10.776-11.26-18.107-11.26s-14.101,4.202-18.107,11.239L3.121,248.238 c-3.979,6.989-4.164,15.013-0.493,21.326c3.67,6.313,10.663,10.165,18.705,10.165h252.329c8.042,0,15.035-3.852,18.705-10.165 C296.038,263.251,295.854,255.268,291.874,248.279z M146.665,86.229c9.665,0,17.5,7.835,17.5,17.5v63c0,9.665-7.835,17.5-17.5,17.5 c-9.665,0-17.5-7.835-17.5-17.5v-63C129.165,94.064,137,86.229,146.665,86.229z M147.498,204.005c9.665,0,17.5,7.835,17.5,17.5 c0,9.665-7.835,17.5-17.5,17.5c-9.665,0-17.5-7.835-17.5-17.5C129.998,211.84,137.833,204.005,147.498,204.005z"></path></g></g></svg>', a = _(), l = b("p"), i =
|
|
265
|
+
e = b("div"), s = b("div"), r = b("div"), r.innerHTML = '<svg fill="currentColor" height="200px" width="200px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 294.995 294.995" xml:space="preserve" stroke="#fa9200"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><g><path d="M291.874,248.279L165.605,26.526c-4.007-7.037-10.776-11.26-18.107-11.26s-14.101,4.202-18.107,11.239L3.121,248.238 c-3.979,6.989-4.164,15.013-0.493,21.326c3.67,6.313,10.663,10.165,18.705,10.165h252.329c8.042,0,15.035-3.852,18.705-10.165 C296.038,263.251,295.854,255.268,291.874,248.279z M146.665,86.229c9.665,0,17.5,7.835,17.5,17.5v63c0,9.665-7.835,17.5-17.5,17.5 c-9.665,0-17.5-7.835-17.5-17.5v-63C129.165,94.064,137,86.229,146.665,86.229z M147.498,204.005c9.665,0,17.5,7.835,17.5,17.5 c0,9.665-7.835,17.5-17.5,17.5c-9.665,0-17.5-7.835-17.5-17.5C129.998,211.84,137.833,204.005,147.498,204.005z"></path></g></g></svg>', a = _(), l = b("p"), i = x(o), m = _(), c = b("p"), u = x(f), y(r, "class", "IconWarning"), y(l, "class", "EmptyContentMessageTitle"), y(s, "class", "EmptyContentMessageHeader"), y(c, "class", "EmptyContentMessageText"), y(e, "class", "EmptyContentMessageWrapper"), Z(
|
|
266
266
|
e,
|
|
267
267
|
"EmptyContentMessageDesktop",
|
|
268
268
|
/*desktopView*/
|
|
@@ -270,14 +270,14 @@ function ye(t) {
|
|
|
270
270
|
);
|
|
271
271
|
},
|
|
272
272
|
m(h, p) {
|
|
273
|
-
|
|
273
|
+
z(h, e, p), d(e, s), d(s, r), d(s, a), d(s, l), d(l, i), d(e, m), d(e, c), d(c, u);
|
|
274
274
|
},
|
|
275
275
|
p(h, p) {
|
|
276
276
|
p[0] & /*$_*/
|
|
277
277
|
16384 && o !== (o = /*$_*/
|
|
278
|
-
h[14]("error") + "") &&
|
|
278
|
+
h[14]("error") + "") && T(i, o), p[0] & /*$_*/
|
|
279
279
|
16384 && f !== (f = /*$_*/
|
|
280
|
-
h[14]("noPaymentMethods") + "") &&
|
|
280
|
+
h[14]("noPaymentMethods") + "") && T(u, f), p[0] & /*desktopView*/
|
|
281
281
|
2048 && Z(
|
|
282
282
|
e,
|
|
283
283
|
"EmptyContentMessageDesktop",
|
|
@@ -286,7 +286,7 @@ function ye(t) {
|
|
|
286
286
|
);
|
|
287
287
|
},
|
|
288
288
|
d(h) {
|
|
289
|
-
h &&
|
|
289
|
+
h && D(e);
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
292
|
}
|
|
@@ -294,13 +294,13 @@ function be(t) {
|
|
|
294
294
|
let e, s, r, a;
|
|
295
295
|
return {
|
|
296
296
|
c() {
|
|
297
|
-
e = b("div"), s =
|
|
297
|
+
e = b("div"), s = x(
|
|
298
298
|
/*methodsButtonToggleText*/
|
|
299
299
|
t[7]
|
|
300
300
|
), y(e, "class", "ShowAllButton");
|
|
301
301
|
},
|
|
302
302
|
m(l, o) {
|
|
303
|
-
|
|
303
|
+
z(l, e, o), d(e, s), r || (a = se(
|
|
304
304
|
e,
|
|
305
305
|
"click",
|
|
306
306
|
/*click_handler_1*/
|
|
@@ -309,14 +309,14 @@ function be(t) {
|
|
|
309
309
|
},
|
|
310
310
|
p(l, o) {
|
|
311
311
|
o[0] & /*methodsButtonToggleText*/
|
|
312
|
-
128 &&
|
|
312
|
+
128 && T(
|
|
313
313
|
s,
|
|
314
314
|
/*methodsButtonToggleText*/
|
|
315
315
|
l[7]
|
|
316
316
|
);
|
|
317
317
|
},
|
|
318
318
|
d(l) {
|
|
319
|
-
l &&
|
|
319
|
+
l && D(e), r = !1, a();
|
|
320
320
|
}
|
|
321
321
|
};
|
|
322
322
|
}
|
|
@@ -324,7 +324,7 @@ function ve(t) {
|
|
|
324
324
|
let e, s, r;
|
|
325
325
|
return {
|
|
326
326
|
c() {
|
|
327
|
-
e = b("cashier-error"), s = b("span"), r =
|
|
327
|
+
e = b("cashier-error"), s = b("span"), r = x(
|
|
328
328
|
/*errorMessage*/
|
|
329
329
|
t[10]
|
|
330
330
|
), y(s, "slot", "text"), v(
|
|
@@ -355,11 +355,11 @@ function ve(t) {
|
|
|
355
355
|
), v(e, "hidebuttons", "true");
|
|
356
356
|
},
|
|
357
357
|
m(a, l) {
|
|
358
|
-
|
|
358
|
+
z(a, e, l), d(e, s), d(s, r);
|
|
359
359
|
},
|
|
360
360
|
p(a, l) {
|
|
361
361
|
l[0] & /*errorMessage*/
|
|
362
|
-
1024 &&
|
|
362
|
+
1024 && T(
|
|
363
363
|
r,
|
|
364
364
|
/*errorMessage*/
|
|
365
365
|
a[10]
|
|
@@ -396,7 +396,7 @@ function ve(t) {
|
|
|
396
396
|
);
|
|
397
397
|
},
|
|
398
398
|
d(a) {
|
|
399
|
-
a &&
|
|
399
|
+
a && D(e);
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
}
|
|
@@ -414,10 +414,10 @@ function tt(t) {
|
|
|
414
414
|
);
|
|
415
415
|
return {
|
|
416
416
|
c() {
|
|
417
|
-
a && a.c(), e = _(), l && l.c(), s = _(), o && o.c(), r =
|
|
417
|
+
a && a.c(), e = _(), l && l.c(), s = _(), o && o.c(), r = Re();
|
|
418
418
|
},
|
|
419
419
|
m(i, m) {
|
|
420
|
-
a && a.m(i, m),
|
|
420
|
+
a && a.m(i, m), z(i, e, m), l && l.m(i, m), z(i, s, m), o && o.m(i, m), z(i, r, m);
|
|
421
421
|
},
|
|
422
422
|
p(i, m) {
|
|
423
423
|
/*showSpinner*/
|
|
@@ -429,7 +429,7 @@ function tt(t) {
|
|
|
429
429
|
i: ae,
|
|
430
430
|
o: ae,
|
|
431
431
|
d(i) {
|
|
432
|
-
i && (
|
|
432
|
+
i && (D(e), D(s), D(r)), a && a.d(i), l && l.d(i), o && o.d(i);
|
|
433
433
|
}
|
|
434
434
|
};
|
|
435
435
|
}
|
|
@@ -437,12 +437,12 @@ const st = () => {
|
|
|
437
437
|
};
|
|
438
438
|
function nt(t, e, s) {
|
|
439
439
|
let r;
|
|
440
|
-
|
|
441
|
-
let { lang: a = "en" } = e, { local: l = "en-US" } = e, { endpoint: o } = e, { session: i } = e, { customerid: m } = e, { assetsurl: c } = e, { currency: f } = e, { numberofmethodsshown: u } = e, { translationurl: h = "" } = e, { clientstyling: p = "" } = e, { clientstylingurl: P = "" } = e, { ismobileview:
|
|
440
|
+
Be(t, Qe, (n) => s(14, r = n)), de.extend(Ze);
|
|
441
|
+
let { lang: a = "en" } = e, { local: l = "en-US" } = e, { endpoint: o } = e, { session: i } = e, { customerid: m } = e, { assetsurl: c } = e, { currency: f } = e, { numberofmethodsshown: u } = e, { translationurl: h = "" } = e, { clientstyling: p = "" } = e, { clientstylingurl: P = "" } = e, { ismobileview: F } = e, k = [], C, N, H = "", L = [], W = !0, J = new Intl.NumberFormat(l, { minimumFractionDigits: 2 }), E = "", j, O = !0, I = !1, U = !1;
|
|
442
442
|
var R;
|
|
443
443
|
(function(n) {
|
|
444
444
|
n.PlayerSessionIsNotValid = "PlayerSessionIsNotValid", n.Success = "Success", n.JwtTokenError = "JwtTokenError";
|
|
445
|
-
})(R || (R = {})),
|
|
445
|
+
})(R || (R = {})), Ie();
|
|
446
446
|
const X = () => {
|
|
447
447
|
let n = h;
|
|
448
448
|
if (n)
|
|
@@ -479,10 +479,10 @@ function nt(t, e, s) {
|
|
|
479
479
|
return;
|
|
480
480
|
}
|
|
481
481
|
if (w.ResponseCode !== R.Success) {
|
|
482
|
-
|
|
482
|
+
j = w.ResponseCode, B();
|
|
483
483
|
return;
|
|
484
484
|
}
|
|
485
|
-
k = (V = w.PaymentMethods) != null && V.Ordering ?
|
|
485
|
+
k = (V = w.PaymentMethods) != null && V.Ordering ? Y(w) : K(w), s(7, H = u && +u > 0 && k.length > +u ? r("showAll") : ""), s(8, L = H ? k.slice(0, +u) : k), window.postMessage(
|
|
486
486
|
{
|
|
487
487
|
type: "StartSessionCountdown",
|
|
488
488
|
paymentMethodName: k[0].Name,
|
|
@@ -491,14 +491,14 @@ function nt(t, e, s) {
|
|
|
491
491
|
window.location.href
|
|
492
492
|
), window.postMessage({ type: "DataLoading", isDataLoaded: !1 });
|
|
493
493
|
}).finally(() => {
|
|
494
|
-
s(12, I = !1), window.postMessage({ type: "DataLoading", isDataLoaded: !0 }), s(13,
|
|
494
|
+
s(12, I = !1), window.postMessage({ type: "DataLoading", isDataLoaded: !0 }), s(13, U = !L.length);
|
|
495
495
|
});
|
|
496
|
-
},
|
|
496
|
+
}, Y = (n) => {
|
|
497
497
|
const g = [];
|
|
498
498
|
return n.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach((A) => {
|
|
499
499
|
const w = n.PaymentMethods.PaymentMethods.find((V) => V.Name === A);
|
|
500
500
|
if (w) {
|
|
501
|
-
const V = (w == null ? void 0 : w.Logos.find(($) => $.LogoType === "Desktop")) || {}, Ae = (w == null ? void 0 : w.Logos.find(($) => $.LogoType === "Mobile")) || {}, le =
|
|
501
|
+
const V = (w == null ? void 0 : w.Logos.find(($) => $.LogoType === "Desktop")) || {}, Ae = (w == null ? void 0 : w.Logos.find(($) => $.LogoType === "Mobile")) || {}, le = O ? V : Ae;
|
|
502
502
|
g.push(te(ee({}, w), {
|
|
503
503
|
LogoUrl: le.LogoUrl ? `https:${le.LogoUrl}` : ""
|
|
504
504
|
}));
|
|
@@ -520,18 +520,18 @@ function nt(t, e, s) {
|
|
|
520
520
|
window.postMessage(
|
|
521
521
|
{
|
|
522
522
|
type: "ErrorResponseCode",
|
|
523
|
-
errorResponseCode:
|
|
523
|
+
errorResponseCode: j
|
|
524
524
|
},
|
|
525
525
|
window.location.href
|
|
526
526
|
);
|
|
527
527
|
}, M = () => {
|
|
528
|
-
s(11,
|
|
528
|
+
s(11, O = F === "false");
|
|
529
529
|
}, ne = () => {
|
|
530
530
|
L == k ? Le() : Me();
|
|
531
531
|
}, Me = () => {
|
|
532
|
-
s(8, L = k), s(7,
|
|
532
|
+
s(8, L = k), s(7, H = r("showLess"));
|
|
533
533
|
}, Le = () => {
|
|
534
|
-
s(8, L = k.slice(0, +u)), N && !L.find((n) => n.Name === N) && L.splice(0, 0, k.find((n) => n.Name === N)), s(7,
|
|
534
|
+
s(8, L = k.slice(0, +u)), N && !L.find((n) => n.Name === N) && L.splice(0, 0, k.find((n) => n.Name === N)), s(7, H = r("showAll"));
|
|
535
535
|
}, _e = () => {
|
|
536
536
|
s(9, W = !0);
|
|
537
537
|
}, ke = (n) => {
|
|
@@ -554,7 +554,7 @@ function nt(t, e, s) {
|
|
|
554
554
|
);
|
|
555
555
|
});
|
|
556
556
|
};
|
|
557
|
-
|
|
557
|
+
Ge(() => (window.addEventListener("message", ie, !1), () => {
|
|
558
558
|
window.removeEventListener("message", ie, !1);
|
|
559
559
|
}));
|
|
560
560
|
const ie = (n) => {
|
|
@@ -568,19 +568,19 @@ function nt(t, e, s) {
|
|
|
568
568
|
}
|
|
569
569
|
}, Ee = (n) => Q(n), xe = () => ne();
|
|
570
570
|
function Te(n) {
|
|
571
|
-
|
|
571
|
+
Ye[n ? "unshift" : "push"](() => {
|
|
572
572
|
C = n, s(5, C);
|
|
573
573
|
});
|
|
574
574
|
}
|
|
575
575
|
return t.$$set = (n) => {
|
|
576
|
-
"lang" in n && s(0, a = n.lang), "local" in n && s(18, l = n.local), "endpoint" in n && s(19, o = n.endpoint), "session" in n && s(20, i = n.session), "customerid" in n && s(21, m = n.customerid), "assetsurl" in n && s(1, c = n.assetsurl), "currency" in n && s(22, f = n.currency), "numberofmethodsshown" in n && s(23, u = n.numberofmethodsshown), "translationurl" in n && s(2, h = n.translationurl), "clientstyling" in n && s(3, p = n.clientstyling), "clientstylingurl" in n && s(4, P = n.clientstylingurl), "ismobileview" in n && s(24,
|
|
576
|
+
"lang" in n && s(0, a = n.lang), "local" in n && s(18, l = n.local), "endpoint" in n && s(19, o = n.endpoint), "session" in n && s(20, i = n.session), "customerid" in n && s(21, m = n.customerid), "assetsurl" in n && s(1, c = n.assetsurl), "currency" in n && s(22, f = n.currency), "numberofmethodsshown" in n && s(23, u = n.numberofmethodsshown), "translationurl" in n && s(2, h = n.translationurl), "clientstyling" in n && s(3, p = n.clientstyling), "clientstylingurl" in n && s(4, P = n.clientstylingurl), "ismobileview" in n && s(24, F = n.ismobileview);
|
|
577
577
|
}, t.$$.update = () => {
|
|
578
578
|
t.$$.dirty[0] & /*endpoint, session, customerid*/
|
|
579
579
|
3670016 && o && i && m && q(), t.$$.dirty[0] & /*lang*/
|
|
580
580
|
1 && a && G(), t.$$.dirty[0] & /*clientstyling, customStylingContainer*/
|
|
581
581
|
40 && p && C && Ce(), t.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
|
|
582
582
|
48 && P && C && Se(), t.$$.dirty[0] & /*ismobileview*/
|
|
583
|
-
16777216 &&
|
|
583
|
+
16777216 && F && M(), t.$$.dirty[0] & /*lang, translationurl*/
|
|
584
584
|
5 && a && h && X();
|
|
585
585
|
}, [
|
|
586
586
|
a,
|
|
@@ -590,15 +590,15 @@ function nt(t, e, s) {
|
|
|
590
590
|
P,
|
|
591
591
|
C,
|
|
592
592
|
N,
|
|
593
|
-
|
|
593
|
+
H,
|
|
594
594
|
L,
|
|
595
595
|
W,
|
|
596
596
|
E,
|
|
597
|
-
|
|
597
|
+
O,
|
|
598
598
|
I,
|
|
599
|
-
|
|
599
|
+
U,
|
|
600
600
|
r,
|
|
601
|
-
|
|
601
|
+
J,
|
|
602
602
|
Q,
|
|
603
603
|
ne,
|
|
604
604
|
l,
|
|
@@ -607,13 +607,13 @@ function nt(t, e, s) {
|
|
|
607
607
|
m,
|
|
608
608
|
f,
|
|
609
609
|
u,
|
|
610
|
-
|
|
610
|
+
F,
|
|
611
611
|
Ee,
|
|
612
612
|
xe,
|
|
613
613
|
Te
|
|
614
614
|
];
|
|
615
615
|
}
|
|
616
|
-
class it extends
|
|
616
|
+
class it extends He {
|
|
617
617
|
constructor(e) {
|
|
618
618
|
super(), We(
|
|
619
619
|
this,
|
|
@@ -712,7 +712,7 @@ class it extends Fe {
|
|
|
712
712
|
this.$$set({ ismobileview: e }), S();
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
|
-
|
|
715
|
+
je(it, { lang: {}, local: {}, endpoint: {}, session: {}, customerid: {}, assetsurl: {}, currency: {}, numberofmethodsshown: {}, translationurl: {}, clientstyling: {}, clientstylingurl: {}, ismobileview: {} }, [], [], !0);
|
|
716
716
|
export {
|
|
717
717
|
it as default
|
|
718
718
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("./CashierConfirmModal-
|
|
1
|
+
"use strict";const t=require("./CashierConfirmModal-BVT51ZOp.cjs");function m(i,{delay:e=0,duration:n=400,easing:l=t.identity}={}){const s=+getComputedStyle(i).opacity;return{delay:e,duration:n,easing:l,css:r=>`opacity: ${r*s}`}}function E(i){t.append_styles(i,"svelte-pil2bm","*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.ModalWindow{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:4;top:0;left:0;background-color:var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));container-type:inline-size;container-name:modal-window;border-radius:6px}.ModalContainer{background:var(--emw--color-white, #fff);border-radius:var(--emw--border-radius-medium, 4px);padding:var(--emw--spacing-large, 20px);width:400px}.ModalCloseBtn{position:absolute;display:flex;align-items:center;justify-content:center;top:10px;right:10px;padding:var(--emw--spacing-small-minus, 10px);border-radius:50%;color:var(--emw--color-white, #fff);background:var(--mmw--color-gray-transparency-85, rgba(255, 255, 255, 0.85));cursor:pointer;transition:all 150ms ease-in-out}.ModalCloseBtn svg{width:32px;height:32px}.ModalCloseBtn:hover{background:var(--emw--color-gray-transparency-20, rgba(255, 255, 255, 0.2))}@container modal-window (max-width:750px){.ModalWindow .ModalContainer{width:90%;max-width:400px}}")}const L=i=>({}),p=i=>({});function b(i){let e,n,l,s,r,c;const h=i[9].content,d=t.create_slot(h,i,i[8],p);return{c(){e=t.element("div"),n=t.element("div"),l=t.element("div"),d&&d.c(),t.attr(l,"class","ModalContainer"),t.attr(l,"part","ModalContainer"),t.attr(n,"class","ModalWindow"),t.attr(n,"part","ModalWindow"),t.attr(n,"id","Modal"),t.add_render_callback(()=>i[11].call(n)),t.attr(e,"part","CustomStylingContainer")},m(a,u){t.insert(a,e,u),t.append(e,n),t.append(n,l),d&&d.m(l,null),i[10](n),s=t.add_iframe_resize_listener(n,i[11].bind(n)),i[12](e),c=!0},p(a,u){i=a,d&&d.p&&(!c||u&256)&&t.update_slot_base(d,h,i,i[8],c?t.get_slot_changes(h,i[8],u,L):t.get_all_dirty_from_scope(i[8]),p)},i(a){c||(t.transition_in(d,a),a&&t.add_render_callback(()=>{c&&(r||(r=t.create_bidirectional_transition(n,m,i[2],!0)),r.run(1))}),c=!0)},o(a){t.transition_out(d,a),a&&(r||(r=t.create_bidirectional_transition(n,m,i[2],!1)),r.run(0)),c=!1},d(a){a&&t.detach(e),d&&d.d(a),i[10](null),s(),a&&r&&r.end(),i[12](null)}}}function H(i){let e,n,l=i[5]&&b(i);return{c(){l&&l.c(),e=t.empty()},m(s,r){l&&l.m(s,r),t.insert(s,e,r),n=!0},p(s,[r]){s[5]?l?(l.p(s,r),r&32&&t.transition_in(l,1)):(l=b(s),l.c(),t.transition_in(l,1),l.m(e.parentNode,e)):l&&(t.group_outros(),t.transition_out(l,1,1,()=>{l=null}),t.check_outros())},i(s){n||(t.transition_in(l),n=!0)},o(s){t.transition_out(l),n=!1},d(s){s&&t.detach(e),l&&l.d(s)}}}function W(i,e,n){let{$$slots:l={},$$scope:s}=e,{clientstyling:r=""}=e,{clientstylingurl:c=""}=e,{duration:h=200}=e,{width:d}=e,{height:a}=e,u,f,g=!1;const C=()=>{n(5,g=!1),window.postMessage({type:"ClosedCashierModal"},window.location.href),window.postMessage({type:"EnableScroll"},window.location.href)},w=o=>{o.data.type=="ShowCashierModal"&&(n(5,g=!0),window.postMessage({type:"DisableScroll"},window.location.href)),o.data.type=="HideCashierModal"&&C()},v=()=>{let o=document.createElement("style");o.innerHTML=r,f.appendChild(o)},k=()=>{let o=new URL(c),y=document.createElement("style");fetch(o.href).then(_=>_.text()).then(_=>{y.innerHTML=_,setTimeout(()=>{f.appendChild(y)},1)})};t.onMount(()=>(window.addEventListener("message",w,!1),()=>{window.removeEventListener("message",w)}));function S(o){t.binding_callbacks[o?"unshift":"push"](()=>{u=o,n(4,u)})}function x(){d=this.clientWidth,a=this.clientHeight,n(0,d),n(1,a)}function z(o){t.binding_callbacks[o?"unshift":"push"](()=>{f=o,n(3,f)})}return i.$$set=o=>{"clientstyling"in o&&n(6,r=o.clientstyling),"clientstylingurl"in o&&n(7,c=o.clientstylingurl),"duration"in o&&n(2,h=o.duration),"width"in o&&n(0,d=o.width),"height"in o&&n(1,a=o.height),"$$scope"in o&&n(8,s=o.$$scope)},i.$$.update=()=>{i.$$.dirty&72&&r&&f&&v(),i.$$.dirty&136&&c&&f&&k()},[d,a,h,f,u,g,r,c,s,l,S,x,z]}class M extends t.SvelteComponent{constructor(e){super(),t.init(this,e,W,H,t.safe_not_equal,{clientstyling:6,clientstylingurl:7,duration:2,width:0,height:1},E)}get clientstyling(){return this.$$.ctx[6]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[7]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}get duration(){return this.$$.ctx[2]}set duration(e){this.$$set({duration:e}),t.flush()}get width(){return this.$$.ctx[0]}set width(e){this.$$set({width:e}),t.flush()}get height(){return this.$$.ctx[1]}set height(e){this.$$set({height:e}),t.flush()}}t.create_custom_element(M,{clientstyling:{},clientstylingurl:{},duration:{},width:{},height:{}},["content"],[],!0);const j=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"}));exports.CashierModal_ce=j;exports.fade=m;
|