@htmlbricks/hb-checkout 0.60.1 → 0.60.2
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
|
-
`,s instanceof Document&&s.head?s.head.appendChild(i):s.appendChild(i)}}isClientInvalidated(t){return this.oldInvalidationValues?this.getInvalidationValues(t).some((r,s)=>JSON.stringify(r)!==JSON.stringify(this.oldInvalidationValues[s])):!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 _i="@google-pay/button-element",yi="3.2.1";function bi(e,t=0){let n;return function(...r){window.clearTimeout(n);const s=function(){return n=void 0,e(...r)};return new Promise(a=>{n=window.setTimeout(()=>{const i=s();a(i)},t)})}}class se extends HTMLElement{constructor(){super(...arguments),this.manager=new mi({cssSelector:"google-pay-button",softwareInfoId:_i,softwareInfoVersion:yi}),this.initializeButton=bi(()=>{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 se._observedAttributes}addObservedAttribute(t){se._observedAttributes.push(t)}dispatch(t,n){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!1,detail:n}))}connectedCallback(){return Yt(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()}}se._observedAttributes=[],ce([Cn(),U("paymentrequest")],se.prototype,"paymentRequest",void 0),ce([lt()],se.prototype,"environment",void 0),ce([vi(),U("existingpaymentmethodrequired")],se.prototype,"existingPaymentMethodRequired",void 0),ce([lt(),U("buttoncolor")],se.prototype,"buttonColor",void 0),ce([lt(),U("buttontype")],se.prototype,"buttonType",void 0),ce([lt(),U("buttonradius")],se.prototype,"buttonRadius",void 0),ce([lt(),U("buttonsizemode")],se.prototype,"buttonSizeMode",void 0),ce([lt(),U("buttonlocale")],se.prototype,"buttonLocale",void 0),ce([lt(),U("buttonbordertype")],se.prototype,"buttonBorderType",void 0),ce([Cn(),U("paymentDataChangedCallback"),U("paymentdatachangedcallback"),U("onpaymentdatachanged")],se.prototype,"onPaymentDataChanged",void 0),ce([Cn(),U("paymentAuthorizedCallback"),U("paymentauthorizedcallback"),U("onpaymentauthorized")],se.prototype,"onPaymentAuthorized",void 0),ce([U("readyToPayChangeCallback"),U("readytopaychangecallback"),U("onreadytopaychange")],se.prototype,"onReadyToPayChange",void 0),ce([U("loadPaymentDataCallback"),U("loadpaymentdatacallback"),U("onloadpaymentdata")],se.prototype,"onLoadPaymentData",void 0),ce([U("cancelCallback"),U("cancelcallback"),U("oncancel")],se.prototype,"onCancel",void 0),ce([U("errorCallback"),U("errorcallback"),U("onerror")],se.prototype,"onError",void 0),ce([U("clickCallback"),U("clickcallback"),U("onclick")],se.prototype,"onClick",void 0),customElements.define("google-pay-button",se);const Nr={version:"0.60.1"},de=[{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 Ar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ht={exports:{}},gi=Ht.exports,Ir;function wi(){return Ir||(Ir=1,(function(e,t){(function(n,r){e.exports=r()})(gi,(function(){var n=1e3,r=6e4,s=36e5,a="millisecond",i="second",o="minute",f="hour",u="day",c="week",h="month",p="quarter",d="year",m="date",w="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,V=/\[([^\]]+)]|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,S={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(v){var y=["th","st","nd","rd"],b=v%100;return"["+v+(y[(b-20)%10]||y[b]||y[0])+"]"}},M=function(v,y,b){var $=String(v);return!$||$.length>=y?v:""+Array(y+1-$.length).join(b)+v},G={s:M,z:function(v){var y=-v.utcOffset(),b=Math.abs(y),$=Math.floor(b/60),l=b%60;return(y<=0?"+":"-")+M($,2,"0")+":"+M(l,2,"0")},m:function v(y,b){if(y.date()<b.date())return-v(b,y);var $=12*(b.year()-y.year())+(b.month()-y.month()),l=y.clone().add($,h),_=b-l<0,g=y.clone().add($+(_?-1:1),h);return+(-($+(b-l)/(_?l-g:g-l))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:h,y:d,w:c,d:u,D:m,h:f,m:o,s:i,ms:a,Q:p}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},q="en",te={};te[q]=S;var ne="$isDayjsObject",le=function(v){return v instanceof me||!(!v||!v[ne])},ie=function v(y,b,$){var l;if(!y)return q;if(typeof y=="string"){var _=y.toLowerCase();te[_]&&(l=_),b&&(te[_]=b,l=_);var g=y.split("-");if(!l&&g.length>1)return v(g[0])}else{var E=y.name;te[E]=y,l=E}return!$&&l&&(q=l),l||!$&&q},Y=function(v,y){if(le(v))return v.clone();var b=typeof y=="object"?y:{};return b.date=v,b.args=arguments,new me(b)},P=G;P.l=ie,P.i=le,P.w=function(v,y){return Y(v,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var me=(function(){function v(b){this.$L=ie(b.locale,null,!0),this.parse(b),this.$x=this.$x||b.x||{},this[ne]=!0}var y=v.prototype;return y.parse=function(b){this.$d=(function($){var l=$.date,_=$.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(x);if(g){var E=g[2]-1||0,T=(g[7]||"0").substring(0,3);return _?new Date(Date.UTC(g[1],E,g[3]||1,g[4]||0,g[5]||0,g[6]||0,T)):new Date(g[1],E,g[3]||1,g[4]||0,g[5]||0,g[6]||0,T)}}return new Date(l)})(b),this.init()},y.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},y.$utils=function(){return P},y.isValid=function(){return this.$d.toString()!==w},y.isSame=function(b,$){var l=Y(b);return this.startOf($)<=l&&l<=this.endOf($)},y.isAfter=function(b,$){return Y(b)<this.startOf($)},y.isBefore=function(b,$){return this.endOf($)<Y(b)},y.$g=function(b,$,l){return P.u(b)?this[$]:this.set(l,b)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(b,$){var l=this,_=!!P.u($)||$,g=P.p(b),E=function(W,J){var X=P.w(l.$u?Date.UTC(l.$y,J,W):new Date(l.$y,J,W),l);return _?X:X.endOf(u)},T=function(W,J){return P.w(l.toDate()[W].apply(l.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(J)),l)},C=this.$W,k=this.$M,R=this.$D,H="set"+(this.$u?"UTC":"");switch(g){case d:return _?E(1,0):E(31,11);case h:return _?E(1,k):E(0,k+1);case c:var F=this.$locale().weekStart||0,z=(C<F?C+7:C)-F;return E(_?R-z:R+(6-z),k);case u:case m:return T(H+"Hours",0);case f:return T(H+"Minutes",1);case o:return T(H+"Seconds",2);case i:return T(H+"Milliseconds",3);default:return this.clone()}},y.endOf=function(b){return this.startOf(b,!1)},y.$set=function(b,$){var l,_=P.p(b),g="set"+(this.$u?"UTC":""),E=(l={},l[u]=g+"Date",l[m]=g+"Date",l[h]=g+"Month",l[d]=g+"FullYear",l[f]=g+"Hours",l[o]=g+"Minutes",l[i]=g+"Seconds",l[a]=g+"Milliseconds",l)[_],T=_===u?this.$D+($-this.$W):$;if(_===h||_===d){var C=this.clone().set(m,1);C.$d[E](T),C.init(),this.$d=C.set(m,Math.min(this.$D,C.daysInMonth())).$d}else E&&this.$d[E](T);return this.init(),this},y.set=function(b,$){return this.clone().$set(b,$)},y.get=function(b){return this[P.p(b)]()},y.add=function(b,$){var l,_=this;b=Number(b);var g=P.p($),E=function(k){var R=Y(_);return P.w(R.date(R.date()+Math.round(k*b)),_)};if(g===h)return this.set(h,this.$M+b);if(g===d)return this.set(d,this.$y+b);if(g===u)return E(1);if(g===c)return E(7);var T=(l={},l[o]=r,l[f]=s,l[i]=n,l)[g]||1,C=this.$d.getTime()+b*T;return P.w(C,this)},y.subtract=function(b,$){return this.add(-1*b,$)},y.format=function(b){var $=this,l=this.$locale();if(!this.isValid())return l.invalidDate||w;var _=b||"YYYY-MM-DDTHH:mm:ssZ",g=P.z(this),E=this.$H,T=this.$m,C=this.$M,k=l.weekdays,R=l.months,H=l.meridiem,F=function(J,X,Q,ee){return J&&(J[X]||J($,_))||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 _.replace(V,(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 C+1;case"MM":return P.s(C+1,2,"0");case"MMM":return F(l.monthsShort,C,R,3);case"MMMM":return F(R,C);case"D":return $.$D;case"DD":return P.s($.$D,2,"0");case"d":return String($.$W);case"dd":return F(l.weekdaysMin,$.$W,k,2);case"ddd":return F(l.weekdaysShort,$.$W,k,3);case"dddd":return k[$.$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,T,!0);case"A":return W(E,T,!1);case"m":return String(T);case"mm":return P.s(T,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(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(b,$,l){var _,g=this,E=P.p($),T=Y(b),C=(T.utcOffset()-this.utcOffset())*r,k=this-T,R=function(){return P.m(g,T)};switch(E){case d:_=R()/12;break;case h:_=R();break;case p:_=R()/3;break;case c:_=(k-C)/6048e5;break;case u:_=(k-C)/864e5;break;case f:_=k/s;break;case o:_=k/r;break;case i:_=k/n;break;default:_=k}return l?_:P.a(_)},y.daysInMonth=function(){return this.endOf(h).$D},y.$locale=function(){return te[this.$L]},y.locale=function(b,$){if(!b)return this.$L;var l=this.clone(),_=ie(b,$,!0);return _&&(l.$L=_),l},y.clone=function(){return P.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},v})(),D=me.prototype;return Y.prototype=D,[["$ms",a],["$s",i],["$m",o],["$H",f],["$W",u],["$M",h],["$y",d],["$D",m]].forEach((function(v){D[v[1]]=function(y){return this.$g(y,v[0],v[1])}})),Y.extend=function(v,y){return v.$i||(v(y,me,Y),v.$i=!0),Y},Y.locale=ie,Y.isDayjs=le,Y.unix=function(v){return Y(1e3*v)},Y.en=te[q],Y.Ls=te,Y.p={},Y}))})(Ht)),Ht.exports}var $i=wi();const Ei=Ar($i);function Or(e){const t=e?.repoName.split("/")?.[1]||e?.repoName;if(!t)throw new Error("wrong componentPath "+e?.repoName);if(!e?.version)throw new Error("wrong version "+e?.version);const n=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const r=document.createElement("script");if(r.id=t+"-script",r.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${n}`,e?.local)r.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const s=t.split("-")[0];r.src=`http://localhost:6006/webcomponents/${t.replace(s+"-","")}/${n}`}document.head.appendChild(r)}catch(r){console.warn(r)}}var $t={},kn,Dr;function Si(){if(Dr)return kn;Dr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,o=/^\s+|\s+$/g,f=`
|
|
24
|
+
`,s instanceof Document&&s.head?s.head.appendChild(i):s.appendChild(i)}}isClientInvalidated(t){return this.oldInvalidationValues?this.getInvalidationValues(t).some((r,s)=>JSON.stringify(r)!==JSON.stringify(this.oldInvalidationValues[s])):!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 _i="@google-pay/button-element",yi="3.2.1";function bi(e,t=0){let n;return function(...r){window.clearTimeout(n);const s=function(){return n=void 0,e(...r)};return new Promise(a=>{n=window.setTimeout(()=>{const i=s();a(i)},t)})}}class se extends HTMLElement{constructor(){super(...arguments),this.manager=new mi({cssSelector:"google-pay-button",softwareInfoId:_i,softwareInfoVersion:yi}),this.initializeButton=bi(()=>{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 se._observedAttributes}addObservedAttribute(t){se._observedAttributes.push(t)}dispatch(t,n){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!1,detail:n}))}connectedCallback(){return Yt(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()}}se._observedAttributes=[],ce([Cn(),U("paymentrequest")],se.prototype,"paymentRequest",void 0),ce([lt()],se.prototype,"environment",void 0),ce([vi(),U("existingpaymentmethodrequired")],se.prototype,"existingPaymentMethodRequired",void 0),ce([lt(),U("buttoncolor")],se.prototype,"buttonColor",void 0),ce([lt(),U("buttontype")],se.prototype,"buttonType",void 0),ce([lt(),U("buttonradius")],se.prototype,"buttonRadius",void 0),ce([lt(),U("buttonsizemode")],se.prototype,"buttonSizeMode",void 0),ce([lt(),U("buttonlocale")],se.prototype,"buttonLocale",void 0),ce([lt(),U("buttonbordertype")],se.prototype,"buttonBorderType",void 0),ce([Cn(),U("paymentDataChangedCallback"),U("paymentdatachangedcallback"),U("onpaymentdatachanged")],se.prototype,"onPaymentDataChanged",void 0),ce([Cn(),U("paymentAuthorizedCallback"),U("paymentauthorizedcallback"),U("onpaymentauthorized")],se.prototype,"onPaymentAuthorized",void 0),ce([U("readyToPayChangeCallback"),U("readytopaychangecallback"),U("onreadytopaychange")],se.prototype,"onReadyToPayChange",void 0),ce([U("loadPaymentDataCallback"),U("loadpaymentdatacallback"),U("onloadpaymentdata")],se.prototype,"onLoadPaymentData",void 0),ce([U("cancelCallback"),U("cancelcallback"),U("oncancel")],se.prototype,"onCancel",void 0),ce([U("errorCallback"),U("errorcallback"),U("onerror")],se.prototype,"onError",void 0),ce([U("clickCallback"),U("clickcallback"),U("onclick")],se.prototype,"onClick",void 0),customElements.define("google-pay-button",se);const Nr={version:"0.60.2"},de=[{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 Ar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ht={exports:{}},gi=Ht.exports,Ir;function wi(){return Ir||(Ir=1,(function(e,t){(function(n,r){e.exports=r()})(gi,(function(){var n=1e3,r=6e4,s=36e5,a="millisecond",i="second",o="minute",f="hour",u="day",c="week",h="month",p="quarter",d="year",m="date",w="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,V=/\[([^\]]+)]|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,S={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(v){var y=["th","st","nd","rd"],b=v%100;return"["+v+(y[(b-20)%10]||y[b]||y[0])+"]"}},M=function(v,y,b){var $=String(v);return!$||$.length>=y?v:""+Array(y+1-$.length).join(b)+v},G={s:M,z:function(v){var y=-v.utcOffset(),b=Math.abs(y),$=Math.floor(b/60),l=b%60;return(y<=0?"+":"-")+M($,2,"0")+":"+M(l,2,"0")},m:function v(y,b){if(y.date()<b.date())return-v(b,y);var $=12*(b.year()-y.year())+(b.month()-y.month()),l=y.clone().add($,h),_=b-l<0,g=y.clone().add($+(_?-1:1),h);return+(-($+(b-l)/(_?l-g:g-l))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:h,y:d,w:c,d:u,D:m,h:f,m:o,s:i,ms:a,Q:p}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},q="en",te={};te[q]=S;var ne="$isDayjsObject",le=function(v){return v instanceof me||!(!v||!v[ne])},ie=function v(y,b,$){var l;if(!y)return q;if(typeof y=="string"){var _=y.toLowerCase();te[_]&&(l=_),b&&(te[_]=b,l=_);var g=y.split("-");if(!l&&g.length>1)return v(g[0])}else{var E=y.name;te[E]=y,l=E}return!$&&l&&(q=l),l||!$&&q},Y=function(v,y){if(le(v))return v.clone();var b=typeof y=="object"?y:{};return b.date=v,b.args=arguments,new me(b)},P=G;P.l=ie,P.i=le,P.w=function(v,y){return Y(v,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var me=(function(){function v(b){this.$L=ie(b.locale,null,!0),this.parse(b),this.$x=this.$x||b.x||{},this[ne]=!0}var y=v.prototype;return y.parse=function(b){this.$d=(function($){var l=$.date,_=$.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(x);if(g){var E=g[2]-1||0,T=(g[7]||"0").substring(0,3);return _?new Date(Date.UTC(g[1],E,g[3]||1,g[4]||0,g[5]||0,g[6]||0,T)):new Date(g[1],E,g[3]||1,g[4]||0,g[5]||0,g[6]||0,T)}}return new Date(l)})(b),this.init()},y.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},y.$utils=function(){return P},y.isValid=function(){return this.$d.toString()!==w},y.isSame=function(b,$){var l=Y(b);return this.startOf($)<=l&&l<=this.endOf($)},y.isAfter=function(b,$){return Y(b)<this.startOf($)},y.isBefore=function(b,$){return this.endOf($)<Y(b)},y.$g=function(b,$,l){return P.u(b)?this[$]:this.set(l,b)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(b,$){var l=this,_=!!P.u($)||$,g=P.p(b),E=function(W,J){var X=P.w(l.$u?Date.UTC(l.$y,J,W):new Date(l.$y,J,W),l);return _?X:X.endOf(u)},T=function(W,J){return P.w(l.toDate()[W].apply(l.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(J)),l)},C=this.$W,k=this.$M,R=this.$D,H="set"+(this.$u?"UTC":"");switch(g){case d:return _?E(1,0):E(31,11);case h:return _?E(1,k):E(0,k+1);case c:var F=this.$locale().weekStart||0,z=(C<F?C+7:C)-F;return E(_?R-z:R+(6-z),k);case u:case m:return T(H+"Hours",0);case f:return T(H+"Minutes",1);case o:return T(H+"Seconds",2);case i:return T(H+"Milliseconds",3);default:return this.clone()}},y.endOf=function(b){return this.startOf(b,!1)},y.$set=function(b,$){var l,_=P.p(b),g="set"+(this.$u?"UTC":""),E=(l={},l[u]=g+"Date",l[m]=g+"Date",l[h]=g+"Month",l[d]=g+"FullYear",l[f]=g+"Hours",l[o]=g+"Minutes",l[i]=g+"Seconds",l[a]=g+"Milliseconds",l)[_],T=_===u?this.$D+($-this.$W):$;if(_===h||_===d){var C=this.clone().set(m,1);C.$d[E](T),C.init(),this.$d=C.set(m,Math.min(this.$D,C.daysInMonth())).$d}else E&&this.$d[E](T);return this.init(),this},y.set=function(b,$){return this.clone().$set(b,$)},y.get=function(b){return this[P.p(b)]()},y.add=function(b,$){var l,_=this;b=Number(b);var g=P.p($),E=function(k){var R=Y(_);return P.w(R.date(R.date()+Math.round(k*b)),_)};if(g===h)return this.set(h,this.$M+b);if(g===d)return this.set(d,this.$y+b);if(g===u)return E(1);if(g===c)return E(7);var T=(l={},l[o]=r,l[f]=s,l[i]=n,l)[g]||1,C=this.$d.getTime()+b*T;return P.w(C,this)},y.subtract=function(b,$){return this.add(-1*b,$)},y.format=function(b){var $=this,l=this.$locale();if(!this.isValid())return l.invalidDate||w;var _=b||"YYYY-MM-DDTHH:mm:ssZ",g=P.z(this),E=this.$H,T=this.$m,C=this.$M,k=l.weekdays,R=l.months,H=l.meridiem,F=function(J,X,Q,ee){return J&&(J[X]||J($,_))||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 _.replace(V,(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 C+1;case"MM":return P.s(C+1,2,"0");case"MMM":return F(l.monthsShort,C,R,3);case"MMMM":return F(R,C);case"D":return $.$D;case"DD":return P.s($.$D,2,"0");case"d":return String($.$W);case"dd":return F(l.weekdaysMin,$.$W,k,2);case"ddd":return F(l.weekdaysShort,$.$W,k,3);case"dddd":return k[$.$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,T,!0);case"A":return W(E,T,!1);case"m":return String(T);case"mm":return P.s(T,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(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(b,$,l){var _,g=this,E=P.p($),T=Y(b),C=(T.utcOffset()-this.utcOffset())*r,k=this-T,R=function(){return P.m(g,T)};switch(E){case d:_=R()/12;break;case h:_=R();break;case p:_=R()/3;break;case c:_=(k-C)/6048e5;break;case u:_=(k-C)/864e5;break;case f:_=k/s;break;case o:_=k/r;break;case i:_=k/n;break;default:_=k}return l?_:P.a(_)},y.daysInMonth=function(){return this.endOf(h).$D},y.$locale=function(){return te[this.$L]},y.locale=function(b,$){if(!b)return this.$L;var l=this.clone(),_=ie(b,$,!0);return _&&(l.$L=_),l},y.clone=function(){return P.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},v})(),D=me.prototype;return Y.prototype=D,[["$ms",a],["$s",i],["$m",o],["$H",f],["$W",u],["$M",h],["$y",d],["$D",m]].forEach((function(v){D[v[1]]=function(y){return this.$g(y,v[0],v[1])}})),Y.extend=function(v,y){return v.$i||(v(y,me,Y),v.$i=!0),Y},Y.locale=ie,Y.isDayjs=le,Y.unix=function(v){return Y(1e3*v)},Y.en=te[q],Y.Ls=te,Y.p={},Y}))})(Ht)),Ht.exports}var $i=wi();const Ei=Ar($i);function Or(e){const t=e?.repoName.split("/")?.[1]||e?.repoName;if(!t)throw new Error("wrong componentPath "+e?.repoName);if(!e?.version)throw new Error("wrong version "+e?.version);const n=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const r=document.createElement("script");if(r.id=t+"-script",r.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${n}`,e?.local)r.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const s=t.split("-")[0];r.src=`http://localhost:6006/webcomponents/${t.replace(s+"-","")}/${n}`}document.head.appendChild(r)}catch(r){console.warn(r)}}var $t={},kn,Dr;function Si(){if(Dr)return kn;Dr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,o=/^\s+|\s+$/g,f=`
|
|
25
25
|
`,u="/",c="*",h="",p="comment",d="declaration";kn=function(w,x){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];x=x||{};var V=1,S=1;function M(D){var v=D.match(t);v&&(V+=v.length);var y=D.lastIndexOf(f);S=~y?D.length-y:S+D.length}function G(){var D={line:V,column:S};return function(v){return v.position=new q(D),le(),v}}function q(D){this.start=D,this.end={line:V,column:S},this.source=x.source}q.prototype.content=w;function te(D){var v=new Error(x.source+":"+V+":"+S+": "+D);if(v.reason=D,v.filename=x.source,v.line=V,v.column=S,v.source=w,!x.silent)throw v}function ne(D){var v=D.exec(w);if(v){var y=v[0];return M(y),w=w.slice(y.length),v}}function le(){ne(n)}function ie(D){var v;for(D=D||[];v=Y();)v!==!1&&D.push(v);return D}function Y(){var D=G();if(!(u!=w.charAt(0)||c!=w.charAt(1))){for(var v=2;h!=w.charAt(v)&&(c!=w.charAt(v)||u!=w.charAt(v+1));)++v;if(v+=2,h===w.charAt(v-1))return te("End of comment missing");var y=w.slice(2,v-2);return S+=2,M(y),w=w.slice(v),S+=2,D({type:p,comment:y})}}function P(){var D=G(),v=ne(r);if(v){if(Y(),!ne(s))return te("property missing ':'");var y=ne(a),b=D({type:d,property:m(v[0].replace(e,h)),value:y?m(y[0].replace(e,h)):h});return ne(i),b}}function me(){var D=[];ie(D);for(var v;v=P();)v!==!1&&(D.push(v),ie(D));return D}return le(),me()};function m(w){return w?w.replace(o,h):h}return kn}var Lr;function xi(){if(Lr)return $t;Lr=1;var e=$t&&$t.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($t,"__esModule",{value:!0}),$t.default=n;var t=e(Si());function n(r,s){var a=null;if(!r||typeof r!="string")return a;var i=(0,t.default)(r),o=typeof s=="function";return i.forEach(function(f){if(f.type==="declaration"){var u=f.property,c=f.value;o?s(u,c,f):c&&(a=a||{},a[u]=c)}}),a}return $t}var Ci=xi();const qr=Ar(Ci);qr.default;function Ti(e,t,n){re(t,!0),re(n,!1)}function jr(e,t,n){re(t,!1),re(n,!0)}var ki=oe('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css" class="svelte-4e76ss"/>'),Mi=oe('<h1 class="title svelte-4e76ss" part="title">Checkout</h1>'),Pi=oe('<div class="dataentry svelte-4e76ss"><span class="dataentry_value svelte-4e76ss"> </span></div>'),Ri=oe('<div class="dataentrycontainer svelte-4e76ss"><!></div>'),Ni=oe('<h4 class="subtitle svelte-4e76ss" part="subtitle"><button class="btn btn-sm detail_btn svelte-4e76ss">edit</button></h4> <div class="dataentrycontainer svelte-4e76ss"><div class="dataentry svelte-4e76ss"><span class="dataentry_key svelte-4e76ss">Name</span><span class="dataentry_value svelte-4e76ss"> </span></div> <div class="dataentry svelte-4e76ss"><span class="dataentry_key svelte-4e76ss">Address</span><span class="dataentry_value svelte-4e76ss"> </span></div></div>',1),Ai=(e,t)=>{re(t,"yes"),setTimeout(()=>{re(t,"no")},200)},Ii=oe('<h4 class="subtitle svelte-4e76ss" part="subtitle">Address</h4> <div class="svelte-4e76ss"><hb-form></hb-form> <div class="svelte-4e76ss"><button style="width:100%;margin-bottom:10px" class="btn btn-primary svelte-4e76ss">continue</button></div></div>',3),Oi=oe('<h4 style="margin-top:20px" class="subtitle svelte-4e76ss" part="subtitle"><span class="detail_label svelte-4e76ss"><i class="bi bi-truck svelte-4e76ss"></i> Shipment Service</span><button class="btn btn-sm detail_btn svelte-4e76ss">edit</button></h4> <div class="dataentrycontainer svelte-4e76ss"><div class="dataentry svelte-4e76ss"><span class="dataentry_key svelte-4e76ss">Shipping Fee</span><span class="dataentry_value svelte-4e76ss"> </span></div> <div class="dataentry svelte-4e76ss"><span class="dataentry_key svelte-4e76ss">Arrive</span><span class="dataentry_value svelte-4e76ss"> </span></div></div>',1),Di=(e,t)=>{re(t,"yes"),setTimeout(()=>{re(t,"no")},200)},Li=oe('<h4 class="subtitle svelte-4e76ss" part="subtitle" style="margin-top:20px"><i class="bi bi-truck svelte-4e76ss"></i> Shipment Service</h4> <div class="svelte-4e76ss"><hb-form></hb-form> <div class="svelte-4e76ss"><button style="width:100%" class="btn btn-primary svelte-4e76ss">continue</button></div></div>',3),qi=oe('<h4 style="margin-top:20px" class="subtitle svelte-4e76ss" part="subtitle"><span class="detail_label svelte-4e76ss"><i class="bi bi-truck svelte-4e76ss"></i> Shipment Service</span><button class="btn btn-sm detail_btn svelte-4e76ss">edit</button></h4> <div class="dataentrycontainer svelte-4e76ss"><div class="dataentry svelte-4e76ss"><span class="dataentry_key svelte-4e76ss">Shipping Fee</span><span class="dataentry_value svelte-4e76ss"> </span></div> <div class="dataentry svelte-4e76ss"><span class="dataentry_key svelte-4e76ss">Shipping Time</span><span class="dataentry_value svelte-4e76ss"> </span></div></div>',1),ji=oe('<div id="shipment_separator" class="svelte-4e76ss"><!></div>'),zi=oe("<hb-payment-paypal></hb-payment-paypal>",2),Fi=oe("<google-pay-button></google-pay-button>",2),Bi=oe('<div class="payment_button_container svelte-4e76ss"><!></div>'),Ui=oe('<div id="payment_btn_container" class="svelte-4e76ss"></div>'),Vi=oe('By Clicking..<button class="btn btn-default svelte-4e76ss">Terms and conditions</button>',1),Yi=oe('<h3 class="subtitle svelte-4e76ss" part="subtitle"><i class="bi bi-wallet2 svelte-4e76ss"></i> Payment Method</h3> <!> <div class="footer_note svelte-4e76ss"><!></div>',1),Hi=oe('<div id="payment_completed_content" class="svelte-4e76ss"><div id="payment_completed_title" class="svelte-4e76ss">payment completed</div> <div id="payment_completed_content" class="svelte-4e76ss"> </div> <div id="payment_completed_footer" class="svelte-4e76ss"><button class="btn btn-link svelte-4e76ss">invoice</button></div></div>'),Wi=oe('<!> <div id="border_top" class="svelte-4e76ss"><div class="svelte-4e76ss"><h3 class="subtitle svelte-4e76ss" part="subtitle"><i class="bi bi-send-fill svelte-4e76ss"></i> Delivery</h3> <!></div> <!></div> <div class="payment_title svelte-4e76ss"><!></div>',1);const Gi={hash:"svelte-4e76ss",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