@everymatrix/casino-sort 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.
- package/dist/casino-sort.js +4 -4
- package/dist/casino-sort.js.map +1 -1
- package/package.json +2 -2
package/dist/casino-sort.js
CHANGED
|
@@ -80,12 +80,12 @@ if(!o(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}
|
|
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=}
|
|
88
|
+
* @param {StartStopNotifier=} start
|
|
89
89
|
*/
|
|
90
90
|
function G(e,r=t){let n;const o=new Set;function s(t){if(i(e,t)&&(e=t,n)){// store is ready
|
|
91
91
|
const t=!D.length;for(const t of o)t[1](),D.push(t,e);if(t){for(let t=0;t<D.length;t+=2)D[t][0](D[t+1]);D.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(i,a=t){const l=[i,a];return o.add(l),1===o.size&&(n=r(s)||t),i(e),()=>{o.delete(l),0===o.size&&n&&(n(),n=null)}}}}function x(e,r,i){const a=!Array.isArray(e),l=a?[e]:e,h=r.length<2;return c=e=>{let i=!1;const c=[];let u=0,f=t;const p=()=>{if(u)return;f();const n=r(a?c[0]:c,e);h?e(n):f=o(n)?n:t},m=l.map(((t,e)=>s(t,(t=>{c[e]=t,u&=~(1<<e),i&&p()}),(()=>{u|=1<<e}))));return i=!0,p(),function(){n(m),f(),
|
|
@@ -106,7 +106,7 @@ r.cloneUnlessOtherwiseSpecified=F;var n=Array.isArray(e);return n===Array.isArra
|
|
|
106
106
|
*/
|
|
107
107
|
function rt(t){return t.type===Q.literal}function nt(t){return t.type===Q.argument}function ot(t){return t.type===Q.number}function it(t){return t.type===Q.date}function st(t){return t.type===Q.time}function at(t){return t.type===Q.select}function lt(t){return t.type===Q.plural}function ht(t){return t.type===Q.pound}function ct(t){return t.type===Q.tag}function ut(t){return!(!t||"object"!=typeof t||t.type!==q.number)}function ft(t){return!(!t||"object"!=typeof t||t.type!==q.dateTime)}
|
|
108
108
|
// @generated from regex-gen.ts
|
|
109
|
-
|
|
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 He={},Te=(t,e,r)=>r?(e in He||(He[e]={}),t in He[e]||(He[e][t]=r),r):r,Be=(t,e)=>{if(null==e)return;if(e in He&&t in He[e])return He[e][t];const r=Fe(e);for(let n=0;n<r.length;n++){const o=Ne(r[n],t);if(o)return Te(t,e,o)}};let _e;const we=G({});function Le(t){return t in _e}function Ne(t,e){if(!Le(t))return null;const r=function(t){return _e[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 Pe(t,...e){delete He[t],we.update((r=>(r[t]=K.all([r[t]||{},...e]),r)))}x([we],(([t])=>Object.keys(t))),we.subscribe((t=>_e=t));const Ie={};function Ce(t){return Ie[t]}function Oe(t){return null!=t&&Fe(t).some((t=>{var e;return null===(e=Ce(t))||void 0===e?void 0:e.size}))}const Me={};function Re(t){if(!Oe(t))return t in Me?Me[t]:Promise.resolve();const e=function(t){return Fe(t).map((t=>{const e=Ce(t);return[t,e?[...e]:[]]})).filter((([,t])=>t.length>0))}(t);return Me[t]=Promise.all(e.map((([t,e])=>function(t,e){const r=Promise.all(e.map((e=>(function(t,e){Ie[t].delete(e),0===Ie[t].size&&delete Ie[t]}(t,e),e().then((t=>t.default||t))))));return r.then((e=>Pe(t,...e)))}(t,e)))).then((()=>{if(Oe(t))return Re(t);delete Me[t]})),Me[t]}const Ue={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 De(){return Ue}const Ge=G(!1);let xe;const ke=G(null);function $e(t){return t.split("-").map(((t,e,r)=>r.slice(0,e+1).join("-"))).reverse()}function Fe(t,e=De().fallbackLocale){const r=$e(t);return e?[...new Set([...r,...$e(e)])]:r}function je(){return null!=xe?xe:void 0}ke.subscribe((t=>{xe=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const Ve={...ke,set:t=>{if(t&&function(t){if(null==t)return;const e=Fe(t);for(let t=0;t<e.length;t++){const r=e[t];if(Le(r))return r}}(t)&&Oe(t)){const{loadingDelay:e}=De();let r;return"undefined"!=typeof window&&null!=je()&&e?r=window.setTimeout((()=>Ge.set(!0)),e):Ge.set(!0),Re(t).then((()=>{ke.set(t)})).finally((()=>{clearTimeout(r),Ge.set(!1)}))}return ke.set(t)}},Ze=t=>{const e=Object.create(null);return r=>{const n=JSON.stringify(r);return n in e?e[n]:e[n]=t(r)}},Xe=(t,e)=>{const{formats:r}=De();if(t in r&&e in r[t])return r[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},ze=Ze((({locale:t,format:e,...r})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return e&&(r=Xe("number",e)),new Intl.NumberFormat(t,r)})),Ke=Ze((({locale:t,format:e,...r})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return e?r=Xe("date",e):0===Object.keys(r).length&&(r=Xe("date","short")),new Intl.DateTimeFormat(t,r)})),Ye=Ze((({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=Xe("time",e):0===Object.keys(r).length&&(r=Xe("time","short")),new Intl.DateTimeFormat(t,r)})),We=Ze(((t,e=je())=>new Ae(t,e,De().formats,{ignoreTag:De().ignoreTag}))),Je=(t,e={})=>{var r,n,o,i;let s=e;"object"==typeof t&&(s=t,t=s.id);const{values:a,locale:l=je(),default:h}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=Be(t,l);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!==(i=null!==(o=null===(n=(r=De()).handleMissingMessage)||void 0===n?void 0:n.call(r,{locale:l,id:t,defaultValue:h}))&&void 0!==o?o:h)&&void 0!==i?i:t;if(!a)return c;let u=c;try{u=We(c,l).format(a)}catch(e){e instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return u},Qe=(t,e)=>(({locale:t=je(),...e}={})=>Ye({locale:t,...e}))(e).format(t),qe=(t,e)=>(({locale:t=je(),...e}={})=>Ke({locale:t,...e}))(e).format(t),tr=(t,e)=>(({locale:t=je(),...e}={})=>ze({locale:t,...e}))(e).format(t),er=(t,e=je())=>Be(t,e),rr=x([Ve,we],(()=>Je));function nr(t,e){Pe(t,e)}x([Ve],(()=>Qe)),x([Ve],(()=>qe)),x([Ve],(()=>tr)),x([Ve,we],(()=>er));const or={en:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},zh:{sortby:"Sort by",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},de:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},it:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},fr:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},es:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},tr:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},ru:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},ro:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},hr:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},hu:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},pl:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},pt:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},sl:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"},sr:{sortby:"Sort by:",all:"All",az:"A-Z",newest:"Newest",hottest:"Hottest"}};
|
|
584
|
-
/* src/CasinoSort.svelte generated by Svelte v3.
|
|
584
|
+
/* src/CasinoSort.svelte generated by Svelte v3.59.2 */function ir(t,e,r){const n=t.slice();return n[23]=e[r],n}
|
|
585
585
|
// (114:4) {#if !isLoading}
|
|
586
586
|
function sr(t){let e,r,n,o,i,s,b,y,E,v,S,A,H,T,B,_,w,L,N,P,I,C,O,M,R,U,D,G,x=/*$_*/t[4]("sortby")+"",k=/*vendorSortingBy*/(t[3]||/*$_*/t[4]("all"))+"",$=Object.values(/*vendorMap*/t[5]),F=[];for(let e=0;e<$.length;e+=1)F[e]=ar(ir(t,$,e));return{c(){e=c("div"),r=c("div"),n=c("div"),o=u("svg"),i=u("g"),s=u("path"),b=u("path"),y=u("path"),E=p(),v=c("div"),S=c("span"),A=f(x),H=p(),T=c("div"),B=c("span"),_=f(k),w=p(),L=c("span"),N=u("svg"),P=u("path"),O=p(),M=c("div"),R=c("ul");for(let t=0;t<F.length;t+=1)F[t].c();g(s,"id","Path_5267"),g(s,"data-name","Path 5267"),g(s,"d","M526.245,343.685a3.45,3.45,0,0,1,0,6.714v13.625a.8.8,0,0,1-1.592,0V350.4a3.45,3.45,0,0,1,0-6.714V342.8a.8.8,0,1,1,1.592,0Zm-2.653,3.357a1.857,1.857,0,1,0,1.857-1.857A1.859,1.859,0,0,0,523.592,347.041Z"),g(s,"transform","translate(-206.448 0)"),g(s,"fill","#fff"),g(b,"id","Path_5268"),g(b,"data-name","Path 5268"),g(b,"d","M310.245,356.421a3.45,3.45,0,0,1,0,6.714v.888a.8.8,0,0,1-1.592,0v-.888a3.45,3.45,0,0,1,0-6.714V342.8a.8.8,0,1,1,1.592,0Zm-2.653,3.357a1.857,1.857,0,1,0,1.857-1.857A1.859,1.859,0,0,0,307.592,359.777Z"),g(b,"transform","translate(0 0)"),g(b,"fill","#fff"),g(y,"id","Path_5269"),g(y,"data-name","Path 5269"),g(y,"d","M742.245,351.645a3.45,3.45,0,0,1,0,6.714v5.665a.8.8,0,1,1-1.592,0v-5.665a3.45,3.45,0,0,1,0-6.714V342.8a.8.8,0,1,1,1.592,0ZM739.592,355a1.857,1.857,0,1,0,1.857-1.857A1.859,1.859,0,0,0,739.592,355Z"),g(y,"transform","translate(-412.896 0)"),g(y,"fill","#fff"),g(i,"id","sortby"),g(i,"transform","translate(-306 -342)"),g(o,"xmlns","http://www.w3.org/2000/svg"),g(o,"width","20"),g(o,"height","20"),g(o,"viewBox","0 0 26.003 22.819"),g(S,"class","SorterName"),g(T,"class","SorterValueContainer"),g(v,"class","SorterTextContainer"),g(n,"class","SorterMainArea"),g(P,"id","arrow"),g(P,"d","M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z"),g(P,"transform","translate(-274.511 -441.088)"),g(P,"fill","#d1d1d1"),g(N,"xmlns","http://www.w3.org/2000/svg"),g(N,"width","14"),g(N,"height","6.835"),g(N,"viewBox","0 0 14 6.835"),g(L,"class",I="TriangleInactive "+(/*isSorterActive*/t[1]?"TriangleActive":"")),g(r,"class",C="SorterSelector "+(/*isSorterActive*/t[1]?"SorterSelectorOpen":"")),g(R,"class","SorterDropdown"),g(M,"class",U="SorterDropdownContainer "+(/*isSorterActive*/t[1]?"SorterOpen":"")),g(e,"class","SorterContainer")},m(h,c){l(h,e,c),a(e,r),a(r,n),a(n,o),a(o,i),a(i,s),a(i,b),a(i,y),a(n,E),a(n,v),a(v,S),a(S,A),a(v,H),a(v,T),a(T,B),a(B,_),a(r,w),a(r,L),a(L,N),a(N,P),a(e,O),a(e,M),a(M,R);for(let t=0;t<F.length;t+=1)F[t]&&F[t].m(R,null);D||(G=m(r,"click",/*click_handler*/t[13]),D=!0)},p(t,e){if(/*$_*/16&e&&x!==(x=/*$_*/t[4]("sortby")+"")&&d(A,x),/*vendorSortingBy, $_*/24&e&&k!==(k=/*vendorSortingBy*/(t[3]||/*$_*/t[4]("all"))+"")&&d(_,k),/*isSorterActive*/2&e&&I!==(I="TriangleInactive "+(/*isSorterActive*/t[1]?"TriangleActive":""))&&g(L,"class",I),/*isSorterActive*/2&e&&C!==(C="SorterSelector "+(/*isSorterActive*/t[1]?"SorterSelectorOpen":""))&&g(r,"class",C),/*Object, vendorMap, vendorSortingBy, undefined, $_, sortBy*/120&e){let r;for($=Object.values(/*vendorMap*/t[5]),r=0;r<$.length;r+=1){const n=ir(t,$,r);F[r]?F[r].p(n,e):(F[r]=ar(n),F[r].c(),F[r].m(R,null))}for(;r<F.length;r+=1)F[r].d(1);F.length=$.length}/*isSorterActive*/2&e&&U!==(U="SorterDropdownContainer "+(/*isSorterActive*/t[1]?"SorterOpen":""))&&g(M,"class",U)},d(t){t&&h(e),function(t,e){for(let r=0;r<t.length;r+=1)t[r]&&t[r].d(e)}(F,t),D=!1,G()}}}
|
|
587
587
|
// (140:10) {#each Object.values(vendorMap) as sort}
|