@zonos/elements 1.3.10-alpha.2 → 1.3.10
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/dist/cjs/{cart-cdce5003.js → cart-34d4bf2e.js} +3 -3
- package/dist/cjs/{getBorderRadius-d9a954a3.js → getBorderRadius-d795f526.js} +1 -1
- package/dist/cjs/{index-72767498.js → index-564fe383.js} +12 -3
- package/dist/cjs/{isDarkColor-c01f24df.js → isDarkColor-33fb96a7.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-a0b376ab.js → submitGtag-1f92afd1.js} +8 -4
- package/dist/cjs/zonos-address_4.cjs.entry.js +5 -5
- package/dist/cjs/zonos-badge_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-card_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-cart-items_9.cjs.entry.js +6 -6
- package/dist/cjs/zonos-checkout.cjs.entry.js +6 -6
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +5 -5
- package/dist/cjs/zonos-elements.cjs.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification.cjs.entry.js +2 -2
- package/dist/cjs/zonos-payment.cjs.entry.js +5 -5
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/{zonosStore-2a8612a4.js → zonosStore-d3f0173b.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/utils/logging/sendErrorLog.js +6 -2
- package/dist/collection/environment.js +3 -3
- package/dist/collection/scripts/zonosBase.js +4 -4
- package/dist/components/zonos-checkout-finish2.js +6 -2
- package/dist/esm/{cart-6be7e36f.js → cart-8526eb36.js} +3 -3
- package/dist/esm/{getBorderRadius-0d133844.js → getBorderRadius-5d750ab8.js} +1 -1
- package/dist/esm/{index-b5be4dc3.js → index-dd40cc85.js} +12 -3
- package/dist/esm/{isDarkColor-8eeda28e.js → isDarkColor-c34dfed9.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{submitGtag-b1c9af26.js → submitGtag-b1e6731d.js} +8 -4
- package/dist/esm/zonos-address_4.entry.js +5 -5
- package/dist/esm/zonos-badge_2.entry.js +2 -2
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/zonos-button_3.entry.js +4 -4
- package/dist/esm/zonos-card_2.entry.js +5 -5
- package/dist/esm/zonos-cart-items_9.entry.js +6 -6
- package/dist/esm/zonos-checkout.entry.js +6 -6
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +5 -5
- package/dist/esm/zonos-country-flag.entry.js +5 -5
- package/dist/esm/zonos-country-select_3.entry.js +5 -5
- package/dist/esm/zonos-elements.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +5 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-notification.entry.js +2 -2
- package/dist/esm/zonos-payment.entry.js +5 -5
- package/dist/esm/zonos-select-dialog-header_2.entry.js +2 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/{zonosStore-807f931f.js → zonosStore-aac7c6ac.js} +1 -1
- package/dist/esm-es5/{cart-6be7e36f.js → cart-8526eb36.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-0d133844.js → getBorderRadius-5d750ab8.js} +1 -1
- package/dist/esm-es5/{index-b5be4dc3.js → index-dd40cc85.js} +1 -1
- package/dist/esm-es5/{isDarkColor-8eeda28e.js → isDarkColor-c34dfed9.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{submitGtag-b1c9af26.js → submitGtag-b1e6731d.js} +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-807f931f.js → zonosStore-aac7c6ac.js} +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/environment.d.ts +4 -4
- package/dist/zonos-elements/p-07bb1bed.js +2 -0
- package/dist/zonos-elements/{p-58e2f6a1.system.entry.js → p-0b4910fe.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7cb2dfd5.entry.js → p-0e63111b.entry.js} +1 -1
- package/dist/zonos-elements/{p-d427adf2.entry.js → p-144f4d31.entry.js} +1 -1
- package/dist/zonos-elements/{p-6d2ba24a.entry.js → p-188ddbe2.entry.js} +1 -1
- package/dist/zonos-elements/{p-db49edae.system.entry.js → p-1fc444b0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-09c9bf58.system.entry.js → p-22802400.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-314be538.system.entry.js → p-27d57265.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-865900d4.system.entry.js → p-2984aa3d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ff64ddc5.entry.js → p-315c1fc2.entry.js} +1 -1
- package/dist/zonos-elements/{p-701d0fef.entry.js → p-333da541.entry.js} +1 -1
- package/dist/zonos-elements/{p-2f84b148.entry.js → p-473943ae.entry.js} +1 -1
- package/dist/zonos-elements/{p-35e878eb.system.entry.js → p-482371fb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9cdc6b5f.js → p-49a5be72.js} +1 -1
- package/dist/zonos-elements/{p-166ec0c2.system.entry.js → p-4ad5f307.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f5b75c6b.entry.js → p-4eb24c96.entry.js} +1 -1
- package/dist/zonos-elements/{p-d1ab0823.system.js → p-52de4d70.system.js} +2 -2
- package/dist/zonos-elements/{p-3a406969.system.entry.js → p-5c991faa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8f423d46.entry.js → p-5d2dd287.entry.js} +1 -1
- package/dist/zonos-elements/{p-127b480c.entry.js → p-6181f2d5.entry.js} +1 -1
- package/dist/zonos-elements/{p-72390726.entry.js → p-6255bfe6.entry.js} +1 -1
- package/dist/zonos-elements/{p-066c5893.system.js → p-6e81adba.system.js} +1 -1
- package/dist/zonos-elements/{p-50460bf4.system.entry.js → p-770384fa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c476a347.system.js → p-77727098.system.js} +1 -1
- package/dist/zonos-elements/{p-e71fbec9.js → p-77c54b83.js} +1 -1
- package/dist/zonos-elements/{p-121c551d.system.entry.js → p-7e355496.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c284e71c.system.entry.js → p-8d608535.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb5dc3ef.system.js → p-92e88f3d.system.js} +1 -1
- package/dist/zonos-elements/{p-dce14b91.entry.js → p-95cc6b89.entry.js} +1 -1
- package/dist/zonos-elements/{p-af3ff326.system.entry.js → p-9b95b387.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1691b167.entry.js → p-9db3028d.entry.js} +1 -1
- package/dist/zonos-elements/{p-39d75a07.system.js → p-a554d58d.system.js} +1 -1
- package/dist/zonos-elements/{p-96e2cde7.entry.js → p-a578facf.entry.js} +1 -1
- package/dist/zonos-elements/{p-e76069cc.system.entry.js → p-a87803b7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a38876df.system.entry.js → p-aaf75ede.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e67ed67d.entry.js → p-ab7657fa.entry.js} +1 -1
- package/dist/zonos-elements/{p-b05d21ac.entry.js → p-ada42479.entry.js} +1 -1
- package/dist/zonos-elements/{p-3ff1bed8.system.entry.js → p-adc2e8c3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-12e97569.entry.js → p-b0c84054.entry.js} +1 -1
- package/dist/zonos-elements/{p-04fa4dd3.system.entry.js → p-b1a44483.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-95dee6f4.system.js → p-c1e54094.system.js} +1 -1
- package/dist/zonos-elements/{p-e28d648c.system.entry.js → p-c6de2e40.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-321e8b0e.system.entry.js → p-cf03cb54.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-25de098d.entry.js → p-d0d12a64.entry.js} +1 -1
- package/dist/zonos-elements/{p-75490d7c.system.js → p-d9c65636.system.js} +1 -1
- package/dist/zonos-elements/{p-58a25a6a.entry.js → p-dd153a4e.entry.js} +1 -1
- package/dist/zonos-elements/{p-dd25205e.entry.js → p-e12a18d3.entry.js} +1 -1
- package/dist/zonos-elements/p-e4749f19.js +1 -0
- package/dist/zonos-elements/{p-af946fb3.system.entry.js → p-e87e8c9c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-776f07e7.js → p-ed7d1948.js} +1 -1
- package/dist/zonos-elements/{p-55cbb4cd.entry.js → p-f1170e7b.entry.js} +1 -1
- package/dist/zonos-elements/p-f3e497d0.js +1 -0
- package/dist/zonos-elements/{p-c6f186fe.system.entry.js → p-f8e7aea7.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +4 -5
- package/dist/zonos-elements/p-3d4fc5aa.js +0 -1
- package/dist/zonos-elements/p-58127116.js +0 -2
- package/dist/zonos-elements/p-e843a74b.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as zonosStore}from"./zonosStore-
|
|
1
|
+
import{z as zonosStore}from"./zonosStore-aac7c6ac.js";var getBorderRadius=function(o,r){if(r===void 0){r="10px"}if(o){return o==="SHARP"?"0px":r}return zonosStore.appearance.style==="SHARP"?"0px":r};export{getBorderRadius as g};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var e=function(n,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]};return e(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var __awaiter=this&&this.__awaiter||function(e,n,r,t){function i(e){return e instanceof r?e:new r((function(n){n(e)}))}return new(r||(r=Promise))((function(r,a){function o(e){try{f(t.next(e))}catch(e){a(e)}}function u(e){try{f(t["throw"](e))}catch(e){a(e)}}function f(e){e.done?r(e.value):i(e.value).then(o,u)}f((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(n){return f([e,n])}}function f(u){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(r=0)),r)try{if(t=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1];a=u;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(u);break}if(a[2])r.ops.pop();r.trys.pop();continue}u=n.call(e,r)}catch(e){u=[6,e];i=0}finally{t=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,r){if(r||arguments.length===2)for(var t=0,i=n.length,a;t<i;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};var NAMESPACE="zonos-elements";var scopeId;var hostTagName;var useNativeShadowDom=false;var isSvgMode=false;var renderingRef=null;var queuePending=false;var getAssetPath=function(e){var n=new URL(e,plt.t);return n.origin!==win.location.origin?n.href:n.pathname};var createTime=function(e,n){if(n===void 0){n=""}{return function(){return}}};var uniqueTime=function(e,n){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}.hydrated{visibility:inherit}";var SLOT_FB_CSS="slot-fb{display:contents}slot-fb[hidden]{display:none}";var EMPTY_OBJ={};var SVG_NS="http://www.w3.org/2000/svg";var HTML_NS="http://www.w3.org/1999/xhtml";var isDef=function(e){return e!=null};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};function queryNonceMetaTagContent(e){var n,r,t;return(t=(r=(n=e.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&t!==void 0?t:undefined}var h=function(e,n){var r=[];for(var t=2;t<arguments.length;t++){r[t-2]=arguments[t]}var i=null;var a=null;var o=false;var u=false;var f=[];var s=function(n){for(var r=0;r<n.length;r++){i=n[r];if(Array.isArray(i)){s(i)}else if(i!=null&&typeof i!=="boolean"){if(o=typeof e!=="function"&&!isComplexType(i)){i=String(i)}if(o&&u){f[f.length-1].i+=i}else{f.push(o?newVNode(null,i):i)}u=o}}};s(r);if(n){if(n.key){a=n.key}{var l=n.className||n.class;if(l){n.class=typeof l!=="object"?l:Object.keys(l).filter((function(e){return l[e]})).join(" ")}}}if(typeof e==="function"){return e(n===null?{}:n,f,vdomFnUtils)}var c=newVNode(e,null);c.o=n;if(f.length>0){c.u=f}{c.l=a}return c};var newVNode=function(e,n){var r={v:0,p:e,i:n,m:null,u:null};{r.o=null}{r.l=null}return r};var Host={};var isHost=function(e){return e&&e.p===Host};var vdomFnUtils={forEach:function(e,n){return e.map(convertToPublic).forEach(n)},map:function(e,n){return e.map(convertToPublic).map(n).map(convertToPrivate)}};var convertToPublic=function(e){return{vattrs:e.o,vchildren:e.u,vkey:e.l,vname:e.h,vtag:e.p,vtext:e.i}};var convertToPrivate=function(e){if(typeof e.vtag==="function"){var n=Object.assign({},e.vattrs);if(e.vkey){n.key=e.vkey}if(e.vname){n.name=e.vname}return h.apply(void 0,__spreadArray([e.vtag,n],e.vchildren||[],false))}var r=newVNode(e.vtag,e.vtext);r.o=e.vattrs;r.u=e.vchildren;r.l=e.vkey;r.h=e.vname;return r};var parsePropertyValue=function(e,n){if(e!=null&&!isComplexType(e)){if(n&4){return e==="false"?false:e===""||!!e}if(n&2){return parseFloat(e)}if(n&1){return String(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var createEvent=function(e,n,r){var t=getElement(e);return{emit:function(e){return emitEvent(t,n,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}}};var emitEvent=function(e,n,r){var t=plt.ce(n,r);e.dispatchEvent(t);return t};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,n,r){var t=styles.get(e);if(supportsConstructableStylesheets&&r){t=t||new CSSStyleSheet;if(typeof t==="string"){t=n}else{t.replaceSync(n)}}else{t=n}styles.set(e,t)};var addStyle=function(e,n,r){var t;var i=getScopeId(n);var a=styles.get(i);e=e.nodeType===11?e:doc;if(a){if(typeof a==="string"){e=e.head||e;var o=rootAppliedStyles.get(e);var u=void 0;if(!o){rootAppliedStyles.set(e,o=new Set)}if(!o.has(i)){{u=doc.createElement("style");u.innerHTML=a;var f=(t=plt.S)!==null&&t!==void 0?t:queryNonceMetaTagContent(doc);if(f!=null){u.setAttribute("nonce",f)}e.insertBefore(u,e.querySelector("link"))}if(n.v&4){u.innerHTML+=SLOT_FB_CSS}if(o){o.add(i)}}}else if(!e.adoptedStyleSheets.includes(a)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[a],false)}}return i};var attachStyles=function(e){var n=e.T;var r=e.$hostElement$;var t=n.v;var i=createTime("attachStyles",n._);var a=addStyle(r.shadowRoot?r.shadowRoot:r.getRootNode(),n);if(t&10){r["s-sc"]=a;r.classList.add(a+"-h");if(t&2){r.classList.add(a+"-s")}}i()};var getScopeId=function(e,n){return"sc-"+e._};var setAccessor=function(e,n,r,t,i,a){if(r!==t){var o=isMemberInElement(e,n);var u=n.toLowerCase();if(n==="class"){var f=e.classList;var s=parseClassList(r);var l=parseClassList(t);f.remove.apply(f,s.filter((function(e){return e&&!l.includes(e)})));f.add.apply(f,l.filter((function(e){return e&&!s.includes(e)})))}else if(n==="style"){{for(var c in r){if(!t||t[c]==null){if(c.includes("-")){e.style.removeProperty(c)}else{e.style[c]=""}}}}for(var c in t){if(!r||t[c]!==r[c]){if(c.includes("-")){e.style.setProperty(c,t[c])}else{e.style[c]=t[c]}}}}else if(n==="key");else if(n==="ref"){if(t){t(e)}}else if(!o&&n[0]==="o"&&n[1]==="n"){if(n[2]==="-"){n=n.slice(3)}else if(isMemberInElement(win,u)){n=u.slice(2)}else{n=u[2]+n.slice(3)}if(r||t){var v=n.endsWith(CAPTURE_EVENT_SUFFIX);n=n.replace(CAPTURE_EVENT_REGEX,"");if(r){plt.rel(e,n,r,v)}if(t){plt.ael(e,n,t,v)}}}else{var d=isComplexType(t);if((o||d&&t!==null)&&!i){try{if(!e.tagName.includes("-")){var p=t==null?"":t;if(n==="list"){o=false}else if(r==null||e[n]!=p){e[n]=p}}else{e[n]=t}}catch(e){}}if(t==null||t===false){if(t!==false||e.getAttribute(n)===""){{e.removeAttribute(n)}}}else if((!o||a&4||i)&&!d){t=t===true?"":t;{e.setAttribute(n,t)}}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){return!e?[]:e.split(parseClassListRegex)};var CAPTURE_EVENT_SUFFIX="Capture";var CAPTURE_EVENT_REGEX=new RegExp(CAPTURE_EVENT_SUFFIX+"$");var updateElement=function(e,n,r,t){var i=n.m.nodeType===11&&n.m.host?n.m.host:n.m;var a=e&&e.o||EMPTY_OBJ;var o=n.o||EMPTY_OBJ;{for(t in a){if(!(t in o)){setAccessor(i,t,a[t],undefined,r,n.v)}}}for(t in o){setAccessor(i,t,a[t],o[t],r,n.v)}};var createElm=function(e,n,r,t){var i=n.u[r];var a=0;var o;var u;if(i.i!==null){o=i.m=doc.createTextNode(i.i)}else{if(!isSvgMode){isSvgMode=i.p==="svg"}o=i.m=doc.createElementNS(isSvgMode?SVG_NS:HTML_NS,i.p);if(isSvgMode&&i.p==="foreignObject"){isSvgMode=false}{updateElement(null,i,isSvgMode)}if(isDef(scopeId)&&o["s-si"]!==scopeId){o.classList.add(o["s-si"]=scopeId)}if(i.u){for(a=0;a<i.u.length;++a){u=createElm(e,i,a);if(u){o.appendChild(u)}}}{if(i.p==="svg"){isSvgMode=false}else if(o.tagName==="foreignObject"){isSvgMode=true}}}o["s-hn"]=hostTagName;return o};var addVnodes=function(e,n,r,t,i,a){var o=e;var u;if(o.shadowRoot&&o.tagName===hostTagName){o=o.shadowRoot}for(;i<=a;++i){if(t[i]){u=createElm(null,r,i);if(u){t[i].m=u;o.insertBefore(u,n)}}}};var removeVnodes=function(e,n,r){for(var t=n;t<=r;++t){var i=e[t];if(i){var a=i.m;nullifyVNodeRefs(i);if(a){a.remove()}}}};var updateChildren=function(e,n,r,t,i){if(i===void 0){i=false}var a=0;var o=0;var u=0;var f=0;var s=n.length-1;var l=n[0];var c=n[s];var v=t.length-1;var d=t[0];var p=t[v];var m;var h;while(a<=s&&o<=v){if(l==null){l=n[++a]}else if(c==null){c=n[--s]}else if(d==null){d=t[++o]}else if(p==null){p=t[--v]}else if(isSameVnode(l,d,i)){patch(l,d,i);l=n[++a];d=t[++o]}else if(isSameVnode(c,p,i)){patch(c,p,i);c=n[--s];p=t[--v]}else if(isSameVnode(l,p,i)){patch(l,p,i);e.insertBefore(l.m,c.m.nextSibling);l=n[++a];p=t[--v]}else if(isSameVnode(c,d,i)){patch(c,d,i);e.insertBefore(c.m,l.m);c=n[--s];d=t[++o]}else{u=-1;{for(f=a;f<=s;++f){if(n[f]&&n[f].l!==null&&n[f].l===d.l){u=f;break}}}if(u>=0){h=n[u];if(h.p!==d.p){m=createElm(n&&n[o],r,u)}else{patch(h,d,i);n[u]=undefined;m=h.m}d=t[++o]}else{m=createElm(n&&n[o],r,o);d=t[++o]}if(m){{l.m.parentNode.insertBefore(m,l.m)}}}}if(a>s){addVnodes(e,t[v+1]==null?null:t[v+1].m,r,t,o,v)}else if(o>v){removeVnodes(n,a,s)}};var isSameVnode=function(e,n,r){if(r===void 0){r=false}if(e.p===n.p){if(!r){return e.l===n.l}return true}return false};var patch=function(e,n,r){if(r===void 0){r=false}var t=n.m=e.m;var i=e.u;var a=n.u;var o=n.p;var u=n.i;if(u===null){{isSvgMode=o==="svg"?true:o==="foreignObject"?false:isSvgMode}{if(o==="slot"&&!useNativeShadowDom);else{updateElement(e,n,isSvgMode)}}if(i!==null&&a!==null){updateChildren(t,i,n,a,r)}else if(a!==null){if(e.i!==null){t.textContent=""}addVnodes(t,null,n,a,0,a.length-1)}else if(i!==null){removeVnodes(i,0,i.length-1)}if(isSvgMode&&o==="svg"){isSvgMode=false}}else if(e.i!==u){t.data=u}};var nullifyVNodeRefs=function(e){{e.o&&e.o.ref&&e.o.ref(null);e.u&&e.u.map(nullifyVNodeRefs)}};var renderVdom=function(e,n,r){if(r===void 0){r=false}var t=e.$hostElement$;var i=e.T;var a=e.C||newVNode(null,null);var o=isHost(n)?n:h(null,null,n);hostTagName=t.tagName;if(r&&o.o){for(var u=0,f=Object.keys(o.o);u<f.length;u++){var s=f[u];if(t.hasAttribute(s)&&!["key","ref","style","class"].includes(s)){o.o[s]=t[s]}}}o.p=null;o.v|=4;e.C=o;o.m=a.m=t.shadowRoot||t;{scopeId=t["s-sc"]}useNativeShadowDom=(i.v&1)!==0;patch(a,o,r)};var attachToAncestor=function(e,n){if(n&&!e.R&&n["s-p"]){n["s-p"].push(new Promise((function(n){return e.R=n})))}};var scheduleUpdate=function(e,n){{e.v|=16}if(e.v&4){e.v|=512;return}attachToAncestor(e,e.M);var r=function(){return dispatchHooks(e,n)};return writeTask(r)};var dispatchHooks=function(e,n){var r=createTime("scheduleUpdate",e.T._);var t=e.V;var i;if(n){{e.v|=256;if(e.A){e.A.map((function(e){var n=e[0],r=e[1];return safeCall(t,n,r)}));e.A=undefined}}{i=safeCall(t,"componentWillLoad")}}r();return enqueue(i,(function(){return updateComponent(e,t,n)}))};var enqueue=function(e,n){return isPromisey(e)?e.then(n):n()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(e,n,r){return __awaiter(void 0,void 0,void 0,(function(){var t,i,a,o,u,f,s;return __generator(this,(function(l){i=e.$hostElement$;a=createTime("update",e.T._);o=i["s-rc"];if(r){attachStyles(e)}u=createTime("render",e.T._);{callRender(e,n,i,r)}if(o){o.map((function(e){return e()}));i["s-rc"]=undefined}u();a();{f=(t=i["s-p"])!==null&&t!==void 0?t:[];s=function(){return postUpdateComponent(e)};if(f.length===0){s()}else{Promise.all(f).then(s);e.v|=4;f.length=0}}return[2]}))}))};var callRender=function(e,n,r,t){try{renderingRef=n;n=n.render();{e.v&=~16}{e.v|=2}{{{renderVdom(e,n,t)}}}}catch(n){consoleError(n,e.$hostElement$)}renderingRef=null;return null};var getRenderingRef=function(){return renderingRef};var postUpdateComponent=function(e){var n=e.T._;var r=e.$hostElement$;var t=createTime("postUpdate",n);var i=e.V;var a=e.M;{safeCall(i,"componentDidRender")}if(!(e.v&64)){e.v|=64;{addHydratedFlag(r)}{safeCall(i,"componentDidLoad")}t();{e.N(r);if(!a){appDidLoad()}}}else{t()}{e.P(r)}{if(e.R){e.R();e.R=undefined}if(e.v&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.v&=~(4|512)}};var forceUpdate=function(e){{var n=getHostRef(e);var r=n.$hostElement$.isConnected;if(r&&(n.v&(2|16))===2){scheduleUpdate(n,false)}return r}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,n,r){if(e&&e[n]){try{return e[n](r)}catch(e){consoleError(e)}}return undefined};var addHydratedFlag=function(e){return e.classList.add("hydrated")};var getValue=function(e,n){return getHostRef(e).H.get(n)};var setValue=function(e,n,r,t){var i=getHostRef(e);var a=i.$hostElement$;var o=i.H.get(n);var u=i.v;var f=i.V;r=parsePropertyValue(r,t.L[n][0]);var s=Number.isNaN(o)&&Number.isNaN(r);var l=r!==o&&!s;if((!(u&8)||o===undefined)&&l){i.H.set(n,r);if(f){if(t.$&&u&128){var c=t.$[n];if(c){c.map((function(e){try{f[e](r,o,n)}catch(e){consoleError(e,a)}}))}}if((u&(2|16))===2){scheduleUpdate(i,false)}}}};var proxyComponent=function(e,n,r){var t;var i=e.prototype;if(n.L){if(e.watchers){n.$=e.watchers}var a=Object.entries(n.L);a.map((function(e){var t=e[0],a=e[1][0];if(a&31||r&2&&a&32){Object.defineProperty(i,t,{get:function(){return getValue(this,t)},set:function(e){setValue(this,t,e,n)},configurable:true,enumerable:true})}else if(r&1&&a&64){Object.defineProperty(i,t,{value:function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}var r;var i=getHostRef(this);return(r=i===null||i===void 0?void 0:i.k)===null||r===void 0?void 0:r.then((function(){var n;return(n=i.V)===null||n===void 0?void 0:n[t].apply(n,e)}))}})}}));if(r&1){var o=new Map;i.attributeChangedCallback=function(e,r,t){var a=this;plt.jmp((function(){var u;var f=o.get(e);if(a.hasOwnProperty(f)){t=a[f];delete a[f]}else if(i.hasOwnProperty(f)&&typeof a[f]==="number"&&a[f]==t){return}else if(f==null){var s=getHostRef(a);var l=s===null||s===void 0?void 0:s.v;if(l&&!(l&8)&&l&128&&t!==r){var c=s.V;var v=(u=n.$)===null||u===void 0?void 0:u[e];v===null||v===void 0?void 0:v.forEach((function(n){if(c[n]!=null){c[n].call(c,t,r,e)}}))}return}a[f]=t===null&&typeof a[f]==="boolean"?false:t}))};e.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((t=n.$)!==null&&t!==void 0?t:{}),true),a.filter((function(e){var n=e[0],r=e[1];return r[0]&15})).map((function(e){var n=e[0],r=e[1];var t=r[1]||n;o.set(t,n);return t})),true)))}}return e};var initializeComponent=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var e,t,i,a,o,u,f,s;return __generator(this,(function(l){switch(l.label){case 0:if(!((n.v&32)===0))return[3,3];n.v|=32;e=loadModule(r);if(!e.then)return[3,2];t=uniqueTime();return[4,e];case 1:e=l.sent();t();l.label=2;case 2:if(!e.isProxied){{r.$=e.watchers}proxyComponent(e,r,2);e.isProxied=true}i=createTime("createInstance",r._);{n.v|=8}try{new e(n)}catch(e){consoleError(e)}{n.v&=~8}{n.v|=128}i();if(e.style){a=e.style;o=getScopeId(r);if(!styles.has(o)){u=createTime("registerStyles",r._);registerStyle(o,a,!!(r.v&1));u()}}l.label=3;case 3:f=n.M;s=function(){return scheduleUpdate(n,true)};if(f&&f["s-rc"]){f["s-rc"].push(s)}else{s()}return[2]}}))}))};var fireConnectedCallback=function(e){};var connectedCallback=function(e){if((plt.v&1)===0){var n=getHostRef(e);var r=n.T;var t=createTime("connectedCallback",r._);if(!(n.v&1)){n.v|=1;{var i=e;while(i=i.parentNode||i.host){if(i["s-p"]){attachToAncestor(n,n.M=i);break}}}if(r.L){Object.entries(r.L).map((function(n){var r=n[0],t=n[1][0];if(t&31&&e.hasOwnProperty(r)){var i=e[r];delete e[r];e[r]=i}}))}{initializeComponent(e,n,r)}}else{addHostEventListeners(e,n,r.O);if(n===null||n===void 0?void 0:n.V);else if(n===null||n===void 0?void 0:n.U){n.U.then((function(){return fireConnectedCallback()}))}}t()}};var disconnectInstance=function(e){{safeCall(e,"disconnectedCallback")}};var disconnectedCallback=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){if((plt.v&1)===0){n=getHostRef(e);{if(n.j){n.j.map((function(e){return e()}));n.j=undefined}}if(n===null||n===void 0?void 0:n.V){disconnectInstance(n.V)}else if(n===null||n===void 0?void 0:n.U){n.U.then((function(){return disconnectInstance(n.V)}))}}return[2]}))}))};var bootstrapLazy=function(e,n){if(n===void 0){n={}}var r;var t=createTime();var i=[];var a=n.exclude||[];var o=win.customElements;var u=doc.head;var f=u.querySelector("meta[charset]");var s=doc.createElement("style");var l=[];var c;var v=true;Object.assign(plt,n);plt.t=new URL(n.resourcesUrl||"./",doc.baseURI).href;var d=false;e.map((function(e){e[1].map((function(n){var r;var t={v:n[0],_:n[1],L:n[2],O:n[3]};if(t.v&4){d=true}{t.L=n[2]}{t.O=n[3]}{t.$=(r=n[4])!==null&&r!==void 0?r:{}}var u=t._;var f=function(e){__extends(n,e);function n(n){var r=e.call(this,n)||this;n=r;registerHost(n,t);if(t.v&1){{{n.attachShadow({mode:"open"})}}}return r}n.prototype.connectedCallback=function(){var e=this;if(c){clearTimeout(c);c=null}if(v){l.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};n.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};n.prototype.componentOnReady=function(){return getHostRef(this).U};return n}(HTMLElement);t.q=e[0];if(!a.includes(u)&&!o.get(u)){i.push(u);o.define(u,proxyComponent(f,t,1))}}))}));if(i.length>0){if(d){s.innerHTML+=SLOT_FB_CSS}{s.innerHTML+=i+HYDRATED_CSS}if(s.innerHTML.length){s.setAttribute("data-styles","");var p=(r=plt.S)!==null&&r!==void 0?r:queryNonceMetaTagContent(doc);if(p!=null){s.setAttribute("nonce",p)}u.insertBefore(s,f?f.nextSibling:u.firstChild)}}v=false;if(l.length){l.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return c=setTimeout(appDidLoad,30)}))}}t()};var Fragment=function(e,n){return n};var addHostEventListeners=function(e,n,r,t){if(r){r.map((function(r){var t=r[0],i=r[1],a=r[2];var o=getHostListenerTarget(e,t);var u=hostListenerProxy(n,a);var f=hostListenerOpts(t);plt.ael(o,i,u,f);(n.j=n.j||[]).push((function(){return plt.rel(o,i,u,f)}))}))}};var hostListenerProxy=function(e,n){return function(r){try{{if(e.v&256){e.V[n](r)}else{(e.A=e.A||[]).push([n,r])}}}catch(e){consoleError(e)}}};var getHostListenerTarget=function(e,n){if(n&4)return doc;if(n&8)return win;if(n&16)return doc.body;return e};var hostListenerOpts=function(e){return supportsListenerOptions?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0};var setNonce=function(e){return plt.S=e};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,n){return hostRefs.set(n.V=e,n)};var registerHost=function(e,n){var r={v:0,$hostElement$:e,T:n,H:new Map};{r.k=new Promise((function(e){return r.P=e}))}{r.U=new Promise((function(e){return r.N=e}));e["s-p"]=[];e["s-rc"]=[]}addHostEventListeners(e,r,n.O);return hostRefs.set(e,r)};var isMemberInElement=function(e,n){return n in e};var consoleError=function(e,n){return(0,console.error)(e,n)};var cmpModules=new Map;var loadModule=function(e,n,r){var t=e._.replace(/-/g,"_");var i=e.q;var a=cmpModules.get(i);if(a){return a[t]}
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(n,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]};return e(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var __awaiter=this&&this.__awaiter||function(e,n,r,t){function i(e){return e instanceof r?e:new r((function(n){n(e)}))}return new(r||(r=Promise))((function(r,a){function o(e){try{f(t.next(e))}catch(e){a(e)}}function u(e){try{f(t["throw"](e))}catch(e){a(e)}}function f(e){e.done?r(e.value):i(e.value).then(o,u)}f((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(n){return f([e,n])}}function f(u){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(r=0)),r)try{if(t=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1];a=u;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(u);break}if(a[2])r.ops.pop();r.trys.pop();continue}u=n.call(e,r)}catch(e){u=[6,e];i=0}finally{t=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,r){if(r||arguments.length===2)for(var t=0,i=n.length,a;t<i;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};var NAMESPACE="zonos-elements";var scopeId;var hostTagName;var useNativeShadowDom=false;var isSvgMode=false;var renderingRef=null;var queuePending=false;var getAssetPath=function(e){var n=new URL(e,plt.t);return n.origin!==win.location.origin?n.href:n.pathname};var createTime=function(e,n){if(n===void 0){n=""}{return function(){return}}};var uniqueTime=function(e,n){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}.hydrated{visibility:inherit}";var SLOT_FB_CSS="slot-fb{display:contents}slot-fb[hidden]{display:none}";var EMPTY_OBJ={};var SVG_NS="http://www.w3.org/2000/svg";var HTML_NS="http://www.w3.org/1999/xhtml";var isDef=function(e){return e!=null};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};function queryNonceMetaTagContent(e){var n,r,t;return(t=(r=(n=e.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&t!==void 0?t:undefined}var h=function(e,n){var r=[];for(var t=2;t<arguments.length;t++){r[t-2]=arguments[t]}var i=null;var a=null;var o=false;var u=false;var f=[];var s=function(n){for(var r=0;r<n.length;r++){i=n[r];if(Array.isArray(i)){s(i)}else if(i!=null&&typeof i!=="boolean"){if(o=typeof e!=="function"&&!isComplexType(i)){i=String(i)}if(o&&u){f[f.length-1].i+=i}else{f.push(o?newVNode(null,i):i)}u=o}}};s(r);if(n){if(n.key){a=n.key}{var l=n.className||n.class;if(l){n.class=typeof l!=="object"?l:Object.keys(l).filter((function(e){return l[e]})).join(" ")}}}if(typeof e==="function"){return e(n===null?{}:n,f,vdomFnUtils)}var c=newVNode(e,null);c.o=n;if(f.length>0){c.u=f}{c.l=a}return c};var newVNode=function(e,n){var r={v:0,p:e,i:n,m:null,u:null};{r.o=null}{r.l=null}return r};var Host={};var isHost=function(e){return e&&e.p===Host};var vdomFnUtils={forEach:function(e,n){return e.map(convertToPublic).forEach(n)},map:function(e,n){return e.map(convertToPublic).map(n).map(convertToPrivate)}};var convertToPublic=function(e){return{vattrs:e.o,vchildren:e.u,vkey:e.l,vname:e.h,vtag:e.p,vtext:e.i}};var convertToPrivate=function(e){if(typeof e.vtag==="function"){var n=Object.assign({},e.vattrs);if(e.vkey){n.key=e.vkey}if(e.vname){n.name=e.vname}return h.apply(void 0,__spreadArray([e.vtag,n],e.vchildren||[],false))}var r=newVNode(e.vtag,e.vtext);r.o=e.vattrs;r.u=e.vchildren;r.l=e.vkey;r.h=e.vname;return r};var parsePropertyValue=function(e,n){if(e!=null&&!isComplexType(e)){if(n&4){return e==="false"?false:e===""||!!e}if(n&2){return parseFloat(e)}if(n&1){return String(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var createEvent=function(e,n,r){var t=getElement(e);return{emit:function(e){return emitEvent(t,n,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}}};var emitEvent=function(e,n,r){var t=plt.ce(n,r);e.dispatchEvent(t);return t};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,n,r){var t=styles.get(e);if(supportsConstructableStylesheets&&r){t=t||new CSSStyleSheet;if(typeof t==="string"){t=n}else{t.replaceSync(n)}}else{t=n}styles.set(e,t)};var addStyle=function(e,n,r){var t;var i=getScopeId(n);var a=styles.get(i);e=e.nodeType===11?e:doc;if(a){if(typeof a==="string"){e=e.head||e;var o=rootAppliedStyles.get(e);var u=void 0;if(!o){rootAppliedStyles.set(e,o=new Set)}if(!o.has(i)){{u=doc.createElement("style");u.innerHTML=a;var f=(t=plt.S)!==null&&t!==void 0?t:queryNonceMetaTagContent(doc);if(f!=null){u.setAttribute("nonce",f)}e.insertBefore(u,e.querySelector("link"))}if(n.v&4){u.innerHTML+=SLOT_FB_CSS}if(o){o.add(i)}}}else if(!e.adoptedStyleSheets.includes(a)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[a],false)}}return i};var attachStyles=function(e){var n=e.T;var r=e.$hostElement$;var t=n.v;var i=createTime("attachStyles",n._);var a=addStyle(r.shadowRoot?r.shadowRoot:r.getRootNode(),n);if(t&10){r["s-sc"]=a;r.classList.add(a+"-h");if(t&2){r.classList.add(a+"-s")}}i()};var getScopeId=function(e,n){return"sc-"+e._};var setAccessor=function(e,n,r,t,i,a){if(r!==t){var o=isMemberInElement(e,n);var u=n.toLowerCase();if(n==="class"){var f=e.classList;var s=parseClassList(r);var l=parseClassList(t);f.remove.apply(f,s.filter((function(e){return e&&!l.includes(e)})));f.add.apply(f,l.filter((function(e){return e&&!s.includes(e)})))}else if(n==="style"){{for(var c in r){if(!t||t[c]==null){if(c.includes("-")){e.style.removeProperty(c)}else{e.style[c]=""}}}}for(var c in t){if(!r||t[c]!==r[c]){if(c.includes("-")){e.style.setProperty(c,t[c])}else{e.style[c]=t[c]}}}}else if(n==="key");else if(n==="ref"){if(t){t(e)}}else if(!o&&n[0]==="o"&&n[1]==="n"){if(n[2]==="-"){n=n.slice(3)}else if(isMemberInElement(win,u)){n=u.slice(2)}else{n=u[2]+n.slice(3)}if(r||t){var v=n.endsWith(CAPTURE_EVENT_SUFFIX);n=n.replace(CAPTURE_EVENT_REGEX,"");if(r){plt.rel(e,n,r,v)}if(t){plt.ael(e,n,t,v)}}}else{var d=isComplexType(t);if((o||d&&t!==null)&&!i){try{if(!e.tagName.includes("-")){var p=t==null?"":t;if(n==="list"){o=false}else if(r==null||e[n]!=p){e[n]=p}}else{e[n]=t}}catch(e){}}if(t==null||t===false){if(t!==false||e.getAttribute(n)===""){{e.removeAttribute(n)}}}else if((!o||a&4||i)&&!d){t=t===true?"":t;{e.setAttribute(n,t)}}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){return!e?[]:e.split(parseClassListRegex)};var CAPTURE_EVENT_SUFFIX="Capture";var CAPTURE_EVENT_REGEX=new RegExp(CAPTURE_EVENT_SUFFIX+"$");var updateElement=function(e,n,r,t){var i=n.m.nodeType===11&&n.m.host?n.m.host:n.m;var a=e&&e.o||EMPTY_OBJ;var o=n.o||EMPTY_OBJ;{for(t in a){if(!(t in o)){setAccessor(i,t,a[t],undefined,r,n.v)}}}for(t in o){setAccessor(i,t,a[t],o[t],r,n.v)}};var createElm=function(e,n,r,t){var i=n.u[r];var a=0;var o;var u;if(i.i!==null){o=i.m=doc.createTextNode(i.i)}else{if(!isSvgMode){isSvgMode=i.p==="svg"}o=i.m=doc.createElementNS(isSvgMode?SVG_NS:HTML_NS,i.p);if(isSvgMode&&i.p==="foreignObject"){isSvgMode=false}{updateElement(null,i,isSvgMode)}if(isDef(scopeId)&&o["s-si"]!==scopeId){o.classList.add(o["s-si"]=scopeId)}if(i.u){for(a=0;a<i.u.length;++a){u=createElm(e,i,a);if(u){o.appendChild(u)}}}{if(i.p==="svg"){isSvgMode=false}else if(o.tagName==="foreignObject"){isSvgMode=true}}}o["s-hn"]=hostTagName;return o};var addVnodes=function(e,n,r,t,i,a){var o=e;var u;if(o.shadowRoot&&o.tagName===hostTagName){o=o.shadowRoot}for(;i<=a;++i){if(t[i]){u=createElm(null,r,i);if(u){t[i].m=u;o.insertBefore(u,n)}}}};var removeVnodes=function(e,n,r){for(var t=n;t<=r;++t){var i=e[t];if(i){var a=i.m;nullifyVNodeRefs(i);if(a){a.remove()}}}};var updateChildren=function(e,n,r,t,i){if(i===void 0){i=false}var a=0;var o=0;var u=0;var f=0;var s=n.length-1;var l=n[0];var c=n[s];var v=t.length-1;var d=t[0];var p=t[v];var m;var h;while(a<=s&&o<=v){if(l==null){l=n[++a]}else if(c==null){c=n[--s]}else if(d==null){d=t[++o]}else if(p==null){p=t[--v]}else if(isSameVnode(l,d,i)){patch(l,d,i);l=n[++a];d=t[++o]}else if(isSameVnode(c,p,i)){patch(c,p,i);c=n[--s];p=t[--v]}else if(isSameVnode(l,p,i)){patch(l,p,i);e.insertBefore(l.m,c.m.nextSibling);l=n[++a];p=t[--v]}else if(isSameVnode(c,d,i)){patch(c,d,i);e.insertBefore(c.m,l.m);c=n[--s];d=t[++o]}else{u=-1;{for(f=a;f<=s;++f){if(n[f]&&n[f].l!==null&&n[f].l===d.l){u=f;break}}}if(u>=0){h=n[u];if(h.p!==d.p){m=createElm(n&&n[o],r,u)}else{patch(h,d,i);n[u]=undefined;m=h.m}d=t[++o]}else{m=createElm(n&&n[o],r,o);d=t[++o]}if(m){{l.m.parentNode.insertBefore(m,l.m)}}}}if(a>s){addVnodes(e,t[v+1]==null?null:t[v+1].m,r,t,o,v)}else if(o>v){removeVnodes(n,a,s)}};var isSameVnode=function(e,n,r){if(r===void 0){r=false}if(e.p===n.p){if(!r){return e.l===n.l}return true}return false};var patch=function(e,n,r){if(r===void 0){r=false}var t=n.m=e.m;var i=e.u;var a=n.u;var o=n.p;var u=n.i;if(u===null){{isSvgMode=o==="svg"?true:o==="foreignObject"?false:isSvgMode}{if(o==="slot"&&!useNativeShadowDom);else{updateElement(e,n,isSvgMode)}}if(i!==null&&a!==null){updateChildren(t,i,n,a,r)}else if(a!==null){if(e.i!==null){t.textContent=""}addVnodes(t,null,n,a,0,a.length-1)}else if(i!==null){removeVnodes(i,0,i.length-1)}if(isSvgMode&&o==="svg"){isSvgMode=false}}else if(e.i!==u){t.data=u}};var nullifyVNodeRefs=function(e){{e.o&&e.o.ref&&e.o.ref(null);e.u&&e.u.map(nullifyVNodeRefs)}};var renderVdom=function(e,n,r){if(r===void 0){r=false}var t=e.$hostElement$;var i=e.T;var a=e.C||newVNode(null,null);var o=isHost(n)?n:h(null,null,n);hostTagName=t.tagName;if(r&&o.o){for(var u=0,f=Object.keys(o.o);u<f.length;u++){var s=f[u];if(t.hasAttribute(s)&&!["key","ref","style","class"].includes(s)){o.o[s]=t[s]}}}o.p=null;o.v|=4;e.C=o;o.m=a.m=t.shadowRoot||t;{scopeId=t["s-sc"]}useNativeShadowDom=(i.v&1)!==0;patch(a,o,r)};var attachToAncestor=function(e,n){if(n&&!e.R&&n["s-p"]){n["s-p"].push(new Promise((function(n){return e.R=n})))}};var scheduleUpdate=function(e,n){{e.v|=16}if(e.v&4){e.v|=512;return}attachToAncestor(e,e.M);var r=function(){return dispatchHooks(e,n)};return writeTask(r)};var dispatchHooks=function(e,n){var r=createTime("scheduleUpdate",e.T._);var t=e.V;var i;if(n){{e.v|=256;if(e.A){e.A.map((function(e){var n=e[0],r=e[1];return safeCall(t,n,r)}));e.A=undefined}}{i=safeCall(t,"componentWillLoad")}}r();return enqueue(i,(function(){return updateComponent(e,t,n)}))};var enqueue=function(e,n){return isPromisey(e)?e.then(n):n()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(e,n,r){return __awaiter(void 0,void 0,void 0,(function(){var t,i,a,o,u,f,s;return __generator(this,(function(l){i=e.$hostElement$;a=createTime("update",e.T._);o=i["s-rc"];if(r){attachStyles(e)}u=createTime("render",e.T._);{callRender(e,n,i,r)}if(o){o.map((function(e){return e()}));i["s-rc"]=undefined}u();a();{f=(t=i["s-p"])!==null&&t!==void 0?t:[];s=function(){return postUpdateComponent(e)};if(f.length===0){s()}else{Promise.all(f).then(s);e.v|=4;f.length=0}}return[2]}))}))};var callRender=function(e,n,r,t){try{renderingRef=n;n=n.render();{e.v&=~16}{e.v|=2}{{{renderVdom(e,n,t)}}}}catch(n){consoleError(n,e.$hostElement$)}renderingRef=null;return null};var getRenderingRef=function(){return renderingRef};var postUpdateComponent=function(e){var n=e.T._;var r=e.$hostElement$;var t=createTime("postUpdate",n);var i=e.V;var a=e.M;{safeCall(i,"componentDidRender")}if(!(e.v&64)){e.v|=64;{addHydratedFlag(r)}{safeCall(i,"componentDidLoad")}t();{e.N(r);if(!a){appDidLoad()}}}else{t()}{e.P(r)}{if(e.R){e.R();e.R=undefined}if(e.v&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.v&=~(4|512)}};var forceUpdate=function(e){{var n=getHostRef(e);var r=n.$hostElement$.isConnected;if(r&&(n.v&(2|16))===2){scheduleUpdate(n,false)}return r}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,n,r){if(e&&e[n]){try{return e[n](r)}catch(e){consoleError(e)}}return undefined};var addHydratedFlag=function(e){return e.classList.add("hydrated")};var getValue=function(e,n){return getHostRef(e).H.get(n)};var setValue=function(e,n,r,t){var i=getHostRef(e);var a=i.$hostElement$;var o=i.H.get(n);var u=i.v;var f=i.V;r=parsePropertyValue(r,t.L[n][0]);var s=Number.isNaN(o)&&Number.isNaN(r);var l=r!==o&&!s;if((!(u&8)||o===undefined)&&l){i.H.set(n,r);if(f){if(t.$&&u&128){var c=t.$[n];if(c){c.map((function(e){try{f[e](r,o,n)}catch(e){consoleError(e,a)}}))}}if((u&(2|16))===2){scheduleUpdate(i,false)}}}};var proxyComponent=function(e,n,r){var t;var i=e.prototype;if(n.L){if(e.watchers){n.$=e.watchers}var a=Object.entries(n.L);a.map((function(e){var t=e[0],a=e[1][0];if(a&31||r&2&&a&32){Object.defineProperty(i,t,{get:function(){return getValue(this,t)},set:function(e){setValue(this,t,e,n)},configurable:true,enumerable:true})}else if(r&1&&a&64){Object.defineProperty(i,t,{value:function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}var r;var i=getHostRef(this);return(r=i===null||i===void 0?void 0:i.k)===null||r===void 0?void 0:r.then((function(){var n;return(n=i.V)===null||n===void 0?void 0:n[t].apply(n,e)}))}})}}));if(r&1){var o=new Map;i.attributeChangedCallback=function(e,r,t){var a=this;plt.jmp((function(){var u;var f=o.get(e);if(a.hasOwnProperty(f)){t=a[f];delete a[f]}else if(i.hasOwnProperty(f)&&typeof a[f]==="number"&&a[f]==t){return}else if(f==null){var s=getHostRef(a);var l=s===null||s===void 0?void 0:s.v;if(l&&!(l&8)&&l&128&&t!==r){var c=s.V;var v=(u=n.$)===null||u===void 0?void 0:u[e];v===null||v===void 0?void 0:v.forEach((function(n){if(c[n]!=null){c[n].call(c,t,r,e)}}))}return}a[f]=t===null&&typeof a[f]==="boolean"?false:t}))};e.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((t=n.$)!==null&&t!==void 0?t:{}),true),a.filter((function(e){var n=e[0],r=e[1];return r[0]&15})).map((function(e){var n=e[0],r=e[1];var t=r[1]||n;o.set(t,n);return t})),true)))}}return e};var initializeComponent=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var t,i,a,o,u,f,s,l,c;return __generator(this,(function(v){switch(v.label){case 0:if(!((n.v&32)===0))return[3,5];n.v|=32;i=r.O;if(!i)return[3,3];t=loadModule(r);if(!t.then)return[3,2];a=uniqueTime();return[4,t];case 1:t=v.sent();a();v.label=2;case 2:if(!t.isProxied){{r.$=t.watchers}proxyComponent(t,r,2);t.isProxied=true}o=createTime("createInstance",r._);{n.v|=8}try{new t(n)}catch(e){consoleError(e)}{n.v&=~8}{n.v|=128}o();return[3,4];case 3:t=e.constructor;customElements.whenDefined(r._).then((function(){return n.v|=128}));v.label=4;case 4:if(t.style){u=t.style;f=getScopeId(r);if(!styles.has(f)){s=createTime("registerStyles",r._);registerStyle(f,u,!!(r.v&1));s()}}v.label=5;case 5:l=n.M;c=function(){return scheduleUpdate(n,true)};if(l&&l["s-rc"]){l["s-rc"].push(c)}else{c()}return[2]}}))}))};var fireConnectedCallback=function(e){};var connectedCallback=function(e){if((plt.v&1)===0){var n=getHostRef(e);var r=n.T;var t=createTime("connectedCallback",r._);if(!(n.v&1)){n.v|=1;{var i=e;while(i=i.parentNode||i.host){if(i["s-p"]){attachToAncestor(n,n.M=i);break}}}if(r.L){Object.entries(r.L).map((function(n){var r=n[0],t=n[1][0];if(t&31&&e.hasOwnProperty(r)){var i=e[r];delete e[r];e[r]=i}}))}{initializeComponent(e,n,r)}}else{addHostEventListeners(e,n,r.U);if(n===null||n===void 0?void 0:n.V);else if(n===null||n===void 0?void 0:n.j){n.j.then((function(){return fireConnectedCallback()}))}}t()}};var disconnectInstance=function(e){{safeCall(e,"disconnectedCallback")}};var disconnectedCallback=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){if((plt.v&1)===0){n=getHostRef(e);{if(n.q){n.q.map((function(e){return e()}));n.q=undefined}}if(n===null||n===void 0?void 0:n.V){disconnectInstance(n.V)}else if(n===null||n===void 0?void 0:n.j){n.j.then((function(){return disconnectInstance(n.V)}))}}return[2]}))}))};var bootstrapLazy=function(e,n){if(n===void 0){n={}}var r;var t=createTime();var i=[];var a=n.exclude||[];var o=win.customElements;var u=doc.head;var f=u.querySelector("meta[charset]");var s=doc.createElement("style");var l=[];var c;var v=true;Object.assign(plt,n);plt.t=new URL(n.resourcesUrl||"./",doc.baseURI).href;var d=false;e.map((function(e){e[1].map((function(n){var r;var t={v:n[0],_:n[1],L:n[2],U:n[3]};if(t.v&4){d=true}{t.L=n[2]}{t.U=n[3]}{t.$=(r=n[4])!==null&&r!==void 0?r:{}}var u=t._;var f=function(e){__extends(n,e);function n(n){var r=e.call(this,n)||this;n=r;registerHost(n,t);if(t.v&1){{{n.attachShadow({mode:"open"})}}}return r}n.prototype.connectedCallback=function(){var e=this;if(c){clearTimeout(c);c=null}if(v){l.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};n.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};n.prototype.componentOnReady=function(){return getHostRef(this).j};return n}(HTMLElement);t.O=e[0];if(!a.includes(u)&&!o.get(u)){i.push(u);o.define(u,proxyComponent(f,t,1))}}))}));if(i.length>0){if(d){s.textContent+=SLOT_FB_CSS}{s.textContent+=i+HYDRATED_CSS}if(s.innerHTML.length){s.setAttribute("data-styles","");var p=(r=plt.S)!==null&&r!==void 0?r:queryNonceMetaTagContent(doc);if(p!=null){s.setAttribute("nonce",p)}u.insertBefore(s,f?f.nextSibling:u.firstChild)}}v=false;if(l.length){l.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return c=setTimeout(appDidLoad,30)}))}}t()};var Fragment=function(e,n){return n};var addHostEventListeners=function(e,n,r,t){if(r){r.map((function(r){var t=r[0],i=r[1],a=r[2];var o=getHostListenerTarget(e,t);var u=hostListenerProxy(n,a);var f=hostListenerOpts(t);plt.ael(o,i,u,f);(n.q=n.q||[]).push((function(){return plt.rel(o,i,u,f)}))}))}};var hostListenerProxy=function(e,n){return function(r){try{{if(e.v&256){e.V[n](r)}else{(e.A=e.A||[]).push([n,r])}}}catch(e){consoleError(e)}}};var getHostListenerTarget=function(e,n){if(n&4)return doc;if(n&8)return win;if(n&16)return doc.body;return e};var hostListenerOpts=function(e){return supportsListenerOptions?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0};var setNonce=function(e){return plt.S=e};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,n){return hostRefs.set(n.V=e,n)};var registerHost=function(e,n){var r={v:0,$hostElement$:e,T:n,H:new Map};{r.k=new Promise((function(e){return r.P=e}))}{r.j=new Promise((function(e){return r.N=e}));e["s-p"]=[];e["s-rc"]=[]}addHostEventListeners(e,r,n.U);return hostRefs.set(e,r)};var isMemberInElement=function(e,n){return n in e};var consoleError=function(e,n){return(0,console.error)(e,n)};var cmpModules=new Map;var loadModule=function(e,n,r){var t=e._.replace(/-/g,"_");var i=e.O;var a=cmpModules.get(i);if(a){return a[t]}
|
|
2
2
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import("./".concat(i,".entry.js").concat("")).then((function(e){{cmpModules.set(i,e)}return e[t]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={v:0,t:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,n,r,t){return e.addEventListener(n,r,t)},rel:function(e,n,r,t){return e.removeEventListener(n,r,t)},ce:function(e,n){return new CustomEvent(e,n)}};var supportsListenerOptions=function(){var e=false;try{doc.addEventListener("e",null,Object.defineProperty({},"passive",{get:function(){e=true}}))}catch(e){}return e}();var promiseResolve=function(e){return Promise.resolve(e)};var supportsConstructableStylesheets=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var queueDomReads=[];var queueDomWrites=[];var queueTask=function(e,n){return function(r){e.push(r);if(!queuePending){queuePending=true;if(n&&plt.v&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var n=0;n<e.length;n++){try{e[n](performance.now())}catch(e){consoleError(e)}}e.length=0};var flush=function(){consume(queueDomReads);{consume(queueDomWrites);if(queuePending=queueDomReads.length>0){plt.raf(flush)}}};var nextTick=function(e){return promiseResolve().then(e)};var writeTask=queueTask(queueDomWrites,true);export{Fragment as F,Host as H,getAssetPath as a,bootstrapLazy as b,createEvent as c,getElement as d,forceUpdate as f,getRenderingRef as g,h,promiseResolve as p,registerInstance as r,setNonce as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as commonjsGlobal}from"./zonosStore-807f931f.js";var tinycolor$1={exports:{}};(function(t,r){(function(r,e){t.exports=e()})(commonjsGlobal,(function(){function t(r){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}var r=/^\s+/;var e=/\s+$/;function a(t,r){t=t?t:"";r=r||{};if(t instanceof a){return t}if(!(this instanceof a)){return new a(t,r)}var e=n(t);this._originalInput=t,this._r=e.r,this._g=e.g,this._b=e.b,this._a=e.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||e.format;this._gradientType=r.gradientType;if(this._r<1)this._r=Math.round(this._r);if(this._g<1)this._g=Math.round(this._g);if(this._b<1)this._b=Math.round(this._b);this._ok=e.ok}a.prototype={isDark:function t(){return this.getBrightness()<128},isLight:function t(){return!this.isDark()},isValid:function t(){return this._ok},getOriginalInput:function t(){return this._originalInput},getFormat:function t(){return this._format},getAlpha:function t(){return this._a},getBrightness:function t(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function t(){var r=this.toRgb();var e,a,n,i,f,s;e=r.r/255;a=r.g/255;n=r.b/255;if(e<=.03928)i=e/12.92;else i=Math.pow((e+.055)/1.055,2.4);if(a<=.03928)f=a/12.92;else f=Math.pow((a+.055)/1.055,2.4);if(n<=.03928)s=n/12.92;else s=Math.pow((n+.055)/1.055,2.4);return.2126*i+.7152*f+.0722*s},setAlpha:function t(r){this._a=q(r);this._roundA=Math.round(100*this._a)/100;return this},toHsv:function t(){var r=h(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function t(){var r=h(this._r,this._g,this._b);var e=Math.round(r.h*360),a=Math.round(r.s*100),n=Math.round(r.v*100);return this._a==1?"hsv("+e+", "+a+"%, "+n+"%)":"hsva("+e+", "+a+"%, "+n+"%, "+this._roundA+")"},toHsl:function t(){var r=f(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function t(){var r=f(this._r,this._g,this._b);var e=Math.round(r.h*360),a=Math.round(r.s*100),n=Math.round(r.l*100);return this._a==1?"hsl("+e+", "+a+"%, "+n+"%)":"hsla("+e+", "+a+"%, "+n+"%, "+this._roundA+")"},toHex:function t(r){return o(this._r,this._g,this._b,r)},toHexString:function t(r){return"#"+this.toHex(r)},toHex8:function t(r){return l(this._r,this._g,this._b,this._a,r)},toHex8String:function t(r){return"#"+this.toHex8(r)},toRgb:function t(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function t(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function t(){return{r:Math.round(E(this._r,255)*100)+"%",g:Math.round(E(this._g,255)*100)+"%",b:Math.round(E(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function t(){return this._a==1?"rgb("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%)":"rgba("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%, "+this._roundA+")"},toName:function t(){if(this._a===0){return"transparent"}if(this._a<1){return false}return S[o(this._r,this._g,this._b,true)]||false},toFilter:function t(r){var e="#"+c(this._r,this._g,this._b,this._a);var n=e;var i=this._gradientType?"GradientType = 1, ":"";if(r){var f=a(r);n="#"+c(f._r,f._g,f._b,f._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function t(r){var e=!!r;r=r||this._format;var a=false;var n=this._a<1&&this._a>=0;var i=!e&&n&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");if(i){if(r==="name"&&this._a===0){return this.toName()}return this.toRgbString()}if(r==="rgb"){a=this.toRgbString()}if(r==="prgb"){a=this.toPercentageRgbString()}if(r==="hex"||r==="hex6"){a=this.toHexString()}if(r==="hex3"){a=this.toHexString(true)}if(r==="hex4"){a=this.toHex8String(true)}if(r==="hex8"){a=this.toHex8String()}if(r==="name"){a=this.toName()}if(r==="hsl"){a=this.toHslString()}if(r==="hsv"){a=this.toHsvString()}return a||this.toHexString()},clone:function t(){return a(this.toString())},_applyModification:function t(r,e){var a=r.apply(null,[this].concat([].slice.call(e)));this._r=a._r;this._g=a._g;this._b=a._b;this.setAlpha(a._a);return this},lighten:function t(){return this._applyModification(v,arguments)},brighten:function t(){return this._applyModification(m,arguments)},darken:function t(){return this._applyModification(M,arguments)},desaturate:function t(){return this._applyModification(d,arguments)},saturate:function t(){return this._applyModification(b,arguments)},greyscale:function t(){return this._applyModification(g,arguments)},spin:function t(){return this._applyModification(p,arguments)},_applyCombination:function t(r,e){return r.apply(null,[this].concat([].slice.call(e)))},analogous:function t(){return this._applyCombination(w,arguments)},complement:function t(){return this._applyCombination(y,arguments)},monochromatic:function t(){return this._applyCombination(x,arguments)},splitcomplement:function t(){return this._applyCombination(A,arguments)},triad:function t(){return this._applyCombination(k,[3])},tetrad:function t(){return this._applyCombination(k,[4])}};a.fromRatio=function(r,e){if(t(r)=="object"){var n={};for(var i in r){if(r.hasOwnProperty(i)){if(i==="a"){n[i]=r[i]}else{n[i]=z(r[i])}}}r=n}return a(r,e)};function n(r){var e={r:0,g:0,b:0};var a=1;var n=null;var f=null;var h=null;var o=false;var l=false;if(typeof r=="string"){r=_(r)}if(t(r)=="object"){if(T(r.r)&&T(r.g)&&T(r.b)){e=i(r.r,r.g,r.b);o=true;l=String(r.r).substr(-1)==="%"?"prgb":"rgb"}else if(T(r.h)&&T(r.s)&&T(r.v)){n=z(r.s);f=z(r.v);e=u(r.h,n,f);o=true;l="hsv"}else if(T(r.h)&&T(r.s)&&T(r.l)){n=z(r.s);h=z(r.l);e=s(r.h,n,h);o=true;l="hsl"}if(r.hasOwnProperty("a")){a=r.a}}a=q(a);return{ok:o,format:r.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:a}}function i(t,r,e){return{r:E(t,255)*255,g:E(r,255)*255,b:E(e,255)*255}}function f(t,r,e){t=E(t,255);r=E(r,255);e=E(e,255);var a=Math.max(t,r,e),n=Math.min(t,r,e);var i,f,s=(a+n)/2;if(a==n){i=f=0}else{var h=a-n;f=s>.5?h/(2-a-n):h/(a+n);switch(a){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4;break}i/=6}return{h:i,s:f,l:s}}function s(t,r,e){var a,n,i;t=E(t,360);r=E(r,100);e=E(e,100);function f(t,r,e){if(e<0)e+=1;if(e>1)e-=1;if(e<1/6)return t+(r-t)*6*e;if(e<1/2)return r;if(e<2/3)return t+(r-t)*(2/3-e)*6;return t}if(r===0){a=n=i=e}else{var s=e<.5?e*(1+r):e+r-e*r;var h=2*e-s;a=f(h,s,t+1/3);n=f(h,s,t);i=f(h,s,t-1/3)}return{r:a*255,g:n*255,b:i*255}}function h(t,r,e){t=E(t,255);r=E(r,255);e=E(e,255);var a=Math.max(t,r,e),n=Math.min(t,r,e);var i,f,s=a;var h=a-n;f=a===0?0:h/a;if(a==n){i=0}else{switch(a){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4;break}i/=6}return{h:i,s:f,v:s}}function u(t,r,e){t=E(t,360)*6;r=E(r,100);e=E(e,100);var a=Math.floor(t),n=t-a,i=e*(1-r),f=e*(1-n*r),s=e*(1-(1-n)*r),h=a%6,u=[e,f,i,i,s,e][h],o=[s,e,e,f,i,i][h],l=[i,i,s,e,e,f][h];return{r:u*255,g:o*255,b:l*255}}function o(t,r,e,a){var n=[N(Math.round(t).toString(16)),N(Math.round(r).toString(16)),N(Math.round(e).toString(16))];if(a&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)){return n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0)}return n.join("")}function l(t,r,e,a,n){var i=[N(Math.round(t).toString(16)),N(Math.round(r).toString(16)),N(Math.round(e).toString(16)),N(I(a))];if(n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)){return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0)}return i.join("")}function c(t,r,e,a){var n=[N(I(a)),N(Math.round(t).toString(16)),N(Math.round(r).toString(16)),N(Math.round(e).toString(16))];return n.join("")}a.equals=function(t,r){if(!t||!r)return false;return a(t).toRgbString()==a(r).toRgbString()};a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function d(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.s-=r/100;e.s=H(e.s);return a(e)}function b(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.s+=r/100;e.s=H(e.s);return a(e)}function g(t){return a(t).desaturate(100)}function v(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.l+=r/100;e.l=H(e.l);return a(e)}function m(t,r){r=r===0?0:r||10;var e=a(t).toRgb();e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(r/100))));e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(r/100))));e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(r/100))));return a(e)}function M(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.l-=r/100;e.l=H(e.l);return a(e)}function p(t,r){var e=a(t).toHsl();var n=(e.h+r)%360;e.h=n<0?360+n:n;return a(e)}function y(t){var r=a(t).toHsl();r.h=(r.h+180)%360;return a(r)}function k(t,r){if(isNaN(r)||r<=0){throw new Error("Argument to polyad must be a positive number")}var e=a(t).toHsl();var n=[a(t)];var i=360/r;for(var f=1;f<r;f++){n.push(a({h:(e.h+f*i)%360,s:e.s,l:e.l}))}return n}function A(t){var r=a(t).toHsl();var e=r.h;return[a(t),a({h:(e+72)%360,s:r.s,l:r.l}),a({h:(e+216)%360,s:r.s,l:r.l})]}function w(t,r,e){r=r||6;e=e||30;var n=a(t).toHsl();var i=360/e;var f=[a(t)];for(n.h=(n.h-(i*r>>1)+720)%360;--r;){n.h=(n.h+i)%360;f.push(a(n))}return f}function x(t,r){r=r||6;var e=a(t).toHsv();var n=e.h,i=e.s,f=e.v;var s=[];var h=1/r;while(r--){s.push(a({h:n,s:i,v:f}));f=(f+h)%1}return s}a.mix=function(t,r,e){e=e===0?0:e||50;var n=a(t).toRgb();var i=a(r).toRgb();var f=e/100;var s={r:(i.r-n.r)*f+n.r,g:(i.g-n.g)*f+n.g,b:(i.b-n.b)*f+n.b,a:(i.a-n.a)*f+n.a};return a(s)};a.readability=function(t,r){var e=a(t);var n=a(r);return(Math.max(e.getLuminance(),n.getLuminance())+.05)/(Math.min(e.getLuminance(),n.getLuminance())+.05)};a.isReadable=function(t,r,e){var n=a.readability(t,r);var i,f;f=false;i=L(e);switch(i.level+i.size){case"AAsmall":case"AAAlarge":f=n>=4.5;break;case"AAlarge":f=n>=3;break;case"AAAsmall":f=n>=7;break}return f};a.mostReadable=function(t,r,e){var n=null;var i=0;var f;var s,h,u;e=e||{};s=e.includeFallbackColors;h=e.level;u=e.size;for(var o=0;o<r.length;o++){f=a.readability(t,r[o]);if(f>i){i=f;n=a(r[o])}}if(a.isReadable(t,n,{level:h,size:u})||!s){return n}else{e.includeFallbackColors=false;return a.mostReadable(t,["#fff","#000"],e)}};var F=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var S=a.hexNames=R(F);function R(t){var r={};for(var e in t){if(t.hasOwnProperty(e)){r[t[e]]=e}}return r}function q(t){t=parseFloat(t);if(isNaN(t)||t<0||t>1){t=1}return t}function E(t,r){if(j(t))t="100%";var e=C(t);t=Math.min(r,Math.max(0,parseFloat(t)));if(e){t=parseInt(t*r,10)/100}if(Math.abs(t-r)<1e-6){return 1}return t%r/parseFloat(r)}function H(t){return Math.min(1,Math.max(0,t))}function $(t){return parseInt(t,16)}function j(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function C(t){return typeof t==="string"&&t.indexOf("%")!=-1}function N(t){return t.length==1?"0"+t:""+t}function z(t){if(t<=1){t=t*100+"%"}return t}function I(t){return Math.round(parseFloat(t)*255).toString(16)}function D(t){return $(t)/255}var G=function(){var t="[-\\+]?\\d+%?";var r="[-\\+]?\\d*\\.\\d+%?";var e="(?:"+r+")|(?:"+t+")";var a="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";var n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+a),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+a),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+a),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function T(t){return!!G.CSS_UNIT.exec(t)}function _(t){t=t.replace(r,"").replace(e,"").toLowerCase();var a=false;if(F[t]){t=F[t];a=true}else if(t=="transparent"){return{r:0,g:0,b:0,a:0,format:"name"}}var n;if(n=G.rgb.exec(t)){return{r:n[1],g:n[2],b:n[3]}}if(n=G.rgba.exec(t)){return{r:n[1],g:n[2],b:n[3],a:n[4]}}if(n=G.hsl.exec(t)){return{h:n[1],s:n[2],l:n[3]}}if(n=G.hsla.exec(t)){return{h:n[1],s:n[2],l:n[3],a:n[4]}}if(n=G.hsv.exec(t)){return{h:n[1],s:n[2],v:n[3]}}if(n=G.hsva.exec(t)){return{h:n[1],s:n[2],v:n[3],a:n[4]}}if(n=G.hex8.exec(t)){return{r:$(n[1]),g:$(n[2]),b:$(n[3]),a:D(n[4]),format:a?"name":"hex8"}}if(n=G.hex6.exec(t)){return{r:$(n[1]),g:$(n[2]),b:$(n[3]),format:a?"name":"hex"}}if(n=G.hex4.exec(t)){return{r:$(n[1]+""+n[1]),g:$(n[2]+""+n[2]),b:$(n[3]+""+n[3]),a:D(n[4]+""+n[4]),format:a?"name":"hex8"}}if(n=G.hex3.exec(t)){return{r:$(n[1]+""+n[1]),g:$(n[2]+""+n[2]),b:$(n[3]+""+n[3]),format:a?"name":"hex"}}return false}function L(t){var r,e;t=t||{level:"AA",size:"small"};r=(t.level||"AA").toUpperCase();e=(t.size||"small").toLowerCase();if(r!=="AA"&&r!=="AAA"){r="AA"}if(e!=="small"&&e!=="large"){e="small"}return{level:r,size:e}}return a}))})(tinycolor$1);var tinycolor=tinycolor$1.exports;var isDarkColor=function(t){return tinycolor(t).isDark()};export{isDarkColor as i};
|
|
1
|
+
import{a as commonjsGlobal}from"./zonosStore-aac7c6ac.js";var tinycolor$1={exports:{}};(function(t,r){(function(r,e){t.exports=e()})(commonjsGlobal,(function(){function t(r){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}var r=/^\s+/;var e=/\s+$/;function a(t,r){t=t?t:"";r=r||{};if(t instanceof a){return t}if(!(this instanceof a)){return new a(t,r)}var e=n(t);this._originalInput=t,this._r=e.r,this._g=e.g,this._b=e.b,this._a=e.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||e.format;this._gradientType=r.gradientType;if(this._r<1)this._r=Math.round(this._r);if(this._g<1)this._g=Math.round(this._g);if(this._b<1)this._b=Math.round(this._b);this._ok=e.ok}a.prototype={isDark:function t(){return this.getBrightness()<128},isLight:function t(){return!this.isDark()},isValid:function t(){return this._ok},getOriginalInput:function t(){return this._originalInput},getFormat:function t(){return this._format},getAlpha:function t(){return this._a},getBrightness:function t(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function t(){var r=this.toRgb();var e,a,n,i,f,s;e=r.r/255;a=r.g/255;n=r.b/255;if(e<=.03928)i=e/12.92;else i=Math.pow((e+.055)/1.055,2.4);if(a<=.03928)f=a/12.92;else f=Math.pow((a+.055)/1.055,2.4);if(n<=.03928)s=n/12.92;else s=Math.pow((n+.055)/1.055,2.4);return.2126*i+.7152*f+.0722*s},setAlpha:function t(r){this._a=q(r);this._roundA=Math.round(100*this._a)/100;return this},toHsv:function t(){var r=h(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function t(){var r=h(this._r,this._g,this._b);var e=Math.round(r.h*360),a=Math.round(r.s*100),n=Math.round(r.v*100);return this._a==1?"hsv("+e+", "+a+"%, "+n+"%)":"hsva("+e+", "+a+"%, "+n+"%, "+this._roundA+")"},toHsl:function t(){var r=f(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function t(){var r=f(this._r,this._g,this._b);var e=Math.round(r.h*360),a=Math.round(r.s*100),n=Math.round(r.l*100);return this._a==1?"hsl("+e+", "+a+"%, "+n+"%)":"hsla("+e+", "+a+"%, "+n+"%, "+this._roundA+")"},toHex:function t(r){return o(this._r,this._g,this._b,r)},toHexString:function t(r){return"#"+this.toHex(r)},toHex8:function t(r){return l(this._r,this._g,this._b,this._a,r)},toHex8String:function t(r){return"#"+this.toHex8(r)},toRgb:function t(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function t(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function t(){return{r:Math.round(E(this._r,255)*100)+"%",g:Math.round(E(this._g,255)*100)+"%",b:Math.round(E(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function t(){return this._a==1?"rgb("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%)":"rgba("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%, "+this._roundA+")"},toName:function t(){if(this._a===0){return"transparent"}if(this._a<1){return false}return S[o(this._r,this._g,this._b,true)]||false},toFilter:function t(r){var e="#"+c(this._r,this._g,this._b,this._a);var n=e;var i=this._gradientType?"GradientType = 1, ":"";if(r){var f=a(r);n="#"+c(f._r,f._g,f._b,f._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function t(r){var e=!!r;r=r||this._format;var a=false;var n=this._a<1&&this._a>=0;var i=!e&&n&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");if(i){if(r==="name"&&this._a===0){return this.toName()}return this.toRgbString()}if(r==="rgb"){a=this.toRgbString()}if(r==="prgb"){a=this.toPercentageRgbString()}if(r==="hex"||r==="hex6"){a=this.toHexString()}if(r==="hex3"){a=this.toHexString(true)}if(r==="hex4"){a=this.toHex8String(true)}if(r==="hex8"){a=this.toHex8String()}if(r==="name"){a=this.toName()}if(r==="hsl"){a=this.toHslString()}if(r==="hsv"){a=this.toHsvString()}return a||this.toHexString()},clone:function t(){return a(this.toString())},_applyModification:function t(r,e){var a=r.apply(null,[this].concat([].slice.call(e)));this._r=a._r;this._g=a._g;this._b=a._b;this.setAlpha(a._a);return this},lighten:function t(){return this._applyModification(v,arguments)},brighten:function t(){return this._applyModification(m,arguments)},darken:function t(){return this._applyModification(M,arguments)},desaturate:function t(){return this._applyModification(d,arguments)},saturate:function t(){return this._applyModification(b,arguments)},greyscale:function t(){return this._applyModification(g,arguments)},spin:function t(){return this._applyModification(p,arguments)},_applyCombination:function t(r,e){return r.apply(null,[this].concat([].slice.call(e)))},analogous:function t(){return this._applyCombination(w,arguments)},complement:function t(){return this._applyCombination(y,arguments)},monochromatic:function t(){return this._applyCombination(x,arguments)},splitcomplement:function t(){return this._applyCombination(A,arguments)},triad:function t(){return this._applyCombination(k,[3])},tetrad:function t(){return this._applyCombination(k,[4])}};a.fromRatio=function(r,e){if(t(r)=="object"){var n={};for(var i in r){if(r.hasOwnProperty(i)){if(i==="a"){n[i]=r[i]}else{n[i]=z(r[i])}}}r=n}return a(r,e)};function n(r){var e={r:0,g:0,b:0};var a=1;var n=null;var f=null;var h=null;var o=false;var l=false;if(typeof r=="string"){r=_(r)}if(t(r)=="object"){if(T(r.r)&&T(r.g)&&T(r.b)){e=i(r.r,r.g,r.b);o=true;l=String(r.r).substr(-1)==="%"?"prgb":"rgb"}else if(T(r.h)&&T(r.s)&&T(r.v)){n=z(r.s);f=z(r.v);e=u(r.h,n,f);o=true;l="hsv"}else if(T(r.h)&&T(r.s)&&T(r.l)){n=z(r.s);h=z(r.l);e=s(r.h,n,h);o=true;l="hsl"}if(r.hasOwnProperty("a")){a=r.a}}a=q(a);return{ok:o,format:r.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:a}}function i(t,r,e){return{r:E(t,255)*255,g:E(r,255)*255,b:E(e,255)*255}}function f(t,r,e){t=E(t,255);r=E(r,255);e=E(e,255);var a=Math.max(t,r,e),n=Math.min(t,r,e);var i,f,s=(a+n)/2;if(a==n){i=f=0}else{var h=a-n;f=s>.5?h/(2-a-n):h/(a+n);switch(a){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4;break}i/=6}return{h:i,s:f,l:s}}function s(t,r,e){var a,n,i;t=E(t,360);r=E(r,100);e=E(e,100);function f(t,r,e){if(e<0)e+=1;if(e>1)e-=1;if(e<1/6)return t+(r-t)*6*e;if(e<1/2)return r;if(e<2/3)return t+(r-t)*(2/3-e)*6;return t}if(r===0){a=n=i=e}else{var s=e<.5?e*(1+r):e+r-e*r;var h=2*e-s;a=f(h,s,t+1/3);n=f(h,s,t);i=f(h,s,t-1/3)}return{r:a*255,g:n*255,b:i*255}}function h(t,r,e){t=E(t,255);r=E(r,255);e=E(e,255);var a=Math.max(t,r,e),n=Math.min(t,r,e);var i,f,s=a;var h=a-n;f=a===0?0:h/a;if(a==n){i=0}else{switch(a){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4;break}i/=6}return{h:i,s:f,v:s}}function u(t,r,e){t=E(t,360)*6;r=E(r,100);e=E(e,100);var a=Math.floor(t),n=t-a,i=e*(1-r),f=e*(1-n*r),s=e*(1-(1-n)*r),h=a%6,u=[e,f,i,i,s,e][h],o=[s,e,e,f,i,i][h],l=[i,i,s,e,e,f][h];return{r:u*255,g:o*255,b:l*255}}function o(t,r,e,a){var n=[N(Math.round(t).toString(16)),N(Math.round(r).toString(16)),N(Math.round(e).toString(16))];if(a&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)){return n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0)}return n.join("")}function l(t,r,e,a,n){var i=[N(Math.round(t).toString(16)),N(Math.round(r).toString(16)),N(Math.round(e).toString(16)),N(I(a))];if(n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)){return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0)}return i.join("")}function c(t,r,e,a){var n=[N(I(a)),N(Math.round(t).toString(16)),N(Math.round(r).toString(16)),N(Math.round(e).toString(16))];return n.join("")}a.equals=function(t,r){if(!t||!r)return false;return a(t).toRgbString()==a(r).toRgbString()};a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function d(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.s-=r/100;e.s=H(e.s);return a(e)}function b(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.s+=r/100;e.s=H(e.s);return a(e)}function g(t){return a(t).desaturate(100)}function v(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.l+=r/100;e.l=H(e.l);return a(e)}function m(t,r){r=r===0?0:r||10;var e=a(t).toRgb();e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(r/100))));e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(r/100))));e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(r/100))));return a(e)}function M(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.l-=r/100;e.l=H(e.l);return a(e)}function p(t,r){var e=a(t).toHsl();var n=(e.h+r)%360;e.h=n<0?360+n:n;return a(e)}function y(t){var r=a(t).toHsl();r.h=(r.h+180)%360;return a(r)}function k(t,r){if(isNaN(r)||r<=0){throw new Error("Argument to polyad must be a positive number")}var e=a(t).toHsl();var n=[a(t)];var i=360/r;for(var f=1;f<r;f++){n.push(a({h:(e.h+f*i)%360,s:e.s,l:e.l}))}return n}function A(t){var r=a(t).toHsl();var e=r.h;return[a(t),a({h:(e+72)%360,s:r.s,l:r.l}),a({h:(e+216)%360,s:r.s,l:r.l})]}function w(t,r,e){r=r||6;e=e||30;var n=a(t).toHsl();var i=360/e;var f=[a(t)];for(n.h=(n.h-(i*r>>1)+720)%360;--r;){n.h=(n.h+i)%360;f.push(a(n))}return f}function x(t,r){r=r||6;var e=a(t).toHsv();var n=e.h,i=e.s,f=e.v;var s=[];var h=1/r;while(r--){s.push(a({h:n,s:i,v:f}));f=(f+h)%1}return s}a.mix=function(t,r,e){e=e===0?0:e||50;var n=a(t).toRgb();var i=a(r).toRgb();var f=e/100;var s={r:(i.r-n.r)*f+n.r,g:(i.g-n.g)*f+n.g,b:(i.b-n.b)*f+n.b,a:(i.a-n.a)*f+n.a};return a(s)};a.readability=function(t,r){var e=a(t);var n=a(r);return(Math.max(e.getLuminance(),n.getLuminance())+.05)/(Math.min(e.getLuminance(),n.getLuminance())+.05)};a.isReadable=function(t,r,e){var n=a.readability(t,r);var i,f;f=false;i=L(e);switch(i.level+i.size){case"AAsmall":case"AAAlarge":f=n>=4.5;break;case"AAlarge":f=n>=3;break;case"AAAsmall":f=n>=7;break}return f};a.mostReadable=function(t,r,e){var n=null;var i=0;var f;var s,h,u;e=e||{};s=e.includeFallbackColors;h=e.level;u=e.size;for(var o=0;o<r.length;o++){f=a.readability(t,r[o]);if(f>i){i=f;n=a(r[o])}}if(a.isReadable(t,n,{level:h,size:u})||!s){return n}else{e.includeFallbackColors=false;return a.mostReadable(t,["#fff","#000"],e)}};var F=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var S=a.hexNames=R(F);function R(t){var r={};for(var e in t){if(t.hasOwnProperty(e)){r[t[e]]=e}}return r}function q(t){t=parseFloat(t);if(isNaN(t)||t<0||t>1){t=1}return t}function E(t,r){if(j(t))t="100%";var e=C(t);t=Math.min(r,Math.max(0,parseFloat(t)));if(e){t=parseInt(t*r,10)/100}if(Math.abs(t-r)<1e-6){return 1}return t%r/parseFloat(r)}function H(t){return Math.min(1,Math.max(0,t))}function $(t){return parseInt(t,16)}function j(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function C(t){return typeof t==="string"&&t.indexOf("%")!=-1}function N(t){return t.length==1?"0"+t:""+t}function z(t){if(t<=1){t=t*100+"%"}return t}function I(t){return Math.round(parseFloat(t)*255).toString(16)}function D(t){return $(t)/255}var G=function(){var t="[-\\+]?\\d+%?";var r="[-\\+]?\\d*\\.\\d+%?";var e="(?:"+r+")|(?:"+t+")";var a="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";var n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+a),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+a),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+a),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function T(t){return!!G.CSS_UNIT.exec(t)}function _(t){t=t.replace(r,"").replace(e,"").toLowerCase();var a=false;if(F[t]){t=F[t];a=true}else if(t=="transparent"){return{r:0,g:0,b:0,a:0,format:"name"}}var n;if(n=G.rgb.exec(t)){return{r:n[1],g:n[2],b:n[3]}}if(n=G.rgba.exec(t)){return{r:n[1],g:n[2],b:n[3],a:n[4]}}if(n=G.hsl.exec(t)){return{h:n[1],s:n[2],l:n[3]}}if(n=G.hsla.exec(t)){return{h:n[1],s:n[2],l:n[3],a:n[4]}}if(n=G.hsv.exec(t)){return{h:n[1],s:n[2],v:n[3]}}if(n=G.hsva.exec(t)){return{h:n[1],s:n[2],v:n[3],a:n[4]}}if(n=G.hex8.exec(t)){return{r:$(n[1]),g:$(n[2]),b:$(n[3]),a:D(n[4]),format:a?"name":"hex8"}}if(n=G.hex6.exec(t)){return{r:$(n[1]),g:$(n[2]),b:$(n[3]),format:a?"name":"hex"}}if(n=G.hex4.exec(t)){return{r:$(n[1]+""+n[1]),g:$(n[2]+""+n[2]),b:$(n[3]+""+n[3]),a:D(n[4]+""+n[4]),format:a?"name":"hex8"}}if(n=G.hex3.exec(t)){return{r:$(n[1]+""+n[1]),g:$(n[2]+""+n[2]),b:$(n[3]+""+n[3]),format:a?"name":"hex"}}return false}function L(t){var r,e;t=t||{level:"AA",size:"small"};r=(t.level||"AA").toUpperCase();e=(t.size||"small").toLowerCase();if(r!=="AA"&&r!=="AAA"){r="AA"}if(e!=="small"&&e!=="large"){e="small"}return{level:r,size:e}}return a}))})(tinycolor$1);var tinycolor=tinycolor$1.exports;var isDarkColor=function(t){return tinycolor(t).isDark()};export{isDarkColor as i};
|
package/dist/esm-es5/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?t(e.value):i(e.value).then(s,a)}l((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(o){return l([e,o])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(n=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];i=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{b as bootstrapLazy}from"./index-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?t(e.value):i(e.value).then(s,a)}l((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(o){return l([e,o])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(n=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];i=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{b as bootstrapLazy}from"./index-dd40cc85.js";export{s as setNonce}from"./index-dd40cc85.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";var defineCustomElements=function(e,o){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(typeof window==="undefined")return[2,undefined];return[4,globalScripts()];case 1:e.sent();return[2,bootstrapLazy([["zonos-checkout",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],paymentError:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],domesticRedirectedBtnSelector:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]]]]],["zonos-controller",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]}]]],["zonos-component",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["zonos-link",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["zonos-logo",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["zonos-text",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],content:[1],ready:[32]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["zonos-payment",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],selectedItem:[32]}]]],["zonos-badge_2",[[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}],[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}]]],["zonos-country-flag",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["zonos-banner",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["zonos-button_3",[[1,"zonos-button",{buttonColor:[1,"button-color"],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}]]],["zonos-select-dialog-header_2",[[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}],[1,"zonos-v-stack",{spacing:[2]}]]],["zonos-card_2",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-card",{actions:[16],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["zonos-country-select_3",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}]]],["zonos-address_4",[[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],hasInvalidCharacters:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]}],[2,"zonos-link-authentication",{titleText:[1,"title-text"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["zonos-cart-items_9",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],defaultAddress:[16],disabled:[32],hasInvalidShippingCharacters:[32],hasInvalidBillingCharacters:[32]},null,{disabled:["watchFormComplete"]}],[1,"zonos-checkout-footer",{showDialog:[32]},[[4,"click","handleGlobalClick"]]],[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],disabled:[32]},null,{disabled:["watchFormComplete"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],disabled:[32]},null,{disabled:["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],order:[32]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],footerRightAction:[16],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}]]]],o)]}}))}))};export{defineCustomElements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,t,o,e){function r(n){return n instanceof o?n:new o((function(t){t(n)}))}return new(o||(o=Promise))((function(o,i){function a(n){try{
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,t,o,e){function r(n){return n instanceof o?n:new o((function(t){t(n)}))}return new(o||(o=Promise))((function(o,i){function a(n){try{c(e.next(n))}catch(n){i(n)}}function u(n){try{c(e["throw"](n))}catch(n){i(n)}}function c(n){n.done?o(n.value):r(n.value).then(a,u)}c((e=e.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},e,r,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(n){return function(t){return c([n,t])}}function c(u){if(e)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(o=0)),o)try{if(e=1,r&&(i=u[0]&2?r["return"]:u[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;if(r=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:o.label++;return{value:u[1],done:false};case 5:o.label++;r=u[1];u=[0];continue;case 7:u=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(u[0]===6&&o.label<i[1]){o.label=i[1];i=u;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(u);break}if(i[2])o.ops.pop();o.trys.pop();continue}u=t.call(n,o)}catch(n){u=[6,n];r=0}finally{e=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{u as handleFetch,l as localizationStore,a as log}from"./cart-8526eb36.js";import{z as zonosStore}from"./zonosStore-aac7c6ac.js";var trackConversionEvent=function(n,t){return __awaiter(void 0,void 0,void 0,(function(){var o,e,r,i,a,u;return __generator(this,(function(c){switch(c.label){case 0:if(window.location.href.includes("zonos.com")||!!((o=window.Zonos)===null||o===void 0?void 0:o.zonosQaUrl)||!!((e=window.Zonos)===null||e===void 0?void 0:e.debug)){return[2]}r="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/track-conversion-event");i=localizationStore.selectedCountryCode;a=zonosStore.organizationId;u={countryCode:i,eventName:n,metadata:t,organizationId:a};return[4,handleFetch(r,{body:u,method:"POST"})];case 1:c.sent();return[2]}}))}))};var sendErrorLog=function(n){var t=n.endpoint,o=n.errors,e=n.metadata;return __awaiter(void 0,void 0,void 0,(function(){var n,r;return __generator(this,(function(i){n="userAgentData"in window.navigator?window.navigator.userAgentData:null;r={endpoint:t,errors:o,metadata:Object.assign({href:window.location.href,userAgent:n&&n.brands.length>0?n:window.navigator.userAgent},e)};void handleFetch("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/log-error"),{body:r,method:"POST"});return[2]}))}))};var submitGtag=function(n){var t=zonosStore.checkoutSettings.analyticsProviders.find((function(n){return n.type==="GOOGLE_ANALYTICS"}));if(!t||(t===null||t===void 0?void 0:t.status)==="DISABLED"){return}if(typeof window.gtag==="function"){log("Zonos submits gtag event","log",n);window.gtag("event",n,{})}};export{submitGtag as a,sendErrorLog as s,trackConversionEvent as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,o,s){function n(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,i){function a(t){try{c(s.next(t))}catch(t){i(t)}}function r(t){try{c(s["throw"](t))}catch(t){i(t)}}function c(t){t.done?o(t.value):n(t.value).then(a,r)}c((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,n,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(t){return function(e){return c([t,e])}}function c(r){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(o=0)),o)try{if(s=1,n&&(i=r[0]&2?n["return"]:r[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;if(n=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:o.label++;return{value:r[1],done:false};case 5:o.label++;n=r[1];r=[0];continue;case 7:r=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){o=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){o.label=r[1];break}if(r[0]===6&&o.label<i[1]){o.label=i[1];i=r;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(r);break}if(i[2])o.ops.pop();o.trys.pop();continue}r=e.call(t,o)}catch(t){r=[6,t];n=0}finally{s=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,d as getElement}from"./index-b5be4dc3.js";import{j as stripeStore,d as logError,l as localizationStore,t as translate,n as stripeStorePrefetchLandedCost}from"./cart-6be7e36f.js";import{z as zonosStore,d as zonosStoreFontFamily}from"./zonosStore-807f931f.js";import{i as isCheckoutMobile}from"./isCheckoutMobile-8846dccb.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-0d133844.js";import{i as isDarkColor}from"./isDarkColor-8eeda28e.js";var containsNonLatinChars=function(t){var e=/[^\p{Script=Latin}\p{P}\p{S}\p{N}\p{Z}\p{C}\p{M}]{1}/u;var o=Object.entries(t).reduce((function(t,o){var s;var n=o[0],i=o[1];return e.test(i)?Object.assign(Object.assign({},t),(s={},s[n]=true,s)):t}),{});return o};var zonosAddressCss=".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:var(--amino-space-8)}";var ZonosAddressStyle0=zonosAddressCss;var ZonosAddress=function(){function t(t){registerInstance(this,t);this.invalidCharacters=createEvent(this,"invalidCharacters",7);this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe;this.hasInvalidCharacters=false;this.isDirtyAddress=false}t.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:stripeStore.stripeBillingAddressElement,stripeAddressEventData:stripeStore.stripeBillingAddressEventData,stripeElements:stripeStore.stripeElementsForBillingAddress}}return{stripeAddressElement:stripeStore.stripeAddressElement,stripeAddressEventData:stripeStore.stripeAddressEventData,stripeElements:stripeStore.stripeElements}};t.prototype.updateAddressEventData=function(t){var e=t.event,o=t.type;switch(o){case"billing":stripeStore.stripeBillingAddressEventData=e;break;default:stripeStore.stripeAddressEventData=e;break}var s=this.checkInvalidCharacters(e);this.invalidCharacters.emit(s);this.hasInvalidCharacters=s;if(s){return}};t.prototype.updateAddressElement=function(t){var e=t.stripeAddressElement,o=t.type;if(o==="shipping"){stripeStore.stripeAddressElement=e;return}stripeStore.stripeBillingAddressElement=e};t.prototype.checkInvalidCharacters=function(t){if(!t.complete||zonosStore.checkoutSettings.allowedCharacterSets==="ALL"){return false}var e=t.value,o=e.address,s=e.firstName,n=e.lastName,i=e.name;var a=o.city,r=o.country,c=o.line1,h=o.line2,l=o.postal_code,d=o.state;var u=containsNonLatinChars({city:a,country:r,line1:c,line2:h||"",name:i||"".concat(s," ").concat(n),postal_code:l,state:d});if(Object.keys(u).length){return true}return false};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,o,s,n,i,a,r,c;var h=this;return __generator(this,(function(l){this.stripe=window.Zonos.stripe;o=this.getStripeAddressInstance(),s=o.stripeAddressEventData,n=o.stripeElements;if(!this.stripe||!n){logError("Stripe is not initialized. Couldn't load stripe element.");return[2]}i=(t=this.defaultAddress)===null||t===void 0?void 0:t.phone;if(!i){(e=this.defaultAddress)===null||e===void 0?true:delete e.phone}a=localizationStore.shippingZoneCountries;r=a?Object.values(a).map((function(t){return t.code})):[];c=n.create("address",{allowedCountries:this.type==="shipping"?r:[],contacts:this.defaultAddress?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},s===null||s===void 0?void 0:s.value.address),{country:(s===null||s===void 0?void 0:s.value.address.country)||localizationStore.selectedCountryCode||"AL"}),firstName:s===null||s===void 0?void 0:s.value.firstName,lastName:s===null||s===void 0?void 0:s.value.lastName,phone:s===null||s===void 0?void 0:s.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});c.mount(this.el.querySelector(".zonos--address-component"));c.on("change",(function(t){var e=t.value;if(!h.isDirtyAddress&&e.address.line1.length>=3){h.isDirtyAddress=true;setTimeout((function(){if(isCheckoutMobile()){h.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var t=h.type==="shipping"?100:600;var e=h.el.closest(".zonos--group");var o=h.el.getBoundingClientRect().top+t;e===null||e===void 0?void 0:e.scrollTo({behavior:"smooth",top:o})}}),600)}h.updateAddressEventData({event:Object.assign(Object.assign({},t),{elementMode:h.type,elementType:"address",value:Object.assign(Object.assign({},e),{firstName:e.firstName||e.name.split(" ")[0],lastName:e.lastName||e.name.split(" ")[1]})}),type:h.type})}));this.updateAddressElement({stripeAddressElement:c,type:this.type});return[2]}))}))};t.prototype.disconnectedCallback=function(){var t=this.getStripeAddressInstance().stripeAddressElement;t===null||t===void 0?void 0:t.destroy()};t.prototype.componentDidLoad=function(){var t=this;var e=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!e&&e.value.address.line1.length>0;void this.watchInitStripe();setTimeout((function(){var e=t.getStripeAddressInstance().stripeAddressEventData;if(e){t.checkInvalidCharacters(e)}}),500)};t.prototype.render=function(){return h(Host,{key:"3927946760be161a50ccf924cef5a58503887ac8",class:"zonos--address zonos--elements"},h("zonos-text",{key:"ac95946a7322dbfab13b3d29df2e22d251ba553c",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"552c6e94d64a842f702c5499320713c8b8fcab6b",class:"zonos--address-component"}),this.hasInvalidCharacters&&h("zonos-banner",{bannerTitle:translate("Please ensure your text uses the Latin alphabet only (A-Z, a-z)."),intent:"error"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}();ZonosAddress.style=ZonosAddressStyle0;var colorPrefixes=["blue","cyan","green","orange","purple","red","gray","glass"];var zonosCheckboxCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:var(--amino-space-8);-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--amino-gray-400);position:relative;border-radius:var(--border-radius, var(--amino-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--amino-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var ZonosCheckboxStyle0=zonosCheckboxCss;var ZonosCheckbox=function(){function t(t){registerInstance(this,t);this.checkboxSelected=createEvent(this,"checkboxSelected",7);this.backgroundColor="blue";this.label=undefined;this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base";this.borderStyle=undefined}t.prototype.render=function(){var t=this;var e=colorPrefixes.includes(this.backgroundColor);var o=e?"var(--amino-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var s=e?"var(--amino-".concat(this.backgroundColor,"-200)"):!isDarkColor(o)?"var(--amino-gray-800)":"var(--amino-gray-0)";var n=getBorderRadius(this.borderStyle,"4px");return h(Host,{key:"5f8516f5933b739cc3f21d901e50dec1c761fa58",class:classes(["zonos--elements zonos--checkbox"]),style:{"--background-color":o,"--border-radius":n,"--font-family":zonosStoreFontFamily(),"--size":"".concat(this.size,"px")}},h("label",{key:"6544f51a8c892d616123ab4194d069b055e3dc86",class:classes([this.isDisabled&&"disabled"])},h("input",{key:"958e35bf16be575230748fccdb1a3916942c3a30",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(e){t.checkboxSelected.emit(e.target.checked)},type:"checkbox"}),h("span",{key:"2c55e0a190b092dd083c433c35143e253910f54f",class:"checkmark-container"},h("svg",{key:"0aa1f705b728055835159a399173a170aee4f7c0",class:"checkmark",color:s,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},h("path",{key:"d526bbafde4d4399be3f3a0a7cc87e92634d9548","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&h("zonos-text",{size:this.fontSize},this.label)))};return t}();ZonosCheckbox.style=ZonosCheckboxStyle0;var zonosCollapseCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var ZonosCollapseStyle0=zonosCollapseCss;var ZonosCollapse=function(){function t(t){registerInstance(this,t);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight;this.iframe=null}t.prototype.getElementHeight=function(){var t="".concat(this.height,"px");var e="".concat(this.collapseSize,"px");return this.collapsed?e:t};t.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};t.prototype.componentDidRender=function(){var t=this;var e,o,s;this.iframe=((e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("iframe"))||null;(s=(o=this.iframe)===null||o===void 0?void 0:o.contentWindow)===null||s===void 0?void 0:s.addEventListener("resize",(function(){if(!t.iframe){return}t.height=parseFloat(getComputedStyle(t.iframe).height)}))};t.prototype.render=function(){var t=this;if(!this.collapsed){setTimeout((function(){if(!t.collapsed){t.el.style.overflow="visible"}}),300)}else{this.el.style.overflow="hidden"}return h(Host,{key:"7ac8b898feadfb4424b3b48a98135cb18994f4e0",class:"zonos--elements zonos--collapse",style:{"--font-family":zonosStoreFontFamily(),height:this.getElementHeight()}},h("div",{key:"4a527ec319b59041196284d4d9a8f22b943a74e6"},h("iframe",{key:"2fb51c16e13ca90561b1b1e6cab89d87e4a37a47",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),h("slot",{key:"6d7849f6c35be611446b0da36d657396e5ca3122"})))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();ZonosCollapse.style=ZonosCollapseStyle0;var zonosLinkAuthenticationCss=".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:var(--amino-space-16)}";var ZonosLinkAuthenticationStyle0=zonosLinkAuthenticationCss;var ZonosLinkAuthentication=function(){function t(t){registerInstance(this,t);this.titleText=undefined;this.stripe=stripeStore.stripe}t.prototype.watchInitStripe=function(){if(!this.stripe||!stripeStore.stripeElements){return}var t=stripeStore.stripeLinkElement||stripeStore.stripeElements.create("linkAuthentication");var e=this.el.querySelector(".zonos--link-authentication-component");if(!e){logError("Cannot find container element for linkAuthenticationElement");return}t.mount(e);t.on("change",(function(t){stripeStore.stripeLinkEventData=t;void stripeStorePrefetchLandedCost()}));stripeStore.stripeLinkElement=t};t.prototype.componentDidLoad=function(){this.watchInitStripe()};t.prototype.render=function(){return h(Host,{key:"671681b3ca3e95ab25a70cb44e84db7e2b3903e8",class:"zonos--link-authentication zonos--elements"},h("zonos-text",{key:"8d20c795500e3ce27b92cdeb0446908e550f9f13",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"b8374d7d7a4844b4c2cf6363b8d2d225bb52b21d",class:"zonos--link-authentication-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}();ZonosLinkAuthentication.style=ZonosLinkAuthenticationStyle0;export{ZonosAddress as zonos_address,ZonosCheckbox as zonos_checkbox,ZonosCollapse as zonos_collapse,ZonosLinkAuthentication as zonos_link_authentication};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,o,s){function n(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,i){function a(t){try{c(s.next(t))}catch(t){i(t)}}function r(t){try{c(s["throw"](t))}catch(t){i(t)}}function c(t){t.done?o(t.value):n(t.value).then(a,r)}c((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,n,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(t){return function(e){return c([t,e])}}function c(r){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(o=0)),o)try{if(s=1,n&&(i=r[0]&2?n["return"]:r[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;if(n=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:o.label++;return{value:r[1],done:false};case 5:o.label++;n=r[1];r=[0];continue;case 7:r=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){o=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){o.label=r[1];break}if(r[0]===6&&o.label<i[1]){o.label=i[1];i=r;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(r);break}if(i[2])o.ops.pop();o.trys.pop();continue}r=e.call(t,o)}catch(t){r=[6,t];n=0}finally{s=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,d as getElement}from"./index-dd40cc85.js";import{j as stripeStore,d as logError,l as localizationStore,t as translate,n as stripeStorePrefetchLandedCost}from"./cart-8526eb36.js";import{z as zonosStore,d as zonosStoreFontFamily}from"./zonosStore-aac7c6ac.js";import{i as isCheckoutMobile}from"./isCheckoutMobile-8846dccb.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-5d750ab8.js";import{i as isDarkColor}from"./isDarkColor-c34dfed9.js";var containsNonLatinChars=function(t){var e=/[^\p{Script=Latin}\p{P}\p{S}\p{N}\p{Z}\p{C}\p{M}]{1}/u;var o=Object.entries(t).reduce((function(t,o){var s;var n=o[0],i=o[1];return e.test(i)?Object.assign(Object.assign({},t),(s={},s[n]=true,s)):t}),{});return o};var zonosAddressCss=".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:var(--amino-space-8)}";var ZonosAddressStyle0=zonosAddressCss;var ZonosAddress=function(){function t(t){registerInstance(this,t);this.invalidCharacters=createEvent(this,"invalidCharacters",7);this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe;this.hasInvalidCharacters=false;this.isDirtyAddress=false}t.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:stripeStore.stripeBillingAddressElement,stripeAddressEventData:stripeStore.stripeBillingAddressEventData,stripeElements:stripeStore.stripeElementsForBillingAddress}}return{stripeAddressElement:stripeStore.stripeAddressElement,stripeAddressEventData:stripeStore.stripeAddressEventData,stripeElements:stripeStore.stripeElements}};t.prototype.updateAddressEventData=function(t){var e=t.event,o=t.type;switch(o){case"billing":stripeStore.stripeBillingAddressEventData=e;break;default:stripeStore.stripeAddressEventData=e;break}var s=this.checkInvalidCharacters(e);this.invalidCharacters.emit(s);this.hasInvalidCharacters=s;if(s){return}};t.prototype.updateAddressElement=function(t){var e=t.stripeAddressElement,o=t.type;if(o==="shipping"){stripeStore.stripeAddressElement=e;return}stripeStore.stripeBillingAddressElement=e};t.prototype.checkInvalidCharacters=function(t){if(!t.complete||zonosStore.checkoutSettings.allowedCharacterSets==="ALL"){return false}var e=t.value,o=e.address,s=e.firstName,n=e.lastName,i=e.name;var a=o.city,r=o.country,c=o.line1,h=o.line2,l=o.postal_code,d=o.state;var u=containsNonLatinChars({city:a,country:r,line1:c,line2:h||"",name:i||"".concat(s," ").concat(n),postal_code:l,state:d});if(Object.keys(u).length){return true}return false};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,o,s,n,i,a,r,c;var h=this;return __generator(this,(function(l){this.stripe=window.Zonos.stripe;o=this.getStripeAddressInstance(),s=o.stripeAddressEventData,n=o.stripeElements;if(!this.stripe||!n){logError("Stripe is not initialized. Couldn't load stripe element.");return[2]}i=(t=this.defaultAddress)===null||t===void 0?void 0:t.phone;if(!i){(e=this.defaultAddress)===null||e===void 0?true:delete e.phone}a=localizationStore.shippingZoneCountries;r=a?Object.values(a).map((function(t){return t.code})):[];c=n.create("address",{allowedCountries:this.type==="shipping"?r:[],contacts:this.defaultAddress?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},s===null||s===void 0?void 0:s.value.address),{country:(s===null||s===void 0?void 0:s.value.address.country)||localizationStore.selectedCountryCode||"AL"}),firstName:s===null||s===void 0?void 0:s.value.firstName,lastName:s===null||s===void 0?void 0:s.value.lastName,phone:s===null||s===void 0?void 0:s.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});c.mount(this.el.querySelector(".zonos--address-component"));c.on("change",(function(t){var e=t.value;if(!h.isDirtyAddress&&e.address.line1.length>=3){h.isDirtyAddress=true;setTimeout((function(){if(isCheckoutMobile()){h.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var t=h.type==="shipping"?100:600;var e=h.el.closest(".zonos--group");var o=h.el.getBoundingClientRect().top+t;e===null||e===void 0?void 0:e.scrollTo({behavior:"smooth",top:o})}}),600)}h.updateAddressEventData({event:Object.assign(Object.assign({},t),{elementMode:h.type,elementType:"address",value:Object.assign(Object.assign({},e),{firstName:e.firstName||e.name.split(" ")[0],lastName:e.lastName||e.name.split(" ")[1]})}),type:h.type})}));this.updateAddressElement({stripeAddressElement:c,type:this.type});return[2]}))}))};t.prototype.disconnectedCallback=function(){var t=this.getStripeAddressInstance().stripeAddressElement;t===null||t===void 0?void 0:t.destroy()};t.prototype.componentDidLoad=function(){var t=this;var e=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!e&&e.value.address.line1.length>0;void this.watchInitStripe();setTimeout((function(){var e=t.getStripeAddressInstance().stripeAddressEventData;if(e){t.checkInvalidCharacters(e)}}),500)};t.prototype.render=function(){return h(Host,{key:"3927946760be161a50ccf924cef5a58503887ac8",class:"zonos--address zonos--elements"},h("zonos-text",{key:"ac95946a7322dbfab13b3d29df2e22d251ba553c",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"552c6e94d64a842f702c5499320713c8b8fcab6b",class:"zonos--address-component"}),this.hasInvalidCharacters&&h("zonos-banner",{bannerTitle:translate("Please ensure your text uses the Latin alphabet only (A-Z, a-z)."),intent:"error"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}();ZonosAddress.style=ZonosAddressStyle0;var colorPrefixes=["blue","cyan","green","orange","purple","red","gray","glass"];var zonosCheckboxCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:var(--amino-space-8);-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--amino-gray-400);position:relative;border-radius:var(--border-radius, var(--amino-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--amino-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var ZonosCheckboxStyle0=zonosCheckboxCss;var ZonosCheckbox=function(){function t(t){registerInstance(this,t);this.checkboxSelected=createEvent(this,"checkboxSelected",7);this.backgroundColor="blue";this.label=undefined;this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base";this.borderStyle=undefined}t.prototype.render=function(){var t=this;var e=colorPrefixes.includes(this.backgroundColor);var o=e?"var(--amino-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var s=e?"var(--amino-".concat(this.backgroundColor,"-200)"):!isDarkColor(o)?"var(--amino-gray-800)":"var(--amino-gray-0)";var n=getBorderRadius(this.borderStyle,"4px");return h(Host,{key:"5f8516f5933b739cc3f21d901e50dec1c761fa58",class:classes(["zonos--elements zonos--checkbox"]),style:{"--background-color":o,"--border-radius":n,"--font-family":zonosStoreFontFamily(),"--size":"".concat(this.size,"px")}},h("label",{key:"6544f51a8c892d616123ab4194d069b055e3dc86",class:classes([this.isDisabled&&"disabled"])},h("input",{key:"958e35bf16be575230748fccdb1a3916942c3a30",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(e){t.checkboxSelected.emit(e.target.checked)},type:"checkbox"}),h("span",{key:"2c55e0a190b092dd083c433c35143e253910f54f",class:"checkmark-container"},h("svg",{key:"0aa1f705b728055835159a399173a170aee4f7c0",class:"checkmark",color:s,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},h("path",{key:"d526bbafde4d4399be3f3a0a7cc87e92634d9548","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&h("zonos-text",{size:this.fontSize},this.label)))};return t}();ZonosCheckbox.style=ZonosCheckboxStyle0;var zonosCollapseCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var ZonosCollapseStyle0=zonosCollapseCss;var ZonosCollapse=function(){function t(t){registerInstance(this,t);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight;this.iframe=null}t.prototype.getElementHeight=function(){var t="".concat(this.height,"px");var e="".concat(this.collapseSize,"px");return this.collapsed?e:t};t.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};t.prototype.componentDidRender=function(){var t=this;var e,o,s;this.iframe=((e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("iframe"))||null;(s=(o=this.iframe)===null||o===void 0?void 0:o.contentWindow)===null||s===void 0?void 0:s.addEventListener("resize",(function(){if(!t.iframe){return}t.height=parseFloat(getComputedStyle(t.iframe).height)}))};t.prototype.render=function(){var t=this;if(!this.collapsed){setTimeout((function(){if(!t.collapsed){t.el.style.overflow="visible"}}),300)}else{this.el.style.overflow="hidden"}return h(Host,{key:"7ac8b898feadfb4424b3b48a98135cb18994f4e0",class:"zonos--elements zonos--collapse",style:{"--font-family":zonosStoreFontFamily(),height:this.getElementHeight()}},h("div",{key:"4a527ec319b59041196284d4d9a8f22b943a74e6"},h("iframe",{key:"2fb51c16e13ca90561b1b1e6cab89d87e4a37a47",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),h("slot",{key:"6d7849f6c35be611446b0da36d657396e5ca3122"})))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();ZonosCollapse.style=ZonosCollapseStyle0;var zonosLinkAuthenticationCss=".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:var(--amino-space-16)}";var ZonosLinkAuthenticationStyle0=zonosLinkAuthenticationCss;var ZonosLinkAuthentication=function(){function t(t){registerInstance(this,t);this.titleText=undefined;this.stripe=stripeStore.stripe}t.prototype.watchInitStripe=function(){if(!this.stripe||!stripeStore.stripeElements){return}var t=stripeStore.stripeLinkElement||stripeStore.stripeElements.create("linkAuthentication");var e=this.el.querySelector(".zonos--link-authentication-component");if(!e){logError("Cannot find container element for linkAuthenticationElement");return}t.mount(e);t.on("change",(function(t){stripeStore.stripeLinkEventData=t;void stripeStorePrefetchLandedCost()}));stripeStore.stripeLinkElement=t};t.prototype.componentDidLoad=function(){this.watchInitStripe()};t.prototype.render=function(){return h(Host,{key:"671681b3ca3e95ab25a70cb44e84db7e2b3903e8",class:"zonos--link-authentication zonos--elements"},h("zonos-text",{key:"8d20c795500e3ce27b92cdeb0446908e550f9f13",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"b8374d7d7a4844b4c2cf6363b8d2d225bb52b21d",class:"zonos--link-authentication-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}();ZonosLinkAuthentication.style=ZonosLinkAuthenticationStyle0;export{ZonosAddress as zonos_address,ZonosCheckbox as zonos_checkbox,ZonosCollapse as zonos_collapse,ZonosLinkAuthentication as zonos_link_authentication};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-dd40cc85.js";import{d as zonosStoreFontFamily}from"./zonosStore-aac7c6ac.js";import{c as classes}from"./classes-0d95c529.js";var zonosBadgeCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:var(--amino-space-8);font-size:var(--amino-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--amino-radius-6);background-color:var(--amino-gray-100);color:var(--amino-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--amino-gray-600);color:var(--amino-gray-100)}:host .blue{background-color:var(--amino-blue-100);color:var(--amino-blue-800)}:host .blue.bold{background-color:var(--amino-blue-600);color:var(--amino-blue-100)}:host .green{background-color:var(--amino-green-100);color:var(--amino-green-800)}:host .green.bold{background-color:var(--amino-green-600);color:var(--amino-green-100)}:host .red{background-color:var(--amino-red-100);color:var(--amino-red-800)}:host .red.bold{background-color:var(--amino-red-600);color:var(--amino-red-100)}:host .orange{background-color:var(--amino-orange-100);color:var(--amino-orange-800)}:host .orange.bold{background-color:var(--amino-orange-600);color:var(--amino-orange-100)}:host .purple{background-color:var(--amino-purple-100);color:var(--amino-purple-800)}:host .purple.bold{background-color:var(--amino-purple-600);color:var(--amino-purple-100)}:host .cyan{background-color:var(--amino-cyan-100);color:var(--amino-cyan-800)}:host .cyan.bold{background-color:var(--amino-cyan-600);color:var(--amino-cyan-100)}";var ZonosBadgeStyle0=zonosBadgeCss;var ZonosBadge=function(){function o(o){registerInstance(this,o);this.bold=false;this.badgeColor="gray";this.icon=undefined;this.iconRight=false;this.size="default";this.rounded=false}o.prototype.render=function(){return h(Host,{key:"1cece57ce37e04873f625d05ad5a0bea6368b46b",class:classes(["zonos--elements zonos--badge"]),style:{"--font-family":zonosStoreFontFamily()}},h("div",{key:"8caf3f2ffb7deda215c44ad0c6c0892936d526c2",class:classes(["zonos--badge-content",this.badgeColor,this.rounded&&"rounded",this.iconRight&&"icon-right",this.size,this.bold&&"bold"])},this.icon,h("zonos-text",{key:"fb8ac7f09675f9cfd829ecea54c61f5c699caa00"},h("slot",{key:"978bc876e427d932662a0100043e04b105e9df8d"}))))};return o}();ZonosBadge.style=ZonosBadgeStyle0;var zonosTooltipCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--tooltip{position:relative}:host .zonos--tooltip .zonos--tooltip-content{position:absolute;bottom:100%;left:0;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:var(--amino-space-12);background-color:var(--amino-gray-1200);opacity:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:var(--amino-radius-4);z-index:100;-webkit-box-shadow:var(--amino-v3-shadow-large);box-shadow:var(--amino-v3-shadow-large)}:host .zonos--tooltip .zonos--tooltip-content.zonos--show-tooltip{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var ZonosTooltipStyle0=zonosTooltipCss;var ZonosTooltip=function(){function o(o){registerInstance(this,o);this.label="";this.subtitle="";this.showTooltip=false}o.prototype.render=function(){var o=this;return h(Host,{key:"4864150b0af4119fc7d87aec5af3c258fb27802d",class:"zonos--elements"},h("div",{key:"c11d3da431f9c4507bc58ec38d0b1ef21c99b584",class:"zonos--tooltip",onMouseEnter:function(){return o.showTooltip=true},onMouseLeave:function(){return o.showTooltip=false}},h("slot",{key:"0a92efb2e6c17f67c2feacbd17bbddd4fb63f7da"}),h("div",{key:"0ea54bfaf54a2f170044d77c2b555e5da37af8ae",class:classes([this.showTooltip&&"zonos--show-tooltip","zonos--tooltip-content"])},h("zonos-text",{key:"73c55a7318eb36760d2779691f9ea79d2c5bf8c7",size:"s",textColor:"gray-0",type:"boldLabel"},this.label),h("zonos-text",{key:"1f4106f67fc468121d7fb7fbc0ee69363bb26186",size:"xs",textColor:"gray-0"},this.subtitle))))};return o}();ZonosTooltip.style=ZonosTooltipStyle0;export{ZonosBadge as zonos_badge,ZonosTooltip as zonos_tooltip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-dd40cc85.js";import{d as zonosStoreFontFamily}from"./zonosStore-aac7c6ac.js";import{c as classes}from"./classes-0d95c529.js";var zonosBannerCss=':host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{border-radius:var(--amino-radius-10);padding:var(--amino-space-16);background:var(--amino-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:"icon header" ". content";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:var(--amino-space-0);grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:var(--amino-space-4)}:host(.info){background-color:var(--amino-blue-100);border:1px solid var(--amino-blue-200)}:host(.success){background-color:var(--amino-green-100);border:1px solid var(--amino-green-200)}:host(.error){background-color:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host(.warning){background-color:var(--amino-orange-100);border:1px solid var(--amino-orange-200)}';var ZonosBannerStyle0=zonosBannerCss;var ZonosBanner=function(){function o(o){var r=this;registerInstance(this,o);this.handleSlotChange=function(){r.hasContent=true};this.bannerTitle=undefined;this.intent=undefined;this.hasContent=false}o.prototype.render=function(){var o=this;var r=function(r){var a=r.color;var s="var(--amino-".concat(a,"-800)");var n="var(--amino-".concat(a,"-300)");var e=[o.bannerTitle,h("slot",{onSlotchange:o.handleSlotChange})].filter(Boolean),t=e[0],i=e[1];var l=a==="gray"?"gray-1200":"".concat(a,"-800");return h("div",{class:classes(["zonos--container"])},h("div",{class:"zonos--icon-wrapper"},h("svg",{color:s,fill:"none",height:"20",viewBox:"0 0 24 24",width:"20",xmlns:"https://www.w3.org/2000/svg"},h("path",{"clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z","data-is-secondary-color":"true",fill:n,"fill-rule":"evenodd"}),h("path",{"clip-rule":"evenodd",d:"M12 6.99a1 1 0 0 1 1 1V8a1 1 0 1 1-2 0v-.01a1 1 0 0 1 1-1ZM12 11a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1Z",fill:"currentColor","fill-rule":"evenodd"}))),h("div",{class:"zonos--header-wrapper"},h("zonos-text",{textColor:l,type:"label",weight:600},t)),i&&h("div",{class:"zonos--content-wrapper"},h("zonos-text",{textColor:l},i)))};var a=classes(["zonos--elements zonos--banner",this.intent]);var s=zonosStoreFontFamily();switch(this.intent){case"error":return h(Host,{class:a,style:{"--font-family":s}},r({color:"red"}));case"info":return h(Host,{class:a,style:{"--font-family":s}},r({color:"blue"}));case"success":return h(Host,{class:a,style:{"--font-family":s}},r({color:"green"}));case"warning":return h(Host,{class:a,style:{"--font-family":s}},r({color:"orange"}));default:return h(Host,{class:a,style:{"--font-family":s}},r({color:"gray"}))}};return o}();ZonosBanner.style=ZonosBannerStyle0;export{ZonosBanner as zonos_banner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host,d as getElement}from"./index-b5be4dc3.js";import{z as zonosStore,d as zonosStoreFontFamily}from"./zonosStore-807f931f.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-0d133844.js";import{i as isColorVariable}from"./isColorVariable-91c33804.js";import{i as isDarkColor}from"./isDarkColor-8eeda28e.js";var getButtonTheme=function(o){var t=o||zonosStore.appearance.colorSecondary;var n=t&&isColorVariable(t)?"var(--amino-".concat(t,")"):t;var r=n&&isDarkColor(n)?"DARK":"LIGHT";return r};var zonosButtonCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;border-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--amino-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--amino-radius-10);gap:var(--amino-space-8)}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-surface-color);border:none;outline:1px solid var(--amino-surface-color);border-radius:var(--border-radius, var(--amino-radius-10));-webkit-transition:var(--amino-transition);transition:var(--amino-transition);font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:var(--amino-space-8) var(--amino-space-24);color:var(--color, var(--amino-gray-1200));margin:1px;}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--background-color, var(--amino-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--background-color, var(--amino-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--amino-size-sm);line-height:var(--amino-size-sm);padding:var(--amino-space-4) var(--amino-space-8)}:host button.sm:not(.has-content).has-icon{padding:0 var(--amino-space-4)}:host button.md{height:var(--amino-size-md);line-height:var(--amino-size-md);padding:var(--amino-space-8) var(--amino-space-16)}:host button.md:not(.has-content).has-icon{padding:0 var(--amino-space-8)}:host button.lg{height:var(--amino-size-lg);line-height:var(--amino-size-lg);padding:var(--amino-space-12) var(--amino-space-24)}:host button.lg:not(.has-content).has-icon{padding:0 var(--amino-space-16)}:host button:not(.only-icon).has-icon{gap:var(--amino-space-8)}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--amino-font-size-s)}}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color);outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--amino-gray-100)}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}:host .zonos--footer-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center;border-radius:var(--amino-radius-4);width:24px}";var ZonosButtonStyle0=zonosButtonCss;var ZonosButton=function(){function o(o){var t=this;registerInstance(this,o);this.handleSlotChange=function(){t.hasContent=true};this.buttonColor=undefined;this.backgroundColor=undefined;this.borderStyle=undefined;this.isDisabled=false;this.icon=null;this.iconRight=false;this.size="sm";this.variant="standard";this.noBackground=false;this.noPaddingLeft=false;this.noPaddingRight=false;this.loading=false;this.theme=undefined;this.hasIcon=!!this.icon;this.hasContent=false}o.prototype.iconChangeHandler=function(){this.hasIcon=!!this.icon};o.prototype.clickHandler=function(o){if(this.loading||this.isDisabled){o.preventDefault();o.stopPropagation()}};o.prototype.componentWillLoad=function(){this.iconChangeHandler()};o.prototype.render=function(){var o=this.loading||this.isDisabled;var t=this.variant||"standard";var n=this.buttonColor&&isColorVariable(this.buttonColor)?"var(--amino-".concat(this.buttonColor,")"):this.buttonColor;var r=this.backgroundColor||zonosStore.appearance.colorSecondary;var a=t==="standard"?getButtonTheme(r):undefined;var e=getBorderRadius(this.borderStyle);var s=a==="LIGHT"?"black":"white";return h(Host,{key:"f3374eedd37ec6293260fba7b19d66aa013d3484",class:classes(["zonos--elements"]),"data-theme":this.theme||a,disabled:o,style:{"--background-color":r,"--border-radius":e,"--color":n,"--font-family":zonosStoreFontFamily()}},h("button",{key:"352ce427591b20b8042dcd19ce159b77c1fc2faf",class:classes([this.hasIcon&&"has-icon",this.hasContent&&"has-content",this.noBackground&&"no-background",this.noPaddingLeft&&"no-padding-left",this.noPaddingRight&&"no-padding-right",this.iconRight&&"icon-right",t,this.size,r&&t==="standard"&&"override-background"]),disabled:o},this.loading&&h("div",{class:"zonos--spinner-wrapper"},h("zonos-spinner",{size:16,spinnerColor:s})),!this.loading&&!this.iconRight&&this.icon,h("slot",{key:"554cc1fd9bb58d833339ae21e837d586adc248c2",onSlotchange:this.handleSlotChange}),!this.loading&&this.iconRight&&this.icon))};Object.defineProperty(o,"watchers",{get:function(){return{icon:["iconChangeHandler"]}},enumerable:false,configurable:true});return o}();ZonosButton.style=ZonosButtonStyle0;var zonosIconCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--width);height:var(--height);fill:var(--color);color:var(--color)}";var ZonosIconStyle0=zonosIconCss;var ZonosIcon=function(){function o(o){registerInstance(this,o);this.autoHeight=false;this.iconColor="gray-1200";this.content=undefined;this.size=24}o.prototype.render=function(){if(!this.content||!this.el.shadowRoot){return null}this.el.shadowRoot.innerHTML=this.content;return h(Host,{class:"zonos--elements",style:{"--color":"var(--amino-".concat(this.iconColor,")"),"--font-family":zonosStoreFontFamily(),"--height":"".concat(this.autoHeight?"auto":"".concat(this.size,"px")),"--width":"".concat(this.size,"px")}})};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosIcon.style=ZonosIconStyle0;var zonosSpinnerCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:relative;overflow:hidden;width:var(--size);height:var(--size);display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--size);height:var(--size);stroke:var(--amino-blue-600);-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}:host circle.track{stroke:var(--amino-gray-200)}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}:host circle:not(.track){stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}:host(.black) circle{stroke:var(--amino-spinner-stroke-black)}:host(.black) circle.track{stroke:var(--amino-spinner-track-black)}:host(.white) circle{stroke:var(--amino-spinner-stroke-white)}:host(.white) circle.track{stroke:var(--amino-spinner-track-white)}:host(.info) circle{stroke:var(--amino-blue-600)}:host(.info) circle.track{stroke:var(--amino-blue-100)}:host(.success) circle{stroke:var(--amino-green-600)}:host(.success) circle.track{stroke:var(--amino-green-100)}:host(.danger) circle{stroke:var(--amino-red-600)}:host(.danger) circle.track{stroke:var(--amino-red-100)}:host(.warning) circle{stroke:var(--amino-orange-600)}:host(.warning) circle.track{stroke:var(--amino-orange-100)}";var ZonosSpinnerStyle0=zonosSpinnerCss;var ZonosSpinner=function(){function o(o){registerInstance(this,o);this.size=32;this.spinnerColor=undefined}o.prototype.render=function(){if(!this.el.shadowRoot){return null}return h(Host,{class:classes(["zonos--elements",this.spinnerColor]),style:{"--size":"".concat(this.size,"px")}},h("svg",{viewBox:"0 0 50 50"},h("circle",{class:"track",cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}),h("circle",{cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"})))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosSpinner.style=ZonosSpinnerStyle0;export{ZonosButton as zonos_button,ZonosIcon as zonos_icon,ZonosSpinner as zonos_spinner};
|
|
1
|
+
import{r as registerInstance,h,H as Host,d as getElement}from"./index-dd40cc85.js";import{z as zonosStore,d as zonosStoreFontFamily}from"./zonosStore-aac7c6ac.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-5d750ab8.js";import{i as isColorVariable}from"./isColorVariable-91c33804.js";import{i as isDarkColor}from"./isDarkColor-c34dfed9.js";var getButtonTheme=function(o){var t=o||zonosStore.appearance.colorSecondary;var n=t&&isColorVariable(t)?"var(--amino-".concat(t,")"):t;var r=n&&isDarkColor(n)?"DARK":"LIGHT";return r};var zonosButtonCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;border-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--amino-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--amino-radius-10);gap:var(--amino-space-8)}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-surface-color);border:none;outline:1px solid var(--amino-surface-color);border-radius:var(--border-radius, var(--amino-radius-10));-webkit-transition:var(--amino-transition);transition:var(--amino-transition);font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:var(--amino-space-8) var(--amino-space-24);color:var(--color, var(--amino-gray-1200));margin:1px;}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--background-color, var(--amino-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--background-color, var(--amino-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--amino-size-sm);line-height:var(--amino-size-sm);padding:var(--amino-space-4) var(--amino-space-8)}:host button.sm:not(.has-content).has-icon{padding:0 var(--amino-space-4)}:host button.md{height:var(--amino-size-md);line-height:var(--amino-size-md);padding:var(--amino-space-8) var(--amino-space-16)}:host button.md:not(.has-content).has-icon{padding:0 var(--amino-space-8)}:host button.lg{height:var(--amino-size-lg);line-height:var(--amino-size-lg);padding:var(--amino-space-12) var(--amino-space-24)}:host button.lg:not(.has-content).has-icon{padding:0 var(--amino-space-16)}:host button:not(.only-icon).has-icon{gap:var(--amino-space-8)}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--amino-font-size-s)}}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color);outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--amino-gray-100)}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}:host .zonos--footer-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center;border-radius:var(--amino-radius-4);width:24px}";var ZonosButtonStyle0=zonosButtonCss;var ZonosButton=function(){function o(o){var t=this;registerInstance(this,o);this.handleSlotChange=function(){t.hasContent=true};this.buttonColor=undefined;this.backgroundColor=undefined;this.borderStyle=undefined;this.isDisabled=false;this.icon=null;this.iconRight=false;this.size="sm";this.variant="standard";this.noBackground=false;this.noPaddingLeft=false;this.noPaddingRight=false;this.loading=false;this.theme=undefined;this.hasIcon=!!this.icon;this.hasContent=false}o.prototype.iconChangeHandler=function(){this.hasIcon=!!this.icon};o.prototype.clickHandler=function(o){if(this.loading||this.isDisabled){o.preventDefault();o.stopPropagation()}};o.prototype.componentWillLoad=function(){this.iconChangeHandler()};o.prototype.render=function(){var o=this.loading||this.isDisabled;var t=this.variant||"standard";var n=this.buttonColor&&isColorVariable(this.buttonColor)?"var(--amino-".concat(this.buttonColor,")"):this.buttonColor;var r=this.backgroundColor||zonosStore.appearance.colorSecondary;var a=t==="standard"?getButtonTheme(r):undefined;var e=getBorderRadius(this.borderStyle);var s=a==="LIGHT"?"black":"white";return h(Host,{key:"f3374eedd37ec6293260fba7b19d66aa013d3484",class:classes(["zonos--elements"]),"data-theme":this.theme||a,disabled:o,style:{"--background-color":r,"--border-radius":e,"--color":n,"--font-family":zonosStoreFontFamily()}},h("button",{key:"352ce427591b20b8042dcd19ce159b77c1fc2faf",class:classes([this.hasIcon&&"has-icon",this.hasContent&&"has-content",this.noBackground&&"no-background",this.noPaddingLeft&&"no-padding-left",this.noPaddingRight&&"no-padding-right",this.iconRight&&"icon-right",t,this.size,r&&t==="standard"&&"override-background"]),disabled:o},this.loading&&h("div",{class:"zonos--spinner-wrapper"},h("zonos-spinner",{size:16,spinnerColor:s})),!this.loading&&!this.iconRight&&this.icon,h("slot",{key:"554cc1fd9bb58d833339ae21e837d586adc248c2",onSlotchange:this.handleSlotChange}),!this.loading&&this.iconRight&&this.icon))};Object.defineProperty(o,"watchers",{get:function(){return{icon:["iconChangeHandler"]}},enumerable:false,configurable:true});return o}();ZonosButton.style=ZonosButtonStyle0;var zonosIconCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--width);height:var(--height);fill:var(--color);color:var(--color)}";var ZonosIconStyle0=zonosIconCss;var ZonosIcon=function(){function o(o){registerInstance(this,o);this.autoHeight=false;this.iconColor="gray-1200";this.content=undefined;this.size=24}o.prototype.render=function(){if(!this.content||!this.el.shadowRoot){return null}this.el.shadowRoot.innerHTML=this.content;return h(Host,{class:"zonos--elements",style:{"--color":"var(--amino-".concat(this.iconColor,")"),"--font-family":zonosStoreFontFamily(),"--height":"".concat(this.autoHeight?"auto":"".concat(this.size,"px")),"--width":"".concat(this.size,"px")}})};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosIcon.style=ZonosIconStyle0;var zonosSpinnerCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:relative;overflow:hidden;width:var(--size);height:var(--size);display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--size);height:var(--size);stroke:var(--amino-blue-600);-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}:host circle.track{stroke:var(--amino-gray-200)}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}:host circle:not(.track){stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}:host(.black) circle{stroke:var(--amino-spinner-stroke-black)}:host(.black) circle.track{stroke:var(--amino-spinner-track-black)}:host(.white) circle{stroke:var(--amino-spinner-stroke-white)}:host(.white) circle.track{stroke:var(--amino-spinner-track-white)}:host(.info) circle{stroke:var(--amino-blue-600)}:host(.info) circle.track{stroke:var(--amino-blue-100)}:host(.success) circle{stroke:var(--amino-green-600)}:host(.success) circle.track{stroke:var(--amino-green-100)}:host(.danger) circle{stroke:var(--amino-red-600)}:host(.danger) circle.track{stroke:var(--amino-red-100)}:host(.warning) circle{stroke:var(--amino-orange-600)}:host(.warning) circle.track{stroke:var(--amino-orange-100)}";var ZonosSpinnerStyle0=zonosSpinnerCss;var ZonosSpinner=function(){function o(o){registerInstance(this,o);this.size=32;this.spinnerColor=undefined}o.prototype.render=function(){if(!this.el.shadowRoot){return null}return h(Host,{class:classes(["zonos--elements",this.spinnerColor]),style:{"--size":"".concat(this.size,"px")}},h("svg",{viewBox:"0 0 50 50"},h("circle",{class:"track",cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}),h("circle",{cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"})))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosSpinner.style=ZonosSpinnerStyle0;export{ZonosButton as zonos_button,ZonosIcon as zonos_icon,ZonosSpinner as zonos_spinner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-dd40cc85.js";import{d as zonosStoreFontFamily}from"./zonosStore-aac7c6ac.js";import{c as classes}from"./classes-0d95c529.js";import{G as localizationStoreUpdateSelectedLocale,t as translate,l as localizationStore}from"./cart-8526eb36.js";import{l as languages}from"./ILanguage-97790bee.js";import"./isDarkColor-c34dfed9.js";import"./getBorderRadius-5d750ab8.js";var zonosCardCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--amino-border);border-radius:var(--amino-radius-6);padding:var(--spacing, var(--amino-space-24));text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, var(--amino-space-24)) * -1);margin-right:calc(var(--spacing, var(--amino-space-24)) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, var(--amino-space-24));border-bottom:var(--amino-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));border-top:var(--amino-border);background:var(--amino-surface-color-secondary);margin-top:var(--spacing, var(--amino-space-24));border-bottom-left-radius:var(--amino-radius-8);border-bottom-right-radius:var(--amino-radius-8);height:var(--footerHeight)}";var ZonosCardStyle0=zonosCardCss;var ZonosCard=function(){function e(e){registerInstance(this,e);this.actions=undefined;this.footerActions=undefined;this.footerContent=undefined;this.footerHeight=undefined;this.label=undefined;this.spacing="24px"}e.prototype.render=function(){return h(Host,{key:"b350f7a592ea35c3b6beaf5eefaa2ab0208975dd",style:{"--font-family":zonosStoreFontFamily()}},h("div",{key:"125e8b550cd8f371e28a012536722f48402774f2",class:classes(["styled-card"]),style:{padding:this.spacing}},this.label&&h("header",{class:"card-header",style:{padding:this.spacing}},h("zonos-text",{type:"subheader"},this.label),h("h-stack",{spacing:8},this.actions)),h("slot",{key:"3cf038c62910ebac736ed1c37ecf1a490c8e1d0e"}),(this.footerActions||this.footerContent)&&h("footer",{class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},h("div",null,this.footerContent),h("h-stack",{spacing:8},this.footerActions))))};return e}();ZonosCard.style=ZonosCardStyle0;var GreenCheckDuotoneIcon='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var zonosLanguageSelectCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:var(--amino-space-16);padding-top:var(--amino-space-0)}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:var(--amino-space-8);gap:var(--amino-space-4);-ms-flex-align:center;align-items:center;border-radius:var(--amino-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--amino-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var ZonosLanguageSelectStyle0=zonosLanguageSelectCss;var ZonosLanguageSelect=function(){function e(e){var a=this;registerInstance(this,e);this.languageSelected=function(e){void localizationStoreUpdateSelectedLocale(e);a.handleOnClose()};this.handleOnClose=function(){}}e.prototype.render=function(){var e=this;var a=localizationStore.selectedLocale;return h(Host,{key:"d12676d6438941bb8d987826f68c1b72a7e02ccd",class:"zonos--elements",style:{"--font-family":zonosStoreFontFamily()}},h("div",{key:"259eaa6a8ae682cc96c98eaaab574757285188b9",class:"zonos--language-select"},h("zonos-select-dialog-header",{key:"88bff024a5f678b00bf4edd7b2497177a986af4c",handleOnClose:function(){return e.handleOnClose()},label:translate("Select a language")}),h("div",{key:"be1d87991dec9ac2a3b530a0cf9129b9e191781b",class:"zonos--language-select-content"},languages.map((function(o){return h("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(o.code)}},h("zonos-text",{textColor:"gray-800"},o.translatedLabel),o.code===a&&h("zonos-icon",{content:GreenCheckDuotoneIcon,size:16}))})))))};return e}();ZonosLanguageSelect.style=ZonosLanguageSelectStyle0;export{ZonosCard as zonos_card,ZonosLanguageSelect as zonos_language_select};
|