@byomakase/omakase-react-components 1.4.0 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,10 +1,10 @@
1
- (function(T,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("@byomakase/omakase-player"),require("react")):typeof define=="function"&&define.amd?define(["exports","@byomakase/omakase-player","react"],F):(T=typeof globalThis<"u"?globalThis:T||self,F(T["@byomakase/omakase-react-components"]={},T.OmakasePlayer,T.React))})(this,(function(T,F,y){"use strict";var V0=Object.defineProperty;var B0=(T,F,y)=>F in T?V0(T,F,{enumerable:!0,configurable:!0,writable:!0,value:y}):T[F]=y;var k=(T,F,y)=>B0(T,typeof F!="symbol"?F+"":F,y);/*!
1
+ (function(T,M){typeof exports=="object"&&typeof module<"u"?M(exports,require("@byomakase/omakase-player"),require("react")):typeof define=="function"&&define.amd?define(["exports","@byomakase/omakase-player","react"],M):(T=typeof globalThis<"u"?globalThis:T||self,M(T["@byomakase/omakase-react-components"]={},T.OmakasePlayer,T.React))})(this,(function(T,M,y){"use strict";var R0=Object.defineProperty;var V0=(T,M,y)=>M in T?R0(T,M,{enumerable:!0,configurable:!0,writable:!0,value:y}):T[M]=y;var k=(T,M,y)=>V0(T,typeof M!="symbol"?M+"":M,y);/*!
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,Ze=1e9,Cr="0123456789abcdef",un="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",cn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Zr={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-at,maxE:at,crypto:!1},_a,Pe,P=!0,sn="[DecimalError] ",Me=sn+"Invalid argument: ",ya=sn+"Precision limit exceeded",$a=sn+"crypto unavailable",wa="[object Decimal]",ue=Math.floor,ee=Math.pow,vp=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,bp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,_p=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Sa=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,xe=1e7,U=7,yp=9007199254740991,$p=un.length-1,Mr=cn.length-1,_={toStringTag:wa};_.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(Me+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=wp(i,Ea(i,r)),i.precision=e,i.rounding=t,O(Pe==2||Pe==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(P=!1,o=l.s*ee(l.s*l,1/3),!o||Math.abs(o)==1/0?(r=re(l.d),e=l.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=ee(r,1/3),e=ue((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),re(u.d).slice(0,a)===(r=re(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 P=!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-ue(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 G(this,new this.constructor(e))},_.dividedToIntegerBy=_.divToInt=function(e){var t=this,r=t.constructor;return O(G(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/pn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=ut(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=ut(o,2,n,n,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,n=n.times(1/pn(5,e)),n=ut(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,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()?Ue(t,i,n):new t(0):new t(NaN):e.isZero()?Ue(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,P=!1,r=r.times(r).minus(1).sqrt().plus(r),P=!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,P=!1,r=r.times(r).plus(1).sqrt().plus(r),P=!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=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=Ue(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<=Mr)return a=Ue(l,d+4,f).times(.25),a.s=c.s,a}else{if(!c.s)return new l(NaN);if(d+4<=Mr)return a=Ue(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(P=!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)),P=!0,O(a,l.precision=d,l.rounding=f,!0)},_.isFinite=function(){return!!this.d},_.isInteger=_.isInt=function(){return!!this.d&&ue(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(P=!1,u=d+m,a=Re(c,u),i=t?fn(l,u+10):Re(e,u),s=G(a,i,u,1),It(s.d,n=d,f))do if(u+=10,a=Re(c,u),i=t?fn(l,u+10):Re(e,u),s=G(a,i,u,1),!o){+re(s.d).slice(n+1,n+15)+1==1e14&&(s=O(s,d+1,0));break}while(It(s.d,n+=10,f));return P=!0,O(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 P?O(e,u,s):e}if(r=ue(e.e/U),l=ue(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=dn(c,r),P?O(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]?O(new i(r),i.precision,i.rounding):(P=!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),P=!0,r.minus(t))},_.naturalExponential=_.exp=function(){return Fr(this)},_.naturalLogarithm=_.ln=function(){return Re(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)),P?O(e,u,s):e;if(o=ue(d.e/U),i=ue(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=dn(c,i),P?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(Me+e);return r.d?(t=ka(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=kp(i,Ea(i,r)),i.precision=e,i.rounding=t,O(Pe>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(P=!1,c=Math.sqrt(+a),c==0||c==1/0?(t=re(u),(t.length+s)%2==0&&(t+="0"),c=Math.sqrt(t),s=ue((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),re(o.d).slice(0,r)===(t=re(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 P=!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=G(r,new i(1).minus(r.times(r)).sqrt(),e+10,0),i.precision=e,i.rounding=t,O(Pe==2||Pe==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=ue(l.e/U)+ue(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=dn(o,r),P?O(e,d.precision,d.rounding):e},_.toBinary=function(e,t){return Rr(this,2,e,t)},_.toDecimalPlaces=_.toDP=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(pe(e,0,Ze),t===void 0?t=i.rounding:pe(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=Oe(i,!0):(pe(e,0,Ze),t===void 0?t=n.rounding:pe(t,0,8),i=O(new n(i),e+1,t),r=Oe(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=Oe(n):(pe(e,0,Ze),t===void 0?t=o.rounding:pe(t,0,8),i=O(new o(n),e+n.e+1,t),r=Oe(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,p=m.constructor;if(!g)return new p(m);if(c=r=new p(1),i=s=new p(0),t=new p(i),o=t.e=ka(g)-m.e-1,a=o%U,t.d[0]=ee(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(Me+u);e=u.gt(t)?o>0?t:c:u}for(P=!1,u=new p(re(g)),l=p.precision,p.precision=o=g.length*U*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],p.precision=l,P=!0,f},_.toHexadecimal=_.toHex=function(e,t){return Rr(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:pe(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]?(P=!1,r=G(r,e,0,t,1).times(e),P=!0,O(r)):(e.s=r.s,r=e),r},_.toNumber=function(){return+this},_.toOctal=function(e,t){return Rr(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(ee(+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=ue(e.e/U),t>=e.d.length-1&&(r=c<0?-c:c)<=yp)return n=Ia(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=ee(+u,c),t=r==0||!isFinite(r)?ue(c*(Math.log("0."+re(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):(P=!1,s.rounding=u.s=1,r=Math.min(12,(t+"").length),n=Fr(e.times(Re(u,i+r)),i),n.d&&(n=O(n,i+5,1),It(n.d,i,o)&&(t=i+10,n=O(Fr(e.times(Re(u,t+r)),t),t+5,1),+re(n.d).slice(i+1,i+15)+1==1e14&&(n=O(n,i+1,0)))),n.s=a,P=!0,s.rounding=o,O(n,i,o))},_.toPrecision=function(e,t){var r,i=this,n=i.constructor;return e===void 0?r=Oe(i,i.e<=n.toExpNeg||i.e>=n.toExpPos):(pe(e,1,Ze),t===void 0?t=n.rounding:pe(t,0,8),i=O(new n(i),e,t),r=Oe(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):(pe(e,1,Ze),t===void 0?t=i.rounding:pe(t,0,8)),O(new i(r),e,t)},_.toString=function(){var e=this,t=e.constructor,r=Oe(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=Oe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function re(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+=Fe(r)),o+=i;a=e[t],i=a+"",r=U-i.length,r&&(o+=Fe(r))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}function pe(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Me+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+=U,n=0):(n=Math.ceil((t+1)/U),t%=U),o=ee(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)==ee(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)==ee(10,t-3)-1,a}function ln(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]+=Cr.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 wp(e,t){var r,i,n;if(t.isZero())return t;i=t.d.length,i<32?(r=Math.ceil(i/3),n=(1/pn(4,r)).toString()):(r=16,n="2.3283064365386962890625e-10"),e.precision+=r,t=ut(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,p,v,w,E,z,C,Z,V,fe,Q,ae,Ie,le,Ce,it=i.constructor,ot=i.s==n.s?1:-1,ne=i.d,B=n.d;if(!ne||!ne[0]||!B||!B[0])return new it(!i.s||!n.s||(ne?B&&ne[0]==B[0]:!B)?NaN:ne&&ne[0]==0||!B?ot*0:ot/0);for(s?(m=1,l=i.e-n.e):(s=xe,m=U,l=ue(i.e/m)-ue(n.e/m)),le=B.length,ae=ne.length,w=new it(ot),E=w.d=[],d=0;B[d]==(ne[d]||0);d++);if(B[d]>(ne[d]||0)&&l--,o==null?(V=o=it.precision,a=it.rounding):u?V=o+(i.e-n.e)+1:V=o,V<0)E.push(1),g=!0;else{if(V=V/m+2|0,d=0,le==1){for(f=0,B=B[0],V++;(d<ae||f)&&V--;d++)fe=f*s+(ne[d]||0),E[d]=fe/B|0,f=fe%B|0;g=f||d<ae}else{for(f=s/(B[0]+1)|0,f>1&&(B=e(B,f,s),ne=e(ne,f,s),le=B.length,ae=ne.length),Q=le,z=ne.slice(0,le),C=z.length;C<le;)z[C++]=0;Ce=B.slice(),Ce.unshift(0),Ie=B[0],B[1]>=s/2&&++Ie;do f=0,c=t(B,z,le,C),c<0?(Z=z[0],le!=C&&(Z=Z*s+(z[1]||0)),f=Z/Ie|0,f>1?(f>=s&&(f=s-1),p=e(B,f,s),v=p.length,C=z.length,c=t(p,z,v,C),c==1&&(f--,r(p,le<v?Ce:B,v,s))):(f==0&&(c=f=1),p=B.slice()),v=p.length,v<C&&p.unshift(0),r(z,p,C,s),c==-1&&(C=z.length,c=t(B,z,le,C),c<1&&(f++,r(z,le<C?Ce:B,C,s))),C=z.length):c===0&&(f++,z=[0]),E[d++]=f,c&&z[0]?z[C++]=ne[Q]||0:(z=[ne[Q]],C=1);while((Q++<ae||z[0]!==void 0)&&V--);g=z[0]!==void 0}E[0]||E.shift()}if(m==1)w.e=l,_a=g;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,g)}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/ee(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/ee(10,n-a-1)%10|0}if(i=i||t<0||d[f+1]!==void 0||(a<0?l:l%ee(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/ee(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]=ee(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=ee(10,U-o),d[f]=a>0?(l/ee(10,n-a)%ee(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 P&&(e.e>m.maxE?(e.d=null,e.e=NaN):e.e<m.minE&&(e.e=0,e.d=[0])),e}function Oe(e,t,r){if(!e.isFinite())return za(e);var i,n=e.e,o=re(e.d),a=o.length;return t?(r&&(i=r-a)>0?o=o.charAt(0)+"."+o.slice(1)+Fe(i):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):n<0?(o="0."+Fe(-n-1)+o,r&&(i=r-a)>0&&(o+=Fe(i))):n>=a?(o+=Fe(n+1-a),r&&(i=r-n-1)>0&&(o=o+"."+Fe(i))):((i=n+1)<a&&(o=o.slice(0,i)+"."+o.slice(i)),r&&(i=r-a)>0&&(n+1===a&&(o+="."),o+=Fe(i))),o}function dn(e,t){var r=e[0];for(t*=U;r>=10;r/=10)t++;return t}function fn(e,t,r){if(t>$p)throw P=!0,r&&(e.precision=r),Error(ya);return O(new e(un),t,1,!0)}function Ue(e,t,r){if(t>Mr)throw Error(ya);return O(new e(cn),t,r,!0)}function ka(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 Fe(e){for(var t="";e--;)t+="0";return t}function Ia(e,t,r,i){var n,o=new e(1),a=Math.ceil(i/U+4);for(P=!1;;){if(r%2&&(o=o.times(t),Oa(o.d,a)&&(n=!0)),r=ue(r/2),r===0){r=o.d.length-1,n&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Oa(t.d,a)}return P=!0,o}function xa(e){return e.d[e.d.length-1]&1}function Ta(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 Fr(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?(P=!1,s=g):s=t,u=new f(.03125);e.e>-2;)e=e.times(u),d+=5;for(i=Math.log(ee(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(G(o,r,s,1)),re(u.d).slice(0,s)===re(a.d).slice(0,s)){for(n=d;n--;)a=O(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 O(a,f.precision=g,m,P=!0);else return f.precision=g,a}a=u}}function Re(e,t){var r,i,n,o,a,u,s,c,l,d,f,m=1,g=10,p=e,v=p.d,w=p.constructor,E=w.rounding,z=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?(P=!1,l=z):l=t,w.precision=l+=g,r=re(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=re(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=fn(w,l+2,z).times(o+""),p=Re(new w(i+"."+r.slice(1)),l-g).plus(c),w.precision=z,t==null?O(p,z,E,P=!0):p;for(d=p,s=a=p=G(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(G(a,new w(n),l,1)),re(c.d).slice(0,l)===re(s.d).slice(0,l))if(s=s.times(2),o!==0&&(s=s.plus(fn(w,l+2,z).times(o+""))),s=G(s,new w(m),l,1),t==null)if(It(s.d,l-g,E,u))w.precision=l+=g,c=a=p=G(d.minus(1),d.plus(1),l,1),f=O(p.times(p),l,1),n=u=1;else return O(s,w.precision=z,E,P=!0);else return w.precision=z,s;s=c,n+=2}}function za(e){return String(e.s*e.s/0)}function mn(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),P&&(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 Sp(e,t){var r,i,n,o,a,u,s,c,l;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Sa.test(t))return mn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(bp.test(t))r=16,t=t.toLowerCase();else if(vp.test(t))r=2;else if(_p.test(t))r=8;else throw Error(Me+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=Ia(i,new i(r),o,o*2)),c=ln(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=dn(c,l),e.d=c,P=!1,a&&(e=G(e,n,u*4)),s&&(e=e.times(Math.abs(s)<54?ee(2,s):xt.pow(2,s))),P=!0,e)}function kp(e,t){var r,i=t.d.length;if(i<3)return t.isZero()?t:ut(e,2,t,t);r=1.4*Math.sqrt(i),r=r>16?16:r|0,t=t.times(1/pn(5,r)),t=ut(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 ut(e,t,r,i,n){var o,a,u,s,c=e.precision,l=Math.ceil(c/U);for(P=!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 P=!0,a.d.length=l+1,a}function pn(e,t){for(var r=e;--t;)r*=e;return r}function Ea(e,t){var r,i=t.s<0,n=Ue(e,e.precision,1),o=n.times(.5);if(t=t.abs(),t.lte(o))return Pe=i?4:1,t;if(r=t.divToInt(n),r.isZero())Pe=i?3:2;else{if(t=t.minus(r.times(n)),t.lte(o))return Pe=xa(r)?i?2:3:i?4:1,t;Pe=xa(r)?i?1:4:i?3:2}return t.minus(n).abs()}function Rr(e,t,r,i){var n,o,a,u,s,c,l,d,f,m=e.constructor,g=r!==void 0;if(g?(pe(r,1,Ze),i===void 0?i=m.rounding:pe(i,0,8)):(r=m.precision,i=m.rounding),!e.isFinite())l=za(e);else{for(l=Oe(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=ln(Oe(f),10,n),f.e=f.d.length),d=ln(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=_a),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+=Cr.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=ln(l,n,t),s=d.length;!d[s-1];--s);for(a=1,l="1.";a<s;a++)l+=Cr.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 Oa(e,t){if(e.length>t)return e.length=t,!0}function Ip(e){return new this(e).abs()}function xp(e){return new this(e).acos()}function Tp(e){return new this(e).acosh()}function zp(e,t){return new this(e).plus(t)}function Ep(e){return new this(e).asin()}function Op(e){return new this(e).asinh()}function Up(e){return new this(e).atan()}function Dp(e){return new this(e).atanh()}function Np(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=Ue(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?Ue(this,i,n):new this(0),r.s=e.s):!e.d||t.isZero()?(r=Ue(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=Ue(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 jp(e){return new this(e).cbrt()}function Pp(e){return O(e=new this(e),e.e+1,2)}function Ap(e,t,r){return new this(e).clamp(t,r)}function Lp(e){if(!e||typeof e!="object")throw Error(sn+"Object expected");var t,r,i,n=e.defaults===!0,o=["precision",1,Ze,"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]=Zr[r]),(i=e[r])!==void 0)if(ue(i)===i&&i>=o[t+1]&&i<=o[t+2])this[r]=i;else throw Error(Me+r+": "+i);if(r="crypto",n&&(this[r]=Zr[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($a);else this[r]=!1;else throw Error(Me+r+": "+i);return this}function Cp(e){return new this(e).cos()}function Zp(e){return new this(e).cosh()}function Ua(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,Da(o)){c.s=o.s,P?!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++;P?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 mn(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),Sa.test(o)?mn(c,o):Sp(c,o);if(s==="bigint")return o<0?(o=-o,c.s=-1):c.s=1,mn(c,o.toString());throw Error(Me+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=Lp,n.clone=Ua,n.isDecimal=Da,n.abs=Ip,n.acos=xp,n.acosh=Tp,n.add=zp,n.asin=Ep,n.asinh=Op,n.atan=Up,n.atanh=Dp,n.atan2=Np,n.cbrt=jp,n.ceil=Pp,n.clamp=Ap,n.cos=Cp,n.cosh=Zp,n.div=Mp,n.exp=Fp,n.floor=Rp,n.hypot=Vp,n.ln=Bp,n.log=Kp,n.log10=Gp,n.log2=Jp,n.max=Wp,n.min=Hp,n.mod=qp,n.mul=Xp,n.pow=Yp,n.random=Qp,n.round=eh,n.sign=th,n.sin=nh,n.sinh=rh,n.sqrt=ih,n.sub=oh,n.sum=ah,n.tan=uh,n.tanh=ch,n.trunc=sh,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 Mp(e,t){return new this(e).div(t)}function Fp(e){return new this(e).exp()}function Rp(e){return O(e=new this(e),e.e+1,3)}function Vp(){var e,t,r=new this(0);for(P=!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 P=!0,new this(1/0);r=t}return P=!0,r.sqrt()}function Da(e){return e instanceof xt||e&&e.toStringTag===wa||!1}function Bp(e){return new this(e).ln()}function Kp(e,t){return new this(e).log(t)}function Jp(e){return new this(e).log(2)}function Gp(e){return new this(e).log(10)}function Wp(){return Ta(this,arguments,-1)}function Hp(){return Ta(this,arguments,1)}function qp(e,t){return new this(e).mod(t)}function Xp(e,t){return new this(e).mul(t)}function Yp(e,t){return new this(e).pow(t)}function Qp(e){var t,r,i,n,o=0,a=new this(1),u=[];if(e===void 0?e=this.precision:pe(e,1,Ze),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($a);else for(;o<i;)u[o++]=Math.random()*1e7|0;for(i=u[--o],e%=U,i&&e&&(n=ee(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 eh(e){return O(e=new this(e),e.e+1,this.rounding)}function th(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function nh(e){return new this(e).sin()}function rh(e){return new this(e).sinh()}function ih(e){return new this(e).sqrt()}function oh(e,t){return new this(e).sub(t)}function ah(){var e=0,t=arguments,r=new this(t[e]);for(P=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return P=!0,O(r,this.precision,this.rounding)}function uh(e){return new this(e).tan()}function ch(e){return new this(e).tanh()}function sh(e){return O(e=new this(e),e.e+1,1)}_[Symbol.for("nodejs.util.inspect.custom")]=_.toString,_[Symbol.toStringTag]="Decimal";var xt=_.constructor=Ua(Zr);un=new xt(un),cn=new xt(cn);class De{static formatToTimecode(t,r,i=!1,n=!1){let o=new xt(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),p=u.mul(60);return d=m.divToInt(g),m=m.minus(d.mul(g)),l=m.divToInt(p),m=m.minus(l.mul(p)),c=m.divToInt(u),s=m.minus(c.mul(u)),De.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`${De.padZero(t)}:${De.padZero(r)}:${De.padZero(i)}${u}${De.padZero(n)}`}static padZero(t){return t<10?`0${t}`:`${t}`}}class lh{static resolveFrameRateValueFromFraction(t){return 30}}const Ee=class Ee{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 Ee.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=lh.resolveFrameRateValueFromFraction(r);return De.formatToTimecode(Ee.timeMomentToSeconds(t),n,i)}static formatTimerangeToTimecodeText(t,r,i=!1){let n=Ee.parseTimeRange(t),o=n.start?Ee.formatTimeMomentToTimecodeText(n.start,r,i):"?",a=n.end?Ee.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=Ee.parseTimeRange(t);if(r.start===void 0||r.end===void 0)return 1/0;{let i=Ee.timeMomentToSeconds(r.start);return Ee.timeMomentToSeconds(r.end)-i}}static padZero(t){return t<10?`0${t}`:`${t}`}};Ee.timeRangePattern=/^(\[|\()?(-?\d+:\d+)?(_(-?\d+:\d+)?)?(\]|\))?$/;let j=Ee;function dh(e){return`subtitles-${e}`}function fh(e,t,r){const i=e.filter(f=>t.get(f.id).length>0).map(f=>{const m=t.get(f.id);let g,p=!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&&(p=!0))}return{start:j.timeMomentToSeconds(j.parseTimeRange(m.at(0).timerange).start),frameRate:g,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:De.formatToTimecode(d,100,!1,!0),mediaStartTime:o,frameRate:100,dropFrame:!1}:{ffom:De.formatToTimecode(d,n.frameRate,n.dropFrame),mediaStartTime:n.start,frameRate:n.frameRate,dropFrame:n.dropFrame}}function Na(e){return Pa(e)}function ja(e){return Pa(e)}function Pa(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 mh{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 Vr{constructor(t,r,i,n,o){this.bandwidth=t,this.averageBandwidth=r,this.resolution=i,this.frameRate=n,this.uri=o}}class ph{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 Aa{constructor(t,r){this.duration=t,this.uri=r}}class La{constructor(){this.playlist=new mh}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 Ca{static write(t){let r=`#EXTM3U
7
+ */var ot=9e15,Le=1e9,Cr="0123456789abcdef",cn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",sn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Zr={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ot,maxE:ot,crypto:!1},_a,je,P=!0,ln="[DecimalError] ",Ce=ln+"Invalid argument: ",ya=ln+"Precision limit exceeded",$a=ln+"crypto unavailable",wa="[object Decimal]",ce=Math.floor,ne=Math.pow,hp=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,gp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,vp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Sa=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ke=1e7,D=7,bp=9007199254740991,_p=cn.length-1,Mr=sn.length-1,_={toStringTag:wa};_.absoluteValue=_.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),U(e)},_.ceil=function(){return U(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(Ce+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())+D,i.rounding=1,r=yp(i,Ea(i,r)),i.precision=e,i.rounding=t,U(je==2||je==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(P=!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=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&&(U(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")&&(U(i,e+1,1),t=!i.times(i).times(i).eq(l));break}return P=!0,U(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/D))*D,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 U(J(t,new r(e),0,1,1),r.precision,r.rounding)},_.equals=_.eq=function(e){return this.cmp(e)===0},_.floor=function(){return U(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/hn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=at(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 U(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=at(o,2,n,n,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,n=n.times(1/hn(5,e)),n=at(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,U(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,P=!1,r=r.times(r).minus(1).sqrt().plus(r),P=!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,P=!1,r=r.times(r).plus(1).sqrt().plus(r),P=!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?U(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<=Mr)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<=Mr)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/D+2|0),e=r;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(P=!1,t=Math.ceil(u/D),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)),P=!0,U(a,l.precision=d,l.rounding=f,!0)},_.isFinite=function(){return!!this.d},_.isInteger=_.isInt=function(){return!!this.d&&ce(this.e/D)>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(P=!1,u=d+m,a=Me(c,u),i=t?mn(l,u+10):Me(e,u),s=J(a,i,u,1),It(s.d,n=d,f))do if(u+=10,a=Me(c,u),i=t?mn(l,u+10):Me(e,u),s=J(a,i,u,1),!o){+oe(s.d).slice(n+1,n+15)+1==1e14&&(s=U(s,d+1,0));break}while(It(s.d,n+=10,f));return P=!0,U(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 P?U(e,u,s):e}if(r=ce(e.e/D),l=ce(m.e/D),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/D),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]=ke-1;--c[n],c[i]+=ke}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=fn(c,r),P?U(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]?U(new i(r),i.precision,i.rounding):(P=!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),P=!0,r.minus(t))},_.naturalExponential=_.exp=function(){return Fr(this)},_.naturalLogarithm=_.ln=function(){return Me(this)},_.negated=_.neg=function(){var e=new this.constructor(this);return e.s=-e.s,U(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)),P?U(e,u,s):e;if(o=ce(d.e/D),i=ce(e.e/D),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/D),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)/ke|0,c[n]%=ke;for(t&&(c.unshift(t),++i),a=c.length;c[--a]==0;)c.pop();return e.d=c,e.e=fn(c,i),P?U(e,u,s):e},_.precision=_.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ce+e);return r.d?(t=ka(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t},_.round=function(){var e=this,t=e.constructor;return U(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())+D,i.rounding=1,r=wp(i,Ea(i,r)),i.precision=e,i.rounding=t,U(je>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(P=!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(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&&(U(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")&&(U(i,s+1,1),e=!i.times(i).eq(a));break}return P=!0,U(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,U(je==2||je==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/D)+ce(e.e/D),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%ke|0,t=u/ke|0;o[n]=(o[n]+t)%ke|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=fn(o,r),P?U(e,d.precision,d.rounding):e},_.toBinary=function(e,t){return Rr(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,Le),t===void 0?t=i.rounding:me(t,0,8),U(r,e+r.e+1,t))},_.toExponential=function(e,t){var r,i=this,n=i.constructor;return e===void 0?r=ze(i,!0):(me(e,0,Le),t===void 0?t=n.rounding:me(t,0,8),i=U(new n(i),e+1,t),r=ze(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=ze(n):(me(e,0,Le),t===void 0?t=o.rounding:me(t,0,8),i=U(new o(n),e+n.e+1,t),r=ze(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=ka(h)-m.e-1,a=o%D,t.d[0]=ne(10,a<0?D+a:a),e==null)e=o>0?t:c;else{if(u=new p(e),!u.isInt()||u.lt(c))throw Error(Ce+u);e=u.gt(t)?o>0?t:c:u}for(P=!1,u=new p(oe(h)),l=p.precision,p.precision=o=h.length*D*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,P=!0,f},_.toHexadecimal=_.toHex=function(e,t){return Rr(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]?(P=!1,r=J(r,e,0,t,1).times(e),P=!0,U(r)):(e.s=r.s,r=e),r},_.toNumber=function(){return+this},_.toOctal=function(e,t){return Rr(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 U(u,i,o);if(t=ce(e.e/D),t>=e.d.length-1&&(r=c<0?-c:c)<=bp)return n=Ia(s,u,r,i),e.s<0?new s(1).div(n):U(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):(P=!1,s.rounding=u.s=1,r=Math.min(12,(t+"").length),n=Fr(e.times(Me(u,i+r)),i),n.d&&(n=U(n,i+5,1),It(n.d,i,o)&&(t=i+10,n=U(Fr(e.times(Me(u,t+r)),t),t+5,1),+oe(n.d).slice(i+1,i+15)+1==1e14&&(n=U(n,i+1,0)))),n.s=a,P=!0,s.rounding=o,U(n,i,o))},_.toPrecision=function(e,t){var r,i=this,n=i.constructor;return e===void 0?r=ze(i,i.e<=n.toExpNeg||i.e>=n.toExpPos):(me(e,1,Le),t===void 0?t=n.rounding:me(t,0,8),i=U(new n(i),e,t),r=ze(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,Le),t===void 0?t=i.rounding:me(t,0,8)),U(new i(r),e,t)},_.toString=function(){var e=this,t=e.constructor,r=ze(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r},_.truncated=_.trunc=function(){return U(new this.constructor(this),this.e+1,1)},_.valueOf=_.toJSON=function(){var e=this,t=e.constructor,r=ze(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=D-i.length,r&&(o+=Ze(r)),o+=i;a=e[t],i=a+"",r=D-i.length,r&&(o+=Ze(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(Ce+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+=D,n=0):(n=Math.ceil((t+1)/D),t%=D),o=ne(10,D-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 dn(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]+=Cr.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 yp(e,t){var r,i,n;if(t.isZero())return t;i=t.d.length,i<32?(r=Math.ceil(i/3),n=(1/hn(4,r)).toString()):(r=16,n="2.3283064365386962890625e-10"),e.precision+=r,t=at(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,O,z,E,R,V,ee,ie,Q,Ne,de,it,qe=i.constructor,kt=i.s==n.s?1:-1,te=i.d,B=n.d;if(!te||!te[0]||!B||!B[0])return new qe(!i.s||!n.s||(te?B&&te[0]==B[0]:!B)?NaN:te&&te[0]==0||!B?kt*0:kt/0);for(s?(m=1,l=i.e-n.e):(s=ke,m=D,l=ce(i.e/m)-ce(n.e/m)),de=B.length,Q=te.length,w=new qe(kt),O=w.d=[],d=0;B[d]==(te[d]||0);d++);if(B[d]>(te[d]||0)&&l--,o==null?(V=o=qe.precision,a=qe.rounding):u?V=o+(i.e-n.e)+1:V=o,V<0)O.push(1),h=!0;else{if(V=V/m+2|0,d=0,de==1){for(f=0,B=B[0],V++;(d<Q||f)&&V--;d++)ee=f*s+(te[d]||0),O[d]=ee/B|0,f=ee%B|0;h=f||d<Q}else{for(f=s/(B[0]+1)|0,f>1&&(B=e(B,f,s),te=e(te,f,s),de=B.length,Q=te.length),ie=de,z=te.slice(0,de),E=z.length;E<de;)z[E++]=0;it=B.slice(),it.unshift(0),Ne=B[0],B[1]>=s/2&&++Ne;do f=0,c=t(B,z,de,E),c<0?(R=z[0],de!=E&&(R=R*s+(z[1]||0)),f=R/Ne|0,f>1?(f>=s&&(f=s-1),p=e(B,f,s),v=p.length,E=z.length,c=t(p,z,v,E),c==1&&(f--,r(p,de<v?it:B,v,s))):(f==0&&(c=f=1),p=B.slice()),v=p.length,v<E&&p.unshift(0),r(z,p,E,s),c==-1&&(E=z.length,c=t(B,z,de,E),c<1&&(f++,r(z,de<E?it:B,E,s))),E=z.length):c===0&&(f++,z=[0]),O[d++]=f,c&&z[0]?z[E++]=te[ie]||0:(z=[te[ie]],E=1);while((ie++<Q||z[0]!==void 0)&&V--);h=z[0]!==void 0}O[0]||O.shift()}if(m==1)w.e=l,_a=h;else{for(d=1,f=O[0];f>=10;f/=10)d++;w.e=d+l*m-1,U(w,u?o+w.e+1:o,a,h)}return w}})();function U(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+=D,a=t,l=d[f=0],s=l/ne(10,n-a-1)%10|0;else if(f=Math.ceil((o+1)/D),u=d.length,f>=u)if(i){for(;u++<=f;)d.push(0);l=s=0,n=1,o%=D,a=o-D+1}else break e;else{for(l=u=d[f],n=1;u>=10;u/=10)n++;o%=D,a=o-D+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,(D-t%D)%D),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,D-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]==ke&&(d[0]=1));break}else{if(d[f]+=u,d[f]!=ke)break;d[f--]=0,u=1}for(o=d.length;d[--o]===0;)d.pop()}return P&&(e.e>m.maxE?(e.d=null,e.e=NaN):e.e<m.minE&&(e.e=0,e.d=[0])),e}function ze(e,t,r){if(!e.isFinite())return za(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)+Ze(i):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):n<0?(o="0."+Ze(-n-1)+o,r&&(i=r-a)>0&&(o+=Ze(i))):n>=a?(o+=Ze(n+1-a),r&&(i=r-n-1)>0&&(o=o+"."+Ze(i))):((i=n+1)<a&&(o=o.slice(0,i)+"."+o.slice(i)),r&&(i=r-a)>0&&(n+1===a&&(o+="."),o+=Ze(i))),o}function fn(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function mn(e,t,r){if(t>_p)throw P=!0,r&&(e.precision=r),Error(ya);return U(new e(cn),t,1,!0)}function Ee(e,t,r){if(t>Mr)throw Error(ya);return U(new e(sn),t,r,!0)}function ka(e){var t=e.length-1,r=t*D+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 Ze(e){for(var t="";e--;)t+="0";return t}function Ia(e,t,r,i){var n,o=new e(1),a=Math.ceil(i/D+4);for(P=!1;;){if(r%2&&(o=o.times(t),Oa(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),Oa(t.d,a)}return P=!0,o}function xa(e){return e.d[e.d.length-1]&1}function Ta(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 Fr(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?(P=!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=U(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=U(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 U(a,f.precision=h,m,P=!0);else return f.precision=h,a}a=u}}function Me(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,O=w.rounding,z=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?(P=!1,l=z):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=mn(w,l+2,z).times(o+""),p=Me(new w(i+"."+r.slice(1)),l-h).plus(c),w.precision=z,t==null?U(p,z,O,P=!0):p;for(d=p,s=a=p=J(p.minus(1),p.plus(1),l,1),f=U(p.times(p),l,1),n=3;;){if(a=U(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(mn(w,l+2,z).times(o+""))),s=J(s,new w(m),l,1),t==null)if(It(s.d,l-h,O,u))w.precision=l+=h,c=a=p=J(d.minus(1),d.plus(1),l,1),f=U(p.times(p),l,1),n=u=1;else return U(s,w.precision=z,O,P=!0);else return w.precision=z,s;s=c,n+=2}}function za(e){return String(e.s*e.s/0)}function pn(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)%D,r<0&&(i+=D),i<n){for(i&&e.d.push(+t.slice(0,i)),n-=D;i<n;)e.d.push(+t.slice(i,i+=D));t=t.slice(i),i=D-t.length}else i-=n;for(;i--;)t+="0";e.d.push(+t),P&&(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 $p(e,t){var r,i,n,o,a,u,s,c,l;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Sa.test(t))return pn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(gp.test(t))r=16,t=t.toLowerCase();else if(hp.test(t))r=2;else if(vp.test(t))r=8;else throw Error(Ce+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=Ia(i,new i(r),o,o*2)),c=dn(t,r,ke),l=c.length-1,o=l;c[o]===0;--o)c.pop();return o<0?new i(e.s*0):(e.e=fn(c,l),e.d=c,P=!1,a&&(e=J(e,n,u*4)),s&&(e=e.times(Math.abs(s)<54?ne(2,s):xt.pow(2,s))),P=!0,e)}function wp(e,t){var r,i=t.d.length;if(i<3)return t.isZero()?t:at(e,2,t,t);r=1.4*Math.sqrt(i),r=r>16?16:r|0,t=t.times(1/hn(5,r)),t=at(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 at(e,t,r,i,n){var o,a,u,s,c=e.precision,l=Math.ceil(c/D);for(P=!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 P=!0,a.d.length=l+1,a}function hn(e,t){for(var r=e;--t;)r*=e;return r}function Ea(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 je=i?4:1,t;if(r=t.divToInt(n),r.isZero())je=i?3:2;else{if(t=t.minus(r.times(n)),t.lte(o))return je=xa(r)?i?2:3:i?4:1,t;je=xa(r)?i?1:4:i?3:2}return t.minus(n).abs()}function Rr(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,Le),i===void 0?i=m.rounding:me(i,0,8)):(r=m.precision,i=m.rounding),!e.isFinite())l=za(e);else{for(l=ze(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=dn(ze(f),10,n),f.e=f.d.length),d=dn(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=_a),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+=Cr.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=dn(l,n,t),s=d.length;!d[s-1];--s);for(a=1,l="1.";a<s;a++)l+=Cr.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 Oa(e,t){if(e.length>t)return e.length=t,!0}function Sp(e){return new this(e).abs()}function kp(e){return new this(e).acos()}function Ip(e){return new this(e).acosh()}function xp(e,t){return new this(e).plus(t)}function Tp(e){return new this(e).asin()}function zp(e){return new this(e).asinh()}function Ep(e){return new this(e).atan()}function Op(e){return new this(e).atanh()}function Up(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 Dp(e){return new this(e).cbrt()}function Np(e){return U(e=new this(e),e.e+1,2)}function jp(e,t,r){return new this(e).clamp(t,r)}function Pp(e){if(!e||typeof e!="object")throw Error(ln+"Object expected");var t,r,i,n=e.defaults===!0,o=["precision",1,Le,"rounding",0,8,"toExpNeg",-ot,0,"toExpPos",0,ot,"maxE",0,ot,"minE",-ot,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(r=o[t],n&&(this[r]=Zr[r]),(i=e[r])!==void 0)if(ce(i)===i&&i>=o[t+1]&&i<=o[t+2])this[r]=i;else throw Error(Ce+r+": "+i);if(r="crypto",n&&(this[r]=Zr[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($a);else this[r]=!1;else throw Error(Ce+r+": "+i);return this}function Ap(e){return new this(e).cos()}function Lp(e){return new this(e).cosh()}function Ua(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,Da(o)){c.s=o.s,P?!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++;P?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 pn(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),Sa.test(o)?pn(c,o):$p(c,o);if(s==="bigint")return o<0?(o=-o,c.s=-1):c.s=1,pn(c,o.toString());throw Error(Ce+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=Pp,n.clone=Ua,n.isDecimal=Da,n.abs=Sp,n.acos=kp,n.acosh=Ip,n.add=xp,n.asin=Tp,n.asinh=zp,n.atan=Ep,n.atanh=Op,n.atan2=Up,n.cbrt=Dp,n.ceil=Np,n.clamp=jp,n.cos=Ap,n.cosh=Lp,n.div=Cp,n.exp=Zp,n.floor=Mp,n.hypot=Fp,n.ln=Rp,n.log=Vp,n.log10=Kp,n.log2=Bp,n.max=Jp,n.min=Gp,n.mod=qp,n.mul=Wp,n.pow=Hp,n.random=Xp,n.round=Yp,n.sign=Qp,n.sin=eh,n.sinh=th,n.sqrt=nh,n.sub=rh,n.sum=ih,n.tan=oh,n.tanh=ah,n.trunc=uh,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 Cp(e,t){return new this(e).div(t)}function Zp(e){return new this(e).exp()}function Mp(e){return U(e=new this(e),e.e+1,3)}function Fp(){var e,t,r=new this(0);for(P=!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 P=!0,new this(1/0);r=t}return P=!0,r.sqrt()}function Da(e){return e instanceof xt||e&&e.toStringTag===wa||!1}function Rp(e){return new this(e).ln()}function Vp(e,t){return new this(e).log(t)}function Bp(e){return new this(e).log(2)}function Kp(e){return new this(e).log(10)}function Jp(){return Ta(this,arguments,-1)}function Gp(){return Ta(this,arguments,1)}function qp(e,t){return new this(e).mod(t)}function Wp(e,t){return new this(e).mul(t)}function Hp(e,t){return new this(e).pow(t)}function Xp(e){var t,r,i,n,o=0,a=new this(1),u=[];if(e===void 0?e=this.precision:me(e,1,Le),i=Math.ceil(e/D),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($a);else for(;o<i;)u[o++]=Math.random()*1e7|0;for(i=u[--o],e%=D,i&&e&&(n=ne(10,D-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-=D)u.shift();for(i=1,n=u[0];n>=10;n/=10)i++;i<D&&(r-=D-i)}return a.e=r,a.d=u,a}function Yp(e){return U(e=new this(e),e.e+1,this.rounding)}function Qp(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function eh(e){return new this(e).sin()}function th(e){return new this(e).sinh()}function nh(e){return new this(e).sqrt()}function rh(e,t){return new this(e).sub(t)}function ih(){var e=0,t=arguments,r=new this(t[e]);for(P=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return P=!0,U(r,this.precision,this.rounding)}function oh(e){return new this(e).tan()}function ah(e){return new this(e).tanh()}function uh(e){return U(e=new this(e),e.e+1,1)}_[Symbol.for("nodejs.util.inspect.custom")]=_.toString,_[Symbol.toStringTag]="Decimal";var xt=_.constructor=Ua(Zr);cn=new xt(cn),sn=new xt(sn);class Oe{static formatToTimecode(t,r,i=!1,n=!1){let o=new xt(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)),Oe.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`${Oe.padZero(t)}:${Oe.padZero(r)}:${Oe.padZero(i)}${u}${Oe.padZero(n)}`}static padZero(t){return t<10?`0${t}`:`${t}`}}class ch{static resolveFrameRateValueFromFraction(t){return 30}}const Te=class Te{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 Te.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=ch.resolveFrameRateValueFromFraction(r);return Oe.formatToTimecode(Te.timeMomentToSeconds(t),n,i)}static formatTimerangeToTimecodeText(t,r,i=!1){let n=Te.parseTimeRange(t),o=n.start?Te.formatTimeMomentToTimecodeText(n.start,r,i):"?",a=n.end?Te.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=Te.parseTimeRange(t);if(r.start===void 0||r.end===void 0)return 1/0;{let i=Te.timeMomentToSeconds(r.start);return Te.timeMomentToSeconds(r.end)-i}}static padZero(t){return t<10?`0${t}`:`${t}`}};Te.timeRangePattern=/^(\[|\()?(-?\d+:\d+)?(_(-?\d+:\d+)?)?(\]|\))?$/;let A=Te;function sh(e){return`subtitles-${e}`}function lh(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:A.timeMomentToSeconds(A.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:Oe.formatToTimecode(d,100,!1,!0),mediaStartTime:o,frameRate:100,dropFrame:!1}:{ffom:Oe.formatToTimecode(d,n.frameRate,n.dropFrame),mediaStartTime:n.start,frameRate:n.frameRate,dropFrame:n.dropFrame}}function Na(e){return Pa(e)}function ja(e){return Pa(e)}function Pa(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 dh{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 Vr{constructor(t,r,i,n,o){this.bandwidth=t,this.averageBandwidth=r,this.resolution=i,this.frameRate=n,this.uri=o}}class fh{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 Aa{constructor(t,r){this.duration=t,this.uri=r}}class La{constructor(){this.playlist=new dh}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 Ca{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 hh(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 La().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:p,streamInfo:v,mediaInfo:w,id:E}=e[m];let z=p.targetDuration;z===void 0&&(z=Math.max(...g.map(ae=>ae.duration),1));const C=new La().setVersion(p.version??3).setIndependentSegments(p.independentSegments??!0).setTargetDuration(Math.ceil(z));p.programDateTime&&C.setProgramDateTime(p.programDateTime),p.playlistType&&C.setPlaylistType(p.playlistType),g.forEach(ae=>C.addSegment(ae,ae.uri==="http://byomakase.org/non-playable-gap")),C.setEndList();const Z=C.build(),V=Ca.write(Z),fe=new Blob([V],{type:"application/vnd.apple.mpegurl"}),Q=URL.createObjectURL(fe);if(v&&!w){const ae=new Vr(v.bandwidth,v.averageBandwidth,v.resolution,v.frameRate,Q);r.set(E??(r.size+1).toString(),Q),a.addStreamInfo(ae)}else if(w){const ae=new ph(w.type,w.groupId??w.type.toLowerCase(),w.name??"",w.isDefault,w.autoSelect,w.channels,Q);if(w.type==="AUDIO"?i.set(E??w.name??(i.size+1).toString(),Q):w.type!=="VIDEO"&&n.set(E??w.name??(n.size+1).toString(),Q),a.addMedia(ae),!u&&w.type==="AUDIO"&&!s){const Ie=new Vr((v==null?void 0:v.bandwidth)??0,(v==null?void 0:v.averageBandwidth)??0,null,null,Q);a.addStreamInfo(Ie),s=!0}}}const c=a.build(),l=Ca.write(c),d=new Blob([l],{type:"application/vnd.apple.mpegurl"});return{url:URL.createObjectURL(d),video:r,audio:i,text:n}}function Za(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=j.timeMomentToSeconds(j.parseTimeRange(t.timerange).end),o=j.timeMomentToSeconds(j.parseTimeRange(i.timerange).start);if(Math.abs(n-o)<.001)return[t];const a=j.toTimeRange(j.secondsToTimeMoment(n),j.secondsToTimeMoment(o),!0,!1);return[t,{timerange:j.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 Ma(e){return e&&e.map((t,r)=>{if(e.length-1===r)return t;const i=e.at(r+1),n=j.timeMomentToSeconds(j.parseTimeRange(t.timerange).start),o=j.timeMomentToSeconds(j.parseTimeRange(i.timerange).start),a=j.toTimeRange(j.secondsToTimeMoment(n),j.secondsToTimeMoment(o),!0,!1);return{...t,timerange:j.formatTimeRangeExpr(a)}})}function Fa(e){return{width:e.frame_width,height:e.frame_height}}function Ra(e){return e.frame_rate?e.frame_rate.denominator?e.frame_rate.numerator/e.frame_rate.denominator:e.frame_rate.numerator:null}function gh(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 Va(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 Ba(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,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=((g=Za(c))==null?void 0:g.map(v=>{var E,z;const w=j.timerangeExprDuration(v.timerange);return new Aa(w,((z=(E=v.get_urls)==null?void 0:E.at(-1))==null?void 0:z.url)??"http://byomakase.org/non-playable-gap")}))??[]:d=((p=Ma(c))==null?void 0:p.map(v=>{var E,z;const w=j.timerangeExprDuration(v.timerange);return new Aa(w,((z=(E=v.get_urls)==null?void 0:E.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,E=Fa(w),z=Ra(w),C=new Vr(s.max_bit_rate??s.avg_bit_rate??0,s.avg_bit_rate??0,E,z,"");i.push({segments:d,metadata:m,streamInfo:C})}else if(s.format==="urn:x-nmos:format:audio"){const w=s.essence_parameters,E={type:"AUDIO",groupId:"audio",name:Na(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:E,streamInfo:z,id:s.id})}else if(s.format==="urn:x-nmos:format:multi"){const v=l==null?void 0:l.find(Z=>Z.format==="urn:x-nmos:format:video"),w=v?Fa(v.essence_parameters):null,E=v?Ra(v.essence_parameters):null,z=gh(l??[]),C={bandwidth:z.maxBitRate,averageBandwidth:z.averageBitRate,resolution:w,frameRate:E,uri:""};i.push({segments:d,metadata:m,streamInfo:C,id:s.id})}else if(s.format==="urn:x-nmos:format:data"&&s.container==="text/vtt"){const v={type:"SUBTITLES",name:ja(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),hh(i,{independentSegments:!0})}var Br=function(e,t){return Br=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])},Br(e,t)};function ct(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Br(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function vh(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 Ka(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 st(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 Kr(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 Jr(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 lt(e){return this instanceof lt?(this.v=e,this):new lt(e)}function bh(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(g){return Promise.resolve(g).then(m,d)}}function u(m,g){i[m]&&(n[m]=function(p){return new Promise(function(v,w){o.push([m,p,v,w])>1||s(m,p)})},g&&(n[m]=g(n[m])))}function s(m,g){try{c(i[m](g))}catch(p){f(o[0][3],p)}}function c(m){m.value instanceof lt?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,g){m(g),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 st=="function"?st(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)}}typeof SuppressedError=="function"&&SuppressedError;function ie(e){return typeof e=="function"}function Gr(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 Wr=Gr(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
22
+ `),r}}function mh(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 La().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:O}=e[m];let z=p.targetDuration;z===void 0&&(z=Math.max(...h.map(Q=>Q.duration),1));const E=new La().setVersion(p.version??3).setIndependentSegments(p.independentSegments??!0).setTargetDuration(Math.ceil(z));p.programDateTime&&E.setProgramDateTime(p.programDateTime),p.playlistType&&E.setPlaylistType(p.playlistType),h.forEach(Q=>E.addSegment(Q,Q.uri==="http://byomakase.org/non-playable-gap")),E.setEndList();const R=E.build(),V=Ca.write(R),ee=new Blob([V],{type:"application/vnd.apple.mpegurl"}),ie=URL.createObjectURL(ee);if(v&&!w){const Q=new Vr(v.bandwidth,v.averageBandwidth,v.resolution,v.frameRate,ie);r.set(O??(r.size+1).toString(),ie),a.addStreamInfo(Q)}else if(w){const Q=new fh(w.type,w.groupId??w.type.toLowerCase(),w.name??"",w.isDefault,w.autoSelect,w.channels,ie);if(w.type==="AUDIO"?i.set(O??w.name??(i.size+1).toString(),ie):w.type!=="VIDEO"&&n.set(O??w.name??(n.size+1).toString(),ie),a.addMedia(Q),!u&&w.type==="AUDIO"&&!s){const Ne=new Vr((v==null?void 0:v.bandwidth)??0,(v==null?void 0:v.averageBandwidth)??0,null,null,ie);a.addStreamInfo(Ne),s=!0}}}const c=a.build(),l=Ca.write(c),d=new Blob([l],{type:"application/vnd.apple.mpegurl"});return{url:URL.createObjectURL(d),video:r,audio:i,text:n}}function Za(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=A.timeMomentToSeconds(A.parseTimeRange(t.timerange).end),o=A.timeMomentToSeconds(A.parseTimeRange(i.timerange).start);if(Math.abs(n-o)<.001)return[t];const a=A.toTimeRange(A.secondsToTimeMoment(n),A.secondsToTimeMoment(o),!0,!1);return[t,{timerange:A.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 Ma(e){return e&&e.map((t,r)=>{if(e.length-1===r)return t;const i=e.at(r+1),n=A.timeMomentToSeconds(A.parseTimeRange(t.timerange).start),o=A.timeMomentToSeconds(A.parseTimeRange(i.timerange).start),a=A.toTimeRange(A.secondsToTimeMoment(n),A.secondsToTimeMoment(o),!0,!1);return{...t,timerange:A.formatTimeRangeExpr(a)}})}function Fa(e){return{width:e.frame_width,height:e.frame_height}}function Ra(e){return e.frame_rate?e.frame_rate.denominator?e.frame_rate.numerator/e.frame_rate.denominator:e.frame_rate.numerator:null}function ph(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 Va(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 Ba(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=Za(c))==null?void 0:h.map(v=>{var O,z;const w=A.timerangeExprDuration(v.timerange);return new Aa(w,((z=(O=v.get_urls)==null?void 0:O.at(-1))==null?void 0:z.url)??"http://byomakase.org/non-playable-gap")}))??[]:d=((p=Ma(c))==null?void 0:p.map(v=>{var O,z;const w=A.timerangeExprDuration(v.timerange);return new Aa(w,((z=(O=v.get_urls)==null?void 0:O.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,O=Fa(w),z=Ra(w),E=new Vr(s.max_bit_rate??s.avg_bit_rate??0,s.avg_bit_rate??0,O,z,"");i.push({segments:d,metadata:m,streamInfo:E})}else if(s.format==="urn:x-nmos:format:audio"){const w=s.essence_parameters,O={type:"AUDIO",groupId:"audio",name:Na(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:O,streamInfo:z,id:s.id})}else if(s.format==="urn:x-nmos:format:multi"){const v=l==null?void 0:l.find(R=>R.format==="urn:x-nmos:format:video"),w=v?Fa(v.essence_parameters):null,O=v?Ra(v.essence_parameters):null,z=ph(l??[]),E={bandwidth:z.maxBitRate,averageBandwidth:z.averageBitRate,resolution:w,frameRate:O,uri:""};i.push({segments:d,metadata:m,streamInfo:E,id:s.id})}else if(s.format==="urn:x-nmos:format:data"&&s.container==="text/vtt"){const v={type:"SUBTITLES",name:ja(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),mh(i,{independentSegments:!0})}var Br=function(e,t){return Br=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])},Br(e,t)};function ut(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Br(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function hh(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 Ka(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 ct(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 Kr(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 Jr(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 gh(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 vh(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 ct=="function"?ct(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)}}typeof SuppressedError=="function"&&SuppressedError;function ae(e){return typeof e=="function"}function Gr(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 qr=Gr(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 Hr(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var hn=(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=st(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(ie(l))try{l()}catch(p){o=p instanceof Wr?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=st(d),m=f.next();!m.done;m=f.next()){var g=m.value;try{Wa(g)}catch(p){o=o??[],p instanceof Wr?o=Jr(Jr([],Kr(o)),Kr(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 Wr(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Wa(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)&&Hr(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Hr(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Ja=hn.EMPTY;function Ga(e){return e instanceof hn||e&&"closed"in e&&ie(e.remove)&&ie(e.add)&&ie(e.unsubscribe)}function Wa(e){ie(e)?e():e.unsubscribe()}var yh={Promise:void 0},$h={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,Jr([e,t],Kr(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Ha(e){$h.setTimeout(function(){throw e})}function qa(){}function gn(e){e()}var qr=(function(e){ct(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,Ga(r)&&r.add(i)):i.destination=kh,i}return t.create=function(r,i,n){return new vn(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})(hn),wh=(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){bn(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){bn(i)}else bn(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){bn(r)}},e})(),vn=(function(e){ct(t,e);function t(r,i,n){var o=e.call(this)||this,a;return ie(r)||!r?a={next:r??void 0,error:i??void 0,complete:n??void 0}:a=r,o.destination=new wh(a),o}return t})(qr);function bn(e){Ha(e)}function Sh(e){throw e}var kh={closed:!0,next:qa,error:Sh,complete:qa},Xr=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Xa(e){return e}function Ih(e){return e.length===0?Xa:e.length===1?e[0]:function(r){return e.reduce(function(i,n){return n(i)},r)}}var _e=(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=Th(t)?t:new vn(t,r,i);return gn(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=Ya(r),new r(function(n,o){var a=new vn({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[Xr]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Ih(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Ya(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 Ya(e){var t;return(t=e??yh.Promise)!==null&&t!==void 0?t:Promise}function xh(e){return e&&ie(e.next)&&ie(e.error)&&ie(e.complete)}function Th(e){return e&&e instanceof qr||xh(e)&&Ga(e)}function zh(e){return ie(e==null?void 0:e.lift)}function Yr(e){return function(t){if(zh(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 _n(e,t,r,i,n){return new Eh(e,t,r,i,n)}var Eh=(function(e){ct(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})(qr),Oh=Gr(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Qr=(function(e){ct(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 Qa(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new Oh},t.prototype.next=function(r){var i=this;gn(function(){var n,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=st(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;gn(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;gn(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?Ja:(this.currentObservers=null,u.push(r),new hn(function(){i.currentObservers=null,Hr(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 _e;return r.source=this,r},t.create=function(r,i){return new Qa(r,i)},t})(_e),Qa=(function(e){ct(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:Ja},t})(Qr),Uh=(function(e){ct(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})(Qr),Dh=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function Nh(e){return ie(e==null?void 0:e.then)}function jh(e){return ie(e[Xr])}function Ph(e){return Symbol.asyncIterator&&ie(e==null?void 0:e[Symbol.asyncIterator])}function Ah(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 Lh(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ch=Lh();function Zh(e){return ie(e==null?void 0:e[Ch])}function Mh(e){return bh(this,arguments,function(){var r,i,n,o;return Ka(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,lt(r.read())];case 3:return i=a.sent(),n=i.value,o=i.done,o?[4,lt(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,lt(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 Fh(e){return ie(e==null?void 0:e.getReader)}function Rh(e){if(e instanceof _e)return e;if(e!=null){if(jh(e))return Vh(e);if(Dh(e))return Bh(e);if(Nh(e))return eu(e);if(Ph(e))return tu(e);if(Zh(e))return Kh(e);if(Fh(e))return Jh(e)}throw Ah(e)}function Vh(e){return new _e(function(t){var r=e[Xr]();if(ie(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Bh(e){return new _e(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function eu(e){return new _e(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Ha)})}function Kh(e){return new _e(function(t){var r,i;try{for(var n=st(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 tu(e){return new _e(function(t){Gh(e,t).catch(function(r){return t.error(r)})})}function Jh(e){return tu(Mh(e))}function Gh(e,t){var r,i,n,o;return vh(this,void 0,void 0,function(){var a,u;return Ka(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 Wh=Gr(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Hh(e,t){return new Promise(function(r,i){var n=new vn({next:function(o){r(o),n.unsubscribe()},error:i,complete:function(){i(new Wh)}});e.subscribe(n)})}function nu(e,t){return Yr(function(r,i){var n=0;r.subscribe(_n(i,function(o){i.next(e.call(t,o,n++))}))})}function ei(e,t){return Yr(function(r,i){var n=null,o=0,a=!1,u=function(){return a&&!n&&i.complete()};r.subscribe(_n(i,function(s){n==null||n.unsubscribe();var c=0,l=o++;Rh(e(s,l)).subscribe(n=_n(i,function(d){return i.next(t?t(s,d,l,c++):d)},function(){n=null,u()}))},function(){a=!0,u()}))})}function ru(e,t,r){var i=ie(e)||t||r?{next:e,error:t,complete:r}:e;return i?Yr(function(n,o){var a;(a=i.subscribe)===null||a===void 0||a.call(i);var u=!0;n.subscribe(_n(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)}))}):Xa}class iu{constructor(t){k(this,"_player");k(this,"_proxy");k(this,"_mediaStartTime");k(this,"_loadOptions");k(this,"_onVideoLoaded$",new Uh(void 0));k(this,"_onVideoLoading$",new Qr);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 ou(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?ou(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?ou(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 Xh=(e,t)=>new qh(e,t),au=Object.freeze({status:"aborted"});function h(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 uu=Symbol("zod_brand");class qe extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class yn extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const $n={};function ce(e){return e&&Object.assign($n,e),$n}function Yh(e){return e}function Qh(e){return e}function eg(e){}function tg(e){throw new Error("Unexpected value in exhaustive check")}function ng(e){}function ti(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 $(e,t="|"){return e.map(r=>D(r)).join(t)}function wn(e,t){return typeof t=="bigint"?t.toString():t}function Tt(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Xe(e){return e==null}function Sn(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function cu(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 su=Symbol("evaluating");function R(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==su)return i===void 0&&(i=su,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function rg(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ve(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ne(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function ig(e){return Ne(e._zod.def)}function og(e,t){return t?t.reduce((r,i)=>r==null?void 0:r[i],e):e}function ag(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 ug(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 ni(e){return JSON.stringify(e)}function lu(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ri="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function dt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const du=Tt(()=>{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(dt(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(dt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function kn(e){return Ye(e)?{...e}:Array.isArray(e)?[...e]:e}function cg(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const sg=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}`)}},In=new Set(["string","number","symbol"]),fu=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ae(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ye(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 lg(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 mu(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const pu={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]},hu={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function gu(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=Ne(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 Ve(this,"shape",a),a},checks:[]});return ye(e,o)}function vu(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=Ne(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 Ve(this,"shape",a),a},checks:[]});return ye(e,o)}function bu(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=Ne(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Ve(this,"shape",o),o}});return ye(e,n)}function _u(e,t){if(!Ye(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=Ne(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Ve(this,"shape",i),i}});return ye(e,r)}function yu(e,t){const r=Ne(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Ve(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return ye(e,r)}function $u(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=Ne(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 Ve(this,"shape",s),s},checks:[]});return ye(t,a)}function wu(e,t,r){const i=Ne(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 Ve(this,"shape",o),o}});return ye(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 Te(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 xn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Tn(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 ft(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function dg(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Su(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 ku(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function fg(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Su(t+r)}function mg(e){return ku(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function pg(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 hg(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class gg{constructor(...t){}}const Iu=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:hu,Class:gg,NUMBER_FORMAT_RANGES:pu,aborted:Qe,allowsEval:du,assert:ng,assertEqual:Yh,assertIs:eg,assertNever:tg,assertNotEqual:Qh,assignProp:Ve,base64ToUint8Array:Su,base64urlToUint8Array:fg,cached:Tt,captureStackTrace:ri,cleanEnum:dg,cleanRegex:Sn,clone:ye,cloneDef:ig,createTransparentProxy:lg,defineLazy:R,esc:ni,escapeRegex:Ae,extend:bu,finalizeIssue:$e,floatSafeRemainder:cu,getElementAtPath:og,getEnumValues:ti,getLengthableOrigin:Tn,getParsedType:sg,getSizableOrigin:xn,hexToUint8Array:pg,isObject:dt,isPlainObject:Ye,issue:ft,joinValues:$,jsonStringifyReplacer:wn,merge:yu,mergeDefs:Ne,normalizeParams:b,nullish:Xe,numKeys:cg,objectClone:rg,omit:vu,optionalKeys:mu,parsedType:N,partial:$u,pick:gu,prefixIssues:Te,primitiveTypes:fu,promiseAllObject:ag,propertyKeyTypes:In,randomString:ug,required:wu,safeExtend:_u,shallowClone:kn,slugify:lu,stringifyPrimitive:D,uint8ArrayToBase64:ku,uint8ArrayToBase64url:mg,uint8ArrayToHex:hg,unwrapMessage:zt},Symbol.toStringTag,{value:"Module"})),xu=(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,wn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ii=h("$ZodError",xu),ge=h("$ZodError",xu,{Parent:Error});function oi(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 ai(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 Tu(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 zu(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 Eu(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 ${zu(n.path)}`);return t.join(`
25
- `)}const Et=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 qe;if(a.issues.length){const u=new((n==null?void 0:n.Err)??e)(a.issues.map(s=>$e(s,o,ce())));throw ri(u,n==null?void 0:n.callee),u}return a.value},ui=Et(ge),Ot=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,ce())));throw ri(u,n==null?void 0:n.callee),u}return a.value},ci=Ot(ge),Ut=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 qe;return o.issues.length?{success:!1,error:new(e??ii)(o.issues.map(a=>$e(a,n,ce())))}:{success:!0,data:o.value}},Ou=Ut(ge),Dt=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,ce())))}:{success:!0,data:o.value}},Uu=Dt(ge),si=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Et(e)(t,r,n)},vg=si(ge),li=e=>(t,r,i)=>Et(e)(t,r,i),bg=li(ge),di=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ot(e)(t,r,n)},_g=di(ge),fi=e=>async(t,r,i)=>Ot(e)(t,r,i),yg=fi(ge),mi=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ut(e)(t,r,n)},$g=mi(ge),pi=e=>(t,r,i)=>Ut(e)(t,r,i),wg=pi(ge),hi=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Dt(e)(t,r,n)},Sg=hi(ge),gi=e=>async(t,r,i)=>Dt(e)(t,r,i),kg=gi(ge),Du=/^[cC][^\s-]{8,}$/,Nu=/^[0-9a-z]+$/,ju=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Pu=/^[0-9a-vA-V]{20}$/,Au=/^[A-Za-z0-9]{27}$/,Lu=/^[a-zA-Z0-9_-]{21}$/,Cu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ig=/^[-+]?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)?)??$/,Zu=/^([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})$/,mt=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)$/,xg=mt(4),Tg=mt(6),zg=mt(7),Mu=/^(?!\.)(?!.*\.\.)([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])?)*$/,Og=/^(([^<>()\[\]\\.,;:\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,}))$/,Fu=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Ug=Fu,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="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ru(){return new RegExp(Ng,"u")}const Vu=/^(?:(?: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])$/,Bu=/^(([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}|:))$/,Ku=e=>{const t=Ae(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Ju=/^((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])$/,Gu=/^(([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])$/,Wu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vi=/^[A-Za-z0-9_-]*$/,Hu=/^(?=.{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])?)*\.?$/,qu=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Xu=/^\+[1-9]\d{6,14}$/,Yu="(?:(?:\\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])))",Qu=new RegExp(`^${Yu}$`);function ec(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 tc(e){return new RegExp(`^${ec(e)}$`)}function nc(e){const t=ec({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(`^${Yu}T(?:${i})$`)}const rc=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}$`)},ic=/^-?\d+n?$/,oc=/^-?\d+$/,bi=/^-?\d+(?:\.\d+)?$/,ac=/^(?:true|false)$/i,uc=/^null$/i,cc=/^undefined$/i,sc=/^[^A-Z]*$/,lc=/^[^a-z]*$/,dc=/^[0-9a-fA-F]*$/;function Nt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function jt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const _i=Object.freeze(Object.defineProperty({__proto__:null,base64:Wu,base64url:vi,bigint:ic,boolean:ac,browserEmail:Dg,cidrv4:Ju,cidrv6:Gu,cuid:Du,cuid2:Nu,date:Qu,datetime:nc,domain:qu,duration:Cu,e164:Xu,email:Mu,emoji:Ru,extendedDuration:Ig,guid:Zu,hex:dc,hostname:Hu,html5Email:Eg,idnEmail:Ug,integer:oc,ipv4:Vu,ipv6:Bu,ksuid:Au,lowercase:sc,mac:Ku,md5_base64:Nt(22,"=="),md5_base64url:jt(22),md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:Lu,null:uc,number:bi,rfc5322Email:Og,sha1_base64:Nt(27,"="),sha1_base64url:jt(27),sha1_hex:/^[0-9a-fA-F]{40}$/,sha256_base64:Nt(43,"="),sha256_base64url:jt(43),sha256_hex:/^[0-9a-fA-F]{64}$/,sha384_base64:Nt(64,""),sha384_base64url:jt(64),sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:Nt(86,"=="),sha512_base64url:jt(86),sha512_hex:/^[0-9a-fA-F]{128}$/,string:rc,time:tc,ulid:ju,undefined:cc,unicodeEmail:Fu,uppercase:lc,uuid:mt,uuid4:xg,uuid6:Tg,uuid7:zg,xid:Pu},Symbol.toStringTag,{value:"Module"})),Y=h("$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"},yi=h("$ZodCheckLessThan",(e,t)=>{Y.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})}}),$i=h("$ZodCheckGreaterThan",(e,t)=>{Y.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})}}),mc=h("$ZodCheckMultipleOf",(e,t)=>{Y.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):cu(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})}}),pc=h("$ZodCheckNumberFormat",(e,t)=>{var a;Y.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]=pu[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=oc)}),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})}}),hc=h("$ZodCheckBigIntFormat",(e,t)=>{Y.init(e,t);const[r,i]=hu[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})}}),gc=h("$ZodCheckMaxSize",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xe(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:xn(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),vc=h("$ZodCheckMinSize",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xe(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:xn(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),bc=h("$ZodCheckSizeEquals",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xe(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:xn(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})}}),_c=h("$ZodCheckMaxLength",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xe(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=Tn(n);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),yc=h("$ZodCheckMinLength",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xe(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=Tn(n);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),$c=h("$ZodCheckLengthEquals",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xe(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=Tn(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})}}),Pt=h("$ZodCheckStringFormat",(e,t)=>{var r,i;Y.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=()=>{})}),wc=h("$ZodCheckRegex",(e,t)=>{Pt.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})}}),Sc=h("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=sc),Pt.init(e,t)}),kc=h("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=lc),Pt.init(e,t)}),Ic=h("$ZodCheckIncludes",(e,t)=>{Y.init(e,t);const r=Ae(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})}}),xc=h("$ZodCheckStartsWith",(e,t)=>{Y.init(e,t);const r=new RegExp(`^${Ae(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})}}),Tc=h("$ZodCheckEndsWith",(e,t)=>{Y.init(e,t);const r=new RegExp(`.*${Ae(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 zc(e,t,r){e.issues.length&&t.issues.push(...Te(r,e.issues))}const Ec=h("$ZodCheckProperty",(e,t)=>{Y.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=>zc(n,r,t.property));zc(i,r,t.property)}}),Oc=h("$ZodCheckMimeType",(e,t)=>{Y.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})}}),Uc=h("$ZodCheckOverwrite",(e,t)=>{Y.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Dc{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 Wr(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var gn=(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=ct(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 qr?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=ct(d),m=f.next();!m.done;m=f.next()){var h=m.value;try{qa(h)}catch(p){o=o??[],p instanceof qr?o=Jr(Jr([],Kr(o)),Kr(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 qr(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)qa(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)&&Wr(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Wr(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Ja=gn.EMPTY;function Ga(e){return e instanceof gn||e&&"closed"in e&&ae(e.remove)&&ae(e.add)&&ae(e.unsubscribe)}function qa(e){ae(e)?e():e.unsubscribe()}var bh={Promise:void 0},_h={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,Jr([e,t],Kr(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Wa(e){_h.setTimeout(function(){throw e})}function Ha(){}function vn(e){e()}var Hr=(function(e){ut(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,Ga(r)&&r.add(i)):i.destination=wh,i}return t.create=function(r,i,n){return new bn(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})(gn),yh=(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){_n(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){_n(i)}else _n(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){_n(r)}},e})(),bn=(function(e){ut(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 yh(a),o}return t})(Hr);function _n(e){Wa(e)}function $h(e){throw e}var wh={closed:!0,next:Ha,error:$h,complete:Ha},Xr=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Xa(e){return e}function Sh(e){return e.length===0?Xa:e.length===1?e[0]:function(r){return e.reduce(function(i,n){return n(i)},r)}}var be=(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=Ih(t)?t:new bn(t,r,i);return vn(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=Ya(r),new r(function(n,o){var a=new bn({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[Xr]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Sh(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Ya(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 Ya(e){var t;return(t=e??bh.Promise)!==null&&t!==void 0?t:Promise}function kh(e){return e&&ae(e.next)&&ae(e.error)&&ae(e.complete)}function Ih(e){return e&&e instanceof Hr||kh(e)&&Ga(e)}function xh(e){return ae(e==null?void 0:e.lift)}function Yr(e){return function(t){if(xh(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 yn(e,t,r,i,n){return new Th(e,t,r,i,n)}var Th=(function(e){ut(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})(Hr),zh=Gr(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Qr=(function(e){ut(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 Qa(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new zh},t.prototype.next=function(r){var i=this;vn(function(){var n,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=ct(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;vn(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;vn(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?Ja:(this.currentObservers=null,u.push(r),new gn(function(){i.currentObservers=null,Wr(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 be;return r.source=this,r},t.create=function(r,i){return new Qa(r,i)},t})(be),Qa=(function(e){ut(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:Ja},t})(Qr),Eh=(function(e){ut(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})(Qr),Oh=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function Uh(e){return ae(e==null?void 0:e.then)}function Dh(e){return ae(e[Xr])}function Nh(e){return Symbol.asyncIterator&&ae(e==null?void 0:e[Symbol.asyncIterator])}function jh(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 Ph(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ah=Ph();function Lh(e){return ae(e==null?void 0:e[Ah])}function Ch(e){return gh(this,arguments,function(){var r,i,n,o;return Ka(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 Zh(e){return ae(e==null?void 0:e.getReader)}function Mh(e){if(e instanceof be)return e;if(e!=null){if(Dh(e))return Fh(e);if(Oh(e))return Rh(e);if(Uh(e))return eu(e);if(Nh(e))return tu(e);if(Lh(e))return Vh(e);if(Zh(e))return Bh(e)}throw jh(e)}function Fh(e){return new be(function(t){var r=e[Xr]();if(ae(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Rh(e){return new be(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function eu(e){return new be(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Wa)})}function Vh(e){return new be(function(t){var r,i;try{for(var n=ct(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 tu(e){return new be(function(t){Kh(e,t).catch(function(r){return t.error(r)})})}function Bh(e){return tu(Ch(e))}function Kh(e,t){var r,i,n,o;return hh(this,void 0,void 0,function(){var a,u;return Ka(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),r=vh(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 Jh=Gr(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Gh(e,t){return new Promise(function(r,i){var n=new bn({next:function(o){r(o),n.unsubscribe()},error:i,complete:function(){i(new Jh)}});e.subscribe(n)})}function nu(e,t){return Yr(function(r,i){var n=0;r.subscribe(yn(i,function(o){i.next(e.call(t,o,n++))}))})}function ei(e,t){return Yr(function(r,i){var n=null,o=0,a=!1,u=function(){return a&&!n&&i.complete()};r.subscribe(yn(i,function(s){n==null||n.unsubscribe();var c=0,l=o++;Mh(e(s,l)).subscribe(n=yn(i,function(d){return i.next(t?t(s,d,l,c++):d)},function(){n=null,u()}))},function(){a=!0,u()}))})}function qh(e,t,r){var i=ae(e)||t||r?{next:e,error:t,complete:r}:e;return i?Yr(function(n,o){var a;(a=i.subscribe)===null||a===void 0||a.call(i);var u=!0;n.subscribe(yn(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)}))}):Xa}class ru{constructor(t){k(this,"_player");k(this,"_proxy");k(this,"_mediaStartTime");k(this,"_loadOptions");k(this,"_requestedDuration");k(this,"_onVideoLoaded$",new Eh(void 0));k(this,"_onVideoLoading$",new Qr);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 iu(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 Wh{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?iu(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?iu(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 Hh=(e,t)=>new Wh(e,t),ou=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 au=Symbol("zod_brand");class He extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $n extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const wn={};function se(e){return e&&Object.assign(wn,e),wn}function Xh(e){return e}function Yh(e){return e}function Qh(e){}function eg(e){throw new Error("Unexpected value in exhaustive check")}function tg(e){}function ti(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 $(e,t="|"){return e.map(r=>N(r)).join(t)}function Sn(e,t){return typeof t=="bigint"?t.toString():t}function Tt(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Xe(e){return e==null}function kn(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function uu(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 cu=Symbol("evaluating");function F(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==cu)return i===void 0&&(i=cu,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ng(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Fe(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ue(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function rg(e){return Ue(e._zod.def)}function ig(e,t){return t?t.reduce((r,i)=>r==null?void 0:r[i],e):e}function og(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 ag(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 ni(e){return JSON.stringify(e)}function su(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ri="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function lt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const lu=Tt(()=>{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 In(e){return Ye(e)?{...e}:Array.isArray(e)?[...e]:e}function ug(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const cg=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"]),du=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 sg(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 N(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function fu(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const mu={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]},pu={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function hu(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=Ue(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 Fe(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=Ue(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 Fe(this,"shape",a),a},checks:[]});return _e(e,o)}function vu(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=Ue(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Fe(this,"shape",o),o}});return _e(e,n)}function bu(e,t){if(!Ye(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=Ue(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Fe(this,"shape",i),i}});return _e(e,r)}function _u(e,t){const r=Ue(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Fe(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return _e(e,r)}function yu(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=Ue(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 Fe(this,"shape",s),s},checks:[]});return _e(t,a)}function $u(e,t,r){const i=Ue(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 Fe(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 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 ye(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 Tn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function zn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function j(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 lg(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function wu(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 Su(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function dg(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return wu(t+r)}function fg(e){return Su(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function mg(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 pg(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class hg{constructor(...t){}}const ku=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:pu,Class:hg,NUMBER_FORMAT_RANGES:mu,aborted:Qe,allowsEval:lu,assert:tg,assertEqual:Xh,assertIs:Qh,assertNever:eg,assertNotEqual:Yh,assignProp:Fe,base64ToUint8Array:wu,base64urlToUint8Array:dg,cached:Tt,captureStackTrace:ri,cleanEnum:lg,cleanRegex:kn,clone:_e,cloneDef:rg,createTransparentProxy:sg,defineLazy:F,esc:ni,escapeRegex:Pe,extend:vu,finalizeIssue:ye,floatSafeRemainder:uu,getElementAtPath:ig,getEnumValues:ti,getLengthableOrigin:zn,getParsedType:cg,getSizableOrigin:Tn,hexToUint8Array:mg,isObject:lt,isPlainObject:Ye,issue:dt,joinValues:$,jsonStringifyReplacer:Sn,merge:_u,mergeDefs:Ue,normalizeParams:b,nullish:Xe,numKeys:ug,objectClone:ng,omit:gu,optionalKeys:fu,parsedType:j,partial:yu,pick:hu,prefixIssues:Ie,primitiveTypes:du,promiseAllObject:og,propertyKeyTypes:xn,randomString:ag,required:$u,safeExtend:bu,shallowClone:In,slugify:su,stringifyPrimitive:N,uint8ArrayToBase64:Su,uint8ArrayToBase64url:fg,uint8ArrayToHex:pg,unwrapMessage:zt},Symbol.toStringTag,{value:"Module"})),Iu=(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,Sn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ii=g("$ZodError",Iu),he=g("$ZodError",Iu,{Parent:Error});function oi(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 ai(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 xu(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 Tu(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 zu(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 ${Tu(n.path)}`);return t.join(`
25
+ `)}const Et=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 He;if(a.issues.length){const u=new((n==null?void 0:n.Err)??e)(a.issues.map(s=>ye(s,o,se())));throw ri(u,n==null?void 0:n.callee),u}return a.value},ui=Et(he),Ot=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 ri(u,n==null?void 0:n.callee),u}return a.value},ci=Ot(he),Ut=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 He;return o.issues.length?{success:!1,error:new(e??ii)(o.issues.map(a=>ye(a,n,se())))}:{success:!0,data:o.value}},Eu=Ut(he),Dt=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}},Ou=Dt(he),si=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Et(e)(t,r,n)},gg=si(he),li=e=>(t,r,i)=>Et(e)(t,r,i),vg=li(he),di=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ot(e)(t,r,n)},bg=di(he),fi=e=>async(t,r,i)=>Ot(e)(t,r,i),_g=fi(he),mi=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ut(e)(t,r,n)},yg=mi(he),pi=e=>(t,r,i)=>Ut(e)(t,r,i),$g=pi(he),hi=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Dt(e)(t,r,n)},wg=hi(he),gi=e=>async(t,r,i)=>Dt(e)(t,r,i),Sg=gi(he),Uu=/^[cC][^\s-]{8,}$/,Du=/^[0-9a-z]+$/,Nu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ju=/^[0-9a-vA-V]{20}$/,Pu=/^[A-Za-z0-9]{27}$/,Au=/^[a-zA-Z0-9_-]{21}$/,Lu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kg=/^[-+]?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)?)??$/,Cu=/^([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)$/,Ig=ft(4),xg=ft(6),Tg=ft(7),Zu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,zg=/^[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])?)*$/,Eg=/^(([^<>()\[\]\\.,;:\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,}))$/,Mu=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Og=Mu,Ug=/^[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])?)*$/,Dg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Fu(){return new RegExp(Dg,"u")}const Ru=/^(?:(?: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])$/,Vu=/^(([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}|:))$/,Bu=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}$`)},Ku=/^((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])$/,Ju=/^(([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])$/,Gu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vi=/^[A-Za-z0-9_-]*$/,qu=/^(?=.{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])?)*\.?$/,Wu=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Hu=/^\+[1-9]\d{6,14}$/,Xu="(?:(?:\\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])))",Yu=new RegExp(`^${Xu}$`);function Qu(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 ec(e){return new RegExp(`^${Qu(e)}$`)}function tc(e){const t=Qu({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(`^${Xu}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}$`)},rc=/^-?\d+n?$/,ic=/^-?\d+$/,bi=/^-?\d+(?:\.\d+)?$/,oc=/^(?:true|false)$/i,ac=/^null$/i,uc=/^undefined$/i,cc=/^[^A-Z]*$/,sc=/^[^a-z]*$/,lc=/^[0-9a-fA-F]*$/;function Nt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function jt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const _i=Object.freeze(Object.defineProperty({__proto__:null,base64:Gu,base64url:vi,bigint:rc,boolean:oc,browserEmail:Ug,cidrv4:Ku,cidrv6:Ju,cuid:Uu,cuid2:Du,date:Yu,datetime:tc,domain:Wu,duration:Lu,e164:Hu,email:Zu,emoji:Fu,extendedDuration:kg,guid:Cu,hex:lc,hostname:qu,html5Email:zg,idnEmail:Og,integer:ic,ipv4:Ru,ipv6:Vu,ksuid:Pu,lowercase:cc,mac:Bu,md5_base64:Nt(22,"=="),md5_base64url:jt(22),md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:Au,null:ac,number:bi,rfc5322Email:Eg,sha1_base64:Nt(27,"="),sha1_base64url:jt(27),sha1_hex:/^[0-9a-fA-F]{40}$/,sha256_base64:Nt(43,"="),sha256_base64url:jt(43),sha256_hex:/^[0-9a-fA-F]{64}$/,sha384_base64:Nt(64,""),sha384_base64url:jt(64),sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:Nt(86,"=="),sha512_base64url:jt(86),sha512_hex:/^[0-9a-fA-F]{128}$/,string:nc,time:ec,ulid:Nu,undefined:uc,unicodeEmail:Mu,uppercase:sc,uuid:ft,uuid4:Ig,uuid6:xg,uuid7:Tg,xid:ju},Symbol.toStringTag,{value:"Module"})),Y=g("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),dc={number:"number",bigint:"bigint",object:"date"},yi=g("$ZodCheckLessThan",(e,t)=>{Y.init(e,t);const r=dc[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})}}),$i=g("$ZodCheckGreaterThan",(e,t)=>{Y.init(e,t);const r=dc[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})}}),fc=g("$ZodCheckMultipleOf",(e,t)=>{Y.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):uu(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})}}),mc=g("$ZodCheckNumberFormat",(e,t)=>{var a;Y.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]=mu[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=ic)}),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})}}),pc=g("$ZodCheckBigIntFormat",(e,t)=>{Y.init(e,t);const[r,i]=pu[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})}}),hc=g("$ZodCheckMaxSize",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xe(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:Tn(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),gc=g("$ZodCheckMinSize",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xe(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:Tn(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),vc=g("$ZodCheckSizeEquals",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xe(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:Tn(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})}}),bc=g("$ZodCheckMaxLength",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xe(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=zn(n);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),_c=g("$ZodCheckMinLength",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xe(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=zn(n);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),yc=g("$ZodCheckLengthEquals",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xe(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=zn(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})}}),Pt=g("$ZodCheckStringFormat",(e,t)=>{var r,i;Y.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=()=>{})}),$c=g("$ZodCheckRegex",(e,t)=>{Pt.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})}}),wc=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=cc),Pt.init(e,t)}),Sc=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=sc),Pt.init(e,t)}),kc=g("$ZodCheckIncludes",(e,t)=>{Y.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})}}),Ic=g("$ZodCheckStartsWith",(e,t)=>{Y.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})}}),xc=g("$ZodCheckEndsWith",(e,t)=>{Y.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 Tc(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues))}const zc=g("$ZodCheckProperty",(e,t)=>{Y.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=>Tc(n,r,t.property));Tc(i,r,t.property)}}),Ec=g("$ZodCheckMimeType",(e,t)=>{Y.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})}}),Oc=g("$ZodCheckOverwrite",(e,t)=>{Y.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Uc{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 Nc={major:4,minor:3,patch:6},L=h("$ZodType",(e,t)=>{var n;var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Nc;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 qe;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 qe;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 qe;return c.then(l=>o(l,i,s))}return o(c,i,s)}}R(e,"~standard",()=>({validate:o=>{var a;try{const u=Ou(e,o);return u.success?{value:u.data}:{issues:(a=u.error)==null?void 0:a.issues}}catch{return Uu(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}))}),At=h("$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()??rc(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=h("$ZodStringFormat",(e,t)=>{Pt.init(e,t),At.init(e,t)}),jc=h("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Zu),W.init(e,t)}),Pc=h("$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=mt(i))}else t.pattern??(t.pattern=mt());W.init(e,t)}),Ac=h("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Mu),W.init(e,t)}),Lc=h("$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})}}}),Cc=h("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ru()),W.init(e,t)}),Zc=h("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Lu),W.init(e,t)}),Mc=h("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Du),W.init(e,t)}),Fc=h("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Nu),W.init(e,t)}),Rc=h("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ju),W.init(e,t)}),Vc=h("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Pu),W.init(e,t)}),Bc=h("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Au),W.init(e,t)}),Kc=h("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=nc(t)),W.init(e,t)}),Jc=h("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Qu),W.init(e,t)}),Gc=h("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=tc(t)),W.init(e,t)}),Wc=h("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Cu),W.init(e,t)}),Hc=h("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Vu),W.init(e,t),e._zod.bag.format="ipv4"}),qc=h("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Bu),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})}}}),Xc=h("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ku(t.delimiter)),W.init(e,t),e._zod.bag.format="mac"}),Yc=h("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ju),W.init(e,t)}),Qc=h("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Gu),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 wi(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const es=h("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Wu),W.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{wi(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function ts(e){if(!vi.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return wi(r)}const ns=h("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=vi),W.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{ts(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),rs=h("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Xu),W.init(e,t)});function is(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 os=h("$ZodJWT",(e,t)=>{W.init(e,t),e._zod.check=r=>{is(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),as=h("$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})}}),Si=h("$ZodNumber",(e,t)=>{L.init(e,t),e._zod.pattern=e._zod.bag.pattern??bi,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}}),us=h("$ZodNumberFormat",(e,t)=>{pc.init(e,t),Si.init(e,t)}),ki=h("$ZodBoolean",(e,t)=>{L.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}}),Ii=h("$ZodBigInt",(e,t)=>{L.init(e,t),e._zod.pattern=ic,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=h("$ZodBigIntFormat",(e,t)=>{hc.init(e,t),Ii.init(e,t)}),ss=h("$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}}),ls=h("$ZodUndefined",(e,t)=>{L.init(e,t),e._zod.pattern=cc,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}}),ds=h("$ZodNull",(e,t)=>{L.init(e,t),e._zod.pattern=uc,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}}),fs=h("$ZodAny",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),ms=h("$ZodUnknown",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),ps=h("$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)}),hs=h("$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}}),gs=h("$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 vs(e,t,r){e.issues.length&&t.issues.push(...Te(r,e.issues)),t.value[r]=e.value}const bs=h("$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=>vs(c,r,a))):vs(s,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function zn(e,t,r,i,n){if(e.issues.length){if(n&&!(r in i))return;t.issues.push(...Te(r,e.issues))}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function _s(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=mu(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function ys(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=>zn(m,r,d,t,l))):zn(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 $s=h("$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=Tt(()=>_s(t));R(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=dt,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",p=m._zod.run({value:c[f],issues:[]},s);p instanceof Promise?l.push(p.then(v=>zn(v,u,f,c,g))):zn(p,u,f,c,g)}return o?ys(l,c,u,s,i.value,e):l.length?Promise.all(l).then(()=>u):u}}),ws=h("$ZodObjectJIT",(e,t)=>{$s.init(e,t);const r=e._zod.parse,i=Tt(()=>_s(t)),n=f=>{var z;const m=new Dc(["shape","payload","ctx"]),g=i.value,p=C=>{const Z=ni(C);return`shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`};m.write("const input = payload.value;");const v=Object.create(null);let w=0;for(const C of g.keys)v[C]=`key_${w++}`;m.write("const newResult = {};");for(const C of g.keys){const Z=v[C],V=ni(C),fe=f[C],Q=((z=fe==null?void 0:fe._zod)==null?void 0:z.optout)==="optional";m.write(`const ${Z} = ${p(C)};`),Q?m.write(`
28
- if (${Z}.issues.length) {
27
+ `))}}const Dc={major:4,minor:3,patch:6},C=g("$ZodType",(e,t)=>{var n;var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Dc;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,h=f._zod.check(u);if(h instanceof Promise&&(c==null?void 0:c.async)===!1)throw new He;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,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 He;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 He;return c.then(l=>o(l,i,s))}return o(c,i,s)}}F(e,"~standard",()=>({validate:o=>{var a;try{const u=Eu(e,o);return u.success?{value:u.data}:{issues:(a=u.error)==null?void 0:a.issues}}catch{return Ou(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}))}),At=g("$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}}),G=g("$ZodStringFormat",(e,t)=>{Pt.init(e,t),At.init(e,t)}),Nc=g("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Cu),G.init(e,t)}),jc=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=ft(i))}else t.pattern??(t.pattern=ft());G.init(e,t)}),Pc=g("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Zu),G.init(e,t)}),Ac=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})}}}),Lc=g("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Fu()),G.init(e,t)}),Cc=g("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Au),G.init(e,t)}),Zc=g("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Uu),G.init(e,t)}),Mc=g("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Du),G.init(e,t)}),Fc=g("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Nu),G.init(e,t)}),Rc=g("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ju),G.init(e,t)}),Vc=g("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Pu),G.init(e,t)}),Bc=g("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=tc(t)),G.init(e,t)}),Kc=g("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Yu),G.init(e,t)}),Jc=g("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=ec(t)),G.init(e,t)}),Gc=g("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Lu),G.init(e,t)}),qc=g("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ru),G.init(e,t),e._zod.bag.format="ipv4"}),Wc=g("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Vu),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})}}}),Hc=g("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Bu(t.delimiter)),G.init(e,t),e._zod.bag.format="mac"}),Xc=g("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ku),G.init(e,t)}),Yc=g("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ju),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 wi(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Qc=g("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Gu),G.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{wi(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function es(e){if(!vi.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return wi(r)}const ts=g("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=vi),G.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{es(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),ns=g("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Hu),G.init(e,t)});function rs(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 is=g("$ZodJWT",(e,t)=>{G.init(e,t),e._zod.check=r=>{rs(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),os=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})}}),Si=g("$ZodNumber",(e,t)=>{C.init(e,t),e._zod.pattern=e._zod.bag.pattern??bi,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=g("$ZodNumberFormat",(e,t)=>{mc.init(e,t),Si.init(e,t)}),ki=g("$ZodBoolean",(e,t)=>{C.init(e,t),e._zod.pattern=oc,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}}),Ii=g("$ZodBigInt",(e,t)=>{C.init(e,t),e._zod.pattern=rc,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}}),us=g("$ZodBigIntFormat",(e,t)=>{pc.init(e,t),Ii.init(e,t)}),cs=g("$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}}),ss=g("$ZodUndefined",(e,t)=>{C.init(e,t),e._zod.pattern=uc,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}}),ls=g("$ZodNull",(e,t)=>{C.init(e,t),e._zod.pattern=ac,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}}),ds=g("$ZodAny",(e,t)=>{C.init(e,t),e._zod.parse=r=>r}),fs=g("$ZodUnknown",(e,t)=>{C.init(e,t),e._zod.parse=r=>r}),ms=g("$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)}),ps=g("$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}}),hs=g("$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 gs(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues)),t.value[r]=e.value}const vs=g("$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=>gs(c,r,a))):gs(s,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function En(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 bs(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=fu(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function _s(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=>En(m,r,d,t,l))):En(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 ys=g("$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=Tt(()=>bs(t));F(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],h=m._zod.optout==="optional",p=m._zod.run({value:c[f],issues:[]},s);p instanceof Promise?l.push(p.then(v=>En(v,u,f,c,h))):En(p,u,f,c,h)}return o?_s(l,c,u,s,i.value,e):l.length?Promise.all(l).then(()=>u):u}}),$s=g("$ZodObjectJIT",(e,t)=>{ys.init(e,t);const r=e._zod.parse,i=Tt(()=>bs(t)),n=f=>{var z;const m=new Uc(["shape","payload","ctx"]),h=i.value,p=E=>{const R=ni(E);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};m.write("const input = payload.value;");const v=Object.create(null);let w=0;for(const E of h.keys)v[E]=`key_${w++}`;m.write("const newResult = {};");for(const E of h.keys){const R=v[E],V=ni(E),ee=f[E],ie=((z=ee==null?void 0:ee._zod)==null?void 0:z.optout)==="optional";m.write(`const ${R} = ${p(E)};`),ie?m.write(`
28
+ if (${R}.issues.length) {
29
29
  if (${V} in input) {
30
- payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
30
+ payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
31
31
  ...iss,
32
32
  path: iss.path ? [${V}, ...iss.path] : [${V}]
33
33
  })));
34
34
  }
35
35
  }
36
36
 
37
- if (${Z}.value === undefined) {
37
+ if (${R}.value === undefined) {
38
38
  if (${V} in input) {
39
39
  newResult[${V}] = undefined;
40
40
  }
41
41
  } else {
42
- newResult[${V}] = ${Z}.value;
42
+ newResult[${V}] = ${R}.value;
43
43
  }
44
44
 
45
45
  `):m.write(`
46
- if (${Z}.issues.length) {
47
- payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
46
+ if (${R}.issues.length) {
47
+ payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
48
48
  ...iss,
49
49
  path: iss.path ? [${V}, ...iss.path] : [${V}]
50
50
  })));
51
51
  }
52
52
 
53
- if (${Z}.value === undefined) {
53
+ if (${R}.value === undefined) {
54
54
  if (${V} in input) {
55
55
  newResult[${V}] = undefined;
56
56
  }
57
57
  } else {
58
- newResult[${V}] = ${Z}.value;
58
+ newResult[${V}] = ${R}.value;
59
59
  }
60
60
 
61
- `)}m.write("payload.value = newResult;"),m.write("return payload;");const E=m.compile();return(C,Z)=>E(f,C,Z)};let o;const a=dt,u=!$n.jitless,c=u&&du.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?ys([],g,f,m,d,e):f):r(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function Ss(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=>$e(a,i,ce())))}),t)}const En=h("$ZodUnion",(e,t)=>{L.init(e,t),R(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),R(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),R(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),R(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=>Sn(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=>Ss(s,n,e,o)):Ss(u,n,e,o)}});function ks(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,ce())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}const Is=h("$ZodXor",(e,t)=>{En.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=>ks(s,n,e,o)):ks(u,n,e,o)}}),xs=h("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,En.init(e,t);const r=e._zod.parse;R(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=Tt(()=>{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(!dt(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)}}),Ts=h("$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])=>zs(r,s,c)):zs(r,o,a)}});function xi(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=xi(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=xi(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 zs(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=xi(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 Ti=h("$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=>On(f,i,c))):On(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=>On(m,i,c))):On(f,i,c)}}return a.length?Promise.all(a).then(()=>i):i}});function On(e,t,r){e.issues.length&&t.issues.push(...Te(r,e.issues)),t.value[r]=e.value}const Es=h("$ZodRecord",(e,t)=>{L.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(...Te(c,d.issues)),r.value[c]=d.value})):(l.issues.length&&r.issues.push(...Te(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"&&bi.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,ce())),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(...Te(u,d.issues)),r.value[s.value]=d.value})):(l.issues.length&&r.issues.push(...Te(u,l.issues)),r.value[s.value]=l.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Os=h("$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])=>{Us(l,d,r,a,n,e,i)})):Us(s,c,r,a,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function Us(e,t,r,i,n,o,a){e.issues.length&&(In.has(typeof i)?r.issues.push(...Te(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(u=>$e(u,a,ce()))})),t.issues.length&&(In.has(typeof i)?r.issues.push(...Te(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,ce()))})),r.value.set(e.value,t.value)}const Ds=h("$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=>Ns(s,r))):Ns(u,r)}return o.length?Promise.all(o).then(()=>r):r}});function Ns(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const js=h("$ZodEnum",(e,t)=>{L.init(e,t);const r=ti(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>In.has(typeof n)).map(n=>typeof n=="string"?Ae(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}}),Ps=h("$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"?Ae(i):i?Ae(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}}),As=h("$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}}),Ls=h("$ZodTransform",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new yn(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 qe;return r.value=n,r}});function Cs(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const zi=h("$ZodOptional",(e,t)=>{L.init(e,t),e._zod.optin="optional",e._zod.optout="optional",R(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),R(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Sn(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=>Cs(o,r.value)):Cs(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),Zs=h("$ZodExactOptional",(e,t)=>{zi.init(e,t),R(e._zod,"values",()=>t.innerType._zod.values),R(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),Ms=h("$ZodNullable",(e,t)=>{L.init(e,t),R(e._zod,"optin",()=>t.innerType._zod.optin),R(e._zod,"optout",()=>t.innerType._zod.optout),R(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Sn(r.source)}|null)$`):void 0}),R(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)}),Fs=h("$ZodDefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",R(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=>Rs(o,t)):Rs(n,t)}});function Rs(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Vs=h("$ZodPrefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",R(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))}),Bs=h("$ZodNonOptional",(e,t)=>{L.init(e,t),R(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=>Ks(o,e)):Ks(n,e)}});function Ks(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 Js=h("$ZodSuccess",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new yn("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)}}),Gs=h("$ZodCatch",(e,t)=>{L.init(e,t),R(e._zod,"optin",()=>t.innerType._zod.optin),R(e._zod,"optout",()=>t.innerType._zod.optout),R(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,ce()))},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,ce()))},input:r.value}),r.issues=[]),r)}}),Ws=h("$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)}),Hs=h("$ZodPipe",(e,t)=>{L.init(e,t),R(e._zod,"values",()=>t.in._zod.values),R(e._zod,"optin",()=>t.in._zod.optin),R(e._zod,"optout",()=>t.out._zod.optout),R(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=>Un(a,t.in,i)):Un(o,t.in,i)}const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Un(o,t.out,i)):Un(n,t.out,i)}});function Un(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const Ei=h("$ZodCodec",(e,t)=>{L.init(e,t),R(e._zod,"values",()=>t.in._zod.values),R(e._zod,"optin",()=>t.in._zod.optin),R(e._zod,"optout",()=>t.out._zod.optout),R(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=>Nn(e,o,t.out,r)):Nn(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>Nn(e,o,t.in,r)):Nn(e,n,t.in,r)}}function Nn(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}const qs=h("$ZodReadonly",(e,t)=>{L.init(e,t),R(e._zod,"propValues",()=>t.innerType._zod.propValues),R(e._zod,"values",()=>t.innerType._zod.values),R(e._zod,"optin",()=>{var r,i;return(i=(r=t.innerType)==null?void 0:r._zod)==null?void 0:i.optin}),R(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(Xs):Xs(n)}});function Xs(e){return e.value=Object.freeze(e.value),e}const Ys=h("$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||fu.has(typeof i))r.push(Ae(`${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)}),Qs=h("$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?ui(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?ui(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 ci(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await ci(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 Ti({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)),el=h("$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))}),tl=h("$ZodLazy",(e,t)=>{L.init(e,t),R(e._zod,"innerType",()=>t.getter()),R(e._zod,"pattern",()=>{var r,i;return(i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.pattern}),R(e._zod,"propValues",()=>{var r,i;return(i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.propValues}),R(e._zod,"optin",()=>{var r,i;return((i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.optin)??void 0}),R(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)}),nl=h("$ZodCustom",(e,t)=>{Y.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=>rl(o,r,i,e));rl(n,r,i,e)}});function rl(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(ft(n))}}const jg=()=>{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])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${$(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?"ة":""}: ${$(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function Pg(){return{localeError:jg()}}const Ag=()=>{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: ${$(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":""}: ${$(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 Lg(){return{localeError:Ag()}}function il(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 Cg=()=>{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])}`:`Няправільны варыянт: чакаўся адзін з ${$(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=il(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=il(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?"ключы":"ключ"}: ${$(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function Zg(){return{localeError:Cg()}}const Mg=()=>{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])}`:`Невалидна опция: очаквано едно от ${$(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?"ове":""}: ${$(n.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${n.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${n.origin}`;default:return"Невалиден вход"}}};function Fg(){return{localeError:Mg()}}const Rg=()=>{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 ${$(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":""}: ${$(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 Vg(){return{localeError:Rg()}}const Bg=()=>{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 ${$(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: ${$(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 Kg(){return{localeError:Bg()}}const Jg=()=>{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 ${$(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"}: ${$(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 Gg(){return{localeError:Jg()}}const Wg=()=>{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 ${$(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"}: ${$(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 Hg(){return{localeError:Wg()}}const qg=()=>{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 ${$(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":""}: ${$(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 ol(){return{localeError:qg()}}const Xg=()=>{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 ${$(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":""}: ${$(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 Yg(){return{localeError:Xg()}}const Qg=()=>{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 ${$(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":""}: ${$(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 ev(){return{localeError:Qg()}}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:"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])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${$(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?"های":""} ناشناس: ${$(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function nv(){return{localeError:tv()}}const rv=()=>{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: ${$(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"}: ${$(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 iv(){return{localeError:rv()}}const ov=()=>{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 ${$(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":""} : ${$(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 av(){return{localeError:ov()}}const uv=()=>{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 ${$(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":""} : ${$(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 cv(){return{localeError:uv()}}const sv=()=>{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),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`ערך לא תקין: הערך חייב להיות ${D(c.values[0])}`;const d=c.values.map(g=>D(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 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?"<=":"<",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 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?">=":">",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,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?"ים":"ה"}: ${$(c.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n(c.origin??"array")}`;default:return"קלט לא תקין"}}};function lv(){return{localeError:sv()}}const dv=()=>{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 ${$(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":""}: ${$(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 fv(){return{localeError:dv()}}function al(e,t,r){return Math.abs(e)===1?t:r}function pt(e){if(!e)return"";const t=["ա","ե","ը","ի","ո","ու","օ"],r=e[e.length-1];return e+(t.includes(r)?"ն":"ը")}const mv=()=>{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])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${$(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=al(u,a.unit.one,a.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${pt(n.origin??"արժեք")} կունենա ${o}${n.maximum.toString()} ${s}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${pt(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=al(u,a.unit.one,a.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${pt(n.origin)} կունենա ${o}${n.minimum.toString()} ${s}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${pt(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,", ")}`;case"invalid_key":return`Սխալ բանալի ${pt(n.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${pt(n.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function pv(){return{localeError:mv()}}const hv=()=>{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 ${$(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":""}: ${$(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 gv(){return{localeError:hv()}}const vv=()=>{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 ${$(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"}: ${$(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 bv(){return{localeError:vv()}}const _v=()=>{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 ${$(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"}: ${$(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 yv(){return{localeError:_v()}}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:"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])}が期待されました`:`無効な選択: ${$(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?"群":""}: ${$(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function wv(){return{localeError:$v()}}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=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])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${$(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?"ები":"ი"}: ${$(n.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${n.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${n.origin}-ში`;default:return"არასწორი შეყვანა"}}};function kv(){return{localeError:Sv()}}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:"អារេ (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])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${$(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,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function ul(){return{localeError:Iv()}}function xv(){return ul()}const Tv=()=>{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])} 이어야 합니다`:`잘못된 옵션: ${$(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`인식할 수 없는 키: ${$(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 Lt=e=>e.charAt(0).toUpperCase()+e.slice(1);function cl(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 Ev=()=>{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š ${$(n.values,"|")} pasirinkimų`;case"too_big":{const o=i[n.origin]??n.origin,a=t(n.origin,cl(Number(n.maximum)),n.inclusive??!1,"smaller");if(a!=null&&a.verb)return`${Lt(o??n.origin??"reikšmė")} ${a.verb} ${n.maximum.toString()} ${a.unit??"elementų"}`;const u=n.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Lt(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,cl(Number(n.minimum)),n.inclusive??!1,"bigger");if(a!=null&&a.verb)return`${Lt(o??n.origin??"reikšmė")} ${a.verb} ${n.minimum.toString()} ${a.unit??"elementų"}`;const u=n.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Lt(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"}: ${$(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`${Lt(o??n.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Ov(){return{localeError:Ev()}}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=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])}`:`Грешана опција: се очекува една ${$(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?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${$(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function Dv(){return{localeError:Uv()}}const Nv=()=>{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 ${$(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: ${$(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 jv(){return{localeError:Nv()}}const Pv=()=>{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 ${$(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":""}: ${$(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 Av(){return{localeError:Pv()}}const Lv=()=>{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 ${$(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"}: ${$(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 Cv(){return{localeError:Lv()}}const Zv=()=>{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 ${$(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":""}: ${$(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 Mv(){return{localeError:Zv()}}const Fv=()=>{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])} وای`:`ناسم انتخاب: باید یو له ${$(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?"کلیډونه":"کلیډ"}: ${$(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function Rv(){return{localeError:Fv()}}const Vv=()=>{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 ${$(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":""}: ${$(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 Bv(){return{localeError:Vv()}}const Kv=()=>{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 ${$(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":""}: ${$(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 Jv(){return{localeError:Kv()}}function sl(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 Gv=()=>{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])}`:`Неверный вариант: ожидалось одно из ${$(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=sl(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=sl(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?"и":""}: ${$(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:"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 ${$(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č"}: ${$(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 qv(){return{localeError:Hv()}}const Xv=()=>{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 ${$(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"}: ${$(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 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:"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])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${$(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?"கள்":""}: ${$(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function eb(){return{localeError:Qv()}}const tb=()=>{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])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${$(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,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function nb(){return{localeError:tb()}}const rb=()=>{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ı: ${$(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":""}: ${$(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 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:"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])}`:`Неправильна опція: очікується одне з ${$(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?"і":""}: ${$(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function ll(){return{localeError:ob()}}function ab(){return ll()}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:"یو آر ایل",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])} متوقع تھا`:`غلط آپشن: ${$(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?"ز":""}: ${$(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function cb(){return{localeError:ub()}}const sb=()=>{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 ${$(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":""}: ${$(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 lb(){return{localeError:sb()}}const db=()=>{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ị ${$(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: ${$(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 fb(){return{localeError:db()}}const mb=()=>{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])}`:`无效选项:期望以下之一 ${$(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): ${$(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function pb(){return{localeError:mb()}}const hb=()=>{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])}`:`無效的選項:預期為以下其中之一 ${$(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?"們":""}:${$(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function gb(){return{localeError:hb()}}const vb=()=>{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 ${$(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ọ̀: ${$(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 bb(){return{localeError:vb()}}const dl=Object.freeze(Object.defineProperty({__proto__:null,ar:Pg,az:Lg,be:Zg,bg:Fg,ca:Vg,cs:Kg,da:Gg,de:Hg,en:ol,eo:Yg,es:ev,fa:nv,fi:iv,fr:av,frCA:cv,he:lv,hu:fv,hy:pv,id:gv,is:bv,it:yv,ja:wv,ka:kv,kh:xv,km:ul,ko:zv,lt:Ov,mk:Dv,ms:jv,nl:Av,no:Cv,ota:Mv,pl:Bv,ps:Rv,pt:Jv,ru:Wv,sl:qv,sv:Yv,ta:eb,th:nb,tr:ib,ua:ab,uk:ll,ur:cb,uz:lb,vi:fb,yo:bb,zhCN:pb,zhTW:gb},Symbol.toStringTag,{value:"Module"}));var fl;const ml=Symbol("ZodOutput"),pl=Symbol("ZodInput");class hl{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 Oi(){return new hl}(fl=globalThis).__zod_globalRegistry??(fl.__zod_globalRegistry=Oi());const we=globalThis.__zod_globalRegistry;function gl(e,t){return new e({type:"string",...b(t)})}function vl(e,t){return new e({type:"string",coerce:!0,...b(t)})}function Ui(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...b(t)})}function jn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...b(t)})}function Di(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...b(t)})}function Ni(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...b(t)})}function ji(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...b(t)})}function Pi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...b(t)})}function Pn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...b(t)})}function Ai(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...b(t)})}function Li(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...b(t)})}function Ci(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...b(t)})}function Zi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...b(t)})}function Mi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...b(t)})}function Fi(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...b(t)})}function Ri(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...b(t)})}function Vi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...b(t)})}function Bi(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...b(t)})}function bl(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...b(t)})}function Ki(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...b(t)})}function Ji(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...b(t)})}function Gi(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...b(t)})}function Wi(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...b(t)})}function Hi(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...b(t)})}function qi(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...b(t)})}const _l={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function yl(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...b(t)})}function $l(e,t){return new e({type:"string",format:"date",check:"string_format",...b(t)})}function wl(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...b(t)})}function Sl(e,t){return new e({type:"string",format:"duration",check:"string_format",...b(t)})}function kl(e,t){return new e({type:"number",checks:[],...b(t)})}function Il(e,t){return new e({type:"number",coerce:!0,checks:[],...b(t)})}function xl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...b(t)})}function Tl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...b(t)})}function zl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...b(t)})}function El(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...b(t)})}function Ol(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...b(t)})}function Ul(e,t){return new e({type:"boolean",...b(t)})}function Dl(e,t){return new e({type:"boolean",coerce:!0,...b(t)})}function Nl(e,t){return new e({type:"bigint",...b(t)})}function jl(e,t){return new e({type:"bigint",coerce:!0,...b(t)})}function Pl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...b(t)})}function Al(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...b(t)})}function Ll(e,t){return new e({type:"symbol",...b(t)})}function Cl(e,t){return new e({type:"undefined",...b(t)})}function Zl(e,t){return new e({type:"null",...b(t)})}function Ml(e){return new e({type:"any"})}function Fl(e){return new e({type:"unknown"})}function Rl(e,t){return new e({type:"never",...b(t)})}function Vl(e,t){return new e({type:"void",...b(t)})}function Bl(e,t){return new e({type:"date",...b(t)})}function Kl(e,t){return new e({type:"date",coerce:!0,...b(t)})}function Jl(e,t){return new e({type:"nan",...b(t)})}function Be(e,t){return new yi({check:"less_than",...b(t),value:e,inclusive:!1})}function Se(e,t){return new yi({check:"less_than",...b(t),value:e,inclusive:!0})}function Ke(e,t){return new $i({check:"greater_than",...b(t),value:e,inclusive:!1})}function he(e,t){return new $i({check:"greater_than",...b(t),value:e,inclusive:!0})}function Xi(e){return Ke(0,e)}function Yi(e){return Be(0,e)}function Qi(e){return Se(0,e)}function eo(e){return he(0,e)}function ht(e,t){return new mc({check:"multiple_of",...b(t),value:e})}function gt(e,t){return new gc({check:"max_size",...b(t),maximum:e})}function Je(e,t){return new vc({check:"min_size",...b(t),minimum:e})}function Ct(e,t){return new bc({check:"size_equals",...b(t),size:e})}function Zt(e,t){return new _c({check:"max_length",...b(t),maximum:e})}function et(e,t){return new yc({check:"min_length",...b(t),minimum:e})}function Mt(e,t){return new $c({check:"length_equals",...b(t),length:e})}function An(e,t){return new wc({check:"string_format",format:"regex",...b(t),pattern:e})}function Ln(e){return new Sc({check:"string_format",format:"lowercase",...b(e)})}function Cn(e){return new kc({check:"string_format",format:"uppercase",...b(e)})}function Zn(e,t){return new Ic({check:"string_format",format:"includes",...b(t),includes:e})}function Mn(e,t){return new xc({check:"string_format",format:"starts_with",...b(t),prefix:e})}function Fn(e,t){return new Tc({check:"string_format",format:"ends_with",...b(t),suffix:e})}function to(e,t,r){return new Ec({check:"property",property:e,schema:t,...b(r)})}function Rn(e,t){return new Oc({check:"mime_type",mime:e,...b(t)})}function Le(e){return new Uc({check:"overwrite",tx:e})}function Vn(e){return Le(t=>t.normalize(e))}function Bn(){return Le(e=>e.trim())}function Kn(){return Le(e=>e.toLowerCase())}function Jn(){return Le(e=>e.toUpperCase())}function Gn(){return Le(e=>lu(e))}function Gl(e,t,r){return new e({type:"array",element:t,...b(r)})}function _b(e,t,r){return new e({type:"union",options:t,...b(r)})}function yb(e,t,r){return new e({type:"union",options:t,inclusive:!1,...b(r)})}function $b(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...b(i)})}function wb(e,t,r){return new e({type:"intersection",left:t,right:r})}function Sb(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 kb(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...b(i)})}function Ib(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...b(i)})}function xb(e,t,r){return new e({type:"set",valueType:t,...b(r)})}function Tb(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 zb(e,t,r){return new e({type:"enum",entries:t,...b(r)})}function Eb(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...b(r)})}function Wl(e,t){return new e({type:"file",...b(t)})}function Ob(e,t){return new e({type:"transform",transform:t})}function Ub(e,t){return new e({type:"optional",innerType:t})}function Db(e,t){return new e({type:"nullable",innerType:t})}function Nb(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():kn(r)}})}function jb(e,t,r){return new e({type:"nonoptional",innerType:t,...b(r)})}function Pb(e,t){return new e({type:"success",innerType:t})}function Ab(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function Lb(e,t,r){return new e({type:"pipe",in:t,out:r})}function Cb(e,t){return new e({type:"readonly",innerType:t})}function Zb(e,t,r){return new e({type:"template_literal",parts:t,...b(r)})}function Mb(e,t){return new e({type:"lazy",getter:t})}function Fb(e,t){return new e({type:"promise",innerType:t})}function Hl(e,t,r){const i=b(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function ql(e,t,r){return new e({type:"custom",check:"custom",fn:t,...b(r)})}function Xl(e){const t=Yl(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(ft(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(ft(n))}},e(r.value,r)));return t}function Yl(e,t){const r=new Y({check:"custom",...b(t)});return r._zod.check=e,r}function Ql(e){const t=new Y({check:"describe"});return t._zod.onattach=[r=>{const i=we.get(r)??{};we.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function ed(e){const t=new Y({check:"meta"});return t._zod.onattach=[r=>{const i=we.get(r)??{};we.add(r,{...i,...e})}],t._zod.check=()=>{},t}function td(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??Ei,s=e.Boolean??ki,c=e.String??At,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 p=m;return r.case!=="sensitive"&&(p=p.toLowerCase()),o.has(p)?!0:a.has(p)?!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 Ft(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 vt(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)??we,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 J(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,p=t.processors[n.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);p(e,t,g,f)}const m=e._zod.parent;m&&(a.ref||(a.ref=m),J(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 bt(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??(z=>z);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}/`,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 p in g)delete g[p];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 O=m.compile();return(E,R)=>O(f,E,R)};let o;const a=lt,u=!wn.jitless,c=u&&lu.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?_s([],h,f,m,d,e):f):r(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function ws(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 On=g("$ZodUnion",(e,t)=>{C.init(e,t),F(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),F(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),F(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),F(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=>kn(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=>ws(s,n,e,o)):ws(u,n,e,o)}});function Ss(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 ks=g("$ZodXor",(e,t)=>{On.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=>Ss(s,n,e,o)):Ss(u,n,e,o)}}),Is=g("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,On.init(e,t);const r=e._zod.parse;F(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=Tt(()=>{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)}}),xs=g("$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])=>Ts(r,s,c)):Ts(r,o,a)}});function xi(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=xi(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=xi(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 Ts(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=xi(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 Ti=g("$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(...Ie(r,e.issues)),t.value[r]=e.value}const zs=g("$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(...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"&&bi.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(...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}}),Es=g("$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])=>{Os(l,d,r,a,n,e,i)})):Os(s,c,r,a,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function Os(e,t,r,i,n,o,a){e.issues.length&&(xn.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=>ye(u,a,se()))})),t.issues.length&&(xn.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=>ye(u,a,se()))})),r.value.set(e.value,t.value)}const Us=g("$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=>Ds(s,r))):Ds(u,r)}return o.length?Promise.all(o).then(()=>r):r}});function Ds(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const Ns=g("$ZodEnum",(e,t)=>{C.init(e,t);const r=ti(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}}),js=g("$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}}),Ps=g("$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}}),As=g("$ZodTransform",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new $n(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 He;return r.value=n,r}});function Ls(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const zi=g("$ZodOptional",(e,t)=>{C.init(e,t),e._zod.optin="optional",e._zod.optout="optional",F(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),F(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${kn(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=>Ls(o,r.value)):Ls(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),Cs=g("$ZodExactOptional",(e,t)=>{zi.init(e,t),F(e._zod,"values",()=>t.innerType._zod.values),F(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),Zs=g("$ZodNullable",(e,t)=>{C.init(e,t),F(e._zod,"optin",()=>t.innerType._zod.optin),F(e._zod,"optout",()=>t.innerType._zod.optout),F(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${kn(r.source)}|null)$`):void 0}),F(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)}),Ms=g("$ZodDefault",(e,t)=>{C.init(e,t),e._zod.optin="optional",F(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=>Fs(o,t)):Fs(n,t)}});function Fs(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Rs=g("$ZodPrefault",(e,t)=>{C.init(e,t),e._zod.optin="optional",F(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))}),Vs=g("$ZodNonOptional",(e,t)=>{C.init(e,t),F(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=>Bs(o,e)):Bs(n,e)}});function Bs(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 Ks=g("$ZodSuccess",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new $n("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)}}),Js=g("$ZodCatch",(e,t)=>{C.init(e,t),F(e._zod,"optin",()=>t.innerType._zod.optin),F(e._zod,"optout",()=>t.innerType._zod.optout),F(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)}}),Gs=g("$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)}),qs=g("$ZodPipe",(e,t)=>{C.init(e,t),F(e._zod,"values",()=>t.in._zod.values),F(e._zod,"optin",()=>t.in._zod.optin),F(e._zod,"optout",()=>t.out._zod.optout),F(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=>Dn(a,t.in,i)):Dn(o,t.in,i)}const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Dn(o,t.out,i)):Dn(n,t.out,i)}});function Dn(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const Ei=g("$ZodCodec",(e,t)=>{C.init(e,t),F(e._zod,"values",()=>t.in._zod.values),F(e._zod,"optin",()=>t.in._zod.optin),F(e._zod,"optout",()=>t.out._zod.optout),F(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=>Nn(a,t,i)):Nn(o,t,i)}else{const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>Nn(a,t,i)):Nn(o,t,i)}}});function Nn(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=>jn(e,o,t.out,r)):jn(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>jn(e,o,t.in,r)):jn(e,n,t.in,r)}}function jn(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}const Ws=g("$ZodReadonly",(e,t)=>{C.init(e,t),F(e._zod,"propValues",()=>t.innerType._zod.propValues),F(e._zod,"values",()=>t.innerType._zod.values),F(e._zod,"optin",()=>{var r,i;return(i=(r=t.innerType)==null?void 0:r._zod)==null?void 0:i.optin}),F(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(Hs):Hs(n)}});function Hs(e){return e.value=Object.freeze(e.value),e}const Xs=g("$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||du.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)}),Ys=g("$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?ui(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?ui(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 ci(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await ci(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 Ti({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)),Qs=g("$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))}),el=g("$ZodLazy",(e,t)=>{C.init(e,t),F(e._zod,"innerType",()=>t.getter()),F(e._zod,"pattern",()=>{var r,i;return(i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.pattern}),F(e._zod,"propValues",()=>{var r,i;return(i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.propValues}),F(e._zod,"optin",()=>{var r,i;return((i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.optin)??void 0}),F(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)}),tl=g("$ZodCustom",(e,t)=>{Y.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=>nl(o,r,i,e));nl(n,r,i,e)}});function nl(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 Ng=()=>{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=j(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?`مدخلات غير مقبولة: يفترض إدخال ${N(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${$(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?"ة":""}: ${$(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function jg(){return{localeError:Ng()}}const Pg=()=>{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=j(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 ${N(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${$(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":""}: ${$(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 Ag(){return{localeError:Pg()}}function rl(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 Lg=()=>{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=j(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?`Няправільны ўвод: чакалася ${N(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${$(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=rl(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=rl(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?"ключы":"ключ"}: ${$(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function Cg(){return{localeError:Lg()}}const Zg=()=>{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=j(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?`Невалиден вход: очакван ${N(n.values[0])}`:`Невалидна опция: очаквано едно от ${$(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?"ове":""}: ${$(n.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${n.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${n.origin}`;default:return"Невалиден вход"}}};function Mg(){return{localeError:Zg()}}const Fg=()=>{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=j(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 ${N(n.values[0])}`:`Opció invàlida: s'esperava una de ${$(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":""}: ${$(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 Rg(){return{localeError:Fg()}}const Vg=()=>{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=j(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 ${N(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${$(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: ${$(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 Bg(){return{localeError:Vg()}}const Kg=()=>{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=j(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 ${N(n.values[0])}`:`Ugyldigt valg: forventede en af følgende ${$(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"}: ${$(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 Jg(){return{localeError:Kg()}}const Gg=()=>{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=j(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 ${N(n.values[0])}`:`Ungültige Option: erwartet eine von ${$(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"}: ${$(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 qg(){return{localeError:Gg()}}const Wg=()=>{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=j(n.input),u=i[a]??a;return`Invalid input: expected ${o}, received ${u}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${N(n.values[0])}`:`Invalid option: expected one of ${$(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":""}: ${$(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 il(){return{localeError:Wg()}}const Hg=()=>{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=j(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 ${N(n.values[0])}`:`Nevalida opcio: atendiĝis unu el ${$(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":""}: ${$(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 Xg(){return{localeError:Hg()}}const Yg=()=>{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=j(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 ${N(n.values[0])}`:`Opción inválida: se esperaba una de ${$(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":""}: ${$(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 Qg(){return{localeError:Yg()}}const ev=()=>{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=j(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?`ورودی نامعتبر: می‌بایست ${N(n.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${$(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?"های":""} ناشناس: ${$(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function tv(){return{localeError:ev()}}const nv=()=>{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=j(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 ${N(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${$(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"}: ${$(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 rv(){return{localeError:nv()}}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 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=j(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 : ${N(n.values[0])} attendu`:`Option invalide : une valeur parmi ${$(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":""} : ${$(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 ov(){return{localeError:iv()}}const av=()=>{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=j(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 ${N(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${$(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":""} : ${$(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 uv(){return{localeError:av()}}const cv=()=>{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=j(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`ערך לא תקין: הערך חייב להיות ${N(c.values[0])}`;const d=c.values.map(h=>N(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?"ים":"ה"}: ${$(c.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n(c.origin??"array")}`;default:return"קלט לא תקין"}}};function sv(){return{localeError:cv()}}const lv=()=>{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=j(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 ${N(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${$(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":""}: ${$(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 dv(){return{localeError:lv()}}function ol(e,t,r){return Math.abs(e)===1?t:r}function mt(e){if(!e)return"";const t=["ա","ե","ը","ի","ո","ու","օ"],r=e[e.length-1];return e+(t.includes(r)?"ն":"ը")}const fv=()=>{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=j(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?`Սխալ մուտքագրում․ սպասվում էր ${N(n.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${$(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=ol(u,a.unit.one,a.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${mt(n.origin??"արժեք")} կունենա ${o}${n.maximum.toString()} ${s}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${mt(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=ol(u,a.unit.one,a.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${mt(n.origin)} կունենա ${o}${n.minimum.toString()} ${s}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${mt(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,", ")}`;case"invalid_key":return`Սխալ բանալի ${mt(n.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${mt(n.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function mv(){return{localeError:fv()}}const pv=()=>{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=j(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 ${N(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${$(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":""}: ${$(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 hv(){return{localeError:pv()}}const gv=()=>{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=j(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 ${N(n.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${$(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"}: ${$(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 vv(){return{localeError:gv()}}const bv=()=>{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=j(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 ${N(n.values[0])}`:`Opzione non valida: atteso uno tra ${$(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"}: ${$(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 _v(){return{localeError:bv()}}const yv=()=>{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=j(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?`無効な入力: ${N(n.values[0])}が期待されました`:`無効な選択: ${$(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?"群":""}: ${$(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function $v(){return{localeError:yv()}}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:"თარიღი-დრო",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=j(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?`არასწორი შეყვანა: მოსალოდნელი ${N(n.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${$(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?"ები":"ი"}: ${$(n.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${n.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${n.origin}-ში`;default:return"არასწორი შეყვანა"}}};function Sv(){return{localeError:wv()}}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:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=j(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?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${N(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${$(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,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function al(){return{localeError:kv()}}function Iv(){return al()}const xv=()=>{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=j(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?`잘못된 입력: 값은 ${N(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${$(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`인식할 수 없는 키: ${$(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function Tv(){return{localeError:xv()}}const Lt=e=>e.charAt(0).toUpperCase()+e.slice(1);function ul(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 zv=()=>{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=j(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 ${N(n.values[0])}`:`Privalo būti vienas iš ${$(n.values,"|")} pasirinkimų`;case"too_big":{const o=i[n.origin]??n.origin,a=t(n.origin,ul(Number(n.maximum)),n.inclusive??!1,"smaller");if(a!=null&&a.verb)return`${Lt(o??n.origin??"reikšmė")} ${a.verb} ${n.maximum.toString()} ${a.unit??"elementų"}`;const u=n.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Lt(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,ul(Number(n.minimum)),n.inclusive??!1,"bigger");if(a!=null&&a.verb)return`${Lt(o??n.origin??"reikšmė")} ${a.verb} ${n.minimum.toString()} ${a.unit??"elementų"}`;const u=n.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Lt(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"}: ${$(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`${Lt(o??n.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Ev(){return{localeError:zv()}}const Ov=()=>{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=j(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 ${N(n.values[0])}`:`Грешана опција: се очекува една ${$(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?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${$(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function Uv(){return{localeError:Ov()}}const Dv=()=>{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=j(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 ${N(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${$(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: ${$(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 Nv(){return{localeError:Dv()}}const jv=()=>{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=j(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 ${N(n.values[0])}`:`Ongeldige optie: verwacht één van ${$(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":""}: ${$(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 Pv(){return{localeError:jv()}}const Av=()=>{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=j(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 ${N(n.values[0])}`:`Ugyldig valg: forventet en av ${$(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"}: ${$(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 Lv(){return{localeError:Av()}}const Cv=()=>{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=j(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 ${N(n.values[0])}`:`Fâsit tercih: mûteberler ${$(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":""}: ${$(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 Zv(){return{localeError:Cv()}}const Mv=()=>{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=j(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?`ناسم ورودي: باید ${N(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${$(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?"کلیډونه":"کلیډ"}: ${$(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function Fv(){return{localeError:Mv()}}const Rv=()=>{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=j(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 ${N(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${$(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":""}: ${$(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 Vv(){return{localeError:Rv()}}const Bv=()=>{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=j(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 ${N(n.values[0])}`:`Opção inválida: esperada uma das ${$(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":""}: ${$(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 Kv(){return{localeError:Bv()}}function cl(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 Jv=()=>{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=j(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?`Неверный ввод: ожидалось ${N(n.values[0])}`:`Неверный вариант: ожидалось одно из ${$(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=cl(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=cl(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?"и":""}: ${$(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function Gv(){return{localeError:Jv()}}const qv=()=>{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=j(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 ${N(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${$(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č"}: ${$(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 Wv(){return{localeError:qv()}}const Hv=()=>{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=j(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 ${N(n.values[0])}`:`Ogiltigt val: förväntade en av ${$(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"}: ${$(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 Xv(){return{localeError:Hv()}}const Yv=()=>{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=j(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?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${N(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${$(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?"கள்":""}: ${$(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function Qv(){return{localeError:Yv()}}const eb=()=>{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=j(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?`ค่าไม่ถูกต้อง: ควรเป็น ${N(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${$(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,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function tb(){return{localeError:eb()}}const nb=()=>{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=j(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 ${N(n.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${$(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":""}: ${$(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 rb(){return{localeError:nb()}}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:"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=j(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?`Неправильні вхідні дані: очікується ${N(n.values[0])}`:`Неправильна опція: очікується одне з ${$(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?"і":""}: ${$(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function sl(){return{localeError:ib()}}function ob(){return sl()}const ab=()=>{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=j(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?`غلط ان پٹ: ${N(n.values[0])} متوقع تھا`:`غلط آپشن: ${$(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?"ز":""}: ${$(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function ub(){return{localeError:ab()}}const cb=()=>{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=j(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 ${N(n.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${$(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":""}: ${$(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 sb(){return{localeError:cb()}}const lb=()=>{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=j(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 ${N(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${$(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: ${$(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 db(){return{localeError:lb()}}const fb=()=>{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=j(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?`无效输入:期望 ${N(n.values[0])}`:`无效选项:期望以下之一 ${$(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): ${$(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function mb(){return{localeError:fb()}}const pb=()=>{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=j(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?`無效的輸入值:預期為 ${N(n.values[0])}`:`無效的選項:預期為以下其中之一 ${$(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?"們":""}:${$(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function hb(){return{localeError:pb()}}const gb=()=>{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=j(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 ${N(n.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${$(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ọ̀: ${$(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 vb(){return{localeError:gb()}}const ll=Object.freeze(Object.defineProperty({__proto__:null,ar:jg,az:Ag,be:Cg,bg:Mg,ca:Rg,cs:Bg,da:Jg,de:qg,en:il,eo:Xg,es:Qg,fa:tv,fi:rv,fr:ov,frCA:uv,he:sv,hu:dv,hy:mv,id:hv,is:vv,it:_v,ja:$v,ka:Sv,kh:Iv,km:al,ko:Tv,lt:Ev,mk:Uv,ms:Nv,nl:Pv,no:Lv,ota:Zv,pl:Vv,ps:Fv,pt:Kv,ru:Gv,sl:Wv,sv:Xv,ta:Qv,th:tb,tr:rb,ua:ob,uk:sl,ur:ub,uz:sb,vi:db,yo:vb,zhCN:mb,zhTW:hb},Symbol.toStringTag,{value:"Module"}));var dl;const fl=Symbol("ZodOutput"),ml=Symbol("ZodInput");class pl{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 Oi(){return new pl}(dl=globalThis).__zod_globalRegistry??(dl.__zod_globalRegistry=Oi());const $e=globalThis.__zod_globalRegistry;function hl(e,t){return new e({type:"string",...b(t)})}function gl(e,t){return new e({type:"string",coerce:!0,...b(t)})}function Ui(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...b(t)})}function Pn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...b(t)})}function Di(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...b(t)})}function Ni(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...b(t)})}function ji(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...b(t)})}function Pi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...b(t)})}function An(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...b(t)})}function Ai(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...b(t)})}function Li(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...b(t)})}function Ci(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...b(t)})}function Zi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...b(t)})}function Mi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...b(t)})}function Fi(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...b(t)})}function Ri(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...b(t)})}function Vi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...b(t)})}function Bi(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...b(t)})}function vl(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...b(t)})}function Ki(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...b(t)})}function Ji(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...b(t)})}function Gi(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...b(t)})}function qi(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...b(t)})}function Wi(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...b(t)})}function Hi(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...b(t)})}const bl={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function _l(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...b(t)})}function yl(e,t){return new e({type:"string",format:"date",check:"string_format",...b(t)})}function $l(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...b(t)})}function wl(e,t){return new e({type:"string",format:"duration",check:"string_format",...b(t)})}function Sl(e,t){return new e({type:"number",checks:[],...b(t)})}function kl(e,t){return new e({type:"number",coerce:!0,checks:[],...b(t)})}function Il(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 Tl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...b(t)})}function zl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...b(t)})}function El(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...b(t)})}function Ol(e,t){return new e({type:"boolean",...b(t)})}function Ul(e,t){return new e({type:"boolean",coerce:!0,...b(t)})}function Dl(e,t){return new e({type:"bigint",...b(t)})}function Nl(e,t){return new e({type:"bigint",coerce:!0,...b(t)})}function jl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...b(t)})}function Pl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...b(t)})}function Al(e,t){return new e({type:"symbol",...b(t)})}function Ll(e,t){return new e({type:"undefined",...b(t)})}function Cl(e,t){return new e({type:"null",...b(t)})}function Zl(e){return new e({type:"any"})}function Ml(e){return new e({type:"unknown"})}function Fl(e,t){return new e({type:"never",...b(t)})}function Rl(e,t){return new e({type:"void",...b(t)})}function Vl(e,t){return new e({type:"date",...b(t)})}function Bl(e,t){return new e({type:"date",coerce:!0,...b(t)})}function Kl(e,t){return new e({type:"nan",...b(t)})}function Re(e,t){return new yi({check:"less_than",...b(t),value:e,inclusive:!1})}function we(e,t){return new yi({check:"less_than",...b(t),value:e,inclusive:!0})}function Ve(e,t){return new $i({check:"greater_than",...b(t),value:e,inclusive:!1})}function pe(e,t){return new $i({check:"greater_than",...b(t),value:e,inclusive:!0})}function Xi(e){return Ve(0,e)}function Yi(e){return Re(0,e)}function Qi(e){return we(0,e)}function eo(e){return pe(0,e)}function pt(e,t){return new fc({check:"multiple_of",...b(t),value:e})}function ht(e,t){return new hc({check:"max_size",...b(t),maximum:e})}function Be(e,t){return new gc({check:"min_size",...b(t),minimum:e})}function Ct(e,t){return new vc({check:"size_equals",...b(t),size:e})}function Zt(e,t){return new bc({check:"max_length",...b(t),maximum:e})}function et(e,t){return new _c({check:"min_length",...b(t),minimum:e})}function Mt(e,t){return new yc({check:"length_equals",...b(t),length:e})}function Ln(e,t){return new $c({check:"string_format",format:"regex",...b(t),pattern:e})}function Cn(e){return new wc({check:"string_format",format:"lowercase",...b(e)})}function Zn(e){return new Sc({check:"string_format",format:"uppercase",...b(e)})}function Mn(e,t){return new kc({check:"string_format",format:"includes",...b(t),includes:e})}function Fn(e,t){return new Ic({check:"string_format",format:"starts_with",...b(t),prefix:e})}function Rn(e,t){return new xc({check:"string_format",format:"ends_with",...b(t),suffix:e})}function to(e,t,r){return new zc({check:"property",property:e,schema:t,...b(r)})}function Vn(e,t){return new Ec({check:"mime_type",mime:e,...b(t)})}function Ae(e){return new Oc({check:"overwrite",tx:e})}function Bn(e){return Ae(t=>t.normalize(e))}function Kn(){return Ae(e=>e.trim())}function Jn(){return Ae(e=>e.toLowerCase())}function Gn(){return Ae(e=>e.toUpperCase())}function qn(){return Ae(e=>su(e))}function Jl(e,t,r){return new e({type:"array",element:t,...b(r)})}function bb(e,t,r){return new e({type:"union",options:t,...b(r)})}function _b(e,t,r){return new e({type:"union",options:t,inclusive:!1,...b(r)})}function yb(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...b(i)})}function $b(e,t,r){return new e({type:"intersection",left:t,right:r})}function wb(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 Sb(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...b(i)})}function kb(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...b(i)})}function Ib(e,t,r){return new e({type:"set",valueType:t,...b(r)})}function xb(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 Tb(e,t,r){return new e({type:"enum",entries:t,...b(r)})}function zb(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...b(r)})}function Gl(e,t){return new e({type:"file",...b(t)})}function Eb(e,t){return new e({type:"transform",transform:t})}function Ob(e,t){return new e({type:"optional",innerType:t})}function Ub(e,t){return new e({type:"nullable",innerType:t})}function Db(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():In(r)}})}function Nb(e,t,r){return new e({type:"nonoptional",innerType:t,...b(r)})}function jb(e,t){return new e({type:"success",innerType:t})}function Pb(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function Ab(e,t,r){return new e({type:"pipe",in:t,out:r})}function Lb(e,t){return new e({type:"readonly",innerType:t})}function Cb(e,t,r){return new e({type:"template_literal",parts:t,...b(r)})}function Zb(e,t){return new e({type:"lazy",getter:t})}function Mb(e,t){return new e({type:"promise",innerType:t})}function ql(e,t,r){const i=b(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Wl(e,t,r){return new e({type:"custom",check:"custom",fn:t,...b(r)})}function Hl(e){const t=Xl(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 Xl(e,t){const r=new Y({check:"custom",...b(t)});return r._zod.check=e,r}function Yl(e){const t=new Y({check:"describe"});return t._zod.onattach=[r=>{const i=$e.get(r)??{};$e.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function Ql(e){const t=new Y({check:"meta"});return t._zod.onattach=[r=>{const i=$e.get(r)??{};$e.add(r,{...i,...e})}],t._zod.check=()=>{},t}function ed(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??Ei,s=e.Boolean??ki,c=e.String??At,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 Ft(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)??$e,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 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),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"&&fe(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??(z=>z);if(v)return{ref:w(v)};const O=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=O,{defId:O,ref:`${w("__shared")}#/${d}/${O}`}}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 _t(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 g=c._zod.parent;if(g&&g!==m){i(g);const p=e.seen.get(g);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:Rt(t,"input",e.processors),output:Rt(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 nd=(e,t={})=>r=>{const i=vt({...r,processors:t});return J(e,i),bt(i,e),_t(i,e)},Rt=(e,t,r={})=>i=>{const{libraryOptions:n,target:o}=i??{},a=vt({...n??{},target:o,io:t,processors:r});return J(e,a),bt(a,e),_t(a,e)},Rb={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rd=(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=Rb[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}))])}},id=(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)},od=(e,t,r,i)=>{r.type="boolean"},ad=(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")},cd=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},sd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},ld=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},dd=(e,t,r,i)=>{r.not={}},fd=(e,t,r,i)=>{},md=(e,t,r,i)=>{},pd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},hd=(e,t,r,i)=>{const n=e._zod.def,o=ti(n.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},gd=(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},vd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},bd=(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},_d=(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)},yd=(e,t,r,i)=>{r.type="boolean"},$d=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},wd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Sd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},kd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Id=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},xd=(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=J(o.element,t,{...i,path:[...i.path,"items"]})},Td=(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]=J(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=J(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},no=(e,t,r,i)=>{const n=e._zod.def,o=n.inclusive===!1,a=n.options.map((u,s)=>J(u,t,{...i,path:[...i.path,o?"oneOf":"anyOf",s]}));o?r.oneOf=a:r.anyOf=a},zd=(e,t,r,i)=>{const n=e._zod.def,o=J(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=J(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},Ed=(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)=>J(f,t,{...i,path:[...i.path,a,m]})),c=o.rest?J(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)},Od=(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=J(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=J(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=J(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)}},Ud=(e,t,r,i)=>{const n=e._zod.def,o=J(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"}]},Dd=(e,t,r,i)=>{const n=e._zod.def;J(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Nd=(e,t,r,i)=>{const n=e._zod.def;J(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},jd=(e,t,r,i)=>{const n=e._zod.def;J(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)))},Pd=(e,t,r,i)=>{const n=e._zod.def;J(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},Ad=(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;J(o,t,i);const a=t.seen.get(e);a.ref=o},Ld=(e,t,r,i)=>{const n=e._zod.def;J(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},Cd=(e,t,r,i)=>{const n=e._zod.def;J(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},ro=(e,t,r,i)=>{const n=e._zod.def;J(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Zd=(e,t,r,i)=>{const n=e._zod.innerType;J(n,t,i);const o=t.seen.get(e);o.ref=n},io={string:rd,number:id,boolean:od,bigint:ad,symbol:ud,null:cd,undefined:sd,void:ld,never:dd,any:fd,unknown:md,date:pd,enum:hd,literal:gd,nan:vd,template_literal:bd,file:_d,success:yd,custom:$d,function:wd,transform:Sd,map:kd,set:Id,array:xd,object:Td,union:no,intersection:zd,tuple:Ed,record:Od,nullable:Ud,nonoptional:Dd,default:Nd,prefault:jd,catch:Pd,pipe:Ad,readonly:Ld,promise:Cd,optional:ro,lazy:Zd};function Md(e,t){if("_idmap"in e){const i=e,n=vt({...t,processors:io}),o={};for(const s of i._idmap.entries()){const[c,l]=s;J(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;bt(n,l),a[c]=_t(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=vt({...t,processors:io});return J(e,r),bt(r,e),_t(r,e)}class Vb{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=vt({processors:io,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 J(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)),bt(this.ctx,t);const i=_t(this.ctx,t),{"~standard":n,...o}=i;return o}}const Bb=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:fs,$ZodArray:bs,$ZodAsyncError:qe,$ZodBase64:es,$ZodBase64URL:ns,$ZodBigInt:Ii,$ZodBigIntFormat:cs,$ZodBoolean:ki,$ZodCIDRv4:Yc,$ZodCIDRv6:Qc,$ZodCUID:Mc,$ZodCUID2:Fc,$ZodCatch:Gs,$ZodCheck:Y,$ZodCheckBigIntFormat:hc,$ZodCheckEndsWith:Tc,$ZodCheckGreaterThan:$i,$ZodCheckIncludes:Ic,$ZodCheckLengthEquals:$c,$ZodCheckLessThan:yi,$ZodCheckLowerCase:Sc,$ZodCheckMaxLength:_c,$ZodCheckMaxSize:gc,$ZodCheckMimeType:Oc,$ZodCheckMinLength:yc,$ZodCheckMinSize:vc,$ZodCheckMultipleOf:mc,$ZodCheckNumberFormat:pc,$ZodCheckOverwrite:Uc,$ZodCheckProperty:Ec,$ZodCheckRegex:wc,$ZodCheckSizeEquals:bc,$ZodCheckStartsWith:xc,$ZodCheckStringFormat:Pt,$ZodCheckUpperCase:kc,$ZodCodec:Ei,$ZodCustom:nl,$ZodCustomStringFormat:as,$ZodDate:gs,$ZodDefault:Fs,$ZodDiscriminatedUnion:xs,$ZodE164:rs,$ZodEmail:Ac,$ZodEmoji:Cc,$ZodEncodeError:yn,$ZodEnum:js,$ZodError:ii,$ZodExactOptional:Zs,$ZodFile:As,$ZodFunction:Qs,$ZodGUID:jc,$ZodIPv4:Hc,$ZodIPv6:qc,$ZodISODate:Jc,$ZodISODateTime:Kc,$ZodISODuration:Wc,$ZodISOTime:Gc,$ZodIntersection:Ts,$ZodJWT:os,$ZodKSUID:Bc,$ZodLazy:tl,$ZodLiteral:Ps,$ZodMAC:Xc,$ZodMap:Os,$ZodNaN:Ws,$ZodNanoID:Zc,$ZodNever:ps,$ZodNonOptional:Bs,$ZodNull:ds,$ZodNullable:Ms,$ZodNumber:Si,$ZodNumberFormat:us,$ZodObject:$s,$ZodObjectJIT:ws,$ZodOptional:zi,$ZodPipe:Hs,$ZodPrefault:Vs,$ZodPromise:el,$ZodReadonly:qs,$ZodRealError:ge,$ZodRecord:Es,$ZodRegistry:hl,$ZodSet:Ds,$ZodString:At,$ZodStringFormat:W,$ZodSuccess:Js,$ZodSymbol:ss,$ZodTemplateLiteral:Ys,$ZodTransform:Ls,$ZodTuple:Ti,$ZodType:L,$ZodULID:Rc,$ZodURL:Lc,$ZodUUID:Pc,$ZodUndefined:ls,$ZodUnion:En,$ZodUnknown:ms,$ZodVoid:hs,$ZodXID:Vc,$ZodXor:Is,$brand:uu,$constructor:h,$input:pl,$output:ml,Doc:Dc,JSONSchema:Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),JSONSchemaGenerator:Vb,NEVER:au,TimePrecision:_l,_any:Ml,_array:Gl,_base64:Gi,_base64url:Wi,_bigint:Nl,_boolean:Ul,_catch:Ab,_check:Yl,_cidrv4:Ki,_cidrv6:Ji,_coercedBigint:jl,_coercedBoolean:Dl,_coercedDate:Kl,_coercedNumber:Il,_coercedString:vl,_cuid:Ci,_cuid2:Zi,_custom:Hl,_date:Bl,_decode:li,_decodeAsync:fi,_default:Nb,_discriminatedUnion:$b,_e164:Hi,_email:Ui,_emoji:Ai,_encode:si,_encodeAsync:di,_endsWith:Fn,_enum:Tb,_file:Wl,_float32:Tl,_float64:zl,_gt:Ke,_gte:he,_guid:jn,_includes:Zn,_int:xl,_int32:El,_int64:Pl,_intersection:wb,_ipv4:Vi,_ipv6:Bi,_isoDate:$l,_isoDateTime:yl,_isoDuration:Sl,_isoTime:wl,_jwt:qi,_ksuid:Ri,_lazy:Mb,_length:Mt,_literal:Eb,_lowercase:Ln,_lt:Be,_lte:Se,_mac:bl,_map:Ib,_max:Se,_maxLength:Zt,_maxSize:gt,_mime:Rn,_min:he,_minLength:et,_minSize:Je,_multipleOf:ht,_nan:Jl,_nanoid:Li,_nativeEnum:zb,_negative:Yi,_never:Rl,_nonnegative:eo,_nonoptional:jb,_nonpositive:Qi,_normalize:Vn,_null:Zl,_nullable:Db,_number:kl,_optional:Ub,_overwrite:Le,_parse:Et,_parseAsync:Ot,_pipe:Lb,_positive:Xi,_promise:Fb,_property:to,_readonly:Cb,_record:kb,_refine:ql,_regex:An,_safeDecode:pi,_safeDecodeAsync:gi,_safeEncode:mi,_safeEncodeAsync:hi,_safeParse:Ut,_safeParseAsync:Dt,_set:xb,_size:Ct,_slugify:Gn,_startsWith:Mn,_string:gl,_stringFormat:Ft,_stringbool:td,_success:Pb,_superRefine:Xl,_symbol:Ll,_templateLiteral:Zb,_toLowerCase:Kn,_toUpperCase:Jn,_transform:Ob,_trim:Bn,_tuple:Sb,_uint32:Ol,_uint64:Al,_ulid:Mi,_undefined:Cl,_union:_b,_unknown:Fl,_uppercase:Cn,_url:Pn,_uuid:Di,_uuidv4:Ni,_uuidv6:ji,_uuidv7:Pi,_void:Vl,_xid:Fi,_xor:yb,clone:ye,config:ce,createStandardJSONSchemaMethod:Rt,createToJSONSchemaMethod:nd,decode:bg,decodeAsync:yg,describe:Ql,encode:vg,encodeAsync:_g,extractDefs:bt,finalize:_t,flattenError:oi,formatError:ai,globalConfig:$n,globalRegistry:we,initializeContext:vt,isValidBase64:wi,isValidBase64URL:ts,isValidJWT:is,locales:dl,meta:ed,parse:ui,parseAsync:ci,prettifyError:Eu,process:J,regexes:_i,registry:Oi,safeDecode:wg,safeDecodeAsync:kg,safeEncode:$g,safeEncodeAsync:Sg,safeParse:Ou,safeParseAsync:Uu,toDotPath:zu,toJSONSchema:Md,treeifyError:Tu,util:Iu,version:Nc},Symbol.toStringTag,{value:"Module"})),Kb=Object.freeze(Object.defineProperty({__proto__:null,endsWith:Fn,gt:Ke,gte:he,includes:Zn,length:Mt,lowercase:Ln,lt:Be,lte:Se,maxLength:Zt,maxSize:gt,mime:Rn,minLength:et,minSize:Je,multipleOf:ht,negative:Yi,nonnegative:eo,nonpositive:Qi,normalize:Vn,overwrite:Le,positive:Xi,property:to,regex:An,size:Ct,slugify:Gn,startsWith:Mn,toLowerCase:Kn,toUpperCase:Jn,trim:Bn,uppercase:Cn},Symbol.toStringTag,{value:"Module"})),oo=h("ZodISODateTime",(e,t)=>{Kc.init(e,t),H.init(e,t)});function Fd(e){return yl(oo,e)}const ao=h("ZodISODate",(e,t)=>{Jc.init(e,t),H.init(e,t)});function Rd(e){return $l(ao,e)}const uo=h("ZodISOTime",(e,t)=>{Gc.init(e,t),H.init(e,t)});function Vd(e){return wl(uo,e)}const co=h("ZodISODuration",(e,t)=>{Wc.init(e,t),H.init(e,t)});function Bd(e){return Sl(co,e)}const Kd=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:ao,ZodISODateTime:oo,ZodISODuration:co,ZodISOTime:uo,date:Rd,datetime:Fd,duration:Bd,time:Vd},Symbol.toStringTag,{value:"Module"})),Jd=(e,t)=>{ii.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ai(e,r)},flatten:{value:r=>oi(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,wn,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,wn,2)}},isEmpty:{get(){return e.issues.length===0}}})},Jb=h("ZodError",Jd),ve=h("ZodError",Jd,{Parent:Error}),Gd=Et(ve),Wd=Ot(ve),Hd=Ut(ve),qd=Dt(ve),Xd=si(ve),Yd=li(ve),Qd=di(ve),ef=fi(ve),tf=mi(ve),nf=pi(ve),rf=hi(ve),of=gi(ve),M=h("ZodType",(e,t)=>(L.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Rt(e,"input"),output:Rt(e,"output")}}),e.toJSONSchema=nd(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Ne(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)=>ye(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>Gd(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Hd(e,r,i),e.parseAsync=async(r,i)=>Wd(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>qd(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>Xd(e,r,i),e.decode=(r,i)=>Yd(e,r,i),e.encodeAsync=async(r,i)=>Qd(e,r,i),e.decodeAsync=async(r,i)=>ef(e,r,i),e.safeEncode=(r,i)=>tf(e,r,i),e.safeDecode=(r,i)=>nf(e,r,i),e.safeEncodeAsync=async(r,i)=>rf(e,r,i),e.safeDecodeAsync=async(r,i)=>of(e,r,i),e.refine=(r,i)=>e.check(Qo(r,i)),e.superRefine=r=>e.check(ea(r)),e.overwrite=r=>e.check(Le(r)),e.optional=()=>Qt(e),e.exactOptional=()=>Po(e),e.nullable=()=>en(e),e.nullish=()=>Qt(en(e)),e.nonoptional=r=>Fo(e,r),e.array=()=>Ht(e),e.or=r=>gr([e,r]),e.and=r=>Io(e,r),e.transform=r=>tn(e,br(r)),e.default=r=>Co(e,r),e.prefault=r=>Mo(e,r),e.catch=r=>Bo(e,r),e.pipe=r=>tn(e,r),e.readonly=()=>Go(e),e.describe=r=>{const i=e.clone();return we.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){var r;return(r=we.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return we.get(e);const i=e.clone();return we.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Wn=h("_ZodString",(e,t)=>{At.init(e,t),M.init(e,t),e._zod.processJSONSchema=(i,n,o)=>rd(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(An(...i)),e.includes=(...i)=>e.check(Zn(...i)),e.startsWith=(...i)=>e.check(Mn(...i)),e.endsWith=(...i)=>e.check(Fn(...i)),e.min=(...i)=>e.check(et(...i)),e.max=(...i)=>e.check(Zt(...i)),e.length=(...i)=>e.check(Mt(...i)),e.nonempty=(...i)=>e.check(et(1,...i)),e.lowercase=i=>e.check(Ln(i)),e.uppercase=i=>e.check(Cn(i)),e.trim=()=>e.check(Bn()),e.normalize=(...i)=>e.check(Vn(...i)),e.toLowerCase=()=>e.check(Kn()),e.toUpperCase=()=>e.check(Jn()),e.slugify=()=>e.check(Gn())}),Vt=h("ZodString",(e,t)=>{At.init(e,t),Wn.init(e,t),e.email=r=>e.check(Ui(qn,r)),e.url=r=>e.check(Pn(Kt,r)),e.jwt=r=>e.check(qi(dr,r)),e.emoji=r=>e.check(Ai(Xn,r)),e.guid=r=>e.check(jn(Bt,r)),e.uuid=r=>e.check(Di(je,r)),e.uuidv4=r=>e.check(Ni(je,r)),e.uuidv6=r=>e.check(ji(je,r)),e.uuidv7=r=>e.check(Pi(je,r)),e.nanoid=r=>e.check(Li(Yn,r)),e.guid=r=>e.check(jn(Bt,r)),e.cuid=r=>e.check(Ci(Qn,r)),e.cuid2=r=>e.check(Zi(er,r)),e.ulid=r=>e.check(Mi(tr,r)),e.base64=r=>e.check(Gi(cr,r)),e.base64url=r=>e.check(Wi(sr,r)),e.xid=r=>e.check(Fi(nr,r)),e.ksuid=r=>e.check(Ri(rr,r)),e.ipv4=r=>e.check(Vi(ir,r)),e.ipv6=r=>e.check(Bi(or,r)),e.cidrv4=r=>e.check(Ki(ar,r)),e.cidrv6=r=>e.check(Ji(ur,r)),e.e164=r=>e.check(Hi(lr,r)),e.datetime=r=>e.check(Fd(r)),e.date=r=>e.check(Rd(r)),e.time=r=>e.check(Vd(r)),e.duration=r=>e.check(Bd(r))});function Hn(e){return gl(Vt,e)}const H=h("ZodStringFormat",(e,t)=>{W.init(e,t),Wn.init(e,t)}),qn=h("ZodEmail",(e,t)=>{Ac.init(e,t),H.init(e,t)});function af(e){return Ui(qn,e)}const Bt=h("ZodGUID",(e,t)=>{jc.init(e,t),H.init(e,t)});function uf(e){return jn(Bt,e)}const je=h("ZodUUID",(e,t)=>{Pc.init(e,t),H.init(e,t)});function cf(e){return Di(je,e)}function sf(e){return Ni(je,e)}function lf(e){return ji(je,e)}function df(e){return Pi(je,e)}const Kt=h("ZodURL",(e,t)=>{Lc.init(e,t),H.init(e,t)});function ff(e){return Pn(Kt,e)}function mf(e){return Pn(Kt,{protocol:/^https?$/,hostname:qu,...b(e)})}const Xn=h("ZodEmoji",(e,t)=>{Cc.init(e,t),H.init(e,t)});function pf(e){return Ai(Xn,e)}const Yn=h("ZodNanoID",(e,t)=>{Zc.init(e,t),H.init(e,t)});function hf(e){return Li(Yn,e)}const Qn=h("ZodCUID",(e,t)=>{Mc.init(e,t),H.init(e,t)});function gf(e){return Ci(Qn,e)}const er=h("ZodCUID2",(e,t)=>{Fc.init(e,t),H.init(e,t)});function vf(e){return Zi(er,e)}const tr=h("ZodULID",(e,t)=>{Rc.init(e,t),H.init(e,t)});function bf(e){return Mi(tr,e)}const nr=h("ZodXID",(e,t)=>{Vc.init(e,t),H.init(e,t)});function _f(e){return Fi(nr,e)}const rr=h("ZodKSUID",(e,t)=>{Bc.init(e,t),H.init(e,t)});function yf(e){return Ri(rr,e)}const ir=h("ZodIPv4",(e,t)=>{Hc.init(e,t),H.init(e,t)});function $f(e){return Vi(ir,e)}const so=h("ZodMAC",(e,t)=>{Xc.init(e,t),H.init(e,t)});function wf(e){return bl(so,e)}const or=h("ZodIPv6",(e,t)=>{qc.init(e,t),H.init(e,t)});function Sf(e){return Bi(or,e)}const ar=h("ZodCIDRv4",(e,t)=>{Yc.init(e,t),H.init(e,t)});function kf(e){return Ki(ar,e)}const ur=h("ZodCIDRv6",(e,t)=>{Qc.init(e,t),H.init(e,t)});function If(e){return Ji(ur,e)}const cr=h("ZodBase64",(e,t)=>{es.init(e,t),H.init(e,t)});function xf(e){return Gi(cr,e)}const sr=h("ZodBase64URL",(e,t)=>{ns.init(e,t),H.init(e,t)});function Tf(e){return Wi(sr,e)}const lr=h("ZodE164",(e,t)=>{rs.init(e,t),H.init(e,t)});function zf(e){return Hi(lr,e)}const dr=h("ZodJWT",(e,t)=>{os.init(e,t),H.init(e,t)});function Ef(e){return qi(dr,e)}const yt=h("ZodCustomStringFormat",(e,t)=>{as.init(e,t),H.init(e,t)});function Of(e,t,r={}){return Ft(yt,e,t,r)}function Uf(e){return Ft(yt,"hostname",Hu,e)}function Df(e){return Ft(yt,"hex",dc,e)}function Nf(e,t){const r=(t==null?void 0:t.enc)??"hex",i=`${e}_${r}`,n=_i[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return Ft(yt,i,n,t)}const Jt=h("ZodNumber",(e,t)=>{Si.init(e,t),M.init(e,t),e._zod.processJSONSchema=(i,n,o)=>id(e,i,n),e.gt=(i,n)=>e.check(Ke(i,n)),e.gte=(i,n)=>e.check(he(i,n)),e.min=(i,n)=>e.check(he(i,n)),e.lt=(i,n)=>e.check(Be(i,n)),e.lte=(i,n)=>e.check(Se(i,n)),e.max=(i,n)=>e.check(Se(i,n)),e.int=i=>e.check(fr(i)),e.safe=i=>e.check(fr(i)),e.positive=i=>e.check(Ke(0,i)),e.nonnegative=i=>e.check(he(0,i)),e.negative=i=>e.check(Be(0,i)),e.nonpositive=i=>e.check(Se(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 lo(e){return kl(Jt,e)}const tt=h("ZodNumberFormat",(e,t)=>{us.init(e,t),Jt.init(e,t)});function fr(e){return xl(tt,e)}function jf(e){return Tl(tt,e)}function Pf(e){return zl(tt,e)}function Af(e){return El(tt,e)}function Lf(e){return Ol(tt,e)}const Gt=h("ZodBoolean",(e,t)=>{ki.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>od(e,r,i)});function fo(e){return Ul(Gt,e)}const Wt=h("ZodBigInt",(e,t)=>{Ii.init(e,t),M.init(e,t),e._zod.processJSONSchema=(i,n,o)=>ad(e,i),e.gte=(i,n)=>e.check(he(i,n)),e.min=(i,n)=>e.check(he(i,n)),e.gt=(i,n)=>e.check(Ke(i,n)),e.gte=(i,n)=>e.check(he(i,n)),e.min=(i,n)=>e.check(he(i,n)),e.lt=(i,n)=>e.check(Be(i,n)),e.lte=(i,n)=>e.check(Se(i,n)),e.max=(i,n)=>e.check(Se(i,n)),e.positive=i=>e.check(Ke(BigInt(0),i)),e.negative=i=>e.check(Be(BigInt(0),i)),e.nonpositive=i=>e.check(Se(BigInt(0),i)),e.nonnegative=i=>e.check(he(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 Cf(e){return Nl(Wt,e)}const mr=h("ZodBigIntFormat",(e,t)=>{cs.init(e,t),Wt.init(e,t)});function Zf(e){return Pl(mr,e)}function Mf(e){return Al(mr,e)}const mo=h("ZodSymbol",(e,t)=>{ss.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ud(e,r)});function Ff(e){return Ll(mo,e)}const po=h("ZodUndefined",(e,t)=>{ls.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sd(e,r)});function Rf(e){return Cl(po,e)}const ho=h("ZodNull",(e,t)=>{ds.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cd(e,r,i)});function go(e){return Zl(ho,e)}const vo=h("ZodAny",(e,t)=>{fs.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>fd()});function Vf(){return Ml(vo)}const bo=h("ZodUnknown",(e,t)=>{ms.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>md()});function nt(){return Fl(bo)}const _o=h("ZodNever",(e,t)=>{ps.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>dd(e,r,i)});function pr(e){return Rl(_o,e)}const yo=h("ZodVoid",(e,t)=>{hs.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ld(e,r)});function Bf(e){return Vl(yo,e)}const hr=h("ZodDate",(e,t)=>{gs.init(e,t),M.init(e,t),e._zod.processJSONSchema=(i,n,o)=>pd(e,i),e.min=(i,n)=>e.check(he(i,n)),e.max=(i,n)=>e.check(Se(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 Kf(e){return Bl(hr,e)}const $o=h("ZodArray",(e,t)=>{bs.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xd(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(Zt(r,i)),e.length=(r,i)=>e.check(Mt(r,i)),e.unwrap=()=>e.element});function Ht(e,t){return Gl($o,e,t)}function Jf(e){const t=e._zod.def.shape;return vr(Object.keys(t))}const qt=h("ZodObject",(e,t)=>{ws.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Td(e,r,i,n),R(e,"shape",()=>t.shape),e.keyof=()=>vr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:nt()}),e.loose=()=>e.clone({...e._zod.def,catchall:nt()}),e.strict=()=>e.clone({...e._zod.def,catchall:pr()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>bu(e,r),e.safeExtend=r=>_u(e,r),e.merge=r=>yu(e,r),e.pick=r=>gu(e,r),e.omit=r=>vu(e,r),e.partial=(...r)=>$u(_r,e,r[0]),e.required=(...r)=>wu(yr,e,r[0])});function Gf(e,t){const r={type:"object",shape:e??{},...b(t)};return new qt(r)}function Wf(e,t){return new qt({type:"object",shape:e,catchall:pr(),...b(t)})}function Hf(e,t){return new qt({type:"object",shape:e,catchall:nt(),...b(t)})}const Xt=h("ZodUnion",(e,t)=>{En.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>no(e,r,i,n),e.options=t.options});function gr(e,t){return new Xt({type:"union",options:e,...b(t)})}const wo=h("ZodXor",(e,t)=>{Xt.init(e,t),Is.init(e,t),e._zod.processJSONSchema=(r,i,n)=>no(e,r,i,n),e.options=t.options});function qf(e,t){return new wo({type:"union",options:e,inclusive:!1,...b(t)})}const So=h("ZodDiscriminatedUnion",(e,t)=>{Xt.init(e,t),xs.init(e,t)});function Xf(e,t,r){return new So({type:"union",options:t,discriminator:e,...b(r)})}const ko=h("ZodIntersection",(e,t)=>{Ts.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zd(e,r,i,n)});function Io(e,t){return new ko({type:"intersection",left:e,right:t})}const xo=h("ZodTuple",(e,t)=>{Ti.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ed(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function To(e,t,r){const i=t instanceof L,n=i?r:t,o=i?t:null;return new xo({type:"tuple",items:e,rest:o,...b(n)})}const Yt=h("ZodRecord",(e,t)=>{Es.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Od(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function zo(e,t,r){return new Yt({type:"record",keyType:e,valueType:t,...b(r)})}function Yf(e,t,r){const i=ye(e);return i._zod.values=void 0,new Yt({type:"record",keyType:i,valueType:t,...b(r)})}function Qf(e,t,r){return new Yt({type:"record",keyType:e,valueType:t,mode:"loose",...b(r)})}const Eo=h("ZodMap",(e,t)=>{Os.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>kd(e,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Je(...r)),e.nonempty=r=>e.check(Je(1,r)),e.max=(...r)=>e.check(gt(...r)),e.size=(...r)=>e.check(Ct(...r))});function em(e,t,r){return new Eo({type:"map",keyType:e,valueType:t,...b(r)})}const Oo=h("ZodSet",(e,t)=>{Ds.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Id(e,r),e.min=(...r)=>e.check(Je(...r)),e.nonempty=r=>e.check(Je(1,r)),e.max=(...r)=>e.check(gt(...r)),e.size=(...r)=>e.check(Ct(...r))});function tm(e,t){return new Oo({type:"set",valueType:e,...b(t)})}const $t=h("ZodEnum",(e,t)=>{js.init(e,t),M.init(e,t),e._zod.processJSONSchema=(i,n,o)=>hd(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 vr(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 nm(e,t){return new $t({type:"enum",entries:e,...b(t)})}const Uo=h("ZodLiteral",(e,t)=>{Ps.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>gd(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 rm(e,t){return new Uo({type:"literal",values:Array.isArray(e)?e:[e],...b(t)})}const Do=h("ZodFile",(e,t)=>{As.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_d(e,r,i),e.min=(r,i)=>e.check(Je(r,i)),e.max=(r,i)=>e.check(gt(r,i)),e.mime=(r,i)=>e.check(Rn(Array.isArray(r)?r:[r],i))});function im(e){return Wl(Do,e)}const No=h("ZodTransform",(e,t)=>{Ls.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sd(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new yn(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(ft(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(ft(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function br(e){return new No({type:"transform",transform:e})}const _r=h("ZodOptional",(e,t)=>{zi.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ro(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Qt(e){return new _r({type:"optional",innerType:e})}const jo=h("ZodExactOptional",(e,t)=>{Zs.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ro(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Po(e){return new jo({type:"optional",innerType:e})}const Ao=h("ZodNullable",(e,t)=>{Ms.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ud(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function en(e){return new Ao({type:"nullable",innerType:e})}function om(e){return Qt(en(e))}const Lo=h("ZodDefault",(e,t)=>{Fs.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Co(e,t){return new Lo({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():kn(t)}})}const Zo=h("ZodPrefault",(e,t)=>{Vs.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Mo(e,t){return new Zo({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():kn(t)}})}const yr=h("ZodNonOptional",(e,t)=>{Bs.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Fo(e,t){return new yr({type:"nonoptional",innerType:e,...b(t)})}const Ro=h("ZodSuccess",(e,t)=>{Js.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>yd(e,r,i),e.unwrap=()=>e._zod.def.innerType});function am(e){return new Ro({type:"success",innerType:e})}const Vo=h("ZodCatch",(e,t)=>{Gs.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Bo(e,t){return new Vo({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Ko=h("ZodNaN",(e,t)=>{Ws.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>vd(e,r)});function um(e){return Jl(Ko,e)}const $r=h("ZodPipe",(e,t)=>{Hs.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ad(e,r,i,n),e.in=t.in,e.out=t.out});function tn(e,t){return new $r({type:"pipe",in:e,out:t})}const wr=h("ZodCodec",(e,t)=>{$r.init(e,t),Ei.init(e,t)});function cm(e,t,r){return new wr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}const Jo=h("ZodReadonly",(e,t)=>{qs.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ld(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Go(e){return new Jo({type:"readonly",innerType:e})}const Wo=h("ZodTemplateLiteral",(e,t)=>{Ys.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bd(e,r,i)});function sm(e,t){return new Wo({type:"template_literal",parts:e,...b(t)})}const Ho=h("ZodLazy",(e,t)=>{tl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Zd(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function qo(e){return new Ho({type:"lazy",getter:e})}const Xo=h("ZodPromise",(e,t)=>{el.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Cd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function lm(e){return new Xo({type:"promise",innerType:e})}const Yo=h("ZodFunction",(e,t)=>{Qs.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wd(e,r)});function Sr(e){return new Yo({type:"function",input:Array.isArray(e==null?void 0:e.input)?To(e==null?void 0:e.input):(e==null?void 0:e.input)??Ht(nt()),output:(e==null?void 0:e.output)??nt()})}const nn=h("ZodCustom",(e,t)=>{nl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$d(e,r)});function dm(e){const t=new Y({check:"custom"});return t._zod.check=e,t}function fm(e,t){return Hl(nn,e??(()=>!0),t)}function Qo(e,t={}){return ql(nn,e,t)}function ea(e){return Xl(e)}const mm=Ql,pm=ed;function hm(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 gm=(...e)=>td({Codec:wr,Boolean:Gt,String:Vt},...e);function vm(e){const t=qo(()=>gr([Hn(e),lo(),fo(),go(),Ht(t),zo(Hn(),t)]));return t}function bm(e,t){return tn(br(e),t)}const Gb=Object.freeze(Object.defineProperty({__proto__:null,ZodAny:vo,ZodArray:$o,ZodBase64:cr,ZodBase64URL:sr,ZodBigInt:Wt,ZodBigIntFormat:mr,ZodBoolean:Gt,ZodCIDRv4:ar,ZodCIDRv6:ur,ZodCUID:Qn,ZodCUID2:er,ZodCatch:Vo,ZodCodec:wr,ZodCustom:nn,ZodCustomStringFormat:yt,ZodDate:hr,ZodDefault:Lo,ZodDiscriminatedUnion:So,ZodE164:lr,ZodEmail:qn,ZodEmoji:Xn,ZodEnum:$t,ZodExactOptional:jo,ZodFile:Do,ZodFunction:Yo,ZodGUID:Bt,ZodIPv4:ir,ZodIPv6:or,ZodIntersection:ko,ZodJWT:dr,ZodKSUID:rr,ZodLazy:Ho,ZodLiteral:Uo,ZodMAC:so,ZodMap:Eo,ZodNaN:Ko,ZodNanoID:Yn,ZodNever:_o,ZodNonOptional:yr,ZodNull:ho,ZodNullable:Ao,ZodNumber:Jt,ZodNumberFormat:tt,ZodObject:qt,ZodOptional:_r,ZodPipe:$r,ZodPrefault:Zo,ZodPromise:Xo,ZodReadonly:Jo,ZodRecord:Yt,ZodSet:Oo,ZodString:Vt,ZodStringFormat:H,ZodSuccess:Ro,ZodSymbol:mo,ZodTemplateLiteral:Wo,ZodTransform:No,ZodTuple:xo,ZodType:M,ZodULID:tr,ZodURL:Kt,ZodUUID:je,ZodUndefined:po,ZodUnion:Xt,ZodUnknown:bo,ZodVoid:yo,ZodXID:nr,ZodXor:wo,_ZodString:Wn,_default:Co,_function:Sr,any:Vf,array:Ht,base64:xf,base64url:Tf,bigint:Cf,boolean:fo,catch:Bo,check:dm,cidrv4:kf,cidrv6:If,codec:cm,cuid:gf,cuid2:vf,custom:fm,date:Kf,describe:mm,discriminatedUnion:Xf,e164:zf,email:af,emoji:pf,enum:vr,exactOptional:Po,file:im,float32:jf,float64:Pf,function:Sr,guid:uf,hash:Nf,hex:Df,hostname:Uf,httpUrl:mf,instanceof:hm,int:fr,int32:Af,int64:Zf,intersection:Io,ipv4:$f,ipv6:Sf,json:vm,jwt:Ef,keyof:Jf,ksuid:yf,lazy:qo,literal:rm,looseObject:Hf,looseRecord:Qf,mac:wf,map:em,meta:pm,nan:um,nanoid:hf,nativeEnum:nm,never:pr,nonoptional:Fo,null:go,nullable:en,nullish:om,number:lo,object:Gf,optional:Qt,partialRecord:Yf,pipe:tn,prefault:Mo,preprocess:bm,promise:lm,readonly:Go,record:zo,refine:Qo,set:tm,strictObject:Wf,string:Hn,stringFormat:Of,stringbool:gm,success:am,superRefine:ea,symbol:Ff,templateLiteral:sm,transform:br,tuple:To,uint32:Lf,uint64:Mf,ulid:bf,undefined:Rf,union:gr,unknown:nt,url:ff,uuid:cf,uuidv4:sf,uuidv6:lf,uuidv7:df,void:Bf,xid:_f,xor:qf},Symbol.toStringTag,{value:"Module"})),Wb={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 Hb(e){ce({customError:e})}function qb(){return ce().customError}var ta;ta||(ta={});const I={...Gb,...Kb,iso:Kd},Xb=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 Yb(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 Qb(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 _m(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=Qb(n,t),a=se(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 _m(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=se(c,t);n[s]=a.has(s)?l:l.optional()}if(e.propertyNames){const s=se(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?se(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=se(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(se(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=>se(s,t)),u=o&&typeof o=="object"&&!Array.isArray(o)?se(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=>se(s,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?se(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=se(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 se(e,t){if(typeof e=="boolean")return e?I.any():I.never();let r=_m(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=>se(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=>se(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:se(e.allOf[0],t);const s=i?0:1;for(let c=s;c<e.allOf.length;c++)u=I.intersection(u,se(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))Xb.has(u)||(n[u]=e[u]);return Object.keys(n).length>0&&t.registry.add(r,n),r}function e1(e,t){if(typeof e=="boolean")return e?I.any():I.never();const r=Yb(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)??we};return se(e,n)}function t1(e){return vl(Vt,e)}function n1(e){return Il(Jt,e)}function r1(e){return Dl(Gt,e)}function i1(e){return jl(Wt,e)}function o1(e){return Kl(hr,e)}const a1=Object.freeze(Object.defineProperty({__proto__:null,bigint:i1,boolean:r1,date:o1,number:n1,string:t1},Symbol.toStringTag,{value:"Module"}));ce(ol());const ym=Object.freeze(Object.defineProperty({__proto__:null,$brand:uu,$input:pl,$output:ml,NEVER:au,TimePrecision:_l,ZodAny:vo,ZodArray:$o,ZodBase64:cr,ZodBase64URL:sr,ZodBigInt:Wt,ZodBigIntFormat:mr,ZodBoolean:Gt,ZodCIDRv4:ar,ZodCIDRv6:ur,ZodCUID:Qn,ZodCUID2:er,ZodCatch:Vo,ZodCodec:wr,ZodCustom:nn,ZodCustomStringFormat:yt,ZodDate:hr,ZodDefault:Lo,ZodDiscriminatedUnion:So,ZodE164:lr,ZodEmail:qn,ZodEmoji:Xn,ZodEnum:$t,ZodError:Jb,ZodExactOptional:jo,ZodFile:Do,get ZodFirstPartyTypeKind(){return ta},ZodFunction:Yo,ZodGUID:Bt,ZodIPv4:ir,ZodIPv6:or,ZodISODate:ao,ZodISODateTime:oo,ZodISODuration:co,ZodISOTime:uo,ZodIntersection:ko,ZodIssueCode:Wb,ZodJWT:dr,ZodKSUID:rr,ZodLazy:Ho,ZodLiteral:Uo,ZodMAC:so,ZodMap:Eo,ZodNaN:Ko,ZodNanoID:Yn,ZodNever:_o,ZodNonOptional:yr,ZodNull:ho,ZodNullable:Ao,ZodNumber:Jt,ZodNumberFormat:tt,ZodObject:qt,ZodOptional:_r,ZodPipe:$r,ZodPrefault:Zo,ZodPromise:Xo,ZodReadonly:Jo,ZodRealError:ve,ZodRecord:Yt,ZodSet:Oo,ZodString:Vt,ZodStringFormat:H,ZodSuccess:Ro,ZodSymbol:mo,ZodTemplateLiteral:Wo,ZodTransform:No,ZodTuple:xo,ZodType:M,ZodULID:tr,ZodURL:Kt,ZodUUID:je,ZodUndefined:po,ZodUnion:Xt,ZodUnknown:bo,ZodVoid:yo,ZodXID:nr,ZodXor:wo,_ZodString:Wn,_default:Co,_function:Sr,any:Vf,array:Ht,base64:xf,base64url:Tf,bigint:Cf,boolean:fo,catch:Bo,check:dm,cidrv4:kf,cidrv6:If,clone:ye,codec:cm,coerce:a1,config:ce,core:Bb,cuid:gf,cuid2:vf,custom:fm,date:Kf,decode:Yd,decodeAsync:ef,describe:mm,discriminatedUnion:Xf,e164:zf,email:af,emoji:pf,encode:Xd,encodeAsync:Qd,endsWith:Fn,enum:vr,exactOptional:Po,file:im,flattenError:oi,float32:jf,float64:Pf,formatError:ai,fromJSONSchema:e1,function:Sr,getErrorMap:qb,globalRegistry:we,gt:Ke,gte:he,guid:uf,hash:Nf,hex:Df,hostname:Uf,httpUrl:mf,includes:Zn,instanceof:hm,int:fr,int32:Af,int64:Zf,intersection:Io,ipv4:$f,ipv6:Sf,iso:Kd,json:vm,jwt:Ef,keyof:Jf,ksuid:yf,lazy:qo,length:Mt,literal:rm,locales:dl,looseObject:Hf,looseRecord:Qf,lowercase:Ln,lt:Be,lte:Se,mac:wf,map:em,maxLength:Zt,maxSize:gt,meta:pm,mime:Rn,minLength:et,minSize:Je,multipleOf:ht,nan:um,nanoid:hf,nativeEnum:nm,negative:Yi,never:pr,nonnegative:eo,nonoptional:Fo,nonpositive:Qi,normalize:Vn,null:go,nullable:en,nullish:om,number:lo,object:Gf,optional:Qt,overwrite:Le,parse:Gd,parseAsync:Wd,partialRecord:Yf,pipe:tn,positive:Xi,prefault:Mo,preprocess:bm,prettifyError:Eu,promise:lm,property:to,readonly:Go,record:zo,refine:Qo,regex:An,regexes:_i,registry:Oi,safeDecode:nf,safeDecodeAsync:of,safeEncode:tf,safeEncodeAsync:rf,safeParse:Hd,safeParseAsync:qd,set:tm,setErrorMap:Hb,size:Ct,slugify:Gn,startsWith:Mn,strictObject:Wf,string:Hn,stringFormat:Of,stringbool:gm,success:am,superRefine:ea,symbol:Ff,templateLiteral:sm,toJSONSchema:Md,toLowerCase:Kn,toUpperCase:Jn,transform:br,treeifyError:Tu,trim:Bn,tuple:To,uint32:Lf,uint64:Mf,ulid:bf,undefined:Rf,union:gr,unknown:nt,uppercase:Cn,url:ff,util:Iu,uuid:cf,uuidv4:sf,uuidv6:lf,uuidv7:df,void:Bf,xid:_f,xor:qf},Symbol.toStringTag,{value:"Module"}));function $m(e){const t=e.match(/^(.+)\/(flows|sources)\/([^/]+)$/);return t?[t[1],t[3]]:null}function u1(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=j.parseTimeRange(s.timerange);let l=c.start?j.timeMomentToSeconds(c.start):null,d=c.end?j.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?"()":j.formatTimeRangeExpr({start:j.secondsToTimeMoment(n),end:j.secondsToTimeMoment(o),isStartInclusive:!0,isEndInclusive:!1})}function wm(e,t){const r=j.parseTimeRange(t);if(r.start===void 0||r.end===void 0)throw new F.OmpError("Can't convert duration to timerange. Timerange is missing start and/or end.");const i=j.timeMomentToSeconds(r.start),n=j.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 j.formatTimeRangeExpr({start:j.secondsToTimeMoment(o),end:r.end,isEndInclusive:r.isEndInclusive,isStartInclusive:r.isStartInclusive})}function c1(e){const t=e.endsWith("/")?e.slice(0,-1):e;return t.substring(t.lastIndexOf("/")+1)}function Sm(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 s1(e){return ym.object({ffomTimeZoneOffset:ym.number().int().min(-23).max(23).optional()}).safeParse(e).success}function na(e){return eu(Hh(new _e(e)))}const kr="omakase-virtual-flow";class km{constructor(t,r){k(this,"_tamsApi");this._tamsApi=Xh(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 _e(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 F.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===kr,n=await this._fetchSubflows(((s=t.flow_collection)==null?void 0:s.map(c=>c.id))??[]),o=u1(i?n:[t,...n]);if(o==="()")throw new F.OmpError("Provided TAMS media has no timerange");let a;r?typeof r=="number"?a=wm(r,o):a=j.timerangeDuration(r)>j.timerangeDuration(o)?o:r:a=wm(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===kr)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 _e(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:kr,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 ra,Im;function xm(){if(Im)return ra;Im=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 O in d)O==="$ref"||O==="allOf"||O in f||delete d[O];if(v.$ref&&p.def)for(const O in d)O==="$ref"||O==="allOf"||O in p.def&&JSON.stringify(d[O])===JSON.stringify(p.def[O])&&delete d[O]}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:Rt(t,"input",e.processors),output:Rt(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function fe(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 fe(i.element,r);if(i.type==="set")return fe(i.valueType,r);if(i.type==="lazy")return fe(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 fe(i.innerType,r);if(i.type==="intersection")return fe(i.left,r)||fe(i.right,r);if(i.type==="record"||i.type==="map")return fe(i.keyType,r)||fe(i.valueType,r);if(i.type==="pipe")return fe(i.in,r)||fe(i.out,r);if(i.type==="object"){for(const n in i.shape)if(fe(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(const n of i.options)if(fe(n,r))return!0;return!1}if(i.type==="tuple"){for(const n of i.items)if(fe(n,r))return!0;return!!(i.rest&&fe(i.rest,r))}return!1}const td=(e,t={})=>r=>{const i=gt({...r,processors:t});return K(e,i),vt(i,e),bt(i,e)},Rt=(e,t,r={})=>i=>{const{libraryOptions:n,target:o}=i??{},a=gt({...n??{},target:o,io:t,processors:r});return K(e,a),vt(a,e),bt(a,e)},Fb={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},nd=(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=Fb[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}))])}},rd=(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)},id=(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")},ad=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},ud=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},cd=(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")},ld=(e,t,r,i)=>{r.not={}},dd=(e,t,r,i)=>{},fd=(e,t,r,i)=>{},md=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},pd=(e,t,r,i)=>{const n=e._zod.def,o=ti(n.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},hd=(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},gd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},vd=(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},bd=(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)},_d=(e,t,r,i)=>{r.type="boolean"},yd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},$d=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},wd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Sd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},kd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Id=(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"]})},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]=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)},no=(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},Td=(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},zd=(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)},Ed=(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)}},Od=(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"}]},Ud=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Dd=(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))},Nd=(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)))},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;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},Pd=(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},Ad=(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},Ld=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},ro=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Cd=(e,t,r,i)=>{const n=e._zod.innerType;K(n,t,i);const o=t.seen.get(e);o.ref=n},io={string:nd,number:rd,boolean:id,bigint:od,symbol:ad,null:ud,undefined:cd,void:sd,never:ld,any:dd,unknown:fd,date:md,enum:pd,literal:hd,nan:gd,template_literal:vd,file:bd,success:_d,custom:yd,function:$d,transform:wd,map:Sd,set:kd,array:Id,object:xd,union:no,intersection:Td,tuple:zd,record:Ed,nullable:Od,nonoptional:Ud,default:Dd,prefault:Nd,catch:jd,pipe:Pd,readonly:Ad,promise:Ld,optional:ro,lazy:Cd};function Zd(e,t){if("_idmap"in e){const i=e,n=gt({...t,processors:io}),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;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:io});return K(e,r),vt(r,e),bt(r,e)}class Rb{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:io,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)),vt(this.ctx,t);const i=bt(this.ctx,t),{"~standard":n,...o}=i;return o}}const Vb=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:ds,$ZodArray:vs,$ZodAsyncError:He,$ZodBase64:Qc,$ZodBase64URL:ts,$ZodBigInt:Ii,$ZodBigIntFormat:us,$ZodBoolean:ki,$ZodCIDRv4:Xc,$ZodCIDRv6:Yc,$ZodCUID:Zc,$ZodCUID2:Mc,$ZodCatch:Js,$ZodCheck:Y,$ZodCheckBigIntFormat:pc,$ZodCheckEndsWith:xc,$ZodCheckGreaterThan:$i,$ZodCheckIncludes:kc,$ZodCheckLengthEquals:yc,$ZodCheckLessThan:yi,$ZodCheckLowerCase:wc,$ZodCheckMaxLength:bc,$ZodCheckMaxSize:hc,$ZodCheckMimeType:Ec,$ZodCheckMinLength:_c,$ZodCheckMinSize:gc,$ZodCheckMultipleOf:fc,$ZodCheckNumberFormat:mc,$ZodCheckOverwrite:Oc,$ZodCheckProperty:zc,$ZodCheckRegex:$c,$ZodCheckSizeEquals:vc,$ZodCheckStartsWith:Ic,$ZodCheckStringFormat:Pt,$ZodCheckUpperCase:Sc,$ZodCodec:Ei,$ZodCustom:tl,$ZodCustomStringFormat:os,$ZodDate:hs,$ZodDefault:Ms,$ZodDiscriminatedUnion:Is,$ZodE164:ns,$ZodEmail:Pc,$ZodEmoji:Lc,$ZodEncodeError:$n,$ZodEnum:Ns,$ZodError:ii,$ZodExactOptional:Cs,$ZodFile:Ps,$ZodFunction:Ys,$ZodGUID:Nc,$ZodIPv4:qc,$ZodIPv6:Wc,$ZodISODate:Kc,$ZodISODateTime:Bc,$ZodISODuration:Gc,$ZodISOTime:Jc,$ZodIntersection:xs,$ZodJWT:is,$ZodKSUID:Vc,$ZodLazy:el,$ZodLiteral:js,$ZodMAC:Hc,$ZodMap:Es,$ZodNaN:Gs,$ZodNanoID:Cc,$ZodNever:ms,$ZodNonOptional:Vs,$ZodNull:ls,$ZodNullable:Zs,$ZodNumber:Si,$ZodNumberFormat:as,$ZodObject:ys,$ZodObjectJIT:$s,$ZodOptional:zi,$ZodPipe:qs,$ZodPrefault:Rs,$ZodPromise:Qs,$ZodReadonly:Ws,$ZodRealError:he,$ZodRecord:zs,$ZodRegistry:pl,$ZodSet:Us,$ZodString:At,$ZodStringFormat:G,$ZodSuccess:Ks,$ZodSymbol:cs,$ZodTemplateLiteral:Xs,$ZodTransform:As,$ZodTuple:Ti,$ZodType:C,$ZodULID:Fc,$ZodURL:Ac,$ZodUUID:jc,$ZodUndefined:ss,$ZodUnion:On,$ZodUnknown:fs,$ZodVoid:ps,$ZodXID:Rc,$ZodXor:ks,$brand:au,$constructor:g,$input:ml,$output:fl,Doc:Uc,JSONSchema:Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),JSONSchemaGenerator:Rb,NEVER:ou,TimePrecision:bl,_any:Zl,_array:Jl,_base64:Gi,_base64url:qi,_bigint:Dl,_boolean:Ol,_catch:Pb,_check:Xl,_cidrv4:Ki,_cidrv6:Ji,_coercedBigint:Nl,_coercedBoolean:Ul,_coercedDate:Bl,_coercedNumber:kl,_coercedString:gl,_cuid:Ci,_cuid2:Zi,_custom:ql,_date:Vl,_decode:li,_decodeAsync:fi,_default:Db,_discriminatedUnion:yb,_e164:Wi,_email:Ui,_emoji:Ai,_encode:si,_encodeAsync:di,_endsWith:Rn,_enum:xb,_file:Gl,_float32:xl,_float64:Tl,_gt:Ve,_gte:pe,_guid:Pn,_includes:Mn,_int:Il,_int32:zl,_int64:jl,_intersection:$b,_ipv4:Vi,_ipv6:Bi,_isoDate:yl,_isoDateTime:_l,_isoDuration:wl,_isoTime:$l,_jwt:Hi,_ksuid:Ri,_lazy:Zb,_length:Mt,_literal:zb,_lowercase:Cn,_lt:Re,_lte:we,_mac:vl,_map:kb,_max:we,_maxLength:Zt,_maxSize:ht,_mime:Vn,_min:pe,_minLength:et,_minSize:Be,_multipleOf:pt,_nan:Kl,_nanoid:Li,_nativeEnum:Tb,_negative:Yi,_never:Fl,_nonnegative:eo,_nonoptional:Nb,_nonpositive:Qi,_normalize:Bn,_null:Cl,_nullable:Ub,_number:Sl,_optional:Ob,_overwrite:Ae,_parse:Et,_parseAsync:Ot,_pipe:Ab,_positive:Xi,_promise:Mb,_property:to,_readonly:Lb,_record:Sb,_refine:Wl,_regex:Ln,_safeDecode:pi,_safeDecodeAsync:gi,_safeEncode:mi,_safeEncodeAsync:hi,_safeParse:Ut,_safeParseAsync:Dt,_set:Ib,_size:Ct,_slugify:qn,_startsWith:Fn,_string:hl,_stringFormat:Ft,_stringbool:ed,_success:jb,_superRefine:Hl,_symbol:Al,_templateLiteral:Cb,_toLowerCase:Jn,_toUpperCase:Gn,_transform:Eb,_trim:Kn,_tuple:wb,_uint32:El,_uint64:Pl,_ulid:Mi,_undefined:Ll,_union:bb,_unknown:Ml,_uppercase:Zn,_url:An,_uuid:Di,_uuidv4:Ni,_uuidv6:ji,_uuidv7:Pi,_void:Rl,_xid:Fi,_xor:_b,clone:_e,config:se,createStandardJSONSchemaMethod:Rt,createToJSONSchemaMethod:td,decode:vg,decodeAsync:_g,describe:Yl,encode:gg,encodeAsync:bg,extractDefs:vt,finalize:bt,flattenError:oi,formatError:ai,globalConfig:wn,globalRegistry:$e,initializeContext:gt,isValidBase64:wi,isValidBase64URL:es,isValidJWT:rs,locales:ll,meta:Ql,parse:ui,parseAsync:ci,prettifyError:zu,process:K,regexes:_i,registry:Oi,safeDecode:$g,safeDecodeAsync:Sg,safeEncode:yg,safeEncodeAsync:wg,safeParse:Eu,safeParseAsync:Ou,toDotPath:Tu,toJSONSchema:Zd,treeifyError:xu,util:ku,version:Dc},Symbol.toStringTag,{value:"Module"})),Bb=Object.freeze(Object.defineProperty({__proto__:null,endsWith:Rn,gt:Ve,gte:pe,includes:Mn,length:Mt,lowercase:Cn,lt:Re,lte:we,maxLength:Zt,maxSize:ht,mime:Vn,minLength:et,minSize:Be,multipleOf:pt,negative:Yi,nonnegative:eo,nonpositive:Qi,normalize:Bn,overwrite:Ae,positive:Xi,property:to,regex:Ln,size:Ct,slugify:qn,startsWith:Fn,toLowerCase:Jn,toUpperCase:Gn,trim:Kn,uppercase:Zn},Symbol.toStringTag,{value:"Module"})),oo=g("ZodISODateTime",(e,t)=>{Bc.init(e,t),q.init(e,t)});function Md(e){return _l(oo,e)}const ao=g("ZodISODate",(e,t)=>{Kc.init(e,t),q.init(e,t)});function Fd(e){return yl(ao,e)}const uo=g("ZodISOTime",(e,t)=>{Jc.init(e,t),q.init(e,t)});function Rd(e){return $l(uo,e)}const co=g("ZodISODuration",(e,t)=>{Gc.init(e,t),q.init(e,t)});function Vd(e){return wl(co,e)}const Bd=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:ao,ZodISODateTime:oo,ZodISODuration:co,ZodISOTime:uo,date:Fd,datetime:Md,duration:Vd,time:Rd},Symbol.toStringTag,{value:"Module"})),Kd=(e,t)=>{ii.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ai(e,r)},flatten:{value:r=>oi(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Sn,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Sn,2)}},isEmpty:{get(){return e.issues.length===0}}})},Kb=g("ZodError",Kd),ge=g("ZodError",Kd,{Parent:Error}),Jd=Et(ge),Gd=Ot(ge),qd=Ut(ge),Wd=Dt(ge),Hd=si(ge),Xd=li(ge),Yd=di(ge),Qd=fi(ge),ef=mi(ge),tf=pi(ge),nf=hi(ge),rf=gi(ge),Z=g("ZodType",(e,t)=>(C.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Rt(e,"input"),output:Rt(e,"output")}}),e.toJSONSchema=td(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Ue(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)=>Jd(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>qd(e,r,i),e.parseAsync=async(r,i)=>Gd(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Wd(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>Hd(e,r,i),e.decode=(r,i)=>Xd(e,r,i),e.encodeAsync=async(r,i)=>Yd(e,r,i),e.decodeAsync=async(r,i)=>Qd(e,r,i),e.safeEncode=(r,i)=>ef(e,r,i),e.safeDecode=(r,i)=>tf(e,r,i),e.safeEncodeAsync=async(r,i)=>nf(e,r,i),e.safeDecodeAsync=async(r,i)=>rf(e,r,i),e.refine=(r,i)=>e.check(Qo(r,i)),e.superRefine=r=>e.check(ea(r)),e.overwrite=r=>e.check(Ae(r)),e.optional=()=>Qt(e),e.exactOptional=()=>Po(e),e.nullable=()=>en(e),e.nullish=()=>Qt(en(e)),e.nonoptional=r=>Fo(e,r),e.array=()=>Wt(e),e.or=r=>vr([e,r]),e.and=r=>Io(e,r),e.transform=r=>tn(e,_r(r)),e.default=r=>Co(e,r),e.prefault=r=>Mo(e,r),e.catch=r=>Bo(e,r),e.pipe=r=>tn(e,r),e.readonly=()=>Go(e),e.describe=r=>{const i=e.clone();return $e.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){var r;return(r=$e.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return $e.get(e);const i=e.clone();return $e.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Wn=g("_ZodString",(e,t)=>{At.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>nd(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(Ln(...i)),e.includes=(...i)=>e.check(Mn(...i)),e.startsWith=(...i)=>e.check(Fn(...i)),e.endsWith=(...i)=>e.check(Rn(...i)),e.min=(...i)=>e.check(et(...i)),e.max=(...i)=>e.check(Zt(...i)),e.length=(...i)=>e.check(Mt(...i)),e.nonempty=(...i)=>e.check(et(1,...i)),e.lowercase=i=>e.check(Cn(i)),e.uppercase=i=>e.check(Zn(i)),e.trim=()=>e.check(Kn()),e.normalize=(...i)=>e.check(Bn(...i)),e.toLowerCase=()=>e.check(Jn()),e.toUpperCase=()=>e.check(Gn()),e.slugify=()=>e.check(qn())}),Vt=g("ZodString",(e,t)=>{At.init(e,t),Wn.init(e,t),e.email=r=>e.check(Ui(Xn,r)),e.url=r=>e.check(An(Kt,r)),e.jwt=r=>e.check(Hi(fr,r)),e.emoji=r=>e.check(Ai(Yn,r)),e.guid=r=>e.check(Pn(Bt,r)),e.uuid=r=>e.check(Di(De,r)),e.uuidv4=r=>e.check(Ni(De,r)),e.uuidv6=r=>e.check(ji(De,r)),e.uuidv7=r=>e.check(Pi(De,r)),e.nanoid=r=>e.check(Li(Qn,r)),e.guid=r=>e.check(Pn(Bt,r)),e.cuid=r=>e.check(Ci(er,r)),e.cuid2=r=>e.check(Zi(tr,r)),e.ulid=r=>e.check(Mi(nr,r)),e.base64=r=>e.check(Gi(sr,r)),e.base64url=r=>e.check(qi(lr,r)),e.xid=r=>e.check(Fi(rr,r)),e.ksuid=r=>e.check(Ri(ir,r)),e.ipv4=r=>e.check(Vi(or,r)),e.ipv6=r=>e.check(Bi(ar,r)),e.cidrv4=r=>e.check(Ki(ur,r)),e.cidrv6=r=>e.check(Ji(cr,r)),e.e164=r=>e.check(Wi(dr,r)),e.datetime=r=>e.check(Md(r)),e.date=r=>e.check(Fd(r)),e.time=r=>e.check(Rd(r)),e.duration=r=>e.check(Vd(r))});function Hn(e){return hl(Vt,e)}const q=g("ZodStringFormat",(e,t)=>{G.init(e,t),Wn.init(e,t)}),Xn=g("ZodEmail",(e,t)=>{Pc.init(e,t),q.init(e,t)});function of(e){return Ui(Xn,e)}const Bt=g("ZodGUID",(e,t)=>{Nc.init(e,t),q.init(e,t)});function af(e){return Pn(Bt,e)}const De=g("ZodUUID",(e,t)=>{jc.init(e,t),q.init(e,t)});function uf(e){return Di(De,e)}function cf(e){return Ni(De,e)}function sf(e){return ji(De,e)}function lf(e){return Pi(De,e)}const Kt=g("ZodURL",(e,t)=>{Ac.init(e,t),q.init(e,t)});function df(e){return An(Kt,e)}function ff(e){return An(Kt,{protocol:/^https?$/,hostname:Wu,...b(e)})}const Yn=g("ZodEmoji",(e,t)=>{Lc.init(e,t),q.init(e,t)});function mf(e){return Ai(Yn,e)}const Qn=g("ZodNanoID",(e,t)=>{Cc.init(e,t),q.init(e,t)});function pf(e){return Li(Qn,e)}const er=g("ZodCUID",(e,t)=>{Zc.init(e,t),q.init(e,t)});function hf(e){return Ci(er,e)}const tr=g("ZodCUID2",(e,t)=>{Mc.init(e,t),q.init(e,t)});function gf(e){return Zi(tr,e)}const nr=g("ZodULID",(e,t)=>{Fc.init(e,t),q.init(e,t)});function vf(e){return Mi(nr,e)}const rr=g("ZodXID",(e,t)=>{Rc.init(e,t),q.init(e,t)});function bf(e){return Fi(rr,e)}const ir=g("ZodKSUID",(e,t)=>{Vc.init(e,t),q.init(e,t)});function _f(e){return Ri(ir,e)}const or=g("ZodIPv4",(e,t)=>{qc.init(e,t),q.init(e,t)});function yf(e){return Vi(or,e)}const so=g("ZodMAC",(e,t)=>{Hc.init(e,t),q.init(e,t)});function $f(e){return vl(so,e)}const ar=g("ZodIPv6",(e,t)=>{Wc.init(e,t),q.init(e,t)});function wf(e){return Bi(ar,e)}const ur=g("ZodCIDRv4",(e,t)=>{Xc.init(e,t),q.init(e,t)});function Sf(e){return Ki(ur,e)}const cr=g("ZodCIDRv6",(e,t)=>{Yc.init(e,t),q.init(e,t)});function kf(e){return Ji(cr,e)}const sr=g("ZodBase64",(e,t)=>{Qc.init(e,t),q.init(e,t)});function If(e){return Gi(sr,e)}const lr=g("ZodBase64URL",(e,t)=>{ts.init(e,t),q.init(e,t)});function xf(e){return qi(lr,e)}const dr=g("ZodE164",(e,t)=>{ns.init(e,t),q.init(e,t)});function Tf(e){return Wi(dr,e)}const fr=g("ZodJWT",(e,t)=>{is.init(e,t),q.init(e,t)});function zf(e){return Hi(fr,e)}const _t=g("ZodCustomStringFormat",(e,t)=>{os.init(e,t),q.init(e,t)});function Ef(e,t,r={}){return Ft(_t,e,t,r)}function Of(e){return Ft(_t,"hostname",qu,e)}function Uf(e){return Ft(_t,"hex",lc,e)}function Df(e,t){const r=(t==null?void 0:t.enc)??"hex",i=`${e}_${r}`,n=_i[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return Ft(_t,i,n,t)}const Jt=g("ZodNumber",(e,t)=>{Si.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>rd(e,i,n),e.gt=(i,n)=>e.check(Ve(i,n)),e.gte=(i,n)=>e.check(pe(i,n)),e.min=(i,n)=>e.check(pe(i,n)),e.lt=(i,n)=>e.check(Re(i,n)),e.lte=(i,n)=>e.check(we(i,n)),e.max=(i,n)=>e.check(we(i,n)),e.int=i=>e.check(mr(i)),e.safe=i=>e.check(mr(i)),e.positive=i=>e.check(Ve(0,i)),e.nonnegative=i=>e.check(pe(0,i)),e.negative=i=>e.check(Re(0,i)),e.nonpositive=i=>e.check(we(0,i)),e.multipleOf=(i,n)=>e.check(pt(i,n)),e.step=(i,n)=>e.check(pt(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 lo(e){return Sl(Jt,e)}const tt=g("ZodNumberFormat",(e,t)=>{as.init(e,t),Jt.init(e,t)});function mr(e){return Il(tt,e)}function Nf(e){return xl(tt,e)}function jf(e){return Tl(tt,e)}function Pf(e){return zl(tt,e)}function Af(e){return El(tt,e)}const Gt=g("ZodBoolean",(e,t)=>{ki.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>id(e,r,i)});function fo(e){return Ol(Gt,e)}const qt=g("ZodBigInt",(e,t)=>{Ii.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>od(e,i),e.gte=(i,n)=>e.check(pe(i,n)),e.min=(i,n)=>e.check(pe(i,n)),e.gt=(i,n)=>e.check(Ve(i,n)),e.gte=(i,n)=>e.check(pe(i,n)),e.min=(i,n)=>e.check(pe(i,n)),e.lt=(i,n)=>e.check(Re(i,n)),e.lte=(i,n)=>e.check(we(i,n)),e.max=(i,n)=>e.check(we(i,n)),e.positive=i=>e.check(Ve(BigInt(0),i)),e.negative=i=>e.check(Re(BigInt(0),i)),e.nonpositive=i=>e.check(we(BigInt(0),i)),e.nonnegative=i=>e.check(pe(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(pt(i,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Lf(e){return Dl(qt,e)}const pr=g("ZodBigIntFormat",(e,t)=>{us.init(e,t),qt.init(e,t)});function Cf(e){return jl(pr,e)}function Zf(e){return Pl(pr,e)}const mo=g("ZodSymbol",(e,t)=>{cs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ad(e,r)});function Mf(e){return Al(mo,e)}const po=g("ZodUndefined",(e,t)=>{ss.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cd(e,r)});function Ff(e){return Ll(po,e)}const ho=g("ZodNull",(e,t)=>{ls.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ud(e,r,i)});function go(e){return Cl(ho,e)}const vo=g("ZodAny",(e,t)=>{ds.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>dd()});function Rf(){return Zl(vo)}const bo=g("ZodUnknown",(e,t)=>{fs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>fd()});function nt(){return Ml(bo)}const _o=g("ZodNever",(e,t)=>{ms.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ld(e,r,i)});function hr(e){return Fl(_o,e)}const yo=g("ZodVoid",(e,t)=>{ps.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sd(e,r)});function Vf(e){return Rl(yo,e)}const gr=g("ZodDate",(e,t)=>{hs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>md(e,i),e.min=(i,n)=>e.check(pe(i,n)),e.max=(i,n)=>e.check(we(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 Bf(e){return Vl(gr,e)}const $o=g("ZodArray",(e,t)=>{vs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Id(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(Zt(r,i)),e.length=(r,i)=>e.check(Mt(r,i)),e.unwrap=()=>e.element});function Wt(e,t){return Jl($o,e,t)}function Kf(e){const t=e._zod.def.shape;return br(Object.keys(t))}const Ht=g("ZodObject",(e,t)=>{$s.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xd(e,r,i,n),F(e,"shape",()=>t.shape),e.keyof=()=>br(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:nt()}),e.loose=()=>e.clone({...e._zod.def,catchall:nt()}),e.strict=()=>e.clone({...e._zod.def,catchall:hr()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>vu(e,r),e.safeExtend=r=>bu(e,r),e.merge=r=>_u(e,r),e.pick=r=>hu(e,r),e.omit=r=>gu(e,r),e.partial=(...r)=>yu(yr,e,r[0]),e.required=(...r)=>$u($r,e,r[0])});function Jf(e,t){const r={type:"object",shape:e??{},...b(t)};return new Ht(r)}function Gf(e,t){return new Ht({type:"object",shape:e,catchall:hr(),...b(t)})}function qf(e,t){return new Ht({type:"object",shape:e,catchall:nt(),...b(t)})}const Xt=g("ZodUnion",(e,t)=>{On.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>no(e,r,i,n),e.options=t.options});function vr(e,t){return new Xt({type:"union",options:e,...b(t)})}const wo=g("ZodXor",(e,t)=>{Xt.init(e,t),ks.init(e,t),e._zod.processJSONSchema=(r,i,n)=>no(e,r,i,n),e.options=t.options});function Wf(e,t){return new wo({type:"union",options:e,inclusive:!1,...b(t)})}const So=g("ZodDiscriminatedUnion",(e,t)=>{Xt.init(e,t),Is.init(e,t)});function Hf(e,t,r){return new So({type:"union",options:t,discriminator:e,...b(r)})}const ko=g("ZodIntersection",(e,t)=>{xs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Td(e,r,i,n)});function Io(e,t){return new ko({type:"intersection",left:e,right:t})}const xo=g("ZodTuple",(e,t)=>{Ti.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zd(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function To(e,t,r){const i=t instanceof C,n=i?r:t,o=i?t:null;return new xo({type:"tuple",items:e,rest:o,...b(n)})}const Yt=g("ZodRecord",(e,t)=>{zs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ed(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function zo(e,t,r){return new Yt({type:"record",keyType:e,valueType:t,...b(r)})}function Xf(e,t,r){const i=_e(e);return i._zod.values=void 0,new Yt({type:"record",keyType:i,valueType:t,...b(r)})}function Yf(e,t,r){return new Yt({type:"record",keyType:e,valueType:t,mode:"loose",...b(r)})}const Eo=g("ZodMap",(e,t)=>{Es.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sd(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(ht(...r)),e.size=(...r)=>e.check(Ct(...r))});function Qf(e,t,r){return new Eo({type:"map",keyType:e,valueType:t,...b(r)})}const Oo=g("ZodSet",(e,t)=>{Us.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>kd(e,r),e.min=(...r)=>e.check(Be(...r)),e.nonempty=r=>e.check(Be(1,r)),e.max=(...r)=>e.check(ht(...r)),e.size=(...r)=>e.check(Ct(...r))});function em(e,t){return new Oo({type:"set",valueType:e,...b(t)})}const yt=g("ZodEnum",(e,t)=>{Ns.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>pd(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 yt({...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 yt({...t,checks:[],...b(n),entries:o})}});function br(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new yt({type:"enum",entries:r,...b(t)})}function tm(e,t){return new yt({type:"enum",entries:e,...b(t)})}const Uo=g("ZodLiteral",(e,t)=>{js.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>hd(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 nm(e,t){return new Uo({type:"literal",values:Array.isArray(e)?e:[e],...b(t)})}const Do=g("ZodFile",(e,t)=>{Ps.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bd(e,r,i),e.min=(r,i)=>e.check(Be(r,i)),e.max=(r,i)=>e.check(ht(r,i)),e.mime=(r,i)=>e.check(Vn(Array.isArray(r)?r:[r],i))});function rm(e){return Gl(Do,e)}const No=g("ZodTransform",(e,t)=>{As.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wd(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new $n(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 _r(e){return new No({type:"transform",transform:e})}const yr=g("ZodOptional",(e,t)=>{zi.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ro(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Qt(e){return new yr({type:"optional",innerType:e})}const jo=g("ZodExactOptional",(e,t)=>{Cs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ro(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Po(e){return new jo({type:"optional",innerType:e})}const Ao=g("ZodNullable",(e,t)=>{Zs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Od(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function en(e){return new Ao({type:"nullable",innerType:e})}function im(e){return Qt(en(e))}const Lo=g("ZodDefault",(e,t)=>{Ms.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Co(e,t){return new Lo({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():In(t)}})}const Zo=g("ZodPrefault",(e,t)=>{Rs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Mo(e,t){return new Zo({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():In(t)}})}const $r=g("ZodNonOptional",(e,t)=>{Vs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ud(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Fo(e,t){return new $r({type:"nonoptional",innerType:e,...b(t)})}const Ro=g("ZodSuccess",(e,t)=>{Ks.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_d(e,r,i),e.unwrap=()=>e._zod.def.innerType});function om(e){return new Ro({type:"success",innerType:e})}const Vo=g("ZodCatch",(e,t)=>{Js.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.removeCatch=e.unwrap});function Bo(e,t){return new Vo({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Ko=g("ZodNaN",(e,t)=>{Gs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>gd(e,r)});function am(e){return Kl(Ko,e)}const wr=g("ZodPipe",(e,t)=>{qs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pd(e,r,i,n),e.in=t.in,e.out=t.out});function tn(e,t){return new wr({type:"pipe",in:e,out:t})}const Sr=g("ZodCodec",(e,t)=>{wr.init(e,t),Ei.init(e,t)});function um(e,t,r){return new Sr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}const Jo=g("ZodReadonly",(e,t)=>{Ws.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ad(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Go(e){return new Jo({type:"readonly",innerType:e})}const qo=g("ZodTemplateLiteral",(e,t)=>{Xs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>vd(e,r,i)});function cm(e,t){return new qo({type:"template_literal",parts:e,...b(t)})}const Wo=g("ZodLazy",(e,t)=>{el.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Cd(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function Ho(e){return new Wo({type:"lazy",getter:e})}const Xo=g("ZodPromise",(e,t)=>{Qs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ld(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function sm(e){return new Xo({type:"promise",innerType:e})}const Yo=g("ZodFunction",(e,t)=>{Ys.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$d(e,r)});function kr(e){return new Yo({type:"function",input:Array.isArray(e==null?void 0:e.input)?To(e==null?void 0:e.input):(e==null?void 0:e.input)??Wt(nt()),output:(e==null?void 0:e.output)??nt()})}const nn=g("ZodCustom",(e,t)=>{tl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>yd(e,r)});function lm(e){const t=new Y({check:"custom"});return t._zod.check=e,t}function dm(e,t){return ql(nn,e??(()=>!0),t)}function Qo(e,t={}){return Wl(nn,e,t)}function ea(e){return Hl(e)}const fm=Yl,mm=Ql;function pm(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 hm=(...e)=>ed({Codec:Sr,Boolean:Gt,String:Vt},...e);function gm(e){const t=Ho(()=>vr([Hn(e),lo(),fo(),go(),Wt(t),zo(Hn(),t)]));return t}function vm(e,t){return tn(_r(e),t)}const Jb=Object.freeze(Object.defineProperty({__proto__:null,ZodAny:vo,ZodArray:$o,ZodBase64:sr,ZodBase64URL:lr,ZodBigInt:qt,ZodBigIntFormat:pr,ZodBoolean:Gt,ZodCIDRv4:ur,ZodCIDRv6:cr,ZodCUID:er,ZodCUID2:tr,ZodCatch:Vo,ZodCodec:Sr,ZodCustom:nn,ZodCustomStringFormat:_t,ZodDate:gr,ZodDefault:Lo,ZodDiscriminatedUnion:So,ZodE164:dr,ZodEmail:Xn,ZodEmoji:Yn,ZodEnum:yt,ZodExactOptional:jo,ZodFile:Do,ZodFunction:Yo,ZodGUID:Bt,ZodIPv4:or,ZodIPv6:ar,ZodIntersection:ko,ZodJWT:fr,ZodKSUID:ir,ZodLazy:Wo,ZodLiteral:Uo,ZodMAC:so,ZodMap:Eo,ZodNaN:Ko,ZodNanoID:Qn,ZodNever:_o,ZodNonOptional:$r,ZodNull:ho,ZodNullable:Ao,ZodNumber:Jt,ZodNumberFormat:tt,ZodObject:Ht,ZodOptional:yr,ZodPipe:wr,ZodPrefault:Zo,ZodPromise:Xo,ZodReadonly:Jo,ZodRecord:Yt,ZodSet:Oo,ZodString:Vt,ZodStringFormat:q,ZodSuccess:Ro,ZodSymbol:mo,ZodTemplateLiteral:qo,ZodTransform:No,ZodTuple:xo,ZodType:Z,ZodULID:nr,ZodURL:Kt,ZodUUID:De,ZodUndefined:po,ZodUnion:Xt,ZodUnknown:bo,ZodVoid:yo,ZodXID:rr,ZodXor:wo,_ZodString:Wn,_default:Co,_function:kr,any:Rf,array:Wt,base64:If,base64url:xf,bigint:Lf,boolean:fo,catch:Bo,check:lm,cidrv4:Sf,cidrv6:kf,codec:um,cuid:hf,cuid2:gf,custom:dm,date:Bf,describe:fm,discriminatedUnion:Hf,e164:Tf,email:of,emoji:mf,enum:br,exactOptional:Po,file:rm,float32:Nf,float64:jf,function:kr,guid:af,hash:Df,hex:Uf,hostname:Of,httpUrl:ff,instanceof:pm,int:mr,int32:Pf,int64:Cf,intersection:Io,ipv4:yf,ipv6:wf,json:gm,jwt:zf,keyof:Kf,ksuid:_f,lazy:Ho,literal:nm,looseObject:qf,looseRecord:Yf,mac:$f,map:Qf,meta:mm,nan:am,nanoid:pf,nativeEnum:tm,never:hr,nonoptional:Fo,null:go,nullable:en,nullish:im,number:lo,object:Jf,optional:Qt,partialRecord:Xf,pipe:tn,prefault:Mo,preprocess:vm,promise:sm,readonly:Go,record:zo,refine:Qo,set:em,strictObject:Gf,string:Hn,stringFormat:Ef,stringbool:hm,success:om,superRefine:ea,symbol:Mf,templateLiteral:cm,transform:_r,tuple:To,uint32:Af,uint64:Zf,ulid:vf,undefined:Ff,union:vr,unknown:nt,url:df,uuid:uf,uuidv4:cf,uuidv6:sf,uuidv7:lf,void:Vf,xid:bf,xor:Wf},Symbol.toStringTag,{value:"Module"})),Gb={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 qb(e){se({customError:e})}function Wb(){return se().customError}var ta;ta||(ta={});const I={...Jb,...Bb,iso:Bd},Hb=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 Xb(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 Yb(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 bm(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=Yb(n,t),a=le(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 bm(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=le(c,t);n[s]=a.has(s)?l:l.optional()}if(e.propertyNames){const s=le(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?le(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=le(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(le(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=>le(s,t)),u=o&&typeof o=="object"&&!Array.isArray(o)?le(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=>le(s,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?le(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=le(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 le(e,t){if(typeof e=="boolean")return e?I.any():I.never();let r=bm(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=>le(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=>le(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:le(e.allOf[0],t);const s=i?0:1;for(let c=s;c<e.allOf.length;c++)u=I.intersection(u,le(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))Hb.has(u)||(n[u]=e[u]);return Object.keys(n).length>0&&t.registry.add(r,n),r}function Qb(e,t){if(typeof e=="boolean")return e?I.any():I.never();const r=Xb(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)??$e};return le(e,n)}function e1(e){return gl(Vt,e)}function t1(e){return kl(Jt,e)}function n1(e){return Ul(Gt,e)}function r1(e){return Nl(qt,e)}function i1(e){return Bl(gr,e)}const o1=Object.freeze(Object.defineProperty({__proto__:null,bigint:r1,boolean:n1,date:i1,number:t1,string:e1},Symbol.toStringTag,{value:"Module"}));se(il());const _m=Object.freeze(Object.defineProperty({__proto__:null,$brand:au,$input:ml,$output:fl,NEVER:ou,TimePrecision:bl,ZodAny:vo,ZodArray:$o,ZodBase64:sr,ZodBase64URL:lr,ZodBigInt:qt,ZodBigIntFormat:pr,ZodBoolean:Gt,ZodCIDRv4:ur,ZodCIDRv6:cr,ZodCUID:er,ZodCUID2:tr,ZodCatch:Vo,ZodCodec:Sr,ZodCustom:nn,ZodCustomStringFormat:_t,ZodDate:gr,ZodDefault:Lo,ZodDiscriminatedUnion:So,ZodE164:dr,ZodEmail:Xn,ZodEmoji:Yn,ZodEnum:yt,ZodError:Kb,ZodExactOptional:jo,ZodFile:Do,get ZodFirstPartyTypeKind(){return ta},ZodFunction:Yo,ZodGUID:Bt,ZodIPv4:or,ZodIPv6:ar,ZodISODate:ao,ZodISODateTime:oo,ZodISODuration:co,ZodISOTime:uo,ZodIntersection:ko,ZodIssueCode:Gb,ZodJWT:fr,ZodKSUID:ir,ZodLazy:Wo,ZodLiteral:Uo,ZodMAC:so,ZodMap:Eo,ZodNaN:Ko,ZodNanoID:Qn,ZodNever:_o,ZodNonOptional:$r,ZodNull:ho,ZodNullable:Ao,ZodNumber:Jt,ZodNumberFormat:tt,ZodObject:Ht,ZodOptional:yr,ZodPipe:wr,ZodPrefault:Zo,ZodPromise:Xo,ZodReadonly:Jo,ZodRealError:ge,ZodRecord:Yt,ZodSet:Oo,ZodString:Vt,ZodStringFormat:q,ZodSuccess:Ro,ZodSymbol:mo,ZodTemplateLiteral:qo,ZodTransform:No,ZodTuple:xo,ZodType:Z,ZodULID:nr,ZodURL:Kt,ZodUUID:De,ZodUndefined:po,ZodUnion:Xt,ZodUnknown:bo,ZodVoid:yo,ZodXID:rr,ZodXor:wo,_ZodString:Wn,_default:Co,_function:kr,any:Rf,array:Wt,base64:If,base64url:xf,bigint:Lf,boolean:fo,catch:Bo,check:lm,cidrv4:Sf,cidrv6:kf,clone:_e,codec:um,coerce:o1,config:se,core:Vb,cuid:hf,cuid2:gf,custom:dm,date:Bf,decode:Xd,decodeAsync:Qd,describe:fm,discriminatedUnion:Hf,e164:Tf,email:of,emoji:mf,encode:Hd,encodeAsync:Yd,endsWith:Rn,enum:br,exactOptional:Po,file:rm,flattenError:oi,float32:Nf,float64:jf,formatError:ai,fromJSONSchema:Qb,function:kr,getErrorMap:Wb,globalRegistry:$e,gt:Ve,gte:pe,guid:af,hash:Df,hex:Uf,hostname:Of,httpUrl:ff,includes:Mn,instanceof:pm,int:mr,int32:Pf,int64:Cf,intersection:Io,ipv4:yf,ipv6:wf,iso:Bd,json:gm,jwt:zf,keyof:Kf,ksuid:_f,lazy:Ho,length:Mt,literal:nm,locales:ll,looseObject:qf,looseRecord:Yf,lowercase:Cn,lt:Re,lte:we,mac:$f,map:Qf,maxLength:Zt,maxSize:ht,meta:mm,mime:Vn,minLength:et,minSize:Be,multipleOf:pt,nan:am,nanoid:pf,nativeEnum:tm,negative:Yi,never:hr,nonnegative:eo,nonoptional:Fo,nonpositive:Qi,normalize:Bn,null:go,nullable:en,nullish:im,number:lo,object:Jf,optional:Qt,overwrite:Ae,parse:Jd,parseAsync:Gd,partialRecord:Xf,pipe:tn,positive:Xi,prefault:Mo,preprocess:vm,prettifyError:zu,promise:sm,property:to,readonly:Go,record:zo,refine:Qo,regex:Ln,regexes:_i,registry:Oi,safeDecode:tf,safeDecodeAsync:rf,safeEncode:ef,safeEncodeAsync:nf,safeParse:qd,safeParseAsync:Wd,set:em,setErrorMap:qb,size:Ct,slugify:qn,startsWith:Fn,strictObject:Gf,string:Hn,stringFormat:Ef,stringbool:hm,success:om,superRefine:ea,symbol:Mf,templateLiteral:cm,toJSONSchema:Zd,toLowerCase:Jn,toUpperCase:Gn,transform:_r,treeifyError:xu,trim:Kn,tuple:To,uint32:Af,uint64:Zf,ulid:vf,undefined:Ff,union:vr,unknown:nt,uppercase:Zn,url:df,util:ku,uuid:uf,uuidv4:cf,uuidv6:sf,uuidv7:lf,void:Vf,xid:bf,xor:Wf},Symbol.toStringTag,{value:"Module"}));function ym(e){const t=e.match(/^(.+)\/(flows|sources)\/([^/]+)$/);return t?[t[1],t[3]]:null}function a1(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=A.parseTimeRange(s.timerange);let l=c.start?A.timeMomentToSeconds(c.start):null,d=c.end?A.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?"()":A.formatTimeRangeExpr({start:A.secondsToTimeMoment(n),end:A.secondsToTimeMoment(o),isStartInclusive:!0,isEndInclusive:!1})}function $m(e,t){const r=A.parseTimeRange(t);if(r.start===void 0||r.end===void 0)throw new M.OmpError("Can't convert duration to timerange. Timerange is missing start and/or end.");const i=A.timeMomentToSeconds(r.start),n=A.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 A.formatTimeRangeExpr({start:A.secondsToTimeMoment(o),end:r.end,isEndInclusive:r.isEndInclusive,isStartInclusive:r.isStartInclusive})}function u1(e){const t=e.endsWith("/")?e.slice(0,-1):e;return t.substring(t.lastIndexOf("/")+1)}function wm(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 c1(e){return _m.object({ffomTimeZoneOffset:_m.number().int().min(-23).max(23).optional()}).safeParse(e).success}function na(e){return eu(Gh(new be(e)))}const Ir="omakase-virtual-flow";class Sm{constructor(t,r){k(this,"_tamsApi");this._tamsApi=Hh(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 be(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 M.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===Ir,n=await this._fetchSubflows(((s=t.flow_collection)==null?void 0:s.map(c=>c.id))??[]),o=a1(i?n:[t,...n]);if(o==="()")throw new M.OmpError("Provided TAMS media has no timerange");let a;r?typeof r=="number"?a=$m(r,o):a=A.timerangeDuration(r)>A.timerangeDuration(o)?o:r:a=$m(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===Ir)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 be(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:Ir,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 ra,km;function Im(){if(km)return ra;km=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 g=m.split(`
68
- `),p=g[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&&g.length===1)return{valid:!0,strict:d,cues:[],errors:[]};if(!l&&g.length>1&&g[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(g):null,z={valid:w.length===0,strict:d,cues:v,errors:w};return l&&(z.meta=E),z}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(g){return l.push(g),null}}).filter(Boolean),errors:l}}function o(s,c,l){let d="",f=0,m=.01,g="",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(),g=v.join(`
70
- `),g?{identifier:d,start:f,end:m,text:g,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 ra={ParserError:e,parse:r},ra}var ia,Tm;function l1(){if(Tm)return ia;Tm=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
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 O=l?i(h):null,z={valid:w.length===0,strict:d,cues:v,errors:w};return l&&(z.meta=O),z}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 O=`Cue identifier needs to be followed by timestamp (cue #${c})`;throw new e(O)}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 ra={ParserError:e,parse:r},ra}var ia,xm;function s1(){if(xm)return ia;xm=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 ia={CompilerError:e,compile:t},ia}var oa,zm;function Em(){if(zm)return oa;zm=1;const e=xm().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((g,p)=>{const v=p===0,w=p===s.cues.length-1,E=g.start,z=g.end,C=w?1/0:s.cues[p+1].start,Z=v?z:z-E,V=v?0:E-s.cues[p-1].end;f=f+Z+V,`${p}`,c.length+1,d&&(l.push(d),f+=d.end-m,d=null),l.push(g);let fe=C-z<u&&V<u&&f>u;if(r(m,u,C,V)){const Q=i(w,z,u,f,m);c.push({duration:Q,cues:l}),m+=Q,f=0,l=[]}else fe=!1;fe&&(d=g)}),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 oa={segment:t},oa}var aa,Om;function d1(){if(Om)return aa;Om=1;const e=Em().segment;function t(l,d,f){typeof f>"u"&&(f="900000");const m=e(l,d),g=[];return m.forEach((p,v)=>{const w=`WEBVTT
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 ia={CompilerError:e,compile:t},ia}var oa,Tm;function zm(){if(Tm)return oa;Tm=1;const e=Im().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,O=h.start,z=h.end,E=w?1/0:s.cues[p+1].start,R=v?z:z-O,V=v?0:O-s.cues[p-1].end;f=f+R+V,`${p}`,c.length+1,d&&(l.push(d),f+=d.end-m,d=null),l.push(h);let ee=E-z<u&&V<u&&f>u;if(r(m,u,E,V)){const ie=i(w,z,u,f,m);c.push({duration:ie,cues:l}),m+=ie,f=0,l=[]}else ee=!1;ee&&(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 oa={segment:t},oa}var aa,Em;function l1(){if(Em)return aa;Em=1;const e=zm().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
85
  ${u(p.cues)}
86
- `,E=n(v);g.push({filename:E,content:w})}),g}function r(l,d){const f=e(l,d),m=o(f);return`#EXTM3U
86
+ `,O=n(v);h.push({filename:O,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,13 +94,13 @@ ${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),g=l.styles?`${l.styles}`:"";return d.push(`${f} --> ${m} ${g}`),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),g=l-f*3600-m*60;return`${`${i(f,2)}:`}${i(m,2)}:${i(g,2)}.${i(d*1e3,3)}`}return aa={hlsSegment:t,hlsSegmentPlaylist:r},aa}var ua,Um;function f1(){if(Um)return ua;Um=1;const e=xm().parse,t=l1().compile,r=Em().segment,i=d1();return ua={parse:e,compile:t,segment:r,hls:i},ua}var m1=f1();async function p1(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 Dm(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 h1(e,t){return e.length?await Promise.all(e.map(async i=>{const n=await p1(i),o=m1.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(`${Dm(l.start)} --> ${Dm(l.end)}`),u.push(l.text),u.push("");const s=u.join(`
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 aa={hlsSegment:t,hlsSegmentPlaylist:r},aa}var ua,Om;function d1(){if(Om)return ua;Om=1;const e=Im().parse,t=s1().compile,r=zm().segment,i=l1();return ua={parse:e,compile:t,segment:r,hls:i},ua}var f1=d1();async function m1(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 Um(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 p1(e,t){return e.length?await Promise.all(e.map(async i=>{const n=await m1(i),o=f1.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(`${Um(l.start)} --> ${Um(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 g1{static slewSubtitlesFlows(t,r){return new _e(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 h1(s,r.mediaStartTime);c=c.map(l=>c1(l)),u.forEach((l,d)=>{l.get_urls=[{url:c.at(d)}]})})),i.next(),i.complete()}catch(o){i.error(o)}})()})}}class v1{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=j.timeMomentToSeconds(j.parseTimeRange(o.timerange).start);let c;if(a===t.length-1?c=r-.001:c=j.timeMomentToSeconds(j.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 Nm{constructor(t){k(this,"_player");k(this,"_videoApiProxy");k(this,"_authenticationData");k(this,"_tamsEndpoint");this._player=new F.OmakasePlayer(t),this._videoApiProxy=new iu(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),typeof t=="string")if((r==null?void 0:r.protocol)===void 0){const i=this._tamsEndpoint??$m(t).at(0);if(i===null)throw Error("Provided URL is not pointing to TAMS");const n=new km(i,this._authenticationData?Sm(this._authenticationData):void 0),o=(r==null?void 0:r.timerange)??(r==null?void 0:r.duration);return na(a=>{n.fetchManifestResources(t,o).pipe(ru(u=>{r!=null&&r.duration&&(r.duration=j.timerangeDuration(u.timerange))}),ei(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??$m(t.at(0)).at(0);if(i===null)throw Error("Provided URL is not pointing to TAMS");const n=new km(i,this._authenticationData?Sm(this._authenticationData):void 0),o=(r==null?void 0:r.timerange)??(r==null?void 0:r.duration);return na(a=>{n.fetchManifestResourcesForMultipleFlows(t,o).pipe(ei(u=>this._loadTamsMedia(u,r).pipe(nu(s=>{var c;return s.tamsMediaData&&(s.tamsMediaData.flow=void 0,(c=s.tamsMediaData.flowsSegments)==null||c.delete(kr)),s})))).subscribe(a)})}else return this._loadTamsMedia(t,r)}_loadTamsMedia(t,r){return na(i=>{const n=fh([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;const u=Va(t.flow,t.subflows,t.flowsSegments);if(!u.valid){i.error(u.message);return}if(r&&!s1(r)){i.error("Invalid ffomTimeZoneOffset");return}g1.slewSubtitlesFlows(t,n).pipe(ei(()=>{const s=Ba(t.flow,t.subflows,t.flowsSegments);return this._player.loadVideo(s.url,a).pipe(nu(c=>{this._videoApiProxy.mediaStartTime=n.mediaStartTime;const l=v1.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}}),ru(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 b1{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 F.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 F.ThumbnailLane(r.config),t.addTimelineLane(i)):r.type==="label"?(i=new F.LabelLane(r.config),t.addTimelineLane(i)):r.type==="subtitles"&&(i=new F.SubtitlesLane(r.config),t.addTimelineLane(i));const n=this._laneNodenMap.get(i.id);n==null||n.forEach(o=>{i.addTimelineNode(o.config)})}}var ca=function(e,t){return ca=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])},ca(e,t)};function rn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ca(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function _1(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 jm(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 wt(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 Ir(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 xr(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 y1(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(g){return Promise.resolve(g).then(m,d)}}function u(m,g){i[m]&&(n[m]=function(p){return new Promise(function(v,w){o.push([m,p,v,w])>1||s(m,p)})},g&&(n[m]=g(n[m])))}function s(m,g){try{c(i[m](g))}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,g){m(g),o.shift(),o.length&&s(o[0][0],o[0][1])}}function $1(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 wt=="function"?wt(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)}}typeof SuppressedError=="function"&&SuppressedError;function te(e){return typeof e=="function"}function sa(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 la=sa(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
100
+ `,c=new Blob([s],{type:"text/vtt"});return URL.createObjectURL(c)})):[]}class h1{static slewSubtitlesFlows(t,r){return new be(i=>{(async()=>{var n;try{const o=new Map,a=(n=t.subflows)==null?void 0:n.filter(u=>u.format==="urn:x-nmos:format:data"&&u.container==="text/vtt");a!=null&&a.length&&await Promise.all(a.map(async u=>{const s=t.flowsSegments.get(u.id),c=s.map(f=>{var m;return(m=f.get_urls)==null?void 0:m.at(-1).url});let l=await p1(c,r.mediaStartTime);l=l.map(f=>u1(f));const d=s.map((f,m)=>({...f,get_urls:[{url:l.at(m)}]}));o.set(u.id,d)})),i.next(o),i.complete()}catch(o){i.error(o)}})()})}}class g1{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=A.timeMomentToSeconds(A.parseTimeRange(o.timerange).start);let c;if(a===t.length-1?c=r-.001:c=A.timeMomentToSeconds(A.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 Dm{constructor(t){k(this,"_player");k(this,"_videoApiProxy");k(this,"_authenticationData");k(this,"_tamsEndpoint");this._player=new M.OmakasePlayer(t),this._videoApiProxy=new ru(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??ym(t).at(0);if(i===null)throw Error("Provided URL is not pointing to TAMS");const n=new Sm(i,this._authenticationData?wm(this._authenticationData):void 0),o=(r==null?void 0:r.timerange)??(r==null?void 0:r.duration);return na(a=>{n.fetchManifestResources(t,o).pipe(ei(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??ym(t.at(0)).at(0);if(i===null)throw Error("Provided URL is not pointing to TAMS");const n=new Sm(i,this._authenticationData?wm(this._authenticationData):void 0),o=(r==null?void 0:r.timerange)??(r==null?void 0:r.duration);return na(a=>{n.fetchManifestResourcesForMultipleFlows(t,o).pipe(ei(u=>this._loadTamsMedia(u,r).pipe(nu(s=>{var c;return s.tamsMediaData&&(s.tamsMediaData.flow=void 0,(c=s.tamsMediaData.flowsSegments)==null||c.delete(Ir)),s})))).subscribe(a)})}else return this._loadTamsMedia(t,r)}_loadTamsMedia(t,r){return na(i=>{const n=lh([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=Va(t.flow,t.subflows,t.flowsSegments);if(!u.valid){i.error(u.message);return}if(r&&!c1(r)){i.error("Invalid ffomTimeZoneOffset");return}h1.slewSubtitlesFlows(t,n).pipe(ei(s=>{const c=new Map([...t.flowsSegments,...s]),l=Ba(t.flow,t.subflows,c);return this._player.loadVideo(l.url,a).pipe(nu(d=>{this._videoApiProxy.mediaStartTime=n.mediaStartTime;const f=g1.generateThumbnailTrackUrl(t.subflows??[],c,this._player.video.getDuration()+n.mediaStartTime,n.mediaStartTime);return f&&this._player.chroming.setThumbnailVttUrl(f),{...d,mediaStartTime:n.mediaStartTime,tamsMediaData:r!=null&&r.returnTamsMediaData?t:void 0,thumbnailVttTrackUrl:f,videoUrls:l.video,audioUrls:l.audio,textUrls:l.text}}),qh(d=>{this._videoApiProxy.setTamsVideo(d),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 v1{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 M.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 M.ThumbnailLane(r.config),t.addTimelineLane(i)):r.type==="label"?(i=new M.LabelLane(r.config),t.addTimelineLane(i)):r.type==="subtitles"&&(i=new M.SubtitlesLane(r.config),t.addTimelineLane(i));const n=this._laneNodenMap.get(i.id);n==null||n.forEach(o=>{i.addTimelineNode(o.config)})}}var ca=function(e,t){return ca=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])},ca(e,t)};function rn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ca(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function b1(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 Nm(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 $t(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 Tr(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 wt(e){return this instanceof wt?(this.v=e,this):new wt(e)}function _1(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 wt?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 y1(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 $t=="function"?$t(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)}}typeof SuppressedError=="function"&&SuppressedError;function re(e){return typeof e=="function"}function sa(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 la=sa(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 da(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Tr=(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=wt(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(te(l))try{l()}catch(p){o=p instanceof la?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=wt(d),m=f.next();!m.done;m=f.next()){var g=m.value;try{Lm(g)}catch(p){o=o??[],p instanceof la?o=xr(xr([],Ir(o)),Ir(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 la(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Lm(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)&&da(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&da(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Pm=Tr.EMPTY;function Am(e){return e instanceof Tr||e&&"closed"in e&&te(e.remove)&&te(e.add)&&te(e.unsubscribe)}function Lm(e){te(e)?e():e.unsubscribe()}var w1={Promise:void 0},S1={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,xr([e,t],Ir(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Cm(e){S1.setTimeout(function(){throw e})}function fa(){}function zr(e){e()}var ma=(function(e){rn(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,Am(r)&&r.add(i)):i.destination=x1,i}return t.create=function(r,i,n){return new pa(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})(Tr),k1=(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){Er(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){Er(i)}else Er(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Er(r)}},e})(),pa=(function(e){rn(t,e);function t(r,i,n){var o=e.call(this)||this,a;return te(r)||!r?a={next:r??void 0,error:i??void 0,complete:n??void 0}:a=r,o.destination=new k1(a),o}return t})(ma);function Er(e){Cm(e)}function I1(e){throw e}var x1={closed:!0,next:fa,error:I1,complete:fa},ha=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Or(e){return e}function T1(e){return e.length===0?Or:e.length===1?e[0]:function(r){return e.reduce(function(i,n){return n(i)},r)}}var be=(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=E1(t)?t:new pa(t,r,i);return zr(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=Zm(r),new r(function(n,o){var a=new pa({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[ha]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return T1(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Zm(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 Zm(e){var t;return(t=e??w1.Promise)!==null&&t!==void 0?t:Promise}function z1(e){return e&&te(e.next)&&te(e.error)&&te(e.complete)}function E1(e){return e&&e instanceof ma||z1(e)&&Am(e)}function O1(e){return te(e==null?void 0:e.lift)}function Ge(e){return function(t){if(O1(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 U1(e,t,r,i,n)}var U1=(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})(ma),D1=sa(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),rt=(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 Mm(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new D1},t.prototype.next=function(r){var i=this;zr(function(){var n,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=wt(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;zr(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;zr(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?Pm:(this.currentObservers=null,u.push(r),new Tr(function(){i.currentObservers=null,da(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 be;return r.source=this,r},t.create=function(r,i){return new Mm(r,i)},t})(be),Mm=(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:Pm},t})(rt),N1=new be(function(e){return e.complete()});function j1(e){return e&&te(e.schedule)}function Fm(e){return e[e.length-1]}function P1(e){return te(Fm(e))?e.pop():void 0}function A1(e){return j1(Fm(e))?e.pop():void 0}var Rm=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function Vm(e){return te(e==null?void 0:e.then)}function Bm(e){return te(e[ha])}function Km(e){return Symbol.asyncIterator&&te(e==null?void 0:e[Symbol.asyncIterator])}function Jm(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 L1(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Gm=L1();function Wm(e){return te(e==null?void 0:e[Gm])}function Hm(e){return y1(this,arguments,function(){var r,i,n,o;return jm(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 qm(e){return te(e==null?void 0:e.getReader)}function Ur(e){if(e instanceof be)return e;if(e!=null){if(Bm(e))return C1(e);if(Rm(e))return Z1(e);if(Vm(e))return M1(e);if(Km(e))return Xm(e);if(Wm(e))return F1(e);if(qm(e))return R1(e)}throw Jm(e)}function C1(e){return new be(function(t){var r=e[ha]();if(te(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Z1(e){return new be(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function M1(e){return new be(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Cm)})}function F1(e){return new be(function(t){var r,i;try{for(var n=wt(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 Xm(e){return new be(function(t){V1(e,t).catch(function(r){return t.error(r)})})}function R1(e){return Xm(Hm(e))}function V1(e,t){var r,i,n,o;return _1(this,void 0,void 0,function(){var a,u;return jm(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),r=$1(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 He(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 Ym(e,t){return t===void 0&&(t=0),Ge(function(r,i){r.subscribe(We(i,function(n){return He(i,e,function(){return i.next(n)},t)},function(){return He(i,e,function(){return i.complete()},t)},function(n){return He(i,e,function(){return i.error(n)},t)}))})}function Qm(e,t){return t===void 0&&(t=0),Ge(function(r,i){i.add(e.schedule(function(){return r.subscribe(i)},t))})}function B1(e,t){return Ur(e).pipe(Qm(t),Ym(t))}function K1(e,t){return Ur(e).pipe(Qm(t),Ym(t))}function J1(e,t){return new be(function(r){var i=0;return t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||this.schedule())})})}function G1(e,t){return new be(function(r){var i;return He(r,t,function(){i=e[Gm](),He(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 te(i==null?void 0:i.return)&&i.return()}})}function ep(e,t){if(!e)throw new Error("Iterable cannot be null");return new be(function(r){He(r,t,function(){var i=e[Symbol.asyncIterator]();He(r,t,function(){i.next().then(function(n){n.done?r.complete():r.next(n.value)})},0,!0)})})}function W1(e,t){return ep(Hm(e),t)}function H1(e,t){if(e!=null){if(Bm(e))return B1(e,t);if(Rm(e))return J1(e,t);if(Vm(e))return K1(e,t);if(Km(e))return ep(e,t);if(Wm(e))return G1(e,t);if(qm(e))return W1(e,t)}throw Jm(e)}function tp(e,t){return t?H1(e,t):Ur(e)}var np=sa(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function q1(e,t){return Ge(function(r,i){var n=0;r.subscribe(We(i,function(o){i.next(e.call(t,o,n++))}))})}var X1=Array.isArray;function Y1(e,t){return X1(t)?e.apply(void 0,xr([],Ir(t))):e(t)}function Q1(e){return q1(function(t){return Y1(e,t)})}var e0=Array.isArray,t0=Object.getPrototypeOf,n0=Object.prototype,r0=Object.keys;function i0(e){if(e.length===1){var t=e[0];if(e0(t))return{args:t,keys:null};if(o0(t)){var r=r0(t);return{args:r.map(function(i){return t[i]}),keys:r}}}return{args:e,keys:null}}function o0(e){return e&&typeof e=="object"&&t0(e)===n0}function a0(e,t){return e.reduce(function(r,i,n){return r[i]=t[n],r},{})}function u0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=A1(e),i=P1(e),n=i0(e),o=n.args,a=n.keys;if(o.length===0)return tp([],r);var u=new be(c0(o,r,a?function(s){return a0(a,s)}:Or));return i?u.pipe(Q1(i)):u}function c0(e,t,r){return r===void 0&&(r=Or),function(i){rp(t,function(){for(var n=e.length,o=new Array(n),a=n,u=n,s=function(l){rp(t,function(){var d=tp(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 rp(e,t,r){e?He(r,e,t):t()}function s0(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 l0(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 d0(e){return e<=0?function(){return N1}:Ge(function(t,r){var i=0;t.subscribe(We(r,function(n){++i<=e&&(r.next(n),e<=i&&r.complete())}))})}function f0(e){return e===void 0&&(e=m0),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 m0(){return new np}function kt(e,t){var r=arguments.length>=2;return function(i){return i.pipe(Or,d0(1),r?l0(t):f0(function(){return new np}))}}function oe(e){return Ge(function(t,r){Ur(e).subscribe(We(r,function(){return r.complete()},fa)),!r.closed&&t.subscribe(r)})}class p0{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 h0=y.memo(({omakasePlayer:e,onTimelineCreatedCallback:t,timelineConfig:r,enableHotKeys:i})=>(y.useEffect(()=>{if(r.timelineHTMLElementId===void 0&&(r.timelineHTMLElementId="omakase-timeline"),e.createTimeline(r).subscribe({next:n=>{u0([e.timeline.onReady$,e.video.onVideoLoaded$.pipe(s0(o=>!!o))]).subscribe({next:()=>t(n)})}}),i===void 0||i){const n=new p0;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]),y.createElement("div",{id:r.timelineHTMLElementId})));class ip{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 on=[.25,.5,.75,1,2,4,8];class Dr{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=ip.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=on.indexOf(r.video.getPlaybackRate())+a;let s;return u<0?s=on.at(0):u>=on.length?s=on.at(-1):s=on.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 g0=y.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"),y.useEffect(()=>{var s,c;let a=new F.OmakasePlayer(r);const u=l=>{Dr.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(Dr.getKeyboardShortcutsHelpMenuGroup())),a.loadVideo(t,i).subscribe({next:l=>{n&&n(a,l)}}),()=>{(o===void 0||o)&&window.removeEventListener("keydown",u)}},[t]),y.createElement("div",{id:r.playerHTMLElementId})}),v0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.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"}),y.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"})),b0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.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"}),y.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"})),_0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.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"})),y0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.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"})),$0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M11.3475 3H5.775V21L11.3475 17.0475V3Z",fill:"currentColor"}),y.createElement("path",{d:"M18.225 21L12.6525 17.0475V3H18.225V21ZM13.7775 16.47L17.1 18.825V4.125H13.7775V16.47Z",fill:"currentColor"})),w0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M4.6875 3V21L8.0625 17.0475L11.4375 21V3H4.6875Z",fill:"currentColor"}),y.createElement("path",{d:"M12.5625 3V21L15.9375 17.0475L19.3125 21V3H12.5625Z",fill:"currentColor"})),S0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.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"})),k0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.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"}),y.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"})),I0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("g",{clipPath:"url(#clip0_3377_237)"},y.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"}),y.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"})),y.createElement("defs",null,y.createElement("clipPath",{id:"clip0_3377_237"},y.createElement("rect",{width:"18",height:"15.95",fill:"white",transform:"translate(3 4)"})))),x0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("g",{clipPath:"url(#clip0_3377_260)"},y.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"}),y.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"})),y.createElement("defs",null,y.createElement("clipPath",{id:"clip0_3377_260"},y.createElement("rect",{width:"18",height:"15.95",fill:"white",transform:"translate(3 4)"})))),ke=({Icon:e,onClick:t,width:r,height:i,text:n,disabled:o})=>y.createElement("button",{disabled:o,onClick:t},y.createElement(e,{width:r,height:i})," ",n),T0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M12.6525 17.0475L18.225 21V3H12.6525V17.0475Z",fill:"currentColor"}),y.createElement("path",{d:"M5.775 3H11.3475V17.0475L5.775 21V3ZM10.2225 4.125H6.9V18.825L10.2225 16.47V4.125Z",fill:"currentColor"})),z0=({width:e,height:t})=>y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("rect",{x:"0.5",y:"0.5",width:"13",height:"13",rx:"2.5",stroke:"currentColor"}),y.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 ze(e){e.next(),e.complete()}class E0{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=ip.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 Nr=(e,t,r)=>e.getMarkers().reduce((i,n)=>{if(t.id===n.id)return i;if(n instanceof F.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 jr(e,t,r){if(!e||!(e instanceof F.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 Pr(e){return!(e.timeObservation.start==null||e.timeObservation.end==null)}const O0=({selectedMarker:e,omakasePlayer:t,enableHotKeys:r,segmentationLanes:i,setSegmentationLanes:n,setSelectedMarker:o,onMarkerClickCallback:a,setSource:u,source:s,constants:c})=>{const l=y.useRef(void 0),d=y.useRef(void 0),f=y.useRef(new rt),m=y.useRef(!1),g=(S,x,A)=>{const q=x??t.video.getCurrentTime();return S.getMarkers().reduce((K,me)=>me instanceof F.PeriodMarker&&me.timeObservation.start!==void 0&&me.timeObservation.end!==void 0&&me.id!==(A==null?void 0:A.id)?K||q>=me.timeObservation.start&&q<=me.timeObservation.end:K,!1)},p=S=>{if(Z===void 0)return!0;const x=Z.timeObservation.start,A=S??t.video.getCurrentTime();return!!(x==null||x>=A||Nr(s,Z,{end:A}))},v=S=>Z!==void 0||s===void 0?!0:g(s,S,Z),[w,E]=y.useState(void 0),[z,C]=y.useState(jr(e,t.video.getCurrentTime(),t)),[Z,V]=y.useState(void 0),[fe,Q]=y.useState(p()),[ae,Ie]=y.useState(v()),le=S=>{if(S===void 0||s===void 0||!(S instanceof F.PeriodMarker))return!0;const x=Nr(s,S,{start:t.video.getCurrentTime()});if(x)return x;if(S instanceof F.PeriodMarker){const A=S.timeObservation.end;if(A!=null&&t.video.getCurrentTime()>=A)return!0}return!1},Ce=S=>{if(S===void 0||s===void 0||!(S instanceof F.PeriodMarker))return!0;const x=Nr(s,S,{end:t.video.getCurrentTime()});if(x)return x;if(S instanceof F.PeriodMarker){if(S.timeObservation.end==null)return!0;const A=S.timeObservation.start;if(A!=null&&t.video.getCurrentTime()<=A)return!0}return!1},[it,ot]=y.useState(le(e)),[ne,B]=y.useState(Ce(e));y.useEffect(()=>{if(Q(()=>p()),Ie(()=>v()),Z&&Z!==e){const S=i.find(x=>x.getMarker(Z.id));S==null||S.removeMarker(Z.id),V(void 0)}},[e,Z,i,V]),y.useEffect(()=>()=>ze(f.current),[]),y.useEffect(()=>{if(ot(le(e)),B(Ce(e)),e){const S=jr(e,t.video.getCurrentTime(),t);C(S);const x=t.video.onVideoTimeChange$.pipe(oe(f.current)).subscribe({next:A=>{C(q=>jr(e,A.currentTime,t)),ot(()=>le(e)),B(()=>Ce(e))}});return()=>x.unsubscribe()}},[e]),y.useEffect(()=>{t.video.onSeeking$.pipe(oe(f.current)).subscribe({next:x=>{Q(()=>p(x.toTime)),Ie(()=>v(x.toTime))}});const S=t.video.onVideoTimeChange$.pipe(oe(f.current)).subscribe({next:x=>{Q(()=>p()),Ie(()=>v())}});return()=>S.unsubscribe()},[Z,s]),y.useEffect(()=>{const S=i.map(x=>x.onMarkerUpdate$.pipe(oe(f.current)).subscribe({next:A=>{(e==null?void 0:e.id)===A.marker.id&&(C(q=>jr(e,t.video.getCurrentTime(),t)),ot(()=>le(e)),B(()=>Ce(e)))}}));return()=>S.forEach(x=>x.unsubscribe())},[i,e]),y.useEffect(()=>{w&&(w.marker.style={...w.marker.style,color:w.color},w.marker.timeObservation={...w.marker.timeObservation},E(void 0))},[e]),y.useEffect(()=>{if(s){Q(()=>p()),Ie(()=>v());const S=s.onMarkerDelete$.pipe(oe(f.current)).subscribe({next:A=>{const q=A.marker;E(K=>{if((K==null?void 0:K.marker.id)!==q.id)return K}),o(K=>{if((K==null?void 0:K.id)!==q.id)return K}),V(K=>{if((K==null?void 0:K.id)!==q.id)return K}),Q(()=>p()),Ie(()=>v())}}),x=s.onMarkerUpdate$.pipe(oe(f.current)).subscribe({next:()=>{Q(()=>p()),Ie(()=>v())}});return()=>{S.unsubscribe(),x.unsubscribe()}}},[s]);const ap=(S,x)=>{if(x===void 0)return;const A=x.timeObservation;S.video.seekToTime(A.start)},up=(S,x)=>{if(x===void 0)return;const A=x.timeObservation;S.video.seekToTime(A.end)},cp=(S,x)=>{x instanceof F.PeriodMarker&&x.timeObservation.start!==void 0&&(x.timeObservation={...x.timeObservation,start:S.video.getCurrentTime()})},sp=(S,x)=>{x instanceof F.PeriodMarker&&x.timeObservation.end!==void 0&&(x.timeObservation={...x.timeObservation,end:S.video.getCurrentTime()})},lp=(S,x)=>{l.current&&ze(l.current),l.current=new rt,S.video.pause();const A=S.video.getCurrentFrame(),q=S.video.getFrameRate(),K=A-x*q,me=K>=0?K:0;S.video.seekToFrame(me).pipe(kt()).subscribe(()=>{}),S.video.play(),S.video.onVideoTimeChange$.pipe(oe(l.current),oe(f.current)).subscribe(Lr=>{Lr.frame>=A-1&&(S.video.pause().subscribe(()=>{S.video.seekToFrame(A).pipe(kt()).subscribe(()=>{})}),ze(l.current))})},dp=(S,x)=>{l.current&&ze(l.current),l.current=new rt,d.current&&ze(d.current),d.current=new rt;const A=S.video.getCurrentFrame(),q=S.video.getFrameRate(),K=A+x*q;S.video.play(),S.video.onVideoTimeChange$.pipe(oe(l.current),oe(f.current)).subscribe(me=>{me.frame>=K-1&&(S.video.pause().subscribe(()=>{S.video.seekToFrame(A).pipe(kt()).subscribe(()=>{})}),ze(l.current))}),S.video.onEnded$.pipe(oe(d.current),oe(f.current)).subscribe(me=>{setTimeout(()=>{S.video.seekToFrame(A).pipe(kt()).subscribe(()=>{})},1),ze(d.current)})},va=S=>{s.removeMarker(S.id),(Z==null?void 0:Z.id)===S.id&&V(void 0)},fp=(S,x)=>{if(!(x instanceof F.PeriodMarker))return;const A=x.timeObservation.start,q=x.timeObservation.end,K=S.video.getCurrentTime();if(A==null||q==null)return;const me=A,Lr=K,F0=Lr+1/S.video.getFrameRate(),R0=q;va(x);const ba=new F.PeriodMarker({style:c.PERIOD_MARKER_STYLE,timeObservation:{start:me,end:Lr},editable:!0});ba.onClick$.subscribe({next:()=>a(ba)});const an=new F.PeriodMarker({style:c.HIGHLIGHTED_PERIOD_MARKER_STYLE,timeObservation:{start:F0,end:R0},editable:!0});an.onClick$.subscribe({next:()=>a(an)}),s.addMarker(ba),s.addMarker(an),a(an),setTimeout(()=>{E({marker:an,color:c.PERIOD_MARKER_STYLE.color})},0)},mp=()=>{const S=t.video.getCurrentTime(),x=new F.PeriodMarker({timeObservation:{start:S},style:c.PERIOD_MARKER_STYLE,editable:!0});x.onClick$.subscribe({next:()=>a(x)}),s.addMarker(x),V(x),Q(p()),a(x)},pp=()=>{const S=t.video.getCurrentTime();Z.timeObservation={...Z.timeObservation,end:S},V(void 0)},hp=S=>{l.current&&ze(l.current),l.current=new rt,d.current&&ze(d.current),d.current=new rt;const x=t.video.calculateTimeToFrame(S.timeObservation.start),A=t.video.calculateTimeToFrame(S.timeObservation.end);t.video.pause(),t.video.seekToFrame(x),t.video.play(),t.video.onVideoTimeChange$.pipe(oe(l.current),oe(f.current)).subscribe(q=>{q.frame>=A-1&&(t.video.pause().subscribe(()=>{t.video.seekToFrame(x).pipe(kt()).subscribe(()=>{})}),ze(l.current))}),t.video.onEnded$.pipe(oe(d.current),oe(f.current)).subscribe(q=>{setTimeout(()=>{t.video.seekToFrame(x).pipe(kt()).subscribe(()=>{})},1),ze(d.current)})},M0=()=>{const S=i.length,x=`Segmentation ${i.length+1}`,A=new F.MarkerLane({style:c.TIMELINE_LANE_STYLE,description:x});A.onMarkerUpdate$.pipe(oe(f.current)).subscribe({next:q=>{Nr(A,q.marker)&&(q.marker.timeObservation=q.oldValue.timeObservation)}}),t.timeline.addTimelineLaneAtIndex(A,S+1),n([...i,A]),a(void 0),u(A)},gp=S=>{if(!s)return;const x=s.getMarkers().filter(K=>K instanceof F.PeriodMarker).sort((K,me)=>(K.timeObservation.start??0)-(me.timeObservation.start??0));if(e===void 0){a(x.at(0));return}const q=x.findIndex(K=>K.id===e.id)+(S?-1:1);q>=0&&q<x.length&&a(x.at(q))};return y.useEffect(()=>{if(!r)return;const S=new E0;S.actionLoopActiveMarker=()=>e instanceof F.PeriodMarker&&Pr(e)&&hp(e),S.actionSetPlayheadToMarkerStart=()=>e&&ap(t,e),S.actionSetPlayheadToMarkerEnd=()=>e&&e instanceof F.PeriodMarker&&Pr(e)&&up(t,e),S.actionSetMarkerStartToPlayhead=()=>!it&&cp(t,e),S.actionSetMarkerEndToPlayhead=()=>!ne&&sp(t,e),S.actionMarkerSplit=()=>!z&&fp(t,e),S.actionMarkerDelete=()=>e&&va(e),S.actionMarkerInOut=()=>{Z===void 0?!ae&&mp():!fe&&pp()},S.actionPlay3SecondsAndRewindToCurrent=()=>dp(t,3),S.actionRewind3SecondsAndPlayToCurrent=()=>lp(t,3),S.actionNextMarkerToggle=()=>gp(!1),S.actionPreviousMarkerToggle=()=>gp(!0);const x=A=>{S.handleKeyboardEvent(A,t)&&(A.stopPropagation(),A.preventDefault())};return window.addEventListener("keydown",x),m.current||(t.chroming.appendHelpMenuGroup(S.getKeyboardShortcutsHelpMenuGroup()),m.current=!0),()=>window.removeEventListener("keydown",x)}),y.createElement("div",{className:"omakase-player-timeline-controls-toolbar"},y.createElement("div",{className:"omakase-player-timeline-controls-toolbar-control-panel"},y.createElement(ke,{Icon:v0,onClick:()=>ap(t,e),disabled:e===void 0}),y.createElement(ke,{Icon:b0,onClick:()=>up(t,e),disabled:e===void 0||e instanceof F.PeriodMarker&&!Pr(e)}),y.createElement(ke,{Icon:_0,onClick:()=>cp(t,e),disabled:it}),y.createElement(ke,{Icon:y0,onClick:()=>sp(t,e),disabled:ne}),Z===void 0?y.createElement(ke,{Icon:$0,onClick:mp,disabled:ae}):y.createElement(ke,{Icon:T0,onClick:pp,disabled:fe}),y.createElement(ke,{Icon:S0,onClick:()=>va(e),disabled:e===void 0}),y.createElement(ke,{Icon:w0,onClick:()=>fp(t,e),disabled:z||e===void 0}),y.createElement(ke,{Icon:k0,onClick:()=>hp(e),disabled:!(e instanceof F.PeriodMarker&&Pr(e))}),y.createElement(ke,{Icon:I0,onClick:()=>lp(t,3)}),y.createElement(ke,{Icon:x0,onClick:()=>dp(t,3)})),y.createElement("div",{className:"omakase-player-timeline-controls-toolbar-control-panel"},y.createElement("div",{className:"segmentation-button-wrapper"},y.createElement(ke,{Icon:z0,text:"NEW SEGMENTATION",onClick:()=>M0(),disabled:i.length>=3}))))},U0=y.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"),y.useEffect(()=>{var d,f;let c=new Nm(o);const l=m=>{Dr.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(Dr.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]),y.createElement("div",{id:o.playerHTMLElementId})});function D0(e){const t=Math.round(e/60)*60,r=new Date(t*1e3);return`${r.getUTCHours()}h ${r.getUTCMinutes()}min`}function N0(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 j0=`
103
+ `):"",this.name="UnsubscriptionError",this.errors=r}});function da(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var zr=(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=$t(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 la?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=$t(d),m=f.next();!m.done;m=f.next()){var h=m.value;try{Am(h)}catch(p){o=o??[],p instanceof la?o=Tr(Tr([],xr(o)),xr(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 la(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Am(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)&&da(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&da(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),jm=zr.EMPTY;function Pm(e){return e instanceof zr||e&&"closed"in e&&re(e.remove)&&re(e.add)&&re(e.unsubscribe)}function Am(e){re(e)?e():e.unsubscribe()}var $1={Promise:void 0},w1={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,Tr([e,t],xr(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Lm(e){w1.setTimeout(function(){throw e})}function fa(){}function Er(e){e()}var ma=(function(e){rn(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,Pm(r)&&r.add(i)):i.destination=I1,i}return t.create=function(r,i,n){return new pa(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})(zr),S1=(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){Or(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){Or(i)}else Or(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Or(r)}},e})(),pa=(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 S1(a),o}return t})(ma);function Or(e){Lm(e)}function k1(e){throw e}var I1={closed:!0,next:fa,error:k1,complete:fa},ha=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Ur(e){return e}function x1(e){return e.length===0?Ur:e.length===1?e[0]:function(r){return e.reduce(function(i,n){return n(i)},r)}}var ve=(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=z1(t)?t:new pa(t,r,i);return Er(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=Cm(r),new r(function(n,o){var a=new pa({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[ha]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return x1(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Cm(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 Cm(e){var t;return(t=e??$1.Promise)!==null&&t!==void 0?t:Promise}function T1(e){return e&&re(e.next)&&re(e.error)&&re(e.complete)}function z1(e){return e&&e instanceof ma||T1(e)&&Pm(e)}function E1(e){return re(e==null?void 0:e.lift)}function Ke(e){return function(t){if(E1(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 Je(e,t,r,i,n){return new O1(e,t,r,i,n)}var O1=(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})(ma),U1=sa(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),rt=(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 Zm(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new U1},t.prototype.next=function(r){var i=this;Er(function(){var n,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=$t(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;Er(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;Er(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?jm:(this.currentObservers=null,u.push(r),new zr(function(){i.currentObservers=null,da(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 ve;return r.source=this,r},t.create=function(r,i){return new Zm(r,i)},t})(ve),Zm=(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:jm},t})(rt),D1=new ve(function(e){return e.complete()});function N1(e){return e&&re(e.schedule)}function Mm(e){return e[e.length-1]}function j1(e){return re(Mm(e))?e.pop():void 0}function P1(e){return N1(Mm(e))?e.pop():void 0}var Fm=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function Rm(e){return re(e==null?void 0:e.then)}function Vm(e){return re(e[ha])}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 A1(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Jm=A1();function Gm(e){return re(e==null?void 0:e[Jm])}function qm(e){return _1(this,arguments,function(){var r,i,n,o;return Nm(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,wt(r.read())];case 3:return i=a.sent(),n=i.value,o=i.done,o?[4,wt(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,wt(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 Wm(e){return re(e==null?void 0:e.getReader)}function Dr(e){if(e instanceof ve)return e;if(e!=null){if(Vm(e))return L1(e);if(Fm(e))return C1(e);if(Rm(e))return Z1(e);if(Bm(e))return Hm(e);if(Gm(e))return M1(e);if(Wm(e))return F1(e)}throw Km(e)}function L1(e){return new ve(function(t){var r=e[ha]();if(re(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function C1(e){return new ve(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function Z1(e){return new ve(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Lm)})}function M1(e){return new ve(function(t){var r,i;try{for(var n=$t(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 Hm(e){return new ve(function(t){R1(e,t).catch(function(r){return t.error(r)})})}function F1(e){return Hm(qm(e))}function R1(e,t){var r,i,n,o;return b1(this,void 0,void 0,function(){var a,u;return Nm(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),r=y1(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 Ge(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),Ke(function(r,i){r.subscribe(Je(i,function(n){return Ge(i,e,function(){return i.next(n)},t)},function(){return Ge(i,e,function(){return i.complete()},t)},function(n){return Ge(i,e,function(){return i.error(n)},t)}))})}function Ym(e,t){return t===void 0&&(t=0),Ke(function(r,i){i.add(e.schedule(function(){return r.subscribe(i)},t))})}function V1(e,t){return Dr(e).pipe(Ym(t),Xm(t))}function B1(e,t){return Dr(e).pipe(Ym(t),Xm(t))}function K1(e,t){return new ve(function(r){var i=0;return t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||this.schedule())})})}function J1(e,t){return new ve(function(r){var i;return Ge(r,t,function(){i=e[Jm](),Ge(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 ve(function(r){Ge(r,t,function(){var i=e[Symbol.asyncIterator]();Ge(r,t,function(){i.next().then(function(n){n.done?r.complete():r.next(n.value)})},0,!0)})})}function G1(e,t){return Qm(qm(e),t)}function q1(e,t){if(e!=null){if(Vm(e))return V1(e,t);if(Fm(e))return K1(e,t);if(Rm(e))return B1(e,t);if(Bm(e))return Qm(e,t);if(Gm(e))return J1(e,t);if(Wm(e))return G1(e,t)}throw Km(e)}function ep(e,t){return t?q1(e,t):Dr(e)}var tp=sa(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function W1(e,t){return Ke(function(r,i){var n=0;r.subscribe(Je(i,function(o){i.next(e.call(t,o,n++))}))})}var H1=Array.isArray;function X1(e,t){return H1(t)?e.apply(void 0,Tr([],xr(t))):e(t)}function Y1(e){return W1(function(t){return X1(e,t)})}var Q1=Array.isArray,e0=Object.getPrototypeOf,t0=Object.prototype,n0=Object.keys;function r0(e){if(e.length===1){var t=e[0];if(Q1(t))return{args:t,keys:null};if(i0(t)){var r=n0(t);return{args:r.map(function(i){return t[i]}),keys:r}}}return{args:e,keys:null}}function i0(e){return e&&typeof e=="object"&&e0(e)===t0}function o0(e,t){return e.reduce(function(r,i,n){return r[i]=t[n],r},{})}function a0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=P1(e),i=j1(e),n=r0(e),o=n.args,a=n.keys;if(o.length===0)return ep([],r);var u=new ve(u0(o,r,a?function(s){return o0(a,s)}:Ur));return i?u.pipe(Y1(i)):u}function u0(e,t,r){return r===void 0&&(r=Ur),function(i){np(t,function(){for(var n=e.length,o=new Array(n),a=n,u=n,s=function(l){np(t,function(){var d=ep(e[l],t),f=!1;d.subscribe(Je(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 np(e,t,r){e?Ge(r,e,t):t()}function c0(e,t){return Ke(function(r,i){var n=0;r.subscribe(Je(i,function(o){return e.call(t,o,n++)&&i.next(o)}))})}function s0(e){return Ke(function(t,r){var i=!1;t.subscribe(Je(r,function(n){i=!0,r.next(n)},function(){i||r.next(e),r.complete()}))})}function l0(e){return e<=0?function(){return D1}:Ke(function(t,r){var i=0;t.subscribe(Je(r,function(n){++i<=e&&(r.next(n),e<=i&&r.complete())}))})}function d0(e){return e===void 0&&(e=f0),Ke(function(t,r){var i=!1;t.subscribe(Je(r,function(n){i=!0,r.next(n)},function(){return i?r.complete():r.error(e())}))})}function f0(){return new tp}function St(e,t){var r=arguments.length>=2;return function(i){return i.pipe(Ur,l0(1),r?s0(t):d0(function(){return new tp}))}}function ue(e){return Ke(function(t,r){Dr(e).subscribe(Je(r,function(){return r.complete()},fa)),!r.closed&&t.subscribe(r)})}class m0{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 p0=y.memo(({omakasePlayer:e,onTimelineCreatedCallback:t,timelineConfig:r,enableHotKeys:i})=>(y.useEffect(()=>{if(r.timelineHTMLElementId===void 0&&(r.timelineHTMLElementId="omakase-timeline"),e.createTimeline(r).subscribe({next:n=>{a0([e.timeline.onReady$,e.video.onVideoLoaded$.pipe(c0(o=>!!o))]).subscribe({next:()=>t(n)})}}),i===void 0||i){const n=new m0;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]),y.createElement("div",{id:r.timelineHTMLElementId})));class rp{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 on=[.25,.5,.75,1,2,4,8];class Nr{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=rp.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=on.indexOf(r.video.getPlaybackRate())+a;let s;return u<0?s=on.at(0):u>=on.length?s=on.at(-1):s=on.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 h0=y.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"),y.useEffect(()=>{var s,c;let a=new M.OmakasePlayer(r);const u=l=>{Nr.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(Nr.getKeyboardShortcutsHelpMenuGroup())),a.loadVideo(t,i).subscribe({next:l=>{n&&n(a,l)}}),()=>{(o===void 0||o)&&window.removeEventListener("keydown",u)}},[t]),y.createElement("div",{id:r.playerHTMLElementId})}),g0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.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"}),y.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"})),v0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.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"}),y.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"})),b0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.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"})),_0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.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"})),y0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M11.3475 3H5.775V21L11.3475 17.0475V3Z",fill:"currentColor"}),y.createElement("path",{d:"M18.225 21L12.6525 17.0475V3H18.225V21ZM13.7775 16.47L17.1 18.825V4.125H13.7775V16.47Z",fill:"currentColor"})),$0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M4.6875 3V21L8.0625 17.0475L11.4375 21V3H4.6875Z",fill:"currentColor"}),y.createElement("path",{d:"M12.5625 3V21L15.9375 17.0475L19.3125 21V3H12.5625Z",fill:"currentColor"})),w0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.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"})),S0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.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"}),y.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"})),k0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("g",{clipPath:"url(#clip0_3377_237)"},y.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"}),y.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"})),y.createElement("defs",null,y.createElement("clipPath",{id:"clip0_3377_237"},y.createElement("rect",{width:"18",height:"15.95",fill:"white",transform:"translate(3 4)"})))),I0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("g",{clipPath:"url(#clip0_3377_260)"},y.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"}),y.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"})),y.createElement("defs",null,y.createElement("clipPath",{id:"clip0_3377_260"},y.createElement("rect",{width:"18",height:"15.95",fill:"white",transform:"translate(3 4)"})))),Se=({Icon:e,onClick:t,width:r,height:i,text:n,disabled:o})=>y.createElement("button",{disabled:o,onClick:t},y.createElement(e,{width:r,height:i})," ",n),x0=({width:e,height:t})=>y.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M12.6525 17.0475L18.225 21V3H12.6525V17.0475Z",fill:"currentColor"}),y.createElement("path",{d:"M5.775 3H11.3475V17.0475L5.775 21V3ZM10.2225 4.125H6.9V18.825L10.2225 16.47V4.125Z",fill:"currentColor"})),T0=({width:e,height:t})=>y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("rect",{x:"0.5",y:"0.5",width:"13",height:"13",rx:"2.5",stroke:"currentColor"}),y.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 xe(e){e.next(),e.complete()}class z0{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=rp.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 an=(e,t,r)=>e.getMarkers().reduce((i,n)=>{if(t.id===n.id)return i;if(n instanceof M.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 jr(e,t,r){if(!e||!(e instanceof M.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 Pr(e){return!(e.timeObservation.start==null||e.timeObservation.end==null)}const E0=({selectedMarker:e,omakasePlayer:t,enableHotKeys:r,segmentationLanes:i,setSegmentationLanes:n,setSelectedMarker:o,onMarkerClickCallback:a,setSource:u,source:s,constants:c})=>{const l=y.useRef(void 0),d=y.useRef(void 0),f=y.useRef(new rt),m=y.useRef(!1),h=S=>{if(E===void 0||!t.video.isVideoLoaded())return!0;const x=E.timeObservation.start,L=S??t.video.getCurrentTime();return!!(x==null||x>=L||an(s,E,{end:L}))},p=S=>{if(E!==void 0||s===void 0||!t.video.isVideoLoaded())return!0;const x=S??t.video.getCurrentTime(),L=t.video.calculateTimeToFrame(x);if(L+1>t.video.getTotalFrames())return!0;const H=new M.PeriodMarker({timeObservation:{start:t.video.calculateFrameToTime(L),end:t.video.calculateFrameToTime(L+2)}});return an(s,H)},[v,w]=y.useState(void 0),[O,z]=y.useState(jr(e,t.video.getCurrentTime(),t)),[E,R]=y.useState(void 0),[V,ee]=y.useState(h()),[ie,Q]=y.useState(p()),Ne=S=>{if(S===void 0||s===void 0||!(S instanceof M.PeriodMarker))return!0;const x=an(s,S,{start:t.video.getCurrentTime()});if(x)return x;if(S instanceof M.PeriodMarker){const L=S.timeObservation.end;if(L!=null&&t.video.getCurrentTime()>=L)return!0}return!1},de=S=>{if(S===void 0||s===void 0||!(S instanceof M.PeriodMarker))return!0;const x=an(s,S,{end:t.video.getCurrentTime()});if(x)return x;if(S instanceof M.PeriodMarker){if(S.timeObservation.end==null)return!0;const L=S.timeObservation.start;if(L!=null&&t.video.getCurrentTime()<=L)return!0}return!1},[it,qe]=y.useState(Ne(e)),[kt,te]=y.useState(de(e));y.useEffect(()=>{if(ee(()=>h()),Q(()=>p()),E&&E!==e){const S=i.find(x=>x.getMarker(E.id));S==null||S.removeMarker(E.id),R(void 0)}},[e,E,i,R]),y.useEffect(()=>()=>xe(f.current),[]),y.useEffect(()=>{if(qe(Ne(e)),te(de(e)),e){const S=jr(e,t.video.getCurrentTime(),t);z(S);const x=t.video.onVideoTimeChange$.pipe(ue(f.current)).subscribe({next:L=>{z(H=>jr(e,L.currentTime,t)),qe(()=>Ne(e)),te(()=>de(e))}});return()=>x.unsubscribe()}},[e]),y.useEffect(()=>{t.video.onSeeking$.pipe(ue(f.current)).subscribe({next:x=>{ee(()=>h(x.toTime)),Q(()=>p(x.toTime))}});const S=t.video.onVideoTimeChange$.pipe(ue(f.current)).subscribe({next:x=>{ee(()=>h()),Q(()=>p())}});return()=>S.unsubscribe()},[E,s]),y.useEffect(()=>{const S=i.map(x=>x.onMarkerUpdate$.pipe(ue(f.current)).subscribe({next:L=>{(e==null?void 0:e.id)===L.marker.id&&(z(H=>jr(e,t.video.getCurrentTime(),t)),qe(()=>Ne(e)),te(()=>de(e)))}}));return()=>S.forEach(x=>x.unsubscribe())},[i,e]),y.useEffect(()=>{v&&(v.marker.style={...v.marker.style,color:v.color},v.marker.timeObservation={...v.marker.timeObservation},w(void 0))},[e]),y.useEffect(()=>{if(s){ee(()=>h()),Q(()=>p());const S=s.onMarkerDelete$.pipe(ue(f.current)).subscribe({next:L=>{const H=L.marker;w(W=>{if((W==null?void 0:W.marker.id)!==H.id)return W}),o(W=>{if((W==null?void 0:W.id)!==H.id)return W}),R(W=>{if((W==null?void 0:W.id)!==H.id)return W}),ee(()=>h()),Q(()=>p())}}),x=s.onMarkerUpdate$.pipe(ue(f.current)).subscribe({next:()=>{ee(()=>h()),Q(()=>p())}});return()=>{S.unsubscribe(),x.unsubscribe()}}},[s]);const B=(S,x)=>{if(x===void 0)return;const L=x.timeObservation;S.video.seekToTime(L.start)},op=(S,x)=>{if(x===void 0)return;const L=x.timeObservation;S.video.seekToTime(L.end)},ap=(S,x)=>{x instanceof M.PeriodMarker&&x.timeObservation.start!==void 0&&(x.timeObservation={...x.timeObservation,start:S.video.getCurrentTime()})},up=(S,x)=>{x instanceof M.PeriodMarker&&x.timeObservation.end!==void 0&&(x.timeObservation={...x.timeObservation,end:S.video.getCurrentTime()})},cp=(S,x)=>{l.current&&xe(l.current),l.current=new rt,S.video.pause();const L=S.video.getCurrentFrame(),H=S.video.getFrameRate(),W=L-x*H,We=W>=0?W:0;S.video.seekToFrame(We).pipe(St()).subscribe(()=>{}),S.video.play(),S.video.onVideoTimeChange$.pipe(ue(l.current),ue(f.current)).subscribe(Lr=>{Lr.frame>=L-1&&(S.video.pause().subscribe(()=>{S.video.seekToFrame(L).pipe(St()).subscribe(()=>{})}),xe(l.current))})},sp=(S,x)=>{l.current&&xe(l.current),l.current=new rt,d.current&&xe(d.current),d.current=new rt;const L=S.video.getCurrentFrame(),H=S.video.getFrameRate(),W=L+x*H;S.video.play(),S.video.onVideoTimeChange$.pipe(ue(l.current),ue(f.current)).subscribe(We=>{We.frame>=W-1&&(S.video.pause().subscribe(()=>{S.video.seekToFrame(L).pipe(St()).subscribe(()=>{})}),xe(l.current))}),S.video.onEnded$.pipe(ue(d.current),ue(f.current)).subscribe(We=>{setTimeout(()=>{S.video.seekToFrame(L).pipe(St()).subscribe(()=>{})},1),xe(d.current)})},va=S=>{s.removeMarker(S.id),(E==null?void 0:E.id)===S.id&&R(void 0)},lp=(S,x)=>{if(!(x instanceof M.PeriodMarker))return;const L=x.timeObservation.start,H=x.timeObservation.end,W=S.video.getCurrentTime();if(L==null||H==null)return;const We=L,Lr=W,M0=Lr+1/S.video.getFrameRate(),F0=H;va(x);const ba=new M.PeriodMarker({style:c.PERIOD_MARKER_STYLE,timeObservation:{start:We,end:Lr},editable:!0});ba.onClick$.subscribe({next:()=>a(ba)});const un=new M.PeriodMarker({style:c.HIGHLIGHTED_PERIOD_MARKER_STYLE,timeObservation:{start:M0,end:F0},editable:!0});un.onClick$.subscribe({next:()=>a(un)}),s.addMarker(ba),s.addMarker(un),a(un),setTimeout(()=>{w({marker:un,color:c.PERIOD_MARKER_STYLE.color})},0)},dp=()=>{const S=t.video.getCurrentTime(),x=new M.PeriodMarker({timeObservation:{start:S},style:c.PERIOD_MARKER_STYLE,editable:!0});x.onClick$.subscribe({next:()=>a(x)}),s.addMarker(x),R(x),ee(h()),a(x)},fp=()=>{const S=t.video.getCurrentTime();E.timeObservation={...E.timeObservation,end:S},R(void 0)},mp=S=>{l.current&&xe(l.current),l.current=new rt,d.current&&xe(d.current),d.current=new rt;const x=t.video.calculateTimeToFrame(S.timeObservation.start),L=t.video.calculateTimeToFrame(S.timeObservation.end);t.video.pause(),t.video.seekToFrame(x),t.video.play(),t.video.onVideoTimeChange$.pipe(ue(l.current),ue(f.current)).subscribe(H=>{H.frame>=L-1&&(t.video.pause().subscribe(()=>{t.video.seekToFrame(x).pipe(St()).subscribe(()=>{})}),xe(l.current))}),t.video.onEnded$.pipe(ue(d.current),ue(f.current)).subscribe(H=>{setTimeout(()=>{t.video.seekToFrame(x).pipe(St()).subscribe(()=>{})},1),xe(d.current)})},Z0=()=>{const S=i.length,x=`Segmentation ${i.length+1}`,L=new M.MarkerLane({style:c.TIMELINE_LANE_STYLE,description:x});L.onMarkerUpdate$.pipe(ue(f.current)).subscribe({next:H=>{an(L,H.marker)&&(H.marker.timeObservation=H.oldValue.timeObservation)}}),t.timeline.addTimelineLaneAtIndex(L,S+1),n([...i,L]),a(void 0),u(L)},pp=S=>{if(!s)return;const x=s.getMarkers().filter(W=>W instanceof M.PeriodMarker).sort((W,We)=>(W.timeObservation.start??0)-(We.timeObservation.start??0));if(e===void 0){a(x.at(0));return}const H=x.findIndex(W=>W.id===e.id)+(S?-1:1);H>=0&&H<x.length&&a(x.at(H))};return y.useEffect(()=>{if(!r)return;const S=new z0;S.actionLoopActiveMarker=()=>e instanceof M.PeriodMarker&&Pr(e)&&mp(e),S.actionSetPlayheadToMarkerStart=()=>e&&B(t,e),S.actionSetPlayheadToMarkerEnd=()=>e&&e instanceof M.PeriodMarker&&Pr(e)&&op(t,e),S.actionSetMarkerStartToPlayhead=()=>!it&&ap(t,e),S.actionSetMarkerEndToPlayhead=()=>!kt&&up(t,e),S.actionMarkerSplit=()=>!O&&lp(t,e),S.actionMarkerDelete=()=>e&&va(e),S.actionMarkerInOut=()=>{E===void 0?!ie&&dp():!V&&fp()},S.actionPlay3SecondsAndRewindToCurrent=()=>sp(t,3),S.actionRewind3SecondsAndPlayToCurrent=()=>cp(t,3),S.actionNextMarkerToggle=()=>pp(!1),S.actionPreviousMarkerToggle=()=>pp(!0);const x=L=>{S.handleKeyboardEvent(L,t)&&(L.stopPropagation(),L.preventDefault())};return window.addEventListener("keydown",x),m.current||(t.chroming.appendHelpMenuGroup(S.getKeyboardShortcutsHelpMenuGroup()),m.current=!0),()=>window.removeEventListener("keydown",x)}),y.createElement("div",{className:"omakase-player-timeline-controls-toolbar"},y.createElement("div",{className:"omakase-player-timeline-controls-toolbar-control-panel"},y.createElement(Se,{Icon:g0,onClick:()=>B(t,e),disabled:e===void 0}),y.createElement(Se,{Icon:v0,onClick:()=>op(t,e),disabled:e===void 0||e instanceof M.PeriodMarker&&!Pr(e)}),y.createElement(Se,{Icon:b0,onClick:()=>ap(t,e),disabled:it}),y.createElement(Se,{Icon:_0,onClick:()=>up(t,e),disabled:kt}),E===void 0?y.createElement(Se,{Icon:y0,onClick:dp,disabled:ie}):y.createElement(Se,{Icon:x0,onClick:fp,disabled:V}),y.createElement(Se,{Icon:w0,onClick:()=>va(e),disabled:e===void 0}),y.createElement(Se,{Icon:$0,onClick:()=>lp(t,e),disabled:O||e===void 0}),y.createElement(Se,{Icon:S0,onClick:()=>mp(e),disabled:!(e instanceof M.PeriodMarker&&Pr(e))}),y.createElement(Se,{Icon:k0,onClick:()=>cp(t,3)}),y.createElement(Se,{Icon:I0,onClick:()=>sp(t,3)})),y.createElement("div",{className:"omakase-player-timeline-controls-toolbar-control-panel"},y.createElement("div",{className:"segmentation-button-wrapper"},y.createElement(Se,{Icon:T0,text:"NEW SEGMENTATION",onClick:()=>Z0(),disabled:i.length>=3}))))},O0=y.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"),y.useEffect(()=>{var d,f;let c=new Dm(o);const l=m=>{Nr.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(Nr.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]),y.createElement("div",{id:o.playerHTMLElementId})});function U0(e){const t=Math.round(e/60)*60,r=new Date(t*1e3);return`${r.getUTCHours()}h ${r.getUTCMinutes()}min`}function D0(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 N0=`
104
104
  :root {
105
105
  --omakase-time-range-selector-width: 700px;
106
106
  --omakase-time-range-selector-height: 32px;
@@ -164,6 +164,7 @@ ${n(m)}`)}),d.join(`
164
164
  .omakase-time-range-selector-segment-label {
165
165
  font-size: var(--omakase-time-range-selector-font-size);
166
166
  white-space: nowrap;
167
+ margin-top: 5px;
167
168
  color: var(--omakase-time-range-selector-segment-label-font-color);
168
169
  }
169
170
 
@@ -266,7 +267,7 @@ ${n(m)}`)}),d.join(`
266
267
  cursor: pointer;
267
268
  outline: inherit;
268
269
  }
269
- `,P0=`
270
+ `,j0=`
270
271
  <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
271
272
  <g filter="url(#filter0_d_5782_463)">
272
273
  <circle cx="16" cy="12" r="12" fill="var(--omakase-time-range-selector-confirm-button-background-color)"/>
@@ -290,7 +291,7 @@ ${n(m)}`)}),d.join(`
290
291
  </clipPath>
291
292
  </defs>
292
293
  </svg>
293
- `,A0=`
294
+ `,P0=`
294
295
  <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
295
296
  <g filter="url(#filter0_d_5782_462)">
296
297
  <circle cx="16" cy="12" r="12" fill="var(--omakase-time-range-selector-cancel-button-background-color)"/>
@@ -315,5 +316,5 @@ ${n(m)}`)}),d.join(`
315
316
  </defs>
316
317
  </svg>
317
318
 
318
- `,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",dragging:"omakase-time-range-selector-dragging"},Ar={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 ga 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,"segmentLabelFormatter",D0);k(this,"durationLabelFormatter",N0);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.durationLabelFormatter(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),p=m>g,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,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,p=performance.now();g?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()});k(this,"onMouseDownDrag",r=>{if(r.target instanceof HTMLElement&&r.target.classList.contains(X.rangeSelectorHandle))return;r.preventDefault(),this._rangeSelector.classList.add(X.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 g=a-o,p=m<0||m>g,v=performance.now();if(p){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._rangeSelector.classList.remove(X.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(X.container);const o=document.createElement("style");o.textContent=j0,this._container.append(o),this._buttonContainer=document.createElement("div"),this._buttonContainer.classList.add(X.buttonContainer,X.invisible);const a=this.createButtonSvg(P0),u=this.createButtonSvg(A0);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=Ar.leftHandle,this._rangeSelectorRightHandle=document.createElement("div"),this._rangeSelectorRightHandle.classList.add(X.rangeSelectorHandle),this._rangeSelectorRightHandle.id=Ar.rightHandle,this._rangeSelectorRangeDisplay=document.createElement("div"),this._rangeSelectorRangeDisplay.classList.add(X.rangeSelectorDuration),this._rangeSelectorRangeDisplay.id=Ar.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=Ar.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.segmentLabelFormatter(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.segmentLabelFormatter(r.at(-2));const s=document.createElement("div");return s.classList.add(X.segmentLabel,X.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",ga);const op="omakase-time-range-selector-react-div",L0=({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",ga),y.useEffect(()=>{var p;const s=j.parseTimeRange(t),c=j.timeMomentToSeconds(s.start),l=j.timeMomentToSeconds(s.end),d=j.parseTimeRange(e),f=j.timeMomentToSeconds(d.start),m=j.timeMomentToSeconds(d.end),g=new ga;g.setAttribute("minValue",c.toString()),g.setAttribute("maxValue",l.toString()),g.setAttribute("maxRange",n.toString()),g.setAttribute("segmentSize",i.toString()),g.setAttribute("numberOfSegments",r.toString()),g.setAttribute("sliderStart",f.toString()),g.setAttribute("sliderEnd",m.toString()),g.onCheckmarkClickCallback=o,a&&(g.segmentLabelFormatter=a),u&&(g.durationLabelFormatter=u),(p=document.getElementById(op))==null||p.append(g)},[]),y.createElement("div",{id:op})),C0=y.memo(({omakasePlayer:e,config:t,onCreateMarkerListCallback:r})=>(y.useEffect(()=>{const i=e.createMarkerList(t).subscribe({next:n=>{r==null||r(n)}});return()=>{i.unsubscribe()}},[t.source]),y.createElement("div",{id:t.markerListHTMLElementId})));T.AudioFlow=void 0,(e=>{e.FormatEnum={UrnxNmosformataudio:"urn:x-nmos:format:audio"}})(T.AudioFlow||(T.AudioFlow={}));const Z0={Video:"urn:x-nmos:format:video",Audio:"urn:x-nmos:format:audio",Data:"urn:x-nmos:format:data",Multi:"urn:x-nmos:format:multi"};T.DataFlow=void 0,(e=>{e.FormatEnum={UrnxNmosformatdata:"urn:x-nmos:format:data"}})(T.DataFlow||(T.DataFlow={})),T.DeletionRequest=void 0,(e=>{e.StatusEnum={Created:"created",Started:"started",Done:"done",Error:"error"}})(T.DeletionRequest||(T.DeletionRequest={})),T.MediaBucketObjectStorePreInner=void 0,(e=>{e.ActionEnum={CreateBucket:"create_bucket"}})(T.MediaBucketObjectStorePreInner||(T.MediaBucketObjectStorePreInner={})),T.MultiEssenceFlow=void 0,(e=>{e.FormatEnum={UrnxNmosformatmulti:"urn:x-nmos:format:multi"}})(T.MultiEssenceFlow||(T.MultiEssenceFlow={})),T.ServiceMediaStore=void 0,(e=>{e.TypeEnum={HttpObjectStore:"http_object_store"}})(T.ServiceMediaStore||(T.ServiceMediaStore={})),T.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"}})(T.Source||(T.Source={})),T.UncompressedAudioParameters=void 0,(e=>{e.UncTypeEnum={Interleaved:"interleaved",Planar:"planar",Pairs:"pairs"}})(T.UncompressedAudioParameters||(T.UncompressedAudioParameters={})),T.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"}})(T.UncompressedVideoParameters||(T.UncompressedVideoParameters={})),T.VideoFlow=void 0,(e=>{e.FormatEnum={UrnxNmosformatvideo:"urn:x-nmos:format:video"}})(T.VideoFlow||(T.VideoFlow={})),T.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"}})(T.VideoFlowEssenceParameters||(T.VideoFlowEssenceParameters={})),T.ImageFlow=void 0,(e=>{e.FormatEnum={UrnxNmosformatdata:"urn:x-tam:format:image"}})(T.ImageFlow||(T.ImageFlow={})),T.Contentformat=Z0,T.OmakaseMarkerListComponent=C0,T.OmakasePlayerComponent=g0,T.OmakasePlayerTimelineBuilder=b1,T.OmakasePlayerTimelineComponent=h0,T.OmakasePlayerTimelineControlsToolbar=O0,T.OmakaseTamsPlayer=Nm,T.OmakaseTamsPlayerComponent=U0,T.OmakaseTimeRangeSelectorComponent=L0,T.TimeRangeUtil=j,T.TimecodeUtil=De,T.VideoApiProxy=iu,T.convertFlowIdToSubtitlesId=dh,T.gatherAndExportToManifest=Ba,T.removeGapsInSegments=Za,T.removeGapsInSegmentsByExtending=Ma,T.resolveAudioManifestName=Na,T.resolveTextManifestName=ja,T.validateTamsPayload=Va,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
319
+ `,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",dragging:"omakase-time-range-selector-dragging"},Ar={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 ga 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",U0);k(this,"durationLabelFormatter",D0);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(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,"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(X.invisible)});k(this,"hideButtons",()=>{this._buttonContainer.classList.add(X.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(X.rangeSelectorHandle))return;r.preventDefault(),this._rangeSelector.classList.add(X.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(X.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(X.container);const o=document.createElement("style");o.textContent=N0,this._container.append(o),this._buttonContainer=document.createElement("div"),this._buttonContainer.classList.add(X.buttonContainer,X.invisible);const a=this.createButtonSvg(j0),u=this.createButtonSvg(P0);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=Ar.leftHandle,this._rangeSelectorRightHandle=document.createElement("div"),this._rangeSelectorRightHandle.classList.add(X.rangeSelectorHandle),this._rangeSelectorRightHandle.id=Ar.rightHandle,this._rangeSelectorRangeDisplay=document.createElement("div"),this._rangeSelectorRangeDisplay.classList.add(X.rangeSelectorDuration),this._rangeSelectorRangeDisplay.id=Ar.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=Ar.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(),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(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.segmentLabelFormatter(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.segmentLabelFormatter(r.at(-2));const s=document.createElement("div");return s.classList.add(X.segmentLabel,X.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",ga);const ip="omakase-time-range-selector-react-div",A0=({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",ga),y.useEffect(()=>{var p;const s=A.parseTimeRange(t),c=A.timeMomentToSeconds(s.start),l=A.timeMomentToSeconds(s.end),d=A.parseTimeRange(e),f=A.timeMomentToSeconds(d.start),m=A.timeMomentToSeconds(d.end),h=new ga;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(ip))==null||p.append(h)},[]),y.createElement("div",{id:ip})),L0=y.memo(({omakasePlayer:e,config:t,onCreateMarkerListCallback:r})=>(y.useEffect(()=>{const i=e.createMarkerList(t).subscribe({next:n=>{r==null||r(n)}});return()=>{i.unsubscribe()}},[t.source]),y.createElement("div",{id:t.markerListHTMLElementId})));T.AudioFlow=void 0,(e=>{e.FormatEnum={UrnxNmosformataudio:"urn:x-nmos:format:audio"}})(T.AudioFlow||(T.AudioFlow={}));const C0={Video:"urn:x-nmos:format:video",Audio:"urn:x-nmos:format:audio",Data:"urn:x-nmos:format:data",Multi:"urn:x-nmos:format:multi"};T.DataFlow=void 0,(e=>{e.FormatEnum={UrnxNmosformatdata:"urn:x-nmos:format:data"}})(T.DataFlow||(T.DataFlow={})),T.DeletionRequest=void 0,(e=>{e.StatusEnum={Created:"created",Started:"started",Done:"done",Error:"error"}})(T.DeletionRequest||(T.DeletionRequest={})),T.MediaBucketObjectStorePreInner=void 0,(e=>{e.ActionEnum={CreateBucket:"create_bucket"}})(T.MediaBucketObjectStorePreInner||(T.MediaBucketObjectStorePreInner={})),T.MultiEssenceFlow=void 0,(e=>{e.FormatEnum={UrnxNmosformatmulti:"urn:x-nmos:format:multi"}})(T.MultiEssenceFlow||(T.MultiEssenceFlow={})),T.ServiceMediaStore=void 0,(e=>{e.TypeEnum={HttpObjectStore:"http_object_store"}})(T.ServiceMediaStore||(T.ServiceMediaStore={})),T.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"}})(T.Source||(T.Source={})),T.UncompressedAudioParameters=void 0,(e=>{e.UncTypeEnum={Interleaved:"interleaved",Planar:"planar",Pairs:"pairs"}})(T.UncompressedAudioParameters||(T.UncompressedAudioParameters={})),T.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"}})(T.UncompressedVideoParameters||(T.UncompressedVideoParameters={})),T.VideoFlow=void 0,(e=>{e.FormatEnum={UrnxNmosformatvideo:"urn:x-nmos:format:video"}})(T.VideoFlow||(T.VideoFlow={})),T.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"}})(T.VideoFlowEssenceParameters||(T.VideoFlowEssenceParameters={})),T.ImageFlow=void 0,(e=>{e.FormatEnum={UrnxNmosformatdata:"urn:x-tam:format:image"}})(T.ImageFlow||(T.ImageFlow={})),T.Contentformat=C0,T.OmakaseMarkerListComponent=L0,T.OmakasePlayerComponent=h0,T.OmakasePlayerTimelineBuilder=v1,T.OmakasePlayerTimelineComponent=p0,T.OmakasePlayerTimelineControlsToolbar=E0,T.OmakaseTamsPlayer=Dm,T.OmakaseTamsPlayerComponent=O0,T.OmakaseTimeRangeSelectorComponent=A0,T.TimeRangeUtil=A,T.TimecodeUtil=Oe,T.VideoApiProxy=ru,T.convertFlowIdToSubtitlesId=sh,T.gatherAndExportToManifest=Ba,T.removeGapsInSegments=Za,T.removeGapsInSegmentsByExtending=Ma,T.resolveAudioManifestName=Na,T.resolveTextManifestName=ja,T.validateTamsPayload=Va,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
319
320
  //# sourceMappingURL=index.umd.js.map