@byomakase/omakase-react-components 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +43 -42
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.d.ts +3 -0
- package/dist/index.es.js +4045 -4006
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +31 -30
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var vp=Object.defineProperty;var bp=(e,t,r)=>t in e?vp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var k=(e,t,r)=>bp(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("@byomakase/omakase-player"),$=require("react");/*!
|
|
2
2
|
* decimal.js v10.6.0
|
|
3
3
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
4
4
|
* https://github.com/MikeMcl/decimal.js
|
|
5
5
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
6
6
|
* MIT Licence
|
|
7
|
-
*/var ct=9e15,Ke=1e9,Wr="0123456789abcdef",wn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Sn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Hr={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ct,maxE:ct,crypto:!1},kc,Pe,P=!0,Cn="[DecimalError] ",Re=Cn+"Invalid argument: ",Ic=Cn+"Precision limit exceeded",xc=Cn+"crypto unavailable",Tc="[object Decimal]",ue=Math.floor,ee=Math.pow,$p=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,wp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Sp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,zc=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ze=1e7,O=7,kp=9007199254740991,Ip=wn.length-1,qr=Sn.length-1,y={toStringTag:Tc};y.absoluteValue=y.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),E(e)};y.ceil=function(){return E(new this.constructor(this),this.e+1,2)};y.clampedTo=y.clamp=function(e,t){var r,i=this,n=i.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(Re+t);return r=i.cmp(e),r<0?e:i.cmp(t)>0?t:new n(i)};y.comparedTo=y.cmp=function(e){var t,r,i,n,o=this,a=o.d,c=(e=new o.constructor(e)).d,s=o.s,u=e.s;if(!a||!c)return!s||!u?NaN:s!==u?s:a===c?0:!a^s<0?1:-1;if(!a[0]||!c[0])return a[0]?s:c[0]?-u:0;if(s!==u)return s;if(o.e!==e.e)return o.e>e.e^s<0?1:-1;for(i=a.length,n=c.length,t=0,r=i<n?i:n;t<r;++t)if(a[t]!==c[t])return a[t]>c[t]^s<0?1:-1;return i===n?0:i>n^s<0?1:-1};y.cosine=y.cos=function(){var e,t,r=this,i=r.constructor;return r.d?r.d[0]?(e=i.precision,t=i.rounding,i.precision=e+Math.max(r.e,r.sd())+O,i.rounding=1,r=xp(i,Nc(i,r)),i.precision=e,i.rounding=t,E(Pe==2||Pe==3?r.neg():r,e,t,!0)):new i(1):new i(NaN)};y.cubeRoot=y.cbrt=function(){var e,t,r,i,n,o,a,c,s,u,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=ie(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(c=i,s=c.times(c).times(c),u=s.plus(l),i=G(u.plus(l).times(c),u.plus(s),a+2,1),ie(c.d).slice(0,a)===(r=ie(i.d)).slice(0,a))if(r=r.slice(a-3,a+1),r=="9999"||!n&&r=="4999"){if(!n&&(E(c,e+1,0),c.times(c).times(c).eq(l))){i=c;break}a+=4,n=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(E(i,e+1,1),t=!i.times(i).times(i).eq(l));break}return P=!0,E(i,e,d.rounding,t)};y.decimalPlaces=y.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ue(this.e/O))*O,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};y.dividedBy=y.div=function(e){return G(this,new this.constructor(e))};y.dividedToIntegerBy=y.divToInt=function(e){var t=this,r=t.constructor;return E(G(t,new r(e),0,1,1),r.precision,r.rounding)};y.equals=y.eq=function(e){return this.cmp(e)===0};y.floor=function(){return E(new this.constructor(this),this.e+1,3)};y.greaterThan=y.gt=function(e){return this.cmp(e)>0};y.greaterThanOrEqualTo=y.gte=function(e){var t=this.cmp(e);return t==1||t===0};y.hyperbolicCosine=y.cosh=function(){var e,t,r,i,n,o=this,a=o.constructor,c=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return c;r=a.precision,i=a.rounding,a.precision=r+Math.max(o.e,o.sd())+4,a.rounding=1,n=o.d.length,n<32?(e=Math.ceil(n/3),t=(1/Mn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=lt(a,1,o.times(t),new a(1),!0);for(var s,u=e,l=new a(8);u--;)s=o.times(o),o=c.minus(s.times(l.minus(s.times(l))));return E(o,a.precision=r,a.rounding=i,!0)};y.hyperbolicSine=y.sinh=function(){var e,t,r,i,n=this,o=n.constructor;if(!n.isFinite()||n.isZero())return new o(n);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(n.e,n.sd())+4,o.rounding=1,i=n.d.length,i<3)n=lt(o,2,n,n,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,n=n.times(1/Mn(5,e)),n=lt(o,2,n,n,!0);for(var a,c=new o(5),s=new o(16),u=new o(20);e--;)a=n.times(n),n=n.times(c.plus(a.times(s.times(a).plus(u))))}return o.precision=t,o.rounding=r,E(n,t,r,!0)};y.hyperbolicTangent=y.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)};y.inverseCosine=y.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()?Oe(t,i,n):new t(0):new t(NaN):e.isZero()?Oe(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))};y.inverseHyperbolicCosine=y.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)};y.inverseHyperbolicSine=y.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())};y.inverseHyperbolicTangent=y.atanh=function(){var e,t,r,i,n=this,o=n.constructor;return n.isFinite()?n.e>=0?new o(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(e=o.precision,t=o.rounding,i=n.sd(),Math.max(i,e)<2*-n.e-1?E(new o(n),e,t,!0):(o.precision=r=i-n.e,n=G(n.plus(1),new o(1).minus(n),r+e,1),o.precision=e+4,o.rounding=1,n=n.ln(),o.precision=e,o.rounding=t,n.times(.5))):new o(NaN)};y.inverseSine=y.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=Oe(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)))};y.inverseTangent=y.atan=function(){var e,t,r,i,n,o,a,c,s,u=this,l=u.constructor,d=l.precision,f=l.rounding;if(u.isFinite()){if(u.isZero())return new l(u);if(u.abs().eq(1)&&d+4<=qr)return a=Oe(l,d+4,f).times(.25),a.s=u.s,a}else{if(!u.s)return new l(NaN);if(d+4<=qr)return a=Oe(l,d+4,f).times(.5),a.s=u.s,a}for(l.precision=c=d+10,l.rounding=1,r=Math.min(28,c/O+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(P=!1,t=Math.ceil(c/O),i=1,s=u.times(u),a=new l(u),n=u;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,E(a,l.precision=d,l.rounding=f,!0)};y.isFinite=function(){return!!this.d};y.isInteger=y.isInt=function(){return!!this.d&&ue(this.e/O)>this.d.length-2};y.isNaN=function(){return!this.s};y.isNegative=y.isNeg=function(){return this.s<0};y.isPositive=y.isPos=function(){return this.s>0};y.isZero=function(){return!!this.d&&this.d[0]===0};y.lessThan=y.lt=function(e){return this.cmp(e)<0};y.lessThanOrEqualTo=y.lte=function(e){return this.cmp(e)<1};y.logarithm=y.log=function(e){var t,r,i,n,o,a,c,s,u=this,l=u.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=u.d,u.s<0||!r||!r[0]||u.eq(1))return new l(r&&!r[0]?-1/0:u.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,c=d+m,a=Ze(u,c),i=t?kn(l,c+10):Ze(e,c),s=G(a,i,c,1),zt(s.d,n=d,f))do if(c+=10,a=Ze(u,c),i=t?kn(l,c+10):Ze(e,c),s=G(a,i,c,1),!o){+ie(s.d).slice(n+1,n+15)+1==1e14&&(s=E(s,d+1,0));break}while(zt(s.d,n+=10,f));return P=!0,E(s,d,f)};y.minus=y.sub=function(e){var t,r,i,n,o,a,c,s,u,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(u=m.d,f=e.d,c=g.precision,s=g.rounding,!u[0]||!f[0]){if(f[0])e.s=-e.s;else if(u[0])e=new g(m);else return new g(s===3?-0:0);return P?E(e,c,s):e}if(r=ue(e.e/O),l=ue(m.e/O),u=u.slice(),o=l-r,o){for(d=o<0,d?(t=u,o=-o,a=f.length):(t=f,r=l,a=u.length),i=Math.max(Math.ceil(c/O),a)+2,o>i&&(o=i,t.length=1),t.reverse(),i=o;i--;)t.push(0);t.reverse()}else{for(i=u.length,a=f.length,d=i<a,d&&(a=i),i=0;i<a;i++)if(u[i]!=f[i]){d=u[i]<f[i];break}o=0}for(d&&(t=u,u=f,f=t,e.s=-e.s),a=u.length,i=f.length-a;i>0;--i)u[a++]=0;for(i=f.length;i>o;){if(u[--i]<f[i]){for(n=i;n&&u[--n]===0;)u[n]=ze-1;--u[n],u[i]+=ze}u[i]-=f[i]}for(;u[--a]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(e.d=u,e.e=Zn(u,r),P?E(e,c,s):e):new g(s===3?-0:0)};y.modulo=y.mod=function(e){var t,r=this,i=r.constructor;return e=new i(e),!r.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||r.d&&!r.d[0]?E(new i(r),i.precision,i.rounding):(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))};y.naturalExponential=y.exp=function(){return Xr(this)};y.naturalLogarithm=y.ln=function(){return Ze(this)};y.negated=y.neg=function(){var e=new this.constructor(this);return e.s=-e.s,E(e)};y.plus=y.add=function(e){var t,r,i,n,o,a,c,s,u,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(u=d.d,l=e.d,c=f.precision,s=f.rounding,!u[0]||!l[0])return l[0]||(e=new f(d)),P?E(e,c,s):e;if(o=ue(d.e/O),i=ue(e.e/O),u=u.slice(),n=o-i,n){for(n<0?(r=u,n=-n,a=l.length):(r=l,i=o,a=u.length),o=Math.ceil(c/O),a=o>a?o+1:a+1,n>a&&(n=a,r.length=1),r.reverse();n--;)r.push(0);r.reverse()}for(a=u.length,n=l.length,a-n<0&&(n=a,r=l,l=u,u=r),t=0;n;)t=(u[--n]=u[n]+l[n]+t)/ze|0,u[n]%=ze;for(t&&(u.unshift(t),++i),a=u.length;u[--a]==0;)u.pop();return e.d=u,e.e=Zn(u,i),P?E(e,c,s):e};y.precision=y.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Re+e);return r.d?(t=Ec(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};y.round=function(){var e=this,t=e.constructor;return E(new t(e),e.e+1,t.rounding)};y.sine=y.sin=function(){var e,t,r=this,i=r.constructor;return r.isFinite()?r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+Math.max(r.e,r.sd())+O,i.rounding=1,r=zp(i,Nc(i,r)),i.precision=e,i.rounding=t,E(Pe>2?r.neg():r,e,t,!0)):new i(NaN)};y.squareRoot=y.sqrt=function(){var e,t,r,i,n,o,a=this,c=a.d,s=a.e,u=a.s,l=a.constructor;if(u!==1||!c||!c[0])return new l(!u||u<0&&(!c||c[0])?NaN:c?a:1/0);for(P=!1,u=Math.sqrt(+a),u==0||u==1/0?(t=ie(c),(t.length+s)%2==0&&(t+="0"),u=Math.sqrt(t),s=ue((s+1)/2)-(s<0||s%2),u==1/0?t="5e"+s:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+s),i=new l(t)):i=new l(u.toString()),r=(s=l.precision)+3;;)if(o=i,i=o.plus(G(a,o,r+2,1)).times(.5),ie(o.d).slice(0,r)===(t=ie(i.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!n&&t=="4999"){if(!n&&(E(o,s+1,0),o.times(o).eq(a))){i=o;break}r+=4,n=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(E(i,s+1,1),e=!i.times(i).eq(a));break}return P=!0,E(i,s,l.rounding,e)};y.tangent=y.tan=function(){var e,t,r=this,i=r.constructor;return r.isFinite()?r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+10,i.rounding=1,r=r.sin(),r.s=1,r=G(r,new i(1).minus(r.times(r)).sqrt(),e+10,0),i.precision=e,i.rounding=t,E(Pe==2||Pe==4?r.neg():r,e,t,!0)):new i(NaN)};y.times=y.mul=function(e){var t,r,i,n,o,a,c,s,u,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/O)+ue(e.e/O),s=f.length,u=m.length,s<u&&(o=f,f=m,m=o,a=s,s=u,u=a),o=[],a=s+u,i=a;i--;)o.push(0);for(i=u;--i>=0;){for(t=0,n=s+i;n>i;)c=o[n]+m[i]*f[n-i-1]+t,o[n--]=c%ze|0,t=c/ze|0;o[n]=(o[n]+t)%ze|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Zn(o,r),P?E(e,d.precision,d.rounding):e};y.toBinary=function(e,t){return pi(this,2,e,t)};y.toDecimalPlaces=y.toDP=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(pe(e,0,Ke),t===void 0?t=i.rounding:pe(t,0,8),E(r,e+r.e+1,t))};y.toExponential=function(e,t){var r,i=this,n=i.constructor;return e===void 0?r=De(i,!0):(pe(e,0,Ke),t===void 0?t=n.rounding:pe(t,0,8),i=E(new n(i),e+1,t),r=De(i,!0,e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};y.toFixed=function(e,t){var r,i,n=this,o=n.constructor;return e===void 0?r=De(n):(pe(e,0,Ke),t===void 0?t=o.rounding:pe(t,0,8),i=E(new o(n),e+n.e+1,t),r=De(i,!1,e+i.e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};y.toFraction=function(e){var t,r,i,n,o,a,c,s,u,l,d,f,m=this,g=m.d,p=m.constructor;if(!g)return new p(m);if(u=r=new p(1),i=s=new p(0),t=new p(i),o=t.e=Ec(g)-m.e-1,a=o%O,t.d[0]=ee(10,a<0?O+a:a),e==null)e=o>0?t:u;else{if(c=new p(e),!c.isInt()||c.lt(u))throw Error(Re+c);e=c.gt(t)?o>0?t:u:c}for(P=!1,c=new p(ie(g)),l=p.precision,p.precision=o=g.length*O*2;d=G(c,t,0,1,1),n=r.plus(d.times(i)),n.cmp(e)!=1;)r=i,i=n,n=u,u=s.plus(d.times(n)),s=n,n=t,t=c.minus(d.times(n)),c=n;return n=G(e.minus(r),i,0,1,1),s=s.plus(n.times(u)),r=r.plus(n.times(i)),s.s=u.s=m.s,f=G(u,i,o,1).minus(m).abs().cmp(G(s,r,o,1).minus(m).abs())<1?[u,i]:[s,r],p.precision=l,P=!0,f};y.toHexadecimal=y.toHex=function(e,t){return pi(this,16,e,t)};y.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,E(r)):(e.s=r.s,r=e),r};y.toNumber=function(){return+this};y.toOctal=function(e,t){return pi(this,8,e,t)};y.toPower=y.pow=function(e){var t,r,i,n,o,a,c=this,s=c.constructor,u=+(e=new s(e));if(!c.d||!e.d||!c.d[0]||!e.d[0])return new s(ee(+c,u));if(c=new s(c),c.eq(1))return c;if(i=s.precision,o=s.rounding,e.eq(1))return E(c,i,o);if(t=ue(e.e/O),t>=e.d.length-1&&(r=u<0?-u:u)<=kp)return n=Oc(s,c,r,i),e.s<0?new s(1).div(n):E(n,i,o);if(a=c.s,a<0){if(t<e.d.length-1)return new s(NaN);if((e.d[t]&1)==0&&(a=1),c.e==0&&c.d[0]==1&&c.d.length==1)return c.s=a,c}return r=ee(+c,u),t=r==0||!isFinite(r)?ue(u*(Math.log("0."+ie(c.d))/Math.LN10+c.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=c.s=1,r=Math.min(12,(t+"").length),n=Xr(e.times(Ze(c,i+r)),i),n.d&&(n=E(n,i+5,1),zt(n.d,i,o)&&(t=i+10,n=E(Xr(e.times(Ze(c,t+r)),t),t+5,1),+ie(n.d).slice(i+1,i+15)+1==1e14&&(n=E(n,i+1,0)))),n.s=a,P=!0,s.rounding=o,E(n,i,o))};y.toPrecision=function(e,t){var r,i=this,n=i.constructor;return e===void 0?r=De(i,i.e<=n.toExpNeg||i.e>=n.toExpPos):(pe(e,1,Ke),t===void 0?t=n.rounding:pe(t,0,8),i=E(new n(i),e,t),r=De(i,e<=i.e||i.e<=n.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+r:r};y.toSignificantDigits=y.toSD=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(pe(e,1,Ke),t===void 0?t=i.rounding:pe(t,0,8)),E(new i(r),e,t)};y.toString=function(){var e=this,t=e.constructor,r=De(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};y.truncated=y.trunc=function(){return E(new this.constructor(this),this.e+1,1)};y.valueOf=y.toJSON=function(){var e=this,t=e.constructor,r=De(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function ie(e){var t,r,i,n=e.length-1,o="",a=e[0];if(n>0){for(o+=a,t=1;t<n;t++)i=e[t]+"",r=O-i.length,r&&(o+=Ce(r)),o+=i;a=e[t],i=a+"",r=O-i.length,r&&(o+=Ce(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(Re+e)}function zt(e,t,r,i){var n,o,a,c;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=O,n=0):(n=Math.ceil((t+1)/O),t%=O),o=ee(10,O-t),c=e[n]%o|0,i==null?t<3?(t==0?c=c/100|0:t==1&&(c=c/10|0),a=r<4&&c==99999||r>3&&c==49999||c==5e4||c==0):a=(r<4&&c+1==o||r>3&&c+1==o/2)&&(e[n+1]/o/100|0)==ee(10,t-2)-1||(c==o/2||c==0)&&(e[n+1]/o/100|0)==0:t<4?(t==0?c=c/1e3|0:t==1?c=c/100|0:t==2&&(c=c/10|0),a=(i||r<4)&&c==9999||!i&&r>3&&c==4999):a=((i||r<4)&&c+1==o||!i&&r>3&&c+1==o/2)&&(e[n+1]/o/1e3|0)==ee(10,t-3)-1,a}function vn(e,t,r){for(var i,n=[0],o,a=0,c=e.length;a<c;){for(o=n.length;o--;)n[o]*=t;for(n[0]+=Wr.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 xp(e,t){var r,i,n;if(t.isZero())return t;i=t.d.length,i<32?(r=Math.ceil(i/3),n=(1/Mn(4,r)).toString()):(r=16,n="2.3283064365386962890625e-10"),e.precision+=r,t=lt(e,1,t.times(n),new e(1));for(var o=r;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=r,t}var G=(function(){function e(i,n,o){var a,c=0,s=i.length;for(i=i.slice();s--;)a=i[s]*n+c,i[s]=a%o|0,c=a/o|0;return c&&i.unshift(c),i}function t(i,n,o,a){var c,s;if(o!=a)s=o>a?1:-1;else for(c=s=0;c<o;c++)if(i[c]!=n[c]){s=i[c]>n[c]?1:-1;break}return s}function r(i,n,o,a){for(var c=0;o--;)i[o]-=c,c=i[o]<n[o]?1:0,i[o]=c*a+i[o]-n[o];for(;!i[0]&&i.length>1;)i.shift()}return function(i,n,o,a,c,s){var u,l,d,f,m,g,p,v,w,z,T,A,L,R,le,X,ne,be,ae,je,He=i.constructor,qe=i.s==n.s?1:-1,Q=i.d,F=n.d;if(!Q||!Q[0]||!F||!F[0])return new He(!i.s||!n.s||(Q?F&&Q[0]==F[0]:!F)?NaN:Q&&Q[0]==0||!F?qe*0:qe/0);for(s?(m=1,l=i.e-n.e):(s=ze,m=O,l=ue(i.e/m)-ue(n.e/m)),ae=F.length,ne=Q.length,w=new He(qe),z=w.d=[],d=0;F[d]==(Q[d]||0);d++);if(F[d]>(Q[d]||0)&&l--,o==null?(R=o=He.precision,a=He.rounding):c?R=o+(i.e-n.e)+1:R=o,R<0)z.push(1),g=!0;else{if(R=R/m+2|0,d=0,ae==1){for(f=0,F=F[0],R++;(d<ne||f)&&R--;d++)le=f*s+(Q[d]||0),z[d]=le/F|0,f=le%F|0;g=f||d<ne}else{for(f=s/(F[0]+1)|0,f>1&&(F=e(F,f,s),Q=e(Q,f,s),ae=F.length,ne=Q.length),X=ae,T=Q.slice(0,ae),A=T.length;A<ae;)T[A++]=0;je=F.slice(),je.unshift(0),be=F[0],F[1]>=s/2&&++be;do f=0,u=t(F,T,ae,A),u<0?(L=T[0],ae!=A&&(L=L*s+(T[1]||0)),f=L/be|0,f>1?(f>=s&&(f=s-1),p=e(F,f,s),v=p.length,A=T.length,u=t(p,T,v,A),u==1&&(f--,r(p,ae<v?je:F,v,s))):(f==0&&(u=f=1),p=F.slice()),v=p.length,v<A&&p.unshift(0),r(T,p,A,s),u==-1&&(A=T.length,u=t(F,T,ae,A),u<1&&(f++,r(T,ae<A?je:F,A,s))),A=T.length):u===0&&(f++,T=[0]),z[d++]=f,u&&T[0]?T[A++]=Q[X]||0:(T=[Q[X]],A=1);while((X++<ne||T[0]!==void 0)&&R--);g=T[0]!==void 0}z[0]||z.shift()}if(m==1)w.e=l,kc=g;else{for(d=1,f=z[0];f>=10;f/=10)d++;w.e=d+l*m-1,E(w,c?o+w.e+1:o,a,g)}return w}})();function E(e,t,r,i){var n,o,a,c,s,u,l,d,f,m=e.constructor;e:if(t!=null){if(d=e.d,!d)return e;for(n=1,c=d[0];c>=10;c/=10)n++;if(o=t-n,o<0)o+=O,a=t,l=d[f=0],s=l/ee(10,n-a-1)%10|0;else if(f=Math.ceil((o+1)/O),c=d.length,f>=c)if(i){for(;c++<=f;)d.push(0);l=s=0,n=1,o%=O,a=o-O+1}else break e;else{for(l=c=d[f],n=1;c>=10;c/=10)n++;o%=O,a=o-O+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)),u=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,u?(t-=e.e+1,d[0]=ee(10,(O-t%O)%O),e.e=-t||0):d[0]=e.e=0,e;if(o==0?(d.length=f,c=1,f--):(d.length=f+1,c=ee(10,O-o),d[f]=a>0?(l/ee(10,n-a)%ee(10,a)|0)*c:0),u)for(;;)if(f==0){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=c,c=1;a>=10;a/=10)c++;o!=c&&(e.e++,d[0]==ze&&(d[0]=1));break}else{if(d[f]+=c,d[f]!=ze)break;d[f--]=0,c=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 De(e,t,r){if(!e.isFinite())return Dc(e);var i,n=e.e,o=ie(e.d),a=o.length;return t?(r&&(i=r-a)>0?o=o.charAt(0)+"."+o.slice(1)+Ce(i):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):n<0?(o="0."+Ce(-n-1)+o,r&&(i=r-a)>0&&(o+=Ce(i))):n>=a?(o+=Ce(n+1-a),r&&(i=r-n-1)>0&&(o=o+"."+Ce(i))):((i=n+1)<a&&(o=o.slice(0,i)+"."+o.slice(i)),r&&(i=r-a)>0&&(n+1===a&&(o+="."),o+=Ce(i))),o}function Zn(e,t){var r=e[0];for(t*=O;r>=10;r/=10)t++;return t}function kn(e,t,r){if(t>Ip)throw P=!0,r&&(e.precision=r),Error(Ic);return E(new e(wn),t,1,!0)}function Oe(e,t,r){if(t>qr)throw Error(Ic);return E(new e(Sn),t,r,!0)}function Ec(e){var t=e.length-1,r=t*O+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ce(e){for(var t="";e--;)t+="0";return t}function Oc(e,t,r,i){var n,o=new e(1),a=Math.ceil(i/O+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 Ea(e){return e.d[e.d.length-1]&1}function Uc(e,t,r){for(var i,n,o=new e(t[0]),a=0;++a<t.length;){if(n=new e(t[a]),!n.s){o=n;break}i=o.cmp(n),(i===r||i===0&&o.s===r)&&(o=n)}return o}function Xr(e,t){var r,i,n,o,a,c,s,u=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,c=new f(.03125);e.e>-2;)e=e.times(c),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=E(o.times(e),s,1),r=r.times(++l),c=a.plus(G(o,r,s,1)),ie(c.d).slice(0,s)===ie(a.d).slice(0,s)){for(n=d;n--;)a=E(a.times(a),s,1);if(t==null)if(u<3&&zt(a.d,s-i,m,u))f.precision=s+=10,r=o=c=new f(1),l=0,u++;else return E(a,f.precision=g,m,P=!0);else return f.precision=g,a}a=c}}function Ze(e,t){var r,i,n,o,a,c,s,u,l,d,f,m=1,g=10,p=e,v=p.d,w=p.constructor,z=w.rounding,T=w.precision;if(p.s<0||!v||!v[0]||!p.e&&v[0]==1&&v.length==1)return new w(v&&!v[0]?-1/0:p.s!=1?NaN:v?0:p);if(t==null?(P=!1,l=T):l=t,w.precision=l+=g,r=ie(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=ie(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 u=kn(w,l+2,T).times(o+""),p=Ze(new w(i+"."+r.slice(1)),l-g).plus(u),w.precision=T,t==null?E(p,T,z,P=!0):p;for(d=p,s=a=p=G(p.minus(1),p.plus(1),l,1),f=E(p.times(p),l,1),n=3;;){if(a=E(a.times(f),l,1),u=s.plus(G(a,new w(n),l,1)),ie(u.d).slice(0,l)===ie(s.d).slice(0,l))if(s=s.times(2),o!==0&&(s=s.plus(kn(w,l+2,T).times(o+""))),s=G(s,new w(m),l,1),t==null)if(zt(s.d,l-g,z,c))w.precision=l+=g,u=a=p=G(d.minus(1),d.plus(1),l,1),f=E(p.times(p),l,1),n=c=1;else return E(s,w.precision=T,z,P=!0);else return w.precision=T,s;s=u,n+=2}}function Dc(e){return String(e.s*e.s/0)}function bn(e,t){var r,i,n;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(r<0&&(r=i),r+=+t.slice(i+1),t=t.substring(0,i)):r<0&&(r=t.length),i=0;t.charCodeAt(i)===48;i++);for(n=t.length;t.charCodeAt(n-1)===48;--n);if(t=t.slice(i,n),t){if(n-=i,e.e=r=r-i-1,e.d=[],i=(r+1)%O,r<0&&(i+=O),i<n){for(i&&e.d.push(+t.slice(0,i)),n-=O;i<n;)e.d.push(+t.slice(i,i+=O));t=t.slice(i),i=O-t.length}else i-=n;for(;i--;)t+="0";e.d.push(+t),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 Tp(e,t){var r,i,n,o,a,c,s,u,l;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),zc.test(t))return bn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(wp.test(t))r=16,t=t.toLowerCase();else if($p.test(t))r=2;else if(Sp.test(t))r=8;else throw Error(Re+t);for(o=t.search(/p/i),o>0?(s=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),a=o>=0,i=e.constructor,a&&(t=t.replace(".",""),c=t.length,o=c-o,n=Oc(i,new i(r),o,o*2)),u=vn(t,r,ze),l=u.length-1,o=l;u[o]===0;--o)u.pop();return o<0?new i(e.s*0):(e.e=Zn(u,l),e.d=u,P=!1,a&&(e=G(e,n,c*4)),s&&(e=e.times(Math.abs(s)<54?ee(2,s):jt.pow(2,s))),P=!0,e)}function zp(e,t){var r,i=t.d.length;if(i<3)return t.isZero()?t:lt(e,2,t,t);r=1.4*Math.sqrt(i),r=r>16?16:r|0,t=t.times(1/Mn(5,r)),t=lt(e,2,t,t);for(var n,o=new e(5),a=new e(16),c=new e(20);r--;)n=t.times(t),t=t.times(o.plus(n.times(a.times(n).minus(c))));return t}function lt(e,t,r,i,n){var o,a,c,s,u=e.precision,l=Math.ceil(u/O);for(P=!1,s=r.times(r),c=new e(i);;){if(a=G(c.times(s),new e(t++*t++),u,1),c=n?i.plus(a):i.minus(a),i=G(a.times(s),new e(t++*t++),u,1),a=c.plus(i),a.d[l]!==void 0){for(o=l;a.d[o]===c.d[o]&&o--;);if(o==-1)break}o=c,c=i,i=a,a=o}return P=!0,a.d.length=l+1,a}function Mn(e,t){for(var r=e;--t;)r*=e;return r}function Nc(e,t){var r,i=t.s<0,n=Oe(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=Ea(r)?i?2:3:i?4:1,t;Pe=Ea(r)?i?1:4:i?3:2}return t.minus(n).abs()}function pi(e,t,r,i){var n,o,a,c,s,u,l,d,f,m=e.constructor,g=r!==void 0;if(g?(pe(r,1,Ke),i===void 0?i=m.rounding:pe(i,0,8)):(r=m.precision,i=m.rounding),!e.isFinite())l=Dc(e);else{for(l=De(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=vn(De(f),10,n),f.e=f.d.length),d=vn(l,10,n),o=s=d.length;d[--s]==0;)d.pop();if(!d[0])l=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,u=kc),a=d[r],c=n/2,u=u||d[r+1]!==void 0,u=i<4?(a!==void 0||u)&&(i===0||i===(e.s<0?3:2)):a>c||a===c&&(i===4||u||i===6&&d[r-1]&1||i===(e.s<0?8:7)),d.length=r,u)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+=Wr.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=vn(l,n,t),s=d.length;!d[s-1];--s);for(a=1,l="1.";a<s;a++)l+=Wr.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 Ep(e){return new this(e).abs()}function Op(e){return new this(e).acos()}function Up(e){return new this(e).acosh()}function Dp(e,t){return new this(e).plus(t)}function Np(e){return new this(e).asin()}function jp(e){return new this(e).asinh()}function Pp(e){return new this(e).atan()}function Ap(e){return new this(e).atanh()}function Lp(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=Oe(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?Oe(this,i,n):new this(0),r.s=e.s):!e.d||t.isZero()?(r=Oe(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=Oe(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 Cp(e){return new this(e).cbrt()}function Zp(e){return E(e=new this(e),e.e+1,2)}function Mp(e,t,r){return new this(e).clamp(t,r)}function Rp(e){if(!e||typeof e!="object")throw Error(Cn+"Object expected");var t,r,i,n=e.defaults===!0,o=["precision",1,Ke,"rounding",0,8,"toExpNeg",-ct,0,"toExpPos",0,ct,"maxE",0,ct,"minE",-ct,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(r=o[t],n&&(this[r]=Hr[r]),(i=e[r])!==void 0)if(ue(i)===i&&i>=o[t+1]&&i<=o[t+2])this[r]=i;else throw Error(Re+r+": "+i);if(r="crypto",n&&(this[r]=Hr[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(xc);else this[r]=!1;else throw Error(Re+r+": "+i);return this}function Fp(e){return new this(e).cos()}function Vp(e){return new this(e).cosh()}function jc(e){var t,r,i;function n(o){var a,c,s,u=this;if(!(u instanceof n))return new n(o);if(u.constructor=n,Ua(o)){u.s=o.s,P?!o.d||o.e>n.maxE?(u.e=NaN,u.d=null):o.e<n.minE?(u.e=0,u.d=[0]):(u.e=o.e,u.d=o.d.slice()):(u.e=o.e,u.d=o.d?o.d.slice():o.d);return}if(s=typeof o,s==="number"){if(o===0){u.s=1/o<0?-1:1,u.e=0,u.d=[0];return}if(o<0?(o=-o,u.s=-1):u.s=1,o===~~o&&o<1e7){for(a=0,c=o;c>=10;c/=10)a++;P?a>n.maxE?(u.e=NaN,u.d=null):a<n.minE?(u.e=0,u.d=[0]):(u.e=a,u.d=[o]):(u.e=a,u.d=[o]);return}if(o*0!==0){o||(u.s=NaN),u.e=NaN,u.d=null;return}return bn(u,o.toString())}if(s==="string")return(c=o.charCodeAt(0))===45?(o=o.slice(1),u.s=-1):(c===43&&(o=o.slice(1)),u.s=1),zc.test(o)?bn(u,o):Tp(u,o);if(s==="bigint")return o<0?(o=-o,u.s=-1):u.s=1,bn(u,o.toString());throw Error(Re+o)}if(n.prototype=y,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=Rp,n.clone=jc,n.isDecimal=Ua,n.abs=Ep,n.acos=Op,n.acosh=Up,n.add=Dp,n.asin=Np,n.asinh=jp,n.atan=Pp,n.atanh=Ap,n.atan2=Lp,n.cbrt=Cp,n.ceil=Zp,n.clamp=Mp,n.cos=Fp,n.cosh=Vp,n.div=Bp,n.exp=Kp,n.floor=Jp,n.hypot=Gp,n.ln=Wp,n.log=Hp,n.log10=Xp,n.log2=qp,n.max=Yp,n.min=Qp,n.mod=eh,n.mul=th,n.pow=nh,n.random=rh,n.round=ih,n.sign=oh,n.sin=ah,n.sinh=ch,n.sqrt=uh,n.sub=sh,n.sum=lh,n.tan=dh,n.tanh=fh,n.trunc=mh,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 Bp(e,t){return new this(e).div(t)}function Kp(e){return new this(e).exp()}function Jp(e){return E(e=new this(e),e.e+1,3)}function Gp(){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 Ua(e){return e instanceof jt||e&&e.toStringTag===Tc||!1}function Wp(e){return new this(e).ln()}function Hp(e,t){return new this(e).log(t)}function qp(e){return new this(e).log(2)}function Xp(e){return new this(e).log(10)}function Yp(){return Uc(this,arguments,-1)}function Qp(){return Uc(this,arguments,1)}function eh(e,t){return new this(e).mod(t)}function th(e,t){return new this(e).mul(t)}function nh(e,t){return new this(e).pow(t)}function rh(e){var t,r,i,n,o=0,a=new this(1),c=[];if(e===void 0?e=this.precision:pe(e,1,Ke),i=Math.ceil(e/O),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));o<i;)n=t[o],n>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:c[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):(c.push(n%1e7),o+=4);o=i/4}else throw Error(xc);else for(;o<i;)c[o++]=Math.random()*1e7|0;for(i=c[--o],e%=O,i&&e&&(n=ee(10,O-e),c[o]=(i/n|0)*n);c[o]===0;o--)c.pop();if(o<0)r=0,c=[0];else{for(r=-1;c[0]===0;r-=O)c.shift();for(i=1,n=c[0];n>=10;n/=10)i++;i<O&&(r-=O-i)}return a.e=r,a.d=c,a}function ih(e){return E(e=new this(e),e.e+1,this.rounding)}function oh(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function ah(e){return new this(e).sin()}function ch(e){return new this(e).sinh()}function uh(e){return new this(e).sqrt()}function sh(e,t){return new this(e).sub(t)}function lh(){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,E(r,this.precision,this.rounding)}function dh(e){return new this(e).tan()}function fh(e){return new this(e).tanh()}function mh(e){return E(e=new this(e),e.e+1,1)}y[Symbol.for("nodejs.util.inspect.custom")]=y.toString;y[Symbol.toStringTag]="Decimal";var jt=y.constructor=jc(Hr);wn=new jt(wn);Sn=new jt(Sn);class Ee{static formatToTimecode(t,r,i=!1,n=!1){let o=new jt(r),a,c=o.round();a=o.mul(t).floor();let s,u,l,d,f=c.mul(86400),m=a.mod(f),g=c.mul(3600),p=c.mul(60);return d=m.divToInt(g),m=m.minus(d.mul(g)),l=m.divToInt(p),m=m.minus(l.mul(p)),u=m.divToInt(c),s=m.minus(u.mul(c)),Ee.formatTimecodeText(d.toNumber(),l.toNumber(),u.toNumber(),s.toNumber(),i,n)}static formatTimecodeText(t,r,i,n,o=!1,a=!1){let c=a?".":o?";":":";return`${Ee.padZero(t)}:${Ee.padZero(r)}:${Ee.padZero(i)}${c}${Ee.padZero(n)}`}static padZero(t){return t<10?`0${t}`:`${t}`}}class ph{static resolveFrameRateValueFromFraction(t){return 30}}const xe=class xe{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 xe.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=ph.resolveFrameRateValueFromFraction(r);return Ee.formatToTimecode(xe.timeMomentToSeconds(t),n,i)}static formatTimerangeToTimecodeText(t,r,i=!1){let n=xe.parseTimeRange(t),o=n.start?xe.formatTimeMomentToTimecodeText(n.start,r,i):"?",a=n.end?xe.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=xe.parseTimeRange(t);if(r.start===void 0||r.end===void 0)return 1/0;{let i=xe.timeMomentToSeconds(r.start);return xe.timeMomentToSeconds(r.end)-i}}static padZero(t){return t<10?`0${t}`:`${t}`}};xe.timeRangePattern=/^(\[|\()?(-?\d+:\d+)?(_(-?\d+:\d+)?)?(\]|\))?$/;let N=xe;function hh(e){return`subtitles-${e}`}function gh(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:N.timeMomentToSeconds(N.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),c=Math.max(a.getUTCHours()+(r??0),0),s=a.getUTCMinutes(),u=a.getUTCSeconds(),l=a.getUTCMilliseconds(),d=c*3600+s*60+u+l/1e3;return n===void 0?{ffom:Ee.formatToTimecode(d,100,!1,!0),mediaStartTime:o,frameRate:100,dropFrame:!1}:{ffom:Ee.formatToTimecode(d,n.frameRate,n.dropFrame),mediaStartTime:n.start,frameRate:n.frameRate,dropFrame:n.dropFrame}}function Pc(e){return Lc(e)}function Ac(e){return Lc(e)}function Lc(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 vh{constructor(t=3,r=!1){this.targetDuration=null,this.mediaSequence=null,this.programDateTime=null,this.playlistType=null,this.streams=[],this.media=[],this.segments=[],this.endList=!1,this.version=t,this.independentSegments=r}}class Yr{constructor(t,r,i,n,o){this.bandwidth=t,this.averageBandwidth=r,this.resolution=i,this.frameRate=n,this.uri=o}}class bh{constructor(t,r,i,n,o,a,c){this.type=t,this.groupId=r,this.name=i,this.isDefault=n,this.autoSelect=o,this.channels=a,this.uri=c}}class Da{constructor(t,r){this.duration=t,this.uri=r}}class Na{constructor(){this.playlist=new vh}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 ja{static write(t){let r=`#EXTM3U
|
|
7
|
+
*/var ut=9e15,Ke=1e9,qr="0123456789abcdef",wn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Sn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Wr={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ut,maxE:ut,crypto:!1},wu,Ne,A=!0,Cn="[DecimalError] ",Re=Cn+"Invalid argument: ",Su=Cn+"Precision limit exceeded",ku=Cn+"crypto unavailable",Iu="[object Decimal]",se=Math.floor,ne=Math.pow,_p=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,yp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,$p=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,xu=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,xe=1e7,U=7,wp=9007199254740991,Sp=wn.length-1,Hr=Sn.length-1,_={toStringTag:Iu};_.absoluteValue=_.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};_.ceil=function(){return O(new this.constructor(this),this.e+1,2)};_.clampedTo=_.clamp=function(e,t){var r,i=this,n=i.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(Re+t);return r=i.cmp(e),r<0?e:i.cmp(t)>0?t:new n(i)};_.comparedTo=_.cmp=function(e){var t,r,i,n,o=this,a=o.d,u=(e=new o.constructor(e)).d,s=o.s,c=e.s;if(!a||!u)return!s||!c?NaN:s!==c?s:a===u?0:!a^s<0?1:-1;if(!a[0]||!u[0])return a[0]?s:u[0]?-c:0;if(s!==c)return s;if(o.e!==e.e)return o.e>e.e^s<0?1:-1;for(i=a.length,n=u.length,t=0,r=i<n?i:n;t<r;++t)if(a[t]!==u[t])return a[t]>u[t]^s<0?1:-1;return i===n?0:i>n^s<0?1:-1};_.cosine=_.cos=function(){var e,t,r=this,i=r.constructor;return r.d?r.d[0]?(e=i.precision,t=i.rounding,i.precision=e+Math.max(r.e,r.sd())+U,i.rounding=1,r=kp(i,Uu(i,r)),i.precision=e,i.rounding=t,O(Ne==2||Ne==3?r.neg():r,e,t,!0)):new i(1):new i(NaN)};_.cubeRoot=_.cbrt=function(){var e,t,r,i,n,o,a,u,s,c,l=this,d=l.constructor;if(!l.isFinite()||l.isZero())return new d(l);for(A=!1,o=l.s*ne(l.s*l,1/3),!o||Math.abs(o)==1/0?(r=oe(l.d),e=l.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=ne(r,1/3),e=se((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),i=new d(r),i.s=l.s):i=new d(o.toString()),a=(e=d.precision)+3;;)if(u=i,s=u.times(u).times(u),c=s.plus(l),i=J(c.plus(l).times(u),c.plus(s),a+2,1),oe(u.d).slice(0,a)===(r=oe(i.d)).slice(0,a))if(r=r.slice(a-3,a+1),r=="9999"||!n&&r=="4999"){if(!n&&(O(u,e+1,0),u.times(u).times(u).eq(l))){i=u;break}a+=4,n=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(i,e+1,1),t=!i.times(i).times(i).eq(l));break}return A=!0,O(i,e,d.rounding,t)};_.decimalPlaces=_.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-se(this.e/U))*U,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};_.dividedBy=_.div=function(e){return J(this,new this.constructor(e))};_.dividedToIntegerBy=_.divToInt=function(e){var t=this,r=t.constructor;return O(J(t,new r(e),0,1,1),r.precision,r.rounding)};_.equals=_.eq=function(e){return this.cmp(e)===0};_.floor=function(){return O(new this.constructor(this),this.e+1,3)};_.greaterThan=_.gt=function(e){return this.cmp(e)>0};_.greaterThanOrEqualTo=_.gte=function(e){var t=this.cmp(e);return t==1||t===0};_.hyperbolicCosine=_.cosh=function(){var e,t,r,i,n,o=this,a=o.constructor,u=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return u;r=a.precision,i=a.rounding,a.precision=r+Math.max(o.e,o.sd())+4,a.rounding=1,n=o.d.length,n<32?(e=Math.ceil(n/3),t=(1/Mn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=lt(a,1,o.times(t),new a(1),!0);for(var s,c=e,l=new a(8);c--;)s=o.times(o),o=u.minus(s.times(l.minus(s.times(l))));return O(o,a.precision=r,a.rounding=i,!0)};_.hyperbolicSine=_.sinh=function(){var e,t,r,i,n=this,o=n.constructor;if(!n.isFinite()||n.isZero())return new o(n);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(n.e,n.sd())+4,o.rounding=1,i=n.d.length,i<3)n=lt(o,2,n,n,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,n=n.times(1/Mn(5,e)),n=lt(o,2,n,n,!0);for(var a,u=new o(5),s=new o(16),c=new o(20);e--;)a=n.times(n),n=n.times(u.plus(a.times(s.times(a).plus(c))))}return o.precision=t,o.rounding=r,O(n,t,r,!0)};_.hyperbolicTangent=_.tanh=function(){var e,t,r=this,i=r.constructor;return r.isFinite()?r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+7,i.rounding=1,J(r.sinh(),r.cosh(),i.precision=e,i.rounding=t)):new i(r.s)};_.inverseCosine=_.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),i=t.precision,n=t.rounding;return r!==-1?r===0?e.isNeg()?Ee(t,i,n):new t(0):new t(NaN):e.isZero()?Ee(t,i+4,n).times(.5):(t.precision=i+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=i,t.rounding=n,e.times(2))};_.inverseHyperbolicCosine=_.acosh=function(){var e,t,r=this,i=r.constructor;return r.lte(1)?new i(r.eq(1)?0:NaN):r.isFinite()?(e=i.precision,t=i.rounding,i.precision=e+Math.max(Math.abs(r.e),r.sd())+4,i.rounding=1,A=!1,r=r.times(r).minus(1).sqrt().plus(r),A=!0,i.precision=e,i.rounding=t,r.ln()):new i(r)};_.inverseHyperbolicSine=_.asinh=function(){var e,t,r=this,i=r.constructor;return!r.isFinite()||r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,i.rounding=1,A=!1,r=r.times(r).plus(1).sqrt().plus(r),A=!0,i.precision=e,i.rounding=t,r.ln())};_.inverseHyperbolicTangent=_.atanh=function(){var e,t,r,i,n=this,o=n.constructor;return n.isFinite()?n.e>=0?new o(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(e=o.precision,t=o.rounding,i=n.sd(),Math.max(i,e)<2*-n.e-1?O(new o(n),e,t,!0):(o.precision=r=i-n.e,n=J(n.plus(1),new o(1).minus(n),r+e,1),o.precision=e+4,o.rounding=1,n=n.ln(),o.precision=e,o.rounding=t,n.times(.5))):new o(NaN)};_.inverseSine=_.asin=function(){var e,t,r,i,n=this,o=n.constructor;return n.isZero()?new o(n):(t=n.abs().cmp(1),r=o.precision,i=o.rounding,t!==-1?t===0?(e=Ee(o,r+4,i).times(.5),e.s=n.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,n=n.div(new o(1).minus(n.times(n)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=i,n.times(2)))};_.inverseTangent=_.atan=function(){var e,t,r,i,n,o,a,u,s,c=this,l=c.constructor,d=l.precision,f=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&d+4<=Hr)return a=Ee(l,d+4,f).times(.25),a.s=c.s,a}else{if(!c.s)return new l(NaN);if(d+4<=Hr)return a=Ee(l,d+4,f).times(.5),a.s=c.s,a}for(l.precision=u=d+10,l.rounding=1,r=Math.min(28,u/U+2|0),e=r;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(A=!1,t=Math.ceil(u/U),i=1,s=c.times(c),a=new l(c),n=c;e!==-1;)if(n=n.times(s),o=a.minus(n.div(i+=2)),n=n.times(s),a=o.plus(n.div(i+=2)),a.d[t]!==void 0)for(e=t;a.d[e]===o.d[e]&&e--;);return r&&(a=a.times(2<<r-1)),A=!0,O(a,l.precision=d,l.rounding=f,!0)};_.isFinite=function(){return!!this.d};_.isInteger=_.isInt=function(){return!!this.d&&se(this.e/U)>this.d.length-2};_.isNaN=function(){return!this.s};_.isNegative=_.isNeg=function(){return this.s<0};_.isPositive=_.isPos=function(){return this.s>0};_.isZero=function(){return!!this.d&&this.d[0]===0};_.lessThan=_.lt=function(e){return this.cmp(e)<0};_.lessThanOrEqualTo=_.lte=function(e){return this.cmp(e)<1};_.logarithm=_.log=function(e){var t,r,i,n,o,a,u,s,c=this,l=c.constructor,d=l.precision,f=l.rounding,m=5;if(e==null)e=new l(10),t=!0;else{if(e=new l(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(r=c.d,c.s<0||!r||!r[0]||c.eq(1))return new l(r&&!r[0]?-1/0:c.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(n=r[0];n%10===0;)n/=10;o=n!==1}if(A=!1,u=d+m,a=Ze(c,u),i=t?kn(l,u+10):Ze(e,u),s=J(a,i,u,1),Et(s.d,n=d,f))do if(u+=10,a=Ze(c,u),i=t?kn(l,u+10):Ze(e,u),s=J(a,i,u,1),!o){+oe(s.d).slice(n+1,n+15)+1==1e14&&(s=O(s,d+1,0));break}while(Et(s.d,n+=10,f));return A=!0,O(s,d,f)};_.minus=_.sub=function(e){var t,r,i,n,o,a,u,s,c,l,d,f,m=this,h=m.constructor;if(e=new h(e),!m.d||!e.d)return!m.s||!e.s?e=new h(NaN):m.d?e.s=-e.s:e=new h(e.d||m.s!==e.s?m:NaN),e;if(m.s!=e.s)return e.s=-e.s,m.plus(e);if(c=m.d,f=e.d,u=h.precision,s=h.rounding,!c[0]||!f[0]){if(f[0])e.s=-e.s;else if(c[0])e=new h(m);else return new h(s===3?-0:0);return A?O(e,u,s):e}if(r=se(e.e/U),l=se(m.e/U),c=c.slice(),o=l-r,o){for(d=o<0,d?(t=c,o=-o,a=f.length):(t=f,r=l,a=c.length),i=Math.max(Math.ceil(u/U),a)+2,o>i&&(o=i,t.length=1),t.reverse(),i=o;i--;)t.push(0);t.reverse()}else{for(i=c.length,a=f.length,d=i<a,d&&(a=i),i=0;i<a;i++)if(c[i]!=f[i]){d=c[i]<f[i];break}o=0}for(d&&(t=c,c=f,f=t,e.s=-e.s),a=c.length,i=f.length-a;i>0;--i)c[a++]=0;for(i=f.length;i>o;){if(c[--i]<f[i]){for(n=i;n&&c[--n]===0;)c[n]=xe-1;--c[n],c[i]+=xe}c[i]-=f[i]}for(;c[--a]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(e.d=c,e.e=Zn(c,r),A?O(e,u,s):e):new h(s===3?-0:0)};_.modulo=_.mod=function(e){var t,r=this,i=r.constructor;return e=new i(e),!r.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||r.d&&!r.d[0]?O(new i(r),i.precision,i.rounding):(A=!1,i.modulo==9?(t=J(r,e.abs(),0,3,1),t.s*=e.s):t=J(r,e,0,i.modulo,1),t=t.times(e),A=!0,r.minus(t))};_.naturalExponential=_.exp=function(){return Xr(this)};_.naturalLogarithm=_.ln=function(){return Ze(this)};_.negated=_.neg=function(){var e=new this.constructor(this);return e.s=-e.s,O(e)};_.plus=_.add=function(e){var t,r,i,n,o,a,u,s,c,l,d=this,f=d.constructor;if(e=new f(e),!d.d||!e.d)return!d.s||!e.s?e=new f(NaN):d.d||(e=new f(e.d||d.s===e.s?d:NaN)),e;if(d.s!=e.s)return e.s=-e.s,d.minus(e);if(c=d.d,l=e.d,u=f.precision,s=f.rounding,!c[0]||!l[0])return l[0]||(e=new f(d)),A?O(e,u,s):e;if(o=se(d.e/U),i=se(e.e/U),c=c.slice(),n=o-i,n){for(n<0?(r=c,n=-n,a=l.length):(r=l,i=o,a=c.length),o=Math.ceil(u/U),a=o>a?o+1:a+1,n>a&&(n=a,r.length=1),r.reverse();n--;)r.push(0);r.reverse()}for(a=c.length,n=l.length,a-n<0&&(n=a,r=l,l=c,c=r),t=0;n;)t=(c[--n]=c[n]+l[n]+t)/xe|0,c[n]%=xe;for(t&&(c.unshift(t),++i),a=c.length;c[--a]==0;)c.pop();return e.d=c,e.e=Zn(c,i),A?O(e,u,s):e};_.precision=_.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Re+e);return r.d?(t=Tu(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};_.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};_.sine=_.sin=function(){var e,t,r=this,i=r.constructor;return r.isFinite()?r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+Math.max(r.e,r.sd())+U,i.rounding=1,r=xp(i,Uu(i,r)),i.precision=e,i.rounding=t,O(Ne>2?r.neg():r,e,t,!0)):new i(NaN)};_.squareRoot=_.sqrt=function(){var e,t,r,i,n,o,a=this,u=a.d,s=a.e,c=a.s,l=a.constructor;if(c!==1||!u||!u[0])return new l(!c||c<0&&(!u||u[0])?NaN:u?a:1/0);for(A=!1,c=Math.sqrt(+a),c==0||c==1/0?(t=oe(u),(t.length+s)%2==0&&(t+="0"),c=Math.sqrt(t),s=se((s+1)/2)-(s<0||s%2),c==1/0?t="5e"+s:(t=c.toExponential(),t=t.slice(0,t.indexOf("e")+1)+s),i=new l(t)):i=new l(c.toString()),r=(s=l.precision)+3;;)if(o=i,i=o.plus(J(a,o,r+2,1)).times(.5),oe(o.d).slice(0,r)===(t=oe(i.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!n&&t=="4999"){if(!n&&(O(o,s+1,0),o.times(o).eq(a))){i=o;break}r+=4,n=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(i,s+1,1),e=!i.times(i).eq(a));break}return A=!0,O(i,s,l.rounding,e)};_.tangent=_.tan=function(){var e,t,r=this,i=r.constructor;return r.isFinite()?r.isZero()?new i(r):(e=i.precision,t=i.rounding,i.precision=e+10,i.rounding=1,r=r.sin(),r.s=1,r=J(r,new i(1).minus(r.times(r)).sqrt(),e+10,0),i.precision=e,i.rounding=t,O(Ne==2||Ne==4?r.neg():r,e,t,!0)):new i(NaN)};_.times=_.mul=function(e){var t,r,i,n,o,a,u,s,c,l=this,d=l.constructor,f=l.d,m=(e=new d(e)).d;if(e.s*=l.s,!f||!f[0]||!m||!m[0])return new d(!e.s||f&&!f[0]&&!m||m&&!m[0]&&!f?NaN:!f||!m?e.s/0:e.s*0);for(r=se(l.e/U)+se(e.e/U),s=f.length,c=m.length,s<c&&(o=f,f=m,m=o,a=s,s=c,c=a),o=[],a=s+c,i=a;i--;)o.push(0);for(i=c;--i>=0;){for(t=0,n=s+i;n>i;)u=o[n]+m[i]*f[n-i-1]+t,o[n--]=u%xe|0,t=u/xe|0;o[n]=(o[n]+t)%xe|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Zn(o,r),A?O(e,d.precision,d.rounding):e};_.toBinary=function(e,t){return pi(this,2,e,t)};_.toDecimalPlaces=_.toDP=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(me(e,0,Ke),t===void 0?t=i.rounding:me(t,0,8),O(r,e+r.e+1,t))};_.toExponential=function(e,t){var r,i=this,n=i.constructor;return e===void 0?r=Ue(i,!0):(me(e,0,Ke),t===void 0?t=n.rounding:me(t,0,8),i=O(new n(i),e+1,t),r=Ue(i,!0,e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};_.toFixed=function(e,t){var r,i,n=this,o=n.constructor;return e===void 0?r=Ue(n):(me(e,0,Ke),t===void 0?t=o.rounding:me(t,0,8),i=O(new o(n),e+n.e+1,t),r=Ue(i,!1,e+i.e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};_.toFraction=function(e){var t,r,i,n,o,a,u,s,c,l,d,f,m=this,h=m.d,p=m.constructor;if(!h)return new p(m);if(c=r=new p(1),i=s=new p(0),t=new p(i),o=t.e=Tu(h)-m.e-1,a=o%U,t.d[0]=ne(10,a<0?U+a:a),e==null)e=o>0?t:c;else{if(u=new p(e),!u.isInt()||u.lt(c))throw Error(Re+u);e=u.gt(t)?o>0?t:c:u}for(A=!1,u=new p(oe(h)),l=p.precision,p.precision=o=h.length*U*2;d=J(u,t,0,1,1),n=r.plus(d.times(i)),n.cmp(e)!=1;)r=i,i=n,n=c,c=s.plus(d.times(n)),s=n,n=t,t=u.minus(d.times(n)),u=n;return n=J(e.minus(r),i,0,1,1),s=s.plus(n.times(c)),r=r.plus(n.times(i)),s.s=c.s=m.s,f=J(c,i,o,1).minus(m).abs().cmp(J(s,r,o,1).minus(m).abs())<1?[c,i]:[s,r],p.precision=l,A=!0,f};_.toHexadecimal=_.toHex=function(e,t){return pi(this,16,e,t)};_.toNearest=function(e,t){var r=this,i=r.constructor;if(r=new i(r),e==null){if(!r.d)return r;e=new i(1),t=i.rounding}else{if(e=new i(e),t===void 0?t=i.rounding:me(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(A=!1,r=J(r,e,0,t,1).times(e),A=!0,O(r)):(e.s=r.s,r=e),r};_.toNumber=function(){return+this};_.toOctal=function(e,t){return pi(this,8,e,t)};_.toPower=_.pow=function(e){var t,r,i,n,o,a,u=this,s=u.constructor,c=+(e=new s(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new s(ne(+u,c));if(u=new s(u),u.eq(1))return u;if(i=s.precision,o=s.rounding,e.eq(1))return O(u,i,o);if(t=se(e.e/U),t>=e.d.length-1&&(r=c<0?-c:c)<=wp)return n=zu(s,u,r,i),e.s<0?new s(1).div(n):O(n,i,o);if(a=u.s,a<0){if(t<e.d.length-1)return new s(NaN);if((e.d[t]&1)==0&&(a=1),u.e==0&&u.d[0]==1&&u.d.length==1)return u.s=a,u}return r=ne(+u,c),t=r==0||!isFinite(r)?se(c*(Math.log("0."+oe(u.d))/Math.LN10+u.e+1)):new s(r+"").e,t>s.maxE+1||t<s.minE-1?new s(t>0?a/0:0):(A=!1,s.rounding=u.s=1,r=Math.min(12,(t+"").length),n=Xr(e.times(Ze(u,i+r)),i),n.d&&(n=O(n,i+5,1),Et(n.d,i,o)&&(t=i+10,n=O(Xr(e.times(Ze(u,t+r)),t),t+5,1),+oe(n.d).slice(i+1,i+15)+1==1e14&&(n=O(n,i+1,0)))),n.s=a,A=!0,s.rounding=o,O(n,i,o))};_.toPrecision=function(e,t){var r,i=this,n=i.constructor;return e===void 0?r=Ue(i,i.e<=n.toExpNeg||i.e>=n.toExpPos):(me(e,1,Ke),t===void 0?t=n.rounding:me(t,0,8),i=O(new n(i),e,t),r=Ue(i,e<=i.e||i.e<=n.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+r:r};_.toSignificantDigits=_.toSD=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(me(e,1,Ke),t===void 0?t=i.rounding:me(t,0,8)),O(new i(r),e,t)};_.toString=function(){var e=this,t=e.constructor,r=Ue(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};_.truncated=_.trunc=function(){return O(new this.constructor(this),this.e+1,1)};_.valueOf=_.toJSON=function(){var e=this,t=e.constructor,r=Ue(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function oe(e){var t,r,i,n=e.length-1,o="",a=e[0];if(n>0){for(o+=a,t=1;t<n;t++)i=e[t]+"",r=U-i.length,r&&(o+=Ce(r)),o+=i;a=e[t],i=a+"",r=U-i.length,r&&(o+=Ce(r))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}function me(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Re+e)}function Et(e,t,r,i){var n,o,a,u;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=U,n=0):(n=Math.ceil((t+1)/U),t%=U),o=ne(10,U-t),u=e[n]%o|0,i==null?t<3?(t==0?u=u/100|0:t==1&&(u=u/10|0),a=r<4&&u==99999||r>3&&u==49999||u==5e4||u==0):a=(r<4&&u+1==o||r>3&&u+1==o/2)&&(e[n+1]/o/100|0)==ne(10,t-2)-1||(u==o/2||u==0)&&(e[n+1]/o/100|0)==0:t<4?(t==0?u=u/1e3|0:t==1?u=u/100|0:t==2&&(u=u/10|0),a=(i||r<4)&&u==9999||!i&&r>3&&u==4999):a=((i||r<4)&&u+1==o||!i&&r>3&&u+1==o/2)&&(e[n+1]/o/1e3|0)==ne(10,t-3)-1,a}function vn(e,t,r){for(var i,n=[0],o,a=0,u=e.length;a<u;){for(o=n.length;o--;)n[o]*=t;for(n[0]+=qr.indexOf(e.charAt(a++)),i=0;i<n.length;i++)n[i]>r-1&&(n[i+1]===void 0&&(n[i+1]=0),n[i+1]+=n[i]/r|0,n[i]%=r)}return n.reverse()}function kp(e,t){var r,i,n;if(t.isZero())return t;i=t.d.length,i<32?(r=Math.ceil(i/3),n=(1/Mn(4,r)).toString()):(r=16,n="2.3283064365386962890625e-10"),e.precision+=r,t=lt(e,1,t.times(n),new e(1));for(var o=r;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=r,t}var J=(function(){function e(i,n,o){var a,u=0,s=i.length;for(i=i.slice();s--;)a=i[s]*n+u,i[s]=a%o|0,u=a/o|0;return u&&i.unshift(u),i}function t(i,n,o,a){var u,s;if(o!=a)s=o>a?1:-1;else for(u=s=0;u<o;u++)if(i[u]!=n[u]){s=i[u]>n[u]?1:-1;break}return s}function r(i,n,o,a){for(var u=0;o--;)i[o]-=u,u=i[o]<n[o]?1:0,i[o]=u*a+i[o]-n[o];for(;!i[0]&&i.length>1;)i.shift()}return function(i,n,o,a,u,s){var c,l,d,f,m,h,p,v,w,E,T,z,M,R,Q,te,Y,Te,ue,We,Ae=i.constructor,it=i.s==n.s?1:-1,ee=i.d,F=n.d;if(!ee||!ee[0]||!F||!F[0])return new Ae(!i.s||!n.s||(ee?F&&ee[0]==F[0]:!F)?NaN:ee&&ee[0]==0||!F?it*0:it/0);for(s?(m=1,l=i.e-n.e):(s=xe,m=U,l=se(i.e/m)-se(n.e/m)),ue=F.length,Y=ee.length,w=new Ae(it),E=w.d=[],d=0;F[d]==(ee[d]||0);d++);if(F[d]>(ee[d]||0)&&l--,o==null?(R=o=Ae.precision,a=Ae.rounding):u?R=o+(i.e-n.e)+1:R=o,R<0)E.push(1),h=!0;else{if(R=R/m+2|0,d=0,ue==1){for(f=0,F=F[0],R++;(d<Y||f)&&R--;d++)Q=f*s+(ee[d]||0),E[d]=Q/F|0,f=Q%F|0;h=f||d<Y}else{for(f=s/(F[0]+1)|0,f>1&&(F=e(F,f,s),ee=e(ee,f,s),ue=F.length,Y=ee.length),te=ue,T=ee.slice(0,ue),z=T.length;z<ue;)T[z++]=0;We=F.slice(),We.unshift(0),Te=F[0],F[1]>=s/2&&++Te;do f=0,c=t(F,T,ue,z),c<0?(M=T[0],ue!=z&&(M=M*s+(T[1]||0)),f=M/Te|0,f>1?(f>=s&&(f=s-1),p=e(F,f,s),v=p.length,z=T.length,c=t(p,T,v,z),c==1&&(f--,r(p,ue<v?We:F,v,s))):(f==0&&(c=f=1),p=F.slice()),v=p.length,v<z&&p.unshift(0),r(T,p,z,s),c==-1&&(z=T.length,c=t(F,T,ue,z),c<1&&(f++,r(T,ue<z?We:F,z,s))),z=T.length):c===0&&(f++,T=[0]),E[d++]=f,c&&T[0]?T[z++]=ee[te]||0:(T=[ee[te]],z=1);while((te++<Y||T[0]!==void 0)&&R--);h=T[0]!==void 0}E[0]||E.shift()}if(m==1)w.e=l,wu=h;else{for(d=1,f=E[0];f>=10;f/=10)d++;w.e=d+l*m-1,O(w,u?o+w.e+1:o,a,h)}return w}})();function O(e,t,r,i){var n,o,a,u,s,c,l,d,f,m=e.constructor;e:if(t!=null){if(d=e.d,!d)return e;for(n=1,u=d[0];u>=10;u/=10)n++;if(o=t-n,o<0)o+=U,a=t,l=d[f=0],s=l/ne(10,n-a-1)%10|0;else if(f=Math.ceil((o+1)/U),u=d.length,f>=u)if(i){for(;u++<=f;)d.push(0);l=s=0,n=1,o%=U,a=o-U+1}else break e;else{for(l=u=d[f],n=1;u>=10;u/=10)n++;o%=U,a=o-U+n,s=a<0?0:l/ne(10,n-a-1)%10|0}if(i=i||t<0||d[f+1]!==void 0||(a<0?l:l%ne(10,n-a-1)),c=r<4?(s||i)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||i||r==6&&(o>0?a>0?l/ne(10,n-a):0:d[f-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,c?(t-=e.e+1,d[0]=ne(10,(U-t%U)%U),e.e=-t||0):d[0]=e.e=0,e;if(o==0?(d.length=f,u=1,f--):(d.length=f+1,u=ne(10,U-o),d[f]=a>0?(l/ne(10,n-a)%ne(10,a)|0)*u:0),c)for(;;)if(f==0){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=u,u=1;a>=10;a/=10)u++;o!=u&&(e.e++,d[0]==xe&&(d[0]=1));break}else{if(d[f]+=u,d[f]!=xe)break;d[f--]=0,u=1}for(o=d.length;d[--o]===0;)d.pop()}return A&&(e.e>m.maxE?(e.d=null,e.e=NaN):e.e<m.minE&&(e.e=0,e.d=[0])),e}function Ue(e,t,r){if(!e.isFinite())return Ou(e);var i,n=e.e,o=oe(e.d),a=o.length;return t?(r&&(i=r-a)>0?o=o.charAt(0)+"."+o.slice(1)+Ce(i):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):n<0?(o="0."+Ce(-n-1)+o,r&&(i=r-a)>0&&(o+=Ce(i))):n>=a?(o+=Ce(n+1-a),r&&(i=r-n-1)>0&&(o=o+"."+Ce(i))):((i=n+1)<a&&(o=o.slice(0,i)+"."+o.slice(i)),r&&(i=r-a)>0&&(n+1===a&&(o+="."),o+=Ce(i))),o}function Zn(e,t){var r=e[0];for(t*=U;r>=10;r/=10)t++;return t}function kn(e,t,r){if(t>Sp)throw A=!0,r&&(e.precision=r),Error(Su);return O(new e(wn),t,1,!0)}function Ee(e,t,r){if(t>Hr)throw Error(Su);return O(new e(Sn),t,r,!0)}function Tu(e){var t=e.length-1,r=t*U+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ce(e){for(var t="";e--;)t+="0";return t}function zu(e,t,r,i){var n,o=new e(1),a=Math.ceil(i/U+4);for(A=!1;;){if(r%2&&(o=o.times(t),Ea(o.d,a)&&(n=!0)),r=se(r/2),r===0){r=o.d.length-1,n&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Ea(t.d,a)}return A=!0,o}function za(e){return e.d[e.d.length-1]&1}function Eu(e,t,r){for(var i,n,o=new e(t[0]),a=0;++a<t.length;){if(n=new e(t[a]),!n.s){o=n;break}i=o.cmp(n),(i===r||i===0&&o.s===r)&&(o=n)}return o}function Xr(e,t){var r,i,n,o,a,u,s,c=0,l=0,d=0,f=e.constructor,m=f.rounding,h=f.precision;if(!e.d||!e.d[0]||e.e>17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(A=!1,s=h):s=t,u=new f(.03125);e.e>-2;)e=e.times(u),d+=5;for(i=Math.log(ne(2,d))/Math.LN10*2+5|0,s+=i,r=o=a=new f(1),f.precision=s;;){if(o=O(o.times(e),s,1),r=r.times(++l),u=a.plus(J(o,r,s,1)),oe(u.d).slice(0,s)===oe(a.d).slice(0,s)){for(n=d;n--;)a=O(a.times(a),s,1);if(t==null)if(c<3&&Et(a.d,s-i,m,c))f.precision=s+=10,r=o=u=new f(1),l=0,c++;else return O(a,f.precision=h,m,A=!0);else return f.precision=h,a}a=u}}function Ze(e,t){var r,i,n,o,a,u,s,c,l,d,f,m=1,h=10,p=e,v=p.d,w=p.constructor,E=w.rounding,T=w.precision;if(p.s<0||!v||!v[0]||!p.e&&v[0]==1&&v.length==1)return new w(v&&!v[0]?-1/0:p.s!=1?NaN:v?0:p);if(t==null?(A=!1,l=T):l=t,w.precision=l+=h,r=oe(v),i=r.charAt(0),Math.abs(o=p.e)<15e14){for(;i<7&&i!=1||i==1&&r.charAt(1)>3;)p=p.times(e),r=oe(p.d),i=r.charAt(0),m++;o=p.e,i>1?(p=new w("0."+r),o++):p=new w(i+"."+r.slice(1))}else return c=kn(w,l+2,T).times(o+""),p=Ze(new w(i+"."+r.slice(1)),l-h).plus(c),w.precision=T,t==null?O(p,T,E,A=!0):p;for(d=p,s=a=p=J(p.minus(1),p.plus(1),l,1),f=O(p.times(p),l,1),n=3;;){if(a=O(a.times(f),l,1),c=s.plus(J(a,new w(n),l,1)),oe(c.d).slice(0,l)===oe(s.d).slice(0,l))if(s=s.times(2),o!==0&&(s=s.plus(kn(w,l+2,T).times(o+""))),s=J(s,new w(m),l,1),t==null)if(Et(s.d,l-h,E,u))w.precision=l+=h,c=a=p=J(d.minus(1),d.plus(1),l,1),f=O(p.times(p),l,1),n=u=1;else return O(s,w.precision=T,E,A=!0);else return w.precision=T,s;s=c,n+=2}}function Ou(e){return String(e.s*e.s/0)}function bn(e,t){var r,i,n;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(r<0&&(r=i),r+=+t.slice(i+1),t=t.substring(0,i)):r<0&&(r=t.length),i=0;t.charCodeAt(i)===48;i++);for(n=t.length;t.charCodeAt(n-1)===48;--n);if(t=t.slice(i,n),t){if(n-=i,e.e=r=r-i-1,e.d=[],i=(r+1)%U,r<0&&(i+=U),i<n){for(i&&e.d.push(+t.slice(0,i)),n-=U;i<n;)e.d.push(+t.slice(i,i+=U));t=t.slice(i),i=U-t.length}else i-=n;for(;i--;)t+="0";e.d.push(+t),A&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function Ip(e,t){var r,i,n,o,a,u,s,c,l;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),xu.test(t))return bn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(yp.test(t))r=16,t=t.toLowerCase();else if(_p.test(t))r=2;else if($p.test(t))r=8;else throw Error(Re+t);for(o=t.search(/p/i),o>0?(s=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),a=o>=0,i=e.constructor,a&&(t=t.replace(".",""),u=t.length,o=u-o,n=zu(i,new i(r),o,o*2)),c=vn(t,r,xe),l=c.length-1,o=l;c[o]===0;--o)c.pop();return o<0?new i(e.s*0):(e.e=Zn(c,l),e.d=c,A=!1,a&&(e=J(e,n,u*4)),s&&(e=e.times(Math.abs(s)<54?ne(2,s):Pt.pow(2,s))),A=!0,e)}function xp(e,t){var r,i=t.d.length;if(i<3)return t.isZero()?t:lt(e,2,t,t);r=1.4*Math.sqrt(i),r=r>16?16:r|0,t=t.times(1/Mn(5,r)),t=lt(e,2,t,t);for(var n,o=new e(5),a=new e(16),u=new e(20);r--;)n=t.times(t),t=t.times(o.plus(n.times(a.times(n).minus(u))));return t}function lt(e,t,r,i,n){var o,a,u,s,c=e.precision,l=Math.ceil(c/U);for(A=!1,s=r.times(r),u=new e(i);;){if(a=J(u.times(s),new e(t++*t++),c,1),u=n?i.plus(a):i.minus(a),i=J(a.times(s),new e(t++*t++),c,1),a=u.plus(i),a.d[l]!==void 0){for(o=l;a.d[o]===u.d[o]&&o--;);if(o==-1)break}o=u,u=i,i=a,a=o}return A=!0,a.d.length=l+1,a}function Mn(e,t){for(var r=e;--t;)r*=e;return r}function Uu(e,t){var r,i=t.s<0,n=Ee(e,e.precision,1),o=n.times(.5);if(t=t.abs(),t.lte(o))return Ne=i?4:1,t;if(r=t.divToInt(n),r.isZero())Ne=i?3:2;else{if(t=t.minus(r.times(n)),t.lte(o))return Ne=za(r)?i?2:3:i?4:1,t;Ne=za(r)?i?1:4:i?3:2}return t.minus(n).abs()}function pi(e,t,r,i){var n,o,a,u,s,c,l,d,f,m=e.constructor,h=r!==void 0;if(h?(me(r,1,Ke),i===void 0?i=m.rounding:me(i,0,8)):(r=m.precision,i=m.rounding),!e.isFinite())l=Ou(e);else{for(l=Ue(e),a=l.indexOf("."),h?(n=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):n=t,a>=0&&(l=l.replace(".",""),f=new m(1),f.e=l.length-a,f.d=vn(Ue(f),10,n),f.e=f.d.length),d=vn(l,10,n),o=s=d.length;d[--s]==0;)d.pop();if(!d[0])l=h?"0p+0":"0";else{if(a<0?o--:(e=new m(e),e.d=d,e.e=o,e=J(e,f,r,i,0,n),d=e.d,o=e.e,c=wu),a=d[r],u=n/2,c=c||d[r+1]!==void 0,c=i<4?(a!==void 0||c)&&(i===0||i===(e.s<0?3:2)):a>u||a===u&&(i===4||c||i===6&&d[r-1]&1||i===(e.s<0?8:7)),d.length=r,c)for(;++d[--r]>n-1;)d[r]=0,r||(++o,d.unshift(1));for(s=d.length;!d[s-1];--s);for(a=0,l="";a<s;a++)l+=qr.charAt(d[a]);if(h){if(s>1)if(t==16||t==8){for(a=t==16?4:3,--s;s%a;s++)l+="0";for(d=vn(l,n,t),s=d.length;!d[s-1];--s);for(a=1,l="1.";a<s;a++)l+=qr.charAt(d[a])}else l=l.charAt(0)+"."+l.slice(1);l=l+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)l="0"+l;l="0."+l}else if(++o>s)for(o-=s;o--;)l+="0";else o<s&&(l=l.slice(0,o)+"."+l.slice(o))}l=(t==16?"0x":t==2?"0b":t==8?"0o":"")+l}return e.s<0?"-"+l:l}function Ea(e,t){if(e.length>t)return e.length=t,!0}function Tp(e){return new this(e).abs()}function zp(e){return new this(e).acos()}function Ep(e){return new this(e).acosh()}function Op(e,t){return new this(e).plus(t)}function Up(e){return new this(e).asin()}function Dp(e){return new this(e).asinh()}function Np(e){return new this(e).atan()}function jp(e){return new this(e).atanh()}function Pp(e,t){e=new this(e),t=new this(t);var r,i=this.precision,n=this.rounding,o=i+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=Ee(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?Ee(this,i,n):new this(0),r.s=e.s):!e.d||t.isZero()?(r=Ee(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(J(e,t,o,1)),t=Ee(this,o,1),this.precision=i,this.rounding=n,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(J(e,t,o,1)),r}function Ap(e){return new this(e).cbrt()}function Lp(e){return O(e=new this(e),e.e+1,2)}function Cp(e,t,r){return new this(e).clamp(t,r)}function Zp(e){if(!e||typeof e!="object")throw Error(Cn+"Object expected");var t,r,i,n=e.defaults===!0,o=["precision",1,Ke,"rounding",0,8,"toExpNeg",-ut,0,"toExpPos",0,ut,"maxE",0,ut,"minE",-ut,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(r=o[t],n&&(this[r]=Wr[r]),(i=e[r])!==void 0)if(se(i)===i&&i>=o[t+1]&&i<=o[t+2])this[r]=i;else throw Error(Re+r+": "+i);if(r="crypto",n&&(this[r]=Wr[r]),(i=e[r])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(ku);else this[r]=!1;else throw Error(Re+r+": "+i);return this}function Mp(e){return new this(e).cos()}function Rp(e){return new this(e).cosh()}function Du(e){var t,r,i;function n(o){var a,u,s,c=this;if(!(c instanceof n))return new n(o);if(c.constructor=n,Oa(o)){c.s=o.s,A?!o.d||o.e>n.maxE?(c.e=NaN,c.d=null):o.e<n.minE?(c.e=0,c.d=[0]):(c.e=o.e,c.d=o.d.slice()):(c.e=o.e,c.d=o.d?o.d.slice():o.d);return}if(s=typeof o,s==="number"){if(o===0){c.s=1/o<0?-1:1,c.e=0,c.d=[0];return}if(o<0?(o=-o,c.s=-1):c.s=1,o===~~o&&o<1e7){for(a=0,u=o;u>=10;u/=10)a++;A?a>n.maxE?(c.e=NaN,c.d=null):a<n.minE?(c.e=0,c.d=[0]):(c.e=a,c.d=[o]):(c.e=a,c.d=[o]);return}if(o*0!==0){o||(c.s=NaN),c.e=NaN,c.d=null;return}return bn(c,o.toString())}if(s==="string")return(u=o.charCodeAt(0))===45?(o=o.slice(1),c.s=-1):(u===43&&(o=o.slice(1)),c.s=1),xu.test(o)?bn(c,o):Ip(c,o);if(s==="bigint")return o<0?(o=-o,c.s=-1):c.s=1,bn(c,o.toString());throw Error(Re+o)}if(n.prototype=_,n.ROUND_UP=0,n.ROUND_DOWN=1,n.ROUND_CEIL=2,n.ROUND_FLOOR=3,n.ROUND_HALF_UP=4,n.ROUND_HALF_DOWN=5,n.ROUND_HALF_EVEN=6,n.ROUND_HALF_CEIL=7,n.ROUND_HALF_FLOOR=8,n.EUCLID=9,n.config=n.set=Zp,n.clone=Du,n.isDecimal=Oa,n.abs=Tp,n.acos=zp,n.acosh=Ep,n.add=Op,n.asin=Up,n.asinh=Dp,n.atan=Np,n.atanh=jp,n.atan2=Pp,n.cbrt=Ap,n.ceil=Lp,n.clamp=Cp,n.cos=Mp,n.cosh=Rp,n.div=Fp,n.exp=Vp,n.floor=Bp,n.hypot=Kp,n.ln=Jp,n.log=Gp,n.log10=Wp,n.log2=qp,n.max=Hp,n.min=Xp,n.mod=Yp,n.mul=Qp,n.pow=eh,n.random=th,n.round=nh,n.sign=rh,n.sin=ih,n.sinh=oh,n.sqrt=ah,n.sub=uh,n.sum=ch,n.tan=sh,n.tanh=lh,n.trunc=dh,e===void 0&&(e={}),e&&e.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<i.length;)e.hasOwnProperty(r=i[t++])||(e[r]=this[r]);return n.config(e),n}function Fp(e,t){return new this(e).div(t)}function Vp(e){return new this(e).exp()}function Bp(e){return O(e=new this(e),e.e+1,3)}function Kp(){var e,t,r=new this(0);for(A=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return A=!0,new this(1/0);r=t}return A=!0,r.sqrt()}function Oa(e){return e instanceof Pt||e&&e.toStringTag===Iu||!1}function Jp(e){return new this(e).ln()}function Gp(e,t){return new this(e).log(t)}function qp(e){return new this(e).log(2)}function Wp(e){return new this(e).log(10)}function Hp(){return Eu(this,arguments,-1)}function Xp(){return Eu(this,arguments,1)}function Yp(e,t){return new this(e).mod(t)}function Qp(e,t){return new this(e).mul(t)}function eh(e,t){return new this(e).pow(t)}function th(e){var t,r,i,n,o=0,a=new this(1),u=[];if(e===void 0?e=this.precision:me(e,1,Ke),i=Math.ceil(e/U),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));o<i;)n=t[o],n>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:u[o++]=n%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=4);o<i;)n=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((t[o+3]&127)<<24),n>=214e7?crypto.randomBytes(4).copy(t,o):(u.push(n%1e7),o+=4);o=i/4}else throw Error(ku);else for(;o<i;)u[o++]=Math.random()*1e7|0;for(i=u[--o],e%=U,i&&e&&(n=ne(10,U-e),u[o]=(i/n|0)*n);u[o]===0;o--)u.pop();if(o<0)r=0,u=[0];else{for(r=-1;u[0]===0;r-=U)u.shift();for(i=1,n=u[0];n>=10;n/=10)i++;i<U&&(r-=U-i)}return a.e=r,a.d=u,a}function nh(e){return O(e=new this(e),e.e+1,this.rounding)}function rh(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function ih(e){return new this(e).sin()}function oh(e){return new this(e).sinh()}function ah(e){return new this(e).sqrt()}function uh(e,t){return new this(e).sub(t)}function ch(){var e=0,t=arguments,r=new this(t[e]);for(A=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return A=!0,O(r,this.precision,this.rounding)}function sh(e){return new this(e).tan()}function lh(e){return new this(e).tanh()}function dh(e){return O(e=new this(e),e.e+1,1)}_[Symbol.for("nodejs.util.inspect.custom")]=_.toString;_[Symbol.toStringTag]="Decimal";var Pt=_.constructor=Du(Wr);wn=new Pt(wn);Sn=new Pt(Sn);class ze{static formatToTimecode(t,r,i=!1,n=!1){let o=new Pt(r),a,u=o.round();a=o.mul(t).floor();let s,c,l,d,f=u.mul(86400),m=a.mod(f),h=u.mul(3600),p=u.mul(60);return d=m.divToInt(h),m=m.minus(d.mul(h)),l=m.divToInt(p),m=m.minus(l.mul(p)),c=m.divToInt(u),s=m.minus(c.mul(u)),ze.formatTimecodeText(d.toNumber(),l.toNumber(),c.toNumber(),s.toNumber(),i,n)}static formatTimecodeText(t,r,i,n,o=!1,a=!1){let u=a?".":o?";":":";return`${ze.padZero(t)}:${ze.padZero(r)}:${ze.padZero(i)}${u}${ze.padZero(n)}`}static padZero(t){return t<10?`0${t}`:`${t}`}}class fh{static resolveFrameRateValueFromFraction(t){return 30}}const ke=class ke{static parseTimeMoment(t){const[r,i]=t.split(":").map(Number);return[r,i]}static parseTimeRange(t){const r=t.match(this.timeRangePattern);if(!r)throw new Error("Not valid timerange: "+t);const i=r[1]==="[",n=r[5]==="]",o=r[2]?this.parseTimeMoment(r[2]):void 0,a=r[4]?this.parseTimeMoment(r[4]):void 0;return{start:o,end:a,isStartInclusive:i,isEndInclusive:n}}static timeMomentToSeconds(t){return ke.timeMomentToMilliseconds(t)/1e3}static timeMomentToMilliseconds(t){return t[0]*1e3+t[1]/1e6}static timeMomentToDate(t){const i=t[0]*1e3+t[1]/1e6;return new Date(i)}static formatTimeMomentToTimecodeText(t,r,i=!1){let n=fh.resolveFrameRateValueFromFraction(r);return ze.formatToTimecode(ke.timeMomentToSeconds(t),n,i)}static formatTimerangeToTimecodeText(t,r,i=!1){let n=ke.parseTimeRange(t),o=n.start?ke.formatTimeMomentToTimecodeText(n.start,r,i):"?",a=n.end?ke.formatTimeMomentToTimecodeText(n.end,r,i):"?";return`${o} - ${a}`}static nanosecondsToSeconds(t){return t/1e9}static nanosecondsToTimeMoment(t){const r=Math.floor(t/1e9),i=Math.ceil(t%1e9);return[r,i]}static secondsToTimeMoment(t){return this.nanosecondsToTimeMoment(t*1e9)}static timerangeExprDuration(t){return this.timeRangeDuration(this.parseTimeRange(t))}static timeRangeDuration(t){const{start:r,end:i}=t;if(r===void 0||i===void 0)return 0;{const n=i[0]-r[0],o=i[1]-r[1],a=n+o/1e9;return parseFloat(a.toFixed(3))}}static formatTimeMomentExpr(t){return`${t[0]}:${t[1]}`}static formatNanosecondsToTimeMomentExpr(t){return this.formatTimeMomentExpr(this.nanosecondsToTimeMoment(t))}static toTimeRange(t,r,i=!0,n=!0){return{start:t,end:r,isStartInclusive:i,isEndInclusive:n}}static formatTimeRangeExpr(t){const r=t.isStartInclusive?"[":"(",i=t.isEndInclusive?"]":")",n=t.start?`${t.start[0]}:${t.start[1]}`:"",o=t.end?`${t.end[0]}:${t.end[1]}`:"";return`${r}${n}_${o}${i}`}static timerangeDuration(t){let r=ke.parseTimeRange(t);if(r.start===void 0||r.end===void 0)return 1/0;{let i=ke.timeMomentToSeconds(r.start);return ke.timeMomentToSeconds(r.end)-i}}static padZero(t){return t<10?`0${t}`:`${t}`}};ke.timeRangePattern=/^(\[|\()?(-?\d+:\d+)?(_(-?\d+:\d+)?)?(\]|\))?$/;let P=ke;function mh(e){return`subtitles-${e}`}function ph(e,t,r){const i=e.filter(f=>t.get(f.id).length>0).map(f=>{const m=t.get(f.id);let h,p=!1;if(f.format==="urn:x-nmos:format:video"){const v=f.essence_parameters.frame_rate;v&&(h=v.numerator/(v.denominator??1),(v.numerator===6e4||v.numerator===3e4)&&v.denominator===1001&&(p=!0))}return{start:P.timeMomentToSeconds(P.parseTimeRange(m.at(0).timerange).start),frameRate:h,dropFrame:p}}).sort((f,m)=>f.start-m.start),n=i.find(f=>f.frameRate!==void 0),o=(n==null?void 0:n.start)??i.at(0).start,a=new Date(o*1e3),u=Math.max(a.getUTCHours()+(r??0),0),s=a.getUTCMinutes(),c=a.getUTCSeconds(),l=a.getUTCMilliseconds(),d=u*3600+s*60+c+l/1e3;return n===void 0?{ffom:ze.formatToTimecode(d,100,!1,!0),mediaStartTime:o,frameRate:100,dropFrame:!1}:{ffom:ze.formatToTimecode(d,n.frameRate,n.dropFrame),mediaStartTime:n.start,frameRate:n.frameRate,dropFrame:n.dropFrame}}function Nu(e){return Pu(e)}function ju(e){return Pu(e)}function Pu(e){var r;const t=(r=e.tags)==null?void 0:r.hls_name;return t?Array.isArray(t)?t.length?t.at(0):"":t:e.description?e.description:""}class hh{constructor(t=3,r=!1){this.targetDuration=null,this.mediaSequence=null,this.programDateTime=null,this.playlistType=null,this.streams=[],this.media=[],this.segments=[],this.endList=!1,this.version=t,this.independentSegments=r}}class Yr{constructor(t,r,i,n,o){this.bandwidth=t,this.averageBandwidth=r,this.resolution=i,this.frameRate=n,this.uri=o}}class gh{constructor(t,r,i,n,o,a,u){this.type=t,this.groupId=r,this.name=i,this.isDefault=n,this.autoSelect=o,this.channels=a,this.uri=u}}class Ua{constructor(t,r){this.duration=t,this.uri=r}}class Da{constructor(){this.playlist=new hh}setVersion(t){return this.playlist.version=t,this}setIndependentSegments(t){return this.playlist.independentSegments=t,this}setTargetDuration(t){return this.playlist.targetDuration=t,this}setMediaSequence(t){return this.playlist.mediaSequence=t,this}setProgramDateTime(t){return this.playlist.programDateTime=t,this}setPlaylistType(t){return this.playlist.playlistType=t,this}addStreamInfo(t){return this.playlist.streams.push(t),this}addMedia(t){return this.playlist.media.push(t),this}addSegment(t,r=!1){const i={...t,gap:r};return this.playlist.segments.push(i),this}setEndList(){return this.playlist.endList=!0,this}setStartOffset(t){return this.playlist.startOffset=t,this}build(){return this.playlist}}class Na{static write(t){let r=`#EXTM3U
|
|
8
8
|
`;return r+=`#EXT-X-VERSION:${t.version}
|
|
9
9
|
`,t.independentSegments&&(r+=`#EXT-X-INDEPENDENT-SEGMENTS
|
|
10
10
|
`),t.targetDuration!==null&&(r+=`#EXT-X-TARGETDURATION:${t.targetDuration}
|
|
@@ -19,71 +19,71 @@ ${i.uri}`),r+=`
|
|
|
19
19
|
`),r+=`#EXTINF:${i.duration},
|
|
20
20
|
${i.uri}
|
|
21
21
|
`}),t.endList&&(r+=`#EXT-X-ENDLIST
|
|
22
|
-
`),r}}function yh(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 Na().setVersion(10).setIndependentSegments(t.independentSegments);let c=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:z}=e[m];let T=p.targetDuration;T===void 0&&(T=Math.max(...g.map(ne=>ne.duration),1));const A=new Na().setVersion(p.version??3).setIndependentSegments(p.independentSegments??!0).setTargetDuration(Math.ceil(T));p.programDateTime&&A.setProgramDateTime(p.programDateTime),p.playlistType&&A.setPlaylistType(p.playlistType),g.forEach(ne=>A.addSegment(ne,ne.uri==="http://byomakase.org/non-playable-gap")),A.setEndList();const L=A.build(),R=ja.write(L),le=new Blob([R],{type:"application/vnd.apple.mpegurl"}),X=URL.createObjectURL(le);if(v&&!w){const ne=new Yr(v.bandwidth,v.averageBandwidth,v.resolution,v.frameRate,X);r.set(z??(r.size+1).toString(),X),a.addStreamInfo(ne)}else if(w){const ne=new bh(w.type,w.groupId??w.type.toLowerCase(),w.name??"",w.isDefault,w.autoSelect,w.channels,X);if(w.type==="AUDIO"?i.set(z??w.name??(i.size+1).toString(),X):w.type!=="VIDEO"&&n.set(z??w.name??(n.size+1).toString(),X),a.addMedia(ne),!c&&w.type==="AUDIO"&&!s){const be=new Yr((v==null?void 0:v.bandwidth)??0,(v==null?void 0:v.averageBandwidth)??0,null,null,X);a.addStreamInfo(be),s=!0}}}const u=a.build(),l=ja.write(u),d=new Blob([l],{type:"application/vnd.apple.mpegurl"});return{url:URL.createObjectURL(d),video:r,audio:i,text:n}}function Cc(e){return e===void 0?e:e.flatMap((t,r)=>{var c;if(e.length-1===r)return[t];const i=e.at(r+1),n=N.timeMomentToSeconds(N.parseTimeRange(t.timerange).end),o=N.timeMomentToSeconds(N.parseTimeRange(i.timerange).start);if(Math.abs(n-o)<.001)return[t];const a=N.toTimeRange(N.secondsToTimeMoment(n),N.secondsToTimeMoment(o),!0,!1);return[t,{timerange:N.formatTimeRangeExpr(a),ts_offset:t.ts_offset,get_urls:(c=t.get_urls)==null?void 0:c.map(()=>"http://byomakase.org/non-playable-gap"),object_id:"non-playable-gap"}]})}function Zc(e){return e&&e.map((t,r)=>{if(e.length-1===r)return t;const i=e.at(r+1),n=N.timeMomentToSeconds(N.parseTimeRange(t.timerange).start),o=N.timeMomentToSeconds(N.parseTimeRange(i.timerange).start),a=N.toTimeRange(N.secondsToTimeMoment(n),N.secondsToTimeMoment(o),!0,!1);return{...t,timerange:N.formatTimeRangeExpr(a)}})}function Pa(e){return{width:e.frame_width,height:e.frame_height}}function Aa(e){return e.frame_rate?e.frame_rate.denominator?e.frame_rate.numerator/e.frame_rate.denominator:e.frame_rate.numerator:null}function _h(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 Mc(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,c=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&&!c)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 Rc(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,u,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=Cc(u))==null?void 0:g.map(v=>{var z,T;const w=N.timerangeExprDuration(v.timerange);return new Da(w,((T=(z=v.get_urls)==null?void 0:z.at(-1))==null?void 0:T.url)??"http://byomakase.org/non-playable-gap")}))??[]:d=((p=Zc(u))==null?void 0:p.map(v=>{var z,T;const w=N.timerangeExprDuration(v.timerange);return new Da(w,((T=(z=v.get_urls)==null?void 0:z.at(-1))==null?void 0:T.url)??"http://byomakase.org/non-playable-gap")}))??[];const f=Math.max(...d.map(v=>v.duration),1),m={playlistType:"VOD",targetDuration:Math.ceil(f),version:3,independentSegments:!0};if(s.format==="urn:x-nmos:format:video"){const w=s.essence_parameters,z=Pa(w),T=Aa(w),A=new Yr(s.max_bit_rate??s.avg_bit_rate??0,s.avg_bit_rate??0,z,T,"");i.push({segments:d,metadata:m,streamInfo:A})}else if(s.format==="urn:x-nmos:format:audio"){const w=s.essence_parameters,z={type:"AUDIO",groupId:"audio",name:Pc(s),isDefault:(o==null?void 0:o.id)===s.id,autoSelect:!0,channels:w.channels.toString()},T={bandwidth:s.avg_bit_rate??0,averageBandwidth:s.avg_bit_rate??0,resolution:null,frameRate:null,uri:""};i.push({segments:d,metadata:m,mediaInfo:z,streamInfo:T,id:s.id})}else if(s.format==="urn:x-nmos:format:multi"){const v=l==null?void 0:l.find(L=>L.format==="urn:x-nmos:format:video"),w=v?Pa(v.essence_parameters):null,z=v?Aa(v.essence_parameters):null,T=_h(l??[]),A={bandwidth:T.maxBitRate,averageBandwidth:T.averageBitRate,resolution:w,frameRate:z,uri:""};i.push({segments:d,metadata:m,streamInfo:A,id:s.id})}else if(s.format==="urn:x-nmos:format:data"&&s.container==="text/vtt"){const v={type:"SUBTITLES",name:Ac(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 u=r==null?void 0:r.get(s.id);u!=null&&u.length&&a(s,u)}):a(e,r==null?void 0:r.get(e.id),t),yh(i,{independentSegments:!0})}var Qr=function(e,t){return Qr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])},Qr(e,t)};function $t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function $h(e,t,r,i){function n(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function c(l){try{u(i.next(l))}catch(d){a(d)}}function s(l){try{u(i.throw(l))}catch(d){a(d)}}function u(l){l.done?o(l.value):n(l.value).then(c,s)}u((i=i.apply(e,t||[])).next())})}function Fc(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=c(0),a.throw=c(1),a.return=c(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(u){return function(l){return s([u,l])}}function s(u){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(r=0)),r;)try{if(i=1,n&&(o=u[0]&2?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,n=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],n=0}finally{i=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function dt(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ei(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),n,o=[],a;try{for(;(t===void 0||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(c){a={error:c}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}function ti(e,t,r){if(r||arguments.length===2)for(var i=0,n=t.length,o;i<n;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}function ut(e){return this instanceof ut?(this.v=e,this):new ut(e)}function wh(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),c("next"),c("throw"),c("return",a),n[Symbol.asyncIterator]=function(){return this},n;function a(m){return function(g){return Promise.resolve(g).then(m,d)}}function c(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{u(i[m](g))}catch(p){f(o[0][3],p)}}function u(m){m.value instanceof ut?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 Sh(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof dt=="function"?dt(e):e[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(o){r[o]=e[o]&&function(a){return new Promise(function(c,s){a=e[o](a),n(c,s,a.done,a.value)})}}function n(o,a,c,s){Promise.resolve(s).then(function(u){o({value:u,done:c})},a)}}function oe(e){return typeof e=="function"}function hi(e){var t=function(i){Error.call(i),i.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Zr=hi(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
22
|
+
`),r}}function vh(e,t){const r=new Map,i=new Map,n=new Map;if(!e.some(m=>{var h;return m.streamInfo||((h=m.mediaInfo)==null?void 0:h.type)==="AUDIO"}))throw new Error("Can't create an hls manifest without audio or video source");const a=new Da().setVersion(10).setIndependentSegments(t.independentSegments);let u=e.some(({streamInfo:m,mediaInfo:h})=>m&&!h),s=!1;for(let m=0;m<e.length;m++){const{segments:h,metadata:p,streamInfo:v,mediaInfo:w,id:E}=e[m];let T=p.targetDuration;T===void 0&&(T=Math.max(...h.map(Y=>Y.duration),1));const z=new Da().setVersion(p.version??3).setIndependentSegments(p.independentSegments??!0).setTargetDuration(Math.ceil(T));p.programDateTime&&z.setProgramDateTime(p.programDateTime),p.playlistType&&z.setPlaylistType(p.playlistType),h.forEach(Y=>z.addSegment(Y,Y.uri==="http://byomakase.org/non-playable-gap")),z.setEndList();const M=z.build(),R=Na.write(M),Q=new Blob([R],{type:"application/vnd.apple.mpegurl"}),te=URL.createObjectURL(Q);if(v&&!w){const Y=new Yr(v.bandwidth,v.averageBandwidth,v.resolution,v.frameRate,te);r.set(E??(r.size+1).toString(),te),a.addStreamInfo(Y)}else if(w){const Y=new gh(w.type,w.groupId??w.type.toLowerCase(),w.name??"",w.isDefault,w.autoSelect,w.channels,te);if(w.type==="AUDIO"?i.set(E??w.name??(i.size+1).toString(),te):w.type!=="VIDEO"&&n.set(E??w.name??(n.size+1).toString(),te),a.addMedia(Y),!u&&w.type==="AUDIO"&&!s){const Te=new Yr((v==null?void 0:v.bandwidth)??0,(v==null?void 0:v.averageBandwidth)??0,null,null,te);a.addStreamInfo(Te),s=!0}}}const c=a.build(),l=Na.write(c),d=new Blob([l],{type:"application/vnd.apple.mpegurl"});return{url:URL.createObjectURL(d),video:r,audio:i,text:n}}function Au(e){return e===void 0?e:e.flatMap((t,r)=>{var u;if(e.length-1===r)return[t];const i=e.at(r+1),n=P.timeMomentToSeconds(P.parseTimeRange(t.timerange).end),o=P.timeMomentToSeconds(P.parseTimeRange(i.timerange).start);if(Math.abs(n-o)<.001)return[t];const a=P.toTimeRange(P.secondsToTimeMoment(n),P.secondsToTimeMoment(o),!0,!1);return[t,{timerange:P.formatTimeRangeExpr(a),ts_offset:t.ts_offset,get_urls:(u=t.get_urls)==null?void 0:u.map(()=>"http://byomakase.org/non-playable-gap"),object_id:"non-playable-gap"}]})}function Lu(e){return e&&e.map((t,r)=>{if(e.length-1===r)return t;const i=e.at(r+1),n=P.timeMomentToSeconds(P.parseTimeRange(t.timerange).start),o=P.timeMomentToSeconds(P.parseTimeRange(i.timerange).start),a=P.toTimeRange(P.secondsToTimeMoment(n),P.secondsToTimeMoment(o),!0,!1);return{...t,timerange:P.formatTimeRangeExpr(a)}})}function ja(e){return{width:e.frame_width,height:e.frame_height}}function Pa(e){return e.frame_rate?e.frame_rate.denominator?e.frame_rate.numerator/e.frame_rate.denominator:e.frame_rate.numerator:null}function bh(e){return e.reduce((t,r)=>(t.averageBitRate+=r.avg_bit_rate??0,t.maxBitRate+=r.max_bit_rate??0,t),{averageBitRate:0,maxBitRate:0})}function Cu(e,t,r){var i;if(e.format==="urn:x-nmos:format:multi"&&e.container){const n=((t==null?void 0:t.filter(a=>a.format==="urn:x-nmos:format:multi"&&a.container).length)??0)>0,o=(((i=r==null?void 0:r.get(e.id))==null?void 0:i.length)??0)>0;if(n)return{valid:!1,message:"Muxed flow has a muxed child flow as well"};if(!o)return{valid:!1,message:"Muxed flow has no muxed segments"}}if(e.format==="urn:x-nmos:format:multi"&&!e.container){const n=(t==null?void 0:t.filter(s=>s.format==="urn:x-nmos:format:video"))??[],o=(t==null?void 0:t.filter(s=>s.format==="urn:x-nmos:format:audio"))??[],a=n.map(s=>r==null?void 0:r.get(s.id)).filter(s=>s&&s.length>0).length>0,u=o.map(s=>r==null?void 0:r.get(s.id)).filter(s=>s&&s.length>0).length>0;if(!n.length&&!o.length)return{valid:!1,message:"Multiflow has no audio or video subflows"};if(!a&&!u)return{valid:!1,message:"Multiflow's child flows have no segments"}}return(e.format==="urn:x-nmos:format:audio"||e.format==="urn:x-nmos:format:video")&&!((r==null?void 0:r.get(e.id))!==void 0)?{valid:!1,message:"Mono essence flow has no segments"}:e.format!=="urn:x-nmos:format:audio"&&e.format!=="urn:x-nmos:format:multi"&&e.format!=="urn:x-nmos:format:video"?{valid:!1,message:"Playback not possible for flows that are not audio, video or multi"}:{valid:!0}}function Zu(e,t,r){const i=[],n=Math.max(...[e,...t??[]].filter(s=>s.format==="urn:x-nmos:format:audio").map(s=>s.essence_parameters.channels)),o=[e,...t??[]].filter(s=>s.format==="urn:x-nmos:format:audio").find(s=>s.essence_parameters.channels===n),a=(s,c,l)=>{var h,p;if(s.format!=="urn:x-nmos:format:video"&&s.format!=="urn:x-nmos:format:audio"&&!(s.format==="urn:x-nmos:format:multi"&&s.container)&&!(s.format==="urn:x-nmos:format:data"&&s.container==="text/vtt"))return;let d;s.format!=="urn:x-nmos:format:data"?d=((h=Au(c))==null?void 0:h.map(v=>{var E,T;const w=P.timerangeExprDuration(v.timerange);return new Ua(w,((T=(E=v.get_urls)==null?void 0:E.at(-1))==null?void 0:T.url)??"http://byomakase.org/non-playable-gap")}))??[]:d=((p=Lu(c))==null?void 0:p.map(v=>{var E,T;const w=P.timerangeExprDuration(v.timerange);return new Ua(w,((T=(E=v.get_urls)==null?void 0:E.at(-1))==null?void 0:T.url)??"http://byomakase.org/non-playable-gap")}))??[];const f=Math.max(...d.map(v=>v.duration),1),m={playlistType:"VOD",targetDuration:Math.ceil(f),version:3,independentSegments:!0};if(s.format==="urn:x-nmos:format:video"){const w=s.essence_parameters,E=ja(w),T=Pa(w),z=new Yr(s.max_bit_rate??s.avg_bit_rate??0,s.avg_bit_rate??0,E,T,"");i.push({segments:d,metadata:m,streamInfo:z})}else if(s.format==="urn:x-nmos:format:audio"){const w=s.essence_parameters,E={type:"AUDIO",groupId:"audio",name:Nu(s),isDefault:(o==null?void 0:o.id)===s.id,autoSelect:!0,channels:w.channels.toString()},T={bandwidth:s.avg_bit_rate??0,averageBandwidth:s.avg_bit_rate??0,resolution:null,frameRate:null,uri:""};i.push({segments:d,metadata:m,mediaInfo:E,streamInfo:T,id:s.id})}else if(s.format==="urn:x-nmos:format:multi"){const v=l==null?void 0:l.find(M=>M.format==="urn:x-nmos:format:video"),w=v?ja(v.essence_parameters):null,E=v?Pa(v.essence_parameters):null,T=bh(l??[]),z={bandwidth:T.maxBitRate,averageBandwidth:T.averageBitRate,resolution:w,frameRate:E,uri:""};i.push({segments:d,metadata:m,streamInfo:z,id:s.id})}else if(s.format==="urn:x-nmos:format:data"&&s.container==="text/vtt"){const v={type:"SUBTITLES",name:ju(s),isDefault:!1,autoSelect:!1,channels:null};i.push({segments:d,metadata:m,mediaInfo:v,id:s.id})}};return e.format==="urn:x-nmos:format:multi"&&!e.container?t==null||t.forEach(s=>{const c=r==null?void 0:r.get(s.id);c!=null&&c.length&&a(s,c)}):a(e,r==null?void 0:r.get(e.id),t),vh(i,{independentSegments:!0})}var Qr=function(e,t){return Qr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])},Qr(e,t)};function $t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function _h(e,t,r,i){function n(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{c(i.next(l))}catch(d){a(d)}}function s(l){try{c(i.throw(l))}catch(d){a(d)}}function c(l){l.done?o(l.value):n(l.value).then(u,s)}c((i=i.apply(e,t||[])).next())})}function Mu(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(l){return s([c,l])}}function s(c){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(r=0)),r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function dt(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ei(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),n,o=[],a;try{for(;(t===void 0||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(u){a={error:u}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}function ti(e,t,r){if(r||arguments.length===2)for(var i=0,n=t.length,o;i<n;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}function ct(e){return this instanceof ct?(this.v=e,this):new ct(e)}function yh(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,t||[]),n,o=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",a),n[Symbol.asyncIterator]=function(){return this},n;function a(m){return function(h){return Promise.resolve(h).then(m,d)}}function u(m,h){i[m]&&(n[m]=function(p){return new Promise(function(v,w){o.push([m,p,v,w])>1||s(m,p)})},h&&(n[m]=h(n[m])))}function s(m,h){try{c(i[m](h))}catch(p){f(o[0][3],p)}}function c(m){m.value instanceof ct?Promise.resolve(m.value.v).then(l,d):f(o[0][2],m)}function l(m){s("next",m)}function d(m){s("throw",m)}function f(m,h){m(h),o.shift(),o.length&&s(o[0][0],o[0][1])}}function $h(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof dt=="function"?dt(e):e[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(o){r[o]=e[o]&&function(a){return new Promise(function(u,s){a=e[o](a),n(u,s,a.done,a.value)})}}function n(o,a,u,s){Promise.resolve(s).then(function(c){o({value:c,done:u})},a)}}function ae(e){return typeof e=="function"}function hi(e){var t=function(i){Error.call(i),i.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Zr=hi(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
23
23
|
`+r.map(function(i,n){return n+1+") "+i.toString()}).join(`
|
|
24
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function ni(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Rn=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,i,n,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var c=dt(a),s=c.next();!s.done;s=c.next()){var u=s.value;u.remove(this)}}catch(p){t={error:p}}finally{try{s&&!s.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(oe(l))try{l()}catch(p){o=p instanceof Zr?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=dt(d),m=f.next();!m.done;m=f.next()){var g=m.value;try{La(g)}catch(p){o=o??[],p instanceof Zr?o=ti(ti([],ei(o)),ei(p.errors)):o.push(p)}}}catch(p){i={error:p}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}if(o)throw new Zr(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)La(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&ni(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&ni(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Vc=Rn.EMPTY;function Bc(e){return e instanceof Rn||e&&"closed"in e&&oe(e.remove)&&oe(e.add)&&oe(e.unsubscribe)}function La(e){oe(e)?e():e.unsubscribe()}var kh={Promise:void 0},Ih={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,ti([e,t],ei(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Kc(e){Ih.setTimeout(function(){throw e})}function Ca(){}function yn(e){e()}var gi=(function(e){$t(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,Bc(r)&&r.add(i)):i.destination=zh,i}return t.create=function(r,i,n){return new In(r,i,n)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Rn),xh=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(i){cn(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){cn(i)}else cn(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){cn(r)}},e})(),In=(function(e){$t(t,e);function t(r,i,n){var o=e.call(this)||this,a;return oe(r)||!r?a={next:r??void 0,error:i??void 0,complete:n??void 0}:a=r,o.destination=new xh(a),o}return t})(gi);function cn(e){Kc(e)}function Th(e){throw e}var zh={closed:!0,next:Ca,error:Th,complete:Ca},vi=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Jc(e){return e}function Eh(e){return e.length===0?Jc:e.length===1?e[0]:function(r){return e.reduce(function(i,n){return n(i)},r)}}var we=(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=Uh(t)?t:new In(t,r,i);return yn(function(){var a=n,c=a.operator,s=a.source;o.add(c?c.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=Za(r),new r(function(n,o){var a=new In({next:function(c){try{t(c)}catch(s){o(s),a.unsubscribe()}},error:o,complete:n});i.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[vi]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Eh(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Za(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 Za(e){var t;return(t=e??kh.Promise)!==null&&t!==void 0?t:Promise}function Oh(e){return e&&oe(e.next)&&oe(e.error)&&oe(e.complete)}function Uh(e){return e&&e instanceof gi||Oh(e)&&Bc(e)}function Dh(e){return oe(e==null?void 0:e.lift)}function bi(e){return function(t){if(Dh(t))return t.lift(function(r){try{return e(r,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function xn(e,t,r,i,n){return new Nh(e,t,r,i,n)}var Nh=(function(e){$t(t,e);function t(r,i,n,o,a,c){var s=e.call(this,r)||this;return s.onFinalize=a,s.shouldUnsubscribe=c,s._next=i?function(u){try{i(u)}catch(l){r.error(l)}}:e.prototype._next,s._error=o?function(u){try{o(u)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=n?function(){try{n()}catch(u){r.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;e.prototype.unsubscribe.call(this),!i&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(gi),jh=hi(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),yi=(function(e){$t(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var i=new Ma(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new jh},t.prototype.next=function(r){var i=this;yn(function(){var n,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=dt(i.currentObservers),c=a.next();!c.done;c=a.next()){var s=c.value;s.next(r)}}catch(u){n={error:u}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}}})},t.prototype.error=function(r){var i=this;yn(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=r;for(var n=i.observers;n.length;)n.shift().error(r)}})},t.prototype.complete=function(){var r=this;yn(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var i=r.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var i=this,n=this,o=n.hasError,a=n.isStopped,c=n.observers;return o||a?Vc:(this.currentObservers=null,c.push(r),new Rn(function(){i.currentObservers=null,ni(c,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 we;return r.source=this,r},t.create=function(r,i){return new Ma(r,i)},t})(we),Ma=(function(e){$t(t,e);function t(r,i){var n=e.call(this)||this;return n.destination=r,n.source=i,n}return t.prototype.next=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.next)===null||n===void 0||n.call(i,r)},t.prototype.error=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.error)===null||n===void 0||n.call(i,r)},t.prototype.complete=function(){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||i===void 0||i.call(r)},t.prototype._subscribe=function(r){var i,n;return(n=(i=this.source)===null||i===void 0?void 0:i.subscribe(r))!==null&&n!==void 0?n:Vc},t})(yi),Ph=(function(e){$t(t,e);function t(r){var i=e.call(this)||this;return i._value=r,i}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var i=e.prototype._subscribe.call(this,r);return!i.closed&&r.next(this._value),i},t.prototype.getValue=function(){var r=this,i=r.hasError,n=r.thrownError,o=r._value;if(i)throw n;return this._throwIfClosed(),o},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t})(yi),Ah=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function Lh(e){return oe(e==null?void 0:e.then)}function Ch(e){return oe(e[vi])}function Zh(e){return Symbol.asyncIterator&&oe(e==null?void 0:e[Symbol.asyncIterator])}function Mh(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 Rh(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Fh=Rh();function Vh(e){return oe(e==null?void 0:e[Fh])}function Bh(e){return wh(this,arguments,function(){var r,i,n,o;return Fc(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,ut(r.read())];case 3:return i=a.sent(),n=i.value,o=i.done,o?[4,ut(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ut(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 Kh(e){return oe(e==null?void 0:e.getReader)}function Jh(e){if(e instanceof we)return e;if(e!=null){if(Ch(e))return Gh(e);if(Ah(e))return Wh(e);if(Lh(e))return Gc(e);if(Zh(e))return Wc(e);if(Vh(e))return Hh(e);if(Kh(e))return qh(e)}throw Mh(e)}function Gh(e){return new we(function(t){var r=e[vi]();if(oe(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Wh(e){return new we(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function Gc(e){return new we(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Kc)})}function Hh(e){return new we(function(t){var r,i;try{for(var n=dt(e),o=n.next();!o.done;o=n.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(c){r={error:c}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}t.complete()})}function Wc(e){return new we(function(t){Xh(e,t).catch(function(r){return t.error(r)})})}function qh(e){return Wc(Bh(e))}function Xh(e,t){var r,i,n,o;return $h(this,void 0,void 0,function(){var a,c;return Fc(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),r=Sh(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 c=s.sent(),n={error:c},[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 Yh=hi(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Qh(e,t){return new Promise(function(r,i){var n=new In({next:function(o){r(o),n.unsubscribe()},error:i,complete:function(){i(new Yh)}});e.subscribe(n)})}function Ra(e,t){return bi(function(r,i){var n=0;r.subscribe(xn(i,function(o){i.next(e.call(t,o,n++))}))})}function Mr(e,t){return bi(function(r,i){var n=null,o=0,a=!1,c=function(){return a&&!n&&i.complete()};r.subscribe(xn(i,function(s){n==null||n.unsubscribe();var u=0,l=o++;Jh(e(s,l)).subscribe(n=xn(i,function(d){return i.next(t?t(s,d,l,u++):d)},function(){n=null,c()}))},function(){a=!0,c()}))})}function Fa(e,t,r){var i=oe(e)||t||r?{next:e,error:t,complete:r}:e;return i?bi(function(n,o){var a;(a=i.subscribe)===null||a===void 0||a.call(i);var c=!0;n.subscribe(xn(o,function(s){var u;(u=i.next)===null||u===void 0||u.call(i,s),o.next(s)},function(){var s;c=!1,(s=i.complete)===null||s===void 0||s.call(i),o.complete()},function(s){var u;c=!1,(u=i.error)===null||u===void 0||u.call(i,s),o.error(s)},function(){var s,u;c&&((s=i.unsubscribe)===null||s===void 0||s.call(i)),(u=i.finalize)===null||u===void 0||u.call(i)}))}):Jc}class Hc{constructor(t){k(this,"_player");k(this,"_proxy");k(this,"_mediaStartTime");k(this,"_loadOptions");k(this,"_onVideoLoaded$",new Ph(void 0));k(this,"_onVideoLoading$",new yi);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 c=r._player.video.getVideo();return!c||!r._tamsVideo?c:{...c,...r._tamsVideo}};if(n==="isTamsLoaded")return()=>{var c;return r._player.video.isVideoLoaded()&&((c=r._loadOptions)==null?void 0:c.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 Va(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 eg{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 c=a.headers.get("link"),s=c?Va(c):{};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"),c=a?Va(a):{};return{data:t==="GET"?await o.json():o.status,headers:o.headers,nextLink:c.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 tg=(e,t)=>new eg(e,t),qc=Object.freeze({status:"aborted"});function h(e,t,r){function i(c,s){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:s,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,s);const u=a.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){const f=l[d];f in c||(c[f]=u[f].bind(c))}}const n=(r==null?void 0:r.Parent)??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function a(c){var s;const u=r!=null&&r.Parent?new o:this;i(u,c),(s=u._zod).deferred??(s.deferred=[]);for(const l of u._zod.deferred)l();return u}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>{var s,u;return r!=null&&r.Parent&&c instanceof r.Parent?!0:(u=(s=c==null?void 0:c._zod)==null?void 0:s.traits)==null?void 0:u.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}const Xc=Symbol("zod_brand");class Qe extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Fn extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Tn={};function se(e){return e&&Object.assign(Tn,e),Tn}function ng(e){return e}function rg(e){return e}function ig(e){}function og(e){throw new Error("Unexpected value in exhaustive check")}function ag(e){}function _i(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=>U(r)).join(t)}function zn(e,t){return typeof t=="bigint"?t.toString():t}function Pt(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function rt(e){return e==null}function Vn(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Yc(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(".","")),c=Number.parseInt(t.toFixed(o).replace(".",""));return a%c/10**o}const Ba=Symbol("evaluating");function M(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Ba)return i===void 0&&(i=Ba,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function cg(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Je(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ne(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function ug(e){return Ne(e._zod.def)}function sg(e,t){return t?t.reduce((r,i)=>r==null?void 0:r[i],e):e}function lg(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 dg(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function ri(e){return JSON.stringify(e)}function Qc(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const $i="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ft(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const eu=Pt(()=>{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 et(e){if(ft(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(ft(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Bn(e){return et(e)?{...e}:Array.isArray(e)?[...e]:e}function fg(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const mg=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},En=new Set(["string","number","symbol"]),tu=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ae(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ke(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 pg(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function U(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function nu(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const ru={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]},iu={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function ou(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 c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(a[c]=r.shape[c])}return Je(this,"shape",a),a},checks:[]});return ke(e,o)}function au(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 c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete a[c]}return Je(this,"shape",a),a},checks:[]});return ke(e,o)}function cu(e,t){if(!et(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 Je(this,"shape",o),o}});return ke(e,n)}function uu(e,t){if(!et(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 Je(this,"shape",i),i}});return ke(e,r)}function su(e,t){const r=Ne(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Je(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return ke(e,r)}function lu(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 c=t._zod.def.shape,s={...c};if(r)for(const u in r){if(!(u in c))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(s[u]=e?new e({type:"optional",innerType:c[u]}):c[u])}else for(const u in c)s[u]=e?new e({type:"optional",innerType:c[u]}):c[u];return Je(this,"shape",s),s},checks:[]});return ke(t,a)}function du(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 Je(this,"shape",o),o}});return ke(t,i)}function Ye(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 Tt(e){return typeof e=="string"?e:e==null?void 0:e.message}function Se(e,t,r){var n,o,a,c,s,u;const i={...e,path:e.path??[]};if(!e.message){const l=Tt((a=(o=(n=e.inst)==null?void 0:n._zod.def)==null?void 0:o.error)==null?void 0:a.call(o,e))??Tt((c=t==null?void 0:t.error)==null?void 0:c.call(t,e))??Tt((s=r.customError)==null?void 0:s.call(r,e))??Tt((u=r.localeError)==null?void 0:u.call(r,e))??"Invalid input";i.message=l}return delete i.inst,delete i.continue,t!=null&&t.reportInput||delete i.input,i}function Kn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Jn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function D(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function mt(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function hg(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function fu(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 mu(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function gg(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return fu(t+r)}function vg(e){return mu(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function bg(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 yg(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class _g{constructor(...t){}}const pu=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:iu,Class:_g,NUMBER_FORMAT_RANGES:ru,aborted:Ye,allowsEval:eu,assert:ag,assertEqual:ng,assertIs:ig,assertNever:og,assertNotEqual:rg,assignProp:Je,base64ToUint8Array:fu,base64urlToUint8Array:gg,cached:Pt,captureStackTrace:$i,cleanEnum:hg,cleanRegex:Vn,clone:ke,cloneDef:ug,createTransparentProxy:pg,defineLazy:M,esc:ri,escapeRegex:Ae,extend:cu,finalizeIssue:Se,floatSafeRemainder:Yc,getElementAtPath:sg,getEnumValues:_i,getLengthableOrigin:Jn,getParsedType:mg,getSizableOrigin:Kn,hexToUint8Array:bg,isObject:ft,isPlainObject:et,issue:mt,joinValues:_,jsonStringifyReplacer:zn,merge:su,mergeDefs:Ne,normalizeParams:b,nullish:rt,numKeys:fg,objectClone:cg,omit:au,optionalKeys:nu,parsedType:D,partial:lu,pick:ou,prefixIssues:Te,primitiveTypes:tu,promiseAllObject:lg,propertyKeyTypes:En,randomString:dg,required:du,safeExtend:uu,shallowClone:Bn,slugify:Qc,stringifyPrimitive:U,uint8ArrayToBase64:mu,uint8ArrayToBase64url:vg,uint8ArrayToHex:yg,unwrapMessage:Tt},Symbol.toStringTag,{value:"Module"})),hu=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,zn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},wi=h("$ZodError",hu),ge=h("$ZodError",hu,{Parent:Error});function Si(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function ki(e,t=r=>r.message){const r={_errors:[]},i=n=>{for(const o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>i({issues:a}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let a=r,c=0;for(;c<o.path.length;){const s=o.path[c];c===o.path.length-1?(a[s]=a[s]||{_errors:[]},a[s]._errors.push(t(o))):a[s]=a[s]||{_errors:[]},a=a[s],c++}}};return i(e),r}function gu(e,t=r=>r.message){const r={errors:[]},i=(n,o=[])=>{var a,c;for(const s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>i({issues:u},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 u=[...o,...s.path];if(u.length===0){r.errors.push(t(s));continue}let l=r,d=0;for(;d<u.length;){const f=u[d],m=d===u.length-1;typeof f=="string"?(l.properties??(l.properties={}),(a=l.properties)[f]??(a[f]={errors:[]}),l=l.properties[f]):(l.items??(l.items=[]),(c=l.items)[f]??(c[f]={errors:[]}),l=l.items[f]),m&&l.errors.push(t(s)),d++}}};return i(e),r}function vu(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 bu(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 ${vu(n.path)}`);return t.join(`
|
|
25
|
-
`)}const At=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 c=new((n==null?void 0:n.Err)??e)(a.issues.map(s=>Se(s,o,se())));throw $i(c,n==null?void 0:n.callee),c}return a.value},ii=At(ge),Lt=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 c=new((n==null?void 0:n.Err)??e)(a.issues.map(s=>Se(s,o,se())));throw $i(c,n==null?void 0:n.callee),c}return a.value},oi=Lt(ge),Ct=e=>(t,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Qe;return o.issues.length?{success:!1,error:new(e??wi)(o.issues.map(a=>Se(a,n,se())))}:{success:!0,data:o.value}},yu=Ct(ge),Zt=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=>Se(a,n,se())))}:{success:!0,data:o.value}},_u=Zt(ge),Ii=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return At(e)(t,r,n)},$g=Ii(ge),xi=e=>(t,r,i)=>At(e)(t,r,i),wg=xi(ge),Ti=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Lt(e)(t,r,n)},Sg=Ti(ge),zi=e=>async(t,r,i)=>Lt(e)(t,r,i),kg=zi(ge),Ei=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ct(e)(t,r,n)},Ig=Ei(ge),Oi=e=>(t,r,i)=>Ct(e)(t,r,i),xg=Oi(ge),Ui=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Zt(e)(t,r,n)},Tg=Ui(ge),Di=e=>async(t,r,i)=>Zt(e)(t,r,i),zg=Di(ge),$u=/^[cC][^\s-]{8,}$/,wu=/^[0-9a-z]+$/,Su=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ku=/^[0-9a-vA-V]{20}$/,Iu=/^[A-Za-z0-9]{27}$/,xu=/^[a-zA-Z0-9_-]{21}$/,Tu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Eg=/^[-+]?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})$/,pt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Og=pt(4),Ug=pt(6),Dg=pt(7),Eu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ng=/^[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])?)*$/,jg=/^(([^<>()\[\]\\.,;:\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,}))$/,Ou=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Pg=Ou,Ag=/^[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])?)*$/,Lg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Uu(){return new RegExp(Lg,"u")}const Du=/^(?:(?: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])$/,Nu=/^(([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}|:))$/,ju=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}$`)},Pu=/^((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])$/,Au=/^(([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])$/,Lu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ni=/^[A-Za-z0-9_-]*$/,Cu=/^(?=.{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])?)*\.?$/,Zu=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Mu=/^\+[1-9]\d{6,14}$/,Ru="(?:(?:\\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])))",Fu=new RegExp(`^${Ru}$`);function Vu(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 Bu(e){return new RegExp(`^${Vu(e)}$`)}function Ku(e){const t=Vu({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(`^${Ru}T(?:${i})$`)}const Ju=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}$`)},Gu=/^-?\d+n?$/,Wu=/^-?\d+$/,ji=/^-?\d+(?:\.\d+)?$/,Hu=/^(?:true|false)$/i,qu=/^null$/i,Xu=/^undefined$/i,Yu=/^[^A-Z]*$/,Qu=/^[^a-z]*$/,es=/^[0-9a-fA-F]*$/;function Mt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Rt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const Cg=/^[0-9a-fA-F]{32}$/,Zg=Mt(22,"=="),Mg=Rt(22),Rg=/^[0-9a-fA-F]{40}$/,Fg=Mt(27,"="),Vg=Rt(27),Bg=/^[0-9a-fA-F]{64}$/,Kg=Mt(43,"="),Jg=Rt(43),Gg=/^[0-9a-fA-F]{96}$/,Wg=Mt(64,""),Hg=Rt(64),qg=/^[0-9a-fA-F]{128}$/,Xg=Mt(86,"=="),Yg=Rt(86),Pi=Object.freeze(Object.defineProperty({__proto__:null,base64:Lu,base64url:Ni,bigint:Gu,boolean:Hu,browserEmail:Ag,cidrv4:Pu,cidrv6:Au,cuid:$u,cuid2:wu,date:Fu,datetime:Ku,domain:Zu,duration:Tu,e164:Mu,email:Eu,emoji:Uu,extendedDuration:Eg,guid:zu,hex:es,hostname:Cu,html5Email:Ng,idnEmail:Pg,integer:Wu,ipv4:Du,ipv6:Nu,ksuid:Iu,lowercase:Yu,mac:ju,md5_base64:Zg,md5_base64url:Mg,md5_hex:Cg,nanoid:xu,null:qu,number:ji,rfc5322Email:jg,sha1_base64:Fg,sha1_base64url:Vg,sha1_hex:Rg,sha256_base64:Kg,sha256_base64url:Jg,sha256_hex:Bg,sha384_base64:Wg,sha384_base64url:Hg,sha384_hex:Gg,sha512_base64:Xg,sha512_base64url:Yg,sha512_hex:qg,string:Ju,time:Bu,ulid:Su,undefined:Xu,unicodeEmail:Ou,uppercase:Qu,uuid:pt,uuid4:Og,uuid6:Ug,uuid7:Dg,xid:ku},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=[])}),ts={number:"number",bigint:"bigint",object:"date"},Ai=h("$ZodCheckLessThan",(e,t)=>{Y.init(e,t);const r=ts[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Li=h("$ZodCheckGreaterThan",(e,t)=>{Y.init(e,t);const r=ts[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})}}),ns=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):Yc(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})}}),rs=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]=ru[t.format];e._zod.onattach.push(c=>{const s=c._zod.bag;s.format=t.format,s.minimum=n,s.maximum=o,r&&(s.pattern=Wu)}),e._zod.check=c=>{const s=c.value;if(r){if(!Number.isInteger(s)){c.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?c.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}):c.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&&c.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>o&&c.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),is=h("$ZodCheckBigIntFormat",(e,t)=>{Y.init(e,t);const[r,i]=iu[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})}}),os=h("$ZodCheckMaxSize",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!rt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;n.size<=t.maximum||i.issues.push({origin:Kn(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),as=h("$ZodCheckMinSize",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!rt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;n.size>=t.minimum||i.issues.push({origin:Kn(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),cs=h("$ZodCheckSizeEquals",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!rt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{const n=i.value,o=n.size;if(o===t.size)return;const a=o>t.size;i.issues.push({origin:Kn(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),us=h("$ZodCheckMaxLength",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!rt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;if(n.length<=t.maximum)return;const a=Jn(n);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ss=h("$ZodCheckMinLength",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!rt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;if(n.length>=t.minimum)return;const a=Jn(n);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ls=h("$ZodCheckLengthEquals",(e,t)=>{var r;Y.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!rt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{const n=i.value,o=n.length;if(o===t.length)return;const a=Jn(n),c=o>t.length;i.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Ft=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=()=>{})}),ds=h("$ZodCheckRegex",(e,t)=>{Ft.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})}}),fs=h("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Yu),Ft.init(e,t)}),ms=h("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Qu),Ft.init(e,t)}),ps=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})}}),hs=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})}}),gs=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 Ka(e,t,r){e.issues.length&&t.issues.push(...Te(r,e.issues))}const vs=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=>Ka(n,r,t.property));Ka(i,r,t.property)}}),bs=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})}}),ys=h("$ZodCheckOverwrite",(e,t)=>{Y.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class _s{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
|
|
24
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function ni(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Rn=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,i,n,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=dt(a),s=u.next();!s.done;s=u.next()){var c=s.value;c.remove(this)}}catch(p){t={error:p}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(ae(l))try{l()}catch(p){o=p instanceof Zr?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=dt(d),m=f.next();!m.done;m=f.next()){var h=m.value;try{Aa(h)}catch(p){o=o??[],p instanceof Zr?o=ti(ti([],ei(o)),ei(p.errors)):o.push(p)}}}catch(p){i={error:p}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}if(o)throw new Zr(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Aa(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&ni(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&ni(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Ru=Rn.EMPTY;function Fu(e){return e instanceof Rn||e&&"closed"in e&&ae(e.remove)&&ae(e.add)&&ae(e.unsubscribe)}function Aa(e){ae(e)?e():e.unsubscribe()}var wh={Promise:void 0},Sh={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,ti([e,t],ei(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Vu(e){Sh.setTimeout(function(){throw e})}function La(){}function _n(e){e()}var gi=(function(e){$t(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,Fu(r)&&r.add(i)):i.destination=xh,i}return t.create=function(r,i,n){return new In(r,i,n)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Rn),kh=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(i){cn(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){cn(i)}else cn(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){cn(r)}},e})(),In=(function(e){$t(t,e);function t(r,i,n){var o=e.call(this)||this,a;return ae(r)||!r?a={next:r??void 0,error:i??void 0,complete:n??void 0}:a=r,o.destination=new kh(a),o}return t})(gi);function cn(e){Vu(e)}function Ih(e){throw e}var xh={closed:!0,next:La,error:Ih,complete:La},vi=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Bu(e){return e}function Th(e){return e.length===0?Bu:e.length===1?e[0]:function(r){return e.reduce(function(i,n){return n(i)},r)}}var ye=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,i){var n=this,o=Eh(t)?t:new In(t,r,i);return _n(function(){var a=n,u=a.operator,s=a.source;o.add(u?u.call(o,s):s?n._subscribe(o):n._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var i=this;return r=Ca(r),new r(function(n,o){var a=new In({next:function(u){try{t(u)}catch(s){o(s),a.unsubscribe()}},error:o,complete:n});i.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[vi]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Th(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Ca(t),new t(function(i,n){var o;r.subscribe(function(a){return o=a},function(a){return n(a)},function(){return i(o)})})},e.create=function(t){return new e(t)},e})();function Ca(e){var t;return(t=e??wh.Promise)!==null&&t!==void 0?t:Promise}function zh(e){return e&&ae(e.next)&&ae(e.error)&&ae(e.complete)}function Eh(e){return e&&e instanceof gi||zh(e)&&Fu(e)}function Oh(e){return ae(e==null?void 0:e.lift)}function bi(e){return function(t){if(Oh(t))return t.lift(function(r){try{return e(r,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function xn(e,t,r,i,n){return new Uh(e,t,r,i,n)}var Uh=(function(e){$t(t,e);function t(r,i,n,o,a,u){var s=e.call(this,r)||this;return s.onFinalize=a,s.shouldUnsubscribe=u,s._next=i?function(c){try{i(c)}catch(l){r.error(l)}}:e.prototype._next,s._error=o?function(c){try{o(c)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=n?function(){try{n()}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;e.prototype.unsubscribe.call(this),!i&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(gi),Dh=hi(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),_i=(function(e){$t(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var i=new Za(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new Dh},t.prototype.next=function(r){var i=this;_n(function(){var n,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=dt(i.currentObservers),u=a.next();!u.done;u=a.next()){var s=u.value;s.next(r)}}catch(c){n={error:c}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}}})},t.prototype.error=function(r){var i=this;_n(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=r;for(var n=i.observers;n.length;)n.shift().error(r)}})},t.prototype.complete=function(){var r=this;_n(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var i=r.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var i=this,n=this,o=n.hasError,a=n.isStopped,u=n.observers;return o||a?Ru:(this.currentObservers=null,u.push(r),new Rn(function(){i.currentObservers=null,ni(u,r)}))},t.prototype._checkFinalizedStatuses=function(r){var i=this,n=i.hasError,o=i.thrownError,a=i.isStopped;n?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new ye;return r.source=this,r},t.create=function(r,i){return new Za(r,i)},t})(ye),Za=(function(e){$t(t,e);function t(r,i){var n=e.call(this)||this;return n.destination=r,n.source=i,n}return t.prototype.next=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.next)===null||n===void 0||n.call(i,r)},t.prototype.error=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.error)===null||n===void 0||n.call(i,r)},t.prototype.complete=function(){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||i===void 0||i.call(r)},t.prototype._subscribe=function(r){var i,n;return(n=(i=this.source)===null||i===void 0?void 0:i.subscribe(r))!==null&&n!==void 0?n:Ru},t})(_i),Nh=(function(e){$t(t,e);function t(r){var i=e.call(this)||this;return i._value=r,i}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var i=e.prototype._subscribe.call(this,r);return!i.closed&&r.next(this._value),i},t.prototype.getValue=function(){var r=this,i=r.hasError,n=r.thrownError,o=r._value;if(i)throw n;return this._throwIfClosed(),o},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t})(_i),jh=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function Ph(e){return ae(e==null?void 0:e.then)}function Ah(e){return ae(e[vi])}function Lh(e){return Symbol.asyncIterator&&ae(e==null?void 0:e[Symbol.asyncIterator])}function Ch(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Zh(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Mh=Zh();function Rh(e){return ae(e==null?void 0:e[Mh])}function Fh(e){return yh(this,arguments,function(){var r,i,n,o;return Mu(this,function(a){switch(a.label){case 0:r=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,ct(r.read())];case 3:return i=a.sent(),n=i.value,o=i.done,o?[4,ct(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ct(n)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function Vh(e){return ae(e==null?void 0:e.getReader)}function Bh(e){if(e instanceof ye)return e;if(e!=null){if(Ah(e))return Kh(e);if(jh(e))return Jh(e);if(Ph(e))return Ku(e);if(Lh(e))return Ju(e);if(Rh(e))return Gh(e);if(Vh(e))return qh(e)}throw Ch(e)}function Kh(e){return new ye(function(t){var r=e[vi]();if(ae(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Jh(e){return new ye(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function Ku(e){return new ye(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Vu)})}function Gh(e){return new ye(function(t){var r,i;try{for(var n=dt(e),o=n.next();!o.done;o=n.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(u){r={error:u}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}t.complete()})}function Ju(e){return new ye(function(t){Wh(e,t).catch(function(r){return t.error(r)})})}function qh(e){return Ju(Fh(e))}function Wh(e,t){var r,i,n,o;return _h(this,void 0,void 0,function(){var a,u;return Mu(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),r=$h(e),s.label=1;case 1:return[4,r.next()];case 2:if(i=s.sent(),!!i.done)return[3,4];if(a=i.value,t.next(a),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=s.sent(),n={error:u},[3,11];case 6:return s.trys.push([6,,9,10]),i&&!i.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}var Hh=hi(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Xh(e,t){return new Promise(function(r,i){var n=new In({next:function(o){r(o),n.unsubscribe()},error:i,complete:function(){i(new Hh)}});e.subscribe(n)})}function Ma(e,t){return bi(function(r,i){var n=0;r.subscribe(xn(i,function(o){i.next(e.call(t,o,n++))}))})}function Mr(e,t){return bi(function(r,i){var n=null,o=0,a=!1,u=function(){return a&&!n&&i.complete()};r.subscribe(xn(i,function(s){n==null||n.unsubscribe();var c=0,l=o++;Bh(e(s,l)).subscribe(n=xn(i,function(d){return i.next(t?t(s,d,l,c++):d)},function(){n=null,u()}))},function(){a=!0,u()}))})}function Yh(e,t,r){var i=ae(e)||t||r?{next:e,error:t,complete:r}:e;return i?bi(function(n,o){var a;(a=i.subscribe)===null||a===void 0||a.call(i);var u=!0;n.subscribe(xn(o,function(s){var c;(c=i.next)===null||c===void 0||c.call(i,s),o.next(s)},function(){var s;u=!1,(s=i.complete)===null||s===void 0||s.call(i),o.complete()},function(s){var c;u=!1,(c=i.error)===null||c===void 0||c.call(i,s),o.error(s)},function(){var s,c;u&&((s=i.unsubscribe)===null||s===void 0||s.call(i)),(c=i.finalize)===null||c===void 0||c.call(i)}))}):Bu}class Gu{constructor(t){k(this,"_player");k(this,"_proxy");k(this,"_mediaStartTime");k(this,"_loadOptions");k(this,"_requestedDuration");k(this,"_onVideoLoaded$",new Nh(void 0));k(this,"_onVideoLoading$",new _i);k(this,"_isTamsLoading",!1);k(this,"_lastVideoLoadedEvent$");k(this,"_tamsVideo");this._player=t;const r=this;this._player.video.onVideoLoading$.subscribe(i=>{var o;const n={...i,isTamsLoading:((o=this._loadOptions)==null?void 0:o.protocol)===void 0};Number.isFinite(this._requestedDuration)&&(n.options={...i.options,duration:this._requestedDuration}),this._onVideoLoading$.next(n)}),this._player.video.onVideoLoaded$.subscribe(i=>{var n;this._isTamsLoading?this._lastVideoLoadedEvent$=i:i?this._onVideoLoaded$.next({...i,isTamsLoaded:((n=this._loadOptions)==null?void 0:n.protocol)===void 0}):this._onVideoLoaded$.next(i)}),this._proxy=new Proxy(t.video,{get(i,n,o){if(n==="getVideo")return()=>{const u=r._player.video.getVideo();return!u||!r._tamsVideo?u:{...u,...r._tamsVideo}};if(n==="getVideoLoadOptions")return()=>{if(r._loadOptions)return{...r._loadOptions,...Number.isFinite(r._requestedDuration)?{duration:r._requestedDuration}:{}}};if(n==="isTamsLoaded")return()=>{var u;return r._player.video.isVideoLoaded()&&((u=r._loadOptions)==null?void 0:u.protocol)===void 0};if(n==="onVideoLoading$")return r._onVideoLoading$;if(n==="onVideoLoaded$")return r._onVideoLoaded$;const a=Reflect.get(i,n,o);return typeof a=="function"?a.bind(i):a}})}get proxy(){return this._proxy}get mediaStartTime(){return this._mediaStartTime}get loadOptions(){return this._loadOptions}set loadOptions(t){this._loadOptions=t,(t==null?void 0:t.protocol)===void 0?this._isTamsLoading=!0:this._isTamsLoading=!1}set mediaStartTime(t){this._mediaStartTime=t}set requestedDuration(t){this._requestedDuration=t}setTamsVideo(t){this._tamsVideo=t}emitVideoLoadedEvent(){if(!this._lastVideoLoadedEvent$){console.error("Can't emit video loaded event since no video has been loaded");return}if(this._tamsVideo){const t={...this._lastVideoLoadedEvent$,video:this._tamsVideo,isTamsLoaded:!0};Number.isFinite(this._requestedDuration)&&(t.videoLoadOptions={...this._lastVideoLoadedEvent$.videoLoadOptions,duration:this._requestedDuration}),this._onVideoLoaded$.next(t)}else this._onVideoLoaded$.next({...this._lastVideoLoadedEvent$})}}function Ra(e){if(!e)return{};const t={},r=e.split(",");for(const i of r){const n=i.match(/<([^>]+)>;\s*rel="([^"]+)"/);n&&(t[n[2]]=n[1])}return t}class Qh{constructor(t,r){k(this,"apiEndpoint");k(this,"headersFunction");this.headersFunction=r,this.apiEndpoint=t}setEndpoint(t){this.apiEndpoint=t}getEndpoint(){return this.apiEndpoint}setHeadersFunction(t){this.headersFunction=t}getHeadersFunction(){return this.headersFunction}async makeRequest(t,r,i={}){const n=`${this.apiEndpoint}${r}`,o=this.headersFunction?this.headersFunction(n).headers:{},a=await fetch(n,{method:t,headers:{...o,...i.headers},body:i.body?JSON.stringify(i.body):void 0});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const u=a.headers.get("link"),s=u?Ra(u):{};return{data:t==="GET"?await a.json():a.status,headers:a.headers,nextLink:s.next}}async makeRequestWithUrl(t,r,i={}){const n=this.headersFunction?this.headersFunction(r).headers:{},o=await fetch(r,{method:t,headers:{...n,...i.headers},body:i.body?JSON.stringify(i.body):void 0});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const a=o.headers.get("link"),u=a?Ra(a):{};return{data:t==="GET"?await o.json():o.status,headers:o.headers,nextLink:u.next}}async get(t,r={}){return this.makeRequest("GET",t,r)}async put(t,r,i={}){return this.makeRequest("PUT",t,{...i,body:r})}async del(t,r={}){return this.makeRequest("DELETE",t,r)}async post(t,r,i={}){return this.makeRequest("POST",t,{...i,body:r})}async getUrl(t,r={}){return this.makeRequestWithUrl("GET",t,r)}}const eg=(e,t)=>new Qh(e,t),qu=Object.freeze({status:"aborted"});function g(e,t,r){function i(u,s){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:s,constr:a,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,s);const c=a.prototype,l=Object.keys(c);for(let d=0;d<l.length;d++){const f=l[d];f in u||(u[f]=c[f].bind(u))}}const n=(r==null?void 0:r.Parent)??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function a(u){var s;const c=r!=null&&r.Parent?new o:this;i(c,u),(s=c._zod).deferred??(s.deferred=[]);for(const l of c._zod.deferred)l();return c}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:u=>{var s,c;return r!=null&&r.Parent&&u instanceof r.Parent?!0:(c=(s=u==null?void 0:u._zod)==null?void 0:s.traits)==null?void 0:c.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}const Wu=Symbol("zod_brand");class Ye extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Fn extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Tn={};function le(e){return e&&Object.assign(Tn,e),Tn}function tg(e){return e}function ng(e){return e}function rg(e){}function ig(e){throw new Error("Unexpected value in exhaustive check")}function og(e){}function yi(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function y(e,t="|"){return e.map(r=>D(r)).join(t)}function zn(e,t){return typeof t=="bigint"?t.toString():t}function At(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function nt(e){return e==null}function Vn(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Hu(e,t){const r=(e.toString().split(".")[1]||"").length,i=t.toString();let n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){const s=i.match(/\d?e-(\d?)/);s!=null&&s[1]&&(n=Number.parseInt(s[1]))}const o=r>n?r:n,a=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return a%u/10**o}const Fa=Symbol("evaluating");function Z(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Fa)return i===void 0&&(i=Fa,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ag(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Je(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function De(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function ug(e){return De(e._zod.def)}function cg(e,t){return t?t.reduce((r,i)=>r==null?void 0:r[i],e):e}function sg(e){const t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{const n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function lg(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function ri(e){return JSON.stringify(e)}function Xu(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const $i="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ft(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Yu=At(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Qe(e){if(ft(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(ft(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Bn(e){return Qe(e)?{...e}:Array.isArray(e)?[...e]:e}function dg(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const fg=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},En=new Set(["string","number","symbol"]),Qu=new Set(["string","number","bigint","boolean","symbol","undefined"]);function je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function we(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r!=null&&r.parent)&&(i._zod.parent=e),i}function b(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function mg(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function D(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ec(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const tc={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},nc={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function rc(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=De(e._zod.def,{get shape(){const a={};for(const u in t){if(!(u in r.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(a[u]=r.shape[u])}return Je(this,"shape",a),a},checks:[]});return we(e,o)}function ic(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=De(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const u in t){if(!(u in r.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete a[u]}return Je(this,"shape",a),a},checks:[]});return we(e,o)}function oc(e,t){if(!Qe(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const o=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=De(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Je(this,"shape",o),o}});return we(e,n)}function ac(e,t){if(!Qe(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=De(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Je(this,"shape",i),i}});return we(e,r)}function uc(e,t){const r=De(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Je(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return we(e,r)}function cc(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=De(t._zod.def,{get shape(){const u=t._zod.def.shape,s={...u};if(r)for(const c in r){if(!(c in u))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(s[c]=e?new e({type:"optional",innerType:u[c]}):u[c])}else for(const c in u)s[c]=e?new e({type:"optional",innerType:u[c]}):u[c];return Je(this,"shape",s),s},checks:[]});return we(t,a)}function sc(e,t,r){const i=De(t._zod.def,{get shape(){const n=t._zod.def.shape,o={...n};if(r)for(const a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(o[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(const a in n)o[a]=new e({type:"nonoptional",innerType:n[a]});return Je(this,"shape",o),o}});return we(t,i)}function Xe(e,t=0){var r;if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(((r=e.issues[i])==null?void 0:r.continue)!==!0)return!0;return!1}function Ie(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function zt(e){return typeof e=="string"?e:e==null?void 0:e.message}function $e(e,t,r){var n,o,a,u,s,c;const i={...e,path:e.path??[]};if(!e.message){const l=zt((a=(o=(n=e.inst)==null?void 0:n._zod.def)==null?void 0:o.error)==null?void 0:a.call(o,e))??zt((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??zt((s=r.customError)==null?void 0:s.call(r,e))??zt((c=r.localeError)==null?void 0:c.call(r,e))??"Invalid input";i.message=l}return delete i.inst,delete i.continue,t!=null&&t.reportInput||delete i.input,i}function Kn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Jn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function N(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function mt(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function pg(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function lc(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function dc(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function hg(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return lc(t+r)}function gg(e){return dc(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function vg(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function bg(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class _g{constructor(...t){}}const fc=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:nc,Class:_g,NUMBER_FORMAT_RANGES:tc,aborted:Xe,allowsEval:Yu,assert:og,assertEqual:tg,assertIs:rg,assertNever:ig,assertNotEqual:ng,assignProp:Je,base64ToUint8Array:lc,base64urlToUint8Array:hg,cached:At,captureStackTrace:$i,cleanEnum:pg,cleanRegex:Vn,clone:we,cloneDef:ug,createTransparentProxy:mg,defineLazy:Z,esc:ri,escapeRegex:je,extend:oc,finalizeIssue:$e,floatSafeRemainder:Hu,getElementAtPath:cg,getEnumValues:yi,getLengthableOrigin:Jn,getParsedType:fg,getSizableOrigin:Kn,hexToUint8Array:vg,isObject:ft,isPlainObject:Qe,issue:mt,joinValues:y,jsonStringifyReplacer:zn,merge:uc,mergeDefs:De,normalizeParams:b,nullish:nt,numKeys:dg,objectClone:ag,omit:ic,optionalKeys:ec,parsedType:N,partial:cc,pick:rc,prefixIssues:Ie,primitiveTypes:Qu,promiseAllObject:sg,propertyKeyTypes:En,randomString:lg,required:sc,safeExtend:ac,shallowClone:Bn,slugify:Xu,stringifyPrimitive:D,uint8ArrayToBase64:dc,uint8ArrayToBase64url:gg,uint8ArrayToHex:bg,unwrapMessage:zt},Symbol.toStringTag,{value:"Module"})),mc=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,zn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},wi=g("$ZodError",mc),he=g("$ZodError",mc,{Parent:Error});function Si(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function ki(e,t=r=>r.message){const r={_errors:[]},i=n=>{for(const o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>i({issues:a}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let a=r,u=0;for(;u<o.path.length;){const s=o.path[u];u===o.path.length-1?(a[s]=a[s]||{_errors:[]},a[s]._errors.push(t(o))):a[s]=a[s]||{_errors:[]},a=a[s],u++}}};return i(e),r}function pc(e,t=r=>r.message){const r={errors:[]},i=(n,o=[])=>{var a,u;for(const s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c},s.path));else if(s.code==="invalid_key")i({issues:s.issues},s.path);else if(s.code==="invalid_element")i({issues:s.issues},s.path);else{const c=[...o,...s.path];if(c.length===0){r.errors.push(t(s));continue}let l=r,d=0;for(;d<c.length;){const f=c[d],m=d===c.length-1;typeof f=="string"?(l.properties??(l.properties={}),(a=l.properties)[f]??(a[f]={errors:[]}),l=l.properties[f]):(l.items??(l.items=[]),(u=l.items)[f]??(u[f]={errors:[]}),l=l.items[f]),m&&l.errors.push(t(s)),d++}}};return i(e),r}function hc(e){const t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(const i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function gc(e){var i;const t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(const n of r)t.push(`✖ ${n.message}`),(i=n.path)!=null&&i.length&&t.push(` → at ${hc(n.path)}`);return t.join(`
|
|
25
|
+
`)}const Lt=e=>(t,r,i,n)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Ye;if(a.issues.length){const u=new((n==null?void 0:n.Err)??e)(a.issues.map(s=>$e(s,o,le())));throw $i(u,n==null?void 0:n.callee),u}return a.value},ii=Lt(he),Ct=e=>async(t,r,i,n)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const u=new((n==null?void 0:n.Err)??e)(a.issues.map(s=>$e(s,o,le())));throw $i(u,n==null?void 0:n.callee),u}return a.value},oi=Ct(he),Zt=e=>(t,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Ye;return o.issues.length?{success:!1,error:new(e??wi)(o.issues.map(a=>$e(a,n,le())))}:{success:!0,data:o.value}},vc=Zt(he),Mt=e=>async(t,r,i)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>$e(a,n,le())))}:{success:!0,data:o.value}},bc=Mt(he),Ii=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Lt(e)(t,r,n)},yg=Ii(he),xi=e=>(t,r,i)=>Lt(e)(t,r,i),$g=xi(he),Ti=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ct(e)(t,r,n)},wg=Ti(he),zi=e=>async(t,r,i)=>Ct(e)(t,r,i),Sg=zi(he),Ei=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Zt(e)(t,r,n)},kg=Ei(he),Oi=e=>(t,r,i)=>Zt(e)(t,r,i),Ig=Oi(he),Ui=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Mt(e)(t,r,n)},xg=Ui(he),Di=e=>async(t,r,i)=>Mt(e)(t,r,i),Tg=Di(he),_c=/^[cC][^\s-]{8,}$/,yc=/^[0-9a-z]+$/,$c=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,wc=/^[0-9a-vA-V]{20}$/,Sc=/^[A-Za-z0-9]{27}$/,kc=/^[a-zA-Z0-9_-]{21}$/,Ic=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,zg=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xc=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,pt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Eg=pt(4),Og=pt(6),Ug=pt(7),Tc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Dg=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ng=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,zc=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,jg=zc,Pg=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ag="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ec(){return new RegExp(Ag,"u")}const Oc=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Uc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Dc=e=>{const t=je(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Nc=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,jc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Pc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ni=/^[A-Za-z0-9_-]*$/,Ac=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Lc=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Cc=/^\+[1-9]\d{6,14}$/,Zc="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Mc=new RegExp(`^${Zc}$`);function Rc(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Fc(e){return new RegExp(`^${Rc(e)}$`)}function Vc(e){const t=Rc({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Zc}T(?:${i})$`)}const Bc=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Kc=/^-?\d+n?$/,Jc=/^-?\d+$/,ji=/^-?\d+(?:\.\d+)?$/,Gc=/^(?:true|false)$/i,qc=/^null$/i,Wc=/^undefined$/i,Hc=/^[^A-Z]*$/,Xc=/^[^a-z]*$/,Yc=/^[0-9a-fA-F]*$/;function Rt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ft(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const Lg=/^[0-9a-fA-F]{32}$/,Cg=Rt(22,"=="),Zg=Ft(22),Mg=/^[0-9a-fA-F]{40}$/,Rg=Rt(27,"="),Fg=Ft(27),Vg=/^[0-9a-fA-F]{64}$/,Bg=Rt(43,"="),Kg=Ft(43),Jg=/^[0-9a-fA-F]{96}$/,Gg=Rt(64,""),qg=Ft(64),Wg=/^[0-9a-fA-F]{128}$/,Hg=Rt(86,"=="),Xg=Ft(86),Pi=Object.freeze(Object.defineProperty({__proto__:null,base64:Pc,base64url:Ni,bigint:Kc,boolean:Gc,browserEmail:Pg,cidrv4:Nc,cidrv6:jc,cuid:_c,cuid2:yc,date:Mc,datetime:Vc,domain:Lc,duration:Ic,e164:Cc,email:Tc,emoji:Ec,extendedDuration:zg,guid:xc,hex:Yc,hostname:Ac,html5Email:Dg,idnEmail:jg,integer:Jc,ipv4:Oc,ipv6:Uc,ksuid:Sc,lowercase:Hc,mac:Dc,md5_base64:Cg,md5_base64url:Zg,md5_hex:Lg,nanoid:kc,null:qc,number:ji,rfc5322Email:Ng,sha1_base64:Rg,sha1_base64url:Fg,sha1_hex:Mg,sha256_base64:Bg,sha256_base64url:Kg,sha256_hex:Vg,sha384_base64:Gg,sha384_base64url:qg,sha384_hex:Jg,sha512_base64:Hg,sha512_base64url:Xg,sha512_hex:Wg,string:Bc,time:Fc,ulid:$c,undefined:Wc,unicodeEmail:zc,uppercase:Xc,uuid:pt,uuid4:Eg,uuid6:Og,uuid7:Ug,xid:wc},Symbol.toStringTag,{value:"Module"})),X=g("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Qc={number:"number",bigint:"bigint",object:"date"},Ai=g("$ZodCheckLessThan",(e,t)=>{X.init(e,t);const r=Qc[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Li=g("$ZodCheckGreaterThan",(e,t)=>{X.init(e,t);const r=Qc[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),es=g("$ZodCheckMultipleOf",(e,t)=>{X.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Hu(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),ts=g("$ZodCheckNumberFormat",(e,t)=>{var a;X.init(e,t),t.format=t.format||"float64";const r=(a=t.format)==null?void 0:a.includes("int"),i=r?"int":"number",[n,o]=tc[t.format];e._zod.onattach.push(u=>{const s=u._zod.bag;s.format=t.format,s.minimum=n,s.maximum=o,r&&(s.pattern=Jc)}),e._zod.check=u=>{const s=u.value;if(r){if(!Number.isInteger(s)){u.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?u.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):u.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<n&&u.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>o&&u.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),ns=g("$ZodCheckBigIntFormat",(e,t)=>{X.init(e,t);const[r,i]=nc[t.format];e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{const o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),rs=g("$ZodCheckMaxSize",(e,t)=>{var r;X.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!nt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;n.size<=t.maximum||i.issues.push({origin:Kn(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),is=g("$ZodCheckMinSize",(e,t)=>{var r;X.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!nt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;n.size>=t.minimum||i.issues.push({origin:Kn(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),os=g("$ZodCheckSizeEquals",(e,t)=>{var r;X.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!nt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{const n=i.value,o=n.size;if(o===t.size)return;const a=o>t.size;i.issues.push({origin:Kn(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),as=g("$ZodCheckMaxLength",(e,t)=>{var r;X.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!nt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;if(n.length<=t.maximum)return;const a=Jn(n);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),us=g("$ZodCheckMinLength",(e,t)=>{var r;X.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!nt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;if(n.length>=t.minimum)return;const a=Jn(n);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),cs=g("$ZodCheckLengthEquals",(e,t)=>{var r;X.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!nt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{const n=i.value,o=n.length;if(o===t.length)return;const a=Jn(n),u=o>t.length;i.issues.push({origin:a,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Vt=g("$ZodCheckStringFormat",(e,t)=>{var r,i;X.init(e,t),e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),ss=g("$ZodCheckRegex",(e,t)=>{Vt.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ls=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Hc),Vt.init(e,t)}),ds=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Xc),Vt.init(e,t)}),fs=g("$ZodCheckIncludes",(e,t)=>{X.init(e,t);const r=je(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ms=g("$ZodCheckStartsWith",(e,t)=>{X.init(e,t);const r=new RegExp(`^${je(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),ps=g("$ZodCheckEndsWith",(e,t)=>{X.init(e,t);const r=new RegExp(`.*${je(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Va(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues))}const hs=g("$ZodCheckProperty",(e,t)=>{X.init(e,t),e._zod.check=r=>{const i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Va(n,r,t.property));Va(i,r,t.property)}}),gs=g("$ZodCheckMimeType",(e,t)=>{X.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),vs=g("$ZodCheckOverwrite",(e,t)=>{X.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class bs{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
|
|
26
26
|
`).filter(a=>a),n=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(const a of o)this.content.push(a)}compile(){const t=Function,r=this==null?void 0:this.args,n=[...((this==null?void 0:this.content)??[""]).map(o=>` ${o}`)];return new t(...r,n.join(`
|
|
27
|
-
`))}}const $s={major:4,minor:3,patch:6},C=h("$ZodType",(e,t)=>{var n;var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=$s;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const a of o._zod.onattach)a(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),(n=e._zod.deferred)==null||n.push(()=>{e._zod.run=e._zod.parse});else{const o=(c,s,u)=>{let l=Ye(c),d;for(const f of s){if(f._zod.def.when){if(!f._zod.def.when(c))continue}else if(l)continue;const m=c.issues.length,g=f._zod.check(c);if(g instanceof Promise&&(u==null?void 0:u.async)===!1)throw new Qe;if(d||g instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await g,c.issues.length!==m&&(l||(l=Ye(c,m)))});else{if(c.issues.length===m)continue;l||(l=Ye(c,m))}}return d?d.then(()=>c):c},a=(c,s,u)=>{if(Ye(c))return c.aborted=!0,c;const l=o(s,i,u);if(l instanceof Promise){if(u.async===!1)throw new Qe;return l.then(d=>e._zod.parse(d,u))}return e._zod.parse(l,u)};e._zod.run=(c,s)=>{if(s.skipChecks)return e._zod.parse(c,s);if(s.direction==="backward"){const l=e._zod.parse({value:c.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(d=>a(d,c,s)):a(l,c,s)}const u=e._zod.parse(c,s);if(u instanceof Promise){if(s.async===!1)throw new Qe;return u.then(l=>o(l,i,s))}return o(u,i,s)}}M(e,"~standard",()=>({validate:o=>{var a;try{const c=yu(e,o);return c.success?{value:c.data}:{issues:(a=c.error)==null?void 0:a.issues}}catch{return _u(e,o).then(s=>{var u;return s.success?{value:s.data}:{issues:(u=s.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}))}),Vt=h("$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()??Ju(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)=>{Ft.init(e,t),Vt.init(e,t)}),ws=h("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=zu),W.init(e,t)}),Ss=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=pt(i))}else t.pattern??(t.pattern=pt());W.init(e,t)}),ks=h("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Eu),W.init(e,t)}),Is=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})}}}),xs=h("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Uu()),W.init(e,t)}),Ts=h("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=xu),W.init(e,t)}),zs=h("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=$u),W.init(e,t)}),Es=h("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=wu),W.init(e,t)}),Os=h("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Su),W.init(e,t)}),Us=h("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ku),W.init(e,t)}),Ds=h("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Iu),W.init(e,t)}),Ns=h("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ku(t)),W.init(e,t)}),js=h("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Fu),W.init(e,t)}),Ps=h("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Bu(t)),W.init(e,t)}),As=h("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Tu),W.init(e,t)}),Ls=h("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Du),W.init(e,t),e._zod.bag.format="ipv4"}),Cs=h("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Nu),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})}}}),Zs=h("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=ju(t.delimiter)),W.init(e,t),e._zod.bag.format="mac"}),Ms=h("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Pu),W.init(e,t)}),Rs=h("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Au),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 Ci(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Fs=h("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Lu),W.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ci(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Vs(e){if(!Ni.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ci(r)}const Bs=h("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ni),W.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Vs(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Ks=h("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Mu),W.init(e,t)});function Js(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 Gs=h("$ZodJWT",(e,t)=>{W.init(e,t),e._zod.check=r=>{Js(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Ws=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})}}),Zi=h("$ZodNumber",(e,t)=>{C.init(e,t),e._zod.pattern=e._zod.bag.pattern??ji,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),Hs=h("$ZodNumberFormat",(e,t)=>{rs.init(e,t),Zi.init(e,t)}),Mi=h("$ZodBoolean",(e,t)=>{C.init(e,t),e._zod.pattern=Hu,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Ri=h("$ZodBigInt",(e,t)=>{C.init(e,t),e._zod.pattern=Gu,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),qs=h("$ZodBigIntFormat",(e,t)=>{is.init(e,t),Ri.init(e,t)}),Xs=h("$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}}),Ys=h("$ZodUndefined",(e,t)=>{C.init(e,t),e._zod.pattern=Xu,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}}),Qs=h("$ZodNull",(e,t)=>{C.init(e,t),e._zod.pattern=qu,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}}),el=h("$ZodAny",(e,t)=>{C.init(e,t),e._zod.parse=r=>r}),tl=h("$ZodUnknown",(e,t)=>{C.init(e,t),e._zod.parse=r=>r}),nl=h("$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)}),rl=h("$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}}),il=h("$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 Ja(e,t,r){e.issues.length&&t.issues.push(...Te(r,e.issues)),t.value[r]=e.value}const ol=h("$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 c=n[a],s=t.element._zod.run({value:c,issues:[]},i);s instanceof Promise?o.push(s.then(u=>Ja(u,r,a))):Ja(s,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function On(e,t,r,i,n){if(e.issues.length){if(n&&!(r in i))return;t.issues.push(...Te(r,e.issues))}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function al(e){var i,n,o,a;const t=Object.keys(e.shape);for(const c of t)if(!((a=(o=(n=(i=e.shape)==null?void 0:i[c])==null?void 0:n._zod)==null?void 0:o.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${c}": expected a Zod schema`);const r=nu(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function cl(e,t,r,i,n,o){const a=[],c=n.keySet,s=n.catchall._zod,u=s.def.type,l=s.optout==="optional";for(const d in t){if(c.has(d))continue;if(u==="never"){a.push(d);continue}const f=s.run({value:t[d],issues:[]},i);f instanceof Promise?e.push(f.then(m=>On(m,r,d,t,l))):On(f,r,d,t,l)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}const ul=h("$ZodObject",(e,t)=>{C.init(e,t);const r=Object.getOwnPropertyDescriptor(t,"shape");if(!(r!=null&&r.get)){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const s={...c};return Object.defineProperty(t,"shape",{value:s}),s}})}const i=Pt(()=>al(t));M(e._zod,"propValues",()=>{const c=t.shape,s={};for(const u in c){const l=c[u]._zod;if(l.values){s[u]??(s[u]=new Set);for(const d of l.values)s[u].add(d)}}return s});const n=ft,o=t.catchall;let a;e._zod.parse=(c,s)=>{a??(a=i.value);const u=c.value;if(!n(u))return c.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),c;c.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:u[f],issues:[]},s);p instanceof Promise?l.push(p.then(v=>On(v,c,f,u,g))):On(p,c,f,u,g)}return o?cl(l,u,c,s,i.value,e):l.length?Promise.all(l).then(()=>c):c}}),sl=h("$ZodObjectJIT",(e,t)=>{ul.init(e,t);const r=e._zod.parse,i=Pt(()=>al(t)),n=f=>{var T;const m=new _s(["shape","payload","ctx"]),g=i.value,p=A=>{const L=ri(A);return`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`};m.write("const input = payload.value;");const v=Object.create(null);let w=0;for(const A of g.keys)v[A]=`key_${w++}`;m.write("const newResult = {};");for(const A of g.keys){const L=v[A],R=ri(A),le=f[A],X=((T=le==null?void 0:le._zod)==null?void 0:T.optout)==="optional";m.write(`const ${L} = ${p(A)};`),X?m.write(`
|
|
28
|
-
if (${
|
|
27
|
+
`))}}const _s={major:4,minor:3,patch:6},L=g("$ZodType",(e,t)=>{var n;var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=_s;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const a of o._zod.onattach)a(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),(n=e._zod.deferred)==null||n.push(()=>{e._zod.run=e._zod.parse});else{const o=(u,s,c)=>{let l=Xe(u),d;for(const f of s){if(f._zod.def.when){if(!f._zod.def.when(u))continue}else if(l)continue;const m=u.issues.length,h=f._zod.check(u);if(h instanceof Promise&&(c==null?void 0:c.async)===!1)throw new Ye;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,u.issues.length!==m&&(l||(l=Xe(u,m)))});else{if(u.issues.length===m)continue;l||(l=Xe(u,m))}}return d?d.then(()=>u):u},a=(u,s,c)=>{if(Xe(u))return u.aborted=!0,u;const l=o(s,i,c);if(l instanceof Promise){if(c.async===!1)throw new Ye;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(u,s)=>{if(s.skipChecks)return e._zod.parse(u,s);if(s.direction==="backward"){const l=e._zod.parse({value:u.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(d=>a(d,u,s)):a(l,u,s)}const c=e._zod.parse(u,s);if(c instanceof Promise){if(s.async===!1)throw new Ye;return c.then(l=>o(l,i,s))}return o(c,i,s)}}Z(e,"~standard",()=>({validate:o=>{var a;try{const u=vc(e,o);return u.success?{value:u.data}:{issues:(a=u.error)==null?void 0:a.issues}}catch{return bc(e,o).then(s=>{var c;return s.success?{value:s.data}:{issues:(c=s.error)==null?void 0:c.issues}})}},vendor:"zod",version:1}))}),Bt=g("$ZodString",(e,t)=>{var r;L.init(e,t),e._zod.pattern=[...((r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)??[]].pop()??Bc(e._zod.bag),e._zod.parse=(i,n)=>{if(t.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),G=g("$ZodStringFormat",(e,t)=>{Vt.init(e,t),Bt.init(e,t)}),ys=g("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=xc),G.init(e,t)}),$s=g("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=pt(i))}else t.pattern??(t.pattern=pt());G.init(e,t)}),ws=g("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Tc),G.init(e,t)}),Ss=g("$ZodURL",(e,t)=>{G.init(e,t),e._zod.check=r=>{try{const i=r.value.trim(),n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),ks=g("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ec()),G.init(e,t)}),Is=g("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=kc),G.init(e,t)}),xs=g("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=_c),G.init(e,t)}),Ts=g("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=yc),G.init(e,t)}),zs=g("$ZodULID",(e,t)=>{t.pattern??(t.pattern=$c),G.init(e,t)}),Es=g("$ZodXID",(e,t)=>{t.pattern??(t.pattern=wc),G.init(e,t)}),Os=g("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Sc),G.init(e,t)}),Us=g("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Vc(t)),G.init(e,t)}),Ds=g("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Mc),G.init(e,t)}),Ns=g("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Fc(t)),G.init(e,t)}),js=g("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ic),G.init(e,t)}),Ps=g("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Oc),G.init(e,t),e._zod.bag.format="ipv4"}),As=g("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Uc),G.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Ls=g("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Dc(t.delimiter)),G.init(e,t),e._zod.bag.format="mac"}),Cs=g("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Nc),G.init(e,t)}),Zs=g("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=jc),G.init(e,t),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[n,o]=i;if(!o)throw new Error;const a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Ci(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ms=g("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Pc),G.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ci(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Rs(e){if(!Ni.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ci(r)}const Fs=g("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ni),G.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Rs(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Vs=g("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Cc),G.init(e,t)});function Bs(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const n=JSON.parse(atob(i));return!("typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const Ks=g("$ZodJWT",(e,t)=>{G.init(e,t),e._zod.check=r=>{Bs(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Js=g("$ZodCustomStringFormat",(e,t)=>{G.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Zi=g("$ZodNumber",(e,t)=>{L.init(e,t),e._zod.pattern=e._zod.bag.pattern??ji,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),Gs=g("$ZodNumberFormat",(e,t)=>{ts.init(e,t),Zi.init(e,t)}),Mi=g("$ZodBoolean",(e,t)=>{L.init(e,t),e._zod.pattern=Gc,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Ri=g("$ZodBigInt",(e,t)=>{L.init(e,t),e._zod.pattern=Kc,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),qs=g("$ZodBigIntFormat",(e,t)=>{ns.init(e,t),Ri.init(e,t)}),Ws=g("$ZodSymbol",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Hs=g("$ZodUndefined",(e,t)=>{L.init(e,t),e._zod.pattern=Wc,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Xs=g("$ZodNull",(e,t)=>{L.init(e,t),e._zod.pattern=qc,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Ys=g("$ZodAny",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),Qs=g("$ZodUnknown",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),el=g("$ZodNever",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),tl=g("$ZodVoid",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),nl=g("$ZodDate",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function Ba(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues)),t.value[r]=e.value}const rl=g("$ZodArray",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const o=[];for(let a=0;a<n.length;a++){const u=n[a],s=t.element._zod.run({value:u,issues:[]},i);s instanceof Promise?o.push(s.then(c=>Ba(c,r,a))):Ba(s,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function On(e,t,r,i,n){if(e.issues.length){if(n&&!(r in i))return;t.issues.push(...Ie(r,e.issues))}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function il(e){var i,n,o,a;const t=Object.keys(e.shape);for(const u of t)if(!((a=(o=(n=(i=e.shape)==null?void 0:i[u])==null?void 0:n._zod)==null?void 0:o.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${u}": expected a Zod schema`);const r=ec(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function ol(e,t,r,i,n,o){const a=[],u=n.keySet,s=n.catchall._zod,c=s.def.type,l=s.optout==="optional";for(const d in t){if(u.has(d))continue;if(c==="never"){a.push(d);continue}const f=s.run({value:t[d],issues:[]},i);f instanceof Promise?e.push(f.then(m=>On(m,r,d,t,l))):On(f,r,d,t,l)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}const al=g("$ZodObject",(e,t)=>{L.init(e,t);const r=Object.getOwnPropertyDescriptor(t,"shape");if(!(r!=null&&r.get)){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const s={...u};return Object.defineProperty(t,"shape",{value:s}),s}})}const i=At(()=>il(t));Z(e._zod,"propValues",()=>{const u=t.shape,s={};for(const c in u){const l=u[c]._zod;if(l.values){s[c]??(s[c]=new Set);for(const d of l.values)s[c].add(d)}}return s});const n=ft,o=t.catchall;let a;e._zod.parse=(u,s)=>{a??(a=i.value);const c=u.value;if(!n(c))return u.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),u;u.value={};const l=[],d=a.shape;for(const f of a.keys){const m=d[f],h=m._zod.optout==="optional",p=m._zod.run({value:c[f],issues:[]},s);p instanceof Promise?l.push(p.then(v=>On(v,u,f,c,h))):On(p,u,f,c,h)}return o?ol(l,c,u,s,i.value,e):l.length?Promise.all(l).then(()=>u):u}}),ul=g("$ZodObjectJIT",(e,t)=>{al.init(e,t);const r=e._zod.parse,i=At(()=>il(t)),n=f=>{var T;const m=new bs(["shape","payload","ctx"]),h=i.value,p=z=>{const M=ri(z);return`shape[${M}]._zod.run({ value: input[${M}], issues: [] }, ctx)`};m.write("const input = payload.value;");const v=Object.create(null);let w=0;for(const z of h.keys)v[z]=`key_${w++}`;m.write("const newResult = {};");for(const z of h.keys){const M=v[z],R=ri(z),Q=f[z],te=((T=Q==null?void 0:Q._zod)==null?void 0:T.optout)==="optional";m.write(`const ${M} = ${p(z)};`),te?m.write(`
|
|
28
|
+
if (${M}.issues.length) {
|
|
29
29
|
if (${R} in input) {
|
|
30
|
-
payload.issues = payload.issues.concat(${
|
|
30
|
+
payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
|
|
31
31
|
...iss,
|
|
32
32
|
path: iss.path ? [${R}, ...iss.path] : [${R}]
|
|
33
33
|
})));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
if (${
|
|
37
|
+
if (${M}.value === undefined) {
|
|
38
38
|
if (${R} in input) {
|
|
39
39
|
newResult[${R}] = undefined;
|
|
40
40
|
}
|
|
41
41
|
} else {
|
|
42
|
-
newResult[${R}] = ${
|
|
42
|
+
newResult[${R}] = ${M}.value;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
`):m.write(`
|
|
46
|
-
if (${
|
|
47
|
-
payload.issues = payload.issues.concat(${
|
|
46
|
+
if (${M}.issues.length) {
|
|
47
|
+
payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
|
|
48
48
|
...iss,
|
|
49
49
|
path: iss.path ? [${R}, ...iss.path] : [${R}]
|
|
50
50
|
})));
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
if (${
|
|
53
|
+
if (${M}.value === undefined) {
|
|
54
54
|
if (${R} in input) {
|
|
55
55
|
newResult[${R}] = undefined;
|
|
56
56
|
}
|
|
57
57
|
} else {
|
|
58
|
-
newResult[${R}] = ${
|
|
58
|
+
newResult[${R}] = ${M}.value;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
`)}m.write("payload.value = newResult;"),m.write("return payload;");const z=m.compile();return(A,L)=>z(f,A,L)};let o;const a=ft,c=!Tn.jitless,u=c&&eu.value,l=t.catchall;let d;e._zod.parse=(f,m)=>{d??(d=i.value);const g=f.value;return a(g)?c&&u&&(m==null?void 0:m.async)===!1&&m.jitless!==!0?(o||(o=n(t.shape)),f=o(f,m),l?cl([],g,f,m,d,e):f):r(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function Ga(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=>!Ye(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=>Se(a,i,se())))}),t)}const Gn=h("$ZodUnion",(e,t)=>{C.init(e,t),M(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),M(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),M(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),M(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>Vn(o.source)).join("|")})$`)}});const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let a=!1;const c=[];for(const s of t.options){const u=s._zod.run({value:n.value,issues:[]},o);if(u instanceof Promise)c.push(u),a=!0;else{if(u.issues.length===0)return u;c.push(u)}}return a?Promise.all(c).then(s=>Ga(s,n,e,o)):Ga(c,n,e,o)}});function Wa(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=>Se(a,i,se())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}const ll=h("$ZodXor",(e,t)=>{Gn.init(e,t),t.inclusive=!1;const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let a=!1;const c=[];for(const s of t.options){const u=s._zod.run({value:n.value,issues:[]},o);u instanceof Promise?(c.push(u),a=!0):c.push(u)}return a?Promise.all(c).then(s=>Wa(s,n,e,o)):Wa(c,n,e,o)}}),dl=h("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Gn.init(e,t);const r=e._zod.parse;M(e._zod,"propValues",()=>{const n={};for(const o of t.options){const a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[c,s]of Object.entries(a)){n[c]||(n[c]=new Set);for(const u of s)n[c].add(u)}}return n});const i=Pt(()=>{var a;const n=t.options,o=new Map;for(const c of n){const s=(a=c._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(c)}"`);for(const u of s){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,c)}}return o});e._zod.parse=(n,o)=>{const a=n.value;if(!ft(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;const c=i.value.get(a==null?void 0:a[t.discriminator]);return c?c._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)}}),fl=h("$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,u])=>Ha(r,s,u)):Ha(r,o,a)}});function ai(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(et(e)&&et(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(const o of i){const a=ai(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const n=e[i],o=t[i],a=ai(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Ha(e,t,r){const i=new Map;let n;for(const c of t.issues)if(c.code==="unrecognized_keys"){n??(n=c);for(const s of c.keys)i.has(s)||i.set(s,{}),i.get(s).l=!0}else e.issues.push(c);for(const c of r.issues)if(c.code==="unrecognized_keys")for(const s of c.keys)i.has(s)||i.set(s,{}),i.get(s).r=!0;else e.issues.push(c);const o=[...i].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(o.length&&n&&e.issues.push({...n,keys:o}),Ye(e))return e;const a=ai(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Fi=h("$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=[],c=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),s=c===-1?0:r.length-c;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 u=-1;for(const l of r){if(u++,u>=o.length&&u>=s)continue;const d=l._zod.run({value:o[u],issues:[]},n);d instanceof Promise?a.push(d.then(f=>un(f,i,u))):un(d,i,u)}if(t.rest){const l=o.slice(r.length);for(const d of l){u++;const f=t.rest._zod.run({value:d,issues:[]},n);f instanceof Promise?a.push(f.then(m=>un(m,i,u))):un(f,i,u)}}return a.length?Promise.all(a).then(()=>i):i}});function un(e,t,r){e.issues.length&&t.issues.push(...Te(r,e.issues)),t.value[r]=e.value}const ml=h("$ZodRecord",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!et(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 c=new Set;for(const u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){c.add(typeof u=="number"?u.toString():u);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[u]=d.value})):(l.issues.length&&r.issues.push(...Te(u,l.issues)),r.value[u]=l.value)}let s;for(const u in n)c.has(u)||(s=s??[],s.push(u));s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:s})}else{r.value={};for(const c of Reflect.ownKeys(n)){if(c==="__proto__")continue;let s=t.keyType._zod.run({value:c,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&ji.test(c)&&s.issues.length){const d=t.keyType._zod.run({value:Number(c),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[c]=n[c]:r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(d=>Se(d,i,se())),input:c,path:[c],inst:e});continue}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[s.value]=d.value})):(l.issues.length&&r.issues.push(...Te(c,l.issues)),r.value[s.value]=l.value)}}return o.length?Promise.all(o).then(()=>r):r}}),pl=h("$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,c]of n){const s=t.keyType._zod.run({value:a,issues:[]},i),u=t.valueType._zod.run({value:c,issues:[]},i);s instanceof Promise||u instanceof Promise?o.push(Promise.all([s,u]).then(([l,d])=>{qa(l,d,r,a,n,e,i)})):qa(s,u,r,a,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function qa(e,t,r,i,n,o,a){e.issues.length&&(En.has(typeof i)?r.issues.push(...Te(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(c=>Se(c,a,se()))})),t.issues.length&&(En.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(c=>Se(c,a,se()))})),r.value.set(e.value,t.value)}const hl=h("$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 c=t.valueType._zod.run({value:a,issues:[]},i);c instanceof Promise?o.push(c.then(s=>Xa(s,r))):Xa(c,r)}return o.length?Promise.all(o).then(()=>r):r}});function Xa(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const gl=h("$ZodEnum",(e,t)=>{C.init(e,t);const r=_i(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>En.has(typeof n)).map(n=>typeof n=="string"?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}}),vl=h("$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"?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}}),bl=h("$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}}),yl=h("$ZodTransform",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Fn(e.constructor.name);const n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new Qe;return r.value=n,r}});function Ya(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Vi=h("$ZodOptional",(e,t)=>{C.init(e,t),e._zod.optin="optional",e._zod.optout="optional",M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),M(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Vn(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ya(o,r.value)):Ya(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),_l=h("$ZodExactOptional",(e,t)=>{Vi.init(e,t),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),$l=h("$ZodNullable",(e,t)=>{C.init(e,t),M(e._zod,"optin",()=>t.innerType._zod.optin),M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Vn(r.source)}|null)$`):void 0}),M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),wl=h("$ZodDefault",(e,t)=>{C.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Qa(o,t)):Qa(n,t)}});function Qa(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Sl=h("$ZodPrefault",(e,t)=>{C.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),kl=h("$ZodNonOptional",(e,t)=>{C.init(e,t),M(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>ec(o,e)):ec(n,e)}});function ec(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 Il=h("$ZodSuccess",(e,t)=>{C.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Fn("ZodSuccess");const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),xl=h("$ZodCatch",(e,t)=>{C.init(e,t),M(e._zod,"optin",()=>t.innerType._zod.optin),M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(a=>Se(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=>Se(o,i,se()))},input:r.value}),r.issues=[]),r)}}),Tl=h("$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)}),zl=h("$ZodPipe",(e,t)=>{C.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>sn(a,t.in,i)):sn(o,t.in,i)}const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>sn(o,t.out,i)):sn(n,t.out,i)}});function sn(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const Bi=h("$ZodCodec",(e,t)=>{C.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){const o=t.in._zod.run(r,i);return o instanceof Promise?o.then(a=>ln(a,t,i)):ln(o,t,i)}else{const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>ln(a,t,i)):ln(o,t,i)}}});function ln(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=>dn(e,o,t.out,r)):dn(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>dn(e,o,t.in,r)):dn(e,n,t.in,r)}}function dn(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}const El=h("$ZodReadonly",(e,t)=>{C.init(e,t),M(e._zod,"propValues",()=>t.innerType._zod.propValues),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"optin",()=>{var r,i;return(i=(r=t.innerType)==null?void 0:r._zod)==null?void 0:i.optin}),M(e._zod,"optout",()=>{var r,i;return(i=(r=t.innerType)==null?void 0:r._zod)==null?void 0:i.optout}),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(tc):tc(n)}});function tc(e){return e.value=Object.freeze(e.value),e}const Ol=h("$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||tu.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)}),Ul=h("$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?ii(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?ii(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){const n=e._def.input?await oi(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await oi(e._def.output,o):o}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Fi({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),Dl=h("$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))}),Nl=h("$ZodLazy",(e,t)=>{C.init(e,t),M(e._zod,"innerType",()=>t.getter()),M(e._zod,"pattern",()=>{var r,i;return(i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.pattern}),M(e._zod,"propValues",()=>{var r,i;return(i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.propValues}),M(e._zod,"optin",()=>{var r,i;return((i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.optin)??void 0}),M(e._zod,"optout",()=>{var r,i;return((i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.optout)??void 0}),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),jl=h("$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=>nc(o,r,i,e));nc(n,r,i,e)}});function nc(e,t,r,i){if(!e){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(mt(n))}}const Qg=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(n){return e[n]??null}const r={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${n.expected}، ولكن تم إدخال ${c}`:`مدخلات غير مقبولة: يفترض إدخال ${o}، ولكن تم إدخال ${c}`}case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${U(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 ev(){return{localeError:Qg()}}const tv=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Yanlış dəyər: gözlənilən instanceof ${n.expected}, daxil olan ${c}`:`Yanlış dəyər: gözlənilən ${o}, daxil olan ${c}`}case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${U(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${_(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 nv(){return{localeError:tv()}}function rc(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 rv=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(n){return e[n]??null}const r={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Няправільны ўвод: чакаўся instanceof ${n.expected}, атрымана ${c}`:`Няправільны ўвод: чакаўся ${o}, атрымана ${c}`}case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${U(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${_(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const c=Number(n.maximum),s=rc(c,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 c=Number(n.minimum),s=rc(c,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 iv(){return{localeError:rv()}}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=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Невалиден вход: очакван instanceof ${n.expected}, получен ${c}`:`Невалиден вход: очакван ${o}, получен ${c}`}case"invalid_value":return n.values.length===1?`Невалиден вход: очакван ${U(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 av(){return{localeError:ov()}}const cv=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus invàlid: s'esperava instanceof ${n.expected}, s'ha rebut ${c}`:`Tipus invàlid: s'esperava ${o}, s'ha rebut ${c}`}case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${U(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 uv(){return{localeError:cv()}}const sv=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(n){return e[n]??null}const r={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatný vstup: očekáváno instanceof ${n.expected}, obdrženo ${c}`:`Neplatný vstup: očekáváno ${o}, obdrženo ${c}`}case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${U(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${_(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 lv(){return{localeError:sv()}}const dv=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${c}`:`Ugyldigt input: forventede ${o}, fik ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig værdi: forventede ${U(n.values[0])}`:`Ugyldigt valg: forventede en af følgende ${_(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),c=i[n.origin]??n.origin;return a?`For stor: forventede ${c??"value"} ${a.verb} ${o} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),c=i[n.origin]??n.origin;return a?`For lille: forventede ${c} ${a.verb} ${o} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${c} 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 fv(){return{localeError:dv()}}const mv=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}const r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ungültige Eingabe: erwartet instanceof ${n.expected}, erhalten ${c}`:`Ungültige Eingabe: erwartet ${o}, erhalten ${c}`}case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${U(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 pv(){return{localeError:mv()}}const hv=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return`Invalid input: expected ${o}, received ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${U(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 Pl(){return{localeError:hv()}}const gv=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendiĝis instanceof ${n.expected}, riceviĝis ${c}`:`Nevalida enigo: atendiĝis ${o}, riceviĝis ${c}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendiĝis ${U(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 vv(){return{localeError:gv()}}const bv=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inválida: se esperaba instanceof ${n.expected}, recibido ${c}`:`Entrada inválida: se esperaba ${o}, recibido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inválida: se esperaba ${U(n.values[0])}`:`Opción inválida: se esperaba una de ${_(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),c=i[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),c=i[n.origin]??n.origin;return a?`Demasiado pequeño: se esperaba que ${c} tuviera ${o}${n.minimum.toString()} ${a.unit}`:`Demasiado pequeño: se esperaba que ${c} 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 yv(){return{localeError:bv()}}const _v=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(n){return e[n]??null}const r={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`ورودی نامعتبر: میبایست instanceof ${n.expected} میبود، ${c} دریافت شد`:`ورودی نامعتبر: میبایست ${o} میبود، ${c} دریافت شد`}case"invalid_value":return n.values.length===1?`ورودی نامعتبر: میبایست ${U(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 $v(){return{localeError:_v()}}const wv=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(n){return e[n]??null}const r={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${c}`}case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${U(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${_(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 Sv(){return{localeError:wv()}}const kv=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrée invalide : instanceof ${n.expected} attendu, ${c} reçu`:`Entrée invalide : ${o} attendu, ${c} reçu`}case"invalid_value":return n.values.length===1?`Entrée invalide : ${U(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 Iv(){return{localeError:kv()}}const xv=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrée invalide : attendu instanceof ${n.expected}, reçu ${c}`:`Entrée invalide : attendu ${o}, reçu ${c}`}case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${U(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 Tv(){return{localeError:xv()}}const zv=()=>{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=u=>u?e[u]:void 0,i=u=>{const l=r(u);return l?l.label:u??e.unknown.label},n=u=>`ה${i(u)}`,o=u=>{const l=r(u);return((l==null?void 0:l.gender)??"m")==="f"?"צריכה להיות":"צריך להיות"},a=u=>u?t[u]??null:null,c={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 u=>{var l;switch(u.code){case"invalid_type":{const d=u.expected,f=s[d??""]??i(d),m=D(u.input),g=s[m]??((l=e[m])==null?void 0:l.label)??m;return/^[A-Z]/.test(u.expected)?`קלט לא תקין: צריך להיות instanceof ${u.expected}, התקבל ${g}`:`קלט לא תקין: צריך להיות ${f}, התקבל ${g}`}case"invalid_value":{if(u.values.length===1)return`ערך לא תקין: הערך חייב להיות ${U(u.values[0])}`;const d=u.values.map(g=>U(g));if(u.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(u.origin),f=n(u.origin??"value");if(u.origin==="string")return`${(d==null?void 0:d.longLabel)??"ארוך"} מדי: ${f} צריכה להכיל ${u.maximum.toString()} ${(d==null?void 0:d.unit)??""} ${u.inclusive?"או פחות":"לכל היותר"}`.trim();if(u.origin==="number"){const p=u.inclusive?`קטן או שווה ל-${u.maximum}`:`קטן מ-${u.maximum}`;return`גדול מדי: ${f} צריך להיות ${p}`}if(u.origin==="array"||u.origin==="set"){const p=u.origin==="set"?"צריכה":"צריך",v=u.inclusive?`${u.maximum} ${(d==null?void 0:d.unit)??""} או פחות`:`פחות מ-${u.maximum} ${(d==null?void 0:d.unit)??""}`;return`גדול מדי: ${f} ${p} להכיל ${v}`.trim()}const m=u.inclusive?"<=":"<",g=o(u.origin??"value");return d!=null&&d.unit?`${d.longLabel} מדי: ${f} ${g} ${m}${u.maximum.toString()} ${d.unit}`:`${(d==null?void 0:d.longLabel)??"גדול"} מדי: ${f} ${g} ${m}${u.maximum.toString()}`}case"too_small":{const d=a(u.origin),f=n(u.origin??"value");if(u.origin==="string")return`${(d==null?void 0:d.shortLabel)??"קצר"} מדי: ${f} צריכה להכיל ${u.minimum.toString()} ${(d==null?void 0:d.unit)??""} ${u.inclusive?"או יותר":"לפחות"}`.trim();if(u.origin==="number"){const p=u.inclusive?`גדול או שווה ל-${u.minimum}`:`גדול מ-${u.minimum}`;return`קטן מדי: ${f} צריך להיות ${p}`}if(u.origin==="array"||u.origin==="set"){const p=u.origin==="set"?"צריכה":"צריך";if(u.minimum===1&&u.inclusive){const w=(u.origin==="set","לפחות פריט אחד");return`קטן מדי: ${f} ${p} להכיל ${w}`}const v=u.inclusive?`${u.minimum} ${(d==null?void 0:d.unit)??""} או יותר`:`יותר מ-${u.minimum} ${(d==null?void 0:d.unit)??""}`;return`קטן מדי: ${f} ${p} להכיל ${v}`.trim()}const m=u.inclusive?">=":">",g=o(u.origin??"value");return d!=null&&d.unit?`${d.shortLabel} מדי: ${f} ${g} ${m}${u.minimum.toString()} ${d.unit}`:`${(d==null?void 0:d.shortLabel)??"קטן"} מדי: ${f} ${g} ${m}${u.minimum.toString()}`}case"invalid_format":{const d=u;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=c[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`מספר לא תקין: חייב להיות מכפלה של ${u.divisor}`;case"unrecognized_keys":return`מפתח${u.keys.length>1?"ות":""} לא מזוה${u.keys.length>1?"ים":"ה"}: ${_(u.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n(u.origin??"array")}`;default:return"קלט לא תקין"}}};function Ev(){return{localeError:zv()}}const Ov=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"szám",array:"tömb"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Érvénytelen bemenet: a várt érték instanceof ${n.expected}, a kapott érték ${c}`:`Érvénytelen bemenet: a várt érték ${o}, a kapott érték ${c}`}case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${U(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${_(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 Uv(){return{localeError:Ov()}}function ic(e,t,r){return Math.abs(e)===1?t:r}function ot(e){if(!e)return"";const t=["ա","ե","ը","ի","ո","ու","օ"],r=e[e.length-1];return e+(t.includes(r)?"ն":"ը")}const Dv=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(n){return e[n]??null}const r={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${n.expected}, ստացվել է ${c}`:`Սխալ մուտքագրում․ սպասվում էր ${o}, ստացվել է ${c}`}case"invalid_value":return n.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${U(n.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${_(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const c=Number(n.maximum),s=ic(c,a.unit.one,a.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ot(n.origin??"արժեք")} կունենա ${o}${n.maximum.toString()} ${s}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ot(n.origin??"արժեք")} լինի ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const c=Number(n.minimum),s=ic(c,a.unit.one,a.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ot(n.origin)} կունենա ${o}${n.minimum.toString()} ${s}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ot(n.origin)} լինի ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Սխալ տող․ պետք է սկսվի "${o.prefix}"-ով`:o.format==="ends_with"?`Սխալ տող․ պետք է ավարտվի "${o.suffix}"-ով`:o.format==="includes"?`Սխալ տող․ պետք է պարունակի "${o.includes}"`:o.format==="regex"?`Սխալ տող․ պետք է համապատասխանի ${o.pattern} ձևաչափին`:`Սխալ ${r[o.format]??n.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${n.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${n.keys.length>1?"ներ":""}. ${_(n.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${ot(n.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${ot(n.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function Nv(){return{localeError:Dv()}}const jv=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${o}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${U(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 Pv(){return{localeError:jv()}}const Av=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(n){return e[n]??null}const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: Þú slóst inn ${c} þar sem á að vera instanceof ${n.expected}`:`Rangt gildi: Þú slóst inn ${c} þar sem á að vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert ráð fyrir ${U(n.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${_(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 Lv(){return{localeError:Av()}}const Cv=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${c}`:`Input non valido: atteso ${o}, ricevuto ${c}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${U(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 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:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`無効な入力: instanceof ${n.expected}が期待されましたが、${c}が入力されました`:`無効な入力: ${o}が期待されましたが、${c}が入力されました`}case"invalid_value":return n.values.length===1?`無効な入力: ${U(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 Rv(){return{localeError:Mv()}}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:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${n.expected}, მიღებული ${c}`:`არასწორი შეყვანა: მოსალოდნელი ${o}, მიღებული ${c}`}case"invalid_value":return n.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${U(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 Vv(){return{localeError:Fv()}}const Bv=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(n){return e[n]??null}const r={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${n.expected} ប៉ុន្តែទទួលបាន ${c}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${o} ប៉ុន្តែទទួលបាន ${c}`}case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${U(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:Bv()}}function Kv(){return Al()}const Jv=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`잘못된 입력: 예상 타입은 instanceof ${n.expected}, 받은 타입은 ${c}입니다`:`잘못된 입력: 예상 타입은 ${o}, 받은 타입은 ${c}입니다`}case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${U(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${_(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",a=o==="미만"?"이어야 합니다":"여야 합니다",c=t(n.origin),s=(c==null?void 0:c.unit)??"요소";return c?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${s} ${o}${a}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${a}`}case"too_small":{const o=n.inclusive?"이상":"초과",a=o==="이상"?"이어야 합니다":"여야 합니다",c=t(n.origin),s=(c==null?void 0:c.unit)??"요소";return c?`${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 Gv(){return{localeError:Jv()}}const It=e=>e.charAt(0).toUpperCase()+e.slice(1);function oc(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 Wv=()=>{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,c){const s=e[n]??null;return s===null?s:{unit:s.unit[o],verb:s.verb[c][a?"inclusive":"notInclusive"]}}const r={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},i={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${c}, o tikėtasi - instanceof ${n.expected}`:`Gautas tipas ${c}, o tikėtasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo būti ${U(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,oc(Number(n.maximum)),n.inclusive??!1,"smaller");if(a!=null&&a.verb)return`${It(o??n.origin??"reikšmė")} ${a.verb} ${n.maximum.toString()} ${a.unit??"elementų"}`;const c=n.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${It(o??n.origin??"reikšmė")} turi būti ${c} ${n.maximum.toString()} ${a==null?void 0:a.unit}`}case"too_small":{const o=i[n.origin]??n.origin,a=t(n.origin,oc(Number(n.minimum)),n.inclusive??!1,"bigger");if(a!=null&&a.verb)return`${It(o??n.origin??"reikšmė")} ${a.verb} ${n.minimum.toString()} ${a.unit??"elementų"}`;const c=n.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${It(o??n.origin??"reikšmė")} turi būti ${c} ${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`${It(o??n.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Hv(){return{localeError:Wv()}}const qv=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(n){return e[n]??null}const r={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},i={nan:"NaN",number:"број",array:"низа"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Грешен внес: се очекува instanceof ${n.expected}, примено ${c}`:`Грешен внес: се очекува ${o}, примено ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${U(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 Xv(){return{localeError:qv()}}const Yv=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${c}`:`Input tidak sah: dijangka ${o}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${U(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 Qv(){return{localeError:Yv()}}const eb=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}const r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${o}, ontving ${c}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${U(n.values[0])}`:`Ongeldige optie: verwacht één van ${_(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),c=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${c}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${c}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),c=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${c}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${c}: 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 tb(){return{localeError:eb()}}const nb=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${c}`:`Ugyldig input: forventet ${o}, fikk ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${U(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 rb(){return{localeError:nb()}}const ib=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(n){return e[n]??null}const r={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Fâsit giren: umulan instanceof ${n.expected}, alınan ${c}`:`Fâsit giren: umulan ${o}, alınan ${c}`}case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${U(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 ob(){return{localeError:ib()}}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:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`ناسم ورودي: باید instanceof ${n.expected} وای, مګر ${c} ترلاسه شو`:`ناسم ورودي: باید ${o} وای, مګر ${c} ترلاسه شو`}case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${U(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:ab()}}const ub=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(n){return e[n]??null}const r={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${n.expected}, otrzymano ${c}`:`Nieprawidłowe dane wejściowe: oczekiwano ${o}, otrzymano ${c}`}case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${U(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${_(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 sb(){return{localeError:ub()}}const lb=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"número",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inválido: esperado instanceof ${n.expected}, recebido ${c}`:`Tipo inválido: esperado ${o}, recebido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${U(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 db(){return{localeError:lb()}}function ac(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 fb=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(n){return e[n]??null}const r={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Неверный ввод: ожидалось instanceof ${n.expected}, получено ${c}`:`Неверный ввод: ожидалось ${o}, получено ${c}`}case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${U(n.values[0])}`:`Неверный вариант: ожидалось одно из ${_(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const c=Number(n.maximum),s=ac(c,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 c=Number(n.minimum),s=ac(c,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 mb(){return{localeError:fb()}}const pb=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"število",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pričakovano instanceof ${n.expected}, prejeto ${c}`:`Neveljaven vnos: pričakovano ${o}, prejeto ${c}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${U(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 hb(){return{localeError:pb()}}const gb=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(n){return e[n]??null}const r={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: förväntat instanceof ${n.expected}, fick ${c}`:`Ogiltig inmatning: förväntat ${o}, fick ${c}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${U(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 vb(){return{localeError:gb()}}const bb=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(n){return e[n]??null}const r={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${n.expected}, பெறப்பட்டது ${c}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${o}, பெறப்பட்டது ${c}`}case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${U(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 yb(){return{localeError:bb()}}const _b=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(n){return e[n]??null}const r={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${n.expected} แต่ได้รับ ${c}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${o} แต่ได้รับ ${c}`}case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${U(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 $b(){return{localeError:_b()}}const wb=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(n){return e[n]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Geçersiz değer: beklenen instanceof ${n.expected}, alınan ${c}`:`Geçersiz değer: beklenen ${o}, alınan ${c}`}case"invalid_value":return n.values.length===1?`Geçersiz değer: beklenen ${U(n.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${_(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 Sb(){return{localeError:wb()}}const kb=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(n){return e[n]??null}const r={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Неправильні вхідні дані: очікується instanceof ${n.expected}, отримано ${c}`:`Неправильні вхідні дані: очікується ${o}, отримано ${c}`}case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${U(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:kb()}}function Ib(){return Ll()}const xb=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(n){return e[n]??null}const r={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`غلط ان پٹ: instanceof ${n.expected} متوقع تھا، ${c} موصول ہوا`:`غلط ان پٹ: ${o} متوقع تھا، ${c} موصول ہوا`}case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${U(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 Tb(){return{localeError:xb()}}const zb=()=>{const e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function t(n){return e[n]??null}const r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${c}`:`Noto‘g‘ri kirish: kutilgan ${o}, qabul qilingan ${c}`}case"invalid_value":return n.values.length===1?`Noto‘g‘ri kirish: kutilgan ${U(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 Eb(){return{localeError:zb()}}const Ob=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(n){return e[n]??null}const r={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},i={nan:"NaN",number:"số",array:"mảng"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=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 ${c}`:`Đầu vào không hợp lệ: mong đợi ${o}, nhận được ${c}`}case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${U(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${_(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 Ub(){return{localeError:Ob()}}const Db=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(n){return e[n]??null}const r={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`无效输入:期望 instanceof ${n.expected},实际接收 ${c}`:`无效输入:期望 ${o},实际接收 ${c}`}case"invalid_value":return n.values.length===1?`无效输入:期望 ${U(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 Nb(){return{localeError:Db()}}const jb=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(n){return e[n]??null}const r={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=i[a]??a;return/^[A-Z]/.test(n.expected)?`無效的輸入值:預期為 instanceof ${n.expected},但收到 ${c}`:`無效的輸入值:預期為 ${o},但收到 ${c}`}case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${U(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 Pb(){return{localeError:jb()}}const Ab=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(n){return e[n]??null}const r={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=D(n.input),c=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í ${c}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${o}, àmọ̀ a rí ${c}`}case"invalid_value":return n.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${U(n.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${_(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 Lb(){return{localeError:Ab()}}const Cl=Object.freeze(Object.defineProperty({__proto__:null,ar:ev,az:nv,be:iv,bg:av,ca:uv,cs:lv,da:fv,de:pv,en:Pl,eo:vv,es:yv,fa:$v,fi:Sv,fr:Iv,frCA:Tv,he:Ev,hu:Uv,hy:Nv,id:Pv,is:Lv,it:Zv,ja:Rv,ka:Vv,kh:Kv,km:Al,ko:Gv,lt:Hv,mk:Xv,ms:Qv,nl:tb,no:rb,ota:ob,pl:sb,ps:cb,pt:db,ru:mb,sl:hb,sv:vb,ta:yb,th:$b,tr:Sb,ua:Ib,uk:Ll,ur:Tb,uz:Eb,vi:Ub,yo:Lb,zhCN:Nb,zhTW:Pb},Symbol.toStringTag,{value:"Module"}));var cc;const Zl=Symbol("ZodOutput"),Ml=Symbol("ZodInput");class Rl{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Ki(){return new Rl}(cc=globalThis).__zod_globalRegistry??(cc.__zod_globalRegistry=Ki());const _e=globalThis.__zod_globalRegistry;function Fl(e,t){return new e({type:"string",...b(t)})}function Vl(e,t){return new e({type:"string",coerce:!0,...b(t)})}function Ji(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...b(t)})}function Un(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...b(t)})}function Gi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...b(t)})}function Wi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...b(t)})}function Hi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...b(t)})}function qi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...b(t)})}function Wn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...b(t)})}function Xi(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...b(t)})}function Yi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...b(t)})}function Qi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...b(t)})}function eo(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...b(t)})}function to(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...b(t)})}function no(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...b(t)})}function ro(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...b(t)})}function io(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...b(t)})}function oo(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...b(t)})}function Bl(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...b(t)})}function ao(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...b(t)})}function co(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...b(t)})}function uo(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...b(t)})}function so(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...b(t)})}function lo(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...b(t)})}function fo(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...b(t)})}const Kl={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Jl(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...b(t)})}function Gl(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 Hl(e,t){return new e({type:"string",format:"duration",check:"string_format",...b(t)})}function ql(e,t){return new e({type:"number",checks:[],...b(t)})}function Xl(e,t){return new e({type:"number",coerce:!0,checks:[],...b(t)})}function Yl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...b(t)})}function Ql(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...b(t)})}function ed(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...b(t)})}function td(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...b(t)})}function nd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...b(t)})}function rd(e,t){return new e({type:"boolean",...b(t)})}function id(e,t){return new e({type:"boolean",coerce:!0,...b(t)})}function od(e,t){return new e({type:"bigint",...b(t)})}function ad(e,t){return new e({type:"bigint",coerce:!0,...b(t)})}function cd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...b(t)})}function ud(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...b(t)})}function sd(e,t){return new e({type:"symbol",...b(t)})}function ld(e,t){return new e({type:"undefined",...b(t)})}function dd(e,t){return new e({type:"null",...b(t)})}function fd(e){return new e({type:"any"})}function md(e){return new e({type:"unknown"})}function pd(e,t){return new e({type:"never",...b(t)})}function hd(e,t){return new e({type:"void",...b(t)})}function gd(e,t){return new e({type:"date",...b(t)})}function vd(e,t){return new e({type:"date",coerce:!0,...b(t)})}function bd(e,t){return new e({type:"nan",...b(t)})}function Fe(e,t){return new Ai({check:"less_than",...b(t),value:e,inclusive:!1})}function $e(e,t){return new Ai({check:"less_than",...b(t),value:e,inclusive:!0})}function Ve(e,t){return new Li({check:"greater_than",...b(t),value:e,inclusive:!1})}function me(e,t){return new Li({check:"greater_than",...b(t),value:e,inclusive:!0})}function mo(e){return Ve(0,e)}function po(e){return Fe(0,e)}function ho(e){return $e(0,e)}function go(e){return me(0,e)}function ht(e,t){return new ns({check:"multiple_of",...b(t),value:e})}function wt(e,t){return new os({check:"max_size",...b(t),maximum:e})}function Be(e,t){return new as({check:"min_size",...b(t),minimum:e})}function Bt(e,t){return new cs({check:"size_equals",...b(t),size:e})}function Kt(e,t){return new us({check:"max_length",...b(t),maximum:e})}function tt(e,t){return new ss({check:"min_length",...b(t),minimum:e})}function Jt(e,t){return new ls({check:"length_equals",...b(t),length:e})}function Hn(e,t){return new ds({check:"string_format",format:"regex",...b(t),pattern:e})}function qn(e){return new fs({check:"string_format",format:"lowercase",...b(e)})}function Xn(e){return new ms({check:"string_format",format:"uppercase",...b(e)})}function Yn(e,t){return new ps({check:"string_format",format:"includes",...b(t),includes:e})}function Qn(e,t){return new hs({check:"string_format",format:"starts_with",...b(t),prefix:e})}function er(e,t){return new gs({check:"string_format",format:"ends_with",...b(t),suffix:e})}function vo(e,t,r){return new vs({check:"property",property:e,schema:t,...b(r)})}function tr(e,t){return new bs({check:"mime_type",mime:e,...b(t)})}function Le(e){return new ys({check:"overwrite",tx:e})}function nr(e){return Le(t=>t.normalize(e))}function rr(){return Le(e=>e.trim())}function ir(){return Le(e=>e.toLowerCase())}function or(){return Le(e=>e.toUpperCase())}function ar(){return Le(e=>Qc(e))}function yd(e,t,r){return new e({type:"array",element:t,...b(r)})}function Cb(e,t,r){return new e({type:"union",options:t,...b(r)})}function Zb(e,t,r){return new e({type:"union",options:t,inclusive:!1,...b(r)})}function Mb(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...b(i)})}function Rb(e,t,r){return new e({type:"intersection",left:t,right:r})}function Fb(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 Vb(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...b(i)})}function Bb(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...b(i)})}function Kb(e,t,r){return new e({type:"set",valueType:t,...b(r)})}function Jb(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 Gb(e,t,r){return new e({type:"enum",entries:t,...b(r)})}function Wb(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...b(r)})}function _d(e,t){return new e({type:"file",...b(t)})}function Hb(e,t){return new e({type:"transform",transform:t})}function qb(e,t){return new e({type:"optional",innerType:t})}function Xb(e,t){return new e({type:"nullable",innerType:t})}function Yb(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Bn(r)}})}function Qb(e,t,r){return new e({type:"nonoptional",innerType:t,...b(r)})}function e1(e,t){return new e({type:"success",innerType:t})}function t1(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function n1(e,t,r){return new e({type:"pipe",in:t,out:r})}function r1(e,t){return new e({type:"readonly",innerType:t})}function i1(e,t,r){return new e({type:"template_literal",parts:t,...b(r)})}function o1(e,t){return new e({type:"lazy",getter:t})}function a1(e,t){return new e({type:"promise",innerType:t})}function $d(e,t,r){const i=b(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function wd(e,t,r){return new e({type:"custom",check:"custom",fn:t,...b(r)})}function Sd(e){const t=kd(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(mt(i,r.value,t._zod.def));else{const n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(mt(n))}},e(r.value,r)));return t}function kd(e,t){const r=new Y({check:"custom",...b(t)});return r._zod.check=e,r}function Id(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 xd(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 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),c=e.Codec??Bi,s=e.Boolean??Mi,u=e.String??Vt,l=new u({type:"string",error:r.error}),d=new s({type:"boolean",error:r.error}),f=new c({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 Gt(e,t,r,i={}){const n=b(i),o={...b(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:c=>r.test(c),...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 c=(d=(l=e._zod).toJSONSchema)==null?void 0:d.call(l);if(c)a.schema=c;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),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,c,s,u;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const l of e.seen.entries()){const d=(a=e.metadataRegistry.get(l[0]))==null?void 0:a.id;if(d){const f=i.get(d);if(f&&f!==l[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(d,l[0])}}const n=l=>{var p;const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=(p=e.external.registry.get(l[0]))==null?void 0:p.id,w=e.external.uri??(T=>T);if(v)return{ref:w(v)};const z=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=z,{defId:z,ref:`${w("__shared")}#/${d}/${z}`}}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: #/${(c=d.cycle)==null?void 0:c.join("/")}/<root>
|
|
61
|
+
`)}m.write("payload.value = newResult;"),m.write("return payload;");const E=m.compile();return(z,M)=>E(f,z,M)};let o;const a=ft,u=!Tn.jitless,c=u&&Yu.value,l=t.catchall;let d;e._zod.parse=(f,m)=>{d??(d=i.value);const h=f.value;return a(h)?u&&c&&(m==null?void 0:m.async)===!1&&m.jitless!==!0?(o||(o=n(t.shape)),f=o(f,m),l?ol([],h,f,m,d,e):f):r(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function Ka(e,t,r,i){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const n=e.filter(o=>!Xe(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>$e(a,i,le())))}),t)}const Gn=g("$ZodUnion",(e,t)=>{L.init(e,t),Z(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Z(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Z(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Z(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>Vn(o.source)).join("|")})$`)}});const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let a=!1;const u=[];for(const s of t.options){const c=s._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)u.push(c),a=!0;else{if(c.issues.length===0)return c;u.push(c)}}return a?Promise.all(u).then(s=>Ka(s,n,e,o)):Ka(u,n,e,o)}});function Ja(e,t,r,i){const n=e.filter(o=>o.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>$e(a,i,le())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}const cl=g("$ZodXor",(e,t)=>{Gn.init(e,t),t.inclusive=!1;const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let a=!1;const u=[];for(const s of t.options){const c=s._zod.run({value:n.value,issues:[]},o);c instanceof Promise?(u.push(c),a=!0):u.push(c)}return a?Promise.all(u).then(s=>Ja(s,n,e,o)):Ja(u,n,e,o)}}),sl=g("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Gn.init(e,t);const r=e._zod.parse;Z(e._zod,"propValues",()=>{const n={};for(const o of t.options){const a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[u,s]of Object.entries(a)){n[u]||(n[u]=new Set);for(const c of s)n[u].add(c)}}return n});const i=At(()=>{var a;const n=t.options,o=new Map;for(const u of n){const s=(a=u._zod.propValues)==null?void 0:a[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(const c of s){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,u)}}return o});e._zod.parse=(n,o)=>{const a=n.value;if(!ft(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;const u=i.value.get(a==null?void 0:a[t.discriminator]);return u?u._zod.run(n,o):t.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),n)}}),ll=g("$ZodIntersection",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value,o=t.left._zod.run({value:n,issues:[]},i),a=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([s,c])=>Ga(r,s,c)):Ga(r,o,a)}});function ai(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Qe(e)&&Qe(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(const o of i){const a=ai(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const n=e[i],o=t[i],a=ai(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Ga(e,t,r){const i=new Map;let n;for(const u of t.issues)if(u.code==="unrecognized_keys"){n??(n=u);for(const s of u.keys)i.has(s)||i.set(s,{}),i.get(s).l=!0}else e.issues.push(u);for(const u of r.issues)if(u.code==="unrecognized_keys")for(const s of u.keys)i.has(s)||i.set(s,{}),i.get(s).r=!0;else e.issues.push(u);const o=[...i].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(o.length&&n&&e.issues.push({...n,keys:o}),Xe(e))return e;const a=ai(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Fi=g("$ZodTuple",(e,t)=>{L.init(e,t);const r=t.items;e._zod.parse=(i,n)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const a=[],u=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),s=u===-1?0:r.length-u;if(!t.rest){const l=o.length>r.length,d=o.length<s-1;if(l||d)return i.issues.push({...l?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:e,origin:"array"}),i}let c=-1;for(const l of r){if(c++,c>=o.length&&c>=s)continue;const d=l._zod.run({value:o[c],issues:[]},n);d instanceof Promise?a.push(d.then(f=>sn(f,i,c))):sn(d,i,c)}if(t.rest){const l=o.slice(r.length);for(const d of l){c++;const f=t.rest._zod.run({value:d,issues:[]},n);f instanceof Promise?a.push(f.then(m=>sn(m,i,c))):sn(f,i,c)}}return a.length?Promise.all(a).then(()=>i):i}});function sn(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues)),t.value[r]=e.value}const dl=g("$ZodRecord",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Qe(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;const o=[],a=t.keyType._zod.values;if(a){r.value={};const u=new Set;for(const c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){u.add(typeof c=="number"?c.toString():c);const l=t.valueType._zod.run({value:n[c],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...Ie(c,d.issues)),r.value[c]=d.value})):(l.issues.length&&r.issues.push(...Ie(c,l.issues)),r.value[c]=l.value)}let s;for(const c in n)u.has(c)||(s=s??[],s.push(c));s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:s})}else{r.value={};for(const u of Reflect.ownKeys(n)){if(u==="__proto__")continue;let s=t.keyType._zod.run({value:u,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&ji.test(u)&&s.issues.length){const d=t.keyType._zod.run({value:Number(u),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(s=d)}if(s.issues.length){t.mode==="loose"?r.value[u]=n[u]:r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(d=>$e(d,i,le())),input:u,path:[u],inst:e});continue}const l=t.valueType._zod.run({value:n[u],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...Ie(u,d.issues)),r.value[s.value]=d.value})):(l.issues.length&&r.issues.push(...Ie(u,l.issues)),r.value[s.value]=l.value)}}return o.length?Promise.all(o).then(()=>r):r}}),fl=g("$ZodMap",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;const o=[];r.value=new Map;for(const[a,u]of n){const s=t.keyType._zod.run({value:a,issues:[]},i),c=t.valueType._zod.run({value:u,issues:[]},i);s instanceof Promise||c instanceof Promise?o.push(Promise.all([s,c]).then(([l,d])=>{qa(l,d,r,a,n,e,i)})):qa(s,c,r,a,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function qa(e,t,r,i,n,o,a){e.issues.length&&(En.has(typeof i)?r.issues.push(...Ie(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(u=>$e(u,a,le()))})),t.issues.length&&(En.has(typeof i)?r.issues.push(...Ie(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(u=>$e(u,a,le()))})),r.value.set(e.value,t.value)}const ml=g("$ZodSet",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;const o=[];r.value=new Set;for(const a of n){const u=t.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(s=>Wa(s,r))):Wa(u,r)}return o.length?Promise.all(o).then(()=>r):r}});function Wa(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const pl=g("$ZodEnum",(e,t)=>{L.init(e,t);const r=yi(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>En.has(typeof n)).map(n=>typeof n=="string"?je(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{const a=n.value;return i.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),hl=g("$ZodLiteral",(e,t)=>{if(L.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?je(i):i?je(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,n)=>{const o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),gl=g("$ZodFile",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),vl=g("$ZodTransform",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Fn(e.constructor.name);const n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new Ye;return r.value=n,r}});function Ha(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Vi=g("$ZodOptional",(e,t)=>{L.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Z(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Z(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Vn(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ha(o,r.value)):Ha(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),bl=g("$ZodExactOptional",(e,t)=>{Vi.init(e,t),Z(e._zod,"values",()=>t.innerType._zod.values),Z(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),_l=g("$ZodNullable",(e,t)=>{L.init(e,t),Z(e._zod,"optin",()=>t.innerType._zod.optin),Z(e._zod,"optout",()=>t.innerType._zod.optout),Z(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Vn(r.source)}|null)$`):void 0}),Z(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),yl=g("$ZodDefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",Z(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Xa(o,t)):Xa(n,t)}});function Xa(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const $l=g("$ZodPrefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",Z(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),wl=g("$ZodNonOptional",(e,t)=>{L.init(e,t),Z(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ya(o,e)):Ya(n,e)}});function Ya(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Sl=g("$ZodSuccess",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Fn("ZodSuccess");const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),kl=g("$ZodCatch",(e,t)=>{L.init(e,t),Z(e._zod,"optin",()=>t.innerType._zod.optin),Z(e._zod,"optout",()=>t.innerType._zod.optout),Z(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(a=>$e(a,i,le()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>$e(o,i,le()))},input:r.value}),r.issues=[]),r)}}),Il=g("$ZodNaN",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),xl=g("$ZodPipe",(e,t)=>{L.init(e,t),Z(e._zod,"values",()=>t.in._zod.values),Z(e._zod,"optin",()=>t.in._zod.optin),Z(e._zod,"optout",()=>t.out._zod.optout),Z(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>ln(a,t.in,i)):ln(o,t.in,i)}const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>ln(o,t.out,i)):ln(n,t.out,i)}});function ln(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const Bi=g("$ZodCodec",(e,t)=>{L.init(e,t),Z(e._zod,"values",()=>t.in._zod.values),Z(e._zod,"optin",()=>t.in._zod.optin),Z(e._zod,"optout",()=>t.out._zod.optout),Z(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){const o=t.in._zod.run(r,i);return o instanceof Promise?o.then(a=>dn(a,t,i)):dn(o,t,i)}else{const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>dn(a,t,i)):dn(o,t,i)}}});function dn(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>fn(e,o,t.out,r)):fn(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>fn(e,o,t.in,r)):fn(e,n,t.in,r)}}function fn(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}const Tl=g("$ZodReadonly",(e,t)=>{L.init(e,t),Z(e._zod,"propValues",()=>t.innerType._zod.propValues),Z(e._zod,"values",()=>t.innerType._zod.values),Z(e._zod,"optin",()=>{var r,i;return(i=(r=t.innerType)==null?void 0:r._zod)==null?void 0:i.optin}),Z(e._zod,"optout",()=>{var r,i;return(i=(r=t.innerType)==null?void 0:r._zod)==null?void 0:i.optout}),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Qa):Qa(n)}});function Qa(e){return e.value=Object.freeze(e.value),e}const zl=g("$ZodTemplateLiteral",(e,t)=>{L.init(e,t);const r=[];for(const i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const o=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,a))}else if(i===null||Qu.has(typeof i))r.push(je(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),El=g("$ZodFunction",(e,t)=>(L.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){const n=e._def.input?ii(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?ii(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){const n=e._def.input?await oi(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await oi(e._def.output,o):o}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Fi({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),Ol=g("$ZodPromise",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),Ul=g("$ZodLazy",(e,t)=>{L.init(e,t),Z(e._zod,"innerType",()=>t.getter()),Z(e._zod,"pattern",()=>{var r,i;return(i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.pattern}),Z(e._zod,"propValues",()=>{var r,i;return(i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.propValues}),Z(e._zod,"optin",()=>{var r,i;return((i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.optin)??void 0}),Z(e._zod,"optout",()=>{var r,i;return((i=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:i.optout)??void 0}),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Dl=g("$ZodCustom",(e,t)=>{X.init(e,t),L.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>eu(o,r,i,e));eu(n,r,i,e)}});function eu(e,t,r,i){if(!e){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(mt(n))}}const Yg=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(n){return e[n]??null}const r={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${n.expected}، ولكن تم إدخال ${u}`:`مدخلات غير مقبولة: يفترض إدخال ${o}، ولكن تم إدخال ${u}`}case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${D(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()} ${a.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()} ${a.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${r[o.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${y(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function Qg(){return{localeError:Yg()}}const ev=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Yanlış dəyər: gözlənilən instanceof ${n.expected}, daxil olan ${u}`:`Yanlış dəyər: gözlənilən ${o}, daxil olan ${u}`}case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${D(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function tv(){return{localeError:ev()}}function tu(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const nv=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(n){return e[n]??null}const r={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Няправільны ўвод: чакаўся instanceof ${n.expected}, атрымана ${u}`:`Няправільны ўвод: чакаўся ${o}, атрымана ${u}`}case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${D(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=tu(u,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${a.verb} ${o}${n.maximum.toString()} ${s}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const u=Number(n.minimum),s=tu(u,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${a.verb} ${o}${n.minimum.toString()} ${s}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${r[o.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${y(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function rv(){return{localeError:nv()}}const iv=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(n){return e[n]??null}const r={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},i={nan:"NaN",number:"число",array:"масив"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Невалиден вход: очакван instanceof ${n.expected}, получен ${u}`:`Невалиден вход: очакван ${o}, получен ${u}`}case"invalid_value":return n.values.length===1?`Невалиден вход: очакван ${D(n.values[0])}`:`Невалидна опция: очаквано едно от ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Твърде голямо: очаква се ${n.origin??"стойност"} да съдържа ${o}${n.maximum.toString()} ${a.unit??"елемента"}`:`Твърде голямо: очаква се ${n.origin??"стойност"} да бъде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Твърде малко: очаква се ${n.origin} да съдържа ${o}${n.minimum.toString()} ${a.unit}`:`Твърде малко: очаква се ${n.origin} да бъде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;if(o.format==="starts_with")return`Невалиден низ: трябва да започва с "${o.prefix}"`;if(o.format==="ends_with")return`Невалиден низ: трябва да завършва с "${o.suffix}"`;if(o.format==="includes")return`Невалиден низ: трябва да включва "${o.includes}"`;if(o.format==="regex")return`Невалиден низ: трябва да съвпада с ${o.pattern}`;let a="Невалиден";return o.format==="emoji"&&(a="Невалидно"),o.format==="datetime"&&(a="Невалидно"),o.format==="date"&&(a="Невалидна"),o.format==="time"&&(a="Невалидно"),o.format==="duration"&&(a="Невалидна"),`${a} ${r[o.format]??n.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${n.divisor}`;case"unrecognized_keys":return`Неразпознат${n.keys.length>1?"и":""} ключ${n.keys.length>1?"ове":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${n.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${n.origin}`;default:return"Невалиден вход"}}};function ov(){return{localeError:iv()}}const av=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus invàlid: s'esperava instanceof ${n.expected}, s'ha rebut ${u}`:`Tipus invàlid: s'esperava ${o}, s'ha rebut ${u}`}case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${D(n.values[0])}`:`Opció invàlida: s'esperava una de ${y(n.values," o ")}`;case"too_big":{const o=n.inclusive?"com a màxim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"com a mínim":"més de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingués ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};function uv(){return{localeError:av()}}const cv=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(n){return e[n]??null}const r={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatný vstup: očekáváno instanceof ${n.expected}, obdrženo ${u}`:`Neplatný vstup: očekáváno ${o}, obdrženo ${u}`}case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${D(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${o}${n.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${o}${n.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${y(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};function sv(){return{localeError:cv()}}const lv=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${u}`:`Ugyldigt input: forventede ${o}, fik ${u}`}case"invalid_value":return n.values.length===1?`Ugyldig værdi: forventede ${D(n.values[0])}`:`Ugyldigt valg: forventede en af følgende ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),u=i[n.origin]??n.origin;return a?`For stor: forventede ${u??"value"} ${a.verb} ${o} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),u=i[n.origin]??n.origin;return a?`For lille: forventede ${u} ${a.verb} ${o} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${u} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche mønsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${n.origin}`;default:return"Ugyldigt input"}}};function dv(){return{localeError:lv()}}const fv=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}const r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ungültige Eingabe: erwartet instanceof ${n.expected}, erhalten ${u}`:`Ungültige Eingabe: erwartet ${o}, erhalten ${u}`}case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${D(n.values[0])}`:`Ungültige Option: erwartet eine von ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};function mv(){return{localeError:fv()}}const pv=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return`Invalid input: expected ${o}, received ${u}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${D(n.values[0])}`:`Invalid option: expected one of ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function Nl(){return{localeError:pv()}}const hv=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendiĝis instanceof ${n.expected}, riceviĝis ${u}`:`Nevalida enigo: atendiĝis ${o}, riceviĝis ${u}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendiĝis ${D(n.values[0])}`:`Nevalida opcio: atendiĝis unu el ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendiĝis ke ${n.origin} havu ${o}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendiĝis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} ŝlosilo${n.keys.length>1?"j":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function gv(){return{localeError:hv()}}const vv=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inválida: se esperaba instanceof ${n.expected}, recibido ${u}`:`Entrada inválida: se esperaba ${o}, recibido ${u}`}case"invalid_value":return n.values.length===1?`Entrada inválida: se esperaba ${D(n.values[0])}`:`Opción inválida: se esperaba una de ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),u=i[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),u=i[n.origin]??n.origin;return a?`Demasiado pequeño: se esperaba que ${u} tuviera ${o}${n.minimum.toString()} ${a.unit}`:`Demasiado pequeño: se esperaba que ${u} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cadena inválida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inválida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inválida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${o.pattern}`:`Inválido ${r[o.format]??n.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[n.origin]??n.origin}`;default:return"Entrada inválida"}}};function bv(){return{localeError:vv()}}const _v=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(n){return e[n]??null}const r={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`ورودی نامعتبر: میبایست instanceof ${n.expected} میبود، ${u} دریافت شد`:`ورودی نامعتبر: میبایست ${o} میبود، ${u} دریافت شد`}case"invalid_value":return n.values.length===1?`ورودی نامعتبر: میبایست ${D(n.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${y(n.values,"|")} میبود`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} باشد`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} باشد`}case"invalid_format":{const o=n;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${r[o.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${y(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function yv(){return{localeError:_v()}}const $v=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(n){return e[n]??null}const r={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${u}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${u}`}case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${D(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${y(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function wv(){return{localeError:$v()}}const Sv=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrée invalide : instanceof ${n.expected} attendu, ${u} reçu`:`Entrée invalide : ${o} attendu, ${u} reçu`}case"invalid_value":return n.values.length===1?`Entrée invalide : ${D(n.values[0])} attendu`:`Option invalide : une valeur parmi ${y(n.values,"|")} attendue`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit être ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${y(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function kv(){return{localeError:Sv()}}const Iv=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrée invalide : attendu instanceof ${n.expected}, reçu ${u}`:`Entrée invalide : attendu ${o}, reçu ${u}`}case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${D(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"≤":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"≥":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${y(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function xv(){return{localeError:Iv()}}const Tv=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},r=c=>c?e[c]:void 0,i=c=>{const l=r(c);return l?l.label:c??e.unknown.label},n=c=>`ה${i(c)}`,o=c=>{const l=r(c);return((l==null?void 0:l.gender)??"m")==="f"?"צריכה להיות":"צריך להיות"},a=c=>c?t[c]??null:null,u={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},s={nan:"NaN"};return c=>{var l;switch(c.code){case"invalid_type":{const d=c.expected,f=s[d??""]??i(d),m=N(c.input),h=s[m]??((l=e[m])==null?void 0:l.label)??m;return/^[A-Z]/.test(c.expected)?`קלט לא תקין: צריך להיות instanceof ${c.expected}, התקבל ${h}`:`קלט לא תקין: צריך להיות ${f}, התקבל ${h}`}case"invalid_value":{if(c.values.length===1)return`ערך לא תקין: הערך חייב להיות ${D(c.values[0])}`;const d=c.values.map(h=>D(h));if(c.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${d[0]} או ${d[1]}`;const f=d[d.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${d.slice(0,-1).join(", ")} או ${f}`}case"too_big":{const d=a(c.origin),f=n(c.origin??"value");if(c.origin==="string")return`${(d==null?void 0:d.longLabel)??"ארוך"} מדי: ${f} צריכה להכיל ${c.maximum.toString()} ${(d==null?void 0:d.unit)??""} ${c.inclusive?"או פחות":"לכל היותר"}`.trim();if(c.origin==="number"){const p=c.inclusive?`קטן או שווה ל-${c.maximum}`:`קטן מ-${c.maximum}`;return`גדול מדי: ${f} צריך להיות ${p}`}if(c.origin==="array"||c.origin==="set"){const p=c.origin==="set"?"צריכה":"צריך",v=c.inclusive?`${c.maximum} ${(d==null?void 0:d.unit)??""} או פחות`:`פחות מ-${c.maximum} ${(d==null?void 0:d.unit)??""}`;return`גדול מדי: ${f} ${p} להכיל ${v}`.trim()}const m=c.inclusive?"<=":"<",h=o(c.origin??"value");return d!=null&&d.unit?`${d.longLabel} מדי: ${f} ${h} ${m}${c.maximum.toString()} ${d.unit}`:`${(d==null?void 0:d.longLabel)??"גדול"} מדי: ${f} ${h} ${m}${c.maximum.toString()}`}case"too_small":{const d=a(c.origin),f=n(c.origin??"value");if(c.origin==="string")return`${(d==null?void 0:d.shortLabel)??"קצר"} מדי: ${f} צריכה להכיל ${c.minimum.toString()} ${(d==null?void 0:d.unit)??""} ${c.inclusive?"או יותר":"לפחות"}`.trim();if(c.origin==="number"){const p=c.inclusive?`גדול או שווה ל-${c.minimum}`:`גדול מ-${c.minimum}`;return`קטן מדי: ${f} צריך להיות ${p}`}if(c.origin==="array"||c.origin==="set"){const p=c.origin==="set"?"צריכה":"צריך";if(c.minimum===1&&c.inclusive){const w=(c.origin==="set","לפחות פריט אחד");return`קטן מדי: ${f} ${p} להכיל ${w}`}const v=c.inclusive?`${c.minimum} ${(d==null?void 0:d.unit)??""} או יותר`:`יותר מ-${c.minimum} ${(d==null?void 0:d.unit)??""}`;return`קטן מדי: ${f} ${p} להכיל ${v}`.trim()}const m=c.inclusive?">=":">",h=o(c.origin??"value");return d!=null&&d.unit?`${d.shortLabel} מדי: ${f} ${h} ${m}${c.minimum.toString()} ${d.unit}`:`${(d==null?void 0:d.shortLabel)??"קטן"} מדי: ${f} ${h} ${m}${c.minimum.toString()}`}case"invalid_format":{const d=c;if(d.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${d.prefix}"`;if(d.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${d.suffix}"`;if(d.format==="includes")return`המחרוזת חייבת לכלול "${d.includes}"`;if(d.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${d.pattern}`;const f=u[d.format],m=(f==null?void 0:f.label)??d.format,p=((f==null?void 0:f.gender)??"m")==="f"?"תקינה":"תקין";return`${m} לא ${p}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${c.divisor}`;case"unrecognized_keys":return`מפתח${c.keys.length>1?"ות":""} לא מזוה${c.keys.length>1?"ים":"ה"}: ${y(c.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n(c.origin??"array")}`;default:return"קלט לא תקין"}}};function zv(){return{localeError:Tv()}}const Ev=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"szám",array:"tömb"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Érvénytelen bemenet: a várt érték instanceof ${n.expected}, a kapott érték ${u}`:`Érvénytelen bemenet: a várt érték ${o}, a kapott érték ${u}`}case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${D(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};function Ov(){return{localeError:Ev()}}function nu(e,t,r){return Math.abs(e)===1?t:r}function ot(e){if(!e)return"";const t=["ա","ե","ը","ի","ո","ու","օ"],r=e[e.length-1];return e+(t.includes(r)?"ն":"ը")}const Uv=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(n){return e[n]??null}const r={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${n.expected}, ստացվել է ${u}`:`Սխալ մուտքագրում․ սպասվում էր ${o}, ստացվել է ${u}`}case"invalid_value":return n.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${D(n.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=nu(u,a.unit.one,a.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ot(n.origin??"արժեք")} կունենա ${o}${n.maximum.toString()} ${s}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ot(n.origin??"արժեք")} լինի ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const u=Number(n.minimum),s=nu(u,a.unit.one,a.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ot(n.origin)} կունենա ${o}${n.minimum.toString()} ${s}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ot(n.origin)} լինի ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Սխալ տող․ պետք է սկսվի "${o.prefix}"-ով`:o.format==="ends_with"?`Սխալ տող․ պետք է ավարտվի "${o.suffix}"-ով`:o.format==="includes"?`Սխալ տող․ պետք է պարունակի "${o.includes}"`:o.format==="regex"?`Սխալ տող․ պետք է համապատասխանի ${o.pattern} ձևաչափին`:`Սխալ ${r[o.format]??n.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${n.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${n.keys.length>1?"ներ":""}. ${y(n.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${ot(n.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${ot(n.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function Dv(){return{localeError:Uv()}}const Nv=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${u}`:`Input tidak valid: diharapkan ${o}, diterima ${u}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${D(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function jv(){return{localeError:Nv()}}const Pv=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(n){return e[n]??null}const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: Þú slóst inn ${u} þar sem á að vera instanceof ${n.expected}`:`Rangt gildi: Þú slóst inn ${u} þar sem á að vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert ráð fyrir ${D(n.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} sé ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Of lítið: gert er ráð fyrir að ${n.origin} hafi ${o}${n.minimum.toString()} ${a.unit}`:`Of lítið: gert er ráð fyrir að ${n.origin} sé ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ógildur strengur: verður að byrja á "${o.prefix}"`:o.format==="ends_with"?`Ógildur strengur: verður að enda á "${o.suffix}"`:o.format==="includes"?`Ógildur strengur: verður að innihalda "${o.includes}"`:o.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`Óþekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${y(n.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${n.origin}`;default:return"Rangt gildi"}}};function Av(){return{localeError:Pv()}}const Lv=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${u}`:`Input non valido: atteso ${o}, ricevuto ${u}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${D(n.values[0])}`:`Opzione non valida: atteso uno tra ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${y(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function Cv(){return{localeError:Lv()}}const Zv=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(n){return e[n]??null}const r={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`無効な入力: instanceof ${n.expected}が期待されましたが、${u}が入力されました`:`無効な入力: ${o}が期待されましたが、${u}が入力されました`}case"invalid_value":return n.values.length===1?`無効な入力: ${D(n.values[0])}が期待されました`:`無効な選択: ${y(n.values,"、")}のいずれかである必要があります`;case"too_big":{const o=n.inclusive?"以下である":"より小さい",a=t(n.origin);return a?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${a.unit??"要素"}${o}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${o}必要があります`}case"too_small":{const o=n.inclusive?"以上である":"より大きい",a=t(n.origin);return a?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${a.unit}${o}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${r[o.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${y(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function Mv(){return{localeError:Zv()}}const Rv=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(n){return e[n]??null}const r={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${n.expected}, მიღებული ${u}`:`არასწორი შეყვანა: მოსალოდნელი ${o}, მიღებული ${u}`}case"invalid_value":return n.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${D(n.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${y(n.values,"|")}-დან`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} იყოს ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`ზედმეტად პატარა: მოსალოდნელი ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${n.origin} იყოს ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${o.prefix}"-ით`:o.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${o.suffix}"-ით`:o.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${o.includes}"-ს`:o.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${o.pattern}`:`არასწორი ${r[o.format]??n.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${n.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${n.keys.length>1?"ები":"ი"}: ${y(n.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${n.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${n.origin}-ში`;default:return"არასწორი შეყვანა"}}};function Fv(){return{localeError:Rv()}}const Vv=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(n){return e[n]??null}const r={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${n.expected} ប៉ុន្តែទទួលបាន ${u}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${o} ប៉ុន្តែទទួលបាន ${u}`}case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${D(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()} ${a.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${r[o.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${y(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function jl(){return{localeError:Vv()}}function Bv(){return jl()}const Kv=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`잘못된 입력: 예상 타입은 instanceof ${n.expected}, 받은 타입은 ${u}입니다`:`잘못된 입력: 예상 타입은 ${o}, 받은 타입은 ${u}입니다`}case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${D(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${y(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",a=o==="미만"?"이어야 합니다":"여야 합니다",u=t(n.origin),s=(u==null?void 0:u.unit)??"요소";return u?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${s} ${o}${a}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${a}`}case"too_small":{const o=n.inclusive?"이상":"초과",a=o==="이상"?"이어야 합니다":"여야 합니다",u=t(n.origin),s=(u==null?void 0:u.unit)??"요소";return u?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${s} ${o}${a}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${o}${a}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${r[o.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${y(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function Jv(){return{localeError:Kv()}}const It=e=>e.charAt(0).toUpperCase()+e.slice(1);function ru(e){const t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}const Gv=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(n,o,a,u){const s=e[n]??null;return s===null?s:{unit:s.unit[o],verb:s.verb[u][a?"inclusive":"notInclusive"]}}const r={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},i={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${u}, o tikėtasi - instanceof ${n.expected}`:`Gautas tipas ${u}, o tikėtasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo būti ${D(n.values[0])}`:`Privalo būti vienas iš ${y(n.values,"|")} pasirinkimų`;case"too_big":{const o=i[n.origin]??n.origin,a=t(n.origin,ru(Number(n.maximum)),n.inclusive??!1,"smaller");if(a!=null&&a.verb)return`${It(o??n.origin??"reikšmė")} ${a.verb} ${n.maximum.toString()} ${a.unit??"elementų"}`;const u=n.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${It(o??n.origin??"reikšmė")} turi būti ${u} ${n.maximum.toString()} ${a==null?void 0:a.unit}`}case"too_small":{const o=i[n.origin]??n.origin,a=t(n.origin,ru(Number(n.minimum)),n.inclusive??!1,"bigger");if(a!=null&&a.verb)return`${It(o??n.origin??"reikšmė")} ${a.verb} ${n.minimum.toString()} ${a.unit??"elementų"}`;const u=n.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${It(o??n.origin??"reikšmė")} turi būti ${u} ${n.minimum.toString()} ${a==null?void 0:a.unit}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Eilutė privalo prasidėti "${o.prefix}"`:o.format==="ends_with"?`Eilutė privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilutė privalo įtraukti "${o.includes}"`:o.format==="regex"?`Eilutė privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skaičius privalo būti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${y(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const o=i[n.origin]??n.origin;return`${It(o??n.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function qv(){return{localeError:Gv()}}const Wv=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(n){return e[n]??null}const r={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},i={nan:"NaN",number:"број",array:"низа"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Грешен внес: се очекува instanceof ${n.expected}, примено ${u}`:`Грешен внес: се очекува ${o}, примено ${u}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${D(n.values[0])}`:`Грешана опција: се очекува една ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${o}${n.maximum.toString()} ${a.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Премногу мал: се очекува ${n.origin} да има ${o}${n.minimum.toString()} ${a.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${y(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function Hv(){return{localeError:Wv()}}const Xv=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${u}`:`Input tidak sah: dijangka ${o}, diterima ${u}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${D(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${y(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function Yv(){return{localeError:Xv()}}const Qv=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}const r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${u}`:`Ongeldige invoer: verwacht ${o}, ontving ${u}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${D(n.values[0])}`:`Ongeldige optie: verwacht één van ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),u=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${u}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${u}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),u=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${u}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${u}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function eb(){return{localeError:Qv()}}const tb=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${u}`:`Ugyldig input: forventet ${o}, fikk ${u}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${D(n.values[0])}`:`Ugyldig valg: forventet en av ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function nb(){return{localeError:tb()}}const rb=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(n){return e[n]??null}const r={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Fâsit giren: umulan instanceof ${n.expected}, alınan ${u}`:`Fâsit giren: umulan ${o}, alınan ${u}`}case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${D(n.values[0])}`:`Fâsit tercih: mûteberler ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmalıydı.`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${r[o.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function ib(){return{localeError:rb()}}const ob=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(n){return e[n]??null}const r={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`ناسم ورودي: باید instanceof ${n.expected} وای, مګر ${u} ترلاسه شو`:`ناسم ورودي: باید ${o} وای, مګر ${u} ترلاسه شو`}case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${D(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${y(n.values,"|")} څخه وای`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} وي`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} وي`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${r[o.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${y(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function ab(){return{localeError:ob()}}const ub=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(n){return e[n]??null}const r={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${n.expected}, otrzymano ${u}`:`Nieprawidłowe dane wejściowe: oczekiwano ${o}, otrzymano ${u}`}case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${D(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function cb(){return{localeError:ub()}}const sb=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"número",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inválido: esperado instanceof ${n.expected}, recebido ${u}`:`Tipo inválido: esperado ${o}, recebido ${u}`}case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${D(n.values[0])}`:`Opção inválida: esperada uma das ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${r[o.format]??n.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Chave inválida em ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${n.origin}`;default:return"Campo inválido"}}};function lb(){return{localeError:sb()}}function iu(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const db=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(n){return e[n]??null}const r={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Неверный ввод: ожидалось instanceof ${n.expected}, получено ${u}`:`Неверный ввод: ожидалось ${o}, получено ${u}`}case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${D(n.values[0])}`:`Неверный вариант: ожидалось одно из ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const u=Number(n.maximum),s=iu(u,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${s}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const u=Number(n.minimum),s=iu(u,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${s}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${r[o.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function fb(){return{localeError:db()}}const mb=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"število",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pričakovano instanceof ${n.expected}, prejeto ${u}`:`Neveljaven vnos: pričakovano ${o}, prejeto ${u}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${D(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pričakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${y(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function pb(){return{localeError:mb()}}const hb=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(n){return e[n]??null}const r={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: förväntat instanceof ${n.expected}, fick ${u}`:`Ogiltig inmatning: förväntat ${o}, fick ${u}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${D(n.values[0])}`:`Ogiltigt val: förväntade en av ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};function gb(){return{localeError:hb()}}const vb=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(n){return e[n]??null}const r={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${n.expected}, பெறப்பட்டது ${u}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${o}, பெறப்பட்டது ${u}`}case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${D(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${y(n.values,"|")} இல் ஒன்று`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=n;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${r[o.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function bb(){return{localeError:vb()}}const _b=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(n){return e[n]??null}const r={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${n.expected} แต่ได้รับ ${u}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${o} แต่ได้รับ ${u}`}case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${D(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"ไม่เกิน":"น้อยกว่า",a=t(n.origin);return a?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()} ${a.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"อย่างน้อย":"มากกว่า",a=t(n.origin);return a?`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()} ${a.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${r[o.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${y(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function yb(){return{localeError:_b()}}const $b=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(n){return e[n]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Geçersiz değer: beklenen instanceof ${n.expected}, alınan ${u}`:`Geçersiz değer: beklenen ${o}, alınan ${u}`}case"invalid_value":return n.values.length===1?`Geçersiz değer: beklenen ${D(n.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Çok büyük: beklenen ${n.origin??"değer"} ${o}${n.maximum.toString()} ${a.unit??"öğe"}`:`Çok büyük: beklenen ${n.origin??"değer"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Çok küçük: beklenen ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`Çok küçük: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Geçersiz metin: "${o.prefix}" ile başlamalı`:o.format==="ends_with"?`Geçersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Geçersiz metin: "${o.includes}" içermeli`:o.format==="regex"?`Geçersiz metin: ${o.pattern} desenine uymalı`:`Geçersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Geçersiz sayı: ${n.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${n.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function wb(){return{localeError:$b()}}const Sb=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(n){return e[n]??null}const r={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Неправильні вхідні дані: очікується instanceof ${n.expected}, отримано ${u}`:`Неправильні вхідні дані: очікується ${o}, отримано ${u}`}case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${D(n.values[0])}`:`Неправильна опція: очікується одне з ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Занадто велике: очікується, що ${n.origin??"значення"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Занадто мале: очікується, що ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${r[o.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function Pl(){return{localeError:Sb()}}function kb(){return Pl()}const Ib=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(n){return e[n]??null}const r={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`غلط ان پٹ: instanceof ${n.expected} متوقع تھا، ${u} موصول ہوا`:`غلط ان پٹ: ${o} متوقع تھا، ${u} موصول ہوا`}case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${D(n.values[0])} متوقع تھا`:`غلط آپشن: ${y(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`بہت بڑا: ${n.origin??"ویلیو"} کے ${o}${n.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${o}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`بہت چھوٹا: ${n.origin} کے ${o}${n.minimum.toString()} ${a.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${o}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=n;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${r[o.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${y(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function xb(){return{localeError:Ib()}}const Tb=()=>{const e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function t(n){return e[n]??null}const r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${u}`:`Noto‘g‘ri kirish: kutilgan ${o}, qabul qilingan ${u}`}case"invalid_value":return n.values.length===1?`Noto‘g‘ri kirish: kutilgan ${D(n.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Noto‘g‘ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto‘g‘ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto‘g‘ri satr: "${o.includes}" ni o‘z ichiga olishi kerak`:o.format==="regex"?`Noto‘g‘ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${n.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${n.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function zb(){return{localeError:Tb()}}const Eb=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(n){return e[n]??null}const r={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},i={nan:"NaN",number:"số",array:"mảng"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${n.expected}, nhận được ${u}`:`Đầu vào không hợp lệ: mong đợi ${o}, nhận được ${u}`}case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${D(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Quá nhỏ: mong đợi ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${r[o.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${y(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};function Ob(){return{localeError:Eb()}}const Ub=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(n){return e[n]??null}const r={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`无效输入:期望 instanceof ${n.expected},实际接收 ${u}`:`无效输入:期望 ${o},实际接收 ${u}`}case"invalid_value":return n.values.length===1?`无效输入:期望 ${D(n.values[0])}`:`无效选项:期望以下之一 ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()} ${a.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${r[o.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function Db(){return{localeError:Ub()}}const Nb=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(n){return e[n]??null}const r={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`無效的輸入值:預期為 instanceof ${n.expected},但收到 ${u}`:`無效的輸入值:預期為 ${o},但收到 ${u}`}case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${D(n.values[0])}`:`無效的選項:預期為以下其中之一 ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()} ${a.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()} ${a.unit}`:`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${r[o.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${y(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function jb(){return{localeError:Nb()}}const Pb=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(n){return e[n]??null}const r={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=N(n.input),u=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${n.expected}, àmọ̀ a rí ${u}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${o}, àmọ̀ a rí ${u}`}case"invalid_value":return n.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${D(n.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${y(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tó pọ̀ jù: a ní láti jẹ́ pé ${n.origin??"iye"} ${a.verb} ${o}${n.maximum} ${a.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${o}${n.maximum}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Kéré ju: a ní láti jẹ́ pé ${n.origin} ${a.verb} ${o}${n.minimum} ${a.unit}`:`Kéré ju: a ní láti jẹ́ ${o}${n.minimum}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${o.prefix}"`:o.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${o.suffix}"`:o.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${o.includes}"`:o.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${o.pattern}`:`Aṣìṣe: ${r[o.format]??n.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${n.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${y(n.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${n.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${n.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function Ab(){return{localeError:Pb()}}const Al=Object.freeze(Object.defineProperty({__proto__:null,ar:Qg,az:tv,be:rv,bg:ov,ca:uv,cs:sv,da:dv,de:mv,en:Nl,eo:gv,es:bv,fa:yv,fi:wv,fr:kv,frCA:xv,he:zv,hu:Ov,hy:Dv,id:jv,is:Av,it:Cv,ja:Mv,ka:Fv,kh:Bv,km:jl,ko:Jv,lt:qv,mk:Hv,ms:Yv,nl:eb,no:nb,ota:ib,pl:cb,ps:ab,pt:lb,ru:fb,sl:pb,sv:gb,ta:bb,th:yb,tr:wb,ua:kb,uk:Pl,ur:xb,uz:zb,vi:Ob,yo:Ab,zhCN:Db,zhTW:jb},Symbol.toStringTag,{value:"Module"}));var ou;const Ll=Symbol("ZodOutput"),Cl=Symbol("ZodInput");class Zl{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Ki(){return new Zl}(ou=globalThis).__zod_globalRegistry??(ou.__zod_globalRegistry=Ki());const be=globalThis.__zod_globalRegistry;function Ml(e,t){return new e({type:"string",...b(t)})}function Rl(e,t){return new e({type:"string",coerce:!0,...b(t)})}function Ji(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...b(t)})}function Un(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...b(t)})}function Gi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...b(t)})}function qi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...b(t)})}function Wi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...b(t)})}function Hi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...b(t)})}function qn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...b(t)})}function Xi(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...b(t)})}function Yi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...b(t)})}function Qi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...b(t)})}function eo(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...b(t)})}function to(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...b(t)})}function no(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...b(t)})}function ro(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...b(t)})}function io(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...b(t)})}function oo(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...b(t)})}function Fl(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...b(t)})}function ao(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...b(t)})}function uo(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...b(t)})}function co(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...b(t)})}function so(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...b(t)})}function lo(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...b(t)})}function fo(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...b(t)})}const Vl={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Bl(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...b(t)})}function Kl(e,t){return new e({type:"string",format:"date",check:"string_format",...b(t)})}function Jl(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...b(t)})}function Gl(e,t){return new e({type:"string",format:"duration",check:"string_format",...b(t)})}function ql(e,t){return new e({type:"number",checks:[],...b(t)})}function Wl(e,t){return new e({type:"number",coerce:!0,checks:[],...b(t)})}function Hl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...b(t)})}function Xl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...b(t)})}function Yl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...b(t)})}function Ql(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...b(t)})}function ed(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...b(t)})}function td(e,t){return new e({type:"boolean",...b(t)})}function nd(e,t){return new e({type:"boolean",coerce:!0,...b(t)})}function rd(e,t){return new e({type:"bigint",...b(t)})}function id(e,t){return new e({type:"bigint",coerce:!0,...b(t)})}function od(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...b(t)})}function ad(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...b(t)})}function ud(e,t){return new e({type:"symbol",...b(t)})}function cd(e,t){return new e({type:"undefined",...b(t)})}function sd(e,t){return new e({type:"null",...b(t)})}function ld(e){return new e({type:"any"})}function dd(e){return new e({type:"unknown"})}function fd(e,t){return new e({type:"never",...b(t)})}function md(e,t){return new e({type:"void",...b(t)})}function pd(e,t){return new e({type:"date",...b(t)})}function hd(e,t){return new e({type:"date",coerce:!0,...b(t)})}function gd(e,t){return new e({type:"nan",...b(t)})}function Fe(e,t){return new Ai({check:"less_than",...b(t),value:e,inclusive:!1})}function _e(e,t){return new Ai({check:"less_than",...b(t),value:e,inclusive:!0})}function Ve(e,t){return new Li({check:"greater_than",...b(t),value:e,inclusive:!1})}function fe(e,t){return new Li({check:"greater_than",...b(t),value:e,inclusive:!0})}function mo(e){return Ve(0,e)}function po(e){return Fe(0,e)}function ho(e){return _e(0,e)}function go(e){return fe(0,e)}function ht(e,t){return new es({check:"multiple_of",...b(t),value:e})}function wt(e,t){return new rs({check:"max_size",...b(t),maximum:e})}function Be(e,t){return new is({check:"min_size",...b(t),minimum:e})}function Kt(e,t){return new os({check:"size_equals",...b(t),size:e})}function Jt(e,t){return new as({check:"max_length",...b(t),maximum:e})}function et(e,t){return new us({check:"min_length",...b(t),minimum:e})}function Gt(e,t){return new cs({check:"length_equals",...b(t),length:e})}function Wn(e,t){return new ss({check:"string_format",format:"regex",...b(t),pattern:e})}function Hn(e){return new ls({check:"string_format",format:"lowercase",...b(e)})}function Xn(e){return new ds({check:"string_format",format:"uppercase",...b(e)})}function Yn(e,t){return new fs({check:"string_format",format:"includes",...b(t),includes:e})}function Qn(e,t){return new ms({check:"string_format",format:"starts_with",...b(t),prefix:e})}function er(e,t){return new ps({check:"string_format",format:"ends_with",...b(t),suffix:e})}function vo(e,t,r){return new hs({check:"property",property:e,schema:t,...b(r)})}function tr(e,t){return new gs({check:"mime_type",mime:e,...b(t)})}function Pe(e){return new vs({check:"overwrite",tx:e})}function nr(e){return Pe(t=>t.normalize(e))}function rr(){return Pe(e=>e.trim())}function ir(){return Pe(e=>e.toLowerCase())}function or(){return Pe(e=>e.toUpperCase())}function ar(){return Pe(e=>Xu(e))}function vd(e,t,r){return new e({type:"array",element:t,...b(r)})}function Lb(e,t,r){return new e({type:"union",options:t,...b(r)})}function Cb(e,t,r){return new e({type:"union",options:t,inclusive:!1,...b(r)})}function Zb(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...b(i)})}function Mb(e,t,r){return new e({type:"intersection",left:t,right:r})}function Rb(e,t,r,i){const n=r instanceof L,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...b(o)})}function Fb(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...b(i)})}function Vb(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...b(i)})}function Bb(e,t,r){return new e({type:"set",valueType:t,...b(r)})}function Kb(e,t,r){const i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...b(r)})}function Jb(e,t,r){return new e({type:"enum",entries:t,...b(r)})}function Gb(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...b(r)})}function bd(e,t){return new e({type:"file",...b(t)})}function qb(e,t){return new e({type:"transform",transform:t})}function Wb(e,t){return new e({type:"optional",innerType:t})}function Hb(e,t){return new e({type:"nullable",innerType:t})}function Xb(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Bn(r)}})}function Yb(e,t,r){return new e({type:"nonoptional",innerType:t,...b(r)})}function Qb(e,t){return new e({type:"success",innerType:t})}function e1(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function t1(e,t,r){return new e({type:"pipe",in:t,out:r})}function n1(e,t){return new e({type:"readonly",innerType:t})}function r1(e,t,r){return new e({type:"template_literal",parts:t,...b(r)})}function i1(e,t){return new e({type:"lazy",getter:t})}function o1(e,t){return new e({type:"promise",innerType:t})}function _d(e,t,r){const i=b(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function yd(e,t,r){return new e({type:"custom",check:"custom",fn:t,...b(r)})}function $d(e){const t=wd(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(mt(i,r.value,t._zod.def));else{const n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(mt(n))}},e(r.value,r)));return t}function wd(e,t){const r=new X({check:"custom",...b(t)});return r._zod.check=e,r}function Sd(e){const t=new X({check:"describe"});return t._zod.onattach=[r=>{const i=be.get(r)??{};be.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function kd(e){const t=new X({check:"meta"});return t._zod.onattach=[r=>{const i=be.get(r)??{};be.add(r,{...i,...e})}],t._zod.check=()=>{},t}function Id(e,t){const r=b(t);let i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(m=>typeof m=="string"?m.toLowerCase():m),n=n.map(m=>typeof m=="string"?m.toLowerCase():m));const o=new Set(i),a=new Set(n),u=e.Codec??Bi,s=e.Boolean??Mi,c=e.String??Bt,l=new c({type:"string",error:r.error}),d=new s({type:"boolean",error:r.error}),f=new u({type:"pipe",in:l,out:d,transform:((m,h)=>{let p=m;return r.case!=="sensitive"&&(p=p.toLowerCase()),o.has(p)?!0:a.has(p)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:h.value,inst:f,continue:!1}),{})}),reverseTransform:((m,h)=>m===!0?i[0]||"true":n[0]||"false"),error:r.error});return f}function qt(e,t,r,i={}){const n=b(i),o={...b(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:u=>r.test(u),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}function gt(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??be,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function B(e,t,r={path:[],schemaPath:[]}){var l,d;var i;const n=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const u=(d=(l=e._zod).toJSONSchema)==null?void 0:d.call(l);if(u)a.schema=u;else{const f={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,f);else{const h=a.schema,p=t.processors[n.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);p(e,t,h,f)}const m=e._zod.parent;m&&(a.ref||(a.ref=m),B(m,t,f),t.seen.get(m).isParent=!0)}const s=t.metadataRegistry.get(e);return s&&Object.assign(a.schema,s),t.io==="input"&&de(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function vt(e,t){var a,u,s,c;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const l of e.seen.entries()){const d=(a=e.metadataRegistry.get(l[0]))==null?void 0:a.id;if(d){const f=i.get(d);if(f&&f!==l[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(d,l[0])}}const n=l=>{var p;const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=(p=e.external.registry.get(l[0]))==null?void 0:p.id,w=e.external.uri??(T=>T);if(v)return{ref:w(v)};const E=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=E,{defId:E,ref:`${w("__shared")}#/${d}/${E}`}}if(l[1]===r)return{ref:"#"};const m=`#/${d}/`,h=l[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:m+h}},o=l=>{if(l[1].schema.$ref)return;const d=l[1],{ref:f,defId:m}=n(l);d.def={...d.schema},m&&(d.defId=m);const h=d.schema;for(const p in h)delete h[p];h.$ref=f};if(e.cycles==="throw")for(const l of e.seen.entries()){const d=l[1];if(d.cycle)throw new Error(`Cycle detected: #/${(u=d.cycle)==null?void 0:u.join("/")}/<root>
|
|
62
62
|
|
|
63
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const d=l[1];if(t===l[0]){o(l);continue}if(e.external){const m=(s=e.external.registry.get(l[0]))==null?void 0:s.id;if(t!==l[0]&&m){o(l);continue}}if((u=e.metadataRegistry.get(l[0]))==null?void 0:u.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,c,s;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=u=>{const l=e.seen.get(u);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),u._zod.parent===m)for(const z in d)z==="$ref"||z==="allOf"||z in f||delete d[z];if(v.$ref&&p.def)for(const z in d)z==="$ref"||z==="allOf"||z in p.def&&JSON.stringify(d[z])===JSON.stringify(p.def[z])&&delete d[z]}const g=u._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:u,jsonSchema:d,path:l.path??[]})};for(const u of[...e.seen.entries()].reverse())i(u[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 u=(c=e.external.registry.get(t))==null?void 0:c.id;if(!u)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(u)}Object.assign(n,r.def??r.schema);const o=((s=e.external)==null?void 0:s.defs)??{};for(const u of e.seen.entries()){const l=u[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 u=JSON.parse(JSON.stringify(n));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:Et(t,"input",e.processors),output:Et(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}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 zd=(e,t={})=>r=>{const i=gt({...r,processors:t});return K(e,i),vt(i,e),bt(i,e)},Et=(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)},c1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ed=(e,t,r,i)=>{const n=r;n.type="string";const{minimum:o,maximum:a,format:c,patterns:s,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof a=="number"&&(n.maxLength=a),c&&(n.format=c1[c]??c,n.format===""&&delete n.format,c==="time"&&delete n.format),u&&(n.contentEncoding=u),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}))])}},Od=(e,t,r,i)=>{const n=r,{minimum:o,maximum:a,format:c,multipleOf:s,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof c=="string"&&c.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 u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=u,n.exclusiveMaximum=!0):n.exclusiveMaximum=u),typeof a=="number"&&(n.maximum=a,typeof u=="number"&&t.target!=="draft-04"&&(u<=a?delete n.maximum:delete n.exclusiveMaximum)),typeof s=="number"&&(n.multipleOf=s)},Ud=(e,t,r,i)=>{r.type="boolean"},Dd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Nd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},jd=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Pd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Ad=(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={}},Cd=(e,t,r,i)=>{},Zd=(e,t,r,i)=>{},Md=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Rd=(e,t,r,i)=>{const n=e._zod.def,o=_i(n.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},Fd=(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},Kd=(e,t,r,i)=>{const n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:c,mime:s}=e._zod.bag;a!==void 0&&(o.minLength=a),c!==void 0&&(o.maxLength=c),s?s.length===1?(o.contentMediaType=s[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=s.map(u=>({contentMediaType:u}))):Object.assign(n,o)},Jd=(e,t,r,i)=>{r.type="boolean"},Gd=(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")},Hd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},qd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Xd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Yd=(e,t,r,i)=>{const n=r,o=e._zod.def,{minimum:a,maximum:c}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof c=="number"&&(n.maxItems=c),n.type="array",n.items=K(o.element,t,{...i,path:[...i.path,"items"]})},Qd=(e,t,r,i)=>{var u;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 c=new Set(Object.keys(a)),s=new Set([...c].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)),((u=o.catchall)==null?void 0:u._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)},bo=(e,t,r,i)=>{const n=e._zod.def,o=n.inclusive===!1,a=n.options.map((c,s)=>K(c,t,{...i,path:[...i.path,o?"oneOf":"anyOf",s]}));o?r.oneOf=a:r.anyOf=a},ef=(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]}),c=u=>"allOf"in u&&Object.keys(u).length===1,s=[...c(o)?o.allOf:[o],...c(a)?a.allOf:[a]];r.allOf=s},tf=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="array";const a=t.target==="draft-2020-12"?"prefixItems":"items",c=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]})),u=o.rest?K(o.rest,t,{...i,path:[...i.path,c,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=s,u&&(n.items=u)):t.target==="openapi-3.0"?(n.items={anyOf:s},u&&n.items.anyOf.push(u),n.minItems=s.length,u||(n.maxItems=s.length)):(n.items=s,u&&(n.additionalItems=u));const{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(n.minItems=l),typeof d=="number"&&(n.maxItems=d)},nf=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="object";const a=o.keyType,c=a._zod.bag,s=c==null?void 0:c.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 u=a._zod.values;if(u){const l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(n.required=l)}},rf=(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"}]},of=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},af=(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))},cf=(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)))},uf=(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},sf=(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},lf=(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},df=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},yo=(e,t,r,i)=>{const n=e._zod.def;K(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},ff=(e,t,r,i)=>{const n=e._zod.innerType;K(n,t,i);const o=t.seen.get(e);o.ref=n},ci={string:Ed,number:Od,boolean:Ud,bigint:Dd,symbol:Nd,null:jd,undefined:Pd,void:Ad,never:Ld,any:Cd,unknown:Zd,date:Md,enum:Rd,literal:Fd,nan:Vd,template_literal:Bd,file:Kd,success:Jd,custom:Gd,function:Wd,transform:Hd,map:qd,set:Xd,array:Yd,object:Qd,union:bo,intersection:ef,tuple:tf,record:nf,nullable:rf,nonoptional:of,default:af,prefault:cf,catch:uf,pipe:sf,readonly:lf,promise:df,optional:yo,lazy:ff};function mf(e,t){if("_idmap"in e){const i=e,n=gt({...t,processors:ci}),o={};for(const s of i._idmap.entries()){const[u,l]=s;K(l,n)}const a={},c={registry:i,uri:t==null?void 0:t.uri,defs:o};n.external=c;for(const s of i._idmap.entries()){const[u,l]=s;vt(n,l),a[u]=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:ci});return K(e,r),vt(r,e),bt(r,e)}class u1{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=(t==null?void 0:t.target)??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=gt({processors:ci,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 s1=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),l1=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:el,$ZodArray:ol,$ZodAsyncError:Qe,$ZodBase64:Fs,$ZodBase64URL:Bs,$ZodBigInt:Ri,$ZodBigIntFormat:qs,$ZodBoolean:Mi,$ZodCIDRv4:Ms,$ZodCIDRv6:Rs,$ZodCUID:zs,$ZodCUID2:Es,$ZodCatch:xl,$ZodCheck:Y,$ZodCheckBigIntFormat:is,$ZodCheckEndsWith:gs,$ZodCheckGreaterThan:Li,$ZodCheckIncludes:ps,$ZodCheckLengthEquals:ls,$ZodCheckLessThan:Ai,$ZodCheckLowerCase:fs,$ZodCheckMaxLength:us,$ZodCheckMaxSize:os,$ZodCheckMimeType:bs,$ZodCheckMinLength:ss,$ZodCheckMinSize:as,$ZodCheckMultipleOf:ns,$ZodCheckNumberFormat:rs,$ZodCheckOverwrite:ys,$ZodCheckProperty:vs,$ZodCheckRegex:ds,$ZodCheckSizeEquals:cs,$ZodCheckStartsWith:hs,$ZodCheckStringFormat:Ft,$ZodCheckUpperCase:ms,$ZodCodec:Bi,$ZodCustom:jl,$ZodCustomStringFormat:Ws,$ZodDate:il,$ZodDefault:wl,$ZodDiscriminatedUnion:dl,$ZodE164:Ks,$ZodEmail:ks,$ZodEmoji:xs,$ZodEncodeError:Fn,$ZodEnum:gl,$ZodError:wi,$ZodExactOptional:_l,$ZodFile:bl,$ZodFunction:Ul,$ZodGUID:ws,$ZodIPv4:Ls,$ZodIPv6:Cs,$ZodISODate:js,$ZodISODateTime:Ns,$ZodISODuration:As,$ZodISOTime:Ps,$ZodIntersection:fl,$ZodJWT:Gs,$ZodKSUID:Ds,$ZodLazy:Nl,$ZodLiteral:vl,$ZodMAC:Zs,$ZodMap:pl,$ZodNaN:Tl,$ZodNanoID:Ts,$ZodNever:nl,$ZodNonOptional:kl,$ZodNull:Qs,$ZodNullable:$l,$ZodNumber:Zi,$ZodNumberFormat:Hs,$ZodObject:ul,$ZodObjectJIT:sl,$ZodOptional:Vi,$ZodPipe:zl,$ZodPrefault:Sl,$ZodPromise:Dl,$ZodReadonly:El,$ZodRealError:ge,$ZodRecord:ml,$ZodRegistry:Rl,$ZodSet:hl,$ZodString:Vt,$ZodStringFormat:W,$ZodSuccess:Il,$ZodSymbol:Xs,$ZodTemplateLiteral:Ol,$ZodTransform:yl,$ZodTuple:Fi,$ZodType:C,$ZodULID:Os,$ZodURL:Is,$ZodUUID:Ss,$ZodUndefined:Ys,$ZodUnion:Gn,$ZodUnknown:tl,$ZodVoid:rl,$ZodXID:Us,$ZodXor:ll,$brand:Xc,$constructor:h,$input:Ml,$output:Zl,Doc:_s,JSONSchema:s1,JSONSchemaGenerator:u1,NEVER:qc,TimePrecision:Kl,_any:fd,_array:yd,_base64:uo,_base64url:so,_bigint:od,_boolean:rd,_catch:t1,_check:kd,_cidrv4:ao,_cidrv6:co,_coercedBigint:ad,_coercedBoolean:id,_coercedDate:vd,_coercedNumber:Xl,_coercedString:Vl,_cuid:Qi,_cuid2:eo,_custom:$d,_date:gd,_decode:xi,_decodeAsync:zi,_default:Yb,_discriminatedUnion:Mb,_e164:lo,_email:Ji,_emoji:Xi,_encode:Ii,_encodeAsync:Ti,_endsWith:er,_enum:Jb,_file:_d,_float32:Ql,_float64:ed,_gt:Ve,_gte:me,_guid:Un,_includes:Yn,_int:Yl,_int32:td,_int64:cd,_intersection:Rb,_ipv4:io,_ipv6:oo,_isoDate:Gl,_isoDateTime:Jl,_isoDuration:Hl,_isoTime:Wl,_jwt:fo,_ksuid:ro,_lazy:o1,_length:Jt,_literal:Wb,_lowercase:qn,_lt:Fe,_lte:$e,_mac:Bl,_map:Bb,_max:$e,_maxLength:Kt,_maxSize:wt,_mime:tr,_min:me,_minLength:tt,_minSize:Be,_multipleOf:ht,_nan:bd,_nanoid:Yi,_nativeEnum:Gb,_negative:po,_never:pd,_nonnegative:go,_nonoptional:Qb,_nonpositive:ho,_normalize:nr,_null:dd,_nullable:Xb,_number:ql,_optional:qb,_overwrite:Le,_parse:At,_parseAsync:Lt,_pipe:n1,_positive:mo,_promise:a1,_property:vo,_readonly:r1,_record:Vb,_refine:wd,_regex:Hn,_safeDecode:Oi,_safeDecodeAsync:Di,_safeEncode:Ei,_safeEncodeAsync:Ui,_safeParse:Ct,_safeParseAsync:Zt,_set:Kb,_size:Bt,_slugify:ar,_startsWith:Qn,_string:Fl,_stringFormat:Gt,_stringbool:Td,_success:e1,_superRefine:Sd,_symbol:sd,_templateLiteral:i1,_toLowerCase:ir,_toUpperCase:or,_transform:Hb,_trim:rr,_tuple:Fb,_uint32:nd,_uint64:ud,_ulid:to,_undefined:ld,_union:Cb,_unknown:md,_uppercase:Xn,_url:Wn,_uuid:Gi,_uuidv4:Wi,_uuidv6:Hi,_uuidv7:qi,_void:hd,_xid:no,_xor:Zb,clone:ke,config:se,createStandardJSONSchemaMethod:Et,createToJSONSchemaMethod:zd,decode:wg,decodeAsync:kg,describe:Id,encode:$g,encodeAsync:Sg,extractDefs:vt,finalize:bt,flattenError:Si,formatError:ki,globalConfig:Tn,globalRegistry:_e,initializeContext:gt,isValidBase64:Ci,isValidBase64URL:Vs,isValidJWT:Js,locales:Cl,meta:xd,parse:ii,parseAsync:oi,prettifyError:bu,process:K,regexes:Pi,registry:Ki,safeDecode:xg,safeDecodeAsync:zg,safeEncode:Ig,safeEncodeAsync:Tg,safeParse:yu,safeParseAsync:_u,toDotPath:vu,toJSONSchema:mf,treeifyError:gu,util:pu,version:$s},Symbol.toStringTag,{value:"Module"})),d1=Object.freeze(Object.defineProperty({__proto__:null,endsWith:er,gt:Ve,gte:me,includes:Yn,length:Jt,lowercase:qn,lt:Fe,lte:$e,maxLength:Kt,maxSize:wt,mime:tr,minLength:tt,minSize:Be,multipleOf:ht,negative:po,nonnegative:go,nonpositive:ho,normalize:nr,overwrite:Le,positive:mo,property:vo,regex:Hn,size:Bt,slugify:ar,startsWith:Qn,toLowerCase:ir,toUpperCase:or,trim:rr,uppercase:Xn},Symbol.toStringTag,{value:"Module"})),_o=h("ZodISODateTime",(e,t)=>{Ns.init(e,t),H.init(e,t)});function pf(e){return Jl(_o,e)}const $o=h("ZodISODate",(e,t)=>{js.init(e,t),H.init(e,t)});function hf(e){return Gl($o,e)}const wo=h("ZodISOTime",(e,t)=>{Ps.init(e,t),H.init(e,t)});function gf(e){return Wl(wo,e)}const So=h("ZodISODuration",(e,t)=>{As.init(e,t),H.init(e,t)});function vf(e){return Hl(So,e)}const bf=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:$o,ZodISODateTime:_o,ZodISODuration:So,ZodISOTime:wo,date:hf,datetime:pf,duration:vf,time:gf},Symbol.toStringTag,{value:"Module"})),yf=(e,t)=>{wi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ki(e,r)},flatten:{value:r=>Si(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,zn,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,zn,2)}},isEmpty:{get(){return e.issues.length===0}}})},f1=h("ZodError",yf),ve=h("ZodError",yf,{Parent:Error}),_f=At(ve),$f=Lt(ve),wf=Ct(ve),Sf=Zt(ve),kf=Ii(ve),If=xi(ve),xf=Ti(ve),Tf=zi(ve),zf=Ei(ve),Ef=Oi(ve),Of=Ui(ve),Uf=Di(ve),Z=h("ZodType",(e,t)=>(C.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Et(e,"input"),output:Et(e,"output")}}),e.toJSONSchema=zd(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)=>ke(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>_f(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>wf(e,r,i),e.parseAsync=async(r,i)=>$f(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Sf(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>kf(e,r,i),e.decode=(r,i)=>If(e,r,i),e.encodeAsync=async(r,i)=>xf(e,r,i),e.decodeAsync=async(r,i)=>Tf(e,r,i),e.safeEncode=(r,i)=>zf(e,r,i),e.safeDecode=(r,i)=>Ef(e,r,i),e.safeEncodeAsync=async(r,i)=>Of(e,r,i),e.safeDecodeAsync=async(r,i)=>Uf(e,r,i),e.refine=(r,i)=>e.check(ma(r,i)),e.superRefine=r=>e.check(pa(r)),e.overwrite=r=>e.check(Le(r)),e.optional=()=>Ut(e),e.exactOptional=()=>Ho(e),e.nullable=()=>Dt(e),e.nullish=()=>Ut(Dt(e)),e.nonoptional=r=>ta(e,r),e.array=()=>Qt(e),e.or=r=>Tr([e,r]),e.and=r=>Zo(e,r),e.transform=r=>Nt(e,Er(r)),e.default=r=>Yo(e,r),e.prefault=r=>ea(e,r),e.catch=r=>ia(e,r),e.pipe=r=>Nt(e,r),e.readonly=()=>ca(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)),cr=h("_ZodString",(e,t)=>{Vt.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Ed(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(Hn(...i)),e.includes=(...i)=>e.check(Yn(...i)),e.startsWith=(...i)=>e.check(Qn(...i)),e.endsWith=(...i)=>e.check(er(...i)),e.min=(...i)=>e.check(tt(...i)),e.max=(...i)=>e.check(Kt(...i)),e.length=(...i)=>e.check(Jt(...i)),e.nonempty=(...i)=>e.check(tt(1,...i)),e.lowercase=i=>e.check(qn(i)),e.uppercase=i=>e.check(Xn(i)),e.trim=()=>e.check(rr()),e.normalize=(...i)=>e.check(nr(...i)),e.toLowerCase=()=>e.check(ir()),e.toUpperCase=()=>e.check(or()),e.slugify=()=>e.check(ar())}),Wt=h("ZodString",(e,t)=>{Vt.init(e,t),cr.init(e,t),e.email=r=>e.check(Ji(ur,r)),e.url=r=>e.check(Wn(Ht,r)),e.jwt=r=>e.check(fo(Sr,r)),e.emoji=r=>e.check(Xi(sr,r)),e.guid=r=>e.check(Un(Ot,r)),e.uuid=r=>e.check(Gi(Ue,r)),e.uuidv4=r=>e.check(Wi(Ue,r)),e.uuidv6=r=>e.check(Hi(Ue,r)),e.uuidv7=r=>e.check(qi(Ue,r)),e.nanoid=r=>e.check(Yi(lr,r)),e.guid=r=>e.check(Un(Ot,r)),e.cuid=r=>e.check(Qi(dr,r)),e.cuid2=r=>e.check(eo(fr,r)),e.ulid=r=>e.check(to(mr,r)),e.base64=r=>e.check(uo(_r,r)),e.base64url=r=>e.check(so($r,r)),e.xid=r=>e.check(no(pr,r)),e.ksuid=r=>e.check(ro(hr,r)),e.ipv4=r=>e.check(io(gr,r)),e.ipv6=r=>e.check(oo(vr,r)),e.cidrv4=r=>e.check(ao(br,r)),e.cidrv6=r=>e.check(co(yr,r)),e.e164=r=>e.check(lo(wr,r)),e.datetime=r=>e.check(pf(r)),e.date=r=>e.check(hf(r)),e.time=r=>e.check(gf(r)),e.duration=r=>e.check(vf(r))});function Dn(e){return Fl(Wt,e)}const H=h("ZodStringFormat",(e,t)=>{W.init(e,t),cr.init(e,t)}),ur=h("ZodEmail",(e,t)=>{ks.init(e,t),H.init(e,t)});function Df(e){return Ji(ur,e)}const Ot=h("ZodGUID",(e,t)=>{ws.init(e,t),H.init(e,t)});function Nf(e){return Un(Ot,e)}const Ue=h("ZodUUID",(e,t)=>{Ss.init(e,t),H.init(e,t)});function jf(e){return Gi(Ue,e)}function Pf(e){return Wi(Ue,e)}function Af(e){return Hi(Ue,e)}function Lf(e){return qi(Ue,e)}const Ht=h("ZodURL",(e,t)=>{Is.init(e,t),H.init(e,t)});function Cf(e){return Wn(Ht,e)}function Zf(e){return Wn(Ht,{protocol:/^https?$/,hostname:Zu,...b(e)})}const sr=h("ZodEmoji",(e,t)=>{xs.init(e,t),H.init(e,t)});function Mf(e){return Xi(sr,e)}const lr=h("ZodNanoID",(e,t)=>{Ts.init(e,t),H.init(e,t)});function Rf(e){return Yi(lr,e)}const dr=h("ZodCUID",(e,t)=>{zs.init(e,t),H.init(e,t)});function Ff(e){return Qi(dr,e)}const fr=h("ZodCUID2",(e,t)=>{Es.init(e,t),H.init(e,t)});function Vf(e){return eo(fr,e)}const mr=h("ZodULID",(e,t)=>{Os.init(e,t),H.init(e,t)});function Bf(e){return to(mr,e)}const pr=h("ZodXID",(e,t)=>{Us.init(e,t),H.init(e,t)});function Kf(e){return no(pr,e)}const hr=h("ZodKSUID",(e,t)=>{Ds.init(e,t),H.init(e,t)});function Jf(e){return ro(hr,e)}const gr=h("ZodIPv4",(e,t)=>{Ls.init(e,t),H.init(e,t)});function Gf(e){return io(gr,e)}const ko=h("ZodMAC",(e,t)=>{Zs.init(e,t),H.init(e,t)});function Wf(e){return Bl(ko,e)}const vr=h("ZodIPv6",(e,t)=>{Cs.init(e,t),H.init(e,t)});function Hf(e){return oo(vr,e)}const br=h("ZodCIDRv4",(e,t)=>{Ms.init(e,t),H.init(e,t)});function qf(e){return ao(br,e)}const yr=h("ZodCIDRv6",(e,t)=>{Rs.init(e,t),H.init(e,t)});function Xf(e){return co(yr,e)}const _r=h("ZodBase64",(e,t)=>{Fs.init(e,t),H.init(e,t)});function Yf(e){return uo(_r,e)}const $r=h("ZodBase64URL",(e,t)=>{Bs.init(e,t),H.init(e,t)});function Qf(e){return so($r,e)}const wr=h("ZodE164",(e,t)=>{Ks.init(e,t),H.init(e,t)});function em(e){return lo(wr,e)}const Sr=h("ZodJWT",(e,t)=>{Gs.init(e,t),H.init(e,t)});function tm(e){return fo(Sr,e)}const St=h("ZodCustomStringFormat",(e,t)=>{Ws.init(e,t),H.init(e,t)});function nm(e,t,r={}){return Gt(St,e,t,r)}function rm(e){return Gt(St,"hostname",Cu,e)}function im(e){return Gt(St,"hex",es,e)}function om(e,t){const r=(t==null?void 0:t.enc)??"hex",i=`${e}_${r}`,n=Pi[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return Gt(St,i,n,t)}const qt=h("ZodNumber",(e,t)=>{Zi.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Od(e,i,n),e.gt=(i,n)=>e.check(Ve(i,n)),e.gte=(i,n)=>e.check(me(i,n)),e.min=(i,n)=>e.check(me(i,n)),e.lt=(i,n)=>e.check(Fe(i,n)),e.lte=(i,n)=>e.check($e(i,n)),e.max=(i,n)=>e.check($e(i,n)),e.int=i=>e.check(Nn(i)),e.safe=i=>e.check(Nn(i)),e.positive=i=>e.check(Ve(0,i)),e.nonnegative=i=>e.check(me(0,i)),e.negative=i=>e.check(Fe(0,i)),e.nonpositive=i=>e.check($e(0,i)),e.multipleOf=(i,n)=>e.check(ht(i,n)),e.step=(i,n)=>e.check(ht(i,n)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Io(e){return ql(qt,e)}const it=h("ZodNumberFormat",(e,t)=>{Hs.init(e,t),qt.init(e,t)});function Nn(e){return Yl(it,e)}function am(e){return Ql(it,e)}function cm(e){return ed(it,e)}function um(e){return td(it,e)}function sm(e){return nd(it,e)}const Xt=h("ZodBoolean",(e,t)=>{Mi.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ud(e,r,i)});function xo(e){return rd(Xt,e)}const Yt=h("ZodBigInt",(e,t)=>{Ri.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Dd(e,i),e.gte=(i,n)=>e.check(me(i,n)),e.min=(i,n)=>e.check(me(i,n)),e.gt=(i,n)=>e.check(Ve(i,n)),e.gte=(i,n)=>e.check(me(i,n)),e.min=(i,n)=>e.check(me(i,n)),e.lt=(i,n)=>e.check(Fe(i,n)),e.lte=(i,n)=>e.check($e(i,n)),e.max=(i,n)=>e.check($e(i,n)),e.positive=i=>e.check(Ve(BigInt(0),i)),e.negative=i=>e.check(Fe(BigInt(0),i)),e.nonpositive=i=>e.check($e(BigInt(0),i)),e.nonnegative=i=>e.check(me(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 lm(e){return od(Yt,e)}const kr=h("ZodBigIntFormat",(e,t)=>{qs.init(e,t),Yt.init(e,t)});function dm(e){return cd(kr,e)}function fm(e){return ud(kr,e)}const To=h("ZodSymbol",(e,t)=>{Xs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nd(e,r)});function mm(e){return sd(To,e)}const zo=h("ZodUndefined",(e,t)=>{Ys.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pd(e,r)});function pm(e){return ld(zo,e)}const Eo=h("ZodNull",(e,t)=>{Qs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jd(e,r,i)});function Oo(e){return dd(Eo,e)}const Uo=h("ZodAny",(e,t)=>{el.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Cd()});function hm(){return fd(Uo)}const Do=h("ZodUnknown",(e,t)=>{tl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Zd()});function nt(){return md(Do)}const No=h("ZodNever",(e,t)=>{nl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ld(e,r,i)});function Ir(e){return pd(No,e)}const jo=h("ZodVoid",(e,t)=>{rl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ad(e,r)});function gm(e){return hd(jo,e)}const xr=h("ZodDate",(e,t)=>{il.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Md(e,i),e.min=(i,n)=>e.check(me(i,n)),e.max=(i,n)=>e.check($e(i,n));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function vm(e){return gd(xr,e)}const Po=h("ZodArray",(e,t)=>{ol.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Yd(e,r,i,n),e.element=t.element,e.min=(r,i)=>e.check(tt(r,i)),e.nonempty=r=>e.check(tt(1,r)),e.max=(r,i)=>e.check(Kt(r,i)),e.length=(r,i)=>e.check(Jt(r,i)),e.unwrap=()=>e.element});function Qt(e,t){return yd(Po,e,t)}function bm(e){const t=e._zod.def.shape;return zr(Object.keys(t))}const en=h("ZodObject",(e,t)=>{sl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Qd(e,r,i,n),M(e,"shape",()=>t.shape),e.keyof=()=>zr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:nt()}),e.loose=()=>e.clone({...e._zod.def,catchall:nt()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ir()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>cu(e,r),e.safeExtend=r=>uu(e,r),e.merge=r=>su(e,r),e.pick=r=>ou(e,r),e.omit=r=>au(e,r),e.partial=(...r)=>lu(Or,e,r[0]),e.required=(...r)=>du(Ur,e,r[0])});function ym(e,t){const r={type:"object",shape:e??{},...b(t)};return new en(r)}function _m(e,t){return new en({type:"object",shape:e,catchall:Ir(),...b(t)})}function $m(e,t){return new en({type:"object",shape:e,catchall:nt(),...b(t)})}const tn=h("ZodUnion",(e,t)=>{Gn.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bo(e,r,i,n),e.options=t.options});function Tr(e,t){return new tn({type:"union",options:e,...b(t)})}const Ao=h("ZodXor",(e,t)=>{tn.init(e,t),ll.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bo(e,r,i,n),e.options=t.options});function wm(e,t){return new Ao({type:"union",options:e,inclusive:!1,...b(t)})}const Lo=h("ZodDiscriminatedUnion",(e,t)=>{tn.init(e,t),dl.init(e,t)});function Sm(e,t,r){return new Lo({type:"union",options:t,discriminator:e,...b(r)})}const Co=h("ZodIntersection",(e,t)=>{fl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ef(e,r,i,n)});function Zo(e,t){return new Co({type:"intersection",left:e,right:t})}const Mo=h("ZodTuple",(e,t)=>{Fi.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>tf(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Ro(e,t,r){const i=t instanceof C,n=i?r:t,o=i?t:null;return new Mo({type:"tuple",items:e,rest:o,...b(n)})}const nn=h("ZodRecord",(e,t)=>{ml.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>nf(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function Fo(e,t,r){return new nn({type:"record",keyType:e,valueType:t,...b(r)})}function km(e,t,r){const i=ke(e);return i._zod.values=void 0,new nn({type:"record",keyType:i,valueType:t,...b(r)})}function Im(e,t,r){return new nn({type:"record",keyType:e,valueType:t,mode:"loose",...b(r)})}const Vo=h("ZodMap",(e,t)=>{pl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>qd(e,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Be(...r)),e.nonempty=r=>e.check(Be(1,r)),e.max=(...r)=>e.check(wt(...r)),e.size=(...r)=>e.check(Bt(...r))});function xm(e,t,r){return new Vo({type:"map",keyType:e,valueType:t,...b(r)})}const Bo=h("ZodSet",(e,t)=>{hl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Xd(e,r),e.min=(...r)=>e.check(Be(...r)),e.nonempty=r=>e.check(Be(1,r)),e.max=(...r)=>e.check(wt(...r)),e.size=(...r)=>e.check(Bt(...r))});function Tm(e,t){return new Bo({type:"set",valueType:e,...b(t)})}const yt=h("ZodEnum",(e,t)=>{gl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Rd(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 zr(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 zm(e,t){return new yt({type:"enum",entries:e,...b(t)})}const Ko=h("ZodLiteral",(e,t)=>{vl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fd(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 Em(e,t){return new Ko({type:"literal",values:Array.isArray(e)?e:[e],...b(t)})}const Jo=h("ZodFile",(e,t)=>{bl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Kd(e,r,i),e.min=(r,i)=>e.check(Be(r,i)),e.max=(r,i)=>e.check(wt(r,i)),e.mime=(r,i)=>e.check(tr(Array.isArray(r)?r:[r],i))});function Om(e){return _d(Jo,e)}const Go=h("ZodTransform",(e,t)=>{yl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Hd(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Fn(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(mt(o,r.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(mt(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function Er(e){return new Go({type:"transform",transform:e})}const Or=h("ZodOptional",(e,t)=>{Vi.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>yo(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Ut(e){return new Or({type:"optional",innerType:e})}const Wo=h("ZodExactOptional",(e,t)=>{_l.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>yo(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Ho(e){return new Wo({type:"optional",innerType:e})}const qo=h("ZodNullable",(e,t)=>{$l.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>rf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Dt(e){return new qo({type:"nullable",innerType:e})}function Um(e){return Ut(Dt(e))}const Xo=h("ZodDefault",(e,t)=>{wl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>af(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Yo(e,t){return new Xo({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Bn(t)}})}const Qo=h("ZodPrefault",(e,t)=>{Sl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ea(e,t){return new Qo({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Bn(t)}})}const Ur=h("ZodNonOptional",(e,t)=>{kl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>of(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ta(e,t){return new Ur({type:"nonoptional",innerType:e,...b(t)})}const na=h("ZodSuccess",(e,t)=>{Il.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Jd(e,r,i),e.unwrap=()=>e._zod.def.innerType});function Dm(e){return new na({type:"success",innerType:e})}const ra=h("ZodCatch",(e,t)=>{xl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ia(e,t){return new ra({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const oa=h("ZodNaN",(e,t)=>{Tl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Vd(e,r)});function Nm(e){return bd(oa,e)}const Dr=h("ZodPipe",(e,t)=>{zl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sf(e,r,i,n),e.in=t.in,e.out=t.out});function Nt(e,t){return new Dr({type:"pipe",in:e,out:t})}const Nr=h("ZodCodec",(e,t)=>{Dr.init(e,t),Bi.init(e,t)});function jm(e,t,r){return new Nr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}const aa=h("ZodReadonly",(e,t)=>{El.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ca(e){return new aa({type:"readonly",innerType:e})}const ua=h("ZodTemplateLiteral",(e,t)=>{Ol.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bd(e,r,i)});function Pm(e,t){return new ua({type:"template_literal",parts:e,...b(t)})}const sa=h("ZodLazy",(e,t)=>{Nl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ff(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function la(e){return new sa({type:"lazy",getter:e})}const da=h("ZodPromise",(e,t)=>{Dl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>df(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Am(e){return new da({type:"promise",innerType:e})}const fa=h("ZodFunction",(e,t)=>{Ul.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Wd(e,r)});function jn(e){return new fa({type:"function",input:Array.isArray(e==null?void 0:e.input)?Ro(e==null?void 0:e.input):(e==null?void 0:e.input)??Qt(nt()),output:(e==null?void 0:e.output)??nt()})}const rn=h("ZodCustom",(e,t)=>{jl.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Gd(e,r)});function Lm(e){const t=new Y({check:"custom"});return t._zod.check=e,t}function Cm(e,t){return $d(rn,e??(()=>!0),t)}function ma(e,t={}){return wd(rn,e,t)}function pa(e){return Sd(e)}const Zm=Id,Mm=xd;function Rm(e,t={}){const r=new rn({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 Fm=(...e)=>Td({Codec:Nr,Boolean:Xt,String:Wt},...e);function Vm(e){const t=la(()=>Tr([Dn(e),Io(),xo(),Oo(),Qt(t),Fo(Dn(),t)]));return t}function Bm(e,t){return Nt(Er(e),t)}const m1=Object.freeze(Object.defineProperty({__proto__:null,ZodAny:Uo,ZodArray:Po,ZodBase64:_r,ZodBase64URL:$r,ZodBigInt:Yt,ZodBigIntFormat:kr,ZodBoolean:Xt,ZodCIDRv4:br,ZodCIDRv6:yr,ZodCUID:dr,ZodCUID2:fr,ZodCatch:ra,ZodCodec:Nr,ZodCustom:rn,ZodCustomStringFormat:St,ZodDate:xr,ZodDefault:Xo,ZodDiscriminatedUnion:Lo,ZodE164:wr,ZodEmail:ur,ZodEmoji:sr,ZodEnum:yt,ZodExactOptional:Wo,ZodFile:Jo,ZodFunction:fa,ZodGUID:Ot,ZodIPv4:gr,ZodIPv6:vr,ZodIntersection:Co,ZodJWT:Sr,ZodKSUID:hr,ZodLazy:sa,ZodLiteral:Ko,ZodMAC:ko,ZodMap:Vo,ZodNaN:oa,ZodNanoID:lr,ZodNever:No,ZodNonOptional:Ur,ZodNull:Eo,ZodNullable:qo,ZodNumber:qt,ZodNumberFormat:it,ZodObject:en,ZodOptional:Or,ZodPipe:Dr,ZodPrefault:Qo,ZodPromise:da,ZodReadonly:aa,ZodRecord:nn,ZodSet:Bo,ZodString:Wt,ZodStringFormat:H,ZodSuccess:na,ZodSymbol:To,ZodTemplateLiteral:ua,ZodTransform:Go,ZodTuple:Mo,ZodType:Z,ZodULID:mr,ZodURL:Ht,ZodUUID:Ue,ZodUndefined:zo,ZodUnion:tn,ZodUnknown:Do,ZodVoid:jo,ZodXID:pr,ZodXor:Ao,_ZodString:cr,_default:Yo,_function:jn,any:hm,array:Qt,base64:Yf,base64url:Qf,bigint:lm,boolean:xo,catch:ia,check:Lm,cidrv4:qf,cidrv6:Xf,codec:jm,cuid:Ff,cuid2:Vf,custom:Cm,date:vm,describe:Zm,discriminatedUnion:Sm,e164:em,email:Df,emoji:Mf,enum:zr,exactOptional:Ho,file:Om,float32:am,float64:cm,function:jn,guid:Nf,hash:om,hex:im,hostname:rm,httpUrl:Zf,instanceof:Rm,int:Nn,int32:um,int64:dm,intersection:Zo,ipv4:Gf,ipv6:Hf,json:Vm,jwt:tm,keyof:bm,ksuid:Jf,lazy:la,literal:Em,looseObject:$m,looseRecord:Im,mac:Wf,map:xm,meta:Mm,nan:Nm,nanoid:Rf,nativeEnum:zm,never:Ir,nonoptional:ta,null:Oo,nullable:Dt,nullish:Um,number:Io,object:ym,optional:Ut,partialRecord:km,pipe:Nt,prefault:ea,preprocess:Bm,promise:Am,readonly:ca,record:Fo,refine:ma,set:Tm,strictObject:_m,string:Dn,stringFormat:nm,stringbool:Fm,success:Dm,superRefine:pa,symbol:mm,templateLiteral:Pm,transform:Er,tuple:Ro,uint32:sm,uint64:fm,ulid:Bf,undefined:pm,union:Tr,unknown:nt,url:Cf,uuid:jf,uuidv4:Pf,uuidv6:Af,uuidv7:Lf,void:gm,xid:Kf,xor:wm},Symbol.toStringTag,{value:"Module"})),p1={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function h1(e){se({customError:e})}function g1(){return se().customError}var ui;ui||(ui={});const I={...m1,...d1,iso:bf},v1=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 b1(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 y1(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 Km(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=y1(n,t),a=ce(o,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){const n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return I.null();if(n.length===0)return I.never();if(n.length===1)return I.literal(n[0]);if(n.every(a=>typeof a=="string"))return I.enum(n);const o=n.map(a=>I.literal(a));return o.length<2?o[0]:I.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return I.literal(e.const);const r=e.type;if(Array.isArray(r)){const n=r.map(o=>{const a={...e,type:o};return Km(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,u]of Object.entries(o)){const l=ce(u,t);n[s]=a.has(s)?l:l.optional()}if(e.propertyNames){const s=ce(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?ce(e.additionalProperties,t):I.any();if(Object.keys(n).length===0){i=I.record(s,u);break}const l=I.object(n).passthrough(),d=I.looseRecord(s,u);i=I.intersection(l,d);break}if(e.patternProperties){const s=e.patternProperties,u=Object.keys(s),l=[];for(const f of u){const m=ce(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 c=I.object(n);e.additionalProperties===!1?i=c.strict():typeof e.additionalProperties=="object"?i=c.catchall(ce(e.additionalProperties,t)):i=c.passthrough();break}case"array":{const n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){const a=n.map(s=>ce(s,t)),c=o&&typeof o=="object"&&!Array.isArray(o)?ce(o,t):void 0;c?i=I.tuple(a).rest(c):i=I.tuple(a),typeof e.minItems=="number"&&(i=i.check(I.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(I.maxLength(e.maxItems)))}else if(Array.isArray(o)){const a=o.map(s=>ce(s,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?ce(e.additionalItems,t):void 0;c?i=I.tuple(a).rest(c):i=I.tuple(a),typeof e.minItems=="number"&&(i=i.check(I.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(I.maxLength(e.maxItems)))}else if(o!==void 0){const a=ce(o,t);let c=I.array(a);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),i=c}else i=I.array(I.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function ce(e,t){if(typeof e=="boolean")return e?I.any():I.never();let r=Km(e,t);const i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){const c=e.anyOf.map(u=>ce(u,t)),s=I.union(c);r=i?I.intersection(r,s):s}if(e.oneOf&&Array.isArray(e.oneOf)){const c=e.oneOf.map(u=>ce(u,t)),s=I.xor(c);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 c=i?r:ce(e.allOf[0],t);const s=i?0:1;for(let u=s;u<e.allOf.length;u++)c=I.intersection(c,ce(e.allOf[u],t));r=c}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 c of o)c in e&&(n[c]=e[c]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const c of a)c in e&&(n[c]=e[c]);for(const c of Object.keys(e))v1.has(c)||(n[c]=e[c]);return Object.keys(n).length>0&&t.registry.add(r,n),r}function _1(e,t){if(typeof e=="boolean")return e?I.any():I.never();const r=b1(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 ce(e,n)}function $1(e){return Vl(Wt,e)}function w1(e){return Xl(qt,e)}function S1(e){return id(Xt,e)}function k1(e){return ad(Yt,e)}function I1(e){return vd(xr,e)}const x1=Object.freeze(Object.defineProperty({__proto__:null,bigint:k1,boolean:S1,date:I1,number:w1,string:$1},Symbol.toStringTag,{value:"Module"}));se(Pl());const uc=Object.freeze(Object.defineProperty({__proto__:null,$brand:Xc,$input:Ml,$output:Zl,NEVER:qc,TimePrecision:Kl,ZodAny:Uo,ZodArray:Po,ZodBase64:_r,ZodBase64URL:$r,ZodBigInt:Yt,ZodBigIntFormat:kr,ZodBoolean:Xt,ZodCIDRv4:br,ZodCIDRv6:yr,ZodCUID:dr,ZodCUID2:fr,ZodCatch:ra,ZodCodec:Nr,ZodCustom:rn,ZodCustomStringFormat:St,ZodDate:xr,ZodDefault:Xo,ZodDiscriminatedUnion:Lo,ZodE164:wr,ZodEmail:ur,ZodEmoji:sr,ZodEnum:yt,ZodError:f1,ZodExactOptional:Wo,ZodFile:Jo,get ZodFirstPartyTypeKind(){return ui},ZodFunction:fa,ZodGUID:Ot,ZodIPv4:gr,ZodIPv6:vr,ZodISODate:$o,ZodISODateTime:_o,ZodISODuration:So,ZodISOTime:wo,ZodIntersection:Co,ZodIssueCode:p1,ZodJWT:Sr,ZodKSUID:hr,ZodLazy:sa,ZodLiteral:Ko,ZodMAC:ko,ZodMap:Vo,ZodNaN:oa,ZodNanoID:lr,ZodNever:No,ZodNonOptional:Ur,ZodNull:Eo,ZodNullable:qo,ZodNumber:qt,ZodNumberFormat:it,ZodObject:en,ZodOptional:Or,ZodPipe:Dr,ZodPrefault:Qo,ZodPromise:da,ZodReadonly:aa,ZodRealError:ve,ZodRecord:nn,ZodSet:Bo,ZodString:Wt,ZodStringFormat:H,ZodSuccess:na,ZodSymbol:To,ZodTemplateLiteral:ua,ZodTransform:Go,ZodTuple:Mo,ZodType:Z,ZodULID:mr,ZodURL:Ht,ZodUUID:Ue,ZodUndefined:zo,ZodUnion:tn,ZodUnknown:Do,ZodVoid:jo,ZodXID:pr,ZodXor:Ao,_ZodString:cr,_default:Yo,_function:jn,any:hm,array:Qt,base64:Yf,base64url:Qf,bigint:lm,boolean:xo,catch:ia,check:Lm,cidrv4:qf,cidrv6:Xf,clone:ke,codec:jm,coerce:x1,config:se,core:l1,cuid:Ff,cuid2:Vf,custom:Cm,date:vm,decode:If,decodeAsync:Tf,describe:Zm,discriminatedUnion:Sm,e164:em,email:Df,emoji:Mf,encode:kf,encodeAsync:xf,endsWith:er,enum:zr,exactOptional:Ho,file:Om,flattenError:Si,float32:am,float64:cm,formatError:ki,fromJSONSchema:_1,function:jn,getErrorMap:g1,globalRegistry:_e,gt:Ve,gte:me,guid:Nf,hash:om,hex:im,hostname:rm,httpUrl:Zf,includes:Yn,instanceof:Rm,int:Nn,int32:um,int64:dm,intersection:Zo,ipv4:Gf,ipv6:Hf,iso:bf,json:Vm,jwt:tm,keyof:bm,ksuid:Jf,lazy:la,length:Jt,literal:Em,locales:Cl,looseObject:$m,looseRecord:Im,lowercase:qn,lt:Fe,lte:$e,mac:Wf,map:xm,maxLength:Kt,maxSize:wt,meta:Mm,mime:tr,minLength:tt,minSize:Be,multipleOf:ht,nan:Nm,nanoid:Rf,nativeEnum:zm,negative:po,never:Ir,nonnegative:go,nonoptional:ta,nonpositive:ho,normalize:nr,null:Oo,nullable:Dt,nullish:Um,number:Io,object:ym,optional:Ut,overwrite:Le,parse:_f,parseAsync:$f,partialRecord:km,pipe:Nt,positive:mo,prefault:ea,preprocess:Bm,prettifyError:bu,promise:Am,property:vo,readonly:ca,record:Fo,refine:ma,regex:Hn,regexes:Pi,registry:Ki,safeDecode:Ef,safeDecodeAsync:Uf,safeEncode:zf,safeEncodeAsync:Of,safeParse:wf,safeParseAsync:Sf,set:Tm,setErrorMap:h1,size:Bt,slugify:ar,startsWith:Qn,strictObject:_m,string:Dn,stringFormat:nm,stringbool:Fm,success:Dm,superRefine:pa,symbol:mm,templateLiteral:Pm,toJSONSchema:mf,toLowerCase:ir,toUpperCase:or,transform:Er,treeifyError:gu,trim:rr,tuple:Ro,uint32:sm,uint64:fm,ulid:Bf,undefined:pm,union:Tr,unknown:nt,uppercase:Xn,url:Cf,util:pu,uuid:jf,uuidv4:Pf,uuidv6:Af,uuidv7:Lf,void:gm,xid:Kf,xor:wm},Symbol.toStringTag,{value:"Module"}));function sc(e){const t=e.match(/^(.+)\/(flows|sources)\/([^/]+)$/);return t?[t[1],t[3]]:null}function T1(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,c],s)=>{const u=N.parseTimeRange(s.timerange);let l=u.start?N.timeMomentToSeconds(u.start):null,d=u.end?N.timeMomentToSeconds(u.end):null;return(a===null||l!==null&&l<a)&&(a=l),(c===null||d!==null&&d>c)&&(c=d),[a,c]},[null,null]);return n===null||o===null?"()":N.formatTimeRangeExpr({start:N.secondsToTimeMoment(n),end:N.secondsToTimeMoment(o),isStartInclusive:!0,isEndInclusive:!1})}function lc(e,t){const r=N.parseTimeRange(t);if(r.start===void 0||r.end===void 0)throw new B.OmpError("Can't convert duration to timerange. Timerange is missing start and/or end.");const i=N.timeMomentToSeconds(r.start),n=N.timeMomentToSeconds(r.end);if(n-i<e)return console.warn("Provided duration is longer than timerange, using total timerange",t),t;const o=n-e;return N.formatTimeRangeExpr({start:N.secondsToTimeMoment(o),end:r.end,isEndInclusive:r.isEndInclusive,isStartInclusive:r.isStartInclusive})}function z1(e){const t=e.endsWith("/")?e.slice(0,-1):e;return t.substring(t.lastIndexOf("/")+1)}function dc(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 E1(e){return uc.object({ffomTimeZoneOffset:uc.number().int().min(-23).max(23).optional()}).safeParse(e).success}function Rr(e){return Gc(Qh(new we(e)))}const _n="omakase-virtual-flow";class fc{constructor(t,r){k(this,"_tamsApi");this._tamsApi=tg(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 we(i=>{(async()=>{try{const n=await this.fetchTamsResource(t);let o;if(n.flow?o=await this._fetchFlow(n.flow.id):o=await this._fetchFirstFlowBySourceId(n.source.id),!o)throw new B.OmpError("Source has no flow representations");const a=await this.fetchFlowResources(o,r);i.next(a),i.complete()}catch(n){i.error(n)}})()})}async fetchFlowResources(t,r){var s;const i=t.id===_n,n=await this._fetchSubflows(((s=t.flow_collection)==null?void 0:s.map(u=>u.id))??[]),o=T1(i?n:[t,...n]);if(o==="()")throw new B.OmpError("Provided TAMS media has no timerange");let a;r?typeof r=="number"?a=lc(r,o):a=N.timerangeDuration(r)>N.timerangeDuration(o)?o:r:a=lc(600,o);const c=await Promise.all([t,...n].map(async u=>[u.id,await this._fetchFlowSegments(u.id,a)]));return{flow:t,subflows:n,flowsSegments:new Map(c??[]),timerange:a}}async _fetchSubflows(t){let r=await Promise.all(t.map(async i=>await this._fetchFlow(i)));return r=r.filter(i=>!this._isFlowHlsIncompatible(i)),r}async _fetchFlow(t){return(await this._tamsApi.get(`/flows/${t}?include_timerange=true`)).data}async _fetchFirstFlowBySourceId(t){const i=(await this._tamsApi.get(`/flows?source_id=${t}`)).data.at(0);return i?await this._fetchFlow(i.id):void 0}async _fetchFlowSegments(t,r,i){if(t===_n)return[];const n=`/flows/${t}/segments${r?`?timerange=${r}`:""}${r?"&":"?"}limit=300`;let o=await this._tamsApi.get(n),a=o.data;for(;o.nextLink&&(!i||a.length<i);)o=await this._tamsApi.getUrl(o.nextLink),a=a.concat(o.data);return i&&(a=a.slice(0,i)),a}_isFlowHlsIncompatible(t){return!1}fetchManifestResourcesForMultipleFlows(t,r){return new we(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 u=await this.fetchFlowResources({id:_n,source_id:"",format:"urn:x-nmos:format:multi",flow_collection:a.map(l=>({id:l.id,role:""}))},r);i.next(u),i.complete()}catch(n){i.error(n)}})()})}}var Fr,mc;function Jm(){if(mc)return Fr;mc=1;function e(s,u){this.message=s,this.error=u}e.prototype=Object.create(Error.prototype);const t=/([0-9]+)?:?([0-9]{2}):([0-9]{2}\.[0-9]{2,3})/;function r(s,u){u||(u={});const{meta:l=!1,strict:d=!0}=u;if(typeof s!="string")throw new e("Input must be a string");s=s.trim(),s=s.replace(/\r\n/g,`
|
|
63
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const d=l[1];if(t===l[0]){o(l);continue}if(e.external){const m=(s=e.external.registry.get(l[0]))==null?void 0:s.id;if(t!==l[0]&&m){o(l);continue}}if((c=e.metadataRegistry.get(l[0]))==null?void 0:c.id){o(l);continue}if(d.cycle){o(l);continue}if(d.count>1&&e.reused==="ref"){o(l);continue}}}function bt(e,t){var a,u,s;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=c=>{const l=e.seen.get(c);if(l.ref===null)return;const d=l.def??l.schema,f={...d},m=l.ref;if(l.ref=null,m){i(m);const p=e.seen.get(m),v=p.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(v)):Object.assign(d,v),Object.assign(d,f),c._zod.parent===m)for(const E in d)E==="$ref"||E==="allOf"||E in f||delete d[E];if(v.$ref&&p.def)for(const E in d)E==="$ref"||E==="allOf"||E in p.def&&JSON.stringify(d[E])===JSON.stringify(p.def[E])&&delete d[E]}const h=c._zod.parent;if(h&&h!==m){i(h);const p=e.seen.get(h);if(p!=null&&p.schema.$ref&&(d.$ref=p.schema.$ref,p.def))for(const v in d)v==="$ref"||v==="allOf"||v in p.def&&JSON.stringify(d[v])===JSON.stringify(p.def[v])&&delete d[v]}e.override({zodSchema:c,jsonSchema:d,path:l.path??[]})};for(const c of[...e.seen.entries()].reverse())i(c[0]);const n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const c=(u=e.external.registry.get(t))==null?void 0:u.id;if(!c)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(c)}Object.assign(n,r.def??r.schema);const o=((s=e.external)==null?void 0:s.defs)??{};for(const c of e.seen.entries()){const l=c[1];l.def&&l.defId&&(o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?n.$defs=o:n.definitions=o);try{const c=JSON.parse(JSON.stringify(n));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ot(t,"input",e.processors),output:Ot(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function de(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return de(i.element,r);if(i.type==="set")return de(i.valueType,r);if(i.type==="lazy")return de(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return de(i.innerType,r);if(i.type==="intersection")return de(i.left,r)||de(i.right,r);if(i.type==="record"||i.type==="map")return de(i.keyType,r)||de(i.valueType,r);if(i.type==="pipe")return de(i.in,r)||de(i.out,r);if(i.type==="object"){for(const n in i.shape)if(de(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(const n of i.options)if(de(n,r))return!0;return!1}if(i.type==="tuple"){for(const n of i.items)if(de(n,r))return!0;return!!(i.rest&&de(i.rest,r))}return!1}const xd=(e,t={})=>r=>{const i=gt({...r,processors:t});return B(e,i),vt(i,e),bt(i,e)},Ot=(e,t,r={})=>i=>{const{libraryOptions:n,target:o}=i??{},a=gt({...n??{},target:o,io:t,processors:r});return B(e,a),vt(a,e),bt(a,e)},a1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Td=(e,t,r,i)=>{const n=r;n.type="string";const{minimum:o,maximum:a,format:u,patterns:s,contentEncoding:c}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof a=="number"&&(n.maxLength=a),u&&(n.format=a1[u]??u,n.format===""&&delete n.format,u==="time"&&delete n.format),c&&(n.contentEncoding=c),s&&s.size>0){const l=[...s];l.length===1?n.pattern=l[0].source:l.length>1&&(n.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},zd=(e,t,r,i)=>{const n=r,{minimum:o,maximum:a,format:u,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l}=e._zod.bag;typeof u=="string"&&u.includes("int")?n.type="integer":n.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l),typeof o=="number"&&(n.minimum=o,typeof l=="number"&&t.target!=="draft-04"&&(l>=o?delete n.minimum:delete n.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=c,n.exclusiveMaximum=!0):n.exclusiveMaximum=c),typeof a=="number"&&(n.maximum=a,typeof c=="number"&&t.target!=="draft-04"&&(c<=a?delete n.maximum:delete n.exclusiveMaximum)),typeof s=="number"&&(n.multipleOf=s)},Ed=(e,t,r,i)=>{r.type="boolean"},Od=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Ud=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Dd=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Nd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},jd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Pd=(e,t,r,i)=>{r.not={}},Ad=(e,t,r,i)=>{},Ld=(e,t,r,i)=>{},Cd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Zd=(e,t,r,i)=>{const n=e._zod.def,o=yi(n.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},Md=(e,t,r,i)=>{const n=e._zod.def,o=[];for(const a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){const a=o[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o},Rd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Fd=(e,t,r,i)=>{const n=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},Vd=(e,t,r,i)=>{const n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:u,mime:s}=e._zod.bag;a!==void 0&&(o.minLength=a),u!==void 0&&(o.maxLength=u),s?s.length===1?(o.contentMediaType=s[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=s.map(c=>({contentMediaType:c}))):Object.assign(n,o)},Bd=(e,t,r,i)=>{r.type="boolean"},Kd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Jd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Gd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},qd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Wd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Hd=(e,t,r,i)=>{const n=r,o=e._zod.def,{minimum:a,maximum:u}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof u=="number"&&(n.maxItems=u),n.type="array",n.items=B(o.element,t,{...i,path:[...i.path,"items"]})},Xd=(e,t,r,i)=>{var c;const n=r,o=e._zod.def;n.type="object",n.properties={};const a=o.shape;for(const l in a)n.properties[l]=B(a[l],t,{...i,path:[...i.path,"properties",l]});const u=new Set(Object.keys(a)),s=new Set([...u].filter(l=>{const d=o.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));s.size>0&&(n.required=Array.from(s)),((c=o.catchall)==null?void 0:c._zod.def.type)==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=B(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},bo=(e,t,r,i)=>{const n=e._zod.def,o=n.inclusive===!1,a=n.options.map((u,s)=>B(u,t,{...i,path:[...i.path,o?"oneOf":"anyOf",s]}));o?r.oneOf=a:r.anyOf=a},Yd=(e,t,r,i)=>{const n=e._zod.def,o=B(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=B(n.right,t,{...i,path:[...i.path,"allOf",1]}),u=c=>"allOf"in c&&Object.keys(c).length===1,s=[...u(o)?o.allOf:[o],...u(a)?a.allOf:[a]];r.allOf=s},Qd=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="array";const a=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",s=o.items.map((f,m)=>B(f,t,{...i,path:[...i.path,a,m]})),c=o.rest?B(o.rest,t,{...i,path:[...i.path,u,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=s,c&&(n.items=c)):t.target==="openapi-3.0"?(n.items={anyOf:s},c&&n.items.anyOf.push(c),n.minItems=s.length,c||(n.maxItems=s.length)):(n.items=s,c&&(n.additionalItems=c));const{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(n.minItems=l),typeof d=="number"&&(n.maxItems=d)},ef=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="object";const a=o.keyType,u=a._zod.bag,s=u==null?void 0:u.patterns;if(o.mode==="loose"&&s&&s.size>0){const l=B(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(const d of s)n.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=B(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=B(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const c=a._zod.values;if(c){const l=[...c].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(n.required=l)}},tf=(e,t,r,i)=>{const n=e._zod.def,o=B(n.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},nf=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},rf=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},of=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},af=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},uf=(e,t,r,i)=>{const n=e._zod.def,o=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;B(o,t,i);const a=t.seen.get(e);a.ref=o},cf=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},sf=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},_o=(e,t,r,i)=>{const n=e._zod.def;B(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},lf=(e,t,r,i)=>{const n=e._zod.innerType;B(n,t,i);const o=t.seen.get(e);o.ref=n},ui={string:Td,number:zd,boolean:Ed,bigint:Od,symbol:Ud,null:Dd,undefined:Nd,void:jd,never:Pd,any:Ad,unknown:Ld,date:Cd,enum:Zd,literal:Md,nan:Rd,template_literal:Fd,file:Vd,success:Bd,custom:Kd,function:Jd,transform:Gd,map:qd,set:Wd,array:Hd,object:Xd,union:bo,intersection:Yd,tuple:Qd,record:ef,nullable:tf,nonoptional:nf,default:rf,prefault:of,catch:af,pipe:uf,readonly:cf,promise:sf,optional:_o,lazy:lf};function df(e,t){if("_idmap"in e){const i=e,n=gt({...t,processors:ui}),o={};for(const s of i._idmap.entries()){const[c,l]=s;B(l,n)}const a={},u={registry:i,uri:t==null?void 0:t.uri,defs:o};n.external=u;for(const s of i._idmap.entries()){const[c,l]=s;vt(n,l),a[c]=bt(n,l)}if(Object.keys(o).length>0){const s=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[s]:o}}return{schemas:a}}const r=gt({...t,processors:ui});return B(e,r),vt(r,e),bt(r,e)}class u1{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=(t==null?void 0:t.target)??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=gt({processors:ui,target:r,...(t==null?void 0:t.metadata)&&{metadata:t.metadata},...(t==null?void 0:t.unrepresentable)&&{unrepresentable:t.unrepresentable},...(t==null?void 0:t.override)&&{override:t.override},...(t==null?void 0:t.io)&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return B(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),vt(this.ctx,t);const i=bt(this.ctx,t),{"~standard":n,...o}=i;return o}}const c1=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),s1=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:Ys,$ZodArray:rl,$ZodAsyncError:Ye,$ZodBase64:Ms,$ZodBase64URL:Fs,$ZodBigInt:Ri,$ZodBigIntFormat:qs,$ZodBoolean:Mi,$ZodCIDRv4:Cs,$ZodCIDRv6:Zs,$ZodCUID:xs,$ZodCUID2:Ts,$ZodCatch:kl,$ZodCheck:X,$ZodCheckBigIntFormat:ns,$ZodCheckEndsWith:ps,$ZodCheckGreaterThan:Li,$ZodCheckIncludes:fs,$ZodCheckLengthEquals:cs,$ZodCheckLessThan:Ai,$ZodCheckLowerCase:ls,$ZodCheckMaxLength:as,$ZodCheckMaxSize:rs,$ZodCheckMimeType:gs,$ZodCheckMinLength:us,$ZodCheckMinSize:is,$ZodCheckMultipleOf:es,$ZodCheckNumberFormat:ts,$ZodCheckOverwrite:vs,$ZodCheckProperty:hs,$ZodCheckRegex:ss,$ZodCheckSizeEquals:os,$ZodCheckStartsWith:ms,$ZodCheckStringFormat:Vt,$ZodCheckUpperCase:ds,$ZodCodec:Bi,$ZodCustom:Dl,$ZodCustomStringFormat:Js,$ZodDate:nl,$ZodDefault:yl,$ZodDiscriminatedUnion:sl,$ZodE164:Vs,$ZodEmail:ws,$ZodEmoji:ks,$ZodEncodeError:Fn,$ZodEnum:pl,$ZodError:wi,$ZodExactOptional:bl,$ZodFile:gl,$ZodFunction:El,$ZodGUID:ys,$ZodIPv4:Ps,$ZodIPv6:As,$ZodISODate:Ds,$ZodISODateTime:Us,$ZodISODuration:js,$ZodISOTime:Ns,$ZodIntersection:ll,$ZodJWT:Ks,$ZodKSUID:Os,$ZodLazy:Ul,$ZodLiteral:hl,$ZodMAC:Ls,$ZodMap:fl,$ZodNaN:Il,$ZodNanoID:Is,$ZodNever:el,$ZodNonOptional:wl,$ZodNull:Xs,$ZodNullable:_l,$ZodNumber:Zi,$ZodNumberFormat:Gs,$ZodObject:al,$ZodObjectJIT:ul,$ZodOptional:Vi,$ZodPipe:xl,$ZodPrefault:$l,$ZodPromise:Ol,$ZodReadonly:Tl,$ZodRealError:he,$ZodRecord:dl,$ZodRegistry:Zl,$ZodSet:ml,$ZodString:Bt,$ZodStringFormat:G,$ZodSuccess:Sl,$ZodSymbol:Ws,$ZodTemplateLiteral:zl,$ZodTransform:vl,$ZodTuple:Fi,$ZodType:L,$ZodULID:zs,$ZodURL:Ss,$ZodUUID:$s,$ZodUndefined:Hs,$ZodUnion:Gn,$ZodUnknown:Qs,$ZodVoid:tl,$ZodXID:Es,$ZodXor:cl,$brand:Wu,$constructor:g,$input:Cl,$output:Ll,Doc:bs,JSONSchema:c1,JSONSchemaGenerator:u1,NEVER:qu,TimePrecision:Vl,_any:ld,_array:vd,_base64:co,_base64url:so,_bigint:rd,_boolean:td,_catch:e1,_check:wd,_cidrv4:ao,_cidrv6:uo,_coercedBigint:id,_coercedBoolean:nd,_coercedDate:hd,_coercedNumber:Wl,_coercedString:Rl,_cuid:Qi,_cuid2:eo,_custom:_d,_date:pd,_decode:xi,_decodeAsync:zi,_default:Xb,_discriminatedUnion:Zb,_e164:lo,_email:Ji,_emoji:Xi,_encode:Ii,_encodeAsync:Ti,_endsWith:er,_enum:Kb,_file:bd,_float32:Xl,_float64:Yl,_gt:Ve,_gte:fe,_guid:Un,_includes:Yn,_int:Hl,_int32:Ql,_int64:od,_intersection:Mb,_ipv4:io,_ipv6:oo,_isoDate:Kl,_isoDateTime:Bl,_isoDuration:Gl,_isoTime:Jl,_jwt:fo,_ksuid:ro,_lazy:i1,_length:Gt,_literal:Gb,_lowercase:Hn,_lt:Fe,_lte:_e,_mac:Fl,_map:Vb,_max:_e,_maxLength:Jt,_maxSize:wt,_mime:tr,_min:fe,_minLength:et,_minSize:Be,_multipleOf:ht,_nan:gd,_nanoid:Yi,_nativeEnum:Jb,_negative:po,_never:fd,_nonnegative:go,_nonoptional:Yb,_nonpositive:ho,_normalize:nr,_null:sd,_nullable:Hb,_number:ql,_optional:Wb,_overwrite:Pe,_parse:Lt,_parseAsync:Ct,_pipe:t1,_positive:mo,_promise:o1,_property:vo,_readonly:n1,_record:Fb,_refine:yd,_regex:Wn,_safeDecode:Oi,_safeDecodeAsync:Di,_safeEncode:Ei,_safeEncodeAsync:Ui,_safeParse:Zt,_safeParseAsync:Mt,_set:Bb,_size:Kt,_slugify:ar,_startsWith:Qn,_string:Ml,_stringFormat:qt,_stringbool:Id,_success:Qb,_superRefine:$d,_symbol:ud,_templateLiteral:r1,_toLowerCase:ir,_toUpperCase:or,_transform:qb,_trim:rr,_tuple:Rb,_uint32:ed,_uint64:ad,_ulid:to,_undefined:cd,_union:Lb,_unknown:dd,_uppercase:Xn,_url:qn,_uuid:Gi,_uuidv4:qi,_uuidv6:Wi,_uuidv7:Hi,_void:md,_xid:no,_xor:Cb,clone:we,config:le,createStandardJSONSchemaMethod:Ot,createToJSONSchemaMethod:xd,decode:$g,decodeAsync:Sg,describe:Sd,encode:yg,encodeAsync:wg,extractDefs:vt,finalize:bt,flattenError:Si,formatError:ki,globalConfig:Tn,globalRegistry:be,initializeContext:gt,isValidBase64:Ci,isValidBase64URL:Rs,isValidJWT:Bs,locales:Al,meta:kd,parse:ii,parseAsync:oi,prettifyError:gc,process:B,regexes:Pi,registry:Ki,safeDecode:Ig,safeDecodeAsync:Tg,safeEncode:kg,safeEncodeAsync:xg,safeParse:vc,safeParseAsync:bc,toDotPath:hc,toJSONSchema:df,treeifyError:pc,util:fc,version:_s},Symbol.toStringTag,{value:"Module"})),l1=Object.freeze(Object.defineProperty({__proto__:null,endsWith:er,gt:Ve,gte:fe,includes:Yn,length:Gt,lowercase:Hn,lt:Fe,lte:_e,maxLength:Jt,maxSize:wt,mime:tr,minLength:et,minSize:Be,multipleOf:ht,negative:po,nonnegative:go,nonpositive:ho,normalize:nr,overwrite:Pe,positive:mo,property:vo,regex:Wn,size:Kt,slugify:ar,startsWith:Qn,toLowerCase:ir,toUpperCase:or,trim:rr,uppercase:Xn},Symbol.toStringTag,{value:"Module"})),yo=g("ZodISODateTime",(e,t)=>{Us.init(e,t),q.init(e,t)});function ff(e){return Bl(yo,e)}const $o=g("ZodISODate",(e,t)=>{Ds.init(e,t),q.init(e,t)});function mf(e){return Kl($o,e)}const wo=g("ZodISOTime",(e,t)=>{Ns.init(e,t),q.init(e,t)});function pf(e){return Jl(wo,e)}const So=g("ZodISODuration",(e,t)=>{js.init(e,t),q.init(e,t)});function hf(e){return Gl(So,e)}const gf=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:$o,ZodISODateTime:yo,ZodISODuration:So,ZodISOTime:wo,date:mf,datetime:ff,duration:hf,time:pf},Symbol.toStringTag,{value:"Module"})),vf=(e,t)=>{wi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ki(e,r)},flatten:{value:r=>Si(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,zn,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,zn,2)}},isEmpty:{get(){return e.issues.length===0}}})},d1=g("ZodError",vf),ge=g("ZodError",vf,{Parent:Error}),bf=Lt(ge),_f=Ct(ge),yf=Zt(ge),$f=Mt(ge),wf=Ii(ge),Sf=xi(ge),kf=Ti(ge),If=zi(ge),xf=Ei(ge),Tf=Oi(ge),zf=Ui(ge),Ef=Di(ge),C=g("ZodType",(e,t)=>(L.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ot(e,"input"),output:Ot(e,"output")}}),e.toJSONSchema=xd(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(De(t,{checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(r,i)=>we(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>bf(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>yf(e,r,i),e.parseAsync=async(r,i)=>_f(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>$f(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>wf(e,r,i),e.decode=(r,i)=>Sf(e,r,i),e.encodeAsync=async(r,i)=>kf(e,r,i),e.decodeAsync=async(r,i)=>If(e,r,i),e.safeEncode=(r,i)=>xf(e,r,i),e.safeDecode=(r,i)=>Tf(e,r,i),e.safeEncodeAsync=async(r,i)=>zf(e,r,i),e.safeDecodeAsync=async(r,i)=>Ef(e,r,i),e.refine=(r,i)=>e.check(ma(r,i)),e.superRefine=r=>e.check(pa(r)),e.overwrite=r=>e.check(Pe(r)),e.optional=()=>Dt(e),e.exactOptional=()=>Wo(e),e.nullable=()=>Nt(e),e.nullish=()=>Dt(Nt(e)),e.nonoptional=r=>ta(e,r),e.array=()=>en(e),e.or=r=>Tr([e,r]),e.and=r=>Zo(e,r),e.transform=r=>jt(e,Er(r)),e.default=r=>Yo(e,r),e.prefault=r=>ea(e,r),e.catch=r=>ia(e,r),e.pipe=r=>jt(e,r),e.readonly=()=>ua(e),e.describe=r=>{const i=e.clone();return be.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){var r;return(r=be.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return be.get(e);const i=e.clone();return be.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),ur=g("_ZodString",(e,t)=>{Bt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Td(e,i,n);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(Wn(...i)),e.includes=(...i)=>e.check(Yn(...i)),e.startsWith=(...i)=>e.check(Qn(...i)),e.endsWith=(...i)=>e.check(er(...i)),e.min=(...i)=>e.check(et(...i)),e.max=(...i)=>e.check(Jt(...i)),e.length=(...i)=>e.check(Gt(...i)),e.nonempty=(...i)=>e.check(et(1,...i)),e.lowercase=i=>e.check(Hn(i)),e.uppercase=i=>e.check(Xn(i)),e.trim=()=>e.check(rr()),e.normalize=(...i)=>e.check(nr(...i)),e.toLowerCase=()=>e.check(ir()),e.toUpperCase=()=>e.check(or()),e.slugify=()=>e.check(ar())}),Wt=g("ZodString",(e,t)=>{Bt.init(e,t),ur.init(e,t),e.email=r=>e.check(Ji(cr,r)),e.url=r=>e.check(qn(Ht,r)),e.jwt=r=>e.check(fo(Sr,r)),e.emoji=r=>e.check(Xi(sr,r)),e.guid=r=>e.check(Un(Ut,r)),e.uuid=r=>e.check(Gi(Oe,r)),e.uuidv4=r=>e.check(qi(Oe,r)),e.uuidv6=r=>e.check(Wi(Oe,r)),e.uuidv7=r=>e.check(Hi(Oe,r)),e.nanoid=r=>e.check(Yi(lr,r)),e.guid=r=>e.check(Un(Ut,r)),e.cuid=r=>e.check(Qi(dr,r)),e.cuid2=r=>e.check(eo(fr,r)),e.ulid=r=>e.check(to(mr,r)),e.base64=r=>e.check(co(yr,r)),e.base64url=r=>e.check(so($r,r)),e.xid=r=>e.check(no(pr,r)),e.ksuid=r=>e.check(ro(hr,r)),e.ipv4=r=>e.check(io(gr,r)),e.ipv6=r=>e.check(oo(vr,r)),e.cidrv4=r=>e.check(ao(br,r)),e.cidrv6=r=>e.check(uo(_r,r)),e.e164=r=>e.check(lo(wr,r)),e.datetime=r=>e.check(ff(r)),e.date=r=>e.check(mf(r)),e.time=r=>e.check(pf(r)),e.duration=r=>e.check(hf(r))});function Dn(e){return Ml(Wt,e)}const q=g("ZodStringFormat",(e,t)=>{G.init(e,t),ur.init(e,t)}),cr=g("ZodEmail",(e,t)=>{ws.init(e,t),q.init(e,t)});function Of(e){return Ji(cr,e)}const Ut=g("ZodGUID",(e,t)=>{ys.init(e,t),q.init(e,t)});function Uf(e){return Un(Ut,e)}const Oe=g("ZodUUID",(e,t)=>{$s.init(e,t),q.init(e,t)});function Df(e){return Gi(Oe,e)}function Nf(e){return qi(Oe,e)}function jf(e){return Wi(Oe,e)}function Pf(e){return Hi(Oe,e)}const Ht=g("ZodURL",(e,t)=>{Ss.init(e,t),q.init(e,t)});function Af(e){return qn(Ht,e)}function Lf(e){return qn(Ht,{protocol:/^https?$/,hostname:Lc,...b(e)})}const sr=g("ZodEmoji",(e,t)=>{ks.init(e,t),q.init(e,t)});function Cf(e){return Xi(sr,e)}const lr=g("ZodNanoID",(e,t)=>{Is.init(e,t),q.init(e,t)});function Zf(e){return Yi(lr,e)}const dr=g("ZodCUID",(e,t)=>{xs.init(e,t),q.init(e,t)});function Mf(e){return Qi(dr,e)}const fr=g("ZodCUID2",(e,t)=>{Ts.init(e,t),q.init(e,t)});function Rf(e){return eo(fr,e)}const mr=g("ZodULID",(e,t)=>{zs.init(e,t),q.init(e,t)});function Ff(e){return to(mr,e)}const pr=g("ZodXID",(e,t)=>{Es.init(e,t),q.init(e,t)});function Vf(e){return no(pr,e)}const hr=g("ZodKSUID",(e,t)=>{Os.init(e,t),q.init(e,t)});function Bf(e){return ro(hr,e)}const gr=g("ZodIPv4",(e,t)=>{Ps.init(e,t),q.init(e,t)});function Kf(e){return io(gr,e)}const ko=g("ZodMAC",(e,t)=>{Ls.init(e,t),q.init(e,t)});function Jf(e){return Fl(ko,e)}const vr=g("ZodIPv6",(e,t)=>{As.init(e,t),q.init(e,t)});function Gf(e){return oo(vr,e)}const br=g("ZodCIDRv4",(e,t)=>{Cs.init(e,t),q.init(e,t)});function qf(e){return ao(br,e)}const _r=g("ZodCIDRv6",(e,t)=>{Zs.init(e,t),q.init(e,t)});function Wf(e){return uo(_r,e)}const yr=g("ZodBase64",(e,t)=>{Ms.init(e,t),q.init(e,t)});function Hf(e){return co(yr,e)}const $r=g("ZodBase64URL",(e,t)=>{Fs.init(e,t),q.init(e,t)});function Xf(e){return so($r,e)}const wr=g("ZodE164",(e,t)=>{Vs.init(e,t),q.init(e,t)});function Yf(e){return lo(wr,e)}const Sr=g("ZodJWT",(e,t)=>{Ks.init(e,t),q.init(e,t)});function Qf(e){return fo(Sr,e)}const St=g("ZodCustomStringFormat",(e,t)=>{Js.init(e,t),q.init(e,t)});function em(e,t,r={}){return qt(St,e,t,r)}function tm(e){return qt(St,"hostname",Ac,e)}function nm(e){return qt(St,"hex",Yc,e)}function rm(e,t){const r=(t==null?void 0:t.enc)??"hex",i=`${e}_${r}`,n=Pi[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return qt(St,i,n,t)}const Xt=g("ZodNumber",(e,t)=>{Zi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,n,o)=>zd(e,i,n),e.gt=(i,n)=>e.check(Ve(i,n)),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.lt=(i,n)=>e.check(Fe(i,n)),e.lte=(i,n)=>e.check(_e(i,n)),e.max=(i,n)=>e.check(_e(i,n)),e.int=i=>e.check(Nn(i)),e.safe=i=>e.check(Nn(i)),e.positive=i=>e.check(Ve(0,i)),e.nonnegative=i=>e.check(fe(0,i)),e.negative=i=>e.check(Fe(0,i)),e.nonpositive=i=>e.check(_e(0,i)),e.multipleOf=(i,n)=>e.check(ht(i,n)),e.step=(i,n)=>e.check(ht(i,n)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Io(e){return ql(Xt,e)}const rt=g("ZodNumberFormat",(e,t)=>{Gs.init(e,t),Xt.init(e,t)});function Nn(e){return Hl(rt,e)}function im(e){return Xl(rt,e)}function om(e){return Yl(rt,e)}function am(e){return Ql(rt,e)}function um(e){return ed(rt,e)}const Yt=g("ZodBoolean",(e,t)=>{Mi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ed(e,r,i)});function xo(e){return td(Yt,e)}const Qt=g("ZodBigInt",(e,t)=>{Ri.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Od(e,i),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.gt=(i,n)=>e.check(Ve(i,n)),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.lt=(i,n)=>e.check(Fe(i,n)),e.lte=(i,n)=>e.check(_e(i,n)),e.max=(i,n)=>e.check(_e(i,n)),e.positive=i=>e.check(Ve(BigInt(0),i)),e.negative=i=>e.check(Fe(BigInt(0),i)),e.nonpositive=i=>e.check(_e(BigInt(0),i)),e.nonnegative=i=>e.check(fe(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(ht(i,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function cm(e){return rd(Qt,e)}const kr=g("ZodBigIntFormat",(e,t)=>{qs.init(e,t),Qt.init(e,t)});function sm(e){return od(kr,e)}function lm(e){return ad(kr,e)}const To=g("ZodSymbol",(e,t)=>{Ws.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ud(e,r)});function dm(e){return ud(To,e)}const zo=g("ZodUndefined",(e,t)=>{Hs.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nd(e,r)});function fm(e){return cd(zo,e)}const Eo=g("ZodNull",(e,t)=>{Xs.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dd(e,r,i)});function Oo(e){return sd(Eo,e)}const Uo=g("ZodAny",(e,t)=>{Ys.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ad()});function mm(){return ld(Uo)}const Do=g("ZodUnknown",(e,t)=>{Qs.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ld()});function tt(){return dd(Do)}const No=g("ZodNever",(e,t)=>{el.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pd(e,r,i)});function Ir(e){return fd(No,e)}const jo=g("ZodVoid",(e,t)=>{tl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jd(e,r)});function pm(e){return md(jo,e)}const xr=g("ZodDate",(e,t)=>{nl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Cd(e,i),e.min=(i,n)=>e.check(fe(i,n)),e.max=(i,n)=>e.check(_e(i,n));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function hm(e){return pd(xr,e)}const Po=g("ZodArray",(e,t)=>{rl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Hd(e,r,i,n),e.element=t.element,e.min=(r,i)=>e.check(et(r,i)),e.nonempty=r=>e.check(et(1,r)),e.max=(r,i)=>e.check(Jt(r,i)),e.length=(r,i)=>e.check(Gt(r,i)),e.unwrap=()=>e.element});function en(e,t){return vd(Po,e,t)}function gm(e){const t=e._zod.def.shape;return zr(Object.keys(t))}const tn=g("ZodObject",(e,t)=>{ul.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Xd(e,r,i,n),Z(e,"shape",()=>t.shape),e.keyof=()=>zr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:tt()}),e.loose=()=>e.clone({...e._zod.def,catchall:tt()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ir()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>oc(e,r),e.safeExtend=r=>ac(e,r),e.merge=r=>uc(e,r),e.pick=r=>rc(e,r),e.omit=r=>ic(e,r),e.partial=(...r)=>cc(Or,e,r[0]),e.required=(...r)=>sc(Ur,e,r[0])});function vm(e,t){const r={type:"object",shape:e??{},...b(t)};return new tn(r)}function bm(e,t){return new tn({type:"object",shape:e,catchall:Ir(),...b(t)})}function _m(e,t){return new tn({type:"object",shape:e,catchall:tt(),...b(t)})}const nn=g("ZodUnion",(e,t)=>{Gn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bo(e,r,i,n),e.options=t.options});function Tr(e,t){return new nn({type:"union",options:e,...b(t)})}const Ao=g("ZodXor",(e,t)=>{nn.init(e,t),cl.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bo(e,r,i,n),e.options=t.options});function ym(e,t){return new Ao({type:"union",options:e,inclusive:!1,...b(t)})}const Lo=g("ZodDiscriminatedUnion",(e,t)=>{nn.init(e,t),sl.init(e,t)});function $m(e,t,r){return new Lo({type:"union",options:t,discriminator:e,...b(r)})}const Co=g("ZodIntersection",(e,t)=>{ll.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Yd(e,r,i,n)});function Zo(e,t){return new Co({type:"intersection",left:e,right:t})}const Mo=g("ZodTuple",(e,t)=>{Fi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Qd(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Ro(e,t,r){const i=t instanceof L,n=i?r:t,o=i?t:null;return new Mo({type:"tuple",items:e,rest:o,...b(n)})}const rn=g("ZodRecord",(e,t)=>{dl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ef(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function Fo(e,t,r){return new rn({type:"record",keyType:e,valueType:t,...b(r)})}function wm(e,t,r){const i=we(e);return i._zod.values=void 0,new rn({type:"record",keyType:i,valueType:t,...b(r)})}function Sm(e,t,r){return new rn({type:"record",keyType:e,valueType:t,mode:"loose",...b(r)})}const Vo=g("ZodMap",(e,t)=>{fl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>qd(e,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Be(...r)),e.nonempty=r=>e.check(Be(1,r)),e.max=(...r)=>e.check(wt(...r)),e.size=(...r)=>e.check(Kt(...r))});function km(e,t,r){return new Vo({type:"map",keyType:e,valueType:t,...b(r)})}const Bo=g("ZodSet",(e,t)=>{ml.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Wd(e,r),e.min=(...r)=>e.check(Be(...r)),e.nonempty=r=>e.check(Be(1,r)),e.max=(...r)=>e.check(wt(...r)),e.size=(...r)=>e.check(Kt(...r))});function Im(e,t){return new Bo({type:"set",valueType:e,...b(t)})}const _t=g("ZodEnum",(e,t)=>{pl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Zd(e,i,n),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{const o={};for(const a of i)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new _t({...t,checks:[],...b(n),entries:o})},e.exclude=(i,n)=>{const o={...t.entries};for(const a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new _t({...t,checks:[],...b(n),entries:o})}});function zr(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new _t({type:"enum",entries:r,...b(t)})}function xm(e,t){return new _t({type:"enum",entries:e,...b(t)})}const Ko=g("ZodLiteral",(e,t)=>{hl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Md(e,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Tm(e,t){return new Ko({type:"literal",values:Array.isArray(e)?e:[e],...b(t)})}const Jo=g("ZodFile",(e,t)=>{gl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Vd(e,r,i),e.min=(r,i)=>e.check(Be(r,i)),e.max=(r,i)=>e.check(wt(r,i)),e.mime=(r,i)=>e.check(tr(Array.isArray(r)?r:[r],i))});function zm(e){return bd(Jo,e)}const Go=g("ZodTransform",(e,t)=>{vl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Gd(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Fn(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(mt(o,r.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(mt(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function Er(e){return new Go({type:"transform",transform:e})}const Or=g("ZodOptional",(e,t)=>{Vi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_o(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Dt(e){return new Or({type:"optional",innerType:e})}const qo=g("ZodExactOptional",(e,t)=>{bl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_o(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Wo(e){return new qo({type:"optional",innerType:e})}const Ho=g("ZodNullable",(e,t)=>{_l.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>tf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Nt(e){return new Ho({type:"nullable",innerType:e})}function Em(e){return Dt(Nt(e))}const Xo=g("ZodDefault",(e,t)=>{yl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>rf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Yo(e,t){return new Xo({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Bn(t)}})}const Qo=g("ZodPrefault",(e,t)=>{$l.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>of(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ea(e,t){return new Qo({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Bn(t)}})}const Ur=g("ZodNonOptional",(e,t)=>{wl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>nf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ta(e,t){return new Ur({type:"nonoptional",innerType:e,...b(t)})}const na=g("ZodSuccess",(e,t)=>{Sl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bd(e,r,i),e.unwrap=()=>e._zod.def.innerType});function Om(e){return new na({type:"success",innerType:e})}const ra=g("ZodCatch",(e,t)=>{kl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>af(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ia(e,t){return new ra({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const oa=g("ZodNaN",(e,t)=>{Il.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Rd(e,r)});function Um(e){return gd(oa,e)}const Dr=g("ZodPipe",(e,t)=>{xl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uf(e,r,i,n),e.in=t.in,e.out=t.out});function jt(e,t){return new Dr({type:"pipe",in:e,out:t})}const Nr=g("ZodCodec",(e,t)=>{Dr.init(e,t),Bi.init(e,t)});function Dm(e,t,r){return new Nr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}const aa=g("ZodReadonly",(e,t)=>{Tl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ua(e){return new aa({type:"readonly",innerType:e})}const ca=g("ZodTemplateLiteral",(e,t)=>{zl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fd(e,r,i)});function Nm(e,t){return new ca({type:"template_literal",parts:e,...b(t)})}const sa=g("ZodLazy",(e,t)=>{Ul.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lf(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function la(e){return new sa({type:"lazy",getter:e})}const da=g("ZodPromise",(e,t)=>{Ol.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function jm(e){return new da({type:"promise",innerType:e})}const fa=g("ZodFunction",(e,t)=>{El.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Jd(e,r)});function jn(e){return new fa({type:"function",input:Array.isArray(e==null?void 0:e.input)?Ro(e==null?void 0:e.input):(e==null?void 0:e.input)??en(tt()),output:(e==null?void 0:e.output)??tt()})}const on=g("ZodCustom",(e,t)=>{Dl.init(e,t),C.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Kd(e,r)});function Pm(e){const t=new X({check:"custom"});return t._zod.check=e,t}function Am(e,t){return _d(on,e??(()=>!0),t)}function ma(e,t={}){return yd(on,e,t)}function pa(e){return $d(e)}const Lm=Sd,Cm=kd;function Zm(e,t={}){const r=new on({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...b(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}const Mm=(...e)=>Id({Codec:Nr,Boolean:Yt,String:Wt},...e);function Rm(e){const t=la(()=>Tr([Dn(e),Io(),xo(),Oo(),en(t),Fo(Dn(),t)]));return t}function Fm(e,t){return jt(Er(e),t)}const f1=Object.freeze(Object.defineProperty({__proto__:null,ZodAny:Uo,ZodArray:Po,ZodBase64:yr,ZodBase64URL:$r,ZodBigInt:Qt,ZodBigIntFormat:kr,ZodBoolean:Yt,ZodCIDRv4:br,ZodCIDRv6:_r,ZodCUID:dr,ZodCUID2:fr,ZodCatch:ra,ZodCodec:Nr,ZodCustom:on,ZodCustomStringFormat:St,ZodDate:xr,ZodDefault:Xo,ZodDiscriminatedUnion:Lo,ZodE164:wr,ZodEmail:cr,ZodEmoji:sr,ZodEnum:_t,ZodExactOptional:qo,ZodFile:Jo,ZodFunction:fa,ZodGUID:Ut,ZodIPv4:gr,ZodIPv6:vr,ZodIntersection:Co,ZodJWT:Sr,ZodKSUID:hr,ZodLazy:sa,ZodLiteral:Ko,ZodMAC:ko,ZodMap:Vo,ZodNaN:oa,ZodNanoID:lr,ZodNever:No,ZodNonOptional:Ur,ZodNull:Eo,ZodNullable:Ho,ZodNumber:Xt,ZodNumberFormat:rt,ZodObject:tn,ZodOptional:Or,ZodPipe:Dr,ZodPrefault:Qo,ZodPromise:da,ZodReadonly:aa,ZodRecord:rn,ZodSet:Bo,ZodString:Wt,ZodStringFormat:q,ZodSuccess:na,ZodSymbol:To,ZodTemplateLiteral:ca,ZodTransform:Go,ZodTuple:Mo,ZodType:C,ZodULID:mr,ZodURL:Ht,ZodUUID:Oe,ZodUndefined:zo,ZodUnion:nn,ZodUnknown:Do,ZodVoid:jo,ZodXID:pr,ZodXor:Ao,_ZodString:ur,_default:Yo,_function:jn,any:mm,array:en,base64:Hf,base64url:Xf,bigint:cm,boolean:xo,catch:ia,check:Pm,cidrv4:qf,cidrv6:Wf,codec:Dm,cuid:Mf,cuid2:Rf,custom:Am,date:hm,describe:Lm,discriminatedUnion:$m,e164:Yf,email:Of,emoji:Cf,enum:zr,exactOptional:Wo,file:zm,float32:im,float64:om,function:jn,guid:Uf,hash:rm,hex:nm,hostname:tm,httpUrl:Lf,instanceof:Zm,int:Nn,int32:am,int64:sm,intersection:Zo,ipv4:Kf,ipv6:Gf,json:Rm,jwt:Qf,keyof:gm,ksuid:Bf,lazy:la,literal:Tm,looseObject:_m,looseRecord:Sm,mac:Jf,map:km,meta:Cm,nan:Um,nanoid:Zf,nativeEnum:xm,never:Ir,nonoptional:ta,null:Oo,nullable:Nt,nullish:Em,number:Io,object:vm,optional:Dt,partialRecord:wm,pipe:jt,prefault:ea,preprocess:Fm,promise:jm,readonly:ua,record:Fo,refine:ma,set:Im,strictObject:bm,string:Dn,stringFormat:em,stringbool:Mm,success:Om,superRefine:pa,symbol:dm,templateLiteral:Nm,transform:Er,tuple:Ro,uint32:um,uint64:lm,ulid:Ff,undefined:fm,union:Tr,unknown:tt,url:Af,uuid:Df,uuidv4:Nf,uuidv6:jf,uuidv7:Pf,void:pm,xid:Vf,xor:ym},Symbol.toStringTag,{value:"Module"})),m1={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function p1(e){le({customError:e})}function h1(){return le().customError}var ci;ci||(ci={});const I={...f1,...l1,iso:gf},g1=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function v1(e,t){const r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function b1(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;const i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){const n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function Vm(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return I.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return I.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const o=b1(n,t),a=ce(o,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){const n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return I.null();if(n.length===0)return I.never();if(n.length===1)return I.literal(n[0]);if(n.every(a=>typeof a=="string"))return I.enum(n);const o=n.map(a=>I.literal(a));return o.length<2?o[0]:I.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return I.literal(e.const);const r=e.type;if(Array.isArray(r)){const n=r.map(o=>{const a={...e,type:o};return Vm(a,t)});return n.length===0?I.never():n.length===1?n[0]:I.union(n)}if(!r)return I.any();let i;switch(r){case"string":{let n=I.string();if(e.format){const o=e.format;o==="email"?n=n.check(I.email()):o==="uri"||o==="uri-reference"?n=n.check(I.url()):o==="uuid"||o==="guid"?n=n.check(I.uuid()):o==="date-time"?n=n.check(I.iso.datetime()):o==="date"?n=n.check(I.iso.date()):o==="time"?n=n.check(I.iso.time()):o==="duration"?n=n.check(I.iso.duration()):o==="ipv4"?n=n.check(I.ipv4()):o==="ipv6"?n=n.check(I.ipv6()):o==="mac"?n=n.check(I.mac()):o==="cidr"?n=n.check(I.cidrv4()):o==="cidr-v6"?n=n.check(I.cidrv6()):o==="base64"?n=n.check(I.base64()):o==="base64url"?n=n.check(I.base64url()):o==="e164"?n=n.check(I.e164()):o==="jwt"?n=n.check(I.jwt()):o==="emoji"?n=n.check(I.emoji()):o==="nanoid"?n=n.check(I.nanoid()):o==="cuid"?n=n.check(I.cuid()):o==="cuid2"?n=n.check(I.cuid2()):o==="ulid"?n=n.check(I.ulid()):o==="xid"?n=n.check(I.xid()):o==="ksuid"&&(n=n.check(I.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?I.number().int():I.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case"boolean":{i=I.boolean();break}case"null":{i=I.null();break}case"object":{const n={},o=e.properties||{},a=new Set(e.required||[]);for(const[s,c]of Object.entries(o)){const l=ce(c,t);n[s]=a.has(s)?l:l.optional()}if(e.propertyNames){const s=ce(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?ce(e.additionalProperties,t):I.any();if(Object.keys(n).length===0){i=I.record(s,c);break}const l=I.object(n).passthrough(),d=I.looseRecord(s,c);i=I.intersection(l,d);break}if(e.patternProperties){const s=e.patternProperties,c=Object.keys(s),l=[];for(const f of c){const m=ce(s[f],t),h=I.string().regex(new RegExp(f));l.push(I.looseRecord(h,m))}const d=[];if(Object.keys(n).length>0&&d.push(I.object(n).passthrough()),d.push(...l),d.length===0)i=I.object({}).passthrough();else if(d.length===1)i=d[0];else{let f=I.intersection(d[0],d[1]);for(let m=2;m<d.length;m++)f=I.intersection(f,d[m]);i=f}break}const u=I.object(n);e.additionalProperties===!1?i=u.strict():typeof e.additionalProperties=="object"?i=u.catchall(ce(e.additionalProperties,t)):i=u.passthrough();break}case"array":{const n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){const a=n.map(s=>ce(s,t)),u=o&&typeof o=="object"&&!Array.isArray(o)?ce(o,t):void 0;u?i=I.tuple(a).rest(u):i=I.tuple(a),typeof e.minItems=="number"&&(i=i.check(I.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(I.maxLength(e.maxItems)))}else if(Array.isArray(o)){const a=o.map(s=>ce(s,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?ce(e.additionalItems,t):void 0;u?i=I.tuple(a).rest(u):i=I.tuple(a),typeof e.minItems=="number"&&(i=i.check(I.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(I.maxLength(e.maxItems)))}else if(o!==void 0){const a=ce(o,t);let u=I.array(a);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),i=u}else i=I.array(I.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function ce(e,t){if(typeof e=="boolean")return e?I.any():I.never();let r=Vm(e,t);const i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){const u=e.anyOf.map(c=>ce(c,t)),s=I.union(u);r=i?I.intersection(r,s):s}if(e.oneOf&&Array.isArray(e.oneOf)){const u=e.oneOf.map(c=>ce(c,t)),s=I.xor(u);r=i?I.intersection(r,s):s}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:I.any();else{let u=i?r:ce(e.allOf[0],t);const s=i?0:1;for(let c=s;c<e.allOf.length;c++)u=I.intersection(u,ce(e.allOf[c],t));r=u}e.nullable===!0&&t.version==="openapi-3.0"&&(r=I.nullable(r)),e.readOnly===!0&&(r=I.readonly(r));const n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const u of o)u in e&&(n[u]=e[u]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const u of a)u in e&&(n[u]=e[u]);for(const u of Object.keys(e))g1.has(u)||(n[u]=e[u]);return Object.keys(n).length>0&&t.registry.add(r,n),r}function _1(e,t){if(typeof e=="boolean")return e?I.any():I.never();const r=v1(e,t==null?void 0:t.defaultTarget),i=e.$defs||e.definitions||{},n={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:(t==null?void 0:t.registry)??be};return ce(e,n)}function y1(e){return Rl(Wt,e)}function $1(e){return Wl(Xt,e)}function w1(e){return nd(Yt,e)}function S1(e){return id(Qt,e)}function k1(e){return hd(xr,e)}const I1=Object.freeze(Object.defineProperty({__proto__:null,bigint:S1,boolean:w1,date:k1,number:$1,string:y1},Symbol.toStringTag,{value:"Module"}));le(Nl());const au=Object.freeze(Object.defineProperty({__proto__:null,$brand:Wu,$input:Cl,$output:Ll,NEVER:qu,TimePrecision:Vl,ZodAny:Uo,ZodArray:Po,ZodBase64:yr,ZodBase64URL:$r,ZodBigInt:Qt,ZodBigIntFormat:kr,ZodBoolean:Yt,ZodCIDRv4:br,ZodCIDRv6:_r,ZodCUID:dr,ZodCUID2:fr,ZodCatch:ra,ZodCodec:Nr,ZodCustom:on,ZodCustomStringFormat:St,ZodDate:xr,ZodDefault:Xo,ZodDiscriminatedUnion:Lo,ZodE164:wr,ZodEmail:cr,ZodEmoji:sr,ZodEnum:_t,ZodError:d1,ZodExactOptional:qo,ZodFile:Jo,get ZodFirstPartyTypeKind(){return ci},ZodFunction:fa,ZodGUID:Ut,ZodIPv4:gr,ZodIPv6:vr,ZodISODate:$o,ZodISODateTime:yo,ZodISODuration:So,ZodISOTime:wo,ZodIntersection:Co,ZodIssueCode:m1,ZodJWT:Sr,ZodKSUID:hr,ZodLazy:sa,ZodLiteral:Ko,ZodMAC:ko,ZodMap:Vo,ZodNaN:oa,ZodNanoID:lr,ZodNever:No,ZodNonOptional:Ur,ZodNull:Eo,ZodNullable:Ho,ZodNumber:Xt,ZodNumberFormat:rt,ZodObject:tn,ZodOptional:Or,ZodPipe:Dr,ZodPrefault:Qo,ZodPromise:da,ZodReadonly:aa,ZodRealError:ge,ZodRecord:rn,ZodSet:Bo,ZodString:Wt,ZodStringFormat:q,ZodSuccess:na,ZodSymbol:To,ZodTemplateLiteral:ca,ZodTransform:Go,ZodTuple:Mo,ZodType:C,ZodULID:mr,ZodURL:Ht,ZodUUID:Oe,ZodUndefined:zo,ZodUnion:nn,ZodUnknown:Do,ZodVoid:jo,ZodXID:pr,ZodXor:Ao,_ZodString:ur,_default:Yo,_function:jn,any:mm,array:en,base64:Hf,base64url:Xf,bigint:cm,boolean:xo,catch:ia,check:Pm,cidrv4:qf,cidrv6:Wf,clone:we,codec:Dm,coerce:I1,config:le,core:s1,cuid:Mf,cuid2:Rf,custom:Am,date:hm,decode:Sf,decodeAsync:If,describe:Lm,discriminatedUnion:$m,e164:Yf,email:Of,emoji:Cf,encode:wf,encodeAsync:kf,endsWith:er,enum:zr,exactOptional:Wo,file:zm,flattenError:Si,float32:im,float64:om,formatError:ki,fromJSONSchema:_1,function:jn,getErrorMap:h1,globalRegistry:be,gt:Ve,gte:fe,guid:Uf,hash:rm,hex:nm,hostname:tm,httpUrl:Lf,includes:Yn,instanceof:Zm,int:Nn,int32:am,int64:sm,intersection:Zo,ipv4:Kf,ipv6:Gf,iso:gf,json:Rm,jwt:Qf,keyof:gm,ksuid:Bf,lazy:la,length:Gt,literal:Tm,locales:Al,looseObject:_m,looseRecord:Sm,lowercase:Hn,lt:Fe,lte:_e,mac:Jf,map:km,maxLength:Jt,maxSize:wt,meta:Cm,mime:tr,minLength:et,minSize:Be,multipleOf:ht,nan:Um,nanoid:Zf,nativeEnum:xm,negative:po,never:Ir,nonnegative:go,nonoptional:ta,nonpositive:ho,normalize:nr,null:Oo,nullable:Nt,nullish:Em,number:Io,object:vm,optional:Dt,overwrite:Pe,parse:bf,parseAsync:_f,partialRecord:wm,pipe:jt,positive:mo,prefault:ea,preprocess:Fm,prettifyError:gc,promise:jm,property:vo,readonly:ua,record:Fo,refine:ma,regex:Wn,regexes:Pi,registry:Ki,safeDecode:Tf,safeDecodeAsync:Ef,safeEncode:xf,safeEncodeAsync:zf,safeParse:yf,safeParseAsync:$f,set:Im,setErrorMap:p1,size:Kt,slugify:ar,startsWith:Qn,strictObject:bm,string:Dn,stringFormat:em,stringbool:Mm,success:Om,superRefine:pa,symbol:dm,templateLiteral:Nm,toJSONSchema:df,toLowerCase:ir,toUpperCase:or,transform:Er,treeifyError:pc,trim:rr,tuple:Ro,uint32:um,uint64:lm,ulid:Ff,undefined:fm,union:Tr,unknown:tt,uppercase:Xn,url:Af,util:fc,uuid:Df,uuidv4:Nf,uuidv6:jf,uuidv7:Pf,void:pm,xid:Vf,xor:ym},Symbol.toStringTag,{value:"Module"}));function uu(e){const t=e.match(/^(.+)\/(flows|sources)\/([^/]+)$/);return t?[t[1],t[3]]:null}function x1(e){const t=e.filter(a=>a.timerange),r=t.filter(a=>a.format==="urn:x-nmos:format:video"||a.format==="urn:x-nmos:format:multi"),i=r.length?r:t;if(!i.length)return"()";const[n,o]=i.reduce(([a,u],s)=>{const c=P.parseTimeRange(s.timerange);let l=c.start?P.timeMomentToSeconds(c.start):null,d=c.end?P.timeMomentToSeconds(c.end):null;return(a===null||l!==null&&l<a)&&(a=l),(u===null||d!==null&&d>u)&&(u=d),[a,u]},[null,null]);return n===null||o===null?"()":P.formatTimeRangeExpr({start:P.secondsToTimeMoment(n),end:P.secondsToTimeMoment(o),isStartInclusive:!0,isEndInclusive:!1})}function cu(e,t){const r=P.parseTimeRange(t);if(r.start===void 0||r.end===void 0)throw new V.OmpError("Can't convert duration to timerange. Timerange is missing start and/or end.");const i=P.timeMomentToSeconds(r.start),n=P.timeMomentToSeconds(r.end);if(n-i<e)return console.warn("Provided duration is longer than timerange, using total timerange",t),t;const o=n-e;return P.formatTimeRangeExpr({start:P.secondsToTimeMoment(o),end:r.end,isEndInclusive:r.isEndInclusive,isStartInclusive:r.isStartInclusive})}function T1(e){const t=e.endsWith("/")?e.slice(0,-1):e;return t.substring(t.lastIndexOf("/")+1)}function su(e){switch(e.type){case"basic":{const t=btoa(`${e.username}:${e.password}`);return()=>({headers:{Authorization:`Basic ${t}`}})}case"bearer":return()=>({headers:{Authorization:`Bearer ${e.token}`}});case"custom":return e.headers}}function z1(e){return au.object({ffomTimeZoneOffset:au.number().int().min(-23).max(23).optional()}).safeParse(e).success}function Rr(e){return Ku(Xh(new ye(e)))}const yn="omakase-virtual-flow";class lu{constructor(t,r){k(this,"_tamsApi");this._tamsApi=eg(t,r)}async fetchTamsResource(t){const i=(await this._tamsApi.getUrl(t)).data;return i.source_id?{flow:i}:{source:i}}fetchManifestResources(t,r){return new ye(i=>{(async()=>{try{const n=await this.fetchTamsResource(t);let o;if(n.flow?o=await this._fetchFlow(n.flow.id):o=await this._fetchFirstFlowBySourceId(n.source.id),!o)throw new V.OmpError("Source has no flow representations");const a=await this.fetchFlowResources(o,r);i.next(a),i.complete()}catch(n){i.error(n)}})()})}async fetchFlowResources(t,r){var s;const i=t.id===yn,n=await this._fetchSubflows(((s=t.flow_collection)==null?void 0:s.map(c=>c.id))??[]),o=x1(i?n:[t,...n]);if(o==="()")throw new V.OmpError("Provided TAMS media has no timerange");let a;r?typeof r=="number"?a=cu(r,o):a=P.timerangeDuration(r)>P.timerangeDuration(o)?o:r:a=cu(600,o);const u=await Promise.all([t,...n].map(async c=>[c.id,await this._fetchFlowSegments(c.id,a)]));return{flow:t,subflows:n,flowsSegments:new Map(u??[]),timerange:a}}async _fetchSubflows(t){let r=await Promise.all(t.map(async i=>await this._fetchFlow(i)));return r=r.filter(i=>!this._isFlowHlsIncompatible(i)),r}async _fetchFlow(t){return(await this._tamsApi.get(`/flows/${t}?include_timerange=true`)).data}async _fetchFirstFlowBySourceId(t){const i=(await this._tamsApi.get(`/flows?source_id=${t}`)).data.at(0);return i?await this._fetchFlow(i.id):void 0}async _fetchFlowSegments(t,r,i){if(t===yn)return[];const n=`/flows/${t}/segments${r?`?timerange=${r}`:""}${r?"&":"?"}limit=300`;let o=await this._tamsApi.get(n),a=o.data;for(;o.nextLink&&(!i||a.length<i);)o=await this._tamsApi.getUrl(o.nextLink),a=a.concat(o.data);return i&&(a=a.slice(0,i)),a}_isFlowHlsIncompatible(t){return!1}fetchManifestResourcesForMultipleFlows(t,r){return new ye(i=>{(async()=>{try{const n=await Promise.all(t.map(l=>this.fetchTamsResource(l)));if(n.some(l=>l.source))throw new Error("Source found in array of flows");const a=n.map(l=>l.flow);if(a.some(l=>l.format==="urn:x-nmos:format:multi"))throw new Error("Multiflow found in array of flows");if(a.filter(l=>l.format==="urn:x-nmos:format:video").length>1)throw new Error("Multiple video flows found in array of flows");const c=await this.fetchFlowResources({id:yn,source_id:"",format:"urn:x-nmos:format:multi",flow_collection:a.map(l=>({id:l.id,role:""}))},r);i.next(c),i.complete()}catch(n){i.error(n)}})()})}}var Fr,du;function Bm(){if(du)return Fr;du=1;function e(s,c){this.message=s,this.error=c}e.prototype=Object.create(Error.prototype);const t=/([0-9]+)?:?([0-9]{2}):([0-9]{2}\.[0-9]{2,3})/;function r(s,c){c||(c={});const{meta:l=!1,strict:d=!0}=c;if(typeof s!="string")throw new e("Input must be a string");s=s.trim(),s=s.replace(/\r\n/g,`
|
|
64
64
|
`),s=s.replace(/\r/g,`
|
|
65
65
|
`);const f=s.split(`
|
|
66
66
|
|
|
67
|
-
`),m=f.shift();if(!m.startsWith("WEBVTT"))throw new e('Must start with "WEBVTT"');const
|
|
68
|
-
`),p=
|
|
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 #${
|
|
70
|
-
`),
|
|
71
|
-
`;if(
|
|
72
|
-
`})}let d=null;return
|
|
67
|
+
`),m=f.shift();if(!m.startsWith("WEBVTT"))throw new e('Must start with "WEBVTT"');const h=m.split(`
|
|
68
|
+
`),p=h[0].replace("WEBVTT","");if(p.length>0&&p[0]!==" "&&p[0]!==" ")throw new e("Header comment must start with space or tab");if(f.length===0&&h.length===1)return{valid:!0,strict:d,cues:[],errors:[]};if(!l&&h.length>1&&h[1]!=="")throw new e("Missing blank line after signature");const{cues:v,errors:w}=n(f,d);if(d&&w.length>0)throw w[0];const E=l?i(h):null,T={valid:w.length===0,strict:d,cues:v,errors:w};return l&&(T.meta=E),T}function i(s){const c={};return s.slice(1).forEach(l=>{const d=l.indexOf(":"),f=l.slice(0,d).trim(),m=l.slice(d+1).trim();c[f]=m}),Object.keys(c).length>0?c:null}function n(s,c){const l=[];return{cues:s.map((f,m)=>{try{return o(f,m,c)}catch(h){return l.push(h),null}}).filter(Boolean),errors:l}}function o(s,c,l){let d="",f=0,m=.01,h="",p="";const v=s.split(`
|
|
69
|
+
`).filter(Boolean);if(v.length>0&&v[0].trim().startsWith("NOTE"))return null;if(v.length===1&&!v[0].includes("-->"))throw new e(`Cue identifier cannot be standalone (cue #${c})`);if(v.length>1&&!(v[0].includes("-->")||v[1].includes("-->"))){const E=`Cue identifier needs to be followed by timestamp (cue #${c})`;throw new e(E)}v.length>1&&v[1].includes("-->")&&(d=v.shift());const w=typeof v[0]=="string"&&v[0].split(" --> ");if(w.length!==2||!a(w[0])||!a(w[1]))throw new e(`Invalid cue timestamp (cue #${c})`);if(f=u(w[0]),m=u(w[1]),l){if(f>m)throw new e(`Start timestamp greater than end (cue #${c})`);if(m<=f)throw new e(`End must be greater than start (cue #${c})`)}if(!l&&m<f)throw new e(`End must be greater or equal to start when not strict (cue #${c})`);return p=w[1].replace(t,"").trim(),v.shift(),h=v.join(`
|
|
70
|
+
`),h?{identifier:d,start:f,end:m,text:h,styles:p}:!1}function a(s){return t.test(s)}function u(s){const c=s.match(t);let l=parseFloat(c[1]||0)*60*60;return l+=parseFloat(c[2])*60,l+=parseFloat(c[3]),l}return Fr={ParserError:e,parse:r},Fr}var Vr,fu;function E1(){if(fu)return Vr;fu=1;function e(c,l){this.message=c,this.error=l}e.prototype=Object.create(Error.prototype);function t(c){if(!c)throw new e("Input must be non-null");if(typeof c!="object")throw new e("Input must be an object");if(Array.isArray(c))throw new e("Input cannot be array");if(!c.valid)throw new e("Input must be valid");let l=`WEBVTT
|
|
71
|
+
`;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
|
+
`})}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+=`
|
|
74
|
-
`}),l}function r(
|
|
75
|
-
${JSON.stringify(
|
|
76
|
-
${JSON.stringify(
|
|
77
|
-
${JSON.stringify(
|
|
78
|
-
${JSON.stringify(
|
|
79
|
-
${JSON.stringify(
|
|
80
|
-
${JSON.stringify(
|
|
81
|
-
`);const d=i(
|
|
82
|
-
${
|
|
74
|
+
`}),l}function r(c){if(typeof c!="object")throw new e("Cue malformed: not of type object");if(typeof c.identifier!="string"&&typeof c.identifier!="number"&&c.identifier!==null)throw new e(`Cue malformed: identifier value is not a string.
|
|
75
|
+
${JSON.stringify(c)}`);if(isNaN(c.start))throw new e(`Cue malformed: null start value.
|
|
76
|
+
${JSON.stringify(c)}`);if(isNaN(c.end))throw new e(`Cue malformed: null end value.
|
|
77
|
+
${JSON.stringify(c)}`);if(c.start>=c.end)throw new e(`Cue malformed: start timestamp greater than end
|
|
78
|
+
${JSON.stringify(c)}`);if(typeof c.text!="string")throw new e(`Cue malformed: null text value.
|
|
79
|
+
${JSON.stringify(c)}`);if(typeof c.styles!="string")throw new e(`Cue malformed: null styles value.
|
|
80
|
+
${JSON.stringify(c)}`);let l="";c.identifier.length>0&&(l+=`${c.identifier}
|
|
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 Vr={CompilerError:e,compile:t},Vr}var Br,mu;function Km(){if(mu)return Br;mu=1;const e=Bm().parse;function t(a,u){u=u||10;const s=e(a),c=[];let l=[],d=null,f=0,m=0;return s.cues.forEach((h,p)=>{const v=p===0,w=p===s.cues.length-1,E=h.start,T=h.end,z=w?1/0:s.cues[p+1].start,M=v?T:T-E,R=v?0:E-s.cues[p-1].end;f=f+M+R,`${p}`,c.length+1,d&&(l.push(d),f+=d.end-m,d=null),l.push(h);let Q=z-T<u&&R<u&&f>u;if(r(m,u,z,R)){const te=i(w,T,u,f,m);c.push({duration:te,cues:l}),m+=te,f=0,l=[]}else Q=!1;Q&&(d=h)}),c}function r(a,u,s,c){const l=n(c,u);return(c<=u||l+a<s)&&s-a>=u}function i(a,u,s,c,l){let d=s;return c>s&&(d=n(c-s,s)),a?d=parseFloat((u-l).toFixed(2)):d=Math.round(d),d}function n(a,u){return a+=u-a%u,a}function o(a){}return Br={segment:t},Br}var Kr,pu;function O1(){if(pu)return Kr;pu=1;const e=Km().segment;function t(l,d,f){typeof f>"u"&&(f="900000");const m=e(l,d),h=[];return m.forEach((p,v)=>{const w=`WEBVTT
|
|
83
83
|
X-TIMESTAMP-MAP=MPEGTS:${f},LOCAL:00:00:00.000
|
|
84
84
|
|
|
85
|
-
${
|
|
86
|
-
`,
|
|
85
|
+
${u(p.cues)}
|
|
86
|
+
`,E=n(v);h.push({filename:E,content:w})}),h}function r(l,d){const f=e(l,d),m=o(f);return`#EXTM3U
|
|
87
87
|
#EXT-X-TARGETDURATION:${Math.round(a(f))}
|
|
88
88
|
#EXT-X-VERSION:3
|
|
89
89
|
#EXT-X-MEDIA-SEQUENCE:0
|
|
@@ -92,15 +92,15 @@ ${m}
|
|
|
92
92
|
#EXT-X-ENDLIST
|
|
93
93
|
`}function i(l,d){return`${"0".repeat(Math.max(0,d-l.toString().length))}${l}`}function n(l){return`${l}.vtt`}function o(l){const d=[];return l.forEach((f,m)=>{d.push(`#EXTINF:${f.duration.toFixed(5)},
|
|
94
94
|
${n(m)}`)}),d.join(`
|
|
95
|
-
`)}function a(l){let d=0;return l.forEach(f=>{f.duration>d&&(d=f.duration)}),d}function
|
|
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=
|
|
98
|
-
`)}function
|
|
97
|
+
`)}function s(l){const d=[];l.identifier&&d.push(l.identifier);const f=c(l.start),m=c(l.end),h=l.styles?`${l.styles}`:"";return d.push(`${f} --> ${m} ${h}`),d.push(l.text),d.join(`
|
|
98
|
+
`)}function c(l){const d=(l%1).toFixed(3);l=Math.round(l-d);const f=Math.floor(l/3600),m=Math.floor((l-f*3600)/60),h=l-f*3600-m*60;return`${`${i(f,2)}:`}${i(m,2)}:${i(h,2)}.${i(d*1e3,3)}`}return Kr={hlsSegment:t,hlsSegmentPlaylist:r},Kr}var Jr,hu;function U1(){if(hu)return Jr;hu=1;const e=Bm().parse,t=E1().compile,r=Km().segment,i=O1();return Jr={parse:e,compile:t,segment:r,hls:i},Jr}var D1=U1();async function N1(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch: ${e}`);const r=await t.arrayBuffer();return new TextDecoder("utf-8").decode(r)}function gu(e){e<0&&(e=0);const t=Math.floor(e/3600).toString().padStart(2,"0"),r=Math.floor(e%3600/60).toString().padStart(2,"0"),i=(e%60).toFixed(3).padStart(6,"0");return`${t}:${r}:${i}`}async function j1(e,t){return e.length?await Promise.all(e.map(async i=>{const n=await N1(i),o=D1.parse(n,{strict:!1,meta:!0});let a=o.cues;t!==void 0&&(a=a.map(l=>({...l,start:l.start-t,end:l.end-t})).filter(l=>l.end>0).map(l=>({...l,start:Math.max(0,l.start),end:Math.max(0,l.end)})));const u=[];u.push("WEBVTT"),o.meta&&o.meta["X-TIMESTAMP-MAP=LOCAL"]&&u.push(`X-TIMESTAMP-MAP=LOCAL${o.meta["X-TIMESTAMP-MAP=LOCAL"]}`),u.push("");for(const l of a)u.push(`${gu(l.start)} --> ${gu(l.end)}`),u.push(l.text),u.push("");const s=u.join(`
|
|
99
99
|
`).trim()+`
|
|
100
|
-
`,
|
|
101
|
-
`)}static generateThumbnailVttBlob(t,r,i){const n=this.generateThumbnailVtt(t,r,i),o=new Blob([n],{type:"text/vtt"});return URL.createObjectURL(o)}static toTimestamp(t){const r=Math.floor(t/3600),i=Math.floor(t%3600/60),n=Math.floor(t%60),o=Math.round(t%1*1e3);return`${String(r).padStart(2,"0")}:${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}.${String(o).padStart(3,"0")}`}static generateThumbnailTrackUrl(t,r,i,n){const o=this.resolveLowestQualityImageFlow(t);return o?this.generateThumbnailVttBlob(r.get(o.id),i,n):void 0}}class
|
|
100
|
+
`,c=new Blob([s],{type:"text/vtt"});return URL.createObjectURL(c)})):[]}class P1{static slewSubtitlesFlows(t,r){return new ye(i=>{(async()=>{var n;try{const o=(n=t.subflows)==null?void 0:n.filter(a=>a.format==="urn:x-nmos:format:data"&&a.container==="text/vtt");o!=null&&o.length&&await Promise.all(o.map(async a=>{const u=t.flowsSegments.get(a.id),s=u.map(l=>{var d;return(d=l.get_urls)==null?void 0:d.at(-1).url});let c=await j1(s,r.mediaStartTime);c=c.map(l=>T1(l)),u.forEach((l,d)=>{l.get_urls=[{url:c.at(d)}]})})),i.next(),i.complete()}catch(o){i.error(o)}})()})}}class A1{static resolveLowestQualityImageFlow(t){const r=t.filter(n=>n.format==="urn:x-tam:format:image");return r.length===0?void 0:r.reduce((n,o)=>{if(n===void 0)return o;const a=n.essence_parameters.frame_width*n.essence_parameters.frame_height;return o.essence_parameters.frame_height*o.essence_parameters.frame_width<a?o:n},void 0)}static generateThumbnailVtt(t,r,i){let n=["WEBVTT",""];return t.forEach((o,a)=>{if((o.get_urls||[]).length===0)return;const s=P.timeMomentToSeconds(P.parseTimeRange(o.timerange).start);let c;if(a===t.length-1?c=r-.001:c=P.timeMomentToSeconds(P.parseTimeRange(t.at(a+1).timerange).start)-.001,c<=s){console.debug(`Malformed thumbnail vtt cue, skipped ${s} --> ${c}`);return}const l=this.toTimestamp(s-i),d=this.toTimestamp(c-i);n.push(`${l} --> ${d}`),n.push(o.get_urls.at(-1).url),n.push("")}),n.join(`
|
|
101
|
+
`)}static generateThumbnailVttBlob(t,r,i){const n=this.generateThumbnailVtt(t,r,i),o=new Blob([n],{type:"text/vtt"});return URL.createObjectURL(o)}static toTimestamp(t){const r=Math.floor(t/3600),i=Math.floor(t%3600/60),n=Math.floor(t%60),o=Math.round(t%1*1e3);return`${String(r).padStart(2,"0")}:${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}.${String(o).padStart(3,"0")}`}static generateThumbnailTrackUrl(t,r,i,n){const o=this.resolveLowestQualityImageFlow(t);return o?this.generateThumbnailVttBlob(r.get(o.id),i,n):void 0}}class Jm{constructor(t){k(this,"_player");k(this,"_videoApiProxy");k(this,"_authenticationData");k(this,"_tamsEndpoint");this._player=new V.OmakasePlayer(t),this._videoApiProxy=new Gu(this._player),this._authenticationData=t==null?void 0:t.authentication}loadVideo(t,r){if(r!=null&&r.duration&&(r!=null&&r.timerange)&&console.warn("Duration and timerange are both set. Using timerange."),this._videoApiProxy.loadOptions=structuredClone(r),this._videoApiProxy.requestedDuration=r==null?void 0:r.duration,typeof t=="string")if((r==null?void 0:r.protocol)===void 0){const i=this._tamsEndpoint??uu(t).at(0);if(i===null)throw Error("Provided URL is not pointing to TAMS");const n=new lu(i,this._authenticationData?su(this._authenticationData):void 0),o=(r==null?void 0:r.timerange)??(r==null?void 0:r.duration);return Rr(a=>{n.fetchManifestResources(t,o).pipe(Mr(u=>this._loadTamsMedia(u,r))).subscribe(a)})}else return this._player.loadVideo(t,r);else if(Array.isArray(t)){if(r!=null&&r.protocol)throw new Error(`Protocol ${r.protocol} can't be used with TAMS media`);const i=this._tamsEndpoint??uu(t.at(0)).at(0);if(i===null)throw Error("Provided URL is not pointing to TAMS");const n=new lu(i,this._authenticationData?su(this._authenticationData):void 0),o=(r==null?void 0:r.timerange)??(r==null?void 0:r.duration);return Rr(a=>{n.fetchManifestResourcesForMultipleFlows(t,o).pipe(Mr(u=>this._loadTamsMedia(u,r).pipe(Ma(s=>{var c;return s.tamsMediaData&&(s.tamsMediaData.flow=void 0,(c=s.tamsMediaData.flowsSegments)==null||c.delete(yn)),s})))).subscribe(a)})}else return this._loadTamsMedia(t,r)}_loadTamsMedia(t,r){return Rr(i=>{const n=ph([t.flow,...t.subflows??[]],t.flowsSegments,r==null?void 0:r.ffomTimeZoneOffset),o={protocol:"hls",ffom:n.ffom,frameRate:n.frameRate,dropFrame:n.dropFrame};let a;r?(r.protocol="hls",a={...o,...r,ffom:o.ffom}):a=o,delete a.duration,this._videoApiProxy.requestedDuration=r==null?void 0:r.duration;const u=Cu(t.flow,t.subflows,t.flowsSegments);if(!u.valid){i.error(u.message);return}if(r&&!z1(r)){i.error("Invalid ffomTimeZoneOffset");return}P1.slewSubtitlesFlows(t,n).pipe(Mr(()=>{const s=Zu(t.flow,t.subflows,t.flowsSegments);return this._player.loadVideo(s.url,a).pipe(Ma(c=>{this._videoApiProxy.mediaStartTime=n.mediaStartTime;const l=A1.generateThumbnailTrackUrl(t.subflows??[],t.flowsSegments,this._player.video.getDuration()+n.mediaStartTime,n.mediaStartTime);return l&&this._player.chroming.setThumbnailVttUrl(l),{...c,mediaStartTime:n.mediaStartTime,tamsMediaData:r!=null&&r.returnTamsMediaData?t:void 0,thumbnailVttTrackUrl:l,videoUrls:s.video,audioUrls:s.audio,textUrls:s.text}}),Yh(c=>{this._videoApiProxy.setTamsVideo(c),this._videoApiProxy.emitVideoLoadedEvent()}))})).subscribe(i)})}createTimeline(t){return this._player.createTimeline(t)}createMarkerList(t){return this._player.createMarkerList(t)}initializeRouterVisualization(t){return this._player.initializeRouterVisualization(t)}setAuthentication(t){return this._authenticationData=t,this._player.setAuthentication(t)}get timeline(){return this._player.timeline}get audio(){return this._player.audio}get subtitles(){return this._player.subtitles}get config(){return this._player.config}set config(t){this._player.config=t}get chroming(){return this._player.chroming}destroy(){return this._player.destroy()}get video(){return this._videoApiProxy.proxy}setTamsEndpoint(t){this._tamsEndpoint=t}}class L1{constructor(t){k(this,"_lanes",[]);k(this,"_markersLaneMap",new Map);k(this,"_laneNodenMap",new Map);this.omakasePlayer=t}addMarkerLane(t){const r={config:t,type:"marker"};this._lanes.push(r)}addMarkers(t,r){this._markersLaneMap.get(t)===void 0&&this._markersLaneMap.set(t,[]),this._markersLaneMap.get(t).push(...r)}addTimelineNode(t,r){this._laneNodenMap.get(t)||this._laneNodenMap.set(t,[]),this._laneNodenMap.get(t).push(r)}addThumbnailLane(t){const r={config:t,type:"thumbnail"};this._lanes.push(r)}addLabelLane(t){const r={config:t,type:"label"};this._lanes.push(r)}addSubtitlesLane(t){const r={config:t,type:"subtitles"};this._lanes.push(r)}buildAndAttachTimeline(t){this.omakasePlayer.createTimeline(t).subscribe({next:r=>{this.buildAttachedTimeline(r)}})}buildAttachedTimeline(t){this._lanes.forEach(r=>this._createAndAttachLane(t,r))}_createAndAttachLane(t,r){let i;if(r.type==="marker"){i=new V.MarkerLane(r.config),t.addTimelineLane(i);const o=this._markersLaneMap.get(i.id);o==null||o.forEach(a=>i.addMarker(a))}else r.type==="thumbnail"?(i=new V.ThumbnailLane(r.config),t.addTimelineLane(i)):r.type==="label"?(i=new V.LabelLane(r.config),t.addTimelineLane(i)):r.type==="subtitles"&&(i=new V.SubtitlesLane(r.config),t.addTimelineLane(i));const n=this._laneNodenMap.get(i.id);n==null||n.forEach(o=>{i.addTimelineNode(o.config)})}}var si=function(e,t){return si=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])},si(e,t)};function an(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");si(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function C1(e,t,r,i){function n(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(l){try{c(i.next(l))}catch(d){a(d)}}function s(l){try{c(i.throw(l))}catch(d){a(d)}}function c(l){l.done?o(l.value):n(l.value).then(u,s)}c((i=i.apply(e,t||[])).next())})}function Gm(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(l){return s([c,l])}}function s(c){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(r=0)),r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function yt(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Pn(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),n,o=[],a;try{for(;(t===void 0||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(u){a={error:u}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}function An(e,t,r){if(r||arguments.length===2)for(var i=0,n=t.length,o;i<n;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}function st(e){return this instanceof st?(this.v=e,this):new st(e)}function Z1(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,t||[]),n,o=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",a),n[Symbol.asyncIterator]=function(){return this},n;function a(m){return function(h){return Promise.resolve(h).then(m,d)}}function u(m,h){i[m]&&(n[m]=function(p){return new Promise(function(v,w){o.push([m,p,v,w])>1||s(m,p)})},h&&(n[m]=h(n[m])))}function s(m,h){try{c(i[m](h))}catch(p){f(o[0][3],p)}}function c(m){m.value instanceof st?Promise.resolve(m.value.v).then(l,d):f(o[0][2],m)}function l(m){s("next",m)}function d(m){s("throw",m)}function f(m,h){m(h),o.shift(),o.length&&s(o[0][0],o[0][1])}}function M1(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof yt=="function"?yt(e):e[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(o){r[o]=e[o]&&function(a){return new Promise(function(u,s){a=e[o](a),n(u,s,a.done,a.value)})}}function n(o,a,u,s){Promise.resolve(s).then(function(c){o({value:c,done:u})},a)}}function re(e){return typeof e=="function"}function ha(e){var t=function(i){Error.call(i),i.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Gr=ha(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
102
102
|
`+r.map(function(i,n){return n+1+") "+i.toString()}).join(`
|
|
103
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function li(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var jr=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,i,n,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var c=_t(a),s=c.next();!s.done;s=c.next()){var u=s.value;u.remove(this)}}catch(p){t={error:p}}finally{try{s&&!s.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(te(l))try{l()}catch(p){o=p instanceof Gr?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=_t(d),m=f.next();!m.done;m=f.next()){var g=m.value;try{yc(g)}catch(p){o=o??[],p instanceof Gr?o=An(An([],Pn(o)),Pn(p.errors)):o.push(p)}}}catch(p){i={error:p}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}if(o)throw new Gr(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)yc(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&li(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&li(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),qm=jr.EMPTY;function Xm(e){return e instanceof jr||e&&"closed"in e&&te(e.remove)&&te(e.add)&&te(e.unsubscribe)}function yc(e){te(e)?e():e.unsubscribe()}var F1={Promise:void 0},V1={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,An([e,t],Pn(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Ym(e){V1.setTimeout(function(){throw e})}function di(){}function $n(e){e()}var ga=(function(e){on(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,Xm(r)&&r.add(i)):i.destination=J1,i}return t.create=function(r,i,n){return new fi(r,i,n)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(jr),B1=(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){fn(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){fn(i)}else fn(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){fn(r)}},e})(),fi=(function(e){on(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 B1(a),o}return t})(ga);function fn(e){Ym(e)}function K1(e){throw e}var J1={closed:!0,next:di,error:K1,complete:di},va=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Pr(e){return e}function G1(e){return e.length===0?Pr:e.length===1?e[0]:function(r){return e.reduce(function(i,n){return n(i)},r)}}var he=(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=H1(t)?t:new fi(t,r,i);return $n(function(){var a=n,c=a.operator,s=a.source;o.add(c?c.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=_c(r),new r(function(n,o){var a=new fi({next:function(c){try{t(c)}catch(s){o(s),a.unsubscribe()}},error:o,complete:n});i.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[va]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return G1(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=_c(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 _c(e){var t;return(t=e??F1.Promise)!==null&&t!==void 0?t:Promise}function W1(e){return e&&te(e.next)&&te(e.error)&&te(e.complete)}function H1(e){return e&&e instanceof ga||W1(e)&&Xm(e)}function q1(e){return te(e==null?void 0:e.lift)}function Ge(e){return function(t){if(q1(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 X1(e,t,r,i,n)}var X1=(function(e){on(t,e);function t(r,i,n,o,a,c){var s=e.call(this,r)||this;return s.onFinalize=a,s.shouldUnsubscribe=c,s._next=i?function(u){try{i(u)}catch(l){r.error(l)}}:e.prototype._next,s._error=o?function(u){try{o(u)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=n?function(){try{n()}catch(u){r.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;e.prototype.unsubscribe.call(this),!i&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(ga),Y1=ha(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Xe=(function(e){on(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 $c(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new Y1},t.prototype.next=function(r){var i=this;$n(function(){var n,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=_t(i.currentObservers),c=a.next();!c.done;c=a.next()){var s=c.value;s.next(r)}}catch(u){n={error:u}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}}})},t.prototype.error=function(r){var i=this;$n(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=r;for(var n=i.observers;n.length;)n.shift().error(r)}})},t.prototype.complete=function(){var r=this;$n(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var i=r.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var i=this,n=this,o=n.hasError,a=n.isStopped,c=n.observers;return o||a?qm:(this.currentObservers=null,c.push(r),new jr(function(){i.currentObservers=null,li(c,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 he;return r.source=this,r},t.create=function(r,i){return new $c(r,i)},t})(he),$c=(function(e){on(t,e);function t(r,i){var n=e.call(this)||this;return n.destination=r,n.source=i,n}return t.prototype.next=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.next)===null||n===void 0||n.call(i,r)},t.prototype.error=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.error)===null||n===void 0||n.call(i,r)},t.prototype.complete=function(){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||i===void 0||i.call(r)},t.prototype._subscribe=function(r){var i,n;return(n=(i=this.source)===null||i===void 0?void 0:i.subscribe(r))!==null&&n!==void 0?n:qm},t})(Xe),Q1=new he(function(e){return e.complete()});function e0(e){return e&&te(e.schedule)}function Qm(e){return e[e.length-1]}function t0(e){return te(Qm(e))?e.pop():void 0}function n0(e){return e0(Qm(e))?e.pop():void 0}var ep=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function tp(e){return te(e==null?void 0:e.then)}function np(e){return te(e[va])}function rp(e){return Symbol.asyncIterator&&te(e==null?void 0:e[Symbol.asyncIterator])}function ip(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 r0(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var op=r0();function ap(e){return te(e==null?void 0:e[op])}function cp(e){return M1(this,arguments,function(){var r,i,n,o;return Hm(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 up(e){return te(e==null?void 0:e.getReader)}function Ar(e){if(e instanceof he)return e;if(e!=null){if(np(e))return i0(e);if(ep(e))return o0(e);if(tp(e))return a0(e);if(rp(e))return sp(e);if(ap(e))return c0(e);if(up(e))return u0(e)}throw ip(e)}function i0(e){return new he(function(t){var r=e[va]();if(te(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function o0(e){return new he(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function a0(e){return new he(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Ym)})}function c0(e){return new he(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(c){r={error:c}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}t.complete()})}function sp(e){return new he(function(t){s0(e,t).catch(function(r){return t.error(r)})})}function u0(e){return sp(cp(e))}function s0(e,t){var r,i,n,o;return Z1(this,void 0,void 0,function(){var a,c;return Hm(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),r=R1(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 c=s.sent(),n={error:c},[3,11];case 6:return s.trys.push([6,,9,10]),i&&!i.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Me(e,t,r,i,n){i===void 0&&(i=0),n===void 0&&(n=!1);var o=t.schedule(function(){r(),n?e.add(this.schedule(null,i)):this.unsubscribe()},i);if(e.add(o),!n)return o}function lp(e,t){return t===void 0&&(t=0),Ge(function(r,i){r.subscribe(We(i,function(n){return Me(i,e,function(){return i.next(n)},t)},function(){return Me(i,e,function(){return i.complete()},t)},function(n){return Me(i,e,function(){return i.error(n)},t)}))})}function dp(e,t){return t===void 0&&(t=0),Ge(function(r,i){i.add(e.schedule(function(){return r.subscribe(i)},t))})}function l0(e,t){return Ar(e).pipe(dp(t),lp(t))}function d0(e,t){return Ar(e).pipe(dp(t),lp(t))}function f0(e,t){return new he(function(r){var i=0;return t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||this.schedule())})})}function m0(e,t){return new he(function(r){var i;return Me(r,t,function(){i=e[op](),Me(r,t,function(){var n,o,a;try{n=i.next(),o=n.value,a=n.done}catch(c){r.error(c);return}a?r.complete():r.next(o)},0,!0)}),function(){return te(i==null?void 0:i.return)&&i.return()}})}function fp(e,t){if(!e)throw new Error("Iterable cannot be null");return new he(function(r){Me(r,t,function(){var i=e[Symbol.asyncIterator]();Me(r,t,function(){i.next().then(function(n){n.done?r.complete():r.next(n.value)})},0,!0)})})}function p0(e,t){return fp(cp(e),t)}function h0(e,t){if(e!=null){if(np(e))return l0(e,t);if(ep(e))return f0(e,t);if(tp(e))return d0(e,t);if(rp(e))return fp(e,t);if(ap(e))return m0(e,t);if(up(e))return p0(e,t)}throw ip(e)}function mp(e,t){return t?h0(e,t):Ar(e)}var pp=ha(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function g0(e,t){return Ge(function(r,i){var n=0;r.subscribe(We(i,function(o){i.next(e.call(t,o,n++))}))})}var v0=Array.isArray;function b0(e,t){return v0(t)?e.apply(void 0,An([],Pn(t))):e(t)}function y0(e){return g0(function(t){return b0(e,t)})}var _0=Array.isArray,$0=Object.getPrototypeOf,w0=Object.prototype,S0=Object.keys;function k0(e){if(e.length===1){var t=e[0];if(_0(t))return{args:t,keys:null};if(I0(t)){var r=S0(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"&&$0(e)===w0}function x0(e,t){return e.reduce(function(r,i,n){return r[i]=t[n],r},{})}function T0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n0(e),i=t0(e),n=k0(e),o=n.args,a=n.keys;if(o.length===0)return mp([],r);var c=new he(z0(o,r,a?function(s){return x0(a,s)}:Pr));return i?c.pipe(y0(i)):c}function z0(e,t,r){return r===void 0&&(r=Pr),function(i){wc(t,function(){for(var n=e.length,o=new Array(n),a=n,c=n,s=function(l){wc(t,function(){var d=mp(e[l],t),f=!1;d.subscribe(We(i,function(m){o[l]=m,f||(f=!0,c--),c||i.next(r(o.slice()))},function(){--a||i.complete()}))},i)},u=0;u<n;u++)s(u)},i)}}function wc(e,t,r){e?Me(r,e,t):t()}function E0(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 O0(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 U0(e){return e<=0?function(){return Q1}:Ge(function(t,r){var i=0;t.subscribe(We(r,function(n){++i<=e&&(r.next(n),e<=i&&r.complete())}))})}function D0(e){return e===void 0&&(e=N0),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 N0(){return new pp}function at(e,t){var r=arguments.length>=2;return function(i){return i.pipe(Pr,U0(1),r?O0(t):D0(function(){return new pp}))}}function re(e){return Ge(function(t,r){Ar(e).subscribe(We(r,function(){return r.complete()},di)),!r.closed&&t.subscribe(r)})}class j0{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=$.memo(({omakasePlayer:e,onTimelineCreatedCallback:t,timelineConfig:r,enableHotKeys:i})=>($.useEffect(()=>{if(r.timelineHTMLElementId===void 0&&(r.timelineHTMLElementId="omakase-timeline"),e.createTimeline(r).subscribe({next:n=>{T0([e.timeline.onReady$,e.video.onVideoLoaded$.pipe(E0(o=>!!o))]).subscribe({next:()=>t(n)})}}),i===void 0||i){const n=new j0;n.actionToggleCti=()=>{var c;return(c=e.timeline)==null?void 0:c.toggleTimecodeEdit()},n.actionResetZoom=()=>{var c;return(c=e.timeline)==null?void 0:c.zoomToEased(100)},n.actionZoomIn=()=>{var c;return(c=e.timeline)==null?void 0:c.zoomInEased()},n.actionZoomOut=()=>{var c;return(c=e.timeline)==null?void 0:c.zoomOutEased()};const o=c=>{const s=e.audio.getAudioTracks(),u=e.audio.getActiveAudioTrack(),d=s.findIndex(f=>f.id===(u==null?void 0:u.id))+(c?-1:1);d>=0&&d<s.length&&e.audio.setActiveAudioTrack(s.at(d).id)};n.actionTogglePreviousAudioTrack=()=>o(!0),n.actionToggleNextAudioTrack=()=>o(!1);const a=c=>{n.handleKeyboardEvent(c)&&(c.preventDefault(),c.stopPropagation())};return window.addEventListener("keydown",a),e.chroming.appendHelpMenuGroup(n.getKeyboardShortcutsHelpMenuGroup()),()=>{window.removeEventListener("keydown",a)}}},[e]),$.createElement("div",{id:r.timelineHTMLElementId})));class hp{static get window(){return window}static get navigator(){return window.navigator}static get userAgent(){var r;const t=((r=this.navigator)==null?void 0:r.userAgent)||"";return/Android/i.test(t)?"android":/Firefox/i.test(t)?"firefox":/Edg/i.test(t)?"edge":(/Chrome/i.test(t)||/CriOS/i.test(t))&&!/Edg/i.test(t)?"chrome":/Chrome/i.test(t)||/CriOS/i.test(t)?"chromium":/Safari/i.test(t)?"safari":"unknown"}static get platform(){var r,i,n;const t=((i=(r=this.navigator)==null?void 0:r.userAgentData)==null?void 0:i.platform)||((n=this.navigator)==null?void 0:n.platform);return t!=null&&t.toUpperCase().includes("MAC")?"macos":t!=null&&t.toUpperCase().includes("WIN")?"windows":t!=null&&t.toUpperCase().includes("LINUX")?"linux":"unknown"}static isUserAgent(t){return this.userAgent===t}static isPlatform(t){return this.platform===t}static open(t,r="_blank"){this.window.open(t,r)}}const xt=[.25,.5,.75,1,2,4,8];class Ln{static getKeyboardShortcutsHelpMenuGroup(){let t=(...o)=>o.join(" + "),r="shift".toUpperCase(),i="ctrl".toUpperCase();return{name:"Playback function shortcuts",items:[{description:"Play / Pause",name:t("Space")},{description:"Toggle Sound",name:t("s")},{description:"Toggle Text On / Off",name:t("d")},{description:"Toggle Full Screen",name:t("f")},{description:"Increase Volume",name:t(r,"\\")},{description:"Reduce Volume",name:t("\\")},{description:"One Frame Forward",name:t("Right Arrow")},{description:"One Frame Backward",name:t("Left Arrow")},{description:"10 Frames Forward",name:t(r,"Right Arrow")},{description:"10 Frames Backwards",name:t(r,"Left Arrow")},{description:"Stop shuttle and pause",name:t("k")},{description:"Decrease Shuttle Forwards",name:t("l")},{description:"Increase Shuttle Forwards",name:t(r,"l")},{description:"Set playhead to Start of Media and Stop",name:t("1 / Home")},{description:"Set playhead to End of Media and Stop",name:t(i,"1")+" / End"}]}}static handleKeyboardEvent(t,r){const i=t.target,n=["INPUT","TEXTAREA","OMAKASE-MARKER-LIST"],o=hp.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,c=t.shiftKey?1:-1,s=r.audio.getAudioOutputVolume()*100+a*c;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 c=xt.indexOf(r.video.getPlaybackRate())+a;let s;return c<0?s=xt.at(0):c>=xt.length?s=xt.at(-1):s=xt.at(c),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,c=t.shiftKey?10:1;return r.video.isPlaying()&&r.video.pause(),r.video.seekFromCurrentFrame(c*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 A0=$.memo(function({videoUrl:t,config:r,videoLoadOptions:i,onVideoLoadedCallback:n,enableHotkeys:o}){return r&&(r==null?void 0:r.playerHTMLElementId)===void 0&&(r.playerHTMLElementId="omakase-player"),$.useEffect(()=>{var s,u;let a=new B.OmakasePlayer(r);const c=l=>{Ln.handleKeyboardEvent(l,a)&&(l.stopPropagation(),l.preventDefault())};return(o===void 0||o)&&((s=document.querySelector("media-controller"))==null||s.setAttribute("nohotkeys",""),(u=document.querySelector("media-controller"))==null||u.setAttribute("tabindex","-1"),window.addEventListener("keydown",c),a.chroming.appendHelpMenuGroup(Ln.getKeyboardShortcutsHelpMenuGroup())),a.loadVideo(t,i).subscribe({next:l=>{n&&n(a,l)}}),()=>{(o===void 0||o)&&window.removeEventListener("keydown",c)}},[t]),$.createElement("div",{id:r.playerHTMLElementId})}),L0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M10.5675 21C10.2375 21 9.9675 20.73 9.9675 20.4V16.7925L5.6325 12.3675L9.9675 8.235V3.6C9.9675 3.27 10.2375 3 10.5675 3C10.8975 3 11.1675 3.27 11.1675 3.6V8.7525L7.3425 12.3975L11.1675 16.305V20.4C11.1675 20.73 10.8975 21 10.5675 21Z",fill:"currentColor"}),$.createElement("path",{d:"M17.7675 17.145C17.61 17.145 17.46 17.085 17.34 16.965L12.8325 12.3675L17.355 8.0625C17.595 7.8375 17.9775 7.845 18.2025 8.085C18.4275 8.325 18.42 8.7075 18.18 8.9325L14.5425 12.3975L18.195 16.125C18.4275 16.365 18.42 16.74 18.1875 16.9725C18.075 17.085 17.9175 17.145 17.7675 17.145Z",fill:"currentColor"})),C0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M13.4325 21C13.7625 21 14.0325 20.73 14.0325 20.4V16.7925L18.3675 12.3675L14.0325 8.235V3.6C14.0325 3.27 13.7625 3 13.4325 3C13.1025 3 12.8325 3.27 12.8325 3.6V8.7525L16.6575 12.3975L12.8325 16.305V20.4C12.8325 20.73 13.1025 21 13.4325 21Z",fill:"currentColor"}),$.createElement("path",{d:"M6.2325 17.145C6.39 17.145 6.54 17.085 6.66 16.965L11.1675 12.3675L6.645 8.0625C6.405 7.8375 6.0225 7.845 5.7975 8.085C5.5725 8.325 5.58 8.7075 5.82 8.9325L9.4575 12.3975L5.805 16.125C5.5725 16.365 5.58 16.74 5.8125 16.9725C5.925 17.085 6.0825 17.145 6.2325 17.145Z",fill:"currentColor"})),Z0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"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"})),M0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"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"})),R0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M11.3475 3H5.775V21L11.3475 17.0475V3Z",fill:"currentColor"}),$.createElement("path",{d:"M18.225 21L12.6525 17.0475V3H18.225V21ZM13.7775 16.47L17.1 18.825V4.125H13.7775V16.47Z",fill:"currentColor"})),F0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M4.6875 3V21L8.0625 17.0475L11.4375 21V3H4.6875Z",fill:"currentColor"}),$.createElement("path",{d:"M12.5625 3V21L15.9375 17.0475L19.3125 21V3H12.5625Z",fill:"currentColor"})),V0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"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"})),B0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M12.3075 8.0175L14.4525 5.8725C14.6175 5.7075 14.6175 5.43 14.4525 5.265L12.3 3.12C12.135 2.955 11.8575 2.955 11.6925 3.12C11.5275 3.285 11.5275 3.5625 11.6925 3.7275L13.1025 5.1375H6.64499C5.22749 5.1375 4.07249 6.2925 4.07249 7.71V16.2825C4.07249 17.7 5.22749 18.855 6.64499 18.855C6.87749 18.855 7.07249 18.66 7.07249 18.4275C7.07249 18.195 6.87749 18 6.64499 18C5.69249 18 4.93499 17.2275 4.93499 16.29V7.7175C4.93499 6.765 5.70749 6.0075 6.64499 6.0075H13.11L11.7 7.4175C11.535 7.5825 11.535 7.86 11.7 8.025C11.865 8.19 12.1425 8.19 12.3075 8.025V8.0175Z",fill:"currentColor"}),$.createElement("path",{d:"M17.355 18.8625C18.7725 18.8625 19.9275 17.7075 19.9275 16.29V7.7175C19.9275 6.3 18.7725 5.145 17.355 5.145C17.1225 5.145 16.9275 5.34 16.9275 5.5725C16.9275 5.805 17.1225 6 17.355 6C18.3075 6 19.065 6.7725 19.065 7.71V16.2825C19.065 17.235 18.2925 17.9925 17.355 17.9925H10.89L12.3075 16.5825C12.3825 16.5075 12.435 16.395 12.435 16.2825C12.435 16.17 12.3975 16.0575 12.3075 15.9825C12.15 15.8175 11.8575 15.825 11.7 15.9825L9.52501 18.1575V18.18C9.45751 18.255 9.42751 18.345 9.42751 18.435C9.42751 18.555 9.46501 18.66 9.55501 18.735L11.7 20.88C11.8575 21.045 12.15 21.045 12.3075 20.88C12.4725 20.715 12.4725 20.4375 12.3075 20.2725L10.89 18.8625H17.355Z",fill:"currentColor"})),K0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("g",{clipPath:"url(#clip0_3377_237)"},$.createElement("path",{d:"M13.02 19.95C17.42 19.95 21 16.37 21 11.97C21 7.57 17.42 4 13.02 4C8.88 4 5.39 7.24 5.08 11.37L5.02 12.14L3.56 10.68C3.49 10.61 3.41 10.58 3.33 10.58C3.25 10.58 3.17 10.61 3.1 10.68C3.03 10.75 3 10.83 3 10.92C3 11 3.03 11.08 3.1 11.15L5.22 13.27C5.35 13.4 5.55 13.43 5.65 13.3L7.8 11.15C7.87 11.08 7.9 11 7.9 10.92C7.9 10.84 7.86 10.76 7.8 10.69C7.73 10.62 7.65 10.59 7.57 10.59C7.49 10.59 7.41 10.62 7.34 10.69L5.9 12.13L6.03 11.11C6.45 7.57 9.46 4.91 13.02 4.91C16.91 4.91 20.08 8.08 20.08 11.97C20.08 15.86 16.91 19.03 13.02 19.03C12.77 19.03 12.56 19.24 12.56 19.49C12.56 19.74 12.77 19.95 13.02 19.95Z",fill:"currentColor"}),$.createElement("path",{d:"M14.95 13.19C14.95 13.72 14.75 14.14 14.36 14.45C13.97 14.76 13.43 14.91 12.75 14.91C12.16 14.91 11.69 14.81 11.32 14.62V13.53C11.7 13.81 12.14 13.95 12.65 13.95C12.98 13.95 13.23 13.88 13.41 13.74C13.59 13.6 13.67 13.41 13.67 13.17C13.67 12.93 13.56 12.72 13.34 12.58C13.12 12.44 12.82 12.37 12.43 12.37H11.92V11.41H12.39C13.13 11.41 13.5 11.16 13.5 10.67C13.5 10.21 13.22 9.98 12.65 9.98C12.26 9.98 11.89 10.1 11.54 10.35V9.33C11.93 9.13 12.4 9.03 12.94 9.03C13.48 9.03 13.94 9.16 14.28 9.41C14.62 9.66 14.79 10.01 14.79 10.44C14.79 11.19 14.41 11.65 13.66 11.84V11.86C14.06 11.91 14.37 12.05 14.61 12.29C14.85 12.53 14.96 12.83 14.96 13.19H14.95Z",fill:"currentColor"})),$.createElement("defs",null,$.createElement("clipPath",{id:"clip0_3377_237"},$.createElement("rect",{width:"18",height:"15.95",fill:"white",transform:"translate(3 4)"})))),J0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("g",{clipPath:"url(#clip0_3377_260)"},$.createElement("path",{d:"M10.98 19.95C6.58 19.95 3 16.37 3 11.98C3 7.58 6.58 4 10.98 4C15.12 4 18.61 7.24 18.93 11.37L18.99 12.14L20.45 10.68C20.52 10.61 20.6 10.58 20.68 10.58C20.76 10.58 20.84 10.61 20.91 10.68C20.98 10.75 21.01 10.83 21.01 10.91C21.01 10.99 20.98 11.07 20.91 11.14L18.79 13.26C18.66 13.39 18.46 13.42 18.36 13.29L16.21 11.14C16.14 11.07 16.11 10.99 16.11 10.91C16.11 10.83 16.15 10.75 16.21 10.68C16.28 10.61 16.36 10.58 16.44 10.58C16.52 10.58 16.6 10.61 16.67 10.68L18.11 12.12L17.98 11.1C17.55 7.57 14.54 4.91 10.98 4.91C7.09 4.91 3.92 8.08 3.92 11.97C3.92 15.86 7.09 19.03 10.98 19.03C11.23 19.03 11.44 19.24 11.44 19.49C11.44 19.74 11.23 19.95 10.98 19.95Z",fill:"currentColor"}),$.createElement("path",{d:"M12.91 13.19C12.91 13.72 12.71 14.14 12.32 14.45C11.93 14.76 11.39 14.91 10.71 14.91C10.12 14.91 9.65 14.81 9.28 14.62V13.53C9.66 13.81 10.1 13.95 10.61 13.95C10.94 13.95 11.19 13.88 11.37 13.74C11.55 13.6 11.63 13.41 11.63 13.17C11.63 12.93 11.52 12.72 11.3 12.58C11.08 12.44 10.78 12.37 10.39 12.37H9.88V11.41H10.35C11.09 11.41 11.46 11.16 11.46 10.67C11.46 10.21 11.18 9.98 10.61 9.98C10.22 9.98 9.85 10.1 9.5 10.35V9.33C9.89 9.13 10.36 9.03 10.9 9.03C11.44 9.03 11.9 9.16 12.24 9.41C12.58 9.66 12.75 10.01 12.75 10.44C12.75 11.19 12.37 11.65 11.62 11.84V11.86C12.02 11.91 12.33 12.05 12.57 12.29C12.81 12.53 12.92 12.83 12.92 13.19H12.91Z",fill:"currentColor"})),$.createElement("defs",null,$.createElement("clipPath",{id:"clip0_3377_260"},$.createElement("rect",{width:"18",height:"15.95",fill:"white",transform:"translate(3 4)"})))),ye=({Icon:e,onClick:t,width:r,height:i,text:n,disabled:o})=>$.createElement("button",{disabled:o,onClick:t},$.createElement(e,{width:r,height:i})," ",n),G0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M12.6525 17.0475L18.225 21V3H12.6525V17.0475Z",fill:"currentColor"}),$.createElement("path",{d:"M5.775 3H11.3475V17.0475L5.775 21V3ZM10.2225 4.125H6.9V18.825L10.2225 16.47V4.125Z",fill:"currentColor"})),W0=({width:e,height:t})=>$.createElement("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("rect",{x:"0.5",y:"0.5",width:"13",height:"13",rx:"2.5",stroke:"currentColor"}),$.createElement("path",{d:"M7.16667 6.33333V6.83333H7.66667H10.3333C10.4257 6.83333 10.5 6.90769 10.5 7C10.5 7.09231 10.4257 7.16667 10.3333 7.16667H7.66667H7.16667V7.66667V10.3333C7.16667 10.4257 7.09231 10.5 7 10.5C6.90769 10.5 6.83333 10.4257 6.83333 10.3333V7.66667V7.16667H6.33333H3.66667C3.57468 7.16667 3.5 7.09199 3.5 7C3.5 6.90801 3.57468 6.83333 3.66667 6.83333H6.33333H6.83333V6.33333V3.66667C6.83333 3.57468 6.90801 3.5 7 3.5C7.09199 3.5 7.16667 3.57468 7.16667 3.66667V6.33333Z",fill:"currentColor",stroke:"currentColor"}));function Ie(e){e.next(),e.complete()}class H0{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=hp.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 mn=(e,t,r)=>e.getMarkers().reduce((i,n)=>{if(t.id===n.id)return i;if(n instanceof B.PeriodMarker&&n.timeObservation.start!=null&&n.timeObservation.end!=null){const o=t.timeObservation,a=n.timeObservation.start,c=n.timeObservation.end,s=(r==null?void 0:r.start)??o.start,u=(r==null?void 0:r.end)??o.end;if(Number.isFinite(s)&&Number.isFinite(u))return i||s<=c&&u>=a;if(Number.isFinite(s))return i||s>=a&&s<=c;if(Number.isFinite(u))return i||u>=a&&u<=c}return i},!1);function pn(e,t,r){if(!e||!(e instanceof B.PeriodMarker))return!0;const i=e.timeObservation.start,n=e.timeObservation.end;if(i==null||n==null)return!0;const o=r.video.calculateTimeToFrame(n),a=r.video.calculateTimeToFrame(i),c=r.video.getCurrentFrame();return t<i||o-c<2||c-a<1}function hn(e){return!(e.timeObservation.start==null||e.timeObservation.end==null)}const q0=({selectedMarker:e,omakasePlayer:t,enableHotKeys:r,segmentationLanes:i,setSegmentationLanes:n,setSelectedMarker:o,onMarkerClickCallback:a,setSource:c,source:s,constants:u})=>{const l=$.useRef(void 0),d=$.useRef(void 0),f=$.useRef(new Xe),m=$.useRef(!1),g=(S,x,j)=>{const J=x??t.video.getCurrentTime();return S.getMarkers().reduce((V,de)=>de instanceof B.PeriodMarker&&de.timeObservation.start!==void 0&&de.timeObservation.end!==void 0&&de.id!==(j==null?void 0:j.id)?V||J>=de.timeObservation.start&&J<=de.timeObservation.end:V,!1)},p=S=>{if(L===void 0)return!0;const x=L.timeObservation.start,j=S??t.video.getCurrentTime();return!!(x==null||x>=j||mn(s,L,{end:j}))},v=S=>L!==void 0||s===void 0?!0:g(s,S,L),[w,z]=$.useState(void 0),[T,A]=$.useState(pn(e,t.video.getCurrentTime(),t)),[L,R]=$.useState(void 0),[le,X]=$.useState(p()),[ne,be]=$.useState(v()),ae=S=>{if(S===void 0||s===void 0||!(S instanceof B.PeriodMarker))return!0;const x=mn(s,S,{start:t.video.getCurrentTime()});if(x)return x;if(S instanceof B.PeriodMarker){const j=S.timeObservation.end;if(j!=null&&t.video.getCurrentTime()>=j)return!0}return!1},je=S=>{if(S===void 0||s===void 0||!(S instanceof B.PeriodMarker))return!0;const x=mn(s,S,{end:t.video.getCurrentTime()});if(x)return x;if(S instanceof B.PeriodMarker){if(S.timeObservation.end==null)return!0;const j=S.timeObservation.start;if(j!=null&&t.video.getCurrentTime()<=j)return!0}return!1},[He,qe]=$.useState(ae(e)),[Q,F]=$.useState(je(e));$.useEffect(()=>{if(X(()=>p()),be(()=>v()),L&&L!==e){const S=i.find(x=>x.getMarker(L.id));S==null||S.removeMarker(L.id),R(void 0)}},[e,L,i,R]),$.useEffect(()=>()=>Ie(f.current),[]),$.useEffect(()=>{if(qe(ae(e)),F(je(e)),e){const S=pn(e,t.video.getCurrentTime(),t);A(S);const x=t.video.onVideoTimeChange$.pipe(re(f.current)).subscribe({next:j=>{A(J=>pn(e,j.currentTime,t)),qe(()=>ae(e)),F(()=>je(e))}});return()=>x.unsubscribe()}},[e]),$.useEffect(()=>{t.video.onSeeking$.pipe(re(f.current)).subscribe({next:x=>{X(()=>p(x.toTime)),be(()=>v(x.toTime))}});const S=t.video.onVideoTimeChange$.pipe(re(f.current)).subscribe({next:x=>{X(()=>p()),be(()=>v())}});return()=>S.unsubscribe()},[L,s]),$.useEffect(()=>{const S=i.map(x=>x.onMarkerUpdate$.pipe(re(f.current)).subscribe({next:j=>{(e==null?void 0:e.id)===j.marker.id&&(A(J=>pn(e,t.video.getCurrentTime(),t)),qe(()=>ae(e)),F(()=>je(e)))}}));return()=>S.forEach(x=>x.unsubscribe())},[i,e]),$.useEffect(()=>{w&&(w.marker.style={...w.marker.style,color:w.color},w.marker.timeObservation={...w.marker.timeObservation},z(void 0))},[e]),$.useEffect(()=>{if(s){X(()=>p()),be(()=>v());const S=s.onMarkerDelete$.pipe(re(f.current)).subscribe({next:j=>{const J=j.marker;z(V=>{if((V==null?void 0:V.marker.id)!==J.id)return V}),o(V=>{if((V==null?void 0:V.id)!==J.id)return V}),R(V=>{if((V==null?void 0:V.id)!==J.id)return V}),X(()=>p()),be(()=>v())}}),x=s.onMarkerUpdate$.pipe(re(f.current)).subscribe({next:()=>{X(()=>p()),be(()=>v())}});return()=>{S.unsubscribe(),x.unsubscribe()}}},[s]);const ba=(S,x)=>{if(x===void 0)return;const j=x.timeObservation;S.video.seekToTime(j.start)},ya=(S,x)=>{if(x===void 0)return;const j=x.timeObservation;S.video.seekToTime(j.end)},_a=(S,x)=>{x instanceof B.PeriodMarker&&x.timeObservation.start!==void 0&&(x.timeObservation={...x.timeObservation,start:S.video.getCurrentTime()})},$a=(S,x)=>{x instanceof B.PeriodMarker&&x.timeObservation.end!==void 0&&(x.timeObservation={...x.timeObservation,end:S.video.getCurrentTime()})},wa=(S,x)=>{l.current&&Ie(l.current),l.current=new Xe,S.video.pause();const j=S.video.getCurrentFrame(),J=S.video.getFrameRate(),V=j-x*J,de=V>=0?V:0;S.video.seekToFrame(de).pipe(at()).subscribe(()=>{}),S.video.play(),S.video.onVideoTimeChange$.pipe(re(l.current),re(f.current)).subscribe(an=>{an.frame>=j-1&&(S.video.pause().subscribe(()=>{S.video.seekToFrame(j).pipe(at()).subscribe(()=>{})}),Ie(l.current))})},Sa=(S,x)=>{l.current&&Ie(l.current),l.current=new Xe,d.current&&Ie(d.current),d.current=new Xe;const j=S.video.getCurrentFrame(),J=S.video.getFrameRate(),V=j+x*J;S.video.play(),S.video.onVideoTimeChange$.pipe(re(l.current),re(f.current)).subscribe(de=>{de.frame>=V-1&&(S.video.pause().subscribe(()=>{S.video.seekToFrame(j).pipe(at()).subscribe(()=>{})}),Ie(l.current))}),S.video.onEnded$.pipe(re(d.current),re(f.current)).subscribe(de=>{setTimeout(()=>{S.video.seekToFrame(j).pipe(at()).subscribe(()=>{})},1),Ie(d.current)})},Lr=S=>{s.removeMarker(S.id),(L==null?void 0:L.id)===S.id&&R(void 0)},ka=(S,x)=>{if(!(x instanceof B.PeriodMarker))return;const j=x.timeObservation.start,J=x.timeObservation.end,V=S.video.getCurrentTime();if(j==null||J==null)return;const de=j,an=V,vp=an+1/S.video.getFrameRate(),bp=J;Lr(x);const Cr=new B.PeriodMarker({style:u.PERIOD_MARKER_STYLE,timeObservation:{start:de,end:an},editable:!0});Cr.onClick$.subscribe({next:()=>a(Cr)});const kt=new B.PeriodMarker({style:u.HIGHLIGHTED_PERIOD_MARKER_STYLE,timeObservation:{start:vp,end:bp},editable:!0});kt.onClick$.subscribe({next:()=>a(kt)}),s.addMarker(Cr),s.addMarker(kt),a(kt),setTimeout(()=>{z({marker:kt,color:u.PERIOD_MARKER_STYLE.color})},0)},Ia=()=>{const S=t.video.getCurrentTime(),x=new B.PeriodMarker({timeObservation:{start:S},style:u.PERIOD_MARKER_STYLE,editable:!0});x.onClick$.subscribe({next:()=>a(x)}),s.addMarker(x),R(x),X(p()),a(x)},xa=()=>{const S=t.video.getCurrentTime();L.timeObservation={...L.timeObservation,end:S},R(void 0)},Ta=S=>{l.current&&Ie(l.current),l.current=new Xe,d.current&&Ie(d.current),d.current=new Xe;const x=t.video.calculateTimeToFrame(S.timeObservation.start),j=t.video.calculateTimeToFrame(S.timeObservation.end);t.video.pause(),t.video.seekToFrame(x),t.video.play(),t.video.onVideoTimeChange$.pipe(re(l.current),re(f.current)).subscribe(J=>{J.frame>=j-1&&(t.video.pause().subscribe(()=>{t.video.seekToFrame(x).pipe(at()).subscribe(()=>{})}),Ie(l.current))}),t.video.onEnded$.pipe(re(d.current),re(f.current)).subscribe(J=>{setTimeout(()=>{t.video.seekToFrame(x).pipe(at()).subscribe(()=>{})},1),Ie(d.current)})},gp=()=>{const S=i.length,x=`Segmentation ${i.length+1}`,j=new B.MarkerLane({style:u.TIMELINE_LANE_STYLE,description:x});j.onMarkerUpdate$.pipe(re(f.current)).subscribe({next:J=>{mn(j,J.marker)&&(J.marker.timeObservation=J.oldValue.timeObservation)}}),t.timeline.addTimelineLaneAtIndex(j,S+1),n([...i,j]),a(void 0),c(j)},za=S=>{if(!s)return;const x=s.getMarkers().filter(V=>V instanceof B.PeriodMarker).sort((V,de)=>(V.timeObservation.start??0)-(de.timeObservation.start??0));if(e===void 0){a(x.at(0));return}const J=x.findIndex(V=>V.id===e.id)+(S?-1:1);J>=0&&J<x.length&&a(x.at(J))};return $.useEffect(()=>{if(!r)return;const S=new H0;S.actionLoopActiveMarker=()=>e instanceof B.PeriodMarker&&hn(e)&&Ta(e),S.actionSetPlayheadToMarkerStart=()=>e&&ba(t,e),S.actionSetPlayheadToMarkerEnd=()=>e&&e instanceof B.PeriodMarker&&hn(e)&&ya(t,e),S.actionSetMarkerStartToPlayhead=()=>!He&&_a(t,e),S.actionSetMarkerEndToPlayhead=()=>!Q&&$a(t,e),S.actionMarkerSplit=()=>!T&&ka(t,e),S.actionMarkerDelete=()=>e&&Lr(e),S.actionMarkerInOut=()=>{L===void 0?!ne&&Ia():!le&&xa()},S.actionPlay3SecondsAndRewindToCurrent=()=>Sa(t,3),S.actionRewind3SecondsAndPlayToCurrent=()=>wa(t,3),S.actionNextMarkerToggle=()=>za(!1),S.actionPreviousMarkerToggle=()=>za(!0);const x=j=>{S.handleKeyboardEvent(j,t)&&(j.stopPropagation(),j.preventDefault())};return window.addEventListener("keydown",x),m.current||(t.chroming.appendHelpMenuGroup(S.getKeyboardShortcutsHelpMenuGroup()),m.current=!0),()=>window.removeEventListener("keydown",x)}),$.createElement("div",{className:"omakase-player-timeline-controls-toolbar"},$.createElement("div",{className:"omakase-player-timeline-controls-toolbar-control-panel"},$.createElement(ye,{Icon:L0,onClick:()=>ba(t,e),disabled:e===void 0}),$.createElement(ye,{Icon:C0,onClick:()=>ya(t,e),disabled:e===void 0||e instanceof B.PeriodMarker&&!hn(e)}),$.createElement(ye,{Icon:Z0,onClick:()=>_a(t,e),disabled:He}),$.createElement(ye,{Icon:M0,onClick:()=>$a(t,e),disabled:Q}),L===void 0?$.createElement(ye,{Icon:R0,onClick:Ia,disabled:ne}):$.createElement(ye,{Icon:G0,onClick:xa,disabled:le}),$.createElement(ye,{Icon:V0,onClick:()=>Lr(e),disabled:e===void 0}),$.createElement(ye,{Icon:F0,onClick:()=>ka(t,e),disabled:T||e===void 0}),$.createElement(ye,{Icon:B0,onClick:()=>Ta(e),disabled:!(e instanceof B.PeriodMarker&&hn(e))}),$.createElement(ye,{Icon:K0,onClick:()=>wa(t,3)}),$.createElement(ye,{Icon:J0,onClick:()=>Sa(t,3)})),$.createElement("div",{className:"omakase-player-timeline-controls-toolbar-control-panel"},$.createElement("div",{className:"segmentation-button-wrapper"},$.createElement(ye,{Icon:W0,text:"NEW SEGMENTATION",onClick:()=>gp(),disabled:i.length>=3}))))},X0=$.memo(function({flow:t,subflows:r,flowsSegments:i,onVideoLoadedCallback:n,config:o,timerange:a,videoLoadOptions:c,enableHotkeys:s}){return o&&(o==null?void 0:o.playerHTMLElementId)===void 0&&(o.playerHTMLElementId="omakase-player"),$.useEffect(()=>{var d,f;let u=new Wm(o);const l=m=>{Ln.handleKeyboardEvent(m,u)&&(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),u.video.appendHelpMenuGroup(Ln.getKeyboardShortcutsHelpMenuGroup())),u.loadVideo({flow:t,subflows:r,flowsSegments:i},c).subscribe({next:m=>{n&&n(u,m)}}),()=>{(s===void 0||s)&&window.removeEventListener("keydown",l)}},[t,a]),$.createElement("div",{id:o.playerHTMLElementId})});function Y0(e){const t=Math.round(e/60)*60,r=new Date(t*1e3);return`${r.getUTCHours()}h ${r.getUTCMinutes()}min`}function Q0(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 ey=`
|
|
103
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function li(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var jr=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,i,n,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=yt(a),s=u.next();!s.done;s=u.next()){var c=s.value;c.remove(this)}}catch(p){t={error:p}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(re(l))try{l()}catch(p){o=p instanceof Gr?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=yt(d),m=f.next();!m.done;m=f.next()){var h=m.value;try{vu(h)}catch(p){o=o??[],p instanceof Gr?o=An(An([],Pn(o)),Pn(p.errors)):o.push(p)}}}catch(p){i={error:p}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}if(o)throw new Gr(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)vu(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&li(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&li(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),qm=jr.EMPTY;function Wm(e){return e instanceof jr||e&&"closed"in e&&re(e.remove)&&re(e.add)&&re(e.unsubscribe)}function vu(e){re(e)?e():e.unsubscribe()}var R1={Promise:void 0},F1={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,An([e,t],Pn(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Hm(e){F1.setTimeout(function(){throw e})}function di(){}function $n(e){e()}var ga=(function(e){an(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,Wm(r)&&r.add(i)):i.destination=K1,i}return t.create=function(r,i,n){return new fi(r,i,n)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(jr),V1=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(i){mn(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){mn(i)}else mn(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){mn(r)}},e})(),fi=(function(e){an(t,e);function t(r,i,n){var o=e.call(this)||this,a;return re(r)||!r?a={next:r??void 0,error:i??void 0,complete:n??void 0}:a=r,o.destination=new V1(a),o}return t})(ga);function mn(e){Hm(e)}function B1(e){throw e}var K1={closed:!0,next:di,error:B1,complete:di},va=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Pr(e){return e}function J1(e){return e.length===0?Pr:e.length===1?e[0]:function(r){return e.reduce(function(i,n){return n(i)},r)}}var pe=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,i){var n=this,o=q1(t)?t:new fi(t,r,i);return $n(function(){var a=n,u=a.operator,s=a.source;o.add(u?u.call(o,s):s?n._subscribe(o):n._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var i=this;return r=bu(r),new r(function(n,o){var a=new fi({next:function(u){try{t(u)}catch(s){o(s),a.unsubscribe()}},error:o,complete:n});i.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[va]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return J1(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=bu(t),new t(function(i,n){var o;r.subscribe(function(a){return o=a},function(a){return n(a)},function(){return i(o)})})},e.create=function(t){return new e(t)},e})();function bu(e){var t;return(t=e??R1.Promise)!==null&&t!==void 0?t:Promise}function G1(e){return e&&re(e.next)&&re(e.error)&&re(e.complete)}function q1(e){return e&&e instanceof ga||G1(e)&&Wm(e)}function W1(e){return re(e==null?void 0:e.lift)}function Ge(e){return function(t){if(W1(t))return t.lift(function(r){try{return e(r,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function qe(e,t,r,i,n){return new H1(e,t,r,i,n)}var H1=(function(e){an(t,e);function t(r,i,n,o,a,u){var s=e.call(this,r)||this;return s.onFinalize=a,s.shouldUnsubscribe=u,s._next=i?function(c){try{i(c)}catch(l){r.error(l)}}:e.prototype._next,s._error=o?function(c){try{o(c)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=n?function(){try{n()}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;e.prototype.unsubscribe.call(this),!i&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(ga),X1=ha(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),He=(function(e){an(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var i=new _u(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new X1},t.prototype.next=function(r){var i=this;$n(function(){var n,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var a=yt(i.currentObservers),u=a.next();!u.done;u=a.next()){var s=u.value;s.next(r)}}catch(c){n={error:c}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}}})},t.prototype.error=function(r){var i=this;$n(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=r;for(var n=i.observers;n.length;)n.shift().error(r)}})},t.prototype.complete=function(){var r=this;$n(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var i=r.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var i=this,n=this,o=n.hasError,a=n.isStopped,u=n.observers;return o||a?qm:(this.currentObservers=null,u.push(r),new jr(function(){i.currentObservers=null,li(u,r)}))},t.prototype._checkFinalizedStatuses=function(r){var i=this,n=i.hasError,o=i.thrownError,a=i.isStopped;n?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new pe;return r.source=this,r},t.create=function(r,i){return new _u(r,i)},t})(pe),_u=(function(e){an(t,e);function t(r,i){var n=e.call(this)||this;return n.destination=r,n.source=i,n}return t.prototype.next=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.next)===null||n===void 0||n.call(i,r)},t.prototype.error=function(r){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.error)===null||n===void 0||n.call(i,r)},t.prototype.complete=function(){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||i===void 0||i.call(r)},t.prototype._subscribe=function(r){var i,n;return(n=(i=this.source)===null||i===void 0?void 0:i.subscribe(r))!==null&&n!==void 0?n:qm},t})(He),Y1=new pe(function(e){return e.complete()});function Q1(e){return e&&re(e.schedule)}function Xm(e){return e[e.length-1]}function e0(e){return re(Xm(e))?e.pop():void 0}function t0(e){return Q1(Xm(e))?e.pop():void 0}var Ym=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function Qm(e){return re(e==null?void 0:e.then)}function ep(e){return re(e[va])}function tp(e){return Symbol.asyncIterator&&re(e==null?void 0:e[Symbol.asyncIterator])}function np(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function n0(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var rp=n0();function ip(e){return re(e==null?void 0:e[rp])}function op(e){return Z1(this,arguments,function(){var r,i,n,o;return Gm(this,function(a){switch(a.label){case 0:r=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,st(r.read())];case 3:return i=a.sent(),n=i.value,o=i.done,o?[4,st(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,st(n)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function ap(e){return re(e==null?void 0:e.getReader)}function Ar(e){if(e instanceof pe)return e;if(e!=null){if(ep(e))return r0(e);if(Ym(e))return i0(e);if(Qm(e))return o0(e);if(tp(e))return up(e);if(ip(e))return a0(e);if(ap(e))return u0(e)}throw np(e)}function r0(e){return new pe(function(t){var r=e[va]();if(re(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function i0(e){return new pe(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function o0(e){return new pe(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Hm)})}function a0(e){return new pe(function(t){var r,i;try{for(var n=yt(e),o=n.next();!o.done;o=n.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(u){r={error:u}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}t.complete()})}function up(e){return new pe(function(t){c0(e,t).catch(function(r){return t.error(r)})})}function u0(e){return up(op(e))}function c0(e,t){var r,i,n,o;return C1(this,void 0,void 0,function(){var a,u;return Gm(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),r=M1(e),s.label=1;case 1:return[4,r.next()];case 2:if(i=s.sent(),!!i.done)return[3,4];if(a=i.value,t.next(a),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=s.sent(),n={error:u},[3,11];case 6:return s.trys.push([6,,9,10]),i&&!i.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Me(e,t,r,i,n){i===void 0&&(i=0),n===void 0&&(n=!1);var o=t.schedule(function(){r(),n?e.add(this.schedule(null,i)):this.unsubscribe()},i);if(e.add(o),!n)return o}function cp(e,t){return t===void 0&&(t=0),Ge(function(r,i){r.subscribe(qe(i,function(n){return Me(i,e,function(){return i.next(n)},t)},function(){return Me(i,e,function(){return i.complete()},t)},function(n){return Me(i,e,function(){return i.error(n)},t)}))})}function sp(e,t){return t===void 0&&(t=0),Ge(function(r,i){i.add(e.schedule(function(){return r.subscribe(i)},t))})}function s0(e,t){return Ar(e).pipe(sp(t),cp(t))}function l0(e,t){return Ar(e).pipe(sp(t),cp(t))}function d0(e,t){return new pe(function(r){var i=0;return t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||this.schedule())})})}function f0(e,t){return new pe(function(r){var i;return Me(r,t,function(){i=e[rp](),Me(r,t,function(){var n,o,a;try{n=i.next(),o=n.value,a=n.done}catch(u){r.error(u);return}a?r.complete():r.next(o)},0,!0)}),function(){return re(i==null?void 0:i.return)&&i.return()}})}function lp(e,t){if(!e)throw new Error("Iterable cannot be null");return new pe(function(r){Me(r,t,function(){var i=e[Symbol.asyncIterator]();Me(r,t,function(){i.next().then(function(n){n.done?r.complete():r.next(n.value)})},0,!0)})})}function m0(e,t){return lp(op(e),t)}function p0(e,t){if(e!=null){if(ep(e))return s0(e,t);if(Ym(e))return d0(e,t);if(Qm(e))return l0(e,t);if(tp(e))return lp(e,t);if(ip(e))return f0(e,t);if(ap(e))return m0(e,t)}throw np(e)}function dp(e,t){return t?p0(e,t):Ar(e)}var fp=ha(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function h0(e,t){return Ge(function(r,i){var n=0;r.subscribe(qe(i,function(o){i.next(e.call(t,o,n++))}))})}var g0=Array.isArray;function v0(e,t){return g0(t)?e.apply(void 0,An([],Pn(t))):e(t)}function b0(e){return h0(function(t){return v0(e,t)})}var _0=Array.isArray,y0=Object.getPrototypeOf,$0=Object.prototype,w0=Object.keys;function S0(e){if(e.length===1){var t=e[0];if(_0(t))return{args:t,keys:null};if(k0(t)){var r=w0(t);return{args:r.map(function(i){return t[i]}),keys:r}}}return{args:e,keys:null}}function k0(e){return e&&typeof e=="object"&&y0(e)===$0}function I0(e,t){return e.reduce(function(r,i,n){return r[i]=t[n],r},{})}function x0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=t0(e),i=e0(e),n=S0(e),o=n.args,a=n.keys;if(o.length===0)return dp([],r);var u=new pe(T0(o,r,a?function(s){return I0(a,s)}:Pr));return i?u.pipe(b0(i)):u}function T0(e,t,r){return r===void 0&&(r=Pr),function(i){yu(t,function(){for(var n=e.length,o=new Array(n),a=n,u=n,s=function(l){yu(t,function(){var d=dp(e[l],t),f=!1;d.subscribe(qe(i,function(m){o[l]=m,f||(f=!0,u--),u||i.next(r(o.slice()))},function(){--a||i.complete()}))},i)},c=0;c<n;c++)s(c)},i)}}function yu(e,t,r){e?Me(r,e,t):t()}function z0(e,t){return Ge(function(r,i){var n=0;r.subscribe(qe(i,function(o){return e.call(t,o,n++)&&i.next(o)}))})}function E0(e){return Ge(function(t,r){var i=!1;t.subscribe(qe(r,function(n){i=!0,r.next(n)},function(){i||r.next(e),r.complete()}))})}function O0(e){return e<=0?function(){return Y1}:Ge(function(t,r){var i=0;t.subscribe(qe(r,function(n){++i<=e&&(r.next(n),e<=i&&r.complete())}))})}function U0(e){return e===void 0&&(e=D0),Ge(function(t,r){var i=!1;t.subscribe(qe(r,function(n){i=!0,r.next(n)},function(){return i?r.complete():r.error(e())}))})}function D0(){return new fp}function at(e,t){var r=arguments.length>=2;return function(i){return i.pipe(Pr,O0(1),r?E0(t):U0(function(){return new fp}))}}function ie(e){return Ge(function(t,r){Ar(e).subscribe(qe(r,function(){return r.complete()},di)),!r.closed&&t.subscribe(r)})}class N0{constructor(){k(this,"actionZoomIn");k(this,"actionZoomOut");k(this,"actionResetZoom");k(this,"actionToggleNextAudioTrack");k(this,"actionTogglePreviousAudioTrack");k(this,"actionToggleCti")}getKeyboardShortcutsHelpMenuGroup(){let t=(...n)=>n.join(" + "),r="shift".toUpperCase();return{name:"Timeline function shortcuts",items:[{description:"Timeline Zoom In",name:t("=")},{description:"Timeline Zoom Out",name:t("-")},{description:"Timeline Zoom level 100%",name:t("0")},{description:"Toggle Next Audio Track",name:t(r,"e")},{description:"Toggle Previous Audio Track",name:t("e")},{description:"Toggle CTI into / out-of Interactive Mode",name:t("'")}]}}handleKeyboardEvent(t){const r=t.target;return["INPUT","TEXTAREA","OMAKASE-MARKER-LIST"].includes(r.tagName.toUpperCase())?!1:t.code==="Equal"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionZoomIn&&this.actionZoomIn(),!0):t.code==="Minus"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionZoomOut&&this.actionZoomOut(),!0):t.code==="Digit0"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionResetZoom&&this.actionResetZoom(),!0):t.code==="KeyE"&&!t.ctrlKey&&!t.metaKey?(t.shiftKey?this.actionToggleNextAudioTrack&&this.actionToggleNextAudioTrack():this.actionTogglePreviousAudioTrack&&this.actionTogglePreviousAudioTrack(),!0):t.code==="Quote"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionToggleCti&&this.actionToggleCti(),!0):!1}}const j0=$.memo(({omakasePlayer:e,onTimelineCreatedCallback:t,timelineConfig:r,enableHotKeys:i})=>($.useEffect(()=>{if(r.timelineHTMLElementId===void 0&&(r.timelineHTMLElementId="omakase-timeline"),e.createTimeline(r).subscribe({next:n=>{x0([e.timeline.onReady$,e.video.onVideoLoaded$.pipe(z0(o=>!!o))]).subscribe({next:()=>t(n)})}}),i===void 0||i){const n=new N0;n.actionToggleCti=()=>{var u;return(u=e.timeline)==null?void 0:u.toggleTimecodeEdit()},n.actionResetZoom=()=>{var u;return(u=e.timeline)==null?void 0:u.zoomToEased(100)},n.actionZoomIn=()=>{var u;return(u=e.timeline)==null?void 0:u.zoomInEased()},n.actionZoomOut=()=>{var u;return(u=e.timeline)==null?void 0:u.zoomOutEased()};const o=u=>{const s=e.audio.getAudioTracks(),c=e.audio.getActiveAudioTrack(),d=s.findIndex(f=>f.id===(c==null?void 0:c.id))+(u?-1:1);d>=0&&d<s.length&&e.audio.setActiveAudioTrack(s.at(d).id)};n.actionTogglePreviousAudioTrack=()=>o(!0),n.actionToggleNextAudioTrack=()=>o(!1);const a=u=>{n.handleKeyboardEvent(u)&&(u.preventDefault(),u.stopPropagation())};return window.addEventListener("keydown",a),e.chroming.appendHelpMenuGroup(n.getKeyboardShortcutsHelpMenuGroup()),()=>{window.removeEventListener("keydown",a)}}},[e]),$.createElement("div",{id:r.timelineHTMLElementId})));class mp{static get window(){return window}static get navigator(){return window.navigator}static get userAgent(){var r;const t=((r=this.navigator)==null?void 0:r.userAgent)||"";return/Android/i.test(t)?"android":/Firefox/i.test(t)?"firefox":/Edg/i.test(t)?"edge":(/Chrome/i.test(t)||/CriOS/i.test(t))&&!/Edg/i.test(t)?"chrome":/Chrome/i.test(t)||/CriOS/i.test(t)?"chromium":/Safari/i.test(t)?"safari":"unknown"}static get platform(){var r,i,n;const t=((i=(r=this.navigator)==null?void 0:r.userAgentData)==null?void 0:i.platform)||((n=this.navigator)==null?void 0:n.platform);return t!=null&&t.toUpperCase().includes("MAC")?"macos":t!=null&&t.toUpperCase().includes("WIN")?"windows":t!=null&&t.toUpperCase().includes("LINUX")?"linux":"unknown"}static isUserAgent(t){return this.userAgent===t}static isPlatform(t){return this.platform===t}static open(t,r="_blank"){this.window.open(t,r)}}const xt=[.25,.5,.75,1,2,4,8];class Ln{static getKeyboardShortcutsHelpMenuGroup(){let t=(...o)=>o.join(" + "),r="shift".toUpperCase(),i="ctrl".toUpperCase();return{name:"Playback function shortcuts",items:[{description:"Play / Pause",name:t("Space")},{description:"Toggle Sound",name:t("s")},{description:"Toggle Text On / Off",name:t("d")},{description:"Toggle Full Screen",name:t("f")},{description:"Increase Volume",name:t(r,"\\")},{description:"Reduce Volume",name:t("\\")},{description:"One Frame Forward",name:t("Right Arrow")},{description:"One Frame Backward",name:t("Left Arrow")},{description:"10 Frames Forward",name:t(r,"Right Arrow")},{description:"10 Frames Backwards",name:t(r,"Left Arrow")},{description:"Stop shuttle and pause",name:t("k")},{description:"Decrease Shuttle Forwards",name:t("l")},{description:"Increase Shuttle Forwards",name:t(r,"l")},{description:"Set playhead to Start of Media and Stop",name:t("1 / Home")},{description:"Set playhead to End of Media and Stop",name:t(i,"1")+" / End"}]}}static handleKeyboardEvent(t,r){const i=t.target,n=["INPUT","TEXTAREA","OMAKASE-MARKER-LIST"],o=mp.userAgent;if(n.includes(i.tagName.toUpperCase()))return!1;if(r&&r.video){if(t.code==="Space"&&(o!=="safari"||!r.video.isFullscreen()))return r.video.togglePlayPause(),!0;if(t.code==="KeyS"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey)return r.audio.toggleAudioOutputMuteUnmute(),!0;if(t.code==="Backslash"){let a=10,u=t.shiftKey?1:-1,s=r.audio.getAudioOutputVolume()*100+a*u;s>=100?s=100:s<=0&&(s=0),r.audio.setAudioOutputVolume(s/100)}if(t.code==="KeyD"&&!(t.ctrlKey&&t.shiftKey&&t.metaKey))return r.subtitles.toggleShowHideActiveTrack(),!0;if(t.code==="KeyK"&&!t.ctrlKey&&!t.shiftKey&&!t.metaKey&&(r.video.setPlaybackRate(1),r.video.pause()),t.code==="KeyL"&&!t.ctrlKey&&!t.metaKey){let a=t.shiftKey?1:-1;const u=xt.indexOf(r.video.getPlaybackRate())+a;let s;return u<0?s=xt.at(0):u>=xt.length?s=xt.at(-1):s=xt.at(u),r.video.setPlaybackRate(s),r.video.isPaused()&&r.video.play(),!0}if(r.video.isVideoLoaded()){if(["ArrowLeft","ArrowRight"].includes(t.key)&&!t.metaKey&&!t.altKey){let a=t.key==="ArrowRight"?1:-1,u=t.shiftKey?10:1;return r.video.isPlaying()&&r.video.pause(),r.video.seekFromCurrentFrame(u*a),!0}if(t.code==="Digit1"&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&!t.altKey||t.code==="Home")return r.video.pause().subscribe(()=>r.video.seekToFrame(0)),!0;if(t.code==="Digit1"&&t.ctrlKey||t.code==="End")return r.video.isPlaying()?r.video.pause().subscribe(()=>r.video.seekToEnd()):r.video.seekToEnd(),!0}if(t.code==="KeyF"&&!t.ctrlKey&&!t.shiftKey&&!t.metaKey)return r.video.toggleFullscreen(),!0}return!1}}const P0=$.memo(function({videoUrl:t,config:r,videoLoadOptions:i,onVideoLoadedCallback:n,enableHotkeys:o}){return r&&(r==null?void 0:r.playerHTMLElementId)===void 0&&(r.playerHTMLElementId="omakase-player"),$.useEffect(()=>{var s,c;let a=new V.OmakasePlayer(r);const u=l=>{Ln.handleKeyboardEvent(l,a)&&(l.stopPropagation(),l.preventDefault())};return(o===void 0||o)&&((s=document.querySelector("media-controller"))==null||s.setAttribute("nohotkeys",""),(c=document.querySelector("media-controller"))==null||c.setAttribute("tabindex","-1"),window.addEventListener("keydown",u),a.chroming.appendHelpMenuGroup(Ln.getKeyboardShortcutsHelpMenuGroup())),a.loadVideo(t,i).subscribe({next:l=>{n&&n(a,l)}}),()=>{(o===void 0||o)&&window.removeEventListener("keydown",u)}},[t]),$.createElement("div",{id:r.playerHTMLElementId})}),A0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M10.5675 21C10.2375 21 9.9675 20.73 9.9675 20.4V16.7925L5.6325 12.3675L9.9675 8.235V3.6C9.9675 3.27 10.2375 3 10.5675 3C10.8975 3 11.1675 3.27 11.1675 3.6V8.7525L7.3425 12.3975L11.1675 16.305V20.4C11.1675 20.73 10.8975 21 10.5675 21Z",fill:"currentColor"}),$.createElement("path",{d:"M17.7675 17.145C17.61 17.145 17.46 17.085 17.34 16.965L12.8325 12.3675L17.355 8.0625C17.595 7.8375 17.9775 7.845 18.2025 8.085C18.4275 8.325 18.42 8.7075 18.18 8.9325L14.5425 12.3975L18.195 16.125C18.4275 16.365 18.42 16.74 18.1875 16.9725C18.075 17.085 17.9175 17.145 17.7675 17.145Z",fill:"currentColor"})),L0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M13.4325 21C13.7625 21 14.0325 20.73 14.0325 20.4V16.7925L18.3675 12.3675L14.0325 8.235V3.6C14.0325 3.27 13.7625 3 13.4325 3C13.1025 3 12.8325 3.27 12.8325 3.6V8.7525L16.6575 12.3975L12.8325 16.305V20.4C12.8325 20.73 13.1025 21 13.4325 21Z",fill:"currentColor"}),$.createElement("path",{d:"M6.2325 17.145C6.39 17.145 6.54 17.085 6.66 16.965L11.1675 12.3675L6.645 8.0625C6.405 7.8375 6.0225 7.845 5.7975 8.085C5.5725 8.325 5.58 8.7075 5.82 8.9325L9.4575 12.3975L5.805 16.125C5.5725 16.365 5.58 16.74 5.8125 16.9725C5.925 17.085 6.0825 17.145 6.2325 17.145Z",fill:"currentColor"})),C0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M14.1675 21C13.8375 21 13.5675 20.73 13.5675 20.4V16.7925L9.2325 12.3675L13.5675 8.235V3.6C13.5675 3.27 13.8375 3 14.1675 3C14.4975 3 14.7675 3.27 14.7675 3.6V8.7525L10.9425 12.3975L14.7675 16.305V20.4C14.7675 20.73 14.4975 21 14.1675 21Z",fill:"currentColor"})),Z0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M9.8325 21C10.1625 21 10.4325 20.73 10.4325 20.4V16.7925L14.7675 12.3675L10.4325 8.235V3.6C10.4325 3.27 10.1625 3 9.8325 3C9.5025 3 9.2325 3.27 9.2325 3.6V8.7525L13.0575 12.3975L9.2325 16.305V20.4C9.2325 20.73 9.5025 21 9.8325 21Z",fill:"currentColor"})),M0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M11.3475 3H5.775V21L11.3475 17.0475V3Z",fill:"currentColor"}),$.createElement("path",{d:"M18.225 21L12.6525 17.0475V3H18.225V21ZM13.7775 16.47L17.1 18.825V4.125H13.7775V16.47Z",fill:"currentColor"})),R0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M4.6875 3V21L8.0625 17.0475L11.4375 21V3H4.6875Z",fill:"currentColor"}),$.createElement("path",{d:"M12.5625 3V21L15.9375 17.0475L19.3125 21V3H12.5625Z",fill:"currentColor"})),F0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M6.39001 3V21L12 17.0175L17.61 21V3H6.38251H6.39001ZM16.44 3.84L7.23001 18.7125V3.84H16.44ZM12 15.9975L8.25751 18.6525L16.77 4.89V19.3725L12 15.9825V15.9975Z",fill:"currentColor"})),V0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M12.3075 8.0175L14.4525 5.8725C14.6175 5.7075 14.6175 5.43 14.4525 5.265L12.3 3.12C12.135 2.955 11.8575 2.955 11.6925 3.12C11.5275 3.285 11.5275 3.5625 11.6925 3.7275L13.1025 5.1375H6.64499C5.22749 5.1375 4.07249 6.2925 4.07249 7.71V16.2825C4.07249 17.7 5.22749 18.855 6.64499 18.855C6.87749 18.855 7.07249 18.66 7.07249 18.4275C7.07249 18.195 6.87749 18 6.64499 18C5.69249 18 4.93499 17.2275 4.93499 16.29V7.7175C4.93499 6.765 5.70749 6.0075 6.64499 6.0075H13.11L11.7 7.4175C11.535 7.5825 11.535 7.86 11.7 8.025C11.865 8.19 12.1425 8.19 12.3075 8.025V8.0175Z",fill:"currentColor"}),$.createElement("path",{d:"M17.355 18.8625C18.7725 18.8625 19.9275 17.7075 19.9275 16.29V7.7175C19.9275 6.3 18.7725 5.145 17.355 5.145C17.1225 5.145 16.9275 5.34 16.9275 5.5725C16.9275 5.805 17.1225 6 17.355 6C18.3075 6 19.065 6.7725 19.065 7.71V16.2825C19.065 17.235 18.2925 17.9925 17.355 17.9925H10.89L12.3075 16.5825C12.3825 16.5075 12.435 16.395 12.435 16.2825C12.435 16.17 12.3975 16.0575 12.3075 15.9825C12.15 15.8175 11.8575 15.825 11.7 15.9825L9.52501 18.1575V18.18C9.45751 18.255 9.42751 18.345 9.42751 18.435C9.42751 18.555 9.46501 18.66 9.55501 18.735L11.7 20.88C11.8575 21.045 12.15 21.045 12.3075 20.88C12.4725 20.715 12.4725 20.4375 12.3075 20.2725L10.89 18.8625H17.355Z",fill:"currentColor"})),B0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("g",{clipPath:"url(#clip0_3377_237)"},$.createElement("path",{d:"M13.02 19.95C17.42 19.95 21 16.37 21 11.97C21 7.57 17.42 4 13.02 4C8.88 4 5.39 7.24 5.08 11.37L5.02 12.14L3.56 10.68C3.49 10.61 3.41 10.58 3.33 10.58C3.25 10.58 3.17 10.61 3.1 10.68C3.03 10.75 3 10.83 3 10.92C3 11 3.03 11.08 3.1 11.15L5.22 13.27C5.35 13.4 5.55 13.43 5.65 13.3L7.8 11.15C7.87 11.08 7.9 11 7.9 10.92C7.9 10.84 7.86 10.76 7.8 10.69C7.73 10.62 7.65 10.59 7.57 10.59C7.49 10.59 7.41 10.62 7.34 10.69L5.9 12.13L6.03 11.11C6.45 7.57 9.46 4.91 13.02 4.91C16.91 4.91 20.08 8.08 20.08 11.97C20.08 15.86 16.91 19.03 13.02 19.03C12.77 19.03 12.56 19.24 12.56 19.49C12.56 19.74 12.77 19.95 13.02 19.95Z",fill:"currentColor"}),$.createElement("path",{d:"M14.95 13.19C14.95 13.72 14.75 14.14 14.36 14.45C13.97 14.76 13.43 14.91 12.75 14.91C12.16 14.91 11.69 14.81 11.32 14.62V13.53C11.7 13.81 12.14 13.95 12.65 13.95C12.98 13.95 13.23 13.88 13.41 13.74C13.59 13.6 13.67 13.41 13.67 13.17C13.67 12.93 13.56 12.72 13.34 12.58C13.12 12.44 12.82 12.37 12.43 12.37H11.92V11.41H12.39C13.13 11.41 13.5 11.16 13.5 10.67C13.5 10.21 13.22 9.98 12.65 9.98C12.26 9.98 11.89 10.1 11.54 10.35V9.33C11.93 9.13 12.4 9.03 12.94 9.03C13.48 9.03 13.94 9.16 14.28 9.41C14.62 9.66 14.79 10.01 14.79 10.44C14.79 11.19 14.41 11.65 13.66 11.84V11.86C14.06 11.91 14.37 12.05 14.61 12.29C14.85 12.53 14.96 12.83 14.96 13.19H14.95Z",fill:"currentColor"})),$.createElement("defs",null,$.createElement("clipPath",{id:"clip0_3377_237"},$.createElement("rect",{width:"18",height:"15.95",fill:"white",transform:"translate(3 4)"})))),K0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("g",{clipPath:"url(#clip0_3377_260)"},$.createElement("path",{d:"M10.98 19.95C6.58 19.95 3 16.37 3 11.98C3 7.58 6.58 4 10.98 4C15.12 4 18.61 7.24 18.93 11.37L18.99 12.14L20.45 10.68C20.52 10.61 20.6 10.58 20.68 10.58C20.76 10.58 20.84 10.61 20.91 10.68C20.98 10.75 21.01 10.83 21.01 10.91C21.01 10.99 20.98 11.07 20.91 11.14L18.79 13.26C18.66 13.39 18.46 13.42 18.36 13.29L16.21 11.14C16.14 11.07 16.11 10.99 16.11 10.91C16.11 10.83 16.15 10.75 16.21 10.68C16.28 10.61 16.36 10.58 16.44 10.58C16.52 10.58 16.6 10.61 16.67 10.68L18.11 12.12L17.98 11.1C17.55 7.57 14.54 4.91 10.98 4.91C7.09 4.91 3.92 8.08 3.92 11.97C3.92 15.86 7.09 19.03 10.98 19.03C11.23 19.03 11.44 19.24 11.44 19.49C11.44 19.74 11.23 19.95 10.98 19.95Z",fill:"currentColor"}),$.createElement("path",{d:"M12.91 13.19C12.91 13.72 12.71 14.14 12.32 14.45C11.93 14.76 11.39 14.91 10.71 14.91C10.12 14.91 9.65 14.81 9.28 14.62V13.53C9.66 13.81 10.1 13.95 10.61 13.95C10.94 13.95 11.19 13.88 11.37 13.74C11.55 13.6 11.63 13.41 11.63 13.17C11.63 12.93 11.52 12.72 11.3 12.58C11.08 12.44 10.78 12.37 10.39 12.37H9.88V11.41H10.35C11.09 11.41 11.46 11.16 11.46 10.67C11.46 10.21 11.18 9.98 10.61 9.98C10.22 9.98 9.85 10.1 9.5 10.35V9.33C9.89 9.13 10.36 9.03 10.9 9.03C11.44 9.03 11.9 9.16 12.24 9.41C12.58 9.66 12.75 10.01 12.75 10.44C12.75 11.19 12.37 11.65 11.62 11.84V11.86C12.02 11.91 12.33 12.05 12.57 12.29C12.81 12.53 12.92 12.83 12.92 13.19H12.91Z",fill:"currentColor"})),$.createElement("defs",null,$.createElement("clipPath",{id:"clip0_3377_260"},$.createElement("rect",{width:"18",height:"15.95",fill:"white",transform:"translate(3 4)"})))),ve=({Icon:e,onClick:t,width:r,height:i,text:n,disabled:o})=>$.createElement("button",{disabled:o,onClick:t},$.createElement(e,{width:r,height:i})," ",n),J0=({width:e,height:t})=>$.createElement("svg",{width:e??24,height:t??24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("path",{d:"M12.6525 17.0475L18.225 21V3H12.6525V17.0475Z",fill:"currentColor"}),$.createElement("path",{d:"M5.775 3H11.3475V17.0475L5.775 21V3ZM10.2225 4.125H6.9V18.825L10.2225 16.47V4.125Z",fill:"currentColor"})),G0=({width:e,height:t})=>$.createElement("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$.createElement("rect",{x:"0.5",y:"0.5",width:"13",height:"13",rx:"2.5",stroke:"currentColor"}),$.createElement("path",{d:"M7.16667 6.33333V6.83333H7.66667H10.3333C10.4257 6.83333 10.5 6.90769 10.5 7C10.5 7.09231 10.4257 7.16667 10.3333 7.16667H7.66667H7.16667V7.66667V10.3333C7.16667 10.4257 7.09231 10.5 7 10.5C6.90769 10.5 6.83333 10.4257 6.83333 10.3333V7.66667V7.16667H6.33333H3.66667C3.57468 7.16667 3.5 7.09199 3.5 7C3.5 6.90801 3.57468 6.83333 3.66667 6.83333H6.33333H6.83333V6.33333V3.66667C6.83333 3.57468 6.90801 3.5 7 3.5C7.09199 3.5 7.16667 3.57468 7.16667 3.66667V6.33333Z",fill:"currentColor",stroke:"currentColor"}));function Se(e){e.next(),e.complete()}class q0{constructor(){k(this,"actionMarkerInOut");k(this,"actionMarkerSplit");k(this,"actionMarkerDelete");k(this,"actionPreviousMarkerToggle");k(this,"actionNextMarkerToggle");k(this,"actionSetMarkerStartToPlayhead");k(this,"actionSetMarkerEndToPlayhead");k(this,"actionSetPlayheadToMarkerStart");k(this,"actionSetPlayheadToMarkerEnd");k(this,"actionRewind3SecondsAndPlayToCurrent");k(this,"actionPlay3SecondsAndRewindToCurrent");k(this,"actionLoopActiveMarker")}getKeyboardShortcutsHelpMenuGroup(){let t=(...a)=>a.join(" + "),r="shift".toUpperCase();const i=mp.platform;let n=i==="windows"?"win":i==="linux"?"super":"cmd";return{name:"Segmentation function shortcuts",items:[{description:"Mark In / Out",name:t("m")},{description:"Split Active Marker",name:t(".")},{description:"Delete Active Marker",name:t("n")},{description:"Toggle Previous Marker",name:t("/")},{description:"Toggle Next Marker",name:t(r,"/")},{description:"Set Start of Active Marker to Playhead Position",name:t("i")},{description:"Set End of Active Marker to Playhead Position",name:t("o")},{description:"Set Playhead to Start of Active Marker",name:t("[")},{description:"Set Playhead to End of Active Marker",name:t("]")},{description:"Rewind 3 Seconds and Play to Current Playhead",name:t(n,"Arrow Left")},{description:"Play 3 Seconds and Rewind to Current Playhead",name:t(n,"Arrow Right")},{description:"Loop on Active Marker",name:t("p")}]}}handleKeyboardEvent(t,r){const i=t.target;return["INPUT","TEXTAREA","OMAKASE-MARKER-LIST"].includes(i.tagName.toUpperCase())?!1:t.code==="KeyM"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionMarkerInOut&&this.actionMarkerInOut(),!0):t.code==="Period"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionMarkerSplit&&this.actionMarkerSplit(),!0):t.code==="KeyN"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionMarkerDelete&&this.actionMarkerDelete(),!0):t.code==="Slash"&&!t.ctrlKey&&!t.metaKey?(t.shiftKey?this.actionNextMarkerToggle&&this.actionNextMarkerToggle():this.actionPreviousMarkerToggle&&this.actionPreviousMarkerToggle(),!0):t.code==="KeyI"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionSetMarkerStartToPlayhead&&this.actionSetMarkerStartToPlayhead(),!0):t.code==="KeyO"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionSetMarkerEndToPlayhead&&this.actionSetMarkerEndToPlayhead(),!0):t.code==="BracketLeft"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionSetPlayheadToMarkerStart&&this.actionSetPlayheadToMarkerStart(),!0):t.code==="BracketRight"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionSetPlayheadToMarkerEnd&&this.actionSetPlayheadToMarkerEnd(),!0):t.code==="ArrowLeft"&&!t.shiftKey&&!t.ctrlKey&&t.metaKey?(this.actionRewind3SecondsAndPlayToCurrent&&this.actionRewind3SecondsAndPlayToCurrent(),!0):t.code==="ArrowRight"&&!t.shiftKey&&!t.ctrlKey&&t.metaKey?(this.actionPlay3SecondsAndRewindToCurrent&&this.actionPlay3SecondsAndRewindToCurrent(),!0):t.code==="KeyP"&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey?(this.actionLoopActiveMarker&&this.actionLoopActiveMarker(),!0):!1}}const Tt=(e,t,r)=>e.getMarkers().reduce((i,n)=>{if(t.id===n.id)return i;if(n instanceof V.PeriodMarker&&n.timeObservation.start!=null&&n.timeObservation.end!=null){const o=t.timeObservation,a=n.timeObservation.start,u=n.timeObservation.end,s=(r==null?void 0:r.start)??o.start,c=(r==null?void 0:r.end)??o.end;if(Number.isFinite(s)&&Number.isFinite(c))return i||s<=u&&c>=a;if(Number.isFinite(s))return i||s>=a&&s<=u;if(Number.isFinite(c))return i||c>=a&&c<=u}return i},!1);function pn(e,t,r){if(!e||!(e instanceof V.PeriodMarker)||!r.video.isVideoLoaded())return!0;const i=e.timeObservation.start,n=e.timeObservation.end;if(i==null||n==null)return!0;const o=r.video.calculateTimeToFrame(n),a=r.video.calculateTimeToFrame(i),u=r.video.getCurrentFrame();return t<i||o-u<2||u-a<1}function hn(e){return!(e.timeObservation.start==null||e.timeObservation.end==null)}const W0=({selectedMarker:e,omakasePlayer:t,enableHotKeys:r,segmentationLanes:i,setSegmentationLanes:n,setSelectedMarker:o,onMarkerClickCallback:a,setSource:u,source:s,constants:c})=>{const l=$.useRef(void 0),d=$.useRef(void 0),f=$.useRef(new He),m=$.useRef(!1),h=S=>{if(z===void 0||!t.video.isVideoLoaded())return!0;const x=z.timeObservation.start,j=S??t.video.getCurrentTime();return!!(x==null||x>=j||Tt(s,z,{end:j}))},p=S=>{if(z!==void 0||s===void 0||!t.video.isVideoLoaded())return!0;const x=S??t.video.getCurrentTime(),j=t.video.calculateTimeToFrame(x);if(j+1>t.video.getTotalFrames())return!0;const W=new V.PeriodMarker({timeObservation:{start:t.video.calculateFrameToTime(j),end:t.video.calculateFrameToTime(j+2)}});return Tt(s,W)},[v,w]=$.useState(void 0),[E,T]=$.useState(pn(e,t.video.getCurrentTime(),t)),[z,M]=$.useState(void 0),[R,Q]=$.useState(h()),[te,Y]=$.useState(p()),Te=S=>{if(S===void 0||s===void 0||!(S instanceof V.PeriodMarker))return!0;const x=Tt(s,S,{start:t.video.getCurrentTime()});if(x)return x;if(S instanceof V.PeriodMarker){const j=S.timeObservation.end;if(j!=null&&t.video.getCurrentTime()>=j)return!0}return!1},ue=S=>{if(S===void 0||s===void 0||!(S instanceof V.PeriodMarker))return!0;const x=Tt(s,S,{end:t.video.getCurrentTime()});if(x)return x;if(S instanceof V.PeriodMarker){if(S.timeObservation.end==null)return!0;const j=S.timeObservation.start;if(j!=null&&t.video.getCurrentTime()<=j)return!0}return!1},[We,Ae]=$.useState(Te(e)),[it,ee]=$.useState(ue(e));$.useEffect(()=>{if(Q(()=>h()),Y(()=>p()),z&&z!==e){const S=i.find(x=>x.getMarker(z.id));S==null||S.removeMarker(z.id),M(void 0)}},[e,z,i,M]),$.useEffect(()=>()=>Se(f.current),[]),$.useEffect(()=>{if(Ae(Te(e)),ee(ue(e)),e){const S=pn(e,t.video.getCurrentTime(),t);T(S);const x=t.video.onVideoTimeChange$.pipe(ie(f.current)).subscribe({next:j=>{T(W=>pn(e,j.currentTime,t)),Ae(()=>Te(e)),ee(()=>ue(e))}});return()=>x.unsubscribe()}},[e]),$.useEffect(()=>{t.video.onSeeking$.pipe(ie(f.current)).subscribe({next:x=>{Q(()=>h(x.toTime)),Y(()=>p(x.toTime))}});const S=t.video.onVideoTimeChange$.pipe(ie(f.current)).subscribe({next:x=>{Q(()=>h()),Y(()=>p())}});return()=>S.unsubscribe()},[z,s]),$.useEffect(()=>{const S=i.map(x=>x.onMarkerUpdate$.pipe(ie(f.current)).subscribe({next:j=>{(e==null?void 0:e.id)===j.marker.id&&(T(W=>pn(e,t.video.getCurrentTime(),t)),Ae(()=>Te(e)),ee(()=>ue(e)))}}));return()=>S.forEach(x=>x.unsubscribe())},[i,e]),$.useEffect(()=>{v&&(v.marker.style={...v.marker.style,color:v.color},v.marker.timeObservation={...v.marker.timeObservation},w(void 0))},[e]),$.useEffect(()=>{if(s){Q(()=>h()),Y(()=>p());const S=s.onMarkerDelete$.pipe(ie(f.current)).subscribe({next:j=>{const W=j.marker;w(K=>{if((K==null?void 0:K.marker.id)!==W.id)return K}),o(K=>{if((K==null?void 0:K.id)!==W.id)return K}),M(K=>{if((K==null?void 0:K.id)!==W.id)return K}),Q(()=>h()),Y(()=>p())}}),x=s.onMarkerUpdate$.pipe(ie(f.current)).subscribe({next:()=>{Q(()=>h()),Y(()=>p())}});return()=>{S.unsubscribe(),x.unsubscribe()}}},[s]);const F=(S,x)=>{if(x===void 0)return;const j=x.timeObservation;S.video.seekToTime(j.start)},ba=(S,x)=>{if(x===void 0)return;const j=x.timeObservation;S.video.seekToTime(j.end)},_a=(S,x)=>{x instanceof V.PeriodMarker&&x.timeObservation.start!==void 0&&(x.timeObservation={...x.timeObservation,start:S.video.getCurrentTime()})},ya=(S,x)=>{x instanceof V.PeriodMarker&&x.timeObservation.end!==void 0&&(x.timeObservation={...x.timeObservation,end:S.video.getCurrentTime()})},$a=(S,x)=>{l.current&&Se(l.current),l.current=new He,S.video.pause();const j=S.video.getCurrentFrame(),W=S.video.getFrameRate(),K=j-x*W,Le=K>=0?K:0;S.video.seekToFrame(Le).pipe(at()).subscribe(()=>{}),S.video.play(),S.video.onVideoTimeChange$.pipe(ie(l.current),ie(f.current)).subscribe(un=>{un.frame>=j-1&&(S.video.pause().subscribe(()=>{S.video.seekToFrame(j).pipe(at()).subscribe(()=>{})}),Se(l.current))})},wa=(S,x)=>{l.current&&Se(l.current),l.current=new He,d.current&&Se(d.current),d.current=new He;const j=S.video.getCurrentFrame(),W=S.video.getFrameRate(),K=j+x*W;S.video.play(),S.video.onVideoTimeChange$.pipe(ie(l.current),ie(f.current)).subscribe(Le=>{Le.frame>=K-1&&(S.video.pause().subscribe(()=>{S.video.seekToFrame(j).pipe(at()).subscribe(()=>{})}),Se(l.current))}),S.video.onEnded$.pipe(ie(d.current),ie(f.current)).subscribe(Le=>{setTimeout(()=>{S.video.seekToFrame(j).pipe(at()).subscribe(()=>{})},1),Se(d.current)})},Lr=S=>{s.removeMarker(S.id),(z==null?void 0:z.id)===S.id&&M(void 0)},Sa=(S,x)=>{if(!(x instanceof V.PeriodMarker))return;const j=x.timeObservation.start,W=x.timeObservation.end,K=S.video.getCurrentTime();if(j==null||W==null)return;const Le=j,un=K,hp=un+1/S.video.getFrameRate(),gp=W;Lr(x);const Cr=new V.PeriodMarker({style:c.PERIOD_MARKER_STYLE,timeObservation:{start:Le,end:un},editable:!0});Cr.onClick$.subscribe({next:()=>a(Cr)});const kt=new V.PeriodMarker({style:c.HIGHLIGHTED_PERIOD_MARKER_STYLE,timeObservation:{start:hp,end:gp},editable:!0});kt.onClick$.subscribe({next:()=>a(kt)}),s.addMarker(Cr),s.addMarker(kt),a(kt),setTimeout(()=>{w({marker:kt,color:c.PERIOD_MARKER_STYLE.color})},0)},ka=()=>{const S=t.video.getCurrentTime(),x=new V.PeriodMarker({timeObservation:{start:S},style:c.PERIOD_MARKER_STYLE,editable:!0});x.onClick$.subscribe({next:()=>a(x)}),s.addMarker(x),M(x),Q(h()),a(x)},Ia=()=>{const S=t.video.getCurrentTime();z.timeObservation={...z.timeObservation,end:S},M(void 0)},xa=S=>{l.current&&Se(l.current),l.current=new He,d.current&&Se(d.current),d.current=new He;const x=t.video.calculateTimeToFrame(S.timeObservation.start),j=t.video.calculateTimeToFrame(S.timeObservation.end);t.video.pause(),t.video.seekToFrame(x),t.video.play(),t.video.onVideoTimeChange$.pipe(ie(l.current),ie(f.current)).subscribe(W=>{W.frame>=j-1&&(t.video.pause().subscribe(()=>{t.video.seekToFrame(x).pipe(at()).subscribe(()=>{})}),Se(l.current))}),t.video.onEnded$.pipe(ie(d.current),ie(f.current)).subscribe(W=>{setTimeout(()=>{t.video.seekToFrame(x).pipe(at()).subscribe(()=>{})},1),Se(d.current)})},pp=()=>{const S=i.length,x=`Segmentation ${i.length+1}`,j=new V.MarkerLane({style:c.TIMELINE_LANE_STYLE,description:x});j.onMarkerUpdate$.pipe(ie(f.current)).subscribe({next:W=>{Tt(j,W.marker)&&(W.marker.timeObservation=W.oldValue.timeObservation)}}),t.timeline.addTimelineLaneAtIndex(j,S+1),n([...i,j]),a(void 0),u(j)},Ta=S=>{if(!s)return;const x=s.getMarkers().filter(K=>K instanceof V.PeriodMarker).sort((K,Le)=>(K.timeObservation.start??0)-(Le.timeObservation.start??0));if(e===void 0){a(x.at(0));return}const W=x.findIndex(K=>K.id===e.id)+(S?-1:1);W>=0&&W<x.length&&a(x.at(W))};return $.useEffect(()=>{if(!r)return;const S=new q0;S.actionLoopActiveMarker=()=>e instanceof V.PeriodMarker&&hn(e)&&xa(e),S.actionSetPlayheadToMarkerStart=()=>e&&F(t,e),S.actionSetPlayheadToMarkerEnd=()=>e&&e instanceof V.PeriodMarker&&hn(e)&&ba(t,e),S.actionSetMarkerStartToPlayhead=()=>!We&&_a(t,e),S.actionSetMarkerEndToPlayhead=()=>!it&&ya(t,e),S.actionMarkerSplit=()=>!E&&Sa(t,e),S.actionMarkerDelete=()=>e&&Lr(e),S.actionMarkerInOut=()=>{z===void 0?!te&&ka():!R&&Ia()},S.actionPlay3SecondsAndRewindToCurrent=()=>wa(t,3),S.actionRewind3SecondsAndPlayToCurrent=()=>$a(t,3),S.actionNextMarkerToggle=()=>Ta(!1),S.actionPreviousMarkerToggle=()=>Ta(!0);const x=j=>{S.handleKeyboardEvent(j,t)&&(j.stopPropagation(),j.preventDefault())};return window.addEventListener("keydown",x),m.current||(t.chroming.appendHelpMenuGroup(S.getKeyboardShortcutsHelpMenuGroup()),m.current=!0),()=>window.removeEventListener("keydown",x)}),$.createElement("div",{className:"omakase-player-timeline-controls-toolbar"},$.createElement("div",{className:"omakase-player-timeline-controls-toolbar-control-panel"},$.createElement(ve,{Icon:A0,onClick:()=>F(t,e),disabled:e===void 0}),$.createElement(ve,{Icon:L0,onClick:()=>ba(t,e),disabled:e===void 0||e instanceof V.PeriodMarker&&!hn(e)}),$.createElement(ve,{Icon:C0,onClick:()=>_a(t,e),disabled:We}),$.createElement(ve,{Icon:Z0,onClick:()=>ya(t,e),disabled:it}),z===void 0?$.createElement(ve,{Icon:M0,onClick:ka,disabled:te}):$.createElement(ve,{Icon:J0,onClick:Ia,disabled:R}),$.createElement(ve,{Icon:F0,onClick:()=>Lr(e),disabled:e===void 0}),$.createElement(ve,{Icon:R0,onClick:()=>Sa(t,e),disabled:E||e===void 0}),$.createElement(ve,{Icon:V0,onClick:()=>xa(e),disabled:!(e instanceof V.PeriodMarker&&hn(e))}),$.createElement(ve,{Icon:B0,onClick:()=>$a(t,3)}),$.createElement(ve,{Icon:K0,onClick:()=>wa(t,3)})),$.createElement("div",{className:"omakase-player-timeline-controls-toolbar-control-panel"},$.createElement("div",{className:"segmentation-button-wrapper"},$.createElement(ve,{Icon:G0,text:"NEW SEGMENTATION",onClick:()=>pp(),disabled:i.length>=3}))))},H0=$.memo(function({flow:t,subflows:r,flowsSegments:i,onVideoLoadedCallback:n,config:o,timerange:a,videoLoadOptions:u,enableHotkeys:s}){return o&&(o==null?void 0:o.playerHTMLElementId)===void 0&&(o.playerHTMLElementId="omakase-player"),$.useEffect(()=>{var d,f;let c=new Jm(o);const l=m=>{Ln.handleKeyboardEvent(m,c)&&(m.stopPropagation(),m.preventDefault())};return(s===void 0||s)&&((d=document.querySelector("media-controller"))==null||d.setAttribute("nohotkeys",""),(f=document.querySelector("media-controller"))==null||f.setAttribute("tabindex","-1"),window.addEventListener("keydown",l),c.video.appendHelpMenuGroup(Ln.getKeyboardShortcutsHelpMenuGroup())),c.loadVideo({flow:t,subflows:r,flowsSegments:i},u).subscribe({next:m=>{n&&n(c,m)}}),()=>{(s===void 0||s)&&window.removeEventListener("keydown",l)}},[t,a]),$.createElement("div",{id:o.playerHTMLElementId})});function X0(e){const t=Math.round(e/60)*60,r=new Date(t*1e3);return`${r.getUTCHours()}h ${r.getUTCMinutes()}min`}function Y0(e){const t=Math.round(e/60)*60,r=Math.floor(t/86400),i=new Date(t*1e3);return r>=1?`${r}d ${i.getUTCHours()}h ${i.getUTCMinutes()}min`:`${i.getUTCHours()}h ${i.getUTCMinutes()}min`}const Q0=`
|
|
104
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
|
-
`,
|
|
270
|
+
`,e_=`
|
|
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
|
-
`,
|
|
294
|
+
`,t_=`
|
|
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
|
-
`,q={container:"omakase-time-range-selector-container",segments:"omakase-time-range-selector-segments",segment:"omakase-time-range-selector-segment",segmentMarker:"omakase-time-range-selector-segment-marker",segmentTick:"omakase-time-range-selector-segment-tick",segmentLabel:"omakase-time-range-selector-segment-label",firstSegmentLabel:"omakase-time-range-selector-segment-first-label",secondSegmentLabel:"omakase-time-range-selector-segment-second-label",rangeSelector:"omakase-time-range-selector-range-selector",rangeSelectorHandle:"omakase-time-range-selector-range-selector-handle",rangeSelectorDuration:"omakase-time-range-selector-range-selector-duration",buttonContainer:"omakase-time-range-selector-button-container",invisible:"omakase-time-range-selector-invisible",dragging:"omakase-time-range-selector-dragging"},gn={leftHandle:"omakase-time-range-selector-range-selector-left-handle",rightHandle:"omakase-time-range-selector-range-selector-right-handle",rangeDuration:"omakase-time-range-selector-range-selector-range-duration",segments:"omakase-time-range-selector-segments"};class mi extends HTMLElement{constructor(){super();k(this,"_container");k(this,"_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",Y0);k(this,"durationLabelFormatter",Q0);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(q.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),c=Math.round(o+i/r*(a-o)),s=Math.round(o+(i+n)/r*(a-o));return{start:c,end:s}});k(this,"getSelectorBounds",(r,i)=>{const{wrapperWidth:n}=this.getBounds(),o=this._labels.at(this.firstLabelIndex),a=this._labels.at(this.lastLabelIndex),c=Math.round((r-o)/(a-o)*n),s=Math.round((i-r)/(a-o)*n);return{selectorLeft:c,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(q.invisible)});k(this,"hideButtons",()=>{this._buttonContainer.classList.add(q.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 c=null,s=null;const u=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?c===null&&(c=v,s=window.setTimeout(()=>{this.outOfBoundsCallback(!0),s=window.setInterval(()=>this.outOfBoundsCallback(!0),400)},500)):(s!==null&&(clearTimeout(s),clearInterval(s),s=null),c=null),m=Math.min(m,g),this._rangeSelector.style.width=`${m}px`,this.updateDuration()},l=()=>{this.showButtons(),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",l),s!==null&&(clearTimeout(s),clearInterval(s),s=null),c=null};document.addEventListener("mousemove",u),document.addEventListener("mouseup",l)});k(this,"onMouseDownLeft",r=>{r.preventDefault();const i=r.clientX,{selectorLeft:n,selectorWidth:o,wrapperWidth:a}=this.getBounds();let c=null,s=null;const u=d=>{let f=d.clientX-i,m=n+f;const g=m<0,p=performance.now();g?c===null&&(c=p,s=window.setTimeout(()=>{this.outOfBoundsCallback(!1),s=window.setInterval(()=>this.outOfBoundsCallback(!1),400)},500)):(s!==null&&(clearTimeout(s),clearInterval(s),s=null),c=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",u),document.removeEventListener("mouseup",l),s!==null&&(clearTimeout(s),clearInterval(s),s=null),c=null};document.addEventListener("mousemove",u),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(q.rangeSelectorHandle))return;r.preventDefault(),this._rangeSelector.classList.add(q.dragging);const i=r.clientX,{selectorLeft:n,selectorWidth:o,wrapperWidth:a}=this.getBounds();let c=null,s=null;const u=d=>{let f=d.clientX-i,m=n+f;const g=a-o,p=m<0||m>g,v=performance.now();if(p){if(c===null){const w=m>g;c=v,s=window.setTimeout(()=>{this.outOfBoundsCallback(w),s=window.setInterval(()=>this.outOfBoundsCallback(w),400)},500)}}else s!==null&&(clearTimeout(s),clearInterval(s),s=null),c=null;m=Math.max(0,Math.min(m,g)),this._rangeSelector.style.left=`${m}px`,this.updateDuration()},l=()=>{this._rangeSelector.classList.remove(q.dragging),this.showButtons(),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",l),s!==null&&(clearTimeout(s),clearInterval(s))};document.addEventListener("mousemove",u),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(q.container);const o=document.createElement("style");o.textContent=ey,this._container.append(o),this._buttonContainer=document.createElement("div"),this._buttonContainer.classList.add(q.buttonContainer,q.invisible);const a=this.createButtonSvg(ty),c=this.createButtonSvg(ny);a.onclick=this.onCheckmarkClick,c.onclick=this.onXclick,this._buttonContainer.append(a,c),this._container.append(this._buttonContainer),this._rangeSelector=document.createElement("div"),this._rangeSelector.classList.add(q.rangeSelector),this._rangeSelectorLeftHandle=document.createElement("div"),this._rangeSelectorLeftHandle.classList.add(q.rangeSelectorHandle),this._rangeSelectorLeftHandle.id=gn.leftHandle,this._rangeSelectorRightHandle=document.createElement("div"),this._rangeSelectorRightHandle.classList.add(q.rangeSelectorHandle),this._rangeSelectorRightHandle.id=gn.rightHandle,this._rangeSelectorRangeDisplay=document.createElement("div"),this._rangeSelectorRangeDisplay.classList.add(q.rangeSelectorDuration),this._rangeSelectorRangeDisplay.id=gn.rangeDuration,this._rangeSelector.append(this._rangeSelectorLeftHandle,this._rangeSelectorRangeDisplay,this._rangeSelectorRightHandle),this._container.append(this._rangeSelector),this._segments=this.buildSegments(this._labels.slice(this.firstLabelIndex,this.lastLabelIndex+1)),this._segments.id=gn.segments,this._segments.classList.add(q.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:u}=this.getSliderValues();this.currentStart=s,this.currentEnd=u,this.updateDuration()}resolveInitialSegment(r,i){const n=this._numberOfSegments*this.segmentSize,o=i-r,a=this.maxValue-this.minValue,c=r-this.minValue,s=Math.ceil(a/this.segmentSize);let u=Math.floor(c/a*s);u+=Math.floor((n-o)/this.segmentSize);const d=u+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 c=0;c<n;c++)a+=this.segmentSize,o.push(a);return o.push(i),o}buildSegments(r){const i=document.createElement("div");r.slice(0,-2).forEach(u=>{const l=document.createElement("div");l.classList.add(q.segment);const d=document.createElement("div");d.classList.add(q.segmentMarker);const f=document.createElement("div");f.classList.add(q.segmentTick);const m=document.createElement("div");m.classList.add(q.segmentLabel),m.innerHTML=this.segmentLabelFormatter(u),l.append(d,f,m),i.append(l)});const n=document.createElement("div");n.classList.add(q.segment);const o=document.createElement("div");o.classList.add(q.segmentMarker);const a=document.createElement("div");a.classList.add(q.segmentTick);const c=document.createElement("div");c.classList.add(q.segmentLabel,q.firstSegmentLabel),c.innerHTML=this.segmentLabelFormatter(r.at(-2));const s=document.createElement("div");return s.classList.add(q.segmentLabel,q.secondSegmentLabel),s.innerHTML=this.segmentLabelFormatter(r.at(-1)),n.append(o,a,c,s),i.append(n),i}}customElements.get("omakase-time-range-selector")||customElements.define("omakase-time-range-selector",mi);const Sc="omakase-time-range-selector-react-div",ry=({timeRange:e,maxTimeRange:t,numberOfSegments:r,segmentSize:i,maxSliderRange:n,onCheckmarkClickCallback:o,segmentLabelFormatter:a,durationLabelFormatter:c})=>(customElements.get("omakase-time-range-selector")||customElements.define("omakase-time-range-selector",mi),$.useEffect(()=>{var p;const s=N.parseTimeRange(t),u=N.timeMomentToSeconds(s.start),l=N.timeMomentToSeconds(s.end),d=N.parseTimeRange(e),f=N.timeMomentToSeconds(d.start),m=N.timeMomentToSeconds(d.end),g=new mi;g.setAttribute("minValue",u.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),c&&(g.durationLabelFormatter=c),(p=document.getElementById(Sc))==null||p.append(g)},[]),$.createElement("div",{id:Sc})),iy=$.memo(({omakasePlayer:e,config:t,onCreateMarkerListCallback:r})=>($.useEffect(()=>{const i=e.createMarkerList(t).subscribe({next:n=>{r==null||r(n)}});return()=>{i.unsubscribe()}},[t.source]),$.createElement("div",{id:t.markerListHTMLElementId})));exports.AudioFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformataudio:"urn:x-nmos:format:audio"}})(exports.AudioFlow||(exports.AudioFlow={}));const oy={Video:"urn:x-nmos:format:video",Audio:"urn:x-nmos:format:audio",Data:"urn:x-nmos:format:data",Multi:"urn:x-nmos:format:multi"};exports.DataFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatdata:"urn:x-nmos:format:data"}})(exports.DataFlow||(exports.DataFlow={}));exports.DeletionRequest=void 0;(e=>{e.StatusEnum={Created:"created",Started:"started",Done:"done",Error:"error"}})(exports.DeletionRequest||(exports.DeletionRequest={}));exports.MediaBucketObjectStorePreInner=void 0;(e=>{e.ActionEnum={CreateBucket:"create_bucket"}})(exports.MediaBucketObjectStorePreInner||(exports.MediaBucketObjectStorePreInner={}));exports.MultiEssenceFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatmulti:"urn:x-nmos:format:multi"}})(exports.MultiEssenceFlow||(exports.MultiEssenceFlow={}));exports.ServiceMediaStore=void 0;(e=>{e.TypeEnum={HttpObjectStore:"http_object_store"}})(exports.ServiceMediaStore||(exports.ServiceMediaStore={}));exports.Source=void 0;(e=>{e.FormatEnum={Video:"urn:x-nmos:format:video",Audio:"urn:x-nmos:format:audio",Data:"urn:x-nmos:format:data",Multi:"urn:x-nmos:format:multi"}})(exports.Source||(exports.Source={}));exports.UncompressedAudioParameters=void 0;(e=>{e.UncTypeEnum={Interleaved:"interleaved",Planar:"planar",Pairs:"pairs"}})(exports.UncompressedAudioParameters||(exports.UncompressedAudioParameters={}));exports.UncompressedVideoParameters=void 0;(e=>{e.UncTypeEnum={Planar:"planar",Yuyv:"YUYV",Uyvy:"UYVY",Ayuv:"AYUV",V210:"v210",V216:"v216",Rgb:"RGB",Rgbx:"RGBx",XRgb:"xRGB",Bgrx:"BGRx",XBgr:"xBGR",Rgba:"RGBA",Argb:"ARGB",Bgra:"BGRA",Abgr:"ABGR",Alpha:"alpha"}})(exports.UncompressedVideoParameters||(exports.UncompressedVideoParameters={}));exports.VideoFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatvideo:"urn:x-nmos:format:video"}})(exports.VideoFlow||(exports.VideoFlow={}));exports.VideoFlowEssenceParameters=void 0;(e=>{e.InterlaceModeEnum={Progressive:"progressive",InterlacedTff:"interlaced_tff",InterlacedBff:"interlaced_bff",InterlacedPsf:"interlaced_psf"},e.ColorspaceEnum={Bt601:"BT601",Bt709:"BT709",Bt2020:"BT2020",Bt2100:"BT2100"},e.TransferCharacteristicEnum={Sdr:"SDR",Hlg:"HLG",Pq:"PQ"},e.ComponentTypeEnum={YcbCr:"YCbCr",Rgb:"RGB"}})(exports.VideoFlowEssenceParameters||(exports.VideoFlowEssenceParameters={}));exports.ImageFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatdata:"urn:x-tam:format:image"}})(exports.ImageFlow||(exports.ImageFlow={}));exports.Contentformat=oy;exports.OmakaseMarkerListComponent=iy;exports.OmakasePlayerComponent=A0;exports.OmakasePlayerTimelineBuilder=C1;exports.OmakasePlayerTimelineComponent=P0;exports.OmakasePlayerTimelineControlsToolbar=q0;exports.OmakaseTamsPlayer=Wm;exports.OmakaseTamsPlayerComponent=X0;exports.OmakaseTimeRangeSelectorComponent=ry;exports.TimeRangeUtil=N;exports.TimecodeUtil=Ee;exports.VideoApiProxy=Hc;exports.convertFlowIdToSubtitlesId=hh;exports.gatherAndExportToManifest=Rc;exports.removeGapsInSegments=Cc;exports.removeGapsInSegmentsByExtending=Zc;exports.resolveAudioManifestName=Pc;exports.resolveTextManifestName=Ac;exports.validateTamsPayload=Mc;
|
|
319
|
+
`,H={container:"omakase-time-range-selector-container",segments:"omakase-time-range-selector-segments",segment:"omakase-time-range-selector-segment",segmentMarker:"omakase-time-range-selector-segment-marker",segmentTick:"omakase-time-range-selector-segment-tick",segmentLabel:"omakase-time-range-selector-segment-label",firstSegmentLabel:"omakase-time-range-selector-segment-first-label",secondSegmentLabel:"omakase-time-range-selector-segment-second-label",rangeSelector:"omakase-time-range-selector-range-selector",rangeSelectorHandle:"omakase-time-range-selector-range-selector-handle",rangeSelectorDuration:"omakase-time-range-selector-range-selector-duration",buttonContainer:"omakase-time-range-selector-button-container",invisible:"omakase-time-range-selector-invisible",dragging:"omakase-time-range-selector-dragging"},gn={leftHandle:"omakase-time-range-selector-range-selector-left-handle",rightHandle:"omakase-time-range-selector-range-selector-right-handle",rangeDuration:"omakase-time-range-selector-range-selector-range-duration",segments:"omakase-time-range-selector-segments"};class mi extends HTMLElement{constructor(){super();k(this,"_container");k(this,"_resizeObserver");k(this,"_rangeSelector");k(this,"_rangeSelectorLeftHandle");k(this,"_rangeSelectorRightHandle");k(this,"_rangeSelectorRangeDisplay");k(this,"_buttonContainer");k(this,"_segments");k(this,"_numberOfSegments",5);k(this,"_firstLabelIndex",0);k(this,"_initialFirstLabelIndex",0);k(this,"_labels",[]);k(this,"minWidth",10);k(this,"minValue");k(this,"maxValue");k(this,"maxRange");k(this,"segmentSize");k(this,"sliderStart");k(this,"sliderEnd");k(this,"maxWidthPercent");k(this,"segmentLabelFormatter",X0);k(this,"durationLabelFormatter",Y0);k(this,"onCheckmarkClickCallback");k(this,"currentStart",0);k(this,"currentEnd",100);k(this,"_displayedStart",0);k(this,"_displayedEnd",0);k(this,"resetSegments",()=>{this._container.removeChild(this._segments),this._segments=this.buildSegments(this._labels.slice(this.firstLabelIndex,this.lastLabelIndex+1)),this._segments.classList.add(H.segments),this._container.append(this._segments)});k(this,"getBounds",()=>({wrapperLeft:this._container.offsetLeft,wrapperRight:this._container.offsetLeft+this._container.offsetWidth,wrapperWidth:this._container.offsetWidth,selectorLeft:this._rangeSelector.offsetLeft,selectorWidth:this._rangeSelector.offsetWidth}));k(this,"getSliderValues",()=>{const{wrapperWidth:r,selectorLeft:i,selectorWidth:n}=this.getBounds(),o=this._labels.at(this.firstLabelIndex),a=this._labels.at(this.lastLabelIndex),u=Math.round(o+i/r*(a-o)),s=Math.round(o+(i+n)/r*(a-o));return{start:u,end:s}});k(this,"getSelectorBounds",(r,i)=>{const{wrapperWidth:n}=this.getBounds(),o=this._labels.at(this.firstLabelIndex),a=this._labels.at(this.lastLabelIndex),u=Math.round((r-o)/(a-o)*n),s=Math.round((i-r)/(a-o)*n);return{selectorLeft:u,selectorWidth:s}});k(this,"initSlider",(r,i)=>{const n=this.getSelectorBounds(r,i);this._rangeSelector.style.left=n.selectorLeft.toString()+"px",this._rangeSelector.style.width=n.selectorWidth.toString()+"px",this.updateDuration()});k(this,"setSliderPosition",()=>{const{selectorLeft:r,selectorWidth:i}=this.getSelectorBounds(this._displayedStart,this._displayedEnd);this._rangeSelector.style.left=`${r}px`,this._rangeSelector.style.width=`${i}px`});k(this,"showButtons",()=>{const{start:r,end:i}=this.getSliderValues();r===this.currentStart&&i===this.currentEnd||this._buttonContainer.classList.remove(H.invisible)});k(this,"hideButtons",()=>{this._buttonContainer.classList.add(H.invisible)});k(this,"updateDuration",()=>{const{start:r,end:i}=this.getSliderValues();this._displayedStart=r,this._displayedEnd=i;const n=i-r;this._rangeSelectorRangeDisplay.textContent=this.durationLabelFormatter(n)});k(this,"onXclick",()=>{this.firstLabelIndex=this._initialFirstLabelIndex,this.resetSegments(),this._displayedStart=this.currentStart,this._displayedEnd=this.currentEnd,this.setSliderPosition(),this.updateDuration(),this.hideButtons()});k(this,"onCheckmarkClick",()=>{const{start:r,end:i}=this.getSliderValues();this.currentStart=r,this.currentEnd=i,this._initialFirstLabelIndex=this.firstLabelIndex,this.updateDuration(),this.hideButtons(),this.onCheckmarkClickCallback!==void 0&&this.onCheckmarkClickCallback(r,i)});k(this,"onMouseDownRight",r=>{r.preventDefault();const i=r.clientX,{selectorWidth:n,wrapperWidth:o,selectorLeft:a}=this.getBounds();let u=null,s=null;const c=d=>{let f=d.clientX-i,m=Math.max(this.minWidth,n+f);const h=Math.min(o*this.maxWidthPercent,o-a),p=m>h,v=performance.now();p?u===null&&(u=v,s=window.setTimeout(()=>{this.outOfBoundsCallback(!0),s=window.setInterval(()=>this.outOfBoundsCallback(!0),400)},500)):(s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null),m=Math.min(m,h),this._rangeSelector.style.width=`${m}px`,this.updateDuration()},l=()=>{this.showButtons(),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",l),s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null};document.addEventListener("mousemove",c),document.addEventListener("mouseup",l)});k(this,"onMouseDownLeft",r=>{r.preventDefault();const i=r.clientX,{selectorLeft:n,selectorWidth:o,wrapperWidth:a}=this.getBounds();let u=null,s=null;const c=d=>{let f=d.clientX-i,m=n+f;const h=m<0,p=performance.now();h?u===null&&(u=p,s=window.setTimeout(()=>{this.outOfBoundsCallback(!1),s=window.setInterval(()=>this.outOfBoundsCallback(!1),400)},500)):(s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null),m<0&&(f=-n,m=0);let v=Math.min(Math.max(this.minWidth,o-f),a);m+v>a&&(m=a-v),v>this.minWidth&&v<=a*this.maxWidthPercent&&(this._rangeSelector.style.left=`${m}px`,this._rangeSelector.style.width=`${v}px`),this.updateDuration()},l=()=>{this.showButtons(),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",l),s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null};document.addEventListener("mousemove",c),document.addEventListener("mouseup",l)});k(this,"outOfBoundsCallback",r=>{r?this.firstLabelIndex+=1:this.firstLabelIndex-=1,this.resetSegments(),this.updateDuration()});k(this,"onMouseDownDrag",r=>{if(r.target instanceof HTMLElement&&r.target.classList.contains(H.rangeSelectorHandle))return;r.preventDefault(),this._rangeSelector.classList.add(H.dragging);const i=r.clientX,{selectorLeft:n,selectorWidth:o,wrapperWidth:a}=this.getBounds();let u=null,s=null;const c=d=>{let f=d.clientX-i,m=n+f;const h=a-o,p=m<0||m>h,v=performance.now();if(p){if(u===null){const w=m>h;u=v,s=window.setTimeout(()=>{this.outOfBoundsCallback(w),s=window.setInterval(()=>this.outOfBoundsCallback(w),400)},500)}}else s!==null&&(clearTimeout(s),clearInterval(s),s=null),u=null;m=Math.max(0,Math.min(m,h)),this._rangeSelector.style.left=`${m}px`,this.updateDuration()},l=()=>{this._rangeSelector.classList.remove(H.dragging),this.showButtons(),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",l),s!==null&&(clearTimeout(s),clearInterval(s))};document.addEventListener("mousemove",c),document.addEventListener("mouseup",l)})}set numberOfSegments(r){r>2&&(this._numberOfSegments=r)}get numberOfSegments(){return this._numberOfSegments}static get observedAttributes(){return["minValue","maxValue","maxRange","segmentSize","sliderStart","sliderEnd","numberOfSegments"]}get firstLabelIndex(){return this._firstLabelIndex}set firstLabelIndex(r){if(r+this._numberOfSegments+1>=this._labels.length){this._firstLabelIndex=this._labels.length-1-this.numberOfSegments;return}if(r<0){this._firstLabelIndex=0;return}this._firstLabelIndex=r}get lastLabelIndex(){return this._firstLabelIndex+this._numberOfSegments}connectedCallback(){if(this.minValue=Number.parseInt(this.getAttribute("minValue")??"NaN"),this.maxValue=Number.parseInt(this.getAttribute("maxValue")??"NaN"),this.maxRange=Number.parseInt(this.getAttribute("maxRange")??"NaN"),this.segmentSize=Number.parseInt(this.getAttribute("segmentSize")??"NaN"),this.getAttribute("numberOfSegments")){const l=Number.parseInt(this.getAttribute("numberOfSegments"));if(Number.isNaN(l))throw new Error("Invalid atribute value");this._numberOfSegments=l}if(Number.isNaN(this.minValue)||Number.isNaN(this.maxValue)||Number.isNaN(this.maxRange)||Number.isNaN(this.segmentSize))throw new Error("Invalid attribute values.");const r=this.maxValue-this.minValue;if(r<this.numberOfSegments*this.segmentSize&&(this.segmentSize=r/this.numberOfSegments),this.maxWidthPercent=this.maxRange>this.numberOfSegments*this.segmentSize?1:this.maxRange/(this.numberOfSegments*this.segmentSize),this._labels=this.calculateLabels(),this.maxValue<this.minValue)throw new Error("Max value is lesser than min value");let i,n;if(this.getAttribute("sliderStart")&&this.getAttribute("sliderEnd")){if(i=Number.parseFloat(this.getAttribute("sliderStart")),n=Number.parseFloat(this.getAttribute("sliderEnd")),i>n)throw new Error("Slider start is bigger than slider end");if(i<this.minValue)throw new Error("Slider start is smaller than minimal value");n>this.maxValue&&(n=this.maxValue),this.currentStart=i,this.currentEnd=n}else i=this.minValue,n=this.segmentSize;this.resolveInitialSegment(i,n),this._container=document.createElement("div"),this._container.classList.add(H.container);const o=document.createElement("style");o.textContent=Q0,this._container.append(o),this._buttonContainer=document.createElement("div"),this._buttonContainer.classList.add(H.buttonContainer,H.invisible);const a=this.createButtonSvg(e_),u=this.createButtonSvg(t_);a.onclick=this.onCheckmarkClick,u.onclick=this.onXclick,this._buttonContainer.append(a,u),this._container.append(this._buttonContainer),this._rangeSelector=document.createElement("div"),this._rangeSelector.classList.add(H.rangeSelector),this._rangeSelectorLeftHandle=document.createElement("div"),this._rangeSelectorLeftHandle.classList.add(H.rangeSelectorHandle),this._rangeSelectorLeftHandle.id=gn.leftHandle,this._rangeSelectorRightHandle=document.createElement("div"),this._rangeSelectorRightHandle.classList.add(H.rangeSelectorHandle),this._rangeSelectorRightHandle.id=gn.rightHandle,this._rangeSelectorRangeDisplay=document.createElement("div"),this._rangeSelectorRangeDisplay.classList.add(H.rangeSelectorDuration),this._rangeSelectorRangeDisplay.id=gn.rangeDuration,this._rangeSelector.append(this._rangeSelectorLeftHandle,this._rangeSelectorRangeDisplay,this._rangeSelectorRightHandle),this._container.append(this._rangeSelector),this._segments=this.buildSegments(this._labels.slice(this.firstLabelIndex,this.lastLabelIndex+1)),this._segments.id=gn.segments,this._segments.classList.add(H.segments),this._container.append(this._segments),this._rangeSelectorLeftHandle.addEventListener("mousedown",this.onMouseDownLeft),this._rangeSelectorRightHandle.addEventListener("mousedown",this.onMouseDownRight),this._rangeSelector.addEventListener("mousedown",this.onMouseDownDrag),this.append(this._container),this.initSlider(i,n);const{start:s,end:c}=this.getSliderValues();this.currentStart=s,this.currentEnd=c,this.updateDuration(),this._resizeObserver=new ResizeObserver(()=>{this.setSliderPosition()}),this._resizeObserver.observe(this._container)}disconnectedCallback(){var r;(r=this._resizeObserver)==null||r.disconnect()}resolveInitialSegment(r,i){const n=this._numberOfSegments*this.segmentSize,o=i-r,a=this.maxValue-this.minValue,u=r-this.minValue,s=Math.ceil(a/this.segmentSize);let c=Math.floor(u/a*s);c+=Math.floor((n-o)/this.segmentSize);const d=c+Math.ceil(o/this.segmentSize)-this._numberOfSegments;this.firstLabelIndex=d,this._initialFirstLabelIndex=d}createButtonSvg(r){const i=document.createElement("button");return i.innerHTML=r,i}calculateLabels(){const r=this.minValue,i=this.maxValue,n=Math.floor((this.maxValue-this.minValue)/this.segmentSize)-1,o=[r];let a=this.minValue;for(let u=0;u<n;u++)a+=this.segmentSize,o.push(a);return o.push(i),o}buildSegments(r){const i=document.createElement("div");r.slice(0,-2).forEach(c=>{const l=document.createElement("div");l.classList.add(H.segment);const d=document.createElement("div");d.classList.add(H.segmentMarker);const f=document.createElement("div");f.classList.add(H.segmentTick);const m=document.createElement("div");m.classList.add(H.segmentLabel),m.innerHTML=this.segmentLabelFormatter(c),l.append(d,f,m),i.append(l)});const n=document.createElement("div");n.classList.add(H.segment);const o=document.createElement("div");o.classList.add(H.segmentMarker);const a=document.createElement("div");a.classList.add(H.segmentTick);const u=document.createElement("div");u.classList.add(H.segmentLabel,H.firstSegmentLabel),u.innerHTML=this.segmentLabelFormatter(r.at(-2));const s=document.createElement("div");return s.classList.add(H.segmentLabel,H.secondSegmentLabel),s.innerHTML=this.segmentLabelFormatter(r.at(-1)),n.append(o,a,u,s),i.append(n),i}}customElements.get("omakase-time-range-selector")||customElements.define("omakase-time-range-selector",mi);const $u="omakase-time-range-selector-react-div",n_=({timeRange:e,maxTimeRange:t,numberOfSegments:r,segmentSize:i,maxSliderRange:n,onCheckmarkClickCallback:o,segmentLabelFormatter:a,durationLabelFormatter:u})=>(customElements.get("omakase-time-range-selector")||customElements.define("omakase-time-range-selector",mi),$.useEffect(()=>{var p;const s=P.parseTimeRange(t),c=P.timeMomentToSeconds(s.start),l=P.timeMomentToSeconds(s.end),d=P.parseTimeRange(e),f=P.timeMomentToSeconds(d.start),m=P.timeMomentToSeconds(d.end),h=new mi;h.setAttribute("minValue",c.toString()),h.setAttribute("maxValue",l.toString()),h.setAttribute("maxRange",n.toString()),h.setAttribute("segmentSize",i.toString()),h.setAttribute("numberOfSegments",r.toString()),h.setAttribute("sliderStart",f.toString()),h.setAttribute("sliderEnd",m.toString()),h.onCheckmarkClickCallback=o,a&&(h.segmentLabelFormatter=a),u&&(h.durationLabelFormatter=u),(p=document.getElementById($u))==null||p.append(h)},[]),$.createElement("div",{id:$u})),r_=$.memo(({omakasePlayer:e,config:t,onCreateMarkerListCallback:r})=>($.useEffect(()=>{const i=e.createMarkerList(t).subscribe({next:n=>{r==null||r(n)}});return()=>{i.unsubscribe()}},[t.source]),$.createElement("div",{id:t.markerListHTMLElementId})));exports.AudioFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformataudio:"urn:x-nmos:format:audio"}})(exports.AudioFlow||(exports.AudioFlow={}));const i_={Video:"urn:x-nmos:format:video",Audio:"urn:x-nmos:format:audio",Data:"urn:x-nmos:format:data",Multi:"urn:x-nmos:format:multi"};exports.DataFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatdata:"urn:x-nmos:format:data"}})(exports.DataFlow||(exports.DataFlow={}));exports.DeletionRequest=void 0;(e=>{e.StatusEnum={Created:"created",Started:"started",Done:"done",Error:"error"}})(exports.DeletionRequest||(exports.DeletionRequest={}));exports.MediaBucketObjectStorePreInner=void 0;(e=>{e.ActionEnum={CreateBucket:"create_bucket"}})(exports.MediaBucketObjectStorePreInner||(exports.MediaBucketObjectStorePreInner={}));exports.MultiEssenceFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatmulti:"urn:x-nmos:format:multi"}})(exports.MultiEssenceFlow||(exports.MultiEssenceFlow={}));exports.ServiceMediaStore=void 0;(e=>{e.TypeEnum={HttpObjectStore:"http_object_store"}})(exports.ServiceMediaStore||(exports.ServiceMediaStore={}));exports.Source=void 0;(e=>{e.FormatEnum={Video:"urn:x-nmos:format:video",Audio:"urn:x-nmos:format:audio",Data:"urn:x-nmos:format:data",Multi:"urn:x-nmos:format:multi"}})(exports.Source||(exports.Source={}));exports.UncompressedAudioParameters=void 0;(e=>{e.UncTypeEnum={Interleaved:"interleaved",Planar:"planar",Pairs:"pairs"}})(exports.UncompressedAudioParameters||(exports.UncompressedAudioParameters={}));exports.UncompressedVideoParameters=void 0;(e=>{e.UncTypeEnum={Planar:"planar",Yuyv:"YUYV",Uyvy:"UYVY",Ayuv:"AYUV",V210:"v210",V216:"v216",Rgb:"RGB",Rgbx:"RGBx",XRgb:"xRGB",Bgrx:"BGRx",XBgr:"xBGR",Rgba:"RGBA",Argb:"ARGB",Bgra:"BGRA",Abgr:"ABGR",Alpha:"alpha"}})(exports.UncompressedVideoParameters||(exports.UncompressedVideoParameters={}));exports.VideoFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatvideo:"urn:x-nmos:format:video"}})(exports.VideoFlow||(exports.VideoFlow={}));exports.VideoFlowEssenceParameters=void 0;(e=>{e.InterlaceModeEnum={Progressive:"progressive",InterlacedTff:"interlaced_tff",InterlacedBff:"interlaced_bff",InterlacedPsf:"interlaced_psf"},e.ColorspaceEnum={Bt601:"BT601",Bt709:"BT709",Bt2020:"BT2020",Bt2100:"BT2100"},e.TransferCharacteristicEnum={Sdr:"SDR",Hlg:"HLG",Pq:"PQ"},e.ComponentTypeEnum={YcbCr:"YCbCr",Rgb:"RGB"}})(exports.VideoFlowEssenceParameters||(exports.VideoFlowEssenceParameters={}));exports.ImageFlow=void 0;(e=>{e.FormatEnum={UrnxNmosformatdata:"urn:x-tam:format:image"}})(exports.ImageFlow||(exports.ImageFlow={}));exports.Contentformat=i_;exports.OmakaseMarkerListComponent=r_;exports.OmakasePlayerComponent=P0;exports.OmakasePlayerTimelineBuilder=L1;exports.OmakasePlayerTimelineComponent=j0;exports.OmakasePlayerTimelineControlsToolbar=W0;exports.OmakaseTamsPlayer=Jm;exports.OmakaseTamsPlayerComponent=H0;exports.OmakaseTimeRangeSelectorComponent=n_;exports.TimeRangeUtil=P;exports.TimecodeUtil=ze;exports.VideoApiProxy=Gu;exports.convertFlowIdToSubtitlesId=mh;exports.gatherAndExportToManifest=Zu;exports.removeGapsInSegments=Au;exports.removeGapsInSegmentsByExtending=Lu;exports.resolveAudioManifestName=Nu;exports.resolveTextManifestName=ju;exports.validateTamsPayload=Cu;
|
|
319
320
|
//# sourceMappingURL=index.cjs.js.map
|