Anvil/assets/runtime-8AupoRbQ.js

7 lines
49 KiB
JavaScript
Raw Normal View History

2024-07-31 10:01:28 +02:00
import{d as N,w as me}from"./index-C0Lr04gB.js";import{g as rt}from"./_commonjsHelpers-Cpj98o6Y.js";var nt=function(t){return it(t)&&!at(t)};function it(e){return!!e&&typeof e=="object"}function at(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||ht(e)}var ot=typeof Symbol=="function"&&Symbol.for,st=ot?Symbol.for("react.element"):60103;function ht(e){return e.$$typeof===st}function ut(e){return Array.isArray(e)?[]:{}}function j(e,t){return t.clone!==!1&&t.isMergeableObject(e)?A(ut(e),e,t):e}function lt(e,t,r){return e.concat(t).map(function(n){return j(n,r)})}function ft(e,t){if(!t.customMerge)return A;var r=t.customMerge(e);return typeof r=="function"?r:A}function ct(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function de(e){return Object.keys(e).concat(ct(e))}function Ce(e,t){try{return t in e}catch{return!1}}function mt(e,t){return Ce(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function pt(e,t,r){var n={};return r.isMergeableObject(e)&&de(e).forEach(function(i){n[i]=j(e[i],r)}),de(t).forEach(function(i){mt(e,i)||(Ce(e,i)&&r.isMergeableObject(t[i])?n[i]=ft(i,r)(e[i],t[i],r):n[i]=j(t[i],r))}),n}function A(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||lt,r.isMergeableObject=r.isMergeableObject||nt,r.cloneUnlessOtherwiseSpecified=j;var n=Array.isArray(t),i=Array.isArray(e),a=n===i;return a?n?r.arrayMerge(e,t,r):pt(e,t,r):j(t,r)}A.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return A(n,i,r)},{})};var bt=A,gt=bt;const Et=rt(gt);var ae=function(e,t){return ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ae(e,t)};function J(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ae(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var b=function(){return b=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},b.apply(this,arguments)};function xt(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function K(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var m;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SE
Try polyfilling it using "@formatjs/intl-pluralrules"
`,O.MISSING_INTL_API,s);var R=r.getPluralRules(t,{type:o.pluralType}).select(l-(o.offset||0));y=o.options[R]||o.options.other}if(!y)throw new Pe(o.value,l,Object.keys(o.options),s);h.push.apply(h,W(y.value,t,r,n,i,l-(o.offset||0)));continue}}return nr(h)}function ar(e,t){return t?b(b(b({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=b(b({},e[n]),t[n]||{}),r},{})):e}function or(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=ar(e[n],t[n]),r},b({},e)):e}function ne(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function sr(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:te(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,K([void 0],r,!1)))},{cache:ne(e.number),strategy:re.variadic}),getDateTimeFormat:te(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,K([void 0],r,!1)))},{cache:ne(e.dateTime),strategy:re.variadic}),getPluralRules:te(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,K([void 0],r,!1)))},{cache:ne(e.pluralRules),strategy:re.variadic})}}var qe=function(){function e(t,r,n,i){var a=this;if(r===void 0&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(f){var u=a.formatToParts(f);if(u.length===1)return u[0].value;var o=u.reduce(function(c,l){return!c.length||l.type!==x.literal||typeof c[c.length-1]!="string"?c.push(l.value):c[c.length-1]+=l.value,c},[]);return o.length<=1?o[0]||"":o},this.formatToParts=function(f){return W(a.ast,a.locales,a.formatters,a.formats,f,void 0,a.message)},this.resolvedOptions=function(){var f;return{locale:((f=a.resolvedLocale)===null||f===void 0?void 0:f.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var h=xt(s,["formatters"]);this.ast=e.__parse(t,b(b({},h),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=or(e.formats,n),this.formatters=i&&i.formatters||sr(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=zt,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},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"}}},e}();function hr(e,t){if(t==null)return;if(t in e)return e[t];const r=t.split(".");let n=e;for(let i=0;i<r.length;i++)if(typeof n=="object"){if(i>0){const a=r.slice(i,r.length).join(".");if(a in n){n=n[a];break}}n=n[r[i]]}else n=void 0;return n}const _={},ur=(e,t,r)=>r&&(t in _||(_[t]={}),e in _[t]||(_[t][e]=r),r),Ye=(e,t)=>{if(t==null)return;if(t in _&&e in _[t])return _[t][e];const r=X(t);for(let n=0;n<r.length;n++){const i=r[n],a=fr(i,e);if(a)return ur(e,t,a)}};let ge;const L=me({});function lr(e){return ge[e]||null}function Ee(e){return
Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const Hr={fallbackLocale:null,loadingDelay:200,formats:yr,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},G=Hr;function I(){return G}function Qr(e){const t=e,{formats:r}=t,n=dr(t,["formats"]);let i=e.fallbackLocale;if(e.initialLocale)try{qe.resolveLocale(e.initialLocale)&&(i=e.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${e.initialLocale}" is not a valid locale.`)}return n.warnOnMissingMessages&&(delete n.warnOnMissingMessages,n.handleMissingMessage==null?n.handleMissingMessage=_r:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(G,n,{initialLocale:i}),r&&("number"in r&&Object.assign(G.formats.number,r.number),"date"in r&&Object.assign(G.formats.date,r.date),"time"in r&&Object.assign(G.formats.time,r.time)),M.set(i)}const ie=me(!1);var Tr=Object.defineProperty,Br=Object.defineProperties,Sr=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,Ar=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Ne=(e,t,r)=>t in e?Tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Or=(e,t)=>{for(var r in t||(t={}))Ar.call(t,r)&&Ne(e,r,t[r]);if(Ie)for(var r of Ie(t))Pr.call(t,r)&&Ne(e,r,t[r]);return e},Ir=(e,t)=>Br(e,Sr(t));let ce;const z=me(null);function Le(e){return e.split("-").map((t,r,n)=>n.slice(0,r+1).join("-")).reverse()}function X(e,t=I().fallbackLocale){const r=Le(e);return t?[...new Set([...r,...Le(t)])]:r}function H(){return ce??void 0}z.subscribe(e=>{ce=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Nr=e=>{if(e&&cr(e)&&Z(e)){const{loadingDelay:t}=I();let r;return typeof window<"u"&&H()!=null&&t?r=window.setTimeout(()=>ie.set(!0),t):ie.set(!0),Ke(e).then(()=>{z.set(e)}).finally(()=>{clearTimeout(r),ie.set(!1)})}return z.set(e)},M=Ir(Or({},z),{set:Nr}),Y=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}};var Lr=Object.defineProperty,Q=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,Me=(e,t,r)=>t in e?Lr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xe=(e,t)=>{for(var r in t||(t={}))et.call(t,r)&&Me(e,r,t[r]);if(Q)for(var r of Q(t))tt.call(t,r)&&Me(e,r,t[r]);return e},C=(e,t)=>{var r={};for(var n in e)et.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Q)for(var n of Q(e))t.indexOf(n)<0&&tt.call(e,n)&&(r[n]=e[n]);return r};const V=(e,t)=>{const{formats:r}=I();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Mr=Y(e=>{var t=e,{locale:r,format:n}=t,i=C(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=V("number",n)),new Intl.NumberFormat(r,i)}),Cr=Y(e=>{var t=e,{locale:r,format:n}=t,i=C(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=V("date",n):Object.keys(i).length===0&&(i=V("date","short")),new Intl.DateTimeFormat(r,i)}),wr=Y(e=>{var t=e,{locale:r,format:n}=t,i=C(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=V("time",n):Object.keys(i).length===0&&(i=V("time","short")),new Intl.DateTimeFormat(r,i)}),Rr=(e={})=>{var t=e,{locale:r=H()}=t,n=C(t,["locale"]);return Mr(xe({locale:r},n))},Ur=(e={})=>{var t=e,{locale:r=H()}=t,n=C(t,["locale"]);return Cr(xe({locale:r},n))},Gr=(e={})=>{var t=e,{locale:r=H()}=t,n=C(t,["locale"]);return wr(xe({locale:r},n))},Dr=Y((e,t=H())=>new qe(e,t,I().formats,{ignoreTag:I().ignoreTag})),Fr=(e,t={})=>{var r,n,i,a;let s=t;typeof e=="object"&&(s=e,e=s.id);const{values:h,locale:f=H(),default:u}=s;if(f==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let o=Ye(e,f);if(!o)o=(a=(i=(n=(r=I()).handleMissingMessage)==null?void 0:n.call(r,{local
//# sourceMappingURL=runtime-8AupoRbQ.js.map