@everymatrix/casino-promotions 0.0.197 → 0.0.201
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t="undefined"!=typeof globalThis?globalThis:t||self).app=o()}(this,function(){"use strict";function p(){}function u(t){return t()}function m(){return Object.create(null)}function W(t){t.forEach(u)}function $(t){return"function"==typeof t}function o(t,o){return t!=t?o==o:t!==o||t&&"object"==typeof t||"function"==typeof t}function N(t,o){t.appendChild(o)}function O(t,o,e){t.insertBefore(o,e||null)}function F(t){t.parentNode.removeChild(t)}function I(o,e){for(let t=0;t<o.length;t+=1)o[t]&&o[t].d(e)}function P(t){return document.createElement(t)}function c(t){return document.createTextNode(t)}function R(){return c(" ")}function B(t,o,e,n){return t.addEventListener(o,e,n),()=>t.removeEventListener(o,e,n)}function U(t,o,e){null==e?t.removeAttribute(o):t.getAttribute(o)!==e&&t.setAttribute(o,e)}let G,f;function h(t){f=t}const g=[],v=[],n=[],t=[],y=Promise.resolve();let i=!1;function w(){i||(i=!0,y.then(_))}function J(t){n.push(t)}let r=!1;const l=new Set;function _(){if(!r){r=!0;do{for(let t=0;t<g.length;t+=1){var o=g[t];h(o),function(t){{var o;null!==t.fragment&&(t.update(),W(t.before_update),o=t.dirty,t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,o),t.after_update.forEach(J))}}(o.$$)}for(h(null),g.length=0;v.length;)v.pop()();for(let t=0;t<n.length;t+=1){const e=n[t];l.has(e)||(l.add(e),e())}}while(n.length=0,g.length);for(;t.length;)t.pop()();i=!1,r=!1,l.clear()}}const b=new Set;function e(n,t,o,e,i,r,l=[-1]){var a,c=f;h(n);const s=n.$$={fragment:null,ctx:null,props:r,update:p,not_equal:i,bound:m(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(c?c.$$.context:t.context||[]),callbacks:m(),dirty:l,skip_bound:!1};let d=!1;if(s.ctx=o?o(n,t.props||{},(t,o,...e)=>{e=e.length?e[0]:o;return s.ctx&&i(s.ctx[t],s.ctx[t]=e)&&(!s.skip_bound&&s.bound[t]&&s.bound[t](e),d&&(e=t,-1===(t=n).$$.dirty[0]&&(g.push(t),w(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31)),o}):[],s.update(),d=!0,W(s.before_update),s.fragment=!!e&&e(s.ctx),t.target){if(t.hydrate){const p=(e=t.target,Array.from(e.childNodes));s.fragment&&s.fragment.l(p),p.forEach(F)}else s.fragment&&s.fragment.c();t.intro&&(a=n.$$.fragment)&&a.i&&(b.delete(a),a.i(void 0)),function(o,t,e,n){const{fragment:i,on_mount:r,on_destroy:l,after_update:a}=o.$$;i&&i.m(t,e),n||J(()=>{var t=r.map(u).filter($);l?l.push(...t):W(t),o.$$.on_mount=[]}),a.forEach(J)}(n,t.target,t.anchor,t.customElement),_()}h(c)}let a;function K(t,o,e){const n=t.slice();return n[24]=o[e],n[26]=e,n}function Q(t,o,e){const n=t.slice();return n[27]=o[e],n}function V(t,o,e){const n=t.slice();return n[30]=o[e],n}function k(t,o,e){const n=t.slice();return n[27]=o[e],n}function s(e){let l,n,i,a,r,c,s,d,p,u,m,f,h,t,g,_,b,x,v,y,w,$,k,L,z,E,M,S,T,C=e[2],j=[];for(let t=0;t<C.length;t+=1)j[t]=X(V(e,C,t));let H=e[8],A=[];for(let t=0;t<H.length;t+=1)A[t]=Y(Q(e,H,t));let q=e[9],D=[];for(let t=0;t<q.length;t+=1)D[t]=Z(K(e,q,t));return{c(){l=P("div"),n=P("h1"),n.textContent="Promotions",i=R(),a=P("div");for(let t=0;t<j.length;t+=1)j[t].c();r=R(),c=P("div"),s=P("div"),d=R(),p=P("div"),u=P("div"),m=P("picture");for(let t=0;t<A.length;t+=1)A[t].c();f=R(),h=P("img"),g=R(),_=P("div"),b=P("div"),x=P("ul");for(let t=0;t<D.length;t+=1)D[t].c();v=R(),y=P("div"),w=P("h3"),$=R(),k=P("div"),L=R(),z=P("div"),z.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>',U(n,"class","promotions__title"),U(a,"class","promotions__grid"),U(s,"class","modal__backdrop"),h.src!==(t=e[7])&&U(h,"src",t),U(h,"alt",e[5]),U(m,"class","modal__picture"),U(u,"class","modal__header"),U(x,"class","modal__tabs"),U(w,"class","modal__body_title"),U(k,"class","modal__tab_content"),U(y,"class","modal__tabContentWrapper"),U(b,"class","modal__body_content"),U(_,"class","modal__body"),U(p,"class","modal__content"),U(z,"class","modal__close"),U(c,"class","promo__modal modal"),U(l,"class",E="promotions "+e[3]),J(()=>e[16].call(l))},m(t,o){O(t,l,o),N(l,n),N(l,i),N(l,a);for(let t=0;t<j.length;t+=1)j[t].m(a,null);N(l,r),N(l,c),N(c,s),N(c,d),N(c,p),N(p,u),N(u,m);for(let t=0;t<A.length;t+=1)A[t].m(m,null);N(m,f),N(m,h),N(p,g),N(p,_),N(_,b),N(b,x);for(let t=0;t<D.length;t+=1)D[t].m(x,null);N(b,v),N(b,y),N(y,w),w.innerHTML=e[5],N(y,$),N(y,k),k.innerHTML=e[6],e[15](b),N(c,L),N(c,z),M=function(t,o){"static"===getComputedStyle(t).position&&(t.style.position="relative");const e=P("iframe");e.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;"),e.setAttribute("aria-hidden","true"),e.tabIndex=-1;const n=function(){if(void 0===G){G=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(t){G=!0}}return G}();let i;return n?(e.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",i=B(window,"message",t=>{t.source===e.contentWindow&&o()})):(e.src="about:blank",e.onload=()=>{i=B(e.contentWindow,"resize",o)}),N(t,e),()=>{(n||i&&e.contentWindow)&&i(),F(e)}}(l,e[16].bind(l)),e[17](l),S||(T=[B(s,"click",e[12]),B(z,"click",e[12])],S=!0)},p(o,e){if(2052&e[0]){let t;for(C=o[2],t=0;t<C.length;t+=1){var n=V(o,C,t);j[t]?j[t].p(n,e):(j[t]=X(n),j[t].c(),j[t].m(a,null))}for(;t<j.length;t+=1)j[t].d(1);j.length=C.length}if(256&e[0]){let t;for(H=o[8],t=0;t<H.length;t+=1){var i=Q(o,H,t);A[t]?A[t].p(i,e):(A[t]=Y(i),A[t].c(),A[t].m(m,f))}for(;t<A.length;t+=1)A[t].d(1);A.length=H.length}if(128&e[0]&&h.src!==(t=o[7])&&U(h,"src",t),32&e[0]&&U(h,"alt",o[5]),8704&e[0]){let t;for(q=o[9],t=0;t<q.length;t+=1){var r=K(o,q,t);D[t]?D[t].p(r,e):(D[t]=Z(r),D[t].c(),D[t].m(x,null))}for(;t<D.length;t+=1)D[t].d(1);D.length=q.length}32&e[0]&&(w.innerHTML=o[5]),64&e[0]&&(k.innerHTML=o[6]),8&e[0]&&E!==(E="promotions "+o[3])&&U(l,"class",E)},d(t){t&&F(l),I(j,t),I(A,t),I(D,t),e[15](null),M(),e[17](null),S=!1,W(T)}}}function L(t){let e,n,i;return{c(){e=P("source"),U(e,"srcset",n=t[27].pictureSource),U(e,"media",i="("+t[27].media+")")},m(t,o){O(t,e,o)},p(t,o){4&o[0]&&n!==(n=t[27].pictureSource)&&U(e,"srcset",n),4&o[0]&&i!==(i="("+t[27].media+")")&&U(e,"media",i)},d(t){t&&F(e)}}}function X(e){let n,i,r,l,a,c,s,d,p,u,m,f,h,g,_,b,x=e[30].title+"",v=e[30].content.split("</p>")[0]+"",y=e[30].image.sources,w=[];for(let t=0;t<y.length;t+=1)w[t]=L(k(e,y,t));return{c(){n=P("div"),i=P("picture");for(let t=0;t<w.length;t+=1)w[t].c();r=R(),l=P("img"),s=R(),d=P("div"),p=P("h2"),u=R(),m=P("div"),f=R(),h=P("button"),h.textContent="More info",g=R(),l.src!==(a=e[30].image.src)&&U(l,"src",a),U(l,"alt",c=e[30].title),U(i,"class","promo__picture"),U(p,"class","promo__title"),U(m,"class","promo__content text--ellipsis"),U(h,"class","promo__button"),U(d,"class","promo__details"),U(n,"class","promo")},m(t,o){O(t,n,o),N(n,i);for(let t=0;t<w.length;t+=1)w[t].m(i,null);N(i,r),N(i,l),N(n,s),N(n,d),N(d,p),p.innerHTML=x,N(d,u),N(d,m),m.innerHTML=v,N(d,f),N(d,h),N(n,g),_||(b=B(h,"click",function(){$(e[11](e[30]))&&e[11](e[30]).apply(this,arguments)}),_=!0)},p(t,o){if(e=t,4&o[0]){let t;for(y=e[30].image.sources,t=0;t<y.length;t+=1){const l=k(e,y,t);w[t]?w[t].p(l,o):(w[t]=L(l),w[t].c(),w[t].m(i,r))}for(;t<w.length;t+=1)w[t].d(1);w.length=y.length}4&o[0]&&l.src!==(a=e[30].image.src)&&U(l,"src",a),4&o[0]&&c!==(c=e[30].title)&&U(l,"alt",c),4&o[0]&&x!==(x=e[30].title+"")&&(p.innerHTML=x),4&o[0]&&v!==(v=e[30].content.split("</p>")[0]+"")&&(m.innerHTML=v)},d(t){t&&F(n),I(w,t),_=!1,b()}}}function Y(t){let e,n,i;return{c(){e=P("source"),U(e,"srcset",n=t[27].pictureSource),U(e,"media",i="("+t[27].media+")")},m(t,o){O(t,e,o)},p(t,o){256&o[0]&&n!==(n=t[27].pictureSource)&&U(e,"srcset",n),256&o[0]&&i!==(i="("+t[27].media+")")&&U(e,"media",i)},d(t){t&&F(e)}}}function Z(e){let n,i,r,l,a=e[24].tabDesc+"";return{c(){n=P("li"),i=c(a),U(n,"class","modal__tab"),U(n,"id",`tab-${e[26]}`)},m(t,o){O(t,n,o),N(n,i),r||(l=B(n,"click",function(){$(e[13](e[24],e[26]))&&e[13](e[24],e[26]).apply(this,arguments)}),r=!0)},p(t,o){e=t,512&o[0]&&a!==(a=e[24].tabDesc+"")&&(t=i,o=a,t.wholeText!==(o=""+o)&&(t.data=o))},d(t){t&&F(n),r=!1,l()}}}function d(t){let e,n=!0!==t[0]&&s(t);return{c(){n&&n.c(),e=c(""),this.c=p},m(t,o){n&&n.m(t,o),O(t,e,o)},p(t,o){!0!==t[0]?n?n.p(t,o):(n=s(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:p,o:p,d(t){n&&n.d(t),t&&F(e)}}}function x(t,o,e){var n=this&&this.__awaiter||function(t,l,a,c){return new(a=a||Promise)(function(e,o){function n(t){try{r(c.next(t))}catch(t){o(t)}}function i(t){try{r(c.throw(t))}catch(t){o(t)}}function r(t){var o;t.done?e(t.value):((o=t.value)instanceof a?o:new a(function(t){t(o)})).then(n,i)}r((c=c.apply(t,l||[])).next())})};let i,r,l,a,c,s,{endpoint:d=""}=o,{isLoading:p=!1}=o,u=[],m,f,h,g,_=[];const b=(t,o)=>{s.querySelector(".modal__tab_content").innerHTML=t.tabContent;let e=s.querySelectorAll(".modal__tab");for(let t=0;t<e.length;t++)e[t].classList.remove("modal__tab--active");s.querySelector(`#tab-${o}`).classList.add("modal__tab--active")},x={sm:640,md:768,lg:1024,xl:1280,xxl:1536};return t.$$set=t=>{"endpoint"in t&&e(14,d=t.endpoint),"isLoading"in t&&e(0,p=t.isLoading)},t.$$.update=()=>{2&t.$$.dirty[0]&&e(3,r=Object.entries(x).reduce((t,[o,e])=>[...t,i>=e?o:""],[]).join(" ")),16384&t.$$.dirty[0]&&d&&(e(0,p=!0),fetch(d).then(t=>t.json()).then(t=>{e(0,p=!1),e(2,u=t)}).catch(t=>{e(0,p=!1),console.error(t)}))},[p,i,u,r,l,"","",{},[],_,s,t=>n(void 0,void 0,void 0,function*(){e(5,m=t.title),e(6,f=t.content),e(7,h=t.image.src),e(8,g=t.image.sources),e(9,_=[{order:"0",tabContent:f,tabDesc:"Description"},...t.tabs]),a=l.querySelector(".modal"),c=window.document.querySelector("body"),a.classList.add("modal--open"),c.style.overflow="hidden",w(),yield y,b(_[0],0)}),()=>{a=l.querySelector(".modal"),c=window.document.querySelector("body"),a.classList.remove("modal--open"),c.style.overflow="initial"},b,d,function(t){v[t?"unshift":"push"](()=>{s=t,e(10,s)})},function(){i=this.clientWidth,e(1,i)},function(t){v[t?"unshift":"push"](()=>{l=t,e(4,l)})}]}"function"==typeof HTMLElement&&(a=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(u).filter($);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,o,e){this[t]=e}disconnectedCallback(){W(this.$$.on_disconnect)}$destroy(){!function(t){const o=t.$$;null!==o.fragment&&(W(o.on_destroy),o.fragment&&o.fragment.d(1),o.on_destroy=o.fragment=null,o.ctx=[])}(this),this.$destroy=p}$on(t,o){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(o),()=>{var t=e.indexOf(o);-1!==t&&e.splice(t,1)}}$set(t){this.$$set&&0!==Object.keys(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class z extends a{constructor(t){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.text--ellipsis>*{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.promotions{--bg-color:#07072a;--text-color:#ffffff;--text-color-black:#000000;--border-color:#707070;--modal-bg-color:#F9F8F8;--modal-tabs-text-color:#8E8E8E;--modal-tabs-color:#D1D1D1;--modal-active-tab-color:#07072A;--modal-title-color:#D0046C;background-color:var(--bg-color);padding:24px 16px;color:var(--text-color)}.promotions__title{font-size:22px;font-weight:normal;margin-bottom:18px}.promotions__grid{display:grid;grid-auto-rows:220px;grid-template-columns:1fr;grid-row-gap:16px}.md .promotions__grid{grid-auto-rows:260px;grid-template-columns:repeat(2, 1fr);grid-gap:20px}.xl .promotions__grid{grid-auto-rows:260px;grid-template-columns:repeat(3, 1fr);grid-gap:30px}.promo{display:flex;position:relative;flex-direction:column;justify-content:flex-end;width:100%;height:auto;padding:12px 8px;border:2px solid var(--border-color);border-radius:5px;overflow:hidden;transition:all 150ms ease}.promo:hover{border:2px solid var(--text-color)}.promo__picture{position:absolute;width:100%;height:100%;top:0;left:0;z-index:0}.promo__picture img{width:100%;height:100%;object-fit:cover}.promo__picture::before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background:black;background:linear-gradient(0deg, black 0%, rgba(7, 7, 42, 0.2) 90%)}.promo__details{z-index:5}.promo__title{display:inline-block;margin-bottom:6px;font-size:18px;font-weight:normal}.promo__content{margin-bottom:18px;font-size:14px}.promo__button{font-size:14px;text-transform:uppercase;padding:8px 24px;background:none;color:var(--text-color);border:1px solid var(--text-color);border-radius:3px;cursor:pointer;transition:all 150ms ease}.promo__button:hover{background:var(--modal-title-color);border:1px solid var(--modal-title-color)}.modal{display:none;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:100}.modal--open{display:flex}.modal__backdrop{position:absolute;background-color:var(--bg-color);opacity:0.6;width:100%;height:100%;z-index:105}.modal__content{position:relative;display:flex;flex-direction:column;width:100%;background-color:var(--modal-bg-color);z-index:110}.md .modal__content{width:60%;height:80%}.modal__close{position:absolute;width:36px;height:36px;top:16px;right:16px;z-index:110;cursor:pointer;transition:all 150ms ease}.modal__close:hover{color:var(--modal-title-color)}.modal__picture img{width:100%;height:200px;object-fit:cover}.md .modal__picture img{height:300px}.modal__body{padding:16px 8px;color:var(--text-color-black);height:calc(100vh - 200px);overflow-y:auto}.modal__body_title{font-size:18px;margin-bottom:10px;color:var(--modal-title-color)}.modal__body_content{font-size:14px;line-height:1.3}.modal__body_content *{margin-bottom:8px}.md .modal__body{height:calc(100vh - 300px);padding:22px 8%}.lg .modal__body{padding:28px 15%}.modal__tabs{position:relative;display:inline-flex;width:100%;flex-wrap:nowrap;gap:14px;white-space:nowrap;overflow-x:scroll}.modal__tabs::before{content:'';position:absolute;bottom:4px;left:0;width:100%;height:2px;background-color:var(--modal-tabs-color);z-index:125}.modal__tab{background:none;border:none;padding:8px 0;color:var(--modal-tabs-text-color);font-size:14px;cursor:pointer;transition:all 150ms ease}.modal__tab--active{position:relative;color:var(--modal-active-tab-color);z-index:130}.modal__tab--active:before{content:'';left:0;bottom:-5px;position:absolute;width:100%;height:4px;background-color:var(--modal-active-tab-color)}.modal__tab:hover{color:var(--bg-color)}</style>",e(this,{target:this.shadowRoot,props:function(t){const o={};for(const e of t)o[e.name]=e.value;return o}(this.attributes),customElement:!0},x,d,o,{endpoint:14,isLoading:0},[-1,-1]),t&&(t.target&&O(t.target,this,t.anchor),t.props&&(this.$set(t.props),_()))}static get observedAttributes(){return["endpoint","isLoading"]}get endpoint(){return this.$$.ctx[14]}set endpoint(t){this.$set({endpoint:t}),_()}get isLoading(){return this.$$.ctx[0]}set isLoading(t){this.$set({isLoading:t}),_()}}return customElements.get("casino-promotions")||customElements.define("casino-promotions",z),z});
|
|
1
|
+
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t="undefined"!=typeof globalThis?globalThis:t||self).app=o()}(this,function(){"use strict";function p(){}function u(t){return t()}function m(){return Object.create(null)}function F(t){t.forEach(u)}function $(t){return"function"==typeof t}function o(t,o){return t!=t?o==o:t!==o||t&&"object"==typeof t||"function"==typeof t}function W(t,o){t.appendChild(o)}function N(t,o,e){t.insertBefore(o,e||null)}function O(t){t.parentNode.removeChild(t)}function I(o,e){for(let t=0;t<o.length;t+=1)o[t]&&o[t].d(e)}function P(t){return document.createElement(t)}function s(t){return document.createTextNode(t)}function R(){return s(" ")}function B(t,o,e,n){return t.addEventListener(o,e,n),()=>t.removeEventListener(o,e,n)}function U(t,o,e){null==e?t.removeAttribute(o):t.getAttribute(o)!==e&&t.setAttribute(o,e)}let G,f;function h(t){f=t}const g=[],v=[],n=[],t=[],y=Promise.resolve();let r=!1;function w(){r||(r=!0,y.then(b))}function J(t){n.push(t)}let i=!1;const l=new Set;function b(){if(!i){i=!0;do{for(let t=0;t<g.length;t+=1){var o=g[t];h(o),function(t){{var o;null!==t.fragment&&(t.update(),F(t.before_update),o=t.dirty,t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,o),t.after_update.forEach(J))}}(o.$$)}for(h(null),g.length=0;v.length;)v.pop()();for(let t=0;t<n.length;t+=1){const e=n[t];l.has(e)||(l.add(e),e())}}while(n.length=0,g.length);for(;t.length;)t.pop()();r=!1,i=!1,l.clear()}}const _=new Set;function e(n,t,o,e,r,i,l=[-1]){var a,s=f;h(n);const c=n.$$={fragment:null,ctx:null,props:i,update:p,not_equal:r,bound:m(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:t.context||[]),callbacks:m(),dirty:l,skip_bound:!1};let d=!1;if(c.ctx=o?o(n,t.props||{},(t,o,...e)=>{e=e.length?e[0]:o;return c.ctx&&r(c.ctx[t],c.ctx[t]=e)&&(!c.skip_bound&&c.bound[t]&&c.bound[t](e),d&&(e=t,-1===(t=n).$$.dirty[0]&&(g.push(t),w(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31)),o}):[],c.update(),d=!0,F(c.before_update),c.fragment=!!e&&e(c.ctx),t.target){if(t.hydrate){const p=(e=t.target,Array.from(e.childNodes));c.fragment&&c.fragment.l(p),p.forEach(O)}else c.fragment&&c.fragment.c();t.intro&&(a=n.$$.fragment)&&a.i&&(_.delete(a),a.i(void 0)),function(o,t,e,n){const{fragment:r,on_mount:i,on_destroy:l,after_update:a}=o.$$;r&&r.m(t,e),n||J(()=>{var t=i.map(u).filter($);l?l.push(...t):F(t),o.$$.on_mount=[]}),a.forEach(J)}(n,t.target,t.anchor,t.customElement),b()}h(s)}let a;function K(t,o,e){const n=t.slice();return n[24]=o[e],n[26]=e,n}function Q(t,o,e){const n=t.slice();return n[27]=o[e],n}function V(t,o,e){const n=t.slice();return n[30]=o[e],n}function k(t,o,e){const n=t.slice();return n[27]=o[e],n}function c(e){let l,n,r,a,i,s,c,d,p,u,m,f,h,g,b,t,_,x,v,y,w,$,k,L,z,E,M,S,T,C=e[2],j=[];for(let t=0;t<C.length;t+=1)j[t]=X(V(e,C,t));let H=e[8],A=[];for(let t=0;t<H.length;t+=1)A[t]=Y(Q(e,H,t));let D=e[9],q=[];for(let t=0;t<D.length;t+=1)q[t]=Z(K(e,D,t));return{c(){l=P("div"),n=P("h1"),n.textContent="Promotions",r=R(),a=P("div");for(let t=0;t<j.length;t+=1)j[t].c();i=R(),s=P("div"),c=P("div"),d=R(),p=P("div"),u=P("div"),u.innerHTML='<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',m=R(),f=P("div"),h=P("picture");for(let t=0;t<A.length;t+=1)A[t].c();g=R(),b=P("img"),_=R(),x=P("div"),v=P("div"),y=P("ul");for(let t=0;t<q.length;t+=1)q[t].c();w=R(),$=P("div"),k=P("h3"),L=R(),z=P("div"),U(n,"class","promotions__title"),U(a,"class","promotions__grid"),U(c,"class","modal__backdrop"),U(u,"class","modal__close"),b.src!==(t=e[7])&&U(b,"src",t),U(b,"alt",e[5]),U(h,"class","modal__picture"),U(f,"class","modal__header"),U(y,"class","modal__tabs"),U(k,"class","modal__body_title"),U(z,"class","modal__tab_content"),U($,"class","modal__tabContentWrapper"),U(v,"class","modal__body_content"),U(x,"class","modal__body"),U(p,"class","modal__content"),U(s,"class","promo__modal modal"),U(l,"class",E="promotions "+e[3]),J(()=>e[16].call(l))},m(t,o){N(t,l,o),W(l,n),W(l,r),W(l,a);for(let t=0;t<j.length;t+=1)j[t].m(a,null);W(l,i),W(l,s),W(s,c),W(s,d),W(s,p),W(p,u),W(p,m),W(p,f),W(f,h);for(let t=0;t<A.length;t+=1)A[t].m(h,null);W(h,g),W(h,b),W(p,_),W(p,x),W(x,v),W(v,y);for(let t=0;t<q.length;t+=1)q[t].m(y,null);W(v,w),W(v,$),W($,k),k.innerHTML=e[5],W($,L),W($,z),z.innerHTML=e[6],e[15](v),M=function(t,o){"static"===getComputedStyle(t).position&&(t.style.position="relative");const e=P("iframe");e.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;"),e.setAttribute("aria-hidden","true"),e.tabIndex=-1;const n=function(){if(void 0===G){G=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(t){G=!0}}return G}();let r;return n?(e.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",r=B(window,"message",t=>{t.source===e.contentWindow&&o()})):(e.src="about:blank",e.onload=()=>{r=B(e.contentWindow,"resize",o)}),W(t,e),()=>{(n||r&&e.contentWindow)&&r(),O(e)}}(l,e[16].bind(l)),e[17](l),S||(T=[B(c,"click",e[12]),B(u,"click",e[12])],S=!0)},p(o,e){if(2052&e[0]){let t;for(C=o[2],t=0;t<C.length;t+=1){var n=V(o,C,t);j[t]?j[t].p(n,e):(j[t]=X(n),j[t].c(),j[t].m(a,null))}for(;t<j.length;t+=1)j[t].d(1);j.length=C.length}if(256&e[0]){let t;for(H=o[8],t=0;t<H.length;t+=1){var r=Q(o,H,t);A[t]?A[t].p(r,e):(A[t]=Y(r),A[t].c(),A[t].m(h,g))}for(;t<A.length;t+=1)A[t].d(1);A.length=H.length}if(128&e[0]&&b.src!==(t=o[7])&&U(b,"src",t),32&e[0]&&U(b,"alt",o[5]),8704&e[0]){let t;for(D=o[9],t=0;t<D.length;t+=1){var i=K(o,D,t);q[t]?q[t].p(i,e):(q[t]=Z(i),q[t].c(),q[t].m(y,null))}for(;t<q.length;t+=1)q[t].d(1);q.length=D.length}32&e[0]&&(k.innerHTML=o[5]),64&e[0]&&(z.innerHTML=o[6]),8&e[0]&&E!==(E="promotions "+o[3])&&U(l,"class",E)},d(t){t&&O(l),I(j,t),I(A,t),I(q,t),e[15](null),M(),e[17](null),S=!1,F(T)}}}function L(t){let e,n,r;return{c(){e=P("source"),U(e,"srcset",n=t[27].pictureSource),U(e,"media",r="("+t[27].media+")")},m(t,o){N(t,e,o)},p(t,o){4&o[0]&&n!==(n=t[27].pictureSource)&&U(e,"srcset",n),4&o[0]&&r!==(r="("+t[27].media+")")&&U(e,"media",r)},d(t){t&&O(e)}}}function X(e){let n,r,i,l,a,s,c,d,p,u,m,f,h,g,b,_,x=e[30].title+"",v=e[30].content.split("</p>")[0]+"",y=e[30].image.sources,w=[];for(let t=0;t<y.length;t+=1)w[t]=L(k(e,y,t));return{c(){n=P("div"),r=P("picture");for(let t=0;t<w.length;t+=1)w[t].c();i=R(),l=P("img"),c=R(),d=P("div"),p=P("h2"),u=R(),m=P("div"),f=R(),h=P("button"),h.textContent="More info",g=R(),l.src!==(a=e[30].image.src)&&U(l,"src",a),U(l,"alt",s=e[30].title),U(r,"class","promo__picture"),U(p,"class","promo__title"),U(m,"class","promo__content text--ellipsis"),U(h,"class","promo__button"),U(d,"class","promo__details"),U(n,"class","promo")},m(t,o){N(t,n,o),W(n,r);for(let t=0;t<w.length;t+=1)w[t].m(r,null);W(r,i),W(r,l),W(n,c),W(n,d),W(d,p),p.innerHTML=x,W(d,u),W(d,m),m.innerHTML=v,W(d,f),W(d,h),W(n,g),b||(_=B(h,"click",function(){$(e[11](e[30]))&&e[11](e[30]).apply(this,arguments)}),b=!0)},p(t,o){if(e=t,4&o[0]){let t;for(y=e[30].image.sources,t=0;t<y.length;t+=1){const l=k(e,y,t);w[t]?w[t].p(l,o):(w[t]=L(l),w[t].c(),w[t].m(r,i))}for(;t<w.length;t+=1)w[t].d(1);w.length=y.length}4&o[0]&&l.src!==(a=e[30].image.src)&&U(l,"src",a),4&o[0]&&s!==(s=e[30].title)&&U(l,"alt",s),4&o[0]&&x!==(x=e[30].title+"")&&(p.innerHTML=x),4&o[0]&&v!==(v=e[30].content.split("</p>")[0]+"")&&(m.innerHTML=v)},d(t){t&&O(n),I(w,t),b=!1,_()}}}function Y(t){let e,n,r;return{c(){e=P("source"),U(e,"srcset",n=t[27].pictureSource),U(e,"media",r="("+t[27].media+")")},m(t,o){N(t,e,o)},p(t,o){256&o[0]&&n!==(n=t[27].pictureSource)&&U(e,"srcset",n),256&o[0]&&r!==(r="("+t[27].media+")")&&U(e,"media",r)},d(t){t&&O(e)}}}function Z(e){let n,r,i,l,a=e[24].tabDesc+"";return{c(){n=P("li"),r=s(a),U(n,"class","modal__tab"),U(n,"id",`tab-${e[26]}`)},m(t,o){N(t,n,o),W(n,r),i||(l=B(n,"click",function(){$(e[13](e[24],e[26]))&&e[13](e[24],e[26]).apply(this,arguments)}),i=!0)},p(t,o){e=t,512&o[0]&&a!==(a=e[24].tabDesc+"")&&(t=r,o=a,t.wholeText!==(o=""+o)&&(t.data=o))},d(t){t&&O(n),i=!1,l()}}}function d(t){let e,n=!0!==t[0]&&c(t);return{c(){n&&n.c(),e=s(""),this.c=p},m(t,o){n&&n.m(t,o),N(t,e,o)},p(t,o){!0!==t[0]?n?n.p(t,o):(n=c(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:p,o:p,d(t){n&&n.d(t),t&&O(e)}}}function x(t,o,e){var n=this&&this.__awaiter||function(t,l,a,s){return new(a=a||Promise)(function(e,o){function n(t){try{i(s.next(t))}catch(t){o(t)}}function r(t){try{i(s.throw(t))}catch(t){o(t)}}function i(t){var o;t.done?e(t.value):((o=t.value)instanceof a?o:new a(function(t){t(o)})).then(n,r)}i((s=s.apply(t,l||[])).next())})};let r,i,l,a,s,c,{endpoint:d=""}=o,{isLoading:p=!1}=o,u=[],m,f,h,g,b=[];const _=(t,o)=>{c.querySelector(".modal__tab_content").innerHTML=t.tabContent;let e=c.querySelectorAll(".modal__tab");for(let t=0;t<e.length;t++)e[t].classList.remove("modal__tab--active");c.querySelector(`#tab-${o}`).classList.add("modal__tab--active")},x={sm:640,md:768,lg:1024,xl:1280,xxl:1536};return t.$$set=t=>{"endpoint"in t&&e(14,d=t.endpoint),"isLoading"in t&&e(0,p=t.isLoading)},t.$$.update=()=>{2&t.$$.dirty[0]&&e(3,i=Object.entries(x).reduce((t,[o,e])=>[...t,r>=e?o:""],[]).join(" ")),16384&t.$$.dirty[0]&&d&&(e(0,p=!0),fetch(d).then(t=>t.json()).then(t=>{e(0,p=!1),e(2,u=t)}).catch(t=>{e(0,p=!1),console.error(t)}))},[p,r,u,i,l,"","",{},[],b,c,t=>n(void 0,void 0,void 0,function*(){e(5,m=t.title),e(6,f=t.content),e(7,h=t.image.src),e(8,g=t.image.sources),e(9,b=[{order:"0",tabContent:f,tabDesc:"Description"},...t.tabs]),a=l.querySelector(".modal"),s=window.document.querySelector("body"),a.classList.add("modal--open"),s.style.overflow="hidden",w(),yield y,_(b[0],0)}),()=>{a=l.querySelector(".modal"),s=window.document.querySelector("body"),a.classList.remove("modal--open"),s.style.overflow="initial"},_,d,function(t){v[t?"unshift":"push"](()=>{c=t,e(10,c)})},function(){r=this.clientWidth,e(1,r)},function(t){v[t?"unshift":"push"](()=>{l=t,e(4,l)})}]}"function"==typeof HTMLElement&&(a=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(u).filter($);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,o,e){this[t]=e}disconnectedCallback(){F(this.$$.on_disconnect)}$destroy(){!function(t){const o=t.$$;null!==o.fragment&&(F(o.on_destroy),o.fragment&&o.fragment.d(1),o.on_destroy=o.fragment=null,o.ctx=[])}(this),this.$destroy=p}$on(t,o){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(o),()=>{var t=e.indexOf(o);-1!==t&&e.splice(t,1)}}$set(t){this.$$set&&0!==Object.keys(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class z extends a{constructor(t){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.text--ellipsis>*{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.promotions{--bg-color:#07072a;--text-color:#ffffff;--text-color-black:#000000;--text-color-red:#FD2839;--border-color:#707070;--modal-bg-color:#F9F8F8;--modal-tabs-text-color:#8E8E8E;--modal-tabs-color:#D1D1D1;--modal-active-tab-color:#07072A;--modal-title-color:#D0046C;background-color:var(--bg-color);padding:24px 16px;color:var(--text-color)}.promotions__title{font-size:22px;font-weight:normal;margin-bottom:18px}.promotions__grid{display:grid;grid-auto-rows:220px;grid-template-columns:1fr;grid-row-gap:16px}.md .promotions__grid{grid-auto-rows:260px;grid-template-columns:repeat(2, 1fr);grid-gap:20px}.xl .promotions__grid{grid-auto-rows:260px;grid-template-columns:repeat(3, 1fr);grid-gap:30px}.promo{display:flex;position:relative;flex-direction:column;justify-content:flex-end;width:100%;height:auto;padding:12px 8px;border:1px solid var(--border-color);border-radius:5px;overflow:hidden;transition:all 150ms ease}.promo:hover{border:1px solid var(--text-color)}.promo__picture{position:absolute;width:100%;height:100%;top:0;left:0;z-index:0}.promo__picture img{width:100%;height:100%;object-fit:cover;border-radius:5px}.promo__picture::before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background:black;background:linear-gradient(0deg, black 0%, rgba(7, 7, 42, 0.2) 90%)}.promo__details{padding:0 10px 13px 17px;z-index:5}.promo__title{display:inline-block;margin-bottom:6px;font-size:18px;font-weight:normal}.promo__content{margin-bottom:15px;font-size:14px}.promo__button{font-size:14px;text-transform:uppercase;padding:10px 20px;background:none;color:var(--text-color);border:1px solid var(--text-color);border-radius:5px;cursor:pointer;transition:all 150ms ease}.promo__button:hover{background:var(--modal-title-color);border:1px solid var(--modal-title-color)}.modal{display:none;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:100}.modal--open{display:flex}.modal__backdrop{position:absolute;background-color:var(--bg-color);opacity:0.6;width:100%;height:100%;z-index:105}.modal__content{position:relative;display:flex;flex-direction:column;width:100%;background-color:var(--modal-bg-color);z-index:110;border-radius:5px}.md .modal__content{width:700px;height:70%}.modal__close{position:absolute;width:36px;height:36px;top:10px;right:10px;z-index:110;cursor:pointer;transition:all 150ms ease;color:var(--text-color)}.modal__close:hover{color:var(--text-color-red)}.modal__picture img{width:100%;height:200px;object-fit:cover;border-top:3px solid #FD2839;border-top-left-radius:5px;border-top-right-radius:5px}.md .modal__picture img{height:300px}.modal__body{padding:16px 8px;color:var(--text-color-black);height:calc(100vh - 200px);overflow-y:auto;border-top-left-radius:5px;border-top-right-radius:5px}.modal__body_title{font-size:18px;margin-bottom:10px;color:var(--modal-title-color)}.modal__body_content{font-size:14px;line-height:1.3}.modal__body_content *{margin-bottom:8px}.md .modal__body{height:calc(100vh - 300px);padding:22px 8%}.lg .modal__body{padding:30px 40px}.modal__tabs{position:relative;display:inline-flex;width:100%;flex-wrap:nowrap;gap:14px;white-space:nowrap;overflow-x:auto;margin-bottom:20px}.modal__tabs::before{content:'';position:absolute;bottom:4px;left:0;width:100%;height:2px;background-color:var(--modal-tabs-color);z-index:125}.modal__tab{background:none;border:none;padding:8px 0;color:var(--modal-tabs-text-color);font-size:14px;cursor:pointer;transition:all 150ms ease}.modal__tab--active{position:relative;color:var(--modal-active-tab-color);z-index:130}.modal__tab--active:before{content:'';left:0;bottom:-4px;position:absolute;width:100%;height:2px;background-color:var(--modal-active-tab-color)}.modal__tab:hover{color:var(--bg-color)}</style>",e(this,{target:this.shadowRoot,props:function(t){const o={};for(const e of t)o[e.name]=e.value;return o}(this.attributes),customElement:!0},x,d,o,{endpoint:14,isLoading:0},[-1,-1]),t&&(t.target&&N(t.target,this,t.anchor),t.props&&(this.$set(t.props),b()))}static get observedAttributes(){return["endpoint","isLoading"]}get endpoint(){return this.$$.ctx[14]}set endpoint(t){this.$set({endpoint:t}),b()}get isLoading(){return this.$$.ctx[0]}set isLoading(t){this.$set({isLoading:t}),b()}}return customElements.get("casino-promotions")||customElements.define("casino-promotions",z),z});
|
|
2
2
|
//# sourceMappingURL=casino-promotions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"casino-promotions.js","sources":["../../../node_modules/svelte/internal/index.mjs","../src/CasinoPromotions.svelte","../src/index.ts"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n let j = 0;\n const remove = [];\n while (j < node.attributes.length) {\n const attribute = node.attributes[j++];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n for (let k = 0; k < remove.length; k++) {\n node.removeAttribute(remove[k]);\n }\n return nodes.splice(i, 1)[0];\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n callbacks.slice().forEach(fn => fn(event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : context || []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : options.context || []),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.37.0' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * <script lang=\"ts\">\n * \timport { MyComponent } from \"component-library\";\n * </script>\n * <MyComponent foo={'bar'} />\n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to seperate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","<svelte:options tag={null}/>\n\n<script lang=\"typescript\">\n import {tick} from 'svelte';\n\n export let endpoint: string = \"\";\n export let isLoading: boolean = false;\n\n type Object = {\n title: string;\n content: string;\n image: {\n src: string;\n sources: [\n {\n media: string;\n pictureSource: string;\n }\n ];\n };\n tabs: [],\n };\n\n let promotions: Array<Object> = [];\n let elementWidth;\n let currentBreakpoint;\n let promotionsContainer;\n\n let isModalOpen: boolean = false;\n let modalContainer: HTMLElement;\n let bodyWithModal: HTMLElement;\n let promoDetailsTitle: string = '';\n let promoDetailsContent: string = '';\n let promoDetailsImage: object = {};\n let promoDetailsSources: Array<object> = [];\n let promoDetailsTabs: Array<object> = [];\n\n let modalBodyContent: HTMLElement;\n\n const getData = () => {\n isLoading = true;\n\n fetch(endpoint)\n .then((res: any) => res.json())\n .then((data: any) => {\n isLoading = false;\n promotions = data;\n })\n .catch((err: any) => {\n isLoading = false;\n console.error(err);\n });\n };\n\n const openPromoModal = async (promotion) => {\n isModalOpen = true;\n promoDetailsTitle = promotion.title;\n promoDetailsContent = promotion.content;\n promoDetailsImage = promotion.image.src;\n promoDetailsSources = promotion.image.sources;\n\n promoDetailsTabs = [{\n order: '0',\n tabContent: promoDetailsContent,\n tabDesc: 'Description',\n }, ...promotion.tabs];\n\n modalContainer = promotionsContainer.querySelector('.modal');\n bodyWithModal = window.document.querySelector('body');\n modalContainer.classList.add('modal--open');\n bodyWithModal.style.overflow = 'hidden';\n\n await tick();\n\n switchTabContent(promoDetailsTabs[0], 0);\n }\n\n const closePromoModal = () => {\n isModalOpen = false;\n modalContainer = promotionsContainer.querySelector('.modal');\n bodyWithModal = window.document.querySelector('body');\n modalContainer.classList.remove('modal--open');\n bodyWithModal.style.overflow = 'initial';\n }\n\n const switchTabContent = (tab, index) => {\n modalBodyContent.querySelector('.modal__tab_content').innerHTML = tab.tabContent;\n let modalTabs = modalBodyContent.querySelectorAll('.modal__tab');\n\n for (let i = 0; i < modalTabs.length; i++) {\n modalTabs[i].classList.remove('modal__tab--active');\n }\n\n modalBodyContent.querySelector(`#tab-${index}`).classList.add('modal__tab--active');\n }\n\n const breakpoints = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n xxl: 1536,\n };\n\n $: currentBreakpoint = Object.entries(breakpoints)\n .reduce((list, [key, value]) => {\n const match = elementWidth >= value ? key : \"\";\n return [...list, match];\n }, [])\n .join(\" \");\n\n $: endpoint && getData();\n</script>\n\n{#if isLoading !== true}\n <div class=\"promotions {currentBreakpoint}\" bind:clientWidth={elementWidth} bind:this={promotionsContainer}>\n <h1 class=\"promotions__title\">Promotions</h1>\n <div class=\"promotions__grid\">\n {#each promotions as promotion}\n <div class=\"promo\">\n <picture class=\"promo__picture\">\n {#each promotion.image.sources as imgSource}\n <source\n srcset={imgSource.pictureSource}\n media=\"({imgSource.media})\"\n />\n {/each}\n <img src={promotion.image.src} alt={promotion.title}>\n </picture>\n <div class=\"promo__details\">\n <h2 class=\"promo__title\">{@html promotion.title}</h2>\n <div class=\"promo__content text--ellipsis\">\n {@html promotion.content.split('</p>')[0]}\n </div>\n <button class=\"promo__button\" on:click={openPromoModal(promotion)}>More info</button>\n </div>\n </div>\n {/each}\n </div>\n <div class=\"promo__modal modal\">\n <div class=\"modal__backdrop\" on:click={closePromoModal}></div>\n <div class=\"modal__content\">\n <div class=\"modal__header\">\n <picture class=\"modal__picture\">\n {#each promoDetailsSources as imgSource}\n <source\n srcset={imgSource.pictureSource}\n media=\"({imgSource.media})\"\n />\n {/each}\n <img src={promoDetailsImage} alt={promoDetailsTitle}/>\n </picture>\n </div>\n <div class=\"modal__body\">\n <div class=\"modal__body_content\" bind:this={modalBodyContent}>\n <ul class=\"modal__tabs\">\n {#each promoDetailsTabs as tab, index}\n <li class=\"modal__tab\" id={`tab-${index}`} on:click={switchTabContent(tab, index)}>{tab.tabDesc}</li>\n {/each}\n </ul>\n <div class=\"modal__tabContentWrapper\">\n <h3 class=\"modal__body_title\">{@html promoDetailsTitle}</h3>\n <div class=\"modal__tab_content\">\n {@html promoDetailsContent}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"modal__close\" on:click={closePromoModal}>\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"\n d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\"></path>\n </svg>\n </div>\n\n </div>\n </div>\n{/if}\n\n<style lang=\"scss\">\n :host {\n font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';\n }\n\n /** Reset */\n *,\n *::before,\n *::after {\n margin: 0;\n padding: 0;\n list-style: none;\n text-decoration: none;\n outline: none;\n box-sizing: border-box;\n }\n\n /** Utility classes */\n .text--ellipsis > * {\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n /** Component styling */\n .promotions {\n --bg-color: #07072a;\n --text-color: #ffffff;\n --text-color-black: #000000;\n --border-color: #707070;\n --modal-bg-color: #F9F8F8;\n --modal-tabs-text-color: #8E8E8E;\n --modal-tabs-color: #D1D1D1;\n --modal-active-tab-color: #07072A;\n --modal-title-color: #D0046C;\n\n background-color: var(--bg-color);\n padding: 24px 16px;\n color: var(--text-color);\n\n &__title {\n font-size: 22px;\n font-weight: normal;\n margin-bottom: 18px;\n }\n\n &__grid {\n display: grid;\n grid-auto-rows: 220px;\n grid-template-columns: 1fr;\n grid-row-gap: 16px;\n\n .md & {\n grid-auto-rows: 260px;\n grid-template-columns: repeat(2, 1fr);\n grid-gap: 20px;\n }\n\n .xl & {\n grid-auto-rows: 260px;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 30px;\n }\n }\n }\n\n .promo {\n display: flex;\n position: relative;\n flex-direction: column;\n justify-content: flex-end;\n width: 100%;\n height: auto;\n padding: 12px 8px;\n border: 2px solid var(--border-color);\n border-radius: 5px;\n overflow: hidden;\n transition: all 150ms ease;\n\n &:hover {\n border: 2px solid var(--text-color);\n }\n\n &__picture {\n position: absolute;\n width: 100%;\n //max-width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: 0;\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n &::before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgb(0, 0, 0);\n background: linear-gradient(\n 0deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(7, 7, 42, 0.2) 90%\n );\n }\n }\n\n &__details {\n z-index: 5;\n }\n\n &__title {\n display: inline-block;\n margin-bottom: 6px;\n font-size: 18px;\n font-weight: normal;\n }\n\n &__content {\n margin-bottom: 18px;\n font-size: 14px;\n }\n\n &__button {\n font-size: 14px;\n text-transform: uppercase;\n padding: 8px 24px;\n background: none;\n color: var(--text-color);\n border: 1px solid var(--text-color);\n border-radius: 3px;\n cursor: pointer;\n transition: all 150ms ease;\n\n &:hover {\n background: var(--modal-title-color);\n border: 1px solid var(--modal-title-color);\n }\n }\n }\n\n .modal {\n display: none;\n justify-content: center;\n align-items: center;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 100;\n\n &--open {\n display: flex;\n }\n\n &__backdrop {\n position: absolute;\n background-color: var(--bg-color);\n opacity: 0.6;\n width: 100%;\n height: 100%;\n z-index: 105;\n }\n\n &__content {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n background-color: var(--modal-bg-color);\n z-index: 110;\n\n .md & {\n width: 60%;\n height: 80%;\n }\n }\n\n &__close {\n position: absolute;\n width: 36px;\n height: 36px;\n top: 16px;\n right: 16px;\n z-index: 110;\n cursor: pointer;\n transition: all 150ms ease;\n\n &:hover {\n color: var(--modal-title-color);\n }\n }\n\n &__picture img {\n width: 100%;\n height: 200px;\n object-fit: cover;\n\n .md & {\n height: 300px;\n }\n }\n\n &__body {\n padding: 16px 8px;\n color: var(--text-color-black);\n height: calc(100vh - 200px);\n overflow-y: auto;\n\n &_title {\n font-size: 18px;\n margin-bottom: 10px;\n color: var(--modal-title-color);\n }\n\n &_content {\n font-size: 14px;\n line-height: 1.3;\n\n * {\n margin-bottom: 8px;\n }\n }\n\n .md & {\n height: calc(100vh - 300px);\n padding: 22px 8%;\n }\n\n .lg & {\n padding: 28px 15%;\n }\n }\n\n\n &__tabs {\n position: relative;\n display: inline-flex;\n width: 100%;\n flex-wrap: nowrap;\n gap: 14px;\n white-space: nowrap;\n overflow-x: scroll;\n\n &::before {\n content: '';\n position: absolute;\n bottom: 4px;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: var(--modal-tabs-color);\n z-index: 125;\n }\n }\n\n &__tab {\n background: none;\n border: none;\n padding: 8px 0;\n color: var(--modal-tabs-text-color);\n font-size: 14px;\n cursor: pointer;\n transition: all 150ms ease;\n\n &--active {\n position: relative;\n color: var(--modal-active-tab-color);\n z-index: 130;\n\n &:before {\n content: '';\n left: 0;\n bottom: -5px;\n position: absolute;\n width: 100%;\n height: 4px;\n background-color: var(--modal-active-tab-color);\n }\n }\n\n &:hover {\n color: var(--bg-color);\n }\n }\n }\n</style>\n","import CasinoPromotions from './CasinoPromotions.svelte';\n!customElements.get('casino-promotions') && customElements.define('casino-promotions', CasinoPromotions);\nexport default CasinoPromotions;\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","i","length","d","element","name","document","createElement","text","data","createTextNode","space","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","value","removeAttribute","getAttribute","setAttribute","crossorigin","current_component","set_current_component","component","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","schedule_update","then","flush","add_render_callback","push","flushing","seen_callbacks","Set","$$","dirty","fragment","update","before_update","p","ctx","after_update","pop","callback","has","add","clear","outroing","init","instance","create_fragment","not_equal","props","block","parent_component","bound","on_mount","on_destroy","on_disconnect","context","Map","callbacks","skip_bound","ready","ret","rest","fill","hydrate","nodes","Array","from","childNodes","l","c","intro","delete","local","customElement","m","new_on_destroy","map","filter","SvelteElement","getComputedStyle","position","style","iframe","tabIndex","window","parent","error","is_crossorigin","unsubscribe","src","source","contentWindow","onload","pictureSource","media","title","content","split","image","sources","tabDesc","wholeText","__awaiter","this","thisArg","_arguments","P","generator","elementWidth","currentBreakpoint","promotionsContainer","modalContainer","bodyWithModal","modalBodyContent","endpoint","isLoading","promotions","promoDetailsTitle","promoDetailsContent","promoDetailsImage","promoDetailsSources","promoDetailsTabs","switchTabContent","tab","index","querySelector","innerHTML","tabContent","modalTabs","querySelectorAll","classList","remove","breakpoints","sm","md","lg","xl","xxl","entries","reduce","list","key","join","fetch","res","json","catch","err","console","promotion","order","tabs","overflow","HTMLElement","super","attachShadow","mode","slotted","_oldValue","newValue","$destroy","type","indexOf","splice","$$props","$$set","keys","attributes","result","customElements","get","define","CasinoPromotions"],"mappings":"mOAAA,SAASA,KAgBT,SAASC,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,EAElB,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,iBAANA,GAAgC,mBAANA,EAkKhF,SAASE,EAAOC,EAAQC,GACpBD,EAAOE,YAAYD,GAEvB,SAASE,EAAOH,EAAQC,EAAMG,GAC1BJ,EAAOK,aAAaJ,EAAMG,GAAU,MAExC,SAASE,EAAOL,GACZA,EAAKM,WAAWC,YAAYP,GAEhC,SAASQ,EAAaC,EAAYC,GAC9B,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAWG,OAAQD,GAAK,EACpCF,EAAWE,IACXF,EAAWE,GAAGE,EAAEH,GAG5B,SAASI,EAAQC,GACb,OAAOC,SAASC,cAAcF,GAoBlC,SAASG,EAAKC,GACV,OAAOH,SAASI,eAAeD,GAEnC,SAASE,IACL,OAAOH,EAAK,KAKhB,SAASI,EAAOtB,EAAMuB,EAAOC,EAASC,GAElC,OADAzB,EAAK0B,iBAAiBH,EAAOC,EAASC,G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AM,6BAG1B,MAAMxG,SAAEA,GAAamD,KAAKzE,GAC1ByE,KAAKzE,GAAGwB,cAAgBF,EAASwB,IAAInH,GAAKoH,OAAO5G,GAEjD,IAAK,MAAM4K,KAAOtC,KAAKzE,GAAG+H,QAEtBtD,KAAK9H,YAAY8H,KAAKzE,GAAG+H,QAAQhB,6BAGhBzI,EAAM0J,EAAWC,GACtCxD,KAAKnG,GAAQ2J,yBAGbjM,EAAQyI,KAAKzE,GAAGwB,2BAlG5B,SAA2BzC,GACvB,MAAMiB,EAAKjB,EAAUiB,GACD,OAAhBA,EAAGE,WACHlE,EAAQgE,EAAGuB,YACXvB,EAAGE,UAAYF,EAAGE,SAAS3C,EAiGC,GA9F5ByC,EAAGuB,WAAavB,EAAGE,SAAW,KAC9BF,EAAGM,IAAM,IARjB,CAqG8BmE,MAClBA,KAAKyD,SAAWxM,MAEhByM,EAAM1H,GAEN,MAAMkB,EAAa8C,KAAKzE,GAAG2B,UAAUwG,KAAU1D,KAAKzE,GAAG2B,UAAUwG,GAAQ,IAEzE,OADAxG,EAAU/B,KAAKa,GACR,KACH,IAAMqF,EAAQnE,EAAUyG,QAAQ3H,IACjB,IAAXqF,GACAnE,EAAU0G,OAAOvC,EAAO,SAG/BwC,GACG7D,KAAK8D,OAr+CkB,IAA5BzM,OAAO0M,KAq+CsBF,GAr+CZhL,SAs+CZmH,KAAKzE,GAAG4B,cACR6C,KAAK8D,MAAMD,GACX7D,KAAKzE,GAAG4B,y4HA1hCxB,SAA6B6G,GACzB,MAAMC,EAAS,GACf,IAAK,MAAMnK,KAAakK,EACpBC,EAAOnK,EAAUd,MAAQc,EAAUC,MAEvC,OAAOkK,uYErfVC,eAAeC,IAAI,sBAAwBD,eAAeE,OAAO,oBAAqBC"}
|
|
1
|
+
{"version":3,"file":"casino-promotions.js","sources":["../../../node_modules/svelte/internal/index.mjs","../src/CasinoPromotions.svelte","../src/index.ts"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n let j = 0;\n const remove = [];\n while (j < node.attributes.length) {\n const attribute = node.attributes[j++];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n for (let k = 0; k < remove.length; k++) {\n node.removeAttribute(remove[k]);\n }\n return nodes.splice(i, 1)[0];\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n callbacks.slice().forEach(fn => fn(event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : context || []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : options.context || []),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.37.0' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * <script lang=\"ts\">\n * \timport { MyComponent } from \"component-library\";\n * </script>\n * <MyComponent foo={'bar'} />\n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to seperate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","<svelte:options tag={null}/>\n\n<script lang=\"typescript\">\n import {tick} from 'svelte';\n\n export let endpoint: string = \"\";\n export let isLoading: boolean = false;\n\n type Object = {\n title: string;\n content: string;\n image: {\n src: string;\n sources: [\n {\n media: string;\n pictureSource: string;\n }\n ];\n };\n tabs: [],\n };\n\n let promotions: Array<Object> = [];\n let elementWidth;\n let currentBreakpoint;\n let promotionsContainer;\n\n let isModalOpen: boolean = false;\n let modalContainer: HTMLElement;\n let bodyWithModal: HTMLElement;\n let promoDetailsTitle: string = '';\n let promoDetailsContent: string = '';\n let promoDetailsImage: object = {};\n let promoDetailsSources: Array<object> = [];\n let promoDetailsTabs: Array<object> = [];\n\n let modalBodyContent: HTMLElement;\n\n const getData = () => {\n isLoading = true;\n\n fetch(endpoint)\n .then((res: any) => res.json())\n .then((data: any) => {\n isLoading = false;\n promotions = data;\n })\n .catch((err: any) => {\n isLoading = false;\n console.error(err);\n });\n };\n\n const openPromoModal = async (promotion) => {\n isModalOpen = true;\n promoDetailsTitle = promotion.title;\n promoDetailsContent = promotion.content;\n promoDetailsImage = promotion.image.src;\n promoDetailsSources = promotion.image.sources;\n\n promoDetailsTabs = [{\n order: '0',\n tabContent: promoDetailsContent,\n tabDesc: 'Description',\n }, ...promotion.tabs];\n\n modalContainer = promotionsContainer.querySelector('.modal');\n bodyWithModal = window.document.querySelector('body');\n modalContainer.classList.add('modal--open');\n bodyWithModal.style.overflow = 'hidden';\n\n await tick();\n\n switchTabContent(promoDetailsTabs[0], 0);\n }\n\n const closePromoModal = () => {\n isModalOpen = false;\n modalContainer = promotionsContainer.querySelector('.modal');\n bodyWithModal = window.document.querySelector('body');\n modalContainer.classList.remove('modal--open');\n bodyWithModal.style.overflow = 'initial';\n }\n\n const switchTabContent = (tab, index) => {\n modalBodyContent.querySelector('.modal__tab_content').innerHTML = tab.tabContent;\n let modalTabs = modalBodyContent.querySelectorAll('.modal__tab');\n\n for (let i = 0; i < modalTabs.length; i++) {\n modalTabs[i].classList.remove('modal__tab--active');\n }\n\n modalBodyContent.querySelector(`#tab-${index}`).classList.add('modal__tab--active');\n }\n\n const breakpoints = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n xxl: 1536,\n };\n\n $: currentBreakpoint = Object.entries(breakpoints)\n .reduce((list, [key, value]) => {\n const match = elementWidth >= value ? key : \"\";\n return [...list, match];\n }, [])\n .join(\" \");\n\n $: endpoint && getData();\n</script>\n\n{#if isLoading !== true}\n <div class=\"promotions {currentBreakpoint}\" bind:clientWidth={elementWidth} bind:this={promotionsContainer}>\n <h1 class=\"promotions__title\">Promotions</h1>\n <div class=\"promotions__grid\">\n {#each promotions as promotion}\n <div class=\"promo\">\n <picture class=\"promo__picture\">\n {#each promotion.image.sources as imgSource}\n <source\n srcset={imgSource.pictureSource}\n media=\"({imgSource.media})\"\n />\n {/each}\n <img src={promotion.image.src} alt={promotion.title}>\n </picture>\n <div class=\"promo__details\">\n <h2 class=\"promo__title\">{@html promotion.title}</h2>\n <div class=\"promo__content text--ellipsis\">\n {@html promotion.content.split('</p>')[0]}\n </div>\n <button class=\"promo__button\" on:click={openPromoModal(promotion)}>More info</button>\n </div>\n </div>\n {/each}\n </div>\n <div class=\"promo__modal modal\">\n <div class=\"modal__backdrop\" on:click={closePromoModal}></div>\n <div class=\"modal__content\">\n <div class=\"modal__close\" on:click={closePromoModal}>\n <svg class=\"w-6 h-6\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\"></path></svg>\n </div>\n <div class=\"modal__header\">\n <picture class=\"modal__picture\">\n {#each promoDetailsSources as imgSource}\n <source\n srcset={imgSource.pictureSource}\n media=\"({imgSource.media})\"\n />\n {/each}\n <img src={promoDetailsImage} alt={promoDetailsTitle}/>\n </picture>\n </div>\n <div class=\"modal__body\">\n <div class=\"modal__body_content\" bind:this={modalBodyContent}>\n <ul class=\"modal__tabs\">\n {#each promoDetailsTabs as tab, index}\n <li class=\"modal__tab\" id={`tab-${index}`} on:click={switchTabContent(tab, index)}>{tab.tabDesc}</li>\n {/each}\n </ul>\n <div class=\"modal__tabContentWrapper\">\n <h3 class=\"modal__body_title\">{@html promoDetailsTitle}</h3>\n <div class=\"modal__tab_content\">\n {@html promoDetailsContent}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n{/if}\n\n<style lang=\"scss\">\n :host {\n font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';\n }\n\n /** Reset */\n *,\n *::before,\n *::after {\n margin: 0;\n padding: 0;\n list-style: none;\n text-decoration: none;\n outline: none;\n box-sizing: border-box;\n }\n\n /** Utility classes */\n .text--ellipsis > * {\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n /** Component styling */\n .promotions {\n --bg-color: #07072a;\n --text-color: #ffffff;\n --text-color-black: #000000;\n --text-color-red: #FD2839;\n --border-color: #707070;\n --modal-bg-color: #F9F8F8;\n --modal-tabs-text-color: #8E8E8E;\n --modal-tabs-color: #D1D1D1;\n --modal-active-tab-color: #07072A;\n --modal-title-color: #D0046C;\n\n background-color: var(--bg-color);\n padding: 24px 16px;\n color: var(--text-color);\n\n &__title {\n font-size: 22px;\n font-weight: normal;\n margin-bottom: 18px;\n }\n\n &__grid {\n display: grid;\n grid-auto-rows: 220px;\n grid-template-columns: 1fr;\n grid-row-gap: 16px;\n\n .md & {\n grid-auto-rows: 260px;\n grid-template-columns: repeat(2, 1fr);\n grid-gap: 20px;\n }\n\n .xl & {\n grid-auto-rows: 260px;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 30px;\n }\n }\n }\n\n .promo {\n display: flex;\n position: relative;\n flex-direction: column;\n justify-content: flex-end;\n width: 100%;\n height: auto;\n padding: 12px 8px;\n border: 1px solid var(--border-color);\n border-radius: 5px;\n overflow: hidden;\n transition: all 150ms ease;\n\n &:hover {\n border: 1px solid var(--text-color);\n }\n\n &__picture {\n position: absolute;\n width: 100%;\n //max-width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: 0;\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 5px;\n }\n\n &::before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgb(0, 0, 0);\n background: linear-gradient(\n 0deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(7, 7, 42, 0.2) 90%\n );\n }\n }\n\n &__details {\n padding: 0 10px 13px 17px;\n z-index: 5;\n }\n\n &__title {\n display: inline-block;\n margin-bottom: 6px;\n font-size: 18px;\n font-weight: normal;\n }\n\n &__content {\n margin-bottom: 15px;\n font-size: 14px;\n }\n\n &__button {\n font-size: 14px;\n text-transform: uppercase;\n padding: 10px 20px;\n background: none;\n color: var(--text-color);\n border: 1px solid var(--text-color);\n border-radius: 5px;\n cursor: pointer;\n transition: all 150ms ease;\n\n &:hover {\n background: var(--modal-title-color);\n border: 1px solid var(--modal-title-color);\n }\n }\n }\n\n .modal {\n display: none;\n justify-content: center;\n align-items: center;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 100;\n\n &--open {\n display: flex;\n }\n\n &__backdrop {\n position: absolute;\n background-color: var(--bg-color);\n opacity: 0.6;\n width: 100%;\n height: 100%;\n z-index: 105;\n }\n\n &__content {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n background-color: var(--modal-bg-color);\n z-index: 110;\n border-radius: 5px;\n\n .md & {\n width: 700px;\n height: 70%;\n }\n }\n\n &__close {\n position: absolute;\n width: 36px;\n height: 36px;\n top: 10px;\n right: 10px;\n z-index: 110;\n cursor: pointer;\n transition: all 150ms ease;\n color: var(--text-color);\n\n\n &:hover {\n color: var(--text-color-red);\n }\n }\n\n &__picture img {\n width: 100%;\n height: 200px;\n object-fit: cover;\n border-top: 3px solid #FD2839;\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n\n .md & {\n height: 300px;\n }\n }\n\n &__body {\n padding: 16px 8px;\n color: var(--text-color-black);\n height: calc(100vh - 200px);\n overflow-y: auto;\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n\n &_title {\n font-size: 18px;\n margin-bottom: 10px;\n color: var(--modal-title-color);\n }\n\n &_content {\n font-size: 14px;\n line-height: 1.3;\n\n * {\n margin-bottom: 8px;\n }\n }\n\n .md & {\n height: calc(100vh - 300px);\n padding: 22px 8%;\n }\n\n .lg & {\n padding: 30px 40px;\n }\n }\n\n\n &__tabs {\n position: relative;\n display: inline-flex;\n width: 100%;\n flex-wrap: nowrap;\n gap: 14px;\n white-space: nowrap;\n overflow-x: auto;\n margin-bottom: 20px;\n\n &::before {\n content: '';\n position: absolute;\n bottom: 4px;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: var(--modal-tabs-color);\n z-index: 125;\n }\n }\n\n &__tab {\n background: none;\n border: none;\n padding: 8px 0;\n color: var(--modal-tabs-text-color);\n font-size: 14px;\n cursor: pointer;\n transition: all 150ms ease;\n\n &--active {\n position: relative;\n color: var(--modal-active-tab-color);\n z-index: 130;\n\n &:before {\n content: '';\n left: 0;\n bottom: -4px;\n position: absolute;\n width: 100%;\n height: 2px;\n background-color: var(--modal-active-tab-color);\n }\n }\n\n &:hover {\n color: var(--bg-color);\n }\n }\n }\n</style>\n","import CasinoPromotions from './CasinoPromotions.svelte';\n!customElements.get('casino-promotions') && customElements.define('casino-promotions', CasinoPromotions);\nexport default CasinoPromotions;\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","i","length","d","element","name","document","createElement","text","data","createTextNode","space","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","value","removeAttribute","getAttribute","setAttribute","crossorigin","current_component","set_current_component","component","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","schedule_update","then","flush","add_render_callback","push","flushing","seen_callbacks","Set","$$","dirty","fragment","update","before_update","p","ctx","after_update","pop","callback","has","add","clear","outroing","init","instance","create_fragment","not_equal","props","block","parent_component","bound","on_mount","on_destroy","on_disconnect","context","Map","callbacks","skip_bound","ready","ret","rest","fill","hydrate","nodes","Array","from","childNodes","l","c","intro","delete","local","customElement","m","new_on_destroy","map","filter","SvelteElement","getComputedStyle","position","style","iframe","tabIndex","window","parent","error","is_crossorigin","unsubscribe","src","source","contentWindow","onload","pictureSource","media","title","content","split","image","sources","tabDesc","wholeText","__awaiter","this","thisArg","_arguments","P","generator","elementWidth","currentBreakpoint","promotionsContainer","modalContainer","bodyWithModal","modalBodyContent","endpoint","isLoading","promotions","promoDetailsTitle","promoDetailsContent","promoDetailsImage","promoDetailsSources","promoDetailsTabs","switchTabContent","tab","index","querySelector","innerHTML","tabContent","modalTabs","querySelectorAll","classList","remove","breakpoints","sm","md","lg","xl","xxl","entries","reduce","list","key","join","fetch","res","json","catch","err","console","promotion","order","tabs","overflow","HTMLElement","super","attachShadow","mode","slotted","_oldValue","newValue","$destroy","type","indexOf","splice","$$props","$$set","keys","attributes","result","customElements","get","define","CasinoPromotions"],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iGC,GA9F5ByC,EAAGuB,WAAavB,EAAGE,SAAW,KAC9BF,EAAGM,IAAM,IARjB,CAqG8BmE,MAClBA,KAAKyD,SAAWxM,MAEhByM,EAAM1H,GAEN,MAAMkB,EAAa8C,KAAKzE,GAAG2B,UAAUwG,KAAU1D,KAAKzE,GAAG2B,UAAUwG,GAAQ,IAEzE,OADAxG,EAAU/B,KAAKa,GACR,KACH,IAAMqF,EAAQnE,EAAUyG,QAAQ3H,IACjB,IAAXqF,GACAnE,EAAU0G,OAAOvC,EAAO,SAG/BwC,GACG7D,KAAK8D,OAr+CkB,IAA5BzM,OAAO0M,KAq+CsBF,GAr+CZhL,SAs+CZmH,KAAKzE,GAAG4B,cACR6C,KAAK8D,MAAMD,GACX7D,KAAKzE,GAAG4B,opIA1hCxB,SAA6B6G,GACzB,MAAMC,EAAS,GACf,IAAK,MAAMnK,KAAakK,EACpBC,EAAOnK,EAAUd,MAAQc,EAAUC,MAEvC,OAAOkK,uYErfVC,eAAeC,IAAI,sBAAwBD,eAAeE,OAAO,oBAAqBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/casino-promotions",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.201",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "71051531499cfea745b53a0f7c0a77a252990ae7"
|
|
40
40
|
}
|
|
@@ -140,6 +140,9 @@
|
|
|
140
140
|
<div class="promo__modal modal">
|
|
141
141
|
<div class="modal__backdrop" on:click={closePromoModal}></div>
|
|
142
142
|
<div class="modal__content">
|
|
143
|
+
<div class="modal__close" on:click={closePromoModal}>
|
|
144
|
+
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
|
|
145
|
+
</div>
|
|
143
146
|
<div class="modal__header">
|
|
144
147
|
<picture class="modal__picture">
|
|
145
148
|
{#each promoDetailsSources as imgSource}
|
|
@@ -167,13 +170,6 @@
|
|
|
167
170
|
</div>
|
|
168
171
|
</div>
|
|
169
172
|
</div>
|
|
170
|
-
<div class="modal__close" on:click={closePromoModal}>
|
|
171
|
-
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
172
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
173
|
-
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
|
174
|
-
</svg>
|
|
175
|
-
</div>
|
|
176
|
-
|
|
177
173
|
</div>
|
|
178
174
|
</div>
|
|
179
175
|
{/if}
|
|
@@ -208,6 +204,7 @@
|
|
|
208
204
|
--bg-color: #07072a;
|
|
209
205
|
--text-color: #ffffff;
|
|
210
206
|
--text-color-black: #000000;
|
|
207
|
+
--text-color-red: #FD2839;
|
|
211
208
|
--border-color: #707070;
|
|
212
209
|
--modal-bg-color: #F9F8F8;
|
|
213
210
|
--modal-tabs-text-color: #8E8E8E;
|
|
@@ -253,13 +250,13 @@
|
|
|
253
250
|
width: 100%;
|
|
254
251
|
height: auto;
|
|
255
252
|
padding: 12px 8px;
|
|
256
|
-
border:
|
|
253
|
+
border: 1px solid var(--border-color);
|
|
257
254
|
border-radius: 5px;
|
|
258
255
|
overflow: hidden;
|
|
259
256
|
transition: all 150ms ease;
|
|
260
257
|
|
|
261
258
|
&:hover {
|
|
262
|
-
border:
|
|
259
|
+
border: 1px solid var(--text-color);
|
|
263
260
|
}
|
|
264
261
|
|
|
265
262
|
&__picture {
|
|
@@ -275,6 +272,7 @@
|
|
|
275
272
|
width: 100%;
|
|
276
273
|
height: 100%;
|
|
277
274
|
object-fit: cover;
|
|
275
|
+
border-radius: 5px;
|
|
278
276
|
}
|
|
279
277
|
|
|
280
278
|
&::before {
|
|
@@ -294,6 +292,7 @@
|
|
|
294
292
|
}
|
|
295
293
|
|
|
296
294
|
&__details {
|
|
295
|
+
padding: 0 10px 13px 17px;
|
|
297
296
|
z-index: 5;
|
|
298
297
|
}
|
|
299
298
|
|
|
@@ -305,18 +304,18 @@
|
|
|
305
304
|
}
|
|
306
305
|
|
|
307
306
|
&__content {
|
|
308
|
-
margin-bottom:
|
|
307
|
+
margin-bottom: 15px;
|
|
309
308
|
font-size: 14px;
|
|
310
309
|
}
|
|
311
310
|
|
|
312
311
|
&__button {
|
|
313
312
|
font-size: 14px;
|
|
314
313
|
text-transform: uppercase;
|
|
315
|
-
padding:
|
|
314
|
+
padding: 10px 20px;
|
|
316
315
|
background: none;
|
|
317
316
|
color: var(--text-color);
|
|
318
317
|
border: 1px solid var(--text-color);
|
|
319
|
-
border-radius:
|
|
318
|
+
border-radius: 5px;
|
|
320
319
|
cursor: pointer;
|
|
321
320
|
transition: all 150ms ease;
|
|
322
321
|
|
|
@@ -358,10 +357,11 @@
|
|
|
358
357
|
width: 100%;
|
|
359
358
|
background-color: var(--modal-bg-color);
|
|
360
359
|
z-index: 110;
|
|
360
|
+
border-radius: 5px;
|
|
361
361
|
|
|
362
362
|
.md & {
|
|
363
|
-
width:
|
|
364
|
-
height:
|
|
363
|
+
width: 700px;
|
|
364
|
+
height: 70%;
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
|
|
@@ -369,14 +369,16 @@
|
|
|
369
369
|
position: absolute;
|
|
370
370
|
width: 36px;
|
|
371
371
|
height: 36px;
|
|
372
|
-
top:
|
|
373
|
-
right:
|
|
372
|
+
top: 10px;
|
|
373
|
+
right: 10px;
|
|
374
374
|
z-index: 110;
|
|
375
375
|
cursor: pointer;
|
|
376
376
|
transition: all 150ms ease;
|
|
377
|
+
color: var(--text-color);
|
|
378
|
+
|
|
377
379
|
|
|
378
380
|
&:hover {
|
|
379
|
-
color: var(--
|
|
381
|
+
color: var(--text-color-red);
|
|
380
382
|
}
|
|
381
383
|
}
|
|
382
384
|
|
|
@@ -384,6 +386,9 @@
|
|
|
384
386
|
width: 100%;
|
|
385
387
|
height: 200px;
|
|
386
388
|
object-fit: cover;
|
|
389
|
+
border-top: 3px solid #FD2839;
|
|
390
|
+
border-top-left-radius: 5px;
|
|
391
|
+
border-top-right-radius: 5px;
|
|
387
392
|
|
|
388
393
|
.md & {
|
|
389
394
|
height: 300px;
|
|
@@ -395,6 +400,8 @@
|
|
|
395
400
|
color: var(--text-color-black);
|
|
396
401
|
height: calc(100vh - 200px);
|
|
397
402
|
overflow-y: auto;
|
|
403
|
+
border-top-left-radius: 5px;
|
|
404
|
+
border-top-right-radius: 5px;
|
|
398
405
|
|
|
399
406
|
&_title {
|
|
400
407
|
font-size: 18px;
|
|
@@ -417,7 +424,7 @@
|
|
|
417
424
|
}
|
|
418
425
|
|
|
419
426
|
.lg & {
|
|
420
|
-
padding:
|
|
427
|
+
padding: 30px 40px;
|
|
421
428
|
}
|
|
422
429
|
}
|
|
423
430
|
|
|
@@ -429,7 +436,8 @@
|
|
|
429
436
|
flex-wrap: nowrap;
|
|
430
437
|
gap: 14px;
|
|
431
438
|
white-space: nowrap;
|
|
432
|
-
overflow-x:
|
|
439
|
+
overflow-x: auto;
|
|
440
|
+
margin-bottom: 20px;
|
|
433
441
|
|
|
434
442
|
&::before {
|
|
435
443
|
content: '';
|
|
@@ -460,10 +468,10 @@
|
|
|
460
468
|
&:before {
|
|
461
469
|
content: '';
|
|
462
470
|
left: 0;
|
|
463
|
-
bottom: -
|
|
471
|
+
bottom: -4px;
|
|
464
472
|
position: absolute;
|
|
465
473
|
width: 100%;
|
|
466
|
-
height:
|
|
474
|
+
height: 2px;
|
|
467
475
|
background-color: var(--modal-active-tab-color);
|
|
468
476
|
}
|
|
469
477
|
}
|