@everymatrix/general-icon-progress-bar 1.12.7 → 1.13.0

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.
@@ -80,12 +80,12 @@ if(!i(r))return t;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return
80
80
  /**
81
81
  * Creates a `Readable` store that allows reading by subscription.
82
82
  * @param value initial value
83
- * @param {StartStopNotifier}start start and stop notifications for subscriptions
83
+ * @param {StartStopNotifier} [start]
84
84
  */
85
85
  /**
86
86
  * Create a `Writable` store that allows both updating and reading by subscription.
87
87
  * @param {*=}value initial value
88
- * @param {StartStopNotifier=}start start and stop notifications for subscriptions
88
+ * @param {StartStopNotifier=} start
89
89
  */
90
90
  function O(e,r=t){let n;const i=new Set;function s(t){if(o(e,t)&&(e=t,n)){// store is ready
91
91
  const t=!w.length;for(const t of i)t[1](),w.push(t,e);if(t){for(let t=0;t<w.length;t+=2)w[t][0](w[t+1]);w.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(o,a=t){const h=[o,a];return i.add(h),1===i.size&&(n=r(s)||t),o(e),()=>{i.delete(h),0===i.size&&n&&(n(),n=null)}}}}function R(e,r,o){const a=!Array.isArray(e),h=a?[e]:e,u=r.length<2;return c=e=>{let o=!1;const c=[];let l=0,f=t;const p=()=>{if(l)return;f();const n=r(a?c[0]:c,e);u?e(n):f=i(n)?n:t},m=h.map(((t,e)=>s(t,(t=>{c[e]=t,l&=~(1<<e),o&&p()}),(()=>{l|=1<<e}))));return o=!0,p(),function(){n(m),f(),
@@ -106,7 +106,7 @@ r.cloneUnlessOtherwiseSpecified=G;var n=Array.isArray(e);return n===Array.isArra
106
106
  */
107
107
  function Q(t){return t.type===Y.literal}function J(t){return t.type===Y.argument}function q(t){return t.type===Y.number}function tt(t){return t.type===Y.date}function et(t){return t.type===Y.time}function rt(t){return t.type===Y.select}function nt(t){return t.type===Y.plural}function it(t){return t.type===Y.pound}function ot(t){return t.type===Y.tag}function st(t){return!(!t||"object"!=typeof t||t.type!==Z.number)}function at(t){return!(!t||"object"!=typeof t||t.type!==Z.dateTime)}
108
108
  // @generated from regex-gen.ts
109
- !function(t){
109
+ "function"==typeof SuppressedError&&SuppressedError,function(t){
110
110
  /** Argument is unclosed (e.g. `{0`) */
111
111
  t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",
112
112
  /** Argument is empty (e.g. `{}`). */
@@ -581,7 +581,7 @@ t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"}
581
581
  Copyrights licensed under the New BSD License.
582
582
  See the accompanying LICENSE file for terms.
583
583
  */const de={},ye=(t,e,r)=>r?(e in de||(de[e]={}),t in de[e]||(de[e][t]=r),r):r,ve=(t,e)=>{if(null==e)return;if(e in de&&t in de[e])return de[e][t];const r=Ge(e);for(let n=0;n<r.length;n++){const i=_e(r[n],t);if(i)return ye(t,e,i)}};let He;const Te=O({});function Be(t){return t in He}function _e(t,e){if(!Be(t))return null;const r=function(t){return He[t]||null}(t);return function(t,e){if(null==e)return;if(e in t)return t[e];const r=e.split(".");let n=t;for(let t=0;t<r.length;t++)if("object"==typeof n){if(t>0){const e=r.slice(t,r.length).join(".");if(e in n){n=n[e];break}}n=n[r[t]]}else n=void 0;return n}(r,e)}function Ae(t,...e){delete de[t],Te.update((r=>(r[t]=j.all([r[t]||{},...e]),r)))}R([Te],(([t])=>Object.keys(t))),Te.subscribe((t=>He=t));const Se={};function Pe(t){return Se[t]}function Le(t){return null!=t&&Ge(t).some((t=>{var e;return null===(e=Pe(t))||void 0===e?void 0:e.size}))}const Ne={};function Ie(t){if(!Le(t))return t in Ne?Ne[t]:Promise.resolve();const e=function(t){return Ge(t).map((t=>{const e=Pe(t);return[t,e?[...e]:[]]})).filter((([,t])=>t.length>0))}(t);return Ne[t]=Promise.all(e.map((([t,e])=>function(t,e){const r=Promise.all(e.map((e=>(function(t,e){Se[t].delete(e),0===Se[t].size&&delete Se[t]}(t,e),e().then((t=>t.default||t))))));return r.then((e=>Ae(t,...e)))}(t,e)))).then((()=>{if(Le(t))return Ie(t);delete Ne[t]})),Ne[t]}const Ce={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function we(){return Ce}const Oe=O(!1);let Re;const Me=O(null);function Ue(t){return t.split("-").map(((t,e,r)=>r.slice(0,e+1).join("-"))).reverse()}function Ge(t,e=we().fallbackLocale){const r=Ue(t);return e?[...new Set([...r,...Ue(e)])]:r}function De(){return null!=Re?Re:void 0}Me.subscribe((t=>{Re=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const $e={...Me,set:t=>{if(t&&function(t){if(null==t)return;const e=Ge(t);for(let t=0;t<e.length;t++){const r=e[t];if(Be(r))return r}}(t)&&Le(t)){const{loadingDelay:e}=we();let r;return"undefined"!=typeof window&&null!=De()&&e?r=window.setTimeout((()=>Oe.set(!0)),e):Oe.set(!0),Ie(t).then((()=>{Me.set(t)})).finally((()=>{clearTimeout(r),Oe.set(!1)}))}return Me.set(t)}},Fe=t=>{const e=Object.create(null);return r=>{const n=JSON.stringify(r);return n in e?e[n]:e[n]=t(r)}},ke=(t,e)=>{const{formats:r}=we();if(t in r&&e in r[t])return r[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},xe=Fe((({locale:t,format:e,...r})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return e&&(r=ke("number",e)),new Intl.NumberFormat(t,r)})),je=Fe((({locale:t,format:e,...r})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return e?r=ke("date",e):0===Object.keys(r).length&&(r=ke("date","short")),new Intl.DateTimeFormat(t,r)})),Ve=Fe((({locale:t,format:e,...r})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return e?r=ke("time",e):0===Object.keys(r).length&&(r=ke("time","short")),new Intl.DateTimeFormat(t,r)})),Xe=Fe(((t,e=De())=>new Ee(t,e,we().formats,{ignoreTag:we().ignoreTag}))),Ke=(t,e={})=>{var r,n,i,o;let s=e;"object"==typeof t&&(s=t,t=s.id);const{values:a,locale:h=De(),default:u}=s;if(null==h)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=ve(t,h);if(c){if("string"!=typeof c)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c}else c=null!==(o=null!==(i=null===(n=(r=we()).handleMissingMessage)||void 0===n?void 0:n.call(r,{locale:h,id:t,defaultValue:u}))&&void 0!==i?i:u)&&void 0!==o?o:t;if(!a)return c;let l=c;try{l=Xe(c,h).format(a)}catch(e){e instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return l},Ye=(t,e)=>(({locale:t=De(),...e}={})=>Ve({locale:t,...e}))(e).format(t),Ze=(t,e)=>(({locale:t=De(),...e}={})=>je({locale:t,...e}))(e).format(t),ze=(t,e)=>(({locale:t=De(),...e}={})=>xe({locale:t,...e}))(e).format(t),We=(t,e=De())=>ve(t,e),Qe=R([$e,Te],(()=>Ke));function Je(t,e){Ae(t,e)}R([$e],(()=>Ye)),R([$e],(()=>Ze)),R([$e],(()=>ze)),R([$e,Te],(()=>We));const qe={en:{bets:"bets"},tr:{bets:"bets"},es:{bets:"apuestas"},el:{bets:"bets"}};
584
- /* src/GeneralIconProgressBar.svelte generated by Svelte v3.58.0 */function tr(e){let r,n,i,o,s;return{c(){var a;r=c("div"),n=c("div"),i=c("span"),a=/*progressText*/e[3],o=document.createTextNode(a),this.c=t,l(i,"part","progressText"),l(n,"class",s="stepBar "+/*curTatus*/e[4]),l(n,"part","stepBar"),l(r,"class","general-icon-progress-bar"),l(r,"part","totalBar")},m(t,s){h(t,r,s),a(r,n),a(n,i),a(i,o),
584
+ /* src/GeneralIconProgressBar.svelte generated by Svelte v3.59.2 */function tr(e){let r,n,i,o,s;return{c(){var a;r=c("div"),n=c("div"),i=c("span"),a=/*progressText*/e[3],o=document.createTextNode(a),this.c=t,l(i,"part","progressText"),l(n,"class",s="stepBar "+/*curTatus*/e[4]),l(n,"part","stepBar"),l(r,"class","general-icon-progress-bar"),l(r,"part","totalBar")},m(t,s){h(t,r,s),a(r,n),a(n,i),a(i,o),
585
585
  /*span_binding*/e[13](i),
586
586
  /*div0_binding*/e[14](n),
587
587
  /*div1_binding*/e[15](r)},p(t,[e]){/*progressText*/8&e&&function(t,e){e=""+e,t.data!==e&&(t.data=e)}(o,/*progressText*/t[3]),/*curTatus*/16&e&&s!==(s="stepBar "+/*curTatus*/t[4])&&l(n,"class",s)},i:t,o:t,d(t){t&&u(r)
@@ -589,5 +589,5 @@ t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"}
589
589
  /*div0_binding*/e[14](null),
590
590
  /*div1_binding*/e[15](null)}}}function er(t,e,r){let n;var i,o;i=Qe,o=t=>r(20,n=t),t.$$.on_destroy.push(s(i,o));let a,h,u,c,l,f,p,{currentstep:m=0}=e,{total:b=1}=e,{showaspercent:d}=e,{lang:y="en"}=e,{status:v}=e,{translationurl:H=""}=e,{progressfractiondigit:T=1}=e,{triggerreset:B}=e,_="0px",A="active";!function({withLocale:t,translations:e}){$e.subscribe((r=>{null==r&&(Te.set(e),$e.set(t))}));// maybe we will need this to make sure that the i18n is set up only once
591
591
  /*dictionary.set(translations);
592
- locale.set(_locale);*/}({withLocale:"en",translations:{}});Object.keys(qe).forEach((t=>{Je(t,qe[t])}));const S=()=>{var t;t=y,$e.set(t)},P=()=>{let t=(m/b*100).toFixed(T);setTimeout((()=>{r(3,c=d||"true"===d?`${t}%`:`${m}/${b} ${n("bets")}`)}),c?573:0),0==t||100==t?(f="0px",p="0px",_=100==t?"3px":"0px"):(f=`${a.offsetHeight}px`,l=f,p=a.offsetHeight/3+"px",_="0px"),h.style.setProperty("--parentElementHeight",l),u.style.setProperty("--currentStep",t+"%"),u.style.setProperty("--triangleHeight",f),u.style.setProperty("--halfOfTriangleHeight",p),u.style.setProperty("--stepBarBorderRadius",_)};return g((()=>{P()})),t.$$set=t=>{"currentstep"in t&&r(5,m=t.currentstep),"total"in t&&r(6,b=t.total),"showaspercent"in t&&r(7,d=t.showaspercent),"lang"in t&&r(8,y=t.lang),"status"in t&&r(9,v=t.status),"translationurl"in t&&r(10,H=t.translationurl),"progressfractiondigit"in t&&r(11,T=t.progressfractiondigit),"triggerreset"in t&&r(12,B=t.triggerreset)},t.$$.update=()=>{/*triggerreset, total*/4160&t.$$.dirty&&B&&b&&P(),/*lang*/256&t.$$.dirty&&y&&S(),/*status*/512&t.$$.dirty&&v&&r(4,A="active"==v?"":"inactive"),/*translationurl*/1024&t.$$.dirty&&H&&fetch(H).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{Je(e,t[e])}))})).catch((t=>{console.log(t)}))},[a,h,u,c,A,m,b,d,y,v,H,T,B,function(t){E[t?"unshift":"push"]((()=>{h=t,r(1,h)}))},function(t){E[t?"unshift":"push"]((()=>{u=t,r(2,u)}))},function(t){E[t?"unshift":"push"]((()=>{a=t,r(0,a)}))}]}class rr extends C{constructor(t){super();const e=document.createElement("style");e.textContent=':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}.general-icon-progress-bar{background:var(--emfe-w-color-black, #000000);color:var(--emfe-w-color-white, #FFFFFF);height:100%;background:rgba(0, 0, 0, 0.8);border-radius:3px}.stepBar.inactive::after{border-color:#a6a4a1 transparent transparent transparent}.stepBar.inactive{background:linear-gradient(270deg, #a2a09e 8.82%, #aba9ad 99.63%)}.stepBar.inactive span{color:rgba(112, 106, 106, 0.8)}.stepBar span{font-weight:700;font-size:11px;line-height:var(--parentElementHeight, 20px);align-items:center;color:#fff;text-align:right;position:relative;z-index:1}.stepBar::after{content:" ";position:absolute;top:0;border-width:20px 10px 20px 0;border-top-width:var(--triangleHeight, 20px);border-right-width:var(--halfOfTriangleHeight, 10px);border-bottom-width:var(--triangleHeight, 20px);border-style:solid;border-color:#FCA452 transparent transparent transparent;text-align:right}.stepBar{position:relative;width:var(--currentStep, 0);height:100%;background:linear-gradient(270deg, #FCA452 8.82%, #600062 99.63%);text-align:right;border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-right-radius:var(--stepBarBorderRadius, 0px);border-bottom-right-radius:var(--stepBarBorderRadius, 0px);transition-property:width;transition-duration:0.18s;transition-timing-function:cubic-bezier(0.43, 0.8, 0.95, 0.88);transition-delay:0.3s}',this.shadowRoot.appendChild(e),I(this,{target:this.shadowRoot,props:f(this.attributes),customElement:!0},er,tr,o,{currentstep:5,total:6,showaspercent:7,lang:8,status:9,translationurl:10,progressfractiondigit:11,triggerreset:12},null),t&&(t.target&&h(t.target,this,t.anchor),t.props&&(this.$set(t.props),A()))}static get observedAttributes(){return["currentstep","total","showaspercent","lang","status","translationurl","progressfractiondigit","triggerreset"]}get currentstep(){return this.$$.ctx[5]}set currentstep(t){this.$$set({currentstep:t}),A()}get total(){return this.$$.ctx[6]}set total(t){this.$$set({total:t}),A()}get showaspercent(){return this.$$.ctx[7]}set showaspercent(t){this.$$set({showaspercent:t}),A()}get lang(){return this.$$.ctx[8]}set lang(t){this.$$set({lang:t}),A()}get status(){return this.$$.ctx[9]}set status(t){this.$$set({status:t}),A()}get translationurl(){return this.$$.ctx[10]}set translationurl(t){this.$$set({translationurl:t}),A()}get progressfractiondigit(){return this.$$.ctx[11]}set progressfractiondigit(t){this.$$set({progressfractiondigit:t}),A()}get triggerreset(){return this.$$.ctx[12]}set triggerreset(t){this.$$set({triggerreset:t}),A()}}return!customElements.get("general-icon-progress-bar")&&customElements.define("general-icon-progress-bar",rr),rr}));
592
+ locale.set(_locale);*/}({withLocale:"en",translations:{}});Object.keys(qe).forEach((t=>{Je(t,qe[t])}));const S=()=>{var t;t=y,$e.set(t)},P=()=>{let t=(m/b*100).toFixed(T);setTimeout((()=>{r(3,c=d||"true"===d?`${t}%`:`${m}/${b} ${n("bets")}`)}),c?573:0),0==t||100==t?(f="0px",p="0px",_=100==t?"3px":"0px"):(f=`${a.offsetHeight}px`,l=f,p=a.offsetHeight/3+"px",_="0px"),h.style.setProperty("--parentElementHeight",l),u.style.setProperty("--currentStep",t+"%"),u.style.setProperty("--triangleHeight",f),u.style.setProperty("--halfOfTriangleHeight",p),u.style.setProperty("--stepBarBorderRadius",_)};return g((()=>{P()})),t.$$set=t=>{"currentstep"in t&&r(5,m=t.currentstep),"total"in t&&r(6,b=t.total),"showaspercent"in t&&r(7,d=t.showaspercent),"lang"in t&&r(8,y=t.lang),"status"in t&&r(9,v=t.status),"translationurl"in t&&r(10,H=t.translationurl),"progressfractiondigit"in t&&r(11,T=t.progressfractiondigit),"triggerreset"in t&&r(12,B=t.triggerreset)},t.$$.update=()=>{/*triggerreset, total*/4160&t.$$.dirty&&B&&b&&P(),/*lang*/256&t.$$.dirty&&y&&S(),/*status*/512&t.$$.dirty&&v&&r(4,A="active"==v?"":"inactive"),/*translationurl*/1024&t.$$.dirty&&H&&fetch(H).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{Je(e,t[e])}))})).catch((t=>{console.log(t)}))},[a,h,u,c,A,m,b,d,y,v,H,T,B,function(t){E[t?"unshift":"push"]((()=>{h=t,r(1,h)}))},function(t){E[t?"unshift":"push"]((()=>{u=t,r(2,u)}))},function(t){E[t?"unshift":"push"]((()=>{a=t,r(0,a)}))}]}class rr extends C{constructor(t){super();const e=document.createElement("style");e.textContent='*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.general-icon-progress-bar{background:var(--emfe-w-color-black, #000000);color:var(--emfe-w-color-white, #FFFFFF);height:100%;background:rgba(0, 0, 0, 0.8);border-radius:3px}.stepBar.inactive::after{border-color:#a6a4a1 transparent transparent transparent}.stepBar.inactive{background:linear-gradient(270deg, #a2a09e 8.82%, #aba9ad 99.63%)}.stepBar.inactive span{color:rgba(112, 106, 106, 0.8)}.stepBar span{font-weight:700;font-size:11px;line-height:var(--parentElementHeight, 20px);align-items:center;color:#fff;text-align:right;position:relative;z-index:1}.stepBar::after{content:" ";position:absolute;top:0;border-width:20px 10px 20px 0;border-top-width:var(--triangleHeight, 20px);border-right-width:var(--halfOfTriangleHeight, 10px);border-bottom-width:var(--triangleHeight, 20px);border-style:solid;border-color:#FCA452 transparent transparent transparent;text-align:right}.stepBar{position:relative;width:var(--currentStep, 0);height:100%;background:linear-gradient(270deg, #FCA452 8.82%, #600062 99.63%);text-align:right;border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-right-radius:var(--stepBarBorderRadius, 0px);border-bottom-right-radius:var(--stepBarBorderRadius, 0px);transition-property:width;transition-duration:0.18s;transition-timing-function:cubic-bezier(0.43, 0.8, 0.95, 0.88);transition-delay:0.3s}',this.shadowRoot.appendChild(e),I(this,{target:this.shadowRoot,props:f(this.attributes),customElement:!0},er,tr,o,{currentstep:5,total:6,showaspercent:7,lang:8,status:9,translationurl:10,progressfractiondigit:11,triggerreset:12},null),t&&(t.target&&h(t.target,this,t.anchor),t.props&&(this.$set(t.props),A()))}static get observedAttributes(){return["currentstep","total","showaspercent","lang","status","translationurl","progressfractiondigit","triggerreset"]}get currentstep(){return this.$$.ctx[5]}set currentstep(t){this.$$set({currentstep:t}),A()}get total(){return this.$$.ctx[6]}set total(t){this.$$set({total:t}),A()}get showaspercent(){return this.$$.ctx[7]}set showaspercent(t){this.$$set({showaspercent:t}),A()}get lang(){return this.$$.ctx[8]}set lang(t){this.$$set({lang:t}),A()}get status(){return this.$$.ctx[9]}set status(t){this.$$set({status:t}),A()}get translationurl(){return this.$$.ctx[10]}set translationurl(t){this.$$set({translationurl:t}),A()}get progressfractiondigit(){return this.$$.ctx[11]}set progressfractiondigit(t){this.$$set({progressfractiondigit:t}),A()}get triggerreset(){return this.$$.ctx[12]}set triggerreset(t){this.$$set({triggerreset:t}),A()}}return!customElements.get("general-icon-progress-bar")&&customElements.define("general-icon-progress-bar",rr),rr}));
593
593
  //# sourceMappingURL=general-icon-progress-bar.js.map