@htmlbricks/hb-checkout 0.61.46 → 0.61.47
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/main.iife.js +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
package/main.iife.js
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
height: 0;
|
|
22
22
|
overflow: hidden;
|
|
23
23
|
}
|
|
24
|
-
`,i instanceof Document&&i.head?i.head.appendChild(a):i.appendChild(a)}}isClientInvalidated(t){return this.oldInvalidationValues?this.getInvalidationValues(t).some((r,i)=>JSON.stringify(r)!==JSON.stringify(this.oldInvalidationValues[i])):!0}getInvalidationValues(t){var n,r;return[t.environment,t.existingPaymentMethodRequired,!!t.onPaymentDataChanged,!!t.onPaymentAuthorized,t.buttonType,t.buttonColor,t.buttonRadius,t.buttonLocale,t.buttonSizeMode,t.buttonBorderType,t.paymentRequest.merchantInfo.merchantId,t.paymentRequest.merchantInfo.merchantName,(n=t.paymentRequest.merchantInfo.softwareInfo)===null||n===void 0?void 0:n.id,(r=t.paymentRequest.merchantInfo.softwareInfo)===null||r===void 0?void 0:r.version,t.paymentRequest.allowedPaymentMethods]}}var ya="@google-pay/button-element",ga="3.2.1";function wa(e,t=0){let n;return function(...r){window.clearTimeout(n);const i=function(){return n=void 0,e(...r)};return new Promise(s=>{n=window.setTimeout(()=>{const a=i();s(a)},t)})}}class ie extends HTMLElement{constructor(){super(...arguments),this.manager=new _a({cssSelector:"google-pay-button",softwareInfoId:ya,softwareInfoVersion:ga}),this.initializeButton=wa(()=>{if(!this.assertRequiredProperty("paymentRequest")||!this.assertRequiredProperty("environment"))return;const t={paymentRequest:this.paymentRequest,environment:this.environment,existingPaymentMethodRequired:this.existingPaymentMethodRequired,onPaymentDataChanged:this.onPaymentDataChanged,onPaymentAuthorized:this.onPaymentAuthorized,buttonColor:this.buttonColor,buttonType:this.buttonType,buttonRadius:this.buttonRadius,buttonSizeMode:this.buttonSizeMode,buttonLocale:this.buttonLocale,buttonBorderType:this.buttonBorderType,onReadyToPayChange:n=>{this.onReadyToPayChange&&this.onReadyToPayChange(n),this.dispatch("readytopaychange",n)},onCancel:n=>{this.onCancel&&this.onCancel(n),this.dispatch("cancel",n)},onError:n=>{var r;this.onError&&((r=this.onError)===null||r===void 0||r.call(this,n)),this.dispatchEvent(new ErrorEvent("error",{error:n}))},onLoadPaymentData:n=>{this.onLoadPaymentData&&this.onLoadPaymentData(n),this.dispatch("loadpaymentdata",n)},onClick:n=>{var r;this.onClick&&((r=this.onClick)===null||r===void 0||r.call(this,n))}};this.manager.configure(t)})}get isReadyToPay(){return this.manager.isReadyToPay}assertRequiredProperty(t){const n=this[t];return n==null?(this.throwError(Error(`Required property not set: ${t}`)),!1):!0}throwError(t){throw t}static get observedAttributes(){return ie._observedAttributes}addObservedAttribute(t){ie._observedAttributes.push(t)}dispatch(t,n){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!1,detail:n}))}connectedCallback(){return Ht(this,void 0,void 0,function*(){return yield this.manager.mount(this),this.initializeButton()})}disconnectedCallback(){this.manager.unmount()}attributeChangedCallback(t){return this.initializeButton()}notifyPropertyChanged(t){return this.initializeButton()}}ie._observedAttributes=[],de([kn(),V("paymentrequest")],ie.prototype,"paymentRequest",void 0),de([lt()],ie.prototype,"environment",void 0),de([pa(),V("existingpaymentmethodrequired")],ie.prototype,"existingPaymentMethodRequired",void 0),de([lt(),V("buttoncolor")],ie.prototype,"buttonColor",void 0),de([lt(),V("buttontype")],ie.prototype,"buttonType",void 0),de([lt(),V("buttonradius")],ie.prototype,"buttonRadius",void 0),de([lt(),V("buttonsizemode")],ie.prototype,"buttonSizeMode",void 0),de([lt(),V("buttonlocale")],ie.prototype,"buttonLocale",void 0),de([lt(),V("buttonbordertype")],ie.prototype,"buttonBorderType",void 0),de([kn(),V("paymentDataChangedCallback"),V("paymentdatachangedcallback"),V("onpaymentdatachanged")],ie.prototype,"onPaymentDataChanged",void 0),de([kn(),V("paymentAuthorizedCallback"),V("paymentauthorizedcallback"),V("onpaymentauthorized")],ie.prototype,"onPaymentAuthorized",void 0),de([V("readyToPayChangeCallback"),V("readytopaychangecallback"),V("onreadytopaychange")],ie.prototype,"onReadyToPayChange",void 0),de([V("loadPaymentDataCallback"),V("loadpaymentdatacallback"),V("onloadpaymentdata")],ie.prototype,"onLoadPaymentData",void 0),de([V("cancelCallback"),V("cancelcallback"),V("oncancel")],ie.prototype,"onCancel",void 0),de([V("errorCallback"),V("errorcallback"),V("onerror")],ie.prototype,"onError",void 0),de([V("clickCallback"),V("clickcallback"),V("onclick")],ie.prototype,"onClick",void 0),customElements.define("google-pay-button",ie);const Ar={version:"0.61.46"},fe=[{type:"text",placeholder:"Insert your Full Name here...",id:"fullName",required:!0,label:"Full Name",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Insert your Street/Square address with number...",id:"addressWithNumber",required:!0,label:"Street/Square/...",validationTip:"This field cannot be empty."},{id:"name-row2",type:"row",params:{columns:[{type:"text",placeholder:"Insert your nationality here...",id:"nationality",required:!0,label:"Nationality",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Insert your city name here...",id:"city",required:!0,label:"City",validationTip:"This field cannot be empty."},{type:"number",placeholder:"Insert your zip code here...",id:"zip",required:!0,label:"Zip",validationTip:"This field cannot be empty."}]}}];function Dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wt={exports:{}},$a=Wt.exports,Or;function Ea(){return Or||(Or=1,(function(e,t){(function(n,r){e.exports=r()})($a,(function(){var n=1e3,r=6e4,i=36e5,s="millisecond",a="second",o="minute",c="hour",u="day",d="week",h="month",f="quarter",v="year",b="date",w="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,U=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(p){var _=["th","st","nd","rd"],y=p%100;return"["+p+(_[(y-20)%10]||_[y]||_[0])+"]"}},M=function(p,_,y){var $=String(p);return!$||$.length>=_?p:""+Array(_+1-$.length).join(y)+p},G={s:M,z:function(p){var _=-p.utcOffset(),y=Math.abs(_),$=Math.floor(y/60),l=y%60;return(_<=0?"+":"-")+M($,2,"0")+":"+M(l,2,"0")},m:function p(_,y){if(_.date()<y.date())return-p(y,_);var $=12*(y.year()-_.year())+(y.month()-_.month()),l=_.clone().add($,h),m=y-l<0,g=_.clone().add($+(m?-1:1),h);return+(-($+(y-l)/(m?l-g:g-l))||0)},a:function(p){return p<0?Math.ceil(p)||0:Math.floor(p)},p:function(p){return{M:h,y:v,w:d,d:u,D:b,h:c,m:o,s:a,ms:s,Q:f}[p]||String(p||"").toLowerCase().replace(/s$/,"")},u:function(p){return p===void 0}},q="en",te={};te[q]=x;var ne="$isDayjsObject",le=function(p){return p instanceof pe||!(!p||!p[ne])},ae=function p(_,y,$){var l;if(!_)return q;if(typeof _=="string"){var m=_.toLowerCase();te[m]&&(l=m),y&&(te[m]=y,l=m);var g=_.split("-");if(!l&&g.length>1)return p(g[0])}else{var E=_.name;te[E]=_,l=E}return!$&&l&&(q=l),l||!$&&q},Y=function(p,_){if(le(p))return p.clone();var y=typeof _=="object"?_:{};return y.date=p,y.args=arguments,new pe(y)},P=G;P.l=ae,P.i=le,P.w=function(p,_){return Y(p,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var pe=(function(){function p(y){this.$L=ae(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[ne]=!0}var _=p.prototype;return _.parse=function(y){this.$d=(function($){var l=$.date,m=$.utc;if(l===null)return new Date(NaN);if(P.u(l))return new Date;if(l instanceof Date)return new Date(l);if(typeof l=="string"&&!/Z$/i.test(l)){var g=l.match(C);if(g){var E=g[2]-1||0,k=(g[7]||"0").substring(0,3);return m?new Date(Date.UTC(g[1],E,g[3]||1,g[4]||0,g[5]||0,g[6]||0,k)):new Date(g[1],E,g[3]||1,g[4]||0,g[5]||0,g[6]||0,k)}}return new Date(l)})(y),this.init()},_.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},_.$utils=function(){return P},_.isValid=function(){return this.$d.toString()!==w},_.isSame=function(y,$){var l=Y(y);return this.startOf($)<=l&&l<=this.endOf($)},_.isAfter=function(y,$){return Y(y)<this.startOf($)},_.isBefore=function(y,$){return this.endOf($)<Y(y)},_.$g=function(y,$,l){return P.u(y)?this[$]:this.set(l,y)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(y,$){var l=this,m=!!P.u($)||$,g=P.p(y),E=function(W,J){var X=P.w(l.$u?Date.UTC(l.$y,J,W):new Date(l.$y,J,W),l);return m?X:X.endOf(u)},k=function(W,J){return P.w(l.toDate()[W].apply(l.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(J)),l)},T=this.$W,S=this.$M,R=this.$D,H="set"+(this.$u?"UTC":"");switch(g){case v:return m?E(1,0):E(31,11);case h:return m?E(1,S):E(0,S+1);case d:var F=this.$locale().weekStart||0,z=(T<F?T+7:T)-F;return E(m?R-z:R+(6-z),S);case u:case b:return k(H+"Hours",0);case c:return k(H+"Minutes",1);case o:return k(H+"Seconds",2);case a:return k(H+"Milliseconds",3);default:return this.clone()}},_.endOf=function(y){return this.startOf(y,!1)},_.$set=function(y,$){var l,m=P.p(y),g="set"+(this.$u?"UTC":""),E=(l={},l[u]=g+"Date",l[b]=g+"Date",l[h]=g+"Month",l[v]=g+"FullYear",l[c]=g+"Hours",l[o]=g+"Minutes",l[a]=g+"Seconds",l[s]=g+"Milliseconds",l)[m],k=m===u?this.$D+($-this.$W):$;if(m===h||m===v){var T=this.clone().set(b,1);T.$d[E](k),T.init(),this.$d=T.set(b,Math.min(this.$D,T.daysInMonth())).$d}else E&&this.$d[E](k);return this.init(),this},_.set=function(y,$){return this.clone().$set(y,$)},_.get=function(y){return this[P.p(y)]()},_.add=function(y,$){var l,m=this;y=Number(y);var g=P.p($),E=function(S){var R=Y(m);return P.w(R.date(R.date()+Math.round(S*y)),m)};if(g===h)return this.set(h,this.$M+y);if(g===v)return this.set(v,this.$y+y);if(g===u)return E(1);if(g===d)return E(7);var k=(l={},l[o]=r,l[c]=i,l[a]=n,l)[g]||1,T=this.$d.getTime()+y*k;return P.w(T,this)},_.subtract=function(y,$){return this.add(-1*y,$)},_.format=function(y){var $=this,l=this.$locale();if(!this.isValid())return l.invalidDate||w;var m=y||"YYYY-MM-DDTHH:mm:ssZ",g=P.z(this),E=this.$H,k=this.$m,T=this.$M,S=l.weekdays,R=l.months,H=l.meridiem,F=function(J,X,Q,ee){return J&&(J[X]||J($,m))||Q[X].slice(0,ee)},z=function(J){return P.s(E%12||12,J,"0")},W=H||function(J,X,Q){var ee=J<12?"AM":"PM";return Q?ee.toLowerCase():ee};return m.replace(U,(function(J,X){return X||(function(Q){switch(Q){case"YY":return String($.$y).slice(-2);case"YYYY":return P.s($.$y,4,"0");case"M":return T+1;case"MM":return P.s(T+1,2,"0");case"MMM":return F(l.monthsShort,T,R,3);case"MMMM":return F(R,T);case"D":return $.$D;case"DD":return P.s($.$D,2,"0");case"d":return String($.$W);case"dd":return F(l.weekdaysMin,$.$W,S,2);case"ddd":return F(l.weekdaysShort,$.$W,S,3);case"dddd":return S[$.$W];case"H":return String(E);case"HH":return P.s(E,2,"0");case"h":return z(1);case"hh":return z(2);case"a":return W(E,k,!0);case"A":return W(E,k,!1);case"m":return String(k);case"mm":return P.s(k,2,"0");case"s":return String($.$s);case"ss":return P.s($.$s,2,"0");case"SSS":return P.s($.$ms,3,"0");case"Z":return g}return null})(J)||g.replace(":","")}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(y,$,l){var m,g=this,E=P.p($),k=Y(y),T=(k.utcOffset()-this.utcOffset())*r,S=this-k,R=function(){return P.m(g,k)};switch(E){case v:m=R()/12;break;case h:m=R();break;case f:m=R()/3;break;case d:m=(S-T)/6048e5;break;case u:m=(S-T)/864e5;break;case c:m=S/i;break;case o:m=S/r;break;case a:m=S/n;break;default:m=S}return l?m:P.a(m)},_.daysInMonth=function(){return this.endOf(h).$D},_.$locale=function(){return te[this.$L]},_.locale=function(y,$){if(!y)return this.$L;var l=this.clone(),m=ae(y,$,!0);return m&&(l.$L=m),l},_.clone=function(){return P.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},p})(),I=pe.prototype;return Y.prototype=I,[["$ms",s],["$s",a],["$m",o],["$H",c],["$W",u],["$M",h],["$y",v],["$D",b]].forEach((function(p){I[p[1]]=function(_){return this.$g(_,p[0],p[1])}})),Y.extend=function(p,_){return p.$i||(p(_,pe,Y),p.$i=!0),Y},Y.locale=ae,Y.isDayjs=le,Y.unix=function(p){return Y(1e3*p)},Y.en=te[q],Y.Ls=te,Y.p={},Y}))})(Wt)),Wt.exports}var xa=Ea();const Ca=Dr(xa);var ut={},Ir;function Ta(){if(Ir)return ut;Ir=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.LanguageTranslator=void 0,ut.getChildStyleToPass=e,ut.addComponent=t;function e(r,i){var s,a,o="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((a=i?.filter(function(f){return Object.keys(r).includes(f.name)}))===null||a===void 0)&&a.length))for(var c=function(f){var v=i?.filter(function(b){return b.name===f&&b.defaultValue!==r[f]});v&&(o+="".concat(f,":").concat(r[f],";"))},u=0,d=Object.keys(r);u<d.length;u++){var h=d[u];c(h)}}catch(f){console.error("error getting child style to pass",f)}finally{return o}}function t(r){var i,s=((i=r?.repoName.split("/"))===null||i===void 0?void 0:i[1])||r?.repoName;if(!s)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var a=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var o=document.createElement("script");if(o.id=s+"-script",o.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(a),r?.local)o.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var c=s.split("-")[0];o.src="http://localhost:6006/webcomponents/".concat(s.replace(c+"-",""),"/").concat(a)}document.head.appendChild(o)}catch(u){console.warn(u)}}var n=(function(){function r(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return r.prototype.setLang=function(i){i||(i=r.getDefaultLang()),this.lang=i},r.prototype.translateWord=function(i,s){return r.getDictionaryWord(i,this.dictionary,s||this.lang)},r.prototype.translateDate=function(i,s,a){return r.formatDate(i,s,a||this.lang)},r.getDefaultLang=function(){var i,s,a,o,c,u="en";return navigator?.languages&&(!((a=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||a===void 0)&&a.length)&&(u=(c=(o=navigator.languages[0])===null||o===void 0?void 0:o.split("-")[0])===null||c===void 0?void 0:c.toLowerCase()),u},r.getDictionaryWord=function(i,s,a){var o;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(a&&(!((o=s[a])===null||o===void 0)&&o[i]))return s[a][i];var c="",u=r.getDefaultLang();if(!a||u!==a){var d=s?.[u];d?.[i]&&(c=d[i])}return c},r.formatDate=function(i,s,a){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var o=new Intl.DateTimeFormat(a||r.getDefaultLang(),s);return o.format(i)},r})();return ut.LanguageTranslator=n,ut}var Lr=Ta(),Et={},Mn,qr;function ka(){if(qr)return Mn;qr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,c=`
|
|
24
|
+
`,i instanceof Document&&i.head?i.head.appendChild(a):i.appendChild(a)}}isClientInvalidated(t){return this.oldInvalidationValues?this.getInvalidationValues(t).some((r,i)=>JSON.stringify(r)!==JSON.stringify(this.oldInvalidationValues[i])):!0}getInvalidationValues(t){var n,r;return[t.environment,t.existingPaymentMethodRequired,!!t.onPaymentDataChanged,!!t.onPaymentAuthorized,t.buttonType,t.buttonColor,t.buttonRadius,t.buttonLocale,t.buttonSizeMode,t.buttonBorderType,t.paymentRequest.merchantInfo.merchantId,t.paymentRequest.merchantInfo.merchantName,(n=t.paymentRequest.merchantInfo.softwareInfo)===null||n===void 0?void 0:n.id,(r=t.paymentRequest.merchantInfo.softwareInfo)===null||r===void 0?void 0:r.version,t.paymentRequest.allowedPaymentMethods]}}var ya="@google-pay/button-element",ga="3.2.1";function wa(e,t=0){let n;return function(...r){window.clearTimeout(n);const i=function(){return n=void 0,e(...r)};return new Promise(s=>{n=window.setTimeout(()=>{const a=i();s(a)},t)})}}class ie extends HTMLElement{constructor(){super(...arguments),this.manager=new _a({cssSelector:"google-pay-button",softwareInfoId:ya,softwareInfoVersion:ga}),this.initializeButton=wa(()=>{if(!this.assertRequiredProperty("paymentRequest")||!this.assertRequiredProperty("environment"))return;const t={paymentRequest:this.paymentRequest,environment:this.environment,existingPaymentMethodRequired:this.existingPaymentMethodRequired,onPaymentDataChanged:this.onPaymentDataChanged,onPaymentAuthorized:this.onPaymentAuthorized,buttonColor:this.buttonColor,buttonType:this.buttonType,buttonRadius:this.buttonRadius,buttonSizeMode:this.buttonSizeMode,buttonLocale:this.buttonLocale,buttonBorderType:this.buttonBorderType,onReadyToPayChange:n=>{this.onReadyToPayChange&&this.onReadyToPayChange(n),this.dispatch("readytopaychange",n)},onCancel:n=>{this.onCancel&&this.onCancel(n),this.dispatch("cancel",n)},onError:n=>{var r;this.onError&&((r=this.onError)===null||r===void 0||r.call(this,n)),this.dispatchEvent(new ErrorEvent("error",{error:n}))},onLoadPaymentData:n=>{this.onLoadPaymentData&&this.onLoadPaymentData(n),this.dispatch("loadpaymentdata",n)},onClick:n=>{var r;this.onClick&&((r=this.onClick)===null||r===void 0||r.call(this,n))}};this.manager.configure(t)})}get isReadyToPay(){return this.manager.isReadyToPay}assertRequiredProperty(t){const n=this[t];return n==null?(this.throwError(Error(`Required property not set: ${t}`)),!1):!0}throwError(t){throw t}static get observedAttributes(){return ie._observedAttributes}addObservedAttribute(t){ie._observedAttributes.push(t)}dispatch(t,n){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!1,detail:n}))}connectedCallback(){return Ht(this,void 0,void 0,function*(){return yield this.manager.mount(this),this.initializeButton()})}disconnectedCallback(){this.manager.unmount()}attributeChangedCallback(t){return this.initializeButton()}notifyPropertyChanged(t){return this.initializeButton()}}ie._observedAttributes=[],de([kn(),V("paymentrequest")],ie.prototype,"paymentRequest",void 0),de([lt()],ie.prototype,"environment",void 0),de([pa(),V("existingpaymentmethodrequired")],ie.prototype,"existingPaymentMethodRequired",void 0),de([lt(),V("buttoncolor")],ie.prototype,"buttonColor",void 0),de([lt(),V("buttontype")],ie.prototype,"buttonType",void 0),de([lt(),V("buttonradius")],ie.prototype,"buttonRadius",void 0),de([lt(),V("buttonsizemode")],ie.prototype,"buttonSizeMode",void 0),de([lt(),V("buttonlocale")],ie.prototype,"buttonLocale",void 0),de([lt(),V("buttonbordertype")],ie.prototype,"buttonBorderType",void 0),de([kn(),V("paymentDataChangedCallback"),V("paymentdatachangedcallback"),V("onpaymentdatachanged")],ie.prototype,"onPaymentDataChanged",void 0),de([kn(),V("paymentAuthorizedCallback"),V("paymentauthorizedcallback"),V("onpaymentauthorized")],ie.prototype,"onPaymentAuthorized",void 0),de([V("readyToPayChangeCallback"),V("readytopaychangecallback"),V("onreadytopaychange")],ie.prototype,"onReadyToPayChange",void 0),de([V("loadPaymentDataCallback"),V("loadpaymentdatacallback"),V("onloadpaymentdata")],ie.prototype,"onLoadPaymentData",void 0),de([V("cancelCallback"),V("cancelcallback"),V("oncancel")],ie.prototype,"onCancel",void 0),de([V("errorCallback"),V("errorcallback"),V("onerror")],ie.prototype,"onError",void 0),de([V("clickCallback"),V("clickcallback"),V("onclick")],ie.prototype,"onClick",void 0),customElements.define("google-pay-button",ie);const Ar={version:"0.61.47"},fe=[{type:"text",placeholder:"Insert your Full Name here...",id:"fullName",required:!0,label:"Full Name",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Insert your Street/Square address with number...",id:"addressWithNumber",required:!0,label:"Street/Square/...",validationTip:"This field cannot be empty."},{id:"name-row2",type:"row",params:{columns:[{type:"text",placeholder:"Insert your nationality here...",id:"nationality",required:!0,label:"Nationality",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Insert your city name here...",id:"city",required:!0,label:"City",validationTip:"This field cannot be empty."},{type:"number",placeholder:"Insert your zip code here...",id:"zip",required:!0,label:"Zip",validationTip:"This field cannot be empty."}]}}];function Dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wt={exports:{}},$a=Wt.exports,Or;function Ea(){return Or||(Or=1,(function(e,t){(function(n,r){e.exports=r()})($a,(function(){var n=1e3,r=6e4,i=36e5,s="millisecond",a="second",o="minute",c="hour",u="day",d="week",h="month",f="quarter",v="year",b="date",w="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,U=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(p){var _=["th","st","nd","rd"],y=p%100;return"["+p+(_[(y-20)%10]||_[y]||_[0])+"]"}},M=function(p,_,y){var $=String(p);return!$||$.length>=_?p:""+Array(_+1-$.length).join(y)+p},G={s:M,z:function(p){var _=-p.utcOffset(),y=Math.abs(_),$=Math.floor(y/60),l=y%60;return(_<=0?"+":"-")+M($,2,"0")+":"+M(l,2,"0")},m:function p(_,y){if(_.date()<y.date())return-p(y,_);var $=12*(y.year()-_.year())+(y.month()-_.month()),l=_.clone().add($,h),m=y-l<0,g=_.clone().add($+(m?-1:1),h);return+(-($+(y-l)/(m?l-g:g-l))||0)},a:function(p){return p<0?Math.ceil(p)||0:Math.floor(p)},p:function(p){return{M:h,y:v,w:d,d:u,D:b,h:c,m:o,s:a,ms:s,Q:f}[p]||String(p||"").toLowerCase().replace(/s$/,"")},u:function(p){return p===void 0}},q="en",te={};te[q]=x;var ne="$isDayjsObject",le=function(p){return p instanceof pe||!(!p||!p[ne])},ae=function p(_,y,$){var l;if(!_)return q;if(typeof _=="string"){var m=_.toLowerCase();te[m]&&(l=m),y&&(te[m]=y,l=m);var g=_.split("-");if(!l&&g.length>1)return p(g[0])}else{var E=_.name;te[E]=_,l=E}return!$&&l&&(q=l),l||!$&&q},Y=function(p,_){if(le(p))return p.clone();var y=typeof _=="object"?_:{};return y.date=p,y.args=arguments,new pe(y)},P=G;P.l=ae,P.i=le,P.w=function(p,_){return Y(p,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var pe=(function(){function p(y){this.$L=ae(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[ne]=!0}var _=p.prototype;return _.parse=function(y){this.$d=(function($){var l=$.date,m=$.utc;if(l===null)return new Date(NaN);if(P.u(l))return new Date;if(l instanceof Date)return new Date(l);if(typeof l=="string"&&!/Z$/i.test(l)){var g=l.match(C);if(g){var E=g[2]-1||0,k=(g[7]||"0").substring(0,3);return m?new Date(Date.UTC(g[1],E,g[3]||1,g[4]||0,g[5]||0,g[6]||0,k)):new Date(g[1],E,g[3]||1,g[4]||0,g[5]||0,g[6]||0,k)}}return new Date(l)})(y),this.init()},_.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},_.$utils=function(){return P},_.isValid=function(){return this.$d.toString()!==w},_.isSame=function(y,$){var l=Y(y);return this.startOf($)<=l&&l<=this.endOf($)},_.isAfter=function(y,$){return Y(y)<this.startOf($)},_.isBefore=function(y,$){return this.endOf($)<Y(y)},_.$g=function(y,$,l){return P.u(y)?this[$]:this.set(l,y)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(y,$){var l=this,m=!!P.u($)||$,g=P.p(y),E=function(W,J){var X=P.w(l.$u?Date.UTC(l.$y,J,W):new Date(l.$y,J,W),l);return m?X:X.endOf(u)},k=function(W,J){return P.w(l.toDate()[W].apply(l.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(J)),l)},T=this.$W,S=this.$M,R=this.$D,H="set"+(this.$u?"UTC":"");switch(g){case v:return m?E(1,0):E(31,11);case h:return m?E(1,S):E(0,S+1);case d:var F=this.$locale().weekStart||0,z=(T<F?T+7:T)-F;return E(m?R-z:R+(6-z),S);case u:case b:return k(H+"Hours",0);case c:return k(H+"Minutes",1);case o:return k(H+"Seconds",2);case a:return k(H+"Milliseconds",3);default:return this.clone()}},_.endOf=function(y){return this.startOf(y,!1)},_.$set=function(y,$){var l,m=P.p(y),g="set"+(this.$u?"UTC":""),E=(l={},l[u]=g+"Date",l[b]=g+"Date",l[h]=g+"Month",l[v]=g+"FullYear",l[c]=g+"Hours",l[o]=g+"Minutes",l[a]=g+"Seconds",l[s]=g+"Milliseconds",l)[m],k=m===u?this.$D+($-this.$W):$;if(m===h||m===v){var T=this.clone().set(b,1);T.$d[E](k),T.init(),this.$d=T.set(b,Math.min(this.$D,T.daysInMonth())).$d}else E&&this.$d[E](k);return this.init(),this},_.set=function(y,$){return this.clone().$set(y,$)},_.get=function(y){return this[P.p(y)]()},_.add=function(y,$){var l,m=this;y=Number(y);var g=P.p($),E=function(S){var R=Y(m);return P.w(R.date(R.date()+Math.round(S*y)),m)};if(g===h)return this.set(h,this.$M+y);if(g===v)return this.set(v,this.$y+y);if(g===u)return E(1);if(g===d)return E(7);var k=(l={},l[o]=r,l[c]=i,l[a]=n,l)[g]||1,T=this.$d.getTime()+y*k;return P.w(T,this)},_.subtract=function(y,$){return this.add(-1*y,$)},_.format=function(y){var $=this,l=this.$locale();if(!this.isValid())return l.invalidDate||w;var m=y||"YYYY-MM-DDTHH:mm:ssZ",g=P.z(this),E=this.$H,k=this.$m,T=this.$M,S=l.weekdays,R=l.months,H=l.meridiem,F=function(J,X,Q,ee){return J&&(J[X]||J($,m))||Q[X].slice(0,ee)},z=function(J){return P.s(E%12||12,J,"0")},W=H||function(J,X,Q){var ee=J<12?"AM":"PM";return Q?ee.toLowerCase():ee};return m.replace(U,(function(J,X){return X||(function(Q){switch(Q){case"YY":return String($.$y).slice(-2);case"YYYY":return P.s($.$y,4,"0");case"M":return T+1;case"MM":return P.s(T+1,2,"0");case"MMM":return F(l.monthsShort,T,R,3);case"MMMM":return F(R,T);case"D":return $.$D;case"DD":return P.s($.$D,2,"0");case"d":return String($.$W);case"dd":return F(l.weekdaysMin,$.$W,S,2);case"ddd":return F(l.weekdaysShort,$.$W,S,3);case"dddd":return S[$.$W];case"H":return String(E);case"HH":return P.s(E,2,"0");case"h":return z(1);case"hh":return z(2);case"a":return W(E,k,!0);case"A":return W(E,k,!1);case"m":return String(k);case"mm":return P.s(k,2,"0");case"s":return String($.$s);case"ss":return P.s($.$s,2,"0");case"SSS":return P.s($.$ms,3,"0");case"Z":return g}return null})(J)||g.replace(":","")}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(y,$,l){var m,g=this,E=P.p($),k=Y(y),T=(k.utcOffset()-this.utcOffset())*r,S=this-k,R=function(){return P.m(g,k)};switch(E){case v:m=R()/12;break;case h:m=R();break;case f:m=R()/3;break;case d:m=(S-T)/6048e5;break;case u:m=(S-T)/864e5;break;case c:m=S/i;break;case o:m=S/r;break;case a:m=S/n;break;default:m=S}return l?m:P.a(m)},_.daysInMonth=function(){return this.endOf(h).$D},_.$locale=function(){return te[this.$L]},_.locale=function(y,$){if(!y)return this.$L;var l=this.clone(),m=ae(y,$,!0);return m&&(l.$L=m),l},_.clone=function(){return P.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},p})(),I=pe.prototype;return Y.prototype=I,[["$ms",s],["$s",a],["$m",o],["$H",c],["$W",u],["$M",h],["$y",v],["$D",b]].forEach((function(p){I[p[1]]=function(_){return this.$g(_,p[0],p[1])}})),Y.extend=function(p,_){return p.$i||(p(_,pe,Y),p.$i=!0),Y},Y.locale=ae,Y.isDayjs=le,Y.unix=function(p){return Y(1e3*p)},Y.en=te[q],Y.Ls=te,Y.p={},Y}))})(Wt)),Wt.exports}var xa=Ea();const Ca=Dr(xa);var ut={},Ir;function Ta(){if(Ir)return ut;Ir=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.LanguageTranslator=void 0,ut.getChildStyleToPass=e,ut.addComponent=t;function e(r,i){var s,a,o="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((a=i?.filter(function(f){return Object.keys(r).includes(f.name)}))===null||a===void 0)&&a.length))for(var c=function(f){var v=i?.filter(function(b){return b.name===f&&b.defaultValue!==r[f]});v&&(o+="".concat(f,":").concat(r[f],";"))},u=0,d=Object.keys(r);u<d.length;u++){var h=d[u];c(h)}}catch(f){console.error("error getting child style to pass",f)}finally{return o}}function t(r){var i,s=((i=r?.repoName.split("/"))===null||i===void 0?void 0:i[1])||r?.repoName;if(!s)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var a=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var o=document.createElement("script");if(o.id=s+"-script",o.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(a),r?.local)o.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var c=s.split("-")[0];o.src="http://localhost:6006/webcomponents/".concat(s.replace(c+"-",""),"/").concat(a)}document.head.appendChild(o)}catch(u){console.warn(u)}}var n=(function(){function r(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return r.prototype.setLang=function(i){i||(i=r.getDefaultLang()),this.lang=i},r.prototype.translateWord=function(i,s){return r.getDictionaryWord(i,this.dictionary,s||this.lang)},r.prototype.translateDate=function(i,s,a){return r.formatDate(i,s,a||this.lang)},r.getDefaultLang=function(){var i,s,a,o,c,u="en";return navigator?.languages&&(!((a=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||a===void 0)&&a.length)&&(u=(c=(o=navigator.languages[0])===null||o===void 0?void 0:o.split("-")[0])===null||c===void 0?void 0:c.toLowerCase()),u},r.getDictionaryWord=function(i,s,a){var o;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(a&&(!((o=s[a])===null||o===void 0)&&o[i]))return s[a][i];var c="",u=r.getDefaultLang();if(!a||u!==a){var d=s?.[u];d?.[i]&&(c=d[i])}return c},r.formatDate=function(i,s,a){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var o=new Intl.DateTimeFormat(a||r.getDefaultLang(),s);return o.format(i)},r})();return ut.LanguageTranslator=n,ut}var Lr=Ta(),Et={},Mn,qr;function ka(){if(qr)return Mn;qr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,c=`
|
|
25
25
|
`,u="/",d="*",h="",f="comment",v="declaration";Mn=function(w,C){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];C=C||{};var U=1,x=1;function M(I){var p=I.match(t);p&&(U+=p.length);var _=I.lastIndexOf(c);x=~_?I.length-_:x+I.length}function G(){var I={line:U,column:x};return function(p){return p.position=new q(I),le(),p}}function q(I){this.start=I,this.end={line:U,column:x},this.source=C.source}q.prototype.content=w;function te(I){var p=new Error(C.source+":"+U+":"+x+": "+I);if(p.reason=I,p.filename=C.source,p.line=U,p.column=x,p.source=w,!C.silent)throw p}function ne(I){var p=I.exec(w);if(p){var _=p[0];return M(_),w=w.slice(_.length),p}}function le(){ne(n)}function ae(I){var p;for(I=I||[];p=Y();)p!==!1&&I.push(p);return I}function Y(){var I=G();if(!(u!=w.charAt(0)||d!=w.charAt(1))){for(var p=2;h!=w.charAt(p)&&(d!=w.charAt(p)||u!=w.charAt(p+1));)++p;if(p+=2,h===w.charAt(p-1))return te("End of comment missing");var _=w.slice(2,p-2);return x+=2,M(_),w=w.slice(p),x+=2,I({type:f,comment:_})}}function P(){var I=G(),p=ne(r);if(p){if(Y(),!ne(i))return te("property missing ':'");var _=ne(s),y=I({type:v,property:b(p[0].replace(e,h)),value:_?b(_[0].replace(e,h)):h});return ne(a),y}}function pe(){var I=[];ae(I);for(var p;p=P();)p!==!1&&(I.push(p),ae(I));return I}return le(),pe()};function b(w){return w?w.replace(o,h):h}return Mn}var jr;function Sa(){if(jr)return Et;jr=1;var e=Et&&Et.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Et,"__esModule",{value:!0}),Et.default=n;var t=e(ka());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var a=(0,t.default)(r),o=typeof i=="function";return a.forEach(function(c){if(c.type==="declaration"){var u=c.property,d=c.value;o?i(u,d,c):d&&(s=s||{},s[u]=d)}}),s}return Et}var Ma=Sa();const zr=Dr(Ma);zr.default;function Pa(e,t,n){re(t,!0),re(n,!1)}function Fr(e,t,n){re(t,!1),re(n,!0)}var Ra=oe('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css" class="svelte-94r8nt"/>'),Na=oe('<h1 class="title svelte-94r8nt" part="title">Checkout</h1>'),Aa=oe('<div class="dataentry svelte-94r8nt"><span class="dataentry_value svelte-94r8nt"> </span></div>'),Da=oe('<div class="dataentrycontainer svelte-94r8nt"><!></div>'),Oa=oe('<h4 class="subtitle svelte-94r8nt" part="subtitle"><button class="btn btn-sm detail_btn svelte-94r8nt">edit</button></h4> <div class="dataentrycontainer svelte-94r8nt"><div class="dataentry svelte-94r8nt"><span class="dataentry_key svelte-94r8nt">Name</span><span class="dataentry_value svelte-94r8nt"> </span></div> <div class="dataentry svelte-94r8nt"><span class="dataentry_key svelte-94r8nt">Address</span><span class="dataentry_value svelte-94r8nt"> </span></div></div>',1),Ia=(e,t)=>{re(t,"yes"),setTimeout(()=>{re(t,"no")},200)},La=oe('<h4 class="subtitle svelte-94r8nt" part="subtitle">Address</h4> <div class="svelte-94r8nt"><hb-form></hb-form> <div class="svelte-94r8nt"><button style="width:100%;margin-bottom:10px" class="btn btn-primary svelte-94r8nt">continue</button></div></div>',3),qa=oe('<h4 style="margin-top:20px" class="subtitle svelte-94r8nt" part="subtitle"><span class="detail_label svelte-94r8nt"><i class="bi bi-truck svelte-94r8nt"></i> Shipment Service</span><button class="btn btn-sm detail_btn svelte-94r8nt">edit</button></h4> <div class="dataentrycontainer svelte-94r8nt"><div class="dataentry svelte-94r8nt"><span class="dataentry_key svelte-94r8nt">Shipping Fee</span><span class="dataentry_value svelte-94r8nt"> </span></div> <div class="dataentry svelte-94r8nt"><span class="dataentry_key svelte-94r8nt">Arrive</span><span class="dataentry_value svelte-94r8nt"> </span></div></div>',1),ja=(e,t)=>{re(t,"yes"),setTimeout(()=>{re(t,"no")},200)},za=oe('<h4 class="subtitle svelte-94r8nt" part="subtitle" style="margin-top:20px"><i class="bi bi-truck svelte-94r8nt"></i> Shipment Service</h4> <div class="svelte-94r8nt"><hb-form></hb-form> <div class="svelte-94r8nt"><button style="width:100%" class="btn btn-primary svelte-94r8nt">continue</button></div></div>',3),Fa=oe('<h4 style="margin-top:20px" class="subtitle svelte-94r8nt" part="subtitle"><span class="detail_label svelte-94r8nt"><i class="bi bi-truck svelte-94r8nt"></i> Shipment Service</span><button class="btn btn-sm detail_btn svelte-94r8nt">edit</button></h4> <div class="dataentrycontainer svelte-94r8nt"><div class="dataentry svelte-94r8nt"><span class="dataentry_key svelte-94r8nt">Shipping Fee</span><span class="dataentry_value svelte-94r8nt"> </span></div> <div class="dataentry svelte-94r8nt"><span class="dataentry_key svelte-94r8nt">Shipping Time</span><span class="dataentry_value svelte-94r8nt"> </span></div></div>',1),Ba=oe('<div id="shipment_separator" class="svelte-94r8nt"><!></div>'),Va=oe("<hb-payment-paypal></hb-payment-paypal>",2),Ua=oe("<google-pay-button></google-pay-button>",2),Ya=oe('<div class="payment_button_container svelte-94r8nt"><!></div>'),Ha=oe('<div id="payment_btn_container" class="svelte-94r8nt"></div>'),Wa=oe('By Clicking..<button class="btn btn-default svelte-94r8nt">Terms and conditions</button>',1),Ga=oe('<h3 class="subtitle svelte-94r8nt" part="subtitle"><i class="bi bi-wallet2 svelte-94r8nt"></i> Payment Method</h3> <!> <div class="footer_note svelte-94r8nt"><!></div>',1),Ja=oe('<div id="payment_completed_content" class="svelte-94r8nt"><div id="payment_completed_title" class="svelte-94r8nt">payment completed</div> <div id="payment_completed_content" class="svelte-94r8nt"> </div> <div id="payment_completed_footer" class="svelte-94r8nt"><button class="btn btn-link svelte-94r8nt">invoice</button></div></div>'),Xa=oe('<!> <div id="border_top" class="svelte-94r8nt"><div class="svelte-94r8nt"><h3 class="subtitle svelte-94r8nt" part="subtitle"><i class="bi bi-send-fill svelte-94r8nt"></i> Delivery</h3> <!></div> <!></div> <div class="payment_title svelte-94r8nt"><!></div>',1);const Za={hash:"svelte-94r8nt",code:`@charset "UTF-8";
|
|
26
26
|
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
|
|
27
27
|
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");
|
package/manifest.json
CHANGED