@everymatrix/casino-engagement-suite-modal 1.53.0 → 1.53.11
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/casino-engagement-suite-modal/casino-engagement-suite-modal.esm.js +1 -1
- package/dist/casino-engagement-suite-modal/p-11b001d7.entry.js +1 -0
- package/dist/casino-engagement-suite-modal/p-5167801a.js +2 -0
- package/dist/cjs/casino-engagement-suite-modal.cjs.entry.js +15 -11
- package/dist/cjs/casino-engagement-suite-modal.cjs.js +2 -2
- package/dist/cjs/{index-d9714a37.js → index-35000938.js} +160 -65
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/casino-engagement-suite-modal/casino-engagement-suite-modal.js +32 -10
- package/dist/esm/casino-engagement-suite-modal.entry.js +15 -11
- package/dist/esm/casino-engagement-suite-modal.js +3 -3
- package/dist/esm/{index-9117fdce.js → index-49250fb9.js} +160 -65
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-modal/.stencil/packages/stencil/casino-engagement-suite-modal/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-modal/.stencil/packages/stencil/casino-engagement-suite-modal/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/casino-engagement-suite-modal/p-5790ada5.js +0 -2
- package/dist/casino-engagement-suite-modal/p-d9bda8ef.entry.js +0 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-modal/.stencil/packages/stencil/casino-engagement-suite-modal/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-modal/.stencil/packages/stencil/casino-engagement-suite-modal/stencil.config.dev.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as n,b as i}from"./p-
|
|
1
|
+
import{p as n,b as i}from"./p-5167801a.js";export{s as setNonce}from"./p-5167801a.js";import{g as t}from"./p-e1255160.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),n(t)})().then((async n=>(await t(),i([["p-11b001d7",[[1,"casino-engagement-suite-modal",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],isOpen:[4,"is-open"],isLoading:[1028,"is-loading"],header:[1],contentIcon:[1,"content-icon"],modalType:[1,"modal-type"],device:[1],showAnimation:[4,"show-animation"],limitStylingAppends:[32]}]]]],n))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as o,h as a,g as t}from"./p-5167801a.js";const i=class{constructor(a){e(this,a),this.closeModal=o(this,"closeModal",7),this.clientStyling="",this.clientStylingUrl="",this.device="Mobile",this.showAnimation=!1,this.limitStylingAppends=!1,this.handleCloseClick=()=>{this.isLoading||this.closeModal.emit(this.modalType)},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),o=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{o.innerHTML=e,setTimeout((()=>{this.host.prepend(o)}),1)})).catch((e=>{console.log("Error ",e)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return a("div",{key:"570a2289e990efeae5cceac8bc2152cbb9bb5221",class:`ModalOverlay ${this.isOpen&&"Open"} ${this.device} ${this.showAnimation&&"ShowAnimation"}`},a("div",{key:"9d40898f29b5a539907a7e50f3fdee02636aced6",class:"ModalWinAnimation"}),a("div",{key:"724ffe5cd946b40aa12f99ac926a6c832c1633da",class:"ModalContent GradientBorder"},a("div",{key:"14bb1463ba0b5e9cdb545a81c13873a3e124f4c3",class:"IconCloseContainer"},a("button",{key:"1640c3c0881c65199a26f3f2217610189d626f91",class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick})),this.contentIcon?a("div",{class:"ModalIcon",style:{background:`url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`}}):null,a("div",{key:"c49ddc1152bb9c8af76ff11874816da8477ba821",class:"ModalHeader"},a("h1",{key:"08352f25028b0b08c2c1a77b91ea80cc968aa4e1"},this.header)),a("div",{key:"3420427d531aceb3861c1876394443ad664ff68b",class:"ModalBodyWrapper"},a("div",{key:"3e453586b727029f5fca9688b376d4b3e8298dbf",class:"ModalBody"},a("slot",{key:"0d82c3fa9b0faa9012005ccca85350313a684326",name:"body"})),a("div",{key:"9e7a078e4c912869f2e3573a533bb3cf82454a4c",class:"ModalFooter"},a("slot",{key:"df8e0568aeca79889cf8eb8f7fb33caf685b092e",name:"footer"})))))}get host(){return t(this)}};i.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:24px;height:24px}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center;z-index:1}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalBodyWrapper{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.ModalBodyWrapper::-webkit-scrollbar{width:3px;background:none}.ModalBodyWrapper::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background-color:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius:var(--emw--border-radius-large, 8px);width:450px;max-width:100%;text-align:center;max-height:90dvh}.GradientBorder::before{content:"";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:var(--emw--border-radius-large, 9px);background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large-plus, 24px);padding:0 16px;margin-bottom:16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin:12px 0}.ModalBody{font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-secondary, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .EngagementSuiteIconButton{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:var(--emw--font-size-small, 14px)}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:var(--emw--font-size-large, 20px);padding:0 60px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}';export{i as casino_engagement_suite_modal}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),o=(e,n)=>{t.set(n.t=e,n)},l=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],y=[],v=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.o?w($):f.raf($))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},$=()=>{b(m),b(y),(p=m.length>0)&&f.raf($)},w=e=>h().then(e),g=v(y,!0),S=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>k,map:()=>E,ok:()=>O,unwrap:()=>M,unwrapErr:()=>x});var O=e=>({isOk:!0,isErr:!1,value:e}),k=e=>({isOk:!1,isErr:!0,value:e});function E(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return k(e.value);throw"should never get here"}var C,M=e=>{if(e.isOk)return e.value;throw e.value},x=e=>{if(e.isErr)return e.value;throw e.value},P=(e,t,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof e&&!S(o))&&(o+=""),s&&i?r[r.length-1].i+=o:r.push(s?A(null,o):o),i=s)};if(c(n),t){t.key&&(l=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=A(e,null);return u.u=t,r.length>0&&(u.h=r),u.p=l,u},A=(e,t)=>({o:0,m:e,i:t,v:null,h:null,u:null,p:null}),R={},D=(e,t)=>null==e||S(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e,H=e=>n(e).$hostElement$,N=(e,t,n)=>{const o=H(e);return{emit:e=>T(o,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},T=(e,t,n)=>{const o=f.ce(t,n);return e.dispatchEvent(o),o},U=new WeakMap,F=e=>"sc-"+e.$,L=(e,t,n,o,s,i)=>{if(n!==o){let r=l(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,l=W(n);let s=W(o);t.remove(...l.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!l.includes(e))))}else if("style"===t){for(const t in n)o&&null!=o[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in o)n&&o[t]===n[t]||(t.includes("-")?e.style.setProperty(t,o[t]):e.style[t]=o[t])}else if("key"===t);else if(r||"o"!==t[0]||"n"!==t[1]){const l=S(o);if((r||l&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[t]!==o&&(e[t]=o);else{const l=null==o?"":o;"list"===t?r=!1:null!=n&&e[t]==l||("function"==typeof e.__lookupSetter__(t)?e[t]=l:e.setAttribute(t,l))}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!l&&e.setAttribute(t,o=!0===o?"":o)}else if(t="-"===t[2]?t.slice(3):l(u,c)?c.slice(2):c[2]+t.slice(3),n||o){const l=t.endsWith(q);t=t.replace(G,""),n&&f.rel(e,t,n,l),o&&f.ael(e,t,o,l)}}},V=/\s/,W=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(V):[]),q="Capture",G=RegExp(q+"$"),_=(e,t,n)=>{const o=11===t.v.nodeType&&t.v.host?t.v.host:t.v,l=e&&e.u||{},s=t.u||{};for(const e of z(Object.keys(l)))e in s||L(o,e,l[e],void 0,n,t.o);for(const e of z(Object.keys(s)))L(o,e,l[e],s[e],n,t.o)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,I=!1,J=(e,t,n)=>{const o=t.h[n];let l,s,i=0;if(null!==o.i)l=o.v=a.createTextNode(o.i);else if(l=o.v=a.createElement(o.m),_(null,o,I),o.h)for(i=0;i<o.h.length;++i)s=J(e,o,i),s&&l.appendChild(s);return l["s-hn"]=C,l},K=(e,t,n,o,l,s)=>{let i,r=e;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=J(null,n,l),i&&(o[l].v=i,Z(r,i,t)))},Q=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.v;e&&e.remove()}}},X=(e,t,n=!1)=>e.m===t.m&&(n?(n&&!e.p&&t.p&&(e.p=t.p),!0):e.p===t.p),Y=(e,t,n=!1)=>{const o=t.v=e.v,l=e.h,s=t.h,i=t.i;null===i?(("slot"!==t.m||B)&&_(e,t,I),null!==l&&null!==s?((e,t,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=o.length-1,m=o[0],y=o[p];for(;r<=f&&c<=p;)if(null==h)h=t[++r];else if(null==d)d=t[--f];else if(null==m)m=o[++c];else if(null==y)y=o[--p];else if(X(h,m,l))Y(h,m,l),h=t[++r],m=o[++c];else if(X(d,y,l))Y(d,y,l),d=t[--f],y=o[--p];else if(X(h,y,l))Y(h,y,l),Z(e,h.v,d.v.nextSibling),h=t[++r],y=o[--p];else if(X(d,m,l))Y(d,m,l),Z(e,d.v,h.v),d=t[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(i=t[u],i.m!==m.m?s=J(t&&t[c],n,u):(Y(i,m,l),t[u]=void 0,s=i.v),m=o[++c]):(s=J(t&&t[c],n,c),m=o[++c]),s&&Z(h.v.parentNode,s,h.v)}r>f?K(e,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&Q(t,r,f)})(o,l,t,s,n):null!==s?(null!==e.i&&(o.textContent=""),K(o,null,t,s,0,s.length-1)):!n&&null!==l&&Q(l,0,l.length-1)):e.i!==i&&(o.data=i)},Z=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),ee=(e,t)=>{if(t&&!e.S&&t["s-p"]){const n=t["s-p"].push(new Promise((o=>e.S=()=>{t["s-p"].splice(n-1,1),o()})))}},te=(e,t)=>{if(e.o|=16,!(4&e.o))return ee(e,e.j),g((()=>ne(e,t)));e.o|=512},ne=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);return oe(void 0,(()=>se(e,n,t)))},oe=(e,t)=>le(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),le=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,se=async(e,t,n)=>{var o;const l=e.$hostElement$,s=l["s-rc"];n&&(e=>{const t=e.O,n=e.$hostElement$,o=t.o,l=((e,t)=>{var n;const o=F(t),l=r.get(o);if(e=11===e.nodeType?e:a,l)if("string"==typeof l){let s,i=U.get(e=e.head||e);if(i||U.set(e,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||a.createElement("style"),s.innerHTML=l;const i=null!=(n=f.k)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&t.o))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,(null==n?void 0:n.parentNode)===e?n:null)}else if("host"in e)if(d){const t=new CSSStyleSheet;t.replaceSync(l),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=l+t.innerHTML:e.prepend(s)}else e.append(s);1&t.o&&"HEAD"!==e.nodeName&&e.insertBefore(s,null)}4&t.o&&(s.innerHTML+=c),i&&i.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(e);ie(e,t,l,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>re(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},ie=(e,t,n,o)=>{try{t=t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{const o=e.$hostElement$,l=e.O,s=e.C||A(null,null),i=(e=>e&&e.m===R)(t)?t:P(null,null,t);if(C=o.tagName,l.M&&(i.u=i.u||{},l.M.map((([e,t])=>i.u[t]=o[e]))),n&&i.u)for(const e of Object.keys(i.u))o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.u[e]=o[e]);i.m=null,i.o|=4,e.C=i,i.v=s.v=o.shadowRoot||o,B=!!(1&l.o),Y(s,i,n)})(e,t,o)}catch(t){s(t,e.$hostElement$)}return null},re=e=>{const t=e.$hostElement$,n=e.j;ue(e.t,"componentDidRender",void 0,t),64&e.o||(e.o|=64,ae(t),e.P(t),n||ce()),e.S&&(e.S(),e.S=void 0),512&e.o&&w((()=>te(e,!1))),e.o&=-517},ce=()=>{ae(a.documentElement),w((()=>T(u,"appload",{detail:{namespace:"casino-engagement-suite-modal"}})))},ue=(e,t,n,o)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e,o)}},ae=e=>e.classList.add("hydrated"),fe=(e,t,o,l)=>{const s=n(e);if(!s)throw Error(`Couldn't find host element for "${l.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=s.A.get(t),r=s.o,c=s.t;o=D(o,l.R[t][0]),8&r&&void 0!==i||o===i||Number.isNaN(i)&&Number.isNaN(o)||(s.A.set(t,o),c&&2==(18&r)&&te(s,!1))},he=(e,t,o)=>{var l,s;const i=e.prototype;if(t.R){const r=Object.entries(null!=(l=t.R)?l:{});if(r.map((([e,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,e)||{};s&&(t.R[e][0]|=2048),r&&(t.R[e][0]|=4096),(1&o||!s)&&Object.defineProperty(i,e,{get(){{if(!(2048&t.R[e][0]))return((e,t)=>n(this).A.get(t))(0,e);const o=n(this),l=o?o.t:i;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(s){const i=n(this);if(r){const n=32&l?this[e]:i.$hostElement$[e];return void 0===n&&i.A.get(e)?s=i.A.get(e):!i.A.get(e)&&n&&i.A.set(e,n),r.call(this,D(s,l)),void fe(this,e,s=32&l?this[e]:i.$hostElement$[e],t)}{if(!(1&o&&4096&t.R[e][0]))return fe(this,e,s,t),void(1&o&&!i.t&&i.D.then((()=>{4096&t.R[e][0]&&i.t[e]!==i.A.get(e)&&(i.t[e]=s)})));const n=()=>{const n=i.t[e];!i.A.get(e)&&n&&i.A.set(e,n),i.t[e]=D(s,l),fe(this,e,i.t[e],t)};i.t?n():i.D.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(e,l,s){f.jmp((()=>{var r;const c=o.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=t.H)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,l,e)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.H)?s:{}),...r.filter((([e,t])=>15&t[0])).map((([e,n])=>{var l;const s=n[1]||e;return o.set(s,e),512&n[0]&&(null==(l=t.M)||l.push([e,s])),s}))]))}}return e},de=(e,o={})=>{var l;const h=[],p=o.exclude||[],m=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),b=a.createElement("style"),$=[];let w,g=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((o=>{const l={o:o[0],$:o[1],R:o[2],N:o[3]};4&l.o&&(S=!0),l.R=o[2],l.M=[];const c=l.$,u=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const o={o:0,$hostElement$:e,O:n,A:new Map};o.D=new Promise((e=>o.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,o)})(e=this,l),1&l.o)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${l.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),g?$.push(this):f.jmp((()=>(e=>{if(!(1&f.o)){const t=n(e),o=t.O,l=()=>{};if(1&t.o)(null==t?void 0:t.t)||(null==t?void 0:t.D)&&t.D.then((()=>{}));else{t.o|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ee(t,t.j=n);break}}o.R&&Object.entries(o.R).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let o;if(!(32&t.o)){t.o|=32;{const l=((e,t)=>{const n=e.$.replace(/-/g,"_"),o=e.T;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((e=>(i.set(o,e),e[n])),(e=>{s(e,t.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,t);if(l&&"then"in l){const e=()=>{};o=await l,e()}else o=l;if(!o)throw Error(`Constructor for "${n.$}#${t.U}" was not found`);o.isProxied||(he(o,n,2),o.isProxied=!0);const r=()=>{};t.o|=8;try{new o(t)}catch(t){s(t,e)}t.o&=-9,r()}if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=F(n);if(!r.has(t)){const o=()=>{};((e,t,n)=>{let o=r.get(e);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,r.set(e,o)})(t,e,!!(1&n.o)),o()}}}const l=t.j,c=()=>te(t,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(e,t,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async e=>{if(!(1&f.o)){const t=n(e);(null==t?void 0:t.t)||(null==t?void 0:t.D)&&t.D.then((()=>{}))}U.has(e)&&U.delete(e),e.shadowRoot&&U.has(e.shadowRoot)&&U.delete(e.shadowRoot)})(this))),f.raf((()=>{var e;const t=n(this);(null==(e=null==t?void 0:t.C)?void 0:e.v)instanceof Node&&!t.C.v.isConnected&&delete t.C.v}))}componentOnReady(){return n(this).D}};l.T=e[0],p.includes(c)||m.get(c)||(h.push(c),m.define(c,he(u,l,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(l=f.k)?l:j(a);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,v?v.nextSibling:y.firstChild)}g=!1,$.length?$.map((e=>e.connectedCallback())):f.jmp((()=>w=setTimeout(ce,30)))},pe=e=>f.k=e;export{de as b,N as c,H as g,P as h,h as p,o as r,pe as s}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-35000938.js');
|
|
6
6
|
|
|
7
7
|
const casinoEngagementSuiteModalCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:24px;height:24px}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center;z-index:1}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalBodyWrapper{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.ModalBodyWrapper::-webkit-scrollbar{width:3px;background:none}.ModalBodyWrapper::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background-color:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius:var(--emw--border-radius-large, 8px);width:450px;max-width:100%;text-align:center;max-height:90dvh}.GradientBorder::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:var(--emw--border-radius-large, 9px);background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large-plus, 24px);padding:0 16px;margin-bottom:16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin:12px 0}.ModalBody{font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-secondary, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .EngagementSuiteIconButton{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:var(--emw--font-size-small, 14px)}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:var(--emw--font-size-large, 20px);padding:0 60px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}";
|
|
8
8
|
const CasinoEngagementSuiteModalStyle0 = casinoEngagementSuiteModalCss;
|
|
@@ -11,6 +11,20 @@ const CasinoEngagementSuiteModal = class {
|
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
this.closeModal = index.createEvent(this, "closeModal", 7);
|
|
14
|
+
/**
|
|
15
|
+
* Client custom styling via string
|
|
16
|
+
*/
|
|
17
|
+
this.clientStyling = '';
|
|
18
|
+
/**
|
|
19
|
+
* Client custom styling via url
|
|
20
|
+
*/
|
|
21
|
+
this.clientStylingUrl = '';
|
|
22
|
+
this.device = 'Mobile';
|
|
23
|
+
/**
|
|
24
|
+
* Show win animation
|
|
25
|
+
*/
|
|
26
|
+
this.showAnimation = false;
|
|
27
|
+
this.limitStylingAppends = false;
|
|
14
28
|
this.handleCloseClick = () => {
|
|
15
29
|
if (this.isLoading)
|
|
16
30
|
return;
|
|
@@ -34,16 +48,6 @@ const CasinoEngagementSuiteModal = class {
|
|
|
34
48
|
console.log('Error ', err);
|
|
35
49
|
});
|
|
36
50
|
};
|
|
37
|
-
this.clientStyling = '';
|
|
38
|
-
this.clientStylingUrl = '';
|
|
39
|
-
this.isOpen = undefined;
|
|
40
|
-
this.isLoading = undefined;
|
|
41
|
-
this.header = undefined;
|
|
42
|
-
this.contentIcon = undefined;
|
|
43
|
-
this.modalType = undefined;
|
|
44
|
-
this.device = 'Mobile';
|
|
45
|
-
this.showAnimation = false;
|
|
46
|
-
this.limitStylingAppends = false;
|
|
47
51
|
}
|
|
48
52
|
componentDidRender() {
|
|
49
53
|
if (!this.limitStylingAppends && this.host) {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-35000938.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('casino-engagement-suite-modal.cjs.js', document.baseURI).href));
|
|
@@ -21,19 +21,23 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'casino-engagement-suite-modal';
|
|
24
|
-
const BUILD = /* casino-engagement-suite-modal */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
24
|
+
const BUILD = /* casino-engagement-suite-modal */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
// src/client/client-host-ref.ts
|
|
34
36
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
37
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
38
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
39
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
40
|
+
};
|
|
37
41
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
42
|
const hostRef = {
|
|
39
43
|
$flags$: 0,
|
|
@@ -46,7 +50,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
50
|
hostElement["s-p"] = [];
|
|
47
51
|
hostElement["s-rc"] = [];
|
|
48
52
|
}
|
|
49
|
-
|
|
53
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
54
|
+
return ref;
|
|
50
55
|
};
|
|
51
56
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
57
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -83,16 +88,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
83
88
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
84
89
|
/* webpackMode: "lazy" */
|
|
85
90
|
`./${bundleId}.entry.js${""}`
|
|
86
|
-
)); }).then(
|
|
87
|
-
{
|
|
88
|
-
|
|
91
|
+
)); }).then(
|
|
92
|
+
(importedModule) => {
|
|
93
|
+
{
|
|
94
|
+
cmpModules.set(bundleId, importedModule);
|
|
95
|
+
}
|
|
96
|
+
return importedModule[exportName];
|
|
97
|
+
},
|
|
98
|
+
(e) => {
|
|
99
|
+
consoleError(e, hostRef.$hostElement$);
|
|
89
100
|
}
|
|
90
|
-
|
|
91
|
-
}, consoleError);
|
|
101
|
+
);
|
|
92
102
|
};
|
|
93
103
|
|
|
94
104
|
// src/client/client-style.ts
|
|
95
105
|
var styles = /* @__PURE__ */ new Map();
|
|
106
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
96
107
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
97
108
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
98
109
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -150,12 +161,6 @@ var flush = () => {
|
|
|
150
161
|
};
|
|
151
162
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
152
163
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
153
|
-
|
|
154
|
-
// src/utils/constants.ts
|
|
155
|
-
var EMPTY_OBJ = {};
|
|
156
|
-
|
|
157
|
-
// src/utils/helpers.ts
|
|
158
|
-
var isDef = (v) => v != null;
|
|
159
164
|
var isComplexType = (o) => {
|
|
160
165
|
o = typeof o;
|
|
161
166
|
return o === "object" || o === "function";
|
|
@@ -356,7 +361,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
356
361
|
}
|
|
357
362
|
if (!appliedStyles.has(scopeId2)) {
|
|
358
363
|
{
|
|
359
|
-
styleElm = doc.createElement("style");
|
|
364
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
360
365
|
styleElm.innerHTML = style;
|
|
361
366
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
362
367
|
if (nonce != null) {
|
|
@@ -366,7 +371,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
366
371
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
367
372
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
368
373
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
369
|
-
styleContainerNode.insertBefore(
|
|
374
|
+
styleContainerNode.insertBefore(
|
|
375
|
+
styleElm,
|
|
376
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
377
|
+
);
|
|
370
378
|
} else if ("host" in styleContainerNode) {
|
|
371
379
|
if (supportsConstructableStylesheets) {
|
|
372
380
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -416,16 +424,18 @@ var attachStyles = (hostRef) => {
|
|
|
416
424
|
endAttachStyles();
|
|
417
425
|
};
|
|
418
426
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
419
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
427
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
420
428
|
if (oldValue !== newValue) {
|
|
421
429
|
let isProp = isMemberInElement(elm, memberName);
|
|
422
430
|
let ln = memberName.toLowerCase();
|
|
423
431
|
if (memberName === "class") {
|
|
424
432
|
const classList = elm.classList;
|
|
425
433
|
const oldClasses = parseClassList(oldValue);
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
434
|
+
let newClasses = parseClassList(newValue);
|
|
435
|
+
{
|
|
436
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
437
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
438
|
+
}
|
|
429
439
|
} else if (memberName === "style") {
|
|
430
440
|
{
|
|
431
441
|
for (const prop in oldValue) {
|
|
@@ -480,7 +490,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
480
490
|
elm.setAttribute(memberName, n);
|
|
481
491
|
}
|
|
482
492
|
}
|
|
483
|
-
} else {
|
|
493
|
+
} else if (elm[memberName] !== newValue) {
|
|
484
494
|
elm[memberName] = newValue;
|
|
485
495
|
}
|
|
486
496
|
} catch (e) {
|
|
@@ -502,24 +512,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
502
512
|
}
|
|
503
513
|
};
|
|
504
514
|
var parseClassListRegex = /\s/;
|
|
505
|
-
var parseClassList = (value) =>
|
|
515
|
+
var parseClassList = (value) => {
|
|
516
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
517
|
+
value = value.baseVal;
|
|
518
|
+
}
|
|
519
|
+
if (!value || typeof value !== "string") {
|
|
520
|
+
return [];
|
|
521
|
+
}
|
|
522
|
+
return value.split(parseClassListRegex);
|
|
523
|
+
};
|
|
506
524
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
507
525
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
508
526
|
|
|
509
527
|
// src/runtime/vdom/update-element.ts
|
|
510
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
528
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
511
529
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
512
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
513
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
530
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
531
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
514
532
|
{
|
|
515
533
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
516
534
|
if (!(memberName in newVnodeAttrs)) {
|
|
517
|
-
setAccessor(
|
|
535
|
+
setAccessor(
|
|
536
|
+
elm,
|
|
537
|
+
memberName,
|
|
538
|
+
oldVnodeAttrs[memberName],
|
|
539
|
+
void 0,
|
|
540
|
+
isSvgMode2,
|
|
541
|
+
newVnode.$flags$);
|
|
518
542
|
}
|
|
519
543
|
}
|
|
520
544
|
}
|
|
521
545
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
522
|
-
setAccessor(
|
|
546
|
+
setAccessor(
|
|
547
|
+
elm,
|
|
548
|
+
memberName,
|
|
549
|
+
oldVnodeAttrs[memberName],
|
|
550
|
+
newVnodeAttrs[memberName],
|
|
551
|
+
isSvgMode2,
|
|
552
|
+
newVnode.$flags$);
|
|
523
553
|
}
|
|
524
554
|
};
|
|
525
555
|
function sortedAttrNames(attrNames) {
|
|
@@ -531,13 +561,10 @@ function sortedAttrNames(attrNames) {
|
|
|
531
561
|
attrNames
|
|
532
562
|
);
|
|
533
563
|
}
|
|
534
|
-
|
|
535
|
-
// src/runtime/vdom/vdom-render.ts
|
|
536
|
-
var scopeId;
|
|
537
564
|
var hostTagName;
|
|
538
565
|
var useNativeShadowDom = false;
|
|
539
566
|
var isSvgMode = false;
|
|
540
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
567
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
541
568
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
542
569
|
let i2 = 0;
|
|
543
570
|
let elm;
|
|
@@ -551,11 +578,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
551
578
|
{
|
|
552
579
|
updateElement(null, newVNode2, isSvgMode);
|
|
553
580
|
}
|
|
554
|
-
const rootNode = elm.getRootNode();
|
|
555
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
556
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
557
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
558
|
-
}
|
|
559
581
|
if (newVNode2.$children$) {
|
|
560
582
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
561
583
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -684,6 +706,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
684
706
|
if (!isInitialRender) {
|
|
685
707
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
686
708
|
}
|
|
709
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
710
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
711
|
+
}
|
|
687
712
|
return true;
|
|
688
713
|
}
|
|
689
714
|
return false;
|
|
@@ -718,8 +743,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
718
743
|
}
|
|
719
744
|
};
|
|
720
745
|
var insertBefore = (parent, newNode, reference) => {
|
|
721
|
-
|
|
722
|
-
|
|
746
|
+
{
|
|
747
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
748
|
+
}
|
|
723
749
|
};
|
|
724
750
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
725
751
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -744,9 +770,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
744
770
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
745
771
|
hostRef.$vnode$ = rootVnode;
|
|
746
772
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
747
|
-
{
|
|
748
|
-
scopeId = hostElm["s-sc"];
|
|
749
|
-
}
|
|
750
773
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
751
774
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
752
775
|
};
|
|
@@ -754,7 +777,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
754
777
|
// src/runtime/update-component.ts
|
|
755
778
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
756
779
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
757
|
-
ancestorComponent["s-p"].push(
|
|
780
|
+
const index = ancestorComponent["s-p"].push(
|
|
781
|
+
new Promise(
|
|
782
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
783
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
784
|
+
r();
|
|
785
|
+
}
|
|
786
|
+
)
|
|
787
|
+
);
|
|
758
788
|
}
|
|
759
789
|
};
|
|
760
790
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -845,7 +875,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
845
875
|
const instance = hostRef.$lazyInstance$ ;
|
|
846
876
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
847
877
|
{
|
|
848
|
-
safeCall(instance, "componentDidRender");
|
|
878
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
849
879
|
}
|
|
850
880
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
851
881
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -879,12 +909,12 @@ var appDidLoad = (who) => {
|
|
|
879
909
|
}
|
|
880
910
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
881
911
|
};
|
|
882
|
-
var safeCall = (instance, method, arg) => {
|
|
912
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
883
913
|
if (instance && instance[method]) {
|
|
884
914
|
try {
|
|
885
915
|
return instance[method](arg);
|
|
886
916
|
} catch (e) {
|
|
887
|
-
consoleError(e);
|
|
917
|
+
consoleError(e, elm);
|
|
888
918
|
}
|
|
889
919
|
}
|
|
890
920
|
return void 0;
|
|
@@ -927,15 +957,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
927
957
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
928
958
|
members.map(([memberName, [memberFlags]]) => {
|
|
929
959
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
960
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
961
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
962
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
963
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
964
|
+
Object.defineProperty(prototype, memberName, {
|
|
965
|
+
get() {
|
|
966
|
+
{
|
|
967
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
968
|
+
return getValue(this, memberName);
|
|
969
|
+
}
|
|
970
|
+
const ref = getHostRef(this);
|
|
971
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
972
|
+
if (!instance) return;
|
|
973
|
+
return instance[memberName];
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
configurable: true,
|
|
977
|
+
enumerable: true
|
|
978
|
+
});
|
|
979
|
+
}
|
|
930
980
|
Object.defineProperty(prototype, memberName, {
|
|
931
|
-
get() {
|
|
932
|
-
return getValue(this, memberName);
|
|
933
|
-
},
|
|
934
981
|
set(newValue) {
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
982
|
+
const ref = getHostRef(this);
|
|
983
|
+
if (origSetter) {
|
|
984
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
985
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
986
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
987
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
988
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
989
|
+
}
|
|
990
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
991
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
992
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
993
|
+
return;
|
|
994
|
+
}
|
|
995
|
+
{
|
|
996
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
997
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
998
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
999
|
+
ref.$onReadyPromise$.then(() => {
|
|
1000
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1001
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1002
|
+
}
|
|
1003
|
+
});
|
|
1004
|
+
}
|
|
1005
|
+
return;
|
|
1006
|
+
}
|
|
1007
|
+
const setterSetVal = () => {
|
|
1008
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1009
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1010
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1011
|
+
}
|
|
1012
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1013
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1014
|
+
};
|
|
1015
|
+
if (ref.$lazyInstance$) {
|
|
1016
|
+
setterSetVal();
|
|
1017
|
+
} else {
|
|
1018
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
939
1022
|
});
|
|
940
1023
|
}
|
|
941
1024
|
});
|
|
@@ -945,7 +1028,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
945
1028
|
plt.jmp(() => {
|
|
946
1029
|
var _a2;
|
|
947
1030
|
const propName = attrNameToPropName.get(attrName);
|
|
948
|
-
if (this.hasOwnProperty(propName)) {
|
|
1031
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
949
1032
|
newValue = this[propName];
|
|
950
1033
|
delete this[propName];
|
|
951
1034
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -965,7 +1048,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
965
1048
|
}
|
|
966
1049
|
return;
|
|
967
1050
|
}
|
|
968
|
-
|
|
1051
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1052
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1053
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1054
|
+
this[propName] = newValue;
|
|
1055
|
+
}
|
|
969
1056
|
});
|
|
970
1057
|
};
|
|
971
1058
|
Cstr.observedAttributes = Array.from(
|
|
@@ -992,9 +1079,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
992
1079
|
let Cstr;
|
|
993
1080
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
994
1081
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1082
|
+
{
|
|
1083
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
998
1084
|
if (CstrImport && "then" in CstrImport) {
|
|
999
1085
|
const endLoad = uniqueTime();
|
|
1000
1086
|
Cstr = await CstrImport;
|
|
@@ -1016,16 +1102,12 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1016
1102
|
try {
|
|
1017
1103
|
new Cstr(hostRef);
|
|
1018
1104
|
} catch (e) {
|
|
1019
|
-
consoleError(e);
|
|
1105
|
+
consoleError(e, elm);
|
|
1020
1106
|
}
|
|
1021
1107
|
{
|
|
1022
1108
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1023
1109
|
}
|
|
1024
1110
|
endNewInstance();
|
|
1025
|
-
} else {
|
|
1026
|
-
Cstr = elm.constructor;
|
|
1027
|
-
const cmpTag = elm.localName;
|
|
1028
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1029
1111
|
}
|
|
1030
1112
|
if (Cstr && Cstr.style) {
|
|
1031
1113
|
let style;
|
|
@@ -1048,7 +1130,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1048
1130
|
schedule();
|
|
1049
1131
|
}
|
|
1050
1132
|
};
|
|
1051
|
-
var fireConnectedCallback = (instance) => {
|
|
1133
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1052
1134
|
};
|
|
1053
1135
|
|
|
1054
1136
|
// src/runtime/connected-callback.ts
|
|
@@ -1088,7 +1170,7 @@ var connectedCallback = (elm) => {
|
|
|
1088
1170
|
endConnected();
|
|
1089
1171
|
}
|
|
1090
1172
|
};
|
|
1091
|
-
var disconnectInstance = (instance) => {
|
|
1173
|
+
var disconnectInstance = (instance, elm) => {
|
|
1092
1174
|
};
|
|
1093
1175
|
var disconnectedCallback = async (elm) => {
|
|
1094
1176
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1097,6 +1179,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1097
1179
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1098
1180
|
}
|
|
1099
1181
|
}
|
|
1182
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1183
|
+
rootAppliedStyles.delete(elm);
|
|
1184
|
+
}
|
|
1185
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1186
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1187
|
+
}
|
|
1100
1188
|
};
|
|
1101
1189
|
|
|
1102
1190
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1173,6 +1261,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1173
1261
|
}
|
|
1174
1262
|
disconnectedCallback() {
|
|
1175
1263
|
plt.jmp(() => disconnectedCallback(this));
|
|
1264
|
+
plt.raf(() => {
|
|
1265
|
+
var _a3;
|
|
1266
|
+
const hostRef = getHostRef(this);
|
|
1267
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1268
|
+
delete hostRef.$vnode$.$elm$;
|
|
1269
|
+
}
|
|
1270
|
+
});
|
|
1176
1271
|
}
|
|
1177
1272
|
componentOnReady() {
|
|
1178
1273
|
return getHostRef(this).$onReadyPromise$;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-35000938.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|