@byomakase/omakase-react-components 1.3.0 → 1.4.1
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/README.md +37 -2
- package/dist/index.cjs.js +94 -72
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.d.ts +19 -16
- package/dist/index.es.js +4365 -3820
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +94 -72
- package/dist/index.umd.js.map +1 -1
- package/dist/omakase-react-components.css +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var vp=Object.defineProperty;var bp=(e,t,r)=>t in e?vp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var k=(e,t,r)=>bp(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("@byomakase/omakase-player"),$=require("react");/*!
|
|
2
2
|
* decimal.js v10.6.0
|
|
3
3
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
4
4
|
* https://github.com/MikeMcl/decimal.js
|
|
5
5
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
6
6
|
* MIT Licence
|
|
7
|
-
*/var at=9e15,Ke=1e9,Br="0123456789abcdef",$n="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",wn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Kr={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-at,maxE:at,crypto:!1},hu,Ne,A=!0,Pn="[DecimalError] ",Re=Pn+"Invalid argument: ",gu=Pn+"Precision limit exceeded",vu=Pn+"crypto unavailable",bu="[object Decimal]",ce=Math.floor,ne=Math.pow,cp=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,sp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,lp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,_u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ie=1e7,O=7,dp=9007199254740991,fp=$n.length-1,Jr=wn.length-1,_={toStringTag:bu};_.absoluteValue=_.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),E(e)};_.ceil=function(){return E(new this.constructor(this),this.e+1,2)};_.clampedTo=_.clamp=function(e,t){var r,i=this,n=i.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(Re+t);return r=i.cmp(e),r<0?e:i.cmp(t)>0?t:new n(i)};_.comparedTo=_.cmp=function(e){var t,r,i,n,o=this,a=o.d,u=(e=new o.constructor(e)).d,s=o.s,c=e.s;if(!a||!u)return!s||!c?NaN:s!==c?s:a===u?0:!a^s<0?1:-1;if(!a[0]||!u[0])return a[0]?s:u[0]?-c:0;if(s!==c)return s;if(o.e!==e.e)return o.e>e.e^s<0?1:-1;for(i=a.length,n=u.length,t=0,r=i<n?i:n;t<r;++t)if(a[t]!==u[t])return a[t]>u[t]^s<0?1:-1;return i===n?0:i>n^s<0?1:-1};_.cosine=_.cos=function(){var e,t,r=this,i=r.constructor;return r.d?r.d[0]?(e=i.precision,t=i.rounding,i.precision=e+Math.max(r.e,r.sd())+O,i.rounding=1,r=mp(i,ku(i,r)),i.precision=e,i.rounding=t,E(Ne==2||Ne==3?r.neg():r,e,t,!0)):new i(1):new i(NaN)};_.cubeRoot=_.cbrt=function(){var e,t,r,i,n,o,a,u,s,c,l=this,d=l.constructor;if(!l.isFinite()||l.isZero())return new d(l);for(A=!1,o=l.s*ne(l.s*l,1/3),!o||Math.abs(o)==1/0?(r=oe(l.d),e=l.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=ne(r,1/3),e=ce((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),i=new d(r),i.s=l.s):i=new d(o.toString()),a=(e=d.precision)+3;;)if(u=i,s=u.times(u).times(u),c=s.plus(l),i=G(c.plus(l).times(u),c.plus(s),a+2,1),oe(u.d).slice(0,a)===(r=oe(i.d)).slice(0,a))if(r=r.slice(a-3,a+1),r=="9999"||!n&&r=="4999"){if(!n&&(E(u,e+1,0),u.times(u).times(u).eq(l))){i=u;break}a+=4,n=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(E(i,e+1,1),t=!i.times(i).times(i).eq(l));break}return A=!0,E(i,e,d.rounding,t)};_.decimalPlaces=_.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ce(this.e/O))*O,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};_.dividedBy=_.div=function(e){return G(this,new this.constructor(e))};_.dividedToIntegerBy=_.divToInt=function(e){var t=this,r=t.constructor;return E(G(t,new r(e),0,1,1),r.precision,r.rounding)};_.equals=_.eq=function(e){return this.cmp(e)===0};_.floor=function(){return E(new this.constructor(this),this.e+1,3)};_.greaterThan=_.gt=function(e){return this.cmp(e)>0};_.greaterThanOrEqualTo=_.gte=function(e){var t=this.cmp(e);return t==1||t===0};_.hyperbolicCosine=_.cosh=function(){var e,t,r,i,n,o=this,a=o.constructor,u=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return u;r=a.precision,i=a.rounding,a.precision=r+Math.max(o.e,o.sd())+4,a.rounding=1,n=o.d.length,n<32?(e=Math.ceil(n/3),t=(1/Cn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=st(a,1,o.times(t),new a(1),!0);for(var s,c=e,l=new a(8);c--;)s=o.times(o),o=u.minus(s.times(l.minus(s.times(l))));return E(o,a.precision=r,a.rounding=i,!0)};_.hyperbolicSine=_.sinh=function(){var e,t,r,i,n=this,o=n.constructor;if(!n.isFinite()||n.isZero())return new o(n);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(n.e,n.sd())+4,o.rounding=1,i=n.d.length,i<3)n=st(o,2,n,n,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,n=n.times(1/Cn(5,e)),n=st(o,2,n,n,!0);for(var a,u=new o(5),s=new o(16),c=new o(20);e--;)a=n.times(n),n=n.times(u.plus(a.times(s.times(a).plus(c))))}return o.precision=t,o.rounding=r,E(n,t,r,!0)};_.hyperbolicTangent=_.tanh=function(){var e,t,r=this,i=r.constructor;return r.isFinite()?r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+7,i.rounding=1,G(r.sinh(),r.cosh(),i.precision=e,i.rounding=t)):new i(r.s)};_.inverseCosine=_.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),i=t.precision,n=t.rounding;return r!==-1?r===0?e.isNeg()?Te(t,i,n):new t(0):new t(NaN):e.isZero()?Te(t,i+4,n).times(.5):(t.precision=i+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=i,t.rounding=n,e.times(2))};_.inverseHyperbolicCosine=_.acosh=function(){var e,t,r=this,i=r.constructor;return r.lte(1)?new i(r.eq(1)?0:NaN):r.isFinite()?(e=i.precision,t=i.rounding,i.precision=e+Math.max(Math.abs(r.e),r.sd())+4,i.rounding=1,A=!1,r=r.times(r).minus(1).sqrt().plus(r),A=!0,i.precision=e,i.rounding=t,r.ln()):new i(r)};_.inverseHyperbolicSine=_.asinh=function(){var e,t,r=this,i=r.constructor;return!r.isFinite()||r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,i.rounding=1,A=!1,r=r.times(r).plus(1).sqrt().plus(r),A=!0,i.precision=e,i.rounding=t,r.ln())};_.inverseHyperbolicTangent=_.atanh=function(){var e,t,r,i,n=this,o=n.constructor;return n.isFinite()?n.e>=0?new o(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(e=o.precision,t=o.rounding,i=n.sd(),Math.max(i,e)<2*-n.e-1?E(new o(n),e,t,!0):(o.precision=r=i-n.e,n=G(n.plus(1),new o(1).minus(n),r+e,1),o.precision=e+4,o.rounding=1,n=n.ln(),o.precision=e,o.rounding=t,n.times(.5))):new o(NaN)};_.inverseSine=_.asin=function(){var e,t,r,i,n=this,o=n.constructor;return n.isZero()?new o(n):(t=n.abs().cmp(1),r=o.precision,i=o.rounding,t!==-1?t===0?(e=Te(o,r+4,i).times(.5),e.s=n.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,n=n.div(new o(1).minus(n.times(n)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=i,n.times(2)))};_.inverseTangent=_.atan=function(){var e,t,r,i,n,o,a,u,s,c=this,l=c.constructor,d=l.precision,f=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&d+4<=Jr)return a=Te(l,d+4,f).times(.25),a.s=c.s,a}else{if(!c.s)return new l(NaN);if(d+4<=Jr)return a=Te(l,d+4,f).times(.5),a.s=c.s,a}for(l.precision=u=d+10,l.rounding=1,r=Math.min(28,u/O+2|0),e=r;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(A=!1,t=Math.ceil(u/O),i=1,s=c.times(c),a=new l(c),n=c;e!==-1;)if(n=n.times(s),o=a.minus(n.div(i+=2)),n=n.times(s),a=o.plus(n.div(i+=2)),a.d[t]!==void 0)for(e=t;a.d[e]===o.d[e]&&e--;);return r&&(a=a.times(2<<r-1)),A=!0,E(a,l.precision=d,l.rounding=f,!0)};_.isFinite=function(){return!!this.d};_.isInteger=_.isInt=function(){return!!this.d&&ce(this.e/O)>this.d.length-2};_.isNaN=function(){return!this.s};_.isNegative=_.isNeg=function(){return this.s<0};_.isPositive=_.isPos=function(){return this.s>0};_.isZero=function(){return!!this.d&&this.d[0]===0};_.lessThan=_.lt=function(e){return this.cmp(e)<0};_.lessThanOrEqualTo=_.lte=function(e){return this.cmp(e)<1};_.logarithm=_.log=function(e){var t,r,i,n,o,a,u,s,c=this,l=c.constructor,d=l.precision,f=l.rounding,m=5;if(e==null)e=new l(10),t=!0;else{if(e=new l(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(r=c.d,c.s<0||!r||!r[0]||c.eq(1))return new l(r&&!r[0]?-1/0:c.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(n=r[0];n%10===0;)n/=10;o=n!==1}if(A=!1,u=d+m,a=Ze(c,u),i=t?Sn(l,u+10):Ze(e,u),s=G(a,i,u,1),It(s.d,n=d,f))do if(u+=10,a=Ze(c,u),i=t?Sn(l,u+10):Ze(e,u),s=G(a,i,u,1),!o){+oe(s.d).slice(n+1,n+15)+1==1e14&&(s=E(s,d+1,0));break}while(It(s.d,n+=10,f));return A=!0,E(s,d,f)};_.minus=_.sub=function(e){var t,r,i,n,o,a,u,s,c,l,d,f,m=this,g=m.constructor;if(e=new g(e),!m.d||!e.d)return!m.s||!e.s?e=new g(NaN):m.d?e.s=-e.s:e=new g(e.d||m.s!==e.s?m:NaN),e;if(m.s!=e.s)return e.s=-e.s,m.plus(e);if(c=m.d,f=e.d,u=g.precision,s=g.rounding,!c[0]||!f[0]){if(f[0])e.s=-e.s;else if(c[0])e=new g(m);else return new g(s===3?-0:0);return A?E(e,u,s):e}if(r=ce(e.e/O),l=ce(m.e/O),c=c.slice(),o=l-r,o){for(d=o<0,d?(t=c,o=-o,a=f.length):(t=f,r=l,a=c.length),i=Math.max(Math.ceil(u/O),a)+2,o>i&&(o=i,t.length=1),t.reverse(),i=o;i--;)t.push(0);t.reverse()}else{for(i=c.length,a=f.length,d=i<a,d&&(a=i),i=0;i<a;i++)if(c[i]!=f[i]){d=c[i]<f[i];break}o=0}for(d&&(t=c,c=f,f=t,e.s=-e.s),a=c.length,i=f.length-a;i>0;--i)c[a++]=0;for(i=f.length;i>o;){if(c[--i]<f[i]){for(n=i;n&&c[--n]===0;)c[n]=Ie-1;--c[n],c[i]+=Ie}c[i]-=f[i]}for(;c[--a]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(e.d=c,e.e=An(c,r),A?E(e,u,s):e):new g(s===3?-0:0)};_.modulo=_.mod=function(e){var t,r=this,i=r.constructor;return e=new i(e),!r.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||r.d&&!r.d[0]?E(new i(r),i.precision,i.rounding):(A=!1,i.modulo==9?(t=G(r,e.abs(),0,3,1),t.s*=e.s):t=G(r,e,0,i.modulo,1),t=t.times(e),A=!0,r.minus(t))};_.naturalExponential=_.exp=function(){return Gr(this)};_.naturalLogarithm=_.ln=function(){return Ze(this)};_.negated=_.neg=function(){var e=new this.constructor(this);return e.s=-e.s,E(e)};_.plus=_.add=function(e){var t,r,i,n,o,a,u,s,c,l,d=this,f=d.constructor;if(e=new f(e),!d.d||!e.d)return!d.s||!e.s?e=new f(NaN):d.d||(e=new f(e.d||d.s===e.s?d:NaN)),e;if(d.s!=e.s)return e.s=-e.s,d.minus(e);if(c=d.d,l=e.d,u=f.precision,s=f.rounding,!c[0]||!l[0])return l[0]||(e=new f(d)),A?E(e,u,s):e;if(o=ce(d.e/O),i=ce(e.e/O),c=c.slice(),n=o-i,n){for(n<0?(r=c,n=-n,a=l.length):(r=l,i=o,a=c.length),o=Math.ceil(u/O),a=o>a?o+1:a+1,n>a&&(n=a,r.length=1),r.reverse();n--;)r.push(0);r.reverse()}for(a=c.length,n=l.length,a-n<0&&(n=a,r=l,l=c,c=r),t=0;n;)t=(c[--n]=c[n]+l[n]+t)/Ie|0,c[n]%=Ie;for(t&&(c.unshift(t),++i),a=c.length;c[--a]==0;)c.pop();return e.d=c,e.e=An(c,i),A?E(e,u,s):e};_.precision=_.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Re+e);return r.d?(t=yu(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};_.round=function(){var e=this,t=e.constructor;return E(new t(e),e.e+1,t.rounding)};_.sine=_.sin=function(){var e,t,r=this,i=r.constructor;return r.isFinite()?r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+Math.max(r.e,r.sd())+O,i.rounding=1,r=hp(i,ku(i,r)),i.precision=e,i.rounding=t,E(Ne>2?r.neg():r,e,t,!0)):new i(NaN)};_.squareRoot=_.sqrt=function(){var e,t,r,i,n,o,a=this,u=a.d,s=a.e,c=a.s,l=a.constructor;if(c!==1||!u||!u[0])return new l(!c||c<0&&(!u||u[0])?NaN:u?a:1/0);for(A=!1,c=Math.sqrt(+a),c==0||c==1/0?(t=oe(u),(t.length+s)%2==0&&(t+="0"),c=Math.sqrt(t),s=ce((s+1)/2)-(s<0||s%2),c==1/0?t="5e"+s:(t=c.toExponential(),t=t.slice(0,t.indexOf("e")+1)+s),i=new l(t)):i=new l(c.toString()),r=(s=l.precision)+3;;)if(o=i,i=o.plus(G(a,o,r+2,1)).times(.5),oe(o.d).slice(0,r)===(t=oe(i.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!n&&t=="4999"){if(!n&&(E(o,s+1,0),o.times(o).eq(a))){i=o;break}r+=4,n=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(E(i,s+1,1),e=!i.times(i).eq(a));break}return A=!0,E(i,s,l.rounding,e)};_.tangent=_.tan=function(){var e,t,r=this,i=r.constructor;return r.isFinite()?r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+10,i.rounding=1,r=r.sin(),r.s=1,r=G(r,new i(1).minus(r.times(r)).sqrt(),e+10,0),i.precision=e,i.rounding=t,E(Ne==2||Ne==4?r.neg():r,e,t,!0)):new i(NaN)};_.times=_.mul=function(e){var t,r,i,n,o,a,u,s,c,l=this,d=l.constructor,f=l.d,m=(e=new d(e)).d;if(e.s*=l.s,!f||!f[0]||!m||!m[0])return new d(!e.s||f&&!f[0]&&!m||m&&!m[0]&&!f?NaN:!f||!m?e.s/0:e.s*0);for(r=ce(l.e/O)+ce(e.e/O),s=f.length,c=m.length,s<c&&(o=f,f=m,m=o,a=s,s=c,c=a),o=[],a=s+c,i=a;i--;)o.push(0);for(i=c;--i>=0;){for(t=0,n=s+i;n>i;)u=o[n]+m[i]*f[n-i-1]+t,o[n--]=u%Ie|0,t=u/Ie|0;o[n]=(o[n]+t)%Ie|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=An(o,r),A?E(e,d.precision,d.rounding):e};_.toBinary=function(e,t){return fi(this,2,e,t)};_.toDecimalPlaces=_.toDP=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(me(e,0,Ke),t===void 0?t=i.rounding:me(t,0,8),E(r,e+r.e+1,t))};_.toExponential=function(e,t){var r,i=this,n=i.constructor;return e===void 0?r=Ee(i,!0):(me(e,0,Ke),t===void 0?t=n.rounding:me(t,0,8),i=E(new n(i),e+1,t),r=Ee(i,!0,e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};_.toFixed=function(e,t){var r,i,n=this,o=n.constructor;return e===void 0?r=Ee(n):(me(e,0,Ke),t===void 0?t=o.rounding:me(t,0,8),i=E(new o(n),e+n.e+1,t),r=Ee(i,!1,e+i.e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};_.toFraction=function(e){var t,r,i,n,o,a,u,s,c,l,d,f,m=this,g=m.d,h=m.constructor;if(!g)return new h(m);if(c=r=new h(1),i=s=new h(0),t=new h(i),o=t.e=yu(g)-m.e-1,a=o%O,t.d[0]=ne(10,a<0?O+a:a),e==null)e=o>0?t:c;else{if(u=new h(e),!u.isInt()||u.lt(c))throw Error(Re+u);e=u.gt(t)?o>0?t:c:u}for(A=!1,u=new h(oe(g)),l=h.precision,h.precision=o=g.length*O*2;d=G(u,t,0,1,1),n=r.plus(d.times(i)),n.cmp(e)!=1;)r=i,i=n,n=c,c=s.plus(d.times(n)),s=n,n=t,t=u.minus(d.times(n)),u=n;return n=G(e.minus(r),i,0,1,1),s=s.plus(n.times(c)),r=r.plus(n.times(i)),s.s=c.s=m.s,f=G(c,i,o,1).minus(m).abs().cmp(G(s,r,o,1).minus(m).abs())<1?[c,i]:[s,r],h.precision=l,A=!0,f};_.toHexadecimal=_.toHex=function(e,t){return fi(this,16,e,t)};_.toNearest=function(e,t){var r=this,i=r.constructor;if(r=new i(r),e==null){if(!r.d)return r;e=new i(1),t=i.rounding}else{if(e=new i(e),t===void 0?t=i.rounding:me(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(A=!1,r=G(r,e,0,t,1).times(e),A=!0,E(r)):(e.s=r.s,r=e),r};_.toNumber=function(){return+this};_.toOctal=function(e,t){return fi(this,8,e,t)};_.toPower=_.pow=function(e){var t,r,i,n,o,a,u=this,s=u.constructor,c=+(e=new s(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new s(ne(+u,c));if(u=new s(u),u.eq(1))return u;if(i=s.precision,o=s.rounding,e.eq(1))return E(u,i,o);if(t=ce(e.e/O),t>=e.d.length-1&&(r=c<0?-c:c)<=dp)return n=$u(s,u,r,i),e.s<0?new s(1).div(n):E(n,i,o);if(a=u.s,a<0){if(t<e.d.length-1)return new s(NaN);if((e.d[t]&1)==0&&(a=1),u.e==0&&u.d[0]==1&&u.d.length==1)return u.s=a,u}return r=ne(+u,c),t=r==0||!isFinite(r)?ce(c*(Math.log("0."+oe(u.d))/Math.LN10+u.e+1)):new s(r+"").e,t>s.maxE+1||t<s.minE-1?new s(t>0?a/0:0):(A=!1,s.rounding=u.s=1,r=Math.min(12,(t+"").length),n=Gr(e.times(Ze(u,i+r)),i),n.d&&(n=E(n,i+5,1),It(n.d,i,o)&&(t=i+10,n=E(Gr(e.times(Ze(u,t+r)),t),t+5,1),+oe(n.d).slice(i+1,i+15)+1==1e14&&(n=E(n,i+1,0)))),n.s=a,A=!0,s.rounding=o,E(n,i,o))};_.toPrecision=function(e,t){var r,i=this,n=i.constructor;return e===void 0?r=Ee(i,i.e<=n.toExpNeg||i.e>=n.toExpPos):(me(e,1,Ke),t===void 0?t=n.rounding:me(t,0,8),i=E(new n(i),e,t),r=Ee(i,e<=i.e||i.e<=n.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+r:r};_.toSignificantDigits=_.toSD=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(me(e,1,Ke),t===void 0?t=i.rounding:me(t,0,8)),E(new i(r),e,t)};_.toString=function(){var e=this,t=e.constructor,r=Ee(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};_.truncated=_.trunc=function(){return E(new this.constructor(this),this.e+1,1)};_.valueOf=_.toJSON=function(){var e=this,t=e.constructor,r=Ee(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function oe(e){var t,r,i,n=e.length-1,o="",a=e[0];if(n>0){for(o+=a,t=1;t<n;t++)i=e[t]+"",r=O-i.length,r&&(o+=Le(r)),o+=i;a=e[t],i=a+"",r=O-i.length,r&&(o+=Le(r))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}function me(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Re+e)}function It(e,t,r,i){var n,o,a,u;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=O,n=0):(n=Math.ceil((t+1)/O),t%=O),o=ne(10,O-t),u=e[n]%o|0,i==null?t<3?(t==0?u=u/100|0:t==1&&(u=u/10|0),a=r<4&&u==99999||r>3&&u==49999||u==5e4||u==0):a=(r<4&&u+1==o||r>3&&u+1==o/2)&&(e[n+1]/o/100|0)==ne(10,t-2)-1||(u==o/2||u==0)&&(e[n+1]/o/100|0)==0:t<4?(t==0?u=u/1e3|0:t==1?u=u/100|0:t==2&&(u=u/10|0),a=(i||r<4)&&u==9999||!i&&r>3&&u==4999):a=((i||r<4)&&u+1==o||!i&&r>3&&u+1==o/2)&&(e[n+1]/o/1e3|0)==ne(10,t-3)-1,a}function gn(e,t,r){for(var i,n=[0],o,a=0,u=e.length;a<u;){for(o=n.length;o--;)n[o]*=t;for(n[0]+=Br.indexOf(e.charAt(a++)),i=0;i<n.length;i++)n[i]>r-1&&(n[i+1]===void 0&&(n[i+1]=0),n[i+1]+=n[i]/r|0,n[i]%=r)}return n.reverse()}function mp(e,t){var r,i,n;if(t.isZero())return t;i=t.d.length,i<32?(r=Math.ceil(i/3),n=(1/Cn(4,r)).toString()):(r=16,n="2.3283064365386962890625e-10"),e.precision+=r,t=st(e,1,t.times(n),new e(1));for(var o=r;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=r,t}var G=(function(){function e(i,n,o){var a,u=0,s=i.length;for(i=i.slice();s--;)a=i[s]*n+u,i[s]=a%o|0,u=a/o|0;return u&&i.unshift(u),i}function t(i,n,o,a){var u,s;if(o!=a)s=o>a?1:-1;else for(u=s=0;u<o;u++)if(i[u]!=n[u]){s=i[u]>n[u]?1:-1;break}return s}function r(i,n,o,a){for(var u=0;o--;)i[o]-=u,u=i[o]<n[o]?1:0,i[o]=u*a+i[o]-n[o];for(;!i[0]&&i.length>1;)i.shift()}return function(i,n,o,a,u,s){var c,l,d,f,m,g,h,v,w,T,z,L,F,j,ee,te,Y,Ce,ie,Ue,De=i.constructor,rt=i.s==n.s?1:-1,Q=i.d,V=n.d;if(!Q||!Q[0]||!V||!V[0])return new De(!i.s||!n.s||(Q?V&&Q[0]==V[0]:!V)?NaN:Q&&Q[0]==0||!V?rt*0:rt/0);for(s?(m=1,l=i.e-n.e):(s=Ie,m=O,l=ce(i.e/m)-ce(n.e/m)),ie=V.length,Y=Q.length,w=new De(rt),T=w.d=[],d=0;V[d]==(Q[d]||0);d++);if(V[d]>(Q[d]||0)&&l--,o==null?(j=o=De.precision,a=De.rounding):u?j=o+(i.e-n.e)+1:j=o,j<0)T.push(1),g=!0;else{if(j=j/m+2|0,d=0,ie==1){for(f=0,V=V[0],j++;(d<Y||f)&&j--;d++)ee=f*s+(Q[d]||0),T[d]=ee/V|0,f=ee%V|0;g=f||d<Y}else{for(f=s/(V[0]+1)|0,f>1&&(V=e(V,f,s),Q=e(Q,f,s),ie=V.length,Y=Q.length),te=ie,z=Q.slice(0,ie),L=z.length;L<ie;)z[L++]=0;Ue=V.slice(),Ue.unshift(0),Ce=V[0],V[1]>=s/2&&++Ce;do f=0,c=t(V,z,ie,L),c<0?(F=z[0],ie!=L&&(F=F*s+(z[1]||0)),f=F/Ce|0,f>1?(f>=s&&(f=s-1),h=e(V,f,s),v=h.length,L=z.length,c=t(h,z,v,L),c==1&&(f--,r(h,ie<v?Ue:V,v,s))):(f==0&&(c=f=1),h=V.slice()),v=h.length,v<L&&h.unshift(0),r(z,h,L,s),c==-1&&(L=z.length,c=t(V,z,ie,L),c<1&&(f++,r(z,ie<L?Ue:V,L,s))),L=z.length):c===0&&(f++,z=[0]),T[d++]=f,c&&z[0]?z[L++]=Q[te]||0:(z=[Q[te]],L=1);while((te++<Y||z[0]!==void 0)&&j--);g=z[0]!==void 0}T[0]||T.shift()}if(m==1)w.e=l,hu=g;else{for(d=1,f=T[0];f>=10;f/=10)d++;w.e=d+l*m-1,E(w,u?o+w.e+1:o,a,g)}return w}})();function E(e,t,r,i){var n,o,a,u,s,c,l,d,f,m=e.constructor;e:if(t!=null){if(d=e.d,!d)return e;for(n=1,u=d[0];u>=10;u/=10)n++;if(o=t-n,o<0)o+=O,a=t,l=d[f=0],s=l/ne(10,n-a-1)%10|0;else if(f=Math.ceil((o+1)/O),u=d.length,f>=u)if(i){for(;u++<=f;)d.push(0);l=s=0,n=1,o%=O,a=o-O+1}else break e;else{for(l=u=d[f],n=1;u>=10;u/=10)n++;o%=O,a=o-O+n,s=a<0?0:l/ne(10,n-a-1)%10|0}if(i=i||t<0||d[f+1]!==void 0||(a<0?l:l%ne(10,n-a-1)),c=r<4?(s||i)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||i||r==6&&(o>0?a>0?l/ne(10,n-a):0:d[f-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,c?(t-=e.e+1,d[0]=ne(10,(O-t%O)%O),e.e=-t||0):d[0]=e.e=0,e;if(o==0?(d.length=f,u=1,f--):(d.length=f+1,u=ne(10,O-o),d[f]=a>0?(l/ne(10,n-a)%ne(10,a)|0)*u:0),c)for(;;)if(f==0){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=u,u=1;a>=10;a/=10)u++;o!=u&&(e.e++,d[0]==Ie&&(d[0]=1));break}else{if(d[f]+=u,d[f]!=Ie)break;d[f--]=0,u=1}for(o=d.length;d[--o]===0;)d.pop()}return A&&(e.e>m.maxE?(e.d=null,e.e=NaN):e.e<m.minE&&(e.e=0,e.d=[0])),e}function Ee(e,t,r){if(!e.isFinite())return Su(e);var i,n=e.e,o=oe(e.d),a=o.length;return t?(r&&(i=r-a)>0?o=o.charAt(0)+"."+o.slice(1)+Le(i):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):n<0?(o="0."+Le(-n-1)+o,r&&(i=r-a)>0&&(o+=Le(i))):n>=a?(o+=Le(n+1-a),r&&(i=r-n-1)>0&&(o=o+"."+Le(i))):((i=n+1)<a&&(o=o.slice(0,i)+"."+o.slice(i)),r&&(i=r-a)>0&&(n+1===a&&(o+="."),o+=Le(i))),o}function An(e,t){var r=e[0];for(t*=O;r>=10;r/=10)t++;return t}function Sn(e,t,r){if(t>fp)throw A=!0,r&&(e.precision=r),Error(gu);return E(new e($n),t,1,!0)}function Te(e,t,r){if(t>Jr)throw Error(gu);return E(new e(wn),t,r,!0)}function yu(e){var t=e.length-1,r=t*O+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Le(e){for(var t="";e--;)t+="0";return t}function $u(e,t,r,i){var n,o=new e(1),a=Math.ceil(i/O+4);for(A=!1;;){if(r%2&&(o=o.times(t),Sa(o.d,a)&&(n=!0)),r=ce(r/2),r===0){r=o.d.length-1,n&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Sa(t.d,a)}return A=!0,o}function wa(e){return e.d[e.d.length-1]&1}function wu(e,t,r){for(var i,n,o=new e(t[0]),a=0;++a<t.length;){if(n=new e(t[a]),!n.s){o=n;break}i=o.cmp(n),(i===r||i===0&&o.s===r)&&(o=n)}return o}function Gr(e,t){var r,i,n,o,a,u,s,c=0,l=0,d=0,f=e.constructor,m=f.rounding,g=f.precision;if(!e.d||!e.d[0]||e.e>17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(A=!1,s=g):s=t,u=new f(.03125);e.e>-2;)e=e.times(u),d+=5;for(i=Math.log(ne(2,d))/Math.LN10*2+5|0,s+=i,r=o=a=new f(1),f.precision=s;;){if(o=E(o.times(e),s,1),r=r.times(++l),u=a.plus(G(o,r,s,1)),oe(u.d).slice(0,s)===oe(a.d).slice(0,s)){for(n=d;n--;)a=E(a.times(a),s,1);if(t==null)if(c<3&&It(a.d,s-i,m,c))f.precision=s+=10,r=o=u=new f(1),l=0,c++;else return E(a,f.precision=g,m,A=!0);else return f.precision=g,a}a=u}}function Ze(e,t){var r,i,n,o,a,u,s,c,l,d,f,m=1,g=10,h=e,v=h.d,w=h.constructor,T=w.rounding,z=w.precision;if(h.s<0||!v||!v[0]||!h.e&&v[0]==1&&v.length==1)return new w(v&&!v[0]?-1/0:h.s!=1?NaN:v?0:h);if(t==null?(A=!1,l=z):l=t,w.precision=l+=g,r=oe(v),i=r.charAt(0),Math.abs(o=h.e)<15e14){for(;i<7&&i!=1||i==1&&r.charAt(1)>3;)h=h.times(e),r=oe(h.d),i=r.charAt(0),m++;o=h.e,i>1?(h=new w("0."+r),o++):h=new w(i+"."+r.slice(1))}else return c=Sn(w,l+2,z).times(o+""),h=Ze(new w(i+"."+r.slice(1)),l-g).plus(c),w.precision=z,t==null?E(h,z,T,A=!0):h;for(d=h,s=a=h=G(h.minus(1),h.plus(1),l,1),f=E(h.times(h),l,1),n=3;;){if(a=E(a.times(f),l,1),c=s.plus(G(a,new w(n),l,1)),oe(c.d).slice(0,l)===oe(s.d).slice(0,l))if(s=s.times(2),o!==0&&(s=s.plus(Sn(w,l+2,z).times(o+""))),s=G(s,new w(m),l,1),t==null)if(It(s.d,l-g,T,u))w.precision=l+=g,c=a=h=G(d.minus(1),d.plus(1),l,1),f=E(h.times(h),l,1),n=u=1;else return E(s,w.precision=z,T,A=!0);else return w.precision=z,s;s=c,n+=2}}function Su(e){return String(e.s*e.s/0)}function vn(e,t){var r,i,n;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(r<0&&(r=i),r+=+t.slice(i+1),t=t.substring(0,i)):r<0&&(r=t.length),i=0;t.charCodeAt(i)===48;i++);for(n=t.length;t.charCodeAt(n-1)===48;--n);if(t=t.slice(i,n),t){if(n-=i,e.e=r=r-i-1,e.d=[],i=(r+1)%O,r<0&&(i+=O),i<n){for(i&&e.d.push(+t.slice(0,i)),n-=O;i<n;)e.d.push(+t.slice(i,i+=O));t=t.slice(i),i=O-t.length}else i-=n;for(;i--;)t+="0";e.d.push(+t),A&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function pp(e,t){var r,i,n,o,a,u,s,c,l;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),_u.test(t))return vn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(sp.test(t))r=16,t=t.toLowerCase();else if(cp.test(t))r=2;else if(lp.test(t))r=8;else throw Error(Re+t);for(o=t.search(/p/i),o>0?(s=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),a=o>=0,i=e.constructor,a&&(t=t.replace(".",""),u=t.length,o=u-o,n=$u(i,new i(r),o,o*2)),c=gn(t,r,Ie),l=c.length-1,o=l;c[o]===0;--o)c.pop();return o<0?new i(e.s*0):(e.e=An(c,l),e.d=c,A=!1,a&&(e=G(e,n,u*4)),s&&(e=e.times(Math.abs(s)<54?ne(2,s):Dt.pow(2,s))),A=!0,e)}function hp(e,t){var r,i=t.d.length;if(i<3)return t.isZero()?t:st(e,2,t,t);r=1.4*Math.sqrt(i),r=r>16?16:r|0,t=t.times(1/Cn(5,r)),t=st(e,2,t,t);for(var n,o=new e(5),a=new e(16),u=new e(20);r--;)n=t.times(t),t=t.times(o.plus(n.times(a.times(n).minus(u))));return t}function st(e,t,r,i,n){var o,a,u,s,c=e.precision,l=Math.ceil(c/O);for(A=!1,s=r.times(r),u=new e(i);;){if(a=G(u.times(s),new e(t++*t++),c,1),u=n?i.plus(a):i.minus(a),i=G(a.times(s),new e(t++*t++),c,1),a=u.plus(i),a.d[l]!==void 0){for(o=l;a.d[o]===u.d[o]&&o--;);if(o==-1)break}o=u,u=i,i=a,a=o}return A=!0,a.d.length=l+1,a}function Cn(e,t){for(var r=e;--t;)r*=e;return r}function ku(e,t){var r,i=t.s<0,n=Te(e,e.precision,1),o=n.times(.5);if(t=t.abs(),t.lte(o))return Ne=i?4:1,t;if(r=t.divToInt(n),r.isZero())Ne=i?3:2;else{if(t=t.minus(r.times(n)),t.lte(o))return Ne=wa(r)?i?2:3:i?4:1,t;Ne=wa(r)?i?1:4:i?3:2}return t.minus(n).abs()}function fi(e,t,r,i){var n,o,a,u,s,c,l,d,f,m=e.constructor,g=r!==void 0;if(g?(me(r,1,Ke),i===void 0?i=m.rounding:me(i,0,8)):(r=m.precision,i=m.rounding),!e.isFinite())l=Su(e);else{for(l=Ee(e),a=l.indexOf("."),g?(n=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):n=t,a>=0&&(l=l.replace(".",""),f=new m(1),f.e=l.length-a,f.d=gn(Ee(f),10,n),f.e=f.d.length),d=gn(l,10,n),o=s=d.length;d[--s]==0;)d.pop();if(!d[0])l=g?"0p+0":"0";else{if(a<0?o--:(e=new m(e),e.d=d,e.e=o,e=G(e,f,r,i,0,n),d=e.d,o=e.e,c=hu),a=d[r],u=n/2,c=c||d[r+1]!==void 0,c=i<4?(a!==void 0||c)&&(i===0||i===(e.s<0?3:2)):a>u||a===u&&(i===4||c||i===6&&d[r-1]&1||i===(e.s<0?8:7)),d.length=r,c)for(;++d[--r]>n-1;)d[r]=0,r||(++o,d.unshift(1));for(s=d.length;!d[s-1];--s);for(a=0,l="";a<s;a++)l+=Br.charAt(d[a]);if(g){if(s>1)if(t==16||t==8){for(a=t==16?4:3,--s;s%a;s++)l+="0";for(d=gn(l,n,t),s=d.length;!d[s-1];--s);for(a=1,l="1.";a<s;a++)l+=Br.charAt(d[a])}else l=l.charAt(0)+"."+l.slice(1);l=l+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)l="0"+l;l="0."+l}else if(++o>s)for(o-=s;o--;)l+="0";else o<s&&(l=l.slice(0,o)+"."+l.slice(o))}l=(t==16?"0x":t==2?"0b":t==8?"0o":"")+l}return e.s<0?"-"+l:l}function Sa(e,t){if(e.length>t)return e.length=t,!0}function gp(e){return new this(e).abs()}function vp(e){return new this(e).acos()}function bp(e){return new this(e).acosh()}function _p(e,t){return new this(e).plus(t)}function yp(e){return new this(e).asin()}function $p(e){return new this(e).asinh()}function wp(e){return new this(e).atan()}function Sp(e){return new this(e).atanh()}function kp(e,t){e=new this(e),t=new this(t);var r,i=this.precision,n=this.rounding,o=i+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=Te(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?Te(this,i,n):new this(0),r.s=e.s):!e.d||t.isZero()?(r=Te(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(G(e,t,o,1)),t=Te(this,o,1),this.precision=i,this.rounding=n,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(G(e,t,o,1)),r}function Ip(e){return new this(e).cbrt()}function xp(e){return E(e=new this(e),e.e+1,2)}function Tp(e,t,r){return new this(e).clamp(t,r)}function zp(e){if(!e||typeof e!="object")throw Error(Pn+"Object expected");var t,r,i,n=e.defaults===!0,o=["precision",1,Ke,"rounding",0,8,"toExpNeg",-at,0,"toExpPos",0,at,"maxE",0,at,"minE",-at,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(r=o[t],n&&(this[r]=Kr[r]),(i=e[r])!==void 0)if(ce(i)===i&&i>=o[t+1]&&i<=o[t+2])this[r]=i;else throw Error(Re+r+": "+i);if(r="crypto",n&&(this[r]=Kr[r]),(i=e[r])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(vu);else this[r]=!1;else throw Error(Re+r+": "+i);return this}function Ep(e){return new this(e).cos()}function Op(e){return new this(e).cosh()}function Iu(e){var t,r,i;function n(o){var a,u,s,c=this;if(!(c instanceof n))return new n(o);if(c.constructor=n,ka(o)){c.s=o.s,A?!o.d||o.e>n.maxE?(c.e=NaN,c.d=null):o.e<n.minE?(c.e=0,c.d=[0]):(c.e=o.e,c.d=o.d.slice()):(c.e=o.e,c.d=o.d?o.d.slice():o.d);return}if(s=typeof o,s==="number"){if(o===0){c.s=1/o<0?-1:1,c.e=0,c.d=[0];return}if(o<0?(o=-o,c.s=-1):c.s=1,o===~~o&&o<1e7){for(a=0,u=o;u>=10;u/=10)a++;A?a>n.maxE?(c.e=NaN,c.d=null):a<n.minE?(c.e=0,c.d=[0]):(c.e=a,c.d=[o]):(c.e=a,c.d=[o]);return}if(o*0!==0){o||(c.s=NaN),c.e=NaN,c.d=null;return}return vn(c,o.toString())}if(s==="string")return(u=o.charCodeAt(0))===45?(o=o.slice(1),c.s=-1):(u===43&&(o=o.slice(1)),c.s=1),_u.test(o)?vn(c,o):pp(c,o);if(s==="bigint")return o<0?(o=-o,c.s=-1):c.s=1,vn(c,o.toString());throw Error(Re+o)}if(n.prototype=_,n.ROUND_UP=0,n.ROUND_DOWN=1,n.ROUND_CEIL=2,n.ROUND_FLOOR=3,n.ROUND_HALF_UP=4,n.ROUND_HALF_DOWN=5,n.ROUND_HALF_EVEN=6,n.ROUND_HALF_CEIL=7,n.ROUND_HALF_FLOOR=8,n.EUCLID=9,n.config=n.set=zp,n.clone=Iu,n.isDecimal=ka,n.abs=gp,n.acos=vp,n.acosh=bp,n.add=_p,n.asin=yp,n.asinh=$p,n.atan=wp,n.atanh=Sp,n.atan2=kp,n.cbrt=Ip,n.ceil=xp,n.clamp=Tp,n.cos=Ep,n.cosh=Op,n.div=Up,n.exp=Dp,n.floor=Np,n.hypot=jp,n.ln=Pp,n.log=Ap,n.log10=Lp,n.log2=Cp,n.max=Zp,n.min=Mp,n.mod=Rp,n.mul=Fp,n.pow=Vp,n.random=Bp,n.round=Kp,n.sign=Jp,n.sin=Gp,n.sinh=Wp,n.sqrt=Hp,n.sub=qp,n.sum=Xp,n.tan=Yp,n.tanh=Qp,n.trunc=eh,e===void 0&&(e={}),e&&e.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<i.length;)e.hasOwnProperty(r=i[t++])||(e[r]=this[r]);return n.config(e),n}function Up(e,t){return new this(e).div(t)}function Dp(e){return new this(e).exp()}function Np(e){return E(e=new this(e),e.e+1,3)}function jp(){var e,t,r=new this(0);for(A=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return A=!0,new this(1/0);r=t}return A=!0,r.sqrt()}function ka(e){return e instanceof Dt||e&&e.toStringTag===bu||!1}function Pp(e){return new this(e).ln()}function Ap(e,t){return new this(e).log(t)}function Cp(e){return new this(e).log(2)}function Lp(e){return new this(e).log(10)}function Zp(){return wu(this,arguments,-1)}function Mp(){return wu(this,arguments,1)}function Rp(e,t){return new this(e).mod(t)}function Fp(e,t){return new this(e).mul(t)}function Vp(e,t){return new this(e).pow(t)}function Bp(e){var t,r,i,n,o=0,a=new this(1),u=[];if(e===void 0?e=this.precision:me(e,1,Ke),i=Math.ceil(e/O),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));o<i;)n=t[o],n>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:u[o++]=n%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=4);o<i;)n=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((t[o+3]&127)<<24),n>=214e7?crypto.randomBytes(4).copy(t,o):(u.push(n%1e7),o+=4);o=i/4}else throw Error(vu);else for(;o<i;)u[o++]=Math.random()*1e7|0;for(i=u[--o],e%=O,i&&e&&(n=ne(10,O-e),u[o]=(i/n|0)*n);u[o]===0;o--)u.pop();if(o<0)r=0,u=[0];else{for(r=-1;u[0]===0;r-=O)u.shift();for(i=1,n=u[0];n>=10;n/=10)i++;i<O&&(r-=O-i)}return a.e=r,a.d=u,a}function Kp(e){return E(e=new this(e),e.e+1,this.rounding)}function Jp(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function Gp(e){return new this(e).sin()}function Wp(e){return new this(e).sinh()}function Hp(e){return new this(e).sqrt()}function qp(e,t){return new this(e).sub(t)}function Xp(){var e=0,t=arguments,r=new this(t[e]);for(A=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return A=!0,E(r,this.precision,this.rounding)}function Yp(e){return new this(e).tan()}function Qp(e){return new this(e).tanh()}function eh(e){return E(e=new this(e),e.e+1,1)}_[Symbol.for("nodejs.util.inspect.custom")]=_.toString;_[Symbol.toStringTag]="Decimal";var Dt=_.constructor=Iu(Kr);$n=new Dt($n);wn=new Dt(wn);class xe{static formatToTimecode(t,r,i=!1,n=!1){let o=new Dt(r),a,u=o.round();a=o.mul(t).floor();let s,c,l,d,f=u.mul(86400),m=a.mod(f),g=u.mul(3600),h=u.mul(60);return d=m.divToInt(g),m=m.minus(d.mul(g)),l=m.divToInt(h),m=m.minus(l.mul(h)),c=m.divToInt(u),s=m.minus(c.mul(u)),xe.formatTimecodeText(d.toNumber(),l.toNumber(),c.toNumber(),s.toNumber(),i,n)}static formatTimecodeText(t,r,i,n,o=!1,a=!1){let u=a?".":o?";":":";return`${xe.padZero(t)}:${xe.padZero(r)}:${xe.padZero(i)}${u}${xe.padZero(n)}`}static padZero(t){return t<10?`0${t}`:`${t}`}}class th{static resolveFrameRateValueFromFraction(t){return 30}}const Se=class Se{static parseTimeMoment(t){const[r,i]=t.split(":").map(Number);return[r,i]}static parseTimeRange(t){const r=t.match(this.timeRangePattern);if(!r)throw new Error("Not valid timerange: "+t);const i=r[1]==="[",n=r[5]==="]",o=r[2]?this.parseTimeMoment(r[2]):void 0,a=r[4]?this.parseTimeMoment(r[4]):void 0;return{start:o,end:a,isStartInclusive:i,isEndInclusive:n}}static timeMomentToSeconds(t){return Se.timeMomentToMilliseconds(t)/1e3}static timeMomentToMilliseconds(t){return t[0]*1e3+t[1]/1e6}static timeMomentToDate(t){const i=t[0]*1e3+t[1]/1e6;return new Date(i)}static formatTimeMomentToTimecodeText(t,r,i=!1){let n=th.resolveFrameRateValueFromFraction(r);return xe.formatToTimecode(Se.timeMomentToSeconds(t),n,i)}static formatTimerangeToTimecodeText(t,r,i=!1){let n=Se.parseTimeRange(t),o=n.start?Se.formatTimeMomentToTimecodeText(n.start,r,i):"?",a=n.end?Se.formatTimeMomentToTimecodeText(n.end,r,i):"?";return`${o} - ${a}`}static nanosecondsToSeconds(t){return t/1e9}static nanosecondsToTimeMoment(t){const r=Math.floor(t/1e9),i=Math.ceil(t%1e9);return[r,i]}static secondsToTimeMoment(t){return this.nanosecondsToTimeMoment(t*1e9)}static timerangeExprDuration(t){return this.timeRangeDuration(this.parseTimeRange(t))}static timeRangeDuration(t){const{start:r,end:i}=t;if(r===void 0||i===void 0)return 0;{const n=i[0]-r[0],o=i[1]-r[1],a=n+o/1e9;return parseFloat(a.toFixed(3))}}static formatTimeMomentExpr(t){return`${t[0]}:${t[1]}`}static formatNanosecondsToTimeMomentExpr(t){return this.formatTimeMomentExpr(this.nanosecondsToTimeMoment(t))}static toTimeRange(t,r,i=!0,n=!0){return{start:t,end:r,isStartInclusive:i,isEndInclusive:n}}static formatTimeRangeExpr(t){const r=t.isStartInclusive?"[":"(",i=t.isEndInclusive?"]":")",n=t.start?`${t.start[0]}:${t.start[1]}`:"",o=t.end?`${t.end[0]}:${t.end[1]}`:"";return`${r}${n}_${o}${i}`}static timerangeDuration(t){let r=Se.parseTimeRange(t);if(r.start===void 0||r.end===void 0)return 1/0;{let i=Se.timeMomentToSeconds(r.start);return Se.timeMomentToSeconds(r.end)-i}}static padZero(t){return t<10?`0${t}`:`${t}`}};Se.timeRangePattern=/^(\[|\()?(-?\d+:\d+)?(_(-?\d+:\d+)?)?(\]|\))?$/;let N=Se;function nh(e){return`subtitles-${e}`}function rh(e,t,r){const i=e.filter(f=>t.get(f.id).length>0).map(f=>{const m=t.get(f.id);let g,h=!1;if(f.format==="urn:x-nmos:format:video"){const v=f.essence_parameters.frame_rate;v&&(g=v.numerator/(v.denominator??1),(v.numerator===6e4||v.numerator===3e4)&&v.denominator===1001&&(h=!0))}return{start:N.timeMomentToSeconds(N.parseTimeRange(m.at(0).timerange).start),frameRate:g,dropFrame:h}}).sort((f,m)=>f.start-m.start),n=i.find(f=>f.frameRate!==void 0),o=(n==null?void 0:n.start)??i.at(0).start,a=new Date(o*1e3),u=Math.max(a.getUTCHours()+(r??0),0),s=a.getUTCMinutes(),c=a.getUTCSeconds(),l=a.getUTCMilliseconds(),d=u*3600+s*60+c+l/1e3;return n===void 0?{ffom:xe.formatToTimecode(d,100,!1,!0),mediaStartTime:o,frameRate:100,dropFrame:!1}:{ffom:xe.formatToTimecode(d,n.frameRate,n.dropFrame),mediaStartTime:n.start,frameRate:n.frameRate,dropFrame:n.dropFrame}}function xu(e){var t;return((t=e.tags)==null?void 0:t.hls_name)??e.description??""}function Tu(e){var t;return((t=e.tags)==null?void 0:t.hls_name)??e.description??""}class ih{constructor(t=3,r=!1){this.targetDuration=null,this.mediaSequence=null,this.programDateTime=null,this.playlistType=null,this.streams=[],this.media=[],this.segments=[],this.endList=!1,this.version=t,this.independentSegments=r}}class Wr{constructor(t,r,i,n,o){this.bandwidth=t,this.averageBandwidth=r,this.resolution=i,this.frameRate=n,this.uri=o}}class oh{constructor(t,r,i,n,o,a,u){this.type=t,this.groupId=r,this.name=i,this.isDefault=n,this.autoSelect=o,this.channels=a,this.uri=u}}class Ia{constructor(t,r){this.duration=t,this.uri=r}}class xa{constructor(){this.playlist=new ih}setVersion(t){return this.playlist.version=t,this}setIndependentSegments(t){return this.playlist.independentSegments=t,this}setTargetDuration(t){return this.playlist.targetDuration=t,this}setMediaSequence(t){return this.playlist.mediaSequence=t,this}setProgramDateTime(t){return this.playlist.programDateTime=t,this}setPlaylistType(t){return this.playlist.playlistType=t,this}addStreamInfo(t){return this.playlist.streams.push(t),this}addMedia(t){return this.playlist.media.push(t),this}addSegment(t,r=!1){const i={...t,gap:r};return this.playlist.segments.push(i),this}setEndList(){return this.playlist.endList=!0,this}setStartOffset(t){return this.playlist.startOffset=t,this}build(){return this.playlist}}class Ta{static write(t){let r=`#EXTM3U
|
|
7
|
+
*/var ut=9e15,Ke=1e9,qr="0123456789abcdef",wn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Sn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Wr={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ut,maxE:ut,crypto:!1},wu,Ne,A=!0,Cn="[DecimalError] ",Re=Cn+"Invalid argument: ",Su=Cn+"Precision limit exceeded",ku=Cn+"crypto unavailable",Iu="[object Decimal]",se=Math.floor,ne=Math.pow,_p=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,yp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,$p=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,xu=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,xe=1e7,U=7,wp=9007199254740991,Sp=wn.length-1,Hr=Sn.length-1,_={toStringTag:Iu};_.absoluteValue=_.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};_.ceil=function(){return O(new this.constructor(this),this.e+1,2)};_.clampedTo=_.clamp=function(e,t){var r,i=this,n=i.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(Re+t);return r=i.cmp(e),r<0?e:i.cmp(t)>0?t:new n(i)};_.comparedTo=_.cmp=function(e){var t,r,i,n,o=this,a=o.d,u=(e=new o.constructor(e)).d,s=o.s,c=e.s;if(!a||!u)return!s||!c?NaN:s!==c?s:a===u?0:!a^s<0?1:-1;if(!a[0]||!u[0])return a[0]?s:u[0]?-c:0;if(s!==c)return s;if(o.e!==e.e)return o.e>e.e^s<0?1:-1;for(i=a.length,n=u.length,t=0,r=i<n?i:n;t<r;++t)if(a[t]!==u[t])return a[t]>u[t]^s<0?1:-1;return i===n?0:i>n^s<0?1:-1};_.cosine=_.cos=function(){var e,t,r=this,i=r.constructor;return r.d?r.d[0]?(e=i.precision,t=i.rounding,i.precision=e+Math.max(r.e,r.sd())+U,i.rounding=1,r=kp(i,Uu(i,r)),i.precision=e,i.rounding=t,O(Ne==2||Ne==3?r.neg():r,e,t,!0)):new i(1):new i(NaN)};_.cubeRoot=_.cbrt=function(){var e,t,r,i,n,o,a,u,s,c,l=this,d=l.constructor;if(!l.isFinite()||l.isZero())return new d(l);for(A=!1,o=l.s*ne(l.s*l,1/3),!o||Math.abs(o)==1/0?(r=oe(l.d),e=l.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=ne(r,1/3),e=se((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),i=new d(r),i.s=l.s):i=new d(o.toString()),a=(e=d.precision)+3;;)if(u=i,s=u.times(u).times(u),c=s.plus(l),i=J(c.plus(l).times(u),c.plus(s),a+2,1),oe(u.d).slice(0,a)===(r=oe(i.d)).slice(0,a))if(r=r.slice(a-3,a+1),r=="9999"||!n&&r=="4999"){if(!n&&(O(u,e+1,0),u.times(u).times(u).eq(l))){i=u;break}a+=4,n=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(i,e+1,1),t=!i.times(i).times(i).eq(l));break}return A=!0,O(i,e,d.rounding,t)};_.decimalPlaces=_.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-se(this.e/U))*U,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};_.dividedBy=_.div=function(e){return J(this,new this.constructor(e))};_.dividedToIntegerBy=_.divToInt=function(e){var t=this,r=t.constructor;return O(J(t,new r(e),0,1,1),r.precision,r.rounding)};_.equals=_.eq=function(e){return this.cmp(e)===0};_.floor=function(){return O(new this.constructor(this),this.e+1,3)};_.greaterThan=_.gt=function(e){return this.cmp(e)>0};_.greaterThanOrEqualTo=_.gte=function(e){var t=this.cmp(e);return t==1||t===0};_.hyperbolicCosine=_.cosh=function(){var e,t,r,i,n,o=this,a=o.constructor,u=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return u;r=a.precision,i=a.rounding,a.precision=r+Math.max(o.e,o.sd())+4,a.rounding=1,n=o.d.length,n<32?(e=Math.ceil(n/3),t=(1/Mn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=lt(a,1,o.times(t),new a(1),!0);for(var s,c=e,l=new a(8);c--;)s=o.times(o),o=u.minus(s.times(l.minus(s.times(l))));return O(o,a.precision=r,a.rounding=i,!0)};_.hyperbolicSine=_.sinh=function(){var e,t,r,i,n=this,o=n.constructor;if(!n.isFinite()||n.isZero())return new o(n);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(n.e,n.sd())+4,o.rounding=1,i=n.d.length,i<3)n=lt(o,2,n,n,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,n=n.times(1/Mn(5,e)),n=lt(o,2,n,n,!0);for(var a,u=new o(5),s=new o(16),c=new o(20);e--;)a=n.times(n),n=n.times(u.plus(a.times(s.times(a).plus(c))))}return o.precision=t,o.rounding=r,O(n,t,r,!0)};_.hyperbolicTangent=_.tanh=function(){var e,t,r=this,i=r.constructor;return r.isFinite()?r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+7,i.rounding=1,J(r.sinh(),r.cosh(),i.precision=e,i.rounding=t)):new i(r.s)};_.inverseCosine=_.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),i=t.precision,n=t.rounding;return r!==-1?r===0?e.isNeg()?Ee(t,i,n):new t(0):new t(NaN):e.isZero()?Ee(t,i+4,n).times(.5):(t.precision=i+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=i,t.rounding=n,e.times(2))};_.inverseHyperbolicCosine=_.acosh=function(){var e,t,r=this,i=r.constructor;return r.lte(1)?new i(r.eq(1)?0:NaN):r.isFinite()?(e=i.precision,t=i.rounding,i.precision=e+Math.max(Math.abs(r.e),r.sd())+4,i.rounding=1,A=!1,r=r.times(r).minus(1).sqrt().plus(r),A=!0,i.precision=e,i.rounding=t,r.ln()):new i(r)};_.inverseHyperbolicSine=_.asinh=function(){var e,t,r=this,i=r.constructor;return!r.isFinite()||r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,i.rounding=1,A=!1,r=r.times(r).plus(1).sqrt().plus(r),A=!0,i.precision=e,i.rounding=t,r.ln())};_.inverseHyperbolicTangent=_.atanh=function(){var e,t,r,i,n=this,o=n.constructor;return n.isFinite()?n.e>=0?new o(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(e=o.precision,t=o.rounding,i=n.sd(),Math.max(i,e)<2*-n.e-1?O(new o(n),e,t,!0):(o.precision=r=i-n.e,n=J(n.plus(1),new o(1).minus(n),r+e,1),o.precision=e+4,o.rounding=1,n=n.ln(),o.precision=e,o.rounding=t,n.times(.5))):new o(NaN)};_.inverseSine=_.asin=function(){var e,t,r,i,n=this,o=n.constructor;return n.isZero()?new o(n):(t=n.abs().cmp(1),r=o.precision,i=o.rounding,t!==-1?t===0?(e=Ee(o,r+4,i).times(.5),e.s=n.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,n=n.div(new o(1).minus(n.times(n)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=i,n.times(2)))};_.inverseTangent=_.atan=function(){var e,t,r,i,n,o,a,u,s,c=this,l=c.constructor,d=l.precision,f=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&d+4<=Hr)return a=Ee(l,d+4,f).times(.25),a.s=c.s,a}else{if(!c.s)return new l(NaN);if(d+4<=Hr)return a=Ee(l,d+4,f).times(.5),a.s=c.s,a}for(l.precision=u=d+10,l.rounding=1,r=Math.min(28,u/U+2|0),e=r;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(A=!1,t=Math.ceil(u/U),i=1,s=c.times(c),a=new l(c),n=c;e!==-1;)if(n=n.times(s),o=a.minus(n.div(i+=2)),n=n.times(s),a=o.plus(n.div(i+=2)),a.d[t]!==void 0)for(e=t;a.d[e]===o.d[e]&&e--;);return r&&(a=a.times(2<<r-1)),A=!0,O(a,l.precision=d,l.rounding=f,!0)};_.isFinite=function(){return!!this.d};_.isInteger=_.isInt=function(){return!!this.d&&se(this.e/U)>this.d.length-2};_.isNaN=function(){return!this.s};_.isNegative=_.isNeg=function(){return this.s<0};_.isPositive=_.isPos=function(){return this.s>0};_.isZero=function(){return!!this.d&&this.d[0]===0};_.lessThan=_.lt=function(e){return this.cmp(e)<0};_.lessThanOrEqualTo=_.lte=function(e){return this.cmp(e)<1};_.logarithm=_.log=function(e){var t,r,i,n,o,a,u,s,c=this,l=c.constructor,d=l.precision,f=l.rounding,m=5;if(e==null)e=new l(10),t=!0;else{if(e=new l(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(r=c.d,c.s<0||!r||!r[0]||c.eq(1))return new l(r&&!r[0]?-1/0:c.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(n=r[0];n%10===0;)n/=10;o=n!==1}if(A=!1,u=d+m,a=Ze(c,u),i=t?kn(l,u+10):Ze(e,u),s=J(a,i,u,1),Et(s.d,n=d,f))do if(u+=10,a=Ze(c,u),i=t?kn(l,u+10):Ze(e,u),s=J(a,i,u,1),!o){+oe(s.d).slice(n+1,n+15)+1==1e14&&(s=O(s,d+1,0));break}while(Et(s.d,n+=10,f));return A=!0,O(s,d,f)};_.minus=_.sub=function(e){var t,r,i,n,o,a,u,s,c,l,d,f,m=this,h=m.constructor;if(e=new h(e),!m.d||!e.d)return!m.s||!e.s?e=new h(NaN):m.d?e.s=-e.s:e=new h(e.d||m.s!==e.s?m:NaN),e;if(m.s!=e.s)return e.s=-e.s,m.plus(e);if(c=m.d,f=e.d,u=h.precision,s=h.rounding,!c[0]||!f[0]){if(f[0])e.s=-e.s;else if(c[0])e=new h(m);else return new h(s===3?-0:0);return A?O(e,u,s):e}if(r=se(e.e/U),l=se(m.e/U),c=c.slice(),o=l-r,o){for(d=o<0,d?(t=c,o=-o,a=f.length):(t=f,r=l,a=c.length),i=Math.max(Math.ceil(u/U),a)+2,o>i&&(o=i,t.length=1),t.reverse(),i=o;i--;)t.push(0);t.reverse()}else{for(i=c.length,a=f.length,d=i<a,d&&(a=i),i=0;i<a;i++)if(c[i]!=f[i]){d=c[i]<f[i];break}o=0}for(d&&(t=c,c=f,f=t,e.s=-e.s),a=c.length,i=f.length-a;i>0;--i)c[a++]=0;for(i=f.length;i>o;){if(c[--i]<f[i]){for(n=i;n&&c[--n]===0;)c[n]=xe-1;--c[n],c[i]+=xe}c[i]-=f[i]}for(;c[--a]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(e.d=c,e.e=Zn(c,r),A?O(e,u,s):e):new h(s===3?-0:0)};_.modulo=_.mod=function(e){var t,r=this,i=r.constructor;return e=new i(e),!r.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||r.d&&!r.d[0]?O(new i(r),i.precision,i.rounding):(A=!1,i.modulo==9?(t=J(r,e.abs(),0,3,1),t.s*=e.s):t=J(r,e,0,i.modulo,1),t=t.times(e),A=!0,r.minus(t))};_.naturalExponential=_.exp=function(){return Xr(this)};_.naturalLogarithm=_.ln=function(){return Ze(this)};_.negated=_.neg=function(){var e=new this.constructor(this);return e.s=-e.s,O(e)};_.plus=_.add=function(e){var t,r,i,n,o,a,u,s,c,l,d=this,f=d.constructor;if(e=new f(e),!d.d||!e.d)return!d.s||!e.s?e=new f(NaN):d.d||(e=new f(e.d||d.s===e.s?d:NaN)),e;if(d.s!=e.s)return e.s=-e.s,d.minus(e);if(c=d.d,l=e.d,u=f.precision,s=f.rounding,!c[0]||!l[0])return l[0]||(e=new f(d)),A?O(e,u,s):e;if(o=se(d.e/U),i=se(e.e/U),c=c.slice(),n=o-i,n){for(n<0?(r=c,n=-n,a=l.length):(r=l,i=o,a=c.length),o=Math.ceil(u/U),a=o>a?o+1:a+1,n>a&&(n=a,r.length=1),r.reverse();n--;)r.push(0);r.reverse()}for(a=c.length,n=l.length,a-n<0&&(n=a,r=l,l=c,c=r),t=0;n;)t=(c[--n]=c[n]+l[n]+t)/xe|0,c[n]%=xe;for(t&&(c.unshift(t),++i),a=c.length;c[--a]==0;)c.pop();return e.d=c,e.e=Zn(c,i),A?O(e,u,s):e};_.precision=_.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Re+e);return r.d?(t=Tu(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};_.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};_.sine=_.sin=function(){var e,t,r=this,i=r.constructor;return r.isFinite()?r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+Math.max(r.e,r.sd())+U,i.rounding=1,r=xp(i,Uu(i,r)),i.precision=e,i.rounding=t,O(Ne>2?r.neg():r,e,t,!0)):new i(NaN)};_.squareRoot=_.sqrt=function(){var e,t,r,i,n,o,a=this,u=a.d,s=a.e,c=a.s,l=a.constructor;if(c!==1||!u||!u[0])return new l(!c||c<0&&(!u||u[0])?NaN:u?a:1/0);for(A=!1,c=Math.sqrt(+a),c==0||c==1/0?(t=oe(u),(t.length+s)%2==0&&(t+="0"),c=Math.sqrt(t),s=se((s+1)/2)-(s<0||s%2),c==1/0?t="5e"+s:(t=c.toExponential(),t=t.slice(0,t.indexOf("e")+1)+s),i=new l(t)):i=new l(c.toString()),r=(s=l.precision)+3;;)if(o=i,i=o.plus(J(a,o,r+2,1)).times(.5),oe(o.d).slice(0,r)===(t=oe(i.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!n&&t=="4999"){if(!n&&(O(o,s+1,0),o.times(o).eq(a))){i=o;break}r+=4,n=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(i,s+1,1),e=!i.times(i).eq(a));break}return A=!0,O(i,s,l.rounding,e)};_.tangent=_.tan=function(){var e,t,r=this,i=r.constructor;return r.isFinite()?r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+10,i.rounding=1,r=r.sin(),r.s=1,r=J(r,new i(1).minus(r.times(r)).sqrt(),e+10,0),i.precision=e,i.rounding=t,O(Ne==2||Ne==4?r.neg():r,e,t,!0)):new i(NaN)};_.times=_.mul=function(e){var t,r,i,n,o,a,u,s,c,l=this,d=l.constructor,f=l.d,m=(e=new d(e)).d;if(e.s*=l.s,!f||!f[0]||!m||!m[0])return new d(!e.s||f&&!f[0]&&!m||m&&!m[0]&&!f?NaN:!f||!m?e.s/0:e.s*0);for(r=se(l.e/U)+se(e.e/U),s=f.length,c=m.length,s<c&&(o=f,f=m,m=o,a=s,s=c,c=a),o=[],a=s+c,i=a;i--;)o.push(0);for(i=c;--i>=0;){for(t=0,n=s+i;n>i;)u=o[n]+m[i]*f[n-i-1]+t,o[n--]=u%xe|0,t=u/xe|0;o[n]=(o[n]+t)%xe|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Zn(o,r),A?O(e,d.precision,d.rounding):e};_.toBinary=function(e,t){return pi(this,2,e,t)};_.toDecimalPlaces=_.toDP=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(me(e,0,Ke),t===void 0?t=i.rounding:me(t,0,8),O(r,e+r.e+1,t))};_.toExponential=function(e,t){var r,i=this,n=i.constructor;return e===void 0?r=Ue(i,!0):(me(e,0,Ke),t===void 0?t=n.rounding:me(t,0,8),i=O(new n(i),e+1,t),r=Ue(i,!0,e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};_.toFixed=function(e,t){var r,i,n=this,o=n.constructor;return e===void 0?r=Ue(n):(me(e,0,Ke),t===void 0?t=o.rounding:me(t,0,8),i=O(new o(n),e+n.e+1,t),r=Ue(i,!1,e+i.e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};_.toFraction=function(e){var t,r,i,n,o,a,u,s,c,l,d,f,m=this,h=m.d,p=m.constructor;if(!h)return new p(m);if(c=r=new p(1),i=s=new p(0),t=new p(i),o=t.e=Tu(h)-m.e-1,a=o%U,t.d[0]=ne(10,a<0?U+a:a),e==null)e=o>0?t:c;else{if(u=new p(e),!u.isInt()||u.lt(c))throw Error(Re+u);e=u.gt(t)?o>0?t:c:u}for(A=!1,u=new p(oe(h)),l=p.precision,p.precision=o=h.length*U*2;d=J(u,t,0,1,1),n=r.plus(d.times(i)),n.cmp(e)!=1;)r=i,i=n,n=c,c=s.plus(d.times(n)),s=n,n=t,t=u.minus(d.times(n)),u=n;return n=J(e.minus(r),i,0,1,1),s=s.plus(n.times(c)),r=r.plus(n.times(i)),s.s=c.s=m.s,f=J(c,i,o,1).minus(m).abs().cmp(J(s,r,o,1).minus(m).abs())<1?[c,i]:[s,r],p.precision=l,A=!0,f};_.toHexadecimal=_.toHex=function(e,t){return pi(this,16,e,t)};_.toNearest=function(e,t){var r=this,i=r.constructor;if(r=new i(r),e==null){if(!r.d)return r;e=new i(1),t=i.rounding}else{if(e=new i(e),t===void 0?t=i.rounding:me(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(A=!1,r=J(r,e,0,t,1).times(e),A=!0,O(r)):(e.s=r.s,r=e),r};_.toNumber=function(){return+this};_.toOctal=function(e,t){return pi(this,8,e,t)};_.toPower=_.pow=function(e){var t,r,i,n,o,a,u=this,s=u.constructor,c=+(e=new s(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new s(ne(+u,c));if(u=new s(u),u.eq(1))return u;if(i=s.precision,o=s.rounding,e.eq(1))return O(u,i,o);if(t=se(e.e/U),t>=e.d.length-1&&(r=c<0?-c:c)<=wp)return n=zu(s,u,r,i),e.s<0?new s(1).div(n):O(n,i,o);if(a=u.s,a<0){if(t<e.d.length-1)return new s(NaN);if((e.d[t]&1)==0&&(a=1),u.e==0&&u.d[0]==1&&u.d.length==1)return u.s=a,u}return r=ne(+u,c),t=r==0||!isFinite(r)?se(c*(Math.log("0."+oe(u.d))/Math.LN10+u.e+1)):new s(r+"").e,t>s.maxE+1||t<s.minE-1?new s(t>0?a/0:0):(A=!1,s.rounding=u.s=1,r=Math.min(12,(t+"").length),n=Xr(e.times(Ze(u,i+r)),i),n.d&&(n=O(n,i+5,1),Et(n.d,i,o)&&(t=i+10,n=O(Xr(e.times(Ze(u,t+r)),t),t+5,1),+oe(n.d).slice(i+1,i+15)+1==1e14&&(n=O(n,i+1,0)))),n.s=a,A=!0,s.rounding=o,O(n,i,o))};_.toPrecision=function(e,t){var r,i=this,n=i.constructor;return e===void 0?r=Ue(i,i.e<=n.toExpNeg||i.e>=n.toExpPos):(me(e,1,Ke),t===void 0?t=n.rounding:me(t,0,8),i=O(new n(i),e,t),r=Ue(i,e<=i.e||i.e<=n.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+r:r};_.toSignificantDigits=_.toSD=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(me(e,1,Ke),t===void 0?t=i.rounding:me(t,0,8)),O(new i(r),e,t)};_.toString=function(){var e=this,t=e.constructor,r=Ue(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};_.truncated=_.trunc=function(){return O(new this.constructor(this),this.e+1,1)};_.valueOf=_.toJSON=function(){var e=this,t=e.constructor,r=Ue(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function oe(e){var t,r,i,n=e.length-1,o="",a=e[0];if(n>0){for(o+=a,t=1;t<n;t++)i=e[t]+"",r=U-i.length,r&&(o+=Ce(r)),o+=i;a=e[t],i=a+"",r=U-i.length,r&&(o+=Ce(r))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}function me(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Re+e)}function Et(e,t,r,i){var n,o,a,u;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=U,n=0):(n=Math.ceil((t+1)/U),t%=U),o=ne(10,U-t),u=e[n]%o|0,i==null?t<3?(t==0?u=u/100|0:t==1&&(u=u/10|0),a=r<4&&u==99999||r>3&&u==49999||u==5e4||u==0):a=(r<4&&u+1==o||r>3&&u+1==o/2)&&(e[n+1]/o/100|0)==ne(10,t-2)-1||(u==o/2||u==0)&&(e[n+1]/o/100|0)==0:t<4?(t==0?u=u/1e3|0:t==1?u=u/100|0:t==2&&(u=u/10|0),a=(i||r<4)&&u==9999||!i&&r>3&&u==4999):a=((i||r<4)&&u+1==o||!i&&r>3&&u+1==o/2)&&(e[n+1]/o/1e3|0)==ne(10,t-3)-1,a}function vn(e,t,r){for(var i,n=[0],o,a=0,u=e.length;a<u;){for(o=n.length;o--;)n[o]*=t;for(n[0]+=qr.indexOf(e.charAt(a++)),i=0;i<n.length;i++)n[i]>r-1&&(n[i+1]===void 0&&(n[i+1]=0),n[i+1]+=n[i]/r|0,n[i]%=r)}return n.reverse()}function kp(e,t){var r,i,n;if(t.isZero())return t;i=t.d.length,i<32?(r=Math.ceil(i/3),n=(1/Mn(4,r)).toString()):(r=16,n="2.3283064365386962890625e-10"),e.precision+=r,t=lt(e,1,t.times(n),new e(1));for(var o=r;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=r,t}var J=(function(){function e(i,n,o){var a,u=0,s=i.length;for(i=i.slice();s--;)a=i[s]*n+u,i[s]=a%o|0,u=a/o|0;return u&&i.unshift(u),i}function t(i,n,o,a){var u,s;if(o!=a)s=o>a?1:-1;else for(u=s=0;u<o;u++)if(i[u]!=n[u]){s=i[u]>n[u]?1:-1;break}return s}function r(i,n,o,a){for(var u=0;o--;)i[o]-=u,u=i[o]<n[o]?1:0,i[o]=u*a+i[o]-n[o];for(;!i[0]&&i.length>1;)i.shift()}return function(i,n,o,a,u,s){var c,l,d,f,m,h,p,v,w,E,T,z,M,R,Q,te,Y,Te,ue,We,Ae=i.constructor,it=i.s==n.s?1:-1,ee=i.d,F=n.d;if(!ee||!ee[0]||!F||!F[0])return new Ae(!i.s||!n.s||(ee?F&&ee[0]==F[0]:!F)?NaN:ee&&ee[0]==0||!F?it*0:it/0);for(s?(m=1,l=i.e-n.e):(s=xe,m=U,l=se(i.e/m)-se(n.e/m)),ue=F.length,Y=ee.length,w=new Ae(it),E=w.d=[],d=0;F[d]==(ee[d]||0);d++);if(F[d]>(ee[d]||0)&&l--,o==null?(R=o=Ae.precision,a=Ae.rounding):u?R=o+(i.e-n.e)+1:R=o,R<0)E.push(1),h=!0;else{if(R=R/m+2|0,d=0,ue==1){for(f=0,F=F[0],R++;(d<Y||f)&&R--;d++)Q=f*s+(ee[d]||0),E[d]=Q/F|0,f=Q%F|0;h=f||d<Y}else{for(f=s/(F[0]+1)|0,f>1&&(F=e(F,f,s),ee=e(ee,f,s),ue=F.length,Y=ee.length),te=ue,T=ee.slice(0,ue),z=T.length;z<ue;)T[z++]=0;We=F.slice(),We.unshift(0),Te=F[0],F[1]>=s/2&&++Te;do f=0,c=t(F,T,ue,z),c<0?(M=T[0],ue!=z&&(M=M*s+(T[1]||0)),f=M/Te|0,f>1?(f>=s&&(f=s-1),p=e(F,f,s),v=p.length,z=T.length,c=t(p,T,v,z),c==1&&(f--,r(p,ue<v?We:F,v,s))):(f==0&&(c=f=1),p=F.slice()),v=p.length,v<z&&p.unshift(0),r(T,p,z,s),c==-1&&(z=T.length,c=t(F,T,ue,z),c<1&&(f++,r(T,ue<z?We:F,z,s))),z=T.length):c===0&&(f++,T=[0]),E[d++]=f,c&&T[0]?T[z++]=ee[te]||0:(T=[ee[te]],z=1);while((te++<Y||T[0]!==void 0)&&R--);h=T[0]!==void 0}E[0]||E.shift()}if(m==1)w.e=l,wu=h;else{for(d=1,f=E[0];f>=10;f/=10)d++;w.e=d+l*m-1,O(w,u?o+w.e+1:o,a,h)}return w}})();function O(e,t,r,i){var n,o,a,u,s,c,l,d,f,m=e.constructor;e:if(t!=null){if(d=e.d,!d)return e;for(n=1,u=d[0];u>=10;u/=10)n++;if(o=t-n,o<0)o+=U,a=t,l=d[f=0],s=l/ne(10,n-a-1)%10|0;else if(f=Math.ceil((o+1)/U),u=d.length,f>=u)if(i){for(;u++<=f;)d.push(0);l=s=0,n=1,o%=U,a=o-U+1}else break e;else{for(l=u=d[f],n=1;u>=10;u/=10)n++;o%=U,a=o-U+n,s=a<0?0:l/ne(10,n-a-1)%10|0}if(i=i||t<0||d[f+1]!==void 0||(a<0?l:l%ne(10,n-a-1)),c=r<4?(s||i)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||i||r==6&&(o>0?a>0?l/ne(10,n-a):0:d[f-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,c?(t-=e.e+1,d[0]=ne(10,(U-t%U)%U),e.e=-t||0):d[0]=e.e=0,e;if(o==0?(d.length=f,u=1,f--):(d.length=f+1,u=ne(10,U-o),d[f]=a>0?(l/ne(10,n-a)%ne(10,a)|0)*u:0),c)for(;;)if(f==0){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=u,u=1;a>=10;a/=10)u++;o!=u&&(e.e++,d[0]==xe&&(d[0]=1));break}else{if(d[f]+=u,d[f]!=xe)break;d[f--]=0,u=1}for(o=d.length;d[--o]===0;)d.pop()}return A&&(e.e>m.maxE?(e.d=null,e.e=NaN):e.e<m.minE&&(e.e=0,e.d=[0])),e}function Ue(e,t,r){if(!e.isFinite())return Ou(e);var i,n=e.e,o=oe(e.d),a=o.length;return t?(r&&(i=r-a)>0?o=o.charAt(0)+"."+o.slice(1)+Ce(i):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):n<0?(o="0."+Ce(-n-1)+o,r&&(i=r-a)>0&&(o+=Ce(i))):n>=a?(o+=Ce(n+1-a),r&&(i=r-n-1)>0&&(o=o+"."+Ce(i))):((i=n+1)<a&&(o=o.slice(0,i)+"."+o.slice(i)),r&&(i=r-a)>0&&(n+1===a&&(o+="."),o+=Ce(i))),o}function Zn(e,t){var r=e[0];for(t*=U;r>=10;r/=10)t++;return t}function kn(e,t,r){if(t>Sp)throw A=!0,r&&(e.precision=r),Error(Su);return O(new e(wn),t,1,!0)}function Ee(e,t,r){if(t>Hr)throw Error(Su);return O(new e(Sn),t,r,!0)}function Tu(e){var t=e.length-1,r=t*U+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ce(e){for(var t="";e--;)t+="0";return t}function zu(e,t,r,i){var n,o=new e(1),a=Math.ceil(i/U+4);for(A=!1;;){if(r%2&&(o=o.times(t),Ea(o.d,a)&&(n=!0)),r=se(r/2),r===0){r=o.d.length-1,n&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Ea(t.d,a)}return A=!0,o}function za(e){return e.d[e.d.length-1]&1}function Eu(e,t,r){for(var i,n,o=new e(t[0]),a=0;++a<t.length;){if(n=new e(t[a]),!n.s){o=n;break}i=o.cmp(n),(i===r||i===0&&o.s===r)&&(o=n)}return o}function Xr(e,t){var r,i,n,o,a,u,s,c=0,l=0,d=0,f=e.constructor,m=f.rounding,h=f.precision;if(!e.d||!e.d[0]||e.e>17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(A=!1,s=h):s=t,u=new f(.03125);e.e>-2;)e=e.times(u),d+=5;for(i=Math.log(ne(2,d))/Math.LN10*2+5|0,s+=i,r=o=a=new f(1),f.precision=s;;){if(o=O(o.times(e),s,1),r=r.times(++l),u=a.plus(J(o,r,s,1)),oe(u.d).slice(0,s)===oe(a.d).slice(0,s)){for(n=d;n--;)a=O(a.times(a),s,1);if(t==null)if(c<3&&Et(a.d,s-i,m,c))f.precision=s+=10,r=o=u=new f(1),l=0,c++;else return O(a,f.precision=h,m,A=!0);else return f.precision=h,a}a=u}}function Ze(e,t){var r,i,n,o,a,u,s,c,l,d,f,m=1,h=10,p=e,v=p.d,w=p.constructor,E=w.rounding,T=w.precision;if(p.s<0||!v||!v[0]||!p.e&&v[0]==1&&v.length==1)return new w(v&&!v[0]?-1/0:p.s!=1?NaN:v?0:p);if(t==null?(A=!1,l=T):l=t,w.precision=l+=h,r=oe(v),i=r.charAt(0),Math.abs(o=p.e)<15e14){for(;i<7&&i!=1||i==1&&r.charAt(1)>3;)p=p.times(e),r=oe(p.d),i=r.charAt(0),m++;o=p.e,i>1?(p=new w("0."+r),o++):p=new w(i+"."+r.slice(1))}else return c=kn(w,l+2,T).times(o+""),p=Ze(new w(i+"."+r.slice(1)),l-h).plus(c),w.precision=T,t==null?O(p,T,E,A=!0):p;for(d=p,s=a=p=J(p.minus(1),p.plus(1),l,1),f=O(p.times(p),l,1),n=3;;){if(a=O(a.times(f),l,1),c=s.plus(J(a,new w(n),l,1)),oe(c.d).slice(0,l)===oe(s.d).slice(0,l))if(s=s.times(2),o!==0&&(s=s.plus(kn(w,l+2,T).times(o+""))),s=J(s,new w(m),l,1),t==null)if(Et(s.d,l-h,E,u))w.precision=l+=h,c=a=p=J(d.minus(1),d.plus(1),l,1),f=O(p.times(p),l,1),n=u=1;else return O(s,w.precision=T,E,A=!0);else return w.precision=T,s;s=c,n+=2}}function Ou(e){return String(e.s*e.s/0)}function bn(e,t){var r,i,n;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(r<0&&(r=i),r+=+t.slice(i+1),t=t.substring(0,i)):r<0&&(r=t.length),i=0;t.charCodeAt(i)===48;i++);for(n=t.length;t.charCodeAt(n-1)===48;--n);if(t=t.slice(i,n),t){if(n-=i,e.e=r=r-i-1,e.d=[],i=(r+1)%U,r<0&&(i+=U),i<n){for(i&&e.d.push(+t.slice(0,i)),n-=U;i<n;)e.d.push(+t.slice(i,i+=U));t=t.slice(i),i=U-t.length}else i-=n;for(;i--;)t+="0";e.d.push(+t),A&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function Ip(e,t){var r,i,n,o,a,u,s,c,l;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),xu.test(t))return bn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(yp.test(t))r=16,t=t.toLowerCase();else if(_p.test(t))r=2;else if($p.test(t))r=8;else throw Error(Re+t);for(o=t.search(/p/i),o>0?(s=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),a=o>=0,i=e.constructor,a&&(t=t.replace(".",""),u=t.length,o=u-o,n=zu(i,new i(r),o,o*2)),c=vn(t,r,xe),l=c.length-1,o=l;c[o]===0;--o)c.pop();return o<0?new i(e.s*0):(e.e=Zn(c,l),e.d=c,A=!1,a&&(e=J(e,n,u*4)),s&&(e=e.times(Math.abs(s)<54?ne(2,s):Pt.pow(2,s))),A=!0,e)}function xp(e,t){var r,i=t.d.length;if(i<3)return t.isZero()?t:lt(e,2,t,t);r=1.4*Math.sqrt(i),r=r>16?16:r|0,t=t.times(1/Mn(5,r)),t=lt(e,2,t,t);for(var n,o=new e(5),a=new e(16),u=new e(20);r--;)n=t.times(t),t=t.times(o.plus(n.times(a.times(n).minus(u))));return t}function lt(e,t,r,i,n){var o,a,u,s,c=e.precision,l=Math.ceil(c/U);for(A=!1,s=r.times(r),u=new e(i);;){if(a=J(u.times(s),new e(t++*t++),c,1),u=n?i.plus(a):i.minus(a),i=J(a.times(s),new e(t++*t++),c,1),a=u.plus(i),a.d[l]!==void 0){for(o=l;a.d[o]===u.d[o]&&o--;);if(o==-1)break}o=u,u=i,i=a,a=o}return A=!0,a.d.length=l+1,a}function Mn(e,t){for(var r=e;--t;)r*=e;return r}function Uu(e,t){var r,i=t.s<0,n=Ee(e,e.precision,1),o=n.times(.5);if(t=t.abs(),t.lte(o))return Ne=i?4:1,t;if(r=t.divToInt(n),r.isZero())Ne=i?3:2;else{if(t=t.minus(r.times(n)),t.lte(o))return Ne=za(r)?i?2:3:i?4:1,t;Ne=za(r)?i?1:4:i?3:2}return t.minus(n).abs()}function pi(e,t,r,i){var n,o,a,u,s,c,l,d,f,m=e.constructor,h=r!==void 0;if(h?(me(r,1,Ke),i===void 0?i=m.rounding:me(i,0,8)):(r=m.precision,i=m.rounding),!e.isFinite())l=Ou(e);else{for(l=Ue(e),a=l.indexOf("."),h?(n=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):n=t,a>=0&&(l=l.replace(".",""),f=new m(1),f.e=l.length-a,f.d=vn(Ue(f),10,n),f.e=f.d.length),d=vn(l,10,n),o=s=d.length;d[--s]==0;)d.pop();if(!d[0])l=h?"0p+0":"0";else{if(a<0?o--:(e=new m(e),e.d=d,e.e=o,e=J(e,f,r,i,0,n),d=e.d,o=e.e,c=wu),a=d[r],u=n/2,c=c||d[r+1]!==void 0,c=i<4?(a!==void 0||c)&&(i===0||i===(e.s<0?3:2)):a>u||a===u&&(i===4||c||i===6&&d[r-1]&1||i===(e.s<0?8:7)),d.length=r,c)for(;++d[--r]>n-1;)d[r]=0,r||(++o,d.unshift(1));for(s=d.length;!d[s-1];--s);for(a=0,l="";a<s;a++)l+=qr.charAt(d[a]);if(h){if(s>1)if(t==16||t==8){for(a=t==16?4:3,--s;s%a;s++)l+="0";for(d=vn(l,n,t),s=d.length;!d[s-1];--s);for(a=1,l="1.";a<s;a++)l+=qr.charAt(d[a])}else l=l.charAt(0)+"."+l.slice(1);l=l+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)l="0"+l;l="0."+l}else if(++o>s)for(o-=s;o--;)l+="0";else o<s&&(l=l.slice(0,o)+"."+l.slice(o))}l=(t==16?"0x":t==2?"0b":t==8?"0o":"")+l}return e.s<0?"-"+l:l}function Ea(e,t){if(e.length>t)return e.length=t,!0}function Tp(e){return new this(e).abs()}function zp(e){return new this(e).acos()}function Ep(e){return new this(e).acosh()}function Op(e,t){return new this(e).plus(t)}function Up(e){return new this(e).asin()}function Dp(e){return new this(e).asinh()}function Np(e){return new this(e).atan()}function jp(e){return new this(e).atanh()}function Pp(e,t){e=new this(e),t=new this(t);var r,i=this.precision,n=this.rounding,o=i+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=Ee(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?Ee(this,i,n):new this(0),r.s=e.s):!e.d||t.isZero()?(r=Ee(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(J(e,t,o,1)),t=Ee(this,o,1),this.precision=i,this.rounding=n,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(J(e,t,o,1)),r}function Ap(e){return new this(e).cbrt()}function Lp(e){return O(e=new this(e),e.e+1,2)}function Cp(e,t,r){return new this(e).clamp(t,r)}function Zp(e){if(!e||typeof e!="object")throw Error(Cn+"Object expected");var t,r,i,n=e.defaults===!0,o=["precision",1,Ke,"rounding",0,8,"toExpNeg",-ut,0,"toExpPos",0,ut,"maxE",0,ut,"minE",-ut,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(r=o[t],n&&(this[r]=Wr[r]),(i=e[r])!==void 0)if(se(i)===i&&i>=o[t+1]&&i<=o[t+2])this[r]=i;else throw Error(Re+r+": "+i);if(r="crypto",n&&(this[r]=Wr[r]),(i=e[r])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(ku);else this[r]=!1;else throw Error(Re+r+": "+i);return this}function Mp(e){return new this(e).cos()}function Rp(e){return new this(e).cosh()}function Du(e){var t,r,i;function n(o){var a,u,s,c=this;if(!(c instanceof n))return new n(o);if(c.constructor=n,Oa(o)){c.s=o.s,A?!o.d||o.e>n.maxE?(c.e=NaN,c.d=null):o.e<n.minE?(c.e=0,c.d=[0]):(c.e=o.e,c.d=o.d.slice()):(c.e=o.e,c.d=o.d?o.d.slice():o.d);return}if(s=typeof o,s==="number"){if(o===0){c.s=1/o<0?-1:1,c.e=0,c.d=[0];return}if(o<0?(o=-o,c.s=-1):c.s=1,o===~~o&&o<1e7){for(a=0,u=o;u>=10;u/=10)a++;A?a>n.maxE?(c.e=NaN,c.d=null):a<n.minE?(c.e=0,c.d=[0]):(c.e=a,c.d=[o]):(c.e=a,c.d=[o]);return}if(o*0!==0){o||(c.s=NaN),c.e=NaN,c.d=null;return}return bn(c,o.toString())}if(s==="string")return(u=o.charCodeAt(0))===45?(o=o.slice(1),c.s=-1):(u===43&&(o=o.slice(1)),c.s=1),xu.test(o)?bn(c,o):Ip(c,o);if(s==="bigint")return o<0?(o=-o,c.s=-1):c.s=1,bn(c,o.toString());throw Error(Re+o)}if(n.prototype=_,n.ROUND_UP=0,n.ROUND_DOWN=1,n.ROUND_CEIL=2,n.ROUND_FLOOR=3,n.ROUND_HALF_UP=4,n.ROUND_HALF_DOWN=5,n.ROUND_HALF_EVEN=6,n.ROUND_HALF_CEIL=7,n.ROUND_HALF_FLOOR=8,n.EUCLID=9,n.config=n.set=Zp,n.clone=Du,n.isDecimal=Oa,n.abs=Tp,n.acos=zp,n.acosh=Ep,n.add=Op,n.asin=Up,n.asinh=Dp,n.atan=Np,n.atanh=jp,n.atan2=Pp,n.cbrt=Ap,n.ceil=Lp,n.clamp=Cp,n.cos=Mp,n.cosh=Rp,n.div=Fp,n.exp=Vp,n.floor=Bp,n.hypot=Kp,n.ln=Jp,n.log=Gp,n.log10=Wp,n.log2=qp,n.max=Hp,n.min=Xp,n.mod=Yp,n.mul=Qp,n.pow=eh,n.random=th,n.round=nh,n.sign=rh,n.sin=ih,n.sinh=oh,n.sqrt=ah,n.sub=uh,n.sum=ch,n.tan=sh,n.tanh=lh,n.trunc=dh,e===void 0&&(e={}),e&&e.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<i.length;)e.hasOwnProperty(r=i[t++])||(e[r]=this[r]);return n.config(e),n}function Fp(e,t){return new this(e).div(t)}function Vp(e){return new this(e).exp()}function Bp(e){return O(e=new this(e),e.e+1,3)}function Kp(){var e,t,r=new this(0);for(A=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return A=!0,new this(1/0);r=t}return A=!0,r.sqrt()}function Oa(e){return e instanceof Pt||e&&e.toStringTag===Iu||!1}function Jp(e){return new this(e).ln()}function Gp(e,t){return new this(e).log(t)}function qp(e){return new this(e).log(2)}function Wp(e){return new this(e).log(10)}function Hp(){return Eu(this,arguments,-1)}function Xp(){return Eu(this,arguments,1)}function Yp(e,t){return new this(e).mod(t)}function Qp(e,t){return new this(e).mul(t)}function eh(e,t){return new this(e).pow(t)}function th(e){var t,r,i,n,o=0,a=new this(1),u=[];if(e===void 0?e=this.precision:me(e,1,Ke),i=Math.ceil(e/U),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));o<i;)n=t[o],n>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:u[o++]=n%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=4);o<i;)n=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((t[o+3]&127)<<24),n>=214e7?crypto.randomBytes(4).copy(t,o):(u.push(n%1e7),o+=4);o=i/4}else throw Error(ku);else for(;o<i;)u[o++]=Math.random()*1e7|0;for(i=u[--o],e%=U,i&&e&&(n=ne(10,U-e),u[o]=(i/n|0)*n);u[o]===0;o--)u.pop();if(o<0)r=0,u=[0];else{for(r=-1;u[0]===0;r-=U)u.shift();for(i=1,n=u[0];n>=10;n/=10)i++;i<U&&(r-=U-i)}return a.e=r,a.d=u,a}function nh(e){return O(e=new this(e),e.e+1,this.rounding)}function rh(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function ih(e){return new this(e).sin()}function oh(e){return new this(e).sinh()}function ah(e){return new this(e).sqrt()}function uh(e,t){return new this(e).sub(t)}function ch(){var e=0,t=arguments,r=new this(t[e]);for(A=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return A=!0,O(r,this.precision,this.rounding)}function sh(e){return new this(e).tan()}function lh(e){return new this(e).tanh()}function dh(e){return O(e=new this(e),e.e+1,1)}_[Symbol.for("nodejs.util.inspect.custom")]=_.toString;_[Symbol.toStringTag]="Decimal";var Pt=_.constructor=Du(Wr);wn=new Pt(wn);Sn=new Pt(Sn);class ze{static formatToTimecode(t,r,i=!1,n=!1){let o=new Pt(r),a,u=o.round();a=o.mul(t).floor();let s,c,l,d,f=u.mul(86400),m=a.mod(f),h=u.mul(3600),p=u.mul(60);return d=m.divToInt(h),m=m.minus(d.mul(h)),l=m.divToInt(p),m=m.minus(l.mul(p)),c=m.divToInt(u),s=m.minus(c.mul(u)),ze.formatTimecodeText(d.toNumber(),l.toNumber(),c.toNumber(),s.toNumber(),i,n)}static formatTimecodeText(t,r,i,n,o=!1,a=!1){let u=a?".":o?";":":";return`${ze.padZero(t)}:${ze.padZero(r)}:${ze.padZero(i)}${u}${ze.padZero(n)}`}static padZero(t){return t<10?`0${t}`:`${t}`}}class fh{static resolveFrameRateValueFromFraction(t){return 30}}const ke=class ke{static parseTimeMoment(t){const[r,i]=t.split(":").map(Number);return[r,i]}static parseTimeRange(t){const r=t.match(this.timeRangePattern);if(!r)throw new Error("Not valid timerange: "+t);const i=r[1]==="[",n=r[5]==="]",o=r[2]?this.parseTimeMoment(r[2]):void 0,a=r[4]?this.parseTimeMoment(r[4]):void 0;return{start:o,end:a,isStartInclusive:i,isEndInclusive:n}}static timeMomentToSeconds(t){return ke.timeMomentToMilliseconds(t)/1e3}static timeMomentToMilliseconds(t){return t[0]*1e3+t[1]/1e6}static timeMomentToDate(t){const i=t[0]*1e3+t[1]/1e6;return new Date(i)}static formatTimeMomentToTimecodeText(t,r,i=!1){let n=fh.resolveFrameRateValueFromFraction(r);return ze.formatToTimecode(ke.timeMomentToSeconds(t),n,i)}static formatTimerangeToTimecodeText(t,r,i=!1){let n=ke.parseTimeRange(t),o=n.start?ke.formatTimeMomentToTimecodeText(n.start,r,i):"?",a=n.end?ke.formatTimeMomentToTimecodeText(n.end,r,i):"?";return`${o} - ${a}`}static nanosecondsToSeconds(t){return t/1e9}static nanosecondsToTimeMoment(t){const r=Math.floor(t/1e9),i=Math.ceil(t%1e9);return[r,i]}static secondsToTimeMoment(t){return this.nanosecondsToTimeMoment(t*1e9)}static timerangeExprDuration(t){return this.timeRangeDuration(this.parseTimeRange(t))}static timeRangeDuration(t){const{start:r,end:i}=t;if(r===void 0||i===void 0)return 0;{const n=i[0]-r[0],o=i[1]-r[1],a=n+o/1e9;return parseFloat(a.toFixed(3))}}static formatTimeMomentExpr(t){return`${t[0]}:${t[1]}`}static formatNanosecondsToTimeMomentExpr(t){return this.formatTimeMomentExpr(this.nanosecondsToTimeMoment(t))}static toTimeRange(t,r,i=!0,n=!0){return{start:t,end:r,isStartInclusive:i,isEndInclusive:n}}static formatTimeRangeExpr(t){const r=t.isStartInclusive?"[":"(",i=t.isEndInclusive?"]":")",n=t.start?`${t.start[0]}:${t.start[1]}`:"",o=t.end?`${t.end[0]}:${t.end[1]}`:"";return`${r}${n}_${o}${i}`}static timerangeDuration(t){let r=ke.parseTimeRange(t);if(r.start===void 0||r.end===void 0)return 1/0;{let i=ke.timeMomentToSeconds(r.start);return ke.timeMomentToSeconds(r.end)-i}}static padZero(t){return t<10?`0${t}`:`${t}`}};ke.timeRangePattern=/^(\[|\()?(-?\d+:\d+)?(_(-?\d+:\d+)?)?(\]|\))?$/;let P=ke;function mh(e){return`subtitles-${e}`}function ph(e,t,r){const i=e.filter(f=>t.get(f.id).length>0).map(f=>{const m=t.get(f.id);let h,p=!1;if(f.format==="urn:x-nmos:format:video"){const v=f.essence_parameters.frame_rate;v&&(h=v.numerator/(v.denominator??1),(v.numerator===6e4||v.numerator===3e4)&&v.denominator===1001&&(p=!0))}return{start:P.timeMomentToSeconds(P.parseTimeRange(m.at(0).timerange).start),frameRate:h,dropFrame:p}}).sort((f,m)=>f.start-m.start),n=i.find(f=>f.frameRate!==void 0),o=(n==null?void 0:n.start)??i.at(0).start,a=new Date(o*1e3),u=Math.max(a.getUTCHours()+(r??0),0),s=a.getUTCMinutes(),c=a.getUTCSeconds(),l=a.getUTCMilliseconds(),d=u*3600+s*60+c+l/1e3;return n===void 0?{ffom:ze.formatToTimecode(d,100,!1,!0),mediaStartTime:o,frameRate:100,dropFrame:!1}:{ffom:ze.formatToTimecode(d,n.frameRate,n.dropFrame),mediaStartTime:n.start,frameRate:n.frameRate,dropFrame:n.dropFrame}}function Nu(e){return Pu(e)}function ju(e){return Pu(e)}function Pu(e){var r;const t=(r=e.tags)==null?void 0:r.hls_name;return t?Array.isArray(t)?t.length?t.at(0):"":t:e.description?e.description:""}class hh{constructor(t=3,r=!1){this.targetDuration=null,this.mediaSequence=null,this.programDateTime=null,this.playlistType=null,this.streams=[],this.media=[],this.segments=[],this.endList=!1,this.version=t,this.independentSegments=r}}class Yr{constructor(t,r,i,n,o){this.bandwidth=t,this.averageBandwidth=r,this.resolution=i,this.frameRate=n,this.uri=o}}class gh{constructor(t,r,i,n,o,a,u){this.type=t,this.groupId=r,this.name=i,this.isDefault=n,this.autoSelect=o,this.channels=a,this.uri=u}}class Ua{constructor(t,r){this.duration=t,this.uri=r}}class Da{constructor(){this.playlist=new hh}setVersion(t){return this.playlist.version=t,this}setIndependentSegments(t){return this.playlist.independentSegments=t,this}setTargetDuration(t){return this.playlist.targetDuration=t,this}setMediaSequence(t){return this.playlist.mediaSequence=t,this}setProgramDateTime(t){return this.playlist.programDateTime=t,this}setPlaylistType(t){return this.playlist.playlistType=t,this}addStreamInfo(t){return this.playlist.streams.push(t),this}addMedia(t){return this.playlist.media.push(t),this}addSegment(t,r=!1){const i={...t,gap:r};return this.playlist.segments.push(i),this}setEndList(){return this.playlist.endList=!0,this}setStartOffset(t){return this.playlist.startOffset=t,this}build(){return this.playlist}}class Na{static write(t){let r=`#EXTM3U
|
|
8
8
|
`;return r+=`#EXT-X-VERSION:${t.version}
|
|
9
9
|
`,t.independentSegments&&(r+=`#EXT-X-INDEPENDENT-SEGMENTS
|
|
10
10
|
`),t.targetDuration!==null&&(r+=`#EXT-X-TARGETDURATION:${t.targetDuration}
|
|
@@ -19,55 +19,55 @@ ${i.uri}`),r+=`
|
|
|
19
19
|
`),r+=`#EXTINF:${i.duration},
|
|
20
20
|
${i.uri}
|
|
21
21
|
`}),t.endList&&(r+=`#EXT-X-ENDLIST
|
|
22
|
-
`),r}}function ah(e,t){const r=new Map,i=new Map,n=new Map;if(!e.some(m=>{var g;return m.streamInfo||((g=m.mediaInfo)==null?void 0:g.type)==="AUDIO"}))throw new Error("Can't create an hls manifest without audio or video source");const a=new xa().setVersion(10).setIndependentSegments(t.independentSegments);let u=e.some(({streamInfo:m,mediaInfo:g})=>m&&!g),s=!1;for(let m=0;m<e.length;m++){const{segments:g,metadata:h,streamInfo:v,mediaInfo:w,id:T}=e[m];let z=h.targetDuration;z===void 0&&(z=Math.max(...g.map(Y=>Y.duration),1));const L=new xa().setVersion(h.version??3).setIndependentSegments(h.independentSegments??!0).setTargetDuration(Math.ceil(z));h.programDateTime&&L.setProgramDateTime(h.programDateTime),h.playlistType&&L.setPlaylistType(h.playlistType),g.forEach(Y=>L.addSegment(Y,Y.uri==="http://byomakase.org/non-playable-gap")),L.setEndList();const F=L.build(),j=Ta.write(F),ee=new Blob([j],{type:"application/vnd.apple.mpegurl"}),te=URL.createObjectURL(ee);if(v&&!w){const Y=new Wr(v.bandwidth,v.averageBandwidth,v.resolution,v.frameRate,te);r.set(T??(r.size+1).toString(),te),a.addStreamInfo(Y)}else if(w){const Y=new oh(w.type,w.groupId??w.type.toLowerCase(),w.name??"",w.isDefault,w.autoSelect,w.channels,te);if(w.type==="AUDIO"?i.set(T??w.name??(i.size+1).toString(),te):w.type!=="VIDEO"&&n.set(T??w.name??(n.size+1).toString(),te),a.addMedia(Y),!u&&w.type==="AUDIO"&&!s){const Ce=new Wr((v==null?void 0:v.bandwidth)??0,(v==null?void 0:v.averageBandwidth)??0,null,null,te);a.addStreamInfo(Ce),s=!0}}}const c=a.build(),l=Ta.write(c),d=new Blob([l],{type:"application/vnd.apple.mpegurl"});return{url:URL.createObjectURL(d),video:r,audio:i,text:n}}function zu(e){return e===void 0?e:e.flatMap((t,r)=>{var u;if(e.length-1===r)return[t];const i=e.at(r+1),n=N.timeMomentToSeconds(N.parseTimeRange(t.timerange).end),o=N.timeMomentToSeconds(N.parseTimeRange(i.timerange).start);if(Math.abs(n-o)<.001)return[t];const a=N.toTimeRange(N.secondsToTimeMoment(n),N.secondsToTimeMoment(o),!0,!1);return[t,{timerange:N.formatTimeRangeExpr(a),ts_offset:t.ts_offset,get_urls:(u=t.get_urls)==null?void 0:u.map(()=>"http://byomakase.org/non-playable-gap"),object_id:"non-playable-gap"}]})}function Eu(e){return e&&e.map((t,r)=>{if(e.length-1===r)return t;const i=e.at(r+1),n=N.timeMomentToSeconds(N.parseTimeRange(t.timerange).start),o=N.timeMomentToSeconds(N.parseTimeRange(i.timerange).start),a=N.toTimeRange(N.secondsToTimeMoment(n),N.secondsToTimeMoment(o),!0,!1);return{...t,timerange:N.formatTimeRangeExpr(a)}})}function za(e){return{width:e.frame_width,height:e.frame_height}}function Ea(e){return e.frame_rate?e.frame_rate.denominator?e.frame_rate.numerator/e.frame_rate.denominator:e.frame_rate.numerator:null}function uh(e){return e.reduce((t,r)=>(t.averageBitRate+=r.avg_bit_rate??0,t.maxBitRate+=r.max_bit_rate??0,t),{averageBitRate:0,maxBitRate:0})}function Ou(e,t,r){var i;if(e.format==="urn:x-nmos:format:multi"&&e.container){const n=(t==null?void 0:t.filter(a=>a.format==="urn:x-nmos:format:multi"&&a.container).length)??!1,o=((i=r==null?void 0:r.get(e.id))==null?void 0:i.length)??!1;if(n)return{valid:!1,message:"Muxed flow has a muxed child flow as well"};if(!o)return{valid:!1,message:"Muxed flow has no muxed segments"}}if(e.format==="urn:x-nmos:format:multi"&&!e.container){const n=(t==null?void 0:t.filter(s=>s.format==="urn:x-nmos:format:video"))??[],o=(t==null?void 0:t.filter(s=>s.format==="urn:x-nmos:format:audio"))??[],a=n.map(s=>r==null?void 0:r.get(s.id)).filter(s=>s).length??!1,u=o.map(s=>r==null?void 0:r.get(s.id)).filter(s=>s).length??!1;if(!n.length&&!o.length)return{valid:!1,message:"Multiflow has no audio or video subflows"};if(!a&&!u)return{valid:!1,message:"Multiflow's child flows have no segments"}}return(e.format==="urn:x-nmos:format:audio"||e.format==="urn:x-nmos:format:video")&&!((r==null?void 0:r.get(e.id))!==void 0)?{valid:!1,message:"Mono essence flow has no segments"}:e.format!=="urn:x-nmos:format:audio"&&e.format!=="urn:x-nmos:format:multi"&&e.format!=="urn:x-nmos:format:video"?{valid:!1,message:"Playback not possible for flows that are not audio, video or multi"}:{valid:!0}}function Uu(e,t,r){const i=[],n=Math.max(...[e,...t??[]].filter(s=>s.format==="urn:x-nmos:format:audio").map(s=>s.essence_parameters.channels)),o=[e,...t??[]].filter(s=>s.format==="urn:x-nmos:format:audio").find(s=>s.essence_parameters.channels===n),a=(s,c,l)=>{var g,h;if(s.format!=="urn:x-nmos:format:video"&&s.format!=="urn:x-nmos:format:audio"&&!(s.format==="urn:x-nmos:format:multi"&&s.container)&&!(s.format==="urn:x-nmos:format:data"&&s.container==="text/vtt"))return;let d;s.format!=="urn:x-nmos:format:data"?d=((g=zu(c))==null?void 0:g.map(v=>{var T,z;const w=N.timerangeExprDuration(v.timerange);return new Ia(w,((z=(T=v.get_urls)==null?void 0:T.at(-1))==null?void 0:z.url)??"http://byomakase.org/non-playable-gap")}))??[]:d=((h=Eu(c))==null?void 0:h.map(v=>{var T,z;const w=N.timerangeExprDuration(v.timerange);return new Ia(w,((z=(T=v.get_urls)==null?void 0:T.at(-1))==null?void 0:z.url)??"http://byomakase.org/non-playable-gap")}))??[];const f=Math.max(...d.map(v=>v.duration),1),m={playlistType:"VOD",targetDuration:Math.ceil(f),version:3,independentSegments:!0};if(s.format==="urn:x-nmos:format:video"){const w=s.essence_parameters,T=za(w),z=Ea(w),L=new Wr(s.max_bit_rate??s.avg_bit_rate??0,s.avg_bit_rate??0,T,z,"");i.push({segments:d,metadata:m,streamInfo:L})}else if(s.format==="urn:x-nmos:format:audio"){const w=s.essence_parameters,T={type:"AUDIO",groupId:"audio",name:xu(s),isDefault:(o==null?void 0:o.id)===s.id,autoSelect:!0,channels:w.channels.toString()},z={bandwidth:s.avg_bit_rate??0,averageBandwidth:s.avg_bit_rate??0,resolution:null,frameRate:null,uri:""};i.push({segments:d,metadata:m,mediaInfo:T,streamInfo:z,id:s.id})}else if(s.format==="urn:x-nmos:format:multi"){const v=l==null?void 0:l.find(F=>F.format==="urn:x-nmos:format:video"),w=v?za(v.essence_parameters):null,T=v?Ea(v.essence_parameters):null,z=uh(l??[]),L={bandwidth:z.maxBitRate,averageBandwidth:z.averageBitRate,resolution:w,frameRate:T,uri:""};i.push({segments:d,metadata:m,streamInfo:L,id:s.id})}else if(s.format==="urn:x-nmos:format:data"&&s.container==="text/vtt"){const v={type:"SUBTITLES",name:Tu(s),isDefault:!1,autoSelect:!1,channels:null};i.push({segments:d,metadata:m,mediaInfo:v,id:s.id})}};return e.format==="urn:x-nmos:format:multi"&&!e.container?t==null||t.forEach(s=>{const c=r==null?void 0:r.get(s.id);c!=null&&c.length&&a(s,c)}):a(e,r==null?void 0:r.get(e.id),t),ah(i,{independentSegments:!0})}var Hr=function(e,t){return Hr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])},Hr(e,t)};function Nt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Hr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function qr(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xr(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),n,o=[],a;try{for(;(t===void 0||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(u){a={error:u}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}function Yr(e,t,r){if(r||arguments.length===2)for(var i=0,n=t.length,o;i<n;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}function je(e){return typeof e=="function"}function Du(e){var t=function(i){Error.call(i),i.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Cr=Du(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
22
|
+
`),r}}function vh(e,t){const r=new Map,i=new Map,n=new Map;if(!e.some(m=>{var h;return m.streamInfo||((h=m.mediaInfo)==null?void 0:h.type)==="AUDIO"}))throw new Error("Can't create an hls manifest without audio or video source");const a=new Da().setVersion(10).setIndependentSegments(t.independentSegments);let u=e.some(({streamInfo:m,mediaInfo:h})=>m&&!h),s=!1;for(let m=0;m<e.length;m++){const{segments:h,metadata:p,streamInfo:v,mediaInfo:w,id:E}=e[m];let T=p.targetDuration;T===void 0&&(T=Math.max(...h.map(Y=>Y.duration),1));const z=new Da().setVersion(p.version??3).setIndependentSegments(p.independentSegments??!0).setTargetDuration(Math.ceil(T));p.programDateTime&&z.setProgramDateTime(p.programDateTime),p.playlistType&&z.setPlaylistType(p.playlistType),h.forEach(Y=>z.addSegment(Y,Y.uri==="http://byomakase.org/non-playable-gap")),z.setEndList();const M=z.build(),R=Na.write(M),Q=new Blob([R],{type:"application/vnd.apple.mpegurl"}),te=URL.createObjectURL(Q);if(v&&!w){const Y=new Yr(v.bandwidth,v.averageBandwidth,v.resolution,v.frameRate,te);r.set(E??(r.size+1).toString(),te),a.addStreamInfo(Y)}else if(w){const Y=new gh(w.type,w.groupId??w.type.toLowerCase(),w.name??"",w.isDefault,w.autoSelect,w.channels,te);if(w.type==="AUDIO"?i.set(E??w.name??(i.size+1).toString(),te):w.type!=="VIDEO"&&n.set(E??w.name??(n.size+1).toString(),te),a.addMedia(Y),!u&&w.type==="AUDIO"&&!s){const Te=new Yr((v==null?void 0:v.bandwidth)??0,(v==null?void 0:v.averageBandwidth)??0,null,null,te);a.addStreamInfo(Te),s=!0}}}const c=a.build(),l=Na.write(c),d=new Blob([l],{type:"application/vnd.apple.mpegurl"});return{url:URL.createObjectURL(d),video:r,audio:i,text:n}}function Au(e){return e===void 0?e:e.flatMap((t,r)=>{var u;if(e.length-1===r)return[t];const i=e.at(r+1),n=P.timeMomentToSeconds(P.parseTimeRange(t.timerange).end),o=P.timeMomentToSeconds(P.parseTimeRange(i.timerange).start);if(Math.abs(n-o)<.001)return[t];const a=P.toTimeRange(P.secondsToTimeMoment(n),P.secondsToTimeMoment(o),!0,!1);return[t,{timerange:P.formatTimeRangeExpr(a),ts_offset:t.ts_offset,get_urls:(u=t.get_urls)==null?void 0:u.map(()=>"http://byomakase.org/non-playable-gap"),object_id:"non-playable-gap"}]})}function Lu(e){return e&&e.map((t,r)=>{if(e.length-1===r)return t;const i=e.at(r+1),n=P.timeMomentToSeconds(P.parseTimeRange(t.timerange).start),o=P.timeMomentToSeconds(P.parseTimeRange(i.timerange).start),a=P.toTimeRange(P.secondsToTimeMoment(n),P.secondsToTimeMoment(o),!0,!1);return{...t,timerange:P.formatTimeRangeExpr(a)}})}function ja(e){return{width:e.frame_width,height:e.frame_height}}function Pa(e){return e.frame_rate?e.frame_rate.denominator?e.frame_rate.numerator/e.frame_rate.denominator:e.frame_rate.numerator:null}function bh(e){return e.reduce((t,r)=>(t.averageBitRate+=r.avg_bit_rate??0,t.maxBitRate+=r.max_bit_rate??0,t),{averageBitRate:0,maxBitRate:0})}function Cu(e,t,r){var i;if(e.format==="urn:x-nmos:format:multi"&&e.container){const n=((t==null?void 0:t.filter(a=>a.format==="urn:x-nmos:format:multi"&&a.container).length)??0)>0,o=(((i=r==null?void 0:r.get(e.id))==null?void 0:i.length)??0)>0;if(n)return{valid:!1,message:"Muxed flow has a muxed child flow as well"};if(!o)return{valid:!1,message:"Muxed flow has no muxed segments"}}if(e.format==="urn:x-nmos:format:multi"&&!e.container){const n=(t==null?void 0:t.filter(s=>s.format==="urn:x-nmos:format:video"))??[],o=(t==null?void 0:t.filter(s=>s.format==="urn:x-nmos:format:audio"))??[],a=n.map(s=>r==null?void 0:r.get(s.id)).filter(s=>s&&s.length>0).length>0,u=o.map(s=>r==null?void 0:r.get(s.id)).filter(s=>s&&s.length>0).length>0;if(!n.length&&!o.length)return{valid:!1,message:"Multiflow has no audio or video subflows"};if(!a&&!u)return{valid:!1,message:"Multiflow's child flows have no segments"}}return(e.format==="urn:x-nmos:format:audio"||e.format==="urn:x-nmos:format:video")&&!((r==null?void 0:r.get(e.id))!==void 0)?{valid:!1,message:"Mono essence flow has no segments"}:e.format!=="urn:x-nmos:format:audio"&&e.format!=="urn:x-nmos:format:multi"&&e.format!=="urn:x-nmos:format:video"?{valid:!1,message:"Playback not possible for flows that are not audio, video or multi"}:{valid:!0}}function Zu(e,t,r){const i=[],n=Math.max(...[e,...t??[]].filter(s=>s.format==="urn:x-nmos:format:audio").map(s=>s.essence_parameters.channels)),o=[e,...t??[]].filter(s=>s.format==="urn:x-nmos:format:audio").find(s=>s.essence_parameters.channels===n),a=(s,c,l)=>{var h,p;if(s.format!=="urn:x-nmos:format:video"&&s.format!=="urn:x-nmos:format:audio"&&!(s.format==="urn:x-nmos:format:multi"&&s.container)&&!(s.format==="urn:x-nmos:format:data"&&s.container==="text/vtt"))return;let d;s.format!=="urn:x-nmos:format:data"?d=((h=Au(c))==null?void 0:h.map(v=>{var E,T;const w=P.timerangeExprDuration(v.timerange);return new Ua(w,((T=(E=v.get_urls)==null?void 0:E.at(-1))==null?void 0:T.url)??"http://byomakase.org/non-playable-gap")}))??[]:d=((p=Lu(c))==null?void 0:p.map(v=>{var E,T;const w=P.timerangeExprDuration(v.timerange);return new Ua(w,((T=(E=v.get_urls)==null?void 0:E.at(-1))==null?void 0:T.url)??"http://byomakase.org/non-playable-gap")}))??[];const f=Math.max(...d.map(v=>v.duration),1),m={playlistType:"VOD",targetDuration:Math.ceil(f),version:3,independentSegments:!0};if(s.format==="urn:x-nmos:format:video"){const w=s.essence_parameters,E=ja(w),T=Pa(w),z=new Yr(s.max_bit_rate??s.avg_bit_rate??0,s.avg_bit_rate??0,E,T,"");i.push({segments:d,metadata:m,streamInfo:z})}else if(s.format==="urn:x-nmos:format:audio"){const w=s.essence_parameters,E={type:"AUDIO",groupId:"audio",name:Nu(s),isDefault:(o==null?void 0:o.id)===s.id,autoSelect:!0,channels:w.channels.toString()},T={bandwidth:s.avg_bit_rate??0,averageBandwidth:s.avg_bit_rate??0,resolution:null,frameRate:null,uri:""};i.push({segments:d,metadata:m,mediaInfo:E,streamInfo:T,id:s.id})}else if(s.format==="urn:x-nmos:format:multi"){const v=l==null?void 0:l.find(M=>M.format==="urn:x-nmos:format:video"),w=v?ja(v.essence_parameters):null,E=v?Pa(v.essence_parameters):null,T=bh(l??[]),z={bandwidth:T.maxBitRate,averageBandwidth:T.averageBitRate,resolution:w,frameRate:E,uri:""};i.push({segments:d,metadata:m,streamInfo:z,id:s.id})}else if(s.format==="urn:x-nmos:format:data"&&s.container==="text/vtt"){const v={type:"SUBTITLES",name:ju(s),isDefault:!1,autoSelect:!1,channels:null};i.push({segments:d,metadata:m,mediaInfo:v,id:s.id})}};return e.format==="urn:x-nmos:format:multi"&&!e.container?t==null||t.forEach(s=>{const c=r==null?void 0:r.get(s.id);c!=null&&c.length&&a(s,c)}):a(e,r==null?void 0:r.get(e.id),t),vh(i,{independentSegments:!0})}var Qr=function(e,t){return Qr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])},Qr(e,t)};function $t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function _h(e,t,r,i){function n(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{c(i.next(l))}catch(d){a(d)}}function s(l){try{c(i.throw(l))}catch(d){a(d)}}function c(l){l.done?o(l.value):n(l.value).then(u,s)}c((i=i.apply(e,t||[])).next())})}function Mu(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(l){return s([c,l])}}function s(c){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(r=0)),r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function dt(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ei(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),n,o=[],a;try{for(;(t===void 0||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(u){a={error:u}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}function ti(e,t,r){if(r||arguments.length===2)for(var i=0,n=t.length,o;i<n;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}function ct(e){return this instanceof ct?(this.v=e,this):new ct(e)}function yh(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,t||[]),n,o=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",a),n[Symbol.asyncIterator]=function(){return this},n;function a(m){return function(h){return Promise.resolve(h).then(m,d)}}function u(m,h){i[m]&&(n[m]=function(p){return new Promise(function(v,w){o.push([m,p,v,w])>1||s(m,p)})},h&&(n[m]=h(n[m])))}function s(m,h){try{c(i[m](h))}catch(p){f(o[0][3],p)}}function c(m){m.value instanceof ct?Promise.resolve(m.value.v).then(l,d):f(o[0][2],m)}function l(m){s("next",m)}function d(m){s("throw",m)}function f(m,h){m(h),o.shift(),o.length&&s(o[0][0],o[0][1])}}function $h(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof dt=="function"?dt(e):e[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(o){r[o]=e[o]&&function(a){return new Promise(function(u,s){a=e[o](a),n(u,s,a.done,a.value)})}}function n(o,a,u,s){Promise.resolve(s).then(function(c){o({value:c,done:u})},a)}}function ae(e){return typeof e=="function"}function hi(e){var t=function(i){Error.call(i),i.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Zr=hi(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
23
23
|
`+r.map(function(i,n){return n+1+") "+i.toString()}).join(`
|
|
24
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function Qr(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ln=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,i,n,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=qr(a),s=u.next();!s.done;s=u.next()){var c=s.value;c.remove(this)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(je(l))try{l()}catch(h){o=h instanceof Cr?h.errors:[h]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=qr(d),m=f.next();!m.done;m=f.next()){var g=m.value;try{Oa(g)}catch(h){o=o??[],h instanceof Cr?o=Yr(Yr([],Xr(o)),Xr(h.errors)):o.push(h)}}}catch(h){i={error:h}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}if(o)throw new Cr(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Oa(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Qr(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Qr(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Nu=Ln.EMPTY;function ju(e){return e instanceof Ln||e&&"closed"in e&&je(e.remove)&&je(e.add)&&je(e.unsubscribe)}function Oa(e){je(e)?e():e.unsubscribe()}var ch={Promise:void 0},sh={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,Yr([e,t],Xr(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function lh(e){sh.setTimeout(function(){throw e})}function Ua(){}function bn(e){e()}var Pu=(function(e){Nt(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,ju(r)&&r.add(i)):i.destination=mh,i}return t.create=function(r,i,n){return new ei(r,i,n)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Ln),dh=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(i){an(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){an(i)}else an(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){an(r)}},e})(),ei=(function(e){Nt(t,e);function t(r,i,n){var o=e.call(this)||this,a;return je(r)||!r?a={next:r??void 0,error:i??void 0,complete:n??void 0}:a=r,o.destination=new dh(a),o}return t})(Pu);function an(e){lh(e)}function fh(e){throw e}var mh={closed:!0,next:Ua,error:fh,complete:Ua},ph=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function hh(e){return e}function gh(e){return e.length===0?hh:e.length===1?e[0]:function(r){return e.reduce(function(i,n){return n(i)},r)}}var xt=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,i){var n=this,o=bh(t)?t:new ei(t,r,i);return bn(function(){var a=n,u=a.operator,s=a.source;o.add(u?u.call(o,s):s?n._subscribe(o):n._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var i=this;return r=Da(r),new r(function(n,o){var a=new ei({next:function(u){try{t(u)}catch(s){o(s),a.unsubscribe()}},error:o,complete:n});i.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[ph]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return gh(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Da(t),new t(function(i,n){var o;r.subscribe(function(a){return o=a},function(a){return n(a)},function(){return i(o)})})},e.create=function(t){return new e(t)},e})();function Da(e){var t;return(t=e??ch.Promise)!==null&&t!==void 0?t:Promise}function vh(e){return e&&je(e.next)&&je(e.error)&&je(e.complete)}function bh(e){return e&&e instanceof Pu||vh(e)&&ju(e)}var _h=Du(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ut=(function(e){Nt(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var i=new Na(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new _h},t.prototype.next=function(r){var i=this;bn(function(){var n,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=qr(i.currentObservers),u=a.next();!u.done;u=a.next()){var s=u.value;s.next(r)}}catch(c){n={error:c}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}}})},t.prototype.error=function(r){var i=this;bn(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=r;for(var n=i.observers;n.length;)n.shift().error(r)}})},t.prototype.complete=function(){var r=this;bn(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var i=r.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var i=this,n=this,o=n.hasError,a=n.isStopped,u=n.observers;return o||a?Nu:(this.currentObservers=null,u.push(r),new Ln(function(){i.currentObservers=null,Qr(u,r)}))},t.prototype._checkFinalizedStatuses=function(r){var i=this,n=i.hasError,o=i.thrownError,a=i.isStopped;n?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new xt;return r.source=this,r},t.create=function(r,i){return new Na(r,i)},t})(xt),Na=(function(e){Nt(t,e);function t(r,i){var n=e.call(this)||this;return n.destination=r,n.source=i,n}return t.prototype.next=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.next)===null||n===void 0||n.call(i,r)},t.prototype.error=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.error)===null||n===void 0||n.call(i,r)},t.prototype.complete=function(){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||i===void 0||i.call(r)},t.prototype._subscribe=function(r){var i,n;return(n=(i=this.source)===null||i===void 0?void 0:i.subscribe(r))!==null&&n!==void 0?n:Nu},t})(ut),yh=(function(e){Nt(t,e);function t(r){var i=e.call(this)||this;return i._value=r,i}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var i=e.prototype._subscribe.call(this,r);return!i.closed&&r.next(this._value),i},t.prototype.getValue=function(){var r=this,i=r.hasError,n=r.thrownError,o=r._value;if(i)throw n;return this._throwIfClosed(),o},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t})(ut);class Au{constructor(t){k(this,"_player");k(this,"_proxy");k(this,"_mediaStartTime");k(this,"_loadOptions");k(this,"_onVideoLoaded$",new yh(void 0));k(this,"_onVideoLoading$",new ut);k(this,"_isTamsLoading",!1);k(this,"_lastVideoLoadedEvent$");k(this,"_tamsVideo");this._player=t;const r=this;this._player.video.onVideoLoading$.subscribe(i=>{var n;this._onVideoLoading$.next({...i,isTamsLoading:((n=this._loadOptions)==null?void 0:n.protocol)===void 0})}),this._player.video.onVideoLoaded$.subscribe(i=>{var n;this._isTamsLoading?this._lastVideoLoadedEvent$=i:i?this._onVideoLoaded$.next({...i,isTamsLoaded:((n=this._loadOptions)==null?void 0:n.protocol)===void 0}):this._onVideoLoaded$.next(i)}),this._proxy=new Proxy(t.video,{get(i,n,o){if(n==="getVideo")return()=>{const u=r._player.video.getVideo();return!u||!r._tamsVideo?u:{...u,...r._tamsVideo}};if(n==="isTamsLoaded")return()=>{var u;return r._player.video.isVideoLoaded()&&((u=r._loadOptions)==null?void 0:u.protocol)===void 0};if(n==="onVideoLoading$")return r._onVideoLoading$;if(n==="onVideoLoaded$")return r._onVideoLoaded$;const a=Reflect.get(i,n,o);return typeof a=="function"?a.bind(i):a}})}get proxy(){return this._proxy}get mediaStartTime(){return this._mediaStartTime}get loadOptions(){return this._loadOptions}set loadOptions(t){this._loadOptions=t,(t==null?void 0:t.protocol)===void 0?this._isTamsLoading=!0:this._isTamsLoading=!1}set mediaStartTime(t){this._mediaStartTime=t}setTamsVideo(t){this._tamsVideo=t}emitVideoLoadedEvent(){if(!this._lastVideoLoadedEvent$){console.error("Can't emit video loaded event since no video has been loaded");return}this._tamsVideo?this._onVideoLoaded$.next({...this._lastVideoLoadedEvent$,video:this._tamsVideo,isTamsLoaded:!0}):this._onVideoLoaded$.next({...this._lastVideoLoadedEvent$})}}function ja(e){if(!e)return{};const t={},r=e.split(",");for(const i of r){const n=i.match(/<([^>]+)>;\s*rel="([^"]+)"/);n&&(t[n[2]]=n[1])}return t}class $h{constructor(t,r){k(this,"apiEndpoint");k(this,"headersFunction");this.headersFunction=r,this.apiEndpoint=t}setEndpoint(t){this.apiEndpoint=t}getEndpoint(){return this.apiEndpoint}setHeadersFunction(t){this.headersFunction=t}getHeadersFunction(){return this.headersFunction}async makeRequest(t,r,i={}){const n=`${this.apiEndpoint}${r}`,o=this.headersFunction?this.headersFunction(n).headers:{},a=await fetch(n,{method:t,headers:{...o,...i.headers},body:i.body?JSON.stringify(i.body):void 0});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const u=a.headers.get("link"),s=u?ja(u):{};return{data:t==="GET"?await a.json():a.status,headers:a.headers,nextLink:s.next}}async makeRequestWithUrl(t,r,i={}){const n=this.headersFunction?this.headersFunction(r).headers:{},o=await fetch(r,{method:t,headers:{...n,...i.headers},body:i.body?JSON.stringify(i.body):void 0});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const a=o.headers.get("link"),u=a?ja(a):{};return{data:t==="GET"?await o.json():o.status,headers:o.headers,nextLink:u.next}}async get(t,r={}){return this.makeRequest("GET",t,r)}async put(t,r,i={}){return this.makeRequest("PUT",t,{...i,body:r})}async del(t,r={}){return this.makeRequest("DELETE",t,r)}async post(t,r,i={}){return this.makeRequest("POST",t,{...i,body:r})}async getUrl(t,r={}){return this.makeRequestWithUrl("GET",t,r)}}const wh=(e,t)=>new $h(e,t),Cu=Object.freeze({status:"aborted"});function p(e,t,r){function i(u,s){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:s,constr:a,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,s);const c=a.prototype,l=Object.keys(c);for(let d=0;d<l.length;d++){const f=l[d];f in u||(u[f]=c[f].bind(u))}}const n=(r==null?void 0:r.Parent)??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function a(u){var s;const c=r!=null&&r.Parent?new o:this;i(c,u),(s=c._zod).deferred??(s.deferred=[]);for(const l of c._zod.deferred)l();return c}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:u=>{var s,c;return r!=null&&r.Parent&&u instanceof r.Parent?!0:(c=(s=u==null?void 0:u._zod)==null?void 0:s.traits)==null?void 0:c.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}const Lu=Symbol("zod_brand");class Xe extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Zn extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const kn={};function se(e){return e&&Object.assign(kn,e),kn}function Sh(e){return e}function kh(e){return e}function Ih(e){}function xh(e){throw new Error("Unexpected value in exhaustive check")}function Th(e){}function mi(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function y(e,t="|"){return e.map(r=>U(r)).join(t)}function In(e,t){return typeof t=="bigint"?t.toString():t}function jt(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function tt(e){return e==null}function Mn(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Zu(e,t){const r=(e.toString().split(".")[1]||"").length,i=t.toString();let n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){const s=i.match(/\d?e-(\d?)/);s!=null&&s[1]&&(n=Number.parseInt(s[1]))}const o=r>n?r:n,a=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return a%u/10**o}const Pa=Symbol("evaluating");function M(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Pa)return i===void 0&&(i=Pa,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function zh(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Je(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Oe(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function Eh(e){return Oe(e._zod.def)}function Oh(e,t){return t?t.reduce((r,i)=>r==null?void 0:r[i],e):e}function Uh(e){const t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{const n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function Dh(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function ti(e){return JSON.stringify(e)}function Mu(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const pi="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function lt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ru=jt(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Ye(e){if(lt(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(lt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Rn(e){return Ye(e)?{...e}:Array.isArray(e)?[...e]:e}function Nh(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const jh=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},xn=new Set(["string","number","symbol"]),Fu=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Pe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $e(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r!=null&&r.parent)&&(i._zod.parent=e),i}function b(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Ph(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function U(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Vu(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Bu={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ku={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Ju(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=Oe(e._zod.def,{get shape(){const a={};for(const u in t){if(!(u in r.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(a[u]=r.shape[u])}return Je(this,"shape",a),a},checks:[]});return $e(e,o)}function Gu(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=Oe(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const u in t){if(!(u in r.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete a[u]}return Je(this,"shape",a),a},checks:[]});return $e(e,o)}function Wu(e,t){if(!Ye(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const o=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=Oe(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Je(this,"shape",o),o}});return $e(e,n)}function Hu(e,t){if(!Ye(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=Oe(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Je(this,"shape",i),i}});return $e(e,r)}function qu(e,t){const r=Oe(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Je(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return $e(e,r)}function Xu(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=Oe(t._zod.def,{get shape(){const u=t._zod.def.shape,s={...u};if(r)for(const c in r){if(!(c in u))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(s[c]=e?new e({type:"optional",innerType:u[c]}):u[c])}else for(const c in u)s[c]=e?new e({type:"optional",innerType:u[c]}):u[c];return Je(this,"shape",s),s},checks:[]});return $e(t,a)}function Yu(e,t,r){const i=Oe(t._zod.def,{get shape(){const n=t._zod.def.shape,o={...n};if(r)for(const a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(o[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(const a in n)o[a]=new e({type:"nonoptional",innerType:n[a]});return Je(this,"shape",o),o}});return $e(t,i)}function qe(e,t=0){var r;if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(((r=e.issues[i])==null?void 0:r.continue)!==!0)return!0;return!1}function ke(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function kt(e){return typeof e=="string"?e:e==null?void 0:e.message}function ye(e,t,r){var n,o,a,u,s,c;const i={...e,path:e.path??[]};if(!e.message){const l=kt((a=(o=(n=e.inst)==null?void 0:n._zod.def)==null?void 0:o.error)==null?void 0:a.call(o,e))??kt((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??kt((s=r.customError)==null?void 0:s.call(r,e))??kt((c=r.localeError)==null?void 0:c.call(r,e))??"Invalid input";i.message=l}return delete i.inst,delete i.continue,t!=null&&t.reportInput||delete i.input,i}function Fn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Vn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function D(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function dt(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function Ah(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Qu(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function ec(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Ch(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Qu(t+r)}function Lh(e){return ec(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Zh(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function Mh(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class Rh{constructor(...t){}}const tc=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:Ku,Class:Rh,NUMBER_FORMAT_RANGES:Bu,aborted:qe,allowsEval:Ru,assert:Th,assertEqual:Sh,assertIs:Ih,assertNever:xh,assertNotEqual:kh,assignProp:Je,base64ToUint8Array:Qu,base64urlToUint8Array:Ch,cached:jt,captureStackTrace:pi,cleanEnum:Ah,cleanRegex:Mn,clone:$e,cloneDef:Eh,createTransparentProxy:Ph,defineLazy:M,esc:ti,escapeRegex:Pe,extend:Wu,finalizeIssue:ye,floatSafeRemainder:Zu,getElementAtPath:Oh,getEnumValues:mi,getLengthableOrigin:Vn,getParsedType:jh,getSizableOrigin:Fn,hexToUint8Array:Zh,isObject:lt,isPlainObject:Ye,issue:dt,joinValues:y,jsonStringifyReplacer:In,merge:qu,mergeDefs:Oe,normalizeParams:b,nullish:tt,numKeys:Nh,objectClone:zh,omit:Gu,optionalKeys:Vu,parsedType:D,partial:Xu,pick:Ju,prefixIssues:ke,primitiveTypes:Fu,promiseAllObject:Uh,propertyKeyTypes:xn,randomString:Dh,required:Yu,safeExtend:Hu,shallowClone:Rn,slugify:Mu,stringifyPrimitive:U,uint8ArrayToBase64:ec,uint8ArrayToBase64url:Lh,uint8ArrayToHex:Mh,unwrapMessage:kt},Symbol.toStringTag,{value:"Module"})),nc=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,In,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},hi=p("$ZodError",nc),he=p("$ZodError",nc,{Parent:Error});function gi(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function vi(e,t=r=>r.message){const r={_errors:[]},i=n=>{for(const o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>i({issues:a}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let a=r,u=0;for(;u<o.path.length;){const s=o.path[u];u===o.path.length-1?(a[s]=a[s]||{_errors:[]},a[s]._errors.push(t(o))):a[s]=a[s]||{_errors:[]},a=a[s],u++}}};return i(e),r}function rc(e,t=r=>r.message){const r={errors:[]},i=(n,o=[])=>{var a,u;for(const s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c},s.path));else if(s.code==="invalid_key")i({issues:s.issues},s.path);else if(s.code==="invalid_element")i({issues:s.issues},s.path);else{const c=[...o,...s.path];if(c.length===0){r.errors.push(t(s));continue}let l=r,d=0;for(;d<c.length;){const f=c[d],m=d===c.length-1;typeof f=="string"?(l.properties??(l.properties={}),(a=l.properties)[f]??(a[f]={errors:[]}),l=l.properties[f]):(l.items??(l.items=[]),(u=l.items)[f]??(u[f]={errors:[]}),l=l.items[f]),m&&l.errors.push(t(s)),d++}}};return i(e),r}function ic(e){const t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(const i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function oc(e){var i;const t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(const n of r)t.push(`✖ ${n.message}`),(i=n.path)!=null&&i.length&&t.push(` → at ${ic(n.path)}`);return t.join(`
|
|
25
|
-
`)}const Pt=e=>(t,r,i,n)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Xe;if(a.issues.length){const u=new((n==null?void 0:n.Err)??e)(a.issues.map(s=>ye(s,o,se())));throw pi(u,n==null?void 0:n.callee),u}return a.value},ni=Pt(he),At=e=>async(t,r,i,n)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const u=new((n==null?void 0:n.Err)??e)(a.issues.map(s=>ye(s,o,se())));throw pi(u,n==null?void 0:n.callee),u}return a.value},ri=At(he),Ct=e=>(t,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Xe;return o.issues.length?{success:!1,error:new(e??hi)(o.issues.map(a=>ye(a,n,se())))}:{success:!0,data:o.value}},ac=Ct(he),Lt=e=>async(t,r,i)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>ye(a,n,se())))}:{success:!0,data:o.value}},uc=Lt(he),bi=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Pt(e)(t,r,n)},Fh=bi(he),_i=e=>(t,r,i)=>Pt(e)(t,r,i),Vh=_i(he),yi=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return At(e)(t,r,n)},Bh=yi(he),$i=e=>async(t,r,i)=>At(e)(t,r,i),Kh=$i(he),wi=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ct(e)(t,r,n)},Jh=wi(he),Si=e=>(t,r,i)=>Ct(e)(t,r,i),Gh=Si(he),ki=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Lt(e)(t,r,n)},Wh=ki(he),Ii=e=>async(t,r,i)=>Lt(e)(t,r,i),Hh=Ii(he),cc=/^[cC][^\s-]{8,}$/,sc=/^[0-9a-z]+$/,lc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,dc=/^[0-9a-vA-V]{20}$/,fc=/^[A-Za-z0-9]{27}$/,mc=/^[a-zA-Z0-9_-]{21}$/,pc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,qh=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,hc=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ft=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Xh=ft(4),Yh=ft(6),Qh=ft(7),gc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eg=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,tg=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,vc=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,ng=vc,rg=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ig="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function bc(){return new RegExp(ig,"u")}const _c=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,yc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,$c=e=>{const t=Pe(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},wc=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Sc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,xi=/^[A-Za-z0-9_-]*$/,Ic=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,xc=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Tc=/^\+[1-9]\d{6,14}$/,zc="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Ec=new RegExp(`^${zc}$`);function Oc(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Uc(e){return new RegExp(`^${Oc(e)}$`)}function Dc(e){const t=Oc({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${zc}T(?:${i})$`)}const Nc=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},jc=/^-?\d+n?$/,Pc=/^-?\d+$/,Ti=/^-?\d+(?:\.\d+)?$/,Ac=/^(?:true|false)$/i,Cc=/^null$/i,Lc=/^undefined$/i,Zc=/^[^A-Z]*$/,Mc=/^[^a-z]*$/,Rc=/^[0-9a-fA-F]*$/;function Zt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Mt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const og=/^[0-9a-fA-F]{32}$/,ag=Zt(22,"=="),ug=Mt(22),cg=/^[0-9a-fA-F]{40}$/,sg=Zt(27,"="),lg=Mt(27),dg=/^[0-9a-fA-F]{64}$/,fg=Zt(43,"="),mg=Mt(43),pg=/^[0-9a-fA-F]{96}$/,hg=Zt(64,""),gg=Mt(64),vg=/^[0-9a-fA-F]{128}$/,bg=Zt(86,"=="),_g=Mt(86),zi=Object.freeze(Object.defineProperty({__proto__:null,base64:kc,base64url:xi,bigint:jc,boolean:Ac,browserEmail:rg,cidrv4:wc,cidrv6:Sc,cuid:cc,cuid2:sc,date:Ec,datetime:Dc,domain:xc,duration:pc,e164:Tc,email:gc,emoji:bc,extendedDuration:qh,guid:hc,hex:Rc,hostname:Ic,html5Email:eg,idnEmail:ng,integer:Pc,ipv4:_c,ipv6:yc,ksuid:fc,lowercase:Zc,mac:$c,md5_base64:ag,md5_base64url:ug,md5_hex:og,nanoid:mc,null:Cc,number:Ti,rfc5322Email:tg,sha1_base64:sg,sha1_base64url:lg,sha1_hex:cg,sha256_base64:fg,sha256_base64url:mg,sha256_hex:dg,sha384_base64:hg,sha384_base64url:gg,sha384_hex:pg,sha512_base64:bg,sha512_base64url:_g,sha512_hex:vg,string:Nc,time:Uc,ulid:lc,undefined:Lc,unicodeEmail:vc,uppercase:Mc,uuid:ft,uuid4:Xh,uuid6:Yh,uuid7:Qh,xid:dc},Symbol.toStringTag,{value:"Module"})),q=p("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Fc={number:"number",bigint:"bigint",object:"date"},Ei=p("$ZodCheckLessThan",(e,t)=>{q.init(e,t);const r=Fc[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Oi=p("$ZodCheckGreaterThan",(e,t)=>{q.init(e,t);const r=Fc[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Vc=p("$ZodCheckMultipleOf",(e,t)=>{q.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Zu(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Bc=p("$ZodCheckNumberFormat",(e,t)=>{var a;q.init(e,t),t.format=t.format||"float64";const r=(a=t.format)==null?void 0:a.includes("int"),i=r?"int":"number",[n,o]=Bu[t.format];e._zod.onattach.push(u=>{const s=u._zod.bag;s.format=t.format,s.minimum=n,s.maximum=o,r&&(s.pattern=Pc)}),e._zod.check=u=>{const s=u.value;if(r){if(!Number.isInteger(s)){u.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?u.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):u.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<n&&u.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>o&&u.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Kc=p("$ZodCheckBigIntFormat",(e,t)=>{q.init(e,t);const[r,i]=Ku[t.format];e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{const o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Jc=p("$ZodCheckMaxSize",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!tt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;n.size<=t.maximum||i.issues.push({origin:Fn(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Gc=p("$ZodCheckMinSize",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!tt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;n.size>=t.minimum||i.issues.push({origin:Fn(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Wc=p("$ZodCheckSizeEquals",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!tt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{const n=i.value,o=n.size;if(o===t.size)return;const a=o>t.size;i.issues.push({origin:Fn(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Hc=p("$ZodCheckMaxLength",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!tt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;if(n.length<=t.maximum)return;const a=Vn(n);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),qc=p("$ZodCheckMinLength",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!tt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;if(n.length>=t.minimum)return;const a=Vn(n);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Xc=p("$ZodCheckLengthEquals",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!tt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{const n=i.value,o=n.length;if(o===t.length)return;const a=Vn(n),u=o>t.length;i.issues.push({origin:a,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Rt=p("$ZodCheckStringFormat",(e,t)=>{var r,i;q.init(e,t),e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Yc=p("$ZodCheckRegex",(e,t)=>{Rt.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Qc=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Zc),Rt.init(e,t)}),es=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Mc),Rt.init(e,t)}),ts=p("$ZodCheckIncludes",(e,t)=>{q.init(e,t);const r=Pe(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ns=p("$ZodCheckStartsWith",(e,t)=>{q.init(e,t);const r=new RegExp(`^${Pe(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),rs=p("$ZodCheckEndsWith",(e,t)=>{q.init(e,t);const r=new RegExp(`.*${Pe(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Aa(e,t,r){e.issues.length&&t.issues.push(...ke(r,e.issues))}const is=p("$ZodCheckProperty",(e,t)=>{q.init(e,t),e._zod.check=r=>{const i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Aa(n,r,t.property));Aa(i,r,t.property)}}),os=p("$ZodCheckMimeType",(e,t)=>{q.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),as=p("$ZodCheckOverwrite",(e,t)=>{q.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class us{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
|
|
24
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function ni(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Rn=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,i,n,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=dt(a),s=u.next();!s.done;s=u.next()){var c=s.value;c.remove(this)}}catch(p){t={error:p}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(ae(l))try{l()}catch(p){o=p instanceof Zr?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=dt(d),m=f.next();!m.done;m=f.next()){var h=m.value;try{Aa(h)}catch(p){o=o??[],p instanceof Zr?o=ti(ti([],ei(o)),ei(p.errors)):o.push(p)}}}catch(p){i={error:p}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}if(o)throw new Zr(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Aa(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&ni(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&ni(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Ru=Rn.EMPTY;function Fu(e){return e instanceof Rn||e&&"closed"in e&&ae(e.remove)&&ae(e.add)&&ae(e.unsubscribe)}function Aa(e){ae(e)?e():e.unsubscribe()}var wh={Promise:void 0},Sh={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,ti([e,t],ei(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Vu(e){Sh.setTimeout(function(){throw e})}function La(){}function _n(e){e()}var gi=(function(e){$t(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,Fu(r)&&r.add(i)):i.destination=xh,i}return t.create=function(r,i,n){return new In(r,i,n)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Rn),kh=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(i){cn(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){cn(i)}else cn(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){cn(r)}},e})(),In=(function(e){$t(t,e);function t(r,i,n){var o=e.call(this)||this,a;return ae(r)||!r?a={next:r??void 0,error:i??void 0,complete:n??void 0}:a=r,o.destination=new kh(a),o}return t})(gi);function cn(e){Vu(e)}function Ih(e){throw e}var xh={closed:!0,next:La,error:Ih,complete:La},vi=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Bu(e){return e}function Th(e){return e.length===0?Bu:e.length===1?e[0]:function(r){return e.reduce(function(i,n){return n(i)},r)}}var ye=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,i){var n=this,o=Eh(t)?t:new In(t,r,i);return _n(function(){var a=n,u=a.operator,s=a.source;o.add(u?u.call(o,s):s?n._subscribe(o):n._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var i=this;return r=Ca(r),new r(function(n,o){var a=new In({next:function(u){try{t(u)}catch(s){o(s),a.unsubscribe()}},error:o,complete:n});i.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[vi]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Th(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Ca(t),new t(function(i,n){var o;r.subscribe(function(a){return o=a},function(a){return n(a)},function(){return i(o)})})},e.create=function(t){return new e(t)},e})();function Ca(e){var t;return(t=e??wh.Promise)!==null&&t!==void 0?t:Promise}function zh(e){return e&&ae(e.next)&&ae(e.error)&&ae(e.complete)}function Eh(e){return e&&e instanceof gi||zh(e)&&Fu(e)}function Oh(e){return ae(e==null?void 0:e.lift)}function bi(e){return function(t){if(Oh(t))return t.lift(function(r){try{return e(r,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function xn(e,t,r,i,n){return new Uh(e,t,r,i,n)}var Uh=(function(e){$t(t,e);function t(r,i,n,o,a,u){var s=e.call(this,r)||this;return s.onFinalize=a,s.shouldUnsubscribe=u,s._next=i?function(c){try{i(c)}catch(l){r.error(l)}}:e.prototype._next,s._error=o?function(c){try{o(c)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=n?function(){try{n()}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;e.prototype.unsubscribe.call(this),!i&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(gi),Dh=hi(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),_i=(function(e){$t(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var i=new Za(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new Dh},t.prototype.next=function(r){var i=this;_n(function(){var n,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=dt(i.currentObservers),u=a.next();!u.done;u=a.next()){var s=u.value;s.next(r)}}catch(c){n={error:c}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}}})},t.prototype.error=function(r){var i=this;_n(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=r;for(var n=i.observers;n.length;)n.shift().error(r)}})},t.prototype.complete=function(){var r=this;_n(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var i=r.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var i=this,n=this,o=n.hasError,a=n.isStopped,u=n.observers;return o||a?Ru:(this.currentObservers=null,u.push(r),new Rn(function(){i.currentObservers=null,ni(u,r)}))},t.prototype._checkFinalizedStatuses=function(r){var i=this,n=i.hasError,o=i.thrownError,a=i.isStopped;n?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new ye;return r.source=this,r},t.create=function(r,i){return new Za(r,i)},t})(ye),Za=(function(e){$t(t,e);function t(r,i){var n=e.call(this)||this;return n.destination=r,n.source=i,n}return t.prototype.next=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.next)===null||n===void 0||n.call(i,r)},t.prototype.error=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.error)===null||n===void 0||n.call(i,r)},t.prototype.complete=function(){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||i===void 0||i.call(r)},t.prototype._subscribe=function(r){var i,n;return(n=(i=this.source)===null||i===void 0?void 0:i.subscribe(r))!==null&&n!==void 0?n:Ru},t})(_i),Nh=(function(e){$t(t,e);function t(r){var i=e.call(this)||this;return i._value=r,i}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var i=e.prototype._subscribe.call(this,r);return!i.closed&&r.next(this._value),i},t.prototype.getValue=function(){var r=this,i=r.hasError,n=r.thrownError,o=r._value;if(i)throw n;return this._throwIfClosed(),o},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t})(_i),jh=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function Ph(e){return ae(e==null?void 0:e.then)}function Ah(e){return ae(e[vi])}function Lh(e){return Symbol.asyncIterator&&ae(e==null?void 0:e[Symbol.asyncIterator])}function Ch(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Zh(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Mh=Zh();function Rh(e){return ae(e==null?void 0:e[Mh])}function Fh(e){return yh(this,arguments,function(){var r,i,n,o;return Mu(this,function(a){switch(a.label){case 0:r=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,ct(r.read())];case 3:return i=a.sent(),n=i.value,o=i.done,o?[4,ct(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ct(n)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function Vh(e){return ae(e==null?void 0:e.getReader)}function Bh(e){if(e instanceof ye)return e;if(e!=null){if(Ah(e))return Kh(e);if(jh(e))return Jh(e);if(Ph(e))return Ku(e);if(Lh(e))return Ju(e);if(Rh(e))return Gh(e);if(Vh(e))return qh(e)}throw Ch(e)}function Kh(e){return new ye(function(t){var r=e[vi]();if(ae(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Jh(e){return new ye(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function Ku(e){return new ye(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Vu)})}function Gh(e){return new ye(function(t){var r,i;try{for(var n=dt(e),o=n.next();!o.done;o=n.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(u){r={error:u}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}t.complete()})}function Ju(e){return new ye(function(t){Wh(e,t).catch(function(r){return t.error(r)})})}function qh(e){return Ju(Fh(e))}function Wh(e,t){var r,i,n,o;return _h(this,void 0,void 0,function(){var a,u;return Mu(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),r=$h(e),s.label=1;case 1:return[4,r.next()];case 2:if(i=s.sent(),!!i.done)return[3,4];if(a=i.value,t.next(a),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=s.sent(),n={error:u},[3,11];case 6:return s.trys.push([6,,9,10]),i&&!i.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}var Hh=hi(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Xh(e,t){return new Promise(function(r,i){var n=new In({next:function(o){r(o),n.unsubscribe()},error:i,complete:function(){i(new Hh)}});e.subscribe(n)})}function Ma(e,t){return bi(function(r,i){var n=0;r.subscribe(xn(i,function(o){i.next(e.call(t,o,n++))}))})}function Mr(e,t){return bi(function(r,i){var n=null,o=0,a=!1,u=function(){return a&&!n&&i.complete()};r.subscribe(xn(i,function(s){n==null||n.unsubscribe();var c=0,l=o++;Bh(e(s,l)).subscribe(n=xn(i,function(d){return i.next(t?t(s,d,l,c++):d)},function(){n=null,u()}))},function(){a=!0,u()}))})}function Yh(e,t,r){var i=ae(e)||t||r?{next:e,error:t,complete:r}:e;return i?bi(function(n,o){var a;(a=i.subscribe)===null||a===void 0||a.call(i);var u=!0;n.subscribe(xn(o,function(s){var c;(c=i.next)===null||c===void 0||c.call(i,s),o.next(s)},function(){var s;u=!1,(s=i.complete)===null||s===void 0||s.call(i),o.complete()},function(s){var c;u=!1,(c=i.error)===null||c===void 0||c.call(i,s),o.error(s)},function(){var s,c;u&&((s=i.unsubscribe)===null||s===void 0||s.call(i)),(c=i.finalize)===null||c===void 0||c.call(i)}))}):Bu}class Gu{constructor(t){k(this,"_player");k(this,"_proxy");k(this,"_mediaStartTime");k(this,"_loadOptions");k(this,"_requestedDuration");k(this,"_onVideoLoaded$",new Nh(void 0));k(this,"_onVideoLoading$",new _i);k(this,"_isTamsLoading",!1);k(this,"_lastVideoLoadedEvent$");k(this,"_tamsVideo");this._player=t;const r=this;this._player.video.onVideoLoading$.subscribe(i=>{var o;const n={...i,isTamsLoading:((o=this._loadOptions)==null?void 0:o.protocol)===void 0};Number.isFinite(this._requestedDuration)&&(n.options={...i.options,duration:this._requestedDuration}),this._onVideoLoading$.next(n)}),this._player.video.onVideoLoaded$.subscribe(i=>{var n;this._isTamsLoading?this._lastVideoLoadedEvent$=i:i?this._onVideoLoaded$.next({...i,isTamsLoaded:((n=this._loadOptions)==null?void 0:n.protocol)===void 0}):this._onVideoLoaded$.next(i)}),this._proxy=new Proxy(t.video,{get(i,n,o){if(n==="getVideo")return()=>{const u=r._player.video.getVideo();return!u||!r._tamsVideo?u:{...u,...r._tamsVideo}};if(n==="getVideoLoadOptions")return()=>{if(r._loadOptions)return{...r._loadOptions,...Number.isFinite(r._requestedDuration)?{duration:r._requestedDuration}:{}}};if(n==="isTamsLoaded")return()=>{var u;return r._player.video.isVideoLoaded()&&((u=r._loadOptions)==null?void 0:u.protocol)===void 0};if(n==="onVideoLoading$")return r._onVideoLoading$;if(n==="onVideoLoaded$")return r._onVideoLoaded$;const a=Reflect.get(i,n,o);return typeof a=="function"?a.bind(i):a}})}get proxy(){return this._proxy}get mediaStartTime(){return this._mediaStartTime}get loadOptions(){return this._loadOptions}set loadOptions(t){this._loadOptions=t,(t==null?void 0:t.protocol)===void 0?this._isTamsLoading=!0:this._isTamsLoading=!1}set mediaStartTime(t){this._mediaStartTime=t}set requestedDuration(t){this._requestedDuration=t}setTamsVideo(t){this._tamsVideo=t}emitVideoLoadedEvent(){if(!this._lastVideoLoadedEvent$){console.error("Can't emit video loaded event since no video has been loaded");return}if(this._tamsVideo){const t={...this._lastVideoLoadedEvent$,video:this._tamsVideo,isTamsLoaded:!0};Number.isFinite(this._requestedDuration)&&(t.videoLoadOptions={...this._lastVideoLoadedEvent$.videoLoadOptions,duration:this._requestedDuration}),this._onVideoLoaded$.next(t)}else this._onVideoLoaded$.next({...this._lastVideoLoadedEvent$})}}function Ra(e){if(!e)return{};const t={},r=e.split(",");for(const i of r){const n=i.match(/<([^>]+)>;\s*rel="([^"]+)"/);n&&(t[n[2]]=n[1])}return t}class Qh{constructor(t,r){k(this,"apiEndpoint");k(this,"headersFunction");this.headersFunction=r,this.apiEndpoint=t}setEndpoint(t){this.apiEndpoint=t}getEndpoint(){return this.apiEndpoint}setHeadersFunction(t){this.headersFunction=t}getHeadersFunction(){return this.headersFunction}async makeRequest(t,r,i={}){const n=`${this.apiEndpoint}${r}`,o=this.headersFunction?this.headersFunction(n).headers:{},a=await fetch(n,{method:t,headers:{...o,...i.headers},body:i.body?JSON.stringify(i.body):void 0});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const u=a.headers.get("link"),s=u?Ra(u):{};return{data:t==="GET"?await a.json():a.status,headers:a.headers,nextLink:s.next}}async makeRequestWithUrl(t,r,i={}){const n=this.headersFunction?this.headersFunction(r).headers:{},o=await fetch(r,{method:t,headers:{...n,...i.headers},body:i.body?JSON.stringify(i.body):void 0});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const a=o.headers.get("link"),u=a?Ra(a):{};return{data:t==="GET"?await o.json():o.status,headers:o.headers,nextLink:u.next}}async get(t,r={}){return this.makeRequest("GET",t,r)}async put(t,r,i={}){return this.makeRequest("PUT",t,{...i,body:r})}async del(t,r={}){return this.makeRequest("DELETE",t,r)}async post(t,r,i={}){return this.makeRequest("POST",t,{...i,body:r})}async getUrl(t,r={}){return this.makeRequestWithUrl("GET",t,r)}}const eg=(e,t)=>new Qh(e,t),qu=Object.freeze({status:"aborted"});function g(e,t,r){function i(u,s){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:s,constr:a,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,s);const c=a.prototype,l=Object.keys(c);for(let d=0;d<l.length;d++){const f=l[d];f in u||(u[f]=c[f].bind(u))}}const n=(r==null?void 0:r.Parent)??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function a(u){var s;const c=r!=null&&r.Parent?new o:this;i(c,u),(s=c._zod).deferred??(s.deferred=[]);for(const l of c._zod.deferred)l();return c}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:u=>{var s,c;return r!=null&&r.Parent&&u instanceof r.Parent?!0:(c=(s=u==null?void 0:u._zod)==null?void 0:s.traits)==null?void 0:c.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}const Wu=Symbol("zod_brand");class Ye extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Fn extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Tn={};function le(e){return e&&Object.assign(Tn,e),Tn}function tg(e){return e}function ng(e){return e}function rg(e){}function ig(e){throw new Error("Unexpected value in exhaustive check")}function og(e){}function yi(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function y(e,t="|"){return e.map(r=>D(r)).join(t)}function zn(e,t){return typeof t=="bigint"?t.toString():t}function At(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function nt(e){return e==null}function Vn(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Hu(e,t){const r=(e.toString().split(".")[1]||"").length,i=t.toString();let n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){const s=i.match(/\d?e-(\d?)/);s!=null&&s[1]&&(n=Number.parseInt(s[1]))}const o=r>n?r:n,a=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return a%u/10**o}const Fa=Symbol("evaluating");function Z(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Fa)return i===void 0&&(i=Fa,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ag(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Je(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function De(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function ug(e){return De(e._zod.def)}function cg(e,t){return t?t.reduce((r,i)=>r==null?void 0:r[i],e):e}function sg(e){const t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{const n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function lg(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function ri(e){return JSON.stringify(e)}function Xu(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const $i="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ft(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Yu=At(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Qe(e){if(ft(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(ft(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Bn(e){return Qe(e)?{...e}:Array.isArray(e)?[...e]:e}function dg(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const fg=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},En=new Set(["string","number","symbol"]),Qu=new Set(["string","number","bigint","boolean","symbol","undefined"]);function je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function we(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r!=null&&r.parent)&&(i._zod.parent=e),i}function b(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function mg(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function D(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ec(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const tc={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},nc={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function rc(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=De(e._zod.def,{get shape(){const a={};for(const u in t){if(!(u in r.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(a[u]=r.shape[u])}return Je(this,"shape",a),a},checks:[]});return we(e,o)}function ic(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=De(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const u in t){if(!(u in r.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete a[u]}return Je(this,"shape",a),a},checks:[]});return we(e,o)}function oc(e,t){if(!Qe(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const o=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=De(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Je(this,"shape",o),o}});return we(e,n)}function ac(e,t){if(!Qe(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=De(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Je(this,"shape",i),i}});return we(e,r)}function uc(e,t){const r=De(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Je(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return we(e,r)}function cc(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=De(t._zod.def,{get shape(){const u=t._zod.def.shape,s={...u};if(r)for(const c in r){if(!(c in u))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(s[c]=e?new e({type:"optional",innerType:u[c]}):u[c])}else for(const c in u)s[c]=e?new e({type:"optional",innerType:u[c]}):u[c];return Je(this,"shape",s),s},checks:[]});return we(t,a)}function sc(e,t,r){const i=De(t._zod.def,{get shape(){const n=t._zod.def.shape,o={...n};if(r)for(const a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(o[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(const a in n)o[a]=new e({type:"nonoptional",innerType:n[a]});return Je(this,"shape",o),o}});return we(t,i)}function Xe(e,t=0){var r;if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(((r=e.issues[i])==null?void 0:r.continue)!==!0)return!0;return!1}function Ie(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function zt(e){return typeof e=="string"?e:e==null?void 0:e.message}function $e(e,t,r){var n,o,a,u,s,c;const i={...e,path:e.path??[]};if(!e.message){const l=zt((a=(o=(n=e.inst)==null?void 0:n._zod.def)==null?void 0:o.error)==null?void 0:a.call(o,e))??zt((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??zt((s=r.customError)==null?void 0:s.call(r,e))??zt((c=r.localeError)==null?void 0:c.call(r,e))??"Invalid input";i.message=l}return delete i.inst,delete i.continue,t!=null&&t.reportInput||delete i.input,i}function Kn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Jn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function N(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function mt(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function pg(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function lc(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function dc(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function hg(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return lc(t+r)}function gg(e){return dc(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function vg(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function bg(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class _g{constructor(...t){}}const fc=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:nc,Class:_g,NUMBER_FORMAT_RANGES:tc,aborted:Xe,allowsEval:Yu,assert:og,assertEqual:tg,assertIs:rg,assertNever:ig,assertNotEqual:ng,assignProp:Je,base64ToUint8Array:lc,base64urlToUint8Array:hg,cached:At,captureStackTrace:$i,cleanEnum:pg,cleanRegex:Vn,clone:we,cloneDef:ug,createTransparentProxy:mg,defineLazy:Z,esc:ri,escapeRegex:je,extend:oc,finalizeIssue:$e,floatSafeRemainder:Hu,getElementAtPath:cg,getEnumValues:yi,getLengthableOrigin:Jn,getParsedType:fg,getSizableOrigin:Kn,hexToUint8Array:vg,isObject:ft,isPlainObject:Qe,issue:mt,joinValues:y,jsonStringifyReplacer:zn,merge:uc,mergeDefs:De,normalizeParams:b,nullish:nt,numKeys:dg,objectClone:ag,omit:ic,optionalKeys:ec,parsedType:N,partial:cc,pick:rc,prefixIssues:Ie,primitiveTypes:Qu,promiseAllObject:sg,propertyKeyTypes:En,randomString:lg,required:sc,safeExtend:ac,shallowClone:Bn,slugify:Xu,stringifyPrimitive:D,uint8ArrayToBase64:dc,uint8ArrayToBase64url:gg,uint8ArrayToHex:bg,unwrapMessage:zt},Symbol.toStringTag,{value:"Module"})),mc=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,zn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},wi=g("$ZodError",mc),he=g("$ZodError",mc,{Parent:Error});function Si(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function ki(e,t=r=>r.message){const r={_errors:[]},i=n=>{for(const o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>i({issues:a}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let a=r,u=0;for(;u<o.path.length;){const s=o.path[u];u===o.path.length-1?(a[s]=a[s]||{_errors:[]},a[s]._errors.push(t(o))):a[s]=a[s]||{_errors:[]},a=a[s],u++}}};return i(e),r}function pc(e,t=r=>r.message){const r={errors:[]},i=(n,o=[])=>{var a,u;for(const s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c},s.path));else if(s.code==="invalid_key")i({issues:s.issues},s.path);else if(s.code==="invalid_element")i({issues:s.issues},s.path);else{const c=[...o,...s.path];if(c.length===0){r.errors.push(t(s));continue}let l=r,d=0;for(;d<c.length;){const f=c[d],m=d===c.length-1;typeof f=="string"?(l.properties??(l.properties={}),(a=l.properties)[f]??(a[f]={errors:[]}),l=l.properties[f]):(l.items??(l.items=[]),(u=l.items)[f]??(u[f]={errors:[]}),l=l.items[f]),m&&l.errors.push(t(s)),d++}}};return i(e),r}function hc(e){const t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(const i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function gc(e){var i;const t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(const n of r)t.push(`✖ ${n.message}`),(i=n.path)!=null&&i.length&&t.push(` → at ${hc(n.path)}`);return t.join(`
|
|
25
|
+
`)}const Lt=e=>(t,r,i,n)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Ye;if(a.issues.length){const u=new((n==null?void 0:n.Err)??e)(a.issues.map(s=>$e(s,o,le())));throw $i(u,n==null?void 0:n.callee),u}return a.value},ii=Lt(he),Ct=e=>async(t,r,i,n)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const u=new((n==null?void 0:n.Err)??e)(a.issues.map(s=>$e(s,o,le())));throw $i(u,n==null?void 0:n.callee),u}return a.value},oi=Ct(he),Zt=e=>(t,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Ye;return o.issues.length?{success:!1,error:new(e??wi)(o.issues.map(a=>$e(a,n,le())))}:{success:!0,data:o.value}},vc=Zt(he),Mt=e=>async(t,r,i)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>$e(a,n,le())))}:{success:!0,data:o.value}},bc=Mt(he),Ii=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Lt(e)(t,r,n)},yg=Ii(he),xi=e=>(t,r,i)=>Lt(e)(t,r,i),$g=xi(he),Ti=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ct(e)(t,r,n)},wg=Ti(he),zi=e=>async(t,r,i)=>Ct(e)(t,r,i),Sg=zi(he),Ei=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Zt(e)(t,r,n)},kg=Ei(he),Oi=e=>(t,r,i)=>Zt(e)(t,r,i),Ig=Oi(he),Ui=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Mt(e)(t,r,n)},xg=Ui(he),Di=e=>async(t,r,i)=>Mt(e)(t,r,i),Tg=Di(he),_c=/^[cC][^\s-]{8,}$/,yc=/^[0-9a-z]+$/,$c=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,wc=/^[0-9a-vA-V]{20}$/,Sc=/^[A-Za-z0-9]{27}$/,kc=/^[a-zA-Z0-9_-]{21}$/,Ic=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,zg=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xc=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,pt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Eg=pt(4),Og=pt(6),Ug=pt(7),Tc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Dg=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ng=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,zc=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,jg=zc,Pg=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ag="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ec(){return new RegExp(Ag,"u")}const Oc=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Uc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Dc=e=>{const t=je(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Nc=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,jc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Pc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ni=/^[A-Za-z0-9_-]*$/,Ac=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Lc=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Cc=/^\+[1-9]\d{6,14}$/,Zc="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Mc=new RegExp(`^${Zc}$`);function Rc(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Fc(e){return new RegExp(`^${Rc(e)}$`)}function Vc(e){const t=Rc({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Zc}T(?:${i})$`)}const Bc=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Kc=/^-?\d+n?$/,Jc=/^-?\d+$/,ji=/^-?\d+(?:\.\d+)?$/,Gc=/^(?:true|false)$/i,qc=/^null$/i,Wc=/^undefined$/i,Hc=/^[^A-Z]*$/,Xc=/^[^a-z]*$/,Yc=/^[0-9a-fA-F]*$/;function Rt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ft(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const Lg=/^[0-9a-fA-F]{32}$/,Cg=Rt(22,"=="),Zg=Ft(22),Mg=/^[0-9a-fA-F]{40}$/,Rg=Rt(27,"="),Fg=Ft(27),Vg=/^[0-9a-fA-F]{64}$/,Bg=Rt(43,"="),Kg=Ft(43),Jg=/^[0-9a-fA-F]{96}$/,Gg=Rt(64,""),qg=Ft(64),Wg=/^[0-9a-fA-F]{128}$/,Hg=Rt(86,"=="),Xg=Ft(86),Pi=Object.freeze(Object.defineProperty({__proto__:null,base64:Pc,base64url:Ni,bigint:Kc,boolean:Gc,browserEmail:Pg,cidrv4:Nc,cidrv6:jc,cuid:_c,cuid2:yc,date:Mc,datetime:Vc,domain:Lc,duration:Ic,e164:Cc,email:Tc,emoji:Ec,extendedDuration:zg,guid:xc,hex:Yc,hostname:Ac,html5Email:Dg,idnEmail:jg,integer:Jc,ipv4:Oc,ipv6:Uc,ksuid:Sc,lowercase:Hc,mac:Dc,md5_base64:Cg,md5_base64url:Zg,md5_hex:Lg,nanoid:kc,null:qc,number:ji,rfc5322Email:Ng,sha1_base64:Rg,sha1_base64url:Fg,sha1_hex:Mg,sha256_base64:Bg,sha256_base64url:Kg,sha256_hex:Vg,sha384_base64:Gg,sha384_base64url:qg,sha384_hex:Jg,sha512_base64:Hg,sha512_base64url:Xg,sha512_hex:Wg,string:Bc,time:Fc,ulid:$c,undefined:Wc,unicodeEmail:zc,uppercase:Xc,uuid:pt,uuid4:Eg,uuid6:Og,uuid7:Ug,xid:wc},Symbol.toStringTag,{value:"Module"})),X=g("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Qc={number:"number",bigint:"bigint",object:"date"},Ai=g("$ZodCheckLessThan",(e,t)=>{X.init(e,t);const r=Qc[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Li=g("$ZodCheckGreaterThan",(e,t)=>{X.init(e,t);const r=Qc[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),es=g("$ZodCheckMultipleOf",(e,t)=>{X.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Hu(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),ts=g("$ZodCheckNumberFormat",(e,t)=>{var a;X.init(e,t),t.format=t.format||"float64";const r=(a=t.format)==null?void 0:a.includes("int"),i=r?"int":"number",[n,o]=tc[t.format];e._zod.onattach.push(u=>{const s=u._zod.bag;s.format=t.format,s.minimum=n,s.maximum=o,r&&(s.pattern=Jc)}),e._zod.check=u=>{const s=u.value;if(r){if(!Number.isInteger(s)){u.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?u.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):u.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<n&&u.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>o&&u.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),ns=g("$ZodCheckBigIntFormat",(e,t)=>{X.init(e,t);const[r,i]=nc[t.format];e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{const o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),rs=g("$ZodCheckMaxSize",(e,t)=>{var r;X.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!nt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;n.size<=t.maximum||i.issues.push({origin:Kn(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),is=g("$ZodCheckMinSize",(e,t)=>{var r;X.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!nt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;n.size>=t.minimum||i.issues.push({origin:Kn(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),os=g("$ZodCheckSizeEquals",(e,t)=>{var r;X.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!nt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{const n=i.value,o=n.size;if(o===t.size)return;const a=o>t.size;i.issues.push({origin:Kn(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),as=g("$ZodCheckMaxLength",(e,t)=>{var r;X.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!nt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;if(n.length<=t.maximum)return;const a=Jn(n);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),us=g("$ZodCheckMinLength",(e,t)=>{var r;X.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!nt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;if(n.length>=t.minimum)return;const a=Jn(n);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),cs=g("$ZodCheckLengthEquals",(e,t)=>{var r;X.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!nt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{const n=i.value,o=n.length;if(o===t.length)return;const a=Jn(n),u=o>t.length;i.issues.push({origin:a,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Vt=g("$ZodCheckStringFormat",(e,t)=>{var r,i;X.init(e,t),e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),ss=g("$ZodCheckRegex",(e,t)=>{Vt.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ls=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Hc),Vt.init(e,t)}),ds=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Xc),Vt.init(e,t)}),fs=g("$ZodCheckIncludes",(e,t)=>{X.init(e,t);const r=je(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ms=g("$ZodCheckStartsWith",(e,t)=>{X.init(e,t);const r=new RegExp(`^${je(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),ps=g("$ZodCheckEndsWith",(e,t)=>{X.init(e,t);const r=new RegExp(`.*${je(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Va(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues))}const hs=g("$ZodCheckProperty",(e,t)=>{X.init(e,t),e._zod.check=r=>{const i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Va(n,r,t.property));Va(i,r,t.property)}}),gs=g("$ZodCheckMimeType",(e,t)=>{X.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),vs=g("$ZodCheckOverwrite",(e,t)=>{X.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class bs{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
|
|
26
26
|
`).filter(a=>a),n=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(const a of o)this.content.push(a)}compile(){const t=Function,r=this==null?void 0:this.args,n=[...((this==null?void 0:this.content)??[""]).map(o=>` ${o}`)];return new t(...r,n.join(`
|
|
27
|
-
`))}}const cs={major:4,minor:3,patch:6},C=p("$ZodType",(e,t)=>{var n;var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=cs;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const a of o._zod.onattach)a(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),(n=e._zod.deferred)==null||n.push(()=>{e._zod.run=e._zod.parse});else{const o=(u,s,c)=>{let l=qe(u),d;for(const f of s){if(f._zod.def.when){if(!f._zod.def.when(u))continue}else if(l)continue;const m=u.issues.length,g=f._zod.check(u);if(g instanceof Promise&&(c==null?void 0:c.async)===!1)throw new Xe;if(d||g instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await g,u.issues.length!==m&&(l||(l=qe(u,m)))});else{if(u.issues.length===m)continue;l||(l=qe(u,m))}}return d?d.then(()=>u):u},a=(u,s,c)=>{if(qe(u))return u.aborted=!0,u;const l=o(s,i,c);if(l instanceof Promise){if(c.async===!1)throw new Xe;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(u,s)=>{if(s.skipChecks)return e._zod.parse(u,s);if(s.direction==="backward"){const l=e._zod.parse({value:u.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(d=>a(d,u,s)):a(l,u,s)}const c=e._zod.parse(u,s);if(c instanceof Promise){if(s.async===!1)throw new Xe;return c.then(l=>o(l,i,s))}return o(c,i,s)}}M(e,"~standard",()=>({validate:o=>{var a;try{const u=ac(e,o);return u.success?{value:u.data}:{issues:(a=u.error)==null?void 0:a.issues}}catch{return uc(e,o).then(s=>{var c;return s.success?{value:s.data}:{issues:(c=s.error)==null?void 0:c.issues}})}},vendor:"zod",version:1}))}),Ft=p("$ZodString",(e,t)=>{var r;C.init(e,t),e._zod.pattern=[...((r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)??[]].pop()??Nc(e._zod.bag),e._zod.parse=(i,n)=>{if(t.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),W=p("$ZodStringFormat",(e,t)=>{Rt.init(e,t),Ft.init(e,t)}),ss=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=hc),W.init(e,t)}),ls=p("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ft(i))}else t.pattern??(t.pattern=ft());W.init(e,t)}),ds=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=gc),W.init(e,t)}),fs=p("$ZodURL",(e,t)=>{W.init(e,t),e._zod.check=r=>{try{const i=r.value.trim(),n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),ms=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=bc()),W.init(e,t)}),ps=p("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=mc),W.init(e,t)}),hs=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=cc),W.init(e,t)}),gs=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=sc),W.init(e,t)}),vs=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=lc),W.init(e,t)}),bs=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=dc),W.init(e,t)}),_s=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=fc),W.init(e,t)}),ys=p("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Dc(t)),W.init(e,t)}),$s=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ec),W.init(e,t)}),ws=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Uc(t)),W.init(e,t)}),Ss=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=pc),W.init(e,t)}),ks=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=_c),W.init(e,t),e._zod.bag.format="ipv4"}),Is=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=yc),W.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),xs=p("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=$c(t.delimiter)),W.init(e,t),e._zod.bag.format="mac"}),Ts=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=wc),W.init(e,t)}),zs=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Sc),W.init(e,t),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[n,o]=i;if(!o)throw new Error;const a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Ui(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Es=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=kc),W.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ui(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Os(e){if(!xi.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ui(r)}const Us=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=xi),W.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Os(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Ds=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Tc),W.init(e,t)});function Ns(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const n=JSON.parse(atob(i));return!("typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const js=p("$ZodJWT",(e,t)=>{W.init(e,t),e._zod.check=r=>{Ns(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Ps=p("$ZodCustomStringFormat",(e,t)=>{W.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Di=p("$ZodNumber",(e,t)=>{C.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ti,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),As=p("$ZodNumberFormat",(e,t)=>{Bc.init(e,t),Di.init(e,t)}),Ni=p("$ZodBoolean",(e,t)=>{C.init(e,t),e._zod.pattern=Ac,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),ji=p("$ZodBigInt",(e,t)=>{C.init(e,t),e._zod.pattern=jc,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Cs=p("$ZodBigIntFormat",(e,t)=>{Kc.init(e,t),ji.init(e,t)}),Ls=p("$ZodSymbol",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Zs=p("$ZodUndefined",(e,t)=>{C.init(e,t),e._zod.pattern=Lc,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Ms=p("$ZodNull",(e,t)=>{C.init(e,t),e._zod.pattern=Cc,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Rs=p("$ZodAny",(e,t)=>{C.init(e,t),e._zod.parse=r=>r}),Fs=p("$ZodUnknown",(e,t)=>{C.init(e,t),e._zod.parse=r=>r}),Vs=p("$ZodNever",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Bs=p("$ZodVoid",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Ks=p("$ZodDate",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function Ca(e,t,r){e.issues.length&&t.issues.push(...ke(r,e.issues)),t.value[r]=e.value}const Js=p("$ZodArray",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const o=[];for(let a=0;a<n.length;a++){const u=n[a],s=t.element._zod.run({value:u,issues:[]},i);s instanceof Promise?o.push(s.then(c=>Ca(c,r,a))):Ca(s,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function Tn(e,t,r,i,n){if(e.issues.length){if(n&&!(r in i))return;t.issues.push(...ke(r,e.issues))}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function Gs(e){var i,n,o,a;const t=Object.keys(e.shape);for(const u of t)if(!((a=(o=(n=(i=e.shape)==null?void 0:i[u])==null?void 0:n._zod)==null?void 0:o.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${u}": expected a Zod schema`);const r=Vu(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Ws(e,t,r,i,n,o){const a=[],u=n.keySet,s=n.catchall._zod,c=s.def.type,l=s.optout==="optional";for(const d in t){if(u.has(d))continue;if(c==="never"){a.push(d);continue}const f=s.run({value:t[d],issues:[]},i);f instanceof Promise?e.push(f.then(m=>Tn(m,r,d,t,l))):Tn(f,r,d,t,l)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}const Hs=p("$ZodObject",(e,t)=>{C.init(e,t);const r=Object.getOwnPropertyDescriptor(t,"shape");if(!(r!=null&&r.get)){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const s={...u};return Object.defineProperty(t,"shape",{value:s}),s}})}const i=jt(()=>Gs(t));M(e._zod,"propValues",()=>{const u=t.shape,s={};for(const c in u){const l=u[c]._zod;if(l.values){s[c]??(s[c]=new Set);for(const d of l.values)s[c].add(d)}}return s});const n=lt,o=t.catchall;let a;e._zod.parse=(u,s)=>{a??(a=i.value);const c=u.value;if(!n(c))return u.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),u;u.value={};const l=[],d=a.shape;for(const f of a.keys){const m=d[f],g=m._zod.optout==="optional",h=m._zod.run({value:c[f],issues:[]},s);h instanceof Promise?l.push(h.then(v=>Tn(v,u,f,c,g))):Tn(h,u,f,c,g)}return o?Ws(l,c,u,s,i.value,e):l.length?Promise.all(l).then(()=>u):u}}),qs=p("$ZodObjectJIT",(e,t)=>{Hs.init(e,t);const r=e._zod.parse,i=jt(()=>Gs(t)),n=f=>{var z;const m=new us(["shape","payload","ctx"]),g=i.value,h=L=>{const F=ti(L);return`shape[${F}]._zod.run({ value: input[${F}], issues: [] }, ctx)`};m.write("const input = payload.value;");const v=Object.create(null);let w=0;for(const L of g.keys)v[L]=`key_${w++}`;m.write("const newResult = {};");for(const L of g.keys){const F=v[L],j=ti(L),ee=f[L],te=((z=ee==null?void 0:ee._zod)==null?void 0:z.optout)==="optional";m.write(`const ${F} = ${h(L)};`),te?m.write(`
|
|
28
|
-
if (${
|
|
29
|
-
if (${
|
|
30
|
-
payload.issues = payload.issues.concat(${
|
|
27
|
+
`))}}const _s={major:4,minor:3,patch:6},L=g("$ZodType",(e,t)=>{var n;var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=_s;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const a of o._zod.onattach)a(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),(n=e._zod.deferred)==null||n.push(()=>{e._zod.run=e._zod.parse});else{const o=(u,s,c)=>{let l=Xe(u),d;for(const f of s){if(f._zod.def.when){if(!f._zod.def.when(u))continue}else if(l)continue;const m=u.issues.length,h=f._zod.check(u);if(h instanceof Promise&&(c==null?void 0:c.async)===!1)throw new Ye;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,u.issues.length!==m&&(l||(l=Xe(u,m)))});else{if(u.issues.length===m)continue;l||(l=Xe(u,m))}}return d?d.then(()=>u):u},a=(u,s,c)=>{if(Xe(u))return u.aborted=!0,u;const l=o(s,i,c);if(l instanceof Promise){if(c.async===!1)throw new Ye;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(u,s)=>{if(s.skipChecks)return e._zod.parse(u,s);if(s.direction==="backward"){const l=e._zod.parse({value:u.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(d=>a(d,u,s)):a(l,u,s)}const c=e._zod.parse(u,s);if(c instanceof Promise){if(s.async===!1)throw new Ye;return c.then(l=>o(l,i,s))}return o(c,i,s)}}Z(e,"~standard",()=>({validate:o=>{var a;try{const u=vc(e,o);return u.success?{value:u.data}:{issues:(a=u.error)==null?void 0:a.issues}}catch{return bc(e,o).then(s=>{var c;return s.success?{value:s.data}:{issues:(c=s.error)==null?void 0:c.issues}})}},vendor:"zod",version:1}))}),Bt=g("$ZodString",(e,t)=>{var r;L.init(e,t),e._zod.pattern=[...((r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)??[]].pop()??Bc(e._zod.bag),e._zod.parse=(i,n)=>{if(t.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),G=g("$ZodStringFormat",(e,t)=>{Vt.init(e,t),Bt.init(e,t)}),ys=g("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=xc),G.init(e,t)}),$s=g("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=pt(i))}else t.pattern??(t.pattern=pt());G.init(e,t)}),ws=g("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Tc),G.init(e,t)}),Ss=g("$ZodURL",(e,t)=>{G.init(e,t),e._zod.check=r=>{try{const i=r.value.trim(),n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),ks=g("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ec()),G.init(e,t)}),Is=g("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=kc),G.init(e,t)}),xs=g("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=_c),G.init(e,t)}),Ts=g("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=yc),G.init(e,t)}),zs=g("$ZodULID",(e,t)=>{t.pattern??(t.pattern=$c),G.init(e,t)}),Es=g("$ZodXID",(e,t)=>{t.pattern??(t.pattern=wc),G.init(e,t)}),Os=g("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Sc),G.init(e,t)}),Us=g("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Vc(t)),G.init(e,t)}),Ds=g("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Mc),G.init(e,t)}),Ns=g("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Fc(t)),G.init(e,t)}),js=g("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ic),G.init(e,t)}),Ps=g("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Oc),G.init(e,t),e._zod.bag.format="ipv4"}),As=g("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Uc),G.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Ls=g("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Dc(t.delimiter)),G.init(e,t),e._zod.bag.format="mac"}),Cs=g("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Nc),G.init(e,t)}),Zs=g("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=jc),G.init(e,t),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[n,o]=i;if(!o)throw new Error;const a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Ci(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ms=g("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Pc),G.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ci(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Rs(e){if(!Ni.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ci(r)}const Fs=g("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ni),G.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Rs(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Vs=g("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Cc),G.init(e,t)});function Bs(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const n=JSON.parse(atob(i));return!("typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const Ks=g("$ZodJWT",(e,t)=>{G.init(e,t),e._zod.check=r=>{Bs(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Js=g("$ZodCustomStringFormat",(e,t)=>{G.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Zi=g("$ZodNumber",(e,t)=>{L.init(e,t),e._zod.pattern=e._zod.bag.pattern??ji,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),Gs=g("$ZodNumberFormat",(e,t)=>{ts.init(e,t),Zi.init(e,t)}),Mi=g("$ZodBoolean",(e,t)=>{L.init(e,t),e._zod.pattern=Gc,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Ri=g("$ZodBigInt",(e,t)=>{L.init(e,t),e._zod.pattern=Kc,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),qs=g("$ZodBigIntFormat",(e,t)=>{ns.init(e,t),Ri.init(e,t)}),Ws=g("$ZodSymbol",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Hs=g("$ZodUndefined",(e,t)=>{L.init(e,t),e._zod.pattern=Wc,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Xs=g("$ZodNull",(e,t)=>{L.init(e,t),e._zod.pattern=qc,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Ys=g("$ZodAny",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),Qs=g("$ZodUnknown",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),el=g("$ZodNever",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),tl=g("$ZodVoid",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),nl=g("$ZodDate",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function Ba(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues)),t.value[r]=e.value}const rl=g("$ZodArray",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const o=[];for(let a=0;a<n.length;a++){const u=n[a],s=t.element._zod.run({value:u,issues:[]},i);s instanceof Promise?o.push(s.then(c=>Ba(c,r,a))):Ba(s,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function On(e,t,r,i,n){if(e.issues.length){if(n&&!(r in i))return;t.issues.push(...Ie(r,e.issues))}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function il(e){var i,n,o,a;const t=Object.keys(e.shape);for(const u of t)if(!((a=(o=(n=(i=e.shape)==null?void 0:i[u])==null?void 0:n._zod)==null?void 0:o.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${u}": expected a Zod schema`);const r=ec(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function ol(e,t,r,i,n,o){const a=[],u=n.keySet,s=n.catchall._zod,c=s.def.type,l=s.optout==="optional";for(const d in t){if(u.has(d))continue;if(c==="never"){a.push(d);continue}const f=s.run({value:t[d],issues:[]},i);f instanceof Promise?e.push(f.then(m=>On(m,r,d,t,l))):On(f,r,d,t,l)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}const al=g("$ZodObject",(e,t)=>{L.init(e,t);const r=Object.getOwnPropertyDescriptor(t,"shape");if(!(r!=null&&r.get)){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const s={...u};return Object.defineProperty(t,"shape",{value:s}),s}})}const i=At(()=>il(t));Z(e._zod,"propValues",()=>{const u=t.shape,s={};for(const c in u){const l=u[c]._zod;if(l.values){s[c]??(s[c]=new Set);for(const d of l.values)s[c].add(d)}}return s});const n=ft,o=t.catchall;let a;e._zod.parse=(u,s)=>{a??(a=i.value);const c=u.value;if(!n(c))return u.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),u;u.value={};const l=[],d=a.shape;for(const f of a.keys){const m=d[f],h=m._zod.optout==="optional",p=m._zod.run({value:c[f],issues:[]},s);p instanceof Promise?l.push(p.then(v=>On(v,u,f,c,h))):On(p,u,f,c,h)}return o?ol(l,c,u,s,i.value,e):l.length?Promise.all(l).then(()=>u):u}}),ul=g("$ZodObjectJIT",(e,t)=>{al.init(e,t);const r=e._zod.parse,i=At(()=>il(t)),n=f=>{var T;const m=new bs(["shape","payload","ctx"]),h=i.value,p=z=>{const M=ri(z);return`shape[${M}]._zod.run({ value: input[${M}], issues: [] }, ctx)`};m.write("const input = payload.value;");const v=Object.create(null);let w=0;for(const z of h.keys)v[z]=`key_${w++}`;m.write("const newResult = {};");for(const z of h.keys){const M=v[z],R=ri(z),Q=f[z],te=((T=Q==null?void 0:Q._zod)==null?void 0:T.optout)==="optional";m.write(`const ${M} = ${p(z)};`),te?m.write(`
|
|
28
|
+
if (${M}.issues.length) {
|
|
29
|
+
if (${R} in input) {
|
|
30
|
+
payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
|
|
31
31
|
...iss,
|
|
32
|
-
path: iss.path ? [${
|
|
32
|
+
path: iss.path ? [${R}, ...iss.path] : [${R}]
|
|
33
33
|
})));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
if (${
|
|
38
|
-
if (${
|
|
39
|
-
newResult[${
|
|
37
|
+
if (${M}.value === undefined) {
|
|
38
|
+
if (${R} in input) {
|
|
39
|
+
newResult[${R}] = undefined;
|
|
40
40
|
}
|
|
41
41
|
} else {
|
|
42
|
-
newResult[${
|
|
42
|
+
newResult[${R}] = ${M}.value;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
`):m.write(`
|
|
46
|
-
if (${
|
|
47
|
-
payload.issues = payload.issues.concat(${
|
|
46
|
+
if (${M}.issues.length) {
|
|
47
|
+
payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
|
|
48
48
|
...iss,
|
|
49
|
-
path: iss.path ? [${
|
|
49
|
+
path: iss.path ? [${R}, ...iss.path] : [${R}]
|
|
50
50
|
})));
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
if (${
|
|
54
|
-
if (${
|
|
55
|
-
newResult[${
|
|
53
|
+
if (${M}.value === undefined) {
|
|
54
|
+
if (${R} in input) {
|
|
55
|
+
newResult[${R}] = undefined;
|
|
56
56
|
}
|
|
57
57
|
} else {
|
|
58
|
-
newResult[${
|
|
58
|
+
newResult[${R}] = ${M}.value;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
`)}m.write("payload.value = newResult;"),m.write("return payload;");const T=m.compile();return(L,F)=>T(f,L,F)};let o;const a=lt,u=!kn.jitless,c=u&&Ru.value,l=t.catchall;let d;e._zod.parse=(f,m)=>{d??(d=i.value);const g=f.value;return a(g)?u&&c&&(m==null?void 0:m.async)===!1&&m.jitless!==!0?(o||(o=n(t.shape)),f=o(f,m),l?Ws([],g,f,m,d,e):f):r(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function La(e,t,r,i){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const n=e.filter(o=>!qe(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>ye(a,i,se())))}),t)}const Bn=p("$ZodUnion",(e,t)=>{C.init(e,t),M(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),M(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),M(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),M(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>Mn(o.source)).join("|")})$`)}});const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let a=!1;const u=[];for(const s of t.options){const c=s._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)u.push(c),a=!0;else{if(c.issues.length===0)return c;u.push(c)}}return a?Promise.all(u).then(s=>La(s,n,e,o)):La(u,n,e,o)}});function Za(e,t,r,i){const n=e.filter(o=>o.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>ye(a,i,se())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}const Xs=p("$ZodXor",(e,t)=>{Bn.init(e,t),t.inclusive=!1;const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let a=!1;const u=[];for(const s of t.options){const c=s._zod.run({value:n.value,issues:[]},o);c instanceof Promise?(u.push(c),a=!0):u.push(c)}return a?Promise.all(u).then(s=>Za(s,n,e,o)):Za(u,n,e,o)}}),Ys=p("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Bn.init(e,t);const r=e._zod.parse;M(e._zod,"propValues",()=>{const n={};for(const o of t.options){const a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[u,s]of Object.entries(a)){n[u]||(n[u]=new Set);for(const c of s)n[u].add(c)}}return n});const i=jt(()=>{var a;const n=t.options,o=new Map;for(const u of n){const s=(a=u._zod.propValues)==null?void 0:a[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(const c of s){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,u)}}return o});e._zod.parse=(n,o)=>{const a=n.value;if(!lt(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;const u=i.value.get(a==null?void 0:a[t.discriminator]);return u?u._zod.run(n,o):t.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),n)}}),Qs=p("$ZodIntersection",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{const n=r.value,o=t.left._zod.run({value:n,issues:[]},i),a=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([s,c])=>Ma(r,s,c)):Ma(r,o,a)}});function ii(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ye(e)&&Ye(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(const o of i){const a=ii(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const n=e[i],o=t[i],a=ii(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Ma(e,t,r){const i=new Map;let n;for(const u of t.issues)if(u.code==="unrecognized_keys"){n??(n=u);for(const s of u.keys)i.has(s)||i.set(s,{}),i.get(s).l=!0}else e.issues.push(u);for(const u of r.issues)if(u.code==="unrecognized_keys")for(const s of u.keys)i.has(s)||i.set(s,{}),i.get(s).r=!0;else e.issues.push(u);const o=[...i].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(o.length&&n&&e.issues.push({...n,keys:o}),qe(e))return e;const a=ii(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Pi=p("$ZodTuple",(e,t)=>{C.init(e,t);const r=t.items;e._zod.parse=(i,n)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const a=[],u=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),s=u===-1?0:r.length-u;if(!t.rest){const l=o.length>r.length,d=o.length<s-1;if(l||d)return i.issues.push({...l?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:e,origin:"array"}),i}let c=-1;for(const l of r){if(c++,c>=o.length&&c>=s)continue;const d=l._zod.run({value:o[c],issues:[]},n);d instanceof Promise?a.push(d.then(f=>un(f,i,c))):un(d,i,c)}if(t.rest){const l=o.slice(r.length);for(const d of l){c++;const f=t.rest._zod.run({value:d,issues:[]},n);f instanceof Promise?a.push(f.then(m=>un(m,i,c))):un(f,i,c)}}return a.length?Promise.all(a).then(()=>i):i}});function un(e,t,r){e.issues.length&&t.issues.push(...ke(r,e.issues)),t.value[r]=e.value}const el=p("$ZodRecord",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Ye(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;const o=[],a=t.keyType._zod.values;if(a){r.value={};const u=new Set;for(const c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){u.add(typeof c=="number"?c.toString():c);const l=t.valueType._zod.run({value:n[c],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...ke(c,d.issues)),r.value[c]=d.value})):(l.issues.length&&r.issues.push(...ke(c,l.issues)),r.value[c]=l.value)}let s;for(const c in n)u.has(c)||(s=s??[],s.push(c));s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:s})}else{r.value={};for(const u of Reflect.ownKeys(n)){if(u==="__proto__")continue;let s=t.keyType._zod.run({value:u,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&Ti.test(u)&&s.issues.length){const d=t.keyType._zod.run({value:Number(u),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(s=d)}if(s.issues.length){t.mode==="loose"?r.value[u]=n[u]:r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(d=>ye(d,i,se())),input:u,path:[u],inst:e});continue}const l=t.valueType._zod.run({value:n[u],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...ke(u,d.issues)),r.value[s.value]=d.value})):(l.issues.length&&r.issues.push(...ke(u,l.issues)),r.value[s.value]=l.value)}}return o.length?Promise.all(o).then(()=>r):r}}),tl=p("$ZodMap",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;const o=[];r.value=new Map;for(const[a,u]of n){const s=t.keyType._zod.run({value:a,issues:[]},i),c=t.valueType._zod.run({value:u,issues:[]},i);s instanceof Promise||c instanceof Promise?o.push(Promise.all([s,c]).then(([l,d])=>{Ra(l,d,r,a,n,e,i)})):Ra(s,c,r,a,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function Ra(e,t,r,i,n,o,a){e.issues.length&&(xn.has(typeof i)?r.issues.push(...ke(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(u=>ye(u,a,se()))})),t.issues.length&&(xn.has(typeof i)?r.issues.push(...ke(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(u=>ye(u,a,se()))})),r.value.set(e.value,t.value)}const nl=p("$ZodSet",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;const o=[];r.value=new Set;for(const a of n){const u=t.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(s=>Fa(s,r))):Fa(u,r)}return o.length?Promise.all(o).then(()=>r):r}});function Fa(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const rl=p("$ZodEnum",(e,t)=>{C.init(e,t);const r=mi(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>xn.has(typeof n)).map(n=>typeof n=="string"?Pe(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{const a=n.value;return i.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),il=p("$ZodLiteral",(e,t)=>{if(C.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Pe(i):i?Pe(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,n)=>{const o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),ol=p("$ZodFile",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),al=p("$ZodTransform",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Zn(e.constructor.name);const n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new Xe;return r.value=n,r}});function Va(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Ai=p("$ZodOptional",(e,t)=>{C.init(e,t),e._zod.optin="optional",e._zod.optout="optional",M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),M(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Mn(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Va(o,r.value)):Va(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),ul=p("$ZodExactOptional",(e,t)=>{Ai.init(e,t),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),cl=p("$ZodNullable",(e,t)=>{C.init(e,t),M(e._zod,"optin",()=>t.innerType._zod.optin),M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Mn(r.source)}|null)$`):void 0}),M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),sl=p("$ZodDefault",(e,t)=>{C.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ba(o,t)):Ba(n,t)}});function Ba(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const ll=p("$ZodPrefault",(e,t)=>{C.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),dl=p("$ZodNonOptional",(e,t)=>{C.init(e,t),M(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ka(o,e)):Ka(n,e)}});function Ka(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const fl=p("$ZodSuccess",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Zn("ZodSuccess");const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),ml=p("$ZodCatch",(e,t)=>{C.init(e,t),M(e._zod,"optin",()=>t.innerType._zod.optin),M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(a=>ye(a,i,se()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>ye(o,i,se()))},input:r.value}),r.issues=[]),r)}}),pl=p("$ZodNaN",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),hl=p("$ZodPipe",(e,t)=>{C.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>cn(a,t.in,i)):cn(o,t.in,i)}const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>cn(o,t.out,i)):cn(n,t.out,i)}});function cn(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const Ci=p("$ZodCodec",(e,t)=>{C.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){const o=t.in._zod.run(r,i);return o instanceof Promise?o.then(a=>sn(a,t,i)):sn(o,t,i)}else{const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>sn(a,t,i)):sn(o,t,i)}}});function sn(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>ln(e,o,t.out,r)):ln(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>ln(e,o,t.in,r)):ln(e,n,t.in,r)}}function ln(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}const gl=p("$ZodReadonly",(e,t)=>{C.init(e,t),M(e._zod,"propValues",()=>t.innerType._zod.propValues),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"optin",()=>{var r,i;return(i=(r=t.innerType)==null?void 0:r._zod)==null?void 0:i.optin}),M(e._zod,"optout",()=>{var r,i;return(i=(r=t.innerType)==null?void 0:r._zod)==null?void 0:i.optout}),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Ja):Ja(n)}});function Ja(e){return e.value=Object.freeze(e.value),e}const vl=p("$ZodTemplateLiteral",(e,t)=>{C.init(e,t);const r=[];for(const i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const o=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,a))}else if(i===null||Fu.has(typeof i))r.push(Pe(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),bl=p("$ZodFunction",(e,t)=>(C.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){const n=e._def.input?ni(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?ni(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){const n=e._def.input?await ri(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await ri(e._def.output,o):o}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Pi({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),_l=p("$ZodPromise",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),yl=p("$ZodLazy",(e,t)=>{C.init(e,t),M(e._zod,"innerType",()=>t.getter()),M(e._zod,"pattern",()=>{var r,i;return(i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.pattern}),M(e._zod,"propValues",()=>{var r,i;return(i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.propValues}),M(e._zod,"optin",()=>{var r,i;return((i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.optin)??void 0}),M(e._zod,"optout",()=>{var r,i;return((i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.optout)??void 0}),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),$l=p("$ZodCustom",(e,t)=>{q.init(e,t),C.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>Ga(o,r,i,e));Ga(n,r,i,e)}});function Ga(e,t,r,i){if(!e){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(dt(n))}}const yg=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(n){return e[n]??null}const r={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${n.expected}، ولكن تم إدخال ${u}`:`مدخلات غير مقبولة: يفترض إدخال ${o}، ولكن تم إدخال ${u}`}case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${U(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()} ${a.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()} ${a.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${r[o.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${y(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function $g(){return{localeError:yg()}}const wg=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Yanlış dəyər: gözlənilən instanceof ${n.expected}, daxil olan ${u}`:`Yanlış dəyər: gözlənilən ${o}, daxil olan ${u}`}case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${U(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function Sg(){return{localeError:wg()}}function Wa(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const kg=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(n){return e[n]??null}const r={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Няправільны ўвод: чакаўся instanceof ${n.expected}, атрымана ${u}`:`Няправільны ўвод: чакаўся ${o}, атрымана ${u}`}case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${U(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=Wa(u,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${a.verb} ${o}${n.maximum.toString()} ${s}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const u=Number(n.minimum),s=Wa(u,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${a.verb} ${o}${n.minimum.toString()} ${s}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${r[o.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${y(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function Ig(){return{localeError:kg()}}const xg=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(n){return e[n]??null}const r={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},i={nan:"NaN",number:"число",array:"масив"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Невалиден вход: очакван instanceof ${n.expected}, получен ${u}`:`Невалиден вход: очакван ${o}, получен ${u}`}case"invalid_value":return n.values.length===1?`Невалиден вход: очакван ${U(n.values[0])}`:`Невалидна опция: очаквано едно от ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Твърде голямо: очаква се ${n.origin??"стойност"} да съдържа ${o}${n.maximum.toString()} ${a.unit??"елемента"}`:`Твърде голямо: очаква се ${n.origin??"стойност"} да бъде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Твърде малко: очаква се ${n.origin} да съдържа ${o}${n.minimum.toString()} ${a.unit}`:`Твърде малко: очаква се ${n.origin} да бъде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;if(o.format==="starts_with")return`Невалиден низ: трябва да започва с "${o.prefix}"`;if(o.format==="ends_with")return`Невалиден низ: трябва да завършва с "${o.suffix}"`;if(o.format==="includes")return`Невалиден низ: трябва да включва "${o.includes}"`;if(o.format==="regex")return`Невалиден низ: трябва да съвпада с ${o.pattern}`;let a="Невалиден";return o.format==="emoji"&&(a="Невалидно"),o.format==="datetime"&&(a="Невалидно"),o.format==="date"&&(a="Невалидна"),o.format==="time"&&(a="Невалидно"),o.format==="duration"&&(a="Невалидна"),`${a} ${r[o.format]??n.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${n.divisor}`;case"unrecognized_keys":return`Неразпознат${n.keys.length>1?"и":""} ключ${n.keys.length>1?"ове":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${n.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${n.origin}`;default:return"Невалиден вход"}}};function Tg(){return{localeError:xg()}}const zg=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus invàlid: s'esperava instanceof ${n.expected}, s'ha rebut ${u}`:`Tipus invàlid: s'esperava ${o}, s'ha rebut ${u}`}case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${U(n.values[0])}`:`Opció invàlida: s'esperava una de ${y(n.values," o ")}`;case"too_big":{const o=n.inclusive?"com a màxim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"com a mínim":"més de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingués ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};function Eg(){return{localeError:zg()}}const Og=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(n){return e[n]??null}const r={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatný vstup: očekáváno instanceof ${n.expected}, obdrženo ${u}`:`Neplatný vstup: očekáváno ${o}, obdrženo ${u}`}case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${U(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${o}${n.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${o}${n.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${y(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};function Ug(){return{localeError:Og()}}const Dg=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${u}`:`Ugyldigt input: forventede ${o}, fik ${u}`}case"invalid_value":return n.values.length===1?`Ugyldig værdi: forventede ${U(n.values[0])}`:`Ugyldigt valg: forventede en af følgende ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),u=i[n.origin]??n.origin;return a?`For stor: forventede ${u??"value"} ${a.verb} ${o} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),u=i[n.origin]??n.origin;return a?`For lille: forventede ${u} ${a.verb} ${o} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${u} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche mønsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${n.origin}`;default:return"Ugyldigt input"}}};function Ng(){return{localeError:Dg()}}const jg=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}const r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ungültige Eingabe: erwartet instanceof ${n.expected}, erhalten ${u}`:`Ungültige Eingabe: erwartet ${o}, erhalten ${u}`}case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${U(n.values[0])}`:`Ungültige Option: erwartet eine von ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};function Pg(){return{localeError:jg()}}const Ag=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return`Invalid input: expected ${o}, received ${u}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${U(n.values[0])}`:`Invalid option: expected one of ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function wl(){return{localeError:Ag()}}const Cg=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendiĝis instanceof ${n.expected}, riceviĝis ${u}`:`Nevalida enigo: atendiĝis ${o}, riceviĝis ${u}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendiĝis ${U(n.values[0])}`:`Nevalida opcio: atendiĝis unu el ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendiĝis ke ${n.origin} havu ${o}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendiĝis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} ŝlosilo${n.keys.length>1?"j":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function Lg(){return{localeError:Cg()}}const Zg=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inválida: se esperaba instanceof ${n.expected}, recibido ${u}`:`Entrada inválida: se esperaba ${o}, recibido ${u}`}case"invalid_value":return n.values.length===1?`Entrada inválida: se esperaba ${U(n.values[0])}`:`Opción inválida: se esperaba una de ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),u=i[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),u=i[n.origin]??n.origin;return a?`Demasiado pequeño: se esperaba que ${u} tuviera ${o}${n.minimum.toString()} ${a.unit}`:`Demasiado pequeño: se esperaba que ${u} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cadena inválida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inválida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inválida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${o.pattern}`:`Inválido ${r[o.format]??n.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[n.origin]??n.origin}`;default:return"Entrada inválida"}}};function Mg(){return{localeError:Zg()}}const Rg=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(n){return e[n]??null}const r={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`ورودی نامعتبر: میبایست instanceof ${n.expected} میبود، ${u} دریافت شد`:`ورودی نامعتبر: میبایست ${o} میبود، ${u} دریافت شد`}case"invalid_value":return n.values.length===1?`ورودی نامعتبر: میبایست ${U(n.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${y(n.values,"|")} میبود`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} باشد`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} باشد`}case"invalid_format":{const o=n;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${r[o.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${y(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function Fg(){return{localeError:Rg()}}const Vg=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(n){return e[n]??null}const r={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${u}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${u}`}case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${U(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${y(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function Bg(){return{localeError:Vg()}}const Kg=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrée invalide : instanceof ${n.expected} attendu, ${u} reçu`:`Entrée invalide : ${o} attendu, ${u} reçu`}case"invalid_value":return n.values.length===1?`Entrée invalide : ${U(n.values[0])} attendu`:`Option invalide : une valeur parmi ${y(n.values,"|")} attendue`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit être ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${y(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function Jg(){return{localeError:Kg()}}const Gg=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrée invalide : attendu instanceof ${n.expected}, reçu ${u}`:`Entrée invalide : attendu ${o}, reçu ${u}`}case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${U(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"≤":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"≥":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${y(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function Wg(){return{localeError:Gg()}}const Hg=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},r=c=>c?e[c]:void 0,i=c=>{const l=r(c);return l?l.label:c??e.unknown.label},n=c=>`ה${i(c)}`,o=c=>{const l=r(c);return((l==null?void 0:l.gender)??"m")==="f"?"צריכה להיות":"צריך להיות"},a=c=>c?t[c]??null:null,u={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},s={nan:"NaN"};return c=>{var l;switch(c.code){case"invalid_type":{const d=c.expected,f=s[d??""]??i(d),m=D(c.input),g=s[m]??((l=e[m])==null?void 0:l.label)??m;return/^[A-Z]/.test(c.expected)?`קלט לא תקין: צריך להיות instanceof ${c.expected}, התקבל ${g}`:`קלט לא תקין: צריך להיות ${f}, התקבל ${g}`}case"invalid_value":{if(c.values.length===1)return`ערך לא תקין: הערך חייב להיות ${U(c.values[0])}`;const d=c.values.map(g=>U(g));if(c.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${d[0]} או ${d[1]}`;const f=d[d.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${d.slice(0,-1).join(", ")} או ${f}`}case"too_big":{const d=a(c.origin),f=n(c.origin??"value");if(c.origin==="string")return`${(d==null?void 0:d.longLabel)??"ארוך"} מדי: ${f} צריכה להכיל ${c.maximum.toString()} ${(d==null?void 0:d.unit)??""} ${c.inclusive?"או פחות":"לכל היותר"}`.trim();if(c.origin==="number"){const h=c.inclusive?`קטן או שווה ל-${c.maximum}`:`קטן מ-${c.maximum}`;return`גדול מדי: ${f} צריך להיות ${h}`}if(c.origin==="array"||c.origin==="set"){const h=c.origin==="set"?"צריכה":"צריך",v=c.inclusive?`${c.maximum} ${(d==null?void 0:d.unit)??""} או פחות`:`פחות מ-${c.maximum} ${(d==null?void 0:d.unit)??""}`;return`גדול מדי: ${f} ${h} להכיל ${v}`.trim()}const m=c.inclusive?"<=":"<",g=o(c.origin??"value");return d!=null&&d.unit?`${d.longLabel} מדי: ${f} ${g} ${m}${c.maximum.toString()} ${d.unit}`:`${(d==null?void 0:d.longLabel)??"גדול"} מדי: ${f} ${g} ${m}${c.maximum.toString()}`}case"too_small":{const d=a(c.origin),f=n(c.origin??"value");if(c.origin==="string")return`${(d==null?void 0:d.shortLabel)??"קצר"} מדי: ${f} צריכה להכיל ${c.minimum.toString()} ${(d==null?void 0:d.unit)??""} ${c.inclusive?"או יותר":"לפחות"}`.trim();if(c.origin==="number"){const h=c.inclusive?`גדול או שווה ל-${c.minimum}`:`גדול מ-${c.minimum}`;return`קטן מדי: ${f} צריך להיות ${h}`}if(c.origin==="array"||c.origin==="set"){const h=c.origin==="set"?"צריכה":"צריך";if(c.minimum===1&&c.inclusive){const w=(c.origin==="set","לפחות פריט אחד");return`קטן מדי: ${f} ${h} להכיל ${w}`}const v=c.inclusive?`${c.minimum} ${(d==null?void 0:d.unit)??""} או יותר`:`יותר מ-${c.minimum} ${(d==null?void 0:d.unit)??""}`;return`קטן מדי: ${f} ${h} להכיל ${v}`.trim()}const m=c.inclusive?">=":">",g=o(c.origin??"value");return d!=null&&d.unit?`${d.shortLabel} מדי: ${f} ${g} ${m}${c.minimum.toString()} ${d.unit}`:`${(d==null?void 0:d.shortLabel)??"קטן"} מדי: ${f} ${g} ${m}${c.minimum.toString()}`}case"invalid_format":{const d=c;if(d.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${d.prefix}"`;if(d.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${d.suffix}"`;if(d.format==="includes")return`המחרוזת חייבת לכלול "${d.includes}"`;if(d.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${d.pattern}`;const f=u[d.format],m=(f==null?void 0:f.label)??d.format,h=((f==null?void 0:f.gender)??"m")==="f"?"תקינה":"תקין";return`${m} לא ${h}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${c.divisor}`;case"unrecognized_keys":return`מפתח${c.keys.length>1?"ות":""} לא מזוה${c.keys.length>1?"ים":"ה"}: ${y(c.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n(c.origin??"array")}`;default:return"קלט לא תקין"}}};function qg(){return{localeError:Hg()}}const Xg=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"szám",array:"tömb"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Érvénytelen bemenet: a várt érték instanceof ${n.expected}, a kapott érték ${u}`:`Érvénytelen bemenet: a várt érték ${o}, a kapott érték ${u}`}case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${U(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};function Yg(){return{localeError:Xg()}}function Ha(e,t,r){return Math.abs(e)===1?t:r}function it(e){if(!e)return"";const t=["ա","ե","ը","ի","ո","ու","օ"],r=e[e.length-1];return e+(t.includes(r)?"ն":"ը")}const Qg=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(n){return e[n]??null}const r={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${n.expected}, ստացվել է ${u}`:`Սխալ մուտքագրում․ սպասվում էր ${o}, ստացվել է ${u}`}case"invalid_value":return n.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${U(n.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=Ha(u,a.unit.one,a.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${it(n.origin??"արժեք")} կունենա ${o}${n.maximum.toString()} ${s}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${it(n.origin??"արժեք")} լինի ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const u=Number(n.minimum),s=Ha(u,a.unit.one,a.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${it(n.origin)} կունենա ${o}${n.minimum.toString()} ${s}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${it(n.origin)} լինի ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Սխալ տող․ պետք է սկսվի "${o.prefix}"-ով`:o.format==="ends_with"?`Սխալ տող․ պետք է ավարտվի "${o.suffix}"-ով`:o.format==="includes"?`Սխալ տող․ պետք է պարունակի "${o.includes}"`:o.format==="regex"?`Սխալ տող․ պետք է համապատասխանի ${o.pattern} ձևաչափին`:`Սխալ ${r[o.format]??n.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${n.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${n.keys.length>1?"ներ":""}. ${y(n.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${it(n.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${it(n.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function ev(){return{localeError:Qg()}}const tv=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${u}`:`Input tidak valid: diharapkan ${o}, diterima ${u}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${U(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function nv(){return{localeError:tv()}}const rv=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(n){return e[n]??null}const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: Þú slóst inn ${u} þar sem á að vera instanceof ${n.expected}`:`Rangt gildi: Þú slóst inn ${u} þar sem á að vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert ráð fyrir ${U(n.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} sé ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Of lítið: gert er ráð fyrir að ${n.origin} hafi ${o}${n.minimum.toString()} ${a.unit}`:`Of lítið: gert er ráð fyrir að ${n.origin} sé ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ógildur strengur: verður að byrja á "${o.prefix}"`:o.format==="ends_with"?`Ógildur strengur: verður að enda á "${o.suffix}"`:o.format==="includes"?`Ógildur strengur: verður að innihalda "${o.includes}"`:o.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`Óþekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${y(n.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${n.origin}`;default:return"Rangt gildi"}}};function iv(){return{localeError:rv()}}const ov=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${u}`:`Input non valido: atteso ${o}, ricevuto ${u}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${U(n.values[0])}`:`Opzione non valida: atteso uno tra ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${y(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function av(){return{localeError:ov()}}const uv=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(n){return e[n]??null}const r={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`無効な入力: instanceof ${n.expected}が期待されましたが、${u}が入力されました`:`無効な入力: ${o}が期待されましたが、${u}が入力されました`}case"invalid_value":return n.values.length===1?`無効な入力: ${U(n.values[0])}が期待されました`:`無効な選択: ${y(n.values,"、")}のいずれかである必要があります`;case"too_big":{const o=n.inclusive?"以下である":"より小さい",a=t(n.origin);return a?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${a.unit??"要素"}${o}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${o}必要があります`}case"too_small":{const o=n.inclusive?"以上である":"より大きい",a=t(n.origin);return a?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${a.unit}${o}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${r[o.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${y(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function cv(){return{localeError:uv()}}const sv=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(n){return e[n]??null}const r={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${n.expected}, მიღებული ${u}`:`არასწორი შეყვანა: მოსალოდნელი ${o}, მიღებული ${u}`}case"invalid_value":return n.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${U(n.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${y(n.values,"|")}-დან`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} იყოს ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`ზედმეტად პატარა: მოსალოდნელი ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${n.origin} იყოს ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${o.prefix}"-ით`:o.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${o.suffix}"-ით`:o.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${o.includes}"-ს`:o.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${o.pattern}`:`არასწორი ${r[o.format]??n.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${n.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${n.keys.length>1?"ები":"ი"}: ${y(n.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${n.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${n.origin}-ში`;default:return"არასწორი შეყვანა"}}};function lv(){return{localeError:sv()}}const dv=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(n){return e[n]??null}const r={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${n.expected} ប៉ុន្តែទទួលបាន ${u}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${o} ប៉ុន្តែទទួលបាន ${u}`}case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${U(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()} ${a.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${r[o.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${y(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Sl(){return{localeError:dv()}}function fv(){return Sl()}const mv=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`잘못된 입력: 예상 타입은 instanceof ${n.expected}, 받은 타입은 ${u}입니다`:`잘못된 입력: 예상 타입은 ${o}, 받은 타입은 ${u}입니다`}case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${U(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${y(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",a=o==="미만"?"이어야 합니다":"여야 합니다",u=t(n.origin),s=(u==null?void 0:u.unit)??"요소";return u?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${s} ${o}${a}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${a}`}case"too_small":{const o=n.inclusive?"이상":"초과",a=o==="이상"?"이어야 합니다":"여야 합니다",u=t(n.origin),s=(u==null?void 0:u.unit)??"요소";return u?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${s} ${o}${a}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${o}${a}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${r[o.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${y(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function pv(){return{localeError:mv()}}const wt=e=>e.charAt(0).toUpperCase()+e.slice(1);function qa(e){const t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}const hv=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(n,o,a,u){const s=e[n]??null;return s===null?s:{unit:s.unit[o],verb:s.verb[u][a?"inclusive":"notInclusive"]}}const r={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},i={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${u}, o tikėtasi - instanceof ${n.expected}`:`Gautas tipas ${u}, o tikėtasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo būti ${U(n.values[0])}`:`Privalo būti vienas iš ${y(n.values,"|")} pasirinkimų`;case"too_big":{const o=i[n.origin]??n.origin,a=t(n.origin,qa(Number(n.maximum)),n.inclusive??!1,"smaller");if(a!=null&&a.verb)return`${wt(o??n.origin??"reikšmė")} ${a.verb} ${n.maximum.toString()} ${a.unit??"elementų"}`;const u=n.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${wt(o??n.origin??"reikšmė")} turi būti ${u} ${n.maximum.toString()} ${a==null?void 0:a.unit}`}case"too_small":{const o=i[n.origin]??n.origin,a=t(n.origin,qa(Number(n.minimum)),n.inclusive??!1,"bigger");if(a!=null&&a.verb)return`${wt(o??n.origin??"reikšmė")} ${a.verb} ${n.minimum.toString()} ${a.unit??"elementų"}`;const u=n.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${wt(o??n.origin??"reikšmė")} turi būti ${u} ${n.minimum.toString()} ${a==null?void 0:a.unit}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Eilutė privalo prasidėti "${o.prefix}"`:o.format==="ends_with"?`Eilutė privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilutė privalo įtraukti "${o.includes}"`:o.format==="regex"?`Eilutė privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skaičius privalo būti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${y(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const o=i[n.origin]??n.origin;return`${wt(o??n.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function gv(){return{localeError:hv()}}const vv=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(n){return e[n]??null}const r={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},i={nan:"NaN",number:"број",array:"низа"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Грешен внес: се очекува instanceof ${n.expected}, примено ${u}`:`Грешен внес: се очекува ${o}, примено ${u}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${U(n.values[0])}`:`Грешана опција: се очекува една ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${o}${n.maximum.toString()} ${a.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Премногу мал: се очекува ${n.origin} да има ${o}${n.minimum.toString()} ${a.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${y(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function bv(){return{localeError:vv()}}const _v=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${u}`:`Input tidak sah: dijangka ${o}, diterima ${u}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${U(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${y(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function yv(){return{localeError:_v()}}const $v=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}const r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${u}`:`Ongeldige invoer: verwacht ${o}, ontving ${u}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${U(n.values[0])}`:`Ongeldige optie: verwacht één van ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),u=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${u}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${u}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),u=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${u}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${u}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function wv(){return{localeError:$v()}}const Sv=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${u}`:`Ugyldig input: forventet ${o}, fikk ${u}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${U(n.values[0])}`:`Ugyldig valg: forventet en av ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function kv(){return{localeError:Sv()}}const Iv=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(n){return e[n]??null}const r={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Fâsit giren: umulan instanceof ${n.expected}, alınan ${u}`:`Fâsit giren: umulan ${o}, alınan ${u}`}case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${U(n.values[0])}`:`Fâsit tercih: mûteberler ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmalıydı.`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${r[o.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function xv(){return{localeError:Iv()}}const Tv=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(n){return e[n]??null}const r={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`ناسم ورودي: باید instanceof ${n.expected} وای, مګر ${u} ترلاسه شو`:`ناسم ورودي: باید ${o} وای, مګر ${u} ترلاسه شو`}case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${U(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${y(n.values,"|")} څخه وای`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} وي`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} وي`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${r[o.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${y(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function zv(){return{localeError:Tv()}}const Ev=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(n){return e[n]??null}const r={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${n.expected}, otrzymano ${u}`:`Nieprawidłowe dane wejściowe: oczekiwano ${o}, otrzymano ${u}`}case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${U(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Ov(){return{localeError:Ev()}}const Uv=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"número",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inválido: esperado instanceof ${n.expected}, recebido ${u}`:`Tipo inválido: esperado ${o}, recebido ${u}`}case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${U(n.values[0])}`:`Opção inválida: esperada uma das ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${r[o.format]??n.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Chave inválida em ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${n.origin}`;default:return"Campo inválido"}}};function Dv(){return{localeError:Uv()}}function Xa(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const Nv=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(n){return e[n]??null}const r={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Неверный ввод: ожидалось instanceof ${n.expected}, получено ${u}`:`Неверный ввод: ожидалось ${o}, получено ${u}`}case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${U(n.values[0])}`:`Неверный вариант: ожидалось одно из ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=Xa(u,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${s}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const u=Number(n.minimum),s=Xa(u,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${s}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${r[o.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function jv(){return{localeError:Nv()}}const Pv=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"število",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pričakovano instanceof ${n.expected}, prejeto ${u}`:`Neveljaven vnos: pričakovano ${o}, prejeto ${u}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${U(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pričakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${y(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function Av(){return{localeError:Pv()}}const Cv=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(n){return e[n]??null}const r={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: förväntat instanceof ${n.expected}, fick ${u}`:`Ogiltig inmatning: förväntat ${o}, fick ${u}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${U(n.values[0])}`:`Ogiltigt val: förväntade en av ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};function Lv(){return{localeError:Cv()}}const Zv=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(n){return e[n]??null}const r={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${n.expected}, பெறப்பட்டது ${u}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${o}, பெறப்பட்டது ${u}`}case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${U(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${y(n.values,"|")} இல் ஒன்று`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=n;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${r[o.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function Mv(){return{localeError:Zv()}}const Rv=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(n){return e[n]??null}const r={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${n.expected} แต่ได้รับ ${u}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${o} แต่ได้รับ ${u}`}case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${U(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"ไม่เกิน":"น้อยกว่า",a=t(n.origin);return a?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()} ${a.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"อย่างน้อย":"มากกว่า",a=t(n.origin);return a?`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()} ${a.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${r[o.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${y(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Fv(){return{localeError:Rv()}}const Vv=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(n){return e[n]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Geçersiz değer: beklenen instanceof ${n.expected}, alınan ${u}`:`Geçersiz değer: beklenen ${o}, alınan ${u}`}case"invalid_value":return n.values.length===1?`Geçersiz değer: beklenen ${U(n.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Çok büyük: beklenen ${n.origin??"değer"} ${o}${n.maximum.toString()} ${a.unit??"öğe"}`:`Çok büyük: beklenen ${n.origin??"değer"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Çok küçük: beklenen ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`Çok küçük: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Geçersiz metin: "${o.prefix}" ile başlamalı`:o.format==="ends_with"?`Geçersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Geçersiz metin: "${o.includes}" içermeli`:o.format==="regex"?`Geçersiz metin: ${o.pattern} desenine uymalı`:`Geçersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Geçersiz sayı: ${n.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${n.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Bv(){return{localeError:Vv()}}const Kv=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(n){return e[n]??null}const r={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Неправильні вхідні дані: очікується instanceof ${n.expected}, отримано ${u}`:`Неправильні вхідні дані: очікується ${o}, отримано ${u}`}case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${U(n.values[0])}`:`Неправильна опція: очікується одне з ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Занадто велике: очікується, що ${n.origin??"значення"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Занадто мале: очікується, що ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${r[o.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function kl(){return{localeError:Kv()}}function Jv(){return kl()}const Gv=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(n){return e[n]??null}const r={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`غلط ان پٹ: instanceof ${n.expected} متوقع تھا، ${u} موصول ہوا`:`غلط ان پٹ: ${o} متوقع تھا، ${u} موصول ہوا`}case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${U(n.values[0])} متوقع تھا`:`غلط آپشن: ${y(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`بہت بڑا: ${n.origin??"ویلیو"} کے ${o}${n.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${o}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`بہت چھوٹا: ${n.origin} کے ${o}${n.minimum.toString()} ${a.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${o}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=n;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${r[o.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${y(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function Wv(){return{localeError:Gv()}}const Hv=()=>{const e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function t(n){return e[n]??null}const r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${u}`:`Noto‘g‘ri kirish: kutilgan ${o}, qabul qilingan ${u}`}case"invalid_value":return n.values.length===1?`Noto‘g‘ri kirish: kutilgan ${U(n.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Noto‘g‘ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto‘g‘ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto‘g‘ri satr: "${o.includes}" ni o‘z ichiga olishi kerak`:o.format==="regex"?`Noto‘g‘ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${n.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${n.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function qv(){return{localeError:Hv()}}const Xv=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(n){return e[n]??null}const r={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},i={nan:"NaN",number:"số",array:"mảng"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${n.expected}, nhận được ${u}`:`Đầu vào không hợp lệ: mong đợi ${o}, nhận được ${u}`}case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${U(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Quá nhỏ: mong đợi ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${r[o.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${y(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};function Yv(){return{localeError:Xv()}}const Qv=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(n){return e[n]??null}const r={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`无效输入:期望 instanceof ${n.expected},实际接收 ${u}`:`无效输入:期望 ${o},实际接收 ${u}`}case"invalid_value":return n.values.length===1?`无效输入:期望 ${U(n.values[0])}`:`无效选项:期望以下之一 ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()} ${a.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${r[o.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function e1(){return{localeError:Qv()}}const t1=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(n){return e[n]??null}const r={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`無效的輸入值:預期為 instanceof ${n.expected},但收到 ${u}`:`無效的輸入值:預期為 ${o},但收到 ${u}`}case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${U(n.values[0])}`:`無效的選項:預期為以下其中之一 ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()} ${a.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()} ${a.unit}`:`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${r[o.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${y(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function n1(){return{localeError:t1()}}const r1=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(n){return e[n]??null}const r={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${n.expected}, àmọ̀ a rí ${u}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${o}, àmọ̀ a rí ${u}`}case"invalid_value":return n.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${U(n.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tó pọ̀ jù: a ní láti jẹ́ pé ${n.origin??"iye"} ${a.verb} ${o}${n.maximum} ${a.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${o}${n.maximum}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Kéré ju: a ní láti jẹ́ pé ${n.origin} ${a.verb} ${o}${n.minimum} ${a.unit}`:`Kéré ju: a ní láti jẹ́ ${o}${n.minimum}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${o.prefix}"`:o.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${o.suffix}"`:o.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${o.includes}"`:o.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${o.pattern}`:`Aṣìṣe: ${r[o.format]??n.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${n.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${y(n.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${n.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${n.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function i1(){return{localeError:r1()}}const Il=Object.freeze(Object.defineProperty({__proto__:null,ar:$g,az:Sg,be:Ig,bg:Tg,ca:Eg,cs:Ug,da:Ng,de:Pg,en:wl,eo:Lg,es:Mg,fa:Fg,fi:Bg,fr:Jg,frCA:Wg,he:qg,hu:Yg,hy:ev,id:nv,is:iv,it:av,ja:cv,ka:lv,kh:fv,km:Sl,ko:pv,lt:gv,mk:bv,ms:yv,nl:wv,no:kv,ota:xv,pl:Ov,ps:zv,pt:Dv,ru:jv,sl:Av,sv:Lv,ta:Mv,th:Fv,tr:Bv,ua:Jv,uk:kl,ur:Wv,uz:qv,vi:Yv,yo:i1,zhCN:e1,zhTW:n1},Symbol.toStringTag,{value:"Module"}));var Ya;const xl=Symbol("ZodOutput"),Tl=Symbol("ZodInput");class zl{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Li(){return new zl}(Ya=globalThis).__zod_globalRegistry??(Ya.__zod_globalRegistry=Li());const be=globalThis.__zod_globalRegistry;function El(e,t){return new e({type:"string",...b(t)})}function Ol(e,t){return new e({type:"string",coerce:!0,...b(t)})}function Zi(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...b(t)})}function zn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...b(t)})}function Mi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...b(t)})}function Ri(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...b(t)})}function Fi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...b(t)})}function Vi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...b(t)})}function Kn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...b(t)})}function Bi(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...b(t)})}function Ki(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...b(t)})}function Ji(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...b(t)})}function Gi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...b(t)})}function Wi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...b(t)})}function Hi(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...b(t)})}function qi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...b(t)})}function Xi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...b(t)})}function Yi(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...b(t)})}function Ul(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...b(t)})}function Qi(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...b(t)})}function eo(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...b(t)})}function to(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...b(t)})}function no(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...b(t)})}function ro(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...b(t)})}function io(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...b(t)})}const Dl={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Nl(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...b(t)})}function jl(e,t){return new e({type:"string",format:"date",check:"string_format",...b(t)})}function Pl(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...b(t)})}function Al(e,t){return new e({type:"string",format:"duration",check:"string_format",...b(t)})}function Cl(e,t){return new e({type:"number",checks:[],...b(t)})}function Ll(e,t){return new e({type:"number",coerce:!0,checks:[],...b(t)})}function Zl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...b(t)})}function Ml(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...b(t)})}function Rl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...b(t)})}function Fl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...b(t)})}function Vl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...b(t)})}function Bl(e,t){return new e({type:"boolean",...b(t)})}function Kl(e,t){return new e({type:"boolean",coerce:!0,...b(t)})}function Jl(e,t){return new e({type:"bigint",...b(t)})}function Gl(e,t){return new e({type:"bigint",coerce:!0,...b(t)})}function Wl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...b(t)})}function Hl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...b(t)})}function ql(e,t){return new e({type:"symbol",...b(t)})}function Xl(e,t){return new e({type:"undefined",...b(t)})}function Yl(e,t){return new e({type:"null",...b(t)})}function Ql(e){return new e({type:"any"})}function ed(e){return new e({type:"unknown"})}function td(e,t){return new e({type:"never",...b(t)})}function nd(e,t){return new e({type:"void",...b(t)})}function rd(e,t){return new e({type:"date",...b(t)})}function id(e,t){return new e({type:"date",coerce:!0,...b(t)})}function od(e,t){return new e({type:"nan",...b(t)})}function Fe(e,t){return new Ei({check:"less_than",...b(t),value:e,inclusive:!1})}function _e(e,t){return new Ei({check:"less_than",...b(t),value:e,inclusive:!0})}function Ve(e,t){return new Oi({check:"greater_than",...b(t),value:e,inclusive:!1})}function fe(e,t){return new Oi({check:"greater_than",...b(t),value:e,inclusive:!0})}function oo(e){return Ve(0,e)}function ao(e){return Fe(0,e)}function uo(e){return _e(0,e)}function co(e){return fe(0,e)}function mt(e,t){return new Vc({check:"multiple_of",...b(t),value:e})}function _t(e,t){return new Jc({check:"max_size",...b(t),maximum:e})}function Be(e,t){return new Gc({check:"min_size",...b(t),minimum:e})}function Vt(e,t){return new Wc({check:"size_equals",...b(t),size:e})}function Bt(e,t){return new Hc({check:"max_length",...b(t),maximum:e})}function Qe(e,t){return new qc({check:"min_length",...b(t),minimum:e})}function Kt(e,t){return new Xc({check:"length_equals",...b(t),length:e})}function Jn(e,t){return new Yc({check:"string_format",format:"regex",...b(t),pattern:e})}function Gn(e){return new Qc({check:"string_format",format:"lowercase",...b(e)})}function Wn(e){return new es({check:"string_format",format:"uppercase",...b(e)})}function Hn(e,t){return new ts({check:"string_format",format:"includes",...b(t),includes:e})}function qn(e,t){return new ns({check:"string_format",format:"starts_with",...b(t),prefix:e})}function Xn(e,t){return new rs({check:"string_format",format:"ends_with",...b(t),suffix:e})}function so(e,t,r){return new is({check:"property",property:e,schema:t,...b(r)})}function Yn(e,t){return new os({check:"mime_type",mime:e,...b(t)})}function Ae(e){return new as({check:"overwrite",tx:e})}function Qn(e){return Ae(t=>t.normalize(e))}function er(){return Ae(e=>e.trim())}function tr(){return Ae(e=>e.toLowerCase())}function nr(){return Ae(e=>e.toUpperCase())}function rr(){return Ae(e=>Mu(e))}function ad(e,t,r){return new e({type:"array",element:t,...b(r)})}function o1(e,t,r){return new e({type:"union",options:t,...b(r)})}function a1(e,t,r){return new e({type:"union",options:t,inclusive:!1,...b(r)})}function u1(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...b(i)})}function c1(e,t,r){return new e({type:"intersection",left:t,right:r})}function s1(e,t,r,i){const n=r instanceof C,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...b(o)})}function l1(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...b(i)})}function d1(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...b(i)})}function f1(e,t,r){return new e({type:"set",valueType:t,...b(r)})}function m1(e,t,r){const i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...b(r)})}function p1(e,t,r){return new e({type:"enum",entries:t,...b(r)})}function h1(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...b(r)})}function ud(e,t){return new e({type:"file",...b(t)})}function g1(e,t){return new e({type:"transform",transform:t})}function v1(e,t){return new e({type:"optional",innerType:t})}function b1(e,t){return new e({type:"nullable",innerType:t})}function _1(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Rn(r)}})}function y1(e,t,r){return new e({type:"nonoptional",innerType:t,...b(r)})}function $1(e,t){return new e({type:"success",innerType:t})}function w1(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function S1(e,t,r){return new e({type:"pipe",in:t,out:r})}function k1(e,t){return new e({type:"readonly",innerType:t})}function I1(e,t,r){return new e({type:"template_literal",parts:t,...b(r)})}function x1(e,t){return new e({type:"lazy",getter:t})}function T1(e,t){return new e({type:"promise",innerType:t})}function cd(e,t,r){const i=b(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function sd(e,t,r){return new e({type:"custom",check:"custom",fn:t,...b(r)})}function ld(e){const t=dd(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(dt(i,r.value,t._zod.def));else{const n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(dt(n))}},e(r.value,r)));return t}function dd(e,t){const r=new q({check:"custom",...b(t)});return r._zod.check=e,r}function fd(e){const t=new q({check:"describe"});return t._zod.onattach=[r=>{const i=be.get(r)??{};be.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function md(e){const t=new q({check:"meta"});return t._zod.onattach=[r=>{const i=be.get(r)??{};be.add(r,{...i,...e})}],t._zod.check=()=>{},t}function pd(e,t){const r=b(t);let i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(m=>typeof m=="string"?m.toLowerCase():m),n=n.map(m=>typeof m=="string"?m.toLowerCase():m));const o=new Set(i),a=new Set(n),u=e.Codec??Ci,s=e.Boolean??Ni,c=e.String??Ft,l=new c({type:"string",error:r.error}),d=new s({type:"boolean",error:r.error}),f=new u({type:"pipe",in:l,out:d,transform:((m,g)=>{let h=m;return r.case!=="sensitive"&&(h=h.toLowerCase()),o.has(h)?!0:a.has(h)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:g.value,inst:f,continue:!1}),{})}),reverseTransform:((m,g)=>m===!0?i[0]||"true":n[0]||"false"),error:r.error});return f}function Jt(e,t,r,i={}){const n=b(i),o={...b(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:u=>r.test(u),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}function pt(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??be,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function K(e,t,r={path:[],schemaPath:[]}){var l,d;var i;const n=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const u=(d=(l=e._zod).toJSONSchema)==null?void 0:d.call(l);if(u)a.schema=u;else{const f={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,f);else{const g=a.schema,h=t.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(e,t,g,f)}const m=e._zod.parent;m&&(a.ref||(a.ref=m),K(m,t,f),t.seen.get(m).isParent=!0)}const s=t.metadataRegistry.get(e);return s&&Object.assign(a.schema,s),t.io==="input"&&de(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function ht(e,t){var a,u,s,c;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const l of e.seen.entries()){const d=(a=e.metadataRegistry.get(l[0]))==null?void 0:a.id;if(d){const f=i.get(d);if(f&&f!==l[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(d,l[0])}}const n=l=>{var h;const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=(h=e.external.registry.get(l[0]))==null?void 0:h.id,w=e.external.uri??(z=>z);if(v)return{ref:w(v)};const T=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=T,{defId:T,ref:`${w("__shared")}#/${d}/${T}`}}if(l[1]===r)return{ref:"#"};const m=`#/${d}/`,g=l[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:m+g}},o=l=>{if(l[1].schema.$ref)return;const d=l[1],{ref:f,defId:m}=n(l);d.def={...d.schema},m&&(d.defId=m);const g=d.schema;for(const h in g)delete g[h];g.$ref=f};if(e.cycles==="throw")for(const l of e.seen.entries()){const d=l[1];if(d.cycle)throw new Error(`Cycle detected: #/${(u=d.cycle)==null?void 0:u.join("/")}/<root>
|
|
61
|
+
`)}m.write("payload.value = newResult;"),m.write("return payload;");const E=m.compile();return(z,M)=>E(f,z,M)};let o;const a=ft,u=!Tn.jitless,c=u&&Yu.value,l=t.catchall;let d;e._zod.parse=(f,m)=>{d??(d=i.value);const h=f.value;return a(h)?u&&c&&(m==null?void 0:m.async)===!1&&m.jitless!==!0?(o||(o=n(t.shape)),f=o(f,m),l?ol([],h,f,m,d,e):f):r(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function Ka(e,t,r,i){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const n=e.filter(o=>!Xe(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>$e(a,i,le())))}),t)}const Gn=g("$ZodUnion",(e,t)=>{L.init(e,t),Z(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Z(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Z(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Z(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>Vn(o.source)).join("|")})$`)}});const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let a=!1;const u=[];for(const s of t.options){const c=s._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)u.push(c),a=!0;else{if(c.issues.length===0)return c;u.push(c)}}return a?Promise.all(u).then(s=>Ka(s,n,e,o)):Ka(u,n,e,o)}});function Ja(e,t,r,i){const n=e.filter(o=>o.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>$e(a,i,le())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}const cl=g("$ZodXor",(e,t)=>{Gn.init(e,t),t.inclusive=!1;const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let a=!1;const u=[];for(const s of t.options){const c=s._zod.run({value:n.value,issues:[]},o);c instanceof Promise?(u.push(c),a=!0):u.push(c)}return a?Promise.all(u).then(s=>Ja(s,n,e,o)):Ja(u,n,e,o)}}),sl=g("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Gn.init(e,t);const r=e._zod.parse;Z(e._zod,"propValues",()=>{const n={};for(const o of t.options){const a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[u,s]of Object.entries(a)){n[u]||(n[u]=new Set);for(const c of s)n[u].add(c)}}return n});const i=At(()=>{var a;const n=t.options,o=new Map;for(const u of n){const s=(a=u._zod.propValues)==null?void 0:a[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(const c of s){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,u)}}return o});e._zod.parse=(n,o)=>{const a=n.value;if(!ft(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;const u=i.value.get(a==null?void 0:a[t.discriminator]);return u?u._zod.run(n,o):t.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),n)}}),ll=g("$ZodIntersection",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value,o=t.left._zod.run({value:n,issues:[]},i),a=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([s,c])=>Ga(r,s,c)):Ga(r,o,a)}});function ai(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Qe(e)&&Qe(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(const o of i){const a=ai(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const n=e[i],o=t[i],a=ai(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Ga(e,t,r){const i=new Map;let n;for(const u of t.issues)if(u.code==="unrecognized_keys"){n??(n=u);for(const s of u.keys)i.has(s)||i.set(s,{}),i.get(s).l=!0}else e.issues.push(u);for(const u of r.issues)if(u.code==="unrecognized_keys")for(const s of u.keys)i.has(s)||i.set(s,{}),i.get(s).r=!0;else e.issues.push(u);const o=[...i].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(o.length&&n&&e.issues.push({...n,keys:o}),Xe(e))return e;const a=ai(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Fi=g("$ZodTuple",(e,t)=>{L.init(e,t);const r=t.items;e._zod.parse=(i,n)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const a=[],u=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),s=u===-1?0:r.length-u;if(!t.rest){const l=o.length>r.length,d=o.length<s-1;if(l||d)return i.issues.push({...l?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:e,origin:"array"}),i}let c=-1;for(const l of r){if(c++,c>=o.length&&c>=s)continue;const d=l._zod.run({value:o[c],issues:[]},n);d instanceof Promise?a.push(d.then(f=>sn(f,i,c))):sn(d,i,c)}if(t.rest){const l=o.slice(r.length);for(const d of l){c++;const f=t.rest._zod.run({value:d,issues:[]},n);f instanceof Promise?a.push(f.then(m=>sn(m,i,c))):sn(f,i,c)}}return a.length?Promise.all(a).then(()=>i):i}});function sn(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues)),t.value[r]=e.value}const dl=g("$ZodRecord",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Qe(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;const o=[],a=t.keyType._zod.values;if(a){r.value={};const u=new Set;for(const c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){u.add(typeof c=="number"?c.toString():c);const l=t.valueType._zod.run({value:n[c],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...Ie(c,d.issues)),r.value[c]=d.value})):(l.issues.length&&r.issues.push(...Ie(c,l.issues)),r.value[c]=l.value)}let s;for(const c in n)u.has(c)||(s=s??[],s.push(c));s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:s})}else{r.value={};for(const u of Reflect.ownKeys(n)){if(u==="__proto__")continue;let s=t.keyType._zod.run({value:u,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&ji.test(u)&&s.issues.length){const d=t.keyType._zod.run({value:Number(u),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(s=d)}if(s.issues.length){t.mode==="loose"?r.value[u]=n[u]:r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(d=>$e(d,i,le())),input:u,path:[u],inst:e});continue}const l=t.valueType._zod.run({value:n[u],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...Ie(u,d.issues)),r.value[s.value]=d.value})):(l.issues.length&&r.issues.push(...Ie(u,l.issues)),r.value[s.value]=l.value)}}return o.length?Promise.all(o).then(()=>r):r}}),fl=g("$ZodMap",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;const o=[];r.value=new Map;for(const[a,u]of n){const s=t.keyType._zod.run({value:a,issues:[]},i),c=t.valueType._zod.run({value:u,issues:[]},i);s instanceof Promise||c instanceof Promise?o.push(Promise.all([s,c]).then(([l,d])=>{qa(l,d,r,a,n,e,i)})):qa(s,c,r,a,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function qa(e,t,r,i,n,o,a){e.issues.length&&(En.has(typeof i)?r.issues.push(...Ie(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(u=>$e(u,a,le()))})),t.issues.length&&(En.has(typeof i)?r.issues.push(...Ie(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(u=>$e(u,a,le()))})),r.value.set(e.value,t.value)}const ml=g("$ZodSet",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;const o=[];r.value=new Set;for(const a of n){const u=t.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(s=>Wa(s,r))):Wa(u,r)}return o.length?Promise.all(o).then(()=>r):r}});function Wa(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const pl=g("$ZodEnum",(e,t)=>{L.init(e,t);const r=yi(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>En.has(typeof n)).map(n=>typeof n=="string"?je(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{const a=n.value;return i.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),hl=g("$ZodLiteral",(e,t)=>{if(L.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?je(i):i?je(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,n)=>{const o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),gl=g("$ZodFile",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),vl=g("$ZodTransform",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Fn(e.constructor.name);const n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new Ye;return r.value=n,r}});function Ha(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Vi=g("$ZodOptional",(e,t)=>{L.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Z(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Z(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Vn(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ha(o,r.value)):Ha(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),bl=g("$ZodExactOptional",(e,t)=>{Vi.init(e,t),Z(e._zod,"values",()=>t.innerType._zod.values),Z(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),_l=g("$ZodNullable",(e,t)=>{L.init(e,t),Z(e._zod,"optin",()=>t.innerType._zod.optin),Z(e._zod,"optout",()=>t.innerType._zod.optout),Z(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Vn(r.source)}|null)$`):void 0}),Z(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),yl=g("$ZodDefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",Z(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Xa(o,t)):Xa(n,t)}});function Xa(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const $l=g("$ZodPrefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",Z(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),wl=g("$ZodNonOptional",(e,t)=>{L.init(e,t),Z(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ya(o,e)):Ya(n,e)}});function Ya(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Sl=g("$ZodSuccess",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Fn("ZodSuccess");const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),kl=g("$ZodCatch",(e,t)=>{L.init(e,t),Z(e._zod,"optin",()=>t.innerType._zod.optin),Z(e._zod,"optout",()=>t.innerType._zod.optout),Z(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(a=>$e(a,i,le()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>$e(o,i,le()))},input:r.value}),r.issues=[]),r)}}),Il=g("$ZodNaN",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),xl=g("$ZodPipe",(e,t)=>{L.init(e,t),Z(e._zod,"values",()=>t.in._zod.values),Z(e._zod,"optin",()=>t.in._zod.optin),Z(e._zod,"optout",()=>t.out._zod.optout),Z(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>ln(a,t.in,i)):ln(o,t.in,i)}const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>ln(o,t.out,i)):ln(n,t.out,i)}});function ln(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const Bi=g("$ZodCodec",(e,t)=>{L.init(e,t),Z(e._zod,"values",()=>t.in._zod.values),Z(e._zod,"optin",()=>t.in._zod.optin),Z(e._zod,"optout",()=>t.out._zod.optout),Z(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){const o=t.in._zod.run(r,i);return o instanceof Promise?o.then(a=>dn(a,t,i)):dn(o,t,i)}else{const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>dn(a,t,i)):dn(o,t,i)}}});function dn(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>fn(e,o,t.out,r)):fn(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>fn(e,o,t.in,r)):fn(e,n,t.in,r)}}function fn(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}const Tl=g("$ZodReadonly",(e,t)=>{L.init(e,t),Z(e._zod,"propValues",()=>t.innerType._zod.propValues),Z(e._zod,"values",()=>t.innerType._zod.values),Z(e._zod,"optin",()=>{var r,i;return(i=(r=t.innerType)==null?void 0:r._zod)==null?void 0:i.optin}),Z(e._zod,"optout",()=>{var r,i;return(i=(r=t.innerType)==null?void 0:r._zod)==null?void 0:i.optout}),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Qa):Qa(n)}});function Qa(e){return e.value=Object.freeze(e.value),e}const zl=g("$ZodTemplateLiteral",(e,t)=>{L.init(e,t);const r=[];for(const i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const o=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,a))}else if(i===null||Qu.has(typeof i))r.push(je(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),El=g("$ZodFunction",(e,t)=>(L.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){const n=e._def.input?ii(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?ii(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){const n=e._def.input?await oi(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await oi(e._def.output,o):o}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Fi({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),Ol=g("$ZodPromise",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),Ul=g("$ZodLazy",(e,t)=>{L.init(e,t),Z(e._zod,"innerType",()=>t.getter()),Z(e._zod,"pattern",()=>{var r,i;return(i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.pattern}),Z(e._zod,"propValues",()=>{var r,i;return(i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.propValues}),Z(e._zod,"optin",()=>{var r,i;return((i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.optin)??void 0}),Z(e._zod,"optout",()=>{var r,i;return((i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.optout)??void 0}),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Dl=g("$ZodCustom",(e,t)=>{X.init(e,t),L.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>eu(o,r,i,e));eu(n,r,i,e)}});function eu(e,t,r,i){if(!e){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(mt(n))}}const Yg=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(n){return e[n]??null}const r={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${n.expected}، ولكن تم إدخال ${u}`:`مدخلات غير مقبولة: يفترض إدخال ${o}، ولكن تم إدخال ${u}`}case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${D(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()} ${a.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()} ${a.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${r[o.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${y(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function Qg(){return{localeError:Yg()}}const ev=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Yanlış dəyər: gözlənilən instanceof ${n.expected}, daxil olan ${u}`:`Yanlış dəyər: gözlənilən ${o}, daxil olan ${u}`}case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${D(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function tv(){return{localeError:ev()}}function tu(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const nv=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(n){return e[n]??null}const r={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Няправільны ўвод: чакаўся instanceof ${n.expected}, атрымана ${u}`:`Няправільны ўвод: чакаўся ${o}, атрымана ${u}`}case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${D(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=tu(u,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${a.verb} ${o}${n.maximum.toString()} ${s}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const u=Number(n.minimum),s=tu(u,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${a.verb} ${o}${n.minimum.toString()} ${s}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${r[o.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${y(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function rv(){return{localeError:nv()}}const iv=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(n){return e[n]??null}const r={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},i={nan:"NaN",number:"число",array:"масив"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Невалиден вход: очакван instanceof ${n.expected}, получен ${u}`:`Невалиден вход: очакван ${o}, получен ${u}`}case"invalid_value":return n.values.length===1?`Невалиден вход: очакван ${D(n.values[0])}`:`Невалидна опция: очаквано едно от ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Твърде голямо: очаква се ${n.origin??"стойност"} да съдържа ${o}${n.maximum.toString()} ${a.unit??"елемента"}`:`Твърде голямо: очаква се ${n.origin??"стойност"} да бъде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Твърде малко: очаква се ${n.origin} да съдържа ${o}${n.minimum.toString()} ${a.unit}`:`Твърде малко: очаква се ${n.origin} да бъде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;if(o.format==="starts_with")return`Невалиден низ: трябва да започва с "${o.prefix}"`;if(o.format==="ends_with")return`Невалиден низ: трябва да завършва с "${o.suffix}"`;if(o.format==="includes")return`Невалиден низ: трябва да включва "${o.includes}"`;if(o.format==="regex")return`Невалиден низ: трябва да съвпада с ${o.pattern}`;let a="Невалиден";return o.format==="emoji"&&(a="Невалидно"),o.format==="datetime"&&(a="Невалидно"),o.format==="date"&&(a="Невалидна"),o.format==="time"&&(a="Невалидно"),o.format==="duration"&&(a="Невалидна"),`${a} ${r[o.format]??n.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${n.divisor}`;case"unrecognized_keys":return`Неразпознат${n.keys.length>1?"и":""} ключ${n.keys.length>1?"ове":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${n.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${n.origin}`;default:return"Невалиден вход"}}};function ov(){return{localeError:iv()}}const av=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus invàlid: s'esperava instanceof ${n.expected}, s'ha rebut ${u}`:`Tipus invàlid: s'esperava ${o}, s'ha rebut ${u}`}case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${D(n.values[0])}`:`Opció invàlida: s'esperava una de ${y(n.values," o ")}`;case"too_big":{const o=n.inclusive?"com a màxim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"com a mínim":"més de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingués ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};function uv(){return{localeError:av()}}const cv=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(n){return e[n]??null}const r={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatný vstup: očekáváno instanceof ${n.expected}, obdrženo ${u}`:`Neplatný vstup: očekáváno ${o}, obdrženo ${u}`}case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${D(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${o}${n.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${o}${n.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${y(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};function sv(){return{localeError:cv()}}const lv=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${u}`:`Ugyldigt input: forventede ${o}, fik ${u}`}case"invalid_value":return n.values.length===1?`Ugyldig værdi: forventede ${D(n.values[0])}`:`Ugyldigt valg: forventede en af følgende ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),u=i[n.origin]??n.origin;return a?`For stor: forventede ${u??"value"} ${a.verb} ${o} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),u=i[n.origin]??n.origin;return a?`For lille: forventede ${u} ${a.verb} ${o} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${u} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche mønsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${n.origin}`;default:return"Ugyldigt input"}}};function dv(){return{localeError:lv()}}const fv=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}const r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ungültige Eingabe: erwartet instanceof ${n.expected}, erhalten ${u}`:`Ungültige Eingabe: erwartet ${o}, erhalten ${u}`}case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${D(n.values[0])}`:`Ungültige Option: erwartet eine von ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};function mv(){return{localeError:fv()}}const pv=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return`Invalid input: expected ${o}, received ${u}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${D(n.values[0])}`:`Invalid option: expected one of ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function Nl(){return{localeError:pv()}}const hv=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendiĝis instanceof ${n.expected}, riceviĝis ${u}`:`Nevalida enigo: atendiĝis ${o}, riceviĝis ${u}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendiĝis ${D(n.values[0])}`:`Nevalida opcio: atendiĝis unu el ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendiĝis ke ${n.origin} havu ${o}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendiĝis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} ŝlosilo${n.keys.length>1?"j":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function gv(){return{localeError:hv()}}const vv=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inválida: se esperaba instanceof ${n.expected}, recibido ${u}`:`Entrada inválida: se esperaba ${o}, recibido ${u}`}case"invalid_value":return n.values.length===1?`Entrada inválida: se esperaba ${D(n.values[0])}`:`Opción inválida: se esperaba una de ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),u=i[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),u=i[n.origin]??n.origin;return a?`Demasiado pequeño: se esperaba que ${u} tuviera ${o}${n.minimum.toString()} ${a.unit}`:`Demasiado pequeño: se esperaba que ${u} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cadena inválida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inválida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inválida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${o.pattern}`:`Inválido ${r[o.format]??n.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[n.origin]??n.origin}`;default:return"Entrada inválida"}}};function bv(){return{localeError:vv()}}const _v=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(n){return e[n]??null}const r={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`ورودی نامعتبر: میبایست instanceof ${n.expected} میبود، ${u} دریافت شد`:`ورودی نامعتبر: میبایست ${o} میبود، ${u} دریافت شد`}case"invalid_value":return n.values.length===1?`ورودی نامعتبر: میبایست ${D(n.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${y(n.values,"|")} میبود`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} باشد`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} باشد`}case"invalid_format":{const o=n;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${r[o.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${y(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function yv(){return{localeError:_v()}}const $v=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(n){return e[n]??null}const r={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${u}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${u}`}case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${D(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${y(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function wv(){return{localeError:$v()}}const Sv=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrée invalide : instanceof ${n.expected} attendu, ${u} reçu`:`Entrée invalide : ${o} attendu, ${u} reçu`}case"invalid_value":return n.values.length===1?`Entrée invalide : ${D(n.values[0])} attendu`:`Option invalide : une valeur parmi ${y(n.values,"|")} attendue`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit être ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${y(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function kv(){return{localeError:Sv()}}const Iv=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrée invalide : attendu instanceof ${n.expected}, reçu ${u}`:`Entrée invalide : attendu ${o}, reçu ${u}`}case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${D(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"≤":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"≥":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${y(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function xv(){return{localeError:Iv()}}const Tv=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},r=c=>c?e[c]:void 0,i=c=>{const l=r(c);return l?l.label:c??e.unknown.label},n=c=>`ה${i(c)}`,o=c=>{const l=r(c);return((l==null?void 0:l.gender)??"m")==="f"?"צריכה להיות":"צריך להיות"},a=c=>c?t[c]??null:null,u={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},s={nan:"NaN"};return c=>{var l;switch(c.code){case"invalid_type":{const d=c.expected,f=s[d??""]??i(d),m=N(c.input),h=s[m]??((l=e[m])==null?void 0:l.label)??m;return/^[A-Z]/.test(c.expected)?`קלט לא תקין: צריך להיות instanceof ${c.expected}, התקבל ${h}`:`קלט לא תקין: צריך להיות ${f}, התקבל ${h}`}case"invalid_value":{if(c.values.length===1)return`ערך לא תקין: הערך חייב להיות ${D(c.values[0])}`;const d=c.values.map(h=>D(h));if(c.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${d[0]} או ${d[1]}`;const f=d[d.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${d.slice(0,-1).join(", ")} או ${f}`}case"too_big":{const d=a(c.origin),f=n(c.origin??"value");if(c.origin==="string")return`${(d==null?void 0:d.longLabel)??"ארוך"} מדי: ${f} צריכה להכיל ${c.maximum.toString()} ${(d==null?void 0:d.unit)??""} ${c.inclusive?"או פחות":"לכל היותר"}`.trim();if(c.origin==="number"){const p=c.inclusive?`קטן או שווה ל-${c.maximum}`:`קטן מ-${c.maximum}`;return`גדול מדי: ${f} צריך להיות ${p}`}if(c.origin==="array"||c.origin==="set"){const p=c.origin==="set"?"צריכה":"צריך",v=c.inclusive?`${c.maximum} ${(d==null?void 0:d.unit)??""} או פחות`:`פחות מ-${c.maximum} ${(d==null?void 0:d.unit)??""}`;return`גדול מדי: ${f} ${p} להכיל ${v}`.trim()}const m=c.inclusive?"<=":"<",h=o(c.origin??"value");return d!=null&&d.unit?`${d.longLabel} מדי: ${f} ${h} ${m}${c.maximum.toString()} ${d.unit}`:`${(d==null?void 0:d.longLabel)??"גדול"} מדי: ${f} ${h} ${m}${c.maximum.toString()}`}case"too_small":{const d=a(c.origin),f=n(c.origin??"value");if(c.origin==="string")return`${(d==null?void 0:d.shortLabel)??"קצר"} מדי: ${f} צריכה להכיל ${c.minimum.toString()} ${(d==null?void 0:d.unit)??""} ${c.inclusive?"או יותר":"לפחות"}`.trim();if(c.origin==="number"){const p=c.inclusive?`גדול או שווה ל-${c.minimum}`:`גדול מ-${c.minimum}`;return`קטן מדי: ${f} צריך להיות ${p}`}if(c.origin==="array"||c.origin==="set"){const p=c.origin==="set"?"צריכה":"צריך";if(c.minimum===1&&c.inclusive){const w=(c.origin==="set","לפחות פריט אחד");return`קטן מדי: ${f} ${p} להכיל ${w}`}const v=c.inclusive?`${c.minimum} ${(d==null?void 0:d.unit)??""} או יותר`:`יותר מ-${c.minimum} ${(d==null?void 0:d.unit)??""}`;return`קטן מדי: ${f} ${p} להכיל ${v}`.trim()}const m=c.inclusive?">=":">",h=o(c.origin??"value");return d!=null&&d.unit?`${d.shortLabel} מדי: ${f} ${h} ${m}${c.minimum.toString()} ${d.unit}`:`${(d==null?void 0:d.shortLabel)??"קטן"} מדי: ${f} ${h} ${m}${c.minimum.toString()}`}case"invalid_format":{const d=c;if(d.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${d.prefix}"`;if(d.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${d.suffix}"`;if(d.format==="includes")return`המחרוזת חייבת לכלול "${d.includes}"`;if(d.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${d.pattern}`;const f=u[d.format],m=(f==null?void 0:f.label)??d.format,p=((f==null?void 0:f.gender)??"m")==="f"?"תקינה":"תקין";return`${m} לא ${p}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${c.divisor}`;case"unrecognized_keys":return`מפתח${c.keys.length>1?"ות":""} לא מזוה${c.keys.length>1?"ים":"ה"}: ${y(c.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n(c.origin??"array")}`;default:return"קלט לא תקין"}}};function zv(){return{localeError:Tv()}}const Ev=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"szám",array:"tömb"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Érvénytelen bemenet: a várt érték instanceof ${n.expected}, a kapott érték ${u}`:`Érvénytelen bemenet: a várt érték ${o}, a kapott érték ${u}`}case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${D(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};function Ov(){return{localeError:Ev()}}function nu(e,t,r){return Math.abs(e)===1?t:r}function ot(e){if(!e)return"";const t=["ա","ե","ը","ի","ո","ու","օ"],r=e[e.length-1];return e+(t.includes(r)?"ն":"ը")}const Uv=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(n){return e[n]??null}const r={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${n.expected}, ստացվել է ${u}`:`Սխալ մուտքագրում․ սպասվում էր ${o}, ստացվել է ${u}`}case"invalid_value":return n.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${D(n.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=nu(u,a.unit.one,a.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ot(n.origin??"արժեք")} կունենա ${o}${n.maximum.toString()} ${s}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ot(n.origin??"արժեք")} լինի ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const u=Number(n.minimum),s=nu(u,a.unit.one,a.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ot(n.origin)} կունենա ${o}${n.minimum.toString()} ${s}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ot(n.origin)} լինի ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Սխալ տող․ պետք է սկսվի "${o.prefix}"-ով`:o.format==="ends_with"?`Սխալ տող․ պետք է ավարտվի "${o.suffix}"-ով`:o.format==="includes"?`Սխալ տող․ պետք է պարունակի "${o.includes}"`:o.format==="regex"?`Սխալ տող․ պետք է համապատասխանի ${o.pattern} ձևաչափին`:`Սխալ ${r[o.format]??n.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${n.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${n.keys.length>1?"ներ":""}. ${y(n.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${ot(n.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${ot(n.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function Dv(){return{localeError:Uv()}}const Nv=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${u}`:`Input tidak valid: diharapkan ${o}, diterima ${u}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${D(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function jv(){return{localeError:Nv()}}const Pv=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(n){return e[n]??null}const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: Þú slóst inn ${u} þar sem á að vera instanceof ${n.expected}`:`Rangt gildi: Þú slóst inn ${u} þar sem á að vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert ráð fyrir ${D(n.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} sé ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Of lítið: gert er ráð fyrir að ${n.origin} hafi ${o}${n.minimum.toString()} ${a.unit}`:`Of lítið: gert er ráð fyrir að ${n.origin} sé ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ógildur strengur: verður að byrja á "${o.prefix}"`:o.format==="ends_with"?`Ógildur strengur: verður að enda á "${o.suffix}"`:o.format==="includes"?`Ógildur strengur: verður að innihalda "${o.includes}"`:o.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`Óþekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${y(n.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${n.origin}`;default:return"Rangt gildi"}}};function Av(){return{localeError:Pv()}}const Lv=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${u}`:`Input non valido: atteso ${o}, ricevuto ${u}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${D(n.values[0])}`:`Opzione non valida: atteso uno tra ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${y(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function Cv(){return{localeError:Lv()}}const Zv=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(n){return e[n]??null}const r={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`無効な入力: instanceof ${n.expected}が期待されましたが、${u}が入力されました`:`無効な入力: ${o}が期待されましたが、${u}が入力されました`}case"invalid_value":return n.values.length===1?`無効な入力: ${D(n.values[0])}が期待されました`:`無効な選択: ${y(n.values,"、")}のいずれかである必要があります`;case"too_big":{const o=n.inclusive?"以下である":"より小さい",a=t(n.origin);return a?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${a.unit??"要素"}${o}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${o}必要があります`}case"too_small":{const o=n.inclusive?"以上である":"より大きい",a=t(n.origin);return a?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${a.unit}${o}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${r[o.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${y(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function Mv(){return{localeError:Zv()}}const Rv=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(n){return e[n]??null}const r={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${n.expected}, მიღებული ${u}`:`არასწორი შეყვანა: მოსალოდნელი ${o}, მიღებული ${u}`}case"invalid_value":return n.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${D(n.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${y(n.values,"|")}-დან`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} იყოს ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`ზედმეტად პატარა: მოსალოდნელი ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${n.origin} იყოს ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${o.prefix}"-ით`:o.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${o.suffix}"-ით`:o.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${o.includes}"-ს`:o.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${o.pattern}`:`არასწორი ${r[o.format]??n.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${n.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${n.keys.length>1?"ები":"ი"}: ${y(n.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${n.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${n.origin}-ში`;default:return"არასწორი შეყვანა"}}};function Fv(){return{localeError:Rv()}}const Vv=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(n){return e[n]??null}const r={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${n.expected} ប៉ុន្តែទទួលបាន ${u}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${o} ប៉ុន្តែទទួលបាន ${u}`}case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${D(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()} ${a.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${r[o.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${y(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function jl(){return{localeError:Vv()}}function Bv(){return jl()}const Kv=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`잘못된 입력: 예상 타입은 instanceof ${n.expected}, 받은 타입은 ${u}입니다`:`잘못된 입력: 예상 타입은 ${o}, 받은 타입은 ${u}입니다`}case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${D(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${y(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",a=o==="미만"?"이어야 합니다":"여야 합니다",u=t(n.origin),s=(u==null?void 0:u.unit)??"요소";return u?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${s} ${o}${a}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${a}`}case"too_small":{const o=n.inclusive?"이상":"초과",a=o==="이상"?"이어야 합니다":"여야 합니다",u=t(n.origin),s=(u==null?void 0:u.unit)??"요소";return u?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${s} ${o}${a}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${o}${a}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${r[o.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${y(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function Jv(){return{localeError:Kv()}}const It=e=>e.charAt(0).toUpperCase()+e.slice(1);function ru(e){const t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}const Gv=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(n,o,a,u){const s=e[n]??null;return s===null?s:{unit:s.unit[o],verb:s.verb[u][a?"inclusive":"notInclusive"]}}const r={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},i={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${u}, o tikėtasi - instanceof ${n.expected}`:`Gautas tipas ${u}, o tikėtasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo būti ${D(n.values[0])}`:`Privalo būti vienas iš ${y(n.values,"|")} pasirinkimų`;case"too_big":{const o=i[n.origin]??n.origin,a=t(n.origin,ru(Number(n.maximum)),n.inclusive??!1,"smaller");if(a!=null&&a.verb)return`${It(o??n.origin??"reikšmė")} ${a.verb} ${n.maximum.toString()} ${a.unit??"elementų"}`;const u=n.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${It(o??n.origin??"reikšmė")} turi būti ${u} ${n.maximum.toString()} ${a==null?void 0:a.unit}`}case"too_small":{const o=i[n.origin]??n.origin,a=t(n.origin,ru(Number(n.minimum)),n.inclusive??!1,"bigger");if(a!=null&&a.verb)return`${It(o??n.origin??"reikšmė")} ${a.verb} ${n.minimum.toString()} ${a.unit??"elementų"}`;const u=n.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${It(o??n.origin??"reikšmė")} turi būti ${u} ${n.minimum.toString()} ${a==null?void 0:a.unit}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Eilutė privalo prasidėti "${o.prefix}"`:o.format==="ends_with"?`Eilutė privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilutė privalo įtraukti "${o.includes}"`:o.format==="regex"?`Eilutė privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skaičius privalo būti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${y(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const o=i[n.origin]??n.origin;return`${It(o??n.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function qv(){return{localeError:Gv()}}const Wv=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(n){return e[n]??null}const r={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},i={nan:"NaN",number:"број",array:"низа"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Грешен внес: се очекува instanceof ${n.expected}, примено ${u}`:`Грешен внес: се очекува ${o}, примено ${u}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${D(n.values[0])}`:`Грешана опција: се очекува една ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${o}${n.maximum.toString()} ${a.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Премногу мал: се очекува ${n.origin} да има ${o}${n.minimum.toString()} ${a.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${y(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function Hv(){return{localeError:Wv()}}const Xv=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${u}`:`Input tidak sah: dijangka ${o}, diterima ${u}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${D(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${y(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function Yv(){return{localeError:Xv()}}const Qv=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}const r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${u}`:`Ongeldige invoer: verwacht ${o}, ontving ${u}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${D(n.values[0])}`:`Ongeldige optie: verwacht één van ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),u=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${u}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${u}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),u=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${u}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${u}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function eb(){return{localeError:Qv()}}const tb=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${u}`:`Ugyldig input: forventet ${o}, fikk ${u}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${D(n.values[0])}`:`Ugyldig valg: forventet en av ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function nb(){return{localeError:tb()}}const rb=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(n){return e[n]??null}const r={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Fâsit giren: umulan instanceof ${n.expected}, alınan ${u}`:`Fâsit giren: umulan ${o}, alınan ${u}`}case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${D(n.values[0])}`:`Fâsit tercih: mûteberler ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmalıydı.`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${r[o.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function ib(){return{localeError:rb()}}const ob=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(n){return e[n]??null}const r={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`ناسم ورودي: باید instanceof ${n.expected} وای, مګر ${u} ترلاسه شو`:`ناسم ورودي: باید ${o} وای, مګر ${u} ترلاسه شو`}case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${D(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${y(n.values,"|")} څخه وای`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} وي`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} وي`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${r[o.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${y(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function ab(){return{localeError:ob()}}const ub=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(n){return e[n]??null}const r={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${n.expected}, otrzymano ${u}`:`Nieprawidłowe dane wejściowe: oczekiwano ${o}, otrzymano ${u}`}case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${D(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function cb(){return{localeError:ub()}}const sb=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"número",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inválido: esperado instanceof ${n.expected}, recebido ${u}`:`Tipo inválido: esperado ${o}, recebido ${u}`}case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${D(n.values[0])}`:`Opção inválida: esperada uma das ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${r[o.format]??n.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Chave inválida em ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${n.origin}`;default:return"Campo inválido"}}};function lb(){return{localeError:sb()}}function iu(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const db=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(n){return e[n]??null}const r={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Неверный ввод: ожидалось instanceof ${n.expected}, получено ${u}`:`Неверный ввод: ожидалось ${o}, получено ${u}`}case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${D(n.values[0])}`:`Неверный вариант: ожидалось одно из ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=iu(u,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${s}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const u=Number(n.minimum),s=iu(u,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${s}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${r[o.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function fb(){return{localeError:db()}}const mb=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"število",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pričakovano instanceof ${n.expected}, prejeto ${u}`:`Neveljaven vnos: pričakovano ${o}, prejeto ${u}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${D(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pričakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${y(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function pb(){return{localeError:mb()}}const hb=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(n){return e[n]??null}const r={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: förväntat instanceof ${n.expected}, fick ${u}`:`Ogiltig inmatning: förväntat ${o}, fick ${u}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${D(n.values[0])}`:`Ogiltigt val: förväntade en av ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};function gb(){return{localeError:hb()}}const vb=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(n){return e[n]??null}const r={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${n.expected}, பெறப்பட்டது ${u}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${o}, பெறப்பட்டது ${u}`}case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${D(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${y(n.values,"|")} இல் ஒன்று`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=n;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${r[o.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function bb(){return{localeError:vb()}}const _b=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(n){return e[n]??null}const r={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${n.expected} แต่ได้รับ ${u}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${o} แต่ได้รับ ${u}`}case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${D(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"ไม่เกิน":"น้อยกว่า",a=t(n.origin);return a?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()} ${a.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"อย่างน้อย":"มากกว่า",a=t(n.origin);return a?`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()} ${a.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${r[o.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${y(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function yb(){return{localeError:_b()}}const $b=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(n){return e[n]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Geçersiz değer: beklenen instanceof ${n.expected}, alınan ${u}`:`Geçersiz değer: beklenen ${o}, alınan ${u}`}case"invalid_value":return n.values.length===1?`Geçersiz değer: beklenen ${D(n.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Çok büyük: beklenen ${n.origin??"değer"} ${o}${n.maximum.toString()} ${a.unit??"öğe"}`:`Çok büyük: beklenen ${n.origin??"değer"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Çok küçük: beklenen ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`Çok küçük: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Geçersiz metin: "${o.prefix}" ile başlamalı`:o.format==="ends_with"?`Geçersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Geçersiz metin: "${o.includes}" içermeli`:o.format==="regex"?`Geçersiz metin: ${o.pattern} desenine uymalı`:`Geçersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Geçersiz sayı: ${n.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${n.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function wb(){return{localeError:$b()}}const Sb=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(n){return e[n]??null}const r={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Неправильні вхідні дані: очікується instanceof ${n.expected}, отримано ${u}`:`Неправильні вхідні дані: очікується ${o}, отримано ${u}`}case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${D(n.values[0])}`:`Неправильна опція: очікується одне з ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Занадто велике: очікується, що ${n.origin??"значення"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Занадто мале: очікується, що ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${r[o.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function Pl(){return{localeError:Sb()}}function kb(){return Pl()}const Ib=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(n){return e[n]??null}const r={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`غلط ان پٹ: instanceof ${n.expected} متوقع تھا، ${u} موصول ہوا`:`غلط ان پٹ: ${o} متوقع تھا، ${u} موصول ہوا`}case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${D(n.values[0])} متوقع تھا`:`غلط آپشن: ${y(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`بہت بڑا: ${n.origin??"ویلیو"} کے ${o}${n.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${o}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`بہت چھوٹا: ${n.origin} کے ${o}${n.minimum.toString()} ${a.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${o}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=n;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${r[o.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${y(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function xb(){return{localeError:Ib()}}const Tb=()=>{const e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function t(n){return e[n]??null}const r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${u}`:`Noto‘g‘ri kirish: kutilgan ${o}, qabul qilingan ${u}`}case"invalid_value":return n.values.length===1?`Noto‘g‘ri kirish: kutilgan ${D(n.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Noto‘g‘ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto‘g‘ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto‘g‘ri satr: "${o.includes}" ni o‘z ichiga olishi kerak`:o.format==="regex"?`Noto‘g‘ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${n.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${n.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function zb(){return{localeError:Tb()}}const Eb=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(n){return e[n]??null}const r={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},i={nan:"NaN",number:"số",array:"mảng"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${n.expected}, nhận được ${u}`:`Đầu vào không hợp lệ: mong đợi ${o}, nhận được ${u}`}case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${D(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Quá nhỏ: mong đợi ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${r[o.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${y(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};function Ob(){return{localeError:Eb()}}const Ub=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(n){return e[n]??null}const r={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`无效输入:期望 instanceof ${n.expected},实际接收 ${u}`:`无效输入:期望 ${o},实际接收 ${u}`}case"invalid_value":return n.values.length===1?`无效输入:期望 ${D(n.values[0])}`:`无效选项:期望以下之一 ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()} ${a.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${r[o.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function Db(){return{localeError:Ub()}}const Nb=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(n){return e[n]??null}const r={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`無效的輸入值:預期為 instanceof ${n.expected},但收到 ${u}`:`無效的輸入值:預期為 ${o},但收到 ${u}`}case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${D(n.values[0])}`:`無效的選項:預期為以下其中之一 ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()} ${a.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()} ${a.unit}`:`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${r[o.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${y(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function jb(){return{localeError:Nb()}}const Pb=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(n){return e[n]??null}const r={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${n.expected}, àmọ̀ a rí ${u}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${o}, àmọ̀ a rí ${u}`}case"invalid_value":return n.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${D(n.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tó pọ̀ jù: a ní láti jẹ́ pé ${n.origin??"iye"} ${a.verb} ${o}${n.maximum} ${a.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${o}${n.maximum}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Kéré ju: a ní láti jẹ́ pé ${n.origin} ${a.verb} ${o}${n.minimum} ${a.unit}`:`Kéré ju: a ní láti jẹ́ ${o}${n.minimum}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${o.prefix}"`:o.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${o.suffix}"`:o.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${o.includes}"`:o.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${o.pattern}`:`Aṣìṣe: ${r[o.format]??n.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${n.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${y(n.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${n.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${n.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function Ab(){return{localeError:Pb()}}const Al=Object.freeze(Object.defineProperty({__proto__:null,ar:Qg,az:tv,be:rv,bg:ov,ca:uv,cs:sv,da:dv,de:mv,en:Nl,eo:gv,es:bv,fa:yv,fi:wv,fr:kv,frCA:xv,he:zv,hu:Ov,hy:Dv,id:jv,is:Av,it:Cv,ja:Mv,ka:Fv,kh:Bv,km:jl,ko:Jv,lt:qv,mk:Hv,ms:Yv,nl:eb,no:nb,ota:ib,pl:cb,ps:ab,pt:lb,ru:fb,sl:pb,sv:gb,ta:bb,th:yb,tr:wb,ua:kb,uk:Pl,ur:xb,uz:zb,vi:Ob,yo:Ab,zhCN:Db,zhTW:jb},Symbol.toStringTag,{value:"Module"}));var ou;const Ll=Symbol("ZodOutput"),Cl=Symbol("ZodInput");class Zl{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Ki(){return new Zl}(ou=globalThis).__zod_globalRegistry??(ou.__zod_globalRegistry=Ki());const be=globalThis.__zod_globalRegistry;function Ml(e,t){return new e({type:"string",...b(t)})}function Rl(e,t){return new e({type:"string",coerce:!0,...b(t)})}function Ji(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...b(t)})}function Un(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...b(t)})}function Gi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...b(t)})}function qi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...b(t)})}function Wi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...b(t)})}function Hi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...b(t)})}function qn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...b(t)})}function Xi(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...b(t)})}function Yi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...b(t)})}function Qi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...b(t)})}function eo(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...b(t)})}function to(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...b(t)})}function no(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...b(t)})}function ro(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...b(t)})}function io(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...b(t)})}function oo(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...b(t)})}function Fl(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...b(t)})}function ao(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...b(t)})}function uo(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...b(t)})}function co(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...b(t)})}function so(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...b(t)})}function lo(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...b(t)})}function fo(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...b(t)})}const Vl={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Bl(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...b(t)})}function Kl(e,t){return new e({type:"string",format:"date",check:"string_format",...b(t)})}function Jl(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...b(t)})}function Gl(e,t){return new e({type:"string",format:"duration",check:"string_format",...b(t)})}function ql(e,t){return new e({type:"number",checks:[],...b(t)})}function Wl(e,t){return new e({type:"number",coerce:!0,checks:[],...b(t)})}function Hl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...b(t)})}function Xl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...b(t)})}function Yl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...b(t)})}function Ql(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...b(t)})}function ed(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...b(t)})}function td(e,t){return new e({type:"boolean",...b(t)})}function nd(e,t){return new e({type:"boolean",coerce:!0,...b(t)})}function rd(e,t){return new e({type:"bigint",...b(t)})}function id(e,t){return new e({type:"bigint",coerce:!0,...b(t)})}function od(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...b(t)})}function ad(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...b(t)})}function ud(e,t){return new e({type:"symbol",...b(t)})}function cd(e,t){return new e({type:"undefined",...b(t)})}function sd(e,t){return new e({type:"null",...b(t)})}function ld(e){return new e({type:"any"})}function dd(e){return new e({type:"unknown"})}function fd(e,t){return new e({type:"never",...b(t)})}function md(e,t){return new e({type:"void",...b(t)})}function pd(e,t){return new e({type:"date",...b(t)})}function hd(e,t){return new e({type:"date",coerce:!0,...b(t)})}function gd(e,t){return new e({type:"nan",...b(t)})}function Fe(e,t){return new Ai({check:"less_than",...b(t),value:e,inclusive:!1})}function _e(e,t){return new Ai({check:"less_than",...b(t),value:e,inclusive:!0})}function Ve(e,t){return new Li({check:"greater_than",...b(t),value:e,inclusive:!1})}function fe(e,t){return new Li({check:"greater_than",...b(t),value:e,inclusive:!0})}function mo(e){return Ve(0,e)}function po(e){return Fe(0,e)}function ho(e){return _e(0,e)}function go(e){return fe(0,e)}function ht(e,t){return new es({check:"multiple_of",...b(t),value:e})}function wt(e,t){return new rs({check:"max_size",...b(t),maximum:e})}function Be(e,t){return new is({check:"min_size",...b(t),minimum:e})}function Kt(e,t){return new os({check:"size_equals",...b(t),size:e})}function Jt(e,t){return new as({check:"max_length",...b(t),maximum:e})}function et(e,t){return new us({check:"min_length",...b(t),minimum:e})}function Gt(e,t){return new cs({check:"length_equals",...b(t),length:e})}function Wn(e,t){return new ss({check:"string_format",format:"regex",...b(t),pattern:e})}function Hn(e){return new ls({check:"string_format",format:"lowercase",...b(e)})}function Xn(e){return new ds({check:"string_format",format:"uppercase",...b(e)})}function Yn(e,t){return new fs({check:"string_format",format:"includes",...b(t),includes:e})}function Qn(e,t){return new ms({check:"string_format",format:"starts_with",...b(t),prefix:e})}function er(e,t){return new ps({check:"string_format",format:"ends_with",...b(t),suffix:e})}function vo(e,t,r){return new hs({check:"property",property:e,schema:t,...b(r)})}function tr(e,t){return new gs({check:"mime_type",mime:e,...b(t)})}function Pe(e){return new vs({check:"overwrite",tx:e})}function nr(e){return Pe(t=>t.normalize(e))}function rr(){return Pe(e=>e.trim())}function ir(){return Pe(e=>e.toLowerCase())}function or(){return Pe(e=>e.toUpperCase())}function ar(){return Pe(e=>Xu(e))}function vd(e,t,r){return new e({type:"array",element:t,...b(r)})}function Lb(e,t,r){return new e({type:"union",options:t,...b(r)})}function Cb(e,t,r){return new e({type:"union",options:t,inclusive:!1,...b(r)})}function Zb(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...b(i)})}function Mb(e,t,r){return new e({type:"intersection",left:t,right:r})}function Rb(e,t,r,i){const n=r instanceof L,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...b(o)})}function Fb(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...b(i)})}function Vb(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...b(i)})}function Bb(e,t,r){return new e({type:"set",valueType:t,...b(r)})}function Kb(e,t,r){const i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...b(r)})}function Jb(e,t,r){return new e({type:"enum",entries:t,...b(r)})}function Gb(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...b(r)})}function bd(e,t){return new e({type:"file",...b(t)})}function qb(e,t){return new e({type:"transform",transform:t})}function Wb(e,t){return new e({type:"optional",innerType:t})}function Hb(e,t){return new e({type:"nullable",innerType:t})}function Xb(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Bn(r)}})}function Yb(e,t,r){return new e({type:"nonoptional",innerType:t,...b(r)})}function Qb(e,t){return new e({type:"success",innerType:t})}function e1(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function t1(e,t,r){return new e({type:"pipe",in:t,out:r})}function n1(e,t){return new e({type:"readonly",innerType:t})}function r1(e,t,r){return new e({type:"template_literal",parts:t,...b(r)})}function i1(e,t){return new e({type:"lazy",getter:t})}function o1(e,t){return new e({type:"promise",innerType:t})}function _d(e,t,r){const i=b(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function yd(e,t,r){return new e({type:"custom",check:"custom",fn:t,...b(r)})}function $d(e){const t=wd(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(mt(i,r.value,t._zod.def));else{const n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(mt(n))}},e(r.value,r)));return t}function wd(e,t){const r=new X({check:"custom",...b(t)});return r._zod.check=e,r}function Sd(e){const t=new X({check:"describe"});return t._zod.onattach=[r=>{const i=be.get(r)??{};be.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function kd(e){const t=new X({check:"meta"});return t._zod.onattach=[r=>{const i=be.get(r)??{};be.add(r,{...i,...e})}],t._zod.check=()=>{},t}function Id(e,t){const r=b(t);let i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(m=>typeof m=="string"?m.toLowerCase():m),n=n.map(m=>typeof m=="string"?m.toLowerCase():m));const o=new Set(i),a=new Set(n),u=e.Codec??Bi,s=e.Boolean??Mi,c=e.String??Bt,l=new c({type:"string",error:r.error}),d=new s({type:"boolean",error:r.error}),f=new u({type:"pipe",in:l,out:d,transform:((m,h)=>{let p=m;return r.case!=="sensitive"&&(p=p.toLowerCase()),o.has(p)?!0:a.has(p)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:h.value,inst:f,continue:!1}),{})}),reverseTransform:((m,h)=>m===!0?i[0]||"true":n[0]||"false"),error:r.error});return f}function qt(e,t,r,i={}){const n=b(i),o={...b(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:u=>r.test(u),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}function gt(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??be,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function B(e,t,r={path:[],schemaPath:[]}){var l,d;var i;const n=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const u=(d=(l=e._zod).toJSONSchema)==null?void 0:d.call(l);if(u)a.schema=u;else{const f={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,f);else{const h=a.schema,p=t.processors[n.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);p(e,t,h,f)}const m=e._zod.parent;m&&(a.ref||(a.ref=m),B(m,t,f),t.seen.get(m).isParent=!0)}const s=t.metadataRegistry.get(e);return s&&Object.assign(a.schema,s),t.io==="input"&&de(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function vt(e,t){var a,u,s,c;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const l of e.seen.entries()){const d=(a=e.metadataRegistry.get(l[0]))==null?void 0:a.id;if(d){const f=i.get(d);if(f&&f!==l[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(d,l[0])}}const n=l=>{var p;const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=(p=e.external.registry.get(l[0]))==null?void 0:p.id,w=e.external.uri??(T=>T);if(v)return{ref:w(v)};const E=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=E,{defId:E,ref:`${w("__shared")}#/${d}/${E}`}}if(l[1]===r)return{ref:"#"};const m=`#/${d}/`,h=l[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:m+h}},o=l=>{if(l[1].schema.$ref)return;const d=l[1],{ref:f,defId:m}=n(l);d.def={...d.schema},m&&(d.defId=m);const h=d.schema;for(const p in h)delete h[p];h.$ref=f};if(e.cycles==="throw")for(const l of e.seen.entries()){const d=l[1];if(d.cycle)throw new Error(`Cycle detected: #/${(u=d.cycle)==null?void 0:u.join("/")}/<root>
|
|
62
62
|
|
|
63
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const d=l[1];if(t===l[0]){o(l);continue}if(e.external){const m=(s=e.external.registry.get(l[0]))==null?void 0:s.id;if(t!==l[0]&&m){o(l);continue}}if((c=e.metadataRegistry.get(l[0]))==null?void 0:c.id){o(l);continue}if(d.cycle){o(l);continue}if(d.count>1&&e.reused==="ref"){o(l);continue}}}function gt(e,t){var a,u,s;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=c=>{const l=e.seen.get(c);if(l.ref===null)return;const d=l.def??l.schema,f={...d},m=l.ref;if(l.ref=null,m){i(m);const h=e.seen.get(m),v=h.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(v)):Object.assign(d,v),Object.assign(d,f),c._zod.parent===m)for(const T in d)T==="$ref"||T==="allOf"||T in f||delete d[T];if(v.$ref&&h.def)for(const T in d)T==="$ref"||T==="allOf"||T in h.def&&JSON.stringify(d[T])===JSON.stringify(h.def[T])&&delete d[T]}const g=c._zod.parent;if(g&&g!==m){i(g);const h=e.seen.get(g);if(h!=null&&h.schema.$ref&&(d.$ref=h.schema.$ref,h.def))for(const v in d)v==="$ref"||v==="allOf"||v in h.def&&JSON.stringify(d[v])===JSON.stringify(h.def[v])&&delete d[v]}e.override({zodSchema:c,jsonSchema:d,path:l.path??[]})};for(const c of[...e.seen.entries()].reverse())i(c[0]);const n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const c=(u=e.external.registry.get(t))==null?void 0:u.id;if(!c)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(c)}Object.assign(n,r.def??r.schema);const o=((s=e.external)==null?void 0:s.defs)??{};for(const c of e.seen.entries()){const l=c[1];l.def&&l.defId&&(o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?n.$defs=o:n.definitions=o);try{const c=JSON.parse(JSON.stringify(n));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Tt(t,"input",e.processors),output:Tt(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function de(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return de(i.element,r);if(i.type==="set")return de(i.valueType,r);if(i.type==="lazy")return de(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return de(i.innerType,r);if(i.type==="intersection")return de(i.left,r)||de(i.right,r);if(i.type==="record"||i.type==="map")return de(i.keyType,r)||de(i.valueType,r);if(i.type==="pipe")return de(i.in,r)||de(i.out,r);if(i.type==="object"){for(const n in i.shape)if(de(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(const n of i.options)if(de(n,r))return!0;return!1}if(i.type==="tuple"){for(const n of i.items)if(de(n,r))return!0;return!!(i.rest&&de(i.rest,r))}return!1}const hd=(e,t={})=>r=>{const i=pt({...r,processors:t});return K(e,i),ht(i,e),gt(i,e)},Tt=(e,t,r={})=>i=>{const{libraryOptions:n,target:o}=i??{},a=pt({...n??{},target:o,io:t,processors:r});return K(e,a),ht(a,e),gt(a,e)},z1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gd=(e,t,r,i)=>{const n=r;n.type="string";const{minimum:o,maximum:a,format:u,patterns:s,contentEncoding:c}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof a=="number"&&(n.maxLength=a),u&&(n.format=z1[u]??u,n.format===""&&delete n.format,u==="time"&&delete n.format),c&&(n.contentEncoding=c),s&&s.size>0){const l=[...s];l.length===1?n.pattern=l[0].source:l.length>1&&(n.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},vd=(e,t,r,i)=>{const n=r,{minimum:o,maximum:a,format:u,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l}=e._zod.bag;typeof u=="string"&&u.includes("int")?n.type="integer":n.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l),typeof o=="number"&&(n.minimum=o,typeof l=="number"&&t.target!=="draft-04"&&(l>=o?delete n.minimum:delete n.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=c,n.exclusiveMaximum=!0):n.exclusiveMaximum=c),typeof a=="number"&&(n.maximum=a,typeof c=="number"&&t.target!=="draft-04"&&(c<=a?delete n.maximum:delete n.exclusiveMaximum)),typeof s=="number"&&(n.multipleOf=s)},bd=(e,t,r,i)=>{r.type="boolean"},_d=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},yd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},$d=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},wd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Sd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},kd=(e,t,r,i)=>{r.not={}},Id=(e,t,r,i)=>{},xd=(e,t,r,i)=>{},Td=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},zd=(e,t,r,i)=>{const n=e._zod.def,o=mi(n.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},Ed=(e,t,r,i)=>{const n=e._zod.def,o=[];for(const a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){const a=o[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o},Od=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Ud=(e,t,r,i)=>{const n=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},Dd=(e,t,r,i)=>{const n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:u,mime:s}=e._zod.bag;a!==void 0&&(o.minLength=a),u!==void 0&&(o.maxLength=u),s?s.length===1?(o.contentMediaType=s[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=s.map(c=>({contentMediaType:c}))):Object.assign(n,o)},Nd=(e,t,r,i)=>{r.type="boolean"},jd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Pd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Ad=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Cd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Ld=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Zd=(e,t,r,i)=>{const n=r,o=e._zod.def,{minimum:a,maximum:u}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof u=="number"&&(n.maxItems=u),n.type="array",n.items=K(o.element,t,{...i,path:[...i.path,"items"]})},Md=(e,t,r,i)=>{var c;const n=r,o=e._zod.def;n.type="object",n.properties={};const a=o.shape;for(const l in a)n.properties[l]=K(a[l],t,{...i,path:[...i.path,"properties",l]});const u=new Set(Object.keys(a)),s=new Set([...u].filter(l=>{const d=o.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));s.size>0&&(n.required=Array.from(s)),((c=o.catchall)==null?void 0:c._zod.def.type)==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=K(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},lo=(e,t,r,i)=>{const n=e._zod.def,o=n.inclusive===!1,a=n.options.map((u,s)=>K(u,t,{...i,path:[...i.path,o?"oneOf":"anyOf",s]}));o?r.oneOf=a:r.anyOf=a},Rd=(e,t,r,i)=>{const n=e._zod.def,o=K(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=K(n.right,t,{...i,path:[...i.path,"allOf",1]}),u=c=>"allOf"in c&&Object.keys(c).length===1,s=[...u(o)?o.allOf:[o],...u(a)?a.allOf:[a]];r.allOf=s},Fd=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="array";const a=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",s=o.items.map((f,m)=>K(f,t,{...i,path:[...i.path,a,m]})),c=o.rest?K(o.rest,t,{...i,path:[...i.path,u,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=s,c&&(n.items=c)):t.target==="openapi-3.0"?(n.items={anyOf:s},c&&n.items.anyOf.push(c),n.minItems=s.length,c||(n.maxItems=s.length)):(n.items=s,c&&(n.additionalItems=c));const{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(n.minItems=l),typeof d=="number"&&(n.maxItems=d)},Vd=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="object";const a=o.keyType,u=a._zod.bag,s=u==null?void 0:u.patterns;if(o.mode==="loose"&&s&&s.size>0){const l=K(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(const d of s)n.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=K(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=K(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const c=a._zod.values;if(c){const l=[...c].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(n.required=l)}},Bd=(e,t,r,i)=>{const n=e._zod.def,o=K(n.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},Kd=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Jd=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Gd=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},Wd=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},Hd=(e,t,r,i)=>{const n=e._zod.def,o=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;K(o,t,i);const a=t.seen.get(e);a.ref=o},qd=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},Xd=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},fo=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Yd=(e,t,r,i)=>{const n=e._zod.innerType;K(n,t,i);const o=t.seen.get(e);o.ref=n},oi={string:gd,number:vd,boolean:bd,bigint:_d,symbol:yd,null:$d,undefined:wd,void:Sd,never:kd,any:Id,unknown:xd,date:Td,enum:zd,literal:Ed,nan:Od,template_literal:Ud,file:Dd,success:Nd,custom:jd,function:Pd,transform:Ad,map:Cd,set:Ld,array:Zd,object:Md,union:lo,intersection:Rd,tuple:Fd,record:Vd,nullable:Bd,nonoptional:Kd,default:Jd,prefault:Gd,catch:Wd,pipe:Hd,readonly:qd,promise:Xd,optional:fo,lazy:Yd};function Qd(e,t){if("_idmap"in e){const i=e,n=pt({...t,processors:oi}),o={};for(const s of i._idmap.entries()){const[c,l]=s;K(l,n)}const a={},u={registry:i,uri:t==null?void 0:t.uri,defs:o};n.external=u;for(const s of i._idmap.entries()){const[c,l]=s;ht(n,l),a[c]=gt(n,l)}if(Object.keys(o).length>0){const s=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[s]:o}}return{schemas:a}}const r=pt({...t,processors:oi});return K(e,r),ht(r,e),gt(r,e)}class E1{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=(t==null?void 0:t.target)??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=pt({processors:oi,target:r,...(t==null?void 0:t.metadata)&&{metadata:t.metadata},...(t==null?void 0:t.unrepresentable)&&{unrepresentable:t.unrepresentable},...(t==null?void 0:t.override)&&{override:t.override},...(t==null?void 0:t.io)&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return K(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),ht(this.ctx,t);const i=gt(this.ctx,t),{"~standard":n,...o}=i;return o}}const O1=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),U1=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:Rs,$ZodArray:Js,$ZodAsyncError:Xe,$ZodBase64:Es,$ZodBase64URL:Us,$ZodBigInt:ji,$ZodBigIntFormat:Cs,$ZodBoolean:Ni,$ZodCIDRv4:Ts,$ZodCIDRv6:zs,$ZodCUID:hs,$ZodCUID2:gs,$ZodCatch:ml,$ZodCheck:q,$ZodCheckBigIntFormat:Kc,$ZodCheckEndsWith:rs,$ZodCheckGreaterThan:Oi,$ZodCheckIncludes:ts,$ZodCheckLengthEquals:Xc,$ZodCheckLessThan:Ei,$ZodCheckLowerCase:Qc,$ZodCheckMaxLength:Hc,$ZodCheckMaxSize:Jc,$ZodCheckMimeType:os,$ZodCheckMinLength:qc,$ZodCheckMinSize:Gc,$ZodCheckMultipleOf:Vc,$ZodCheckNumberFormat:Bc,$ZodCheckOverwrite:as,$ZodCheckProperty:is,$ZodCheckRegex:Yc,$ZodCheckSizeEquals:Wc,$ZodCheckStartsWith:ns,$ZodCheckStringFormat:Rt,$ZodCheckUpperCase:es,$ZodCodec:Ci,$ZodCustom:$l,$ZodCustomStringFormat:Ps,$ZodDate:Ks,$ZodDefault:sl,$ZodDiscriminatedUnion:Ys,$ZodE164:Ds,$ZodEmail:ds,$ZodEmoji:ms,$ZodEncodeError:Zn,$ZodEnum:rl,$ZodError:hi,$ZodExactOptional:ul,$ZodFile:ol,$ZodFunction:bl,$ZodGUID:ss,$ZodIPv4:ks,$ZodIPv6:Is,$ZodISODate:$s,$ZodISODateTime:ys,$ZodISODuration:Ss,$ZodISOTime:ws,$ZodIntersection:Qs,$ZodJWT:js,$ZodKSUID:_s,$ZodLazy:yl,$ZodLiteral:il,$ZodMAC:xs,$ZodMap:tl,$ZodNaN:pl,$ZodNanoID:ps,$ZodNever:Vs,$ZodNonOptional:dl,$ZodNull:Ms,$ZodNullable:cl,$ZodNumber:Di,$ZodNumberFormat:As,$ZodObject:Hs,$ZodObjectJIT:qs,$ZodOptional:Ai,$ZodPipe:hl,$ZodPrefault:ll,$ZodPromise:_l,$ZodReadonly:gl,$ZodRealError:he,$ZodRecord:el,$ZodRegistry:zl,$ZodSet:nl,$ZodString:Ft,$ZodStringFormat:W,$ZodSuccess:fl,$ZodSymbol:Ls,$ZodTemplateLiteral:vl,$ZodTransform:al,$ZodTuple:Pi,$ZodType:C,$ZodULID:vs,$ZodURL:fs,$ZodUUID:ls,$ZodUndefined:Zs,$ZodUnion:Bn,$ZodUnknown:Fs,$ZodVoid:Bs,$ZodXID:bs,$ZodXor:Xs,$brand:Lu,$constructor:p,$input:Tl,$output:xl,Doc:us,JSONSchema:O1,JSONSchemaGenerator:E1,NEVER:Cu,TimePrecision:Dl,_any:Ql,_array:ad,_base64:to,_base64url:no,_bigint:Jl,_boolean:Bl,_catch:w1,_check:dd,_cidrv4:Qi,_cidrv6:eo,_coercedBigint:Gl,_coercedBoolean:Kl,_coercedDate:id,_coercedNumber:Ll,_coercedString:Ol,_cuid:Ji,_cuid2:Gi,_custom:cd,_date:rd,_decode:_i,_decodeAsync:$i,_default:_1,_discriminatedUnion:u1,_e164:ro,_email:Zi,_emoji:Bi,_encode:bi,_encodeAsync:yi,_endsWith:Xn,_enum:m1,_file:ud,_float32:Ml,_float64:Rl,_gt:Ve,_gte:fe,_guid:zn,_includes:Hn,_int:Zl,_int32:Fl,_int64:Wl,_intersection:c1,_ipv4:Xi,_ipv6:Yi,_isoDate:jl,_isoDateTime:Nl,_isoDuration:Al,_isoTime:Pl,_jwt:io,_ksuid:qi,_lazy:x1,_length:Kt,_literal:h1,_lowercase:Gn,_lt:Fe,_lte:_e,_mac:Ul,_map:d1,_max:_e,_maxLength:Bt,_maxSize:_t,_mime:Yn,_min:fe,_minLength:Qe,_minSize:Be,_multipleOf:mt,_nan:od,_nanoid:Ki,_nativeEnum:p1,_negative:ao,_never:td,_nonnegative:co,_nonoptional:y1,_nonpositive:uo,_normalize:Qn,_null:Yl,_nullable:b1,_number:Cl,_optional:v1,_overwrite:Ae,_parse:Pt,_parseAsync:At,_pipe:S1,_positive:oo,_promise:T1,_property:so,_readonly:k1,_record:l1,_refine:sd,_regex:Jn,_safeDecode:Si,_safeDecodeAsync:Ii,_safeEncode:wi,_safeEncodeAsync:ki,_safeParse:Ct,_safeParseAsync:Lt,_set:f1,_size:Vt,_slugify:rr,_startsWith:qn,_string:El,_stringFormat:Jt,_stringbool:pd,_success:$1,_superRefine:ld,_symbol:ql,_templateLiteral:I1,_toLowerCase:tr,_toUpperCase:nr,_transform:g1,_trim:er,_tuple:s1,_uint32:Vl,_uint64:Hl,_ulid:Wi,_undefined:Xl,_union:o1,_unknown:ed,_uppercase:Wn,_url:Kn,_uuid:Mi,_uuidv4:Ri,_uuidv6:Fi,_uuidv7:Vi,_void:nd,_xid:Hi,_xor:a1,clone:$e,config:se,createStandardJSONSchemaMethod:Tt,createToJSONSchemaMethod:hd,decode:Vh,decodeAsync:Kh,describe:fd,encode:Fh,encodeAsync:Bh,extractDefs:ht,finalize:gt,flattenError:gi,formatError:vi,globalConfig:kn,globalRegistry:be,initializeContext:pt,isValidBase64:Ui,isValidBase64URL:Os,isValidJWT:Ns,locales:Il,meta:md,parse:ni,parseAsync:ri,prettifyError:oc,process:K,regexes:zi,registry:Li,safeDecode:Gh,safeDecodeAsync:Hh,safeEncode:Jh,safeEncodeAsync:Wh,safeParse:ac,safeParseAsync:uc,toDotPath:ic,toJSONSchema:Qd,treeifyError:rc,util:tc,version:cs},Symbol.toStringTag,{value:"Module"})),D1=Object.freeze(Object.defineProperty({__proto__:null,endsWith:Xn,gt:Ve,gte:fe,includes:Hn,length:Kt,lowercase:Gn,lt:Fe,lte:_e,maxLength:Bt,maxSize:_t,mime:Yn,minLength:Qe,minSize:Be,multipleOf:mt,negative:ao,nonnegative:co,nonpositive:uo,normalize:Qn,overwrite:Ae,positive:oo,property:so,regex:Jn,size:Vt,slugify:rr,startsWith:qn,toLowerCase:tr,toUpperCase:nr,trim:er,uppercase:Wn},Symbol.toStringTag,{value:"Module"})),mo=p("ZodISODateTime",(e,t)=>{ys.init(e,t),H.init(e,t)});function ef(e){return Nl(mo,e)}const po=p("ZodISODate",(e,t)=>{$s.init(e,t),H.init(e,t)});function tf(e){return jl(po,e)}const ho=p("ZodISOTime",(e,t)=>{ws.init(e,t),H.init(e,t)});function nf(e){return Pl(ho,e)}const go=p("ZodISODuration",(e,t)=>{Ss.init(e,t),H.init(e,t)});function rf(e){return Al(go,e)}const of=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:po,ZodISODateTime:mo,ZodISODuration:go,ZodISOTime:ho,date:tf,datetime:ef,duration:rf,time:nf},Symbol.toStringTag,{value:"Module"})),af=(e,t)=>{hi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>vi(e,r)},flatten:{value:r=>gi(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,In,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,In,2)}},isEmpty:{get(){return e.issues.length===0}}})},N1=p("ZodError",af),ge=p("ZodError",af,{Parent:Error}),uf=Pt(ge),cf=At(ge),sf=Ct(ge),lf=Lt(ge),df=bi(ge),ff=_i(ge),mf=yi(ge),pf=$i(ge),hf=wi(ge),gf=Si(ge),vf=ki(ge),bf=Ii(ge),Z=p("ZodType",(e,t)=>(C.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Tt(e,"input"),output:Tt(e,"output")}}),e.toJSONSchema=hd(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Oe(t,{checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(r,i)=>$e(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>uf(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>sf(e,r,i),e.parseAsync=async(r,i)=>cf(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>lf(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>df(e,r,i),e.decode=(r,i)=>ff(e,r,i),e.encodeAsync=async(r,i)=>mf(e,r,i),e.decodeAsync=async(r,i)=>pf(e,r,i),e.safeEncode=(r,i)=>hf(e,r,i),e.safeDecode=(r,i)=>gf(e,r,i),e.safeEncodeAsync=async(r,i)=>vf(e,r,i),e.safeDecodeAsync=async(r,i)=>bf(e,r,i),e.refine=(r,i)=>e.check(aa(r,i)),e.superRefine=r=>e.check(ua(r)),e.overwrite=r=>e.check(Ae(r)),e.optional=()=>Et(e),e.exactOptional=()=>Fo(e),e.nullable=()=>Ot(e),e.nullish=()=>Et(Ot(e)),e.nonoptional=r=>Wo(e,r),e.array=()=>Yt(e),e.or=r=>kr([e,r]),e.and=r=>Do(e,r),e.transform=r=>Ut(e,xr(r)),e.default=r=>Ko(e,r),e.prefault=r=>Go(e,r),e.catch=r=>Xo(e,r),e.pipe=r=>Ut(e,r),e.readonly=()=>ea(e),e.describe=r=>{const i=e.clone();return be.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){var r;return(r=be.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return be.get(e);const i=e.clone();return be.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),ir=p("_ZodString",(e,t)=>{Ft.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>gd(e,i,n);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(Jn(...i)),e.includes=(...i)=>e.check(Hn(...i)),e.startsWith=(...i)=>e.check(qn(...i)),e.endsWith=(...i)=>e.check(Xn(...i)),e.min=(...i)=>e.check(Qe(...i)),e.max=(...i)=>e.check(Bt(...i)),e.length=(...i)=>e.check(Kt(...i)),e.nonempty=(...i)=>e.check(Qe(1,...i)),e.lowercase=i=>e.check(Gn(i)),e.uppercase=i=>e.check(Wn(i)),e.trim=()=>e.check(er()),e.normalize=(...i)=>e.check(Qn(...i)),e.toLowerCase=()=>e.check(tr()),e.toUpperCase=()=>e.check(nr()),e.slugify=()=>e.check(rr())}),Gt=p("ZodString",(e,t)=>{Ft.init(e,t),ir.init(e,t),e.email=r=>e.check(Zi(or,r)),e.url=r=>e.check(Kn(Wt,r)),e.jwt=r=>e.check(io(yr,r)),e.emoji=r=>e.check(Bi(ar,r)),e.guid=r=>e.check(zn(zt,r)),e.uuid=r=>e.check(Mi(ze,r)),e.uuidv4=r=>e.check(Ri(ze,r)),e.uuidv6=r=>e.check(Fi(ze,r)),e.uuidv7=r=>e.check(Vi(ze,r)),e.nanoid=r=>e.check(Ki(ur,r)),e.guid=r=>e.check(zn(zt,r)),e.cuid=r=>e.check(Ji(cr,r)),e.cuid2=r=>e.check(Gi(sr,r)),e.ulid=r=>e.check(Wi(lr,r)),e.base64=r=>e.check(to(vr,r)),e.base64url=r=>e.check(no(br,r)),e.xid=r=>e.check(Hi(dr,r)),e.ksuid=r=>e.check(qi(fr,r)),e.ipv4=r=>e.check(Xi(mr,r)),e.ipv6=r=>e.check(Yi(pr,r)),e.cidrv4=r=>e.check(Qi(hr,r)),e.cidrv6=r=>e.check(eo(gr,r)),e.e164=r=>e.check(ro(_r,r)),e.datetime=r=>e.check(ef(r)),e.date=r=>e.check(tf(r)),e.time=r=>e.check(nf(r)),e.duration=r=>e.check(rf(r))});function En(e){return El(Gt,e)}const H=p("ZodStringFormat",(e,t)=>{W.init(e,t),ir.init(e,t)}),or=p("ZodEmail",(e,t)=>{ds.init(e,t),H.init(e,t)});function _f(e){return Zi(or,e)}const zt=p("ZodGUID",(e,t)=>{ss.init(e,t),H.init(e,t)});function yf(e){return zn(zt,e)}const ze=p("ZodUUID",(e,t)=>{ls.init(e,t),H.init(e,t)});function $f(e){return Mi(ze,e)}function wf(e){return Ri(ze,e)}function Sf(e){return Fi(ze,e)}function kf(e){return Vi(ze,e)}const Wt=p("ZodURL",(e,t)=>{fs.init(e,t),H.init(e,t)});function If(e){return Kn(Wt,e)}function xf(e){return Kn(Wt,{protocol:/^https?$/,hostname:xc,...b(e)})}const ar=p("ZodEmoji",(e,t)=>{ms.init(e,t),H.init(e,t)});function Tf(e){return Bi(ar,e)}const ur=p("ZodNanoID",(e,t)=>{ps.init(e,t),H.init(e,t)});function zf(e){return Ki(ur,e)}const cr=p("ZodCUID",(e,t)=>{hs.init(e,t),H.init(e,t)});function Ef(e){return Ji(cr,e)}const sr=p("ZodCUID2",(e,t)=>{gs.init(e,t),H.init(e,t)});function Of(e){return Gi(sr,e)}const lr=p("ZodULID",(e,t)=>{vs.init(e,t),H.init(e,t)});function Uf(e){return Wi(lr,e)}const dr=p("ZodXID",(e,t)=>{bs.init(e,t),H.init(e,t)});function Df(e){return Hi(dr,e)}const fr=p("ZodKSUID",(e,t)=>{_s.init(e,t),H.init(e,t)});function Nf(e){return qi(fr,e)}const mr=p("ZodIPv4",(e,t)=>{ks.init(e,t),H.init(e,t)});function jf(e){return Xi(mr,e)}const vo=p("ZodMAC",(e,t)=>{xs.init(e,t),H.init(e,t)});function Pf(e){return Ul(vo,e)}const pr=p("ZodIPv6",(e,t)=>{Is.init(e,t),H.init(e,t)});function Af(e){return Yi(pr,e)}const hr=p("ZodCIDRv4",(e,t)=>{Ts.init(e,t),H.init(e,t)});function Cf(e){return Qi(hr,e)}const gr=p("ZodCIDRv6",(e,t)=>{zs.init(e,t),H.init(e,t)});function Lf(e){return eo(gr,e)}const vr=p("ZodBase64",(e,t)=>{Es.init(e,t),H.init(e,t)});function Zf(e){return to(vr,e)}const br=p("ZodBase64URL",(e,t)=>{Us.init(e,t),H.init(e,t)});function Mf(e){return no(br,e)}const _r=p("ZodE164",(e,t)=>{Ds.init(e,t),H.init(e,t)});function Rf(e){return ro(_r,e)}const yr=p("ZodJWT",(e,t)=>{js.init(e,t),H.init(e,t)});function Ff(e){return io(yr,e)}const yt=p("ZodCustomStringFormat",(e,t)=>{Ps.init(e,t),H.init(e,t)});function Vf(e,t,r={}){return Jt(yt,e,t,r)}function Bf(e){return Jt(yt,"hostname",Ic,e)}function Kf(e){return Jt(yt,"hex",Rc,e)}function Jf(e,t){const r=(t==null?void 0:t.enc)??"hex",i=`${e}_${r}`,n=zi[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return Jt(yt,i,n,t)}const Ht=p("ZodNumber",(e,t)=>{Di.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>vd(e,i,n),e.gt=(i,n)=>e.check(Ve(i,n)),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.lt=(i,n)=>e.check(Fe(i,n)),e.lte=(i,n)=>e.check(_e(i,n)),e.max=(i,n)=>e.check(_e(i,n)),e.int=i=>e.check(On(i)),e.safe=i=>e.check(On(i)),e.positive=i=>e.check(Ve(0,i)),e.nonnegative=i=>e.check(fe(0,i)),e.negative=i=>e.check(Fe(0,i)),e.nonpositive=i=>e.check(_e(0,i)),e.multipleOf=(i,n)=>e.check(mt(i,n)),e.step=(i,n)=>e.check(mt(i,n)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function bo(e){return Cl(Ht,e)}const nt=p("ZodNumberFormat",(e,t)=>{As.init(e,t),Ht.init(e,t)});function On(e){return Zl(nt,e)}function Gf(e){return Ml(nt,e)}function Wf(e){return Rl(nt,e)}function Hf(e){return Fl(nt,e)}function qf(e){return Vl(nt,e)}const qt=p("ZodBoolean",(e,t)=>{Ni.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bd(e,r,i)});function _o(e){return Bl(qt,e)}const Xt=p("ZodBigInt",(e,t)=>{ji.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>_d(e,i),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.gt=(i,n)=>e.check(Ve(i,n)),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.lt=(i,n)=>e.check(Fe(i,n)),e.lte=(i,n)=>e.check(_e(i,n)),e.max=(i,n)=>e.check(_e(i,n)),e.positive=i=>e.check(Ve(BigInt(0),i)),e.negative=i=>e.check(Fe(BigInt(0),i)),e.nonpositive=i=>e.check(_e(BigInt(0),i)),e.nonnegative=i=>e.check(fe(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(mt(i,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Xf(e){return Jl(Xt,e)}const $r=p("ZodBigIntFormat",(e,t)=>{Cs.init(e,t),Xt.init(e,t)});function Yf(e){return Wl($r,e)}function Qf(e){return Hl($r,e)}const yo=p("ZodSymbol",(e,t)=>{Ls.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>yd(e,r)});function em(e){return ql(yo,e)}const $o=p("ZodUndefined",(e,t)=>{Zs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wd(e,r)});function tm(e){return Xl($o,e)}const wo=p("ZodNull",(e,t)=>{Ms.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$d(e,r,i)});function So(e){return Yl(wo,e)}const ko=p("ZodAny",(e,t)=>{Rs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Id()});function nm(){return Ql(ko)}const Io=p("ZodUnknown",(e,t)=>{Fs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xd()});function et(){return ed(Io)}const xo=p("ZodNever",(e,t)=>{Vs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>kd(e,r,i)});function wr(e){return td(xo,e)}const To=p("ZodVoid",(e,t)=>{Bs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sd(e,r)});function rm(e){return nd(To,e)}const Sr=p("ZodDate",(e,t)=>{Ks.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Td(e,i),e.min=(i,n)=>e.check(fe(i,n)),e.max=(i,n)=>e.check(_e(i,n));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function im(e){return rd(Sr,e)}const zo=p("ZodArray",(e,t)=>{Js.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Zd(e,r,i,n),e.element=t.element,e.min=(r,i)=>e.check(Qe(r,i)),e.nonempty=r=>e.check(Qe(1,r)),e.max=(r,i)=>e.check(Bt(r,i)),e.length=(r,i)=>e.check(Kt(r,i)),e.unwrap=()=>e.element});function Yt(e,t){return ad(zo,e,t)}function om(e){const t=e._zod.def.shape;return Ir(Object.keys(t))}const Qt=p("ZodObject",(e,t)=>{qs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Md(e,r,i,n),M(e,"shape",()=>t.shape),e.keyof=()=>Ir(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:et()}),e.loose=()=>e.clone({...e._zod.def,catchall:et()}),e.strict=()=>e.clone({...e._zod.def,catchall:wr()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Wu(e,r),e.safeExtend=r=>Hu(e,r),e.merge=r=>qu(e,r),e.pick=r=>Ju(e,r),e.omit=r=>Gu(e,r),e.partial=(...r)=>Xu(Tr,e,r[0]),e.required=(...r)=>Yu(zr,e,r[0])});function am(e,t){const r={type:"object",shape:e??{},...b(t)};return new Qt(r)}function um(e,t){return new Qt({type:"object",shape:e,catchall:wr(),...b(t)})}function cm(e,t){return new Qt({type:"object",shape:e,catchall:et(),...b(t)})}const en=p("ZodUnion",(e,t)=>{Bn.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lo(e,r,i,n),e.options=t.options});function kr(e,t){return new en({type:"union",options:e,...b(t)})}const Eo=p("ZodXor",(e,t)=>{en.init(e,t),Xs.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lo(e,r,i,n),e.options=t.options});function sm(e,t){return new Eo({type:"union",options:e,inclusive:!1,...b(t)})}const Oo=p("ZodDiscriminatedUnion",(e,t)=>{en.init(e,t),Ys.init(e,t)});function lm(e,t,r){return new Oo({type:"union",options:t,discriminator:e,...b(r)})}const Uo=p("ZodIntersection",(e,t)=>{Qs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Rd(e,r,i,n)});function Do(e,t){return new Uo({type:"intersection",left:e,right:t})}const No=p("ZodTuple",(e,t)=>{Pi.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fd(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function jo(e,t,r){const i=t instanceof C,n=i?r:t,o=i?t:null;return new No({type:"tuple",items:e,rest:o,...b(n)})}const tn=p("ZodRecord",(e,t)=>{el.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Vd(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function Po(e,t,r){return new tn({type:"record",keyType:e,valueType:t,...b(r)})}function dm(e,t,r){const i=$e(e);return i._zod.values=void 0,new tn({type:"record",keyType:i,valueType:t,...b(r)})}function fm(e,t,r){return new tn({type:"record",keyType:e,valueType:t,mode:"loose",...b(r)})}const Ao=p("ZodMap",(e,t)=>{tl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Cd(e,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Be(...r)),e.nonempty=r=>e.check(Be(1,r)),e.max=(...r)=>e.check(_t(...r)),e.size=(...r)=>e.check(Vt(...r))});function mm(e,t,r){return new Ao({type:"map",keyType:e,valueType:t,...b(r)})}const Co=p("ZodSet",(e,t)=>{nl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ld(e,r),e.min=(...r)=>e.check(Be(...r)),e.nonempty=r=>e.check(Be(1,r)),e.max=(...r)=>e.check(_t(...r)),e.size=(...r)=>e.check(Vt(...r))});function pm(e,t){return new Co({type:"set",valueType:e,...b(t)})}const vt=p("ZodEnum",(e,t)=>{rl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>zd(e,i,n),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{const o={};for(const a of i)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new vt({...t,checks:[],...b(n),entries:o})},e.exclude=(i,n)=>{const o={...t.entries};for(const a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new vt({...t,checks:[],...b(n),entries:o})}});function Ir(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new vt({type:"enum",entries:r,...b(t)})}function hm(e,t){return new vt({type:"enum",entries:e,...b(t)})}const Lo=p("ZodLiteral",(e,t)=>{il.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ed(e,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function gm(e,t){return new Lo({type:"literal",values:Array.isArray(e)?e:[e],...b(t)})}const Zo=p("ZodFile",(e,t)=>{ol.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dd(e,r,i),e.min=(r,i)=>e.check(Be(r,i)),e.max=(r,i)=>e.check(_t(r,i)),e.mime=(r,i)=>e.check(Yn(Array.isArray(r)?r:[r],i))});function vm(e){return ud(Zo,e)}const Mo=p("ZodTransform",(e,t)=>{al.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ad(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Zn(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(dt(o,r.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(dt(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function xr(e){return new Mo({type:"transform",transform:e})}const Tr=p("ZodOptional",(e,t)=>{Ai.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>fo(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Et(e){return new Tr({type:"optional",innerType:e})}const Ro=p("ZodExactOptional",(e,t)=>{ul.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>fo(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Fo(e){return new Ro({type:"optional",innerType:e})}const Vo=p("ZodNullable",(e,t)=>{cl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Ot(e){return new Vo({type:"nullable",innerType:e})}function bm(e){return Et(Ot(e))}const Bo=p("ZodDefault",(e,t)=>{sl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Jd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ko(e,t){return new Bo({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Rn(t)}})}const Jo=p("ZodPrefault",(e,t)=>{ll.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Gd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Go(e,t){return new Jo({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Rn(t)}})}const zr=p("ZodNonOptional",(e,t)=>{dl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Kd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Wo(e,t){return new zr({type:"nonoptional",innerType:e,...b(t)})}const Ho=p("ZodSuccess",(e,t)=>{fl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nd(e,r,i),e.unwrap=()=>e._zod.def.innerType});function _m(e){return new Ho({type:"success",innerType:e})}const qo=p("ZodCatch",(e,t)=>{ml.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Wd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Xo(e,t){return new qo({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Yo=p("ZodNaN",(e,t)=>{pl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Od(e,r)});function ym(e){return od(Yo,e)}const Er=p("ZodPipe",(e,t)=>{hl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Hd(e,r,i,n),e.in=t.in,e.out=t.out});function Ut(e,t){return new Er({type:"pipe",in:e,out:t})}const Or=p("ZodCodec",(e,t)=>{Er.init(e,t),Ci.init(e,t)});function $m(e,t,r){return new Or({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}const Qo=p("ZodReadonly",(e,t)=>{gl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>qd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ea(e){return new Qo({type:"readonly",innerType:e})}const ta=p("ZodTemplateLiteral",(e,t)=>{vl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ud(e,r,i)});function wm(e,t){return new ta({type:"template_literal",parts:e,...b(t)})}const na=p("ZodLazy",(e,t)=>{yl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Yd(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function ra(e){return new na({type:"lazy",getter:e})}const ia=p("ZodPromise",(e,t)=>{_l.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Xd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Sm(e){return new ia({type:"promise",innerType:e})}const oa=p("ZodFunction",(e,t)=>{bl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pd(e,r)});function Un(e){return new oa({type:"function",input:Array.isArray(e==null?void 0:e.input)?jo(e==null?void 0:e.input):(e==null?void 0:e.input)??Yt(et()),output:(e==null?void 0:e.output)??et()})}const nn=p("ZodCustom",(e,t)=>{$l.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jd(e,r)});function km(e){const t=new q({check:"custom"});return t._zod.check=e,t}function Im(e,t){return cd(nn,e??(()=>!0),t)}function aa(e,t={}){return sd(nn,e,t)}function ua(e){return ld(e)}const xm=fd,Tm=md;function zm(e,t={}){const r=new nn({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...b(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}const Em=(...e)=>pd({Codec:Or,Boolean:qt,String:Gt},...e);function Om(e){const t=ra(()=>kr([En(e),bo(),_o(),So(),Yt(t),Po(En(),t)]));return t}function Um(e,t){return Ut(xr(e),t)}const j1=Object.freeze(Object.defineProperty({__proto__:null,ZodAny:ko,ZodArray:zo,ZodBase64:vr,ZodBase64URL:br,ZodBigInt:Xt,ZodBigIntFormat:$r,ZodBoolean:qt,ZodCIDRv4:hr,ZodCIDRv6:gr,ZodCUID:cr,ZodCUID2:sr,ZodCatch:qo,ZodCodec:Or,ZodCustom:nn,ZodCustomStringFormat:yt,ZodDate:Sr,ZodDefault:Bo,ZodDiscriminatedUnion:Oo,ZodE164:_r,ZodEmail:or,ZodEmoji:ar,ZodEnum:vt,ZodExactOptional:Ro,ZodFile:Zo,ZodFunction:oa,ZodGUID:zt,ZodIPv4:mr,ZodIPv6:pr,ZodIntersection:Uo,ZodJWT:yr,ZodKSUID:fr,ZodLazy:na,ZodLiteral:Lo,ZodMAC:vo,ZodMap:Ao,ZodNaN:Yo,ZodNanoID:ur,ZodNever:xo,ZodNonOptional:zr,ZodNull:wo,ZodNullable:Vo,ZodNumber:Ht,ZodNumberFormat:nt,ZodObject:Qt,ZodOptional:Tr,ZodPipe:Er,ZodPrefault:Jo,ZodPromise:ia,ZodReadonly:Qo,ZodRecord:tn,ZodSet:Co,ZodString:Gt,ZodStringFormat:H,ZodSuccess:Ho,ZodSymbol:yo,ZodTemplateLiteral:ta,ZodTransform:Mo,ZodTuple:No,ZodType:Z,ZodULID:lr,ZodURL:Wt,ZodUUID:ze,ZodUndefined:$o,ZodUnion:en,ZodUnknown:Io,ZodVoid:To,ZodXID:dr,ZodXor:Eo,_ZodString:ir,_default:Ko,_function:Un,any:nm,array:Yt,base64:Zf,base64url:Mf,bigint:Xf,boolean:_o,catch:Xo,check:km,cidrv4:Cf,cidrv6:Lf,codec:$m,cuid:Ef,cuid2:Of,custom:Im,date:im,describe:xm,discriminatedUnion:lm,e164:Rf,email:_f,emoji:Tf,enum:Ir,exactOptional:Fo,file:vm,float32:Gf,float64:Wf,function:Un,guid:yf,hash:Jf,hex:Kf,hostname:Bf,httpUrl:xf,instanceof:zm,int:On,int32:Hf,int64:Yf,intersection:Do,ipv4:jf,ipv6:Af,json:Om,jwt:Ff,keyof:om,ksuid:Nf,lazy:ra,literal:gm,looseObject:cm,looseRecord:fm,mac:Pf,map:mm,meta:Tm,nan:ym,nanoid:zf,nativeEnum:hm,never:wr,nonoptional:Wo,null:So,nullable:Ot,nullish:bm,number:bo,object:am,optional:Et,partialRecord:dm,pipe:Ut,prefault:Go,preprocess:Um,promise:Sm,readonly:ea,record:Po,refine:aa,set:pm,strictObject:um,string:En,stringFormat:Vf,stringbool:Em,success:_m,superRefine:ua,symbol:em,templateLiteral:wm,transform:xr,tuple:jo,uint32:qf,uint64:Qf,ulid:Uf,undefined:tm,union:kr,unknown:et,url:If,uuid:$f,uuidv4:wf,uuidv6:Sf,uuidv7:kf,void:rm,xid:Df,xor:sm},Symbol.toStringTag,{value:"Module"})),P1={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function A1(e){se({customError:e})}function C1(){return se().customError}var ai;ai||(ai={});const I={...j1,...D1,iso:of},L1=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Z1(e,t){const r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function M1(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;const i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){const n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function Dm(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return I.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return I.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const o=M1(n,t),a=ue(o,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){const n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return I.null();if(n.length===0)return I.never();if(n.length===1)return I.literal(n[0]);if(n.every(a=>typeof a=="string"))return I.enum(n);const o=n.map(a=>I.literal(a));return o.length<2?o[0]:I.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return I.literal(e.const);const r=e.type;if(Array.isArray(r)){const n=r.map(o=>{const a={...e,type:o};return Dm(a,t)});return n.length===0?I.never():n.length===1?n[0]:I.union(n)}if(!r)return I.any();let i;switch(r){case"string":{let n=I.string();if(e.format){const o=e.format;o==="email"?n=n.check(I.email()):o==="uri"||o==="uri-reference"?n=n.check(I.url()):o==="uuid"||o==="guid"?n=n.check(I.uuid()):o==="date-time"?n=n.check(I.iso.datetime()):o==="date"?n=n.check(I.iso.date()):o==="time"?n=n.check(I.iso.time()):o==="duration"?n=n.check(I.iso.duration()):o==="ipv4"?n=n.check(I.ipv4()):o==="ipv6"?n=n.check(I.ipv6()):o==="mac"?n=n.check(I.mac()):o==="cidr"?n=n.check(I.cidrv4()):o==="cidr-v6"?n=n.check(I.cidrv6()):o==="base64"?n=n.check(I.base64()):o==="base64url"?n=n.check(I.base64url()):o==="e164"?n=n.check(I.e164()):o==="jwt"?n=n.check(I.jwt()):o==="emoji"?n=n.check(I.emoji()):o==="nanoid"?n=n.check(I.nanoid()):o==="cuid"?n=n.check(I.cuid()):o==="cuid2"?n=n.check(I.cuid2()):o==="ulid"?n=n.check(I.ulid()):o==="xid"?n=n.check(I.xid()):o==="ksuid"&&(n=n.check(I.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?I.number().int():I.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case"boolean":{i=I.boolean();break}case"null":{i=I.null();break}case"object":{const n={},o=e.properties||{},a=new Set(e.required||[]);for(const[s,c]of Object.entries(o)){const l=ue(c,t);n[s]=a.has(s)?l:l.optional()}if(e.propertyNames){const s=ue(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?ue(e.additionalProperties,t):I.any();if(Object.keys(n).length===0){i=I.record(s,c);break}const l=I.object(n).passthrough(),d=I.looseRecord(s,c);i=I.intersection(l,d);break}if(e.patternProperties){const s=e.patternProperties,c=Object.keys(s),l=[];for(const f of c){const m=ue(s[f],t),g=I.string().regex(new RegExp(f));l.push(I.looseRecord(g,m))}const d=[];if(Object.keys(n).length>0&&d.push(I.object(n).passthrough()),d.push(...l),d.length===0)i=I.object({}).passthrough();else if(d.length===1)i=d[0];else{let f=I.intersection(d[0],d[1]);for(let m=2;m<d.length;m++)f=I.intersection(f,d[m]);i=f}break}const u=I.object(n);e.additionalProperties===!1?i=u.strict():typeof e.additionalProperties=="object"?i=u.catchall(ue(e.additionalProperties,t)):i=u.passthrough();break}case"array":{const n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){const a=n.map(s=>ue(s,t)),u=o&&typeof o=="object"&&!Array.isArray(o)?ue(o,t):void 0;u?i=I.tuple(a).rest(u):i=I.tuple(a),typeof e.minItems=="number"&&(i=i.check(I.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(I.maxLength(e.maxItems)))}else if(Array.isArray(o)){const a=o.map(s=>ue(s,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?ue(e.additionalItems,t):void 0;u?i=I.tuple(a).rest(u):i=I.tuple(a),typeof e.minItems=="number"&&(i=i.check(I.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(I.maxLength(e.maxItems)))}else if(o!==void 0){const a=ue(o,t);let u=I.array(a);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),i=u}else i=I.array(I.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function ue(e,t){if(typeof e=="boolean")return e?I.any():I.never();let r=Dm(e,t);const i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){const u=e.anyOf.map(c=>ue(c,t)),s=I.union(u);r=i?I.intersection(r,s):s}if(e.oneOf&&Array.isArray(e.oneOf)){const u=e.oneOf.map(c=>ue(c,t)),s=I.xor(u);r=i?I.intersection(r,s):s}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:I.any();else{let u=i?r:ue(e.allOf[0],t);const s=i?0:1;for(let c=s;c<e.allOf.length;c++)u=I.intersection(u,ue(e.allOf[c],t));r=u}e.nullable===!0&&t.version==="openapi-3.0"&&(r=I.nullable(r)),e.readOnly===!0&&(r=I.readonly(r));const n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const u of o)u in e&&(n[u]=e[u]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const u of a)u in e&&(n[u]=e[u]);for(const u of Object.keys(e))L1.has(u)||(n[u]=e[u]);return Object.keys(n).length>0&&t.registry.add(r,n),r}function R1(e,t){if(typeof e=="boolean")return e?I.any():I.never();const r=Z1(e,t==null?void 0:t.defaultTarget),i=e.$defs||e.definitions||{},n={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:(t==null?void 0:t.registry)??be};return ue(e,n)}function F1(e){return Ol(Gt,e)}function V1(e){return Ll(Ht,e)}function B1(e){return Kl(qt,e)}function K1(e){return Gl(Xt,e)}function J1(e){return id(Sr,e)}const G1=Object.freeze(Object.defineProperty({__proto__:null,bigint:K1,boolean:B1,date:J1,number:V1,string:F1},Symbol.toStringTag,{value:"Module"}));se(wl());const Qa=Object.freeze(Object.defineProperty({__proto__:null,$brand:Lu,$input:Tl,$output:xl,NEVER:Cu,TimePrecision:Dl,ZodAny:ko,ZodArray:zo,ZodBase64:vr,ZodBase64URL:br,ZodBigInt:Xt,ZodBigIntFormat:$r,ZodBoolean:qt,ZodCIDRv4:hr,ZodCIDRv6:gr,ZodCUID:cr,ZodCUID2:sr,ZodCatch:qo,ZodCodec:Or,ZodCustom:nn,ZodCustomStringFormat:yt,ZodDate:Sr,ZodDefault:Bo,ZodDiscriminatedUnion:Oo,ZodE164:_r,ZodEmail:or,ZodEmoji:ar,ZodEnum:vt,ZodError:N1,ZodExactOptional:Ro,ZodFile:Zo,get ZodFirstPartyTypeKind(){return ai},ZodFunction:oa,ZodGUID:zt,ZodIPv4:mr,ZodIPv6:pr,ZodISODate:po,ZodISODateTime:mo,ZodISODuration:go,ZodISOTime:ho,ZodIntersection:Uo,ZodIssueCode:P1,ZodJWT:yr,ZodKSUID:fr,ZodLazy:na,ZodLiteral:Lo,ZodMAC:vo,ZodMap:Ao,ZodNaN:Yo,ZodNanoID:ur,ZodNever:xo,ZodNonOptional:zr,ZodNull:wo,ZodNullable:Vo,ZodNumber:Ht,ZodNumberFormat:nt,ZodObject:Qt,ZodOptional:Tr,ZodPipe:Er,ZodPrefault:Jo,ZodPromise:ia,ZodReadonly:Qo,ZodRealError:ge,ZodRecord:tn,ZodSet:Co,ZodString:Gt,ZodStringFormat:H,ZodSuccess:Ho,ZodSymbol:yo,ZodTemplateLiteral:ta,ZodTransform:Mo,ZodTuple:No,ZodType:Z,ZodULID:lr,ZodURL:Wt,ZodUUID:ze,ZodUndefined:$o,ZodUnion:en,ZodUnknown:Io,ZodVoid:To,ZodXID:dr,ZodXor:Eo,_ZodString:ir,_default:Ko,_function:Un,any:nm,array:Yt,base64:Zf,base64url:Mf,bigint:Xf,boolean:_o,catch:Xo,check:km,cidrv4:Cf,cidrv6:Lf,clone:$e,codec:$m,coerce:G1,config:se,core:U1,cuid:Ef,cuid2:Of,custom:Im,date:im,decode:ff,decodeAsync:pf,describe:xm,discriminatedUnion:lm,e164:Rf,email:_f,emoji:Tf,encode:df,encodeAsync:mf,endsWith:Xn,enum:Ir,exactOptional:Fo,file:vm,flattenError:gi,float32:Gf,float64:Wf,formatError:vi,fromJSONSchema:R1,function:Un,getErrorMap:C1,globalRegistry:be,gt:Ve,gte:fe,guid:yf,hash:Jf,hex:Kf,hostname:Bf,httpUrl:xf,includes:Hn,instanceof:zm,int:On,int32:Hf,int64:Yf,intersection:Do,ipv4:jf,ipv6:Af,iso:of,json:Om,jwt:Ff,keyof:om,ksuid:Nf,lazy:ra,length:Kt,literal:gm,locales:Il,looseObject:cm,looseRecord:fm,lowercase:Gn,lt:Fe,lte:_e,mac:Pf,map:mm,maxLength:Bt,maxSize:_t,meta:Tm,mime:Yn,minLength:Qe,minSize:Be,multipleOf:mt,nan:ym,nanoid:zf,nativeEnum:hm,negative:ao,never:wr,nonnegative:co,nonoptional:Wo,nonpositive:uo,normalize:Qn,null:So,nullable:Ot,nullish:bm,number:bo,object:am,optional:Et,overwrite:Ae,parse:uf,parseAsync:cf,partialRecord:dm,pipe:Ut,positive:oo,prefault:Go,preprocess:Um,prettifyError:oc,promise:Sm,property:so,readonly:ea,record:Po,refine:aa,regex:Jn,regexes:zi,registry:Li,safeDecode:gf,safeDecodeAsync:bf,safeEncode:hf,safeEncodeAsync:vf,safeParse:sf,safeParseAsync:lf,set:pm,setErrorMap:A1,size:Vt,slugify:rr,startsWith:qn,strictObject:um,string:En,stringFormat:Vf,stringbool:Em,success:_m,superRefine:ua,symbol:em,templateLiteral:wm,toJSONSchema:Qd,toLowerCase:tr,toUpperCase:nr,transform:xr,treeifyError:rc,trim:er,tuple:jo,uint32:qf,uint64:Qf,ulid:Uf,undefined:tm,union:kr,unknown:et,uppercase:Wn,url:If,util:tc,uuid:$f,uuidv4:wf,uuidv6:Sf,uuidv7:kf,void:rm,xid:Df,xor:sm},Symbol.toStringTag,{value:"Module"}));function eu(e){const t=e.match(/^(.+)\/(flows|sources)\/([^/]+)$/);return t?[t[1],t[3]]:null}function W1(e){const t=e.filter(a=>a.timerange),r=t.filter(a=>a.format==="urn:x-nmos:format:video"||a.format==="urn:x-nmos:format:multi"),i=r.length?r:t;if(!i.length)return"()";const[n,o]=i.reduce(([a,u],s)=>{const c=N.parseTimeRange(s.timerange);let l=c.start?N.timeMomentToSeconds(c.start):null,d=c.end?N.timeMomentToSeconds(c.end):null;return(a===null||l!==null&&l<a)&&(a=l),(u===null||d!==null&&d>u)&&(u=d),[a,u]},[null,null]);return n===null||o===null?"()":N.formatTimeRangeExpr({start:N.secondsToTimeMoment(n),end:N.secondsToTimeMoment(o),isStartInclusive:!0,isEndInclusive:!1})}function tu(e,t){const r=N.parseTimeRange(t);if(r.start===void 0||r.end===void 0)throw new B.OmpError("Can't convert duration to timerange. Timerange is missing start and/or end.");const i=N.timeMomentToSeconds(r.start),n=N.timeMomentToSeconds(r.end);if(n-i<e)return console.warn("Provided duration is longer than timerange, using total timerange",t),t;const o=n-e;return N.formatTimeRangeExpr({start:N.secondsToTimeMoment(o),end:r.end,isEndInclusive:r.isEndInclusive,isStartInclusive:r.isStartInclusive})}function H1(e){const t=e.endsWith("/")?e.slice(0,-1):e;return t.substring(t.lastIndexOf("/")+1)}function nu(e){switch(e.type){case"basic":{const t=btoa(`${e.username}:${e.password}`);return()=>({headers:{Authorization:`Basic ${t}`}})}case"bearer":return()=>({headers:{Authorization:`Bearer ${e.token}`}});case"custom":return e.headers}}function q1(e){return Qa.object({ffomTimeZoneOffset:Qa.number().int().min(-23).max(23).optional()}).safeParse(e).success}const _n="omakase-virtual-flow";class ru{constructor(t,r){k(this,"_tamsApi");this._tamsApi=wh(t,r)}async fetchTamsResource(t){const i=(await this._tamsApi.getUrl(t)).data;return i.source_id?{flow:i}:{source:i}}fetchManifestResources(t,r){return new xt(i=>{(async()=>{try{const n=await this.fetchTamsResource(t);let o;if(n.flow?o=await this._fetchFlow(n.flow.id):o=await this._fetchFirstFlowBySourceId(n.source.id),!o)throw new B.OmpError("Source has no flow representations");const a=await this.fetchFlowResources(o,r);i.next(a),i.complete()}catch(n){i.error(n)}})()})}async fetchFlowResources(t,r){var s;const i=t.id===_n,n=await this._fetchSubflows(((s=t.flow_collection)==null?void 0:s.map(c=>c.id))??[]),o=W1(i?n:[t,...n]);if(o==="()")throw new B.OmpError("Provided TAMS media has no timerange");let a;r?typeof r=="number"?a=tu(r,o):a=N.timerangeDuration(r)>N.timerangeDuration(o)?o:r:a=tu(600,o);const u=await Promise.all([t,...n].map(async c=>[c.id,await this._fetchFlowSegments(c.id,a)]));return{flow:t,subflows:n,flowsSegments:new Map(u??[]),timerange:a}}async _fetchSubflows(t){let r=await Promise.all(t.map(async i=>await this._fetchFlow(i)));return r=r.filter(i=>!this._isFlowHlsIncompatible(i)),r}async _fetchFlow(t){return(await this._tamsApi.get(`/flows/${t}?include_timerange=true`)).data}async _fetchFirstFlowBySourceId(t){const i=(await this._tamsApi.get(`/flows?source_id=${t}`)).data.at(0);return i?await this._fetchFlow(i.id):void 0}async _fetchFlowSegments(t,r,i){if(t===_n)return[];const n=`/flows/${t}/segments${r?`?timerange=${r}`:""}${r?"&":"?"}limit=300`;let o=await this._tamsApi.get(n),a=o.data;for(;o.nextLink&&(!i||a.length<i);)o=await this._tamsApi.getUrl(o.nextLink),a=a.concat(o.data);return i&&(a=a.slice(0,i)),a}_isFlowHlsIncompatible(t){return!1}fetchManifestResourcesForMultipleFlows(t,r){return new xt(i=>{(async()=>{try{const n=await Promise.all(t.map(l=>this.fetchTamsResource(l)));if(n.some(l=>l.source))throw new Error("Source found in array of flows");const a=n.map(l=>l.flow);if(a.some(l=>l.format==="urn:x-nmos:format:multi"))throw new Error("Multiflow found in array of flows");if(a.filter(l=>l.format==="urn:x-nmos:format:video").length>1)throw new Error("Multiple video flows found in array of flows");const c=await this.fetchFlowResources({id:_n,source_id:"",format:"urn:x-nmos:format:multi",flow_collection:a.map(l=>({id:l.id,role:""}))},r);i.next(c),i.complete()}catch(n){i.error(n)}})()})}}var Lr,iu;function Nm(){if(iu)return Lr;iu=1;function e(s,c){this.message=s,this.error=c}e.prototype=Object.create(Error.prototype);const t=/([0-9]+)?:?([0-9]{2}):([0-9]{2}\.[0-9]{2,3})/;function r(s,c){c||(c={});const{meta:l=!1,strict:d=!0}=c;if(typeof s!="string")throw new e("Input must be a string");s=s.trim(),s=s.replace(/\r\n/g,`
|
|
63
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const d=l[1];if(t===l[0]){o(l);continue}if(e.external){const m=(s=e.external.registry.get(l[0]))==null?void 0:s.id;if(t!==l[0]&&m){o(l);continue}}if((c=e.metadataRegistry.get(l[0]))==null?void 0:c.id){o(l);continue}if(d.cycle){o(l);continue}if(d.count>1&&e.reused==="ref"){o(l);continue}}}function bt(e,t){var a,u,s;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=c=>{const l=e.seen.get(c);if(l.ref===null)return;const d=l.def??l.schema,f={...d},m=l.ref;if(l.ref=null,m){i(m);const p=e.seen.get(m),v=p.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(v)):Object.assign(d,v),Object.assign(d,f),c._zod.parent===m)for(const E in d)E==="$ref"||E==="allOf"||E in f||delete d[E];if(v.$ref&&p.def)for(const E in d)E==="$ref"||E==="allOf"||E in p.def&&JSON.stringify(d[E])===JSON.stringify(p.def[E])&&delete d[E]}const h=c._zod.parent;if(h&&h!==m){i(h);const p=e.seen.get(h);if(p!=null&&p.schema.$ref&&(d.$ref=p.schema.$ref,p.def))for(const v in d)v==="$ref"||v==="allOf"||v in p.def&&JSON.stringify(d[v])===JSON.stringify(p.def[v])&&delete d[v]}e.override({zodSchema:c,jsonSchema:d,path:l.path??[]})};for(const c of[...e.seen.entries()].reverse())i(c[0]);const n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const c=(u=e.external.registry.get(t))==null?void 0:u.id;if(!c)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(c)}Object.assign(n,r.def??r.schema);const o=((s=e.external)==null?void 0:s.defs)??{};for(const c of e.seen.entries()){const l=c[1];l.def&&l.defId&&(o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?n.$defs=o:n.definitions=o);try{const c=JSON.parse(JSON.stringify(n));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ot(t,"input",e.processors),output:Ot(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function de(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return de(i.element,r);if(i.type==="set")return de(i.valueType,r);if(i.type==="lazy")return de(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return de(i.innerType,r);if(i.type==="intersection")return de(i.left,r)||de(i.right,r);if(i.type==="record"||i.type==="map")return de(i.keyType,r)||de(i.valueType,r);if(i.type==="pipe")return de(i.in,r)||de(i.out,r);if(i.type==="object"){for(const n in i.shape)if(de(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(const n of i.options)if(de(n,r))return!0;return!1}if(i.type==="tuple"){for(const n of i.items)if(de(n,r))return!0;return!!(i.rest&&de(i.rest,r))}return!1}const xd=(e,t={})=>r=>{const i=gt({...r,processors:t});return B(e,i),vt(i,e),bt(i,e)},Ot=(e,t,r={})=>i=>{const{libraryOptions:n,target:o}=i??{},a=gt({...n??{},target:o,io:t,processors:r});return B(e,a),vt(a,e),bt(a,e)},a1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Td=(e,t,r,i)=>{const n=r;n.type="string";const{minimum:o,maximum:a,format:u,patterns:s,contentEncoding:c}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof a=="number"&&(n.maxLength=a),u&&(n.format=a1[u]??u,n.format===""&&delete n.format,u==="time"&&delete n.format),c&&(n.contentEncoding=c),s&&s.size>0){const l=[...s];l.length===1?n.pattern=l[0].source:l.length>1&&(n.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},zd=(e,t,r,i)=>{const n=r,{minimum:o,maximum:a,format:u,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l}=e._zod.bag;typeof u=="string"&&u.includes("int")?n.type="integer":n.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l),typeof o=="number"&&(n.minimum=o,typeof l=="number"&&t.target!=="draft-04"&&(l>=o?delete n.minimum:delete n.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=c,n.exclusiveMaximum=!0):n.exclusiveMaximum=c),typeof a=="number"&&(n.maximum=a,typeof c=="number"&&t.target!=="draft-04"&&(c<=a?delete n.maximum:delete n.exclusiveMaximum)),typeof s=="number"&&(n.multipleOf=s)},Ed=(e,t,r,i)=>{r.type="boolean"},Od=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Ud=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Dd=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Nd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},jd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Pd=(e,t,r,i)=>{r.not={}},Ad=(e,t,r,i)=>{},Ld=(e,t,r,i)=>{},Cd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Zd=(e,t,r,i)=>{const n=e._zod.def,o=yi(n.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},Md=(e,t,r,i)=>{const n=e._zod.def,o=[];for(const a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){const a=o[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o},Rd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Fd=(e,t,r,i)=>{const n=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},Vd=(e,t,r,i)=>{const n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:u,mime:s}=e._zod.bag;a!==void 0&&(o.minLength=a),u!==void 0&&(o.maxLength=u),s?s.length===1?(o.contentMediaType=s[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=s.map(c=>({contentMediaType:c}))):Object.assign(n,o)},Bd=(e,t,r,i)=>{r.type="boolean"},Kd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Jd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Gd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},qd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Wd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Hd=(e,t,r,i)=>{const n=r,o=e._zod.def,{minimum:a,maximum:u}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof u=="number"&&(n.maxItems=u),n.type="array",n.items=B(o.element,t,{...i,path:[...i.path,"items"]})},Xd=(e,t,r,i)=>{var c;const n=r,o=e._zod.def;n.type="object",n.properties={};const a=o.shape;for(const l in a)n.properties[l]=B(a[l],t,{...i,path:[...i.path,"properties",l]});const u=new Set(Object.keys(a)),s=new Set([...u].filter(l=>{const d=o.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));s.size>0&&(n.required=Array.from(s)),((c=o.catchall)==null?void 0:c._zod.def.type)==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=B(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},bo=(e,t,r,i)=>{const n=e._zod.def,o=n.inclusive===!1,a=n.options.map((u,s)=>B(u,t,{...i,path:[...i.path,o?"oneOf":"anyOf",s]}));o?r.oneOf=a:r.anyOf=a},Yd=(e,t,r,i)=>{const n=e._zod.def,o=B(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=B(n.right,t,{...i,path:[...i.path,"allOf",1]}),u=c=>"allOf"in c&&Object.keys(c).length===1,s=[...u(o)?o.allOf:[o],...u(a)?a.allOf:[a]];r.allOf=s},Qd=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="array";const a=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",s=o.items.map((f,m)=>B(f,t,{...i,path:[...i.path,a,m]})),c=o.rest?B(o.rest,t,{...i,path:[...i.path,u,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=s,c&&(n.items=c)):t.target==="openapi-3.0"?(n.items={anyOf:s},c&&n.items.anyOf.push(c),n.minItems=s.length,c||(n.maxItems=s.length)):(n.items=s,c&&(n.additionalItems=c));const{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(n.minItems=l),typeof d=="number"&&(n.maxItems=d)},ef=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="object";const a=o.keyType,u=a._zod.bag,s=u==null?void 0:u.patterns;if(o.mode==="loose"&&s&&s.size>0){const l=B(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(const d of s)n.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=B(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=B(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const c=a._zod.values;if(c){const l=[...c].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(n.required=l)}},tf=(e,t,r,i)=>{const n=e._zod.def,o=B(n.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},nf=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},rf=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},of=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},af=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},uf=(e,t,r,i)=>{const n=e._zod.def,o=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;B(o,t,i);const a=t.seen.get(e);a.ref=o},cf=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},sf=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},_o=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},lf=(e,t,r,i)=>{const n=e._zod.innerType;B(n,t,i);const o=t.seen.get(e);o.ref=n},ui={string:Td,number:zd,boolean:Ed,bigint:Od,symbol:Ud,null:Dd,undefined:Nd,void:jd,never:Pd,any:Ad,unknown:Ld,date:Cd,enum:Zd,literal:Md,nan:Rd,template_literal:Fd,file:Vd,success:Bd,custom:Kd,function:Jd,transform:Gd,map:qd,set:Wd,array:Hd,object:Xd,union:bo,intersection:Yd,tuple:Qd,record:ef,nullable:tf,nonoptional:nf,default:rf,prefault:of,catch:af,pipe:uf,readonly:cf,promise:sf,optional:_o,lazy:lf};function df(e,t){if("_idmap"in e){const i=e,n=gt({...t,processors:ui}),o={};for(const s of i._idmap.entries()){const[c,l]=s;B(l,n)}const a={},u={registry:i,uri:t==null?void 0:t.uri,defs:o};n.external=u;for(const s of i._idmap.entries()){const[c,l]=s;vt(n,l),a[c]=bt(n,l)}if(Object.keys(o).length>0){const s=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[s]:o}}return{schemas:a}}const r=gt({...t,processors:ui});return B(e,r),vt(r,e),bt(r,e)}class u1{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=(t==null?void 0:t.target)??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=gt({processors:ui,target:r,...(t==null?void 0:t.metadata)&&{metadata:t.metadata},...(t==null?void 0:t.unrepresentable)&&{unrepresentable:t.unrepresentable},...(t==null?void 0:t.override)&&{override:t.override},...(t==null?void 0:t.io)&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return B(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),vt(this.ctx,t);const i=bt(this.ctx,t),{"~standard":n,...o}=i;return o}}const c1=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),s1=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:Ys,$ZodArray:rl,$ZodAsyncError:Ye,$ZodBase64:Ms,$ZodBase64URL:Fs,$ZodBigInt:Ri,$ZodBigIntFormat:qs,$ZodBoolean:Mi,$ZodCIDRv4:Cs,$ZodCIDRv6:Zs,$ZodCUID:xs,$ZodCUID2:Ts,$ZodCatch:kl,$ZodCheck:X,$ZodCheckBigIntFormat:ns,$ZodCheckEndsWith:ps,$ZodCheckGreaterThan:Li,$ZodCheckIncludes:fs,$ZodCheckLengthEquals:cs,$ZodCheckLessThan:Ai,$ZodCheckLowerCase:ls,$ZodCheckMaxLength:as,$ZodCheckMaxSize:rs,$ZodCheckMimeType:gs,$ZodCheckMinLength:us,$ZodCheckMinSize:is,$ZodCheckMultipleOf:es,$ZodCheckNumberFormat:ts,$ZodCheckOverwrite:vs,$ZodCheckProperty:hs,$ZodCheckRegex:ss,$ZodCheckSizeEquals:os,$ZodCheckStartsWith:ms,$ZodCheckStringFormat:Vt,$ZodCheckUpperCase:ds,$ZodCodec:Bi,$ZodCustom:Dl,$ZodCustomStringFormat:Js,$ZodDate:nl,$ZodDefault:yl,$ZodDiscriminatedUnion:sl,$ZodE164:Vs,$ZodEmail:ws,$ZodEmoji:ks,$ZodEncodeError:Fn,$ZodEnum:pl,$ZodError:wi,$ZodExactOptional:bl,$ZodFile:gl,$ZodFunction:El,$ZodGUID:ys,$ZodIPv4:Ps,$ZodIPv6:As,$ZodISODate:Ds,$ZodISODateTime:Us,$ZodISODuration:js,$ZodISOTime:Ns,$ZodIntersection:ll,$ZodJWT:Ks,$ZodKSUID:Os,$ZodLazy:Ul,$ZodLiteral:hl,$ZodMAC:Ls,$ZodMap:fl,$ZodNaN:Il,$ZodNanoID:Is,$ZodNever:el,$ZodNonOptional:wl,$ZodNull:Xs,$ZodNullable:_l,$ZodNumber:Zi,$ZodNumberFormat:Gs,$ZodObject:al,$ZodObjectJIT:ul,$ZodOptional:Vi,$ZodPipe:xl,$ZodPrefault:$l,$ZodPromise:Ol,$ZodReadonly:Tl,$ZodRealError:he,$ZodRecord:dl,$ZodRegistry:Zl,$ZodSet:ml,$ZodString:Bt,$ZodStringFormat:G,$ZodSuccess:Sl,$ZodSymbol:Ws,$ZodTemplateLiteral:zl,$ZodTransform:vl,$ZodTuple:Fi,$ZodType:L,$ZodULID:zs,$ZodURL:Ss,$ZodUUID:$s,$ZodUndefined:Hs,$ZodUnion:Gn,$ZodUnknown:Qs,$ZodVoid:tl,$ZodXID:Es,$ZodXor:cl,$brand:Wu,$constructor:g,$input:Cl,$output:Ll,Doc:bs,JSONSchema:c1,JSONSchemaGenerator:u1,NEVER:qu,TimePrecision:Vl,_any:ld,_array:vd,_base64:co,_base64url:so,_bigint:rd,_boolean:td,_catch:e1,_check:wd,_cidrv4:ao,_cidrv6:uo,_coercedBigint:id,_coercedBoolean:nd,_coercedDate:hd,_coercedNumber:Wl,_coercedString:Rl,_cuid:Qi,_cuid2:eo,_custom:_d,_date:pd,_decode:xi,_decodeAsync:zi,_default:Xb,_discriminatedUnion:Zb,_e164:lo,_email:Ji,_emoji:Xi,_encode:Ii,_encodeAsync:Ti,_endsWith:er,_enum:Kb,_file:bd,_float32:Xl,_float64:Yl,_gt:Ve,_gte:fe,_guid:Un,_includes:Yn,_int:Hl,_int32:Ql,_int64:od,_intersection:Mb,_ipv4:io,_ipv6:oo,_isoDate:Kl,_isoDateTime:Bl,_isoDuration:Gl,_isoTime:Jl,_jwt:fo,_ksuid:ro,_lazy:i1,_length:Gt,_literal:Gb,_lowercase:Hn,_lt:Fe,_lte:_e,_mac:Fl,_map:Vb,_max:_e,_maxLength:Jt,_maxSize:wt,_mime:tr,_min:fe,_minLength:et,_minSize:Be,_multipleOf:ht,_nan:gd,_nanoid:Yi,_nativeEnum:Jb,_negative:po,_never:fd,_nonnegative:go,_nonoptional:Yb,_nonpositive:ho,_normalize:nr,_null:sd,_nullable:Hb,_number:ql,_optional:Wb,_overwrite:Pe,_parse:Lt,_parseAsync:Ct,_pipe:t1,_positive:mo,_promise:o1,_property:vo,_readonly:n1,_record:Fb,_refine:yd,_regex:Wn,_safeDecode:Oi,_safeDecodeAsync:Di,_safeEncode:Ei,_safeEncodeAsync:Ui,_safeParse:Zt,_safeParseAsync:Mt,_set:Bb,_size:Kt,_slugify:ar,_startsWith:Qn,_string:Ml,_stringFormat:qt,_stringbool:Id,_success:Qb,_superRefine:$d,_symbol:ud,_templateLiteral:r1,_toLowerCase:ir,_toUpperCase:or,_transform:qb,_trim:rr,_tuple:Rb,_uint32:ed,_uint64:ad,_ulid:to,_undefined:cd,_union:Lb,_unknown:dd,_uppercase:Xn,_url:qn,_uuid:Gi,_uuidv4:qi,_uuidv6:Wi,_uuidv7:Hi,_void:md,_xid:no,_xor:Cb,clone:we,config:le,createStandardJSONSchemaMethod:Ot,createToJSONSchemaMethod:xd,decode:$g,decodeAsync:Sg,describe:Sd,encode:yg,encodeAsync:wg,extractDefs:vt,finalize:bt,flattenError:Si,formatError:ki,globalConfig:Tn,globalRegistry:be,initializeContext:gt,isValidBase64:Ci,isValidBase64URL:Rs,isValidJWT:Bs,locales:Al,meta:kd,parse:ii,parseAsync:oi,prettifyError:gc,process:B,regexes:Pi,registry:Ki,safeDecode:Ig,safeDecodeAsync:Tg,safeEncode:kg,safeEncodeAsync:xg,safeParse:vc,safeParseAsync:bc,toDotPath:hc,toJSONSchema:df,treeifyError:pc,util:fc,version:_s},Symbol.toStringTag,{value:"Module"})),l1=Object.freeze(Object.defineProperty({__proto__:null,endsWith:er,gt:Ve,gte:fe,includes:Yn,length:Gt,lowercase:Hn,lt:Fe,lte:_e,maxLength:Jt,maxSize:wt,mime:tr,minLength:et,minSize:Be,multipleOf:ht,negative:po,nonnegative:go,nonpositive:ho,normalize:nr,overwrite:Pe,positive:mo,property:vo,regex:Wn,size:Kt,slugify:ar,startsWith:Qn,toLowerCase:ir,toUpperCase:or,trim:rr,uppercase:Xn},Symbol.toStringTag,{value:"Module"})),yo=g("ZodISODateTime",(e,t)=>{Us.init(e,t),q.init(e,t)});function ff(e){return Bl(yo,e)}const $o=g("ZodISODate",(e,t)=>{Ds.init(e,t),q.init(e,t)});function mf(e){return Kl($o,e)}const wo=g("ZodISOTime",(e,t)=>{Ns.init(e,t),q.init(e,t)});function pf(e){return Jl(wo,e)}const So=g("ZodISODuration",(e,t)=>{js.init(e,t),q.init(e,t)});function hf(e){return Gl(So,e)}const gf=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:$o,ZodISODateTime:yo,ZodISODuration:So,ZodISOTime:wo,date:mf,datetime:ff,duration:hf,time:pf},Symbol.toStringTag,{value:"Module"})),vf=(e,t)=>{wi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ki(e,r)},flatten:{value:r=>Si(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,zn,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,zn,2)}},isEmpty:{get(){return e.issues.length===0}}})},d1=g("ZodError",vf),ge=g("ZodError",vf,{Parent:Error}),bf=Lt(ge),_f=Ct(ge),yf=Zt(ge),$f=Mt(ge),wf=Ii(ge),Sf=xi(ge),kf=Ti(ge),If=zi(ge),xf=Ei(ge),Tf=Oi(ge),zf=Ui(ge),Ef=Di(ge),C=g("ZodType",(e,t)=>(L.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ot(e,"input"),output:Ot(e,"output")}}),e.toJSONSchema=xd(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(De(t,{checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(r,i)=>we(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>bf(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>yf(e,r,i),e.parseAsync=async(r,i)=>_f(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>$f(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>wf(e,r,i),e.decode=(r,i)=>Sf(e,r,i),e.encodeAsync=async(r,i)=>kf(e,r,i),e.decodeAsync=async(r,i)=>If(e,r,i),e.safeEncode=(r,i)=>xf(e,r,i),e.safeDecode=(r,i)=>Tf(e,r,i),e.safeEncodeAsync=async(r,i)=>zf(e,r,i),e.safeDecodeAsync=async(r,i)=>Ef(e,r,i),e.refine=(r,i)=>e.check(ma(r,i)),e.superRefine=r=>e.check(pa(r)),e.overwrite=r=>e.check(Pe(r)),e.optional=()=>Dt(e),e.exactOptional=()=>Wo(e),e.nullable=()=>Nt(e),e.nullish=()=>Dt(Nt(e)),e.nonoptional=r=>ta(e,r),e.array=()=>en(e),e.or=r=>Tr([e,r]),e.and=r=>Zo(e,r),e.transform=r=>jt(e,Er(r)),e.default=r=>Yo(e,r),e.prefault=r=>ea(e,r),e.catch=r=>ia(e,r),e.pipe=r=>jt(e,r),e.readonly=()=>ua(e),e.describe=r=>{const i=e.clone();return be.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){var r;return(r=be.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return be.get(e);const i=e.clone();return be.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),ur=g("_ZodString",(e,t)=>{Bt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Td(e,i,n);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(Wn(...i)),e.includes=(...i)=>e.check(Yn(...i)),e.startsWith=(...i)=>e.check(Qn(...i)),e.endsWith=(...i)=>e.check(er(...i)),e.min=(...i)=>e.check(et(...i)),e.max=(...i)=>e.check(Jt(...i)),e.length=(...i)=>e.check(Gt(...i)),e.nonempty=(...i)=>e.check(et(1,...i)),e.lowercase=i=>e.check(Hn(i)),e.uppercase=i=>e.check(Xn(i)),e.trim=()=>e.check(rr()),e.normalize=(...i)=>e.check(nr(...i)),e.toLowerCase=()=>e.check(ir()),e.toUpperCase=()=>e.check(or()),e.slugify=()=>e.check(ar())}),Wt=g("ZodString",(e,t)=>{Bt.init(e,t),ur.init(e,t),e.email=r=>e.check(Ji(cr,r)),e.url=r=>e.check(qn(Ht,r)),e.jwt=r=>e.check(fo(Sr,r)),e.emoji=r=>e.check(Xi(sr,r)),e.guid=r=>e.check(Un(Ut,r)),e.uuid=r=>e.check(Gi(Oe,r)),e.uuidv4=r=>e.check(qi(Oe,r)),e.uuidv6=r=>e.check(Wi(Oe,r)),e.uuidv7=r=>e.check(Hi(Oe,r)),e.nanoid=r=>e.check(Yi(lr,r)),e.guid=r=>e.check(Un(Ut,r)),e.cuid=r=>e.check(Qi(dr,r)),e.cuid2=r=>e.check(eo(fr,r)),e.ulid=r=>e.check(to(mr,r)),e.base64=r=>e.check(co(yr,r)),e.base64url=r=>e.check(so($r,r)),e.xid=r=>e.check(no(pr,r)),e.ksuid=r=>e.check(ro(hr,r)),e.ipv4=r=>e.check(io(gr,r)),e.ipv6=r=>e.check(oo(vr,r)),e.cidrv4=r=>e.check(ao(br,r)),e.cidrv6=r=>e.check(uo(_r,r)),e.e164=r=>e.check(lo(wr,r)),e.datetime=r=>e.check(ff(r)),e.date=r=>e.check(mf(r)),e.time=r=>e.check(pf(r)),e.duration=r=>e.check(hf(r))});function Dn(e){return Ml(Wt,e)}const q=g("ZodStringFormat",(e,t)=>{G.init(e,t),ur.init(e,t)}),cr=g("ZodEmail",(e,t)=>{ws.init(e,t),q.init(e,t)});function Of(e){return Ji(cr,e)}const Ut=g("ZodGUID",(e,t)=>{ys.init(e,t),q.init(e,t)});function Uf(e){return Un(Ut,e)}const Oe=g("ZodUUID",(e,t)=>{$s.init(e,t),q.init(e,t)});function Df(e){return Gi(Oe,e)}function Nf(e){return qi(Oe,e)}function jf(e){return Wi(Oe,e)}function Pf(e){return Hi(Oe,e)}const Ht=g("ZodURL",(e,t)=>{Ss.init(e,t),q.init(e,t)});function Af(e){return qn(Ht,e)}function Lf(e){return qn(Ht,{protocol:/^https?$/,hostname:Lc,...b(e)})}const sr=g("ZodEmoji",(e,t)=>{ks.init(e,t),q.init(e,t)});function Cf(e){return Xi(sr,e)}const lr=g("ZodNanoID",(e,t)=>{Is.init(e,t),q.init(e,t)});function Zf(e){return Yi(lr,e)}const dr=g("ZodCUID",(e,t)=>{xs.init(e,t),q.init(e,t)});function Mf(e){return Qi(dr,e)}const fr=g("ZodCUID2",(e,t)=>{Ts.init(e,t),q.init(e,t)});function Rf(e){return eo(fr,e)}const mr=g("ZodULID",(e,t)=>{zs.init(e,t),q.init(e,t)});function Ff(e){return to(mr,e)}const pr=g("ZodXID",(e,t)=>{Es.init(e,t),q.init(e,t)});function Vf(e){return no(pr,e)}const hr=g("ZodKSUID",(e,t)=>{Os.init(e,t),q.init(e,t)});function Bf(e){return ro(hr,e)}const gr=g("ZodIPv4",(e,t)=>{Ps.init(e,t),q.init(e,t)});function Kf(e){return io(gr,e)}const ko=g("ZodMAC",(e,t)=>{Ls.init(e,t),q.init(e,t)});function Jf(e){return Fl(ko,e)}const vr=g("ZodIPv6",(e,t)=>{As.init(e,t),q.init(e,t)});function Gf(e){return oo(vr,e)}const br=g("ZodCIDRv4",(e,t)=>{Cs.init(e,t),q.init(e,t)});function qf(e){return ao(br,e)}const _r=g("ZodCIDRv6",(e,t)=>{Zs.init(e,t),q.init(e,t)});function Wf(e){return uo(_r,e)}const yr=g("ZodBase64",(e,t)=>{Ms.init(e,t),q.init(e,t)});function Hf(e){return co(yr,e)}const $r=g("ZodBase64URL",(e,t)=>{Fs.init(e,t),q.init(e,t)});function Xf(e){return so($r,e)}const wr=g("ZodE164",(e,t)=>{Vs.init(e,t),q.init(e,t)});function Yf(e){return lo(wr,e)}const Sr=g("ZodJWT",(e,t)=>{Ks.init(e,t),q.init(e,t)});function Qf(e){return fo(Sr,e)}const St=g("ZodCustomStringFormat",(e,t)=>{Js.init(e,t),q.init(e,t)});function em(e,t,r={}){return qt(St,e,t,r)}function tm(e){return qt(St,"hostname",Ac,e)}function nm(e){return qt(St,"hex",Yc,e)}function rm(e,t){const r=(t==null?void 0:t.enc)??"hex",i=`${e}_${r}`,n=Pi[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return qt(St,i,n,t)}const Xt=g("ZodNumber",(e,t)=>{Zi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,n,o)=>zd(e,i,n),e.gt=(i,n)=>e.check(Ve(i,n)),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.lt=(i,n)=>e.check(Fe(i,n)),e.lte=(i,n)=>e.check(_e(i,n)),e.max=(i,n)=>e.check(_e(i,n)),e.int=i=>e.check(Nn(i)),e.safe=i=>e.check(Nn(i)),e.positive=i=>e.check(Ve(0,i)),e.nonnegative=i=>e.check(fe(0,i)),e.negative=i=>e.check(Fe(0,i)),e.nonpositive=i=>e.check(_e(0,i)),e.multipleOf=(i,n)=>e.check(ht(i,n)),e.step=(i,n)=>e.check(ht(i,n)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Io(e){return ql(Xt,e)}const rt=g("ZodNumberFormat",(e,t)=>{Gs.init(e,t),Xt.init(e,t)});function Nn(e){return Hl(rt,e)}function im(e){return Xl(rt,e)}function om(e){return Yl(rt,e)}function am(e){return Ql(rt,e)}function um(e){return ed(rt,e)}const Yt=g("ZodBoolean",(e,t)=>{Mi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ed(e,r,i)});function xo(e){return td(Yt,e)}const Qt=g("ZodBigInt",(e,t)=>{Ri.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Od(e,i),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.gt=(i,n)=>e.check(Ve(i,n)),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.lt=(i,n)=>e.check(Fe(i,n)),e.lte=(i,n)=>e.check(_e(i,n)),e.max=(i,n)=>e.check(_e(i,n)),e.positive=i=>e.check(Ve(BigInt(0),i)),e.negative=i=>e.check(Fe(BigInt(0),i)),e.nonpositive=i=>e.check(_e(BigInt(0),i)),e.nonnegative=i=>e.check(fe(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(ht(i,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function cm(e){return rd(Qt,e)}const kr=g("ZodBigIntFormat",(e,t)=>{qs.init(e,t),Qt.init(e,t)});function sm(e){return od(kr,e)}function lm(e){return ad(kr,e)}const To=g("ZodSymbol",(e,t)=>{Ws.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ud(e,r)});function dm(e){return ud(To,e)}const zo=g("ZodUndefined",(e,t)=>{Hs.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nd(e,r)});function fm(e){return cd(zo,e)}const Eo=g("ZodNull",(e,t)=>{Xs.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dd(e,r,i)});function Oo(e){return sd(Eo,e)}const Uo=g("ZodAny",(e,t)=>{Ys.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ad()});function mm(){return ld(Uo)}const Do=g("ZodUnknown",(e,t)=>{Qs.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ld()});function tt(){return dd(Do)}const No=g("ZodNever",(e,t)=>{el.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pd(e,r,i)});function Ir(e){return fd(No,e)}const jo=g("ZodVoid",(e,t)=>{tl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jd(e,r)});function pm(e){return md(jo,e)}const xr=g("ZodDate",(e,t)=>{nl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Cd(e,i),e.min=(i,n)=>e.check(fe(i,n)),e.max=(i,n)=>e.check(_e(i,n));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function hm(e){return pd(xr,e)}const Po=g("ZodArray",(e,t)=>{rl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Hd(e,r,i,n),e.element=t.element,e.min=(r,i)=>e.check(et(r,i)),e.nonempty=r=>e.check(et(1,r)),e.max=(r,i)=>e.check(Jt(r,i)),e.length=(r,i)=>e.check(Gt(r,i)),e.unwrap=()=>e.element});function en(e,t){return vd(Po,e,t)}function gm(e){const t=e._zod.def.shape;return zr(Object.keys(t))}const tn=g("ZodObject",(e,t)=>{ul.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Xd(e,r,i,n),Z(e,"shape",()=>t.shape),e.keyof=()=>zr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:tt()}),e.loose=()=>e.clone({...e._zod.def,catchall:tt()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ir()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>oc(e,r),e.safeExtend=r=>ac(e,r),e.merge=r=>uc(e,r),e.pick=r=>rc(e,r),e.omit=r=>ic(e,r),e.partial=(...r)=>cc(Or,e,r[0]),e.required=(...r)=>sc(Ur,e,r[0])});function vm(e,t){const r={type:"object",shape:e??{},...b(t)};return new tn(r)}function bm(e,t){return new tn({type:"object",shape:e,catchall:Ir(),...b(t)})}function _m(e,t){return new tn({type:"object",shape:e,catchall:tt(),...b(t)})}const nn=g("ZodUnion",(e,t)=>{Gn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bo(e,r,i,n),e.options=t.options});function Tr(e,t){return new nn({type:"union",options:e,...b(t)})}const Ao=g("ZodXor",(e,t)=>{nn.init(e,t),cl.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bo(e,r,i,n),e.options=t.options});function ym(e,t){return new Ao({type:"union",options:e,inclusive:!1,...b(t)})}const Lo=g("ZodDiscriminatedUnion",(e,t)=>{nn.init(e,t),sl.init(e,t)});function $m(e,t,r){return new Lo({type:"union",options:t,discriminator:e,...b(r)})}const Co=g("ZodIntersection",(e,t)=>{ll.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Yd(e,r,i,n)});function Zo(e,t){return new Co({type:"intersection",left:e,right:t})}const Mo=g("ZodTuple",(e,t)=>{Fi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Qd(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Ro(e,t,r){const i=t instanceof L,n=i?r:t,o=i?t:null;return new Mo({type:"tuple",items:e,rest:o,...b(n)})}const rn=g("ZodRecord",(e,t)=>{dl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ef(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function Fo(e,t,r){return new rn({type:"record",keyType:e,valueType:t,...b(r)})}function wm(e,t,r){const i=we(e);return i._zod.values=void 0,new rn({type:"record",keyType:i,valueType:t,...b(r)})}function Sm(e,t,r){return new rn({type:"record",keyType:e,valueType:t,mode:"loose",...b(r)})}const Vo=g("ZodMap",(e,t)=>{fl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>qd(e,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Be(...r)),e.nonempty=r=>e.check(Be(1,r)),e.max=(...r)=>e.check(wt(...r)),e.size=(...r)=>e.check(Kt(...r))});function km(e,t,r){return new Vo({type:"map",keyType:e,valueType:t,...b(r)})}const Bo=g("ZodSet",(e,t)=>{ml.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Wd(e,r),e.min=(...r)=>e.check(Be(...r)),e.nonempty=r=>e.check(Be(1,r)),e.max=(...r)=>e.check(wt(...r)),e.size=(...r)=>e.check(Kt(...r))});function Im(e,t){return new Bo({type:"set",valueType:e,...b(t)})}const _t=g("ZodEnum",(e,t)=>{pl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Zd(e,i,n),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{const o={};for(const a of i)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new _t({...t,checks:[],...b(n),entries:o})},e.exclude=(i,n)=>{const o={...t.entries};for(const a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new _t({...t,checks:[],...b(n),entries:o})}});function zr(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new _t({type:"enum",entries:r,...b(t)})}function xm(e,t){return new _t({type:"enum",entries:e,...b(t)})}const Ko=g("ZodLiteral",(e,t)=>{hl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Md(e,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Tm(e,t){return new Ko({type:"literal",values:Array.isArray(e)?e:[e],...b(t)})}const Jo=g("ZodFile",(e,t)=>{gl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Vd(e,r,i),e.min=(r,i)=>e.check(Be(r,i)),e.max=(r,i)=>e.check(wt(r,i)),e.mime=(r,i)=>e.check(tr(Array.isArray(r)?r:[r],i))});function zm(e){return bd(Jo,e)}const Go=g("ZodTransform",(e,t)=>{vl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Gd(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Fn(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(mt(o,r.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(mt(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function Er(e){return new Go({type:"transform",transform:e})}const Or=g("ZodOptional",(e,t)=>{Vi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_o(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Dt(e){return new Or({type:"optional",innerType:e})}const qo=g("ZodExactOptional",(e,t)=>{bl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_o(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Wo(e){return new qo({type:"optional",innerType:e})}const Ho=g("ZodNullable",(e,t)=>{_l.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>tf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Nt(e){return new Ho({type:"nullable",innerType:e})}function Em(e){return Dt(Nt(e))}const Xo=g("ZodDefault",(e,t)=>{yl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>rf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Yo(e,t){return new Xo({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Bn(t)}})}const Qo=g("ZodPrefault",(e,t)=>{$l.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>of(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ea(e,t){return new Qo({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Bn(t)}})}const Ur=g("ZodNonOptional",(e,t)=>{wl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>nf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ta(e,t){return new Ur({type:"nonoptional",innerType:e,...b(t)})}const na=g("ZodSuccess",(e,t)=>{Sl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bd(e,r,i),e.unwrap=()=>e._zod.def.innerType});function Om(e){return new na({type:"success",innerType:e})}const ra=g("ZodCatch",(e,t)=>{kl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>af(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ia(e,t){return new ra({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const oa=g("ZodNaN",(e,t)=>{Il.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Rd(e,r)});function Um(e){return gd(oa,e)}const Dr=g("ZodPipe",(e,t)=>{xl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uf(e,r,i,n),e.in=t.in,e.out=t.out});function jt(e,t){return new Dr({type:"pipe",in:e,out:t})}const Nr=g("ZodCodec",(e,t)=>{Dr.init(e,t),Bi.init(e,t)});function Dm(e,t,r){return new Nr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}const aa=g("ZodReadonly",(e,t)=>{Tl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ua(e){return new aa({type:"readonly",innerType:e})}const ca=g("ZodTemplateLiteral",(e,t)=>{zl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fd(e,r,i)});function Nm(e,t){return new ca({type:"template_literal",parts:e,...b(t)})}const sa=g("ZodLazy",(e,t)=>{Ul.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lf(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function la(e){return new sa({type:"lazy",getter:e})}const da=g("ZodPromise",(e,t)=>{Ol.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function jm(e){return new da({type:"promise",innerType:e})}const fa=g("ZodFunction",(e,t)=>{El.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Jd(e,r)});function jn(e){return new fa({type:"function",input:Array.isArray(e==null?void 0:e.input)?Ro(e==null?void 0:e.input):(e==null?void 0:e.input)??en(tt()),output:(e==null?void 0:e.output)??tt()})}const on=g("ZodCustom",(e,t)=>{Dl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Kd(e,r)});function Pm(e){const t=new X({check:"custom"});return t._zod.check=e,t}function Am(e,t){return _d(on,e??(()=>!0),t)}function ma(e,t={}){return yd(on,e,t)}function pa(e){return $d(e)}const Lm=Sd,Cm=kd;function Zm(e,t={}){const r=new on({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...b(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}const Mm=(...e)=>Id({Codec:Nr,Boolean:Yt,String:Wt},...e);function Rm(e){const t=la(()=>Tr([Dn(e),Io(),xo(),Oo(),en(t),Fo(Dn(),t)]));return t}function Fm(e,t){return jt(Er(e),t)}const f1=Object.freeze(Object.defineProperty({__proto__:null,ZodAny:Uo,ZodArray:Po,ZodBase64:yr,ZodBase64URL:$r,ZodBigInt:Qt,ZodBigIntFormat:kr,ZodBoolean:Yt,ZodCIDRv4:br,ZodCIDRv6:_r,ZodCUID:dr,ZodCUID2:fr,ZodCatch:ra,ZodCodec:Nr,ZodCustom:on,ZodCustomStringFormat:St,ZodDate:xr,ZodDefault:Xo,ZodDiscriminatedUnion:Lo,ZodE164:wr,ZodEmail:cr,ZodEmoji:sr,ZodEnum:_t,ZodExactOptional:qo,ZodFile:Jo,ZodFunction:fa,ZodGUID:Ut,ZodIPv4:gr,ZodIPv6:vr,ZodIntersection:Co,ZodJWT:Sr,ZodKSUID:hr,ZodLazy:sa,ZodLiteral:Ko,ZodMAC:ko,ZodMap:Vo,ZodNaN:oa,ZodNanoID:lr,ZodNever:No,ZodNonOptional:Ur,ZodNull:Eo,ZodNullable:Ho,ZodNumber:Xt,ZodNumberFormat:rt,ZodObject:tn,ZodOptional:Or,ZodPipe:Dr,ZodPrefault:Qo,ZodPromise:da,ZodReadonly:aa,ZodRecord:rn,ZodSet:Bo,ZodString:Wt,ZodStringFormat:q,ZodSuccess:na,ZodSymbol:To,ZodTemplateLiteral:ca,ZodTransform:Go,ZodTuple:Mo,ZodType:C,ZodULID:mr,ZodURL:Ht,ZodUUID:Oe,ZodUndefined:zo,ZodUnion:nn,ZodUnknown:Do,ZodVoid:jo,ZodXID:pr,ZodXor:Ao,_ZodString:ur,_default:Yo,_function:jn,any:mm,array:en,base64:Hf,base64url:Xf,bigint:cm,boolean:xo,catch:ia,check:Pm,cidrv4:qf,cidrv6:Wf,codec:Dm,cuid:Mf,cuid2:Rf,custom:Am,date:hm,describe:Lm,discriminatedUnion:$m,e164:Yf,email:Of,emoji:Cf,enum:zr,exactOptional:Wo,file:zm,float32:im,float64:om,function:jn,guid:Uf,hash:rm,hex:nm,hostname:tm,httpUrl:Lf,instanceof:Zm,int:Nn,int32:am,int64:sm,intersection:Zo,ipv4:Kf,ipv6:Gf,json:Rm,jwt:Qf,keyof:gm,ksuid:Bf,lazy:la,literal:Tm,looseObject:_m,looseRecord:Sm,mac:Jf,map:km,meta:Cm,nan:Um,nanoid:Zf,nativeEnum:xm,never:Ir,nonoptional:ta,null:Oo,nullable:Nt,nullish:Em,number:Io,object:vm,optional:Dt,partialRecord:wm,pipe:jt,prefault:ea,preprocess:Fm,promise:jm,readonly:ua,record:Fo,refine:ma,set:Im,strictObject:bm,string:Dn,stringFormat:em,stringbool:Mm,success:Om,superRefine:pa,symbol:dm,templateLiteral:Nm,transform:Er,tuple:Ro,uint32:um,uint64:lm,ulid:Ff,undefined:fm,union:Tr,unknown:tt,url:Af,uuid:Df,uuidv4:Nf,uuidv6:jf,uuidv7:Pf,void:pm,xid:Vf,xor:ym},Symbol.toStringTag,{value:"Module"})),m1={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function p1(e){le({customError:e})}function h1(){return le().customError}var ci;ci||(ci={});const I={...f1,...l1,iso:gf},g1=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function v1(e,t){const r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function b1(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;const i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){const n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function Vm(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return I.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return I.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const o=b1(n,t),a=ce(o,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){const n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return I.null();if(n.length===0)return I.never();if(n.length===1)return I.literal(n[0]);if(n.every(a=>typeof a=="string"))return I.enum(n);const o=n.map(a=>I.literal(a));return o.length<2?o[0]:I.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return I.literal(e.const);const r=e.type;if(Array.isArray(r)){const n=r.map(o=>{const a={...e,type:o};return Vm(a,t)});return n.length===0?I.never():n.length===1?n[0]:I.union(n)}if(!r)return I.any();let i;switch(r){case"string":{let n=I.string();if(e.format){const o=e.format;o==="email"?n=n.check(I.email()):o==="uri"||o==="uri-reference"?n=n.check(I.url()):o==="uuid"||o==="guid"?n=n.check(I.uuid()):o==="date-time"?n=n.check(I.iso.datetime()):o==="date"?n=n.check(I.iso.date()):o==="time"?n=n.check(I.iso.time()):o==="duration"?n=n.check(I.iso.duration()):o==="ipv4"?n=n.check(I.ipv4()):o==="ipv6"?n=n.check(I.ipv6()):o==="mac"?n=n.check(I.mac()):o==="cidr"?n=n.check(I.cidrv4()):o==="cidr-v6"?n=n.check(I.cidrv6()):o==="base64"?n=n.check(I.base64()):o==="base64url"?n=n.check(I.base64url()):o==="e164"?n=n.check(I.e164()):o==="jwt"?n=n.check(I.jwt()):o==="emoji"?n=n.check(I.emoji()):o==="nanoid"?n=n.check(I.nanoid()):o==="cuid"?n=n.check(I.cuid()):o==="cuid2"?n=n.check(I.cuid2()):o==="ulid"?n=n.check(I.ulid()):o==="xid"?n=n.check(I.xid()):o==="ksuid"&&(n=n.check(I.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?I.number().int():I.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case"boolean":{i=I.boolean();break}case"null":{i=I.null();break}case"object":{const n={},o=e.properties||{},a=new Set(e.required||[]);for(const[s,c]of Object.entries(o)){const l=ce(c,t);n[s]=a.has(s)?l:l.optional()}if(e.propertyNames){const s=ce(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?ce(e.additionalProperties,t):I.any();if(Object.keys(n).length===0){i=I.record(s,c);break}const l=I.object(n).passthrough(),d=I.looseRecord(s,c);i=I.intersection(l,d);break}if(e.patternProperties){const s=e.patternProperties,c=Object.keys(s),l=[];for(const f of c){const m=ce(s[f],t),h=I.string().regex(new RegExp(f));l.push(I.looseRecord(h,m))}const d=[];if(Object.keys(n).length>0&&d.push(I.object(n).passthrough()),d.push(...l),d.length===0)i=I.object({}).passthrough();else if(d.length===1)i=d[0];else{let f=I.intersection(d[0],d[1]);for(let m=2;m<d.length;m++)f=I.intersection(f,d[m]);i=f}break}const u=I.object(n);e.additionalProperties===!1?i=u.strict():typeof e.additionalProperties=="object"?i=u.catchall(ce(e.additionalProperties,t)):i=u.passthrough();break}case"array":{const n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){const a=n.map(s=>ce(s,t)),u=o&&typeof o=="object"&&!Array.isArray(o)?ce(o,t):void 0;u?i=I.tuple(a).rest(u):i=I.tuple(a),typeof e.minItems=="number"&&(i=i.check(I.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(I.maxLength(e.maxItems)))}else if(Array.isArray(o)){const a=o.map(s=>ce(s,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?ce(e.additionalItems,t):void 0;u?i=I.tuple(a).rest(u):i=I.tuple(a),typeof e.minItems=="number"&&(i=i.check(I.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(I.maxLength(e.maxItems)))}else if(o!==void 0){const a=ce(o,t);let u=I.array(a);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),i=u}else i=I.array(I.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function ce(e,t){if(typeof e=="boolean")return e?I.any():I.never();let r=Vm(e,t);const i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){const u=e.anyOf.map(c=>ce(c,t)),s=I.union(u);r=i?I.intersection(r,s):s}if(e.oneOf&&Array.isArray(e.oneOf)){const u=e.oneOf.map(c=>ce(c,t)),s=I.xor(u);r=i?I.intersection(r,s):s}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:I.any();else{let u=i?r:ce(e.allOf[0],t);const s=i?0:1;for(let c=s;c<e.allOf.length;c++)u=I.intersection(u,ce(e.allOf[c],t));r=u}e.nullable===!0&&t.version==="openapi-3.0"&&(r=I.nullable(r)),e.readOnly===!0&&(r=I.readonly(r));const n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const u of o)u in e&&(n[u]=e[u]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const u of a)u in e&&(n[u]=e[u]);for(const u of Object.keys(e))g1.has(u)||(n[u]=e[u]);return Object.keys(n).length>0&&t.registry.add(r,n),r}function _1(e,t){if(typeof e=="boolean")return e?I.any():I.never();const r=v1(e,t==null?void 0:t.defaultTarget),i=e.$defs||e.definitions||{},n={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:(t==null?void 0:t.registry)??be};return ce(e,n)}function y1(e){return Rl(Wt,e)}function $1(e){return Wl(Xt,e)}function w1(e){return nd(Yt,e)}function S1(e){return id(Qt,e)}function k1(e){return hd(xr,e)}const I1=Object.freeze(Object.defineProperty({__proto__:null,bigint:S1,boolean:w1,date:k1,number:$1,string:y1},Symbol.toStringTag,{value:"Module"}));le(Nl());const au=Object.freeze(Object.defineProperty({__proto__:null,$brand:Wu,$input:Cl,$output:Ll,NEVER:qu,TimePrecision:Vl,ZodAny:Uo,ZodArray:Po,ZodBase64:yr,ZodBase64URL:$r,ZodBigInt:Qt,ZodBigIntFormat:kr,ZodBoolean:Yt,ZodCIDRv4:br,ZodCIDRv6:_r,ZodCUID:dr,ZodCUID2:fr,ZodCatch:ra,ZodCodec:Nr,ZodCustom:on,ZodCustomStringFormat:St,ZodDate:xr,ZodDefault:Xo,ZodDiscriminatedUnion:Lo,ZodE164:wr,ZodEmail:cr,ZodEmoji:sr,ZodEnum:_t,ZodError:d1,ZodExactOptional:qo,ZodFile:Jo,get ZodFirstPartyTypeKind(){return ci},ZodFunction:fa,ZodGUID:Ut,ZodIPv4:gr,ZodIPv6:vr,ZodISODate:$o,ZodISODateTime:yo,ZodISODuration:So,ZodISOTime:wo,ZodIntersection:Co,ZodIssueCode:m1,ZodJWT:Sr,ZodKSUID:hr,ZodLazy:sa,ZodLiteral:Ko,ZodMAC:ko,ZodMap:Vo,ZodNaN:oa,ZodNanoID:lr,ZodNever:No,ZodNonOptional:Ur,ZodNull:Eo,ZodNullable:Ho,ZodNumber:Xt,ZodNumberFormat:rt,ZodObject:tn,ZodOptional:Or,ZodPipe:Dr,ZodPrefault:Qo,ZodPromise:da,ZodReadonly:aa,ZodRealError:ge,ZodRecord:rn,ZodSet:Bo,ZodString:Wt,ZodStringFormat:q,ZodSuccess:na,ZodSymbol:To,ZodTemplateLiteral:ca,ZodTransform:Go,ZodTuple:Mo,ZodType:C,ZodULID:mr,ZodURL:Ht,ZodUUID:Oe,ZodUndefined:zo,ZodUnion:nn,ZodUnknown:Do,ZodVoid:jo,ZodXID:pr,ZodXor:Ao,_ZodString:ur,_default:Yo,_function:jn,any:mm,array:en,base64:Hf,base64url:Xf,bigint:cm,boolean:xo,catch:ia,check:Pm,cidrv4:qf,cidrv6:Wf,clone:we,codec:Dm,coerce:I1,config:le,core:s1,cuid:Mf,cuid2:Rf,custom:Am,date:hm,decode:Sf,decodeAsync:If,describe:Lm,discriminatedUnion:$m,e164:Yf,email:Of,emoji:Cf,encode:wf,encodeAsync:kf,endsWith:er,enum:zr,exactOptional:Wo,file:zm,flattenError:Si,float32:im,float64:om,formatError:ki,fromJSONSchema:_1,function:jn,getErrorMap:h1,globalRegistry:be,gt:Ve,gte:fe,guid:Uf,hash:rm,hex:nm,hostname:tm,httpUrl:Lf,includes:Yn,instanceof:Zm,int:Nn,int32:am,int64:sm,intersection:Zo,ipv4:Kf,ipv6:Gf,iso:gf,json:Rm,jwt:Qf,keyof:gm,ksuid:Bf,lazy:la,length:Gt,literal:Tm,locales:Al,looseObject:_m,looseRecord:Sm,lowercase:Hn,lt:Fe,lte:_e,mac:Jf,map:km,maxLength:Jt,maxSize:wt,meta:Cm,mime:tr,minLength:et,minSize:Be,multipleOf:ht,nan:Um,nanoid:Zf,nativeEnum:xm,negative:po,never:Ir,nonnegative:go,nonoptional:ta,nonpositive:ho,normalize:nr,null:Oo,nullable:Nt,nullish:Em,number:Io,object:vm,optional:Dt,overwrite:Pe,parse:bf,parseAsync:_f,partialRecord:wm,pipe:jt,positive:mo,prefault:ea,preprocess:Fm,prettifyError:gc,promise:jm,property:vo,readonly:ua,record:Fo,refine:ma,regex:Wn,regexes:Pi,registry:Ki,safeDecode:Tf,safeDecodeAsync:Ef,safeEncode:xf,safeEncodeAsync:zf,safeParse:yf,safeParseAsync:$f,set:Im,setErrorMap:p1,size:Kt,slugify:ar,startsWith:Qn,strictObject:bm,string:Dn,stringFormat:em,stringbool:Mm,success:Om,superRefine:pa,symbol:dm,templateLiteral:Nm,toJSONSchema:df,toLowerCase:ir,toUpperCase:or,transform:Er,treeifyError:pc,trim:rr,tuple:Ro,uint32:um,uint64:lm,ulid:Ff,undefined:fm,union:Tr,unknown:tt,uppercase:Xn,url:Af,util:fc,uuid:Df,uuidv4:Nf,uuidv6:jf,uuidv7:Pf,void:pm,xid:Vf,xor:ym},Symbol.toStringTag,{value:"Module"}));function uu(e){const t=e.match(/^(.+)\/(flows|sources)\/([^/]+)$/);return t?[t[1],t[3]]:null}function x1(e){const t=e.filter(a=>a.timerange),r=t.filter(a=>a.format==="urn:x-nmos:format:video"||a.format==="urn:x-nmos:format:multi"),i=r.length?r:t;if(!i.length)return"()";const[n,o]=i.reduce(([a,u],s)=>{const c=P.parseTimeRange(s.timerange);let l=c.start?P.timeMomentToSeconds(c.start):null,d=c.end?P.timeMomentToSeconds(c.end):null;return(a===null||l!==null&&l<a)&&(a=l),(u===null||d!==null&&d>u)&&(u=d),[a,u]},[null,null]);return n===null||o===null?"()":P.formatTimeRangeExpr({start:P.secondsToTimeMoment(n),end:P.secondsToTimeMoment(o),isStartInclusive:!0,isEndInclusive:!1})}function cu(e,t){const r=P.parseTimeRange(t);if(r.start===void 0||r.end===void 0)throw new V.OmpError("Can't convert duration to timerange. Timerange is missing start and/or end.");const i=P.timeMomentToSeconds(r.start),n=P.timeMomentToSeconds(r.end);if(n-i<e)return console.warn("Provided duration is longer than timerange, using total timerange",t),t;const o=n-e;return P.formatTimeRangeExpr({start:P.secondsToTimeMoment(o),end:r.end,isEndInclusive:r.isEndInclusive,isStartInclusive:r.isStartInclusive})}function T1(e){const t=e.endsWith("/")?e.slice(0,-1):e;return t.substring(t.lastIndexOf("/")+1)}function su(e){switch(e.type){case"basic":{const t=btoa(`${e.username}:${e.password}`);return()=>({headers:{Authorization:`Basic ${t}`}})}case"bearer":return()=>({headers:{Authorization:`Bearer ${e.token}`}});case"custom":return e.headers}}function z1(e){return au.object({ffomTimeZoneOffset:au.number().int().min(-23).max(23).optional()}).safeParse(e).success}function Rr(e){return Ku(Xh(new ye(e)))}const yn="omakase-virtual-flow";class lu{constructor(t,r){k(this,"_tamsApi");this._tamsApi=eg(t,r)}async fetchTamsResource(t){const i=(await this._tamsApi.getUrl(t)).data;return i.source_id?{flow:i}:{source:i}}fetchManifestResources(t,r){return new ye(i=>{(async()=>{try{const n=await this.fetchTamsResource(t);let o;if(n.flow?o=await this._fetchFlow(n.flow.id):o=await this._fetchFirstFlowBySourceId(n.source.id),!o)throw new V.OmpError("Source has no flow representations");const a=await this.fetchFlowResources(o,r);i.next(a),i.complete()}catch(n){i.error(n)}})()})}async fetchFlowResources(t,r){var s;const i=t.id===yn,n=await this._fetchSubflows(((s=t.flow_collection)==null?void 0:s.map(c=>c.id))??[]),o=x1(i?n:[t,...n]);if(o==="()")throw new V.OmpError("Provided TAMS media has no timerange");let a;r?typeof r=="number"?a=cu(r,o):a=P.timerangeDuration(r)>P.timerangeDuration(o)?o:r:a=cu(600,o);const u=await Promise.all([t,...n].map(async c=>[c.id,await this._fetchFlowSegments(c.id,a)]));return{flow:t,subflows:n,flowsSegments:new Map(u??[]),timerange:a}}async _fetchSubflows(t){let r=await Promise.all(t.map(async i=>await this._fetchFlow(i)));return r=r.filter(i=>!this._isFlowHlsIncompatible(i)),r}async _fetchFlow(t){return(await this._tamsApi.get(`/flows/${t}?include_timerange=true`)).data}async _fetchFirstFlowBySourceId(t){const i=(await this._tamsApi.get(`/flows?source_id=${t}`)).data.at(0);return i?await this._fetchFlow(i.id):void 0}async _fetchFlowSegments(t,r,i){if(t===yn)return[];const n=`/flows/${t}/segments${r?`?timerange=${r}`:""}${r?"&":"?"}limit=300`;let o=await this._tamsApi.get(n),a=o.data;for(;o.nextLink&&(!i||a.length<i);)o=await this._tamsApi.getUrl(o.nextLink),a=a.concat(o.data);return i&&(a=a.slice(0,i)),a}_isFlowHlsIncompatible(t){return!1}fetchManifestResourcesForMultipleFlows(t,r){return new ye(i=>{(async()=>{try{const n=await Promise.all(t.map(l=>this.fetchTamsResource(l)));if(n.some(l=>l.source))throw new Error("Source found in array of flows");const a=n.map(l=>l.flow);if(a.some(l=>l.format==="urn:x-nmos:format:multi"))throw new Error("Multiflow found in array of flows");if(a.filter(l=>l.format==="urn:x-nmos:format:video").length>1)throw new Error("Multiple video flows found in array of flows");const c=await this.fetchFlowResources({id:yn,source_id:"",format:"urn:x-nmos:format:multi",flow_collection:a.map(l=>({id:l.id,role:""}))},r);i.next(c),i.complete()}catch(n){i.error(n)}})()})}}var Fr,du;function Bm(){if(du)return Fr;du=1;function e(s,c){this.message=s,this.error=c}e.prototype=Object.create(Error.prototype);const t=/([0-9]+)?:?([0-9]{2}):([0-9]{2}\.[0-9]{2,3})/;function r(s,c){c||(c={});const{meta:l=!1,strict:d=!0}=c;if(typeof s!="string")throw new e("Input must be a string");s=s.trim(),s=s.replace(/\r\n/g,`
|
|
64
64
|
`),s=s.replace(/\r/g,`
|
|
65
65
|
`);const f=s.split(`
|
|
66
66
|
|
|
67
|
-
`),m=f.shift();if(!m.startsWith("WEBVTT"))throw new e('Must start with "WEBVTT"');const
|
|
68
|
-
`),h
|
|
69
|
-
`).filter(Boolean);if(v.length>0&&v[0].trim().startsWith("NOTE"))return null;if(v.length===1&&!v[0].includes("-->"))throw new e(`Cue identifier cannot be standalone (cue #${c})`);if(v.length>1&&!(v[0].includes("-->")||v[1].includes("-->"))){const
|
|
70
|
-
`),
|
|
67
|
+
`),m=f.shift();if(!m.startsWith("WEBVTT"))throw new e('Must start with "WEBVTT"');const h=m.split(`
|
|
68
|
+
`),p=h[0].replace("WEBVTT","");if(p.length>0&&p[0]!==" "&&p[0]!==" ")throw new e("Header comment must start with space or tab");if(f.length===0&&h.length===1)return{valid:!0,strict:d,cues:[],errors:[]};if(!l&&h.length>1&&h[1]!=="")throw new e("Missing blank line after signature");const{cues:v,errors:w}=n(f,d);if(d&&w.length>0)throw w[0];const E=l?i(h):null,T={valid:w.length===0,strict:d,cues:v,errors:w};return l&&(T.meta=E),T}function i(s){const c={};return s.slice(1).forEach(l=>{const d=l.indexOf(":"),f=l.slice(0,d).trim(),m=l.slice(d+1).trim();c[f]=m}),Object.keys(c).length>0?c:null}function n(s,c){const l=[];return{cues:s.map((f,m)=>{try{return o(f,m,c)}catch(h){return l.push(h),null}}).filter(Boolean),errors:l}}function o(s,c,l){let d="",f=0,m=.01,h="",p="";const v=s.split(`
|
|
69
|
+
`).filter(Boolean);if(v.length>0&&v[0].trim().startsWith("NOTE"))return null;if(v.length===1&&!v[0].includes("-->"))throw new e(`Cue identifier cannot be standalone (cue #${c})`);if(v.length>1&&!(v[0].includes("-->")||v[1].includes("-->"))){const E=`Cue identifier needs to be followed by timestamp (cue #${c})`;throw new e(E)}v.length>1&&v[1].includes("-->")&&(d=v.shift());const w=typeof v[0]=="string"&&v[0].split(" --> ");if(w.length!==2||!a(w[0])||!a(w[1]))throw new e(`Invalid cue timestamp (cue #${c})`);if(f=u(w[0]),m=u(w[1]),l){if(f>m)throw new e(`Start timestamp greater than end (cue #${c})`);if(m<=f)throw new e(`End must be greater than start (cue #${c})`)}if(!l&&m<f)throw new e(`End must be greater or equal to start when not strict (cue #${c})`);return p=w[1].replace(t,"").trim(),v.shift(),h=v.join(`
|
|
70
|
+
`),h?{identifier:d,start:f,end:m,text:h,styles:p}:!1}function a(s){return t.test(s)}function u(s){const c=s.match(t);let l=parseFloat(c[1]||0)*60*60;return l+=parseFloat(c[2])*60,l+=parseFloat(c[3]),l}return Fr={ParserError:e,parse:r},Fr}var Vr,fu;function E1(){if(fu)return Vr;fu=1;function e(c,l){this.message=c,this.error=l}e.prototype=Object.create(Error.prototype);function t(c){if(!c)throw new e("Input must be non-null");if(typeof c!="object")throw new e("Input must be an object");if(Array.isArray(c))throw new e("Input cannot be array");if(!c.valid)throw new e("Input must be valid");let l=`WEBVTT
|
|
71
71
|
`;if(c.meta){if(typeof c.meta!="object"||Array.isArray(c.meta))throw new e("Metadata must be an object");Object.entries(c.meta).forEach(f=>{if(typeof f[1]!="string")throw new e(`Metadata value for "${f[0]}" must be string`);l+=`${f[0]}: ${f[1]}
|
|
72
72
|
`})}let d=null;return c.cues.forEach((f,m)=>{if(d&&d>f.start)throw new e(`Cue number ${m} is not in chronological order`);d=f.start,l+=`
|
|
73
73
|
`,l+=r(f),l+=`
|
|
@@ -79,11 +79,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
79
79
|
${JSON.stringify(c)}`);if(typeof c.styles!="string")throw new e(`Cue malformed: null styles value.
|
|
80
80
|
${JSON.stringify(c)}`);let l="";c.identifier.length>0&&(l+=`${c.identifier}
|
|
81
81
|
`);const d=i(c.start),f=i(c.end);return l+=`${d} --> ${f}`,l+=c.styles?` ${c.styles}`:"",l+=`
|
|
82
|
-
${c.text}`,l}function i(c){const l=n(o(c),2),d=n(a(c),2),f=n(u(c),2),m=n(s(c),3);return`${l}:${d}:${f}.${m}`}function n(c,l){let d=`${c}`;for(;d.length<l;)d=`0${d}`;return d}function o(c){return Math.floor(c/60/60)}function a(c){return Math.floor(c/60)%60}function u(c){return Math.floor(c%60)}function s(c){return Math.floor((c%1).toFixed(4)*1e3)}return
|
|
82
|
+
${c.text}`,l}function i(c){const l=n(o(c),2),d=n(a(c),2),f=n(u(c),2),m=n(s(c),3);return`${l}:${d}:${f}.${m}`}function n(c,l){let d=`${c}`;for(;d.length<l;)d=`0${d}`;return d}function o(c){return Math.floor(c/60/60)}function a(c){return Math.floor(c/60)%60}function u(c){return Math.floor(c%60)}function s(c){return Math.floor((c%1).toFixed(4)*1e3)}return Vr={CompilerError:e,compile:t},Vr}var Br,mu;function Km(){if(mu)return Br;mu=1;const e=Bm().parse;function t(a,u){u=u||10;const s=e(a),c=[];let l=[],d=null,f=0,m=0;return s.cues.forEach((h,p)=>{const v=p===0,w=p===s.cues.length-1,E=h.start,T=h.end,z=w?1/0:s.cues[p+1].start,M=v?T:T-E,R=v?0:E-s.cues[p-1].end;f=f+M+R,`${p}`,c.length+1,d&&(l.push(d),f+=d.end-m,d=null),l.push(h);let Q=z-T<u&&R<u&&f>u;if(r(m,u,z,R)){const te=i(w,T,u,f,m);c.push({duration:te,cues:l}),m+=te,f=0,l=[]}else Q=!1;Q&&(d=h)}),c}function r(a,u,s,c){const l=n(c,u);return(c<=u||l+a<s)&&s-a>=u}function i(a,u,s,c,l){let d=s;return c>s&&(d=n(c-s,s)),a?d=parseFloat((u-l).toFixed(2)):d=Math.round(d),d}function n(a,u){return a+=u-a%u,a}function o(a){}return Br={segment:t},Br}var Kr,pu;function O1(){if(pu)return Kr;pu=1;const e=Km().segment;function t(l,d,f){typeof f>"u"&&(f="900000");const m=e(l,d),h=[];return m.forEach((p,v)=>{const w=`WEBVTT
|
|
83
83
|
X-TIMESTAMP-MAP=MPEGTS:${f},LOCAL:00:00:00.000
|
|
84
84
|
|
|
85
|
-
${u(
|
|
86
|
-
`,
|
|
85
|
+
${u(p.cues)}
|
|
86
|
+
`,E=n(v);h.push({filename:E,content:w})}),h}function r(l,d){const f=e(l,d),m=o(f);return`#EXTM3U
|
|
87
87
|
#EXT-X-TARGETDURATION:${Math.round(a(f))}
|
|
88
88
|
#EXT-X-VERSION:3
|
|
89
89
|
#EXT-X-MEDIA-SEQUENCE:0
|
|
@@ -94,22 +94,39 @@ ${m}
|
|
|
94
94
|
${n(m)}`)}),d.join(`
|
|
95
95
|
`)}function a(l){let d=0;return l.forEach(f=>{f.duration>d&&(d=f.duration)}),d}function u(l){const d=[];return l.forEach(f=>{d.push(s(f))}),d.join(`
|
|
96
96
|
|
|
97
|
-
`)}function s(l){const d=[];l.identifier&&d.push(l.identifier);const f=c(l.start),m=c(l.end),
|
|
98
|
-
`)}function c(l){const d=(l%1).toFixed(3);l=Math.round(l-d);const f=Math.floor(l/3600),m=Math.floor((l-f*3600)/60),
|
|
97
|
+
`)}function s(l){const d=[];l.identifier&&d.push(l.identifier);const f=c(l.start),m=c(l.end),h=l.styles?`${l.styles}`:"";return d.push(`${f} --> ${m} ${h}`),d.push(l.text),d.join(`
|
|
98
|
+
`)}function c(l){const d=(l%1).toFixed(3);l=Math.round(l-d);const f=Math.floor(l/3600),m=Math.floor((l-f*3600)/60),h=l-f*3600-m*60;return`${`${i(f,2)}:`}${i(m,2)}:${i(h,2)}.${i(d*1e3,3)}`}return Kr={hlsSegment:t,hlsSegmentPlaylist:r},Kr}var Jr,hu;function U1(){if(hu)return Jr;hu=1;const e=Bm().parse,t=E1().compile,r=Km().segment,i=O1();return Jr={parse:e,compile:t,segment:r,hls:i},Jr}var D1=U1();async function N1(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch: ${e}`);const r=await t.arrayBuffer();return new TextDecoder("utf-8").decode(r)}function gu(e){e<0&&(e=0);const t=Math.floor(e/3600).toString().padStart(2,"0"),r=Math.floor(e%3600/60).toString().padStart(2,"0"),i=(e%60).toFixed(3).padStart(6,"0");return`${t}:${r}:${i}`}async function j1(e,t){return e.length?await Promise.all(e.map(async i=>{const n=await N1(i),o=D1.parse(n,{strict:!1,meta:!0});let a=o.cues;t!==void 0&&(a=a.map(l=>({...l,start:l.start-t,end:l.end-t})).filter(l=>l.end>0).map(l=>({...l,start:Math.max(0,l.start),end:Math.max(0,l.end)})));const u=[];u.push("WEBVTT"),o.meta&&o.meta["X-TIMESTAMP-MAP=LOCAL"]&&u.push(`X-TIMESTAMP-MAP=LOCAL${o.meta["X-TIMESTAMP-MAP=LOCAL"]}`),u.push("");for(const l of a)u.push(`${gu(l.start)} --> ${gu(l.end)}`),u.push(l.text),u.push("");const s=u.join(`
|
|
99
99
|
`).trim()+`
|
|
100
|
-
`,c=new Blob([s],{type:"text/vtt"});return URL.createObjectURL(c)})):[]}class
|
|
101
|
-
`)}static generateThumbnailVttBlob(t,r,i){const n=this.generateThumbnailVtt(t,r,i),o=new Blob([n],{type:"text/vtt"});return URL.createObjectURL(o)}static toTimestamp(t){const r=Math.floor(t/3600),i=Math.floor(t%3600/60),n=Math.floor(t%60),o=Math.round(t%1*1e3);return`${String(r).padStart(2,"0")}:${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}.${String(o).padStart(3,"0")}`}static generateThumbnailTrackUrl(t,r,i,n){const o=this.resolveLowestQualityImageFlow(t);return o?this.generateThumbnailVttBlob(r.get(o.id),i,n):void 0}}class
|
|
100
|
+
`,c=new Blob([s],{type:"text/vtt"});return URL.createObjectURL(c)})):[]}class P1{static slewSubtitlesFlows(t,r){return new ye(i=>{(async()=>{var n;try{const o=(n=t.subflows)==null?void 0:n.filter(a=>a.format==="urn:x-nmos:format:data"&&a.container==="text/vtt");o!=null&&o.length&&await Promise.all(o.map(async a=>{const u=t.flowsSegments.get(a.id),s=u.map(l=>{var d;return(d=l.get_urls)==null?void 0:d.at(-1).url});let c=await j1(s,r.mediaStartTime);c=c.map(l=>T1(l)),u.forEach((l,d)=>{l.get_urls=[{url:c.at(d)}]})})),i.next(),i.complete()}catch(o){i.error(o)}})()})}}class A1{static resolveLowestQualityImageFlow(t){const r=t.filter(n=>n.format==="urn:x-tam:format:image");return r.length===0?void 0:r.reduce((n,o)=>{if(n===void 0)return o;const a=n.essence_parameters.frame_width*n.essence_parameters.frame_height;return o.essence_parameters.frame_height*o.essence_parameters.frame_width<a?o:n},void 0)}static generateThumbnailVtt(t,r,i){let n=["WEBVTT",""];return t.forEach((o,a)=>{if((o.get_urls||[]).length===0)return;const s=P.timeMomentToSeconds(P.parseTimeRange(o.timerange).start);let c;if(a===t.length-1?c=r-.001:c=P.timeMomentToSeconds(P.parseTimeRange(t.at(a+1).timerange).start)-.001,c<=s){console.debug(`Malformed thumbnail vtt cue, skipped ${s} --> ${c}`);return}const l=this.toTimestamp(s-i),d=this.toTimestamp(c-i);n.push(`${l} --> ${d}`),n.push(o.get_urls.at(-1).url),n.push("")}),n.join(`
|
|
101
|
+
`)}static generateThumbnailVttBlob(t,r,i){const n=this.generateThumbnailVtt(t,r,i),o=new Blob([n],{type:"text/vtt"});return URL.createObjectURL(o)}static toTimestamp(t){const r=Math.floor(t/3600),i=Math.floor(t%3600/60),n=Math.floor(t%60),o=Math.round(t%1*1e3);return`${String(r).padStart(2,"0")}:${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}.${String(o).padStart(3,"0")}`}static generateThumbnailTrackUrl(t,r,i,n){const o=this.resolveLowestQualityImageFlow(t);return o?this.generateThumbnailVttBlob(r.get(o.id),i,n):void 0}}class Jm{constructor(t){k(this,"_player");k(this,"_videoApiProxy");k(this,"_authenticationData");k(this,"_tamsEndpoint");this._player=new V.OmakasePlayer(t),this._videoApiProxy=new Gu(this._player),this._authenticationData=t==null?void 0:t.authentication}loadVideo(t,r){if(r!=null&&r.duration&&(r!=null&&r.timerange)&&console.warn("Duration and timerange are both set. Using timerange."),this._videoApiProxy.loadOptions=structuredClone(r),this._videoApiProxy.requestedDuration=r==null?void 0:r.duration,typeof t=="string")if((r==null?void 0:r.protocol)===void 0){const i=this._tamsEndpoint??uu(t).at(0);if(i===null)throw Error("Provided URL is not pointing to TAMS");const n=new lu(i,this._authenticationData?su(this._authenticationData):void 0),o=(r==null?void 0:r.timerange)??(r==null?void 0:r.duration);return Rr(a=>{n.fetchManifestResources(t,o).pipe(Mr(u=>this._loadTamsMedia(u,r))).subscribe(a)})}else return this._player.loadVideo(t,r);else if(Array.isArray(t)){if(r!=null&&r.protocol)throw new Error(`Protocol ${r.protocol} can't be used with TAMS media`);const i=this._tamsEndpoint??uu(t.at(0)).at(0);if(i===null)throw Error("Provided URL is not pointing to TAMS");const n=new lu(i,this._authenticationData?su(this._authenticationData):void 0),o=(r==null?void 0:r.timerange)??(r==null?void 0:r.duration);return Rr(a=>{n.fetchManifestResourcesForMultipleFlows(t,o).pipe(Mr(u=>this._loadTamsMedia(u,r).pipe(Ma(s=>{var c;return s.tamsMediaData&&(s.tamsMediaData.flow=void 0,(c=s.tamsMediaData.flowsSegments)==null||c.delete(yn)),s})))).subscribe(a)})}else return this._loadTamsMedia(t,r)}_loadTamsMedia(t,r){return Rr(i=>{const n=ph([t.flow,...t.subflows??[]],t.flowsSegments,r==null?void 0:r.ffomTimeZoneOffset),o={protocol:"hls",ffom:n.ffom,frameRate:n.frameRate,dropFrame:n.dropFrame};let a;r?(r.protocol="hls",a={...o,...r,ffom:o.ffom}):a=o,delete a.duration,this._videoApiProxy.requestedDuration=r==null?void 0:r.duration;const u=Cu(t.flow,t.subflows,t.flowsSegments);if(!u.valid){i.error(u.message);return}if(r&&!z1(r)){i.error("Invalid ffomTimeZoneOffset");return}P1.slewSubtitlesFlows(t,n).pipe(Mr(()=>{const s=Zu(t.flow,t.subflows,t.flowsSegments);return this._player.loadVideo(s.url,a).pipe(Ma(c=>{this._videoApiProxy.mediaStartTime=n.mediaStartTime;const l=A1.generateThumbnailTrackUrl(t.subflows??[],t.flowsSegments,this._player.video.getDuration()+n.mediaStartTime,n.mediaStartTime);return l&&this._player.chroming.setThumbnailVttUrl(l),{...c,mediaStartTime:n.mediaStartTime,tamsMediaData:r!=null&&r.returnTamsMediaData?t:void 0,thumbnailVttTrackUrl:l,videoUrls:s.video,audioUrls:s.audio,textUrls:s.text}}),Yh(c=>{this._videoApiProxy.setTamsVideo(c),this._videoApiProxy.emitVideoLoadedEvent()}))})).subscribe(i)})}createTimeline(t){return this._player.createTimeline(t)}createMarkerList(t){return this._player.createMarkerList(t)}initializeRouterVisualization(t){return this._player.initializeRouterVisualization(t)}setAuthentication(t){return this._authenticationData=t,this._player.setAuthentication(t)}get timeline(){return this._player.timeline}get audio(){return this._player.audio}get subtitles(){return this._player.subtitles}get config(){return this._player.config}set config(t){this._player.config=t}get chroming(){return this._player.chroming}destroy(){return this._player.destroy()}get video(){return this._videoApiProxy.proxy}setTamsEndpoint(t){this._tamsEndpoint=t}}class L1{constructor(t){k(this,"_lanes",[]);k(this,"_markersLaneMap",new Map);k(this,"_laneNodenMap",new Map);this.omakasePlayer=t}addMarkerLane(t){const r={config:t,type:"marker"};this._lanes.push(r)}addMarkers(t,r){this._markersLaneMap.get(t)===void 0&&this._markersLaneMap.set(t,[]),this._markersLaneMap.get(t).push(...r)}addTimelineNode(t,r){this._laneNodenMap.get(t)||this._laneNodenMap.set(t,[]),this._laneNodenMap.get(t).push(r)}addThumbnailLane(t){const r={config:t,type:"thumbnail"};this._lanes.push(r)}addLabelLane(t){const r={config:t,type:"label"};this._lanes.push(r)}addSubtitlesLane(t){const r={config:t,type:"subtitles"};this._lanes.push(r)}buildAndAttachTimeline(t){this.omakasePlayer.createTimeline(t).subscribe({next:r=>{this.buildAttachedTimeline(r)}})}buildAttachedTimeline(t){this._lanes.forEach(r=>this._createAndAttachLane(t,r))}_createAndAttachLane(t,r){let i;if(r.type==="marker"){i=new V.MarkerLane(r.config),t.addTimelineLane(i);const o=this._markersLaneMap.get(i.id);o==null||o.forEach(a=>i.addMarker(a))}else r.type==="thumbnail"?(i=new V.ThumbnailLane(r.config),t.addTimelineLane(i)):r.type==="label"?(i=new V.LabelLane(r.config),t.addTimelineLane(i)):r.type==="subtitles"&&(i=new V.SubtitlesLane(r.config),t.addTimelineLane(i));const n=this._laneNodenMap.get(i.id);n==null||n.forEach(o=>{i.addTimelineNode(o.config)})}}var si=function(e,t){return si=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])},si(e,t)};function an(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");si(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function C1(e,t,r,i){function n(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{c(i.next(l))}catch(d){a(d)}}function s(l){try{c(i.throw(l))}catch(d){a(d)}}function c(l){l.done?o(l.value):n(l.value).then(u,s)}c((i=i.apply(e,t||[])).next())})}function Gm(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(l){return s([c,l])}}function s(c){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(r=0)),r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function yt(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Pn(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),n,o=[],a;try{for(;(t===void 0||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(u){a={error:u}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}function An(e,t,r){if(r||arguments.length===2)for(var i=0,n=t.length,o;i<n;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}function st(e){return this instanceof st?(this.v=e,this):new st(e)}function Z1(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,t||[]),n,o=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",a),n[Symbol.asyncIterator]=function(){return this},n;function a(m){return function(h){return Promise.resolve(h).then(m,d)}}function u(m,h){i[m]&&(n[m]=function(p){return new Promise(function(v,w){o.push([m,p,v,w])>1||s(m,p)})},h&&(n[m]=h(n[m])))}function s(m,h){try{c(i[m](h))}catch(p){f(o[0][3],p)}}function c(m){m.value instanceof st?Promise.resolve(m.value.v).then(l,d):f(o[0][2],m)}function l(m){s("next",m)}function d(m){s("throw",m)}function f(m,h){m(h),o.shift(),o.length&&s(o[0][0],o[0][1])}}function M1(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof yt=="function"?yt(e):e[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(o){r[o]=e[o]&&function(a){return new Promise(function(u,s){a=e[o](a),n(u,s,a.done,a.value)})}}function n(o,a,u,s){Promise.resolve(s).then(function(c){o({value:c,done:u})},a)}}function re(e){return typeof e=="function"}function ha(e){var t=function(i){Error.call(i),i.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Gr=ha(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
102
102
|
`+r.map(function(i,n){return n+1+") "+i.toString()}).join(`
|
|
103
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function ci(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ur=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,i,n,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=bt(a),s=u.next();!s.done;s=u.next()){var c=s.value;c.remove(this)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(re(l))try{l()}catch(h){o=h instanceof Vr?h.errors:[h]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=bt(d),m=f.next();!m.done;m=f.next()){var g=m.value;try{lu(g)}catch(h){o=o??[],h instanceof Vr?o=Nn(Nn([],Dn(o)),Dn(h.errors)):o.push(h)}}}catch(h){i={error:h}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}if(o)throw new Vr(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)lu(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&ci(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&ci(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Cm=Ur.EMPTY;function Lm(e){return e instanceof Ur||e&&"closed"in e&&re(e.remove)&&re(e.add)&&re(e.unsubscribe)}function lu(e){re(e)?e():e.unsubscribe()}var sb={Promise:void 0},lb={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,Nn([e,t],Dn(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Zm(e){lb.setTimeout(function(){throw e})}function si(){}function yn(e){e()}var sa=(function(e){rn(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,Lm(r)&&r.add(i)):i.destination=mb,i}return t.create=function(r,i,n){return new li(r,i,n)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Ur),db=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(i){dn(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){dn(i)}else dn(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){dn(r)}},e})(),li=(function(e){rn(t,e);function t(r,i,n){var o=e.call(this)||this,a;return re(r)||!r?a={next:r??void 0,error:i??void 0,complete:n??void 0}:a=r,o.destination=new db(a),o}return t})(sa);function dn(e){Zm(e)}function fb(e){throw e}var mb={closed:!0,next:si,error:fb,complete:si},la=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Dr(e){return e}function pb(e){return e.length===0?Dr:e.length===1?e[0]:function(r){return e.reduce(function(i,n){return n(i)},r)}}var pe=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,i){var n=this,o=gb(t)?t:new li(t,r,i);return yn(function(){var a=n,u=a.operator,s=a.source;o.add(u?u.call(o,s):s?n._subscribe(o):n._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var i=this;return r=du(r),new r(function(n,o){var a=new li({next:function(u){try{t(u)}catch(s){o(s),a.unsubscribe()}},error:o,complete:n});i.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[la]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return pb(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=du(t),new t(function(i,n){var o;r.subscribe(function(a){return o=a},function(a){return n(a)},function(){return i(o)})})},e.create=function(t){return new e(t)},e})();function du(e){var t;return(t=e??sb.Promise)!==null&&t!==void 0?t:Promise}function hb(e){return e&&re(e.next)&&re(e.error)&&re(e.complete)}function gb(e){return e&&e instanceof sa||hb(e)&&Lm(e)}function vb(e){return re(e==null?void 0:e.lift)}function Ge(e){return function(t){if(vb(t))return t.lift(function(r){try{return e(r,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function We(e,t,r,i,n){return new bb(e,t,r,i,n)}var bb=(function(e){rn(t,e);function t(r,i,n,o,a,u){var s=e.call(this,r)||this;return s.onFinalize=a,s.shouldUnsubscribe=u,s._next=i?function(c){try{i(c)}catch(l){r.error(l)}}:e.prototype._next,s._error=o?function(c){try{o(c)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=n?function(){try{n()}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;e.prototype.unsubscribe.call(this),!i&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(sa),_b=ca(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),He=(function(e){rn(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var i=new fu(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new _b},t.prototype.next=function(r){var i=this;yn(function(){var n,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=bt(i.currentObservers),u=a.next();!u.done;u=a.next()){var s=u.value;s.next(r)}}catch(c){n={error:c}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}}})},t.prototype.error=function(r){var i=this;yn(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=r;for(var n=i.observers;n.length;)n.shift().error(r)}})},t.prototype.complete=function(){var r=this;yn(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var i=r.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var i=this,n=this,o=n.hasError,a=n.isStopped,u=n.observers;return o||a?Cm:(this.currentObservers=null,u.push(r),new Ur(function(){i.currentObservers=null,ci(u,r)}))},t.prototype._checkFinalizedStatuses=function(r){var i=this,n=i.hasError,o=i.thrownError,a=i.isStopped;n?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new pe;return r.source=this,r},t.create=function(r,i){return new fu(r,i)},t})(pe),fu=(function(e){rn(t,e);function t(r,i){var n=e.call(this)||this;return n.destination=r,n.source=i,n}return t.prototype.next=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.next)===null||n===void 0||n.call(i,r)},t.prototype.error=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.error)===null||n===void 0||n.call(i,r)},t.prototype.complete=function(){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||i===void 0||i.call(r)},t.prototype._subscribe=function(r){var i,n;return(n=(i=this.source)===null||i===void 0?void 0:i.subscribe(r))!==null&&n!==void 0?n:Cm},t})(He),yb=new pe(function(e){return e.complete()});function $b(e){return e&&re(e.schedule)}function Mm(e){return e[e.length-1]}function wb(e){return re(Mm(e))?e.pop():void 0}function Sb(e){return $b(Mm(e))?e.pop():void 0}var Rm=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function Fm(e){return re(e==null?void 0:e.then)}function Vm(e){return re(e[la])}function Bm(e){return Symbol.asyncIterator&&re(e==null?void 0:e[Symbol.asyncIterator])}function Km(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function kb(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Jm=kb();function Gm(e){return re(e==null?void 0:e[Jm])}function Wm(e){return ub(this,arguments,function(){var r,i,n,o;return Am(this,function(a){switch(a.label){case 0:r=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,ct(r.read())];case 3:return i=a.sent(),n=i.value,o=i.done,o?[4,ct(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ct(n)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function Hm(e){return re(e==null?void 0:e.getReader)}function Nr(e){if(e instanceof pe)return e;if(e!=null){if(Vm(e))return Ib(e);if(Rm(e))return xb(e);if(Fm(e))return Tb(e);if(Bm(e))return qm(e);if(Gm(e))return zb(e);if(Hm(e))return Eb(e)}throw Km(e)}function Ib(e){return new pe(function(t){var r=e[la]();if(re(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function xb(e){return new pe(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function Tb(e){return new pe(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Zm)})}function zb(e){return new pe(function(t){var r,i;try{for(var n=bt(e),o=n.next();!o.done;o=n.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(u){r={error:u}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}t.complete()})}function qm(e){return new pe(function(t){Ob(e,t).catch(function(r){return t.error(r)})})}function Eb(e){return qm(Wm(e))}function Ob(e,t){var r,i,n,o;return ab(this,void 0,void 0,function(){var a,u;return Am(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),r=cb(e),s.label=1;case 1:return[4,r.next()];case 2:if(i=s.sent(),!!i.done)return[3,4];if(a=i.value,t.next(a),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=s.sent(),n={error:u},[3,11];case 6:return s.trys.push([6,,9,10]),i&&!i.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Me(e,t,r,i,n){i===void 0&&(i=0),n===void 0&&(n=!1);var o=t.schedule(function(){r(),n?e.add(this.schedule(null,i)):this.unsubscribe()},i);if(e.add(o),!n)return o}function Xm(e,t){return t===void 0&&(t=0),Ge(function(r,i){r.subscribe(We(i,function(n){return Me(i,e,function(){return i.next(n)},t)},function(){return Me(i,e,function(){return i.complete()},t)},function(n){return Me(i,e,function(){return i.error(n)},t)}))})}function Ym(e,t){return t===void 0&&(t=0),Ge(function(r,i){i.add(e.schedule(function(){return r.subscribe(i)},t))})}function Ub(e,t){return Nr(e).pipe(Ym(t),Xm(t))}function Db(e,t){return Nr(e).pipe(Ym(t),Xm(t))}function Nb(e,t){return new pe(function(r){var i=0;return t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||this.schedule())})})}function jb(e,t){return new pe(function(r){var i;return Me(r,t,function(){i=e[Jm](),Me(r,t,function(){var n,o,a;try{n=i.next(),o=n.value,a=n.done}catch(u){r.error(u);return}a?r.complete():r.next(o)},0,!0)}),function(){return re(i==null?void 0:i.return)&&i.return()}})}function Qm(e,t){if(!e)throw new Error("Iterable cannot be null");return new pe(function(r){Me(r,t,function(){var i=e[Symbol.asyncIterator]();Me(r,t,function(){i.next().then(function(n){n.done?r.complete():r.next(n.value)})},0,!0)})})}function Pb(e,t){return Qm(Wm(e),t)}function Ab(e,t){if(e!=null){if(Vm(e))return Ub(e,t);if(Rm(e))return Nb(e,t);if(Fm(e))return Db(e,t);if(Bm(e))return Qm(e,t);if(Gm(e))return jb(e,t);if(Hm(e))return Pb(e,t)}throw Km(e)}function ep(e,t){return t?Ab(e,t):Nr(e)}var tp=ca(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Cb(e,t){return Ge(function(r,i){var n=0;r.subscribe(We(i,function(o){i.next(e.call(t,o,n++))}))})}var Lb=Array.isArray;function Zb(e,t){return Lb(t)?e.apply(void 0,Nn([],Dn(t))):e(t)}function Mb(e){return Cb(function(t){return Zb(e,t)})}var Rb=Array.isArray,Fb=Object.getPrototypeOf,Vb=Object.prototype,Bb=Object.keys;function Kb(e){if(e.length===1){var t=e[0];if(Rb(t))return{args:t,keys:null};if(Jb(t)){var r=Bb(t);return{args:r.map(function(i){return t[i]}),keys:r}}}return{args:e,keys:null}}function Jb(e){return e&&typeof e=="object"&&Fb(e)===Vb}function Gb(e,t){return e.reduce(function(r,i,n){return r[i]=t[n],r},{})}function Wb(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Sb(e),i=wb(e),n=Kb(e),o=n.args,a=n.keys;if(o.length===0)return ep([],r);var u=new pe(Hb(o,r,a?function(s){return Gb(a,s)}:Dr));return i?u.pipe(Mb(i)):u}function Hb(e,t,r){return r===void 0&&(r=Dr),function(i){mu(t,function(){for(var n=e.length,o=new Array(n),a=n,u=n,s=function(l){mu(t,function(){var d=ep(e[l],t),f=!1;d.subscribe(We(i,function(m){o[l]=m,f||(f=!0,u--),u||i.next(r(o.slice()))},function(){--a||i.complete()}))},i)},c=0;c<n;c++)s(c)},i)}}function mu(e,t,r){e?Me(r,e,t):t()}function qb(e,t){return Ge(function(r,i){var n=0;r.subscribe(We(i,function(o){return e.call(t,o,n++)&&i.next(o)}))})}function Xb(e){return Ge(function(t,r){var i=!1;t.subscribe(We(r,function(n){i=!0,r.next(n)},function(){i||r.next(e),r.complete()}))})}function Yb(e){return e<=0?function(){return yb}:Ge(function(t,r){var i=0;t.subscribe(We(r,function(n){++i<=e&&(r.next(n),e<=i&&r.complete())}))})}function Qb(e){return e===void 0&&(e=e_),Ge(function(t,r){var i=!1;t.subscribe(We(r,function(n){i=!0,r.next(n)},function(){return i?r.complete():r.error(e())}))})}function e_(){return new tp}function ot(e,t){var r=arguments.length>=2;return function(i){return i.pipe(Dr,Yb(1),r?Xb(t):Qb(function(){return new tp}))}}function ae(e){return Ge(function(t,r){Nr(e).subscribe(We(r,function(){return r.complete()},si)),!r.closed&&t.subscribe(r)})}class t_{constructor(){k(this,"actionZoomIn");k(this,"actionZoomOut");k(this,"actionResetZoom");k(this,"actionToggleNextAudioTrack");k(this,"actionTogglePreviousAudioTrack");k(this,"actionToggleCti")}getKeyboardShortcutsHelpMenuGroup(){let t=(...n)=>n.join(" + "),r="shift".toUpperCase();return{name:"Timeline function shortcuts",items:[{description:"Timeline Zoom In",name:t("=")},{description:"Timeline Zoom Out",name:t("-")},{description:"Timeline Zoom level 100%",name:t("0")},{description:"Toggle Next Audio Track",name:t(r,"e")},{description:"Toggle Previous Audio Track",name:t("e")},{description:"Toggle CTI into / out-of Interactive Mode",name:t("'")}]}}handleKeyboardEvent(t){const r=t.target;return["INPUT","TEXTAREA","OMAKASE-MARKER-LIST"].includes(r.tagName.toUpperCase())?!1:t.code==="Equal"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionZoomIn&&this.actionZoomIn(),!0):t.code==="Minus"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionZoomOut&&this.actionZoomOut(),!0):t.code==="Digit0"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionResetZoom&&this.actionResetZoom(),!0):t.code==="KeyE"&&!t.ctrlKey&&!t.metaKey?(t.shiftKey?this.actionToggleNextAudioTrack&&this.actionToggleNextAudioTrack():this.actionTogglePreviousAudioTrack&&this.actionTogglePreviousAudioTrack(),!0):t.code==="Quote"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionToggleCti&&this.actionToggleCti(),!0):!1}}const n_=$.memo(({omakasePlayer:e,onTimelineCreatedCallback:t,timelineConfig:r,enableHotKeys:i})=>($.useEffect(()=>{if(r.timelineHTMLElementId===void 0&&(r.timelineHTMLElementId="omakase-timeline"),e.createTimeline(r).subscribe({next:n=>{Wb([e.timeline.onReady$,e.video.onVideoLoaded$.pipe(qb(o=>!!o))]).subscribe({next:()=>t(n)})}}),i===void 0||i){const n=new t_;n.actionToggleCti=()=>{var u;return(u=e.timeline)==null?void 0:u.toggleTimecodeEdit()},n.actionResetZoom=()=>{var u;return(u=e.timeline)==null?void 0:u.zoomToEased(100)},n.actionZoomIn=()=>{var u;return(u=e.timeline)==null?void 0:u.zoomInEased()},n.actionZoomOut=()=>{var u;return(u=e.timeline)==null?void 0:u.zoomOutEased()};const o=u=>{const s=e.audio.getAudioTracks(),c=e.audio.getActiveAudioTrack(),d=s.findIndex(f=>f.id===(c==null?void 0:c.id))+(u?-1:1);d>=0&&d<s.length&&e.audio.setActiveAudioTrack(s.at(d).id)};n.actionTogglePreviousAudioTrack=()=>o(!0),n.actionToggleNextAudioTrack=()=>o(!1);const a=u=>{n.handleKeyboardEvent(u)&&(u.preventDefault(),u.stopPropagation())};return window.addEventListener("keydown",a),e.chroming.appendHelpMenuGroup(n.getKeyboardShortcutsHelpMenuGroup()),()=>{window.removeEventListener("keydown",a)}}},[e]),$.createElement("div",{id:r.timelineHTMLElementId})));class np{static get window(){return window}static get navigator(){return window.navigator}static get userAgent(){var r;const t=((r=this.navigator)==null?void 0:r.userAgent)||"";return/Android/i.test(t)?"android":/Firefox/i.test(t)?"firefox":/Edg/i.test(t)?"edge":(/Chrome/i.test(t)||/CriOS/i.test(t))&&!/Edg/i.test(t)?"chrome":/Chrome/i.test(t)||/CriOS/i.test(t)?"chromium":/Safari/i.test(t)?"safari":"unknown"}static get platform(){var r,i,n;const t=((i=(r=this.navigator)==null?void 0:r.userAgentData)==null?void 0:i.platform)||((n=this.navigator)==null?void 0:n.platform);return t!=null&&t.toUpperCase().includes("MAC")?"macos":t!=null&&t.toUpperCase().includes("WIN")?"windows":t!=null&&t.toUpperCase().includes("LINUX")?"linux":"unknown"}static isUserAgent(t){return this.userAgent===t}static isPlatform(t){return this.platform===t}static open(t,r="_blank"){this.window.open(t,r)}}const St=[.25,.5,.75,1,2,4,8];class jn{static getKeyboardShortcutsHelpMenuGroup(){let t=(...o)=>o.join(" + "),r="shift".toUpperCase(),i="ctrl".toUpperCase();return{name:"Playback function shortcuts",items:[{description:"Play / Pause",name:t("Space")},{description:"Toggle Sound",name:t("s")},{description:"Toggle Text On / Off",name:t("d")},{description:"Toggle Full Screen",name:t("f")},{description:"Increase Volume",name:t(r,"\\")},{description:"Reduce Volume",name:t("\\")},{description:"One Frame Forward",name:t("Right Arrow")},{description:"One Frame Backward",name:t("Left Arrow")},{description:"10 Frames Forward",name:t(r,"Right Arrow")},{description:"10 Frames Backwards",name:t(r,"Left Arrow")},{description:"Stop shuttle and pause",name:t("k")},{description:"Decrease Shuttle Forwards",name:t("l")},{description:"Increase Shuttle Forwards",name:t(r,"l")},{description:"Set playhead to Start of Media and Stop",name:t("1 / Home")},{description:"Set playhead to End of Media and Stop",name:t(i,"1")+" / End"}]}}static handleKeyboardEvent(t,r){const i=t.target,n=["INPUT","TEXTAREA","OMAKASE-MARKER-LIST"],o=np.userAgent;if(n.includes(i.tagName.toUpperCase()))return!1;if(r&&r.video){if(t.code==="Space"&&(o!=="safari"||!r.video.isFullscreen()))return r.video.togglePlayPause(),!0;if(t.code==="KeyS"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey)return r.audio.toggleAudioOutputMuteUnmute(),!0;if(t.code==="Backslash"){let a=10,u=t.shiftKey?1:-1,s=r.audio.getAudioOutputVolume()*100+a*u;s>=100?s=100:s<=0&&(s=0),r.audio.setAudioOutputVolume(s/100)}if(t.code==="KeyD"&&!(t.ctrlKey&&t.shiftKey&&t.metaKey))return r.subtitles.toggleShowHideActiveTrack(),!0;if(t.code==="KeyK"&&!t.ctrlKey&&!t.shiftKey&&!t.metaKey&&(r.video.setPlaybackRate(1),r.video.pause()),t.code==="KeyL"&&!t.ctrlKey&&!t.metaKey){let a=t.shiftKey?1:-1;const u=St.indexOf(r.video.getPlaybackRate())+a;let s;return u<0?s=St.at(0):u>=St.length?s=St.at(-1):s=St.at(u),r.video.setPlaybackRate(s),r.video.isPaused()&&r.video.play(),!0}if(r.video.isVideoLoaded()){if(["ArrowLeft","ArrowRight"].includes(t.key)&&!t.metaKey&&!t.altKey){let a=t.key==="ArrowRight"?1:-1,u=t.shiftKey?10:1;return r.video.isPlaying()&&r.video.pause(),r.video.seekFromCurrentFrame(u*a),!0}if(t.code==="Digit1"&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&!t.altKey||t.code==="Home")return r.video.pause().subscribe(()=>r.video.seekToFrame(0)),!0;if(t.code==="Digit1"&&t.ctrlKey||t.code==="End")return r.video.isPlaying()?r.video.pause().subscribe(()=>r.video.seekToEnd()):r.video.seekToEnd(),!0}if(t.code==="KeyF"&&!t.ctrlKey&&!t.shiftKey&&!t.metaKey)return r.video.toggleFullscreen(),!0}return!1}}const r_=$.memo(function({videoUrl:t,config:r,videoLoadOptions:i,onVideoLoadedCallback:n,enableHotkeys:o}){return r&&(r==null?void 0:r.playerHTMLElementId)===void 0&&(r.playerHTMLElementId="omakase-player"),$.useEffect(()=>{var s,c;let a=new B.OmakasePlayer(r);const u=l=>{jn.handleKeyboardEvent(l,a)&&(l.stopPropagation(),l.preventDefault())};return(o===void 0||o)&&((s=document.querySelector("media-controller"))==null||s.setAttribute("nohotkeys",""),(c=document.querySelector("media-controller"))==null||c.setAttribute("tabindex","-1"),window.addEventListener("keydown",u),a.chroming.appendHelpMenuGroup(jn.getKeyboardShortcutsHelpMenuGroup())),a.loadVideo(t,i).subscribe({next:l=>{n&&n(a,l)}}),()=>{(o===void 0||o)&&window.removeEventListener("keydown",u)}},[t]),$.createElement("div",{id:r.playerHTMLElementId})}),i_=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M10.5675 21C10.2375 21 9.9675 20.73 9.9675 20.4V16.7925L5.6325 12.3675L9.9675 8.235V3.6C9.9675 3.27 10.2375 3 10.5675 3C10.8975 3 11.1675 3.27 11.1675 3.6V8.7525L7.3425 12.3975L11.1675 16.305V20.4C11.1675 20.73 10.8975 21 10.5675 21Z",fill:"#CACFEA"}),$.createElement("path",{d:"M17.7675 17.145C17.61 17.145 17.46 17.085 17.34 16.965L12.8325 12.3675L17.355 8.0625C17.595 7.8375 17.9775 7.845 18.2025 8.085C18.4275 8.325 18.42 8.7075 18.18 8.9325L14.5425 12.3975L18.195 16.125C18.4275 16.365 18.42 16.74 18.1875 16.9725C18.075 17.085 17.9175 17.145 17.7675 17.145Z",fill:"#CACFEA"})),o_=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M13.4325 21C13.7625 21 14.0325 20.73 14.0325 20.4V16.7925L18.3675 12.3675L14.0325 8.235V3.6C14.0325 3.27 13.7625 3 13.4325 3C13.1025 3 12.8325 3.27 12.8325 3.6V8.7525L16.6575 12.3975L12.8325 16.305V20.4C12.8325 20.73 13.1025 21 13.4325 21Z",fill:"#CACFEA"}),$.createElement("path",{d:"M6.2325 17.145C6.39 17.145 6.54 17.085 6.66 16.965L11.1675 12.3675L6.645 8.0625C6.405 7.8375 6.0225 7.845 5.7975 8.085C5.5725 8.325 5.58 8.7075 5.82 8.9325L9.4575 12.3975L5.805 16.125C5.5725 16.365 5.58 16.74 5.8125 16.9725C5.925 17.085 6.0825 17.145 6.2325 17.145Z",fill:"#CACFEA"})),a_=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M14.1675 21C13.8375 21 13.5675 20.73 13.5675 20.4V16.7925L9.2325 12.3675L13.5675 8.235V3.6C13.5675 3.27 13.8375 3 14.1675 3C14.4975 3 14.7675 3.27 14.7675 3.6V8.7525L10.9425 12.3975L14.7675 16.305V20.4C14.7675 20.73 14.4975 21 14.1675 21Z",fill:"#CACFEA"})),u_=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M9.8325 21C10.1625 21 10.4325 20.73 10.4325 20.4V16.7925L14.7675 12.3675L10.4325 8.235V3.6C10.4325 3.27 10.1625 3 9.8325 3C9.5025 3 9.2325 3.27 9.2325 3.6V8.7525L13.0575 12.3975L9.2325 16.305V20.4C9.2325 20.73 9.5025 21 9.8325 21Z",fill:"#CACFEA"})),c_=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M11.3475 3H5.775V21L11.3475 17.0475V3Z",fill:"#CACFEA"}),$.createElement("path",{d:"M18.225 21L12.6525 17.0475V3H18.225V21ZM13.7775 16.47L17.1 18.825V4.125H13.7775V16.47Z",fill:"#CACFEA"})),s_=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M4.6875 3V21L8.0625 17.0475L11.4375 21V3H4.6875Z",fill:"#CACFEA"}),$.createElement("path",{d:"M12.5625 3V21L15.9375 17.0475L19.3125 21V3H12.5625Z",fill:"#CACFEA"})),l_=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M6.39001 3V21L12 17.0175L17.61 21V3H6.38251H6.39001ZM16.44 3.84L7.23001 18.7125V3.84H16.44ZM12 15.9975L8.25751 18.6525L16.77 4.89V19.3725L12 15.9825V15.9975Z",fill:"#CACFEA"})),d_=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M12.3075 8.0175L14.4525 5.8725C14.6175 5.7075 14.6175 5.43 14.4525 5.265L12.3 3.12C12.135 2.955 11.8575 2.955 11.6925 3.12C11.5275 3.285 11.5275 3.5625 11.6925 3.7275L13.1025 5.1375H6.64499C5.22749 5.1375 4.07249 6.2925 4.07249 7.71V16.2825C4.07249 17.7 5.22749 18.855 6.64499 18.855C6.87749 18.855 7.07249 18.66 7.07249 18.4275C7.07249 18.195 6.87749 18 6.64499 18C5.69249 18 4.93499 17.2275 4.93499 16.29V7.7175C4.93499 6.765 5.70749 6.0075 6.64499 6.0075H13.11L11.7 7.4175C11.535 7.5825 11.535 7.86 11.7 8.025C11.865 8.19 12.1425 8.19 12.3075 8.025V8.0175Z",fill:"#CACFEA"}),$.createElement("path",{d:"M17.355 18.8625C18.7725 18.8625 19.9275 17.7075 19.9275 16.29V7.7175C19.9275 6.3 18.7725 5.145 17.355 5.145C17.1225 5.145 16.9275 5.34 16.9275 5.5725C16.9275 5.805 17.1225 6 17.355 6C18.3075 6 19.065 6.7725 19.065 7.71V16.2825C19.065 17.235 18.2925 17.9925 17.355 17.9925H10.89L12.3075 16.5825C12.3825 16.5075 12.435 16.395 12.435 16.2825C12.435 16.17 12.3975 16.0575 12.3075 15.9825C12.15 15.8175 11.8575 15.825 11.7 15.9825L9.52501 18.1575V18.18C9.45751 18.255 9.42751 18.345 9.42751 18.435C9.42751 18.555 9.46501 18.66 9.55501 18.735L11.7 20.88C11.8575 21.045 12.15 21.045 12.3075 20.88C12.4725 20.715 12.4725 20.4375 12.3075 20.2725L10.89 18.8625H17.355Z",fill:"#CACFEA"})),f_=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("g",{clipPath:"url(#clip0_3377_237)"},$.createElement("path",{d:"M13.02 19.95C17.42 19.95 21 16.37 21 11.97C21 7.57 17.42 4 13.02 4C8.88 4 5.39 7.24 5.08 11.37L5.02 12.14L3.56 10.68C3.49 10.61 3.41 10.58 3.33 10.58C3.25 10.58 3.17 10.61 3.1 10.68C3.03 10.75 3 10.83 3 10.92C3 11 3.03 11.08 3.1 11.15L5.22 13.27C5.35 13.4 5.55 13.43 5.65 13.3L7.8 11.15C7.87 11.08 7.9 11 7.9 10.92C7.9 10.84 7.86 10.76 7.8 10.69C7.73 10.62 7.65 10.59 7.57 10.59C7.49 10.59 7.41 10.62 7.34 10.69L5.9 12.13L6.03 11.11C6.45 7.57 9.46 4.91 13.02 4.91C16.91 4.91 20.08 8.08 20.08 11.97C20.08 15.86 16.91 19.03 13.02 19.03C12.77 19.03 12.56 19.24 12.56 19.49C12.56 19.74 12.77 19.95 13.02 19.95Z",fill:"#CACFEA"}),$.createElement("path",{d:"M14.95 13.19C14.95 13.72 14.75 14.14 14.36 14.45C13.97 14.76 13.43 14.91 12.75 14.91C12.16 14.91 11.69 14.81 11.32 14.62V13.53C11.7 13.81 12.14 13.95 12.65 13.95C12.98 13.95 13.23 13.88 13.41 13.74C13.59 13.6 13.67 13.41 13.67 13.17C13.67 12.93 13.56 12.72 13.34 12.58C13.12 12.44 12.82 12.37 12.43 12.37H11.92V11.41H12.39C13.13 11.41 13.5 11.16 13.5 10.67C13.5 10.21 13.22 9.98 12.65 9.98C12.26 9.98 11.89 10.1 11.54 10.35V9.33C11.93 9.13 12.4 9.03 12.94 9.03C13.48 9.03 13.94 9.16 14.28 9.41C14.62 9.66 14.79 10.01 14.79 10.44C14.79 11.19 14.41 11.65 13.66 11.84V11.86C14.06 11.91 14.37 12.05 14.61 12.29C14.85 12.53 14.96 12.83 14.96 13.19H14.95Z",fill:"#CACFEA"})),$.createElement("defs",null,$.createElement("clipPath",{id:"clip0_3377_237"},$.createElement("rect",{width:"18",height:"15.95",fill:"white",transform:"translate(3 4)"})))),m_=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("g",{clipPath:"url(#clip0_3377_260)"},$.createElement("path",{d:"M10.98 19.95C6.58 19.95 3 16.37 3 11.98C3 7.58 6.58 4 10.98 4C15.12 4 18.61 7.24 18.93 11.37L18.99 12.14L20.45 10.68C20.52 10.61 20.6 10.58 20.68 10.58C20.76 10.58 20.84 10.61 20.91 10.68C20.98 10.75 21.01 10.83 21.01 10.91C21.01 10.99 20.98 11.07 20.91 11.14L18.79 13.26C18.66 13.39 18.46 13.42 18.36 13.29L16.21 11.14C16.14 11.07 16.11 10.99 16.11 10.91C16.11 10.83 16.15 10.75 16.21 10.68C16.28 10.61 16.36 10.58 16.44 10.58C16.52 10.58 16.6 10.61 16.67 10.68L18.11 12.12L17.98 11.1C17.55 7.57 14.54 4.91 10.98 4.91C7.09 4.91 3.92 8.08 3.92 11.97C3.92 15.86 7.09 19.03 10.98 19.03C11.23 19.03 11.44 19.24 11.44 19.49C11.44 19.74 11.23 19.95 10.98 19.95Z",fill:"#CACFEA"}),$.createElement("path",{d:"M12.91 13.19C12.91 13.72 12.71 14.14 12.32 14.45C11.93 14.76 11.39 14.91 10.71 14.91C10.12 14.91 9.65 14.81 9.28 14.62V13.53C9.66 13.81 10.1 13.95 10.61 13.95C10.94 13.95 11.19 13.88 11.37 13.74C11.55 13.6 11.63 13.41 11.63 13.17C11.63 12.93 11.52 12.72 11.3 12.58C11.08 12.44 10.78 12.37 10.39 12.37H9.88V11.41H10.35C11.09 11.41 11.46 11.16 11.46 10.67C11.46 10.21 11.18 9.98 10.61 9.98C10.22 9.98 9.85 10.1 9.5 10.35V9.33C9.89 9.13 10.36 9.03 10.9 9.03C11.44 9.03 11.9 9.16 12.24 9.41C12.58 9.66 12.75 10.01 12.75 10.44C12.75 11.19 12.37 11.65 11.62 11.84V11.86C12.02 11.91 12.33 12.05 12.57 12.29C12.81 12.53 12.92 12.83 12.92 13.19H12.91Z",fill:"#CACFEA"})),$.createElement("defs",null,$.createElement("clipPath",{id:"clip0_3377_260"},$.createElement("rect",{width:"18",height:"15.95",fill:"white",transform:"translate(3 4)"})))),ve=({Icon:e,onClick:t,width:r,height:i,text:n,disabled:o})=>$.createElement("button",{disabled:o,onClick:t},$.createElement(e,{width:r,height:i})," ",n),p_=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M12.6525 17.0475L18.225 21V3H12.6525V17.0475Z",fill:"#CACFEA"}),$.createElement("path",{d:"M5.775 3H11.3475V17.0475L5.775 21V3ZM10.2225 4.125H6.9V18.825L10.2225 16.47V4.125Z",fill:"#CACFEA"})),h_=({width:e,height:t})=>$.createElement("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("rect",{x:"0.5",y:"0.5",width:"13",height:"13",rx:"2.5",stroke:"#CACFEA"}),$.createElement("path",{d:"M7.16667 6.33333V6.83333H7.66667H10.3333C10.4257 6.83333 10.5 6.90769 10.5 7C10.5 7.09231 10.4257 7.16667 10.3333 7.16667H7.66667H7.16667V7.66667V10.3333C7.16667 10.4257 7.09231 10.5 7 10.5C6.90769 10.5 6.83333 10.4257 6.83333 10.3333V7.66667V7.16667H6.33333H3.66667C3.57468 7.16667 3.5 7.09199 3.5 7C3.5 6.90801 3.57468 6.83333 3.66667 6.83333H6.33333H6.83333V6.33333V3.66667C6.83333 3.57468 6.90801 3.5 7 3.5C7.09199 3.5 7.16667 3.57468 7.16667 3.66667V6.33333Z",fill:"#CACFEA",stroke:"#CACFEA"}));function we(e){e.next(),e.complete()}class g_{constructor(){k(this,"actionMarkerInOut");k(this,"actionMarkerSplit");k(this,"actionMarkerDelete");k(this,"actionPreviousMarkerToggle");k(this,"actionNextMarkerToggle");k(this,"actionSetMarkerStartToPlayhead");k(this,"actionSetMarkerEndToPlayhead");k(this,"actionSetPlayheadToMarkerStart");k(this,"actionSetPlayheadToMarkerEnd");k(this,"actionRewind3SecondsAndPlayToCurrent");k(this,"actionPlay3SecondsAndRewindToCurrent");k(this,"actionLoopActiveMarker")}getKeyboardShortcutsHelpMenuGroup(){let t=(...a)=>a.join(" + "),r="shift".toUpperCase();const i=np.platform;let n=i==="windows"?"win":i==="linux"?"super":"cmd";return{name:"Segmentation function shortcuts",items:[{description:"Mark In / Out",name:t("m")},{description:"Split Active Marker",name:t(".")},{description:"Delete Active Marker",name:t("n")},{description:"Toggle Previous Marker",name:t("/")},{description:"Toggle Next Marker",name:t(r,"/")},{description:"Set Start of Active Marker to Playhead Position",name:t("i")},{description:"Set End of Active Marker to Playhead Position",name:t("o")},{description:"Set Playhead to Start of Active Marker",name:t("[")},{description:"Set Playhead to End of Active Marker",name:t("]")},{description:"Rewind 3 Seconds and Play to Current Playhead",name:t(n,"Arrow Left")},{description:"Play 3 Seconds and Rewind to Current Playhead",name:t(n,"Arrow Right")},{description:"Loop on Active Marker",name:t("p")}]}}handleKeyboardEvent(t,r){const i=t.target;return["INPUT","TEXTAREA","OMAKASE-MARKER-LIST"].includes(i.tagName.toUpperCase())?!1:t.code==="KeyM"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionMarkerInOut&&this.actionMarkerInOut(),!0):t.code==="Period"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionMarkerSplit&&this.actionMarkerSplit(),!0):t.code==="KeyN"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionMarkerDelete&&this.actionMarkerDelete(),!0):t.code==="Slash"&&!t.ctrlKey&&!t.metaKey?(t.shiftKey?this.actionNextMarkerToggle&&this.actionNextMarkerToggle():this.actionPreviousMarkerToggle&&this.actionPreviousMarkerToggle(),!0):t.code==="KeyI"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionSetMarkerStartToPlayhead&&this.actionSetMarkerStartToPlayhead(),!0):t.code==="KeyO"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionSetMarkerEndToPlayhead&&this.actionSetMarkerEndToPlayhead(),!0):t.code==="BracketLeft"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionSetPlayheadToMarkerStart&&this.actionSetPlayheadToMarkerStart(),!0):t.code==="BracketRight"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionSetPlayheadToMarkerEnd&&this.actionSetPlayheadToMarkerEnd(),!0):t.code==="ArrowLeft"&&!t.shiftKey&&!t.ctrlKey&&t.metaKey?(this.actionRewind3SecondsAndPlayToCurrent&&this.actionRewind3SecondsAndPlayToCurrent(),!0):t.code==="ArrowRight"&&!t.shiftKey&&!t.ctrlKey&&t.metaKey?(this.actionPlay3SecondsAndRewindToCurrent&&this.actionPlay3SecondsAndRewindToCurrent(),!0):t.code==="KeyP"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionLoopActiveMarker&&this.actionLoopActiveMarker(),!0):!1}}const fn=(e,t,r)=>e.getMarkers().reduce((i,n)=>{if(t.id===n.id)return i;if(n instanceof B.PeriodMarker&&n.timeObservation.start!=null&&n.timeObservation.end!=null){const o=t.timeObservation,a=n.timeObservation.start,u=n.timeObservation.end,s=o.start,c=r??o.end;if(s!=null&&c!=null)return i||s<=u&&c>=a}return i},!1);function mn(e,t,r){if(!e||!(e instanceof B.PeriodMarker))return!0;const i=e.timeObservation.start,n=e.timeObservation.end;if(i==null||n==null)return!0;const o=r.video.calculateTimeToFrame(n),a=r.video.calculateTimeToFrame(i),u=r.video.getCurrentFrame();return t<i||o-u<2||u-a<1}function pn(e){return!(e.timeObservation.start==null||e.timeObservation.end==null)}const v_=({selectedMarker:e,omakasePlayer:t,markerListApi:r,enableHotKeys:i,segmentationLanes:n,setSegmentationLanes:o,setSelectedMarker:a,onMarkerClickCallback:u,setSource:s,source:c,constants:l})=>{const d=$.useRef(void 0),f=$.useRef(void 0),m=new He,g=$.useRef(!1),h=(S,x,P)=>{const J=x??t.video.getCurrentTime();return S.getMarkers().reduce((R,le)=>le instanceof B.PeriodMarker&&le.timeObservation.start!==void 0&&le.timeObservation.end!==void 0&&le.id!==(P==null?void 0:P.id)?R||J>=le.timeObservation.start&&J<=le.timeObservation.end:R,!1)},v=S=>{if(j===void 0)return!0;const x=j.timeObservation.start,P=S??t.video.getCurrentTime();return!!(x==null||x>=P||fn(c,j,P))},w=S=>j!==void 0||c===void 0?!0:h(c,S,j),[T,z]=$.useState(void 0),[L,F]=$.useState(mn(e,t.video.getCurrentTime(),t)),[j,ee]=$.useState(void 0),[te,Y]=$.useState(v()),[Ce,ie]=$.useState(w()),Ue=S=>{if(S===void 0||c===void 0||!(S instanceof B.PeriodMarker))return!0;const x=fn(c,S,t.video.getCurrentTime());if(x)return x;if(S instanceof B.PeriodMarker){const P=S.timeObservation.end;if(P!=null&&t.video.getCurrentTime()>=P)return!0}return!1},De=S=>{if(S===void 0||c===void 0||!(S instanceof B.PeriodMarker))return!0;const x=fn(c,S,t.video.getCurrentTime());if(x)return x;if(S instanceof B.PeriodMarker){if(S.timeObservation.end==null)return!0;const P=S.timeObservation.start;if(P!=null&&t.video.getCurrentTime()<=P)return!0}return!1},[rt,Q]=$.useState(Ue(e)),[V,jr]=$.useState(De(e));$.useEffect(()=>{if(Y(()=>v()),ie(()=>w()),j&&j!==e){const S=n.find(x=>x.getMarker(j.id));S==null||S.removeMarker(j.id),ee(void 0)}},[e,j,n,ee]),$.useEffect(()=>()=>we(m),[]),$.useEffect(()=>{if(Q(Ue(e)),jr(De(e)),e){const S=mn(e,t.video.getCurrentTime(),t);F(S);const x=t.video.onVideoTimeChange$.pipe(ae(m)).subscribe({next:P=>{F(J=>mn(e,P.currentTime,t)),Q(()=>Ue(e)),jr(()=>De(e))}});return()=>x.unsubscribe()}},[e]),$.useEffect(()=>{t.video.onSeeking$.pipe(ae(m)).subscribe({next:x=>{Y(()=>v(x.toTime)),ie(()=>w(x.toTime))}});const S=t.video.onVideoTimeChange$.pipe(ae(m)).subscribe({next:x=>{Y(()=>v()),ie(()=>w())}});return()=>S.unsubscribe()},[j,c]),$.useEffect(()=>{const S=n.map(x=>x.onMarkerUpdate$.pipe(ae(m)).subscribe({next:P=>{(e==null?void 0:e.id)===P.marker.id&&(F(J=>mn(e,t.video.getCurrentTime(),t)),Q(()=>Ue(e)),jr(()=>De(e)))}}));return()=>S.forEach(x=>x.unsubscribe())},[n,e]),$.useEffect(()=>{T&&(T.marker.style={...T.marker.style,color:T.color},T.marker.timeObservation={...T.marker.timeObservation},z(void 0))},[e]),$.useEffect(()=>{if(c){Y(()=>v()),ie(()=>w());const S=c.onMarkerDelete$.pipe(ae(m)).subscribe({next:P=>{const J=P.marker;z(R=>{if((R==null?void 0:R.marker.id)!==J.id)return R}),a(R=>{if((R==null?void 0:R.id)!==J.id)return R}),ee(R=>{if((R==null?void 0:R.id)!==J.id)return R}),Y(()=>v()),ie(()=>w())}}),x=c.onMarkerUpdate$.pipe(ae(m)).subscribe({next:()=>{Y(()=>v()),ie(()=>w())}});return()=>{S.unsubscribe(),x.unsubscribe()}}},[c]);const da=(S,x)=>{if(x===void 0)return;const P=x.timeObservation;S.video.seekToTime(P.start)},fa=(S,x)=>{if(x===void 0)return;const P=x.timeObservation;S.video.seekToTime(P.end)},ma=(S,x)=>{x instanceof B.PeriodMarker&&x.timeObservation.start!==void 0&&(x.timeObservation={...x.timeObservation,start:S.video.getCurrentTime()})},pa=(S,x)=>{x instanceof B.PeriodMarker&&x.timeObservation.end!==void 0&&(x.timeObservation={...x.timeObservation,end:S.video.getCurrentTime()})},ha=(S,x)=>{d.current&&we(d.current),d.current=new He,S.video.pause();const P=S.video.getCurrentFrame(),J=S.video.getFrameRate(),R=P-x*J,le=R>=0?R:0;S.video.seekToFrame(le).pipe(ot()).subscribe(()=>{}),S.video.play(),S.video.onVideoTimeChange$.pipe(ae(d.current),ae(m)).subscribe(on=>{on.frame>=P-1&&(S.video.pause().subscribe(()=>{S.video.seekToFrame(P).pipe(ot()).subscribe(()=>{})}),we(d.current))})},ga=(S,x)=>{d.current&&we(d.current),d.current=new He,f.current&&we(f.current),f.current=new He;const P=S.video.getCurrentFrame(),J=S.video.getFrameRate(),R=P+x*J;S.video.play(),S.video.onVideoTimeChange$.pipe(ae(d.current),ae(m)).subscribe(le=>{le.frame>=R-1&&(S.video.pause().subscribe(()=>{S.video.seekToFrame(P).pipe(ot()).subscribe(()=>{})}),we(d.current))}),S.video.onEnded$.pipe(ae(f.current),ae(m)).subscribe(le=>{setTimeout(()=>{S.video.seekToFrame(P).pipe(ot()).subscribe(()=>{})},1),we(f.current)})},Pr=S=>{c.removeMarker(S.id),(j==null?void 0:j.id)===S.id&&ee(void 0)},va=(S,x)=>{if(!(x instanceof B.PeriodMarker))return;const P=x.timeObservation.start,J=x.timeObservation.end,R=S.video.getCurrentTime();if(P==null||J==null)return;const le=P,on=R,ip=on+1/S.video.getFrameRate(),op=J;Pr(x);const Ar=new B.PeriodMarker({style:l.PERIOD_MARKER_STYLE,timeObservation:{start:le,end:on},editable:!0});Ar.onClick$.subscribe({next:()=>u(Ar)});const $t=new B.PeriodMarker({style:l.HIGHLIGHTED_PERIOD_MARKER_STYLE,timeObservation:{start:ip,end:op},editable:!0});$t.onClick$.subscribe({next:()=>u($t)}),c.addMarker(Ar),c.addMarker($t),u($t),setTimeout(()=>{z({marker:$t,color:l.PERIOD_MARKER_STYLE.color})},0)},ba=()=>{const S=t.video.getCurrentTime(),x=new B.PeriodMarker({timeObservation:{start:S},style:l.PERIOD_MARKER_STYLE,editable:!0});x.onClick$.subscribe({next:()=>u(x)}),c.addMarker(x),ee(x),Y(v()),u(x)},_a=()=>{const S=t.video.getCurrentTime();j.timeObservation={...j.timeObservation,end:S},ee(void 0)},ya=S=>{d.current&&we(d.current),d.current=new He,f.current&&we(f.current),f.current=new He;const x=t.video.calculateTimeToFrame(S.timeObservation.start),P=t.video.calculateTimeToFrame(S.timeObservation.end);t.video.pause(),t.video.seekToFrame(x),t.video.play(),t.video.onVideoTimeChange$.pipe(ae(d.current),ae(m)).subscribe(J=>{J.frame>=P-1&&(t.video.pause().subscribe(()=>{t.video.seekToFrame(x).pipe(ot()).subscribe(()=>{})}),we(d.current))}),t.video.onEnded$.pipe(ae(f.current),ae(m)).subscribe(J=>{setTimeout(()=>{t.video.seekToFrame(x).pipe(ot()).subscribe(()=>{})},1),we(f.current)})},rp=()=>{const S=n.length,x=`Segmentation ${n.length+1}`,P=new B.MarkerLane({style:l.TIMELINE_LANE_STYLE,description:x});P.onMarkerUpdate$.subscribe({next:J=>{fn(P,J.marker)&&(J.marker.timeObservation=J.oldValue.timeObservation)}}),t.timeline.addTimelineLaneAtIndex(P,S+1),o([...n,P]),u(void 0),s(P)},$a=S=>{if(!c)return;const x=c.getMarkers().filter(R=>R instanceof B.PeriodMarker).sort((R,le)=>(R.timeObservation.start??0)-(le.timeObservation.start??0));if(e===void 0){u(x.at(0));return}const J=x.findIndex(R=>R.id===e.id)+(S?-1:1);J>=0&&J<x.length&&u(x.at(J))};return $.useEffect(()=>{if(!i)return;const S=new g_;S.actionLoopActiveMarker=()=>e instanceof B.PeriodMarker&&pn(e)&&ya(e),S.actionSetPlayheadToMarkerStart=()=>e&&da(t,e),S.actionSetPlayheadToMarkerEnd=()=>e&&e instanceof B.PeriodMarker&&pn(e)&&fa(t,e),S.actionSetMarkerStartToPlayhead=()=>!rt&&ma(t,e),S.actionSetMarkerEndToPlayhead=()=>!V&&pa(t,e),S.actionMarkerSplit=()=>!L&&va(t,e),S.actionMarkerDelete=()=>e&&Pr(e),S.actionMarkerInOut=()=>{j===void 0?!Ce&&ba():!te&&_a()},S.actionPlay3SecondsAndRewindToCurrent=()=>ga(t,3),S.actionRewind3SecondsAndPlayToCurrent=()=>ha(t,3),S.actionNextMarkerToggle=()=>$a(!1),S.actionPreviousMarkerToggle=()=>$a(!0);const x=P=>{S.handleKeyboardEvent(P,t)&&(P.stopPropagation(),P.preventDefault())};return window.addEventListener("keydown",x),g.current||(t.chroming.appendHelpMenuGroup(S.getKeyboardShortcutsHelpMenuGroup()),g.current=!0),()=>window.removeEventListener("keydown",x)}),$.createElement("div",{className:"control-panel-wrapper"},$.createElement("div",{className:"control-panel"},$.createElement(ve,{Icon:i_,onClick:()=>da(t,e),disabled:e===void 0}),$.createElement(ve,{Icon:o_,onClick:()=>fa(t,e),disabled:e===void 0||e instanceof B.PeriodMarker&&!pn(e)}),$.createElement(ve,{Icon:a_,onClick:()=>ma(t,e),disabled:rt}),$.createElement(ve,{Icon:u_,onClick:()=>pa(t,e),disabled:V}),j===void 0?$.createElement(ve,{Icon:c_,onClick:ba,disabled:Ce}):$.createElement(ve,{Icon:p_,onClick:_a,disabled:te}),$.createElement(ve,{Icon:l_,onClick:()=>Pr(e),disabled:e===void 0}),$.createElement(ve,{Icon:s_,onClick:()=>va(t,e),disabled:L||e===void 0}),$.createElement(ve,{Icon:d_,onClick:()=>ya(e),disabled:!(e instanceof B.PeriodMarker&&pn(e))}),$.createElement(ve,{Icon:f_,onClick:()=>ha(t,3)}),$.createElement(ve,{Icon:m_,onClick:()=>ga(t,3)})),$.createElement("div",{className:"control-panel"},$.createElement("div",{className:"segmentation-button-wrapper"},$.createElement(ve,{Icon:h_,text:"NEW SEGMENTATION",onClick:()=>rp(),disabled:n.length>=3}))))},b_=$.memo(function({flow:t,subflows:r,flowsSegments:i,onVideoLoadedCallback:n,config:o,timerange:a,videoLoadOptions:u,enableHotkeys:s}){return o&&(o==null?void 0:o.playerHTMLElementId)===void 0&&(o.playerHTMLElementId="omakase-player"),$.useEffect(()=>{var d,f;let c=new Pm(o);const l=m=>{jn.handleKeyboardEvent(m,c)&&(m.stopPropagation(),m.preventDefault())};return(s===void 0||s)&&((d=document.querySelector("media-controller"))==null||d.setAttribute("nohotkeys",""),(f=document.querySelector("media-controller"))==null||f.setAttribute("tabindex","-1"),window.addEventListener("keydown",l),c.video.appendHelpMenuGroup(jn.getKeyboardShortcutsHelpMenuGroup())),c.loadVideo({flow:t,subflows:r,flowsSegments:i},u).subscribe({next:m=>{n&&n(c,m)}}),()=>{(s===void 0||s)&&window.removeEventListener("keydown",l)}},[t,a]),$.createElement("div",{id:o.playerHTMLElementId})});function __(e){const t=Math.round(e/60)*60,r=new Date(t*1e3);return`${r.getUTCHours()}h ${r.getUTCMinutes()}min`}const y_=`
|
|
103
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function li(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var jr=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,i,n,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=yt(a),s=u.next();!s.done;s=u.next()){var c=s.value;c.remove(this)}}catch(p){t={error:p}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(re(l))try{l()}catch(p){o=p instanceof Gr?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=yt(d),m=f.next();!m.done;m=f.next()){var h=m.value;try{vu(h)}catch(p){o=o??[],p instanceof Gr?o=An(An([],Pn(o)),Pn(p.errors)):o.push(p)}}}catch(p){i={error:p}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}if(o)throw new Gr(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)vu(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&li(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&li(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),qm=jr.EMPTY;function Wm(e){return e instanceof jr||e&&"closed"in e&&re(e.remove)&&re(e.add)&&re(e.unsubscribe)}function vu(e){re(e)?e():e.unsubscribe()}var R1={Promise:void 0},F1={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,An([e,t],Pn(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Hm(e){F1.setTimeout(function(){throw e})}function di(){}function $n(e){e()}var ga=(function(e){an(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,Wm(r)&&r.add(i)):i.destination=K1,i}return t.create=function(r,i,n){return new fi(r,i,n)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(jr),V1=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(i){mn(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){mn(i)}else mn(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){mn(r)}},e})(),fi=(function(e){an(t,e);function t(r,i,n){var o=e.call(this)||this,a;return re(r)||!r?a={next:r??void 0,error:i??void 0,complete:n??void 0}:a=r,o.destination=new V1(a),o}return t})(ga);function mn(e){Hm(e)}function B1(e){throw e}var K1={closed:!0,next:di,error:B1,complete:di},va=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Pr(e){return e}function J1(e){return e.length===0?Pr:e.length===1?e[0]:function(r){return e.reduce(function(i,n){return n(i)},r)}}var pe=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,i){var n=this,o=q1(t)?t:new fi(t,r,i);return $n(function(){var a=n,u=a.operator,s=a.source;o.add(u?u.call(o,s):s?n._subscribe(o):n._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var i=this;return r=bu(r),new r(function(n,o){var a=new fi({next:function(u){try{t(u)}catch(s){o(s),a.unsubscribe()}},error:o,complete:n});i.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[va]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return J1(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=bu(t),new t(function(i,n){var o;r.subscribe(function(a){return o=a},function(a){return n(a)},function(){return i(o)})})},e.create=function(t){return new e(t)},e})();function bu(e){var t;return(t=e??R1.Promise)!==null&&t!==void 0?t:Promise}function G1(e){return e&&re(e.next)&&re(e.error)&&re(e.complete)}function q1(e){return e&&e instanceof ga||G1(e)&&Wm(e)}function W1(e){return re(e==null?void 0:e.lift)}function Ge(e){return function(t){if(W1(t))return t.lift(function(r){try{return e(r,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function qe(e,t,r,i,n){return new H1(e,t,r,i,n)}var H1=(function(e){an(t,e);function t(r,i,n,o,a,u){var s=e.call(this,r)||this;return s.onFinalize=a,s.shouldUnsubscribe=u,s._next=i?function(c){try{i(c)}catch(l){r.error(l)}}:e.prototype._next,s._error=o?function(c){try{o(c)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=n?function(){try{n()}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;e.prototype.unsubscribe.call(this),!i&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(ga),X1=ha(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),He=(function(e){an(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var i=new _u(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new X1},t.prototype.next=function(r){var i=this;$n(function(){var n,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=yt(i.currentObservers),u=a.next();!u.done;u=a.next()){var s=u.value;s.next(r)}}catch(c){n={error:c}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}}})},t.prototype.error=function(r){var i=this;$n(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=r;for(var n=i.observers;n.length;)n.shift().error(r)}})},t.prototype.complete=function(){var r=this;$n(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var i=r.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var i=this,n=this,o=n.hasError,a=n.isStopped,u=n.observers;return o||a?qm:(this.currentObservers=null,u.push(r),new jr(function(){i.currentObservers=null,li(u,r)}))},t.prototype._checkFinalizedStatuses=function(r){var i=this,n=i.hasError,o=i.thrownError,a=i.isStopped;n?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new pe;return r.source=this,r},t.create=function(r,i){return new _u(r,i)},t})(pe),_u=(function(e){an(t,e);function t(r,i){var n=e.call(this)||this;return n.destination=r,n.source=i,n}return t.prototype.next=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.next)===null||n===void 0||n.call(i,r)},t.prototype.error=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.error)===null||n===void 0||n.call(i,r)},t.prototype.complete=function(){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||i===void 0||i.call(r)},t.prototype._subscribe=function(r){var i,n;return(n=(i=this.source)===null||i===void 0?void 0:i.subscribe(r))!==null&&n!==void 0?n:qm},t})(He),Y1=new pe(function(e){return e.complete()});function Q1(e){return e&&re(e.schedule)}function Xm(e){return e[e.length-1]}function e0(e){return re(Xm(e))?e.pop():void 0}function t0(e){return Q1(Xm(e))?e.pop():void 0}var Ym=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function Qm(e){return re(e==null?void 0:e.then)}function ep(e){return re(e[va])}function tp(e){return Symbol.asyncIterator&&re(e==null?void 0:e[Symbol.asyncIterator])}function np(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function n0(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var rp=n0();function ip(e){return re(e==null?void 0:e[rp])}function op(e){return Z1(this,arguments,function(){var r,i,n,o;return Gm(this,function(a){switch(a.label){case 0:r=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,st(r.read())];case 3:return i=a.sent(),n=i.value,o=i.done,o?[4,st(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,st(n)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function ap(e){return re(e==null?void 0:e.getReader)}function Ar(e){if(e instanceof pe)return e;if(e!=null){if(ep(e))return r0(e);if(Ym(e))return i0(e);if(Qm(e))return o0(e);if(tp(e))return up(e);if(ip(e))return a0(e);if(ap(e))return u0(e)}throw np(e)}function r0(e){return new pe(function(t){var r=e[va]();if(re(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function i0(e){return new pe(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function o0(e){return new pe(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Hm)})}function a0(e){return new pe(function(t){var r,i;try{for(var n=yt(e),o=n.next();!o.done;o=n.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(u){r={error:u}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}t.complete()})}function up(e){return new pe(function(t){c0(e,t).catch(function(r){return t.error(r)})})}function u0(e){return up(op(e))}function c0(e,t){var r,i,n,o;return C1(this,void 0,void 0,function(){var a,u;return Gm(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),r=M1(e),s.label=1;case 1:return[4,r.next()];case 2:if(i=s.sent(),!!i.done)return[3,4];if(a=i.value,t.next(a),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=s.sent(),n={error:u},[3,11];case 6:return s.trys.push([6,,9,10]),i&&!i.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Me(e,t,r,i,n){i===void 0&&(i=0),n===void 0&&(n=!1);var o=t.schedule(function(){r(),n?e.add(this.schedule(null,i)):this.unsubscribe()},i);if(e.add(o),!n)return o}function cp(e,t){return t===void 0&&(t=0),Ge(function(r,i){r.subscribe(qe(i,function(n){return Me(i,e,function(){return i.next(n)},t)},function(){return Me(i,e,function(){return i.complete()},t)},function(n){return Me(i,e,function(){return i.error(n)},t)}))})}function sp(e,t){return t===void 0&&(t=0),Ge(function(r,i){i.add(e.schedule(function(){return r.subscribe(i)},t))})}function s0(e,t){return Ar(e).pipe(sp(t),cp(t))}function l0(e,t){return Ar(e).pipe(sp(t),cp(t))}function d0(e,t){return new pe(function(r){var i=0;return t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||this.schedule())})})}function f0(e,t){return new pe(function(r){var i;return Me(r,t,function(){i=e[rp](),Me(r,t,function(){var n,o,a;try{n=i.next(),o=n.value,a=n.done}catch(u){r.error(u);return}a?r.complete():r.next(o)},0,!0)}),function(){return re(i==null?void 0:i.return)&&i.return()}})}function lp(e,t){if(!e)throw new Error("Iterable cannot be null");return new pe(function(r){Me(r,t,function(){var i=e[Symbol.asyncIterator]();Me(r,t,function(){i.next().then(function(n){n.done?r.complete():r.next(n.value)})},0,!0)})})}function m0(e,t){return lp(op(e),t)}function p0(e,t){if(e!=null){if(ep(e))return s0(e,t);if(Ym(e))return d0(e,t);if(Qm(e))return l0(e,t);if(tp(e))return lp(e,t);if(ip(e))return f0(e,t);if(ap(e))return m0(e,t)}throw np(e)}function dp(e,t){return t?p0(e,t):Ar(e)}var fp=ha(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function h0(e,t){return Ge(function(r,i){var n=0;r.subscribe(qe(i,function(o){i.next(e.call(t,o,n++))}))})}var g0=Array.isArray;function v0(e,t){return g0(t)?e.apply(void 0,An([],Pn(t))):e(t)}function b0(e){return h0(function(t){return v0(e,t)})}var _0=Array.isArray,y0=Object.getPrototypeOf,$0=Object.prototype,w0=Object.keys;function S0(e){if(e.length===1){var t=e[0];if(_0(t))return{args:t,keys:null};if(k0(t)){var r=w0(t);return{args:r.map(function(i){return t[i]}),keys:r}}}return{args:e,keys:null}}function k0(e){return e&&typeof e=="object"&&y0(e)===$0}function I0(e,t){return e.reduce(function(r,i,n){return r[i]=t[n],r},{})}function x0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=t0(e),i=e0(e),n=S0(e),o=n.args,a=n.keys;if(o.length===0)return dp([],r);var u=new pe(T0(o,r,a?function(s){return I0(a,s)}:Pr));return i?u.pipe(b0(i)):u}function T0(e,t,r){return r===void 0&&(r=Pr),function(i){yu(t,function(){for(var n=e.length,o=new Array(n),a=n,u=n,s=function(l){yu(t,function(){var d=dp(e[l],t),f=!1;d.subscribe(qe(i,function(m){o[l]=m,f||(f=!0,u--),u||i.next(r(o.slice()))},function(){--a||i.complete()}))},i)},c=0;c<n;c++)s(c)},i)}}function yu(e,t,r){e?Me(r,e,t):t()}function z0(e,t){return Ge(function(r,i){var n=0;r.subscribe(qe(i,function(o){return e.call(t,o,n++)&&i.next(o)}))})}function E0(e){return Ge(function(t,r){var i=!1;t.subscribe(qe(r,function(n){i=!0,r.next(n)},function(){i||r.next(e),r.complete()}))})}function O0(e){return e<=0?function(){return Y1}:Ge(function(t,r){var i=0;t.subscribe(qe(r,function(n){++i<=e&&(r.next(n),e<=i&&r.complete())}))})}function U0(e){return e===void 0&&(e=D0),Ge(function(t,r){var i=!1;t.subscribe(qe(r,function(n){i=!0,r.next(n)},function(){return i?r.complete():r.error(e())}))})}function D0(){return new fp}function at(e,t){var r=arguments.length>=2;return function(i){return i.pipe(Pr,O0(1),r?E0(t):U0(function(){return new fp}))}}function ie(e){return Ge(function(t,r){Ar(e).subscribe(qe(r,function(){return r.complete()},di)),!r.closed&&t.subscribe(r)})}class N0{constructor(){k(this,"actionZoomIn");k(this,"actionZoomOut");k(this,"actionResetZoom");k(this,"actionToggleNextAudioTrack");k(this,"actionTogglePreviousAudioTrack");k(this,"actionToggleCti")}getKeyboardShortcutsHelpMenuGroup(){let t=(...n)=>n.join(" + "),r="shift".toUpperCase();return{name:"Timeline function shortcuts",items:[{description:"Timeline Zoom In",name:t("=")},{description:"Timeline Zoom Out",name:t("-")},{description:"Timeline Zoom level 100%",name:t("0")},{description:"Toggle Next Audio Track",name:t(r,"e")},{description:"Toggle Previous Audio Track",name:t("e")},{description:"Toggle CTI into / out-of Interactive Mode",name:t("'")}]}}handleKeyboardEvent(t){const r=t.target;return["INPUT","TEXTAREA","OMAKASE-MARKER-LIST"].includes(r.tagName.toUpperCase())?!1:t.code==="Equal"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionZoomIn&&this.actionZoomIn(),!0):t.code==="Minus"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionZoomOut&&this.actionZoomOut(),!0):t.code==="Digit0"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionResetZoom&&this.actionResetZoom(),!0):t.code==="KeyE"&&!t.ctrlKey&&!t.metaKey?(t.shiftKey?this.actionToggleNextAudioTrack&&this.actionToggleNextAudioTrack():this.actionTogglePreviousAudioTrack&&this.actionTogglePreviousAudioTrack(),!0):t.code==="Quote"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionToggleCti&&this.actionToggleCti(),!0):!1}}const j0=$.memo(({omakasePlayer:e,onTimelineCreatedCallback:t,timelineConfig:r,enableHotKeys:i})=>($.useEffect(()=>{if(r.timelineHTMLElementId===void 0&&(r.timelineHTMLElementId="omakase-timeline"),e.createTimeline(r).subscribe({next:n=>{x0([e.timeline.onReady$,e.video.onVideoLoaded$.pipe(z0(o=>!!o))]).subscribe({next:()=>t(n)})}}),i===void 0||i){const n=new N0;n.actionToggleCti=()=>{var u;return(u=e.timeline)==null?void 0:u.toggleTimecodeEdit()},n.actionResetZoom=()=>{var u;return(u=e.timeline)==null?void 0:u.zoomToEased(100)},n.actionZoomIn=()=>{var u;return(u=e.timeline)==null?void 0:u.zoomInEased()},n.actionZoomOut=()=>{var u;return(u=e.timeline)==null?void 0:u.zoomOutEased()};const o=u=>{const s=e.audio.getAudioTracks(),c=e.audio.getActiveAudioTrack(),d=s.findIndex(f=>f.id===(c==null?void 0:c.id))+(u?-1:1);d>=0&&d<s.length&&e.audio.setActiveAudioTrack(s.at(d).id)};n.actionTogglePreviousAudioTrack=()=>o(!0),n.actionToggleNextAudioTrack=()=>o(!1);const a=u=>{n.handleKeyboardEvent(u)&&(u.preventDefault(),u.stopPropagation())};return window.addEventListener("keydown",a),e.chroming.appendHelpMenuGroup(n.getKeyboardShortcutsHelpMenuGroup()),()=>{window.removeEventListener("keydown",a)}}},[e]),$.createElement("div",{id:r.timelineHTMLElementId})));class mp{static get window(){return window}static get navigator(){return window.navigator}static get userAgent(){var r;const t=((r=this.navigator)==null?void 0:r.userAgent)||"";return/Android/i.test(t)?"android":/Firefox/i.test(t)?"firefox":/Edg/i.test(t)?"edge":(/Chrome/i.test(t)||/CriOS/i.test(t))&&!/Edg/i.test(t)?"chrome":/Chrome/i.test(t)||/CriOS/i.test(t)?"chromium":/Safari/i.test(t)?"safari":"unknown"}static get platform(){var r,i,n;const t=((i=(r=this.navigator)==null?void 0:r.userAgentData)==null?void 0:i.platform)||((n=this.navigator)==null?void 0:n.platform);return t!=null&&t.toUpperCase().includes("MAC")?"macos":t!=null&&t.toUpperCase().includes("WIN")?"windows":t!=null&&t.toUpperCase().includes("LINUX")?"linux":"unknown"}static isUserAgent(t){return this.userAgent===t}static isPlatform(t){return this.platform===t}static open(t,r="_blank"){this.window.open(t,r)}}const xt=[.25,.5,.75,1,2,4,8];class Ln{static getKeyboardShortcutsHelpMenuGroup(){let t=(...o)=>o.join(" + "),r="shift".toUpperCase(),i="ctrl".toUpperCase();return{name:"Playback function shortcuts",items:[{description:"Play / Pause",name:t("Space")},{description:"Toggle Sound",name:t("s")},{description:"Toggle Text On / Off",name:t("d")},{description:"Toggle Full Screen",name:t("f")},{description:"Increase Volume",name:t(r,"\\")},{description:"Reduce Volume",name:t("\\")},{description:"One Frame Forward",name:t("Right Arrow")},{description:"One Frame Backward",name:t("Left Arrow")},{description:"10 Frames Forward",name:t(r,"Right Arrow")},{description:"10 Frames Backwards",name:t(r,"Left Arrow")},{description:"Stop shuttle and pause",name:t("k")},{description:"Decrease Shuttle Forwards",name:t("l")},{description:"Increase Shuttle Forwards",name:t(r,"l")},{description:"Set playhead to Start of Media and Stop",name:t("1 / Home")},{description:"Set playhead to End of Media and Stop",name:t(i,"1")+" / End"}]}}static handleKeyboardEvent(t,r){const i=t.target,n=["INPUT","TEXTAREA","OMAKASE-MARKER-LIST"],o=mp.userAgent;if(n.includes(i.tagName.toUpperCase()))return!1;if(r&&r.video){if(t.code==="Space"&&(o!=="safari"||!r.video.isFullscreen()))return r.video.togglePlayPause(),!0;if(t.code==="KeyS"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey)return r.audio.toggleAudioOutputMuteUnmute(),!0;if(t.code==="Backslash"){let a=10,u=t.shiftKey?1:-1,s=r.audio.getAudioOutputVolume()*100+a*u;s>=100?s=100:s<=0&&(s=0),r.audio.setAudioOutputVolume(s/100)}if(t.code==="KeyD"&&!(t.ctrlKey&&t.shiftKey&&t.metaKey))return r.subtitles.toggleShowHideActiveTrack(),!0;if(t.code==="KeyK"&&!t.ctrlKey&&!t.shiftKey&&!t.metaKey&&(r.video.setPlaybackRate(1),r.video.pause()),t.code==="KeyL"&&!t.ctrlKey&&!t.metaKey){let a=t.shiftKey?1:-1;const u=xt.indexOf(r.video.getPlaybackRate())+a;let s;return u<0?s=xt.at(0):u>=xt.length?s=xt.at(-1):s=xt.at(u),r.video.setPlaybackRate(s),r.video.isPaused()&&r.video.play(),!0}if(r.video.isVideoLoaded()){if(["ArrowLeft","ArrowRight"].includes(t.key)&&!t.metaKey&&!t.altKey){let a=t.key==="ArrowRight"?1:-1,u=t.shiftKey?10:1;return r.video.isPlaying()&&r.video.pause(),r.video.seekFromCurrentFrame(u*a),!0}if(t.code==="Digit1"&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&!t.altKey||t.code==="Home")return r.video.pause().subscribe(()=>r.video.seekToFrame(0)),!0;if(t.code==="Digit1"&&t.ctrlKey||t.code==="End")return r.video.isPlaying()?r.video.pause().subscribe(()=>r.video.seekToEnd()):r.video.seekToEnd(),!0}if(t.code==="KeyF"&&!t.ctrlKey&&!t.shiftKey&&!t.metaKey)return r.video.toggleFullscreen(),!0}return!1}}const P0=$.memo(function({videoUrl:t,config:r,videoLoadOptions:i,onVideoLoadedCallback:n,enableHotkeys:o}){return r&&(r==null?void 0:r.playerHTMLElementId)===void 0&&(r.playerHTMLElementId="omakase-player"),$.useEffect(()=>{var s,c;let a=new V.OmakasePlayer(r);const u=l=>{Ln.handleKeyboardEvent(l,a)&&(l.stopPropagation(),l.preventDefault())};return(o===void 0||o)&&((s=document.querySelector("media-controller"))==null||s.setAttribute("nohotkeys",""),(c=document.querySelector("media-controller"))==null||c.setAttribute("tabindex","-1"),window.addEventListener("keydown",u),a.chroming.appendHelpMenuGroup(Ln.getKeyboardShortcutsHelpMenuGroup())),a.loadVideo(t,i).subscribe({next:l=>{n&&n(a,l)}}),()=>{(o===void 0||o)&&window.removeEventListener("keydown",u)}},[t]),$.createElement("div",{id:r.playerHTMLElementId})}),A0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M10.5675 21C10.2375 21 9.9675 20.73 9.9675 20.4V16.7925L5.6325 12.3675L9.9675 8.235V3.6C9.9675 3.27 10.2375 3 10.5675 3C10.8975 3 11.1675 3.27 11.1675 3.6V8.7525L7.3425 12.3975L11.1675 16.305V20.4C11.1675 20.73 10.8975 21 10.5675 21Z",fill:"currentColor"}),$.createElement("path",{d:"M17.7675 17.145C17.61 17.145 17.46 17.085 17.34 16.965L12.8325 12.3675L17.355 8.0625C17.595 7.8375 17.9775 7.845 18.2025 8.085C18.4275 8.325 18.42 8.7075 18.18 8.9325L14.5425 12.3975L18.195 16.125C18.4275 16.365 18.42 16.74 18.1875 16.9725C18.075 17.085 17.9175 17.145 17.7675 17.145Z",fill:"currentColor"})),L0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M13.4325 21C13.7625 21 14.0325 20.73 14.0325 20.4V16.7925L18.3675 12.3675L14.0325 8.235V3.6C14.0325 3.27 13.7625 3 13.4325 3C13.1025 3 12.8325 3.27 12.8325 3.6V8.7525L16.6575 12.3975L12.8325 16.305V20.4C12.8325 20.73 13.1025 21 13.4325 21Z",fill:"currentColor"}),$.createElement("path",{d:"M6.2325 17.145C6.39 17.145 6.54 17.085 6.66 16.965L11.1675 12.3675L6.645 8.0625C6.405 7.8375 6.0225 7.845 5.7975 8.085C5.5725 8.325 5.58 8.7075 5.82 8.9325L9.4575 12.3975L5.805 16.125C5.5725 16.365 5.58 16.74 5.8125 16.9725C5.925 17.085 6.0825 17.145 6.2325 17.145Z",fill:"currentColor"})),C0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M14.1675 21C13.8375 21 13.5675 20.73 13.5675 20.4V16.7925L9.2325 12.3675L13.5675 8.235V3.6C13.5675 3.27 13.8375 3 14.1675 3C14.4975 3 14.7675 3.27 14.7675 3.6V8.7525L10.9425 12.3975L14.7675 16.305V20.4C14.7675 20.73 14.4975 21 14.1675 21Z",fill:"currentColor"})),Z0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M9.8325 21C10.1625 21 10.4325 20.73 10.4325 20.4V16.7925L14.7675 12.3675L10.4325 8.235V3.6C10.4325 3.27 10.1625 3 9.8325 3C9.5025 3 9.2325 3.27 9.2325 3.6V8.7525L13.0575 12.3975L9.2325 16.305V20.4C9.2325 20.73 9.5025 21 9.8325 21Z",fill:"currentColor"})),M0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M11.3475 3H5.775V21L11.3475 17.0475V3Z",fill:"currentColor"}),$.createElement("path",{d:"M18.225 21L12.6525 17.0475V3H18.225V21ZM13.7775 16.47L17.1 18.825V4.125H13.7775V16.47Z",fill:"currentColor"})),R0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M4.6875 3V21L8.0625 17.0475L11.4375 21V3H4.6875Z",fill:"currentColor"}),$.createElement("path",{d:"M12.5625 3V21L15.9375 17.0475L19.3125 21V3H12.5625Z",fill:"currentColor"})),F0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M6.39001 3V21L12 17.0175L17.61 21V3H6.38251H6.39001ZM16.44 3.84L7.23001 18.7125V3.84H16.44ZM12 15.9975L8.25751 18.6525L16.77 4.89V19.3725L12 15.9825V15.9975Z",fill:"currentColor"})),V0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M12.3075 8.0175L14.4525 5.8725C14.6175 5.7075 14.6175 5.43 14.4525 5.265L12.3 3.12C12.135 2.955 11.8575 2.955 11.6925 3.12C11.5275 3.285 11.5275 3.5625 11.6925 3.7275L13.1025 5.1375H6.64499C5.22749 5.1375 4.07249 6.2925 4.07249 7.71V16.2825C4.07249 17.7 5.22749 18.855 6.64499 18.855C6.87749 18.855 7.07249 18.66 7.07249 18.4275C7.07249 18.195 6.87749 18 6.64499 18C5.69249 18 4.93499 17.2275 4.93499 16.29V7.7175C4.93499 6.765 5.70749 6.0075 6.64499 6.0075H13.11L11.7 7.4175C11.535 7.5825 11.535 7.86 11.7 8.025C11.865 8.19 12.1425 8.19 12.3075 8.025V8.0175Z",fill:"currentColor"}),$.createElement("path",{d:"M17.355 18.8625C18.7725 18.8625 19.9275 17.7075 19.9275 16.29V7.7175C19.9275 6.3 18.7725 5.145 17.355 5.145C17.1225 5.145 16.9275 5.34 16.9275 5.5725C16.9275 5.805 17.1225 6 17.355 6C18.3075 6 19.065 6.7725 19.065 7.71V16.2825C19.065 17.235 18.2925 17.9925 17.355 17.9925H10.89L12.3075 16.5825C12.3825 16.5075 12.435 16.395 12.435 16.2825C12.435 16.17 12.3975 16.0575 12.3075 15.9825C12.15 15.8175 11.8575 15.825 11.7 15.9825L9.52501 18.1575V18.18C9.45751 18.255 9.42751 18.345 9.42751 18.435C9.42751 18.555 9.46501 18.66 9.55501 18.735L11.7 20.88C11.8575 21.045 12.15 21.045 12.3075 20.88C12.4725 20.715 12.4725 20.4375 12.3075 20.2725L10.89 18.8625H17.355Z",fill:"currentColor"})),B0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("g",{clipPath:"url(#clip0_3377_237)"},$.createElement("path",{d:"M13.02 19.95C17.42 19.95 21 16.37 21 11.97C21 7.57 17.42 4 13.02 4C8.88 4 5.39 7.24 5.08 11.37L5.02 12.14L3.56 10.68C3.49 10.61 3.41 10.58 3.33 10.58C3.25 10.58 3.17 10.61 3.1 10.68C3.03 10.75 3 10.83 3 10.92C3 11 3.03 11.08 3.1 11.15L5.22 13.27C5.35 13.4 5.55 13.43 5.65 13.3L7.8 11.15C7.87 11.08 7.9 11 7.9 10.92C7.9 10.84 7.86 10.76 7.8 10.69C7.73 10.62 7.65 10.59 7.57 10.59C7.49 10.59 7.41 10.62 7.34 10.69L5.9 12.13L6.03 11.11C6.45 7.57 9.46 4.91 13.02 4.91C16.91 4.91 20.08 8.08 20.08 11.97C20.08 15.86 16.91 19.03 13.02 19.03C12.77 19.03 12.56 19.24 12.56 19.49C12.56 19.74 12.77 19.95 13.02 19.95Z",fill:"currentColor"}),$.createElement("path",{d:"M14.95 13.19C14.95 13.72 14.75 14.14 14.36 14.45C13.97 14.76 13.43 14.91 12.75 14.91C12.16 14.91 11.69 14.81 11.32 14.62V13.53C11.7 13.81 12.14 13.95 12.65 13.95C12.98 13.95 13.23 13.88 13.41 13.74C13.59 13.6 13.67 13.41 13.67 13.17C13.67 12.93 13.56 12.72 13.34 12.58C13.12 12.44 12.82 12.37 12.43 12.37H11.92V11.41H12.39C13.13 11.41 13.5 11.16 13.5 10.67C13.5 10.21 13.22 9.98 12.65 9.98C12.26 9.98 11.89 10.1 11.54 10.35V9.33C11.93 9.13 12.4 9.03 12.94 9.03C13.48 9.03 13.94 9.16 14.28 9.41C14.62 9.66 14.79 10.01 14.79 10.44C14.79 11.19 14.41 11.65 13.66 11.84V11.86C14.06 11.91 14.37 12.05 14.61 12.29C14.85 12.53 14.96 12.83 14.96 13.19H14.95Z",fill:"currentColor"})),$.createElement("defs",null,$.createElement("clipPath",{id:"clip0_3377_237"},$.createElement("rect",{width:"18",height:"15.95",fill:"white",transform:"translate(3 4)"})))),K0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("g",{clipPath:"url(#clip0_3377_260)"},$.createElement("path",{d:"M10.98 19.95C6.58 19.95 3 16.37 3 11.98C3 7.58 6.58 4 10.98 4C15.12 4 18.61 7.24 18.93 11.37L18.99 12.14L20.45 10.68C20.52 10.61 20.6 10.58 20.68 10.58C20.76 10.58 20.84 10.61 20.91 10.68C20.98 10.75 21.01 10.83 21.01 10.91C21.01 10.99 20.98 11.07 20.91 11.14L18.79 13.26C18.66 13.39 18.46 13.42 18.36 13.29L16.21 11.14C16.14 11.07 16.11 10.99 16.11 10.91C16.11 10.83 16.15 10.75 16.21 10.68C16.28 10.61 16.36 10.58 16.44 10.58C16.52 10.58 16.6 10.61 16.67 10.68L18.11 12.12L17.98 11.1C17.55 7.57 14.54 4.91 10.98 4.91C7.09 4.91 3.92 8.08 3.92 11.97C3.92 15.86 7.09 19.03 10.98 19.03C11.23 19.03 11.44 19.24 11.44 19.49C11.44 19.74 11.23 19.95 10.98 19.95Z",fill:"currentColor"}),$.createElement("path",{d:"M12.91 13.19C12.91 13.72 12.71 14.14 12.32 14.45C11.93 14.76 11.39 14.91 10.71 14.91C10.12 14.91 9.65 14.81 9.28 14.62V13.53C9.66 13.81 10.1 13.95 10.61 13.95C10.94 13.95 11.19 13.88 11.37 13.74C11.55 13.6 11.63 13.41 11.63 13.17C11.63 12.93 11.52 12.72 11.3 12.58C11.08 12.44 10.78 12.37 10.39 12.37H9.88V11.41H10.35C11.09 11.41 11.46 11.16 11.46 10.67C11.46 10.21 11.18 9.98 10.61 9.98C10.22 9.98 9.85 10.1 9.5 10.35V9.33C9.89 9.13 10.36 9.03 10.9 9.03C11.44 9.03 11.9 9.16 12.24 9.41C12.58 9.66 12.75 10.01 12.75 10.44C12.75 11.19 12.37 11.65 11.62 11.84V11.86C12.02 11.91 12.33 12.05 12.57 12.29C12.81 12.53 12.92 12.83 12.92 13.19H12.91Z",fill:"currentColor"})),$.createElement("defs",null,$.createElement("clipPath",{id:"clip0_3377_260"},$.createElement("rect",{width:"18",height:"15.95",fill:"white",transform:"translate(3 4)"})))),ve=({Icon:e,onClick:t,width:r,height:i,text:n,disabled:o})=>$.createElement("button",{disabled:o,onClick:t},$.createElement(e,{width:r,height:i})," ",n),J0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M12.6525 17.0475L18.225 21V3H12.6525V17.0475Z",fill:"currentColor"}),$.createElement("path",{d:"M5.775 3H11.3475V17.0475L5.775 21V3ZM10.2225 4.125H6.9V18.825L10.2225 16.47V4.125Z",fill:"currentColor"})),G0=({width:e,height:t})=>$.createElement("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("rect",{x:"0.5",y:"0.5",width:"13",height:"13",rx:"2.5",stroke:"currentColor"}),$.createElement("path",{d:"M7.16667 6.33333V6.83333H7.66667H10.3333C10.4257 6.83333 10.5 6.90769 10.5 7C10.5 7.09231 10.4257 7.16667 10.3333 7.16667H7.66667H7.16667V7.66667V10.3333C7.16667 10.4257 7.09231 10.5 7 10.5C6.90769 10.5 6.83333 10.4257 6.83333 10.3333V7.66667V7.16667H6.33333H3.66667C3.57468 7.16667 3.5 7.09199 3.5 7C3.5 6.90801 3.57468 6.83333 3.66667 6.83333H6.33333H6.83333V6.33333V3.66667C6.83333 3.57468 6.90801 3.5 7 3.5C7.09199 3.5 7.16667 3.57468 7.16667 3.66667V6.33333Z",fill:"currentColor",stroke:"currentColor"}));function Se(e){e.next(),e.complete()}class q0{constructor(){k(this,"actionMarkerInOut");k(this,"actionMarkerSplit");k(this,"actionMarkerDelete");k(this,"actionPreviousMarkerToggle");k(this,"actionNextMarkerToggle");k(this,"actionSetMarkerStartToPlayhead");k(this,"actionSetMarkerEndToPlayhead");k(this,"actionSetPlayheadToMarkerStart");k(this,"actionSetPlayheadToMarkerEnd");k(this,"actionRewind3SecondsAndPlayToCurrent");k(this,"actionPlay3SecondsAndRewindToCurrent");k(this,"actionLoopActiveMarker")}getKeyboardShortcutsHelpMenuGroup(){let t=(...a)=>a.join(" + "),r="shift".toUpperCase();const i=mp.platform;let n=i==="windows"?"win":i==="linux"?"super":"cmd";return{name:"Segmentation function shortcuts",items:[{description:"Mark In / Out",name:t("m")},{description:"Split Active Marker",name:t(".")},{description:"Delete Active Marker",name:t("n")},{description:"Toggle Previous Marker",name:t("/")},{description:"Toggle Next Marker",name:t(r,"/")},{description:"Set Start of Active Marker to Playhead Position",name:t("i")},{description:"Set End of Active Marker to Playhead Position",name:t("o")},{description:"Set Playhead to Start of Active Marker",name:t("[")},{description:"Set Playhead to End of Active Marker",name:t("]")},{description:"Rewind 3 Seconds and Play to Current Playhead",name:t(n,"Arrow Left")},{description:"Play 3 Seconds and Rewind to Current Playhead",name:t(n,"Arrow Right")},{description:"Loop on Active Marker",name:t("p")}]}}handleKeyboardEvent(t,r){const i=t.target;return["INPUT","TEXTAREA","OMAKASE-MARKER-LIST"].includes(i.tagName.toUpperCase())?!1:t.code==="KeyM"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionMarkerInOut&&this.actionMarkerInOut(),!0):t.code==="Period"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionMarkerSplit&&this.actionMarkerSplit(),!0):t.code==="KeyN"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionMarkerDelete&&this.actionMarkerDelete(),!0):t.code==="Slash"&&!t.ctrlKey&&!t.metaKey?(t.shiftKey?this.actionNextMarkerToggle&&this.actionNextMarkerToggle():this.actionPreviousMarkerToggle&&this.actionPreviousMarkerToggle(),!0):t.code==="KeyI"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionSetMarkerStartToPlayhead&&this.actionSetMarkerStartToPlayhead(),!0):t.code==="KeyO"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionSetMarkerEndToPlayhead&&this.actionSetMarkerEndToPlayhead(),!0):t.code==="BracketLeft"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionSetPlayheadToMarkerStart&&this.actionSetPlayheadToMarkerStart(),!0):t.code==="BracketRight"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionSetPlayheadToMarkerEnd&&this.actionSetPlayheadToMarkerEnd(),!0):t.code==="ArrowLeft"&&!t.shiftKey&&!t.ctrlKey&&t.metaKey?(this.actionRewind3SecondsAndPlayToCurrent&&this.actionRewind3SecondsAndPlayToCurrent(),!0):t.code==="ArrowRight"&&!t.shiftKey&&!t.ctrlKey&&t.metaKey?(this.actionPlay3SecondsAndRewindToCurrent&&this.actionPlay3SecondsAndRewindToCurrent(),!0):t.code==="KeyP"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionLoopActiveMarker&&this.actionLoopActiveMarker(),!0):!1}}const Tt=(e,t,r)=>e.getMarkers().reduce((i,n)=>{if(t.id===n.id)return i;if(n instanceof V.PeriodMarker&&n.timeObservation.start!=null&&n.timeObservation.end!=null){const o=t.timeObservation,a=n.timeObservation.start,u=n.timeObservation.end,s=(r==null?void 0:r.start)??o.start,c=(r==null?void 0:r.end)??o.end;if(Number.isFinite(s)&&Number.isFinite(c))return i||s<=u&&c>=a;if(Number.isFinite(s))return i||s>=a&&s<=u;if(Number.isFinite(c))return i||c>=a&&c<=u}return i},!1);function pn(e,t,r){if(!e||!(e instanceof V.PeriodMarker)||!r.video.isVideoLoaded())return!0;const i=e.timeObservation.start,n=e.timeObservation.end;if(i==null||n==null)return!0;const o=r.video.calculateTimeToFrame(n),a=r.video.calculateTimeToFrame(i),u=r.video.getCurrentFrame();return t<i||o-u<2||u-a<1}function hn(e){return!(e.timeObservation.start==null||e.timeObservation.end==null)}const W0=({selectedMarker:e,omakasePlayer:t,enableHotKeys:r,segmentationLanes:i,setSegmentationLanes:n,setSelectedMarker:o,onMarkerClickCallback:a,setSource:u,source:s,constants:c})=>{const l=$.useRef(void 0),d=$.useRef(void 0),f=$.useRef(new He),m=$.useRef(!1),h=S=>{if(z===void 0||!t.video.isVideoLoaded())return!0;const x=z.timeObservation.start,j=S??t.video.getCurrentTime();return!!(x==null||x>=j||Tt(s,z,{end:j}))},p=S=>{if(z!==void 0||s===void 0||!t.video.isVideoLoaded())return!0;const x=S??t.video.getCurrentTime(),j=t.video.calculateTimeToFrame(x);if(j+1>t.video.getTotalFrames())return!0;const W=new V.PeriodMarker({timeObservation:{start:t.video.calculateFrameToTime(j),end:t.video.calculateFrameToTime(j+2)}});return Tt(s,W)},[v,w]=$.useState(void 0),[E,T]=$.useState(pn(e,t.video.getCurrentTime(),t)),[z,M]=$.useState(void 0),[R,Q]=$.useState(h()),[te,Y]=$.useState(p()),Te=S=>{if(S===void 0||s===void 0||!(S instanceof V.PeriodMarker))return!0;const x=Tt(s,S,{start:t.video.getCurrentTime()});if(x)return x;if(S instanceof V.PeriodMarker){const j=S.timeObservation.end;if(j!=null&&t.video.getCurrentTime()>=j)return!0}return!1},ue=S=>{if(S===void 0||s===void 0||!(S instanceof V.PeriodMarker))return!0;const x=Tt(s,S,{end:t.video.getCurrentTime()});if(x)return x;if(S instanceof V.PeriodMarker){if(S.timeObservation.end==null)return!0;const j=S.timeObservation.start;if(j!=null&&t.video.getCurrentTime()<=j)return!0}return!1},[We,Ae]=$.useState(Te(e)),[it,ee]=$.useState(ue(e));$.useEffect(()=>{if(Q(()=>h()),Y(()=>p()),z&&z!==e){const S=i.find(x=>x.getMarker(z.id));S==null||S.removeMarker(z.id),M(void 0)}},[e,z,i,M]),$.useEffect(()=>()=>Se(f.current),[]),$.useEffect(()=>{if(Ae(Te(e)),ee(ue(e)),e){const S=pn(e,t.video.getCurrentTime(),t);T(S);const x=t.video.onVideoTimeChange$.pipe(ie(f.current)).subscribe({next:j=>{T(W=>pn(e,j.currentTime,t)),Ae(()=>Te(e)),ee(()=>ue(e))}});return()=>x.unsubscribe()}},[e]),$.useEffect(()=>{t.video.onSeeking$.pipe(ie(f.current)).subscribe({next:x=>{Q(()=>h(x.toTime)),Y(()=>p(x.toTime))}});const S=t.video.onVideoTimeChange$.pipe(ie(f.current)).subscribe({next:x=>{Q(()=>h()),Y(()=>p())}});return()=>S.unsubscribe()},[z,s]),$.useEffect(()=>{const S=i.map(x=>x.onMarkerUpdate$.pipe(ie(f.current)).subscribe({next:j=>{(e==null?void 0:e.id)===j.marker.id&&(T(W=>pn(e,t.video.getCurrentTime(),t)),Ae(()=>Te(e)),ee(()=>ue(e)))}}));return()=>S.forEach(x=>x.unsubscribe())},[i,e]),$.useEffect(()=>{v&&(v.marker.style={...v.marker.style,color:v.color},v.marker.timeObservation={...v.marker.timeObservation},w(void 0))},[e]),$.useEffect(()=>{if(s){Q(()=>h()),Y(()=>p());const S=s.onMarkerDelete$.pipe(ie(f.current)).subscribe({next:j=>{const W=j.marker;w(K=>{if((K==null?void 0:K.marker.id)!==W.id)return K}),o(K=>{if((K==null?void 0:K.id)!==W.id)return K}),M(K=>{if((K==null?void 0:K.id)!==W.id)return K}),Q(()=>h()),Y(()=>p())}}),x=s.onMarkerUpdate$.pipe(ie(f.current)).subscribe({next:()=>{Q(()=>h()),Y(()=>p())}});return()=>{S.unsubscribe(),x.unsubscribe()}}},[s]);const F=(S,x)=>{if(x===void 0)return;const j=x.timeObservation;S.video.seekToTime(j.start)},ba=(S,x)=>{if(x===void 0)return;const j=x.timeObservation;S.video.seekToTime(j.end)},_a=(S,x)=>{x instanceof V.PeriodMarker&&x.timeObservation.start!==void 0&&(x.timeObservation={...x.timeObservation,start:S.video.getCurrentTime()})},ya=(S,x)=>{x instanceof V.PeriodMarker&&x.timeObservation.end!==void 0&&(x.timeObservation={...x.timeObservation,end:S.video.getCurrentTime()})},$a=(S,x)=>{l.current&&Se(l.current),l.current=new He,S.video.pause();const j=S.video.getCurrentFrame(),W=S.video.getFrameRate(),K=j-x*W,Le=K>=0?K:0;S.video.seekToFrame(Le).pipe(at()).subscribe(()=>{}),S.video.play(),S.video.onVideoTimeChange$.pipe(ie(l.current),ie(f.current)).subscribe(un=>{un.frame>=j-1&&(S.video.pause().subscribe(()=>{S.video.seekToFrame(j).pipe(at()).subscribe(()=>{})}),Se(l.current))})},wa=(S,x)=>{l.current&&Se(l.current),l.current=new He,d.current&&Se(d.current),d.current=new He;const j=S.video.getCurrentFrame(),W=S.video.getFrameRate(),K=j+x*W;S.video.play(),S.video.onVideoTimeChange$.pipe(ie(l.current),ie(f.current)).subscribe(Le=>{Le.frame>=K-1&&(S.video.pause().subscribe(()=>{S.video.seekToFrame(j).pipe(at()).subscribe(()=>{})}),Se(l.current))}),S.video.onEnded$.pipe(ie(d.current),ie(f.current)).subscribe(Le=>{setTimeout(()=>{S.video.seekToFrame(j).pipe(at()).subscribe(()=>{})},1),Se(d.current)})},Lr=S=>{s.removeMarker(S.id),(z==null?void 0:z.id)===S.id&&M(void 0)},Sa=(S,x)=>{if(!(x instanceof V.PeriodMarker))return;const j=x.timeObservation.start,W=x.timeObservation.end,K=S.video.getCurrentTime();if(j==null||W==null)return;const Le=j,un=K,hp=un+1/S.video.getFrameRate(),gp=W;Lr(x);const Cr=new V.PeriodMarker({style:c.PERIOD_MARKER_STYLE,timeObservation:{start:Le,end:un},editable:!0});Cr.onClick$.subscribe({next:()=>a(Cr)});const kt=new V.PeriodMarker({style:c.HIGHLIGHTED_PERIOD_MARKER_STYLE,timeObservation:{start:hp,end:gp},editable:!0});kt.onClick$.subscribe({next:()=>a(kt)}),s.addMarker(Cr),s.addMarker(kt),a(kt),setTimeout(()=>{w({marker:kt,color:c.PERIOD_MARKER_STYLE.color})},0)},ka=()=>{const S=t.video.getCurrentTime(),x=new V.PeriodMarker({timeObservation:{start:S},style:c.PERIOD_MARKER_STYLE,editable:!0});x.onClick$.subscribe({next:()=>a(x)}),s.addMarker(x),M(x),Q(h()),a(x)},Ia=()=>{const S=t.video.getCurrentTime();z.timeObservation={...z.timeObservation,end:S},M(void 0)},xa=S=>{l.current&&Se(l.current),l.current=new He,d.current&&Se(d.current),d.current=new He;const x=t.video.calculateTimeToFrame(S.timeObservation.start),j=t.video.calculateTimeToFrame(S.timeObservation.end);t.video.pause(),t.video.seekToFrame(x),t.video.play(),t.video.onVideoTimeChange$.pipe(ie(l.current),ie(f.current)).subscribe(W=>{W.frame>=j-1&&(t.video.pause().subscribe(()=>{t.video.seekToFrame(x).pipe(at()).subscribe(()=>{})}),Se(l.current))}),t.video.onEnded$.pipe(ie(d.current),ie(f.current)).subscribe(W=>{setTimeout(()=>{t.video.seekToFrame(x).pipe(at()).subscribe(()=>{})},1),Se(d.current)})},pp=()=>{const S=i.length,x=`Segmentation ${i.length+1}`,j=new V.MarkerLane({style:c.TIMELINE_LANE_STYLE,description:x});j.onMarkerUpdate$.pipe(ie(f.current)).subscribe({next:W=>{Tt(j,W.marker)&&(W.marker.timeObservation=W.oldValue.timeObservation)}}),t.timeline.addTimelineLaneAtIndex(j,S+1),n([...i,j]),a(void 0),u(j)},Ta=S=>{if(!s)return;const x=s.getMarkers().filter(K=>K instanceof V.PeriodMarker).sort((K,Le)=>(K.timeObservation.start??0)-(Le.timeObservation.start??0));if(e===void 0){a(x.at(0));return}const W=x.findIndex(K=>K.id===e.id)+(S?-1:1);W>=0&&W<x.length&&a(x.at(W))};return $.useEffect(()=>{if(!r)return;const S=new q0;S.actionLoopActiveMarker=()=>e instanceof V.PeriodMarker&&hn(e)&&xa(e),S.actionSetPlayheadToMarkerStart=()=>e&&F(t,e),S.actionSetPlayheadToMarkerEnd=()=>e&&e instanceof V.PeriodMarker&&hn(e)&&ba(t,e),S.actionSetMarkerStartToPlayhead=()=>!We&&_a(t,e),S.actionSetMarkerEndToPlayhead=()=>!it&&ya(t,e),S.actionMarkerSplit=()=>!E&&Sa(t,e),S.actionMarkerDelete=()=>e&&Lr(e),S.actionMarkerInOut=()=>{z===void 0?!te&&ka():!R&&Ia()},S.actionPlay3SecondsAndRewindToCurrent=()=>wa(t,3),S.actionRewind3SecondsAndPlayToCurrent=()=>$a(t,3),S.actionNextMarkerToggle=()=>Ta(!1),S.actionPreviousMarkerToggle=()=>Ta(!0);const x=j=>{S.handleKeyboardEvent(j,t)&&(j.stopPropagation(),j.preventDefault())};return window.addEventListener("keydown",x),m.current||(t.chroming.appendHelpMenuGroup(S.getKeyboardShortcutsHelpMenuGroup()),m.current=!0),()=>window.removeEventListener("keydown",x)}),$.createElement("div",{className:"omakase-player-timeline-controls-toolbar"},$.createElement("div",{className:"omakase-player-timeline-controls-toolbar-control-panel"},$.createElement(ve,{Icon:A0,onClick:()=>F(t,e),disabled:e===void 0}),$.createElement(ve,{Icon:L0,onClick:()=>ba(t,e),disabled:e===void 0||e instanceof V.PeriodMarker&&!hn(e)}),$.createElement(ve,{Icon:C0,onClick:()=>_a(t,e),disabled:We}),$.createElement(ve,{Icon:Z0,onClick:()=>ya(t,e),disabled:it}),z===void 0?$.createElement(ve,{Icon:M0,onClick:ka,disabled:te}):$.createElement(ve,{Icon:J0,onClick:Ia,disabled:R}),$.createElement(ve,{Icon:F0,onClick:()=>Lr(e),disabled:e===void 0}),$.createElement(ve,{Icon:R0,onClick:()=>Sa(t,e),disabled:E||e===void 0}),$.createElement(ve,{Icon:V0,onClick:()=>xa(e),disabled:!(e instanceof V.PeriodMarker&&hn(e))}),$.createElement(ve,{Icon:B0,onClick:()=>$a(t,3)}),$.createElement(ve,{Icon:K0,onClick:()=>wa(t,3)})),$.createElement("div",{className:"omakase-player-timeline-controls-toolbar-control-panel"},$.createElement("div",{className:"segmentation-button-wrapper"},$.createElement(ve,{Icon:G0,text:"NEW SEGMENTATION",onClick:()=>pp(),disabled:i.length>=3}))))},H0=$.memo(function({flow:t,subflows:r,flowsSegments:i,onVideoLoadedCallback:n,config:o,timerange:a,videoLoadOptions:u,enableHotkeys:s}){return o&&(o==null?void 0:o.playerHTMLElementId)===void 0&&(o.playerHTMLElementId="omakase-player"),$.useEffect(()=>{var d,f;let c=new Jm(o);const l=m=>{Ln.handleKeyboardEvent(m,c)&&(m.stopPropagation(),m.preventDefault())};return(s===void 0||s)&&((d=document.querySelector("media-controller"))==null||d.setAttribute("nohotkeys",""),(f=document.querySelector("media-controller"))==null||f.setAttribute("tabindex","-1"),window.addEventListener("keydown",l),c.video.appendHelpMenuGroup(Ln.getKeyboardShortcutsHelpMenuGroup())),c.loadVideo({flow:t,subflows:r,flowsSegments:i},u).subscribe({next:m=>{n&&n(c,m)}}),()=>{(s===void 0||s)&&window.removeEventListener("keydown",l)}},[t,a]),$.createElement("div",{id:o.playerHTMLElementId})});function X0(e){const t=Math.round(e/60)*60,r=new Date(t*1e3);return`${r.getUTCHours()}h ${r.getUTCMinutes()}min`}function Y0(e){const t=Math.round(e/60)*60,r=Math.floor(t/86400),i=new Date(t*1e3);return r>=1?`${r}d ${i.getUTCHours()}h ${i.getUTCMinutes()}min`:`${i.getUTCHours()}h ${i.getUTCMinutes()}min`}const Q0=`
|
|
104
|
+
:root {
|
|
105
|
+
--omakase-time-range-selector-width: 700px;
|
|
106
|
+
--omakase-time-range-selector-height: 32px;
|
|
107
|
+
--omakase-time-range-selector-font-size: 13px;
|
|
108
|
+
--omakase-time-range-selector-segment-marker-background-color: #2E313D;
|
|
109
|
+
--omakase-time-range-selector-segment-marker-border-color: #655372;
|
|
110
|
+
--omakase-time-range-selector-segment-tick-border-color: #655372;
|
|
111
|
+
--omakase-time-range-selector-range-selector-background-color: #662D91;
|
|
112
|
+
--omakase-time-range-selector-range-selector-handle-background-color: #662D91;
|
|
113
|
+
--omakase-time-range-selector-segment-label-font-color: inherit;
|
|
114
|
+
--omakase-time-range-selector-range-selector-duration-font-color: #ffffff;
|
|
115
|
+
--omakase-time-range-selector-confirm-button-background-color: #424850;
|
|
116
|
+
--omakase-time-range-selector-cancel-button-background-color: #424850;
|
|
117
|
+
--omakase-time-range-selector-confirm-button-color: #00E9A3;
|
|
118
|
+
--omakase-time-range-selector-cancel-button-color: #F03838;
|
|
119
|
+
}
|
|
120
|
+
|
|
104
121
|
.omakase-time-range-selector-segments {
|
|
105
122
|
display: flex;
|
|
106
|
-
width:
|
|
123
|
+
width: var(--omakase-time-range-selector-width);
|
|
107
124
|
position: relative;
|
|
108
|
-
font-size:
|
|
125
|
+
font-size: var(--omakase-time-range-selector-font-size);
|
|
109
126
|
}
|
|
110
127
|
|
|
111
128
|
.omakase-time-range-selector-container {
|
|
112
|
-
max-width:
|
|
129
|
+
max-width: var(--omakase-time-range-selector-width);
|
|
113
130
|
position: relative;
|
|
114
131
|
}
|
|
115
132
|
|
|
@@ -122,43 +139,44 @@ ${n(m)}`)}),d.join(`
|
|
|
122
139
|
}
|
|
123
140
|
|
|
124
141
|
.omakase-time-range-selector-segment-marker {
|
|
125
|
-
background-color:
|
|
126
|
-
border: 1px solid
|
|
142
|
+
background-color: var(--omakase-time-range-selector-segment-marker-background-color);
|
|
143
|
+
border: 1px solid var(--omakase-time-range-selector-segment-marker-border-color);
|
|
127
144
|
border-right: none;
|
|
128
145
|
width: 100%;
|
|
129
|
-
height:
|
|
146
|
+
height: calc((var(--omakase-time-range-selector-height) - 2px) * 2 / 3);
|
|
130
147
|
}
|
|
131
148
|
|
|
132
149
|
.omakase-time-range-selector-segment:last-of-type .omakase-time-range-selector-segment-marker {
|
|
133
|
-
border-right: 1px solid
|
|
150
|
+
border-right: 1px solid var(--omakase-time-range-selector-segment-marker-border-color);
|
|
134
151
|
}
|
|
135
|
-
|
|
152
|
+
|
|
136
153
|
.omakase-time-range-selector-segment-tick {
|
|
137
154
|
width: 100%;
|
|
138
|
-
height:
|
|
139
|
-
border-left: 1px solid
|
|
155
|
+
height: calc((var(--omakase-time-range-selector-height) - 2px) / 3);
|
|
156
|
+
border-left: 1px solid var(--omakase-time-range-selector-segment-tick-border-color);
|
|
140
157
|
position: relative;
|
|
141
158
|
}
|
|
142
|
-
|
|
159
|
+
|
|
143
160
|
.omakase-time-range-selector-segment:last-child .omakase-time-range-selector-segment-tick {
|
|
144
|
-
border-right: 1px solid
|
|
161
|
+
border-right: 1px solid var(--omakase-time-range-selector-segment-tick-border-color);
|
|
145
162
|
}
|
|
146
163
|
|
|
147
164
|
.omakase-time-range-selector-segment-label {
|
|
148
|
-
font-size:
|
|
149
|
-
margin-top: 5px;
|
|
165
|
+
font-size: var(--omakase-time-range-selector-font-size);
|
|
150
166
|
white-space: nowrap;
|
|
167
|
+
margin-top: 5px;
|
|
168
|
+
color: var(--omakase-time-range-selector-segment-label-font-color);
|
|
151
169
|
}
|
|
152
170
|
|
|
153
171
|
.omakase-time-range-selector-segment:first-child .omakase-time-range-selector-segment-label {
|
|
154
172
|
position: absolute;
|
|
155
|
-
top:
|
|
173
|
+
top: calc(var(--omakase-time-range-selector-height) - 7px);
|
|
156
174
|
left: 0;
|
|
157
175
|
}
|
|
158
176
|
|
|
159
177
|
.omakase-time-range-selector-segment:not(:first-child) .omakase-time-range-selector-segment-label {
|
|
160
178
|
position: absolute;
|
|
161
|
-
top:
|
|
179
|
+
top: calc(var(--omakase-time-range-selector-height) - 7px);
|
|
162
180
|
left: 0;
|
|
163
181
|
transform: translateX(-50%);
|
|
164
182
|
}
|
|
@@ -170,20 +188,20 @@ ${n(m)}`)}),d.join(`
|
|
|
170
188
|
|
|
171
189
|
.omakase-time-range-selector-segment:last-child .omakase-time-range-selector-segment-first-label {
|
|
172
190
|
position: absolute;
|
|
173
|
-
top:
|
|
191
|
+
top: calc(var(--omakase-time-range-selector-height) - 7px);
|
|
174
192
|
left: 0;
|
|
175
193
|
transform: translateX(-50%);
|
|
176
194
|
}
|
|
177
195
|
|
|
178
196
|
.omakase-time-range-selector-segment:last-child .omakase-time-range-selector-segment-second-label {
|
|
179
197
|
position: absolute;
|
|
180
|
-
top:
|
|
198
|
+
top: calc(var(--omakase-time-range-selector-height) - 7px);
|
|
181
199
|
right: -100%;
|
|
182
200
|
}
|
|
183
201
|
|
|
184
202
|
.omakase-time-range-selector-range-selector {
|
|
185
|
-
height:
|
|
186
|
-
background-color:
|
|
203
|
+
height: calc((var(--omakase-time-range-selector-height) - 2px) * 2 / 3 + 2px);
|
|
204
|
+
background-color: var(--omakase-time-range-selector-range-selector-background-color);
|
|
187
205
|
position: absolute;
|
|
188
206
|
cursor: grab;
|
|
189
207
|
width: 300px;
|
|
@@ -191,38 +209,42 @@ ${n(m)}`)}),d.join(`
|
|
|
191
209
|
display: flex;
|
|
192
210
|
justify-content: space-between;
|
|
193
211
|
}
|
|
194
|
-
|
|
212
|
+
|
|
213
|
+
.omakase-time-range-selector-range-selector.omakase-time-range-selector-dragging {
|
|
214
|
+
cursor: grabbing;
|
|
215
|
+
}
|
|
216
|
+
|
|
195
217
|
.omakase-time-range-selector-range-selector-handle {
|
|
196
|
-
height:
|
|
218
|
+
height: var(--omakase-time-range-selector-height);
|
|
197
219
|
min-width: 4px;
|
|
198
|
-
background-color:
|
|
220
|
+
background-color: var(--omakase-time-range-selector-range-selector-handle-background-color);
|
|
199
221
|
cursor: ew-resize;
|
|
200
222
|
z-index: 2;
|
|
201
223
|
}
|
|
202
|
-
|
|
224
|
+
|
|
203
225
|
.omakase-time-range-selector-range-selector-duration {
|
|
204
226
|
display: flex;
|
|
205
227
|
align-items: center;
|
|
206
|
-
font-size:
|
|
228
|
+
font-size: var(--omakase-time-range-selector-font-size);
|
|
207
229
|
min-width: 0;
|
|
208
230
|
overflow: hidden;
|
|
209
231
|
text-wrap: nowrap;
|
|
210
232
|
text-overflow: clip;
|
|
211
|
-
color:
|
|
233
|
+
color: var(--omakase-time-range-selector-range-selector-duration-font-color);
|
|
212
234
|
z-index: 3;
|
|
213
235
|
}
|
|
214
|
-
|
|
236
|
+
|
|
215
237
|
.omakase-time-range-selector-range-selector-duration:hover {
|
|
216
|
-
font-size:
|
|
238
|
+
font-size: var(--omakase-time-range-selector-font-size);
|
|
217
239
|
overflow: visible;
|
|
218
|
-
color:
|
|
240
|
+
color: var(--omakase-time-range-selector-range-selector-duration-font-color);
|
|
219
241
|
}
|
|
220
242
|
|
|
221
243
|
.omakase-time-range-selector-button-container {
|
|
222
244
|
z-index: 3;
|
|
223
245
|
position: absolute;
|
|
224
246
|
right: 0px;
|
|
225
|
-
top:
|
|
247
|
+
top: calc((var(--omakase-time-range-selector-height) - 2px) / 3);
|
|
226
248
|
display: flex;
|
|
227
249
|
}
|
|
228
250
|
|
|
@@ -245,12 +267,12 @@ ${n(m)}`)}),d.join(`
|
|
|
245
267
|
cursor: pointer;
|
|
246
268
|
outline: inherit;
|
|
247
269
|
}
|
|
248
|
-
|
|
270
|
+
`,e_=`
|
|
249
271
|
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
250
272
|
<g filter="url(#filter0_d_5782_463)">
|
|
251
|
-
<circle cx="16" cy="12" r="12" fill="
|
|
273
|
+
<circle cx="16" cy="12" r="12" fill="var(--omakase-time-range-selector-confirm-button-background-color)"/>
|
|
252
274
|
<g clip-path="url(#clip0_5782_463)">
|
|
253
|
-
<path d="M21.8411 8.37562C21.5993 8.1332 21.2772 8 20.9346 8C20.5921 8 20.2703 8.13348 20.0278 8.37562L14.4994 13.904L12.1886 11.5932C11.6886 11.0932 10.8751 11.0932 10.3751 11.5932C9.87506 12.0932 9.87506 12.9068 10.3751 13.4068L13.5927 16.6244C13.8348 16.8665 14.1569 17 14.4994 17C14.842 17 15.1644 16.8665 15.4062 16.6244L21.8411 10.1892C22.0836 9.94705 22.2168 9.62493 22.2168 9.2824C22.2168 8.93988 22.0836 8.61804 21.8414 8.37562H21.8411Z" fill="
|
|
275
|
+
<path d="M21.8411 8.37562C21.5993 8.1332 21.2772 8 20.9346 8C20.5921 8 20.2703 8.13348 20.0278 8.37562L14.4994 13.904L12.1886 11.5932C11.6886 11.0932 10.8751 11.0932 10.3751 11.5932C9.87506 12.0932 9.87506 12.9068 10.3751 13.4068L13.5927 16.6244C13.8348 16.8665 14.1569 17 14.4994 17C14.842 17 15.1644 16.8665 15.4062 16.6244L21.8411 10.1892C22.0836 9.94705 22.2168 9.62493 22.2168 9.2824C22.2168 8.93988 22.0836 8.61804 21.8414 8.37562H21.8411Z" fill="var(--omakase-time-range-selector-confirm-button-color)"/>
|
|
254
276
|
</g>
|
|
255
277
|
</g>
|
|
256
278
|
<defs>
|
|
@@ -269,12 +291,12 @@ ${n(m)}`)}),d.join(`
|
|
|
269
291
|
</clipPath>
|
|
270
292
|
</defs>
|
|
271
293
|
</svg>
|
|
272
|
-
`,
|
|
294
|
+
`,t_=`
|
|
273
295
|
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
274
296
|
<g filter="url(#filter0_d_5782_462)">
|
|
275
|
-
<circle cx="16" cy="12" r="12" fill="
|
|
297
|
+
<circle cx="16" cy="12" r="12" fill="var(--omakase-time-range-selector-cancel-button-background-color)"/>
|
|
276
298
|
<g clip-path="url(#clip0_5782_462)">
|
|
277
|
-
<path d="M20.6618 8.96972L17.6319 12L20.6618 15.0301C21.1125 15.4809 21.1125 16.2113 20.6618 16.6621C20.4366 16.8873 20.1414 17 19.8463 17C19.5507 17 19.2555 16.8875 19.0305 16.6621L15.9999 13.6317L12.9696 16.6621C12.7444 16.8873 12.4492 17 12.1538 17C11.8586 17 11.5635 16.8875 11.3382 16.6621C10.8875 16.2114 10.8875 15.4811 11.3382 15.03L14.368 11.9999L11.338 8.96972C10.8873 8.51903 10.8873 7.78852 11.338 7.33783C11.7886 6.88749 12.5187 6.88749 12.9694 7.33783L15.9999 10.3681L19.0301 7.33783C19.481 6.88749 20.2111 6.88749 20.6616 7.33783C21.1125 7.78852 21.1125 8.51903 20.6618 8.96972Z" fill="
|
|
299
|
+
<path d="M20.6618 8.96972L17.6319 12L20.6618 15.0301C21.1125 15.4809 21.1125 16.2113 20.6618 16.6621C20.4366 16.8873 20.1414 17 19.8463 17C19.5507 17 19.2555 16.8875 19.0305 16.6621L15.9999 13.6317L12.9696 16.6621C12.7444 16.8873 12.4492 17 12.1538 17C11.8586 17 11.5635 16.8875 11.3382 16.6621C10.8875 16.2114 10.8875 15.4811 11.3382 15.03L14.368 11.9999L11.338 8.96972C10.8873 8.51903 10.8873 7.78852 11.338 7.33783C11.7886 6.88749 12.5187 6.88749 12.9694 7.33783L15.9999 10.3681L19.0301 7.33783C19.481 6.88749 20.2111 6.88749 20.6616 7.33783C21.1125 7.78852 21.1125 8.51903 20.6618 8.96972Z" fill="var(--omakase-time-range-selector-cancel-button-color)"/>
|
|
278
300
|
</g>
|
|
279
301
|
</g>
|
|
280
302
|
<defs>
|
|
@@ -294,5 +316,5 @@ ${n(m)}`)}),d.join(`
|
|
|
294
316
|
</defs>
|
|
295
317
|
</svg>
|
|
296
318
|
|
|
297
|
-
`,X={container:"omakase-time-range-selector-container",segments:"omakase-time-range-selector-segments",segment:"omakase-time-range-selector-segment",segmentMarker:"omakase-time-range-selector-segment-marker",segmentTick:"omakase-time-range-selector-segment-tick",segmentLabel:"omakase-time-range-selector-segment-label",firstSegmentLabel:"omakase-time-range-selector-segment-first-label",secondSegmentLabel:"omakase-time-range-selector-segment-second-label",rangeSelector:"omakase-time-range-selector-range-selector",rangeSelectorHandle:"omakase-time-range-selector-range-selector-handle",rangeSelectorDuration:"omakase-time-range-selector-range-selector-duration",buttonContainer:"omakase-time-range-selector-button-container",invisible:"omakase-time-range-selector-invisible"},hn={leftHandle:"omakase-time-range-selector-range-selector-left-handle",rightHandle:"omakase-time-range-selector-range-selector-right-handle",rangeDuration:"omakase-time-range-selector-range-selector-range-duration",segments:"omakase-time-range-selector-segments"};class di extends HTMLElement{constructor(){super();k(this,"_container");k(this,"_rangeSelector");k(this,"_rangeSelectorLeftHandle");k(this,"_rangeSelectorRightHandle");k(this,"_rangeSelectorRangeDisplay");k(this,"_buttonContainer");k(this,"_segments");k(this,"_numberOfSegments",5);k(this,"_firstLabelIndex",0);k(this,"_initialFirstLabelIndex",0);k(this,"_labels",[]);k(this,"minWidth",10);k(this,"minValue");k(this,"maxValue");k(this,"maxRange");k(this,"segmentSize");k(this,"sliderStart");k(this,"sliderEnd");k(this,"maxWidthPercent");k(this,"labelFormatter",__);k(this,"onCheckmarkClickCallback");k(this,"currentStart",0);k(this,"currentEnd",100);k(this,"resetSegments",()=>{this._container.removeChild(this._segments),this._segments=this.buildSegments(this._labels.slice(this.firstLabelIndex,this.lastLabelIndex+1)),this._segments.classList.add(X.segments),this._container.append(this._segments)});k(this,"getBounds",()=>({wrapperLeft:this._container.offsetLeft,wrapperRight:this._container.offsetLeft+this._container.offsetWidth,wrapperWidth:this._container.offsetWidth,selectorLeft:this._rangeSelector.offsetLeft,selectorWidth:this._rangeSelector.offsetWidth}));k(this,"getSliderValues",()=>{const{wrapperWidth:r,selectorLeft:i,selectorWidth:n}=this.getBounds(),o=this._labels.at(this.firstLabelIndex),a=this._labels.at(this.lastLabelIndex),u=Math.round(o+i/r*(a-o)),s=Math.round(o+(i+n)/r*(a-o));return{start:u,end:s}});k(this,"getSelectorBounds",(r,i)=>{const{wrapperWidth:n}=this.getBounds(),o=this._labels.at(this.firstLabelIndex),a=this._labels.at(this.lastLabelIndex),u=Math.round((r-o)/(a-o)*n),s=Math.round((i-r)/(a-o)*n);return{selectorLeft:u,selectorWidth:s}});k(this,"initSlider",(r,i)=>{const n=this.getSelectorBounds(r,i);this._rangeSelector.style.left=n.selectorLeft.toString()+"px",this._rangeSelector.style.width=n.selectorWidth.toString()+"px",this.updateDuration()});k(this,"showButtons",()=>{const{start:r,end:i}=this.getSliderValues();r===this.currentStart&&i===this.currentEnd||this._buttonContainer.classList.remove(X.invisible)});k(this,"hideButtons",()=>{this._buttonContainer.classList.add(X.invisible)});k(this,"updateDuration",()=>{const{start:r,end:i}=this.getSliderValues(),n=i-r;this._rangeSelectorRangeDisplay.textContent=this.labelFormatter(n)});k(this,"onXclick",()=>{this.firstLabelIndex=this._initialFirstLabelIndex,this.resetSegments();const r=this.getSelectorBounds(this.currentStart,this.currentEnd);this._rangeSelector.style.left=r.selectorLeft.toString()+"px",this._rangeSelector.style.width=r.selectorWidth.toString()+"px",this.updateDuration(),this.hideButtons()});k(this,"onCheckmarkClick",()=>{const{start:r,end:i}=this.getSliderValues();this.currentStart=r,this.currentEnd=i,this._initialFirstLabelIndex=this.firstLabelIndex,this.updateDuration(),this.hideButtons(),this.onCheckmarkClickCallback!==void 0&&this.onCheckmarkClickCallback(r,i)});k(this,"onMouseDownRight",r=>{r.preventDefault();const i=r.clientX,{selectorWidth:n,wrapperWidth:o,selectorLeft:a}=this.getBounds();let u=null,s=null;const c=d=>{let f=d.clientX-i,m=Math.max(this.minWidth,n+f);const g=Math.min(o*this.maxWidthPercent,o-a),h=m>g,v=performance.now();h?u===null&&(u=v,s=window.setTimeout(()=>{this.outOfBoundsCallback(!0),s=window.setInterval(()=>this.outOfBoundsCallback(!0),400)},500)):(s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null),m=Math.min(m,g),this._rangeSelector.style.width=`${m}px`,this.updateDuration()},l=()=>{this.showButtons(),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",l),s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null};document.addEventListener("mousemove",c),document.addEventListener("mouseup",l)});k(this,"onMouseDownLeft",r=>{r.preventDefault();const i=r.clientX,{selectorLeft:n,selectorWidth:o,wrapperWidth:a}=this.getBounds();let u=null,s=null;const c=d=>{let f=d.clientX-i,m=n+f;const g=m<0,h=performance.now();g?u===null&&(u=h,s=window.setTimeout(()=>{this.outOfBoundsCallback(!1),s=window.setInterval(()=>this.outOfBoundsCallback(!1),400)},500)):(s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null),m<0&&(f=-n,m=0);let v=Math.min(Math.max(this.minWidth,o-f),a);m+v>a&&(m=a-v),v>this.minWidth&&v<a*this.maxWidthPercent&&(this._rangeSelector.style.left=`${m}px`,this._rangeSelector.style.width=`${v}px`),this.updateDuration()},l=()=>{this.showButtons(),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",l),s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null};document.addEventListener("mousemove",c),document.addEventListener("mouseup",l)});k(this,"outOfBoundsCallback",r=>{r?this.firstLabelIndex+=1:this.firstLabelIndex-=1,this.resetSegments()});k(this,"onMouseDownDrag",r=>{if(r.target instanceof HTMLElement&&r.target.classList.contains(X.rangeSelectorHandle))return;r.preventDefault();const i=r.clientX,{selectorLeft:n,selectorWidth:o,wrapperWidth:a}=this.getBounds();let u=null,s=null;const c=d=>{let f=d.clientX-i,m=n+f;const g=a-o,h=m<0||m>g,v=performance.now();if(h){if(u===null){const w=m>g;u=v,s=window.setTimeout(()=>{this.outOfBoundsCallback(w),s=window.setInterval(()=>this.outOfBoundsCallback(w),400)},500)}}else s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null;m=Math.max(0,Math.min(m,g)),this._rangeSelector.style.left=`${m}px`,this.updateDuration()},l=()=>{this.showButtons(),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",l),s!==null&&(clearTimeout(s),clearInterval(s))};document.addEventListener("mousemove",c),document.addEventListener("mouseup",l)})}set numberOfSegments(r){r>2&&(this._numberOfSegments=r)}get numberOfSegments(){return this._numberOfSegments}static get observedAttributes(){return["minValue","maxValue","maxRange","segmentSize","sliderStart","sliderEnd","numberOfSegments"]}get firstLabelIndex(){return this._firstLabelIndex}set firstLabelIndex(r){if(r+this._numberOfSegments+1>=this._labels.length){this._firstLabelIndex=this._labels.length-1-this.numberOfSegments;return}if(r<0){this._firstLabelIndex=0;return}this._firstLabelIndex=r}get lastLabelIndex(){return this._firstLabelIndex+this._numberOfSegments}connectedCallback(){if(this.minValue=Number.parseInt(this.getAttribute("minValue")??"NaN"),this.maxValue=Number.parseInt(this.getAttribute("maxValue")??"NaN"),this.maxRange=Number.parseInt(this.getAttribute("maxRange")??"NaN"),this.segmentSize=Number.parseInt(this.getAttribute("segmentSize")??"NaN"),this.getAttribute("numberOfSegments")){const l=Number.parseInt(this.getAttribute("numberOfSegments"));if(Number.isNaN(l))throw new Error("Invalid atribute value");this._numberOfSegments=l}if(Number.isNaN(this.minValue)||Number.isNaN(this.maxValue)||Number.isNaN(this.maxRange)||Number.isNaN(this.segmentSize))throw new Error("Invalid attribute values.");const r=this.maxValue-this.minValue;if(r<this.numberOfSegments*this.segmentSize&&(this.segmentSize=r/this.numberOfSegments),this.maxWidthPercent=this.maxRange>this.numberOfSegments*this.segmentSize?1:this.maxRange/(this.numberOfSegments*this.segmentSize),this._labels=this.calculateLabels(),this.maxValue<this.minValue)throw new Error("Max value is lesser than min value");let i,n;if(this.getAttribute("sliderStart")&&this.getAttribute("sliderEnd")){if(i=Number.parseFloat(this.getAttribute("sliderStart")),n=Number.parseFloat(this.getAttribute("sliderEnd")),i>n)throw new Error("Slider start is bigger than slider end");if(i<this.minValue)throw new Error("Slider start is smaller than minimal value");n>this.maxValue&&(n=this.maxValue),this.currentStart=i,this.currentEnd=n}else i=this.minValue,n=this.segmentSize;this.resolveInitialSegment(i,n),this._container=document.createElement("div"),this._container.classList.add(X.container);const o=document.createElement("style");o.textContent=y_,this._container.append(o),this._buttonContainer=document.createElement("div"),this._buttonContainer.classList.add(X.buttonContainer,X.invisible);const a=this.createButtonSvg($_),u=this.createButtonSvg(w_);a.onclick=this.onCheckmarkClick,u.onclick=this.onXclick,this._buttonContainer.append(a,u),this._container.append(this._buttonContainer),this._rangeSelector=document.createElement("div"),this._rangeSelector.classList.add(X.rangeSelector),this._rangeSelectorLeftHandle=document.createElement("div"),this._rangeSelectorLeftHandle.classList.add(X.rangeSelectorHandle),this._rangeSelectorLeftHandle.id=hn.leftHandle,this._rangeSelectorRightHandle=document.createElement("div"),this._rangeSelectorRightHandle.classList.add(X.rangeSelectorHandle),this._rangeSelectorRightHandle.id=hn.rightHandle,this._rangeSelectorRangeDisplay=document.createElement("div"),this._rangeSelectorRangeDisplay.classList.add(X.rangeSelectorDuration),this._rangeSelectorRangeDisplay.id=hn.rangeDuration,this._rangeSelector.append(this._rangeSelectorLeftHandle,this._rangeSelectorRangeDisplay,this._rangeSelectorRightHandle),this._container.append(this._rangeSelector),this._segments=this.buildSegments(this._labels.slice(this.firstLabelIndex,this.lastLabelIndex+1)),this._segments.id=hn.segments,this._segments.classList.add(X.segments),this._container.append(this._segments),this._rangeSelectorLeftHandle.addEventListener("mousedown",this.onMouseDownLeft),this._rangeSelectorRightHandle.addEventListener("mousedown",this.onMouseDownRight),this._rangeSelector.addEventListener("mousedown",this.onMouseDownDrag),this.append(this._container),this.initSlider(i,n);const{start:s,end:c}=this.getSliderValues();this.currentStart=s,this.currentEnd=c,this.updateDuration()}resolveInitialSegment(r,i){const n=this._numberOfSegments*this.segmentSize,o=i-r,a=this.maxValue-this.minValue,u=r-this.minValue,s=Math.ceil(a/this.segmentSize);let c=Math.floor(u/a*s);c+=Math.floor((n-o)/this.segmentSize);const d=c+Math.ceil(o/this.segmentSize)-this._numberOfSegments;this.firstLabelIndex=d,this._initialFirstLabelIndex=d}createButtonSvg(r){const i=document.createElement("button");return i.innerHTML=r,i}calculateLabels(){const r=this.minValue,i=this.maxValue,n=Math.floor((this.maxValue-this.minValue)/this.segmentSize)-1,o=[r];let a=this.minValue;for(let u=0;u<n;u++)a+=this.segmentSize,o.push(a);return o.push(i),o}buildSegments(r){const i=document.createElement("div");r.slice(0,-2).forEach(c=>{const l=document.createElement("div");l.classList.add(X.segment);const d=document.createElement("div");d.classList.add(X.segmentMarker);const f=document.createElement("div");f.classList.add(X.segmentTick);const m=document.createElement("div");m.classList.add(X.segmentLabel),m.innerHTML=this.labelFormatter(c),l.append(d,f,m),i.append(l)});const n=document.createElement("div");n.classList.add(X.segment);const o=document.createElement("div");o.classList.add(X.segmentMarker);const a=document.createElement("div");a.classList.add(X.segmentTick);const u=document.createElement("div");u.classList.add(X.segmentLabel,X.firstSegmentLabel),u.innerHTML=this.labelFormatter(r.at(-2));const s=document.createElement("div");return s.classList.add(X.segmentLabel,X.secondSegmentLabel),s.innerHTML=this.labelFormatter(r.at(-1)),n.append(o,a,u,s),i.append(n),i}}customElements.get("omakase-time-range-selector")||customElements.define("omakase-time-range-selector",di);const pu="omakase-time-range-selector-react-div",S_=({timeRange:e,maxTimeRange:t,numberOfSegments:r,segmentSize:i,maxSliderRange:n,onCheckmarkClickCallback:o,labelFormatter:a})=>(customElements.get("omakase-time-range-selector")||customElements.define("omakase-time-range-selector",di),$.useEffect(()=>{var g;const u=N.parseTimeRange(t),s=N.timeMomentToSeconds(u.start),c=N.timeMomentToSeconds(u.end),l=N.parseTimeRange(e),d=N.timeMomentToSeconds(l.start),f=N.timeMomentToSeconds(l.end),m=new di;m.setAttribute("minValue",s.toString()),m.setAttribute("maxValue",c.toString()),m.setAttribute("maxRange",n.toString()),m.setAttribute("segmentSize",i.toString()),m.setAttribute("numberOfSegments",r.toString()),m.setAttribute("sliderStart",d.toString()),m.setAttribute("sliderEnd",f.toString()),m.onCheckmarkClickCallback=o,a&&(m.labelFormatter=a),(g=document.getElementById(pu))==null||g.append(m)},[]),$.createElement("div",{id:pu})),k_=$.memo(({omakasePlayer:e,config:t,onCreateMarkerListCallback:r})=>($.useEffect(()=>{const i=e.createMarkerList(t).subscribe({next:n=>{r==null||r(n)}});return()=>{i.unsubscribe()}},[t.source]),$.createElement("div",{id:t.markerListHTMLElementId})));exports.AudioFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformataudio:"urn:x-nmos:format:audio"}})(exports.AudioFlow||(exports.AudioFlow={}));const I_={Video:"urn:x-nmos:format:video",Audio:"urn:x-nmos:format:audio",Data:"urn:x-nmos:format:data",Multi:"urn:x-nmos:format:multi"};exports.DataFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatdata:"urn:x-nmos:format:data"}})(exports.DataFlow||(exports.DataFlow={}));exports.DeletionRequest=void 0;(e=>{e.StatusEnum={Created:"created",Started:"started",Done:"done",Error:"error"}})(exports.DeletionRequest||(exports.DeletionRequest={}));exports.MediaBucketObjectStorePreInner=void 0;(e=>{e.ActionEnum={CreateBucket:"create_bucket"}})(exports.MediaBucketObjectStorePreInner||(exports.MediaBucketObjectStorePreInner={}));exports.MultiEssenceFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatmulti:"urn:x-nmos:format:multi"}})(exports.MultiEssenceFlow||(exports.MultiEssenceFlow={}));exports.ServiceMediaStore=void 0;(e=>{e.TypeEnum={HttpObjectStore:"http_object_store"}})(exports.ServiceMediaStore||(exports.ServiceMediaStore={}));exports.Source=void 0;(e=>{e.FormatEnum={Video:"urn:x-nmos:format:video",Audio:"urn:x-nmos:format:audio",Data:"urn:x-nmos:format:data",Multi:"urn:x-nmos:format:multi"}})(exports.Source||(exports.Source={}));exports.UncompressedAudioParameters=void 0;(e=>{e.UncTypeEnum={Interleaved:"interleaved",Planar:"planar",Pairs:"pairs"}})(exports.UncompressedAudioParameters||(exports.UncompressedAudioParameters={}));exports.UncompressedVideoParameters=void 0;(e=>{e.UncTypeEnum={Planar:"planar",Yuyv:"YUYV",Uyvy:"UYVY",Ayuv:"AYUV",V210:"v210",V216:"v216",Rgb:"RGB",Rgbx:"RGBx",XRgb:"xRGB",Bgrx:"BGRx",XBgr:"xBGR",Rgba:"RGBA",Argb:"ARGB",Bgra:"BGRA",Abgr:"ABGR",Alpha:"alpha"}})(exports.UncompressedVideoParameters||(exports.UncompressedVideoParameters={}));exports.VideoFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatvideo:"urn:x-nmos:format:video"}})(exports.VideoFlow||(exports.VideoFlow={}));exports.VideoFlowEssenceParameters=void 0;(e=>{e.InterlaceModeEnum={Progressive:"progressive",InterlacedTff:"interlaced_tff",InterlacedBff:"interlaced_bff",InterlacedPsf:"interlaced_psf"},e.ColorspaceEnum={Bt601:"BT601",Bt709:"BT709",Bt2020:"BT2020",Bt2100:"BT2100"},e.TransferCharacteristicEnum={Sdr:"SDR",Hlg:"HLG",Pq:"PQ"},e.ComponentTypeEnum={YcbCr:"YCbCr",Rgb:"RGB"}})(exports.VideoFlowEssenceParameters||(exports.VideoFlowEssenceParameters={}));exports.ImageFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatdata:"urn:x-tam:format:image"}})(exports.ImageFlow||(exports.ImageFlow={}));exports.Contentformat=I_;exports.OmakaseMarkerListComponent=k_;exports.OmakasePlayerComponent=r_;exports.OmakasePlayerTimelineBuilder=ob;exports.OmakasePlayerTimelineComponent=n_;exports.OmakasePlayerTimelineControlsToolbar=v_;exports.OmakaseTamsPlayer=Pm;exports.OmakaseTamsPlayerComponent=b_;exports.OmakaseTimeRangePicker=S_;exports.TimeRangeUtil=N;exports.TimecodeUtil=xe;exports.VideoApiProxy=Au;exports.convertFlowIdToSubtitlesId=nh;exports.gatherAndExportToManifest=Uu;exports.removeGapsInSegments=zu;exports.removeGapsInSegmentsByExtending=Eu;exports.resolveAudioManifestName=xu;exports.resolveTextManifestName=Tu;exports.validateTamsPayload=Ou;
|
|
319
|
+
`,H={container:"omakase-time-range-selector-container",segments:"omakase-time-range-selector-segments",segment:"omakase-time-range-selector-segment",segmentMarker:"omakase-time-range-selector-segment-marker",segmentTick:"omakase-time-range-selector-segment-tick",segmentLabel:"omakase-time-range-selector-segment-label",firstSegmentLabel:"omakase-time-range-selector-segment-first-label",secondSegmentLabel:"omakase-time-range-selector-segment-second-label",rangeSelector:"omakase-time-range-selector-range-selector",rangeSelectorHandle:"omakase-time-range-selector-range-selector-handle",rangeSelectorDuration:"omakase-time-range-selector-range-selector-duration",buttonContainer:"omakase-time-range-selector-button-container",invisible:"omakase-time-range-selector-invisible",dragging:"omakase-time-range-selector-dragging"},gn={leftHandle:"omakase-time-range-selector-range-selector-left-handle",rightHandle:"omakase-time-range-selector-range-selector-right-handle",rangeDuration:"omakase-time-range-selector-range-selector-range-duration",segments:"omakase-time-range-selector-segments"};class mi extends HTMLElement{constructor(){super();k(this,"_container");k(this,"_resizeObserver");k(this,"_rangeSelector");k(this,"_rangeSelectorLeftHandle");k(this,"_rangeSelectorRightHandle");k(this,"_rangeSelectorRangeDisplay");k(this,"_buttonContainer");k(this,"_segments");k(this,"_numberOfSegments",5);k(this,"_firstLabelIndex",0);k(this,"_initialFirstLabelIndex",0);k(this,"_labels",[]);k(this,"minWidth",10);k(this,"minValue");k(this,"maxValue");k(this,"maxRange");k(this,"segmentSize");k(this,"sliderStart");k(this,"sliderEnd");k(this,"maxWidthPercent");k(this,"segmentLabelFormatter",X0);k(this,"durationLabelFormatter",Y0);k(this,"onCheckmarkClickCallback");k(this,"currentStart",0);k(this,"currentEnd",100);k(this,"_displayedStart",0);k(this,"_displayedEnd",0);k(this,"resetSegments",()=>{this._container.removeChild(this._segments),this._segments=this.buildSegments(this._labels.slice(this.firstLabelIndex,this.lastLabelIndex+1)),this._segments.classList.add(H.segments),this._container.append(this._segments)});k(this,"getBounds",()=>({wrapperLeft:this._container.offsetLeft,wrapperRight:this._container.offsetLeft+this._container.offsetWidth,wrapperWidth:this._container.offsetWidth,selectorLeft:this._rangeSelector.offsetLeft,selectorWidth:this._rangeSelector.offsetWidth}));k(this,"getSliderValues",()=>{const{wrapperWidth:r,selectorLeft:i,selectorWidth:n}=this.getBounds(),o=this._labels.at(this.firstLabelIndex),a=this._labels.at(this.lastLabelIndex),u=Math.round(o+i/r*(a-o)),s=Math.round(o+(i+n)/r*(a-o));return{start:u,end:s}});k(this,"getSelectorBounds",(r,i)=>{const{wrapperWidth:n}=this.getBounds(),o=this._labels.at(this.firstLabelIndex),a=this._labels.at(this.lastLabelIndex),u=Math.round((r-o)/(a-o)*n),s=Math.round((i-r)/(a-o)*n);return{selectorLeft:u,selectorWidth:s}});k(this,"initSlider",(r,i)=>{const n=this.getSelectorBounds(r,i);this._rangeSelector.style.left=n.selectorLeft.toString()+"px",this._rangeSelector.style.width=n.selectorWidth.toString()+"px",this.updateDuration()});k(this,"setSliderPosition",()=>{const{selectorLeft:r,selectorWidth:i}=this.getSelectorBounds(this._displayedStart,this._displayedEnd);this._rangeSelector.style.left=`${r}px`,this._rangeSelector.style.width=`${i}px`});k(this,"showButtons",()=>{const{start:r,end:i}=this.getSliderValues();r===this.currentStart&&i===this.currentEnd||this._buttonContainer.classList.remove(H.invisible)});k(this,"hideButtons",()=>{this._buttonContainer.classList.add(H.invisible)});k(this,"updateDuration",()=>{const{start:r,end:i}=this.getSliderValues();this._displayedStart=r,this._displayedEnd=i;const n=i-r;this._rangeSelectorRangeDisplay.textContent=this.durationLabelFormatter(n)});k(this,"onXclick",()=>{this.firstLabelIndex=this._initialFirstLabelIndex,this.resetSegments(),this._displayedStart=this.currentStart,this._displayedEnd=this.currentEnd,this.setSliderPosition(),this.updateDuration(),this.hideButtons()});k(this,"onCheckmarkClick",()=>{const{start:r,end:i}=this.getSliderValues();this.currentStart=r,this.currentEnd=i,this._initialFirstLabelIndex=this.firstLabelIndex,this.updateDuration(),this.hideButtons(),this.onCheckmarkClickCallback!==void 0&&this.onCheckmarkClickCallback(r,i)});k(this,"onMouseDownRight",r=>{r.preventDefault();const i=r.clientX,{selectorWidth:n,wrapperWidth:o,selectorLeft:a}=this.getBounds();let u=null,s=null;const c=d=>{let f=d.clientX-i,m=Math.max(this.minWidth,n+f);const h=Math.min(o*this.maxWidthPercent,o-a),p=m>h,v=performance.now();p?u===null&&(u=v,s=window.setTimeout(()=>{this.outOfBoundsCallback(!0),s=window.setInterval(()=>this.outOfBoundsCallback(!0),400)},500)):(s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null),m=Math.min(m,h),this._rangeSelector.style.width=`${m}px`,this.updateDuration()},l=()=>{this.showButtons(),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",l),s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null};document.addEventListener("mousemove",c),document.addEventListener("mouseup",l)});k(this,"onMouseDownLeft",r=>{r.preventDefault();const i=r.clientX,{selectorLeft:n,selectorWidth:o,wrapperWidth:a}=this.getBounds();let u=null,s=null;const c=d=>{let f=d.clientX-i,m=n+f;const h=m<0,p=performance.now();h?u===null&&(u=p,s=window.setTimeout(()=>{this.outOfBoundsCallback(!1),s=window.setInterval(()=>this.outOfBoundsCallback(!1),400)},500)):(s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null),m<0&&(f=-n,m=0);let v=Math.min(Math.max(this.minWidth,o-f),a);m+v>a&&(m=a-v),v>this.minWidth&&v<=a*this.maxWidthPercent&&(this._rangeSelector.style.left=`${m}px`,this._rangeSelector.style.width=`${v}px`),this.updateDuration()},l=()=>{this.showButtons(),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",l),s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null};document.addEventListener("mousemove",c),document.addEventListener("mouseup",l)});k(this,"outOfBoundsCallback",r=>{r?this.firstLabelIndex+=1:this.firstLabelIndex-=1,this.resetSegments(),this.updateDuration()});k(this,"onMouseDownDrag",r=>{if(r.target instanceof HTMLElement&&r.target.classList.contains(H.rangeSelectorHandle))return;r.preventDefault(),this._rangeSelector.classList.add(H.dragging);const i=r.clientX,{selectorLeft:n,selectorWidth:o,wrapperWidth:a}=this.getBounds();let u=null,s=null;const c=d=>{let f=d.clientX-i,m=n+f;const h=a-o,p=m<0||m>h,v=performance.now();if(p){if(u===null){const w=m>h;u=v,s=window.setTimeout(()=>{this.outOfBoundsCallback(w),s=window.setInterval(()=>this.outOfBoundsCallback(w),400)},500)}}else s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null;m=Math.max(0,Math.min(m,h)),this._rangeSelector.style.left=`${m}px`,this.updateDuration()},l=()=>{this._rangeSelector.classList.remove(H.dragging),this.showButtons(),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",l),s!==null&&(clearTimeout(s),clearInterval(s))};document.addEventListener("mousemove",c),document.addEventListener("mouseup",l)})}set numberOfSegments(r){r>2&&(this._numberOfSegments=r)}get numberOfSegments(){return this._numberOfSegments}static get observedAttributes(){return["minValue","maxValue","maxRange","segmentSize","sliderStart","sliderEnd","numberOfSegments"]}get firstLabelIndex(){return this._firstLabelIndex}set firstLabelIndex(r){if(r+this._numberOfSegments+1>=this._labels.length){this._firstLabelIndex=this._labels.length-1-this.numberOfSegments;return}if(r<0){this._firstLabelIndex=0;return}this._firstLabelIndex=r}get lastLabelIndex(){return this._firstLabelIndex+this._numberOfSegments}connectedCallback(){if(this.minValue=Number.parseInt(this.getAttribute("minValue")??"NaN"),this.maxValue=Number.parseInt(this.getAttribute("maxValue")??"NaN"),this.maxRange=Number.parseInt(this.getAttribute("maxRange")??"NaN"),this.segmentSize=Number.parseInt(this.getAttribute("segmentSize")??"NaN"),this.getAttribute("numberOfSegments")){const l=Number.parseInt(this.getAttribute("numberOfSegments"));if(Number.isNaN(l))throw new Error("Invalid atribute value");this._numberOfSegments=l}if(Number.isNaN(this.minValue)||Number.isNaN(this.maxValue)||Number.isNaN(this.maxRange)||Number.isNaN(this.segmentSize))throw new Error("Invalid attribute values.");const r=this.maxValue-this.minValue;if(r<this.numberOfSegments*this.segmentSize&&(this.segmentSize=r/this.numberOfSegments),this.maxWidthPercent=this.maxRange>this.numberOfSegments*this.segmentSize?1:this.maxRange/(this.numberOfSegments*this.segmentSize),this._labels=this.calculateLabels(),this.maxValue<this.minValue)throw new Error("Max value is lesser than min value");let i,n;if(this.getAttribute("sliderStart")&&this.getAttribute("sliderEnd")){if(i=Number.parseFloat(this.getAttribute("sliderStart")),n=Number.parseFloat(this.getAttribute("sliderEnd")),i>n)throw new Error("Slider start is bigger than slider end");if(i<this.minValue)throw new Error("Slider start is smaller than minimal value");n>this.maxValue&&(n=this.maxValue),this.currentStart=i,this.currentEnd=n}else i=this.minValue,n=this.segmentSize;this.resolveInitialSegment(i,n),this._container=document.createElement("div"),this._container.classList.add(H.container);const o=document.createElement("style");o.textContent=Q0,this._container.append(o),this._buttonContainer=document.createElement("div"),this._buttonContainer.classList.add(H.buttonContainer,H.invisible);const a=this.createButtonSvg(e_),u=this.createButtonSvg(t_);a.onclick=this.onCheckmarkClick,u.onclick=this.onXclick,this._buttonContainer.append(a,u),this._container.append(this._buttonContainer),this._rangeSelector=document.createElement("div"),this._rangeSelector.classList.add(H.rangeSelector),this._rangeSelectorLeftHandle=document.createElement("div"),this._rangeSelectorLeftHandle.classList.add(H.rangeSelectorHandle),this._rangeSelectorLeftHandle.id=gn.leftHandle,this._rangeSelectorRightHandle=document.createElement("div"),this._rangeSelectorRightHandle.classList.add(H.rangeSelectorHandle),this._rangeSelectorRightHandle.id=gn.rightHandle,this._rangeSelectorRangeDisplay=document.createElement("div"),this._rangeSelectorRangeDisplay.classList.add(H.rangeSelectorDuration),this._rangeSelectorRangeDisplay.id=gn.rangeDuration,this._rangeSelector.append(this._rangeSelectorLeftHandle,this._rangeSelectorRangeDisplay,this._rangeSelectorRightHandle),this._container.append(this._rangeSelector),this._segments=this.buildSegments(this._labels.slice(this.firstLabelIndex,this.lastLabelIndex+1)),this._segments.id=gn.segments,this._segments.classList.add(H.segments),this._container.append(this._segments),this._rangeSelectorLeftHandle.addEventListener("mousedown",this.onMouseDownLeft),this._rangeSelectorRightHandle.addEventListener("mousedown",this.onMouseDownRight),this._rangeSelector.addEventListener("mousedown",this.onMouseDownDrag),this.append(this._container),this.initSlider(i,n);const{start:s,end:c}=this.getSliderValues();this.currentStart=s,this.currentEnd=c,this.updateDuration(),this._resizeObserver=new ResizeObserver(()=>{this.setSliderPosition()}),this._resizeObserver.observe(this._container)}disconnectedCallback(){var r;(r=this._resizeObserver)==null||r.disconnect()}resolveInitialSegment(r,i){const n=this._numberOfSegments*this.segmentSize,o=i-r,a=this.maxValue-this.minValue,u=r-this.minValue,s=Math.ceil(a/this.segmentSize);let c=Math.floor(u/a*s);c+=Math.floor((n-o)/this.segmentSize);const d=c+Math.ceil(o/this.segmentSize)-this._numberOfSegments;this.firstLabelIndex=d,this._initialFirstLabelIndex=d}createButtonSvg(r){const i=document.createElement("button");return i.innerHTML=r,i}calculateLabels(){const r=this.minValue,i=this.maxValue,n=Math.floor((this.maxValue-this.minValue)/this.segmentSize)-1,o=[r];let a=this.minValue;for(let u=0;u<n;u++)a+=this.segmentSize,o.push(a);return o.push(i),o}buildSegments(r){const i=document.createElement("div");r.slice(0,-2).forEach(c=>{const l=document.createElement("div");l.classList.add(H.segment);const d=document.createElement("div");d.classList.add(H.segmentMarker);const f=document.createElement("div");f.classList.add(H.segmentTick);const m=document.createElement("div");m.classList.add(H.segmentLabel),m.innerHTML=this.segmentLabelFormatter(c),l.append(d,f,m),i.append(l)});const n=document.createElement("div");n.classList.add(H.segment);const o=document.createElement("div");o.classList.add(H.segmentMarker);const a=document.createElement("div");a.classList.add(H.segmentTick);const u=document.createElement("div");u.classList.add(H.segmentLabel,H.firstSegmentLabel),u.innerHTML=this.segmentLabelFormatter(r.at(-2));const s=document.createElement("div");return s.classList.add(H.segmentLabel,H.secondSegmentLabel),s.innerHTML=this.segmentLabelFormatter(r.at(-1)),n.append(o,a,u,s),i.append(n),i}}customElements.get("omakase-time-range-selector")||customElements.define("omakase-time-range-selector",mi);const $u="omakase-time-range-selector-react-div",n_=({timeRange:e,maxTimeRange:t,numberOfSegments:r,segmentSize:i,maxSliderRange:n,onCheckmarkClickCallback:o,segmentLabelFormatter:a,durationLabelFormatter:u})=>(customElements.get("omakase-time-range-selector")||customElements.define("omakase-time-range-selector",mi),$.useEffect(()=>{var p;const s=P.parseTimeRange(t),c=P.timeMomentToSeconds(s.start),l=P.timeMomentToSeconds(s.end),d=P.parseTimeRange(e),f=P.timeMomentToSeconds(d.start),m=P.timeMomentToSeconds(d.end),h=new mi;h.setAttribute("minValue",c.toString()),h.setAttribute("maxValue",l.toString()),h.setAttribute("maxRange",n.toString()),h.setAttribute("segmentSize",i.toString()),h.setAttribute("numberOfSegments",r.toString()),h.setAttribute("sliderStart",f.toString()),h.setAttribute("sliderEnd",m.toString()),h.onCheckmarkClickCallback=o,a&&(h.segmentLabelFormatter=a),u&&(h.durationLabelFormatter=u),(p=document.getElementById($u))==null||p.append(h)},[]),$.createElement("div",{id:$u})),r_=$.memo(({omakasePlayer:e,config:t,onCreateMarkerListCallback:r})=>($.useEffect(()=>{const i=e.createMarkerList(t).subscribe({next:n=>{r==null||r(n)}});return()=>{i.unsubscribe()}},[t.source]),$.createElement("div",{id:t.markerListHTMLElementId})));exports.AudioFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformataudio:"urn:x-nmos:format:audio"}})(exports.AudioFlow||(exports.AudioFlow={}));const i_={Video:"urn:x-nmos:format:video",Audio:"urn:x-nmos:format:audio",Data:"urn:x-nmos:format:data",Multi:"urn:x-nmos:format:multi"};exports.DataFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatdata:"urn:x-nmos:format:data"}})(exports.DataFlow||(exports.DataFlow={}));exports.DeletionRequest=void 0;(e=>{e.StatusEnum={Created:"created",Started:"started",Done:"done",Error:"error"}})(exports.DeletionRequest||(exports.DeletionRequest={}));exports.MediaBucketObjectStorePreInner=void 0;(e=>{e.ActionEnum={CreateBucket:"create_bucket"}})(exports.MediaBucketObjectStorePreInner||(exports.MediaBucketObjectStorePreInner={}));exports.MultiEssenceFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatmulti:"urn:x-nmos:format:multi"}})(exports.MultiEssenceFlow||(exports.MultiEssenceFlow={}));exports.ServiceMediaStore=void 0;(e=>{e.TypeEnum={HttpObjectStore:"http_object_store"}})(exports.ServiceMediaStore||(exports.ServiceMediaStore={}));exports.Source=void 0;(e=>{e.FormatEnum={Video:"urn:x-nmos:format:video",Audio:"urn:x-nmos:format:audio",Data:"urn:x-nmos:format:data",Multi:"urn:x-nmos:format:multi"}})(exports.Source||(exports.Source={}));exports.UncompressedAudioParameters=void 0;(e=>{e.UncTypeEnum={Interleaved:"interleaved",Planar:"planar",Pairs:"pairs"}})(exports.UncompressedAudioParameters||(exports.UncompressedAudioParameters={}));exports.UncompressedVideoParameters=void 0;(e=>{e.UncTypeEnum={Planar:"planar",Yuyv:"YUYV",Uyvy:"UYVY",Ayuv:"AYUV",V210:"v210",V216:"v216",Rgb:"RGB",Rgbx:"RGBx",XRgb:"xRGB",Bgrx:"BGRx",XBgr:"xBGR",Rgba:"RGBA",Argb:"ARGB",Bgra:"BGRA",Abgr:"ABGR",Alpha:"alpha"}})(exports.UncompressedVideoParameters||(exports.UncompressedVideoParameters={}));exports.VideoFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatvideo:"urn:x-nmos:format:video"}})(exports.VideoFlow||(exports.VideoFlow={}));exports.VideoFlowEssenceParameters=void 0;(e=>{e.InterlaceModeEnum={Progressive:"progressive",InterlacedTff:"interlaced_tff",InterlacedBff:"interlaced_bff",InterlacedPsf:"interlaced_psf"},e.ColorspaceEnum={Bt601:"BT601",Bt709:"BT709",Bt2020:"BT2020",Bt2100:"BT2100"},e.TransferCharacteristicEnum={Sdr:"SDR",Hlg:"HLG",Pq:"PQ"},e.ComponentTypeEnum={YcbCr:"YCbCr",Rgb:"RGB"}})(exports.VideoFlowEssenceParameters||(exports.VideoFlowEssenceParameters={}));exports.ImageFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatdata:"urn:x-tam:format:image"}})(exports.ImageFlow||(exports.ImageFlow={}));exports.Contentformat=i_;exports.OmakaseMarkerListComponent=r_;exports.OmakasePlayerComponent=P0;exports.OmakasePlayerTimelineBuilder=L1;exports.OmakasePlayerTimelineComponent=j0;exports.OmakasePlayerTimelineControlsToolbar=W0;exports.OmakaseTamsPlayer=Jm;exports.OmakaseTamsPlayerComponent=H0;exports.OmakaseTimeRangeSelectorComponent=n_;exports.TimeRangeUtil=P;exports.TimecodeUtil=ze;exports.VideoApiProxy=Gu;exports.convertFlowIdToSubtitlesId=mh;exports.gatherAndExportToManifest=Zu;exports.removeGapsInSegments=Au;exports.removeGapsInSegmentsByExtending=Lu;exports.resolveAudioManifestName=Nu;exports.resolveTextManifestName=ju;exports.validateTamsPayload=Cu;
|
|
298
320
|
//# sourceMappingURL=index.cjs.js.map
|