haiku-atelier-2024/web/app/themes/haiku-atelier-2024/assets/js/index-legacy.BZucyBbQ.js
gcch e4eaf6404a 2025-11-03 (bis)
- ajoute un .dockerignore.
- ajoute un Dockerfile.
- met à jour les dépendances.
- utilise bun comme gestionnaire de paquets npm.
- utilise une configuration Vite en TypeScript.
- ajoute les fichiers compilés JavaScript aux fichiers pris en charge par Git.
2025-11-03 17:26:39 +01:00

1 line
7.9 KiB
JavaScript

System.register([],function(t,e){"use strict";return{execute:function(){t("M",function(t){return new L(t,M)});const e=Symbol.for("@ts-pattern/matcher"),n=Symbol.for("@ts-pattern/isVariadic"),r="@ts-pattern/anonymous-select-key",i=t=>Boolean(t&&"object"==typeof t),o=t=>t&&!!t[e],s=(t,r,c)=>{if(o(t)){const n=t[e](),{matched:i,selections:o}=n.match(r);return i&&o&&Object.keys(o).forEach(t=>c(t,o[t])),i}if(i(t)){if(!i(r))return!1;if(Array.isArray(t)){if(!Array.isArray(r))return!1;let e=[],i=[],u=[];for(const r of t.keys()){const s=t[r];o(s)&&s[n]?u.push(s):u.length?i.push(s):e.push(s)}if(u.length){if(u.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(r.length<e.length+i.length)return!1;const t=r.slice(0,e.length),n=0===i.length?[]:r.slice(-i.length),o=r.slice(e.length,0===i.length?1/0:-i.length);return e.every((e,n)=>s(e,t[n],c))&&i.every((t,e)=>s(t,n[e],c))&&(0===u.length||s(u[0],o,c))}return t.length===r.length&&t.every((t,e)=>s(t,r[e],c))}return Reflect.ownKeys(t).every(n=>{const i=t[n];return(n in r||o(u=i)&&"optional"===u[e]().matcherType)&&s(i,r[n],c);var u})}return Object.is(r,t)},c=t=>{var n,r,s;return i(t)?o(t)?null!=(n=null==(r=(s=t[e]()).getSelectionKeys)?void 0:r.call(s))?n:[]:Array.isArray(t)?u(t,c):u(Object.values(t),c):[]},u=(t,e)=>t.reduce((t,n)=>t.concat(e(n)),[]);function a(t){return Object.assign(t,{optional:()=>h(t),and:e=>d(t,e),or:e=>y(t,e),select:e=>void 0===e?v(t):v(e,t)})}function l(t){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let e=0;const r=[{value:Object.assign(t,{[n]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var t;return null!=(t=r[e++])?t:r.at(-1)}}}}))(t),{optional:()=>l(h(t)),select:e=>l(void 0===e?v(t):v(e,t))})}function h(t){return a({[e]:()=>({match:e=>{let n={};const r=(t,e)=>{n[t]=e};return void 0===e?(c(t).forEach(t=>r(t,void 0)),{matched:!0,selections:n}):{matched:s(t,e,r),selections:n}},getSelectionKeys:()=>c(t),matcherType:"optional"})})}const f=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},g=(t,e)=>{for(const[n,r]of t.entries())if(!e(r,n))return!1;return!0},m=(t,e)=>{const n=Reflect.ownKeys(t);for(const r of n)if(!e(r,t[r]))return!1;return!0};function d(...t){return a({[e]:()=>({match:e=>{let n={};const r=(t,e)=>{n[t]=e};return{matched:t.every(t=>s(t,e,r)),selections:n}},getSelectionKeys:()=>u(t,c),matcherType:"and"})})}function y(...t){return a({[e]:()=>({match:e=>{let n={};const r=(t,e)=>{n[t]=e};return u(t,c).forEach(t=>r(t,void 0)),{matched:t.some(t=>s(t,e,r)),selections:n}},getSelectionKeys:()=>u(t,c),matcherType:"or"})})}function p(t){return{[e]:()=>({match:e=>({matched:Boolean(t(e))})})}}function v(...t){const n="string"==typeof t[0]?t[0]:void 0,i=2===t.length?t[1]:"string"==typeof t[0]?void 0:t[0];return a({[e]:()=>({match:t=>{let e={[null!=n?n:r]:t};return{matched:void 0===i||s(i,t,(t,n)=>{e[t]=n}),selections:e}},getSelectionKeys:()=>[null!=n?n:r].concat(void 0===i?[]:c(i))})})}function b(t){return!0}function w(t){return"number"==typeof t}function S(t){return"string"==typeof t}function j(t){return"bigint"==typeof t}const K=a(p(b)),O=a(p(b)),E=K,x=t=>Object.assign(a(t),{startsWith:e=>{return x(d(t,(n=e,p(t=>S(t)&&t.startsWith(n)))));var n},endsWith:e=>{return x(d(t,(n=e,p(t=>S(t)&&t.endsWith(n)))));var n},minLength:e=>x(d(t,(t=>p(e=>S(e)&&e.length>=t))(e))),length:e=>x(d(t,(t=>p(e=>S(e)&&e.length===t))(e))),maxLength:e=>x(d(t,(t=>p(e=>S(e)&&e.length<=t))(e))),includes:e=>{return x(d(t,(n=e,p(t=>S(t)&&t.includes(n)))));var n},regex:e=>{return x(d(t,(n=e,p(t=>S(t)&&Boolean(t.match(n))))));var n}}),A=x(p(S)),N=t=>Object.assign(a(t),{between:(e,n)=>N(d(t,((t,e)=>p(n=>w(n)&&t<=n&&e>=n))(e,n))),lt:e=>N(d(t,(t=>p(e=>w(e)&&e<t))(e))),gt:e=>N(d(t,(t=>p(e=>w(e)&&e>t))(e))),lte:e=>N(d(t,(t=>p(e=>w(e)&&e<=t))(e))),gte:e=>N(d(t,(t=>p(e=>w(e)&&e>=t))(e))),int:()=>N(d(t,p(t=>w(t)&&Number.isInteger(t)))),finite:()=>N(d(t,p(t=>w(t)&&Number.isFinite(t)))),positive:()=>N(d(t,p(t=>w(t)&&t>0))),negative:()=>N(d(t,p(t=>w(t)&&t<0)))}),k=N(p(w)),T=t=>Object.assign(a(t),{between:(e,n)=>T(d(t,((t,e)=>p(n=>j(n)&&t<=n&&e>=n))(e,n))),lt:e=>T(d(t,(t=>p(e=>j(e)&&e<t))(e))),gt:e=>T(d(t,(t=>p(e=>j(e)&&e>t))(e))),lte:e=>T(d(t,(t=>p(e=>j(e)&&e<=t))(e))),gte:e=>T(d(t,(t=>p(e=>j(e)&&e>=t))(e))),positive:()=>T(d(t,p(t=>j(t)&&t>0))),negative:()=>T(d(t,p(t=>j(t)&&t<0)))}),B=T(p(j)),P=a(p(function(t){return"boolean"==typeof t})),_=a(p(function(t){return"symbol"==typeof t})),W=a(p(function(t){return null==t})),$=a(p(function(t){return null!=t}));t("z",{__proto__:null,matcher:e,optional:h,array:function(...t){return l({[e]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(0===t.length)return{matched:!0};const n=t[0];let r={};if(0===e.length)return c(n).forEach(t=>{r[t]=[]}),{matched:!0,selections:r};const i=(t,e)=>{r[t]=(r[t]||[]).concat([e])};return{matched:e.every(t=>s(n,t,i)),selections:r}},getSelectionKeys:()=>0===t.length?[]:c(t[0])})})},set:function(...t){return a({[e]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let n={};if(0===e.size)return{matched:!0,selections:n};if(0===t.length)return{matched:!0};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])},i=t[0];return{matched:f(e,t=>s(i,t,r)),selections:n}},getSelectionKeys:()=>0===t.length?[]:c(t[0])})})},map:function(...t){return a({[e]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let n={};if(0===e.size)return{matched:!0,selections:n};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])};if(0===t.length)return{matched:!0};var i;if(1===t.length)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${null==(i=t[0])?void 0:i.toString()}`);const[o,c]=t;return{matched:g(e,(t,e)=>{const n=s(o,e,r),i=s(c,t,r);return n&&i}),selections:n}},getSelectionKeys:()=>0===t.length?[]:[...c(t[0]),...c(t[1])]})})},record:function(...t){return a({[e]:()=>({match:e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return{matched:!1};var n;if(0===t.length)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${null==(n=t[0])?void 0:n.toString()}`);let r={};const i=(t,e)=>{r[t]=(r[t]||[]).concat([e])},[o,c]=1===t.length?[A,t[0]]:t;return{matched:m(e,(t,e)=>{const n="string"!=typeof t||Number.isNaN(Number(t))?null:Number(t),r=null!==n&&s(o,n,i),u=s(o,t,i),a=s(c,e,i);return(u||r)&&a}),selections:r}},getSelectionKeys:()=>0===t.length?[]:[...c(t[0]),...c(t[1])]})})},intersection:d,union:y,not:function(t){return a({[e]:()=>({match:e=>({matched:!s(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:p,select:v,any:K,unknown:O,_:E,string:A,number:k,bigint:B,boolean:P,symbol:_,nullish:W,nonNullable:$,instanceOf:function(t){return a(p(function(t){return e=>e instanceof t}(t)))},shape:function(t){return a(p(function(...t){if(1===t.length){const[e]=t;return t=>s(e,t,()=>{})}if(2===t.length){const[e,n]=t;return s(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}(t)))}});class z extends Error{constructor(t){let e;try{e=JSON.stringify(t)}catch(r){e=t}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=t}}const M={matched:!1,value:void 0};class L{constructor(t,e){this.input=void 0,this.state=void 0,this.input=t,this.state=e}with(...t){if(this.state.matched)return this;const e=t[t.length-1],n=[t[0]];let i;3===t.length&&"function"==typeof t[1]?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,c={};const u=(t,e)=>{o=!0,c[t]=e},a=!n.some(t=>s(t,this.input,u))||i&&!Boolean(i(this.input))?M:{matched:!0,value:e(o?r in c?c[r]:c:this.input,this.input)};return new L(this.input,a)}when(t,e){if(this.state.matched)return this;const n=Boolean(t(this.input));return new L(this.input,n?{matched:!0,value:e(this.input,this.input)}:M)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=R){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function R(t){throw new z(t)}}}});