@everymatrix/cashier-modal 1.0.69 → 1.0.71
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.
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";var bt=Object.defineProperty,vt=Object.defineProperties;var xt=Object.getOwnPropertyDescriptors;var nt=Object.getOwnPropertySymbols;var Ct=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable;var q=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,it=(e,t)=>{for(var n in t||(t={}))Ct.call(t,n)&&q(e,n,t[n]);if(nt)for(var n of nt(t))Et.call(t,n)&&q(e,n,t[n]);return e},st=(e,t)=>vt(e,xt(t));var m=(e,t,n)=>q(e,typeof t!="symbol"?t+"":t,n);var rt=(e,t,n)=>new Promise((i,r)=>{var s=u=>{try{o(n.next(u))}catch(c){r(c)}},l=u=>{try{o(n.throw(u))}catch(c){r(c)}},o=u=>u.done?i(u.value):Promise.resolve(u.value).then(s,l);o((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function H(){}const ht=e=>e;function Mt(e,t){for(const n in t)e[n]=t[n];return e}function $t(e){return e()}function ot(){return Object.create(null)}function L(e){e.forEach($t)}function Y(e){return typeof e=="function"}function kt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function St(e){return Object.keys(e).length===0}function jt(e,t,n,i){if(e){const r=_t(e,t,n,i);return e[0](r)}}function _t(e,t,n,i){return e[1]&&i?Mt(n.ctx.slice(),e[1](i(t))):n.ctx}function Lt(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],l=Math.max(t.dirty.length,r.length);for(let o=0;o<l;o+=1)s[o]=t.dirty[o]|r[o];return s}return t.dirty|r}return t.dirty}function Ot(e,t,n,i,r,s){if(r){const l=_t(t,n,i,s);e.p(l,r)}}function At(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let i=0;i<n;i++)t[i]=-1;return t}return-1}const gt=typeof window!="undefined";let Nt=gt?()=>window.performance.now():()=>Date.now(),Z=gt?e=>requestAnimationFrame(e):H;const k=new Set;function mt(e){k.forEach(t=>{t.c(e)||(k.delete(t),t.f())}),k.size!==0&&Z(mt)}function zt(e){let t;return k.size===0&&Z(mt),{promise:new Promise(n=>{k.add(t={c:e,f:n})}),abort(){k.delete(t)}}}function F(e,t){e.appendChild(t)}function Pt(e,t,n){const i=tt(e);if(!i.getElementById(t)){const r=C("style");r.id=t,r.textContent=n,yt(i,r)}}function tt(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Wt(e){const t=C("style");return t.textContent="/* empty */",yt(tt(e),t),t.sheet}function yt(e,t){return F(e.head||e,t),t.sheet}function et(e,t,n){e.insertBefore(t,n||null)}function O(e){e.parentNode&&e.parentNode.removeChild(e)}function C(e){return document.createElement(e)}function Rt(e){return document.createTextNode(e)}function Ht(){return Rt("")}function lt(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function b(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Tt(e){return Array.from(e.childNodes)}let B;function Bt(){if(B===void 0){B=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(e){B=!0}}return B}function Dt(e,t){getComputedStyle(e).position==="static"&&(e.style.position="relative");const i=C("iframe");i.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),i.setAttribute("aria-hidden","true"),i.tabIndex=-1;const r=Bt();let s;return r?(i.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=lt(window,"message",l=>{l.source===i.contentWindow&&t()})):(i.src="about:blank",i.onload=()=>{s=lt(i.contentWindow,"resize",t),t()}),F(e,i),()=>{(r||s&&i.contentWindow)&&s(),O(i)}}function It(e,t,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:i})}function Ft(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}const U=new Map;let J=0;function Ut(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}function Jt(e,t){const n={stylesheet:Wt(t),rules:{}};return U.set(e,n),n}function ct(e,t,n,i,r,s,l,o=0){const u=16.666/i;let c=`{
|
|
2
|
+
`;for(let $=0;$<=1;$+=u){const w=t+(n-t)*s($);c+=$*100+`%{${l(w,1-w)}}
|
|
3
|
+
`}const h=c+`100% {${l(n,1-n)}}
|
|
4
|
+
}`,a=`__svelte_${Ut(h)}_${o}`,_=tt(e),{stylesheet:y,rules:d}=U.get(_)||Jt(_,e);d[a]||(d[a]=!0,y.insertRule(`@keyframes ${a} ${h}`,y.cssRules.length));const g=e.style.animation||"";return e.style.animation=`${g?`${g}, `:""}${a} ${i}ms linear ${r}ms 1 both`,J+=1,a}function Vt(e,t){const n=(e.style.animation||"").split(", "),i=n.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),r=n.length-i.length;r&&(e.style.animation=i.join(", "),J-=r,J||qt())}function qt(){Z(()=>{J||(U.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&O(t)}),U.clear())})}let T;function W(e){T=e}function Gt(){if(!T)throw new Error("Function called outside component initialization");return T}function Kt(e){Gt().$$.on_mount.push(e)}const M=[],V=[];let S=[];const ut=[],Qt=Promise.resolve();let Q=!1;function Xt(){Q||(Q=!0,Qt.then(x))}function j(e){S.push(e)}const G=new Set;let E=0;function x(){if(E!==0)return;const e=T;do{try{for(;E<M.length;){const t=M[E];E++,W(t),Yt(t.$$)}}catch(t){throw M.length=0,E=0,t}for(W(null),M.length=0,E=0;V.length;)V.pop()();for(let t=0;t<S.length;t+=1){const n=S[t];G.has(n)||(G.add(n),n())}S.length=0}while(M.length);for(;ut.length;)ut.pop()();Q=!1,G.clear(),W(e)}function Yt(e){if(e.fragment!==null){e.update(),L(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(j)}}function Zt(e){const t=[],n=[];S.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),S=t}let P;function te(){return P||(P=Promise.resolve(),P.then(()=>{P=null})),P}function K(e,t,n){e.dispatchEvent(It(`${t?"intro":"outro"}${n}`))}const D=new Set;let p;function ee(){p={r:0,c:[],p}}function ne(){p.r||L(p.c),p=p.p}function R(e,t){e&&e.i&&(D.delete(e),e.i(t))}function X(e,t,n,i){if(e&&e.o){if(D.has(e))return;D.add(e),p.c.push(()=>{D.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}const ie={duration:0};function ft(e,t,n,i){let s=t(e,n,{direction:"both"}),l=i?0:1,o=null,u=null,c=null,h;function a(){c&&Vt(e,c)}function _(d,g){const $=d.b-l;return g*=Math.abs($),{a:l,b:d.b,d:$,duration:g,start:d.start,end:d.start+g,group:d.group}}function y(d){const{delay:g=0,duration:$=300,easing:w=ht,tick:A=H,css:N}=s||ie,f={start:Nt()+g,b:d};d||(f.group=p,p.r+=1),"inert"in e&&(d?h!==void 0&&(e.inert=h):(h=e.inert,e.inert=!0)),o||u?u=f:(N&&(a(),c=ct(e,l,d,$,g,w,N)),d&&A(0,1),o=_(f,$),j(()=>K(e,d,"start")),zt(v=>{if(u&&v>u.start&&(o=_(u,$),u=null,K(e,o.b,"start"),N&&(a(),c=ct(e,l,o.b,o.duration,0,w,s.css))),o){if(v>=o.end)A(l=o.b,1-l),K(e,o.b,"end"),u||(o.b?a():--o.group.r||L(o.group.c)),o=null;else if(v>=o.start){const z=v-o.start;l=o.a+o.d*w(z/o.duration),A(l,1-l)}}return!!(o||u)}))}return{run(d){Y(s)?te().then(()=>{s=s({direction:d?"in":"out"}),y(d)}):y(d)},end(){a(),o=u=null}}}function se(e,t,n){const{fragment:i,after_update:r}=e.$$;i&&i.m(t,n),j(()=>{const s=e.$$.on_mount.map($t).filter(Y);e.$$.on_destroy?e.$$.on_destroy.push(...s):L(s),e.$$.on_mount=[]}),r.forEach(j)}function re(e,t){const n=e.$$;n.fragment!==null&&(Zt(n.after_update),L(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function oe(e,t){e.$$.dirty[0]===-1&&(M.push(e),Xt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function le(e,t,n,i,r,s,l=null,o=[-1]){const u=T;W(e);const c=e.$$={fragment:null,ctx:[],props:s,update:H,not_equal:r,bound:ot(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:ot(),dirty:o,skip_bound:!1,root:t.target||u.$$.root};l&&l(c.root);let h=!1;if(c.ctx=n?n(e,t.props||{},(a,_,...y)=>{const d=y.length?y[0]:_;return c.ctx&&r(c.ctx[a],c.ctx[a]=d)&&(!c.skip_bound&&c.bound[a]&&c.bound[a](d),h&&oe(e,a)),_}):[],c.update(),h=!0,L(c.before_update),c.fragment=i?i(c.ctx):!1,t.target){if(t.hydrate){const a=Tt(t.target);c.fragment&&c.fragment.l(a),a.forEach(O)}else c.fragment&&c.fragment.c();t.intro&&R(e.$$.fragment),se(e,t.target,t.anchor),x()}W(u)}let pt;typeof HTMLElement=="function"&&(pt=class extends HTMLElement{constructor(t,n,i){super();m(this,"$$ctor");m(this,"$$s");m(this,"$$c");m(this,"$$cn",!1);m(this,"$$d",{});m(this,"$$r",!1);m(this,"$$p_d",{});m(this,"$$l",{});m(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,i&&this.attachShadow({mode:"open"})}addEventListener(t,n,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const r=this.$$c.$on(t,n);this.$$l_u.set(n,r)}super.addEventListener(t,n,i)}removeEventListener(t,n,i){if(super.removeEventListener(t,n,i),this.$$c){const r=this.$$l_u.get(n);r&&(r(),this.$$l_u.delete(n))}}connectedCallback(){return rt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(s){return()=>{let l;return{c:function(){l=C("slot"),s!=="default"&&b(l,"name",s)},m:function(c,h){et(c,l,h)},d:function(c){c&&O(l)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},i=Ft(this);for(const s of this.$$s)s in i&&(n[s]=[t(s)]);for(const s of this.attributes){const l=this.$$g_p(s.name);l in this.$$d||(this.$$d[l]=I(l,s.value,this.$$p_d,"toProp"))}for(const s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:st(it({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const r=()=>{this.$$r=!0;for(const s in this.$$p_d)if(this.$$d[s]=this.$$c.$$.ctx[this.$$c.$$.props[s]],this.$$p_d[s].reflect){const l=I(s,this.$$d[s],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,l)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(const s in this.$$l)for(const l of this.$$l[s]){const o=this.$$c.$on(s,l);this.$$l_u.set(l,o)}this.$$l={}}})}attributeChangedCallback(t,n,i){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=I(t,i,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function I(e,t,n,i){var s;const r=(s=n[e])==null?void 0:s.type;if(t=r==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!n[e])return t;if(i==="toAttribute")switch(r){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function ce(e,t,n,i,r,s){let l=class extends pt{constructor(){super(e,n,r),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(o=>(t[o].attribute||o).toLowerCase())}};return Object.keys(t).forEach(o=>{Object.defineProperty(l.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(u){var c;u=I(o,u,t),this.$$d[o]=u,(c=this.$$c)==null||c.$set({[o]:u})}})}),i.forEach(o=>{Object.defineProperty(l.prototype,o,{get(){var u;return(u=this.$$c)==null?void 0:u[o]}})}),e.element=l,l}class ue{constructor(){m(this,"$$");m(this,"$$set")}$destroy(){re(this,1),this.$destroy=H}$on(t,n){if(!Y(n))return H;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!St(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const fe="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(fe);function at(e,{delay:t=0,duration:n=400,easing:i=ht}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:s=>`opacity: ${s*r}`}}function ae(e){Pt(e,"svelte-u2fcen",".svelte-u2fcen.svelte-u2fcen,.svelte-u2fcen.svelte-u2fcen::before,.svelte-u2fcen.svelte-u2fcen::after{margin:0;padding:0;box-sizing:border-box}.ModalWindow.svelte-u2fcen.svelte-u2fcen{display:flex;position:fixed;align-items:center;justify-content:center;width:100%;height:100%;z-index:100;top:0;left:0;background-color:var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));container-type:inline-size;container-name:modal-window;border-radius:6px}.ModalWindow.svelte-u2fcen .ModalContainer.svelte-u2fcen{background:var(--emw--color-white, #fff);border-radius:var(--emw--border-radius-medium, 4px);padding:var(--emw--spacing-large, 20px);width:40%}@container modal-window (max-width:750px){.ModalWindow.svelte-u2fcen .ModalContainer.svelte-u2fcen{width:90%}}")}function dt(e){let t,n,i,r,s,l;const o=e[9].default,u=jt(o,e,e[8],null);return{c(){t=C("div"),n=C("div"),i=C("div"),u&&u.c(),b(i,"class","ModalContainer svelte-u2fcen"),b(i,"part","ModalContainer"),b(n,"class","ModalWindow svelte-u2fcen"),b(n,"part","ModalWindow"),b(n,"id","Modal"),j(()=>e[11].call(n)),b(t,"part","CustomStylingContainer"),b(t,"class","svelte-u2fcen")},m(c,h){et(c,t,h),F(t,n),F(n,i),u&&u.m(i,null),e[10](n),r=Dt(n,e[11].bind(n)),e[12](t),l=!0},p(c,h){e=c,u&&u.p&&(!l||h&256)&&Ot(u,o,e,e[8],l?Lt(o,e[8],h,null):At(e[8]),null)},i(c){l||(R(u,c),c&&j(()=>{l&&(s||(s=ft(n,at,{transitionDuration:e[2]},!0)),s.run(1))}),l=!0)},o(c){X(u,c),c&&(s||(s=ft(n,at,{transitionDuration:e[2]},!1)),s.run(0)),l=!1},d(c){c&&O(t),u&&u.d(c),e[10](null),r(),c&&s&&s.end(),e[12](null)}}}function de(e){let t,n,i=e[5]&&dt(e);return{c(){i&&i.c(),t=Ht()},m(r,s){i&&i.m(r,s),et(r,t,s),n=!0},p(r,[s]){r[5]?i?(i.p(r,s),s&32&&R(i,1)):(i=dt(r),i.c(),R(i,1),i.m(t.parentNode,t)):i&&(ee(),X(i,1,1,()=>{i=null}),ne())},i(r){n||(R(i),n=!0)},o(r){X(i),n=!1},d(r){r&&O(t),i&&i.d(r)}}}function he(e,t,n){let{$$slots:i={},$$scope:r}=t,{clientstyling:s=""}=t,{clientstylingurl:l=""}=t,{duration:o="5ms"}=t,{width:u}=t,{height:c}=t,h,a,_=!1;const y=()=>{n(5,_=!1),window.postMessage({type:"ClosedCashierModal"},window.location.href),window.postMessage({type:"EnableScroll"},window.location.href)},d=f=>{f.data.type=="ShowCashierModal"&&(n(5,_=!0),window.postMessage({type:"DisableScroll"},window.location.href)),f.data.type=="HideCashierModal"&&y()},g=()=>{let f=document.createElement("style");f.innerHTML=s,a.appendChild(f)},$=()=>{let f=new URL(l),v=document.createElement("style");fetch(f.href).then(z=>z.text()).then(z=>{v.innerHTML=z,setTimeout(()=>{a.appendChild(v)},1)})};Kt(()=>(window.addEventListener("message",d,!1),()=>{window.removeEventListener("message",d)}));function w(f){V[f?"unshift":"push"](()=>{h=f,n(4,h)})}function A(){u=this.clientWidth,c=this.clientHeight,n(0,u),n(1,c)}function N(f){V[f?"unshift":"push"](()=>{a=f,n(3,a)})}return e.$$set=f=>{"clientstyling"in f&&n(6,s=f.clientstyling),"clientstylingurl"in f&&n(7,l=f.clientstylingurl),"duration"in f&&n(2,o=f.duration),"width"in f&&n(0,u=f.width),"height"in f&&n(1,c=f.height),"$$scope"in f&&n(8,r=f.$$scope)},e.$$.update=()=>{e.$$.dirty&72&&s&&a&&g(),e.$$.dirty&136&&l&&a&&$()},[u,c,o,a,h,_,s,l,r,i,w,A,N]}class wt extends ue{constructor(t){super(),le(this,t,he,de,kt,{clientstyling:6,clientstylingurl:7,duration:2,width:0,height:1},ae)}get clientstyling(){return this.$$.ctx[6]}set clientstyling(t){this.$$set({clientstyling:t}),x()}get clientstylingurl(){return this.$$.ctx[7]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),x()}get duration(){return this.$$.ctx[2]}set duration(t){this.$$set({duration:t}),x()}get width(){return this.$$.ctx[0]}set width(t){this.$$set({width:t}),x()}get height(){return this.$$.ctx[1]}set height(t){this.$$set({height:t}),x()}}ce(wt,{clientstyling:{},clientstylingurl:{},duration:{},width:{},height:{}},["default"],[],!0);exports.default=wt;
|
|
@@ -0,0 +1,913 @@
|
|
|
1
|
+
var wt = Object.defineProperty, bt = Object.defineProperties;
|
|
2
|
+
var vt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var nt = Object.getOwnPropertySymbols;
|
|
4
|
+
var xt = Object.prototype.hasOwnProperty, Ct = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var q = (e, t, n) => t in e ? wt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, it = (e, t) => {
|
|
6
|
+
for (var n in t || (t = {}))
|
|
7
|
+
xt.call(t, n) && q(e, n, t[n]);
|
|
8
|
+
if (nt)
|
|
9
|
+
for (var n of nt(t))
|
|
10
|
+
Ct.call(t, n) && q(e, n, t[n]);
|
|
11
|
+
return e;
|
|
12
|
+
}, st = (e, t) => bt(e, vt(t));
|
|
13
|
+
var m = (e, t, n) => q(e, typeof t != "symbol" ? t + "" : t, n);
|
|
14
|
+
var rt = (e, t, n) => new Promise((i, r) => {
|
|
15
|
+
var s = (u) => {
|
|
16
|
+
try {
|
|
17
|
+
o(n.next(u));
|
|
18
|
+
} catch (c) {
|
|
19
|
+
r(c);
|
|
20
|
+
}
|
|
21
|
+
}, l = (u) => {
|
|
22
|
+
try {
|
|
23
|
+
o(n.throw(u));
|
|
24
|
+
} catch (c) {
|
|
25
|
+
r(c);
|
|
26
|
+
}
|
|
27
|
+
}, o = (u) => u.done ? i(u.value) : Promise.resolve(u.value).then(s, l);
|
|
28
|
+
o((n = n.apply(e, t)).next());
|
|
29
|
+
});
|
|
30
|
+
function H() {
|
|
31
|
+
}
|
|
32
|
+
const ht = (e) => e;
|
|
33
|
+
function Et(e, t) {
|
|
34
|
+
for (const n in t) e[n] = t[n];
|
|
35
|
+
return (
|
|
36
|
+
/** @type {T & S} */
|
|
37
|
+
e
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
function $t(e) {
|
|
41
|
+
return e();
|
|
42
|
+
}
|
|
43
|
+
function ot() {
|
|
44
|
+
return /* @__PURE__ */ Object.create(null);
|
|
45
|
+
}
|
|
46
|
+
function j(e) {
|
|
47
|
+
e.forEach($t);
|
|
48
|
+
}
|
|
49
|
+
function Y(e) {
|
|
50
|
+
return typeof e == "function";
|
|
51
|
+
}
|
|
52
|
+
function Mt(e, t) {
|
|
53
|
+
return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
|
|
54
|
+
}
|
|
55
|
+
function kt(e) {
|
|
56
|
+
return Object.keys(e).length === 0;
|
|
57
|
+
}
|
|
58
|
+
function St(e, t, n, i) {
|
|
59
|
+
if (e) {
|
|
60
|
+
const r = _t(e, t, n, i);
|
|
61
|
+
return e[0](r);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function _t(e, t, n, i) {
|
|
65
|
+
return e[1] && i ? Et(n.ctx.slice(), e[1](i(t))) : n.ctx;
|
|
66
|
+
}
|
|
67
|
+
function Lt(e, t, n, i) {
|
|
68
|
+
if (e[2] && i) {
|
|
69
|
+
const r = e[2](i(n));
|
|
70
|
+
if (t.dirty === void 0)
|
|
71
|
+
return r;
|
|
72
|
+
if (typeof r == "object") {
|
|
73
|
+
const s = [], l = Math.max(t.dirty.length, r.length);
|
|
74
|
+
for (let o = 0; o < l; o += 1)
|
|
75
|
+
s[o] = t.dirty[o] | r[o];
|
|
76
|
+
return s;
|
|
77
|
+
}
|
|
78
|
+
return t.dirty | r;
|
|
79
|
+
}
|
|
80
|
+
return t.dirty;
|
|
81
|
+
}
|
|
82
|
+
function jt(e, t, n, i, r, s) {
|
|
83
|
+
if (r) {
|
|
84
|
+
const l = _t(t, n, i, s);
|
|
85
|
+
e.p(l, r);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function Ot(e) {
|
|
89
|
+
if (e.ctx.length > 32) {
|
|
90
|
+
const t = [], n = e.ctx.length / 32;
|
|
91
|
+
for (let i = 0; i < n; i++)
|
|
92
|
+
t[i] = -1;
|
|
93
|
+
return t;
|
|
94
|
+
}
|
|
95
|
+
return -1;
|
|
96
|
+
}
|
|
97
|
+
const gt = typeof window != "undefined";
|
|
98
|
+
let At = gt ? () => window.performance.now() : () => Date.now(), Z = gt ? (e) => requestAnimationFrame(e) : H;
|
|
99
|
+
const k = /* @__PURE__ */ new Set();
|
|
100
|
+
function mt(e) {
|
|
101
|
+
k.forEach((t) => {
|
|
102
|
+
t.c(e) || (k.delete(t), t.f());
|
|
103
|
+
}), k.size !== 0 && Z(mt);
|
|
104
|
+
}
|
|
105
|
+
function Nt(e) {
|
|
106
|
+
let t;
|
|
107
|
+
return k.size === 0 && Z(mt), {
|
|
108
|
+
promise: new Promise((n) => {
|
|
109
|
+
k.add(t = { c: e, f: n });
|
|
110
|
+
}),
|
|
111
|
+
abort() {
|
|
112
|
+
k.delete(t);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function F(e, t) {
|
|
117
|
+
e.appendChild(t);
|
|
118
|
+
}
|
|
119
|
+
function zt(e, t, n) {
|
|
120
|
+
const i = tt(e);
|
|
121
|
+
if (!i.getElementById(t)) {
|
|
122
|
+
const r = C("style");
|
|
123
|
+
r.id = t, r.textContent = n, pt(i, r);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function tt(e) {
|
|
127
|
+
if (!e) return document;
|
|
128
|
+
const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
|
|
129
|
+
return t && /** @type {ShadowRoot} */
|
|
130
|
+
t.host ? (
|
|
131
|
+
/** @type {ShadowRoot} */
|
|
132
|
+
t
|
|
133
|
+
) : e.ownerDocument;
|
|
134
|
+
}
|
|
135
|
+
function Pt(e) {
|
|
136
|
+
const t = C("style");
|
|
137
|
+
return t.textContent = "/* empty */", pt(tt(e), t), t.sheet;
|
|
138
|
+
}
|
|
139
|
+
function pt(e, t) {
|
|
140
|
+
return F(
|
|
141
|
+
/** @type {Document} */
|
|
142
|
+
e.head || e,
|
|
143
|
+
t
|
|
144
|
+
), t.sheet;
|
|
145
|
+
}
|
|
146
|
+
function et(e, t, n) {
|
|
147
|
+
e.insertBefore(t, n || null);
|
|
148
|
+
}
|
|
149
|
+
function O(e) {
|
|
150
|
+
e.parentNode && e.parentNode.removeChild(e);
|
|
151
|
+
}
|
|
152
|
+
function C(e) {
|
|
153
|
+
return document.createElement(e);
|
|
154
|
+
}
|
|
155
|
+
function Wt(e) {
|
|
156
|
+
return document.createTextNode(e);
|
|
157
|
+
}
|
|
158
|
+
function Rt() {
|
|
159
|
+
return Wt("");
|
|
160
|
+
}
|
|
161
|
+
function lt(e, t, n, i) {
|
|
162
|
+
return e.addEventListener(t, n, i), () => e.removeEventListener(t, n, i);
|
|
163
|
+
}
|
|
164
|
+
function b(e, t, n) {
|
|
165
|
+
n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
|
|
166
|
+
}
|
|
167
|
+
function Ht(e) {
|
|
168
|
+
return Array.from(e.childNodes);
|
|
169
|
+
}
|
|
170
|
+
let D;
|
|
171
|
+
function Bt() {
|
|
172
|
+
if (D === void 0) {
|
|
173
|
+
D = !1;
|
|
174
|
+
try {
|
|
175
|
+
typeof window != "undefined" && window.parent && window.parent.document;
|
|
176
|
+
} catch (e) {
|
|
177
|
+
D = !0;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return D;
|
|
181
|
+
}
|
|
182
|
+
function Dt(e, t) {
|
|
183
|
+
getComputedStyle(e).position === "static" && (e.style.position = "relative");
|
|
184
|
+
const i = C("iframe");
|
|
185
|
+
i.setAttribute(
|
|
186
|
+
"style",
|
|
187
|
+
"display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"
|
|
188
|
+
), i.setAttribute("aria-hidden", "true"), i.tabIndex = -1;
|
|
189
|
+
const r = Bt();
|
|
190
|
+
let s;
|
|
191
|
+
return r ? (i.src = "data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>", s = lt(
|
|
192
|
+
window,
|
|
193
|
+
"message",
|
|
194
|
+
/** @param {MessageEvent} event */
|
|
195
|
+
(l) => {
|
|
196
|
+
l.source === i.contentWindow && t();
|
|
197
|
+
}
|
|
198
|
+
)) : (i.src = "about:blank", i.onload = () => {
|
|
199
|
+
s = lt(i.contentWindow, "resize", t), t();
|
|
200
|
+
}), F(e, i), () => {
|
|
201
|
+
(r || s && i.contentWindow) && s(), O(i);
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function Tt(e, t, { bubbles: n = !1, cancelable: i = !1 } = {}) {
|
|
205
|
+
return new CustomEvent(e, { detail: t, bubbles: n, cancelable: i });
|
|
206
|
+
}
|
|
207
|
+
function It(e) {
|
|
208
|
+
const t = {};
|
|
209
|
+
return e.childNodes.forEach(
|
|
210
|
+
/** @param {Element} node */
|
|
211
|
+
(n) => {
|
|
212
|
+
t[n.slot || "default"] = !0;
|
|
213
|
+
}
|
|
214
|
+
), t;
|
|
215
|
+
}
|
|
216
|
+
const U = /* @__PURE__ */ new Map();
|
|
217
|
+
let J = 0;
|
|
218
|
+
function Ft(e) {
|
|
219
|
+
let t = 5381, n = e.length;
|
|
220
|
+
for (; n--; ) t = (t << 5) - t ^ e.charCodeAt(n);
|
|
221
|
+
return t >>> 0;
|
|
222
|
+
}
|
|
223
|
+
function Ut(e, t) {
|
|
224
|
+
const n = { stylesheet: Pt(t), rules: {} };
|
|
225
|
+
return U.set(e, n), n;
|
|
226
|
+
}
|
|
227
|
+
function ct(e, t, n, i, r, s, l, o = 0) {
|
|
228
|
+
const u = 16.666 / i;
|
|
229
|
+
let c = `{
|
|
230
|
+
`;
|
|
231
|
+
for (let $ = 0; $ <= 1; $ += u) {
|
|
232
|
+
const w = t + (n - t) * s($);
|
|
233
|
+
c += $ * 100 + `%{${l(w, 1 - w)}}
|
|
234
|
+
`;
|
|
235
|
+
}
|
|
236
|
+
const h = c + `100% {${l(n, 1 - n)}}
|
|
237
|
+
}`, a = `__svelte_${Ft(h)}_${o}`, _ = tt(e), { stylesheet: p, rules: d } = U.get(_) || Ut(_, e);
|
|
238
|
+
d[a] || (d[a] = !0, p.insertRule(`@keyframes ${a} ${h}`, p.cssRules.length));
|
|
239
|
+
const g = e.style.animation || "";
|
|
240
|
+
return e.style.animation = `${g ? `${g}, ` : ""}${a} ${i}ms linear ${r}ms 1 both`, J += 1, a;
|
|
241
|
+
}
|
|
242
|
+
function Jt(e, t) {
|
|
243
|
+
const n = (e.style.animation || "").split(", "), i = n.filter(
|
|
244
|
+
t ? (s) => s.indexOf(t) < 0 : (s) => s.indexOf("__svelte") === -1
|
|
245
|
+
// remove all Svelte animations
|
|
246
|
+
), r = n.length - i.length;
|
|
247
|
+
r && (e.style.animation = i.join(", "), J -= r, J || Vt());
|
|
248
|
+
}
|
|
249
|
+
function Vt() {
|
|
250
|
+
Z(() => {
|
|
251
|
+
J || (U.forEach((e) => {
|
|
252
|
+
const { ownerNode: t } = e.stylesheet;
|
|
253
|
+
t && O(t);
|
|
254
|
+
}), U.clear());
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
let B;
|
|
258
|
+
function W(e) {
|
|
259
|
+
B = e;
|
|
260
|
+
}
|
|
261
|
+
function qt() {
|
|
262
|
+
if (!B) throw new Error("Function called outside component initialization");
|
|
263
|
+
return B;
|
|
264
|
+
}
|
|
265
|
+
function Gt(e) {
|
|
266
|
+
qt().$$.on_mount.push(e);
|
|
267
|
+
}
|
|
268
|
+
const M = [], V = [];
|
|
269
|
+
let S = [];
|
|
270
|
+
const ut = [], Kt = /* @__PURE__ */ Promise.resolve();
|
|
271
|
+
let Q = !1;
|
|
272
|
+
function Qt() {
|
|
273
|
+
Q || (Q = !0, Kt.then(x));
|
|
274
|
+
}
|
|
275
|
+
function L(e) {
|
|
276
|
+
S.push(e);
|
|
277
|
+
}
|
|
278
|
+
const G = /* @__PURE__ */ new Set();
|
|
279
|
+
let E = 0;
|
|
280
|
+
function x() {
|
|
281
|
+
if (E !== 0)
|
|
282
|
+
return;
|
|
283
|
+
const e = B;
|
|
284
|
+
do {
|
|
285
|
+
try {
|
|
286
|
+
for (; E < M.length; ) {
|
|
287
|
+
const t = M[E];
|
|
288
|
+
E++, W(t), Xt(t.$$);
|
|
289
|
+
}
|
|
290
|
+
} catch (t) {
|
|
291
|
+
throw M.length = 0, E = 0, t;
|
|
292
|
+
}
|
|
293
|
+
for (W(null), M.length = 0, E = 0; V.length; ) V.pop()();
|
|
294
|
+
for (let t = 0; t < S.length; t += 1) {
|
|
295
|
+
const n = S[t];
|
|
296
|
+
G.has(n) || (G.add(n), n());
|
|
297
|
+
}
|
|
298
|
+
S.length = 0;
|
|
299
|
+
} while (M.length);
|
|
300
|
+
for (; ut.length; )
|
|
301
|
+
ut.pop()();
|
|
302
|
+
Q = !1, G.clear(), W(e);
|
|
303
|
+
}
|
|
304
|
+
function Xt(e) {
|
|
305
|
+
if (e.fragment !== null) {
|
|
306
|
+
e.update(), j(e.before_update);
|
|
307
|
+
const t = e.dirty;
|
|
308
|
+
e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(L);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
function Yt(e) {
|
|
312
|
+
const t = [], n = [];
|
|
313
|
+
S.forEach((i) => e.indexOf(i) === -1 ? t.push(i) : n.push(i)), n.forEach((i) => i()), S = t;
|
|
314
|
+
}
|
|
315
|
+
let P;
|
|
316
|
+
function Zt() {
|
|
317
|
+
return P || (P = Promise.resolve(), P.then(() => {
|
|
318
|
+
P = null;
|
|
319
|
+
})), P;
|
|
320
|
+
}
|
|
321
|
+
function K(e, t, n) {
|
|
322
|
+
e.dispatchEvent(Tt(`${t ? "intro" : "outro"}${n}`));
|
|
323
|
+
}
|
|
324
|
+
const T = /* @__PURE__ */ new Set();
|
|
325
|
+
let y;
|
|
326
|
+
function te() {
|
|
327
|
+
y = {
|
|
328
|
+
r: 0,
|
|
329
|
+
c: [],
|
|
330
|
+
p: y
|
|
331
|
+
// parent group
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
function ee() {
|
|
335
|
+
y.r || j(y.c), y = y.p;
|
|
336
|
+
}
|
|
337
|
+
function R(e, t) {
|
|
338
|
+
e && e.i && (T.delete(e), e.i(t));
|
|
339
|
+
}
|
|
340
|
+
function X(e, t, n, i) {
|
|
341
|
+
if (e && e.o) {
|
|
342
|
+
if (T.has(e)) return;
|
|
343
|
+
T.add(e), y.c.push(() => {
|
|
344
|
+
T.delete(e), i && (n && e.d(1), i());
|
|
345
|
+
}), e.o(t);
|
|
346
|
+
} else i && i();
|
|
347
|
+
}
|
|
348
|
+
const ne = { duration: 0 };
|
|
349
|
+
function ft(e, t, n, i) {
|
|
350
|
+
let s = t(e, n, { direction: "both" }), l = i ? 0 : 1, o = null, u = null, c = null, h;
|
|
351
|
+
function a() {
|
|
352
|
+
c && Jt(e, c);
|
|
353
|
+
}
|
|
354
|
+
function _(d, g) {
|
|
355
|
+
const $ = (
|
|
356
|
+
/** @type {Program['d']} */
|
|
357
|
+
d.b - l
|
|
358
|
+
);
|
|
359
|
+
return g *= Math.abs($), {
|
|
360
|
+
a: l,
|
|
361
|
+
b: d.b,
|
|
362
|
+
d: $,
|
|
363
|
+
duration: g,
|
|
364
|
+
start: d.start,
|
|
365
|
+
end: d.start + g,
|
|
366
|
+
group: d.group
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
function p(d) {
|
|
370
|
+
const {
|
|
371
|
+
delay: g = 0,
|
|
372
|
+
duration: $ = 300,
|
|
373
|
+
easing: w = ht,
|
|
374
|
+
tick: A = H,
|
|
375
|
+
css: N
|
|
376
|
+
} = s || ne, f = {
|
|
377
|
+
start: At() + g,
|
|
378
|
+
b: d
|
|
379
|
+
};
|
|
380
|
+
d || (f.group = y, y.r += 1), "inert" in e && (d ? h !== void 0 && (e.inert = h) : (h = /** @type {HTMLElement} */
|
|
381
|
+
e.inert, e.inert = !0)), o || u ? u = f : (N && (a(), c = ct(e, l, d, $, g, w, N)), d && A(0, 1), o = _(f, $), L(() => K(e, d, "start")), Nt((v) => {
|
|
382
|
+
if (u && v > u.start && (o = _(u, $), u = null, K(e, o.b, "start"), N && (a(), c = ct(
|
|
383
|
+
e,
|
|
384
|
+
l,
|
|
385
|
+
o.b,
|
|
386
|
+
o.duration,
|
|
387
|
+
0,
|
|
388
|
+
w,
|
|
389
|
+
s.css
|
|
390
|
+
))), o) {
|
|
391
|
+
if (v >= o.end)
|
|
392
|
+
A(l = o.b, 1 - l), K(e, o.b, "end"), u || (o.b ? a() : --o.group.r || j(o.group.c)), o = null;
|
|
393
|
+
else if (v >= o.start) {
|
|
394
|
+
const z = v - o.start;
|
|
395
|
+
l = o.a + o.d * w(z / o.duration), A(l, 1 - l);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
return !!(o || u);
|
|
399
|
+
}));
|
|
400
|
+
}
|
|
401
|
+
return {
|
|
402
|
+
run(d) {
|
|
403
|
+
Y(s) ? Zt().then(() => {
|
|
404
|
+
s = s({ direction: d ? "in" : "out" }), p(d);
|
|
405
|
+
}) : p(d);
|
|
406
|
+
},
|
|
407
|
+
end() {
|
|
408
|
+
a(), o = u = null;
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
function ie(e, t, n) {
|
|
413
|
+
const { fragment: i, after_update: r } = e.$$;
|
|
414
|
+
i && i.m(t, n), L(() => {
|
|
415
|
+
const s = e.$$.on_mount.map($t).filter(Y);
|
|
416
|
+
e.$$.on_destroy ? e.$$.on_destroy.push(...s) : j(s), e.$$.on_mount = [];
|
|
417
|
+
}), r.forEach(L);
|
|
418
|
+
}
|
|
419
|
+
function se(e, t) {
|
|
420
|
+
const n = e.$$;
|
|
421
|
+
n.fragment !== null && (Yt(n.after_update), j(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
|
|
422
|
+
}
|
|
423
|
+
function re(e, t) {
|
|
424
|
+
e.$$.dirty[0] === -1 && (M.push(e), Qt(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
|
|
425
|
+
}
|
|
426
|
+
function oe(e, t, n, i, r, s, l = null, o = [-1]) {
|
|
427
|
+
const u = B;
|
|
428
|
+
W(e);
|
|
429
|
+
const c = e.$$ = {
|
|
430
|
+
fragment: null,
|
|
431
|
+
ctx: [],
|
|
432
|
+
// state
|
|
433
|
+
props: s,
|
|
434
|
+
update: H,
|
|
435
|
+
not_equal: r,
|
|
436
|
+
bound: ot(),
|
|
437
|
+
// lifecycle
|
|
438
|
+
on_mount: [],
|
|
439
|
+
on_destroy: [],
|
|
440
|
+
on_disconnect: [],
|
|
441
|
+
before_update: [],
|
|
442
|
+
after_update: [],
|
|
443
|
+
context: new Map(t.context || (u ? u.$$.context : [])),
|
|
444
|
+
// everything else
|
|
445
|
+
callbacks: ot(),
|
|
446
|
+
dirty: o,
|
|
447
|
+
skip_bound: !1,
|
|
448
|
+
root: t.target || u.$$.root
|
|
449
|
+
};
|
|
450
|
+
l && l(c.root);
|
|
451
|
+
let h = !1;
|
|
452
|
+
if (c.ctx = n ? n(e, t.props || {}, (a, _, ...p) => {
|
|
453
|
+
const d = p.length ? p[0] : _;
|
|
454
|
+
return c.ctx && r(c.ctx[a], c.ctx[a] = d) && (!c.skip_bound && c.bound[a] && c.bound[a](d), h && re(e, a)), _;
|
|
455
|
+
}) : [], c.update(), h = !0, j(c.before_update), c.fragment = i ? i(c.ctx) : !1, t.target) {
|
|
456
|
+
if (t.hydrate) {
|
|
457
|
+
const a = Ht(t.target);
|
|
458
|
+
c.fragment && c.fragment.l(a), a.forEach(O);
|
|
459
|
+
} else
|
|
460
|
+
c.fragment && c.fragment.c();
|
|
461
|
+
t.intro && R(e.$$.fragment), ie(e, t.target, t.anchor), x();
|
|
462
|
+
}
|
|
463
|
+
W(u);
|
|
464
|
+
}
|
|
465
|
+
let yt;
|
|
466
|
+
typeof HTMLElement == "function" && (yt = class extends HTMLElement {
|
|
467
|
+
constructor(t, n, i) {
|
|
468
|
+
super();
|
|
469
|
+
/** The Svelte component constructor */
|
|
470
|
+
m(this, "$$ctor");
|
|
471
|
+
/** Slots */
|
|
472
|
+
m(this, "$$s");
|
|
473
|
+
/** The Svelte component instance */
|
|
474
|
+
m(this, "$$c");
|
|
475
|
+
/** Whether or not the custom element is connected */
|
|
476
|
+
m(this, "$$cn", !1);
|
|
477
|
+
/** Component props data */
|
|
478
|
+
m(this, "$$d", {});
|
|
479
|
+
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
480
|
+
m(this, "$$r", !1);
|
|
481
|
+
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
482
|
+
m(this, "$$p_d", {});
|
|
483
|
+
/** @type {Record<string, Function[]>} Event listeners */
|
|
484
|
+
m(this, "$$l", {});
|
|
485
|
+
/** @type {Map<Function, Function>} Event listener unsubscribe functions */
|
|
486
|
+
m(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
487
|
+
this.$$ctor = t, this.$$s = n, i && this.attachShadow({ mode: "open" });
|
|
488
|
+
}
|
|
489
|
+
addEventListener(t, n, i) {
|
|
490
|
+
if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
|
|
491
|
+
const r = this.$$c.$on(t, n);
|
|
492
|
+
this.$$l_u.set(n, r);
|
|
493
|
+
}
|
|
494
|
+
super.addEventListener(t, n, i);
|
|
495
|
+
}
|
|
496
|
+
removeEventListener(t, n, i) {
|
|
497
|
+
if (super.removeEventListener(t, n, i), this.$$c) {
|
|
498
|
+
const r = this.$$l_u.get(n);
|
|
499
|
+
r && (r(), this.$$l_u.delete(n));
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
connectedCallback() {
|
|
503
|
+
return rt(this, null, function* () {
|
|
504
|
+
if (this.$$cn = !0, !this.$$c) {
|
|
505
|
+
let t = function(s) {
|
|
506
|
+
return () => {
|
|
507
|
+
let l;
|
|
508
|
+
return {
|
|
509
|
+
c: function() {
|
|
510
|
+
l = C("slot"), s !== "default" && b(l, "name", s);
|
|
511
|
+
},
|
|
512
|
+
/**
|
|
513
|
+
* @param {HTMLElement} target
|
|
514
|
+
* @param {HTMLElement} [anchor]
|
|
515
|
+
*/
|
|
516
|
+
m: function(c, h) {
|
|
517
|
+
et(c, l, h);
|
|
518
|
+
},
|
|
519
|
+
d: function(c) {
|
|
520
|
+
c && O(l);
|
|
521
|
+
}
|
|
522
|
+
};
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
if (yield Promise.resolve(), !this.$$cn || this.$$c)
|
|
526
|
+
return;
|
|
527
|
+
const n = {}, i = It(this);
|
|
528
|
+
for (const s of this.$$s)
|
|
529
|
+
s in i && (n[s] = [t(s)]);
|
|
530
|
+
for (const s of this.attributes) {
|
|
531
|
+
const l = this.$$g_p(s.name);
|
|
532
|
+
l in this.$$d || (this.$$d[l] = I(l, s.value, this.$$p_d, "toProp"));
|
|
533
|
+
}
|
|
534
|
+
for (const s in this.$$p_d)
|
|
535
|
+
!(s in this.$$d) && this[s] !== void 0 && (this.$$d[s] = this[s], delete this[s]);
|
|
536
|
+
this.$$c = new this.$$ctor({
|
|
537
|
+
target: this.shadowRoot || this,
|
|
538
|
+
props: st(it({}, this.$$d), {
|
|
539
|
+
$$slots: n,
|
|
540
|
+
$$scope: {
|
|
541
|
+
ctx: []
|
|
542
|
+
}
|
|
543
|
+
})
|
|
544
|
+
});
|
|
545
|
+
const r = () => {
|
|
546
|
+
this.$$r = !0;
|
|
547
|
+
for (const s in this.$$p_d)
|
|
548
|
+
if (this.$$d[s] = this.$$c.$$.ctx[this.$$c.$$.props[s]], this.$$p_d[s].reflect) {
|
|
549
|
+
const l = I(
|
|
550
|
+
s,
|
|
551
|
+
this.$$d[s],
|
|
552
|
+
this.$$p_d,
|
|
553
|
+
"toAttribute"
|
|
554
|
+
);
|
|
555
|
+
l == null ? this.removeAttribute(this.$$p_d[s].attribute || s) : this.setAttribute(this.$$p_d[s].attribute || s, l);
|
|
556
|
+
}
|
|
557
|
+
this.$$r = !1;
|
|
558
|
+
};
|
|
559
|
+
this.$$c.$$.after_update.push(r), r();
|
|
560
|
+
for (const s in this.$$l)
|
|
561
|
+
for (const l of this.$$l[s]) {
|
|
562
|
+
const o = this.$$c.$on(s, l);
|
|
563
|
+
this.$$l_u.set(l, o);
|
|
564
|
+
}
|
|
565
|
+
this.$$l = {};
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
|
|
570
|
+
// and setting attributes through setAttribute etc, this is helpful
|
|
571
|
+
attributeChangedCallback(t, n, i) {
|
|
572
|
+
var r;
|
|
573
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = I(t, i, this.$$p_d, "toProp"), (r = this.$$c) == null || r.$set({ [t]: this.$$d[t] }));
|
|
574
|
+
}
|
|
575
|
+
disconnectedCallback() {
|
|
576
|
+
this.$$cn = !1, Promise.resolve().then(() => {
|
|
577
|
+
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
$$g_p(t) {
|
|
581
|
+
return Object.keys(this.$$p_d).find(
|
|
582
|
+
(n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
|
|
583
|
+
) || t;
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
function I(e, t, n, i) {
|
|
587
|
+
var s;
|
|
588
|
+
const r = (s = n[e]) == null ? void 0 : s.type;
|
|
589
|
+
if (t = r === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !n[e])
|
|
590
|
+
return t;
|
|
591
|
+
if (i === "toAttribute")
|
|
592
|
+
switch (r) {
|
|
593
|
+
case "Object":
|
|
594
|
+
case "Array":
|
|
595
|
+
return t == null ? null : JSON.stringify(t);
|
|
596
|
+
case "Boolean":
|
|
597
|
+
return t ? "" : null;
|
|
598
|
+
case "Number":
|
|
599
|
+
return t == null ? null : t;
|
|
600
|
+
default:
|
|
601
|
+
return t;
|
|
602
|
+
}
|
|
603
|
+
else
|
|
604
|
+
switch (r) {
|
|
605
|
+
case "Object":
|
|
606
|
+
case "Array":
|
|
607
|
+
return t && JSON.parse(t);
|
|
608
|
+
case "Boolean":
|
|
609
|
+
return t;
|
|
610
|
+
case "Number":
|
|
611
|
+
return t != null ? +t : t;
|
|
612
|
+
default:
|
|
613
|
+
return t;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
function le(e, t, n, i, r, s) {
|
|
617
|
+
let l = class extends yt {
|
|
618
|
+
constructor() {
|
|
619
|
+
super(e, n, r), this.$$p_d = t;
|
|
620
|
+
}
|
|
621
|
+
static get observedAttributes() {
|
|
622
|
+
return Object.keys(t).map(
|
|
623
|
+
(o) => (t[o].attribute || o).toLowerCase()
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
};
|
|
627
|
+
return Object.keys(t).forEach((o) => {
|
|
628
|
+
Object.defineProperty(l.prototype, o, {
|
|
629
|
+
get() {
|
|
630
|
+
return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
|
|
631
|
+
},
|
|
632
|
+
set(u) {
|
|
633
|
+
var c;
|
|
634
|
+
u = I(o, u, t), this.$$d[o] = u, (c = this.$$c) == null || c.$set({ [o]: u });
|
|
635
|
+
}
|
|
636
|
+
});
|
|
637
|
+
}), i.forEach((o) => {
|
|
638
|
+
Object.defineProperty(l.prototype, o, {
|
|
639
|
+
get() {
|
|
640
|
+
var u;
|
|
641
|
+
return (u = this.$$c) == null ? void 0 : u[o];
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
}), e.element = /** @type {any} */
|
|
645
|
+
l, l;
|
|
646
|
+
}
|
|
647
|
+
class ce {
|
|
648
|
+
constructor() {
|
|
649
|
+
/**
|
|
650
|
+
* ### PRIVATE API
|
|
651
|
+
*
|
|
652
|
+
* Do not use, may change at any time
|
|
653
|
+
*
|
|
654
|
+
* @type {any}
|
|
655
|
+
*/
|
|
656
|
+
m(this, "$$");
|
|
657
|
+
/**
|
|
658
|
+
* ### PRIVATE API
|
|
659
|
+
*
|
|
660
|
+
* Do not use, may change at any time
|
|
661
|
+
*
|
|
662
|
+
* @type {any}
|
|
663
|
+
*/
|
|
664
|
+
m(this, "$$set");
|
|
665
|
+
}
|
|
666
|
+
/** @returns {void} */
|
|
667
|
+
$destroy() {
|
|
668
|
+
se(this, 1), this.$destroy = H;
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* @template {Extract<keyof Events, string>} K
|
|
672
|
+
* @param {K} type
|
|
673
|
+
* @param {((e: Events[K]) => void) | null | undefined} callback
|
|
674
|
+
* @returns {() => void}
|
|
675
|
+
*/
|
|
676
|
+
$on(t, n) {
|
|
677
|
+
if (!Y(n))
|
|
678
|
+
return H;
|
|
679
|
+
const i = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
|
|
680
|
+
return i.push(n), () => {
|
|
681
|
+
const r = i.indexOf(n);
|
|
682
|
+
r !== -1 && i.splice(r, 1);
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* @param {Partial<Props>} props
|
|
687
|
+
* @returns {void}
|
|
688
|
+
*/
|
|
689
|
+
$set(t) {
|
|
690
|
+
this.$$set && !kt(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
const ue = "4";
|
|
694
|
+
typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(ue);
|
|
695
|
+
function at(e, { delay: t = 0, duration: n = 400, easing: i = ht } = {}) {
|
|
696
|
+
const r = +getComputedStyle(e).opacity;
|
|
697
|
+
return {
|
|
698
|
+
delay: t,
|
|
699
|
+
duration: n,
|
|
700
|
+
easing: i,
|
|
701
|
+
css: (s) => `opacity: ${s * r}`
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
function fe(e) {
|
|
705
|
+
zt(e, "svelte-u2fcen", ".svelte-u2fcen.svelte-u2fcen,.svelte-u2fcen.svelte-u2fcen::before,.svelte-u2fcen.svelte-u2fcen::after{margin:0;padding:0;box-sizing:border-box}.ModalWindow.svelte-u2fcen.svelte-u2fcen{display:flex;position:fixed;align-items:center;justify-content:center;width:100%;height:100%;z-index:100;top:0;left:0;background-color:var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));container-type:inline-size;container-name:modal-window;border-radius:6px}.ModalWindow.svelte-u2fcen .ModalContainer.svelte-u2fcen{background:var(--emw--color-white, #fff);border-radius:var(--emw--border-radius-medium, 4px);padding:var(--emw--spacing-large, 20px);width:40%}@container modal-window (max-width:750px){.ModalWindow.svelte-u2fcen .ModalContainer.svelte-u2fcen{width:90%}}");
|
|
706
|
+
}
|
|
707
|
+
function dt(e) {
|
|
708
|
+
let t, n, i, r, s, l;
|
|
709
|
+
const o = (
|
|
710
|
+
/*#slots*/
|
|
711
|
+
e[9].default
|
|
712
|
+
), u = St(
|
|
713
|
+
o,
|
|
714
|
+
e,
|
|
715
|
+
/*$$scope*/
|
|
716
|
+
e[8],
|
|
717
|
+
null
|
|
718
|
+
);
|
|
719
|
+
return {
|
|
720
|
+
c() {
|
|
721
|
+
t = C("div"), n = C("div"), i = C("div"), u && u.c(), b(i, "class", "ModalContainer svelte-u2fcen"), b(i, "part", "ModalContainer"), b(n, "class", "ModalWindow svelte-u2fcen"), b(n, "part", "ModalWindow"), b(n, "id", "Modal"), L(() => (
|
|
722
|
+
/*div1_elementresize_handler*/
|
|
723
|
+
e[11].call(n)
|
|
724
|
+
)), b(t, "part", "CustomStylingContainer"), b(t, "class", "svelte-u2fcen");
|
|
725
|
+
},
|
|
726
|
+
m(c, h) {
|
|
727
|
+
et(c, t, h), F(t, n), F(n, i), u && u.m(i, null), e[10](n), r = Dt(
|
|
728
|
+
n,
|
|
729
|
+
/*div1_elementresize_handler*/
|
|
730
|
+
e[11].bind(n)
|
|
731
|
+
), e[12](t), l = !0;
|
|
732
|
+
},
|
|
733
|
+
p(c, h) {
|
|
734
|
+
e = c, u && u.p && (!l || h & /*$$scope*/
|
|
735
|
+
256) && jt(
|
|
736
|
+
u,
|
|
737
|
+
o,
|
|
738
|
+
e,
|
|
739
|
+
/*$$scope*/
|
|
740
|
+
e[8],
|
|
741
|
+
l ? Lt(
|
|
742
|
+
o,
|
|
743
|
+
/*$$scope*/
|
|
744
|
+
e[8],
|
|
745
|
+
h,
|
|
746
|
+
null
|
|
747
|
+
) : Ot(
|
|
748
|
+
/*$$scope*/
|
|
749
|
+
e[8]
|
|
750
|
+
),
|
|
751
|
+
null
|
|
752
|
+
);
|
|
753
|
+
},
|
|
754
|
+
i(c) {
|
|
755
|
+
l || (R(u, c), c && L(() => {
|
|
756
|
+
l && (s || (s = ft(n, at, { transitionDuration: (
|
|
757
|
+
/*duration*/
|
|
758
|
+
e[2]
|
|
759
|
+
) }, !0)), s.run(1));
|
|
760
|
+
}), l = !0);
|
|
761
|
+
},
|
|
762
|
+
o(c) {
|
|
763
|
+
X(u, c), c && (s || (s = ft(n, at, { transitionDuration: (
|
|
764
|
+
/*duration*/
|
|
765
|
+
e[2]
|
|
766
|
+
) }, !1)), s.run(0)), l = !1;
|
|
767
|
+
},
|
|
768
|
+
d(c) {
|
|
769
|
+
c && O(t), u && u.d(c), e[10](null), r(), c && s && s.end(), e[12](null);
|
|
770
|
+
}
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
function ae(e) {
|
|
774
|
+
let t, n, i = (
|
|
775
|
+
/*show*/
|
|
776
|
+
e[5] && dt(e)
|
|
777
|
+
);
|
|
778
|
+
return {
|
|
779
|
+
c() {
|
|
780
|
+
i && i.c(), t = Rt();
|
|
781
|
+
},
|
|
782
|
+
m(r, s) {
|
|
783
|
+
i && i.m(r, s), et(r, t, s), n = !0;
|
|
784
|
+
},
|
|
785
|
+
p(r, [s]) {
|
|
786
|
+
/*show*/
|
|
787
|
+
r[5] ? i ? (i.p(r, s), s & /*show*/
|
|
788
|
+
32 && R(i, 1)) : (i = dt(r), i.c(), R(i, 1), i.m(t.parentNode, t)) : i && (te(), X(i, 1, 1, () => {
|
|
789
|
+
i = null;
|
|
790
|
+
}), ee());
|
|
791
|
+
},
|
|
792
|
+
i(r) {
|
|
793
|
+
n || (R(i), n = !0);
|
|
794
|
+
},
|
|
795
|
+
o(r) {
|
|
796
|
+
X(i), n = !1;
|
|
797
|
+
},
|
|
798
|
+
d(r) {
|
|
799
|
+
r && O(t), i && i.d(r);
|
|
800
|
+
}
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
function de(e, t, n) {
|
|
804
|
+
let { $$slots: i = {}, $$scope: r } = t, { clientstyling: s = "" } = t, { clientstylingurl: l = "" } = t, { duration: o = "5ms" } = t, { width: u } = t, { height: c } = t, h, a, _ = !1;
|
|
805
|
+
const p = () => {
|
|
806
|
+
n(5, _ = !1), window.postMessage({ type: "ClosedCashierModal" }, window.location.href), window.postMessage({ type: "EnableScroll" }, window.location.href);
|
|
807
|
+
}, d = (f) => {
|
|
808
|
+
f.data.type == "ShowCashierModal" && (n(5, _ = !0), window.postMessage({ type: "DisableScroll" }, window.location.href)), f.data.type == "HideCashierModal" && p();
|
|
809
|
+
}, g = () => {
|
|
810
|
+
let f = document.createElement("style");
|
|
811
|
+
f.innerHTML = s, a.appendChild(f);
|
|
812
|
+
}, $ = () => {
|
|
813
|
+
let f = new URL(l), v = document.createElement("style");
|
|
814
|
+
fetch(f.href).then((z) => z.text()).then((z) => {
|
|
815
|
+
v.innerHTML = z, setTimeout(
|
|
816
|
+
() => {
|
|
817
|
+
a.appendChild(v);
|
|
818
|
+
},
|
|
819
|
+
1
|
|
820
|
+
);
|
|
821
|
+
});
|
|
822
|
+
};
|
|
823
|
+
Gt(() => (window.addEventListener("message", d, !1), () => {
|
|
824
|
+
window.removeEventListener("message", d);
|
|
825
|
+
}));
|
|
826
|
+
function w(f) {
|
|
827
|
+
V[f ? "unshift" : "push"](() => {
|
|
828
|
+
h = f, n(4, h);
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
function A() {
|
|
832
|
+
u = this.clientWidth, c = this.clientHeight, n(0, u), n(1, c);
|
|
833
|
+
}
|
|
834
|
+
function N(f) {
|
|
835
|
+
V[f ? "unshift" : "push"](() => {
|
|
836
|
+
a = f, n(3, a);
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
return e.$$set = (f) => {
|
|
840
|
+
"clientstyling" in f && n(6, s = f.clientstyling), "clientstylingurl" in f && n(7, l = f.clientstylingurl), "duration" in f && n(2, o = f.duration), "width" in f && n(0, u = f.width), "height" in f && n(1, c = f.height), "$$scope" in f && n(8, r = f.$$scope);
|
|
841
|
+
}, e.$$.update = () => {
|
|
842
|
+
e.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
843
|
+
72 && s && a && g(), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
|
|
844
|
+
136 && l && a && $();
|
|
845
|
+
}, [
|
|
846
|
+
u,
|
|
847
|
+
c,
|
|
848
|
+
o,
|
|
849
|
+
a,
|
|
850
|
+
h,
|
|
851
|
+
_,
|
|
852
|
+
s,
|
|
853
|
+
l,
|
|
854
|
+
r,
|
|
855
|
+
i,
|
|
856
|
+
w,
|
|
857
|
+
A,
|
|
858
|
+
N
|
|
859
|
+
];
|
|
860
|
+
}
|
|
861
|
+
class he extends ce {
|
|
862
|
+
constructor(t) {
|
|
863
|
+
super(), oe(
|
|
864
|
+
this,
|
|
865
|
+
t,
|
|
866
|
+
de,
|
|
867
|
+
ae,
|
|
868
|
+
Mt,
|
|
869
|
+
{
|
|
870
|
+
clientstyling: 6,
|
|
871
|
+
clientstylingurl: 7,
|
|
872
|
+
duration: 2,
|
|
873
|
+
width: 0,
|
|
874
|
+
height: 1
|
|
875
|
+
},
|
|
876
|
+
fe
|
|
877
|
+
);
|
|
878
|
+
}
|
|
879
|
+
get clientstyling() {
|
|
880
|
+
return this.$$.ctx[6];
|
|
881
|
+
}
|
|
882
|
+
set clientstyling(t) {
|
|
883
|
+
this.$$set({ clientstyling: t }), x();
|
|
884
|
+
}
|
|
885
|
+
get clientstylingurl() {
|
|
886
|
+
return this.$$.ctx[7];
|
|
887
|
+
}
|
|
888
|
+
set clientstylingurl(t) {
|
|
889
|
+
this.$$set({ clientstylingurl: t }), x();
|
|
890
|
+
}
|
|
891
|
+
get duration() {
|
|
892
|
+
return this.$$.ctx[2];
|
|
893
|
+
}
|
|
894
|
+
set duration(t) {
|
|
895
|
+
this.$$set({ duration: t }), x();
|
|
896
|
+
}
|
|
897
|
+
get width() {
|
|
898
|
+
return this.$$.ctx[0];
|
|
899
|
+
}
|
|
900
|
+
set width(t) {
|
|
901
|
+
this.$$set({ width: t }), x();
|
|
902
|
+
}
|
|
903
|
+
get height() {
|
|
904
|
+
return this.$$.ctx[1];
|
|
905
|
+
}
|
|
906
|
+
set height(t) {
|
|
907
|
+
this.$$set({ height: t }), x();
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
le(he, { clientstyling: {}, clientstylingurl: {}, duration: {}, width: {}, height: {} }, ["default"], [], !0);
|
|
911
|
+
export {
|
|
912
|
+
he as default
|
|
913
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/cashier-modal",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.71",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "es2015/cashier-modal.cjs",
|
|
6
6
|
"module": "es2015/cashier-modal.js",
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
},
|
|
12
12
|
"./es2015/cashier-modal.cjs": "./es2015/cashier-modal.cjs"
|
|
13
13
|
},
|
|
14
|
-
|
|
15
|
-
"es2015/"
|
|
14
|
+
"files": [
|
|
15
|
+
"es2015/",
|
|
16
|
+
"components"
|
|
16
17
|
],
|
|
17
18
|
"publishConfig": {
|
|
18
19
|
"access": "public"
|