All files / projects-dev/apps/storybook/storybook-static Components-Leaderboard-stories.3bcdcc1b.iframe.bundle.js

0% Statements 0/1
0% Branches 0/1
0% Functions 0/1
0% Lines 0/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 
(self.webpackChunkstorybook=self.webpackChunkstorybook||[]).push([[176],{"./stories/Components/Leaderboard.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("../../libs/ui/leaderboard/public/build/bundle.js");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Leaderboard"},Default=(({title,data})=>`\n        <jga-ui-leaderboard\n            title="${title}"\n            data='${JSON.stringify(data)}'\n        >\n        </jga-ui-leaderboard>\n    `).bind({});Default.args={title:"Best Movies",data:[{name:"Star Wars",value:"$460,935,665"},{name:"Howard The Duck",value:"$16,295,774"},{name:"Americam Graffiti",value:"$115,000,000"}]},Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"({\n  title,\n  data\n}) => {\n  return `\n        <jga-ui-leaderboard\n            title=\"${title}\"\n            data='${JSON.stringify(data)}'\n        >\n        </jga-ui-leaderboard>\n    `;\n}",...Default.parameters?.docs?.source}}};const __namedExportsOrder=["Default"]},"../../libs/ui/leaderboard/public/build/bundle.js":()=>{!function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function r(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e}function i(t,e){t.appendChild(e)}function l(t,e,n){t.insertBefore(e,n||null)}function c(t){t.parentNode&&t.parentNode.removeChild(t)}function $(t){return document.createElement(t)}function d(t){return document.createTextNode(t)}function u(){return d(" ")}function h(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function f(t,e){e=""+e,t.data!==e&&(t.data=e)}let p;function b(t){p=t}const m=[],y=[];let x=[];const v=[],_=Promise.resolve();let w=!1;function k(t){x.push(t)}const E=new Set;let O=0;function A(){if(0!==O)return;const t=p;do{try{for(;O<m.length;){const t=m[O];O++,b(t),N(t.$$)}}catch(t){throw m.length=0,O=0,t}for(b(null),m.length=0,O=0;y.length;)y.pop()();for(let t=0;t<x.length;t+=1){const e=x[t];E.has(e)||(E.add(e),e())}x.length=0}while(m.length);for(;v.length;)v.pop()();w=!1,E.clear(),b(t)}function N(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(k)}}const j=new Set;function C(t){return void 0!==t?.length?t:Array.from(t)}function z(t,e){-1===t.$$.dirty[0]&&(m.push(t),w||(w=!0,_.then(A)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function P(s,i,a,l,$,d,u=null,h=[-1]){const f=p;b(s);const g=s.$$={fragment:null,ctx:[],props:d,update:t,not_equal:$,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i.context||(f?f.$$.context:[])),callbacks:n(),dirty:h,skip_bound:!1,root:i.target||f.$$.root};u&&u(g.root);let m=!1;if(g.ctx=a?a(s,i.props||{},((t,e,...n)=>{const o=n.length?n[0]:e;return g.ctx&&$(g.ctx[t],g.ctx[t]=o)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](o),m&&z(s,t)),e})):[],g.update(),m=!0,o(g.before_update),g.fragment=!!l&&l(g.ctx),i.target){if(i.hydrate){const t=function(t){return Array.from(t.childNodes)}(i.target);g.fragment&&g.fragment.l(t),t.forEach(c)}else g.fragment&&g.fragment.c();i.intro&&(y=s.$$.fragment)&&y.i&&(j.delete(y),y.i(undefined)),function(t,n,s){const{fragment:i,after_update:a}=t.$$;i&&i.m(n,s),k((()=>{const n=t.$$.on_mount.map(e).filter(r);t.$$.on_destroy?t.$$.on_destroy.push(...n):o(n),t.$$.on_mount=[]})),a.forEach(k)}(s,i.target,i.anchor),A()}var y;b(f)}let S;function B(t,e,n,o){const r=n[t]?.type;if(e="Boolean"===r&&"boolean"!=typeof e?null!=e:e,!o||!n[t])return e;if("toAttribute"===o)switch(r){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}"function"==typeof HTMLElement&&(S=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;constructor(t,e,n){super(),this.$$ctor=t,this.$$s=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn)return;function t(t){return()=>{let e;return{c:function(){e=$("slot"),"default"!==t&&h(e,"name",t)},m:function(t,n){l(t,e,n)},d:function(t){t&&c(e)}}}}const e={},n=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const r of this.$$s)r in n&&(e[r]=[t(r)]);for(const s of this.attributes){const i=this.$$g_p(s.name);i in this.$$d||(this.$$d[i]=B(i,s.value,this.$$p_d,"toProp"))}for(const a in this.$$p_d)a in this.$$d||void 0===this[a]||(this.$$d[a]=this[a],delete this[a]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$scope:{ctx:[]}}});const o=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=B(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(this.$$p_d[t].attribute||t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const d in this.$$l)for(const u of this.$$l[d]){const f=this.$$c.$on(d,u);this.$$l_u.set(u,f)}this.$$l={}}}attributeChangedCallback(t,e,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=B(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});class M{$$=void 0;$$set=void 0;$destroy(){(function L(t,e){const n=t.$$;null!==n.fragment&&(function(t){const e=[],n=[];x.forEach((o=>-1===t.indexOf(o)?e.push(o):n.push(o))),n.forEach((t=>t())),x=e}(n.after_update),o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])})(this,1),this.$destroy=t}$on(e,n){if(!r(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function J(t){!function a(t,e,n){const o=function(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}(t);if(!o.getElementById(e)){const t=$("style");t.id=e,t.textContent=n,function(t,e){i(t.head||t,e),e.sheet}(o,t)}}(t,"svelte-10y19da",'.leaderboard.svelte-10y19da.svelte-10y19da{background:linear-gradient(to bottom, #3a404d, #181c26);border-radius:10px;box-shadow:0 7px 30px rgba(62, 9, 11, 0.3);position:relative}.leaderboard.svelte-10y19da h1.svelte-10y19da{color:#e1e1e1;font-size:18px;margin-bottom:0;padding:12px 13px 18px}.leaderboard.svelte-10y19da ol.svelte-10y19da{counter-reset:leaderboard;margin-top:0}.leaderboard.svelte-10y19da ol li.svelte-10y19da{backface-visibility:hidden;counter-increment:leaderboard;cursor:pointer;font-size:14px;padding:18px 10px 18px 50px;position:relative;transform:translateZ(0) scale(1, 1);z-index:1}.leaderboard.svelte-10y19da ol li.svelte-10y19da::before{background:#fff;border-radius:20px;color:#c24448;content:counter(leaderboard);height:20px;left:15px;line-height:20px;position:absolute;text-align:center;top:15px;width:20px;z-index:2}.leaderboard.svelte-10y19da ol li mark.svelte-10y19da{background:none;color:#fff;height:100%;left:0;margin:0;padding:18px 10px 18px 50px;position:absolute;top:0;width:50%;z-index:2}.leaderboard.svelte-10y19da ol li mark.svelte-10y19da::before,.leaderboard.svelte-10y19da ol li mark.svelte-10y19da::after{border-left:10px solid transparent;border-top:10px solid #c24448;bottom:-11px;content:"";left:-9px;opacity:0;position:absolute;transition:all 0.1s ease-in-out;z-index:1}.leaderboard.svelte-10y19da ol li mark.svelte-10y19da::after{border-left:none;border-right:10px solid transparent;left:auto;right:-9px}')}function R(t,e,n){const o=t.slice();return o[3]=e[n],o[5]=n,o}function T(t){let e,n,o,r,s,a,p,b=t[3].name+"",g=t[3].value+"";return{c(){e=$("li"),n=$("mark"),o=d(b),r=d(" ("),s=d(g),a=d(")"),p=u(),h(n,"class","svelte-10y19da"),h(e,"class","svelte-10y19da")},m(t,c){l(t,e,c),i(e,n),i(n,o),i(n,r),i(n,s),i(n,a),i(e,p)},p(t,e){1&e&&b!==(b=t[3].name+"")&&f(o,b),1&e&&g!==(g=t[3].value+"")&&f(s,g)},d(t){t&&c(e)}}}function D(e){let n,o,r,s,a,p=C(e[0]),b=[];for(let t=0;t<p.length;t+=1)b[t]=T(R(e,p,t));return{c(){n=$("div"),o=$("h1"),r=d(e[1]),s=u(),a=$("ol");for(let t=0;t<b.length;t+=1)b[t].c();h(o,"class","svelte-10y19da"),h(a,"class","svelte-10y19da"),h(n,"class","leaderboard svelte-10y19da")},m(t,e){l(t,n,e),i(n,o),i(o,r),i(n,s),i(n,a);for(let t=0;t<b.length;t+=1)b[t]&&b[t].m(a,null)},p(t,[e]){if(2&e&&f(r,t[1]),1&e){let n;for(p=C(t[0]),n=0;n<p.length;n+=1){const o=R(t,p,n);b[n]?b[n].p(o,e):(b[n]=T(o),b[n].c(),b[n].m(a,null))}for(;n<b.length;n+=1)b[n].d(1);b.length=p.length}},i:t,o:t,d(t){t&&c(n),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(b,t)}}}function H(t,e,n){let{title:o=""}=e,{data:r=[]}=e,{lines:s=[]}=e;return function g(t){(function(){if(!p)throw new Error("Function called outside component initialization");return p})().$$.on_mount.push(t)}((()=>{n(0,s="string"==typeof r?JSON.parse(r):r)})),t.$$set=t=>{"title"in t&&n(1,o=t.title),"data"in t&&n(2,r=t.data),"lines"in t&&n(0,s=t.lines)},[s,o,r]}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");class q extends M{constructor(t){super(),P(this,t,H,D,s,{title:1,data:2,lines:0},J)}get title(){return this.$$.ctx[1]}set title(t){this.$$set({title:t}),A()}get data(){return this.$$.ctx[2]}set data(t){this.$$set({data:t}),A()}get lines(){return this.$$.ctx[0]}set lines(t){this.$$set({lines:t}),A()}}customElements.define("jga-ui-leaderboard",function(t,e,n,o,r,s){let i=class extends S{constructor(){super(t,n,true),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map((t=>(e[t].attribute||t).toLowerCase()))}};return Object.keys(e).forEach((t=>{Object.defineProperty(i.prototype,t,{get(){return this.$$c&&t in this.$$c?this.$$c[t]:this.$$d[t]},set(n){n=B(t,n,e),this.$$d[t]=n,this.$$c?.$set({[t]:n})}})})),[].forEach((t=>{Object.defineProperty(i.prototype,t,{get(){return this.$$c?.[t]}})})),t.element=i,i}(q,{title:{},data:{},lines:{}},[]))}()}}]);