@mappedin/events 6.0.1-beta.54 → 6.0.1-beta.56

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/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{a as y,b as O,c as s,d as Ea,e as wo,f as fh,g as ri,h as z_,i as qe,j as N,k as vt,l as At,m as ii,n as dh,o as C,p as l,q as m}from"./chunk-DPXF6NSF.js";var E_=fh((oh,ah)=>{l();(function(t,e){typeof oh=="object"&&typeof ah<"u"?ah.exports=e():typeof define=="function"&&define.amd?define(e):(t=t||self,t.TinyQueue=e())})(oh,function(){"use strict";var t=s(function(r,i){if(r===void 0&&(r=[]),i===void 0&&(i=e),this.data=r,this.length=this.data.length,this.compare=i,this.length>0)for(var o=(this.length>>1)-1;o>=0;o--)this._down(o)},"TinyQueue");t.prototype.push=s(function(r){this.data.push(r),this.length++,this._up(this.length-1)},"push"),t.prototype.pop=s(function(){if(this.length!==0){var r=this.data[0],i=this.data.pop();return this.length--,this.length>0&&(this.data[0]=i,this._down(0)),r}},"pop"),t.prototype.peek=s(function(){return this.data[0]},"peek"),t.prototype._up=s(function(r){for(var i=this,o=i.data,a=i.compare,c=o[r];r>0;){var f=r-1>>1,d=o[f];if(a(c,d)>=0)break;o[r]=d,r=f}o[r]=c},"_up"),t.prototype._down=s(function(r){for(var i=this,o=i.data,a=i.compare,c=this.length>>1,f=o[r];r<c;){var d=(r<<1)+1,p=o[d],h=d+1;if(h<this.length&&a(o[h],p)<0&&(d=h,p=o[h]),a(p,f)>=0)break;o[r]=p,r=d}o[r]=f},"_down");function e(n,r){return n<r?-1:n>r?1:0}return s(e,"defaultCompare"),t})});var T_=fh((Pae,ch)=>{"use strict";l();var Pl=E_();Pl.default&&(Pl=Pl.default);ch.exports=I_;ch.exports.default=I_;function I_(t,e,n){e=e||1;for(var r,i,o,a,c=0;c<t[0].length;c++){var f=t[0][c];(!c||f[0]<r)&&(r=f[0]),(!c||f[1]<i)&&(i=f[1]),(!c||f[0]>o)&&(o=f[0]),(!c||f[1]>a)&&(a=f[1])}var d=o-r,p=a-i,h=Math.min(d,p),g=h/2;if(h===0){var x=[r,i];return x.distance=0,x}for(var b=new Pl(void 0,FO),E=r;E<o;E+=h)for(var R=i;R<a;R+=h)b.push(new wi(E+g,R+g,g,t));var A=LO(t),Q=new wi(r+d/2,i+p/2,0,t);Q.d>A.d&&(A=Q);for(var W=b.length;b.length;){var F=b.pop();F.d>A.d&&(A=F,n&&console.log("found best %d after %d probes",Math.round(1e4*F.d)/1e4,W)),!(F.max-A.d<=e)&&(g=F.h/2,b.push(new wi(F.x-g,F.y-g,g,t)),b.push(new wi(F.x+g,F.y-g,g,t)),b.push(new wi(F.x-g,F.y+g,g,t)),b.push(new wi(F.x+g,F.y+g,g,t)),W+=4)}n&&(console.log("num probes: "+W),console.log("best distance: "+A.d));var H=[A.x,A.y];return H.distance=A.d,H}s(I_,"polylabel");function FO(t,e){return e.max-t.max}s(FO,"compareMax");function wi(t,e,n,r){this.x=t,this.y=e,this.h=n,this.d=OO(t,e,r),this.max=this.d+this.h*Math.SQRT2}s(wi,"Cell");function OO(t,e,n){for(var r=!1,i=1/0,o=0;o<n.length;o++)for(var a=n[o],c=0,f=a.length,d=f-1;c<f;d=c++){var p=a[c],h=a[d];p[1]>e!=h[1]>e&&t<(h[0]-p[0])*(e-p[1])/(h[1]-p[1])+p[0]&&(r=!r),i=Math.min(i,NO(t,e,p,h))}return i===0?0:(r?1:-1)*Math.sqrt(i)}s(OO,"pointToPolygonDist");function LO(t){for(var e=0,n=0,r=0,i=t[0],o=0,a=i.length,c=a-1;o<a;c=o++){var f=i[o],d=i[c],p=f[0]*d[1]-d[0]*f[1];n+=(f[0]+d[0])*p,r+=(f[1]+d[1])*p,e+=p*3}return e===0?new wi(i[0][0],i[0][1],0,t):new wi(n/e,r/e,0,t)}s(LO,"getCentroidCell");function NO(t,e,n,r){var i=n[0],o=n[1],a=r[0]-i,c=r[1]-o;if(a!==0||c!==0){var f=((t-i)*a+(e-o)*c)/(a*a+c*c);f>1?(i=r[0],o=r[1]):f>0&&(i+=a*f,o+=c*f)}return a=t-i,c=e-o,a*a+c*c}s(NO,"getSegDistSq")});l();l();l();l();var ph="[MappedinJS]";function V_(t="",{prefix:e=ph}={}){let n="".concat(e).concat(t?"-".concat(t):""),r=s((i,o)=>{if(typeof window<"u"&&window.rnDebug){let a=o.map(c=>c instanceof Error&&c.stack?"".concat(c.message,"\n").concat(c.stack):c);window.rnDebug("".concat(t," ").concat(i,": ").concat(a.join(" ")))}},"rnDebug");return{logState:m.env.NODE_ENV==="test"?3:0,log(...i){this.logState<=0&&(console.log(n,...i),r("log",i))},warn(...i){this.logState<=1&&(console.warn(n,...i),r("warn",i))},error(...i){this.logState<=2&&(console.error(n,...i),r("error",i))},assert(...i){console.assert(...i)},time(i){console.time(i)},timeEnd(i){console.timeEnd(i)},setLevel(i){0<=i&&i<=3&&(this.logState=i)}}}s(V_,"createLogger");var G_=V_();var cs=G_;l();l();l();var Ll=class Ll extends Error{};s(Ll,"InvalidTokenError");var Ol=Ll;Ol.prototype.name="InvalidTokenError";l();l();l();var ou="173";var au=0,cu=1,lu=2,uu=3,fu=4,du=5,pu=6,hu=7;var Ah=300;var Gl=1e3,Io=1001,Hl=1002;var Rh=1006;var Ch=1008;var Ph=1009;var Fh=1023;var Pa=2300,$l=2301,Nl=2302,hh=2400,mh=2401,gh=2402;var mu="",Tn="srgb",Wl="srgb-linear",jl="linear",Ca="srgb";var To=2e3,yh=2001;var _u=class _u{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});let r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}hasEventListener(e,n){let r=this._listeners;return r===void 0?!1:r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){let r=this._listeners;if(r===void 0)return;let i=r[e];if(i!==void 0){let o=i.indexOf(n);o!==-1&&i.splice(o,1)}}dispatchEvent(e){let n=this._listeners;if(n===void 0)return;let r=n[e.type];if(r!==void 0){e.target=this;let i=r.slice(0);for(let o=0,a=i.length;o<a;o++)i[o].call(this,e);e.target=null}}};s(_u,"EventDispatcher");var Ro=_u,zt=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];var eL=Math.PI/180,H_=180/Math.PI;function gu(){let t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,r=Math.random()*4294967295|0;return(zt[t&255]+zt[t>>8&255]+zt[t>>16&255]+zt[t>>24&255]+"-"+zt[e&255]+zt[e>>8&255]+"-"+zt[e>>16&15|64]+zt[e>>24&255]+"-"+zt[n&63|128]+zt[n>>8&255]+"-"+zt[n>>16&255]+zt[n>>24&255]+zt[r&255]+zt[r>>8&255]+zt[r>>16&255]+zt[r>>24&255]).toLowerCase()}s(gu,"generateUUID");function Ye(t,e,n){return Math.max(e,Math.min(n,t))}s(Ye,"clamp");function $_(t,e){return(t%e+e)%e}s($_,"euclideanModulo");function Ul(t,e,n){return(1-n)*t+n*e}s(Ul,"lerp");var La=class La{constructor(e=0,n=0){La.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Ye(this.x,e.x,n.x),this.y=Ye(this.y,e.y,n.y),this}clampScalar(e,n){return this.x=Ye(this.x,e,n),this.y=Ye(this.y,e,n),this}clampLength(e,n){let r=this.length();return this.divideScalar(r||1).multiplyScalar(Ye(r,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;let r=this.dot(e)/n;return Math.acos(Ye(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){let r=Math.cos(n),i=Math.sin(n),o=this.x-e.x,a=this.y-e.y;return this.x=o*r-a*i+e.x,this.y=o*i+a*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};s(La,"Vector2");var qn=La,Na=class Na{constructor(e,n,r,i,o,a,c,f,d){Na.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,a,c,f,d)}set(e,n,r,i,o,a,c,f,d){let p=this.elements;return p[0]=e,p[1]=i,p[2]=c,p[3]=n,p[4]=o,p[5]=f,p[6]=r,p[7]=a,p[8]=d,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){let r=e.elements,i=n.elements,o=this.elements,a=r[0],c=r[3],f=r[6],d=r[1],p=r[4],h=r[7],g=r[2],x=r[5],b=r[8],E=i[0],R=i[3],A=i[6],Q=i[1],W=i[4],F=i[7],H=i[2],ie=i[5],X=i[8];return o[0]=a*E+c*Q+f*H,o[3]=a*R+c*W+f*ie,o[6]=a*A+c*F+f*X,o[1]=d*E+p*Q+h*H,o[4]=d*R+p*W+h*ie,o[7]=d*A+p*F+h*X,o[2]=g*E+x*Q+b*H,o[5]=g*R+x*W+b*ie,o[8]=g*A+x*F+b*X,this}multiplyScalar(e){let n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){let e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],c=e[5],f=e[6],d=e[7],p=e[8];return n*a*p-n*c*d-r*o*p+r*c*f+i*o*d-i*a*f}invert(){let e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],c=e[5],f=e[6],d=e[7],p=e[8],h=p*a-c*d,g=c*f-p*o,x=d*o-a*f,b=n*h+r*g+i*x;if(b===0)return this.set(0,0,0,0,0,0,0,0,0);let E=1/b;return e[0]=h*E,e[1]=(i*d-p*r)*E,e[2]=(c*r-i*a)*E,e[3]=g*E,e[4]=(p*n-i*f)*E,e[5]=(i*o-c*n)*E,e[6]=x*E,e[7]=(r*f-d*n)*E,e[8]=(a*n-r*o)*E,this}transpose(){let e,n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,o,a,c){let f=Math.cos(o),d=Math.sin(o);return this.set(r*f,r*d,-r*(f*a+d*c)+a+e,-i*d,i*f,-i*(-d*a+f*c)+c+n,0,0,1),this}scale(e,n){return this.premultiply(Dl.makeScale(e,n)),this}rotate(e){return this.premultiply(Dl.makeRotation(-e)),this}translate(e,n){return this.premultiply(Dl.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){let n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){let n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){let r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}};s(Na,"Matrix3");var pe=Na,Dl=new pe;function Xl(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}s(Xl,"createElementNS");var xh=new pe().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),_h=new pe().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function W_(){let t={enabled:!0,workingColorSpace:Wl,spaces:{},convert:s(function(i,o,a){return this.enabled===!1||o===a||!o||!a||(this.spaces[o].transfer===Ca&&(i.r=Cr(i.r),i.g=Cr(i.g),i.b=Cr(i.b)),this.spaces[o].primaries!==this.spaces[a].primaries&&(i.applyMatrix3(this.spaces[o].toXYZ),i.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===Ca&&(i.r=ms(i.r),i.g=ms(i.g),i.b=ms(i.b))),i},"convert"),fromWorkingColorSpace:s(function(i,o){return this.convert(i,this.workingColorSpace,o)},"fromWorkingColorSpace"),toWorkingColorSpace:s(function(i,o){return this.convert(i,o,this.workingColorSpace)},"toWorkingColorSpace"),getPrimaries:s(function(i){return this.spaces[i].primaries},"getPrimaries"),getTransfer:s(function(i){return i===mu?jl:this.spaces[i].transfer},"getTransfer"),getLuminanceCoefficients:s(function(i,o=this.workingColorSpace){return i.fromArray(this.spaces[o].luminanceCoefficients)},"getLuminanceCoefficients"),define:s(function(i){Object.assign(this.spaces,i)},"define"),_getMatrix:s(function(i,o,a){return i.copy(this.spaces[o].toXYZ).multiply(this.spaces[a].fromXYZ)},"_getMatrix"),_getDrawingBufferColorSpace:s(function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},"_getDrawingBufferColorSpace"),_getUnpackColorSpace:s(function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace},"_getUnpackColorSpace")},e=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return t.define({[Wl]:{primaries:e,whitePoint:r,transfer:jl,toXYZ:xh,fromXYZ:_h,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:Tn},outputColorSpaceConfig:{drawingBufferColorSpace:Tn}},[Tn]:{primaries:e,whitePoint:r,transfer:Ca,toXYZ:xh,fromXYZ:_h,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:Tn}}}),t}s(W_,"createColorManagement");var In=W_();function Cr(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}s(Cr,"SRGBToLinear");function ms(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}s(ms,"LinearToSRGB");var ls,vu=class vu{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{ls===void 0&&(ls=Xl("canvas")),ls.width=e.width,ls.height=e.height;let r=ls.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=ls}return n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let n=Xl("canvas");n.width=e.width,n.height=e.height;let r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);let i=r.getImageData(0,0,e.width,e.height),o=i.data;for(let a=0;a<o.length;a++)o[a]=Cr(o[a]/255)*255;return r.putImageData(i,0,0),n}else if(e.data){let n=e.data.slice(0);for(let r=0;r<n.length;r++)n instanceof Uint8Array||n instanceof Uint8ClampedArray?n[r]=Math.floor(Cr(n[r]/255)*255):n[r]=Cr(n[r]);return{data:n,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}};s(vu,"ImageUtils");var ql=vu,j_=0,bu=class bu{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:j_++}),this.uuid=gu(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let n=e===void 0||typeof e=="string";if(!n&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let r={uuid:this.uuid,url:""},i=this.data;if(i!==null){let o;if(Array.isArray(i)){o=[];for(let a=0,c=i.length;a<c;a++)i[a].isDataTexture?o.push(kl(i[a].image)):o.push(kl(i[a]))}else o=kl(i);r.url=o}return n||(e.images[this.uuid]=r),r}};s(bu,"Source");var Kl=bu;function kl(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap?ql.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}s(kl,"serializeImage");var X_=0,ps=class ps extends Ro{constructor(e=ps.DEFAULT_IMAGE,n=ps.DEFAULT_MAPPING,r=Io,i=Io,o=Rh,a=Ch,c=Fh,f=Ph,d=ps.DEFAULT_ANISOTROPY,p=mu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:X_++}),this.uuid=gu(),this.name="",this.source=new Kl(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=i,this.magFilter=o,this.minFilter=a,this.anisotropy=d,this.format=c,this.internalFormat=null,this.type=f,this.offset=new qn(0,0),this.repeat=new qn(1,1),this.center=new qn(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new pe,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=p,this.userData={},this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){let n=e===void 0||typeof e=="string";if(!n&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let r={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Ah)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Gl:e.x=e.x-Math.floor(e.x);break;case Io:e.x=e.x<0?0:1;break;case Hl:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Gl:e.y=e.y-Math.floor(e.y);break;case Io:e.y=e.y<0?0:1;break;case Hl:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};s(ps,"Texture");var gs=ps;gs.DEFAULT_IMAGE=null;gs.DEFAULT_MAPPING=Ah;gs.DEFAULT_ANISOTROPY=1;var Su=class Su{constructor(e=0,n=0,r=0,i=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=r,this._w=i}static slerpFlat(e,n,r,i,o,a,c){let f=r[i+0],d=r[i+1],p=r[i+2],h=r[i+3],g=o[a+0],x=o[a+1],b=o[a+2],E=o[a+3];if(c===0){e[n+0]=f,e[n+1]=d,e[n+2]=p,e[n+3]=h;return}if(c===1){e[n+0]=g,e[n+1]=x,e[n+2]=b,e[n+3]=E;return}if(h!==E||f!==g||d!==x||p!==b){let R=1-c,A=f*g+d*x+p*b+h*E,Q=A>=0?1:-1,W=1-A*A;if(W>Number.EPSILON){let H=Math.sqrt(W),ie=Math.atan2(H,A*Q);R=Math.sin(R*ie)/H,c=Math.sin(c*ie)/H}let F=c*Q;if(f=f*R+g*F,d=d*R+x*F,p=p*R+b*F,h=h*R+E*F,R===1-c){let H=1/Math.sqrt(f*f+d*d+p*p+h*h);f*=H,d*=H,p*=H,h*=H}}e[n]=f,e[n+1]=d,e[n+2]=p,e[n+3]=h}static multiplyQuaternionsFlat(e,n,r,i,o,a){let c=r[i],f=r[i+1],d=r[i+2],p=r[i+3],h=o[a],g=o[a+1],x=o[a+2],b=o[a+3];return e[n]=c*b+p*h+f*x-d*g,e[n+1]=f*b+p*g+d*h-c*x,e[n+2]=d*b+p*x+c*g-f*h,e[n+3]=p*b-c*h-f*g-d*x,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,r,i){return this._x=e,this._y=n,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){let r=e._x,i=e._y,o=e._z,a=e._order,c=Math.cos,f=Math.sin,d=c(r/2),p=c(i/2),h=c(o/2),g=f(r/2),x=f(i/2),b=f(o/2);switch(a){case"XYZ":this._x=g*p*h+d*x*b,this._y=d*x*h-g*p*b,this._z=d*p*b+g*x*h,this._w=d*p*h-g*x*b;break;case"YXZ":this._x=g*p*h+d*x*b,this._y=d*x*h-g*p*b,this._z=d*p*b-g*x*h,this._w=d*p*h+g*x*b;break;case"ZXY":this._x=g*p*h-d*x*b,this._y=d*x*h+g*p*b,this._z=d*p*b+g*x*h,this._w=d*p*h-g*x*b;break;case"ZYX":this._x=g*p*h-d*x*b,this._y=d*x*h+g*p*b,this._z=d*p*b-g*x*h,this._w=d*p*h+g*x*b;break;case"YZX":this._x=g*p*h+d*x*b,this._y=d*x*h+g*p*b,this._z=d*p*b-g*x*h,this._w=d*p*h-g*x*b;break;case"XZY":this._x=g*p*h-d*x*b,this._y=d*x*h-g*p*b,this._z=d*p*b+g*x*h,this._w=d*p*h+g*x*b;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){let r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){let n=e.elements,r=n[0],i=n[4],o=n[8],a=n[1],c=n[5],f=n[9],d=n[2],p=n[6],h=n[10],g=r+c+h;if(g>0){let x=.5/Math.sqrt(g+1);this._w=.25/x,this._x=(p-f)*x,this._y=(o-d)*x,this._z=(a-i)*x}else if(r>c&&r>h){let x=2*Math.sqrt(1+r-c-h);this._w=(p-f)/x,this._x=.25*x,this._y=(i+a)/x,this._z=(o+d)/x}else if(c>h){let x=2*Math.sqrt(1+c-r-h);this._w=(o-d)/x,this._x=(i+a)/x,this._y=.25*x,this._z=(f+p)/x}else{let x=2*Math.sqrt(1+h-r-c);this._w=(a-i)/x,this._x=(o+d)/x,this._y=(f+p)/x,this._z=.25*x}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return r<Number.EPSILON?(r=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ye(this.dot(e),-1,1)))}rotateTowards(e,n){let r=this.angleTo(e);if(r===0)return this;let i=Math.min(1,n/r);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){let r=e._x,i=e._y,o=e._z,a=e._w,c=n._x,f=n._y,d=n._z,p=n._w;return this._x=r*p+a*c+i*d-o*f,this._y=i*p+a*f+o*c-r*d,this._z=o*p+a*d+r*f-i*c,this._w=a*p-r*c-i*f-o*d,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);let r=this._x,i=this._y,o=this._z,a=this._w,c=a*e._w+r*e._x+i*e._y+o*e._z;if(c<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,c=-c):this.copy(e),c>=1)return this._w=a,this._x=r,this._y=i,this._z=o,this;let f=1-c*c;if(f<=Number.EPSILON){let x=1-n;return this._w=x*a+n*this._w,this._x=x*r+n*this._x,this._y=x*i+n*this._y,this._z=x*o+n*this._z,this.normalize(),this}let d=Math.sqrt(f),p=Math.atan2(d,c),h=Math.sin((1-n)*p)/d,g=Math.sin(n*p)/d;return this._w=a*h+this._w*g,this._x=r*h+this._x*g,this._y=i*h+this._y*g,this._z=o*h+this._z*g,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){let e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),r=Math.random(),i=Math.sqrt(1-r),o=Math.sqrt(r);return this.set(i*Math.sin(e),i*Math.cos(e),o*Math.sin(n),o*Math.cos(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}};s(Su,"Quaternion");var ci=Su,Ua=class Ua{constructor(e=0,n=0,r=0){Ua.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(vh.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(vh.setFromAxisAngle(e,n))}applyMatrix3(e){let n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let n=this.x,r=this.y,i=this.z,o=e.elements,a=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*a,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*a,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*a,this}applyQuaternion(e){let n=this.x,r=this.y,i=this.z,o=e.x,a=e.y,c=e.z,f=e.w,d=2*(a*i-c*r),p=2*(c*n-o*i),h=2*(o*r-a*n);return this.x=n+f*d+a*h-c*p,this.y=r+f*p+c*d-o*h,this.z=i+f*h+o*p-a*d,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Ye(this.x,e.x,n.x),this.y=Ye(this.y,e.y,n.y),this.z=Ye(this.z,e.z,n.z),this}clampScalar(e,n){return this.x=Ye(this.x,e,n),this.y=Ye(this.y,e,n),this.z=Ye(this.z,e,n),this}clampLength(e,n){let r=this.length();return this.divideScalar(r||1).multiplyScalar(Ye(r,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){let r=e.x,i=e.y,o=e.z,a=n.x,c=n.y,f=n.z;return this.x=i*f-o*c,this.y=o*a-r*f,this.z=r*c-i*a,this}projectOnVector(e){let n=e.lengthSq();if(n===0)return this.set(0,0,0);let r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return Bl.copy(this).projectOnVector(e),this.sub(Bl)}reflect(e){return this.sub(Bl.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;let r=this.dot(e)/n;return Math.acos(Ye(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,r){let i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){let n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){let n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,n=Math.random()*2-1,r=Math.sqrt(1-n*n);return this.x=r*Math.cos(e),this.y=n,this.z=r*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};s(Ua,"Vector3");var Ne=Ua,Bl=new Ne,vh=new ci;var Ao=class Ao{constructor(e,n,r,i,o,a,c,f,d,p,h,g,x,b,E,R){Ao.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,a,c,f,d,p,h,g,x,b,E,R)}set(e,n,r,i,o,a,c,f,d,p,h,g,x,b,E,R){let A=this.elements;return A[0]=e,A[4]=n,A[8]=r,A[12]=i,A[1]=o,A[5]=a,A[9]=c,A[13]=f,A[2]=d,A[6]=p,A[10]=h,A[14]=g,A[3]=x,A[7]=b,A[11]=E,A[15]=R,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Ao().fromArray(this.elements)}copy(e){let n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){let n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){let n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){let n=this.elements,r=e.elements,i=1/us.setFromMatrixColumn(e,0).length(),o=1/us.setFromMatrixColumn(e,1).length(),a=1/us.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*a,n[9]=r[9]*a,n[10]=r[10]*a,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){let n=this.elements,r=e.x,i=e.y,o=e.z,a=Math.cos(r),c=Math.sin(r),f=Math.cos(i),d=Math.sin(i),p=Math.cos(o),h=Math.sin(o);if(e.order==="XYZ"){let g=a*p,x=a*h,b=c*p,E=c*h;n[0]=f*p,n[4]=-f*h,n[8]=d,n[1]=x+b*d,n[5]=g-E*d,n[9]=-c*f,n[2]=E-g*d,n[6]=b+x*d,n[10]=a*f}else if(e.order==="YXZ"){let g=f*p,x=f*h,b=d*p,E=d*h;n[0]=g+E*c,n[4]=b*c-x,n[8]=a*d,n[1]=a*h,n[5]=a*p,n[9]=-c,n[2]=x*c-b,n[6]=E+g*c,n[10]=a*f}else if(e.order==="ZXY"){let g=f*p,x=f*h,b=d*p,E=d*h;n[0]=g-E*c,n[4]=-a*h,n[8]=b+x*c,n[1]=x+b*c,n[5]=a*p,n[9]=E-g*c,n[2]=-a*d,n[6]=c,n[10]=a*f}else if(e.order==="ZYX"){let g=a*p,x=a*h,b=c*p,E=c*h;n[0]=f*p,n[4]=b*d-x,n[8]=g*d+E,n[1]=f*h,n[5]=E*d+g,n[9]=x*d-b,n[2]=-d,n[6]=c*f,n[10]=a*f}else if(e.order==="YZX"){let g=a*f,x=a*d,b=c*f,E=c*d;n[0]=f*p,n[4]=E-g*h,n[8]=b*h+x,n[1]=h,n[5]=a*p,n[9]=-c*p,n[2]=-d*p,n[6]=x*h+b,n[10]=g-E*h}else if(e.order==="XZY"){let g=a*f,x=a*d,b=c*f,E=c*d;n[0]=f*p,n[4]=-h,n[8]=d*p,n[1]=g*h+E,n[5]=a*p,n[9]=x*h-b,n[2]=b*h-x,n[6]=c*p,n[10]=E*h+g}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(q_,e,K_)}lookAt(e,n,r){let i=this.elements;return pn.subVectors(e,n),pn.lengthSq()===0&&(pn.z=1),pn.normalize(),si.crossVectors(r,pn),si.lengthSq()===0&&(Math.abs(r.z)===1?pn.x+=1e-4:pn.z+=1e-4,pn.normalize(),si.crossVectors(r,pn)),si.normalize(),Ia.crossVectors(pn,si),i[0]=si.x,i[4]=Ia.x,i[8]=pn.x,i[1]=si.y,i[5]=Ia.y,i[9]=pn.y,i[2]=si.z,i[6]=Ia.z,i[10]=pn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){let r=e.elements,i=n.elements,o=this.elements,a=r[0],c=r[4],f=r[8],d=r[12],p=r[1],h=r[5],g=r[9],x=r[13],b=r[2],E=r[6],R=r[10],A=r[14],Q=r[3],W=r[7],F=r[11],H=r[15],ie=i[0],X=i[4],Z=i[8],q=i[12],ve=i[1],he=i[5],Oe=i[9],mt=i[13],Be=i[2],ze=i[6],L=i[10],ee=i[14],ce=i[3],se=i[7],Ee=i[11],ut=i[15];return o[0]=a*ie+c*ve+f*Be+d*ce,o[4]=a*X+c*he+f*ze+d*se,o[8]=a*Z+c*Oe+f*L+d*Ee,o[12]=a*q+c*mt+f*ee+d*ut,o[1]=p*ie+h*ve+g*Be+x*ce,o[5]=p*X+h*he+g*ze+x*se,o[9]=p*Z+h*Oe+g*L+x*Ee,o[13]=p*q+h*mt+g*ee+x*ut,o[2]=b*ie+E*ve+R*Be+A*ce,o[6]=b*X+E*he+R*ze+A*se,o[10]=b*Z+E*Oe+R*L+A*Ee,o[14]=b*q+E*mt+R*ee+A*ut,o[3]=Q*ie+W*ve+F*Be+H*ce,o[7]=Q*X+W*he+F*ze+H*se,o[11]=Q*Z+W*Oe+F*L+H*Ee,o[15]=Q*q+W*mt+F*ee+H*ut,this}multiplyScalar(e){let n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){let e=this.elements,n=e[0],r=e[4],i=e[8],o=e[12],a=e[1],c=e[5],f=e[9],d=e[13],p=e[2],h=e[6],g=e[10],x=e[14],b=e[3],E=e[7],R=e[11],A=e[15];return b*(+o*f*h-i*d*h-o*c*g+r*d*g+i*c*x-r*f*x)+E*(+n*f*x-n*d*g+o*a*g-i*a*x+i*d*p-o*f*p)+R*(+n*d*h-n*c*x-o*a*h+r*a*x+o*c*p-r*d*p)+A*(-i*c*p-n*f*h+n*c*g+i*a*h-r*a*g+r*f*p)}transpose(){let e=this.elements,n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){let i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){let e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],c=e[5],f=e[6],d=e[7],p=e[8],h=e[9],g=e[10],x=e[11],b=e[12],E=e[13],R=e[14],A=e[15],Q=h*R*d-E*g*d+E*f*x-c*R*x-h*f*A+c*g*A,W=b*g*d-p*R*d-b*f*x+a*R*x+p*f*A-a*g*A,F=p*E*d-b*h*d+b*c*x-a*E*x-p*c*A+a*h*A,H=b*h*f-p*E*f-b*c*g+a*E*g+p*c*R-a*h*R,ie=n*Q+r*W+i*F+o*H;if(ie===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let X=1/ie;return e[0]=Q*X,e[1]=(E*g*o-h*R*o-E*i*x+r*R*x+h*i*A-r*g*A)*X,e[2]=(c*R*o-E*f*o+E*i*d-r*R*d-c*i*A+r*f*A)*X,e[3]=(h*f*o-c*g*o-h*i*d+r*g*d+c*i*x-r*f*x)*X,e[4]=W*X,e[5]=(p*R*o-b*g*o+b*i*x-n*R*x-p*i*A+n*g*A)*X,e[6]=(b*f*o-a*R*o-b*i*d+n*R*d+a*i*A-n*f*A)*X,e[7]=(a*g*o-p*f*o+p*i*d-n*g*d-a*i*x+n*f*x)*X,e[8]=F*X,e[9]=(b*h*o-p*E*o-b*r*x+n*E*x+p*r*A-n*h*A)*X,e[10]=(a*E*o-b*c*o+b*r*d-n*E*d-a*r*A+n*c*A)*X,e[11]=(p*c*o-a*h*o-p*r*d+n*h*d+a*r*x-n*c*x)*X,e[12]=H*X,e[13]=(p*E*i-b*h*i+b*r*g-n*E*g-p*r*R+n*h*R)*X,e[14]=(b*c*i-a*E*i-b*r*f+n*E*f+a*r*R-n*c*R)*X,e[15]=(a*h*i-p*c*i+p*r*f-n*h*f-a*r*g+n*c*g)*X,this}scale(e){let n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,r,i))}makeTranslation(e,n,r){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){let n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){let n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){let n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){let r=Math.cos(n),i=Math.sin(n),o=1-r,a=e.x,c=e.y,f=e.z,d=o*a,p=o*c;return this.set(d*a+r,d*c-i*f,d*f+i*c,0,d*c+i*f,p*c+r,p*f-i*a,0,d*f-i*c,p*f+i*a,o*f*f+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,o,a){return this.set(1,r,o,0,e,1,a,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){let i=this.elements,o=n._x,a=n._y,c=n._z,f=n._w,d=o+o,p=a+a,h=c+c,g=o*d,x=o*p,b=o*h,E=a*p,R=a*h,A=c*h,Q=f*d,W=f*p,F=f*h,H=r.x,ie=r.y,X=r.z;return i[0]=(1-(E+A))*H,i[1]=(x+F)*H,i[2]=(b-W)*H,i[3]=0,i[4]=(x-F)*ie,i[5]=(1-(g+A))*ie,i[6]=(R+Q)*ie,i[7]=0,i[8]=(b+W)*X,i[9]=(R-Q)*X,i[10]=(1-(g+E))*X,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){let i=this.elements,o=us.set(i[0],i[1],i[2]).length(),a=us.set(i[4],i[5],i[6]).length(),c=us.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],Xn.copy(this);let d=1/o,p=1/a,h=1/c;return Xn.elements[0]*=d,Xn.elements[1]*=d,Xn.elements[2]*=d,Xn.elements[4]*=p,Xn.elements[5]*=p,Xn.elements[6]*=p,Xn.elements[8]*=h,Xn.elements[9]*=h,Xn.elements[10]*=h,n.setFromRotationMatrix(Xn),r.x=o,r.y=a,r.z=c,this}makePerspective(e,n,r,i,o,a,c=To){let f=this.elements,d=2*o/(n-e),p=2*o/(r-i),h=(n+e)/(n-e),g=(r+i)/(r-i),x,b;if(c===To)x=-(a+o)/(a-o),b=-2*a*o/(a-o);else if(c===yh)x=-a/(a-o),b=-a*o/(a-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+c);return f[0]=d,f[4]=0,f[8]=h,f[12]=0,f[1]=0,f[5]=p,f[9]=g,f[13]=0,f[2]=0,f[6]=0,f[10]=x,f[14]=b,f[3]=0,f[7]=0,f[11]=-1,f[15]=0,this}makeOrthographic(e,n,r,i,o,a,c=To){let f=this.elements,d=1/(n-e),p=1/(r-i),h=1/(a-o),g=(n+e)*d,x=(r+i)*p,b,E;if(c===To)b=(a+o)*h,E=-2*h;else if(c===yh)b=o*h,E=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+c);return f[0]=2*d,f[4]=0,f[8]=0,f[12]=-g,f[1]=0,f[5]=2*p,f[9]=0,f[13]=-x,f[2]=0,f[6]=0,f[10]=E,f[14]=-b,f[3]=0,f[7]=0,f[11]=0,f[15]=1,this}equals(e){let n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){let r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}};s(Ao,"Matrix4");var Pr=Ao,us=new Ne,Xn=new Pr,q_=new Ne(0,0,0),K_=new Ne(1,1,1),si=new Ne,Ia=new Ne,pn=new Ne,bh=new Pr,Sh=new ci,Da=class Da{constructor(e=0,n=0,r=0,i=Da.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,r=!0){let i=e.elements,o=i[0],a=i[4],c=i[8],f=i[1],d=i[5],p=i[9],h=i[2],g=i[6],x=i[10];switch(n){case"XYZ":this._y=Math.asin(Ye(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-p,x),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(g,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Ye(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(c,x),this._z=Math.atan2(f,d)):(this._y=Math.atan2(-h,o),this._z=0);break;case"ZXY":this._x=Math.asin(Ye(g,-1,1)),Math.abs(g)<.9999999?(this._y=Math.atan2(-h,x),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(f,o));break;case"ZYX":this._y=Math.asin(-Ye(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(g,x),this._z=Math.atan2(f,o)):(this._x=0,this._z=Math.atan2(-a,d));break;case"YZX":this._z=Math.asin(Ye(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(-p,d),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(c,x));break;case"XZY":this._z=Math.asin(-Ye(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(g,d),this._y=Math.atan2(c,o)):(this._x=Math.atan2(-p,x),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return bh.makeRotationFromQuaternion(e),this.setFromRotationMatrix(bh,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return Sh.setFromEuler(this),this.setFromQuaternion(Sh,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};s(Da,"Euler");var Co=Da;Co.DEFAULT_ORDER="XYZ";var Mu=class Mu{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}};s(Mu,"Layers");var Fa=Mu,Y_=0,Mh=new Ne,fs=new ci,Rr=new Pr,Ta=new Ne,Eo=new Ne,Z_=new Ne,J_=new ci,wh=new Ne(1,0,0),Eh=new Ne(0,1,0),Ih=new Ne(0,0,1),Th={type:"added"},Q_={type:"removed"},ds={type:"childadded",child:null},zl={type:"childremoved",child:null},hs=class hs extends Ro{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Y_++}),this.uuid=gu(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=hs.DEFAULT_UP.clone();let e=new Ne,n=new Co,r=new ci,i=new Ne(1,1,1);function o(){r.setFromEuler(n,!1)}s(o,"onRotationChange");function a(){n.setFromQuaternion(r,void 0,!1)}s(a,"onQuaternionChange"),n._onChange(o),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Pr},normalMatrix:{value:new pe}}),this.matrix=new Pr,this.matrixWorld=new Pr,this.matrixAutoUpdate=hs.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=hs.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Fa,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,n){this.quaternion.setFromAxisAngle(e,n)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,n){return fs.setFromAxisAngle(e,n),this.quaternion.multiply(fs),this}rotateOnWorldAxis(e,n){return fs.setFromAxisAngle(e,n),this.quaternion.premultiply(fs),this}rotateX(e){return this.rotateOnAxis(wh,e)}rotateY(e){return this.rotateOnAxis(Eh,e)}rotateZ(e){return this.rotateOnAxis(Ih,e)}translateOnAxis(e,n){return Mh.copy(e).applyQuaternion(this.quaternion),this.position.add(Mh.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(wh,e)}translateY(e){return this.translateOnAxis(Eh,e)}translateZ(e){return this.translateOnAxis(Ih,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Rr.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?Ta.copy(e):Ta.set(e,n,r);let i=this.parent;this.updateWorldMatrix(!0,!1),Eo.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Rr.lookAt(Eo,Ta,this.up):Rr.lookAt(Ta,Eo,this.up),this.quaternion.setFromRotationMatrix(Rr),i&&(Rr.extractRotation(i.matrixWorld),fs.setFromRotationMatrix(Rr),this.quaternion.premultiply(fs.invert()))}add(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(Th),ds.child=e,this.dispatchEvent(ds),ds.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let n=this.children.indexOf(e);return n!==-1&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(Q_),zl.child=e,this.dispatchEvent(zl),zl.child=null),this}removeFromParent(){let e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),Rr.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Rr.multiply(e.parent.matrixWorld)),e.applyMatrix4(Rr),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(Th),ds.child=e,this.dispatchEvent(ds),ds.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,n){if(this[e]===n)return this;for(let r=0,i=this.children.length;r<i;r++){let a=this.children[r].getObjectByProperty(e,n);if(a!==void 0)return a}}getObjectsByProperty(e,n,r=[]){this[e]===n&&r.push(this);let i=this.children;for(let o=0,a=i.length;o<a;o++)i[o].getObjectsByProperty(e,n,r);return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Eo,e,Z_),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Eo,J_,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);let n=this.children;for(let r=0,i=n.length;r<i;r++)n[r].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);let n=this.children;for(let r=0,i=n.length;r<i;r++)n[r].traverseVisible(e)}traverseAncestors(e){let n=this.parent;n!==null&&(e(n),n.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);let n=this.children;for(let r=0,i=n.length;r<i;r++)n[r].updateMatrixWorld(e)}updateWorldMatrix(e,n){let r=this.parent;if(e===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){let i=this.children;for(let o=0,a=i.length;o<a;o++)i[o].updateWorldMatrix(!1,!0)}}toJSON(e){let n=e===void 0||typeof e=="string",r={};n&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});let i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(c=>({boxInitialized:c.boxInitialized,boxMin:c.box.min.toArray(),boxMax:c.box.max.toArray(),sphereInitialized:c.sphereInitialized,sphereRadius:c.sphere.radius,sphereCenter:c.sphere.center.toArray()})),i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function o(c,f){return c[f.uuid]===void 0&&(c[f.uuid]=f.toJSON(e)),f.uuid}if(s(o,"serialize"),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=o(e.geometries,this.geometry);let c=this.geometry.parameters;if(c!==void 0&&c.shapes!==void 0){let f=c.shapes;if(Array.isArray(f))for(let d=0,p=f.length;d<p;d++){let h=f[d];o(e.shapes,h)}else o(e.shapes,f)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(o(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let c=[];for(let f=0,d=this.material.length;f<d;f++)c.push(o(e.materials,this.material[f]));i.material=c}else i.material=o(e.materials,this.material);if(this.children.length>0){i.children=[];for(let c=0;c<this.children.length;c++)i.children.push(this.children[c].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let c=0;c<this.animations.length;c++){let f=this.animations[c];i.animations.push(o(e.animations,f))}}if(n){let c=a(e.geometries),f=a(e.materials),d=a(e.textures),p=a(e.images),h=a(e.shapes),g=a(e.skeletons),x=a(e.animations),b=a(e.nodes);c.length>0&&(r.geometries=c),f.length>0&&(r.materials=f),d.length>0&&(r.textures=d),p.length>0&&(r.images=p),h.length>0&&(r.shapes=h),g.length>0&&(r.skeletons=g),x.length>0&&(r.animations=x),b.length>0&&(r.nodes=b)}return r.object=i,r;function a(c){let f=[];for(let d in c){let p=c[d];delete p.metadata,f.push(p)}return f}s(a,"extractFromCache")}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r<e.children.length;r++){let i=e.children[r];this.add(i.clone())}return this}};s(hs,"Object3D");var Po=hs;Po.DEFAULT_UP=new Ne(0,1,0);Po.DEFAULT_MATRIX_AUTO_UPDATE=!0;Po.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var Oh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},oi={h:0,s:0,l:0},Aa={h:0,s:0,l:0};function Vl(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}s(Vl,"hue2rgb");var wu=class wu{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,r)}set(e,n,r){if(n===void 0&&r===void 0){let i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,n,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=Tn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,In.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=In.workingColorSpace){return this.r=e,this.g=n,this.b=r,In.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=In.workingColorSpace){if(e=$_(e,1),n=Ye(n,0,1),r=Ye(r,0,1),n===0)this.r=this.g=this.b=r;else{let o=r<=.5?r*(1+n):r+n-r*n,a=2*r-o;this.r=Vl(a,o,e+1/3),this.g=Vl(a,o,e),this.b=Vl(a,o,e-1/3)}return In.toWorkingColorSpace(this,i),this}setStyle(e,n=Tn){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}s(r,"handleAlpha");let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o,a=i[1],c=i[2];switch(a){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(c))return r(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,n);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(c))return r(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,n);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(c))return r(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=i[1],a=o.length;if(a===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(a===6)return this.setHex(parseInt(o,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Tn){let r=Oh[e.toLowerCase()];return r!==void 0?this.setHex(r,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Cr(e.r),this.g=Cr(e.g),this.b=Cr(e.b),this}copyLinearToSRGB(e){return this.r=ms(e.r),this.g=ms(e.g),this.b=ms(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Tn){return In.fromWorkingColorSpace(Vt.copy(this),e),Math.round(Ye(Vt.r*255,0,255))*65536+Math.round(Ye(Vt.g*255,0,255))*256+Math.round(Ye(Vt.b*255,0,255))}getHexString(e=Tn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=In.workingColorSpace){In.fromWorkingColorSpace(Vt.copy(this),n);let r=Vt.r,i=Vt.g,o=Vt.b,a=Math.max(r,i,o),c=Math.min(r,i,o),f,d,p=(c+a)/2;if(c===a)f=0,d=0;else{let h=a-c;switch(d=p<=.5?h/(a+c):h/(2-a-c),a){case r:f=(i-o)/h+(i<o?6:0);break;case i:f=(o-r)/h+2;break;case o:f=(r-i)/h+4;break}f/=6}return e.h=f,e.s=d,e.l=p,e}getRGB(e,n=In.workingColorSpace){return In.fromWorkingColorSpace(Vt.copy(this),n),e.r=Vt.r,e.g=Vt.g,e.b=Vt.b,e}getStyle(e=Tn){In.fromWorkingColorSpace(Vt.copy(this),e);let n=Vt.r,r=Vt.g,i=Vt.b;return e!==Tn?"color(".concat(e," ").concat(n.toFixed(3)," ").concat(r.toFixed(3)," ").concat(i.toFixed(3),")"):"rgb(".concat(Math.round(n*255),",").concat(Math.round(r*255),",").concat(Math.round(i*255),")")}offsetHSL(e,n,r){return this.getHSL(oi),this.setHSL(oi.h+e,oi.s+n,oi.l+r)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,n){return this.r=e.r+n.r,this.g=e.g+n.g,this.b=e.b+n.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,n){return this.r+=(e.r-this.r)*n,this.g+=(e.g-this.g)*n,this.b+=(e.b-this.b)*n,this}lerpColors(e,n,r){return this.r=e.r+(n.r-e.r)*r,this.g=e.g+(n.g-e.g)*r,this.b=e.b+(n.b-e.b)*r,this}lerpHSL(e,n){this.getHSL(oi),e.getHSL(Aa);let r=Ul(oi.h,Aa.h,n),i=Ul(oi.s,Aa.s,n),o=Ul(oi.l,Aa.l,n);return this.setHSL(r,i,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let n=this.r,r=this.g,i=this.b,o=e.elements;return this.r=o[0]*n+o[3]*r+o[6]*i,this.g=o[1]*n+o[4]*r+o[7]*i,this.b=o[2]*n+o[5]*r+o[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,n=0){return this.r=e[n],this.g=e[n+1],this.b=e[n+2],this}toArray(e=[],n=0){return e[n]=this.r,e[n+1]=this.g,e[n+2]=this.b,e}fromBufferAttribute(e,n){return this.r=e.getX(n),this.g=e.getY(n),this.b=e.getZ(n),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}};s(wu,"Color");var yt=wu,Vt=new yt;yt.NAMES=Oh;function Lh(t){let e={};for(let n in t){e[n]={};for(let r in t[n]){let i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[n][r]=null):e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}}return e}s(Lh,"cloneUniforms");function Jt(t){let e={};for(let n=0;n<t.length;n++){let r=Lh(t[n]);for(let i in r)e[i]=r[i]}return e}s(Jt,"mergeUniforms");function Ra(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}s(Ra,"convertArray");function ev(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}s(ev,"isTypedArray");var Eu=class Eu{constructor(e,n,r,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new n.constructor(r),this.sampleValues=n,this.valueSize=r,this.settings=null,this.DefaultSettings_={}}evaluate(e){let n=this.parameterPositions,r=this._cachedIndex,i=n[r],o=n[r-1];n:{e:{let a;t:{r:if(!(e<i)){for(let c=r+2;;){if(i===void 0){if(e<o)break r;return r=n.length,this._cachedIndex=r,this.copySampleValue_(r-1)}if(r===c)break;if(o=i,i=n[++r],e<i)break e}a=n.length;break t}if(!(e>=o)){let c=n[1];e<c&&(r=2,o=c);for(let f=r-2;;){if(o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===f)break;if(i=o,o=n[--r-1],e>=o)break e}a=r,r=0;break t}break n}for(;r<a;){let c=r+a>>>1;e<n[c]?a=c:r=c+1}if(i=n[r],o=n[r-1],o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return r=n.length,this._cachedIndex=r,this.copySampleValue_(r-1)}this._cachedIndex=r,this.intervalChanged_(r,o,i)}return this.interpolate_(r,o,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){let n=this.resultBuffer,r=this.sampleValues,i=this.valueSize,o=e*i;for(let a=0;a!==i;++a)n[a]=r[o+a];return n}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}};s(Eu,"Interpolant");var ys=Eu,Iu=class Iu extends ys{constructor(e,n,r,i){super(e,n,r,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:hh,endingEnd:hh}}intervalChanged_(e,n,r){let i=this.parameterPositions,o=e-2,a=e+1,c=i[o],f=i[a];if(c===void 0)switch(this.getSettings_().endingStart){case mh:o=e,c=2*n-r;break;case gh:o=i.length-2,c=n+i[o]-i[o+1];break;default:o=e,c=r}if(f===void 0)switch(this.getSettings_().endingEnd){case mh:a=e,f=2*r-n;break;case gh:a=1,f=r+i[1]-i[0];break;default:a=e-1,f=n}let d=(r-n)*.5,p=this.valueSize;this._weightPrev=d/(n-c),this._weightNext=d/(f-r),this._offsetPrev=o*p,this._offsetNext=a*p}interpolate_(e,n,r,i){let o=this.resultBuffer,a=this.sampleValues,c=this.valueSize,f=e*c,d=f-c,p=this._offsetPrev,h=this._offsetNext,g=this._weightPrev,x=this._weightNext,b=(r-n)/(i-n),E=b*b,R=E*b,A=-g*R+2*g*E-g*b,Q=(1+g)*R+(-1.5-2*g)*E+(-.5+g)*b+1,W=(-1-x)*R+(1.5+x)*E+.5*b,F=x*R-x*E;for(let H=0;H!==c;++H)o[H]=A*a[p+H]+Q*a[d+H]+W*a[f+H]+F*a[h+H];return o}};s(Iu,"CubicInterpolant");var Yl=Iu,Tu=class Tu extends ys{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){let o=this.resultBuffer,a=this.sampleValues,c=this.valueSize,f=e*c,d=f-c,p=(r-n)/(i-n),h=1-p;for(let g=0;g!==c;++g)o[g]=a[d+g]*h+a[f+g]*p;return o}};s(Tu,"LinearInterpolant");var Zl=Tu,Au=class Au extends ys{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e){return this.copySampleValue_(e-1)}};s(Au,"DiscreteInterpolant");var Jl=Au,Ru=class Ru{constructor(e,n,r,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(n===void 0||n.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Ra(n,this.TimeBufferType),this.values=Ra(r,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){let n=e.constructor,r;if(n.toJSON!==this.toJSON)r=n.toJSON(e);else{r={name:e.name,times:Ra(e.times,Array),values:Ra(e.values,Array)};let i=e.getInterpolation();i!==e.DefaultInterpolation&&(r.interpolation=i)}return r.type=e.ValueTypeName,r}InterpolantFactoryMethodDiscrete(e){return new Jl(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Zl(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Yl(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let n;switch(e){case Pa:n=this.InterpolantFactoryMethodDiscrete;break;case $l:n=this.InterpolantFactoryMethodLinear;break;case Nl:n=this.InterpolantFactoryMethodSmooth;break}if(n===void 0){let r="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(r);return console.warn("THREE.KeyframeTrack:",r),this}return this.createInterpolant=n,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Pa;case this.InterpolantFactoryMethodLinear:return $l;case this.InterpolantFactoryMethodSmooth:return Nl}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){let n=this.times;for(let r=0,i=n.length;r!==i;++r)n[r]+=e}return this}scale(e){if(e!==1){let n=this.times;for(let r=0,i=n.length;r!==i;++r)n[r]*=e}return this}trim(e,n){let r=this.times,i=r.length,o=0,a=i-1;for(;o!==i&&r[o]<e;)++o;for(;a!==-1&&r[a]>n;)--a;if(++a,o!==0||a!==i){o>=a&&(a=Math.max(a,1),o=a-1);let c=this.getValueSize();this.times=r.slice(o,a),this.values=this.values.slice(o*c,a*c)}return this}validate(){let e=!0,n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);let r=this.times,i=this.values,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let c=0;c!==o;c++){let f=r[c];if(typeof f=="number"&&isNaN(f)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,c,f),e=!1;break}if(a!==null&&a>f){console.error("THREE.KeyframeTrack: Out of order keys.",this,c,f,a),e=!1;break}a=f}if(i!==void 0&&ev(i))for(let c=0,f=i.length;c!==f;++c){let d=i[c];if(isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,c,d),e=!1;break}}return e}optimize(){let e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===Nl,o=e.length-1,a=1;for(let c=1;c<o;++c){let f=!1,d=e[c],p=e[c+1];if(d!==p&&(c!==1||d!==e[0]))if(i)f=!0;else{let h=c*r,g=h-r,x=h+r;for(let b=0;b!==r;++b){let E=n[h+b];if(E!==n[g+b]||E!==n[x+b]){f=!0;break}}}if(f){if(c!==a){e[a]=e[c];let h=c*r,g=a*r;for(let x=0;x!==r;++x)n[g+x]=n[h+x]}++a}}if(o>0){e[a]=e[o];for(let c=o*r,f=a*r,d=0;d!==r;++d)n[f+d]=n[c+d];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=n.slice(0,a*r)):(this.times=e,this.values=n),this}clone(){let e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}};s(Ru,"KeyframeTrack");var Kn=Ru;Kn.prototype.TimeBufferType=Float32Array;Kn.prototype.ValueBufferType=Float32Array;Kn.prototype.DefaultInterpolation=$l;var Cu=class Cu extends Kn{constructor(e,n,r){super(e,n,r)}};s(Cu,"BooleanKeyframeTrack");var Ei=Cu;Ei.prototype.ValueTypeName="bool";Ei.prototype.ValueBufferType=Array;Ei.prototype.DefaultInterpolation=Pa;Ei.prototype.InterpolantFactoryMethodLinear=void 0;Ei.prototype.InterpolantFactoryMethodSmooth=void 0;var Pu=class Pu extends Kn{};s(Pu,"ColorKeyframeTrack");var Ql=Pu;Ql.prototype.ValueTypeName="color";var Fu=class Fu extends Kn{};s(Fu,"NumberKeyframeTrack");var eu=Fu;eu.prototype.ValueTypeName="number";var Ou=class Ou extends ys{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){let o=this.resultBuffer,a=this.sampleValues,c=this.valueSize,f=(r-n)/(i-n),d=e*c;for(let p=d+c;d!==p;d+=4)ci.slerpFlat(o,0,a,d-c,a,d,f);return o}};s(Ou,"QuaternionLinearInterpolant");var tu=Ou,Lu=class Lu extends Kn{InterpolantFactoryMethodLinear(e){return new tu(this.times,this.values,this.getValueSize(),e)}};s(Lu,"QuaternionKeyframeTrack");var Oa=Lu;Oa.prototype.ValueTypeName="quaternion";Oa.prototype.InterpolantFactoryMethodSmooth=void 0;var Nu=class Nu extends Kn{constructor(e,n,r){super(e,n,r)}};s(Nu,"StringKeyframeTrack");var Ii=Nu;Ii.prototype.ValueTypeName="string";Ii.prototype.ValueBufferType=Array;Ii.prototype.DefaultInterpolation=Pa;Ii.prototype.InterpolantFactoryMethodLinear=void 0;Ii.prototype.InterpolantFactoryMethodSmooth=void 0;var Uu=class Uu extends Kn{};s(Uu,"VectorKeyframeTrack");var nu=Uu;nu.prototype.ValueTypeName="vector";var Du=class Du{constructor(e,n,r){let i=this,o=!1,a=0,c=0,f,d=[];this.onStart=void 0,this.onLoad=e,this.onProgress=n,this.onError=r,this.itemStart=function(p){c++,o===!1&&i.onStart!==void 0&&i.onStart(p,a,c),o=!0},this.itemEnd=function(p){a++,i.onProgress!==void 0&&i.onProgress(p,a,c),a===c&&(o=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(p){i.onError!==void 0&&i.onError(p)},this.resolveURL=function(p){return f?f(p):p},this.setURLModifier=function(p){return f=p,this},this.addHandler=function(p,h){return d.push(p,h),this},this.removeHandler=function(p){let h=d.indexOf(p);return h!==-1&&d.splice(h,2),this},this.getHandler=function(p){for(let h=0,g=d.length;h<g;h+=2){let x=d[h],b=d[h+1];if(x.global&&(x.lastIndex=0),x.test(p))return b}return null}}};s(Du,"LoadingManager");var ru=Du,tv=new ru,ku=class ku{constructor(e){this.manager=e!==void 0?e:tv,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,n){let r=this;return new Promise(function(i,o){r.load(e,i,n,o)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}};s(ku,"Loader");var iu=ku;iu.DEFAULT_MATERIAL_NAME="__DEFAULT";var yu="\\[\\]\\.:\\/",nv=new RegExp("["+yu+"]","g"),xu="[^"+yu+"]",rv="[^"+yu.replace("\\.","")+"]",iv=/((?:WC+[\/:])*)/.source.replace("WC",xu),sv=/(WCOD+)?/.source.replace("WCOD",rv),ov=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",xu),av=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",xu),cv=new RegExp("^"+iv+sv+ov+av+"$"),lv=["material","materials","bones","map"],Bu=class Bu{constructor(e,n,r){let i=r||it.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();let r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){let r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=r.length;i!==o;++i)r[i].setValue(e,n)}bind(){let e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){let e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}};s(Bu,"Composite");var su=Bu,ai=class ai{constructor(e,n,r){this.path=n,this.parsedPath=r||ai.parseTrackName(n),this.node=ai.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new ai.Composite(e,n,r):new ai(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(nv,"")}static parseTrackName(e){let n=cv.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);let r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let o=r.nodeName.substring(i+1);lv.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){let r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){let r=s(function(o){for(let a=0;a<o.length;a++){let c=o[a];if(c.name===n||c.uuid===n)return c;let f=r(c.children);if(f)return f}return null},"searchNodeSubtree"),i=r(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,n){e[n]=this.targetObject[this.propertyName]}_getValue_array(e,n){let r=this.resolvedProperty;for(let i=0,o=r.length;i!==o;++i)e[n++]=r[i]}_getValue_arrayElement(e,n){e[n]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,n){this.resolvedProperty.toArray(e,n)}_setValue_direct(e,n){this.targetObject[this.propertyName]=e[n]}_setValue_direct_setNeedsUpdate(e,n){this.targetObject[this.propertyName]=e[n],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,n){this.targetObject[this.propertyName]=e[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,n){let r=this.resolvedProperty;for(let i=0,o=r.length;i!==o;++i)r[i]=e[n++]}_setValue_array_setNeedsUpdate(e,n){let r=this.resolvedProperty;for(let i=0,o=r.length;i!==o;++i)r[i]=e[n++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,n){let r=this.resolvedProperty;for(let i=0,o=r.length;i!==o;++i)r[i]=e[n++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,n){this.resolvedProperty[this.propertyIndex]=e[n]}_setValue_arrayElement_setNeedsUpdate(e,n){this.resolvedProperty[this.propertyIndex]=e[n],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,n){this.resolvedProperty[this.propertyIndex]=e[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,n){this.resolvedProperty.fromArray(e,n)}_setValue_fromArray_setNeedsUpdate(e,n){this.resolvedProperty.fromArray(e,n),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,n){this.resolvedProperty.fromArray(e,n),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,n){this.bind(),this.getValue(e,n)}_setValue_unbound(e,n){this.bind(),this.setValue(e,n)}bind(){let e=this.node,n=this.parsedPath,r=n.objectName,i=n.propertyName,o=n.propertyIndex;if(e||(e=ai.findNode(this.rootNode,n.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(r){let d=n.objectIndex;switch(r){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let p=0;p<e.length;p++)if(e[p].name===d){d=p;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[r]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[r]}if(d!==void 0){if(e[d]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[d]}}let a=e[i];if(a===void 0){let d=n.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+d+"."+i+" but it wasn't found.",e);return}let c=this.Versioning.None;this.targetObject=e,e.isMaterial===!0?c=this.Versioning.NeedsUpdate:e.isObject3D===!0&&(c=this.Versioning.MatrixWorldNeedsUpdate);let f=this.BindingType.Direct;if(o!==void 0){if(i==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[o]!==void 0&&(o=e.morphTargetDictionary[o])}f=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=o}else a.fromArray!==void 0&&a.toArray!==void 0?(f=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(f=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=i;this.getValue=this.GetterByBindingType[f],this.setValue=this.SetterByBindingTypeAndVersioning[f][c]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};s(ai,"PropertyBinding");var it=ai;it.Composite=su;it.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};it.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};it.prototype.GetterByBindingType=[it.prototype._getValue_direct,it.prototype._getValue_array,it.prototype._getValue_arrayElement,it.prototype._getValue_toArray];it.prototype.SetterByBindingTypeAndVersioning=[[it.prototype._setValue_direct,it.prototype._setValue_direct_setNeedsUpdate,it.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[it.prototype._setValue_array,it.prototype._setValue_array_setNeedsUpdate,it.prototype._setValue_array_setMatrixWorldNeedsUpdate],[it.prototype._setValue_arrayElement,it.prototype._setValue_arrayElement_setNeedsUpdate,it.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[it.prototype._setValue_fromArray,it.prototype._setValue_fromArray_setNeedsUpdate,it.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var tL=new Float32Array(1);typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:ou}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=ou);var uv="#ifdef USE_ALPHAHASH\n if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",fv="#ifdef USE_ALPHAHASH\n const float ALPHA_HASH_SCALE = 0.05;\n float hash2D( vec2 value ) {\n return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n }\n float hash3D( vec3 value ) {\n return hash2D( vec2( hash2D( value.xy ), value.z ) );\n }\n float getAlphaHashThreshold( vec3 position ) {\n float maxDeriv = max(\n length( dFdx( position.xyz ) ),\n length( dFdy( position.xyz ) )\n );\n float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n vec2 pixScales = vec2(\n exp2( floor( log2( pixScale ) ) ),\n exp2( ceil( log2( pixScale ) ) )\n );\n vec2 alpha = vec2(\n hash3D( floor( pixScales.x * position.xyz ) ),\n hash3D( floor( pixScales.y * position.xyz ) )\n );\n float lerpFactor = fract( log2( pixScale ) );\n float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n float a = min( lerpFactor, 1.0 - lerpFactor );\n vec3 cases = vec3(\n x * x / ( 2.0 * a * ( 1.0 - a ) ),\n ( x - 0.5 * a ) / ( 1.0 - a ),\n 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n );\n float threshold = ( x < ( 1.0 - a ) )\n ? ( ( x < a ) ? cases.x : cases.y )\n : cases.z;\n return clamp( threshold , 1.0e-6, 1.0 );\n }\n#endif",dv="#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",pv="#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",hv="#ifdef USE_ALPHATEST\n #ifdef ALPHA_TO_COVERAGE\n diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n if ( diffuseColor.a < alphaTest ) discard;\n #endif\n#endif",mv="#ifdef USE_ALPHATEST\n uniform float alphaTest;\n#endif",gv="#ifdef USE_AOMAP\n float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n #if defined( USE_CLEARCOAT ) \n clearcoatSpecularIndirect *= ambientOcclusion;\n #endif\n #if defined( USE_SHEEN ) \n sheenSpecularIndirect *= ambientOcclusion;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD )\n float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n #endif\n#endif",yv="#ifdef USE_AOMAP\n uniform sampler2D aoMap;\n uniform float aoMapIntensity;\n#endif",xv="#ifdef USE_BATCHING\n #if ! defined( GL_ANGLE_multi_draw )\n #define gl_DrawID _gl_DrawID\n uniform int _gl_DrawID;\n #endif\n uniform highp sampler2D batchingTexture;\n uniform highp usampler2D batchingIdTexture;\n mat4 getBatchingMatrix( const in float i ) {\n int size = textureSize( batchingTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n float getIndirectIndex( const in int i ) {\n int size = textureSize( batchingIdTexture, 0 ).x;\n int x = i % size;\n int y = i / size;\n return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n }\n#endif\n#ifdef USE_BATCHING_COLOR\n uniform sampler2D batchingColorTexture;\n vec3 getBatchingColor( const in float i ) {\n int size = textureSize( batchingColorTexture, 0 ).x;\n int j = int( i );\n int x = j % size;\n int y = j / size;\n return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n }\n#endif",_v="#ifdef USE_BATCHING\n mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif",vv="vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n vPosition = vec3( position );\n#endif",bv="vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n vec3 objectTangent = vec3( tangent.xyz );\n#endif",Sv="float G_BlinnPhong_Implicit( ) {\n return 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( specularColor, 1.0, dotVH );\n float G = G_BlinnPhong_Implicit( );\n float D = D_BlinnPhong( shininess, dotNH );\n return F * ( G * D );\n} // validated",Mv="#ifdef USE_IRIDESCENCE\n const mat3 XYZ_TO_REC709 = mat3(\n 3.2404542, -0.9692660, 0.0556434,\n -1.5371385, 1.8760108, -0.2040259,\n -0.4985314, 0.0415560, 1.0572252\n );\n vec3 Fresnel0ToIor( vec3 fresnel0 ) {\n vec3 sqrtF0 = sqrt( fresnel0 );\n return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n }\n vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n }\n float IorToFresnel0( float transmittedIor, float incidentIor ) {\n return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n }\n vec3 evalSensitivity( float OPD, vec3 shift ) {\n float phase = 2.0 * PI * OPD * 1.0e-9;\n vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n xyz /= 1.0685e-7;\n vec3 rgb = XYZ_TO_REC709 * xyz;\n return rgb;\n }\n vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n vec3 I;\n float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n float cosTheta2Sq = 1.0 - sinTheta2Sq;\n if ( cosTheta2Sq < 0.0 ) {\n return vec3( 1.0 );\n }\n float cosTheta2 = sqrt( cosTheta2Sq );\n float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n float R12 = F_Schlick( R0, 1.0, cosTheta1 );\n float T121 = 1.0 - R12;\n float phi12 = 0.0;\n if ( iridescenceIOR < outsideIOR ) phi12 = PI;\n float phi21 = PI - phi12;\n vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n vec3 phi23 = vec3( 0.0 );\n if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n vec3 phi = vec3( phi21 ) + phi23;\n vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n vec3 r123 = sqrt( R123 );\n vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n vec3 C0 = R12 + Rs;\n I = C0;\n vec3 Cm = Rs - T121;\n for ( int m = 1; m <= 2; ++ m ) {\n Cm *= r123;\n vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n I += Cm * Sm;\n }\n return max( I, vec3( 0.0 ) );\n }\n#endif",wv="#ifdef USE_BUMPMAP\n uniform sampler2D bumpMap;\n uniform float bumpScale;\n vec2 dHdxy_fwd() {\n vec2 dSTdx = dFdx( vBumpMapUv );\n vec2 dSTdy = dFdy( vBumpMapUv );\n float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n return vec2( dBx, dBy );\n }\n vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n vec3 vN = surf_norm;\n vec3 R1 = cross( vSigmaY, vN );\n vec3 R2 = cross( vN, vSigmaX );\n float fDet = dot( vSigmaX, R1 ) * faceDirection;\n vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n return normalize( abs( fDet ) * surf_norm - vGrad );\n }\n#endif",Ev="#if NUM_CLIPPING_PLANES > 0\n vec4 plane;\n #ifdef ALPHA_TO_COVERAGE\n float distanceToPlane, distanceGradient;\n float clipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n if ( clipOpacity == 0.0 ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n float unionClipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n }\n #pragma unroll_loop_end\n clipOpacity *= 1.0 - unionClipOpacity;\n #endif\n diffuseColor.a *= clipOpacity;\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n bool clipped = true;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n }\n #pragma unroll_loop_end\n if ( clipped ) discard;\n #endif\n #endif\n#endif",Iv="#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",Tv="#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n#endif",Av="#if NUM_CLIPPING_PLANES > 0\n vClipPosition = - mvPosition.xyz;\n#endif",Rv="#if defined( USE_COLOR_ALPHA )\n diffuseColor *= vColor;\n#elif defined( USE_COLOR )\n diffuseColor.rgb *= vColor;\n#endif",Cv="#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR )\n varying vec3 vColor;\n#endif",Pv="#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n varying vec3 vColor;\n#endif",Fv="#if defined( USE_COLOR_ALPHA )\n vColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n vColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n vColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n vColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n vColor.xyz *= batchingColor.xyz;\n#endif",Ov="#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n float precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n float precisionSafeLength( vec3 v ) {\n float maxComponent = max3( abs( v ) );\n return length( v / maxComponent ) * maxComponent;\n }\n#endif\nstruct IncidentLight {\n vec3 color;\n vec3 direction;\n bool visible;\n};\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n varying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n mat3 tmp;\n tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n return tmp;\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n return RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",Lv="#ifdef ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n #define cubeUV_minTileSize 16.0\n float getFace( vec3 direction ) {\n vec3 absDirection = abs( direction );\n float face = - 1.0;\n if ( absDirection.x > absDirection.z ) {\n if ( absDirection.x > absDirection.y )\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if ( absDirection.z > absDirection.y )\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n }\n vec2 getUV( vec3 direction, float face ) {\n vec2 uv;\n if ( face == 0.0 ) {\n uv = vec2( direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 1.0 ) {\n uv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n } else if ( face == 2.0 ) {\n uv = vec2( - direction.x, direction.y ) / abs( direction.z );\n } else if ( face == 3.0 ) {\n uv = vec2( - direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 4.0 ) {\n uv = vec2( - direction.x, direction.z ) / abs( direction.y );\n } else {\n uv = vec2( direction.x, direction.y ) / abs( direction.z );\n }\n return 0.5 * ( uv + 1.0 );\n }\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n float face = getFace( direction );\n float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n mipInt = max( mipInt, cubeUV_minMipLevel );\n float faceSize = exp2( mipInt );\n highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n if ( face > 2.0 ) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n uv.x += filterInt * 3.0 * cubeUV_minTileSize;\n uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n uv.x *= CUBEUV_TEXEL_WIDTH;\n uv.y *= CUBEUV_TEXEL_HEIGHT;\n #ifdef texture2DGradEXT\n return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n #else\n return texture2D( envMap, uv ).rgb;\n #endif\n }\n #define cubeUV_r0 1.0\n #define cubeUV_m0 - 2.0\n #define cubeUV_r1 0.8\n #define cubeUV_m1 - 1.0\n #define cubeUV_r4 0.4\n #define cubeUV_m4 2.0\n #define cubeUV_r5 0.305\n #define cubeUV_m5 3.0\n #define cubeUV_r6 0.21\n #define cubeUV_m6 4.0\n float roughnessToMip( float roughness ) {\n float mip = 0.0;\n if ( roughness >= cubeUV_r1 ) {\n mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n } else if ( roughness >= cubeUV_r4 ) {\n mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n } else if ( roughness >= cubeUV_r5 ) {\n mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n } else if ( roughness >= cubeUV_r6 ) {\n mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n } else {\n mip = - 2.0 * log2( 1.16 * roughness ); }\n return mip;\n }\n vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n float mipF = fract( mip );\n float mipInt = floor( mip );\n vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n if ( mipF == 0.0 ) {\n return vec4( color0, 1.0 );\n } else {\n vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n return vec4( mix( color0, color1, mipF ), 1.0 );\n }\n }\n#endif",Nv="vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n vec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n mat3 bm = mat3( batchingMatrix );\n transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n transformedNormal = bm * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = bm * transformedTangent;\n #endif\n#endif\n#ifdef USE_INSTANCING\n mat3 im = mat3( instanceMatrix );\n transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n transformedNormal = im * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = im * transformedTangent;\n #endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n transformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n #ifdef FLIP_SIDED\n transformedTangent = - transformedTangent;\n #endif\n#endif",Uv="#ifdef USE_DISPLACEMENTMAP\n uniform sampler2D displacementMap;\n uniform float displacementScale;\n uniform float displacementBias;\n#endif",Dv="#ifdef USE_DISPLACEMENTMAP\n transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",kv="#ifdef USE_EMISSIVEMAP\n vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n emissiveColor = sRGBTransferEOTF( emissiveColor );\n #endif\n totalEmissiveRadiance *= emissiveColor.rgb;\n#endif",Bv="#ifdef USE_EMISSIVEMAP\n uniform sampler2D emissiveMap;\n#endif",zv="gl_FragColor = linearToOutputTexel( gl_FragColor );",Vv="vec4 LinearTransferOETF( in vec4 value ) {\n return value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",Gv="#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vec3 cameraToFrag;\n if ( isOrthographic ) {\n cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToFrag = normalize( vWorldPosition - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vec3 reflectVec = reflect( cameraToFrag, worldNormal );\n #else\n vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n #endif\n #else\n vec3 reflectVec = vReflect;\n #endif\n #ifdef ENVMAP_TYPE_CUBE\n vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n #else\n vec4 envColor = vec4( 0.0 );\n #endif\n #ifdef ENVMAP_BLENDING_MULTIPLY\n outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_MIX )\n outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_ADD )\n outgoingLight += envColor.xyz * specularStrength * reflectivity;\n #endif\n#endif",Hv="#ifdef USE_ENVMAP\n uniform float envMapIntensity;\n uniform float flipEnvMap;\n uniform mat3 envMapRotation;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n #else\n uniform sampler2D envMap;\n #endif\n \n#endif",$v="#ifdef USE_ENVMAP\n uniform float reflectivity;\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n varying vec3 vWorldPosition;\n uniform float refractionRatio;\n #else\n varying vec3 vReflect;\n #endif\n#endif",Wv="#ifdef USE_ENVMAP\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n \n varying vec3 vWorldPosition;\n #else\n varying vec3 vReflect;\n uniform float refractionRatio;\n #endif\n#endif",jv="#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vWorldPosition = worldPosition.xyz;\n #else\n vec3 cameraToVertex;\n if ( isOrthographic ) {\n cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vReflect = reflect( cameraToVertex, worldNormal );\n #else\n vReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n #endif\n #endif\n#endif",Xv="#ifdef USE_FOG\n vFogDepth = - mvPosition.z;\n#endif",qv="#ifdef USE_FOG\n varying float vFogDepth;\n#endif",Kv="#ifdef USE_FOG\n #ifdef FOG_EXP2\n float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n #else\n float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n #endif\n gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",Yv="#ifdef USE_FOG\n uniform vec3 fogColor;\n varying float vFogDepth;\n #ifdef FOG_EXP2\n uniform float fogDensity;\n #else\n uniform float fogNear;\n uniform float fogFar;\n #endif\n#endif",Zv="#ifdef USE_GRADIENTMAP\n uniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n float dotNL = dot( normal, lightDirection );\n vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n #ifdef USE_GRADIENTMAP\n return vec3( texture2D( gradientMap, coord ).r );\n #else\n vec2 fw = fwidth( coord ) * 0.5;\n return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n #endif\n}",Jv="#ifdef USE_LIGHTMAP\n uniform sampler2D lightMap;\n uniform float lightMapIntensity;\n#endif",Qv="LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",eb="varying vec3 vViewPosition;\nstruct LambertMaterial {\n vec3 diffuseColor;\n float specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Lambert\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert",tb="uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n uniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n float x = normal.x, y = normal.y, z = normal.z;\n vec3 result = shCoefficients[ 0 ] * 0.886227;\n result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n return result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n return irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n vec3 irradiance = ambientLightColor;\n return irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n if ( cutoffDistance > 0.0 ) {\n distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n }\n return distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n return smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n struct DirectionalLight {\n vec3 direction;\n vec3 color;\n };\n uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n light.color = directionalLight.color;\n light.direction = directionalLight.direction;\n light.visible = true;\n }\n#endif\n#if NUM_POINT_LIGHTS > 0\n struct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n };\n uniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = pointLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float lightDistance = length( lVector );\n light.color = pointLight.color;\n light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n }\n#endif\n#if NUM_SPOT_LIGHTS > 0\n struct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n };\n uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = spotLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float angleCos = dot( light.direction, spotLight.direction );\n float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n if ( spotAttenuation > 0.0 ) {\n float lightDistance = length( lVector );\n light.color = spotLight.color * spotAttenuation;\n light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n } else {\n light.color = vec3( 0.0 );\n light.visible = false;\n }\n }\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n struct RectAreaLight {\n vec3 color;\n vec3 position;\n vec3 halfWidth;\n vec3 halfHeight;\n };\n uniform sampler2D ltc_1; uniform sampler2D ltc_2;\n uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n struct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n };\n uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n float dotNL = dot( normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n }\n#endif",nb="#ifdef USE_ENVMAP\n vec3 getIBLIrradiance( const in vec3 normal ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n return PI * envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 reflectVec = reflect( - viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n return envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n #ifdef USE_ANISOTROPY\n vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 bentNormal = cross( bitangent, viewDir );\n bentNormal = normalize( cross( bentNormal, bitangent ) );\n bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n return getIBLRadiance( viewDir, bentNormal, roughness );\n #else\n return vec3( 0.0 );\n #endif\n }\n #endif\n#endif",rb="ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",ib="varying vec3 vViewPosition;\nstruct ToonMaterial {\n vec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Toon\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon",sb="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",ob="varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n vec3 diffuseColor;\n vec3 specularColor;\n float specularShininess;\n float specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_BlinnPhong\n#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong",ab="PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n material.ior = ior;\n #ifdef USE_SPECULAR\n float specularIntensityFactor = specularIntensity;\n vec3 specularColorFactor = specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n #endif\n material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n #else\n float specularIntensityFactor = 1.0;\n vec3 specularColorFactor = vec3( 1.0 );\n material.specularF90 = 1.0;\n #endif\n material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n material.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n material.clearcoat = clearcoat;\n material.clearcoatRoughness = clearcoatRoughness;\n material.clearcoatF0 = vec3( 0.04 );\n material.clearcoatF90 = 1.0;\n #ifdef USE_CLEARCOATMAP\n material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n #endif\n #ifdef USE_CLEARCOAT_ROUGHNESSMAP\n material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n #endif\n material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n material.clearcoatRoughness += geometryRoughness;\n material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n material.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n material.iridescence = iridescence;\n material.iridescenceIOR = iridescenceIOR;\n #ifdef USE_IRIDESCENCEMAP\n material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n #endif\n #ifdef USE_IRIDESCENCE_THICKNESSMAP\n material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n #else\n material.iridescenceThickness = iridescenceThicknessMaximum;\n #endif\n#endif\n#ifdef USE_SHEEN\n material.sheenColor = sheenColor;\n #ifdef USE_SHEEN_COLORMAP\n material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n #endif\n material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n #ifdef USE_SHEEN_ROUGHNESSMAP\n material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n #ifdef USE_ANISOTROPYMAP\n mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n #else\n vec2 anisotropyV = anisotropyVector;\n #endif\n material.anisotropy = length( anisotropyV );\n if( material.anisotropy == 0.0 ) {\n anisotropyV = vec2( 1.0, 0.0 );\n } else {\n anisotropyV /= material.anisotropy;\n material.anisotropy = saturate( material.anisotropy );\n }\n material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",cb="struct PhysicalMaterial {\n vec3 diffuseColor;\n float roughness;\n vec3 specularColor;\n float specularF90;\n float dispersion;\n #ifdef USE_CLEARCOAT\n float clearcoat;\n float clearcoatRoughness;\n vec3 clearcoatF0;\n float clearcoatF90;\n #endif\n #ifdef USE_IRIDESCENCE\n float iridescence;\n float iridescenceIOR;\n float iridescenceThickness;\n vec3 iridescenceFresnel;\n vec3 iridescenceF0;\n #endif\n #ifdef USE_SHEEN\n vec3 sheenColor;\n float sheenRoughness;\n #endif\n #ifdef IOR\n float ior;\n #endif\n #ifdef USE_TRANSMISSION\n float transmission;\n float transmissionAlpha;\n float thickness;\n float attenuationDistance;\n vec3 attenuationColor;\n #endif\n #ifdef USE_ANISOTROPY\n float anisotropy;\n float alphaT;\n vec3 anisotropyT;\n vec3 anisotropyB;\n #endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n float a2 = pow2( alpha );\n float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n return 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n float v = 0.5 / ( gv + gl );\n return saturate(v);\n }\n float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n float a2 = alphaT * alphaB;\n highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n highp float v2 = dot( v, v );\n float w2 = a2 / v2;\n return RECIPROCAL_PI * a2 * pow2 ( w2 );\n }\n#endif\n#ifdef USE_CLEARCOAT\n vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n vec3 f0 = material.clearcoatF0;\n float f90 = material.clearcoatF90;\n float roughness = material.clearcoatRoughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n return F * ( V * D );\n }\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n vec3 f0 = material.specularColor;\n float f90 = material.specularF90;\n float roughness = material.roughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n #ifdef USE_IRIDESCENCE\n F = mix( F, material.iridescenceFresnel, material.iridescence );\n #endif\n #ifdef USE_ANISOTROPY\n float dotTL = dot( material.anisotropyT, lightDir );\n float dotTV = dot( material.anisotropyT, viewDir );\n float dotTH = dot( material.anisotropyT, halfDir );\n float dotBL = dot( material.anisotropyB, lightDir );\n float dotBV = dot( material.anisotropyB, viewDir );\n float dotBH = dot( material.anisotropyB, halfDir );\n float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n #else\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n #endif\n return F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n const float LUT_SIZE = 64.0;\n const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n const float LUT_BIAS = 0.5 / LUT_SIZE;\n float dotNV = saturate( dot( N, V ) );\n vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n uv = uv * LUT_SCALE + LUT_BIAS;\n return uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n float l = length( f );\n return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n float x = dot( v1, v2 );\n float y = abs( x );\n float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n float b = 3.4175940 + ( 4.1616724 + y ) * y;\n float v = a / b;\n float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n return cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n vec3 lightNormal = cross( v1, v2 );\n if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n vec3 T1, T2;\n T1 = normalize( V - N * dot( V, N ) );\n T2 = - cross( N, T1 );\n mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n vec3 coords[ 4 ];\n coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n coords[ 0 ] = normalize( coords[ 0 ] );\n coords[ 1 ] = normalize( coords[ 1 ] );\n coords[ 2 ] = normalize( coords[ 2 ] );\n coords[ 3 ] = normalize( coords[ 3 ] );\n vec3 vectorFormFactor = vec3( 0.0 );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n float result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n return vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n float alpha = pow2( roughness );\n float invAlpha = 1.0 / alpha;\n float cos2h = dotNH * dotNH;\n float sin2h = max( 1.0 - cos2h, 0.0078125 );\n return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float D = D_Charlie( sheenRoughness, dotNH );\n float V = V_Neubelt( dotNV, dotNL );\n return sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n float r2 = roughness * roughness;\n float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n return saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n return specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n #ifdef USE_IRIDESCENCE\n vec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n #else\n vec3 Fr = specularColor;\n #endif\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 normal = geometryNormal;\n vec3 viewDir = geometryViewDir;\n vec3 position = geometryPosition;\n vec3 lightPos = rectAreaLight.position;\n vec3 halfWidth = rectAreaLight.halfWidth;\n vec3 halfHeight = rectAreaLight.halfHeight;\n vec3 lightColor = rectAreaLight.color;\n float roughness = material.roughness;\n vec3 rectCoords[ 4 ];\n rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n vec2 uv = LTC_Uv( normal, viewDir, roughness );\n vec4 t1 = texture2D( ltc_1, uv );\n vec4 t2 = texture2D( ltc_2, uv );\n mat3 mInv = mat3(\n vec3( t1.x, 0, t1.y ),\n vec3( 0, 1, 0 ),\n vec3( t1.z, 0, t1.w )\n );\n vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n }\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n #ifdef USE_CLEARCOAT\n float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n vec3 ccIrradiance = dotNLcc * directLight.color;\n clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n #endif\n reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n #ifdef USE_CLEARCOAT\n clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n #endif\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n #ifdef USE_IRIDESCENCE\n computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n #else\n computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n #endif\n vec3 totalScattering = singleScattering + multiScattering;\n vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n reflectedLight.indirectSpecular += radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct RE_Direct_Physical\n#define RE_Direct_RectArea RE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular RE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lb="\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n geometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n float dotNVi = saturate( dot( normal, geometryViewDir ) );\n if ( material.iridescenceThickness == 0.0 ) {\n material.iridescence = 0.0;\n } else {\n material.iridescence = saturate( material.iridescence );\n }\n if ( material.iridescence > 0.0 ) {\n material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n }\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointLightInfo( pointLight, geometryPosition, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n vec4 spotColor;\n vec3 spotLightCoord;\n bool inSpotLightMap;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotLightInfo( spotLight, geometryPosition, directLight );\n #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n #else\n #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #endif\n #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n #endif\n #undef SPOT_LIGHT_MAP_INDEX\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalLightInfo( directionalLight, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n #if defined( USE_LIGHT_PROBES )\n irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n #endif\n #if ( NUM_HEMI_LIGHTS > 0 )\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n#endif",ub="#if defined( RE_IndirectDiffuse )\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n irradiance += lightMapIrradiance;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n iblIrradiance += getIBLIrradiance( geometryNormal );\n #endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n #ifdef USE_ANISOTROPY\n radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n #else\n radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n #endif\n #ifdef USE_CLEARCOAT\n clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n #endif\n#endif",fb="#if defined( RE_IndirectDiffuse )\n RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",db="#if defined( USE_LOGDEPTHBUF )\n gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",pb="#if defined( USE_LOGDEPTHBUF )\n uniform float logDepthBufFC;\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",hb="#ifdef USE_LOGDEPTHBUF\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",mb="#ifdef USE_LOGDEPTHBUF\n vFragDepth = 1.0 + gl_Position.w;\n vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",gb="#ifdef USE_MAP\n vec4 sampledDiffuseColor = texture2D( map, vMapUv );\n #ifdef DECODE_VIDEO_TEXTURE\n sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n #endif\n diffuseColor *= sampledDiffuseColor;\n#endif",yb="#ifdef USE_MAP\n uniform sampler2D map;\n#endif",xb="#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n #if defined( USE_POINTS_UV )\n vec2 uv = vUv;\n #else\n vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n #endif\n#endif\n#ifdef USE_MAP\n diffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",_b="#if defined( USE_POINTS_UV )\n varying vec2 vUv;\n#else\n #if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n uniform mat3 uvTransform;\n #endif\n#endif\n#ifdef USE_MAP\n uniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",vb="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n metalnessFactor *= texelMetalness.b;\n#endif",bb="#ifdef USE_METALNESSMAP\n uniform sampler2D metalnessMap;\n#endif",Sb="#ifdef USE_INSTANCING_MORPH\n float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n }\n#endif",Mb="#if defined( USE_MORPHCOLORS )\n vColor *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n #if defined( USE_COLOR_ALPHA )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n #elif defined( USE_COLOR )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n #endif\n }\n#endif",wb="#ifdef USE_MORPHNORMALS\n objectNormal *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",Eb="#ifdef USE_MORPHTARGETS\n #ifndef USE_INSTANCING_MORPH\n uniform float morphTargetBaseInfluence;\n uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n #endif\n uniform sampler2DArray morphTargetsTexture;\n uniform ivec2 morphTargetsTextureSize;\n vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n int y = texelIndex / morphTargetsTextureSize.x;\n int x = texelIndex - y * morphTargetsTextureSize.x;\n ivec3 morphUV = ivec3( x, y, morphTargetIndex );\n return texelFetch( morphTargetsTexture, morphUV, 0 );\n }\n#endif",Ib="#ifdef USE_MORPHTARGETS\n transformed *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",Tb="float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n vec3 fdx = dFdx( vViewPosition );\n vec3 fdy = dFdy( vViewPosition );\n vec3 normal = normalize( cross( fdx, fdy ) );\n#else\n vec3 normal = normalize( vNormal );\n #ifdef DOUBLE_SIDED\n normal *= faceDirection;\n #endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n #ifdef USE_TANGENT\n mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn = getTangentFrame( - vViewPosition, normal,\n #if defined( USE_NORMALMAP )\n vNormalMapUv\n #elif defined( USE_CLEARCOAT_NORMALMAP )\n vClearcoatNormalMapUv\n #else\n vUv\n #endif\n );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn[0] *= faceDirection;\n tbn[1] *= faceDirection;\n #endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n #ifdef USE_TANGENT\n mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn2[0] *= faceDirection;\n tbn2[1] *= faceDirection;\n #endif\n#endif\nvec3 nonPerturbedNormal = normal;",Ab="#ifdef USE_NORMALMAP_OBJECTSPACE\n normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n #ifdef FLIP_SIDED\n normal = - normal;\n #endif\n #ifdef DOUBLE_SIDED\n normal = normal * faceDirection;\n #endif\n normal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n normal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",Rb="#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",Cb="#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",Pb="#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #ifdef USE_TANGENT\n vTangent = normalize( transformedTangent );\n vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n #endif\n#endif",Fb="#ifdef USE_NORMALMAP\n uniform sampler2D normalMap;\n uniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n uniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n vec3 q0 = dFdx( eye_pos.xyz );\n vec3 q1 = dFdy( eye_pos.xyz );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n vec3 N = surf_norm;\n vec3 q1perp = cross( q1, N );\n vec3 q0perp = cross( N, q0 );\n vec3 T = q1perp * st0.x + q0perp * st1.x;\n vec3 B = q1perp * st0.y + q0perp * st1.y;\n float det = max( dot( T, T ), dot( B, B ) );\n float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n return mat3( T * scale, B * scale, N );\n }\n#endif",Ob="#ifdef USE_CLEARCOAT\n vec3 clearcoatNormal = nonPerturbedNormal;\n#endif",Lb="#ifdef USE_CLEARCOAT_NORMALMAP\n vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n clearcoatMapN.xy *= clearcoatNormalScale;\n clearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",Nb="#ifdef USE_CLEARCOATMAP\n uniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform sampler2D clearcoatNormalMap;\n uniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform sampler2D clearcoatRoughnessMap;\n#endif",Ub="#ifdef USE_IRIDESCENCEMAP\n uniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform sampler2D iridescenceThicknessMap;\n#endif",Db="#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",kb="vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n if( v <= 0.0 )\n return vec4( 0., 0., 0., 0. );\n if( v >= 1.0 )\n return vec4( 1., 1., 1., 1. );\n float vuf;\n float af = modf( v * PackFactors.a, vuf );\n float bf = modf( vuf * ShiftRight8, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n if( v <= 0.0 )\n return vec3( 0., 0., 0. );\n if( v >= 1.0 )\n return vec3( 1., 1., 1. );\n float vuf;\n float bf = modf( v * PackFactors.b, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n if( v <= 0.0 )\n return vec2( 0., 0. );\n if( v >= 1.0 )\n return vec2( 1., 1. );\n float vuf;\n float gf = modf( v * 256., vuf );\n return vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n return dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n return dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * depth - far );\n}",Bb="#ifdef PREMULTIPLIED_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif",zb="vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n mvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n mvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",Vb="#ifdef DITHERING\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",Gb="#ifdef DITHERING\n vec3 dithering( vec3 color ) {\n float grid_position = rand( gl_FragCoord.xy );\n vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n return color + dither_shift_RGB;\n }\n#endif",Hb="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n roughnessFactor *= texelRoughness.g;\n#endif",$b="#ifdef USE_ROUGHNESSMAP\n uniform sampler2D roughnessMap;\n#endif",Wb="#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n }\n vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n return unpackRGBATo2Half( texture2D( shadow, uv ) );\n }\n float VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n float occlusion = 1.0;\n vec2 distribution = texture2DDistribution( shadow, uv );\n float hard_shadow = step( compare , distribution.x );\n if (hard_shadow != 1.0 ) {\n float distance = compare - distribution.x ;\n float variance = max( 0.00000, distribution.y * distribution.y );\n float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n }\n return occlusion;\n }\n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n float shadow = 1.0;\n shadowCoord.xyz /= shadowCoord.w;\n shadowCoord.z += shadowBias;\n bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n bool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n if ( frustumTest ) {\n #if defined( SHADOWMAP_TYPE_PCF )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx0 = - texelSize.x * shadowRadius;\n float dy0 = - texelSize.y * shadowRadius;\n float dx1 = + texelSize.x * shadowRadius;\n float dy1 = + texelSize.y * shadowRadius;\n float dx2 = dx0 / 2.0;\n float dy2 = dy0 / 2.0;\n float dx3 = dx1 / 2.0;\n float dy3 = dy1 / 2.0;\n shadow = (\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n ) * ( 1.0 / 17.0 );\n #elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx = texelSize.x;\n float dy = texelSize.y;\n vec2 uv = shadowCoord.xy;\n vec2 f = fract( uv * shadowMapSize + 0.5 );\n uv -= f * texelSize;\n shadow = (\n texture2DCompare( shadowMap, uv, shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n f.x ),\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n f.x ),\n f.y )\n ) * ( 1.0 / 9.0 );\n #elif defined( SHADOWMAP_TYPE_VSM )\n shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n #else\n shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n vec2 cubeToUV( vec3 v, float texelSizeY ) {\n vec3 absV = abs( v );\n float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n absV *= scaleToCube;\n v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n vec2 planar = v.xy;\n float almostATexel = 1.5 * texelSizeY;\n float almostOne = 1.0 - almostATexel;\n if ( absV.z >= almostOne ) {\n if ( v.z > 0.0 )\n planar.x = 4.0 - v.x;\n } else if ( absV.x >= almostOne ) {\n float signX = sign( v.x );\n planar.x = v.z * signX + 2.0 * signX;\n } else if ( absV.y >= almostOne ) {\n float signY = sign( v.y );\n planar.x = v.x + 2.0 * signY + 2.0;\n planar.y = v.z * signY - 2.0;\n }\n return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n }\n float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n float shadow = 1.0;\n vec3 lightToPosition = shadowCoord.xyz;\n \n float lightToPositionLength = length( lightToPosition );\n if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;\n vec3 bd3D = normalize( lightToPosition );\n vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n shadow = (\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n ) * ( 1.0 / 9.0 );\n #else\n shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n#endif",jb="#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n#endif",Xb="#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n vec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n #if NUM_DIR_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n shadowWorldPosition = worldPosition;\n #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n #endif\n vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n#endif",qb="float getShadowMask() {\n float shadow = 1.0;\n #ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n directionalLight = directionalLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n spotLight = spotLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n pointLight = pointLightShadows[ i ];\n shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #endif\n return shadow;\n}",Kb="#ifdef USE_SKINNING\n mat4 boneMatX = getBoneMatrix( skinIndex.x );\n mat4 boneMatY = getBoneMatrix( skinIndex.y );\n mat4 boneMatZ = getBoneMatrix( skinIndex.z );\n mat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",Yb="#ifdef USE_SKINNING\n uniform mat4 bindMatrix;\n uniform mat4 bindMatrixInverse;\n uniform highp sampler2D boneTexture;\n mat4 getBoneMatrix( const in float i ) {\n int size = textureSize( boneTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n#endif",Zb="#ifdef USE_SKINNING\n vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n transformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",Jb="#ifdef USE_SKINNING\n mat4 skinMatrix = mat4( 0.0 );\n skinMatrix += skinWeight.x * boneMatX;\n skinMatrix += skinWeight.y * boneMatY;\n skinMatrix += skinWeight.z * boneMatZ;\n skinMatrix += skinWeight.w * boneMatW;\n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n #ifdef USE_TANGENT\n objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #endif\n#endif",Qb="float specularStrength;\n#ifdef USE_SPECULARMAP\n vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n specularStrength = texelSpecular.r;\n#else\n specularStrength = 1.0;\n#endif",eS="#ifdef USE_SPECULARMAP\n uniform sampler2D specularMap;\n#endif",tS="#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",nS="#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n return saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n vec3( 1.6605, - 0.1246, - 0.0182 ),\n vec3( - 0.5876, 1.1329, - 0.1006 ),\n vec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n vec3( 0.6274, 0.0691, 0.0164 ),\n vec3( 0.3293, 0.9195, 0.0880 ),\n vec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n vec3 x2 = x * x;\n vec3 x4 = x2 * x2;\n return + 15.5 * x4 * x2\n - 40.14 * x4 * x\n + 31.96 * x4\n - 6.868 * x2 * x\n + 0.4298 * x2\n + 0.1191 * x\n - 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n const mat3 AgXInsetMatrix = mat3(\n vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n );\n const mat3 AgXOutsetMatrix = mat3(\n vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n );\n const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069;\n color *= toneMappingExposure;\n color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n color = AgXInsetMatrix * color;\n color = max( color, 1e-10 ); color = log2( color );\n color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n color = clamp( color, 0.0, 1.0 );\n color = agxDefaultContrastApprox( color );\n color = AgXOutsetMatrix * color;\n color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n color = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n color = clamp( color, 0.0, 1.0 );\n return color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n const float StartCompression = 0.8 - 0.04;\n const float Desaturation = 0.15;\n color *= toneMappingExposure;\n float x = min( color.r, min( color.g, color.b ) );\n float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n color -= offset;\n float peak = max( color.r, max( color.g, color.b ) );\n if ( peak < StartCompression ) return color;\n float d = 1. - StartCompression;\n float newPeak = 1. - d * d / ( peak + d - StartCompression );\n color *= newPeak / peak;\n float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n return mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",rS="#ifdef USE_TRANSMISSION\n material.transmission = transmission;\n material.transmissionAlpha = 1.0;\n material.thickness = thickness;\n material.attenuationDistance = attenuationDistance;\n material.attenuationColor = attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n #endif\n #ifdef USE_THICKNESSMAP\n material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n #endif\n vec3 pos = vWorldPosition;\n vec3 v = normalize( cameraPosition - pos );\n vec3 n = inverseTransformDirection( normal, viewMatrix );\n vec4 transmitted = getIBLVolumeRefraction(\n n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n material.attenuationColor, material.attenuationDistance );\n material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",iS="#ifdef USE_TRANSMISSION\n uniform float transmission;\n uniform float thickness;\n uniform float attenuationDistance;\n uniform vec3 attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n uniform sampler2D transmissionMap;\n #endif\n #ifdef USE_THICKNESSMAP\n uniform sampler2D thicknessMap;\n #endif\n uniform vec2 transmissionSamplerSize;\n uniform sampler2D transmissionSamplerMap;\n uniform mat4 modelMatrix;\n uniform mat4 projectionMatrix;\n varying vec3 vWorldPosition;\n float w0( float a ) {\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n }\n float w1( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n }\n float w2( float a ){\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n }\n float w3( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * a );\n }\n float g0( float a ) {\n return w0( a ) + w1( a );\n }\n float g1( float a ) {\n return w2( a ) + w3( a );\n }\n float h0( float a ) {\n return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n }\n float h1( float a ) {\n return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n }\n vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n uv = uv * texelSize.zw + 0.5;\n vec2 iuv = floor( uv );\n vec2 fuv = fract( uv );\n float g0x = g0( fuv.x );\n float g1x = g1( fuv.x );\n float h0x = h0( fuv.x );\n float h1x = h1( fuv.x );\n float h0y = h0( fuv.y );\n float h1y = h1( fuv.y );\n vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n }\n vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n vec2 fLodSizeInv = 1.0 / fLodSize;\n vec2 cLodSizeInv = 1.0 / cLodSize;\n vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n return mix( fSample, cSample, fract( lod ) );\n }\n vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n vec3 modelScale;\n modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n return normalize( refractionVector ) * thickness * modelScale;\n }\n float applyIorToRoughness( const in float roughness, const in float ior ) {\n return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n }\n vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n }\n vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n if ( isinf( attenuationDistance ) ) {\n return vec3( 1.0 );\n } else {\n vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance;\n }\n }\n vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n const in vec3 attenuationColor, const in float attenuationDistance ) {\n vec4 transmittedLight;\n vec3 transmittance;\n #ifdef USE_DISPERSION\n float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n for ( int i = 0; i < 3; i ++ ) {\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n transmittedLight[ i ] = transmissionSample[ i ];\n transmittedLight.a += transmissionSample.a;\n transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n }\n transmittedLight.a /= 3.0;\n #else\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n #endif\n vec3 attenuatedColor = transmittance * transmittedLight.rgb;\n vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n }\n#endif",sS="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",oS="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n uniform mat3 mapTransform;\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n uniform mat3 alphaMapTransform;\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n uniform mat3 lightMapTransform;\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n uniform mat3 aoMapTransform;\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n uniform mat3 bumpMapTransform;\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n uniform mat3 normalMapTransform;\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n uniform mat3 displacementMapTransform;\n varying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n uniform mat3 emissiveMapTransform;\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n uniform mat3 metalnessMapTransform;\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n uniform mat3 roughnessMapTransform;\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n uniform mat3 anisotropyMapTransform;\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n uniform mat3 clearcoatMapTransform;\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform mat3 clearcoatNormalMapTransform;\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform mat3 clearcoatRoughnessMapTransform;\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n uniform mat3 sheenColorMapTransform;\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n uniform mat3 sheenRoughnessMapTransform;\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n uniform mat3 iridescenceMapTransform;\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform mat3 iridescenceThicknessMapTransform;\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n uniform mat3 specularMapTransform;\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n uniform mat3 specularColorMapTransform;\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n uniform mat3 specularIntensityMapTransform;\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",aS="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n vUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",cS="#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n vec4 worldPosition = vec4( transformed, 1.0 );\n #ifdef USE_BATCHING\n worldPosition = batchingMatrix * worldPosition;\n #endif\n #ifdef USE_INSTANCING\n worldPosition = instanceMatrix * worldPosition;\n #endif\n worldPosition = modelMatrix * worldPosition;\n#endif",lS="varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n gl_Position = vec4( position.xy, 1.0, 1.0 );\n}",uS="uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n vec4 texColor = texture2D( t2D, vUv );\n #ifdef DECODE_VIDEO_TEXTURE\n texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",fS="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n gl_Position.z = gl_Position.w;\n}",dS="#ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n uniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n #ifdef ENVMAP_TYPE_CUBE\n vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n #else\n vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",pS="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n gl_Position.z = gl_Position.w;\n}",hS="uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n gl_FragColor = texColor;\n gl_FragColor.a *= opacity;\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",mS="#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include <uv_vertex>\n #include <batching_vertex>\n #include <skinbase_vertex>\n #include <morphinstance_vertex>\n #ifdef USE_DISPLACEMENTMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vHighPrecisionZW = gl_Position.zw;\n}",gS="#if DEPTH_PACKING == 3200\n uniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n vec4 diffuseColor = vec4( 1.0 );\n #include <clipping_planes_fragment>\n #if DEPTH_PACKING == 3200\n diffuseColor.a = opacity;\n #endif\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <logdepthbuf_fragment>\n float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n #if DEPTH_PACKING == 3200\n gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n #elif DEPTH_PACKING == 3201\n gl_FragColor = packDepthToRGBA( fragCoordZ );\n #elif DEPTH_PACKING == 3202\n gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n #elif DEPTH_PACKING == 3203\n gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n #endif\n}",yS="#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <batching_vertex>\n #include <skinbase_vertex>\n #include <morphinstance_vertex>\n #ifdef USE_DISPLACEMENTMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <worldpos_vertex>\n #include <clipping_planes_vertex>\n vWorldPosition = worldPosition.xyz;\n}",xS="#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n vec4 diffuseColor = vec4( 1.0 );\n #include <clipping_planes_fragment>\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n float dist = length( vWorldPosition - referencePosition );\n dist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n dist = saturate( dist );\n gl_FragColor = packDepthToRGBA( dist );\n}",_S="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n}",vS="uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",bS="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n vLineDistance = scale * lineDistance;\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n}",SS="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n discard;\n }\n vec3 outgoingLight = vec3( 0.0 );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}",MS="#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <fog_vertex>\n}",wS="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n #else\n reflectedLight.indirectDiffuse += vec3( 1.0 );\n #endif\n #include <aomap_fragment>\n reflectedLight.indirectDiffuse *= diffuseColor.rgb;\n vec3 outgoingLight = reflectedLight.indirectDiffuse;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",ES="#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",IS="#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_lambert_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",TS="#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n vViewPosition = - mvPosition.xyz;\n}",AS="#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n vec3 viewDir = normalize( vViewPosition );\n vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n vec3 y = cross( viewDir, x );\n vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n #ifdef USE_MATCAP\n vec4 matcapColor = texture2D( matcap, uv );\n #else\n vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n #endif\n vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",RS="#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphinstance_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n vViewPosition = - mvPosition.xyz;\n#endif\n}",CS="#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n #ifdef OPAQUE\n gl_FragColor.a = 1.0;\n #endif\n}",PS="#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphinstance_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",FS="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_phong_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",OS="#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n varying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n#ifdef USE_TRANSMISSION\n vWorldPosition = worldPosition.xyz;\n#endif\n}",LS="#define STANDARD\n#ifdef PHYSICAL\n #define IOR\n #define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n uniform float ior;\n#endif\n#ifdef USE_SPECULAR\n uniform float specularIntensity;\n uniform vec3 specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n uniform sampler2D specularColorMap;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n uniform sampler2D specularIntensityMap;\n #endif\n#endif\n#ifdef USE_CLEARCOAT\n uniform float clearcoat;\n uniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n uniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n uniform float iridescence;\n uniform float iridescenceIOR;\n uniform float iridescenceThicknessMinimum;\n uniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n uniform vec3 sheenColor;\n uniform float sheenRoughness;\n #ifdef USE_SHEEN_COLORMAP\n uniform sampler2D sheenColorMap;\n #endif\n #ifdef USE_SHEEN_ROUGHNESSMAP\n uniform sampler2D sheenRoughnessMap;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n uniform vec2 anisotropyVector;\n #ifdef USE_ANISOTROPYMAP\n uniform sampler2D anisotropyMap;\n #endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <roughnessmap_fragment>\n #include <metalnessmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <clearcoat_normal_fragment_begin>\n #include <clearcoat_normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_physical_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n #include <transmission_fragment>\n vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n #ifdef USE_SHEEN\n float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n #endif\n #ifdef USE_CLEARCOAT\n float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n #endif\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",NS="#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",US="#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_toon_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",DS="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n varying vec2 vUv;\n uniform mat3 uvTransform;\n#endif\nvoid main() {\n #ifdef USE_POINTS_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n gl_PointSize = size;\n #ifdef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n #endif\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <worldpos_vertex>\n #include <fog_vertex>\n}",kS="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n vec3 outgoingLight = vec3( 0.0 );\n #include <logdepthbuf_fragment>\n #include <map_particle_fragment>\n #include <color_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}",BS="#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphinstance_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",zS="uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n #include <logdepthbuf_fragment>\n gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n}",VS="uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n vec4 mvPosition = modelViewMatrix[ 3 ];\n vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n #ifndef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n #endif\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n mvPosition.xy += rotatedPosition;\n gl_Position = projectionMatrix * mvPosition;\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n}",GS="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n vec3 outgoingLight = vec3( 0.0 );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n}",xe={alphahash_fragment:uv,alphahash_pars_fragment:fv,alphamap_fragment:dv,alphamap_pars_fragment:pv,alphatest_fragment:hv,alphatest_pars_fragment:mv,aomap_fragment:gv,aomap_pars_fragment:yv,batching_pars_vertex:xv,batching_vertex:_v,begin_vertex:vv,beginnormal_vertex:bv,bsdfs:Sv,iridescence_fragment:Mv,bumpmap_pars_fragment:wv,clipping_planes_fragment:Ev,clipping_planes_pars_fragment:Iv,clipping_planes_pars_vertex:Tv,clipping_planes_vertex:Av,color_fragment:Rv,color_pars_fragment:Cv,color_pars_vertex:Pv,color_vertex:Fv,common:Ov,cube_uv_reflection_fragment:Lv,defaultnormal_vertex:Nv,displacementmap_pars_vertex:Uv,displacementmap_vertex:Dv,emissivemap_fragment:kv,emissivemap_pars_fragment:Bv,colorspace_fragment:zv,colorspace_pars_fragment:Vv,envmap_fragment:Gv,envmap_common_pars_fragment:Hv,envmap_pars_fragment:$v,envmap_pars_vertex:Wv,envmap_physical_pars_fragment:nb,envmap_vertex:jv,fog_vertex:Xv,fog_pars_vertex:qv,fog_fragment:Kv,fog_pars_fragment:Yv,gradientmap_pars_fragment:Zv,lightmap_pars_fragment:Jv,lights_lambert_fragment:Qv,lights_lambert_pars_fragment:eb,lights_pars_begin:tb,lights_toon_fragment:rb,lights_toon_pars_fragment:ib,lights_phong_fragment:sb,lights_phong_pars_fragment:ob,lights_physical_fragment:ab,lights_physical_pars_fragment:cb,lights_fragment_begin:lb,lights_fragment_maps:ub,lights_fragment_end:fb,logdepthbuf_fragment:db,logdepthbuf_pars_fragment:pb,logdepthbuf_pars_vertex:hb,logdepthbuf_vertex:mb,map_fragment:gb,map_pars_fragment:yb,map_particle_fragment:xb,map_particle_pars_fragment:_b,metalnessmap_fragment:vb,metalnessmap_pars_fragment:bb,morphinstance_vertex:Sb,morphcolor_vertex:Mb,morphnormal_vertex:wb,morphtarget_pars_vertex:Eb,morphtarget_vertex:Ib,normal_fragment_begin:Tb,normal_fragment_maps:Ab,normal_pars_fragment:Rb,normal_pars_vertex:Cb,normal_vertex:Pb,normalmap_pars_fragment:Fb,clearcoat_normal_fragment_begin:Ob,clearcoat_normal_fragment_maps:Lb,clearcoat_pars_fragment:Nb,iridescence_pars_fragment:Ub,opaque_fragment:Db,packing:kb,premultiplied_alpha_fragment:Bb,project_vertex:zb,dithering_fragment:Vb,dithering_pars_fragment:Gb,roughnessmap_fragment:Hb,roughnessmap_pars_fragment:$b,shadowmap_pars_fragment:Wb,shadowmap_pars_vertex:jb,shadowmap_vertex:Xb,shadowmask_pars_fragment:qb,skinbase_vertex:Kb,skinning_pars_vertex:Yb,skinning_vertex:Zb,skinnormal_vertex:Jb,specularmap_fragment:Qb,specularmap_pars_fragment:eS,tonemapping_fragment:tS,tonemapping_pars_fragment:nS,transmission_fragment:rS,transmission_pars_fragment:iS,uv_pars_fragment:sS,uv_pars_vertex:oS,uv_vertex:aS,worldpos_vertex:cS,background_vert:lS,background_frag:uS,backgroundCube_vert:fS,backgroundCube_frag:dS,cube_vert:pS,cube_frag:hS,depth_vert:mS,depth_frag:gS,distanceRGBA_vert:yS,distanceRGBA_frag:xS,equirect_vert:_S,equirect_frag:vS,linedashed_vert:bS,linedashed_frag:SS,meshbasic_vert:MS,meshbasic_frag:wS,meshlambert_vert:ES,meshlambert_frag:IS,meshmatcap_vert:TS,meshmatcap_frag:AS,meshnormal_vert:RS,meshnormal_frag:CS,meshphong_vert:PS,meshphong_frag:FS,meshphysical_vert:OS,meshphysical_frag:LS,meshtoon_vert:NS,meshtoon_frag:US,points_vert:DS,points_frag:kS,shadow_vert:BS,shadow_frag:zS,sprite_vert:VS,sprite_frag:GS},z={common:{diffuse:{value:new yt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new pe},alphaMap:{value:null},alphaMapTransform:{value:new pe},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new pe}},envmap:{envMap:{value:null},envMapRotation:{value:new pe},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new pe}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new pe}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new pe},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new pe},normalScale:{value:new qn(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new pe},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new pe}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new pe}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new pe}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new yt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new yt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new pe},alphaTest:{value:0},uvTransform:{value:new pe}},sprite:{diffuse:{value:new yt(16777215)},opacity:{value:1},center:{value:new qn(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new pe},alphaMap:{value:null},alphaMapTransform:{value:new pe},alphaTest:{value:0}}},Nh={basic:{uniforms:Jt([z.common,z.specularmap,z.envmap,z.aomap,z.lightmap,z.fog]),vertexShader:xe.meshbasic_vert,fragmentShader:xe.meshbasic_frag},lambert:{uniforms:Jt([z.common,z.specularmap,z.envmap,z.aomap,z.lightmap,z.emissivemap,z.bumpmap,z.normalmap,z.displacementmap,z.fog,z.lights,{emissive:{value:new yt(0)}}]),vertexShader:xe.meshlambert_vert,fragmentShader:xe.meshlambert_frag},phong:{uniforms:Jt([z.common,z.specularmap,z.envmap,z.aomap,z.lightmap,z.emissivemap,z.bumpmap,z.normalmap,z.displacementmap,z.fog,z.lights,{emissive:{value:new yt(0)},specular:{value:new yt(1118481)},shininess:{value:30}}]),vertexShader:xe.meshphong_vert,fragmentShader:xe.meshphong_frag},standard:{uniforms:Jt([z.common,z.envmap,z.aomap,z.lightmap,z.emissivemap,z.bumpmap,z.normalmap,z.displacementmap,z.roughnessmap,z.metalnessmap,z.fog,z.lights,{emissive:{value:new yt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:xe.meshphysical_vert,fragmentShader:xe.meshphysical_frag},toon:{uniforms:Jt([z.common,z.aomap,z.lightmap,z.emissivemap,z.bumpmap,z.normalmap,z.displacementmap,z.gradientmap,z.fog,z.lights,{emissive:{value:new yt(0)}}]),vertexShader:xe.meshtoon_vert,fragmentShader:xe.meshtoon_frag},matcap:{uniforms:Jt([z.common,z.bumpmap,z.normalmap,z.displacementmap,z.fog,{matcap:{value:null}}]),vertexShader:xe.meshmatcap_vert,fragmentShader:xe.meshmatcap_frag},points:{uniforms:Jt([z.points,z.fog]),vertexShader:xe.points_vert,fragmentShader:xe.points_frag},dashed:{uniforms:Jt([z.common,z.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:xe.linedashed_vert,fragmentShader:xe.linedashed_frag},depth:{uniforms:Jt([z.common,z.displacementmap]),vertexShader:xe.depth_vert,fragmentShader:xe.depth_frag},normal:{uniforms:Jt([z.common,z.bumpmap,z.normalmap,z.displacementmap,{opacity:{value:1}}]),vertexShader:xe.meshnormal_vert,fragmentShader:xe.meshnormal_frag},sprite:{uniforms:Jt([z.sprite,z.fog]),vertexShader:xe.sprite_vert,fragmentShader:xe.sprite_frag},background:{uniforms:{uvTransform:{value:new pe},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:xe.background_vert,fragmentShader:xe.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new pe}},vertexShader:xe.backgroundCube_vert,fragmentShader:xe.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:xe.cube_vert,fragmentShader:xe.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:xe.equirect_vert,fragmentShader:xe.equirect_frag},distanceRGBA:{uniforms:Jt([z.common,z.displacementmap,{referencePosition:{value:new Ne},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:xe.distanceRGBA_vert,fragmentShader:xe.distanceRGBA_frag},shadow:{uniforms:Jt([z.lights,z.fog,{color:{value:new yt(0)},opacity:{value:1}}]),vertexShader:xe.shadow_vert,fragmentShader:xe.shadow_frag}};Nh.physical={uniforms:Jt([Nh.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new pe},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new pe},clearcoatNormalScale:{value:new qn(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new pe},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new pe},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new pe},sheen:{value:0},sheenColor:{value:new yt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new pe},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new pe},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new pe},transmissionSamplerSize:{value:new qn},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new pe},attenuationDistance:{value:0},attenuationColor:{value:new yt(0)},specularColor:{value:new yt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new pe},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new pe},anisotropyVector:{value:new qn},anisotropyMap:{value:null},anisotropyMapTransform:{value:new pe}}]),vertexShader:xe.meshphysical_vert,fragmentShader:xe.meshphysical_frag};var Ti=(1+Math.sqrt(5))/2,xs=1/Ti,J2=[new Ne(-Ti,xs,0),new Ne(Ti,xs,0),new Ne(-xs,0,Ti),new Ne(xs,0,Ti),new Ne(0,Ti,-xs),new Ne(0,Ti,xs),new Ne(-1,1,-1),new Ne(1,1,-1),new Ne(-1,1,1),new Ne(1,1,1)];var Q2=new Float32Array(16),eU=new Float32Array(9),tU=new Float32Array(4);var nU={[au]:cu,[lu]:pu,[fu]:hu,[uu]:du,[cu]:au,[pu]:lu,[hu]:fu,[du]:uu};l();l();l();l();l();l();var FU=new Set(Object.keys(yt.NAMES));l();l();l();var Ie={};ri(Ie,{BRAND:()=>hM,DIRTY:()=>Ai,EMPTY_PATH:()=>jS,INVALID:()=>te,NEVER:()=>JM,OK:()=>Gt,ParseStatus:()=>Rt,Schema:()=>fe,ZodAny:()=>fi,ZodArray:()=>Nr,ZodBigInt:()=>Pi,ZodBoolean:()=>Fi,ZodBranded:()=>ko,ZodCatch:()=>Hi,ZodDate:()=>Oi,ZodDefault:()=>Gi,ZodDiscriminatedUnion:()=>Ga,ZodEffects:()=>Cn,ZodEnum:()=>zi,ZodError:()=>sn,ZodFirstPartyTypeKind:()=>oe,ZodFunction:()=>$a,ZodIntersection:()=>Di,ZodIssueCode:()=>P,ZodLazy:()=>ki,ZodLiteral:()=>Bi,ZodMap:()=>Is,ZodNaN:()=>As,ZodNativeEnum:()=>Vi,ZodNever:()=>Yn,ZodNull:()=>Ni,ZodNullable:()=>ur,ZodNumber:()=>Ci,ZodObject:()=>on,ZodOptional:()=>An,ZodParsedType:()=>V,ZodPipeline:()=>Bo,ZodPromise:()=>di,ZodReadonly:()=>$i,ZodRecord:()=>Ha,ZodSchema:()=>fe,ZodSet:()=>Ts,ZodString:()=>ui,ZodSymbol:()=>ws,ZodTransformer:()=>Cn,ZodTuple:()=>lr,ZodType:()=>fe,ZodUndefined:()=>Li,ZodUnion:()=>Ui,ZodUnknown:()=>Lr,ZodVoid:()=>Es,addIssueToContext:()=>U,any:()=>MM,array:()=>TM,bigint:()=>xM,boolean:()=>jh,coerce:()=>ZM,custom:()=>Hh,date:()=>_M,datetimeRegex:()=>Vh,defaultErrorMap:()=>Fr,discriminatedUnion:()=>PM,effect:()=>HM,enum:()=>zM,function:()=>DM,getErrorMap:()=>_s,getParsedType:()=>cr,instanceof:()=>gM,intersection:()=>FM,isAborted:()=>za,isAsync:()=>vs,isDirty:()=>Va,isValid:()=>li,late:()=>mM,lazy:()=>kM,literal:()=>BM,makeIssue:()=>Fo,map:()=>NM,nan:()=>yM,nativeEnum:()=>VM,never:()=>EM,null:()=>SM,nullable:()=>WM,number:()=>Wh,object:()=>AM,objectUtil:()=>zu,oboolean:()=>YM,onumber:()=>KM,optional:()=>$M,ostring:()=>qM,pipeline:()=>XM,preprocess:()=>jM,promise:()=>GM,quotelessJson:()=>HS,record:()=>LM,set:()=>UM,setErrorMap:()=>WS,strictObject:()=>RM,string:()=>$h,symbol:()=>vM,transformer:()=>HM,tuple:()=>OM,undefined:()=>bM,union:()=>CM,unknown:()=>wM,util:()=>me,void:()=>IM});l();l();l();l();l();var me;(function(t){t.assertEqual=i=>{};function e(i){}s(e,"assertIs"),t.assertIs=e;function n(i){throw new Error}s(n,"assertNever"),t.assertNever=n,t.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(c=>typeof i[i[c]]!="number"),a={};for(let c of o)a[c]=i[c];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},t.find=(i,o)=>{for(let a of i)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?"'".concat(a,"'"):a).join(o)}s(r,"joinValues"),t.joinValues=r,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(me||(me={}));var zu;(function(t){t.mergeShapes=(e,n)=>y(y({},e),n)})(zu||(zu={}));var V=me.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),cr=s(t=>{switch(typeof t){case"undefined":return V.undefined;case"string":return V.string;case"number":return Number.isNaN(t)?V.nan:V.number;case"boolean":return V.boolean;case"function":return V.function;case"bigint":return V.bigint;case"symbol":return V.symbol;case"object":return Array.isArray(t)?V.array:t===null?V.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?V.promise:typeof Map<"u"&&t instanceof Map?V.map:typeof Set<"u"&&t instanceof Set?V.set:typeof Date<"u"&&t instanceof Date?V.date:V.object;default:return V.unknown}},"getParsedType");var P=me.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),HS=s(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),ka=class ka extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){let n=e||function(o){return o.message},r={_errors:[]},i=s(o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let c=r,f=0;for(;f<a.path.length;){let d=a.path[f];f===a.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(n(a))):c[d]=c[d]||{_errors:[]},c=c[d],f++}}},"processError");return i(this),r}static assert(e){if(!(e instanceof ka))throw new Error("Not a ZodError: ".concat(e))}toString(){return this.message}get message(){return JSON.stringify(this.issues,me.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n={},r=[];for(let i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};s(ka,"ZodError");var sn=ka;sn.create=t=>new sn(t);var $S=s((t,e)=>{let n;switch(t.code){case P.invalid_type:t.received===V.undefined?n="Required":n="Expected ".concat(t.expected,", received ").concat(t.received);break;case P.invalid_literal:n="Invalid literal value, expected ".concat(JSON.stringify(t.expected,me.jsonStringifyReplacer));break;case P.unrecognized_keys:n="Unrecognized key(s) in object: ".concat(me.joinValues(t.keys,", "));break;case P.invalid_union:n="Invalid input";break;case P.invalid_union_discriminator:n="Invalid discriminator value. Expected ".concat(me.joinValues(t.options));break;case P.invalid_enum_value:n="Invalid enum value. Expected ".concat(me.joinValues(t.options),", received '").concat(t.received,"'");break;case P.invalid_arguments:n="Invalid function arguments";break;case P.invalid_return_type:n="Invalid function return type";break;case P.invalid_date:n="Invalid date";break;case P.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n='Invalid input: must include "'.concat(t.validation.includes,'"'),typeof t.validation.position=="number"&&(n="".concat(n," at one or more positions greater than or equal to ").concat(t.validation.position))):"startsWith"in t.validation?n='Invalid input: must start with "'.concat(t.validation.startsWith,'"'):"endsWith"in t.validation?n='Invalid input: must end with "'.concat(t.validation.endsWith,'"'):me.assertNever(t.validation):t.validation!=="regex"?n="Invalid ".concat(t.validation):n="Invalid";break;case P.too_small:t.type==="array"?n="Array must contain ".concat(t.exact?"exactly":t.inclusive?"at least":"more than"," ").concat(t.minimum," element(s)"):t.type==="string"?n="String must contain ".concat(t.exact?"exactly":t.inclusive?"at least":"over"," ").concat(t.minimum," character(s)"):t.type==="number"?n="Number must be ".concat(t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than ").concat(t.minimum):t.type==="date"?n="Date must be ".concat(t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(t.minimum))):n="Invalid input";break;case P.too_big:t.type==="array"?n="Array must contain ".concat(t.exact?"exactly":t.inclusive?"at most":"less than"," ").concat(t.maximum," element(s)"):t.type==="string"?n="String must contain ".concat(t.exact?"exactly":t.inclusive?"at most":"under"," ").concat(t.maximum," character(s)"):t.type==="number"?n="Number must be ".concat(t.exact?"exactly":t.inclusive?"less than or equal to":"less than"," ").concat(t.maximum):t.type==="bigint"?n="BigInt must be ".concat(t.exact?"exactly":t.inclusive?"less than or equal to":"less than"," ").concat(t.maximum):t.type==="date"?n="Date must be ".concat(t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(t.maximum))):n="Invalid input";break;case P.custom:n="Invalid input";break;case P.invalid_intersection_types:n="Intersection results could not be merged";break;case P.not_multiple_of:n="Number must be a multiple of ".concat(t.multipleOf);break;case P.not_finite:n="Number must be finite";break;default:n=e.defaultError,me.assertNever(t)}return{message:n}},"errorMap"),Fr=$S;var Uh=Fr;function WS(t){Uh=t}s(WS,"setErrorMap");function _s(){return Uh}s(_s,"getErrorMap");l();var Fo=s(t=>{let{data:e,path:n,errorMaps:r,issueData:i}=t,o=[...n,...i.path||[]],a=O(y({},i),{path:o});if(i.message!==void 0)return O(y({},i),{path:o,message:i.message});let c="",f=r.filter(d=>!!d).slice().reverse();for(let d of f)c=d(a,{data:e,defaultError:c}).message;return O(y({},i),{path:o,message:c})},"makeIssue"),jS=[];function U(t,e){let n=_s(),r=Fo({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Fr?void 0:Fr].filter(i=>!!i)});t.common.issues.push(r)}s(U,"addIssueToContext");var Ba=class Ba{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){let r=[];for(let i of n){if(i.status==="aborted")return te;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let i of n){let o=await i.key,a=await i.value;r.push({key:o,value:a})}return Ba.mergeObjectSync(e,r)}static mergeObjectSync(e,n){let r={};for(let i of n){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return te;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:e.value,value:r}}};s(Ba,"ParseStatus");var Rt=Ba,te=Object.freeze({status:"aborted"}),Ai=s(t=>({status:"dirty",value:t}),"DIRTY"),Gt=s(t=>({status:"valid",value:t}),"OK"),za=s(t=>t.status==="aborted","isAborted"),Va=s(t=>t.status==="dirty","isDirty"),li=s(t=>t.status==="valid","isValid"),vs=s(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");l();l();l();var K;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(K||(K={}));var Hu=class Hu{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};s(Hu,"ParseInputLazyPath");var Rn=Hu,Dh=s((t,e)=>{if(li(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new sn(t.common.issues);return this._error=n,this._error}}},"handleResult");function ue(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return e?{errorMap:e,description:i}:{errorMap:s((a,c)=>{var d,p;let{message:f}=t;return a.code==="invalid_enum_value"?{message:f!=null?f:c.defaultError}:typeof c.data>"u"?{message:(d=f!=null?f:r)!=null?d:c.defaultError}:a.code!=="invalid_type"?{message:c.defaultError}:{message:(p=f!=null?f:n)!=null?p:c.defaultError}},"customMap"),description:i}}s(ue,"processCreateParams");var $u=class $u{get description(){return this._def.description}_getType(e){return cr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Rt,ctx:{common:e.parent.common,data:e.data,parsedType:cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(vs(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var o;let r={common:{issues:[],async:(o=n==null?void 0:n.async)!=null?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:cr(e)},i=this._parseSync({data:e,path:r.path,parent:r});return Dh(r,i)}"~validate"(e){var r,i;let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:cr(e)};if(!this["~standard"].async)try{let o=this._parseSync({data:e,path:[],parent:n});return li(o)?{value:o.value}:{issues:n.common.issues}}catch(o){(i=(r=o==null?void 0:o.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(o=>li(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(e,n){let r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){let r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:cr(e)},i=this._parse({data:e,path:r.path,parent:r}),o=await(vs(i)?i:Promise.resolve(i));return Dh(r,o)}refine(e,n){let r=s(i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n,"getIssueProperties");return this._refinement((i,o)=>{let a=e(i),c=s(()=>o.addIssue(y({code:P.custom},r(i))),"setError");return typeof Promise<"u"&&a instanceof Promise?a.then(f=>f?!0:(c(),!1)):a?!0:(c(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new Cn({schema:this,typeName:oe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:s(n=>this["~validate"](n),"validate")}}optional(){return An.create(this,this._def)}nullable(){return ur.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Nr.create(this)}promise(){return di.create(this,this._def)}or(e){return Ui.create([this,e],this._def)}and(e){return Di.create(this,e,this._def)}transform(e){return new Cn(O(y({},ue(this._def)),{schema:this,typeName:oe.ZodEffects,effect:{type:"transform",transform:e}}))}default(e){let n=typeof e=="function"?e:()=>e;return new Gi(O(y({},ue(this._def)),{innerType:this,defaultValue:n,typeName:oe.ZodDefault}))}brand(){return new ko(y({typeName:oe.ZodBranded,type:this},ue(this._def)))}catch(e){let n=typeof e=="function"?e:()=>e;return new Hi(O(y({},ue(this._def)),{innerType:this,catchValue:n,typeName:oe.ZodCatch}))}describe(e){let n=this.constructor;return new n(O(y({},this._def),{description:e}))}pipe(e){return Bo.create(this,e)}readonly(){return $i.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};s($u,"ZodType");var fe=$u,XS=/^c[^\s-]{8,}$/i,qS=/^[0-9a-z]+$/,KS=/^[0-9A-HJKMNP-TV-Z]{26}$/i,YS=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ZS=/^[a-z0-9_-]{21}$/i,JS=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,QS=/^[-+]?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)?)??$/,eM=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,tM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Vu,nM=/^(?:(?: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])$/,rM=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,iM=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,sM=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,oM=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,aM=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Bh="((\\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])))",cM=new RegExp("^".concat(Bh,"$"));function zh(t){let e="[0-5]\\d";t.precision?e="".concat(e,"\\.\\d{").concat(t.precision,"}"):t.precision==null&&(e="".concat(e,"(\\.\\d+)?"));let n=t.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(e,")").concat(n)}s(zh,"timeRegexSource");function lM(t){return new RegExp("^".concat(zh(t),"$"))}s(lM,"timeRegex");function Vh(t){let e="".concat(Bh,"T").concat(zh(t)),n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e="".concat(e,"(").concat(n.join("|"),")"),new RegExp("^".concat(e,"$"))}s(Vh,"datetimeRegex");function uM(t,e){return!!((e==="v4"||!e)&&nM.test(t)||(e==="v6"||!e)&&iM.test(t))}s(uM,"isValidIP");function fM(t,e){if(!JS.test(t))return!1;try{let[n]=t.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||e&&i.alg!==e)}catch(n){return!1}}s(fM,"isValidJWT");function dM(t,e){return!!((e==="v4"||!e)&&rM.test(t)||(e==="v6"||!e)&&sM.test(t))}s(dM,"isValidCidr");var Ri=class Ri extends fe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==V.string){let o=this._getOrReturnCtx(e);return U(o,{code:P.invalid_type,expected:V.string,received:o.parsedType}),te}let r=new Rt,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:P.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:P.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){let a=e.data.length>o.value,c=e.data.length<o.value;(a||c)&&(i=this._getOrReturnCtx(e,i),a?U(i,{code:P.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):c&&U(i,{code:P.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")eM.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"email",code:P.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Vu||(Vu=new RegExp(tM,"u")),Vu.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"emoji",code:P.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")YS.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"uuid",code:P.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")ZS.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"nanoid",code:P.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")XS.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cuid",code:P.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")qS.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cuid2",code:P.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")KS.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"ulid",code:P.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch(a){i=this._getOrReturnCtx(e,i),U(i,{validation:"url",code:P.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"regex",code:P.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),U(i,{code:P.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),U(i,{code:P.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),U(i,{code:P.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Vh(o).test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:P.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?cM.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:P.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?lM(o).test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:P.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?QS.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"duration",code:P.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?uM(e.data,o.version)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"ip",code:P.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?fM(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"jwt",code:P.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?dM(e.data,o.version)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cidr",code:P.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?oM.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"base64",code:P.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?aM.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"base64url",code:P.invalid_string,message:o.message}),r.dirty()):me.assertNever(o);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),y({validation:n,code:P.invalid_string},K.errToObj(r)))}_addCheck(e){return new Ri(O(y({},this._def),{checks:[...this._def.checks,e]}))}email(e){return this._addCheck(y({kind:"email"},K.errToObj(e)))}url(e){return this._addCheck(y({kind:"url"},K.errToObj(e)))}emoji(e){return this._addCheck(y({kind:"emoji"},K.errToObj(e)))}uuid(e){return this._addCheck(y({kind:"uuid"},K.errToObj(e)))}nanoid(e){return this._addCheck(y({kind:"nanoid"},K.errToObj(e)))}cuid(e){return this._addCheck(y({kind:"cuid"},K.errToObj(e)))}cuid2(e){return this._addCheck(y({kind:"cuid2"},K.errToObj(e)))}ulid(e){return this._addCheck(y({kind:"ulid"},K.errToObj(e)))}base64(e){return this._addCheck(y({kind:"base64"},K.errToObj(e)))}base64url(e){return this._addCheck(y({kind:"base64url"},K.errToObj(e)))}jwt(e){return this._addCheck(y({kind:"jwt"},K.errToObj(e)))}ip(e){return this._addCheck(y({kind:"ip"},K.errToObj(e)))}cidr(e){return this._addCheck(y({kind:"cidr"},K.errToObj(e)))}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck(y({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!=null?n:!1,local:(r=e==null?void 0:e.local)!=null?r:!1},K.errToObj(e==null?void 0:e.message)))}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck(y({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision},K.errToObj(e==null?void 0:e.message)))}duration(e){return this._addCheck(y({kind:"duration"},K.errToObj(e)))}regex(e,n){return this._addCheck(y({kind:"regex",regex:e},K.errToObj(n)))}includes(e,n){return this._addCheck(y({kind:"includes",value:e,position:n==null?void 0:n.position},K.errToObj(n==null?void 0:n.message)))}startsWith(e,n){return this._addCheck(y({kind:"startsWith",value:e},K.errToObj(n)))}endsWith(e,n){return this._addCheck(y({kind:"endsWith",value:e},K.errToObj(n)))}min(e,n){return this._addCheck(y({kind:"min",value:e},K.errToObj(n)))}max(e,n){return this._addCheck(y({kind:"max",value:e},K.errToObj(n)))}length(e,n){return this._addCheck(y({kind:"length",value:e},K.errToObj(n)))}nonempty(e){return this.min(1,K.errToObj(e))}trim(){return new Ri(O(y({},this._def),{checks:[...this._def.checks,{kind:"trim"}]}))}toLowerCase(){return new Ri(O(y({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){return new Ri(O(y({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};s(Ri,"ZodString");var ui=Ri;ui.create=t=>{var e;return new ui(y({checks:[],typeName:oe.ZodString,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1},ue(t)))};function pM(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,o=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return o%a/10**i}s(pM,"floatSafeRemainder");var Oo=class Oo extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==V.number){let o=this._getOrReturnCtx(e);return U(o,{code:P.invalid_type,expected:V.number,received:o.parsedType}),te}let r,i=new Rt;for(let o of this._def.checks)o.kind==="int"?me.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),U(r,{code:P.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),U(r,{code:P.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),U(r,{code:P.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?pM(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),U(r,{code:P.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),U(r,{code:P.not_finite,message:o.message}),i.dirty()):me.assertNever(o);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,K.toString(n))}gt(e,n){return this.setLimit("min",e,!1,K.toString(n))}lte(e,n){return this.setLimit("max",e,!0,K.toString(n))}lt(e,n){return this.setLimit("max",e,!1,K.toString(n))}setLimit(e,n,r,i){return new Oo(O(y({},this._def),{checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:K.toString(i)}]}))}_addCheck(e){return new Oo(O(y({},this._def),{checks:[...this._def.checks,e]}))}int(e){return this._addCheck({kind:"int",message:K.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:K.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:K.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:K.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:K.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:K.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:K.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:K.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:K.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&me.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};s(Oo,"ZodNumber");var Ci=Oo;Ci.create=t=>new Ci(y({checks:[],typeName:oe.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1},ue(t)));var Lo=class Lo extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(o){return this._getInvalidInput(e)}if(this._getType(e)!==V.bigint)return this._getInvalidInput(e);let r,i=new Rt;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),U(r,{code:P.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),U(r,{code:P.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),U(r,{code:P.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):me.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return U(n,{code:P.invalid_type,expected:V.bigint,received:n.parsedType}),te}gte(e,n){return this.setLimit("min",e,!0,K.toString(n))}gt(e,n){return this.setLimit("min",e,!1,K.toString(n))}lte(e,n){return this.setLimit("max",e,!0,K.toString(n))}lt(e,n){return this.setLimit("max",e,!1,K.toString(n))}setLimit(e,n,r,i){return new Lo(O(y({},this._def),{checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:K.toString(i)}]}))}_addCheck(e){return new Lo(O(y({},this._def),{checks:[...this._def.checks,e]}))}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:K.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:K.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:K.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:K.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:K.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};s(Lo,"ZodBigInt");var Pi=Lo;Pi.create=t=>{var e;return new Pi(y({checks:[],typeName:oe.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1},ue(t)))};var Wu=class Wu extends fe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==V.boolean){let r=this._getOrReturnCtx(e);return U(r,{code:P.invalid_type,expected:V.boolean,received:r.parsedType}),te}return Gt(e.data)}};s(Wu,"ZodBoolean");var Fi=Wu;Fi.create=t=>new Fi(y({typeName:oe.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1},ue(t)));var Wa=class Wa extends fe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==V.date){let o=this._getOrReturnCtx(e);return U(o,{code:P.invalid_type,expected:V.date,received:o.parsedType}),te}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return U(o,{code:P.invalid_date}),te}let r=new Rt,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:P.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:P.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):me.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Wa(O(y({},this._def),{checks:[...this._def.checks,e]}))}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:K.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:K.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};s(Wa,"ZodDate");var Oi=Wa;Oi.create=t=>new Oi(y({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:oe.ZodDate},ue(t)));var ju=class ju extends fe{_parse(e){if(this._getType(e)!==V.symbol){let r=this._getOrReturnCtx(e);return U(r,{code:P.invalid_type,expected:V.symbol,received:r.parsedType}),te}return Gt(e.data)}};s(ju,"ZodSymbol");var ws=ju;ws.create=t=>new ws(y({typeName:oe.ZodSymbol},ue(t)));var Xu=class Xu extends fe{_parse(e){if(this._getType(e)!==V.undefined){let r=this._getOrReturnCtx(e);return U(r,{code:P.invalid_type,expected:V.undefined,received:r.parsedType}),te}return Gt(e.data)}};s(Xu,"ZodUndefined");var Li=Xu;Li.create=t=>new Li(y({typeName:oe.ZodUndefined},ue(t)));var qu=class qu extends fe{_parse(e){if(this._getType(e)!==V.null){let r=this._getOrReturnCtx(e);return U(r,{code:P.invalid_type,expected:V.null,received:r.parsedType}),te}return Gt(e.data)}};s(qu,"ZodNull");var Ni=qu;Ni.create=t=>new Ni(y({typeName:oe.ZodNull},ue(t)));var Ku=class Ku extends fe{constructor(){super(...arguments),this._any=!0}_parse(e){return Gt(e.data)}};s(Ku,"ZodAny");var fi=Ku;fi.create=t=>new fi(y({typeName:oe.ZodAny},ue(t)));var Yu=class Yu extends fe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Gt(e.data)}};s(Yu,"ZodUnknown");var Lr=Yu;Lr.create=t=>new Lr(y({typeName:oe.ZodUnknown},ue(t)));var Zu=class Zu extends fe{_parse(e){let n=this._getOrReturnCtx(e);return U(n,{code:P.invalid_type,expected:V.never,received:n.parsedType}),te}};s(Zu,"ZodNever");var Yn=Zu;Yn.create=t=>new Yn(y({typeName:oe.ZodNever},ue(t)));var Ju=class Ju extends fe{_parse(e){if(this._getType(e)!==V.undefined){let r=this._getOrReturnCtx(e);return U(r,{code:P.invalid_type,expected:V.void,received:r.parsedType}),te}return Gt(e.data)}};s(Ju,"ZodVoid");var Es=Ju;Es.create=t=>new Es(y({typeName:oe.ZodVoid},ue(t)));var Ss=class Ss extends fe{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==V.array)return U(n,{code:P.invalid_type,expected:V.array,received:n.parsedType}),te;if(i.exactLength!==null){let a=n.data.length>i.exactLength.value,c=n.data.length<i.exactLength.value;(a||c)&&(U(n,{code:a?P.too_big:P.too_small,minimum:c?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(U(n,{code:P.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(U(n,{code:P.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,c)=>i.type._parseAsync(new Rn(n,a,n.path,c)))).then(a=>Rt.mergeArray(r,a));let o=[...n.data].map((a,c)=>i.type._parseSync(new Rn(n,a,n.path,c)));return Rt.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new Ss(O(y({},this._def),{minLength:{value:e,message:K.toString(n)}}))}max(e,n){return new Ss(O(y({},this._def),{maxLength:{value:e,message:K.toString(n)}}))}length(e,n){return new Ss(O(y({},this._def),{exactLength:{value:e,message:K.toString(n)}}))}nonempty(e){return this.min(1,e)}};s(Ss,"ZodArray");var Nr=Ss;Nr.create=(t,e)=>new Nr(y({type:t,minLength:null,maxLength:null,exactLength:null,typeName:oe.ZodArray},ue(e)));function bs(t){if(t instanceof on){let e={};for(let n in t.shape){let r=t.shape[n];e[n]=An.create(bs(r))}return new on(O(y({},t._def),{shape:s(()=>e,"shape")}))}else return t instanceof Nr?new Nr(O(y({},t._def),{type:bs(t.element)})):t instanceof An?An.create(bs(t.unwrap())):t instanceof ur?ur.create(bs(t.unwrap())):t instanceof lr?lr.create(t.items.map(e=>bs(e))):t}s(bs,"deepPartialify");var hn=class hn extends fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=me.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==V.object){let d=this._getOrReturnCtx(e);return U(d,{code:P.invalid_type,expected:V.object,received:d.parsedType}),te}let{status:r,ctx:i}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof Yn&&this._def.unknownKeys==="strip"))for(let d in i.data)a.includes(d)||c.push(d);let f=[];for(let d of a){let p=o[d],h=i.data[d];f.push({key:{status:"valid",value:d},value:p._parse(new Rn(i,h,i.path,d)),alwaysSet:d in i.data})}if(this._def.catchall instanceof Yn){let d=this._def.unknownKeys;if(d==="passthrough")for(let p of c)f.push({key:{status:"valid",value:p},value:{status:"valid",value:i.data[p]}});else if(d==="strict")c.length>0&&(U(i,{code:P.unrecognized_keys,keys:c}),r.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let p of c){let h=i.data[p];f.push({key:{status:"valid",value:p},value:d._parse(new Rn(i,h,i.path,p)),alwaysSet:p in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let d=[];for(let p of f){let h=await p.key,g=await p.value;d.push({key:h,value:g,alwaysSet:p.alwaysSet})}return d}).then(d=>Rt.mergeObjectSync(r,d)):Rt.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return K.errToObj,new hn(y(O(y({},this._def),{unknownKeys:"strict"}),e!==void 0?{errorMap:s((n,r)=>{var o,a,c,f;let i=(c=(a=(o=this._def).errorMap)==null?void 0:a.call(o,n,r).message)!=null?c:r.defaultError;return n.code==="unrecognized_keys"?{message:(f=K.errToObj(e).message)!=null?f:i}:{message:i}},"errorMap")}:{}))}strip(){return new hn(O(y({},this._def),{unknownKeys:"strip"}))}passthrough(){return new hn(O(y({},this._def),{unknownKeys:"passthrough"}))}extend(e){return new hn(O(y({},this._def),{shape:s(()=>y(y({},this._def.shape()),e),"shape")}))}merge(e){return new hn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:s(()=>y(y({},this._def.shape()),e._def.shape()),"shape"),typeName:oe.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new hn(O(y({},this._def),{catchall:e}))}pick(e){let n={};for(let r of me.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new hn(O(y({},this._def),{shape:s(()=>n,"shape")}))}omit(e){let n={};for(let r of me.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new hn(O(y({},this._def),{shape:s(()=>n,"shape")}))}deepPartial(){return bs(this)}partial(e){let n={};for(let r of me.objectKeys(this.shape)){let i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}return new hn(O(y({},this._def),{shape:s(()=>n,"shape")}))}required(e){let n={};for(let r of me.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof An;)o=o._def.innerType;n[r]=o}return new hn(O(y({},this._def),{shape:s(()=>n,"shape")}))}keyof(){return Gh(me.objectKeys(this.shape))}};s(hn,"ZodObject");var on=hn;on.create=(t,e)=>new on(y({shape:s(()=>t,"shape"),unknownKeys:"strip",catchall:Yn.create(),typeName:oe.ZodObject},ue(e)));on.strictCreate=(t,e)=>new on(y({shape:s(()=>t,"shape"),unknownKeys:"strict",catchall:Yn.create(),typeName:oe.ZodObject},ue(e)));on.lazycreate=(t,e)=>new on(y({shape:t,unknownKeys:"strip",catchall:Yn.create(),typeName:oe.ZodObject},ue(e)));var Qu=class Qu extends fe{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function i(o){for(let c of o)if(c.result.status==="valid")return c.result;for(let c of o)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;let a=o.map(c=>new sn(c.ctx.common.issues));return U(n,{code:P.invalid_union,unionErrors:a}),te}if(s(i,"handleResults"),n.common.async)return Promise.all(r.map(async o=>{let a=O(y({},n),{common:O(y({},n.common),{issues:[]}),parent:null});return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o,a=[];for(let f of r){let d=O(y({},n),{common:O(y({},n.common),{issues:[]}),parent:null}),p=f._parseSync({data:n.data,path:n.path,parent:d});if(p.status==="valid")return p;p.status==="dirty"&&!o&&(o={result:p,ctx:d}),d.common.issues.length&&a.push(d.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;let c=a.map(f=>new sn(f));return U(n,{code:P.invalid_union,unionErrors:c}),te}}get options(){return this._def.options}};s(Qu,"ZodUnion");var Ui=Qu;Ui.create=(t,e)=>new Ui(y({options:t,typeName:oe.ZodUnion},ue(e)));var Or=s(t=>t instanceof ki?Or(t.schema):t instanceof Cn?Or(t.innerType()):t instanceof Bi?[t.value]:t instanceof zi?t.options:t instanceof Vi?me.objectValues(t.enum):t instanceof Gi?Or(t._def.innerType):t instanceof Li?[void 0]:t instanceof Ni?[null]:t instanceof An?[void 0,...Or(t.unwrap())]:t instanceof ur?[null,...Or(t.unwrap())]:t instanceof ko||t instanceof $i?Or(t.unwrap()):t instanceof Hi?Or(t._def.innerType):[],"getDiscriminator"),ja=class ja extends fe{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==V.object)return U(n,{code:P.invalid_type,expected:V.object,received:n.parsedType}),te;let r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(U(n,{code:P.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),te)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){let i=new Map;for(let o of n){let a=Or(o.shape[e]);if(!a.length)throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));for(let c of a){if(i.has(c))throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(c)));i.set(c,o)}}return new ja(y({typeName:oe.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i},ue(r)))}};s(ja,"ZodDiscriminatedUnion");var Ga=ja;function Gu(t,e){let n=cr(t),r=cr(e);if(t===e)return{valid:!0,data:t};if(n===V.object&&r===V.object){let i=me.objectKeys(e),o=me.objectKeys(t).filter(c=>i.indexOf(c)!==-1),a=y(y({},t),e);for(let c of o){let f=Gu(t[c],e[c]);if(!f.valid)return{valid:!1};a[c]=f.data}return{valid:!0,data:a}}else if(n===V.array&&r===V.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let a=t[o],c=e[o],f=Gu(a,c);if(!f.valid)return{valid:!1};i.push(f.data)}return{valid:!0,data:i}}else return n===V.date&&r===V.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}s(Gu,"mergeValues");var ef=class ef extends fe{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),i=s((o,a)=>{if(za(o)||za(a))return te;let c=Gu(o.value,a.value);return c.valid?((Va(o)||Va(a))&&n.dirty(),{status:n.value,value:c.data}):(U(r,{code:P.invalid_intersection_types}),te)},"handleParsed");return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};s(ef,"ZodIntersection");var Di=ef;Di.create=(t,e,n)=>new Di(y({left:t,right:e,typeName:oe.ZodIntersection},ue(n)));var Xa=class Xa extends fe{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==V.array)return U(r,{code:P.invalid_type,expected:V.array,received:r.parsedType}),te;if(r.data.length<this._def.items.length)return U(r,{code:P.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),te;!this._def.rest&&r.data.length>this._def.items.length&&(U(r,{code:P.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let o=[...r.data].map((a,c)=>{let f=this._def.items[c]||this._def.rest;return f?f._parse(new Rn(r,a,r.path,c)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Rt.mergeArray(n,a)):Rt.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new Xa(O(y({},this._def),{rest:e}))}};s(Xa,"ZodTuple");var lr=Xa;lr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new lr(y({items:t,typeName:oe.ZodTuple,rest:null},ue(e)))};var No=class No extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==V.object)return U(r,{code:P.invalid_type,expected:V.object,received:r.parsedType}),te;let i=[],o=this._def.keyType,a=this._def.valueType;for(let c in r.data)i.push({key:o._parse(new Rn(r,c,r.path,c)),value:a._parse(new Rn(r,r.data[c],r.path,c)),alwaysSet:c in r.data});return r.common.async?Rt.mergeObjectAsync(n,i):Rt.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof fe?new No(y({keyType:e,valueType:n,typeName:oe.ZodRecord},ue(r))):new No(y({keyType:ui.create(),valueType:e,typeName:oe.ZodRecord},ue(n)))}};s(No,"ZodRecord");var Ha=No,tf=class tf extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==V.map)return U(r,{code:P.invalid_type,expected:V.map,received:r.parsedType}),te;let i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([c,f],d)=>({key:i._parse(new Rn(r,c,r.path,[d,"key"])),value:o._parse(new Rn(r,f,r.path,[d,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let f of a){let d=await f.key,p=await f.value;if(d.status==="aborted"||p.status==="aborted")return te;(d.status==="dirty"||p.status==="dirty")&&n.dirty(),c.set(d.value,p.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let f of a){let d=f.key,p=f.value;if(d.status==="aborted"||p.status==="aborted")return te;(d.status==="dirty"||p.status==="dirty")&&n.dirty(),c.set(d.value,p.value)}return{status:n.value,value:c}}}};s(tf,"ZodMap");var Is=tf;Is.create=(t,e,n)=>new Is(y({valueType:e,keyType:t,typeName:oe.ZodMap},ue(n)));var Uo=class Uo extends fe{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==V.set)return U(r,{code:P.invalid_type,expected:V.set,received:r.parsedType}),te;let i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(U(r,{code:P.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(U(r,{code:P.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());let o=this._def.valueType;function a(f){let d=new Set;for(let p of f){if(p.status==="aborted")return te;p.status==="dirty"&&n.dirty(),d.add(p.value)}return{status:n.value,value:d}}s(a,"finalizeSet");let c=[...r.data.values()].map((f,d)=>o._parse(new Rn(r,f,r.path,d)));return r.common.async?Promise.all(c).then(f=>a(f)):a(c)}min(e,n){return new Uo(O(y({},this._def),{minSize:{value:e,message:K.toString(n)}}))}max(e,n){return new Uo(O(y({},this._def),{maxSize:{value:e,message:K.toString(n)}}))}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};s(Uo,"ZodSet");var Ts=Uo;Ts.create=(t,e)=>new Ts(y({valueType:t,minSize:null,maxSize:null,typeName:oe.ZodSet},ue(e)));var Ms=class Ms extends fe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==V.function)return U(n,{code:P.invalid_type,expected:V.function,received:n.parsedType}),te;function r(c,f){return Fo({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,_s(),Fr].filter(d=>!!d),issueData:{code:P.invalid_arguments,argumentsError:f}})}s(r,"makeArgsIssue");function i(c,f){return Fo({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,_s(),Fr].filter(d=>!!d),issueData:{code:P.invalid_return_type,returnTypeError:f}})}s(i,"makeReturnsIssue");let o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof di){let c=this;return Gt(async function(...f){let d=new sn([]),p=await c._def.args.parseAsync(f,o).catch(x=>{throw d.addIssue(r(f,x)),d}),h=await Reflect.apply(a,this,p);return await c._def.returns._def.type.parseAsync(h,o).catch(x=>{throw d.addIssue(i(h,x)),d})})}else{let c=this;return Gt(function(...f){let d=c._def.args.safeParse(f,o);if(!d.success)throw new sn([r(f,d.error)]);let p=Reflect.apply(a,this,d.data),h=c._def.returns.safeParse(p,o);if(!h.success)throw new sn([i(p,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ms(O(y({},this._def),{args:lr.create(e).rest(Lr.create())}))}returns(e){return new Ms(O(y({},this._def),{returns:e}))}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new Ms(y({args:e||lr.create([]).rest(Lr.create()),returns:n||Lr.create(),typeName:oe.ZodFunction},ue(r)))}};s(Ms,"ZodFunction");var $a=Ms,nf=class nf extends fe{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};s(nf,"ZodLazy");var ki=nf;ki.create=(t,e)=>new ki(y({getter:t,typeName:oe.ZodLazy},ue(e)));var rf=class rf extends fe{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return U(n,{received:n.data,code:P.invalid_literal,expected:this._def.value}),te}return{status:"valid",value:e.data}}get value(){return this._def.value}};s(rf,"ZodLiteral");var Bi=rf;Bi.create=(t,e)=>new Bi(y({value:t,typeName:oe.ZodLiteral},ue(e)));function Gh(t,e){return new zi(y({values:t,typeName:oe.ZodEnum},ue(e)))}s(Gh,"createZodEnum");var Do=class Do extends fe{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),r=this._def.values;return U(n,{expected:me.joinValues(r),received:n.parsedType,code:P.invalid_type}),te}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return U(n,{received:n.data,code:P.invalid_enum_value,options:r}),te}return Gt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Do.create(e,y(y({},this._def),n))}exclude(e,n=this._def){return Do.create(this.options.filter(r=>!e.includes(r)),y(y({},this._def),n))}};s(Do,"ZodEnum");var zi=Do;zi.create=Gh;var sf=class sf extends fe{_parse(e){let n=me.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==V.string&&r.parsedType!==V.number){let i=me.objectValues(n);return U(r,{expected:me.joinValues(i),received:r.parsedType,code:P.invalid_type}),te}if(this._cache||(this._cache=new Set(me.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=me.objectValues(n);return U(r,{received:r.data,code:P.invalid_enum_value,options:i}),te}return Gt(e.data)}get enum(){return this._def.values}};s(sf,"ZodNativeEnum");var Vi=sf;Vi.create=(t,e)=>new Vi(y({values:t,typeName:oe.ZodNativeEnum},ue(e)));var of=class of extends fe{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==V.promise&&n.common.async===!1)return U(n,{code:P.invalid_type,expected:V.promise,received:n.parsedType}),te;let r=n.parsedType===V.promise?n.data:Promise.resolve(n.data);return Gt(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};s(of,"ZodPromise");var di=of;di.create=(t,e)=>new di(y({type:t,typeName:oe.ZodPromise},ue(e)));var af=class af extends fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s(a=>{U(r,a),a.fatal?n.abort():n.dirty()},"addIssue"),get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async c=>{if(n.value==="aborted")return te;let f=await this._def.schema._parseAsync({data:c,path:r.path,parent:r});return f.status==="aborted"?te:f.status==="dirty"?Ai(f.value):n.value==="dirty"?Ai(f.value):f});{if(n.value==="aborted")return te;let c=this._def.schema._parseSync({data:a,path:r.path,parent:r});return c.status==="aborted"?te:c.status==="dirty"?Ai(c.value):n.value==="dirty"?Ai(c.value):c}}if(i.type==="refinement"){let a=s(c=>{let f=i.refinement(c,o);if(r.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c},"executeRefinement");if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?te:(c.status==="dirty"&&n.dirty(),a(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?te:(c.status==="dirty"&&n.dirty(),a(c.value).then(()=>({status:n.value,value:c.value}))))}if(i.type==="transform")if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!li(a))return te;let c=i.transform(a.value,o);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>li(a)?Promise.resolve(i.transform(a.value,o)).then(c=>({status:n.value,value:c})):te);me.assertNever(i)}};s(af,"ZodEffects");var Cn=af;Cn.create=(t,e,n)=>new Cn(y({schema:t,typeName:oe.ZodEffects,effect:e},ue(n)));Cn.createWithPreprocess=(t,e,n)=>new Cn(y({schema:e,effect:{type:"preprocess",transform:t},typeName:oe.ZodEffects},ue(n)));var cf=class cf extends fe{_parse(e){return this._getType(e)===V.undefined?Gt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};s(cf,"ZodOptional");var An=cf;An.create=(t,e)=>new An(y({innerType:t,typeName:oe.ZodOptional},ue(e)));var lf=class lf extends fe{_parse(e){return this._getType(e)===V.null?Gt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};s(lf,"ZodNullable");var ur=lf;ur.create=(t,e)=>new ur(y({innerType:t,typeName:oe.ZodNullable},ue(e)));var uf=class uf extends fe{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return n.parsedType===V.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};s(uf,"ZodDefault");var Gi=uf;Gi.create=(t,e)=>new Gi(y({innerType:t,typeName:oe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default},ue(e)));var ff=class ff extends fe{_parse(e){let{ctx:n}=this._processInputParams(e),r=O(y({},n),{common:O(y({},n.common),{issues:[]})}),i=this._def.innerType._parse({data:r.data,path:r.path,parent:y({},r)});return vs(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new sn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new sn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};s(ff,"ZodCatch");var Hi=ff;Hi.create=(t,e)=>new Hi(y({innerType:t,typeName:oe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch},ue(e)));var df=class df extends fe{_parse(e){if(this._getType(e)!==V.nan){let r=this._getOrReturnCtx(e);return U(r,{code:P.invalid_type,expected:V.nan,received:r.parsedType}),te}return{status:"valid",value:e.data}}};s(df,"ZodNaN");var As=df;As.create=t=>new As(y({typeName:oe.ZodNaN},ue(t)));var hM=Symbol("zod_brand"),pf=class pf extends fe{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}};s(pf,"ZodBranded");var ko=pf,qa=class qa extends fe{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return s(async()=>{let o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?te:o.status==="dirty"?(n.dirty(),Ai(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})},"handleAsync")();{let i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?te:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new qa({in:e,out:n,typeName:oe.ZodPipeline})}};s(qa,"ZodPipeline");var Bo=qa,hf=class hf extends fe{_parse(e){let n=this._def.innerType._parse(e),r=s(i=>(li(i)&&(i.value=Object.freeze(i.value)),i),"freeze");return vs(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}};s(hf,"ZodReadonly");var $i=hf;$i.create=(t,e)=>new $i(y({innerType:t,typeName:oe.ZodReadonly},ue(e)));function kh(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}s(kh,"cleanParams");function Hh(t,e={},n){return t?fi.create().superRefine((r,i)=>{var a,c;let o=t(r);if(o instanceof Promise)return o.then(f=>{var d,p;if(!f){let h=kh(e,r),g=(p=(d=h.fatal)!=null?d:n)!=null?p:!0;i.addIssue(O(y({code:"custom"},h),{fatal:g}))}});if(!o){let f=kh(e,r),d=(c=(a=f.fatal)!=null?a:n)!=null?c:!0;i.addIssue(O(y({code:"custom"},f),{fatal:d}))}}):fi.create()}s(Hh,"custom");var mM={object:on.lazycreate},oe;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(oe||(oe={}));var gM=s((t,e={message:"Input not instance of ".concat(t.name)})=>Hh(n=>n instanceof t,e),"instanceOfType"),$h=ui.create,Wh=Ci.create,yM=As.create,xM=Pi.create,jh=Fi.create,_M=Oi.create,vM=ws.create,bM=Li.create,SM=Ni.create,MM=fi.create,wM=Lr.create,EM=Yn.create,IM=Es.create,TM=Nr.create,AM=on.create,RM=on.strictCreate,CM=Ui.create,PM=Ga.create,FM=Di.create,OM=lr.create,LM=Ha.create,NM=Is.create,UM=Ts.create,DM=$a.create,kM=ki.create,BM=Bi.create,zM=zi.create,VM=Vi.create,GM=di.create,HM=Cn.create,$M=An.create,WM=ur.create,jM=Cn.createWithPreprocess,XM=Bo.create,qM=s(()=>$h().optional(),"ostring"),KM=s(()=>Wh().optional(),"onumber"),YM=s(()=>jh().optional(),"oboolean"),ZM={string:s(t=>ui.create(O(y({},t),{coerce:!0})),"string"),number:s(t=>Ci.create(O(y({},t),{coerce:!0})),"number"),boolean:s(t=>Fi.create(O(y({},t),{coerce:!0})),"boolean"),bigint:s(t=>Pi.create(O(y({},t),{coerce:!0})),"bigint"),date:s(t=>Oi.create(O(y({},t),{coerce:!0})),"date")};var JM=te;var FD=Ie.enum(["ease-in","ease-out","ease-in-out","linear"]);l();l();var fr,Cs,Wi,zo,Rs=class Rs{constructor(e,n){vt(this,Wi);qe(this,"__type",Rs.__type);vt(this,fr);vt(this,Cs);qe(this,"id");qe(this,"type");At(this,fr,e),At(this,Cs,n),this.id="ev_".concat(e.id),this.type=e.type}static is(e){return e!=null&&typeof e=="object"&&"__type"in e&&e.__type===Rs.__type}get name(){var e;return(e=ii(this,Wi,zo).call(this,"name"))!=null?e:""}get startDate(){return new Date(N(this,fr).startDate)}get endDate(){return new Date(N(this,fr).endDate)}get externalId(){return N(this,fr).externalId}get description(){return ii(this,Wi,zo).call(this,"description")}get location(){let e=N(this,fr).location,n=e!=null&&e.startsWith("el_")?e:"el_".concat(e);return N(this,Cs).getById("enterprise-location",n)}get image(){let e=ii(this,Wi,zo).call(this,"image");if(e!=null)return y({url:e.original},e)}get video(){let e=ii(this,Wi,zo).call(this,"video");if(e!=null)return{url:e.original,thumbnail:e.thumbnail,width:e.width,height:e.height}}};fr=new WeakMap,Cs=new WeakMap,Wi=new WeakSet,zo=s(function(e){var n,r,i,o,a;return(a=(o=(i=N(this,fr)._locale)==null?void 0:i[(r=(n=N(this,Cs).currentLanguage)==null?void 0:n.code)!=null?r:"en"])==null?void 0:o[e])!=null?a:N(this,fr)[e]},"#getLocalizedResource"),s(Rs,"EventMetaData"),qe(Rs,"__type","event");var Ka=Rs;l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();var be={};ri(be,{HasPropertyKey:()=>QM,IsArray:()=>Ht,IsAsyncIterator:()=>mf,IsBigInt:()=>Vo,IsBoolean:()=>pi,IsDate:()=>ji,IsFunction:()=>gf,IsIterator:()=>yf,IsNull:()=>xf,IsNumber:()=>Zn,IsObject:()=>We,IsRegExp:()=>Go,IsString:()=>Ze,IsSymbol:()=>_f,IsUint8Array:()=>Ur,IsUndefined:()=>st});l();function QM(t,e){return e in t}s(QM,"HasPropertyKey");function mf(t){return We(t)&&!Ht(t)&&!Ur(t)&&Symbol.asyncIterator in t}s(mf,"IsAsyncIterator");function Ht(t){return Array.isArray(t)}s(Ht,"IsArray");function Vo(t){return typeof t=="bigint"}s(Vo,"IsBigInt");function pi(t){return typeof t=="boolean"}s(pi,"IsBoolean");function ji(t){return t instanceof globalThis.Date}s(ji,"IsDate");function gf(t){return typeof t=="function"}s(gf,"IsFunction");function yf(t){return We(t)&&!Ht(t)&&!Ur(t)&&Symbol.iterator in t}s(yf,"IsIterator");function xf(t){return t===null}s(xf,"IsNull");function Zn(t){return typeof t=="number"}s(Zn,"IsNumber");function We(t){return typeof t=="object"&&t!==null}s(We,"IsObject");function Go(t){return t instanceof globalThis.RegExp}s(Go,"IsRegExp");function Ze(t){return typeof t=="string"}s(Ze,"IsString");function _f(t){return typeof t=="symbol"}s(_f,"IsSymbol");function Ur(t){return t instanceof globalThis.Uint8Array}s(Ur,"IsUint8Array");function st(t){return t===void 0}s(st,"IsUndefined");function ew(t){return t.map(e=>Ya(e))}s(ew,"ArrayType");function tw(t){return new Date(t.getTime())}s(tw,"DateType");function nw(t){return new Uint8Array(t)}s(nw,"Uint8ArrayType");function rw(t){return new RegExp(t.source,t.flags)}s(rw,"RegExpType");function iw(t){let e={};for(let n of Object.getOwnPropertyNames(t))e[n]=Ya(t[n]);for(let n of Object.getOwnPropertySymbols(t))e[n]=Ya(t[n]);return e}s(iw,"ObjectType");function Ya(t){return Ht(t)?ew(t):ji(t)?tw(t):Ur(t)?nw(t):Go(t)?rw(t):We(t)?iw(t):t}s(Ya,"Visit");function tt(t){return Ya(t)}s(tt,"Clone");function qh(t){return t.map(e=>Ho(e))}s(qh,"CloneRest");function Ho(t,e){return e===void 0?tt(t):tt(y(y({},e),t))}s(Ho,"CloneType");l();l();l();function Za(t){return le(t)&&Symbol.asyncIterator in t}s(Za,"IsAsyncIterator");function Ja(t){return le(t)&&Symbol.iterator in t}s(Ja,"IsIterator");function vf(t){return le(t)&&(Object.getPrototypeOf(t)===Object.prototype||Object.getPrototypeOf(t)===null)}s(vf,"IsStandardObject");function Qa(t){return t instanceof Promise}s(Qa,"IsPromise");function Qt(t){return t instanceof Date&&Number.isFinite(t.getTime())}s(Qt,"IsDate");function Kh(t){return t instanceof globalThis.Map}s(Kh,"IsMap");function Yh(t){return t instanceof globalThis.Set}s(Yh,"IsSet");function Pn(t){return ArrayBuffer.isView(t)}s(Pn,"IsTypedArray");function Ps(t){return t instanceof globalThis.Uint8Array}s(Ps,"IsUint8Array");function re(t,e){return e in t}s(re,"HasPropertyKey");function le(t){return t!==null&&typeof t=="object"}s(le,"IsObject");function ae(t){return Array.isArray(t)&&!ArrayBuffer.isView(t)}s(ae,"IsArray");function ot(t){return t===void 0}s(ot,"IsUndefined");function Dr(t){return t===null}s(Dr,"IsNull");function dr(t){return typeof t=="boolean"}s(dr,"IsBoolean");function Y(t){return typeof t=="number"}s(Y,"IsNumber");function ec(t){return Number.isInteger(t)}s(ec,"IsInteger");function Ct(t){return typeof t=="bigint"}s(Ct,"IsBigInt");function Se(t){return typeof t=="string"}s(Se,"IsString");function hi(t){return typeof t=="function"}s(hi,"IsFunction");function kr(t){return typeof t=="symbol"}s(kr,"IsSymbol");function Pt(t){return Ct(t)||dr(t)||Dr(t)||Y(t)||Se(t)||kr(t)||ot(t)}s(Pt,"IsValueType");var De;(function(t){t.InstanceMode="default",t.ExactOptionalPropertyTypes=!1,t.AllowArrayObject=!1,t.AllowNaN=!1,t.AllowNullVoid=!1;function e(a,c){return t.ExactOptionalPropertyTypes?c in a:a[c]!==void 0}s(e,"IsExactOptionalProperty"),t.IsExactOptionalProperty=e;function n(a){let c=le(a);return t.AllowArrayObject?c:c&&!ae(a)}s(n,"IsObjectLike"),t.IsObjectLike=n;function r(a){return n(a)&&!(a instanceof Date)&&!(a instanceof Uint8Array)}s(r,"IsRecordLike"),t.IsRecordLike=r;function i(a){return t.AllowNaN?Y(a):Number.isFinite(a)}s(i,"IsNumberLike"),t.IsNumberLike=i;function o(a){let c=ot(a);return t.AllowNullVoid?c||a===null:c}s(o,"IsVoidLike"),t.IsVoidLike=o})(De||(De={}));l();function sw(t){return globalThis.Object.freeze(t).map(e=>$o(e))}s(sw,"ImmutableArray");function ow(t){let e={};for(let n of Object.getOwnPropertyNames(t))e[n]=$o(t[n]);for(let n of Object.getOwnPropertySymbols(t))e[n]=$o(t[n]);return globalThis.Object.freeze(e)}s(ow,"ImmutableObject");function $o(t){return Ht(t)?sw(t):ji(t)?t:Ur(t)?t:Go(t)?t:We(t)?ow(t):t}s($o,"Immutable");function T(t,e){let n=e!==void 0?y(y({},e),t):t;switch(De.InstanceMode){case"freeze":return $o(n);case"clone":return tt(n);default:return n}}s(T,"CreateType");l();var bf=class bf extends Error{constructor(e){super(e)}};s(bf,"TypeBoxError");var ne=bf;l();l();l();var nt=Symbol.for("TypeBox.Transform"),Br=Symbol.for("TypeBox.Readonly"),en=Symbol.for("TypeBox.Optional"),Fn=Symbol.for("TypeBox.Hint"),M=Symbol.for("TypeBox.Kind");function Zh(t){return We(t)&&t[Br]==="Readonly"}s(Zh,"IsReadonly");function pr(t){return We(t)&&t[en]==="Optional"}s(pr,"IsOptional");function Sf(t){return Te(t,"Any")}s(Sf,"IsAny");function zr(t){return Te(t,"Array")}s(zr,"IsArray");function Wo(t){return Te(t,"AsyncIterator")}s(Wo,"IsAsyncIterator");function Mf(t){return Te(t,"BigInt")}s(Mf,"IsBigInt");function wf(t){return Te(t,"Boolean")}s(wf,"IsBoolean");function jo(t){return Te(t,"Constructor")}s(jo,"IsConstructor");function aw(t){return Te(t,"Date")}s(aw,"IsDate");function Xo(t){return Te(t,"Function")}s(Xo,"IsFunction");function Xi(t){return Te(t,"Integer")}s(Xi,"IsInteger");function gt(t){return Te(t,"Intersect")}s(gt,"IsIntersect");function qo(t){return Te(t,"Iterator")}s(qo,"IsIterator");function Te(t,e){return We(t)&&M in t&&t[M]===e}s(Te,"IsKindOf");function Vr(t){return Te(t,"Literal")}s(Vr,"IsLiteral");function mn(t){return Te(t,"MappedKey")}s(mn,"IsMappedKey");function rt(t){return Te(t,"MappedResult")}s(rt,"IsMappedResult");function mi(t){return Te(t,"Never")}s(mi,"IsNever");function cw(t){return Te(t,"Not")}s(cw,"IsNot");function lw(t){return Te(t,"Null")}s(lw,"IsNull");function qi(t){return Te(t,"Number")}s(qi,"IsNumber");function bt(t){return Te(t,"Object")}s(bt,"IsObject");function Ki(t){return Te(t,"Promise")}s(Ki,"IsPromise");function Ef(t){return Te(t,"Record")}s(Ef,"IsRecord");function If(t){return Te(t,"Ref")}s(If,"IsRef");function Tf(t){return Te(t,"RegExp")}s(Tf,"IsRegExp");function Ko(t){return Te(t,"String")}s(Ko,"IsString");function uw(t){return Te(t,"Symbol")}s(uw,"IsSymbol");function gn(t){return Te(t,"TemplateLiteral")}s(gn,"IsTemplateLiteral");function fw(t){return Te(t,"This")}s(fw,"IsThis");function Fs(t){return We(t)&&nt in t}s(Fs,"IsTransform");function Jn(t){return Te(t,"Tuple")}s(Jn,"IsTuple");function dw(t){return Te(t,"Undefined")}s(dw,"IsUndefined");function Fe(t){return Te(t,"Union")}s(Fe,"IsUnion");function pw(t){return Te(t,"Uint8Array")}s(pw,"IsUint8Array");function hw(t){return Te(t,"Unknown")}s(hw,"IsUnknown");function mw(t){return Te(t,"Unsafe")}s(mw,"IsUnsafe");function gw(t){return Te(t,"Void")}s(gw,"IsVoid");function gi(t){return We(t)&&M in t&&Ze(t[M])}s(gi,"IsKind");function Qn(t){return Sf(t)||zr(t)||wf(t)||Mf(t)||Wo(t)||jo(t)||aw(t)||Xo(t)||Xi(t)||gt(t)||qo(t)||Vr(t)||mn(t)||rt(t)||mi(t)||cw(t)||lw(t)||qi(t)||bt(t)||Ki(t)||Ef(t)||If(t)||Tf(t)||Ko(t)||uw(t)||gn(t)||fw(t)||Jn(t)||dw(t)||Fe(t)||pw(t)||hw(t)||mw(t)||gw(t)||gi(t)}s(Qn,"IsSchema");var _={};ri(_,{IsAny:()=>tm,IsArray:()=>nm,IsAsyncIterator:()=>rm,IsBigInt:()=>im,IsBoolean:()=>sm,IsConstructor:()=>om,IsDate:()=>am,IsFunction:()=>cm,IsInteger:()=>lm,IsIntersect:()=>um,IsIterator:()=>fm,IsKind:()=>Nm,IsKindOf:()=>we,IsLiteral:()=>Zo,IsLiteralBoolean:()=>Sw,IsLiteralNumber:()=>pm,IsLiteralString:()=>dm,IsLiteralValue:()=>hm,IsMappedKey:()=>mm,IsMappedResult:()=>gm,IsNever:()=>ym,IsNot:()=>xm,IsNull:()=>_m,IsNumber:()=>vm,IsObject:()=>bm,IsOptional:()=>bw,IsPromise:()=>Sm,IsProperties:()=>Pf,IsReadonly:()=>vw,IsRecord:()=>Mm,IsRecursive:()=>Mw,IsRef:()=>wm,IsRegExp:()=>Em,IsSchema:()=>Me,IsString:()=>Im,IsSymbol:()=>Tm,IsTemplateLiteral:()=>Am,IsThis:()=>Rm,IsTransform:()=>Je,IsTuple:()=>Cm,IsUint8Array:()=>Pm,IsUndefined:()=>Os,IsUnion:()=>Ff,IsUnionLiteral:()=>ww,IsUnknown:()=>Fm,IsUnsafe:()=>Om,IsVoid:()=>Lm,TypeGuardUnknownTypeError:()=>Af});l();var Of=class Of extends ne{};s(Of,"TypeGuardUnknownTypeError");var Af=Of,yw=["Any","Array","AsyncIterator","BigInt","Boolean","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function Jh(t){try{return new RegExp(t),!0}catch(e){return!1}}s(Jh,"IsPattern");function Rf(t){if(!Ze(t))return!1;for(let e=0;e<t.length;e++){let n=t.charCodeAt(e);if(n>=7&&n<=13||n===27||n===127)return!1}return!0}s(Rf,"IsControlCharacterFree");function Qh(t){return Cf(t)||Me(t)}s(Qh,"IsAdditionalProperties");function Yo(t){return st(t)||Vo(t)}s(Yo,"IsOptionalBigInt");function Ke(t){return st(t)||Zn(t)}s(Ke,"IsOptionalNumber");function Cf(t){return st(t)||pi(t)}s(Cf,"IsOptionalBoolean");function Ve(t){return st(t)||Ze(t)}s(Ve,"IsOptionalString");function xw(t){return st(t)||Ze(t)&&Rf(t)&&Jh(t)}s(xw,"IsOptionalPattern");function _w(t){return st(t)||Ze(t)&&Rf(t)}s(_w,"IsOptionalFormat");function em(t){return st(t)||Me(t)}s(em,"IsOptionalSchema");function vw(t){return We(t)&&t[Br]==="Readonly"}s(vw,"IsReadonly");function bw(t){return We(t)&&t[en]==="Optional"}s(bw,"IsOptional");function tm(t){return we(t,"Any")&&Ve(t.$id)}s(tm,"IsAny");function nm(t){return we(t,"Array")&&t.type==="array"&&Ve(t.$id)&&Me(t.items)&&Ke(t.minItems)&&Ke(t.maxItems)&&Cf(t.uniqueItems)&&em(t.contains)&&Ke(t.minContains)&&Ke(t.maxContains)}s(nm,"IsArray");function rm(t){return we(t,"AsyncIterator")&&t.type==="AsyncIterator"&&Ve(t.$id)&&Me(t.items)}s(rm,"IsAsyncIterator");function im(t){return we(t,"BigInt")&&t.type==="bigint"&&Ve(t.$id)&&Yo(t.exclusiveMaximum)&&Yo(t.exclusiveMinimum)&&Yo(t.maximum)&&Yo(t.minimum)&&Yo(t.multipleOf)}s(im,"IsBigInt");function sm(t){return we(t,"Boolean")&&t.type==="boolean"&&Ve(t.$id)}s(sm,"IsBoolean");function om(t){return we(t,"Constructor")&&t.type==="Constructor"&&Ve(t.$id)&&Ht(t.parameters)&&t.parameters.every(e=>Me(e))&&Me(t.returns)}s(om,"IsConstructor");function am(t){return we(t,"Date")&&t.type==="Date"&&Ve(t.$id)&&Ke(t.exclusiveMaximumTimestamp)&&Ke(t.exclusiveMinimumTimestamp)&&Ke(t.maximumTimestamp)&&Ke(t.minimumTimestamp)&&Ke(t.multipleOfTimestamp)}s(am,"IsDate");function cm(t){return we(t,"Function")&&t.type==="Function"&&Ve(t.$id)&&Ht(t.parameters)&&t.parameters.every(e=>Me(e))&&Me(t.returns)}s(cm,"IsFunction");function lm(t){return we(t,"Integer")&&t.type==="integer"&&Ve(t.$id)&&Ke(t.exclusiveMaximum)&&Ke(t.exclusiveMinimum)&&Ke(t.maximum)&&Ke(t.minimum)&&Ke(t.multipleOf)}s(lm,"IsInteger");function Pf(t){return We(t)&&Object.entries(t).every(([e,n])=>Rf(e)&&Me(n))}s(Pf,"IsProperties");function um(t){return we(t,"Intersect")&&!(Ze(t.type)&&t.type!=="object")&&Ht(t.allOf)&&t.allOf.every(e=>Me(e)&&!Je(e))&&Ve(t.type)&&(Cf(t.unevaluatedProperties)||em(t.unevaluatedProperties))&&Ve(t.$id)}s(um,"IsIntersect");function fm(t){return we(t,"Iterator")&&t.type==="Iterator"&&Ve(t.$id)&&Me(t.items)}s(fm,"IsIterator");function we(t,e){return We(t)&&M in t&&t[M]===e}s(we,"IsKindOf");function dm(t){return Zo(t)&&Ze(t.const)}s(dm,"IsLiteralString");function pm(t){return Zo(t)&&Zn(t.const)}s(pm,"IsLiteralNumber");function Sw(t){return Zo(t)&&pi(t.const)}s(Sw,"IsLiteralBoolean");function Zo(t){return we(t,"Literal")&&Ve(t.$id)&&hm(t.const)}s(Zo,"IsLiteral");function hm(t){return pi(t)||Zn(t)||Ze(t)}s(hm,"IsLiteralValue");function mm(t){return we(t,"MappedKey")&&Ht(t.keys)&&t.keys.every(e=>Zn(e)||Ze(e))}s(mm,"IsMappedKey");function gm(t){return we(t,"MappedResult")&&Pf(t.properties)}s(gm,"IsMappedResult");function ym(t){return we(t,"Never")&&We(t.not)&&Object.getOwnPropertyNames(t.not).length===0}s(ym,"IsNever");function xm(t){return we(t,"Not")&&Me(t.not)}s(xm,"IsNot");function _m(t){return we(t,"Null")&&t.type==="null"&&Ve(t.$id)}s(_m,"IsNull");function vm(t){return we(t,"Number")&&t.type==="number"&&Ve(t.$id)&&Ke(t.exclusiveMaximum)&&Ke(t.exclusiveMinimum)&&Ke(t.maximum)&&Ke(t.minimum)&&Ke(t.multipleOf)}s(vm,"IsNumber");function bm(t){return we(t,"Object")&&t.type==="object"&&Ve(t.$id)&&Pf(t.properties)&&Qh(t.additionalProperties)&&Ke(t.minProperties)&&Ke(t.maxProperties)}s(bm,"IsObject");function Sm(t){return we(t,"Promise")&&t.type==="Promise"&&Ve(t.$id)&&Me(t.item)}s(Sm,"IsPromise");function Mm(t){return we(t,"Record")&&t.type==="object"&&Ve(t.$id)&&Qh(t.additionalProperties)&&We(t.patternProperties)&&(e=>{let n=Object.getOwnPropertyNames(e.patternProperties);return n.length===1&&Jh(n[0])&&We(e.patternProperties)&&Me(e.patternProperties[n[0]])})(t)}s(Mm,"IsRecord");function Mw(t){return We(t)&&Fn in t&&t[Fn]==="Recursive"}s(Mw,"IsRecursive");function wm(t){return we(t,"Ref")&&Ve(t.$id)&&Ze(t.$ref)}s(wm,"IsRef");function Em(t){return we(t,"RegExp")&&Ve(t.$id)&&Ze(t.source)&&Ze(t.flags)&&Ke(t.maxLength)&&Ke(t.minLength)}s(Em,"IsRegExp");function Im(t){return we(t,"String")&&t.type==="string"&&Ve(t.$id)&&Ke(t.minLength)&&Ke(t.maxLength)&&xw(t.pattern)&&_w(t.format)}s(Im,"IsString");function Tm(t){return we(t,"Symbol")&&t.type==="symbol"&&Ve(t.$id)}s(Tm,"IsSymbol");function Am(t){return we(t,"TemplateLiteral")&&t.type==="string"&&Ze(t.pattern)&&t.pattern[0]==="^"&&t.pattern[t.pattern.length-1]==="$"}s(Am,"IsTemplateLiteral");function Rm(t){return we(t,"This")&&Ve(t.$id)&&Ze(t.$ref)}s(Rm,"IsThis");function Je(t){return We(t)&&nt in t}s(Je,"IsTransform");function Cm(t){return we(t,"Tuple")&&t.type==="array"&&Ve(t.$id)&&Zn(t.minItems)&&Zn(t.maxItems)&&t.minItems===t.maxItems&&(st(t.items)&&st(t.additionalItems)&&t.minItems===0||Ht(t.items)&&t.items.every(e=>Me(e)))}s(Cm,"IsTuple");function Os(t){return we(t,"Undefined")&&t.type==="undefined"&&Ve(t.$id)}s(Os,"IsUndefined");function ww(t){return Ff(t)&&t.anyOf.every(e=>dm(e)||pm(e))}s(ww,"IsUnionLiteral");function Ff(t){return we(t,"Union")&&Ve(t.$id)&&We(t)&&Ht(t.anyOf)&&t.anyOf.every(e=>Me(e))}s(Ff,"IsUnion");function Pm(t){return we(t,"Uint8Array")&&t.type==="Uint8Array"&&Ve(t.$id)&&Ke(t.minByteLength)&&Ke(t.maxByteLength)}s(Pm,"IsUint8Array");function Fm(t){return we(t,"Unknown")&&Ve(t.$id)}s(Fm,"IsUnknown");function Om(t){return we(t,"Unsafe")}s(Om,"IsUnsafe");function Lm(t){return we(t,"Void")&&t.type==="void"&&Ve(t.$id)}s(Lm,"IsVoid");function Nm(t){return We(t)&&M in t&&Ze(t[M])&&!yw.includes(t[M])}s(Nm,"IsKind");function Me(t){return We(t)&&(tm(t)||nm(t)||sm(t)||im(t)||rm(t)||om(t)||am(t)||cm(t)||lm(t)||um(t)||fm(t)||Zo(t)||mm(t)||gm(t)||ym(t)||xm(t)||_m(t)||vm(t)||bm(t)||Sm(t)||Mm(t)||wm(t)||Em(t)||Im(t)||Tm(t)||Am(t)||Rm(t)||Cm(t)||Os(t)||Ff(t)||Pm(t)||Fm(t)||Om(t)||Lm(t)||Nm(t))}s(Me,"IsSchema");l();var Lf="(true|false)",Jo="(0|[1-9][0-9]*)",Nf="(.*)",Ew="(?!.*)",w3="^".concat(Lf,"$"),Gr="^".concat(Jo,"$"),Hr="^".concat(Nf,"$"),Um="^".concat(Ew,"$");l();var tn={};ri(tn,{Clear:()=>Tw,Delete:()=>Aw,Entries:()=>Iw,Get:()=>Pw,Has:()=>Rw,Set:()=>Cw});l();var Ls=new Map;function Iw(){return new Map(Ls)}s(Iw,"Entries");function Tw(){return Ls.clear()}s(Tw,"Clear");function Aw(t){return Ls.delete(t)}s(Aw,"Delete");function Rw(t){return Ls.has(t)}s(Rw,"Has");function Cw(t,e){Ls.set(t,e)}s(Cw,"Set");function Pw(t){return Ls.get(t)}s(Pw,"Get");var St={};ri(St,{Clear:()=>Ow,Delete:()=>Lw,Entries:()=>Fw,Get:()=>Dw,Has:()=>Nw,Set:()=>Uw});l();var Ns=new Map;function Fw(){return new Map(Ns)}s(Fw,"Entries");function Ow(){return Ns.clear()}s(Ow,"Clear");function Lw(t){return Ns.delete(t)}s(Lw,"Delete");function Nw(t){return Ns.has(t)}s(Nw,"Has");function Uw(t,e){Ns.set(t,e)}s(Uw,"Set");function Dw(t){return Ns.get(t)}s(Dw,"Get");l();function Dm(t,e){return t.includes(e)}s(Dm,"SetIncludes");function km(t){return[...new Set(t)]}s(km,"SetDistinct");function kw(t,e){return t.filter(n=>e.includes(n))}s(kw,"SetIntersect");function Bw(t,e){return t.reduce((n,r)=>kw(n,r),e)}s(Bw,"SetIntersectManyResolve");function Bm(t){return t.length===1?t[0]:t.length>1?Bw(t.slice(1),t[0]):[]}s(Bm,"SetIntersectMany");function zm(t){let e=[];for(let n of t)e.push(...n);return e}s(zm,"SetUnionMany");l();function yi(t){return T({[M]:"Any"},t)}s(yi,"Any");l();function tc(t,e){return T({[M]:"Array",type:"array",items:t},e)}s(tc,"Array");l();function nc(t,e){return T({[M]:"AsyncIterator",type:"AsyncIterator",items:t},e)}s(nc,"AsyncIterator");l();l();l();function zw(t,e){let i=t,{[e]:n}=i;return wo(i,[Ea(e)])}s(zw,"DiscardKey");function ft(t,e){return e.reduce((n,r)=>zw(n,r),t)}s(ft,"Discard");l();function Ge(t){return T({[M]:"Never",not:{}},t)}s(Ge,"Never");l();l();function Ae(t){return T({[M]:"MappedResult",properties:t})}s(Ae,"MappedResult");l();l();function rc(t,e,n){return T({[M]:"Constructor",type:"Constructor",parameters:t,returns:e},n)}s(rc,"Constructor");l();function xi(t,e,n){return T({[M]:"Function",type:"Function",parameters:t,returns:e},n)}s(xi,"Function");l();l();l();l();function Qo(t,e){return T({[M]:"Union",anyOf:t},e)}s(Qo,"UnionCreate");function Vw(t){return t.some(e=>pr(e))}s(Vw,"IsUnionOptional");function Vm(t){return t.map(e=>pr(e)?Gw(e):e)}s(Vm,"RemoveOptionalFromRest");function Gw(t){return ft(t,[en])}s(Gw,"RemoveOptionalFromType");function Hw(t,e){return Vw(t)?an(Qo(Vm(t),e)):Qo(Vm(t),e)}s(Hw,"ResolveUnion");function hr(t,e){return t.length===0?Ge(e):t.length===1?T(t[0],e):Hw(t,e)}s(hr,"UnionEvaluated");l();function He(t,e){return t.length===0?Ge(e):t.length===1?T(t[0],e):Qo(t,e)}s(He,"Union");l();l();l();var Df=class Df extends ne{};s(Df,"TemplateLiteralParserError");var ic=Df;function $w(t){return t.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}s($w,"Unescape");function Uf(t,e,n){return t[e]===n&&t.charCodeAt(e-1)!==92}s(Uf,"IsNonEscaped");function $r(t,e){return Uf(t,e,"(")}s($r,"IsOpenParen");function ea(t,e){return Uf(t,e,")")}s(ea,"IsCloseParen");function Gm(t,e){return Uf(t,e,"|")}s(Gm,"IsSeparator");function Ww(t){if(!($r(t,0)&&ea(t,t.length-1)))return!1;let e=0;for(let n=0;n<t.length;n++)if($r(t,n)&&(e+=1),ea(t,n)&&(e-=1),e===0&&n!==t.length-1)return!1;return!0}s(Ww,"IsGroup");function jw(t){return t.slice(1,t.length-1)}s(jw,"InGroup");function Xw(t){let e=0;for(let n=0;n<t.length;n++)if($r(t,n)&&(e+=1),ea(t,n)&&(e-=1),Gm(t,n)&&e===0)return!0;return!1}s(Xw,"IsPrecedenceOr");function qw(t){for(let e=0;e<t.length;e++)if($r(t,e))return!0;return!1}s(qw,"IsPrecedenceAnd");function Kw(t){let[e,n]=[0,0],r=[];for(let o=0;o<t.length;o++)if($r(t,o)&&(e+=1),ea(t,o)&&(e-=1),Gm(t,o)&&e===0){let a=t.slice(n,o);a.length>0&&r.push(Us(a)),n=o+1}let i=t.slice(n);return i.length>0&&r.push(Us(i)),r.length===0?{type:"const",const:""}:r.length===1?r[0]:{type:"or",expr:r}}s(Kw,"Or");function Yw(t){function e(i,o){if(!$r(i,o))throw new ic("TemplateLiteralParser: Index must point to open parens");let a=0;for(let c=o;c<i.length;c++)if($r(i,c)&&(a+=1),ea(i,c)&&(a-=1),a===0)return[o,c];throw new ic("TemplateLiteralParser: Unclosed group parens in expression")}s(e,"Group");function n(i,o){for(let a=o;a<i.length;a++)if($r(i,a))return[o,a];return[o,i.length]}s(n,"Range");let r=[];for(let i=0;i<t.length;i++)if($r(t,i)){let[o,a]=e(t,i),c=t.slice(o,a+1);r.push(Us(c)),i=a}else{let[o,a]=n(t,i),c=t.slice(o,a);c.length>0&&r.push(Us(c)),i=a-1}return r.length===0?{type:"const",const:""}:r.length===1?r[0]:{type:"and",expr:r}}s(Yw,"And");function Us(t){return Ww(t)?Us(jw(t)):Xw(t)?Kw(t):qw(t)?Yw(t):{type:"const",const:$w(t)}}s(Us,"TemplateLiteralParse");function Ds(t){return Us(t.slice(1,t.length-1))}s(Ds,"TemplateLiteralParseExact");var Bf=class Bf extends ne{};s(Bf,"TemplateLiteralFiniteError");var kf=Bf;function Zw(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="0"&&t.expr[1].type==="const"&&t.expr[1].const==="[1-9][0-9]*"}s(Zw,"IsNumberExpression");function Jw(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="true"&&t.expr[1].type==="const"&&t.expr[1].const==="false"}s(Jw,"IsBooleanExpression");function Qw(t){return t.type==="const"&&t.const===".*"}s(Qw,"IsStringExpression");function Yi(t){return Zw(t)||Qw(t)?!1:Jw(t)?!0:t.type==="and"?t.expr.every(e=>Yi(e)):t.type==="or"?t.expr.every(e=>Yi(e)):t.type==="const"?!0:(()=>{throw new kf("Unknown expression type")})()}s(Yi,"IsTemplateLiteralExpressionFinite");function sc(t){let e=Ds(t.pattern);return Yi(e)}s(sc,"IsTemplateLiteralFinite");l();var Vf=class Vf extends ne{};s(Vf,"TemplateLiteralGenerateError");var zf=Vf;function*Hm(t){if(t.length===1)return yield*C(t[0]);for(let e of t[0])for(let n of Hm(t.slice(1)))yield"".concat(e).concat(n)}s(Hm,"GenerateReduce");function*eE(t){return yield*C(Hm(t.expr.map(e=>[...ta(e)])))}s(eE,"GenerateAnd");function*tE(t){for(let e of t.expr)yield*C(ta(e))}s(tE,"GenerateOr");function*nE(t){return yield t.const}s(nE,"GenerateConst");function*ta(t){return t.type==="and"?yield*C(eE(t)):t.type==="or"?yield*C(tE(t)):t.type==="const"?yield*C(nE(t)):(()=>{throw new zf("Unknown expression")})()}s(ta,"TemplateLiteralExpressionGenerate");function ks(t){let e=Ds(t.pattern);return Yi(e)?[...ta(e)]:[]}s(ks,"TemplateLiteralGenerate");l();l();function Le(t,e){return T({[M]:"Literal",const:t,type:typeof t},e)}s(Le,"Literal");l();function oc(t){return T({[M]:"Boolean",type:"boolean"},t)}s(oc,"Boolean");l();function Bs(t){return T({[M]:"BigInt",type:"bigint"},t)}s(Bs,"BigInt");l();function mr(t){return T({[M]:"Number",type:"number"},t)}s(mr,"Number");l();function On(t){return T({[M]:"String",type:"string"},t)}s(On,"String");function*rE(t){let e=t.trim().replace(/"|'/g,"");return e==="boolean"?yield oc():e==="number"?yield mr():e==="bigint"?yield Bs():e==="string"?yield On():yield(()=>{let n=e.split("|").map(r=>Le(r.trim()));return n.length===0?Ge():n.length===1?n[0]:hr(n)})()}s(rE,"FromUnion");function*iE(t){if(t[1]!=="{"){let e=Le("$"),n=Gf(t.slice(1));return yield*C([e,...n])}for(let e=2;e<t.length;e++)if(t[e]==="}"){let n=rE(t.slice(2,e)),r=Gf(t.slice(e+1));return yield*C([...n,...r])}yield Le(t)}s(iE,"FromTerminal");function*Gf(t){for(let e=0;e<t.length;e++)if(t[e]==="$"){let n=Le(t.slice(0,e)),r=iE(t.slice(e));return yield*C([n,...r])}yield Le(t)}s(Gf,"FromSyntax");function $m(t){return[...Gf(t)]}s($m,"TemplateLiteralSyntax");l();var Wf=class Wf extends ne{};s(Wf,"TemplateLiteralPatternError");var Hf=Wf;function sE(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(sE,"Escape");function Wm(t,e){return gn(t)?t.pattern.slice(1,t.pattern.length-1):Fe(t)?"(".concat(t.anyOf.map(n=>Wm(n,e)).join("|"),")"):qi(t)?"".concat(e).concat(Jo):Xi(t)?"".concat(e).concat(Jo):Mf(t)?"".concat(e).concat(Jo):Ko(t)?"".concat(e).concat(Nf):Vr(t)?"".concat(e).concat(sE(t.const.toString())):wf(t)?"".concat(e).concat(Lf):(()=>{throw new Hf("Unexpected Kind '".concat(t[M],"'"))})()}s(Wm,"Visit");function $f(t){return"^".concat(t.map(e=>Wm(e,"")).join(""),"$")}s($f,"TemplateLiteralPattern");l();function Zi(t){let n=ks(t).map(r=>Le(r));return hr(n)}s(Zi,"TemplateLiteralToUnion");l();function ac(t,e){let n=Ze(t)?$f($m(t)):$f(t);return T({[M]:"TemplateLiteral",type:"string",pattern:n},e)}s(ac,"TemplateLiteral");function oE(t){return ks(t).map(n=>n.toString())}s(oE,"FromTemplateLiteral");function aE(t){let e=[];for(let n of t)e.push(...cn(n));return e}s(aE,"FromUnion");function cE(t){return[t.toString()]}s(cE,"FromLiteral");function cn(t){return[...new Set(gn(t)?oE(t):Fe(t)?aE(t.anyOf):Vr(t)?cE(t.const):qi(t)?["[number]"]:Xi(t)?["[number]"]:[])]}s(cn,"IndexPropertyKeys");l();function lE(t,e,n){let r={};for(let i of Object.getOwnPropertyNames(e))r[i]=zs(t,cn(e[i]),n);return r}s(lE,"FromProperties");function uE(t,e,n){return lE(t,e.properties,n)}s(uE,"FromMappedResult");function jm(t,e,n){let r=uE(t,e,n);return Ae(r)}s(jm,"IndexFromMappedResult");function qm(t,e){return t.map(n=>Km(n,e))}s(qm,"FromRest");function fE(t){return t.filter(e=>!mi(e))}s(fE,"FromIntersectRest");function dE(t,e){return cc(fE(qm(t,e)))}s(dE,"FromIntersect");function pE(t){return t.some(e=>mi(e))?[]:t}s(pE,"FromUnionRest");function hE(t,e){return hr(pE(qm(t,e)))}s(hE,"FromUnion");function mE(t,e){return e in t?t[e]:e==="[number]"?hr(t):Ge()}s(mE,"FromTuple");function gE(t,e){return e==="[number]"?t:Ge()}s(gE,"FromArray");function yE(t,e){return e in t?t[e]:Ge()}s(yE,"FromProperty");function Km(t,e){var n;return gt(t)?dE(t.allOf,e):Fe(t)?hE(t.anyOf,e):Jn(t)?mE((n=t.items)!=null?n:[],e):zr(t)?gE(t.items,e):bt(t)?yE(t.properties,e):Ge()}s(Km,"IndexFromPropertyKey");function na(t,e){return e.map(n=>Km(t,n))}s(na,"IndexFromPropertyKeys");function Xm(t,e){return hr(na(t,e))}s(Xm,"FromSchema");function zs(t,e,n){return rt(e)?jm(t,e,n):mn(e)?Ym(t,e,n):T(Qn(e)?Xm(t,cn(e)):Xm(t,e),n)}s(zs,"Index");function xE(t,e,n){return{[e]:zs(t,[e],tt(n))}}s(xE,"MappedIndexPropertyKey");function _E(t,e,n){return e.reduce((r,i)=>y(y({},r),xE(t,i,n)),{})}s(_E,"MappedIndexPropertyKeys");function vE(t,e,n){return _E(t,e.keys,n)}s(vE,"MappedIndexProperties");function Ym(t,e,n){let r=vE(t,e,n);return Ae(r)}s(Ym,"IndexFromMappedKey");l();function lc(t,e){return T({[M]:"Iterator",type:"Iterator",items:t},e)}s(lc,"Iterator");l();function bE(t){let e=[];for(let n in t)pr(t[n])||e.push(n);return e}s(bE,"RequiredKeys");function SE(t,e){let n=bE(t),r=n.length>0?{[M]:"Object",type:"object",properties:t,required:n}:{[M]:"Object",type:"object",properties:t};return T(r,e)}s(SE,"_Object");var je=SE;l();function uc(t,e){return T({[M]:"Promise",type:"Promise",item:t},e)}s(uc,"Promise");l();l();function ME(t){return T(ft(t,[Br]))}s(ME,"RemoveReadonly");function wE(t){return T(O(y({},t),{[Br]:"Readonly"}))}s(wE,"AddReadonly");function EE(t,e){return e===!1?ME(t):wE(t)}s(EE,"ReadonlyWithFlag");function Ln(t,e){let n=e!=null?e:!0;return rt(t)?Zm(t,n):EE(t,n)}s(Ln,"Readonly");function IE(t,e){let n={};for(let r of globalThis.Object.getOwnPropertyNames(t))n[r]=Ln(t[r],e);return n}s(IE,"FromProperties");function TE(t,e){return IE(t.properties,e)}s(TE,"FromMappedResult");function Zm(t,e){let n=TE(t,e);return Ae(n)}s(Zm,"ReadonlyFromMappedResult");l();function gr(t,e){return T(t.length>0?{[M]:"Tuple",type:"array",items:t,additionalItems:!1,minItems:t.length,maxItems:t.length}:{[M]:"Tuple",type:"array",minItems:t.length,maxItems:t.length},e)}s(gr,"Tuple");function Jm(t,e){return t in e?Nn(t,e[t]):Ae(e)}s(Jm,"FromMappedResult");function AE(t){return{[t]:Le(t)}}s(AE,"MappedKeyToKnownMappedResultProperties");function RE(t){let e={};for(let n of t)e[n]=Le(n);return e}s(RE,"MappedKeyToUnknownMappedResultProperties");function CE(t,e){return Dm(e,t)?AE(t):RE(e)}s(CE,"MappedKeyToMappedResultProperties");function PE(t,e){let n=CE(t,e);return Jm(t,n)}s(PE,"FromMappedKey");function ra(t,e){return e.map(n=>Nn(t,n))}s(ra,"FromRest");function FE(t,e){let n={};for(let r of globalThis.Object.getOwnPropertyNames(e))n[r]=Nn(t,e[r]);return n}s(FE,"FromProperties");function Nn(t,e){var r;let n=y({},e);return pr(e)?an(Nn(t,ft(e,[en]))):Zh(e)?Ln(Nn(t,ft(e,[Br]))):rt(e)?Jm(t,e.properties):mn(e)?PE(t,e.keys):jo(e)?rc(ra(t,e.parameters),Nn(t,e.returns),n):Xo(e)?xi(ra(t,e.parameters),Nn(t,e.returns),n):Wo(e)?nc(Nn(t,e.items),n):qo(e)?lc(Nn(t,e.items),n):gt(e)?ln(ra(t,e.allOf),n):Fe(e)?He(ra(t,e.anyOf),n):Jn(e)?gr(ra(t,(r=e.items)!=null?r:[]),n):bt(e)?je(FE(t,e.properties),n):zr(e)?tc(Nn(t,e.items),n):Ki(e)?uc(Nn(t,e.item),n):e}s(Nn,"FromSchemaType");function OE(t,e){let n={};for(let r of t)n[r]=Nn(r,e);return n}s(OE,"MappedFunctionReturnType");function Qm(t,e,n){let r=Qn(t)?cn(t):t,i=e({[M]:"MappedKey",keys:r}),o=OE(r,i);return je(o,n)}s(Qm,"Mapped");l();function LE(t){return T(ft(t,[en]))}s(LE,"RemoveOptional");function NE(t){return T(O(y({},t),{[en]:"Optional"}))}s(NE,"AddOptional");function UE(t,e){return e===!1?LE(t):NE(t)}s(UE,"OptionalWithFlag");function an(t,e){let n=e!=null?e:!0;return rt(t)?eg(t,n):UE(t,n)}s(an,"Optional");function DE(t,e){let n={};for(let r of globalThis.Object.getOwnPropertyNames(t))n[r]=an(t[r],e);return n}s(DE,"FromProperties");function kE(t,e){return DE(t.properties,e)}s(kE,"FromMappedResult");function eg(t,e){let n=kE(t,e);return Ae(n)}s(eg,"OptionalFromMappedResult");l();function ia(t,e={}){let n=t.every(i=>bt(i)),r=Qn(e.unevaluatedProperties)?{unevaluatedProperties:e.unevaluatedProperties}:{};return T(e.unevaluatedProperties===!1||Qn(e.unevaluatedProperties)||n?O(y({},r),{[M]:"Intersect",type:"object",allOf:t}):O(y({},r),{[M]:"Intersect",allOf:t}),e)}s(ia,"IntersectCreate");function BE(t){return t.every(e=>pr(e))}s(BE,"IsIntersectOptional");function zE(t){return ft(t,[en])}s(zE,"RemoveOptionalFromType");function tg(t){return t.map(e=>pr(e)?zE(e):e)}s(tg,"RemoveOptionalFromRest");function VE(t,e){return BE(t)?an(ia(tg(t),e)):ia(tg(t),e)}s(VE,"ResolveIntersect");function cc(t,e={}){if(t.length===0)return Ge(e);if(t.length===1)return T(t[0],e);if(t.some(n=>Fs(n)))throw new Error("Cannot intersect transform types");return VE(t,e)}s(cc,"IntersectEvaluated");l();function ln(t,e){if(t.length===0)return Ge(e);if(t.length===1)return T(t[0],e);if(t.some(n=>Fs(n)))throw new Error("Cannot intersect transform types");return ia(t,e)}s(ln,"Intersect");function ng(t){return t.map(e=>jf(e))}s(ng,"FromRest");function GE(t){return ln(ng(t))}s(GE,"FromIntersect");function HE(t){return He(ng(t))}s(HE,"FromUnion");function $E(t){return jf(t)}s($E,"FromPromise");function jf(t){return gt(t)?GE(t.allOf):Fe(t)?HE(t.anyOf):Ki(t)?$E(t.item):t}s(jf,"AwaitedResolve");function rg(t,e){return T(jf(t),e)}s(rg,"Awaited");l();l();l();l();function ig(t){let e=[];for(let n of t)e.push(Et(n));return e}s(ig,"FromRest");function WE(t){let e=ig(t);return zm(e)}s(WE,"FromIntersect");function jE(t){let e=ig(t);return Bm(e)}s(jE,"FromUnion");function XE(t){return t.map((e,n)=>n.toString())}s(XE,"FromTuple");function qE(t){return["[number]"]}s(qE,"FromArray");function KE(t){return globalThis.Object.getOwnPropertyNames(t)}s(KE,"FromProperties");function YE(t){return Xf?globalThis.Object.getOwnPropertyNames(t).map(n=>n[0]==="^"&&n[n.length-1]==="$"?n.slice(1,n.length-1):n):[]}s(YE,"FromPatternProperties");function Et(t){var e;return gt(t)?WE(t.allOf):Fe(t)?jE(t.anyOf):Jn(t)?XE((e=t.items)!=null?e:[]):zr(t)?qE(t.items):bt(t)?KE(t.properties):Ef(t)?YE(t.patternProperties):[]}s(Et,"KeyOfPropertyKeys");var Xf=!1;function Wr(t){Xf=!0;let e=Et(t);Xf=!1;let n=e.map(r=>"(".concat(r,")"));return"^(".concat(n.join("|"),")$")}s(Wr,"KeyOfPattern");function ZE(t){return t.map(e=>e==="[number]"?mr():Le(e))}s(ZE,"KeyOfPropertyKeysToRest");function fc(t,e){if(rt(t))return sg(t,e);{let n=Et(t),r=ZE(n),i=hr(r);return T(i,e)}}s(fc,"KeyOf");function JE(t,e){let n={};for(let r of globalThis.Object.getOwnPropertyNames(t))n[r]=fc(t[r],tt(e));return n}s(JE,"FromProperties");function QE(t,e){return JE(t.properties,e)}s(QE,"FromMappedResult");function sg(t,e){let n=QE(t,e);return Ae(n)}s(sg,"KeyOfFromMappedResult");l();function _i(t){let e=Et(t),n=na(t,e);return e.map((r,i)=>[e[i],n[i]])}s(_i,"KeyOfPropertyEntries");function eI(t){let e=[];for(let n of t)e.push(...Et(n));return km(e)}s(eI,"CompositeKeys");function tI(t){return t.filter(e=>!mi(e))}s(tI,"FilterNever");function nI(t,e){let n=[];for(let r of t)n.push(...na(r,[e]));return tI(n)}s(nI,"CompositeProperty");function rI(t,e){let n={};for(let r of e)n[r]=cc(nI(t,r));return n}s(rI,"CompositeProperties");function og(t,e){let n=eI(t),r=rI(t,n);return je(r,e)}s(og,"Composite");l();l();function dc(t){return T({[M]:"Date",type:"Date"},t)}s(dc,"Date");l();function pc(t){return T({[M]:"Null",type:"null"},t)}s(pc,"Null");l();function hc(t){return T({[M]:"Symbol",type:"symbol"},t)}s(hc,"Symbol");l();function mc(t){return T({[M]:"Undefined",type:"undefined"},t)}s(mc,"Undefined");l();function gc(t){return T({[M]:"Uint8Array",type:"Uint8Array"},t)}s(gc,"Uint8Array");l();function jr(t){return T({[M]:"Unknown"},t)}s(jr,"Unknown");function iI(t){return t.map(e=>qf(e,!1))}s(iI,"FromArray");function sI(t){let e={};for(let n of globalThis.Object.getOwnPropertyNames(t))e[n]=Ln(qf(t[n],!1));return e}s(sI,"FromProperties");function yc(t,e){return e===!0?t:Ln(t)}s(yc,"ConditionalReadonly");function qf(t,e){return mf(t)?yc(yi(),e):yf(t)?yc(yi(),e):Ht(t)?Ln(gr(iI(t))):Ur(t)?gc():ji(t)?dc():We(t)?yc(je(sI(t)),e):gf(t)?yc(xi([],jr()),e):st(t)?mc():xf(t)?pc():_f(t)?hc():Vo(t)?Bs():Zn(t)?Le(t):pi(t)?Le(t):Ze(t)?Le(t):je({})}s(qf,"FromValue");function ag(t,e){return T(qf(t,!0),e)}s(ag,"Const");l();function cg(t,e){return gr(t.parameters,e)}s(cg,"ConstructorParameters");l();function sa(t,e){return t.map(n=>er(n,e))}s(sa,"FromRest");function oI(t,e){let n={};for(let r of globalThis.Object.getOwnPropertyNames(t))n[r]=er(t[r],e);return n}s(oI,"FromProperties");function aI(t,e){return t.parameters=sa(t.parameters,e),t.returns=er(t.returns,e),t}s(aI,"FromConstructor");function cI(t,e){return t.parameters=sa(t.parameters,e),t.returns=er(t.returns,e),t}s(cI,"FromFunction");function lI(t,e){return t.allOf=sa(t.allOf,e),t}s(lI,"FromIntersect");function uI(t,e){return t.anyOf=sa(t.anyOf,e),t}s(uI,"FromUnion");function fI(t,e){return st(t.items)||(t.items=sa(t.items,e)),t}s(fI,"FromTuple");function dI(t,e){return t.items=er(t.items,e),t}s(dI,"FromArray");function pI(t,e){return t.properties=oI(t.properties,e),t}s(pI,"FromObject");function hI(t,e){return t.item=er(t.item,e),t}s(hI,"FromPromise");function mI(t,e){return t.items=er(t.items,e),t}s(mI,"FromAsyncIterator");function gI(t,e){return t.items=er(t.items,e),t}s(gI,"FromIterator");function yI(t,e){let n=e.find(i=>i.$id===t.$ref);if(n===void 0)throw Error("Unable to dereference schema with $id ".concat(t.$ref));let r=ft(n,["$id"]);return er(r,e)}s(yI,"FromRef");function xI(t,e){return jo(t)?aI(t,e):Xo(t)?cI(t,e):gt(t)?lI(t,e):Fe(t)?uI(t,e):Jn(t)?fI(t,e):zr(t)?dI(t,e):bt(t)?pI(t,e):Ki(t)?hI(t,e):Wo(t)?mI(t,e):qo(t)?gI(t,e):If(t)?yI(t,e):t}s(xI,"DerefResolve");function er(t,e){return xI(Ho(t),qh(e))}s(er,"Deref");l();function lg(t,e){if(st(t))throw new Error("Enum undefined or empty");let n=globalThis.Object.getOwnPropertyNames(t).filter(o=>isNaN(o)).map(o=>t[o]),i=[...new Set(n)].map(o=>Le(o));return He(i,O(y({},e),{[Fn]:"Enum"}))}s(lg,"Enum");l();l();l();var td=class td extends ne{};s(td,"ExtendsResolverError");var Yf=td,I;(function(t){t[t.Union=0]="Union",t[t.True=1]="True",t[t.False=2]="False"})(I||(I={}));function Un(t){return t===I.False?t:I.True}s(Un,"IntoBooleanResult");function Vs(t){throw new Yf(t)}s(Vs,"Throw");function xt(t){return _.IsNever(t)||_.IsIntersect(t)||_.IsUnion(t)||_.IsUnknown(t)||_.IsAny(t)}s(xt,"IsStructuralRight");function _t(t,e){return _.IsNever(e)?gg(t,e):_.IsIntersect(e)?xc(t,e):_.IsUnion(e)?ed(t,e):_.IsUnknown(e)?vg(t,e):_.IsAny(e)?Qf(t,e):Vs("StructuralRight")}s(_t,"StructuralRight");function Qf(t,e){return I.True}s(Qf,"FromAnyRight");function _I(t,e){return _.IsIntersect(e)?xc(t,e):_.IsUnion(e)&&e.anyOf.some(n=>_.IsAny(n)||_.IsUnknown(n))?I.True:_.IsUnion(e)?I.Union:_.IsUnknown(e)||_.IsAny(e)?I.True:I.Union}s(_I,"FromAny");function vI(t,e){return _.IsUnknown(t)?I.False:_.IsAny(t)?I.Union:_.IsNever(t)?I.True:I.False}s(vI,"FromArrayRight");function bI(t,e){return _.IsObject(e)&&_c(e)?I.True:xt(e)?_t(t,e):_.IsArray(e)?Un($e(t.items,e.items)):I.False}s(bI,"FromArray");function SI(t,e){return xt(e)?_t(t,e):_.IsAsyncIterator(e)?Un($e(t.items,e.items)):I.False}s(SI,"FromAsyncIterator");function MI(t,e){return xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsRecord(e)?Dn(t,e):_.IsBigInt(e)?I.True:I.False}s(MI,"FromBigInt");function hg(t,e){return _.IsLiteralBoolean(t)||_.IsBoolean(t)?I.True:I.False}s(hg,"FromBooleanRight");function wI(t,e){return xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsRecord(e)?Dn(t,e):_.IsBoolean(e)?I.True:I.False}s(wI,"FromBoolean");function EI(t,e){return xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsConstructor(e)?t.parameters.length>e.parameters.length?I.False:t.parameters.every((n,r)=>Un($e(e.parameters[r],n))===I.True)?Un($e(t.returns,e.returns)):I.False:I.False}s(EI,"FromConstructor");function II(t,e){return xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsRecord(e)?Dn(t,e):_.IsDate(e)?I.True:I.False}s(II,"FromDate");function TI(t,e){return xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsFunction(e)?t.parameters.length>e.parameters.length?I.False:t.parameters.every((n,r)=>Un($e(e.parameters[r],n))===I.True)?Un($e(t.returns,e.returns)):I.False:I.False}s(TI,"FromFunction");function mg(t,e){return _.IsLiteral(t)&&be.IsNumber(t.const)||_.IsNumber(t)||_.IsInteger(t)?I.True:I.False}s(mg,"FromIntegerRight");function AI(t,e){return _.IsInteger(e)||_.IsNumber(e)?I.True:xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsRecord(e)?Dn(t,e):I.False}s(AI,"FromInteger");function xc(t,e){return e.allOf.every(n=>$e(t,n)===I.True)?I.True:I.False}s(xc,"FromIntersectRight");function RI(t,e){return t.allOf.some(n=>$e(n,e)===I.True)?I.True:I.False}s(RI,"FromIntersect");function CI(t,e){return xt(e)?_t(t,e):_.IsIterator(e)?Un($e(t.items,e.items)):I.False}s(CI,"FromIterator");function PI(t,e){return _.IsLiteral(e)&&e.const===t.const?I.True:xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsRecord(e)?Dn(t,e):_.IsString(e)?_g(t,e):_.IsNumber(e)?yg(t,e):_.IsInteger(e)?mg(t,e):_.IsBoolean(e)?hg(t,e):I.False}s(PI,"FromLiteral");function gg(t,e){return I.False}s(gg,"FromNeverRight");function FI(t,e){return I.True}s(FI,"FromNever");function ug(t){let[e,n]=[t,0];for(;_.IsNot(e);)e=e.not,n+=1;return n%2===0?e:jr()}s(ug,"UnwrapTNot");function OI(t,e){return _.IsNot(t)?$e(ug(t),e):_.IsNot(e)?$e(t,ug(e)):Vs("Invalid fallthrough for Not")}s(OI,"FromNot");function LI(t,e){return xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsRecord(e)?Dn(t,e):_.IsNull(e)?I.True:I.False}s(LI,"FromNull");function yg(t,e){return _.IsLiteralNumber(t)||_.IsNumber(t)||_.IsInteger(t)?I.True:I.False}s(yg,"FromNumberRight");function NI(t,e){return xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsRecord(e)?Dn(t,e):_.IsInteger(e)||_.IsNumber(e)?I.True:I.False}s(NI,"FromNumber");function un(t,e){return Object.getOwnPropertyNames(t.properties).length===e}s(un,"IsObjectPropertyCount");function fg(t){return _c(t)}s(fg,"IsObjectStringLike");function dg(t){return un(t,0)||un(t,1)&&"description"in t.properties&&_.IsUnion(t.properties.description)&&t.properties.description.anyOf.length===2&&(_.IsString(t.properties.description.anyOf[0])&&_.IsUndefined(t.properties.description.anyOf[1])||_.IsString(t.properties.description.anyOf[1])&&_.IsUndefined(t.properties.description.anyOf[0]))}s(dg,"IsObjectSymbolLike");function Kf(t){return un(t,0)}s(Kf,"IsObjectNumberLike");function pg(t){return un(t,0)}s(pg,"IsObjectBooleanLike");function UI(t){return un(t,0)}s(UI,"IsObjectBigIntLike");function DI(t){return un(t,0)}s(DI,"IsObjectDateLike");function kI(t){return _c(t)}s(kI,"IsObjectUint8ArrayLike");function BI(t){let e=mr();return un(t,0)||un(t,1)&&"length"in t.properties&&Un($e(t.properties.length,e))===I.True}s(BI,"IsObjectFunctionLike");function zI(t){return un(t,0)}s(zI,"IsObjectConstructorLike");function _c(t){let e=mr();return un(t,0)||un(t,1)&&"length"in t.properties&&Un($e(t.properties.length,e))===I.True}s(_c,"IsObjectArrayLike");function VI(t){let e=xi([yi()],yi());return un(t,0)||un(t,1)&&"then"in t.properties&&Un($e(t.properties.then,e))===I.True}s(VI,"IsObjectPromiseLike");function xg(t,e){return $e(t,e)===I.False||_.IsOptional(t)&&!_.IsOptional(e)?I.False:I.True}s(xg,"Property");function $t(t,e){return _.IsUnknown(t)?I.False:_.IsAny(t)?I.Union:_.IsNever(t)||_.IsLiteralString(t)&&fg(e)||_.IsLiteralNumber(t)&&Kf(e)||_.IsLiteralBoolean(t)&&pg(e)||_.IsSymbol(t)&&dg(e)||_.IsBigInt(t)&&UI(e)||_.IsString(t)&&fg(e)||_.IsSymbol(t)&&dg(e)||_.IsNumber(t)&&Kf(e)||_.IsInteger(t)&&Kf(e)||_.IsBoolean(t)&&pg(e)||_.IsUint8Array(t)&&kI(e)||_.IsDate(t)&&DI(e)||_.IsConstructor(t)&&zI(e)||_.IsFunction(t)&&BI(e)?I.True:_.IsRecord(t)&&_.IsString(Zf(t))?e[Fn]==="Record"?I.True:I.False:_.IsRecord(t)&&_.IsNumber(Zf(t))?un(e,0)?I.True:I.False:I.False}s($t,"FromObjectRight");function GI(t,e){return xt(e)?_t(t,e):_.IsRecord(e)?Dn(t,e):_.IsObject(e)?(()=>{for(let n of Object.getOwnPropertyNames(e.properties)){if(!(n in t.properties)&&!_.IsOptional(e.properties[n]))return I.False;if(_.IsOptional(e.properties[n]))return I.True;if(xg(t.properties[n],e.properties[n])===I.False)return I.False}return I.True})():I.False}s(GI,"FromObject");function HI(t,e){return xt(e)?_t(t,e):_.IsObject(e)&&VI(e)?I.True:_.IsPromise(e)?Un($e(t.item,e.item)):I.False}s(HI,"FromPromise");function Zf(t){return Gr in t.patternProperties?mr():Hr in t.patternProperties?On():Vs("Unknown record key pattern")}s(Zf,"RecordKey");function Jf(t){return Gr in t.patternProperties?t.patternProperties[Gr]:Hr in t.patternProperties?t.patternProperties[Hr]:Vs("Unable to get record value schema")}s(Jf,"RecordValue");function Dn(t,e){let[n,r]=[Zf(e),Jf(e)];return _.IsLiteralString(t)&&_.IsNumber(n)&&Un($e(t,r))===I.True?I.True:_.IsUint8Array(t)&&_.IsNumber(n)||_.IsString(t)&&_.IsNumber(n)||_.IsArray(t)&&_.IsNumber(n)?$e(t,r):_.IsObject(t)?(()=>{for(let i of Object.getOwnPropertyNames(t.properties))if(xg(r,t.properties[i])===I.False)return I.False;return I.True})():I.False}s(Dn,"FromRecordRight");function $I(t,e){return xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsRecord(e)?$e(Jf(t),Jf(e)):I.False}s($I,"FromRecord");function WI(t,e){let n=_.IsRegExp(t)?On():t,r=_.IsRegExp(e)?On():e;return $e(n,r)}s(WI,"FromRegExp");function _g(t,e){return _.IsLiteral(t)&&be.IsString(t.const)||_.IsString(t)?I.True:I.False}s(_g,"FromStringRight");function jI(t,e){return xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsRecord(e)?Dn(t,e):_.IsString(e)?I.True:I.False}s(jI,"FromString");function XI(t,e){return xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsRecord(e)?Dn(t,e):_.IsSymbol(e)?I.True:I.False}s(XI,"FromSymbol");function qI(t,e){return _.IsTemplateLiteral(t)?$e(Zi(t),e):_.IsTemplateLiteral(e)?$e(t,Zi(e)):Vs("Invalid fallthrough for TemplateLiteral")}s(qI,"FromTemplateLiteral");function KI(t,e){return _.IsArray(e)&&t.items!==void 0&&t.items.every(n=>$e(n,e.items)===I.True)}s(KI,"IsArrayOfTuple");function YI(t,e){return _.IsNever(t)?I.True:_.IsUnknown(t)?I.False:_.IsAny(t)?I.Union:I.False}s(YI,"FromTupleRight");function ZI(t,e){return xt(e)?_t(t,e):_.IsObject(e)&&_c(e)||_.IsArray(e)&&KI(t,e)?I.True:_.IsTuple(e)?be.IsUndefined(t.items)&&!be.IsUndefined(e.items)||!be.IsUndefined(t.items)&&be.IsUndefined(e.items)?I.False:be.IsUndefined(t.items)&&!be.IsUndefined(e.items)||t.items.every((n,r)=>$e(n,e.items[r])===I.True)?I.True:I.False:I.False}s(ZI,"FromTuple");function JI(t,e){return xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsRecord(e)?Dn(t,e):_.IsUint8Array(e)?I.True:I.False}s(JI,"FromUint8Array");function QI(t,e){return xt(e)?_t(t,e):_.IsObject(e)?$t(t,e):_.IsRecord(e)?Dn(t,e):_.IsVoid(e)?nT(t,e):_.IsUndefined(e)?I.True:I.False}s(QI,"FromUndefined");function ed(t,e){return e.anyOf.some(n=>$e(t,n)===I.True)?I.True:I.False}s(ed,"FromUnionRight");function eT(t,e){return t.anyOf.every(n=>$e(n,e)===I.True)?I.True:I.False}s(eT,"FromUnion");function vg(t,e){return I.True}s(vg,"FromUnknownRight");function tT(t,e){return _.IsNever(e)?gg(t,e):_.IsIntersect(e)?xc(t,e):_.IsUnion(e)?ed(t,e):_.IsAny(e)?Qf(t,e):_.IsString(e)?_g(t,e):_.IsNumber(e)?yg(t,e):_.IsInteger(e)?mg(t,e):_.IsBoolean(e)?hg(t,e):_.IsArray(e)?vI(t,e):_.IsTuple(e)?YI(t,e):_.IsObject(e)?$t(t,e):_.IsUnknown(e)?I.True:I.False}s(tT,"FromUnknown");function nT(t,e){return _.IsUndefined(t)||_.IsUndefined(t)?I.True:I.False}s(nT,"FromVoidRight");function rT(t,e){return _.IsIntersect(e)?xc(t,e):_.IsUnion(e)?ed(t,e):_.IsUnknown(e)?vg(t,e):_.IsAny(e)?Qf(t,e):_.IsObject(e)?$t(t,e):_.IsVoid(e)?I.True:I.False}s(rT,"FromVoid");function $e(t,e){return _.IsTemplateLiteral(t)||_.IsTemplateLiteral(e)?qI(t,e):_.IsRegExp(t)||_.IsRegExp(e)?WI(t,e):_.IsNot(t)||_.IsNot(e)?OI(t,e):_.IsAny(t)?_I(t,e):_.IsArray(t)?bI(t,e):_.IsBigInt(t)?MI(t,e):_.IsBoolean(t)?wI(t,e):_.IsAsyncIterator(t)?SI(t,e):_.IsConstructor(t)?EI(t,e):_.IsDate(t)?II(t,e):_.IsFunction(t)?TI(t,e):_.IsInteger(t)?AI(t,e):_.IsIntersect(t)?RI(t,e):_.IsIterator(t)?CI(t,e):_.IsLiteral(t)?PI(t,e):_.IsNever(t)?FI(t,e):_.IsNull(t)?LI(t,e):_.IsNumber(t)?NI(t,e):_.IsObject(t)?GI(t,e):_.IsRecord(t)?$I(t,e):_.IsString(t)?jI(t,e):_.IsSymbol(t)?XI(t,e):_.IsTuple(t)?ZI(t,e):_.IsPromise(t)?HI(t,e):_.IsUint8Array(t)?JI(t,e):_.IsUndefined(t)?QI(t,e):_.IsUnion(t)?eT(t,e):_.IsUnknown(t)?tT(t,e):_.IsVoid(t)?rT(t,e):Vs("Unknown left type operand '".concat(t[M],"'"))}s($e,"Visit");function vi(t,e){return $e(t,e)}s(vi,"ExtendsCheck");l();l();l();function iT(t,e,n,r,i){let o={};for(let a of globalThis.Object.getOwnPropertyNames(t))o[a]=Gs(t[a],e,n,r,tt(i));return o}s(iT,"FromProperties");function sT(t,e,n,r,i){return iT(t.properties,e,n,r,i)}s(sT,"FromMappedResult");function bg(t,e,n,r,i){let o=sT(t,e,n,r,i);return Ae(o)}s(bg,"ExtendsFromMappedResult");function oT(t,e,n,r){let i=vi(t,e);return i===I.Union?He([n,r]):i===I.True?n:r}s(oT,"ExtendsResolve");function Gs(t,e,n,r,i){return rt(t)?bg(t,e,n,r,i):mn(t)?T(Sg(t,e,n,r,i)):T(oT(t,e,n,r),i)}s(Gs,"Extends");function aT(t,e,n,r,i){return{[t]:Gs(Le(t),e,n,r,tt(i))}}s(aT,"FromPropertyKey");function cT(t,e,n,r,i){return t.reduce((o,a)=>y(y({},o),aT(a,e,n,r,i)),{})}s(cT,"FromPropertyKeys");function lT(t,e,n,r,i){return cT(t.keys,e,n,r,i)}s(lT,"FromMappedKey");function Sg(t,e,n,r,i){let o=lT(t,e,n,r,i);return Ae(o)}s(Sg,"ExtendsFromMappedKey");l();function uT(t){return t.allOf.every(e=>Xr(e))}s(uT,"Intersect");function fT(t){return t.anyOf.some(e=>Xr(e))}s(fT,"Union");function dT(t){return!Xr(t.not)}s(dT,"Not");function Xr(t){return t[M]==="Intersect"?uT(t):t[M]==="Union"?fT(t):t[M]==="Not"?dT(t):t[M]==="Undefined"}s(Xr,"ExtendsUndefinedCheck");l();function Mg(t,e){return Hs(Zi(t),e)}s(Mg,"ExcludeFromTemplateLiteral");function pT(t,e){let n=t.filter(r=>vi(r,e)===I.False);return n.length===1?n[0]:He(n)}s(pT,"ExcludeRest");function Hs(t,e,n={}){return gn(t)?T(Mg(t,e),n):rt(t)?T(wg(t,e),n):T(Fe(t)?pT(t.anyOf,e):vi(t,e)!==I.False?Ge():t,n)}s(Hs,"Exclude");function hT(t,e){let n={};for(let r of globalThis.Object.getOwnPropertyNames(t))n[r]=Hs(t[r],e);return n}s(hT,"FromProperties");function mT(t,e){return hT(t.properties,e)}s(mT,"FromMappedResult");function wg(t,e){let n=mT(t,e);return Ae(n)}s(wg,"ExcludeFromMappedResult");l();l();l();function Eg(t,e){return $s(Zi(t),e)}s(Eg,"ExtractFromTemplateLiteral");function gT(t,e){let n=t.filter(r=>vi(r,e)!==I.False);return n.length===1?n[0]:He(n)}s(gT,"ExtractRest");function $s(t,e,n){return gn(t)?T(Eg(t,e),n):rt(t)?T(Ig(t,e),n):T(Fe(t)?gT(t.anyOf,e):vi(t,e)!==I.False?t:Ge(),n)}s($s,"Extract");function yT(t,e){let n={};for(let r of globalThis.Object.getOwnPropertyNames(t))n[r]=$s(t[r],e);return n}s(yT,"FromProperties");function xT(t,e){return yT(t.properties,e)}s(xT,"FromMappedResult");function Ig(t,e){let n=xT(t,e);return Ae(n)}s(Ig,"ExtractFromMappedResult");l();function Tg(t,e){return T(t.returns,e)}s(Tg,"InstanceType");l();function Ag(t){return T({[M]:"Integer",type:"integer"},t)}s(Ag,"Integer");l();l();l();function _T(t,e,n){return{[t]:tr(Le(t),e,tt(n))}}s(_T,"MappedIntrinsicPropertyKey");function vT(t,e,n){return t.reduce((i,o)=>y(y({},i),_T(o,e,n)),{})}s(vT,"MappedIntrinsicPropertyKeys");function bT(t,e,n){return vT(t.keys,e,n)}s(bT,"MappedIntrinsicProperties");function Rg(t,e,n){let r=bT(t,e,n);return Ae(r)}s(Rg,"IntrinsicFromMappedKey");function ST(t){let[e,n]=[t.slice(0,1),t.slice(1)];return[e.toLowerCase(),n].join("")}s(ST,"ApplyUncapitalize");function MT(t){let[e,n]=[t.slice(0,1),t.slice(1)];return[e.toUpperCase(),n].join("")}s(MT,"ApplyCapitalize");function wT(t){return t.toUpperCase()}s(wT,"ApplyUppercase");function ET(t){return t.toLowerCase()}s(ET,"ApplyLowercase");function IT(t,e,n){let r=Ds(t.pattern);if(!Yi(r))return O(y({},t),{pattern:Cg(t.pattern,e)});let a=[...ta(r)].map(d=>Le(d)),c=Pg(a,e),f=He(c);return ac([f],n)}s(IT,"FromTemplateLiteral");function Cg(t,e){return typeof t=="string"?e==="Uncapitalize"?ST(t):e==="Capitalize"?MT(t):e==="Uppercase"?wT(t):e==="Lowercase"?ET(t):t:t.toString()}s(Cg,"FromLiteralValue");function Pg(t,e){return t.map(n=>tr(n,e))}s(Pg,"FromRest");function tr(t,e,n={}){return mn(t)?Rg(t,e,n):gn(t)?IT(t,e,n):Fe(t)?He(Pg(t.anyOf,e),n):Vr(t)?Le(Cg(t.const,e),n):T(t,n)}s(tr,"Intrinsic");function Fg(t,e={}){return tr(t,"Capitalize",e)}s(Fg,"Capitalize");l();function Og(t,e={}){return tr(t,"Lowercase",e)}s(Og,"Lowercase");l();function Lg(t,e={}){return tr(t,"Uncapitalize",e)}s(Lg,"Uncapitalize");l();function Ng(t,e={}){return tr(t,"Uppercase",e)}s(Ng,"Uppercase");l();function Ug(t,e){return T({[M]:"Not",not:t},e)}s(Ug,"Not");l();l();l();function TT(t,e,n){let r={};for(let i of globalThis.Object.getOwnPropertyNames(t))r[i]=Ws(t[i],e,tt(n));return r}s(TT,"FromProperties");function AT(t,e,n){return TT(t.properties,e,n)}s(AT,"FromMappedResult");function Dg(t,e,n){let r=AT(t,e,n);return Ae(r)}s(Dg,"OmitFromMappedResult");function RT(t,e){return t.map(n=>nd(n,e))}s(RT,"FromIntersect");function CT(t,e){return t.map(n=>nd(n,e))}s(CT,"FromUnion");function PT(t,e){let i=t,{[e]:n}=i;return wo(i,[Ea(e)])}s(PT,"FromProperty");function FT(t,e){return e.reduce((n,r)=>PT(n,r),t)}s(FT,"FromProperties");function OT(t,e){let n=ft(t,[nt,"$id","required","properties"]),r=FT(t.properties,e);return je(r,n)}s(OT,"FromObject");function nd(t,e){return gt(t)?ln(RT(t.allOf,e)):Fe(t)?He(CT(t.anyOf,e)):bt(t)?OT(t,e):je({})}s(nd,"OmitResolve");function Ws(t,e,n){if(mn(e))return kg(t,e,n);if(rt(t))return Dg(t,e,n);let r=Qn(e)?cn(e):e;return T(y(y({},nd(t,r)),n))}s(Ws,"Omit");function LT(t,e,n){return{[e]:Ws(t,[e],tt(n))}}s(LT,"FromPropertyKey");function NT(t,e,n){return e.reduce((r,i)=>y(y({},r),LT(t,i,n)),{})}s(NT,"FromPropertyKeys");function UT(t,e,n){return NT(t,e.keys,n)}s(UT,"FromMappedKey");function kg(t,e,n){let r=UT(t,e,n);return Ae(r)}s(kg,"OmitFromMappedKey");l();function Bg(t,e){return gr(t.parameters,e)}s(Bg,"Parameters");l();l();function zg(t){return t.map(e=>Vg(e))}s(zg,"FromRest");function DT(t){let e={};for(let n of globalThis.Object.getOwnPropertyNames(t))e[n]=an(t[n]);return e}s(DT,"FromProperties");function kT(t){let e=ft(t,[nt,"$id","required","properties"]),n=DT(t.properties);return je(n,e)}s(kT,"FromObject");function Vg(t){return gt(t)?ln(zg(t.allOf)):Fe(t)?He(zg(t.anyOf)):bt(t)?kT(t):je({})}s(Vg,"PartialResolve");function vc(t,e){return rt(t)?Gg(t,e):T(y(y({},Vg(t)),e))}s(vc,"Partial");function BT(t,e){let n={};for(let r of globalThis.Object.getOwnPropertyNames(t))n[r]=vc(t[r],tt(e));return n}s(BT,"FromProperties");function zT(t,e){return BT(t.properties,e)}s(zT,"FromMappedResult");function Gg(t,e){let n=zT(t,e);return Ae(n)}s(Gg,"PartialFromMappedResult");l();l();l();function VT(t,e,n){let r={};for(let i of globalThis.Object.getOwnPropertyNames(t))r[i]=js(t[i],e,tt(n));return r}s(VT,"FromProperties");function GT(t,e,n){return VT(t.properties,e,n)}s(GT,"FromMappedResult");function Hg(t,e,n){let r=GT(t,e,n);return Ae(r)}s(Hg,"PickFromMappedResult");function HT(t,e){return t.map(n=>rd(n,e))}s(HT,"FromIntersect");function $T(t,e){return t.map(n=>rd(n,e))}s($T,"FromUnion");function WT(t,e){let n={};for(let r of e)r in t&&(n[r]=t[r]);return n}s(WT,"FromProperties");function jT(t,e){let n=ft(t,[nt,"$id","required","properties"]),r=WT(t.properties,e);return je(r,n)}s(jT,"FromObject");function rd(t,e){return gt(t)?ln(HT(t.allOf,e)):Fe(t)?He($T(t.anyOf,e)):bt(t)?jT(t,e):je({})}s(rd,"PickResolve");function js(t,e,n){if(mn(e))return $g(t,e,n);if(rt(t))return Hg(t,e,n);let r=Qn(e)?cn(e):e;return T(y(y({},rd(t,r)),n))}s(js,"Pick");function XT(t,e,n){return{[e]:js(t,[e],tt(n))}}s(XT,"FromPropertyKey");function qT(t,e,n){return e.reduce((r,i)=>y(y({},r),XT(t,i,n)),{})}s(qT,"FromPropertyKeys");function KT(t,e,n){return qT(t,e.keys,n)}s(KT,"FromMappedKey");function $g(t,e,n){let r=KT(t,e,n);return Ae(r)}s($g,"PickFromMappedKey");l();function Wg(t){return Ln(an(t))}s(Wg,"ReadonlyOptional");l();function Ji(t,e,n){return T({[M]:"Record",type:"object",patternProperties:{[t]:e}},n)}s(Ji,"RecordCreateFromPattern");function id(t,e,n){let r={};for(let i of t)r[i]=e;return je(r,O(y({},n),{[Fn]:"Record"}))}s(id,"RecordCreateFromKeys");function YT(t,e,n){return sc(t)?id(cn(t),e,n):Ji(t.pattern,e,n)}s(YT,"FromTemplateLiteralKey");function ZT(t,e,n){return id(cn(He(t)),e,n)}s(ZT,"FromUnionKey");function JT(t,e,n){return id([t.toString()],e,n)}s(JT,"FromLiteralKey");function QT(t,e,n){return Ji(t.source,e,n)}s(QT,"FromRegExpKey");function eA(t,e,n){let r=st(t.pattern)?Hr:t.pattern;return Ji(r,e,n)}s(eA,"FromStringKey");function tA(t,e,n){return Ji(Hr,e,n)}s(tA,"FromAnyKey");function nA(t,e,n){return Ji(Um,e,n)}s(nA,"FromNeverKey");function rA(t,e,n){return Ji(Gr,e,n)}s(rA,"FromIntegerKey");function iA(t,e,n){return Ji(Gr,e,n)}s(iA,"FromNumberKey");function jg(t,e,n={}){return Fe(t)?ZT(t.anyOf,e,n):gn(t)?YT(t,e,n):Vr(t)?JT(t.const,e,n):Xi(t)?rA(t,e,n):qi(t)?iA(t,e,n):Tf(t)?QT(t,e,n):Ko(t)?eA(t,e,n):Sf(t)?tA(t,e,n):mi(t)?nA(t,e,n):Ge(n)}s(jg,"Record");l();var sA=0;function Xg(t,e={}){st(e.$id)&&(e.$id="T".concat(sA++));let n=Ho(t({[M]:"This",$ref:"".concat(e.$id)}));return n.$id=e.$id,T(y({[Fn]:"Recursive"},n),e)}s(Xg,"Recursive");l();function qg(t,e){if(Ze(t))return T({[M]:"Ref",$ref:t},e);if(st(t.$id))throw new Error("Reference target type must specify an $id");return T({[M]:"Ref",$ref:t.$id},e)}s(qg,"Ref");l();function Kg(t,e){let n=Ze(t)?new globalThis.RegExp(t):t;return T({[M]:"RegExp",type:"RegExp",source:n.source,flags:n.flags},e)}s(Kg,"RegExp");l();l();function Yg(t){return t.map(e=>Zg(e))}s(Yg,"FromRest");function oA(t){let e={};for(let n of globalThis.Object.getOwnPropertyNames(t))e[n]=ft(t[n],[en]);return e}s(oA,"FromProperties");function aA(t){let e=ft(t,[nt,"$id","required","properties"]),n=oA(t.properties);return je(n,e)}s(aA,"FromObject");function Zg(t){return gt(t)?ln(Yg(t.allOf)):Fe(t)?He(Yg(t.anyOf)):bt(t)?aA(t):je({})}s(Zg,"RequiredResolve");function bc(t,e){return rt(t)?Jg(t,e):T(y(y({},Zg(t)),e))}s(bc,"Required");function cA(t,e){let n={};for(let r of globalThis.Object.getOwnPropertyNames(t))n[r]=bc(t[r],e);return n}s(cA,"FromProperties");function lA(t,e){return cA(t.properties,e)}s(lA,"FromMappedResult");function Jg(t,e){let n=lA(t,e);return Ae(n)}s(Jg,"RequiredFromMappedResult");l();function uA(t){var e;return gt(t)?t.allOf:Fe(t)?t.anyOf:Jn(t)?(e=t.items)!=null?e:[]:[]}s(uA,"RestResolve");function Qg(t){return uA(t)}s(Qg,"Rest");l();function ey(t,e){return T(t.returns,e)}s(ey,"ReturnType");l();function ty(t){return JSON.parse(JSON.stringify(t))}s(ty,"Strict");l();var ad=class ad{constructor(e){this.schema=e}Decode(e){return new od(this.schema,e)}};s(ad,"TransformDecodeBuilder");var sd=ad,cd=class cd{constructor(e,n){this.schema=e,this.decode=n}EncodeTransform(e,n){let o={Encode:s(a=>n[nt].Encode(e(a)),"Encode"),Decode:s(a=>this.decode(n[nt].Decode(a)),"Decode")};return O(y({},n),{[nt]:o})}EncodeSchema(e,n){let r={Decode:this.decode,Encode:e};return O(y({},n),{[nt]:r})}Encode(e){return Fs(this.schema)?this.EncodeTransform(e,this.schema):this.EncodeSchema(e,this.schema)}};s(cd,"TransformEncodeBuilder");var od=cd;function ny(t){return new sd(t)}s(ny,"Transform");l();function Sc(t={}){var e;return T({[M]:(e=t[M])!=null?e:"Unsafe"},t)}s(Sc,"Unsafe");l();function ry(t){return T({[M]:"Void",type:"void"},t)}s(ry,"Void");l();var ld={};ri(ld,{Any:()=>yi,Array:()=>tc,AsyncIterator:()=>nc,Awaited:()=>rg,BigInt:()=>Bs,Boolean:()=>oc,Capitalize:()=>Fg,Composite:()=>og,Const:()=>ag,Constructor:()=>rc,ConstructorParameters:()=>cg,Date:()=>dc,Deref:()=>er,Enum:()=>lg,Exclude:()=>Hs,Extends:()=>Gs,Extract:()=>$s,Function:()=>xi,Index:()=>zs,InstanceType:()=>Tg,Integer:()=>Ag,Intersect:()=>ln,Iterator:()=>lc,KeyOf:()=>fc,Literal:()=>Le,Lowercase:()=>Og,Mapped:()=>Qm,Never:()=>Ge,Not:()=>Ug,Null:()=>pc,Number:()=>mr,Object:()=>je,Omit:()=>Ws,Optional:()=>an,Parameters:()=>Bg,Partial:()=>vc,Pick:()=>js,Promise:()=>uc,Readonly:()=>Ln,ReadonlyOptional:()=>Wg,Record:()=>jg,Recursive:()=>Xg,Ref:()=>qg,RegExp:()=>Kg,Required:()=>bc,Rest:()=>Qg,ReturnType:()=>ey,Strict:()=>ty,String:()=>On,Symbol:()=>hc,TemplateLiteral:()=>ac,Transform:()=>ny,Tuple:()=>gr,Uint8Array:()=>gc,Uncapitalize:()=>Lg,Undefined:()=>mc,Union:()=>He,Unknown:()=>jr,Unsafe:()=>Sc,Uppercase:()=>Ng,Void:()=>ry});l();var u=ld;l();var oa=u.Object({externalId:u.String({description:"An identifier that can be used to link this entity to data outside of the MVF."}),name:u.String({description:"The name of the entity."}),shortName:u.String({description:"A short name for the entity."}),description:u.String({description:"A description of the entity."}),icon:u.String({format:"uri",description:"A URL to an icon for the entity."})},{$id:"BaseDetails",description:"Additional information about a given entity."}),ud=u.Partial(oa,{$id:"Details",description:"Additional information about a given entity."}),yn=u.Object({details:u.Optional(u.Ref(ud))},{$id:"WithDetails"}),Qi=s(t=>{let e=[...t].sort(),n=u.Pick(oa,t),r=u.Omit(oa,t);return u.Object({details:u.Intersect([n,u.Partial(r)])},{$id:"WithRequiredDetails_".concat(e.join("_"))})},"WithRequiredDetails"),fd=[oa,ud];l();var Xs=u.Number({$id:"Longitude",minimum:-180,maximum:180,description:"A WGS 84-compatible longitude coordinate value."}),qs=u.Number({$id:"Latitude",minimum:-90,maximum:90,description:"A WGS 84-compatible latitude coordinate value."}),es=u.Tuple([u.Ref(Xs),u.Ref(qs)],{$id:"Position",minItems:2,maxItems:2,description:"A valid WGS 84 position consisting of a longitude value, followed by a latitude value."}),Wt=u.Object({type:u.Literal("Point"),coordinates:u.Ref(es)},{$id:"Point",description:"An RFC-7946 compatible GeoJSON Point geometry."}),Mc=u.Object({type:u.Literal("MultiPoint"),coordinates:u.Array(u.Ref(es))},{$id:"MultiPoint",description:"An RFC-7946 compatible GeoJSON MultiPoint geometry."}),wc=u.Object({type:u.Literal("LineString"),coordinates:u.Array(u.Ref(es),{minItems:2,description:"At least two positions are required."})},{$id:"LineString",description:"An RFC-7946 compatible GeoJSON LineString geometry."}),Ec=u.Object({type:u.Literal("MultiLineString"),coordinates:u.Array(u.Array(u.Ref(es),{minItems:2}))},{$id:"MultiLineString",description:"An RFC-7946 compatible GeoJSON MultiLineString geometry."}),iy=u.Array(u.Ref(es),{$id:"LinearRing",minItems:4,description:"A linear ring is a building block of a polygon or multi-polygon."}),dd=u.Array(u.Ref(iy),{$id:"LinearRings",minItems:1,description:"A collection of linear rings, at least one of which is the exterior ring of a polygon."}),Ks=u.Object({type:u.Literal("Polygon"),coordinates:u.Ref(dd)},{$id:"Polygon",description:"An RFC-7946 compatible GeoJSON Polygon geometry."}),Ys=u.Object({type:u.Literal("MultiPolygon"),coordinates:u.Array(u.Ref(dd))},{$id:"MultiPolygon",description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry."}),Ft=s((t,e,n)=>u.Object({type:u.Literal("Feature"),geometry:t,properties:e},n),"Feature"),nn=s((t,e,n)=>u.Object({type:u.Literal("FeatureCollection"),features:u.Array(t,n)},e),"FeatureCollection"),pd=[Xs,qs,es,Wt,Mc,wc,Ec,iy,dd,Ks,Ys];l();var dt=s((t,e)=>u.Unsafe(u.String({$id:e,pattern:"^".concat(t,"_[A-Za-z0-9-]+$")})),"Ident"),jt=dt("g","GeometryId"),_e=dt("f","FloorId"),hd=[jt,_e];l();l();l();var md=class md{constructor(e){qe(this,"_value");this._value=e}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let e=this._value;return this._value=null,{done:!1,value:e}}};s(md,"OptionIterator");var Ic=md,gd=class gd{constructor(e){qe(this,"_tag","Some");qe(this,"_value");this._value=e}get value(){return this._value}isSome(){return!0}isSomeAnd(e){return e(this.value)}isNone(){return!1}equals(e){return e.isSome()&&e.value===this.value}expect(e){return this.value}unwrap(){return this.value}unwrapOr(e){return this.value}unwrapOrElse(e){return this.value}inspect(e){return e(this.value),this}inspectNone(e){return this}map(e){return sy(e(this.value))}mapAsync(e){return e(this.value).then(n=>sy(n))}mapOr(e,n){return this.map(e).unwrapOr(n)}mapOrAsync(e,n){return this.mapAsync(e).then(r=>r.unwrapOr(n))}mapOrElse(e,n){return this.map(e).unwrapOrElse(n)}mapOrElseAsync(e,n){return this.mapAsync(e).then(r=>r.unwrapOrElse(n))}and(e){return e}andThen(e){return e(this.value)}andThenAsync(e){return e(this.value)}filter(e){return e(this.value)?this:bi()}or(e){return this}orElse(e){return this}xor(e){return e.isSome()?bi():this}toString(){return"Some(".concat(this.value,")")}okOr(e){return G(this.value)}okOrElse(e){return G(this.value)}iter(){return new Ic(this.value)}[Symbol.iterator](){return this.iter()}zip(e){return e.isSome()?Zs([this.value,e.value]):bi()}zipWith(e,n){return e.isSome()?Zs(n(this.value,e.value)):bi()}get[Symbol.toStringTag](){return"Some"}};s(gd,"Some");var Tc=gd,yd=class yd{constructor(){qe(this,"_tag","None")}get value(){return null}isSome(){return!1}isSomeAnd(e){return!1}isNone(){return!0}equals(e){return e.isNone()}expect(e){throw new Error(e)}unwrap(){throw new Error("Tried to unwrap a None value!")}unwrapOr(e){return e}unwrapOrElse(e){return e()}inspect(e){return this}inspectNone(e){return e(),this}map(e){return this}mapAsync(e){return Promise.resolve(this)}mapOr(e,n){return n}mapOrAsync(e,n){return Promise.resolve(n)}mapOrElse(e,n){return n()}mapOrElseAsync(e,n){return n()}and(e){return this}andThen(e){return this}andThenAsync(e){return Promise.resolve(this)}filter(e){return this}or(e){return e}orElse(e){return e()}xor(e){return e}toString(){return"None"}okOr(e){return $(e)}okOrElse(e){return $(e())}iter(){return new Ic(null)}[Symbol.iterator](){return this.iter()}zip(e){return this}zipWith(e,n){return this}get[Symbol.toStringTag](){return"None"}};s(yd,"None");var Ac=yd,Zs=s(t=>new Tc(t),"some"),bi=s(()=>new Ac,"none"),sy=s(t=>t instanceof Tc||t instanceof Ac?t:t==null?bi():Zs(t),"option");var vd=class vd{constructor(e){qe(this,"_value");this._value=e}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let e=this._value;return this._value=null,{done:!1,value:e}}};s(vd,"ResultIterator");var Rc=vd,bd=class bd{constructor(e){qe(this,"_tag","Ok");qe(this,"_value");this._value=e}get value(){return this._value}get error(){return null}isOk(){return!0}isOkAnd(e){return e(this.value)}isErr(){return!1}isErrAnd(e){return!1}ok(){return Zs(this.value)}err(){return bi()}expect(e){return this.value}expectErr(e){throw new Error(e)}unwrap(){return this.value}unwrapOr(e){return this.value}unwrapOrElse(e){return this.value}inspect(e){return e(this.value),this}inspectErr(){return this}map(e){return G(e(this.value))}async mapAsync(e){return e(this.value).then(G)}mapOr(e,n){return e(this.value)}async mapOrAsync(e,n){return e(this.value)}mapOrElse(e,n){return e(this.value)}async mapOrElseAsync(e,n){return e(this.value)}mapErr(e){return this}iter(){return new Rc(this.value)}[Symbol.iterator](){return this.iter()}and(e){return e}andThen(e){return e(this.value)}or(e){return this}orElse(e){return this}async andThenAsync(e){return e(this.value)}toString(){return"Ok(".concat(this.value,")")}get[Symbol.toStringTag](){return"Ok"}};s(bd,"Ok");var xd=bd,Cc=class Cc{constructor(e){qe(this,"_tag","Err");qe(this,"_error");this._error=e}get value(){return null}get error(){return this._error}isOk(){return!1}isOkAnd(e){return!1}isErr(){return!0}isErrAnd(e){return e(this.error)}ok(){return bi()}err(){return Zs(this.error)}expect(e){throw new Error(e)}expectErr(e){return this.error}unwrap(){throw this.error}unwrapOr(e){return e}unwrapOrElse(e){return e()}inspect(){return this}inspectErr(e){return e(this.error),this}map(e){return this}iter(){return new Rc(null)}[Symbol.iterator](){return this.iter()}async mapAsync(e){return this}mapOr(e,n){return n}async mapOrAsync(e,n){return n}mapOrElse(e,n){return n()}async mapOrElseAsync(e,n){return n()}mapErr(e){return new Cc(e(this.error))}and(e){return this}andThen(e){return this}async andThenAsync(e){return this}or(e){return e}orElse(e){return e(this.error)}toString(){return"Err(".concat(this.error,")")}get[Symbol.toStringTag](){return"Err"}};s(Cc,"Err");var _d=Cc,G=s(t=>new xd(t),"ok"),$=s(t=>new _d(t),"err");l();var fn;(function(t){t.GeometryMissingError="GeometryMissingError",t.FloorMissingError="FloorMissingError",t.UnknownFloorError="UnknownFloorError",t.UnknownGeometryError="UnknownGeometryError",t.DuplicateIdError="DuplicateIdError"})(fn||(fn={}));l();l();l();l();var Md=class Md extends ne{constructor(e){super("Duplicate type kind '".concat(e,"' detected"))}};s(Md,"TypeSystemDuplicateTypeKind");var Sd=Md,wd=class wd extends ne{constructor(e){super("Duplicate string format '".concat(e,"' detected"))}};s(wd,"TypeSystemDuplicateFormat");var aa=wd,Pc;(function(t){function e(r,i){if(St.Has(r))throw new Sd(r);return St.Set(r,i),(o={})=>Sc(O(y({},o),{[M]:r}))}s(e,"Type"),t.Type=e;function n(r,i){if(tn.Has(r))throw new aa(r);return tn.Set(r,i),r}s(n,"Format"),t.Format=n})(Pc||(Pc={}));l();function fA(t){switch(t.errorType){case w.ArrayContains:return"Expected array to contain at least one matching value";case w.ArrayMaxContains:return"Expected array to contain no more than ".concat(t.schema.maxContains," matching values");case w.ArrayMinContains:return"Expected array to contain at least ".concat(t.schema.minContains," matching values");case w.ArrayMaxItems:return"Expected array length to be less or equal to ".concat(t.schema.maxItems);case w.ArrayMinItems:return"Expected array length to be greater or equal to ".concat(t.schema.minItems);case w.ArrayUniqueItems:return"Expected array elements to be unique";case w.Array:return"Expected array";case w.AsyncIterator:return"Expected AsyncIterator";case w.BigIntExclusiveMaximum:return"Expected bigint to be less than ".concat(t.schema.exclusiveMaximum);case w.BigIntExclusiveMinimum:return"Expected bigint to be greater than ".concat(t.schema.exclusiveMinimum);case w.BigIntMaximum:return"Expected bigint to be less or equal to ".concat(t.schema.maximum);case w.BigIntMinimum:return"Expected bigint to be greater or equal to ".concat(t.schema.minimum);case w.BigIntMultipleOf:return"Expected bigint to be a multiple of ".concat(t.schema.multipleOf);case w.BigInt:return"Expected bigint";case w.Boolean:return"Expected boolean";case w.DateExclusiveMinimumTimestamp:return"Expected Date timestamp to be greater than ".concat(t.schema.exclusiveMinimumTimestamp);case w.DateExclusiveMaximumTimestamp:return"Expected Date timestamp to be less than ".concat(t.schema.exclusiveMaximumTimestamp);case w.DateMinimumTimestamp:return"Expected Date timestamp to be greater or equal to ".concat(t.schema.minimumTimestamp);case w.DateMaximumTimestamp:return"Expected Date timestamp to be less or equal to ".concat(t.schema.maximumTimestamp);case w.DateMultipleOfTimestamp:return"Expected Date timestamp to be a multiple of ".concat(t.schema.multipleOfTimestamp);case w.Date:return"Expected Date";case w.Function:return"Expected function";case w.IntegerExclusiveMaximum:return"Expected integer to be less than ".concat(t.schema.exclusiveMaximum);case w.IntegerExclusiveMinimum:return"Expected integer to be greater than ".concat(t.schema.exclusiveMinimum);case w.IntegerMaximum:return"Expected integer to be less or equal to ".concat(t.schema.maximum);case w.IntegerMinimum:return"Expected integer to be greater or equal to ".concat(t.schema.minimum);case w.IntegerMultipleOf:return"Expected integer to be a multiple of ".concat(t.schema.multipleOf);case w.Integer:return"Expected integer";case w.IntersectUnevaluatedProperties:return"Unexpected property";case w.Intersect:return"Expected all values to match";case w.Iterator:return"Expected Iterator";case w.Literal:return"Expected ".concat(typeof t.schema.const=="string"?"'".concat(t.schema.const,"'"):t.schema.const);case w.Never:return"Never";case w.Not:return"Value should not match";case w.Null:return"Expected null";case w.NumberExclusiveMaximum:return"Expected number to be less than ".concat(t.schema.exclusiveMaximum);case w.NumberExclusiveMinimum:return"Expected number to be greater than ".concat(t.schema.exclusiveMinimum);case w.NumberMaximum:return"Expected number to be less or equal to ".concat(t.schema.maximum);case w.NumberMinimum:return"Expected number to be greater or equal to ".concat(t.schema.minimum);case w.NumberMultipleOf:return"Expected number to be a multiple of ".concat(t.schema.multipleOf);case w.Number:return"Expected number";case w.Object:return"Expected object";case w.ObjectAdditionalProperties:return"Unexpected property";case w.ObjectMaxProperties:return"Expected object to have no more than ".concat(t.schema.maxProperties," properties");case w.ObjectMinProperties:return"Expected object to have at least ".concat(t.schema.minProperties," properties");case w.ObjectRequiredProperty:return"Expected required property";case w.Promise:return"Expected Promise";case w.RegExp:return"Expected string to match regular expression";case w.StringFormatUnknown:return"Unknown format '".concat(t.schema.format,"'");case w.StringFormat:return"Expected string to match '".concat(t.schema.format,"' format");case w.StringMaxLength:return"Expected string length less or equal to ".concat(t.schema.maxLength);case w.StringMinLength:return"Expected string length greater or equal to ".concat(t.schema.minLength);case w.StringPattern:return"Expected string to match '".concat(t.schema.pattern,"'");case w.String:return"Expected string";case w.Symbol:return"Expected symbol";case w.TupleLength:return"Expected tuple to have ".concat(t.schema.maxItems||0," elements");case w.Tuple:return"Expected tuple";case w.Uint8ArrayMaxByteLength:return"Expected byte length less or equal to ".concat(t.schema.maxByteLength);case w.Uint8ArrayMinByteLength:return"Expected byte length greater or equal to ".concat(t.schema.minByteLength);case w.Uint8Array:return"Expected Uint8Array";case w.Undefined:return"Expected undefined";case w.Union:return"Expected union value";case w.Void:return"Expected void";case w.Kind:return"Expected kind '".concat(t.schema[M],"'");default:return"Unknown error type"}}s(fA,"DefaultErrorFunction");var dA=fA;function oy(){return dA}s(oy,"GetErrorFunction");l();var Id=class Id extends ne{constructor(e){super("Unable to dereference schema with $id '".concat(e.$ref,"'")),this.schema=e}};s(Id,"TypeDereferenceError");var Ed=Id;function pA(t,e){let n=e.find(r=>r.$id===t.$ref);if(n===void 0)throw new Ed(t);return Re(n,e)}s(pA,"Resolve");function kn(t,e){return!Se(t.$id)||e.some(n=>n.$id===t.$id)||e.push(t),e}s(kn,"Pushref");function Re(t,e){return t[M]==="This"||t[M]==="Ref"?pA(t,e):t}s(Re,"Deref");l();var Ad=class Ad extends ne{constructor(e){super("Unable to hash value"),this.value=e}};s(Ad,"ValueHashError");var Td=Ad,xn;(function(t){t[t.Undefined=0]="Undefined",t[t.Null=1]="Null",t[t.Boolean=2]="Boolean",t[t.Number=3]="Number",t[t.String=4]="String",t[t.Object=5]="Object",t[t.Array=6]="Array",t[t.Date=7]="Date",t[t.Uint8Array=8]="Uint8Array",t[t.Symbol=9]="Symbol",t[t.BigInt=10]="BigInt"})(xn||(xn={}));var Js=BigInt("14695981039346656037"),[hA,mA]=[BigInt("1099511628211"),BigInt("18446744073709551616")],gA=Array.from({length:256}).map((t,e)=>BigInt(e)),ay=new Float64Array(1),cy=new DataView(ay.buffer),ly=new Uint8Array(ay.buffer);function*yA(t){let e=t===0?1:Math.ceil(Math.floor(Math.log2(t)+1)/8);for(let n=0;n<e;n++)yield t>>8*(e-1-n)&255}s(yA,"NumberToBytes");function xA(t){Xt(xn.Array);for(let e of t)Qs(e)}s(xA,"ArrayType");function _A(t){Xt(xn.Boolean),Xt(t?1:0)}s(_A,"BooleanType");function vA(t){Xt(xn.BigInt),cy.setBigInt64(0,t);for(let e of ly)Xt(e)}s(vA,"BigIntType");function bA(t){Xt(xn.Date),Qs(t.getTime())}s(bA,"DateType");function SA(t){Xt(xn.Null)}s(SA,"NullType");function MA(t){Xt(xn.Number),cy.setFloat64(0,t);for(let e of ly)Xt(e)}s(MA,"NumberType");function wA(t){Xt(xn.Object);for(let e of globalThis.Object.getOwnPropertyNames(t).sort())Qs(e),Qs(t[e])}s(wA,"ObjectType");function EA(t){Xt(xn.String);for(let e=0;e<t.length;e++)for(let n of yA(t.charCodeAt(e)))Xt(n)}s(EA,"StringType");function IA(t){Xt(xn.Symbol),Qs(t.description)}s(IA,"SymbolType");function TA(t){Xt(xn.Uint8Array);for(let e=0;e<t.length;e++)Xt(t[e])}s(TA,"Uint8ArrayType");function AA(t){return Xt(xn.Undefined)}s(AA,"UndefinedType");function Qs(t){if(ae(t))return xA(t);if(dr(t))return _A(t);if(Ct(t))return vA(t);if(Qt(t))return bA(t);if(Dr(t))return SA(t);if(Y(t))return MA(t);if(le(t))return wA(t);if(Se(t))return EA(t);if(kr(t))return IA(t);if(Ps(t))return TA(t);if(ot(t))return AA(t);throw new Td(t)}s(Qs,"Visit");function Xt(t){Js=Js^gA[t],Js=Js*hA%mA}s(Xt,"FNV1A64");function Si(t){return Js=BigInt("14695981039346656037"),Qs(t),Js}s(Si,"Hash");l();var Cd=class Cd extends ne{constructor(e){super("Unknown type"),this.schema=e}};s(Cd,"ValueCheckUnknownTypeError");var Rd=Cd;function RA(t){return t[M]==="Any"||t[M]==="Unknown"}s(RA,"IsAnyOrUnknown");function ge(t){return t!==void 0}s(ge,"IsDefined");function CA(t,e,n){return!0}s(CA,"FromAny");function PA(t,e,n){if(!ae(n)||ge(t.minItems)&&!(n.length>=t.minItems)||ge(t.maxItems)&&!(n.length<=t.maxItems)||!n.every(o=>Ot(t.items,e,o))||t.uniqueItems===!0&&!function(){let o=new Set;for(let a of n){let c=Si(a);if(o.has(c))return!1;o.add(c)}return!0}())return!1;if(!(ge(t.contains)||Y(t.minContains)||Y(t.maxContains)))return!0;let r=ge(t.contains)?t.contains:Ge(),i=n.reduce((o,a)=>Ot(r,e,a)?o+1:o,0);return!(i===0||Y(t.minContains)&&i<t.minContains||Y(t.maxContains)&&i>t.maxContains)}s(PA,"FromArray");function FA(t,e,n){return Za(n)}s(FA,"FromAsyncIterator");function OA(t,e,n){return!(!Ct(n)||ge(t.exclusiveMaximum)&&!(n<t.exclusiveMaximum)||ge(t.exclusiveMinimum)&&!(n>t.exclusiveMinimum)||ge(t.maximum)&&!(n<=t.maximum)||ge(t.minimum)&&!(n>=t.minimum)||ge(t.multipleOf)&&n%t.multipleOf!==BigInt(0))}s(OA,"FromBigInt");function LA(t,e,n){return dr(n)}s(LA,"FromBoolean");function NA(t,e,n){return Ot(t.returns,e,n.prototype)}s(NA,"FromConstructor");function UA(t,e,n){return!(!Qt(n)||ge(t.exclusiveMaximumTimestamp)&&!(n.getTime()<t.exclusiveMaximumTimestamp)||ge(t.exclusiveMinimumTimestamp)&&!(n.getTime()>t.exclusiveMinimumTimestamp)||ge(t.maximumTimestamp)&&!(n.getTime()<=t.maximumTimestamp)||ge(t.minimumTimestamp)&&!(n.getTime()>=t.minimumTimestamp)||ge(t.multipleOfTimestamp)&&n.getTime()%t.multipleOfTimestamp!==0)}s(UA,"FromDate");function DA(t,e,n){return hi(n)}s(DA,"FromFunction");function kA(t,e,n){return!(!ec(n)||ge(t.exclusiveMaximum)&&!(n<t.exclusiveMaximum)||ge(t.exclusiveMinimum)&&!(n>t.exclusiveMinimum)||ge(t.maximum)&&!(n<=t.maximum)||ge(t.minimum)&&!(n>=t.minimum)||ge(t.multipleOf)&&n%t.multipleOf!==0)}s(kA,"FromInteger");function BA(t,e,n){let r=t.allOf.every(i=>Ot(i,e,n));if(t.unevaluatedProperties===!1){let i=new RegExp(Wr(t)),o=Object.getOwnPropertyNames(n).every(a=>i.test(a));return r&&o}else if(Me(t.unevaluatedProperties)){let i=new RegExp(Wr(t)),o=Object.getOwnPropertyNames(n).every(a=>i.test(a)||Ot(t.unevaluatedProperties,e,n[a]));return r&&o}else return r}s(BA,"FromIntersect");function zA(t,e,n){return Ja(n)}s(zA,"FromIterator");function VA(t,e,n){return n===t.const}s(VA,"FromLiteral");function GA(t,e,n){return!1}s(GA,"FromNever");function HA(t,e,n){return!Ot(t.not,e,n)}s(HA,"FromNot");function $A(t,e,n){return Dr(n)}s($A,"FromNull");function WA(t,e,n){return!(!De.IsNumberLike(n)||ge(t.exclusiveMaximum)&&!(n<t.exclusiveMaximum)||ge(t.exclusiveMinimum)&&!(n>t.exclusiveMinimum)||ge(t.minimum)&&!(n>=t.minimum)||ge(t.maximum)&&!(n<=t.maximum)||ge(t.multipleOf)&&n%t.multipleOf!==0)}s(WA,"FromNumber");function jA(t,e,n){if(!De.IsObjectLike(n)||ge(t.minProperties)&&!(Object.getOwnPropertyNames(n).length>=t.minProperties)||ge(t.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=t.maxProperties))return!1;let r=Object.getOwnPropertyNames(t.properties);for(let i of r){let o=t.properties[i];if(t.required&&t.required.includes(i)){if(!Ot(o,e,n[i])||(Xr(o)||RA(o))&&!(i in n))return!1}else if(De.IsExactOptionalProperty(n,i)&&!Ot(o,e,n[i]))return!1}if(t.additionalProperties===!1){let i=Object.getOwnPropertyNames(n);return t.required&&t.required.length===r.length&&i.length===r.length?!0:i.every(o=>r.includes(o))}else return typeof t.additionalProperties=="object"?Object.getOwnPropertyNames(n).every(o=>r.includes(o)||Ot(t.additionalProperties,e,n[o])):!0}s(jA,"FromObject");function XA(t,e,n){return Qa(n)}s(XA,"FromPromise");function qA(t,e,n){if(!De.IsRecordLike(n)||ge(t.minProperties)&&!(Object.getOwnPropertyNames(n).length>=t.minProperties)||ge(t.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=t.maxProperties))return!1;let[r,i]=Object.entries(t.patternProperties)[0],o=new RegExp(r),a=Object.entries(n).every(([d,p])=>o.test(d)?Ot(i,e,p):!0),c=typeof t.additionalProperties=="object"?Object.entries(n).every(([d,p])=>o.test(d)?!0:Ot(t.additionalProperties,e,p)):!0,f=t.additionalProperties===!1?Object.getOwnPropertyNames(n).every(d=>o.test(d)):!0;return a&&c&&f}s(qA,"FromRecord");function KA(t,e,n){return Ot(Re(t,e),e,n)}s(KA,"FromRef");function YA(t,e,n){let r=new RegExp(t.source,t.flags);return ge(t.minLength)&&!(n.length>=t.minLength)||ge(t.maxLength)&&!(n.length<=t.maxLength)?!1:r.test(n)}s(YA,"FromRegExp");function ZA(t,e,n){return!Se(n)||ge(t.minLength)&&!(n.length>=t.minLength)||ge(t.maxLength)&&!(n.length<=t.maxLength)||ge(t.pattern)&&!new RegExp(t.pattern).test(n)?!1:ge(t.format)?tn.Has(t.format)?tn.Get(t.format)(n):!1:!0}s(ZA,"FromString");function JA(t,e,n){return kr(n)}s(JA,"FromSymbol");function QA(t,e,n){return Se(n)&&new RegExp(t.pattern).test(n)}s(QA,"FromTemplateLiteral");function e1(t,e,n){return Ot(Re(t,e),e,n)}s(e1,"FromThis");function t1(t,e,n){if(!ae(n)||t.items===void 0&&n.length!==0||n.length!==t.maxItems)return!1;if(!t.items)return!0;for(let r=0;r<t.items.length;r++)if(!Ot(t.items[r],e,n[r]))return!1;return!0}s(t1,"FromTuple");function n1(t,e,n){return ot(n)}s(n1,"FromUndefined");function r1(t,e,n){return t.anyOf.some(r=>Ot(r,e,n))}s(r1,"FromUnion");function i1(t,e,n){return!(!Ps(n)||ge(t.maxByteLength)&&!(n.length<=t.maxByteLength)||ge(t.minByteLength)&&!(n.length>=t.minByteLength))}s(i1,"FromUint8Array");function s1(t,e,n){return!0}s(s1,"FromUnknown");function o1(t,e,n){return De.IsVoidLike(n)}s(o1,"FromVoid");function a1(t,e,n){return St.Has(t[M])?St.Get(t[M])(t,n):!1}s(a1,"FromKind");function Ot(t,e,n){let r=ge(t.$id)?[...e,t]:e,i=t;switch(i[M]){case"Any":return CA(i,r,n);case"Array":return PA(i,r,n);case"AsyncIterator":return FA(i,r,n);case"BigInt":return OA(i,r,n);case"Boolean":return LA(i,r,n);case"Constructor":return NA(i,r,n);case"Date":return UA(i,r,n);case"Function":return DA(i,r,n);case"Integer":return kA(i,r,n);case"Intersect":return BA(i,r,n);case"Iterator":return zA(i,r,n);case"Literal":return VA(i,r,n);case"Never":return GA(i,r,n);case"Not":return HA(i,r,n);case"Null":return $A(i,r,n);case"Number":return WA(i,r,n);case"Object":return jA(i,r,n);case"Promise":return XA(i,r,n);case"Record":return qA(i,r,n);case"Ref":return KA(i,r,n);case"RegExp":return YA(i,r,n);case"String":return ZA(i,r,n);case"Symbol":return JA(i,r,n);case"TemplateLiteral":return QA(i,r,n);case"This":return e1(i,r,n);case"Tuple":return t1(i,r,n);case"Undefined":return n1(i,r,n);case"Union":return r1(i,r,n);case"Uint8Array":return i1(i,r,n);case"Unknown":return s1(i,r,n);case"Void":return o1(i,r,n);default:if(!St.Has(i[M]))throw new Rd(i);return a1(i,r,n)}}s(Ot,"Visit");function de(...t){return t.length===3?Ot(t[0],t[1],t[2]):Ot(t[0],[],t[1])}s(de,"Check");var w;(function(t){t[t.ArrayContains=0]="ArrayContains",t[t.ArrayMaxContains=1]="ArrayMaxContains",t[t.ArrayMaxItems=2]="ArrayMaxItems",t[t.ArrayMinContains=3]="ArrayMinContains",t[t.ArrayMinItems=4]="ArrayMinItems",t[t.ArrayUniqueItems=5]="ArrayUniqueItems",t[t.Array=6]="Array",t[t.AsyncIterator=7]="AsyncIterator",t[t.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",t[t.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",t[t.BigIntMaximum=10]="BigIntMaximum",t[t.BigIntMinimum=11]="BigIntMinimum",t[t.BigIntMultipleOf=12]="BigIntMultipleOf",t[t.BigInt=13]="BigInt",t[t.Boolean=14]="Boolean",t[t.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",t[t.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",t[t.DateMaximumTimestamp=17]="DateMaximumTimestamp",t[t.DateMinimumTimestamp=18]="DateMinimumTimestamp",t[t.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",t[t.Date=20]="Date",t[t.Function=21]="Function",t[t.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",t[t.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",t[t.IntegerMaximum=24]="IntegerMaximum",t[t.IntegerMinimum=25]="IntegerMinimum",t[t.IntegerMultipleOf=26]="IntegerMultipleOf",t[t.Integer=27]="Integer",t[t.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",t[t.Intersect=29]="Intersect",t[t.Iterator=30]="Iterator",t[t.Kind=31]="Kind",t[t.Literal=32]="Literal",t[t.Never=33]="Never",t[t.Not=34]="Not",t[t.Null=35]="Null",t[t.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",t[t.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",t[t.NumberMaximum=38]="NumberMaximum",t[t.NumberMinimum=39]="NumberMinimum",t[t.NumberMultipleOf=40]="NumberMultipleOf",t[t.Number=41]="Number",t[t.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",t[t.ObjectMaxProperties=43]="ObjectMaxProperties",t[t.ObjectMinProperties=44]="ObjectMinProperties",t[t.ObjectRequiredProperty=45]="ObjectRequiredProperty",t[t.Object=46]="Object",t[t.Promise=47]="Promise",t[t.RegExp=48]="RegExp",t[t.StringFormatUnknown=49]="StringFormatUnknown",t[t.StringFormat=50]="StringFormat",t[t.StringMaxLength=51]="StringMaxLength",t[t.StringMinLength=52]="StringMinLength",t[t.StringPattern=53]="StringPattern",t[t.String=54]="String",t[t.Symbol=55]="Symbol",t[t.TupleLength=56]="TupleLength",t[t.Tuple=57]="Tuple",t[t.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",t[t.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",t[t.Uint8Array=60]="Uint8Array",t[t.Undefined=61]="Undefined",t[t.Union=62]="Union",t[t.Void=63]="Void"})(w||(w={}));var Fd=class Fd extends ne{constructor(e){super("Unknown type"),this.schema=e}};s(Fd,"ValueErrorsUnknownTypeError");var Pd=Fd;function qr(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}s(qr,"EscapeKey");function ye(t){return t!==void 0}s(ye,"IsDefined");var Od=class Od{constructor(e){this.iterator=e}[Symbol.iterator](){return this.iterator}First(){let e=this.iterator.next();return e.done?void 0:e.value}};s(Od,"ValueErrorIterator");var Bn=Od;function D(t,e,n,r,i=[]){return{type:t,schema:e,path:n,value:r,message:oy()({errorType:t,path:n,schema:e,value:r,errors:i}),errors:i}}s(D,"Create");function*c1(t,e,n,r){}s(c1,"FromAny");function*l1(t,e,n,r){if(!ae(r))return yield D(w.Array,t,n,r);ye(t.minItems)&&!(r.length>=t.minItems)&&(yield D(w.ArrayMinItems,t,n,r)),ye(t.maxItems)&&!(r.length<=t.maxItems)&&(yield D(w.ArrayMaxItems,t,n,r));for(let a=0;a<r.length;a++)yield*C(Lt(t.items,e,"".concat(n,"/").concat(a),r[a]));if(t.uniqueItems===!0&&!function(){let a=new Set;for(let c of r){let f=Si(c);if(a.has(f))return!1;a.add(f)}return!0}()&&(yield D(w.ArrayUniqueItems,t,n,r)),!(ye(t.contains)||ye(t.minContains)||ye(t.maxContains)))return;let i=ye(t.contains)?t.contains:Ge(),o=r.reduce((a,c,f)=>Lt(i,e,"".concat(n).concat(f),c).next().done===!0?a+1:a,0);o===0&&(yield D(w.ArrayContains,t,n,r)),Y(t.minContains)&&o<t.minContains&&(yield D(w.ArrayMinContains,t,n,r)),Y(t.maxContains)&&o>t.maxContains&&(yield D(w.ArrayMaxContains,t,n,r))}s(l1,"FromArray");function*u1(t,e,n,r){Za(r)||(yield D(w.AsyncIterator,t,n,r))}s(u1,"FromAsyncIterator");function*f1(t,e,n,r){if(!Ct(r))return yield D(w.BigInt,t,n,r);ye(t.exclusiveMaximum)&&!(r<t.exclusiveMaximum)&&(yield D(w.BigIntExclusiveMaximum,t,n,r)),ye(t.exclusiveMinimum)&&!(r>t.exclusiveMinimum)&&(yield D(w.BigIntExclusiveMinimum,t,n,r)),ye(t.maximum)&&!(r<=t.maximum)&&(yield D(w.BigIntMaximum,t,n,r)),ye(t.minimum)&&!(r>=t.minimum)&&(yield D(w.BigIntMinimum,t,n,r)),ye(t.multipleOf)&&r%t.multipleOf!==BigInt(0)&&(yield D(w.BigIntMultipleOf,t,n,r))}s(f1,"FromBigInt");function*d1(t,e,n,r){dr(r)||(yield D(w.Boolean,t,n,r))}s(d1,"FromBoolean");function*p1(t,e,n,r){yield*C(Lt(t.returns,e,n,r.prototype))}s(p1,"FromConstructor");function*h1(t,e,n,r){if(!Qt(r))return yield D(w.Date,t,n,r);ye(t.exclusiveMaximumTimestamp)&&!(r.getTime()<t.exclusiveMaximumTimestamp)&&(yield D(w.DateExclusiveMaximumTimestamp,t,n,r)),ye(t.exclusiveMinimumTimestamp)&&!(r.getTime()>t.exclusiveMinimumTimestamp)&&(yield D(w.DateExclusiveMinimumTimestamp,t,n,r)),ye(t.maximumTimestamp)&&!(r.getTime()<=t.maximumTimestamp)&&(yield D(w.DateMaximumTimestamp,t,n,r)),ye(t.minimumTimestamp)&&!(r.getTime()>=t.minimumTimestamp)&&(yield D(w.DateMinimumTimestamp,t,n,r)),ye(t.multipleOfTimestamp)&&r.getTime()%t.multipleOfTimestamp!==0&&(yield D(w.DateMultipleOfTimestamp,t,n,r))}s(h1,"FromDate");function*m1(t,e,n,r){hi(r)||(yield D(w.Function,t,n,r))}s(m1,"FromFunction");function*g1(t,e,n,r){if(!ec(r))return yield D(w.Integer,t,n,r);ye(t.exclusiveMaximum)&&!(r<t.exclusiveMaximum)&&(yield D(w.IntegerExclusiveMaximum,t,n,r)),ye(t.exclusiveMinimum)&&!(r>t.exclusiveMinimum)&&(yield D(w.IntegerExclusiveMinimum,t,n,r)),ye(t.maximum)&&!(r<=t.maximum)&&(yield D(w.IntegerMaximum,t,n,r)),ye(t.minimum)&&!(r>=t.minimum)&&(yield D(w.IntegerMinimum,t,n,r)),ye(t.multipleOf)&&r%t.multipleOf!==0&&(yield D(w.IntegerMultipleOf,t,n,r))}s(g1,"FromInteger");function*y1(t,e,n,r){let i=!1;for(let o of t.allOf)for(let a of Lt(o,e,n,r))i=!0,yield a;if(i)return yield D(w.Intersect,t,n,r);if(t.unevaluatedProperties===!1){let o=new RegExp(Wr(t));for(let a of Object.getOwnPropertyNames(r))o.test(a)||(yield D(w.IntersectUnevaluatedProperties,t,"".concat(n,"/").concat(a),r))}if(typeof t.unevaluatedProperties=="object"){let o=new RegExp(Wr(t));for(let a of Object.getOwnPropertyNames(r))if(!o.test(a)){let c=Lt(t.unevaluatedProperties,e,"".concat(n,"/").concat(a),r[a]).next();c.done||(yield c.value)}}}s(y1,"FromIntersect");function*x1(t,e,n,r){Ja(r)||(yield D(w.Iterator,t,n,r))}s(x1,"FromIterator");function*_1(t,e,n,r){r!==t.const&&(yield D(w.Literal,t,n,r))}s(_1,"FromLiteral");function*v1(t,e,n,r){yield D(w.Never,t,n,r)}s(v1,"FromNever");function*b1(t,e,n,r){Lt(t.not,e,n,r).next().done===!0&&(yield D(w.Not,t,n,r))}s(b1,"FromNot");function*S1(t,e,n,r){Dr(r)||(yield D(w.Null,t,n,r))}s(S1,"FromNull");function*M1(t,e,n,r){if(!De.IsNumberLike(r))return yield D(w.Number,t,n,r);ye(t.exclusiveMaximum)&&!(r<t.exclusiveMaximum)&&(yield D(w.NumberExclusiveMaximum,t,n,r)),ye(t.exclusiveMinimum)&&!(r>t.exclusiveMinimum)&&(yield D(w.NumberExclusiveMinimum,t,n,r)),ye(t.maximum)&&!(r<=t.maximum)&&(yield D(w.NumberMaximum,t,n,r)),ye(t.minimum)&&!(r>=t.minimum)&&(yield D(w.NumberMinimum,t,n,r)),ye(t.multipleOf)&&r%t.multipleOf!==0&&(yield D(w.NumberMultipleOf,t,n,r))}s(M1,"FromNumber");function*w1(t,e,n,r){if(!De.IsObjectLike(r))return yield D(w.Object,t,n,r);ye(t.minProperties)&&!(Object.getOwnPropertyNames(r).length>=t.minProperties)&&(yield D(w.ObjectMinProperties,t,n,r)),ye(t.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=t.maxProperties)&&(yield D(w.ObjectMaxProperties,t,n,r));let i=Array.isArray(t.required)?t.required:[],o=Object.getOwnPropertyNames(t.properties),a=Object.getOwnPropertyNames(r);for(let c of i)a.includes(c)||(yield D(w.ObjectRequiredProperty,t.properties[c],"".concat(n,"/").concat(qr(c)),void 0));if(t.additionalProperties===!1)for(let c of a)o.includes(c)||(yield D(w.ObjectAdditionalProperties,t,"".concat(n,"/").concat(qr(c)),r[c]));if(typeof t.additionalProperties=="object")for(let c of a)o.includes(c)||(yield*C(Lt(t.additionalProperties,e,"".concat(n,"/").concat(qr(c)),r[c])));for(let c of o){let f=t.properties[c];t.required&&t.required.includes(c)?(yield*C(Lt(f,e,"".concat(n,"/").concat(qr(c)),r[c])),Xr(t)&&!(c in r)&&(yield D(w.ObjectRequiredProperty,f,"".concat(n,"/").concat(qr(c)),void 0))):De.IsExactOptionalProperty(r,c)&&(yield*C(Lt(f,e,"".concat(n,"/").concat(qr(c)),r[c])))}}s(w1,"FromObject");function*E1(t,e,n,r){Qa(r)||(yield D(w.Promise,t,n,r))}s(E1,"FromPromise");function*I1(t,e,n,r){if(!De.IsRecordLike(r))return yield D(w.Object,t,n,r);ye(t.minProperties)&&!(Object.getOwnPropertyNames(r).length>=t.minProperties)&&(yield D(w.ObjectMinProperties,t,n,r)),ye(t.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=t.maxProperties)&&(yield D(w.ObjectMaxProperties,t,n,r));let[i,o]=Object.entries(t.patternProperties)[0],a=new RegExp(i);for(let[c,f]of Object.entries(r))a.test(c)&&(yield*C(Lt(o,e,"".concat(n,"/").concat(qr(c)),f)));if(typeof t.additionalProperties=="object")for(let[c,f]of Object.entries(r))a.test(c)||(yield*C(Lt(t.additionalProperties,e,"".concat(n,"/").concat(qr(c)),f)));if(t.additionalProperties===!1){for(let[c,f]of Object.entries(r))if(!a.test(c))return yield D(w.ObjectAdditionalProperties,t,"".concat(n,"/").concat(qr(c)),f)}}s(I1,"FromRecord");function*T1(t,e,n,r){yield*C(Lt(Re(t,e),e,n,r))}s(T1,"FromRef");function*A1(t,e,n,r){if(!Se(r))return yield D(w.String,t,n,r);if(ye(t.minLength)&&!(r.length>=t.minLength)&&(yield D(w.StringMinLength,t,n,r)),ye(t.maxLength)&&!(r.length<=t.maxLength)&&(yield D(w.StringMaxLength,t,n,r)),!new RegExp(t.source,t.flags).test(r))return yield D(w.RegExp,t,n,r)}s(A1,"FromRegExp");function*R1(t,e,n,r){if(!Se(r))return yield D(w.String,t,n,r);ye(t.minLength)&&!(r.length>=t.minLength)&&(yield D(w.StringMinLength,t,n,r)),ye(t.maxLength)&&!(r.length<=t.maxLength)&&(yield D(w.StringMaxLength,t,n,r)),Se(t.pattern)&&(new RegExp(t.pattern).test(r)||(yield D(w.StringPattern,t,n,r))),Se(t.format)&&(tn.Has(t.format)?tn.Get(t.format)(r)||(yield D(w.StringFormat,t,n,r)):yield D(w.StringFormatUnknown,t,n,r))}s(R1,"FromString");function*C1(t,e,n,r){kr(r)||(yield D(w.Symbol,t,n,r))}s(C1,"FromSymbol");function*P1(t,e,n,r){if(!Se(r))return yield D(w.String,t,n,r);new RegExp(t.pattern).test(r)||(yield D(w.StringPattern,t,n,r))}s(P1,"FromTemplateLiteral");function*F1(t,e,n,r){yield*C(Lt(Re(t,e),e,n,r))}s(F1,"FromThis");function*O1(t,e,n,r){if(!ae(r))return yield D(w.Tuple,t,n,r);if(t.items===void 0&&r.length!==0)return yield D(w.TupleLength,t,n,r);if(r.length!==t.maxItems)return yield D(w.TupleLength,t,n,r);if(t.items)for(let i=0;i<t.items.length;i++)yield*C(Lt(t.items[i],e,"".concat(n,"/").concat(i),r[i]))}s(O1,"FromTuple");function*L1(t,e,n,r){ot(r)||(yield D(w.Undefined,t,n,r))}s(L1,"FromUndefined");function*N1(t,e,n,r){if(de(t,e,r))return;let i=t.anyOf.map(o=>new Bn(Lt(o,e,n,r)));yield D(w.Union,t,n,r,i)}s(N1,"FromUnion");function*U1(t,e,n,r){if(!Ps(r))return yield D(w.Uint8Array,t,n,r);ye(t.maxByteLength)&&!(r.length<=t.maxByteLength)&&(yield D(w.Uint8ArrayMaxByteLength,t,n,r)),ye(t.minByteLength)&&!(r.length>=t.minByteLength)&&(yield D(w.Uint8ArrayMinByteLength,t,n,r))}s(U1,"FromUint8Array");function*D1(t,e,n,r){}s(D1,"FromUnknown");function*k1(t,e,n,r){De.IsVoidLike(r)||(yield D(w.Void,t,n,r))}s(k1,"FromVoid");function*B1(t,e,n,r){St.Get(t[M])(t,r)||(yield D(w.Kind,t,n,r))}s(B1,"FromKind");function*Lt(t,e,n,r){let i=ye(t.$id)?[...e,t]:e,o=t;switch(o[M]){case"Any":return yield*C(c1(o,i,n,r));case"Array":return yield*C(l1(o,i,n,r));case"AsyncIterator":return yield*C(u1(o,i,n,r));case"BigInt":return yield*C(f1(o,i,n,r));case"Boolean":return yield*C(d1(o,i,n,r));case"Constructor":return yield*C(p1(o,i,n,r));case"Date":return yield*C(h1(o,i,n,r));case"Function":return yield*C(m1(o,i,n,r));case"Integer":return yield*C(g1(o,i,n,r));case"Intersect":return yield*C(y1(o,i,n,r));case"Iterator":return yield*C(x1(o,i,n,r));case"Literal":return yield*C(_1(o,i,n,r));case"Never":return yield*C(v1(o,i,n,r));case"Not":return yield*C(b1(o,i,n,r));case"Null":return yield*C(S1(o,i,n,r));case"Number":return yield*C(M1(o,i,n,r));case"Object":return yield*C(w1(o,i,n,r));case"Promise":return yield*C(E1(o,i,n,r));case"Record":return yield*C(I1(o,i,n,r));case"Ref":return yield*C(T1(o,i,n,r));case"RegExp":return yield*C(A1(o,i,n,r));case"String":return yield*C(R1(o,i,n,r));case"Symbol":return yield*C(C1(o,i,n,r));case"TemplateLiteral":return yield*C(P1(o,i,n,r));case"This":return yield*C(F1(o,i,n,r));case"Tuple":return yield*C(O1(o,i,n,r));case"Undefined":return yield*C(L1(o,i,n,r));case"Union":return yield*C(N1(o,i,n,r));case"Uint8Array":return yield*C(U1(o,i,n,r));case"Unknown":return yield*C(D1(o,i,n,r));case"Void":return yield*C(k1(o,i,n,r));default:if(!St.Has(o[M]))throw new Pd(t);return yield*C(B1(o,i,n,r))}}s(Lt,"Visit");function yr(...t){let e=t.length===3?Lt(t[0],t[1],"",t[2]):Lt(t[0],[],"",t[1]);return new Bn(e)}s(yr,"Errors");l();l();var z1=function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},fy=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Ld,Fc,dy,Ud=class Ud extends ne{constructor(e){let n=e.First();super(n===void 0?"Invalid Value":n.message),Ld.add(this),Fc.set(this,void 0),z1(this,Fc,e,"f"),this.error=n}Errors(){return new Bn(fy(this,Ld,"m",dy).call(this))}};s(Ud,"AssertError");var Nd=Ud;Fc=new WeakMap,Ld=new WeakSet,dy=s(function*(){this.error&&(yield this.error),yield*C(fy(this,Fc,"f"))},"_AssertError_Iterator");function uy(t,e,n){if(!de(t,e,n))throw new Nd(yr(t,e,n))}s(uy,"AssertValue");function Oc(...t){return t.length===3?uy(t[0],t[1],t[2]):uy(t[0],[],t[1])}s(Oc,"Assert");l();l();l();function V1(t){let e={};for(let n of Object.getOwnPropertyNames(t))e[n]=Ce(t[n]);for(let n of Object.getOwnPropertySymbols(t))e[n]=Ce(t[n]);return e}s(V1,"FromObject");function G1(t){return t.map(e=>Ce(e))}s(G1,"FromArray");function H1(t){return t.slice()}s(H1,"FromTypedArray");function $1(t){return new Map(Ce([...t.entries()]))}s($1,"FromMap");function W1(t){return new Set(Ce([...t.entries()]))}s(W1,"FromSet");function j1(t){return new Date(t.toISOString())}s(j1,"FromDate");function Ce(t){if(ae(t))return G1(t);if(Qt(t))return j1(t);if(Pn(t))return H1(t);if(Kh(t))return $1(t);if(Yh(t))return W1(t);if(le(t))return V1(t);if(Pt(t))return t;throw new Error("ValueClone: Unable to clone value")}s(Ce,"Clone");var Dd=class Dd extends ne{constructor(e,n){super(n),this.schema=e}};s(Dd,"ValueCreateError");var _n=Dd;function Pe(t){return hi(t)?t():Ce(t)}s(Pe,"FromDefault");function X1(t,e){return re(t,"default")?Pe(t.default):{}}s(X1,"FromAny");function q1(t,e){if(t.uniqueItems===!0&&!re(t,"default"))throw new _n(t,"Array with the uniqueItems constraint requires a default value");if("contains"in t&&!re(t,"default"))throw new _n(t,"Array with the contains constraint requires a default value");return"default"in t?Pe(t.default):t.minItems!==void 0?Array.from({length:t.minItems}).map(n=>vn(t.items,e)):[]}s(q1,"FromArray");function K1(t,e){return re(t,"default")?Pe(t.default):function(){return dh(this,null,function*(){})}()}s(K1,"FromAsyncIterator");function Y1(t,e){return re(t,"default")?Pe(t.default):BigInt(0)}s(Y1,"FromBigInt");function Z1(t,e){return re(t,"default")?Pe(t.default):!1}s(Z1,"FromBoolean");function J1(t,e){if(re(t,"default"))return Pe(t.default);{let n=vn(t.returns,e);return typeof n=="object"&&!Array.isArray(n)?class{constructor(){for(let[r,i]of Object.entries(n)){let o=this;o[r]=i}}}:class{}}}s(J1,"FromConstructor");function Q1(t,e){return re(t,"default")?Pe(t.default):t.minimumTimestamp!==void 0?new Date(t.minimumTimestamp):new Date}s(Q1,"FromDate");function eR(t,e){return re(t,"default")?Pe(t.default):()=>vn(t.returns,e)}s(eR,"FromFunction");function tR(t,e){return re(t,"default")?Pe(t.default):t.minimum!==void 0?t.minimum:0}s(tR,"FromInteger");function nR(t,e){if(re(t,"default"))return Pe(t.default);{let n=t.allOf.reduce((r,i)=>{let o=vn(i,e);return typeof o=="object"?y(y({},r),o):o},{});if(!de(t,e,n))throw new _n(t,"Intersect produced invalid value. Consider using a default value.");return n}}s(nR,"FromIntersect");function rR(t,e){return re(t,"default")?Pe(t.default):function*(){}()}s(rR,"FromIterator");function iR(t,e){return re(t,"default")?Pe(t.default):t.const}s(iR,"FromLiteral");function sR(t,e){if(re(t,"default"))return Pe(t.default);throw new _n(t,"Never types cannot be created. Consider using a default value.")}s(sR,"FromNever");function oR(t,e){if(re(t,"default"))return Pe(t.default);throw new _n(t,"Not types must have a default value")}s(oR,"FromNot");function aR(t,e){return re(t,"default")?Pe(t.default):null}s(aR,"FromNull");function cR(t,e){return re(t,"default")?Pe(t.default):t.minimum!==void 0?t.minimum:0}s(cR,"FromNumber");function lR(t,e){if(re(t,"default"))return Pe(t.default);{let n=new Set(t.required),r={};for(let[i,o]of Object.entries(t.properties))n.has(i)&&(r[i]=vn(o,e));return r}}s(lR,"FromObject");function uR(t,e){return re(t,"default")?Pe(t.default):Promise.resolve(vn(t.item,e))}s(uR,"FromPromise");function fR(t,e){let[n,r]=Object.entries(t.patternProperties)[0];if(re(t,"default"))return Pe(t.default);if(n===Hr||n===Gr)return{};{let i=n.slice(1,n.length-1).split("|"),o={};for(let a of i)o[a]=vn(r,e);return o}}s(fR,"FromRecord");function dR(t,e){return re(t,"default")?Pe(t.default):vn(Re(t,e),e)}s(dR,"FromRef");function pR(t,e){if(re(t,"default"))return Pe(t.default);throw new _n(t,"RegExp types cannot be created. Consider using a default value.")}s(pR,"FromRegExp");function hR(t,e){if(t.pattern!==void 0){if(re(t,"default"))return Pe(t.default);throw new _n(t,"String types with patterns must specify a default value")}else if(t.format!==void 0){if(re(t,"default"))return Pe(t.default);throw new _n(t,"String types with formats must specify a default value")}else return re(t,"default")?Pe(t.default):t.minLength!==void 0?Array.from({length:t.minLength}).map(()=>" ").join(""):""}s(hR,"FromString");function mR(t,e){return re(t,"default")?Pe(t.default):"value"in t?Symbol.for(t.value):Symbol()}s(mR,"FromSymbol");function gR(t,e){if(re(t,"default"))return Pe(t.default);if(!sc(t))throw new _n(t,"Can only create template literals that produce a finite variants. Consider using a default value.");return ks(t)[0]}s(gR,"FromTemplateLiteral");function yR(t,e){if(py++>ER)throw new _n(t,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return re(t,"default")?Pe(t.default):vn(Re(t,e),e)}s(yR,"FromThis");function xR(t,e){return re(t,"default")?Pe(t.default):t.items===void 0?[]:Array.from({length:t.minItems}).map((n,r)=>vn(t.items[r],e))}s(xR,"FromTuple");function _R(t,e){if(re(t,"default"))return Pe(t.default)}s(_R,"FromUndefined");function vR(t,e){if(re(t,"default"))return Pe(t.default);if(t.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return vn(t.anyOf[0],e)}s(vR,"FromUnion");function bR(t,e){return re(t,"default")?Pe(t.default):t.minByteLength!==void 0?new Uint8Array(t.minByteLength):new Uint8Array(0)}s(bR,"FromUint8Array");function SR(t,e){return re(t,"default")?Pe(t.default):{}}s(SR,"FromUnknown");function MR(t,e){if(re(t,"default"))return Pe(t.default)}s(MR,"FromVoid");function wR(t,e){if(re(t,"default"))return Pe(t.default);throw new Error("User defined types must specify a default value")}s(wR,"FromKind");function vn(t,e){let n=kn(t,e),r=t;switch(r[M]){case"Any":return X1(r,n);case"Array":return q1(r,n);case"AsyncIterator":return K1(r,n);case"BigInt":return Y1(r,n);case"Boolean":return Z1(r,n);case"Constructor":return J1(r,n);case"Date":return Q1(r,n);case"Function":return eR(r,n);case"Integer":return tR(r,n);case"Intersect":return nR(r,n);case"Iterator":return rR(r,n);case"Literal":return iR(r,n);case"Never":return sR(r,n);case"Not":return oR(r,n);case"Null":return aR(r,n);case"Number":return cR(r,n);case"Object":return lR(r,n);case"Promise":return uR(r,n);case"Record":return fR(r,n);case"Ref":return dR(r,n);case"RegExp":return pR(r,n);case"String":return hR(r,n);case"Symbol":return mR(r,n);case"TemplateLiteral":return gR(r,n);case"This":return yR(r,n);case"Tuple":return xR(r,n);case"Undefined":return _R(r,n);case"Union":return vR(r,n);case"Uint8Array":return bR(r,n);case"Unknown":return SR(r,n);case"Void":return MR(r,n);default:if(!St.Has(r[M]))throw new _n(r,"Unknown type");return wR(r,n)}}s(vn,"Visit");var ER=512,py=0;function zn(...t){return py=0,t.length===2?vn(t[0],t[1]):vn(t[0],[])}s(zn,"Create");var Bd=class Bd extends ne{constructor(e,n){super(n),this.schema=e}};s(Bd,"ValueCastError");var Lc=Bd;function IR(t,e,n){if(t[M]==="Object"&&typeof n=="object"&&!Dr(n)){let r=t,i=Object.getOwnPropertyNames(n),o=Object.entries(r.properties),[a,c]=[1/o.length,o.length];return o.reduce((f,[d,p])=>{let h=p[M]==="Literal"&&p.const===n[d]?c:0,g=de(p,e,n[d])?a:0,x=i.includes(d)?a:0;return f+(h+g+x)},0)}else return de(t,e,n)?1:0}s(IR,"ScoreUnion");function TR(t,e,n){let r=t.anyOf.map(a=>Re(a,e)),[i,o]=[r[0],0];for(let a of r){let c=IR(a,e,n);c>o&&(i=a,o=c)}return i}s(TR,"SelectUnion");function AR(t,e,n){if("default"in t)return typeof n=="function"?t.default:Ce(t.default);{let r=TR(t,e,n);return kd(r,e,n)}}s(AR,"CastUnion");function RR(t,e,n){return de(t,e,n)?Ce(n):zn(t,e)}s(RR,"DefaultClone");function CR(t,e,n){return de(t,e,n)?n:zn(t,e)}s(CR,"Default");function PR(t,e,n){if(de(t,e,n))return Ce(n);let r=ae(n)?Ce(n):zn(t,e),i=Y(t.minItems)&&r.length<t.minItems?[...r,...Array.from({length:t.minItems-r.length},()=>null)]:r,a=(Y(t.maxItems)&&i.length>t.maxItems?i.slice(0,t.maxItems):i).map(f=>xr(t.items,e,f));if(t.uniqueItems!==!0)return a;let c=[...new Set(a)];if(!de(t,e,c))throw new Lc(t,"Array cast produced invalid data due to uniqueItems constraint");return c}s(PR,"FromArray");function FR(t,e,n){if(de(t,e,n))return zn(t,e);let r=new Set(t.returns.required||[]),i=s(function(){},"result");for(let[o,a]of Object.entries(t.returns.properties))!r.has(o)&&n.prototype[o]===void 0||(i.prototype[o]=xr(a,e,n.prototype[o]));return i}s(FR,"FromConstructor");function OR(t,e,n){let r=zn(t,e),i=le(r)&&le(n)?y(y({},r),n):n;return de(t,e,i)?i:zn(t,e)}s(OR,"FromIntersect");function LR(t,e,n){throw new Lc(t,"Never types cannot be cast")}s(LR,"FromNever");function NR(t,e,n){if(de(t,e,n))return n;if(n===null||typeof n!="object")return zn(t,e);let r=new Set(t.required||[]),i={};for(let[o,a]of Object.entries(t.properties))!r.has(o)&&n[o]===void 0||(i[o]=xr(a,e,n[o]));if(typeof t.additionalProperties=="object"){let o=Object.getOwnPropertyNames(t.properties);for(let a of Object.getOwnPropertyNames(n))o.includes(a)||(i[a]=xr(t.additionalProperties,e,n[a]))}return i}s(NR,"FromObject");function UR(t,e,n){if(de(t,e,n))return Ce(n);if(n===null||typeof n!="object"||Array.isArray(n)||n instanceof Date)return zn(t,e);let r=Object.getOwnPropertyNames(t.patternProperties)[0],i=t.patternProperties[r],o={};for(let[a,c]of Object.entries(n))o[a]=xr(i,e,c);return o}s(UR,"FromRecord");function DR(t,e,n){return xr(Re(t,e),e,n)}s(DR,"FromRef");function kR(t,e,n){return xr(Re(t,e),e,n)}s(kR,"FromThis");function BR(t,e,n){return de(t,e,n)?Ce(n):ae(n)?t.items===void 0?[]:t.items.map((r,i)=>xr(r,e,n[i])):zn(t,e)}s(BR,"FromTuple");function zR(t,e,n){return de(t,e,n)?Ce(n):AR(t,e,n)}s(zR,"FromUnion");function xr(t,e,n){let r=Se(t.$id)?[...e,t]:e,i=t;switch(t[M]){case"Array":return PR(i,r,n);case"Constructor":return FR(i,r,n);case"Intersect":return OR(i,r,n);case"Never":return LR(i,r,n);case"Object":return NR(i,r,n);case"Record":return UR(i,r,n);case"Ref":return DR(i,r,n);case"This":return kR(i,r,n);case"Tuple":return BR(i,r,n);case"Union":return zR(i,r,n);case"Date":case"Symbol":case"Uint8Array":return RR(t,e,n);default:return CR(i,r,n)}}s(xr,"Visit");function kd(...t){return t.length===3?xr(t[0],t[1],t[2]):xr(t[0],[],t[1])}s(kd,"Cast");l();function VR(t){return gi(t)&&t[M]!=="Unsafe"}s(VR,"IsCheckable");function GR(t,e,n){return ae(n)?n.map(r=>bn(t.items,e,r)):n}s(GR,"FromArray");function HR(t,e,n){let r=t.unevaluatedProperties,o=t.allOf.map(c=>bn(c,e,Ce(n))).reduce((c,f)=>le(f)?y(y({},c),f):f,{});if(!le(n)||!le(o)||!gi(r))return o;let a=Et(t);for(let c of Object.getOwnPropertyNames(n))a.includes(c)||de(r,e,n[c])&&(o[c]=bn(r,e,n[c]));return o}s(HR,"FromIntersect");function $R(t,e,n){if(!le(n)||ae(n))return n;let r=t.additionalProperties;for(let i of Object.getOwnPropertyNames(n)){if(re(t.properties,i)){n[i]=bn(t.properties[i],e,n[i]);continue}if(gi(r)&&de(r,e,n[i])){n[i]=bn(r,e,n[i]);continue}delete n[i]}return n}s($R,"FromObject");function WR(t,e,n){if(!le(n))return n;let r=t.additionalProperties,i=Object.getOwnPropertyNames(n),[o,a]=Object.entries(t.patternProperties)[0],c=new RegExp(o);for(let f of i){if(c.test(f)){n[f]=bn(a,e,n[f]);continue}if(gi(r)&&de(r,e,n[f])){n[f]=bn(r,e,n[f]);continue}delete n[f]}return n}s(WR,"FromRecord");function jR(t,e,n){return bn(Re(t,e),e,n)}s(jR,"FromRef");function XR(t,e,n){return bn(Re(t,e),e,n)}s(XR,"FromThis");function qR(t,e,n){if(!ae(n))return n;if(ot(t.items))return[];let r=Math.min(n.length,t.items.length);for(let i=0;i<r;i++)n[i]=bn(t.items[i],e,n[i]);return n.length>r?n.slice(0,r):n}s(qR,"FromTuple");function KR(t,e,n){for(let r of t.anyOf)if(VR(r)&&de(r,e,n))return bn(r,e,n);return n}s(KR,"FromUnion");function bn(t,e,n){let r=Se(t.$id)?[...e,t]:e,i=t;switch(i[M]){case"Array":return GR(i,r,n);case"Intersect":return HR(i,r,n);case"Object":return $R(i,r,n);case"Record":return WR(i,r,n);case"Ref":return jR(i,r,n);case"This":return XR(i,r,n);case"Tuple":return qR(i,r,n);case"Union":return KR(i,r,n);default:return n}}s(bn,"Visit");function Nc(...t){return t.length===3?bn(t[0],t[1],t[2]):bn(t[0],[],t[1])}s(Nc,"Clean");l();function Uc(t){return Se(t)&&!isNaN(t)&&!isNaN(parseFloat(t))}s(Uc,"IsStringNumeric");function YR(t){return Ct(t)||dr(t)||Y(t)}s(YR,"IsValueToString");function ca(t){return t===!0||Y(t)&&t===1||Ct(t)&&t===BigInt("1")||Se(t)&&(t.toLowerCase()==="true"||t==="1")}s(ca,"IsValueTrue");function la(t){return t===!1||Y(t)&&(t===0||Object.is(t,-0))||Ct(t)&&t===BigInt("0")||Se(t)&&(t.toLowerCase()==="false"||t==="0"||t==="-0")}s(la,"IsValueFalse");function ZR(t){return Se(t)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(t)}s(ZR,"IsTimeStringWithTimeZone");function JR(t){return Se(t)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(t)}s(JR,"IsTimeStringWithoutTimeZone");function QR(t){return Se(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(t)}s(QR,"IsDateTimeStringWithTimeZone");function eC(t){return Se(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(t)}s(eC,"IsDateTimeStringWithoutTimeZone");function tC(t){return Se(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(t)}s(tC,"IsDateString");function nC(t,e){let n=my(t);return n===e?n:t}s(nC,"TryConvertLiteralString");function rC(t,e){let n=gy(t);return n===e?n:t}s(rC,"TryConvertLiteralNumber");function iC(t,e){let n=hy(t);return n===e?n:t}s(iC,"TryConvertLiteralBoolean");function sC(t,e){return Se(t.const)?nC(e,t.const):Y(t.const)?rC(e,t.const):dr(t.const)?iC(e,t.const):e}s(sC,"TryConvertLiteral");function hy(t){return ca(t)?!0:la(t)?!1:t}s(hy,"TryConvertBoolean");function oC(t){let e=s(n=>n.split(".")[0],"truncateInteger");return Uc(t)?BigInt(e(t)):Y(t)?BigInt(Math.trunc(t)):la(t)?BigInt(0):ca(t)?BigInt(1):t}s(oC,"TryConvertBigInt");function my(t){return YR(t)?t.toString():kr(t)&&t.description!==void 0?t.description.toString():t}s(my,"TryConvertString");function gy(t){return Uc(t)?parseFloat(t):ca(t)?1:la(t)?0:t}s(gy,"TryConvertNumber");function aC(t){return Uc(t)?parseInt(t):Y(t)?t|0:ca(t)?1:la(t)?0:t}s(aC,"TryConvertInteger");function cC(t){return Se(t)&&t.toLowerCase()==="null"?null:t}s(cC,"TryConvertNull");function lC(t){return Se(t)&&t==="undefined"?void 0:t}s(lC,"TryConvertUndefined");function uC(t){return Qt(t)?t:Y(t)?new Date(t):ca(t)?new Date(1):la(t)?new Date(0):Uc(t)?new Date(parseInt(t)):JR(t)?new Date("1970-01-01T".concat(t,".000Z")):ZR(t)?new Date("1970-01-01T".concat(t)):eC(t)?new Date("".concat(t,".000Z")):QR(t)?new Date(t):tC(t)?new Date("".concat(t,"T00:00:00.000Z")):t}s(uC,"TryConvertDate");function fC(t,e,n){return(ae(n)?n:[n]).map(i=>_r(t.items,e,i))}s(fC,"FromArray");function dC(t,e,n){return oC(n)}s(dC,"FromBigInt");function pC(t,e,n){return hy(n)}s(pC,"FromBoolean");function hC(t,e,n){return uC(n)}s(hC,"FromDate");function mC(t,e,n){return aC(n)}s(mC,"FromInteger");function gC(t,e,n){return t.allOf.reduce((r,i)=>_r(i,e,r),n)}s(gC,"FromIntersect");function yC(t,e,n){return sC(t,n)}s(yC,"FromLiteral");function xC(t,e,n){return cC(n)}s(xC,"FromNull");function _C(t,e,n){return gy(n)}s(_C,"FromNumber");function vC(t,e,n){if(!le(n))return n;for(let r of Object.getOwnPropertyNames(t.properties))re(n,r)&&(n[r]=_r(t.properties[r],e,n[r]));return n}s(vC,"FromObject");function bC(t,e,n){if(!le(n))return n;let i=Object.getOwnPropertyNames(t.patternProperties)[0],o=t.patternProperties[i];for(let[a,c]of Object.entries(n))n[a]=_r(o,e,c);return n}s(bC,"FromRecord");function SC(t,e,n){return _r(Re(t,e),e,n)}s(SC,"FromRef");function MC(t,e,n){return my(n)}s(MC,"FromString");function wC(t,e,n){return Se(n)||Y(n)?Symbol(n):n}s(wC,"FromSymbol");function EC(t,e,n){return _r(Re(t,e),e,n)}s(EC,"FromThis");function IC(t,e,n){return ae(n)&&!ot(t.items)?n.map((i,o)=>o<t.items.length?_r(t.items[o],e,i):i):n}s(IC,"FromTuple");function TC(t,e,n){return lC(n)}s(TC,"FromUndefined");function AC(t,e,n){for(let r of t.anyOf){let i=_r(r,e,Ce(n));if(de(r,e,i))return i}return n}s(AC,"FromUnion");function _r(t,e,n){let r=kn(t,e),i=t;switch(t[M]){case"Array":return fC(i,r,n);case"BigInt":return dC(i,r,n);case"Boolean":return pC(i,r,n);case"Date":return hC(i,r,n);case"Integer":return mC(i,r,n);case"Intersect":return gC(i,r,n);case"Literal":return yC(i,r,n);case"Null":return xC(i,r,n);case"Number":return _C(i,r,n);case"Object":return vC(i,r,n);case"Record":return bC(i,r,n);case"Ref":return SC(i,r,n);case"String":return MC(i,r,n);case"Symbol":return wC(i,r,n);case"This":return EC(i,r,n);case"Tuple":return IC(i,r,n);case"Undefined":return TC(i,r,n);case"Union":return AC(i,r,n);default:return n}}s(_r,"Visit");function Dc(...t){return t.length===3?_r(t[0],t[1],t[2]):_r(t[0],[],t[1])}s(Dc,"Convert");l();l();var zd=class zd extends ne{constructor(e,n,r){super("Unable to decode value as it does not match the expected schema"),this.schema=e,this.value=n,this.error=r}};s(zd,"TransformDecodeCheckError");var eo=zd,Vd=class Vd extends ne{constructor(e,n,r,i){super(i instanceof Error?i.message:"Unknown error"),this.schema=e,this.path=n,this.value=r,this.error=i}};s(Vd,"TransformDecodeError");var ts=Vd;function at(t,e,n){try{return Je(t)?t[nt].Decode(n):n}catch(r){throw new ts(t,e,n,r)}}s(at,"Default");function RC(t,e,n,r){return ae(r)?at(t,n,r.map((i,o)=>vr(t.items,e,"".concat(n,"/").concat(o),i))):at(t,n,r)}s(RC,"FromArray");function CC(t,e,n,r){if(!le(r)||Pt(r))return at(t,n,r);let i=_i(t),o=i.map(p=>p[0]),a=y({},r);for(let[p,h]of i)p in a&&(a[p]=vr(h,e,"".concat(n,"/").concat(p),a[p]));if(!Je(t.unevaluatedProperties))return at(t,n,a);let c=Object.getOwnPropertyNames(a),f=t.unevaluatedProperties,d=y({},a);for(let p of c)o.includes(p)||(d[p]=at(f,"".concat(n,"/").concat(p),d[p]));return at(t,n,d)}s(CC,"FromIntersect");function PC(t,e,n,r){return at(t,n,vr(t.not,e,n,r))}s(PC,"FromNot");function FC(t,e,n,r){if(!le(r))return at(t,n,r);let i=Et(t),o=y({},r);for(let d of i)re(o,d)&&(ot(o[d])&&(!Os(t.properties[d])||De.IsExactOptionalProperty(o,d))||(o[d]=vr(t.properties[d],e,"".concat(n,"/").concat(d),o[d])));if(!Me(t.additionalProperties))return at(t,n,o);let a=Object.getOwnPropertyNames(o),c=t.additionalProperties,f=y({},o);for(let d of a)i.includes(d)||(f[d]=at(c,"".concat(n,"/").concat(d),f[d]));return at(t,n,f)}s(FC,"FromObject");function OC(t,e,n,r){if(!le(r))return at(t,n,r);let i=Object.getOwnPropertyNames(t.patternProperties)[0],o=new RegExp(i),a=y({},r);for(let p of Object.getOwnPropertyNames(r))o.test(p)&&(a[p]=vr(t.patternProperties[i],e,"".concat(n,"/").concat(p),a[p]));if(!Me(t.additionalProperties))return at(t,n,a);let c=Object.getOwnPropertyNames(a),f=t.additionalProperties,d=y({},a);for(let p of c)o.test(p)||(d[p]=at(f,"".concat(n,"/").concat(p),d[p]));return at(t,n,d)}s(OC,"FromRecord");function LC(t,e,n,r){let i=Re(t,e);return at(t,n,vr(i,e,n,r))}s(LC,"FromRef");function NC(t,e,n,r){let i=Re(t,e);return at(t,n,vr(i,e,n,r))}s(NC,"FromThis");function UC(t,e,n,r){return ae(r)&&ae(t.items)?at(t,n,t.items.map((i,o)=>vr(i,e,"".concat(n,"/").concat(o),r[o]))):at(t,n,r)}s(UC,"FromTuple");function DC(t,e,n,r){for(let i of t.anyOf){if(!de(i,e,r))continue;let o=vr(i,e,n,r);return at(t,n,o)}return at(t,n,r)}s(DC,"FromUnion");function vr(t,e,n,r){let i=kn(t,e),o=t;switch(t[M]){case"Array":return RC(o,i,n,r);case"Intersect":return CC(o,i,n,r);case"Not":return PC(o,i,n,r);case"Object":return FC(o,i,n,r);case"Record":return OC(o,i,n,r);case"Ref":return LC(o,i,n,r);case"Symbol":return at(o,n,r);case"This":return NC(o,i,n,r);case"Tuple":return UC(o,i,n,r);case"Union":return DC(o,i,n,r);default:return at(o,n,r)}}s(vr,"Visit");function to(t,e,n){return vr(t,e,"",n)}s(to,"TransformDecode");l();var Gd=class Gd extends ne{constructor(e,n,r){super("The encoded value does not match the expected schema"),this.schema=e,this.value=n,this.error=r}};s(Gd,"TransformEncodeCheckError");var no=Gd,Hd=class Hd extends ne{constructor(e,n,r,i){super("".concat(i instanceof Error?i.message:"Unknown error")),this.schema=e,this.path=n,this.value=r,this.error=i}};s(Hd,"TransformEncodeError");var ns=Hd;function qt(t,e,n){try{return Je(t)?t[nt].Encode(n):n}catch(r){throw new ns(t,e,n,r)}}s(qt,"Default");function kC(t,e,n,r){let i=qt(t,n,r);return ae(i)?i.map((o,a)=>br(t.items,e,"".concat(n,"/").concat(a),o)):i}s(kC,"FromArray");function BC(t,e,n,r){let i=qt(t,n,r);if(!le(r)||Pt(r))return i;let o=_i(t),a=o.map(h=>h[0]),c=y({},i);for(let[h,g]of o)h in c&&(c[h]=br(g,e,"".concat(n,"/").concat(h),c[h]));if(!Je(t.unevaluatedProperties))return c;let f=Object.getOwnPropertyNames(c),d=t.unevaluatedProperties,p=y({},c);for(let h of f)a.includes(h)||(p[h]=qt(d,"".concat(n,"/").concat(h),p[h]));return p}s(BC,"FromIntersect");function zC(t,e,n,r){return qt(t.not,n,qt(t,n,r))}s(zC,"FromNot");function VC(t,e,n,r){let i=qt(t,n,r);if(!le(i))return i;let o=Et(t),a=y({},i);for(let p of o)re(a,p)&&(ot(a[p])&&(!Os(t.properties[p])||De.IsExactOptionalProperty(a,p))||(a[p]=br(t.properties[p],e,"".concat(n,"/").concat(p),a[p])));if(!Me(t.additionalProperties))return a;let c=Object.getOwnPropertyNames(a),f=t.additionalProperties,d=y({},a);for(let p of c)o.includes(p)||(d[p]=qt(f,"".concat(n,"/").concat(p),d[p]));return d}s(VC,"FromObject");function GC(t,e,n,r){let i=qt(t,n,r);if(!le(r))return i;let o=Object.getOwnPropertyNames(t.patternProperties)[0],a=new RegExp(o),c=y({},i);for(let h of Object.getOwnPropertyNames(r))a.test(h)&&(c[h]=br(t.patternProperties[o],e,"".concat(n,"/").concat(h),c[h]));if(!Me(t.additionalProperties))return c;let f=Object.getOwnPropertyNames(c),d=t.additionalProperties,p=y({},c);for(let h of f)a.test(h)||(p[h]=qt(d,"".concat(n,"/").concat(h),p[h]));return p}s(GC,"FromRecord");function HC(t,e,n,r){let i=Re(t,e),o=br(i,e,n,r);return qt(t,n,o)}s(HC,"FromRef");function $C(t,e,n,r){let i=Re(t,e),o=br(i,e,n,r);return qt(t,n,o)}s($C,"FromThis");function WC(t,e,n,r){let i=qt(t,n,r);return ae(t.items)?t.items.map((o,a)=>br(o,e,"".concat(n,"/").concat(a),i[a])):[]}s(WC,"FromTuple");function jC(t,e,n,r){for(let i of t.anyOf){if(!de(i,e,r))continue;let o=br(i,e,n,r);return qt(t,n,o)}for(let i of t.anyOf){let o=br(i,e,n,r);if(de(t,e,o))return qt(t,n,o)}return qt(t,n,r)}s(jC,"FromUnion");function br(t,e,n,r){let i=kn(t,e),o=t;switch(t[M]){case"Array":return kC(o,i,n,r);case"Intersect":return BC(o,i,n,r);case"Not":return zC(o,i,n,r);case"Object":return VC(o,i,n,r);case"Record":return GC(o,i,n,r);case"Ref":return HC(o,i,n,r);case"This":return $C(o,i,n,r);case"Tuple":return WC(o,i,n,r);case"Union":return jC(o,i,n,r);default:return qt(o,n,r)}}s(br,"Visit");function kc(t,e,n){return br(t,e,"",n)}s(kc,"TransformEncode");l();function XC(t,e){return Je(t)||It(t.items,e)}s(XC,"FromArray");function qC(t,e){return Je(t)||It(t.items,e)}s(qC,"FromAsyncIterator");function KC(t,e){return Je(t)||It(t.returns,e)||t.parameters.some(n=>It(n,e))}s(KC,"FromConstructor");function YC(t,e){return Je(t)||It(t.returns,e)||t.parameters.some(n=>It(n,e))}s(YC,"FromFunction");function ZC(t,e){return Je(t)||Je(t.unevaluatedProperties)||t.allOf.some(n=>It(n,e))}s(ZC,"FromIntersect");function JC(t,e){return Je(t)||It(t.items,e)}s(JC,"FromIterator");function QC(t,e){return Je(t)||It(t.not,e)}s(QC,"FromNot");function eP(t,e){return Je(t)||Object.values(t.properties).some(n=>It(n,e))||Me(t.additionalProperties)&&It(t.additionalProperties,e)}s(eP,"FromObject");function tP(t,e){return Je(t)||It(t.item,e)}s(tP,"FromPromise");function nP(t,e){let n=Object.getOwnPropertyNames(t.patternProperties)[0],r=t.patternProperties[n];return Je(t)||It(r,e)||Me(t.additionalProperties)&&Je(t.additionalProperties)}s(nP,"FromRecord");function rP(t,e){return Je(t)?!0:It(Re(t,e),e)}s(rP,"FromRef");function iP(t,e){return Je(t)?!0:It(Re(t,e),e)}s(iP,"FromThis");function sP(t,e){return Je(t)||!ot(t.items)&&t.items.some(n=>It(n,e))}s(sP,"FromTuple");function oP(t,e){return Je(t)||t.anyOf.some(n=>It(n,e))}s(oP,"FromUnion");function It(t,e){let n=kn(t,e),r=t;if(t.$id&&$d.has(t.$id))return!1;switch(t.$id&&$d.add(t.$id),t[M]){case"Array":return XC(r,n);case"AsyncIterator":return qC(r,n);case"Constructor":return KC(r,n);case"Function":return YC(r,n);case"Intersect":return ZC(r,n);case"Iterator":return JC(r,n);case"Not":return QC(r,n);case"Object":return eP(r,n);case"Promise":return tP(r,n);case"Record":return nP(r,n);case"Ref":return rP(r,n);case"This":return iP(r,n);case"Tuple":return sP(r,n);case"Union":return oP(r,n);default:return Je(t)}}s(It,"Visit");var $d=new Set;function Sr(t,e){return $d.clear(),It(t,e)}s(Sr,"HasTransform");function yy(...t){let[e,n,r]=t.length===3?[t[0],t[1],t[2]]:[t[0],[],t[1]];if(!de(e,n,r))throw new eo(e,r,yr(e,n,r).First());return Sr(e,n)?to(e,n,r):r}s(yy,"Decode");l();function Kr(t,e){let n=re(t,"default")?t.default:void 0,r=hi(n)?n():Ce(n);return ot(e)?r:le(e)&&le(r)?Object.assign(r,e):e}s(Kr,"ValueOrDefault");function Wd(t){return gi(t)&&"default"in t}s(Wd,"HasDefaultProperty");function aP(t,e,n){let r=Kr(t,n);if(!ae(r))return r;for(let i=0;i<r.length;i++)r[i]=Sn(t.items,e,r[i]);return r}s(aP,"FromArray");function cP(t,e,n){return Qt(n)?n:Kr(t,n)}s(cP,"FromDate");function lP(t,e,n){let r=Kr(t,n);return t.allOf.reduce((i,o)=>{let a=Sn(o,e,r);return le(a)?y(y({},i),a):a},{})}s(lP,"FromIntersect");function uP(t,e,n){let r=Kr(t,n);if(!le(r))return r;let i=Object.getOwnPropertyNames(t.properties);for(let o of i){let a=Sn(t.properties[o],e,r[o]);ot(a)||(r[o]=Sn(t.properties[o],e,r[o]))}if(!Wd(t.additionalProperties))return r;for(let o of Object.getOwnPropertyNames(r))i.includes(o)||(r[o]=Sn(t.additionalProperties,e,r[o]));return r}s(uP,"FromObject");function fP(t,e,n){let r=Kr(t,n);if(!le(r))return r;let i=t.additionalProperties,[o,a]=Object.entries(t.patternProperties)[0],c=new RegExp(o);for(let f of Object.getOwnPropertyNames(r))c.test(f)&&Wd(a)&&(r[f]=Sn(a,e,r[f]));if(!Wd(i))return r;for(let f of Object.getOwnPropertyNames(r))c.test(f)||(r[f]=Sn(i,e,r[f]));return r}s(fP,"FromRecord");function dP(t,e,n){return Sn(Re(t,e),e,Kr(t,n))}s(dP,"FromRef");function pP(t,e,n){return Sn(Re(t,e),e,n)}s(pP,"FromThis");function hP(t,e,n){let r=Kr(t,n);if(!ae(r)||ot(t.items))return r;let[i,o]=[t.items,Math.max(t.items.length,r.length)];for(let a=0;a<o;a++)a<i.length&&(r[a]=Sn(i[a],e,r[a]));return r}s(hP,"FromTuple");function mP(t,e,n){let r=Kr(t,n);for(let i of t.anyOf){let o=Sn(i,e,Ce(r));if(de(i,e,o))return o}return r}s(mP,"FromUnion");function Sn(t,e,n){let r=kn(t,e),i=t;switch(i[M]){case"Array":return aP(i,r,n);case"Date":return cP(i,r,n);case"Intersect":return lP(i,r,n);case"Object":return uP(i,r,n);case"Record":return fP(i,r,n);case"Ref":return dP(i,r,n);case"This":return pP(i,r,n);case"Tuple":return hP(i,r,n);case"Union":return mP(i,r,n);default:return Kr(i,n)}}s(Sn,"Visit");function Bc(...t){return t.length===3?Sn(t[0],t[1],t[2]):Sn(t[0],[],t[1])}s(Bc,"Default");l();l();var Vn={};ri(Vn,{Delete:()=>yP,Format:()=>ua,Get:()=>_P,Has:()=>xP,Set:()=>gP,ValuePointerRootDeleteError:()=>Vc,ValuePointerRootSetError:()=>zc});l();var jd=class jd extends ne{constructor(e,n,r){super("Cannot set root value"),this.value=e,this.path=n,this.update=r}};s(jd,"ValuePointerRootSetError");var zc=jd,Xd=class Xd extends ne{constructor(e,n){super("Cannot delete root value"),this.value=e,this.path=n}};s(Xd,"ValuePointerRootDeleteError");var Vc=Xd;function xy(t){return t.indexOf("~")===-1?t:t.replace(/~1/g,"/").replace(/~0/g,"~")}s(xy,"Escape");function*ua(t){if(t==="")return;let[e,n]=[0,0];for(let r=0;r<t.length;r++)t.charAt(r)==="/"?(r===0||(n=r,yield xy(t.slice(e,n))),e=r+1):n=r;yield xy(t.slice(e))}s(ua,"Format");function gP(t,e,n){if(e==="")throw new zc(t,e,n);let[r,i,o]=[null,t,""];for(let a of ua(e))i[a]===void 0&&(i[a]={}),r=i,i=i[a],o=a;r[o]=n}s(gP,"Set");function yP(t,e){if(e==="")throw new Vc(t,e);let[n,r,i]=[null,t,""];for(let o of ua(e)){if(r[o]===void 0||r[o]===null)return;n=r,r=r[o],i=o}if(Array.isArray(n)){let o=parseInt(i);n.splice(o,1)}else delete n[i]}s(yP,"Delete");function xP(t,e){if(e==="")return!0;let[n,r,i]=[null,t,""];for(let o of ua(e)){if(r[o]===void 0)return!1;n=r,r=r[o],i=o}return Object.getOwnPropertyNames(n).includes(i)}s(xP,"Has");function _P(t,e){if(e==="")return t;let n=t;for(let r of ua(e)){if(n[r]===void 0)return;n=n[r]}return n}s(_P,"Get");l();function vP(t,e){if(!le(e))return!1;let n=[...Object.keys(t),...Object.getOwnPropertySymbols(t)],r=[...Object.keys(e),...Object.getOwnPropertySymbols(e)];return n.length!==r.length?!1:n.every(i=>rs(t[i],e[i]))}s(vP,"ObjectType");function bP(t,e){return Qt(e)&&t.getTime()===e.getTime()}s(bP,"DateType");function SP(t,e){return!ae(e)||t.length!==e.length?!1:t.every((n,r)=>rs(n,e[r]))}s(SP,"ArrayType");function MP(t,e){return!Pn(e)||t.length!==e.length||Object.getPrototypeOf(t).constructor.name!==Object.getPrototypeOf(e).constructor.name?!1:t.every((n,r)=>rs(n,e[r]))}s(MP,"TypedArrayType");function wP(t,e){return t===e}s(wP,"ValueType");function rs(t,e){if(Qt(t))return bP(t,e);if(Pn(t))return MP(t,e);if(ae(t))return SP(t,e);if(le(t))return vP(t,e);if(Pt(t))return wP(t,e);throw new Error("ValueEquals: Unable to compare value")}s(rs,"Equal");var EP=je({type:Le("insert"),path:On(),value:jr()}),IP=je({type:Le("update"),path:On(),value:jr()}),TP=je({type:Le("delete"),path:On()}),vy=He([EP,IP,TP]),qd=class qd extends ne{constructor(e,n){super(n),this.value=e}};s(qd,"ValueDiffError");var Gc=qd;function Hc(t,e){return{type:"update",path:t,value:e}}s(Hc,"CreateUpdate");function by(t,e){return{type:"insert",path:t,value:e}}s(by,"CreateInsert");function Sy(t){return{type:"delete",path:t}}s(Sy,"CreateDelete");function _y(t){if(globalThis.Object.getOwnPropertySymbols(t).length>0)throw new Gc(t,"Cannot diff objects with symbols")}s(_y,"AssertDiffable");function*AP(t,e,n){if(_y(e),_y(n),!vf(n))return yield Hc(t,n);let r=globalThis.Object.getOwnPropertyNames(e),i=globalThis.Object.getOwnPropertyNames(n);for(let o of i)re(e,o)||(yield by("".concat(t,"/").concat(o),n[o]));for(let o of r)re(n,o)&&(rs(e,n)||(yield*C($c("".concat(t,"/").concat(o),e[o],n[o]))));for(let o of r)re(n,o)||(yield Sy("".concat(t,"/").concat(o)))}s(AP,"ObjectType");function*RP(t,e,n){if(!ae(n))return yield Hc(t,n);for(let r=0;r<Math.min(e.length,n.length);r++)yield*C($c("".concat(t,"/").concat(r),e[r],n[r]));for(let r=0;r<n.length;r++)r<e.length||(yield by("".concat(t,"/").concat(r),n[r]));for(let r=e.length-1;r>=0;r--)r<n.length||(yield Sy("".concat(t,"/").concat(r)))}s(RP,"ArrayType");function*CP(t,e,n){if(!Pn(n)||e.length!==n.length||globalThis.Object.getPrototypeOf(e).constructor.name!==globalThis.Object.getPrototypeOf(n).constructor.name)return yield Hc(t,n);for(let r=0;r<Math.min(e.length,n.length);r++)yield*C($c("".concat(t,"/").concat(r),e[r],n[r]))}s(CP,"TypedArrayType");function*PP(t,e,n){e!==n&&(yield Hc(t,n))}s(PP,"ValueType");function*$c(t,e,n){if(vf(e))return yield*C(AP(t,e,n));if(ae(e))return yield*C(RP(t,e,n));if(Pn(e))return yield*C(CP(t,e,n));if(Pt(e))return yield*C(PP(t,e,n));throw new Gc(e,"Unable to diff value")}s($c,"Visit");function My(t,e){return[...$c("",t,e)]}s(My,"Diff");function FP(t){return t.length>0&&t[0].path===""&&t[0].type==="update"}s(FP,"IsRootUpdate");function OP(t){return t.length===0}s(OP,"IsIdentity");function wy(t,e){if(FP(e))return Ce(e[0].value);if(OP(e))return Ce(t);let n=Ce(t);for(let r of e)switch(r.type){case"insert":{Vn.Set(n,r.path,r.value);break}case"update":{Vn.Set(n,r.path,r.value);break}case"delete":{Vn.Delete(n,r.path);break}}return n}s(wy,"Patch");l();function Ey(...t){let[e,n,r]=t.length===3?[t[0],t[1],t[2]]:[t[0],[],t[1]],i=Sr(e,n)?kc(e,n,r):r;if(!de(e,n,i))throw new no(e,i,yr(e,n,i).First());return i}s(Ey,"Encode");l();var Yd=class Yd extends ne{constructor(e){super(e)}};s(Yd,"ValueMutateError");var Wc=Yd;function LP(t,e,n,r){if(!le(n))Vn.Set(t,e,Ce(r));else{let i=Object.getOwnPropertyNames(n),o=Object.getOwnPropertyNames(r);for(let a of i)o.includes(a)||delete n[a];for(let a of o)i.includes(a)||(n[a]=null);for(let a of o)Kd(t,"".concat(e,"/").concat(a),n[a],r[a])}}s(LP,"ObjectType");function NP(t,e,n,r){if(!ae(n))Vn.Set(t,e,Ce(r));else{for(let i=0;i<r.length;i++)Kd(t,"".concat(e,"/").concat(i),n[i],r[i]);n.splice(r.length)}}s(NP,"ArrayType");function UP(t,e,n,r){if(Pn(n)&&n.length===r.length)for(let i=0;i<n.length;i++)n[i]=r[i];else Vn.Set(t,e,Ce(r))}s(UP,"TypedArrayType");function DP(t,e,n,r){n!==r&&Vn.Set(t,e,r)}s(DP,"ValueType");function Kd(t,e,n,r){if(ae(r))return NP(t,e,n,r);if(Pn(r))return UP(t,e,n,r);if(le(r))return LP(t,e,n,r);if(Pt(r))return DP(t,e,n,r)}s(Kd,"Visit");function Iy(t){return Pn(t)||Pt(t)}s(Iy,"IsNonMutableValue");function kP(t,e){return le(t)&&ae(e)||ae(t)&&le(e)}s(kP,"IsMismatchedValue");function Ty(t,e){if(Iy(t)||Iy(e))throw new Wc("Only object and array types can be mutated at the root level");if(kP(t,e))throw new Wc("Cannot assign due type mismatch of assignable values");Kd(t,"",t,e)}s(Ty,"Mutate");l();var BP=[(t,e,n)=>Ce(n),(t,e,n)=>Bc(t,e,n),(t,e,n)=>Nc(t,e,n),(t,e,n)=>Dc(t,e,n),(t,e,n)=>(Oc(t,e,n),n),(t,e,n)=>Sr(t,e)?to(t,e,n):n];function Ay(t,e,n){return BP.reduce((r,i)=>i(t,e,r),n)}s(Ay,"ParseValue");function Ry(...t){return t.length===3?Ay(t[0],t[1],t[2]):Ay(t[0],[],t[1])}s(Ry,"Parse");l();var Gn={};ri(Gn,{Assert:()=>Oc,Cast:()=>kd,Check:()=>de,Clean:()=>Nc,Clone:()=>Ce,Convert:()=>Dc,Create:()=>zn,Decode:()=>yy,Default:()=>Bc,Diff:()=>My,Edit:()=>vy,Encode:()=>Ey,Equal:()=>rs,Errors:()=>yr,Hash:()=>Si,Mutate:()=>Ty,Parse:()=>Ry,Patch:()=>wy,ValueErrorIterator:()=>Bn});l();l();var Cy={},zP=s(function(t,e,n,r,i){var o=new Worker(Cy[e]||(Cy[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(a){var c=a.data,f=c.$e$;if(f){var d=new Error(f[0]);d.code=f[1],d.stack=f[2],i(d,null)}else i(null,c)},o.postMessage(n,r),o},"wk"),Xe=Uint8Array,rn=Uint16Array,ha=Int32Array,ao=new Xe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),co=new Xe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),fa=new Xe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Oy=s(function(t,e){for(var n=new rn(31),r=0;r<31;++r)n[r]=e+=1<<t[r-1];for(var i=new ha(n[30]),r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return{b:n,r:i}},"freb"),Ly=Oy(ao,2),np=Ly.b,Yc=Ly.r;np[28]=258,Yc[258]=28;var Ny=Oy(co,0),Uy=Ny.b,Jd=Ny.r,da=new rn(32768);for(Ue=0;Ue<32768;++Ue)Yr=(Ue&43690)>>1|(Ue&21845)<<1,Yr=(Yr&52428)>>2|(Yr&13107)<<2,Yr=(Yr&61680)>>4|(Yr&3855)<<4,da[Ue]=((Yr&65280)>>8|(Yr&255)<<8)>>1;var Yr,Ue,$n=s(function(t,e,n){for(var r=t.length,i=0,o=new rn(e);i<r;++i)t[i]&&++o[t[i]-1];var a=new rn(e);for(i=1;i<e;++i)a[i]=a[i-1]+o[i-1]<<1;var c;if(n){c=new rn(1<<e);var f=15-e;for(i=0;i<r;++i)if(t[i])for(var d=i<<4|t[i],p=e-t[i],h=a[t[i]-1]++<<p,g=h|(1<<p)-1;h<=g;++h)c[da[h]>>f]=d}else for(c=new rn(r),i=0;i<r;++i)t[i]&&(c[i]=da[a[t[i]-1]++]>>15-t[i]);return c},"hMap"),Zr=new Xe(288);for(Ue=0;Ue<144;++Ue)Zr[Ue]=8;var Ue;for(Ue=144;Ue<256;++Ue)Zr[Ue]=9;var Ue;for(Ue=256;Ue<280;++Ue)Zr[Ue]=7;var Ue;for(Ue=280;Ue<288;++Ue)Zr[Ue]=8;var Ue,so=new Xe(32);for(Ue=0;Ue<32;++Ue)so[Ue]=5;var Ue,Dy=$n(Zr,9,0),ky=$n(Zr,9,1),By=$n(so,5,0),zy=$n(so,5,1),Xc=s(function(t){for(var e=t[0],n=1;n<t.length;++n)t[n]>e&&(e=t[n]);return e},"max"),Hn=s(function(t,e,n){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&n},"bits"),qc=s(function(t,e){var n=e/8|0;return(t[n]|t[n+1]<<8|t[n+2]<<16)>>(e&7)},"bits16"),ma=s(function(t){return(t+7)/8|0},"shft"),Mi=s(function(t,e,n){return(e==null||e<0)&&(e=0),(n==null||n>t.length)&&(n=t.length),new Xe(t.subarray(e,n))},"slc"),el={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Vy=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ct=s(function(t,e,n){var r=new Error(e||Vy[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,ct),!n)throw r;return r},"err"),Gy=s(function(t,e,n,r){var i=t.length,o=r?r.length:0;if(!i||e.f&&!e.l)return n||new Xe(0);var a=!n,c=a||e.i!=2,f=e.i;a&&(n=new Xe(i*3));var d=s(function(S){var J=n.length;if(S>J){var B=new Xe(Math.max(J*2,S));B.set(n),n=B}},"cbuf"),p=e.f||0,h=e.p||0,g=e.b||0,x=e.l,b=e.d,E=e.m,R=e.n,A=i*8;do{if(!x){p=Hn(t,h,1);var Q=Hn(t,h+1,3);if(h+=3,Q)if(Q==1)x=ky,b=zy,E=9,R=5;else if(Q==2){var ie=Hn(t,h,31)+257,X=Hn(t,h+10,15)+4,Z=ie+Hn(t,h+5,31)+1;h+=14;for(var q=new Xe(Z),ve=new Xe(19),he=0;he<X;++he)ve[fa[he]]=Hn(t,h+he*3,7);h+=X*3;for(var Oe=Xc(ve),mt=(1<<Oe)-1,Be=$n(ve,Oe,1),he=0;he<Z;){var ze=Be[Hn(t,h,mt)];h+=ze&15;var W=ze>>4;if(W<16)q[he++]=W;else{var L=0,ee=0;for(W==16?(ee=3+Hn(t,h,3),h+=2,L=q[he-1]):W==17?(ee=3+Hn(t,h,7),h+=3):W==18&&(ee=11+Hn(t,h,127),h+=7);ee--;)q[he++]=L}}var ce=q.subarray(0,ie),se=q.subarray(ie);E=Xc(ce),R=Xc(se),x=$n(ce,E,1),b=$n(se,R,1)}else ct(1);else{var W=ma(h)+4,F=t[W-4]|t[W-3]<<8,H=W+F;if(H>i){f&&ct(0);break}c&&d(g+F),n.set(t.subarray(W,H),g),e.b=g+=F,e.p=h=H*8,e.f=p;continue}if(h>A){f&&ct(0);break}}c&&d(g+131072);for(var Ee=(1<<E)-1,ut=(1<<R)-1,kt=h;;kt=h){var L=x[qc(t,h)&Ee],Bt=L>>4;if(h+=L&15,h>A){f&&ct(0);break}if(L||ct(2),Bt<256)n[g++]=Bt;else if(Bt==256){kt=h,x=null;break}else{var wt=Bt-254;if(Bt>264){var he=Bt-257,Qe=ao[he];wt=Hn(t,h,(1<<Qe)-1)+np[he],h+=Qe}var En=b[qc(t,h)&ut],Tr=En>>4;En||ct(3),h+=En&15;var se=Uy[Tr];if(Tr>3){var Qe=co[Tr];se+=qc(t,h)&(1<<Qe)-1,h+=Qe}if(h>A){f&&ct(0);break}c&&d(g+131072);var ni=g+wt;if(g<se){var v=o-se,k=Math.min(se,ni);for(v+g<0&&ct(3);g<k;++g)n[g]=r[v+g]}for(;g<ni;++g)n[g]=n[g-se]}}e.l=x,e.p=kt,e.b=g,e.f=p,x&&(p=1,e.m=E,e.d=b,e.n=R)}while(!p);return g!=n.length&&a?Mi(n,0,g):n.subarray(0,g)},"inflt"),Mr=s(function(t,e,n){n<<=e&7;var r=e/8|0;t[r]|=n,t[r+1]|=n>>8},"wbits"),ro=s(function(t,e,n){n<<=e&7;var r=e/8|0;t[r]|=n,t[r+1]|=n>>8,t[r+2]|=n>>16},"wbits16"),Kc=s(function(t,e){for(var n=[],r=0;r<t.length;++r)t[r]&&n.push({s:r,f:t[r]});var i=n.length,o=n.slice();if(!i)return{t:ip,l:0};if(i==1){var a=new Xe(n[0].s+1);return a[n[0].s]=1,{t:a,l:1}}n.sort(function(H,ie){return H.f-ie.f}),n.push({s:-1,f:25001});var c=n[0],f=n[1],d=0,p=1,h=2;for(n[0]={s:-1,f:c.f+f.f,l:c,r:f};p!=i-1;)c=n[n[d].f<n[h].f?d++:h++],f=n[d!=p&&n[d].f<n[h].f?d++:h++],n[p++]={s:-1,f:c.f+f.f,l:c,r:f};for(var g=o[0].s,r=1;r<i;++r)o[r].s>g&&(g=o[r].s);var x=new rn(g+1),b=Zc(n[p-1],x,0);if(b>e){var r=0,E=0,R=b-e,A=1<<R;for(o.sort(function(ie,X){return x[X.s]-x[ie.s]||ie.f-X.f});r<i;++r){var Q=o[r].s;if(x[Q]>e)E+=A-(1<<b-x[Q]),x[Q]=e;else break}for(E>>=R;E>0;){var W=o[r].s;x[W]<e?E-=1<<e-x[W]++-1:++r}for(;r>=0&&E;--r){var F=o[r].s;x[F]==e&&(--x[F],++E)}b=e}return{t:new Xe(x),l:b}},"hTree"),Zc=s(function(t,e,n){return t.s==-1?Math.max(Zc(t.l,e,n+1),Zc(t.r,e,n+1)):e[t.s]=n},"ln"),Qd=s(function(t){for(var e=t.length;e&&!t[--e];);for(var n=new rn(++e),r=0,i=t[0],o=1,a=s(function(f){n[r++]=f},"w"),c=1;c<=e;++c)if(t[c]==i&&c!=e)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=t[c]}return{c:n.subarray(0,r),n:e}},"lc"),io=s(function(t,e){for(var n=0,r=0;r<e.length;++r)n+=t[r]*e[r];return n},"clen"),rp=s(function(t,e,n){var r=n.length,i=ma(e+2);t[i]=r&255,t[i+1]=r>>8,t[i+2]=t[i]^255,t[i+3]=t[i+1]^255;for(var o=0;o<r;++o)t[i+o+4]=n[o];return(i+4+r)*8},"wfblk"),ep=s(function(t,e,n,r,i,o,a,c,f,d,p){Mr(e,p++,n),++i[256];for(var h=Kc(i,15),g=h.t,x=h.l,b=Kc(o,15),E=b.t,R=b.l,A=Qd(g),Q=A.c,W=A.n,F=Qd(E),H=F.c,ie=F.n,X=new rn(19),Z=0;Z<Q.length;++Z)++X[Q[Z]&31];for(var Z=0;Z<H.length;++Z)++X[H[Z]&31];for(var q=Kc(X,7),ve=q.t,he=q.l,Oe=19;Oe>4&&!ve[fa[Oe-1]];--Oe);var mt=d+5<<3,Be=io(i,Zr)+io(o,so)+a,ze=io(i,g)+io(o,E)+a+14+3*Oe+io(X,ve)+2*X[16]+3*X[17]+7*X[18];if(f>=0&&mt<=Be&&mt<=ze)return rp(e,p,t.subarray(f,f+d));var L,ee,ce,se;if(Mr(e,p,1+(ze<Be)),p+=2,ze<Be){L=$n(g,x,0),ee=g,ce=$n(E,R,0),se=E;var Ee=$n(ve,he,0);Mr(e,p,W-257),Mr(e,p+5,ie-1),Mr(e,p+10,Oe-4),p+=14;for(var Z=0;Z<Oe;++Z)Mr(e,p+3*Z,ve[fa[Z]]);p+=3*Oe;for(var ut=[Q,H],kt=0;kt<2;++kt)for(var Bt=ut[kt],Z=0;Z<Bt.length;++Z){var wt=Bt[Z]&31;Mr(e,p,Ee[wt]),p+=ve[wt],wt>15&&(Mr(e,p,Bt[Z]>>5&127),p+=Bt[Z]>>12)}}else L=Dy,ee=Zr,ce=By,se=so;for(var Z=0;Z<c;++Z){var Qe=r[Z];if(Qe>255){var wt=Qe>>18&31;ro(e,p,L[wt+257]),p+=ee[wt+257],wt>7&&(Mr(e,p,Qe>>23&31),p+=ao[wt]);var En=Qe&31;ro(e,p,ce[En]),p+=se[En],En>3&&(ro(e,p,Qe>>5&8191),p+=co[En])}else ro(e,p,L[Qe]),p+=ee[Qe]}return ro(e,p,L[256]),p+ee[256]},"wblk"),Hy=new ha([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ip=new Xe(0),$y=s(function(t,e,n,r,i,o){var a=o.z||t.length,c=new Xe(r+a+5*(1+Math.ceil(a/7e3))+i),f=c.subarray(r,c.length-i),d=o.l,p=(o.r||0)&7;if(e){p&&(f[0]=o.r>>3);for(var h=Hy[e-1],g=h>>13,x=h&8191,b=(1<<n)-1,E=o.p||new rn(32768),R=o.h||new rn(b+1),A=Math.ceil(n/3),Q=2*A,W=s(function(j){return(t[j]^t[j+1]<<A^t[j+2]<<Q)&b},"hsh"),F=new ha(25e3),H=new rn(288),ie=new rn(32),X=0,Z=0,q=o.i||0,ve=0,he=o.w||0,Oe=0;q+2<a;++q){var mt=W(q),Be=q&32767,ze=R[mt];if(E[Be]=ze,R[mt]=Be,he<=q){var L=a-q;if((X>7e3||ve>24576)&&(L>423||!d)){p=ep(t,f,0,F,H,ie,Z,ve,Oe,q-Oe,p),ve=X=Z=0,Oe=q;for(var ee=0;ee<286;++ee)H[ee]=0;for(var ee=0;ee<30;++ee)ie[ee]=0}var ce=2,se=0,Ee=x,ut=Be-ze&32767;if(L>2&&mt==W(q-ut))for(var kt=Math.min(g,L)-1,Bt=Math.min(32767,q),wt=Math.min(258,L);ut<=Bt&&--Ee&&Be!=ze;){if(t[q+ce]==t[q+ce-ut]){for(var Qe=0;Qe<wt&&t[q+Qe]==t[q+Qe-ut];++Qe);if(Qe>ce){if(ce=Qe,se=ut,Qe>kt)break;for(var En=Math.min(ut,Qe-2),Tr=0,ee=0;ee<En;++ee){var ni=q-ut+ee&32767,v=E[ni],k=ni-v&32767;k>Tr&&(Tr=k,ze=ni)}}}Be=ze,ze=E[Be],ut+=Be-ze&32767}if(se){F[ve++]=268435456|Yc[ce]<<18|Jd[se];var S=Yc[ce]&31,J=Jd[se]&31;Z+=ao[S]+co[J],++H[257+S],++ie[J],he=q+ce,++X}else F[ve++]=t[q],++H[t[q]]}}for(q=Math.max(q,he);q<a;++q)F[ve++]=t[q],++H[t[q]];p=ep(t,f,d,F,H,ie,Z,ve,Oe,q-Oe,p),d||(o.r=p&7|f[p/8|0]<<3,p-=7,o.h=R,o.p=E,o.i=q,o.w=he)}else{for(var q=o.w||0;q<a+d;q+=65535){var B=q+65535;B>=a&&(f[p/8|0]=d,B=a),p=rp(f,p+1,t.subarray(q,B))}o.i=a}return Mi(c,0,r+ma(p)+i)},"dflt"),VP=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var n=e,r=9;--r;)n=(n&1&&-306674912)^n>>>1;t[e]=n}return t}(),Wy=s(function(){var t=-1;return{p:s(function(e){for(var n=t,r=0;r<e.length;++r)n=VP[n&255^e[r]]^n>>>8;t=n},"p"),d:s(function(){return~t},"d")}},"crc");var jy=s(function(t,e,n,r,i){if(!i&&(i={l:1},e.dictionary)){var o=e.dictionary.subarray(-32768),a=new Xe(o.length+t.length);a.set(o),a.set(t,o.length),t=a,i.w=o.length}return $y(t,e.level==null?6:e.level,e.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,n,r,i)},"dopt"),tl=s(function(t,e){var n={};for(var r in t)n[r]=t[r];for(var r in e)n[r]=e[r];return n},"mrg"),Py=s(function(t,e,n){for(var r=t(),i=t.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<r.length;++a){var c=r[a],f=o[a];if(typeof c=="function"){e+=";"+f+"=";var d=c.toString();if(c.prototype)if(d.indexOf("[native code]")!=-1){var p=d.indexOf(" ",8)+1;e+=d.slice(p,d.indexOf("(",p))}else{e+=d;for(var h in c.prototype)e+=";"+f+".prototype."+h+"="+c.prototype[h].toString()}else e+=d}else n[f]=c}return e},"wcln"),jc=[],GP=s(function(t){var e=[];for(var n in t)t[n].buffer&&e.push((t[n]=new t[n].constructor(t[n])).buffer);return e},"cbfs"),HP=s(function(t,e,n,r){if(!jc[n]){for(var i="",o={},a=t.length-1,c=0;c<a;++c)i=Py(t[c],i,o);jc[n]={c:Py(t[a],i,o),e:o}}var f=tl({},jc[n].e);return zP(jc[n].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",n,f,GP(f),r)},"wrkr"),$P=s(function(){return[Xe,rn,ha,ao,co,fa,np,Uy,ky,zy,da,Vy,$n,Xc,Hn,qc,ma,Mi,ct,Gy,il,nl,Xy]},"bInflt"),WP=s(function(){return[Xe,rn,ha,ao,co,fa,Yc,Jd,Dy,Zr,By,so,da,Hy,ip,$n,Mr,ro,Kc,Zc,Qd,io,rp,ep,ma,Mi,$y,jy,rl,nl]},"bDflt");var nl=s(function(t){return postMessage(t,[t.buffer])},"pbf"),Xy=s(function(t){return t&&{out:t.size&&new Xe(t.size),dictionary:t.dictionary}},"gopt"),qy=s(function(t,e,n,r,i,o){var a=HP(n,r,i,function(c,f){a.terminate(),o(c,f)});return a.postMessage([t,e],e.consume?[t.buffer]:[]),function(){a.terminate()}},"cbify");var nr=s(function(t,e){return t[e]|t[e+1]<<8},"b2"),Ut=s(function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},"b4"),Zd=s(function(t,e){return Ut(t,e)+Ut(t,e+4)*4294967296},"b8"),Nt=s(function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},"wbytes");function jP(t,e,n){return n||(n=e,e={}),typeof n!="function"&&ct(7),qy(t,e,[WP],function(r){return nl(rl(r.data[0],r.data[1]))},0,n)}s(jP,"deflate");function rl(t,e){return jy(t,e||{},0,0)}s(rl,"deflateSync");function XP(t,e,n){return n||(n=e,e={}),typeof n!="function"&&ct(7),qy(t,e,[$P],function(r){return nl(il(r.data[0],Xy(r.data[1])))},1,n)}s(XP,"inflate");function il(t,e){return Gy(t,{i:2},e&&e.out,e&&e.dictionary)}s(il,"inflateSync");var sp=s(function(t,e,n,r){for(var i in t){var o=t[i],a=e+i,c=r;Array.isArray(o)&&(c=tl(r,o[1]),o=o[0]),o instanceof Xe?n[a]=[o,c]:(n[a+="/"]=[new Xe(0),c],sp(o,a,n,r))}},"fltn"),Fy=typeof TextEncoder<"u"&&new TextEncoder,tp=typeof TextDecoder<"u"&&new TextDecoder,qP=0;try{tp.decode(ip,{stream:!0}),qP=1}catch(t){}var KP=s(function(t){for(var e="",n=0;;){var r=t[n++],i=(r>127)+(r>223)+(r>239);if(n+i>t.length)return{s:e,r:Mi(t,n-1)};i?i==3?(r=((r&15)<<18|(t[n++]&63)<<12|(t[n++]&63)<<6|t[n++]&63)-65536,e+=String.fromCharCode(55296|r>>10,56320|r&1023)):i&1?e+=String.fromCharCode((r&31)<<6|t[n++]&63):e+=String.fromCharCode((r&15)<<12|(t[n++]&63)<<6|t[n++]&63):e+=String.fromCharCode(r)}},"dutf8");function oo(t,e){if(e){for(var n=new Xe(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}if(Fy)return Fy.encode(t);for(var i=t.length,o=new Xe(t.length+(t.length>>1)),a=0,c=s(function(p){o[a++]=p},"w"),r=0;r<i;++r){if(a+5>o.length){var f=new Xe(a+8+(i-r<<1));f.set(o),o=f}var d=t.charCodeAt(r);d<128||e?c(d):d<2048?(c(192|d>>6),c(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|t.charCodeAt(++r)&1023,c(240|d>>18),c(128|d>>12&63),c(128|d>>6&63),c(128|d&63)):(c(224|d>>12),c(128|d>>6&63),c(128|d&63))}return Mi(o,0,a)}s(oo,"strToU8");function op(t,e){if(e){for(var n="",r=0;r<t.length;r+=16384)n+=String.fromCharCode.apply(null,t.subarray(r,r+16384));return n}else{if(tp)return tp.decode(t);var i=KP(t),o=i.s,n=i.r;return n.length&&ct(8),o}}s(op,"strFromU8");var Ky=s(function(t,e){return e+30+nr(t,e+26)+nr(t,e+28)},"slzh"),Yy=s(function(t,e,n){var r=nr(t,e+28),i=op(t.subarray(e+46,e+46+r),!(nr(t,e+8)&2048)),o=e+46+r,a=Ut(t,e+20),c=n&&a==4294967295?YP(t,o):[a,Ut(t,e+24),Ut(t,e+42)],f=c[0],d=c[1],p=c[2];return[nr(t,e+10),f,d,i,o+nr(t,e+30)+nr(t,e+32),p]},"zh"),YP=s(function(t,e){for(;nr(t,e)!=1;e+=4+nr(t,e+2));return[Zd(t,e+12),Zd(t,e+4),Zd(t,e+20)]},"z64e"),pa=s(function(t){var e=0;if(t)for(var n in t){var r=t[n].length;r>65535&&ct(9),e+=r+4}return e},"exfl"),Jc=s(function(t,e,n,r,i,o,a,c){var f=r.length,d=n.extra,p=c&&c.length,h=pa(d);Nt(t,e,a!=null?33639248:67324752),e+=4,a!=null&&(t[e++]=20,t[e++]=n.os),t[e]=20,e+=2,t[e++]=n.flag<<1|(o<0&&8),t[e++]=i&&8,t[e++]=n.compression&255,t[e++]=n.compression>>8;var g=new Date(n.mtime==null?Date.now():n.mtime),x=g.getFullYear()-1980;if((x<0||x>119)&&ct(10),Nt(t,e,x<<25|g.getMonth()+1<<21|g.getDate()<<16|g.getHours()<<11|g.getMinutes()<<5|g.getSeconds()>>1),e+=4,o!=-1&&(Nt(t,e,n.crc),Nt(t,e+4,o<0?-o-2:o),Nt(t,e+8,n.size)),Nt(t,e+12,f),Nt(t,e+14,h),e+=16,a!=null&&(Nt(t,e,p),Nt(t,e+6,n.attrs),Nt(t,e+10,a),e+=14),t.set(r,e),e+=f,h)for(var b in d){var E=d[b],R=E.length;Nt(t,e,+b),Nt(t,e+2,R),t.set(E,e+4),e+=4+R}return p&&(t.set(c,e),e+=p),e},"wzh"),Zy=s(function(t,e,n,r,i){Nt(t,e,101010256),Nt(t,e+8,n),Nt(t,e+10,n),Nt(t,e+12,r),Nt(t,e+16,i)},"wzf");function Jy(t,e,n){n||(n=e,e={}),typeof n!="function"&&ct(7);var r={};sp(t,"",r,e);var i=Object.keys(r),o=i.length,a=0,c=0,f=o,d=new Array(o),p=[],h=s(function(){for(var R=0;R<p.length;++R)p[R]()},"tAll"),g=s(function(R,A){Qc(function(){n(R,A)})},"cbd");Qc(function(){g=n});var x=s(function(){var R=new Xe(c+22),A=a,Q=c-a;c=0;for(var W=0;W<f;++W){var F=d[W];try{var H=F.c.length;Jc(R,c,F,F.f,F.u,H);var ie=30+F.f.length+pa(F.extra),X=c+ie;R.set(F.c,X),Jc(R,a,F,F.f,F.u,H,c,F.m),a+=16+ie+(F.m?F.m.length:0),c=X+H}catch(Z){return g(Z,null)}}Zy(R,a,d.length,Q,A),g(null,R)},"cbf");o||x();for(var b=s(function(R){var A=i[R],Q=r[A],W=Q[0],F=Q[1],H=Wy(),ie=W.length;H.p(W);var X=oo(A),Z=X.length,q=F.comment,ve=q&&oo(q),he=ve&&ve.length,Oe=pa(F.extra),mt=F.level==0?0:8,Be=s(function(ze,L){if(ze)h(),g(ze,null);else{var ee=L.length;d[R]=tl(F,{size:ie,crc:H.d(),c:L,f:X,m:ve,u:Z!=A.length||ve&&q.length!=he,compression:mt}),a+=30+Z+Oe+ee,c+=76+2*(Z+Oe)+(he||0)+ee,--o||x()}},"cbl");if(Z>65535&&Be(ct(11,0,1),null),!mt)Be(null,W);else if(ie<16e4)try{Be(null,rl(W,F))}catch(ze){Be(ze,null)}else p.push(jP(W,F,Be))},"_loop_1"),E=0;E<f;++E)b(E);return h}s(Jy,"zip");function Qy(t,e){e||(e={});var n={},r=[];sp(t,"",n,e);var i=0,o=0;for(var a in n){var c=n[a],f=c[0],d=c[1],p=d.level==0?0:8,h=oo(a),g=h.length,x=d.comment,b=x&&oo(x),E=b&&b.length,R=pa(d.extra);g>65535&&ct(11);var A=p?rl(f,d):f,Q=A.length,W=Wy();W.p(f),r.push(tl(d,{size:f.length,crc:W.d(),c:A,f:h,m:b,u:g!=a.length||b&&x.length!=E,o:i,compression:p})),i+=30+g+R+Q,o+=76+2*(g+R)+(E||0)+Q}for(var F=new Xe(o+22),H=i,ie=o-i,X=0;X<r.length;++X){var h=r[X];Jc(F,h.o,h,h.f,h.u,h.c.length);var Z=30+h.f.length+pa(h.extra);F.set(h.c,h.o+Z),Jc(F,i,h,h.f,h.u,h.c.length,h.o,h.m),i+=16+Z+(h.m?h.m.length:0)}return Zy(F,i,r.length,ie,H),F}s(Qy,"zipSync");var Qc=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(t){t()};function ex(t,e,n){n||(n=e,e={}),typeof n!="function"&&ct(7);var r=[],i=s(function(){for(var R=0;R<r.length;++R)r[R]()},"tAll"),o={},a=s(function(R,A){Qc(function(){n(R,A)})},"cbd");Qc(function(){a=n});for(var c=t.length-22;Ut(t,c)!=101010256;--c)if(!c||t.length-c>65558)return a(ct(13,0,1),null),i;var f=nr(t,c+8);if(f){var d=f,p=Ut(t,c+16),h=p==4294967295||d==65535;if(h){var g=Ut(t,c-12);h=Ut(t,g)==101075792,h&&(d=f=Ut(t,g+32),p=Ut(t,g+48))}for(var x=e&&e.filter,b=s(function(R){var A=Yy(t,p,h),Q=A[0],W=A[1],F=A[2],H=A[3],ie=A[4],X=A[5],Z=Ky(t,X);p=ie;var q=s(function(he,Oe){he?(i(),a(he,null)):(Oe&&(o[H]=Oe),--f||a(null,o))},"cbl");if(!x||x({name:H,size:W,originalSize:F,compression:Q}))if(!Q)q(null,Mi(t,Z,Z+W));else if(Q==8){var ve=t.subarray(Z,Z+W);if(F<524288||W>.8*F)try{q(null,il(ve,{out:new Xe(F)}))}catch(he){q(he,null)}else r.push(XP(ve,{size:F},q))}else q(ct(14,"unknown compression type "+Q,1),null);else q(null,null)},"_loop_3"),E=0;E<d;++E)b(E)}else a(null,{});return i}s(ex,"unzip");function tx(t,e){for(var n={},r=t.length-22;Ut(t,r)!=101010256;--r)(!r||t.length-r>65558)&&ct(13);var i=nr(t,r+8);if(!i)return{};var o=Ut(t,r+16),a=o==4294967295||i==65535;if(a){var c=Ut(t,r-12);a=Ut(t,c)==101075792,a&&(i=Ut(t,c+32),o=Ut(t,c+48))}for(var f=e&&e.filter,d=0;d<i;++d){var p=Yy(t,o,a),h=p[0],g=p[1],x=p[2],b=p[3],E=p[4],R=p[5],A=Ky(t,R);o=E,(!f||f({name:b,size:g,originalSize:x,compression:h}))&&(h?h==8?n[b]=il(t.subarray(A,A+g),{out:new Xe(x)}):ct(14,"unknown compression type "+h):n[b]=Mi(t,A,A+g))}return n}s(tx,"unzipSync");l();var ZP=s(t=>{if(t!=null)return t.trim()===""?void 0:t},"maybePath"),JP=s(t=>t!=null,"notNull"),sl=s((t,e,n=0)=>{var r;if(_.IsNull(t))return"null";if(_.IsUndefined(t))return"undefined";if(_.IsString(t))return"<string>";if(_.IsNumber(t))return"<number>";if(_.IsBoolean(t))return"<boolean>";if(_.IsLiteral(t))return typeof t.const=="string"?"'".concat(t.const,"'"):"".concat(t.const);if(_.IsRef(t)){let i=e.find(o=>o.$id===t.$ref);return i==null?t.$ref:sl(i,e,n)}if(_.IsArray(t))return"".concat(sl(t.items,e,n+1),"[]");if(_.IsUnion(t)&&(!(t.anyOf.length>5)||t.$id==null)){let o="".concat(t.anyOf.map(a=>sl(a,e,n+1)).filter(JP).join(" | "));return n>0?"(".concat(o,")"):o}return(r=t.$id)!=null?r:""},"resolveSchemaIdent"),QP=s((t,e,n)=>{var o;let r=e.message;_.IsUnion(e.schema)&&(r="Expected one of: ".concat(sl(e.schema,n)));let i="#/definitions/".concat(t).concat((o=ZP(e.path))!=null?o:"");return"".concat(i,": ").concat(r)},"errorHandler"),ol=s((t,e,n)=>{let r=e.First();if(r!=null)return QP(t,r,n)},"shortError");var lo;(function(t){t.Archive="Archive",t.Validate="Validate",t.Encode="Encode",t.Unknown="Unknown"})(lo||(lo={}));var ap=class ap extends Error{constructor(n,r){super(r);qe(this,"name");qe(this,"kind");this.name="CompressError",this.kind=n}};s(ap,"CompressError");var uo=ap,eF=s(t=>new uo(lo.Archive,t.message),"flateErrorIntoCompressError"),tF=s(t=>{let e=Object.values(el);return t instanceof Error&&"code"in t&&typeof t.code=="number"&&e.includes(t.code)},"isFlateError"),nF=s((t,e,n)=>{var r;return new uo(lo.Validate,(r=ol(t,e,n))!=null?r:"Unknown validate error")},"checkErrorIntoCompressError"),rF=s(t=>new uo(lo.Encode,t.message),"encodeErrorIntoCompressError"),iF=s(t=>new uo(lo.Unknown,t instanceof Error?t.message:String(t)),"unknownErrorIntoCompressError"),ga=s((t,e,n)=>e instanceof ns?rF(e):e instanceof Bn?nF(t,e,n):tF(e)?eF(e):iF(e),"intoCompressError");l();var fo;(function(t){t.Unarchive="Unarchive",t.Validate="Validate",t.Decode="Decode",t.Unknown="Unknown"})(fo||(fo={}));var cp=class cp extends Error{constructor(n,r){super(r);qe(this,"name");qe(this,"kind");this.name="DecompressError",this.kind=n}};s(cp,"DecompressError");var po=cp,sF=s(t=>new po(fo.Unarchive,t.message),"flateErrorIntoDecompressError"),oF=s(t=>{let e=Object.values(el);return t instanceof Error&&"code"in t&&typeof t.code=="number"&&e.includes(t.code)},"isFlateError"),aF=s((t,e,n)=>{var r;return new po(fo.Validate,(r=ol(t,e,n))!=null?r:"Unknown validate error")},"checkErrorIntoDecompressError"),cF=s(t=>new po(fo.Decode,t.message),"decodeErrorIntoDecompressError"),lF=s(t=>new po(fo.Unknown,t instanceof Error?t.message:String(t)),"unknownErrorIntoDecompressError"),ya=s((t,e,n)=>e instanceof ts?cF(e):e instanceof Bn?aF(t,e,n):oF(e)?sF(e):lF(e),"intoDecompressError");var nx=s(function*(t,e=""){if(t!=null){if(Array.isArray(t)){for(let n=0;n<t.length;n++)yield[e+"[".concat(n,"]"),t[n]];return}if("features"in t){for(let n=0;n<t.features.length;n++)yield[e===""?"features[".concat(n,"]"):"".concat(e,".features[").concat(n,"]"),t.features[n]];return}for(let[n,r]of Object.entries(t)){let i=e===""?n:"".concat(e,".").concat(n);yield*C(nx(r,i))}}},"iterRecord"),uF=s((t,e)=>t===""?e:e.startsWith("[")?"".concat(t).concat(e):"".concat(t,".").concat(e),"getPath"),pt=s((t,e,n)=>{let r=new Set;for(let[i,o]of nx(t)){let a=e(o);if(r.has(a))return $({kind:fn.DuplicateIdError,properties:{id:a,path:uF(n,i)}});r.add(a)}return G(!0)},"ensureUniqueIds");var rx=s(t=>t.floors==null?$({kind:fn.FloorMissingError,properties:null}):pt(t.floors.features,e=>e.properties.id,"floors"),"validateFloors");var ix=u.Intersect([u.Object({id:u.Ref(_e),elevation:u.Integer({description:"An ordinal representing the elevation of this map relative to other maps in the stack."}),subtitle:u.Optional(u.String({description:"The subtitle of the floor."}))}),yn],{$id:"FloorProperties"}),sx=Ft(u.Union([u.Ref(Ks),u.Ref(Ys),u.Null()]),u.Ref(ix),{$id:"FloorFeature"}),ox=nn(u.Ref(sx),{$id:"FloorCollection"}),fF=u.Object({floors:u.Ref(ox)}),ax={name:"core:floors",intoBundle:s(function*(t){t.floors!=null&&(yield{path:"floors.geojson",contents:t.floors})},"intoBundle"),fromBundle:s((t,e,n)=>{if(t==="floors.geojson")return{floors:n(e)}},"fromBundle"),integrityCheck:rx,schema:fF,references:[ix,sx,ox]};l();l();var ht=s(t=>u.Unsafe(t),"PartialRecord");l();var ke=s(t=>Object.keys(t),"typedKeys");l();l();var dF=s(t=>{var e,n;return new Map((n=(e=t.floors)==null?void 0:e.features.map(r=>[r.properties.id,r]))!=null?n:[])},"createFloorMap"),rr=s(t=>{let e=dF(t);return s(r=>{let i=e.get(r);return i==null?$({kind:fn.UnknownFloorError,properties:{floorId:r}}):G(i)},"floorLookup")},"createFloorLookup");var cx=s(t=>{if(t.floors==null)return $({kind:fn.FloorMissingError,properties:null});if(t.geometry==null)return $({kind:fn.GeometryMissingError,properties:null});let e=pt(t.geometry,r=>r.properties.id,"geometry");if(e.isErr())return e;let n=rr(t);for(let r of ke(t.geometry)){let i=n(r);if(i.isErr())return i}return G(!0)},"validateGeometry");var lx=u.Intersect([u.Object({id:u.Ref(jt)}),yn],{$id:"GeometryProperties"}),ux=Ft(u.Union([u.Ref(Wt),u.Ref(Mc),u.Ref(wc),u.Ref(Ec),u.Ref(Ks),u.Ref(Ys)]),u.Ref(lx),{$id:"GeometryFeature"}),fx=nn(u.Ref(ux),{$id:"GeometryCollection"}),pF=u.Object({geometry:ht(u.Record(_e,u.Ref(fx),{additionalProperties:!1}))},{$id:"GeometrySchema"}),hF=/^geometry\/(.*)\.geojson$/,dx={name:"core:geometry",schema:pF,intoBundle:s(function*(t){if(t.geometry!=null)for(let e of ke(t.geometry))yield{path:"geometry/".concat(e,".geojson"),contents:t.geometry[e]}},"intoBundle"),fromBundle:s((t,e,n)=>{var i;let r=(i=t.match(hF))==null?void 0:i[1];if(r)return{geometry:{[r]:n(e)}}},"fromBundle"),references:[lx,ux,fx],integrityCheck:cx};l();var lp=u.Object({type:u.Literal("file"),name:u.String({description:"The name of the file."})},{$id:"ManifestFile"}),px=u.Recursive(t=>u.Object({type:u.Literal("folder"),name:u.String({description:"The name of the folder."}),children:u.Array(u.Union([t,u.Ref(lp)]),{minItems:1,description:"The children of the folder."})}),{$id:"ManifestFolder"}),hx=u.Object({name:u.String({description:"The name of the map."}),version:u.Literal("3.0.0",{description:"The version of the manifest."}),orgId:u.Optional(u.String({description:"The identifier of the organization that the map this MVF is for belongs to."})),mapId:u.Optional(u.String({description:"The identifier of the map that this MVF is for."})),contents:u.Array(u.Union([u.Ref(px),u.Ref(lp)]),{minItems:1,description:"The contents of the MVF bundle."}),time:u.String({format:"date-time",description:"An ISO 8601 date-time string, including timezone offset."}),tzid:u.Optional(u.Unsafe(u.String({description:"A valid IANA timezone identifier.",pattern:"^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$"}))),naturalBearing:u.Optional(u.Number({minimum:0,maximum:360,description:'The angle, in degrees, the map is considered to be "naturally oriented" as, rather than facing directly north. 90 degrees means East is "up"'})),defaultFloor:u.Optional(u.Ref(_e,{description:"The default floor ID of the map."})),language:u.Optional(u.String({description:"The language code of the map."}))},{$id:"ManifestProperties"}),mx=nn(Ft(Wt,u.Ref(hx)),{$id:"ManifestCollection"},{minItems:1,maxItems:1}),mF=u.Object({manifest:u.Ref(mx)}),gx={name:"core:manifest",intoBundle:s(function*(t){t.manifest!=null&&(yield{path:"manifest.geojson",contents:t.manifest})},"intoBundle"),fromBundle:s((t,e,n)=>{if(t==="manifest.geojson")return{manifest:n(e)}},"fromBundle"),schema:mF,references:[lp,px,hx,mx]};l();l();l();l();var fp=class fp extends ne{constructor(n){super("Unable to dereference schema with $id '".concat(n.$ref,"'"));qe(this,"schema");this.schema=n}};s(fp,"TypeDereferenceError");var up=fp;function gF(t,e){let n=e.find(r=>r.$id===t.$ref);if(n===void 0)throw new up(t);return is(n,e)}s(gF,"Resolve");function al(t,e){return!be.IsString(t.$id)||e.some(n=>n.$id===t.$id)||e.push(t),e}s(al,"Pushref");function is(t,e){return t[M]==="This"||t[M]==="Ref"?gF(t,e):t}s(is,"Deref");l();function yF(t,e,n){let r=t.get(e);if(r!==void 0)return r;let i=Sr(e,n);return t.set(e,i),i}s(yF,"HasTransformCached");function cl(){let t=new WeakMap;return{HasTransform:s((e,n)=>yF(t,e,n),"HasTransform")}}s(cl,"CreateTransformCache");function lt(t,e,n){try{return _.IsTransform(t)?t[nt].Decode(n):n}catch(r){throw new ts(t,e,n,r)}}s(lt,"Default");function xF(t,e,n,r,i){return be.IsArray(r)?lt(t,n,r.map((o,a)=>wr(t.items,e,"".concat(n,"/").concat(a),o,i))):lt(t,n,r)}s(xF,"FromArray");function _F(t,e,n,r,i){if(!be.IsObject(r)||Pt(r))return lt(t,n,r);let o=_i(t),a=o.map(h=>h[0]),c=y({},r);for(let[h,g]of o)h in c&&(c[h]=wr(g,e,"".concat(n,"/").concat(h),c[h],i));if(!_.IsTransform(t.unevaluatedProperties))return lt(t,n,c);let f=Object.getOwnPropertyNames(c),d=t.unevaluatedProperties,p=y({},c);for(let h of f)a.includes(h)||(p[h]=lt(d,"".concat(n,"/").concat(h),p[h]));return lt(t,n,p)}s(_F,"FromIntersect");function vF(t,e,n,r,i){return lt(t,n,wr(t.not,e,n,r,i))}s(vF,"FromNot");function bF(t,e,n,r,i){if(!be.IsObject(r))return lt(t,n,r);let o=Et(t),a=y({},r);for(let p of o)be.HasPropertyKey(a,p)&&(be.IsUndefined(a[p])&&(!_.IsUndefined(t.properties[p])||De.IsExactOptionalProperty(a,p))||(a[p]=wr(t.properties[p],e,"".concat(n,"/").concat(p),a[p],i)));if(!_.IsSchema(t.additionalProperties))return lt(t,n,a);let c=Object.getOwnPropertyNames(a),f=t.additionalProperties,d=y({},a);for(let p of c)o.includes(p)||(d[p]=lt(f,"".concat(n,"/").concat(p),d[p]));return lt(t,n,d)}s(bF,"FromObject");function SF(t,e,n,r,i){if(!be.IsObject(r))return lt(t,n,r);let o=Object.getOwnPropertyNames(t.patternProperties)[0],a=new RegExp(o),c=y({},r);for(let h of Object.getOwnPropertyNames(r))a.test(h)&&(c[h]=wr(t.patternProperties[o],e,"".concat(n,"/").concat(h),c[h],i));if(!_.IsSchema(t.additionalProperties))return lt(t,n,c);let f=Object.getOwnPropertyNames(c),d=t.additionalProperties,p=y({},c);for(let h of f)a.test(h)||(p[h]=lt(d,"".concat(n,"/").concat(h),p[h]));return lt(t,n,p)}s(SF,"FromRecord");function MF(t,e,n,r,i){let o=is(t,e);return lt(t,n,wr(o,e,n,r,i))}s(MF,"FromRef");function wF(t,e,n,r,i){let o=is(t,e);return lt(t,n,wr(o,e,n,r,i))}s(wF,"FromThis");function EF(t,e,n,r,i){return be.IsArray(r)&&be.IsArray(t.items)?lt(t,n,t.items.map((o,a)=>wr(o,e,"".concat(n,"/").concat(a),r[a],i))):lt(t,n,r)}s(EF,"FromTuple");function IF(t,e,n,r,i){for(let o of t.anyOf){if(!Gn.Check(o,e,r))continue;let a=wr(o,e,n,r,i);return lt(t,n,a)}return lt(t,n,r)}s(IF,"FromUnion");function wr(t,e,n,r,i){if(!i.HasTransform(t,e))return r;let o=al(t,e),a=t;switch(t[M]){case"Array":return xF(a,o,n,r,i);case"Intersect":return _F(a,o,n,r,i);case"Not":return vF(a,o,n,r,i);case"Object":return bF(a,o,n,r,i);case"Record":return SF(a,o,n,r,i);case"Ref":return MF(a,o,n,r,i);case"Symbol":return lt(a,n,r);case"This":return wF(a,o,n,r,i);case"Tuple":return EF(a,o,n,r,i);case"Union":return IF(a,o,n,r,i);default:return lt(a,n,r)}}s(wr,"Visit");function yx(t,e,n){let r=cl();return wr(t,e,"",n,r)}s(yx,"FastTransformDecode");l();function Kt(t,e,n){try{return _.IsTransform(t)?t[nt].Encode(n):n}catch(r){throw new ns(t,e,n,r)}}s(Kt,"Default");function TF(t,e,n,r,i){let o=Kt(t,n,r);return be.IsArray(o)?o.map((a,c)=>Er(t.items,e,"".concat(n,"/").concat(c),a,i)):o}s(TF,"FromArray");function AF(t,e,n,r,i){let o=Kt(t,n,r);if(!be.IsObject(r)||Pt(r))return o;let a=_i(t),c=a.map(g=>g[0]),f=y({},o);for(let[g,x]of a)g in f&&(f[g]=Er(x,e,"".concat(n,"/").concat(g),f[g],i));if(!_.IsTransform(t.unevaluatedProperties))return f;let d=Object.getOwnPropertyNames(f),p=t.unevaluatedProperties,h=y({},f);for(let g of d)c.includes(g)||(h[g]=Kt(p,"".concat(n,"/").concat(g),h[g]));return h}s(AF,"FromIntersect");function RF(t,e,n,r){return Kt(t.not,n,Kt(t,n,r))}s(RF,"FromNot");function CF(t,e,n,r,i){let o=Kt(t,n,r);if(!be.IsObject(o))return o;let a=Et(t),c=y({},o);for(let h of a)be.HasPropertyKey(c,h)&&(be.IsUndefined(c[h])&&(!_.IsUndefined(t.properties[h])||De.IsExactOptionalProperty(c,h))||(c[h]=Er(t.properties[h],e,"".concat(n,"/").concat(h),c[h],i)));if(!_.IsSchema(t.additionalProperties))return c;let f=Object.getOwnPropertyNames(c),d=t.additionalProperties,p=y({},c);for(let h of f)a.includes(h)||(p[h]=Kt(d,"".concat(n,"/").concat(h),p[h]));return p}s(CF,"FromObject");function PF(t,e,n,r,i){let o=Kt(t,n,r);if(!be.IsObject(r))return o;let a=Object.getOwnPropertyNames(t.patternProperties)[0],c=new RegExp(a),f=y({},o);for(let g of Object.getOwnPropertyNames(r))c.test(g)&&(f[g]=Er(t.patternProperties[a],e,"".concat(n,"/").concat(g),f[g],i));if(!_.IsSchema(t.additionalProperties))return f;let d=Object.getOwnPropertyNames(f),p=t.additionalProperties,h=y({},f);for(let g of d)c.test(g)||(h[g]=Kt(p,"".concat(n,"/").concat(g),h[g]));return h}s(PF,"FromRecord");function FF(t,e,n,r,i){let o=is(t,e),a=Er(o,e,n,r,i);return Kt(t,n,a)}s(FF,"FromRef");function OF(t,e,n,r,i){let o=is(t,e),a=Er(o,e,n,r,i);return Kt(t,n,a)}s(OF,"FromThis");function LF(t,e,n,r,i){let o=Kt(t,n,r);return be.IsArray(t.items)?t.items.map((a,c)=>Er(a,e,"".concat(n,"/").concat(c),o[c],i)):[]}s(LF,"FromTuple");function NF(t,e,n,r,i){for(let o of t.anyOf){if(!Gn.Check(o,e,r))continue;let a=Er(o,e,n,r,i);return Kt(t,n,a)}for(let o of t.anyOf){let a=Er(o,e,n,r,i);if(Gn.Check(t,e,a))return Kt(t,n,a)}return Kt(t,n,r)}s(NF,"FromUnion");function Er(t,e,n,r,i){if(!i.HasTransform(t,e))return r;let o=al(t,e),a=t;switch(t[M]){case"Array":return TF(a,o,n,r,i);case"Intersect":return AF(a,o,n,r,i);case"Not":return RF(a,o,n,r);case"Object":return CF(a,o,n,r,i);case"Record":return PF(a,o,n,r,i);case"Ref":return FF(a,o,n,r,i);case"This":return OF(a,o,n,r,i);case"Tuple":return LF(a,o,n,r,i);case"Union":return NF(a,o,n,r,i);default:return Kt(a,n,r)}}s(Er,"Visit");function xx(t,e,n){let r=cl();return Er(t,e,"",n,r)}s(xx,"FastTransformEncode");l();var gp=class gp{constructor(e,n,r,i){this.schema=e,this.references=n,this.checkFunc=r,this.code=i,this.hasTransform=Sr(e,n)}Code(){return this.code}Errors(e){return yr(this.schema,this.references,e)}Check(e){return this.checkFunc(e)}Decode(e){if(!this.checkFunc(e))throw new eo(this.schema,e,this.Errors(e).First());return this.hasTransform?to(this.schema,this.references,e):e}Encode(e){let n=this.hasTransform?kc(this.schema,this.references,e):e;if(!this.checkFunc(n))throw new no(this.schema,e,this.Errors(e).First());return n}};s(gp,"TypeCheck");var dp=gp,Jr;(function(t){function e(o){return o===36}s(e,"DollarSign"),t.DollarSign=e;function n(o){return o===95}s(n,"IsUnderscore"),t.IsUnderscore=n;function r(o){return o>=65&&o<=90||o>=97&&o<=122}s(r,"IsAlpha"),t.IsAlpha=r;function i(o){return o>=48&&o<=57}s(i,"IsNumeric"),t.IsNumeric=i})(Jr||(Jr={}));var ll;(function(t){function e(o){return o.length===0?!1:Jr.IsNumeric(o.charCodeAt(0))}s(e,"IsFirstCharacterNumeric");function n(o){if(e(o))return!1;for(let a=0;a<o.length;a++){let c=o.charCodeAt(a);if(!(Jr.IsAlpha(c)||Jr.IsNumeric(c)||Jr.DollarSign(c)||Jr.IsUnderscore(c)))return!1}return!0}s(n,"IsAccessor");function r(o){return o.replace(/'/g,"\\'")}s(r,"EscapeHyphen");function i(o,a){return n(a)?"".concat(o,".").concat(a):"".concat(o,"['").concat(r(a),"']")}s(i,"Encode"),t.Encode=i})(ll||(ll={}));var pp;(function(t){function e(n){let r=[];for(let i=0;i<n.length;i++){let o=n.charCodeAt(i);Jr.IsNumeric(o)||Jr.IsAlpha(o)?r.push(n.charAt(i)):r.push("_".concat(o,"_"))}return r.join("").replace(/__/g,"_")}s(e,"Encode"),t.Encode=e})(pp||(pp={}));var hp;(function(t){function e(n){return n.replace(/'/g,"\\'")}s(e,"Escape"),t.Escape=e})(hp||(hp={}));var yp=class yp extends ne{constructor(e){super("Unknown type"),this.schema=e}};s(yp,"TypeCompilerUnknownTypeError");var mp=yp,xp=class xp extends ne{constructor(e){super("Preflight validation check failed to guard for the given schema"),this.schema=e}};s(xp,"TypeCompilerTypeGuardError");var ul=xp,ss;(function(t){function e(a,c,f){return De.ExactOptionalPropertyTypes?"('".concat(c,"' in ").concat(a," ? ").concat(f," : true)"):"(".concat(ll.Encode(a,c)," !== undefined ? ").concat(f," : true)")}s(e,"IsExactOptionalProperty"),t.IsExactOptionalProperty=e;function n(a){return De.AllowArrayObject?"(typeof ".concat(a," === 'object' && ").concat(a," !== null)"):"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !Array.isArray(").concat(a,"))")}s(n,"IsObjectLike"),t.IsObjectLike=n;function r(a){return De.AllowArrayObject?"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !(").concat(a," instanceof Date) && !(").concat(a," instanceof Uint8Array))"):"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !Array.isArray(").concat(a,") && !(").concat(a," instanceof Date) && !(").concat(a," instanceof Uint8Array))")}s(r,"IsRecordLike"),t.IsRecordLike=r;function i(a){return De.AllowNaN?"typeof ".concat(a," === 'number'"):"Number.isFinite(".concat(a,")")}s(i,"IsNumberLike"),t.IsNumberLike=i;function o(a){return De.AllowNullVoid?"(".concat(a," === undefined || ").concat(a," === null)"):"".concat(a," === undefined")}s(o,"IsVoidLike"),t.IsVoidLike=o})(ss||(ss={}));var fl;(function(t){function e(v){return v[M]==="Any"||v[M]==="Unknown"}s(e,"IsAnyOrUnknown");function*n(v,k,S){yield"true"}s(n,"FromAny");function*r(v,k,S){yield"Array.isArray(".concat(S,")");let[J,B]=[wt("value","any"),wt("acc","number")];Y(v.maxItems)&&(yield"".concat(S,".length <= ").concat(v.maxItems)),Y(v.minItems)&&(yield"".concat(S,".length >= ").concat(v.minItems));let j=Ee(v.items,k,"value");if(yield"".concat(S,".every((").concat(J,") => ").concat(j,")"),Me(v.contains)||Y(v.minContains)||Y(v.maxContains)){let et=Me(v.contains)?v.contains:Ge(),Zt=Ee(et,k,"value"),Ar=Y(v.minContains)?["(count >= ".concat(v.minContains,")")]:[],jn=Y(v.maxContains)?["(count <= ".concat(v.maxContains,")")]:[],ar="const count = value.reduce((".concat(B,", ").concat(J,") => ").concat(Zt," ? acc + 1 : acc, 0)"),wa=["(count > 0)",...Ar,...jn].join(" && ");yield"((".concat(J,") => { ").concat(ar,"; return ").concat(wa,"})(").concat(S,")")}if(v.uniqueItems===!0){let Zt="const set = new Set(); for(const element of value) { ".concat("const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true"," }");yield"((".concat(J,") => { ").concat(Zt," )(").concat(S,")")}}s(r,"FromArray");function*i(v,k,S){yield"(typeof value === 'object' && Symbol.asyncIterator in ".concat(S,")")}s(i,"FromAsyncIterator");function*o(v,k,S){yield"(typeof ".concat(S," === 'bigint')"),Ct(v.exclusiveMaximum)&&(yield"".concat(S," < BigInt(").concat(v.exclusiveMaximum,")")),Ct(v.exclusiveMinimum)&&(yield"".concat(S," > BigInt(").concat(v.exclusiveMinimum,")")),Ct(v.maximum)&&(yield"".concat(S," <= BigInt(").concat(v.maximum,")")),Ct(v.minimum)&&(yield"".concat(S," >= BigInt(").concat(v.minimum,")")),Ct(v.multipleOf)&&(yield"(".concat(S," % BigInt(").concat(v.multipleOf,")) === 0"))}s(o,"FromBigInt");function*a(v,k,S){yield"(typeof ".concat(S," === 'boolean')")}s(a,"FromBoolean");function*c(v,k,S){yield*C(ce(v.returns,k,"".concat(S,".prototype")))}s(c,"FromConstructor");function*f(v,k,S){yield"(".concat(S," instanceof Date) && Number.isFinite(").concat(S,".getTime())"),Y(v.exclusiveMaximumTimestamp)&&(yield"".concat(S,".getTime() < ").concat(v.exclusiveMaximumTimestamp)),Y(v.exclusiveMinimumTimestamp)&&(yield"".concat(S,".getTime() > ").concat(v.exclusiveMinimumTimestamp)),Y(v.maximumTimestamp)&&(yield"".concat(S,".getTime() <= ").concat(v.maximumTimestamp)),Y(v.minimumTimestamp)&&(yield"".concat(S,".getTime() >= ").concat(v.minimumTimestamp)),Y(v.multipleOfTimestamp)&&(yield"(".concat(S,".getTime() % ").concat(v.multipleOfTimestamp,") === 0"))}s(f,"FromDate");function*d(v,k,S){yield"(typeof ".concat(S," === 'function')")}s(d,"FromFunction");function*p(v,k,S){yield"Number.isInteger(".concat(S,")"),Y(v.exclusiveMaximum)&&(yield"".concat(S," < ").concat(v.exclusiveMaximum)),Y(v.exclusiveMinimum)&&(yield"".concat(S," > ").concat(v.exclusiveMinimum)),Y(v.maximum)&&(yield"".concat(S," <= ").concat(v.maximum)),Y(v.minimum)&&(yield"".concat(S," >= ").concat(v.minimum)),Y(v.multipleOf)&&(yield"(".concat(S," % ").concat(v.multipleOf,") === 0"))}s(p,"FromInteger");function*h(v,k,S){let J=v.allOf.map(B=>Ee(B,k,S)).join(" && ");if(v.unevaluatedProperties===!1){let B=kt("".concat(new RegExp(Wr(v)),";")),j="Object.getOwnPropertyNames(".concat(S,").every(key => ").concat(B,".test(key))");yield"(".concat(J," && ").concat(j,")")}else if(Me(v.unevaluatedProperties)){let B=kt("".concat(new RegExp(Wr(v)),";")),j="Object.getOwnPropertyNames(".concat(S,").every(key => ").concat(B,".test(key) || ").concat(Ee(v.unevaluatedProperties,k,"".concat(S,"[key]")),")");yield"(".concat(J," && ").concat(j,")")}else yield"(".concat(J,")")}s(h,"FromIntersect");function*g(v,k,S){yield"(typeof value === 'object' && Symbol.iterator in ".concat(S,")")}s(g,"FromIterator");function*x(v,k,S){typeof v.const=="number"||typeof v.const=="boolean"?yield"(".concat(S," === ").concat(v.const,")"):yield"(".concat(S," === '").concat(hp.Escape(v.const),"')")}s(x,"FromLiteral");function*b(v,k,S){yield"false"}s(b,"FromNever");function*E(v,k,S){let J=Ee(v.not,k,S);yield"(!".concat(J,")")}s(E,"FromNot");function*R(v,k,S){yield"(".concat(S," === null)")}s(R,"FromNull");function*A(v,k,S){yield ss.IsNumberLike(S),Y(v.exclusiveMaximum)&&(yield"".concat(S," < ").concat(v.exclusiveMaximum)),Y(v.exclusiveMinimum)&&(yield"".concat(S," > ").concat(v.exclusiveMinimum)),Y(v.maximum)&&(yield"".concat(S," <= ").concat(v.maximum)),Y(v.minimum)&&(yield"".concat(S," >= ").concat(v.minimum)),Y(v.multipleOf)&&(yield"(".concat(S," % ").concat(v.multipleOf,") === 0"))}s(A,"FromNumber");function*Q(v,k,S){yield ss.IsObjectLike(S),Y(v.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(S,").length >= ").concat(v.minProperties)),Y(v.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(S,").length <= ").concat(v.maxProperties));let J=Object.getOwnPropertyNames(v.properties);for(let B of J){let j=ll.Encode(S,B),et=v.properties[B];if(v.required&&v.required.includes(B))yield*C(ce(et,k,j)),(Xr(et)||e(et))&&(yield"('".concat(B,"' in ").concat(S,")"));else{let Zt=Ee(et,k,j);yield ss.IsExactOptionalProperty(S,B,Zt)}}if(v.additionalProperties===!1)if(v.required&&v.required.length===J.length)yield"Object.getOwnPropertyNames(".concat(S,").length === ").concat(J.length);else{let B="[".concat(J.map(j=>"'".concat(j,"'")).join(", "),"]");yield"Object.getOwnPropertyNames(".concat(S,").every(key => ").concat(B,".includes(key))")}if(typeof v.additionalProperties=="object"){let B=Ee(v.additionalProperties,k,"".concat(S,"[key]")),j="[".concat(J.map(et=>"'".concat(et,"'")).join(", "),"]");yield"(Object.getOwnPropertyNames(".concat(S,").every(key => ").concat(j,".includes(key) || ").concat(B,"))")}}s(Q,"FromObject");function*W(v,k,S){yield"(typeof value === 'object' && typeof ".concat(S,".then === 'function')")}s(W,"FromPromise");function*F(v,k,S){yield ss.IsRecordLike(S),Y(v.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(S,").length >= ").concat(v.minProperties)),Y(v.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(S,").length <= ").concat(v.maxProperties));let[J,B]=Object.entries(v.patternProperties)[0],j=kt("".concat(new RegExp(J))),et=Ee(B,k,"value"),Zt=Me(v.additionalProperties)?Ee(v.additionalProperties,k,S):v.additionalProperties===!1?"false":"true",Ar="(".concat(j,".test(key) ? ").concat(et," : ").concat(Zt,")");yield"(Object.entries(".concat(S,").every(([key, value]) => ").concat(Ar,"))")}s(F,"FromRecord");function*H(v,k,S){let J=Re(v,k);if(se.functions.has(v.$ref))return yield"".concat(ut(v.$ref),"(").concat(S,")");yield*C(ce(J,k,S))}s(H,"FromRef");function*ie(v,k,S){let J=kt("".concat(new RegExp(v.source,v.flags),";"));yield"(typeof ".concat(S," === 'string')"),Y(v.maxLength)&&(yield"".concat(S,".length <= ").concat(v.maxLength)),Y(v.minLength)&&(yield"".concat(S,".length >= ").concat(v.minLength)),yield"".concat(J,".test(").concat(S,")")}s(ie,"FromRegExp");function*X(v,k,S){if(yield"(typeof ".concat(S," === 'string')"),Y(v.maxLength)&&(yield"".concat(S,".length <= ").concat(v.maxLength)),Y(v.minLength)&&(yield"".concat(S,".length >= ").concat(v.minLength)),v.pattern!==void 0){let J=kt("".concat(new RegExp(v.pattern),";"));yield"".concat(J,".test(").concat(S,")")}v.format!==void 0&&(yield"format('".concat(v.format,"', ").concat(S,")"))}s(X,"FromString");function*Z(v,k,S){yield"(typeof ".concat(S," === 'symbol')")}s(Z,"FromSymbol");function*q(v,k,S){yield"(typeof ".concat(S," === 'string')");let J=kt("".concat(new RegExp(v.pattern),";"));yield"".concat(J,".test(").concat(S,")")}s(q,"FromTemplateLiteral");function*ve(v,k,S){yield"".concat(ut(v.$ref),"(").concat(S,")")}s(ve,"FromThis");function*he(v,k,S){if(yield"Array.isArray(".concat(S,")"),v.items===void 0)return yield"".concat(S,".length === 0");yield"(".concat(S,".length === ").concat(v.maxItems,")");for(let J=0;J<v.items.length;J++){let B=Ee(v.items[J],k,"".concat(S,"[").concat(J,"]"));yield"".concat(B)}}s(he,"FromTuple");function*Oe(v,k,S){yield"".concat(S," === undefined")}s(Oe,"FromUndefined");function*mt(v,k,S){let J=v.anyOf.map(B=>Ee(B,k,S));yield"(".concat(J.join(" || "),")")}s(mt,"FromUnion");function*Be(v,k,S){yield"".concat(S," instanceof Uint8Array"),Y(v.maxByteLength)&&(yield"(".concat(S,".length <= ").concat(v.maxByteLength,")")),Y(v.minByteLength)&&(yield"(".concat(S,".length >= ").concat(v.minByteLength,")"))}s(Be,"FromUint8Array");function*ze(v,k,S){yield"true"}s(ze,"FromUnknown");function*L(v,k,S){yield ss.IsVoidLike(S)}s(L,"FromVoid");function*ee(v,k,S){let J=se.instances.size;se.instances.set(J,v),yield"kind('".concat(v[M],"', ").concat(J,", ").concat(S,")")}s(ee,"FromKind");function*ce(v,k,S,J=!0){let B=Se(v.$id)?[...k,v]:k,j=v;if(J&&Se(v.$id)){let et=ut(v.$id);if(se.functions.has(et))return yield"".concat(et,"(").concat(S,")");{let Zt=Bt(et,v,k,"value",!1);return se.functions.set(et,Zt),yield"".concat(et,"(").concat(S,")")}}switch(j[M]){case"Any":return yield*C(n(j,B,S));case"Array":return yield*C(r(j,B,S));case"AsyncIterator":return yield*C(i(j,B,S));case"BigInt":return yield*C(o(j,B,S));case"Boolean":return yield*C(a(j,B,S));case"Constructor":return yield*C(c(j,B,S));case"Date":return yield*C(f(j,B,S));case"Function":return yield*C(d(j,B,S));case"Integer":return yield*C(p(j,B,S));case"Intersect":return yield*C(h(j,B,S));case"Iterator":return yield*C(g(j,B,S));case"Literal":return yield*C(x(j,B,S));case"Never":return yield*C(b(j,B,S));case"Not":return yield*C(E(j,B,S));case"Null":return yield*C(R(j,B,S));case"Number":return yield*C(A(j,B,S));case"Object":return yield*C(Q(j,B,S));case"Promise":return yield*C(W(j,B,S));case"Record":return yield*C(F(j,B,S));case"Ref":return yield*C(H(j,B,S));case"RegExp":return yield*C(ie(j,B,S));case"String":return yield*C(X(j,B,S));case"Symbol":return yield*C(Z(j,B,S));case"TemplateLiteral":return yield*C(q(j,B,S));case"This":return yield*C(ve(j,B,S));case"Tuple":return yield*C(he(j,B,S));case"Undefined":return yield*C(Oe(j,B,S));case"Union":return yield*C(mt(j,B,S));case"Uint8Array":return yield*C(Be(j,B,S));case"Unknown":return yield*C(ze(j,B,S));case"Void":return yield*C(L(j,B,S));default:if(!St.Has(j[M]))throw new mp(v);return yield*C(ee(j,B,S))}}s(ce,"Visit");let se={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function Ee(v,k,S,J=!0){return"(".concat([...ce(v,k,S,J)].join(" && "),")")}s(Ee,"CreateExpression");function ut(v){return"check_".concat(pp.Encode(v))}s(ut,"CreateFunctionName");function kt(v){let k="local_".concat(se.variables.size);return se.variables.set(k,"const ".concat(k," = ").concat(v)),k}s(kt,"CreateVariable");function Bt(v,k,S,J,B=!0){let[j,et]=["\n",ar=>"".padStart(ar," ")],Zt=wt("value","any"),Ar=Qe("boolean"),jn=[...ce(k,S,J,B)].map(ar=>"".concat(et(4)).concat(ar)).join(" &&".concat(j));return"function ".concat(v,"(").concat(Zt,")").concat(Ar," {").concat(j).concat(et(2),"return (").concat(j).concat(jn).concat(j).concat(et(2),")\n}")}s(Bt,"CreateFunction");function wt(v,k){let S=se.language==="typescript"?": ".concat(k):"";return"".concat(v).concat(S)}s(wt,"CreateParameter");function Qe(v){return se.language==="typescript"?": ".concat(v):""}s(Qe,"CreateReturns");function En(v,k,S){let J=Bt("check",v,k,"value"),B=wt("value","any"),j=Qe("boolean"),et=[...se.functions.values()],Zt=[...se.variables.values()],Ar=Se(v.$id)?"return function check(".concat(B,")").concat(j," {\n return ").concat(ut(v.$id),"(value)\n}"):"return ".concat(J);return[...Zt,...et,Ar].join("\n")}s(En,"Build");function Tr(...v){let k={language:"javascript"},[S,J,B]=v.length===2&&ae(v[1])?[v[0],v[1],k]:v.length===2&&!ae(v[1])?[v[0],[],v[1]]:v.length===3?[v[0],v[1],v[2]]:v.length===1?[v[0],[],k]:[null,[],k];if(se.language=B.language,se.variables.clear(),se.functions.clear(),se.instances.clear(),!Me(S))throw new ul(S);for(let j of J)if(!Me(j))throw new ul(j);return En(S,J,B)}s(Tr,"Code"),t.Code=Tr;function ni(v,k=[]){let S=Tr(v,k,{language:"javascript"}),J=globalThis.Function("kind","format","hash",S),B=new Map(se.instances);function j(jn,ar,wa){if(!St.Has(jn)||!B.has(ar))return!1;let k_=St.Get(jn),B_=B.get(ar);return k_(B_,wa)}s(j,"typeRegistryFunction");function et(jn,ar){return tn.Has(jn)?tn.Get(jn)(ar):!1}s(et,"formatRegistryFunction");function Zt(jn){return Si(jn)}s(Zt,"hashFunction");let Ar=J(j,et,Zt);return new dp(v,k,Ar,S)}s(ni,"Compile"),t.Compile=ni})(fl||(fl={}));l();l();l();var UF=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,DF=[0,31,28,31,30,31,30,31,31,30,31,30,31],kF=s(t=>t%4===0&&(t%100!==0||t%400===0),"isLeapYear"),dl=s(t=>{let e=UF.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3];return r>=1&&r<=12&&i>=1&&i<=(r===2&&kF(n)?29:DF[r])},"date");l();var BF=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i,pl=s(t=>{let e=BF.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3],o=e[4],a=e[5]==="-"?-1:1,c=+(e[6]||0),f=+(e[7]||0);if(c>23||f>59||!o)return!1;if(n<=23&&r<=59&&i<60)return!0;let d=r-f*a,p=n-c*a-(d<0?1:0);return(p===23||p===-1)&&(d===59||d===-1)&&i<61},"time");var zF=/t|\s/i,_x=s(t=>{let e=t.split(zF);return e.length===2&&dl(e[0])&&pl(e[1])},"dateTime");l();var VF=/\/|:/,GF=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,vx=s(t=>VF.test(t)&&GF.test(t),"uri");var HF=[["date",dl],["time",pl],["date-time",_x],["uri",vx]],bx=s(()=>{for(let[t,e]of HF)try{Pc.Format(t,e)}catch(n){if(n instanceof aa)continue;throw n}},"registerFormats");l();var _p=u.Record(u.String(),u.Unknown(),{$id:"Extra"}),ir=u.Object({extra:u.Optional(u.Ref(_p))}),vp=[_p];l();l();l();l();l();l();var Yt=s(t=>Object.entries(t),"typedEntries");var $F=s(t=>{var n;let e=new Map;for(let[r,i]of Yt((n=t.geometry)!=null?n:{}))e.set(r,new Map(i==null?void 0:i.features.map(o=>[o.properties.id,o])));return e},"createLookupMap"),Mt=s(t=>{let e=$F(t);return s((r,i)=>{let o=e.get(r);if(o==null)return $({kind:fn.UnknownFloorError,properties:{floorId:r}});let a=o.get(i);return a==null?$({kind:fn.UnknownGeometryError,properties:{floorId:r,geometryId:i}}):G(a)},"geometryLookup")},"createGeometryLookup");l();var Wn=u.Object({geometryId:u.Ref(jt)},{$id:"WithGeometryId"}),ho=u.Object({geometryIds:u.Array(u.Ref(jt))},{$id:"WithGeometryIds"}),bp=[Wn,ho];l();l();l();var Sx=s(t=>t instanceof Error?t:new Error(String(t)),"asError");var mo=s(t=>(...e)=>{try{return G(t(...e))}catch(n){return $(Sx(n))}},"safeFn");var Mx=mo((t,e)=>{let n={};for(let r of e)for(let i of r.intoBundle(t))n[i.path]=oo(JSON.stringify(i.contents));return n}),Sp=s(async(t,e,n)=>Mx(t,e).andThenAsync(r=>new Promise(i=>{Jy(r,O(y({},n),{consume:!0}),(o,a)=>{i(o?$(o):G(a))})})),"compress"),WF=mo(Qy),Mp=s((t,e,n)=>Mx(t,e).andThen(r=>WF(r,n)),"compressSync");l();l();function hl(t,e,n=[]){let r=y({},t);for(let[i,o]of Object.entries(e))if(o!==void 0)if(i in r){let a=i;if(Array.isArray(o)&&o.length>0){let c=jF(o[0],n);if(c){let f=r[a];if(!Array.isArray(f))throw new Error("Expected array at ".concat(i,", got ").concat(typeof f));let d=new Map(o.map(g=>[wx(g,c),g])),h=f.map(g=>{let x=d.get(wx(g,c));return x?hl(g,x,n):g});r[a]=h}else r[a]=o}else{let c=r[a];typeof c=="object"&&c!==null&&typeof o=="object"&&o!==null?Object.keys(o).length===0?r[a]=o:r[a]=hl(c,o,n):r[i]=o}}else r[i]=o;return r}s(hl,"deepMergeOn");function jF(t,e){function n(r){if(typeof r!="object"||r===null)return null;for(let i of e)if(i in r&&typeof r[i]<"u")return[i];if(Array.isArray(r))return null;for(let[i,o]of Object.entries(r)){let a=n(o);if(a)return[i,...a]}return null}return s(n,"search"),n(t)}s(jF,"findIdentifierKey");function wx(t,e){return e.reduce((n,r)=>{if(n&&typeof n=="object")return n[r]},t)}s(wx,"getValueByKeyPath");var XF=s(t=>t,"identity"),qF=s(t=>JSON.parse(op(t)),"jsonDecode"),Ex=s((t,e)=>e.some(n=>n.fromBundle(t.name,new Uint8Array,XF)!==void 0),"isFileExpected"),Ix=mo((t,e)=>{let n={};for(let r of Object.keys(t)){let i=t[r];for(let o of e){let a=o.fromBundle(r,i,qF);if(a){n=hl(n,a,[]);break}}}return n}),wp=s(async(t,e)=>new Promise(n=>ex(t,{filter:s(r=>Ex(r,e),"filter")},(r,i)=>{n(r?$(r):G(i))})).then(n=>n.andThen(r=>Ix(r,e))),"decompress"),KF=mo(tx),Ep=s((t,e)=>KF(t,{filter:s(n=>Ex(n,e),"filter")}).andThen(n=>Ix(n,e)),"decompressSync");l();var YF=s(t=>typeof t=="object"&&t!=null&&"$ref"in t&&typeof t.$ref=="string","isRef"),ZF=s(t=>{if(t.length<2)return!1;let e=t.filter(YF);if(e.length!==t.length)return!1;let n=e[0].$ref;return e.slice(1).every(r=>r.$ref===n)},"isDuplicateRef"),ml=s(t=>typeof t=="object"&&t!=null&&"allOf"in t&&Array.isArray(t.allOf)&&ZF(t.allOf)?t.allOf[0]:typeof t=="object"&&t!=null&&!Array.isArray(t)?Object.fromEntries(Object.entries(t).map(([e,n])=>[e,ml(n)])):Array.isArray(t)?t.map(ml):t,"fixDuplicateAllOf");l();var gl=s(t=>typeof t=="object"&&t!=null&&"$ref"in t?O(y({},t),{$ref:"#/definitions/".concat(t.$ref)}):typeof t=="object"&&t!=null&&!Array.isArray(t)?Object.fromEntries(Object.entries(t).map(([e,n])=>[e,gl(n)])):Array.isArray(t)?t.map(gl):t,"prefixReferences");var go;(function(t){t.InvalidTypeboxSchema="InvalidTypeboxSchema",t.MissingReferenceId="MissingReferenceId",t.DuplicateReferenceId="DuplicateReferenceId",t.TypeboxError="TypeboxError",t.UnknownError="UnknownError"})(go||(go={}));var JF=s(t=>({next(){for(let n of t){let r=n.next();if(!r.done)return r}return{done:!0,value:void 0}},[Symbol.iterator](){return this}}),"join"),QF=s((...t)=>{let e=new Map;for(let n of JF(t)){if(!n.$id)continue;let r=e.get(n.$id);if(r!=null&&r!==n)return $({kind:go.DuplicateReferenceId,message:"Failed to register a reference for a schema with an $id that has already been used",schema:n});e.set(n.$id,n)}return G(e)},"computeReferenceMap"),Tt,yo,Mn,Dt,xl=class xl{constructor(e,n,r,i){vt(this,Tt);vt(this,yo);vt(this,Mn,[]);vt(this,Dt);At(this,Tt,e),At(this,yo,n),At(this,Mn,r),At(this,Dt,i),this.is=this.is.bind(this),this.parse=this.parse.bind(this),this.verify=this.verify.bind(this),this.jsonSchema=this.jsonSchema.bind(this),this.compress=this.compress.bind(this),this.decompress=this.decompress.bind(this)}static create(e,n="CoreMVF",r=!1){let i=u.Composite(e.extensions.map(a=>a.schema),{$id:n});if(!_.IsSchema(i))return $({kind:go.InvalidTypeboxSchema,message:"Attempting to merge schemas produced an invalid schema",schema:i});let o=QF(pd.values(),hd.values(),fd.values(),vp.values(),Ip.values(),bp.values(),e.extensions.flatMap(a=>{var c;return(c=a.references)!=null?c:[]}).values());if(!o.isOk())return o;try{bx();let a=r?null:fl.Compile(i,[...o.value.values()]);return G(new xl(i,a,e.extensions,o.value))}catch(a){return a instanceof ne?$({kind:go.TypeboxError,message:a.message,original:a}):$({kind:go.UnknownError,message:"An unknown error occurred while compiling the schema",original:a})}}is(e){var n,r;return(r=(n=N(this,yo))==null?void 0:n.Check(e))!=null?r:Gn.Check(N(this,Tt),[...N(this,Dt).values()],e)}parse(e){var n,r;return this.is(e)?G(e):$((r=(n=N(this,yo))==null?void 0:n.Errors(e))!=null?r:Gn.Errors(N(this,Tt),[...N(this,Dt).values()],e))}decode(e){try{return G(yx(N(this,Tt),[...N(this,Dt).values()],e))}catch(n){return $(n)}}encode(e){try{return G(xx(N(this,Tt),[...N(this,Dt).values()],e))}catch(n){return $(n)}}verify(e){for(let n of N(this,Mn))if(n.integrityCheck){let r=n.integrityCheck(e);if(r.isErr())return $(r.error)}return G(!0)}jsonSchema(){var r;let e=JSON.parse(JSON.stringify([N(this,Tt),...N(this,Dt).values()])),n=ml(gl({$id:"#/definitions/".concat((r=N(this,Tt).$id)!=null?r:"CoreMVF"),$schema:"http://json-schema.org/draft-07/schema#",references:e}));return JSON.stringify(n,null,2)}async compress(e){return this.encode(e).andThen(n=>this.parse(n)).andThenAsync(n=>Sp(n,N(this,Mn))).then(n=>n.mapErr(r=>{var i;return ga((i=N(this,Tt).$id)!=null?i:"CoreMVF",r,[...N(this,Dt).values()])}))}async compressUnsafe(e){return this.encode(e).andThenAsync(n=>Sp(n,N(this,Mn))).then(n=>n.mapErr(r=>{var i;return ga((i=N(this,Tt).$id)!=null?i:"CoreMVF",r,[...N(this,Dt).values()])}))}compressSync(e){return this.encode(e).andThen(n=>this.parse(n)).andThen(n=>Mp(n,N(this,Mn))).mapErr(n=>{var r;return ga((r=N(this,Tt).$id)!=null?r:"CoreMVF",n,[...N(this,Dt).values()])})}compressUnsafeSync(e){return this.encode(e).andThen(n=>Mp(n,N(this,Mn))).mapErr(n=>{var r;return ga((r=N(this,Tt).$id)!=null?r:"CoreMVF",n,[...N(this,Dt).values()])})}async decompress(e){return wp(e,N(this,Mn)).then(n=>n.andThen(r=>this.parse(r)).andThen(r=>this.decode(r)).mapErr(r=>{var i;return ya((i=N(this,Tt).$id)!=null?i:"CoreMVF",r,[...N(this,Dt).values()])}))}async decompressUnsafe(e){return wp(e,N(this,Mn)).then(n=>n.andThen(r=>this.decode(r)).mapErr(r=>{var i;return ya((i=N(this,Tt).$id)!=null?i:"CoreMVF",r,[...N(this,Dt).values()])}))}decompressSync(e){return Ep(e,N(this,Mn)).andThen(n=>this.parse(n)).andThen(n=>this.decode(n)).mapErr(n=>{var r;return ya((r=N(this,Tt).$id)!=null?r:"CoreMVF",n,[...N(this,Dt).values()])})}decompressUnsafeSync(e){return Ep(e,N(this,Mn)).andThen(n=>this.decode(n)).mapErr(n=>{var r;return ya((r=N(this,Tt).$id)!=null?r:"CoreMVF",n,[...N(this,Dt).values()])})}};Tt=new WeakMap,yo=new WeakMap,Mn=new WeakMap,Dt=new WeakMap,s(xl,"MVFParser");var yl=xl;var xo,Tp=class Tp{constructor(){vt(this,xo,[]);this.extend=this.extend.bind(this)}extend(e){return N(this,xo).push(e),this}extendOptional(e){let n=O(y({},e),{schema:u.Partial(e.schema)});return N(this,xo).push(n),this}build(e){return yl.create(this,void 0,e==null?void 0:e.cspSafe)}get extensions(){return N(this,xo)}};xo=new WeakMap,s(Tp,"MVFParserBuilder");var _l=Tp;l();l();l();l();var _o=u.Object({geometryId:u.Ref(jt),floorId:u.Ref(_e)},{$id:"GeometryAnchor"}),eO=u.Object({geometryAnchor:u.Ref(_o)}),xa=s((t,e)=>u.Object({geometryAnchors:u.Array(u.Ref(_o),t)},e),"WithGeometryAnchors"),Ip=[_o];l();l();l();var Tx=s((t,e)=>u.Unsafe(u.Transform(u.String(e)).Decode(n=>t.includes(n)?n:"unknown").Encode(n=>n)),"SafeStringEnumSchema"),dn=s((t,e)=>{let n=Tx(t,e),r=[...t,"unknown"],i=Object.freeze(Object.fromEntries([...t,"unknown"].map(o=>[o,o])));return{schema:n,values:r,record:i}},"SafeStringEnum");var Ax=s(()=>new _l().extend(ax).extend(dx).extend(gx),"createParser");l();l();l();l();l();l();var _a;(function(t){t.AnnotationNonPointGeometryError="AnnotationNonPointGeometryError",t.AnnotationUnknownSymbolError="AnnotationUnknownSymbolError"})(_a||(_a={}));var Rx=s(t=>{var i;if(t.annotations==null)return G(!0);let e=pt(t.annotations,o=>o.id,"annotations");if(e.isErr())return e;let n=Mt(t),r=new Set(ke((i=t.annotationSymbols)!=null?i:{}));for(let o of ke(t.annotations)){let a=t.annotations[o];if(a!=null)for(let c of a){if(!r.has(c.symbolKey))return $({kind:_a.AnnotationUnknownSymbolError,properties:{annotationId:c.id,symbolKey:c.symbolKey}});let f=n(o,c.geometryId);if(f.isErr())return f;if(f.value.geometry.type!=="Point")return $({kind:_a.AnnotationNonPointGeometryError,properties:{annotationId:c.id,floorId:o,geometryId:c.geometryId}})}}return G(!0)},"validateAnnotations");var Cx=dt("a","AnnotationId"),Ap=u.Intersect([Wn,u.Object({id:u.Ref(Cx,{description:"The unique identifier for the annotation."}),externalId:u.Optional(u.String({description:"The external identifier for the annotation."})),symbolKey:u.String({description:"The symbol identifier for the annotation."})})],{$id:"AnnotationProperties"}),Px=u.Object({url:u.String({format:"uri",description:"The URL for the symbol."}),name:u.String({description:"The name of the symbol."})},{$id:"AnnotationSymbol"}),tO=u.Object({annotations:ht(u.Record(_e,u.Array(u.Ref(Ap)),{additionalProperties:!1})),annotationSymbols:ht(u.Record(u.Index(Ap,["symbolKey"]),u.Ref(Px)))},{$id:"AnnotationsSchema"}),nO=/^annotations\/(.*)\.json$/,Fx={name:"ext:mvf-annotations",schema:tO,intoBundle:s(function*(t){if(t.annotations!=null)for(let e of ke(t.annotations))yield{path:"annotations/".concat(e,".json"),contents:t.annotations[e]};t.annotationSymbols!=null&&(yield{path:"annotation-symbols.json",contents:t.annotationSymbols})},"intoBundle"),fromBundle:s((t,e,n)=>{var i;if(t==="annotation-symbols.json")return{annotationSymbols:n(e)};let r=(i=t.match(nO))==null?void 0:i[1];if(r)return{annotations:{[r]:n(e)}}},"fromBundle"),references:[Cx,Ap,Px],integrityCheck:Rx};l();l();l();var Qr=dt("lcat","LocationCategoryId"),Rp=u.Intersect([u.Object({id:u.Ref(Qr),parent:u.Optional(u.Ref(Qr))}),Qi(["name"]),ir],{$id:"LocationCategory"}),Ox=[Qr,Rp];l();l();var os;(function(t){t.UnknownCategoryError="UnknownCategoryError",t.UnknownParentCategoryError="UnknownParentCategoryError",t.UnknownParentLocationError="UnknownParentLocationError"})(os||(os={}));var Lx=s(t=>{var i,o,a,c,f,d,p,h,g;if(t.locationCategories==null&&t.locations==null)return G(!0);if(t.locationCategories!=null){let x=pt(t.locationCategories,b=>b.id,"locationCategories");if(x.isErr())return x}if(t.locations!=null){let x=pt(t.locations,b=>b.id,"locations");if(x.isErr())return x}if(t.locationInstances!=null){let x=pt(t.locationInstances,b=>b.id,"locationInstances");if(x.isErr())return x}let e=new Set((o=(i=t.locationCategories)==null?void 0:i.map(x=>x.id))!=null?o:[]);for(let x of(a=t.locationCategories)!=null?a:[])if(x.parent!=null&&!e.has(x.parent))return $({kind:os.UnknownParentCategoryError,properties:{categoryId:x.id,parentCategoryId:x.parent}});let n=Mt(t);for(let x of(c=t.locations)!=null?c:[]){for(let b of x.categories)if(!e.has(b))return $({kind:os.UnknownCategoryError,properties:{locationId:x.id,categoryId:b}});for(let b of x.geometryAnchors){let E=n(b.floorId,b.geometryId);if(E.isErr())return E}}let r=new Set((d=(f=t.locations)==null?void 0:f.map(x=>x.id))!=null?d:[]);for(let x of(p=t.locationInstances)!=null?p:[]){if(!r.has(x.parentId))return $({kind:os.UnknownParentLocationError,properties:{locationInstanceId:x.id,parentLocationId:x.parentId}});for(let b of(h=x.categories)!=null?h:[])if(!e.has(b))return $({kind:os.UnknownCategoryError,properties:{locationId:x.id,categoryId:b}});for(let b of(g=x.geometryAnchors)!=null?g:[]){let E=n(b.floorId,b.geometryId);if(E.isErr())return E}}return G(!0)},"validateLocations");l();var ei=dt("loc","LocationId"),vl=dt("loci","LocationInstanceId"),Nx=u.Object({name:u.String(),url:u.String({format:"uri"})},{$id:"LocationSocial"}),Ux=u.Object({url:u.String({format:"uri"})},{$id:"LocationImage"}),Cp=u.Object({label:u.String(),url:u.String({format:"uri"})},{$id:"LocationLink"}),Pp=u.String({pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",$id:"OpeningHoursTime"}),Dx=u.Union([u.Literal("Sunday"),u.Literal("Monday"),u.Literal("Tuesday"),u.Literal("Wednesday"),u.Literal("Thursday"),u.Literal("Friday"),u.Literal("Saturday")],{$id:"OpeningHoursDay"}),rO="PublicHolidays",Fp=u.Union([Dx,u.Literal(rO)],{$id:"OpeningHoursDayOrPublicHoliday"}),bl=u.Object({"@type":u.Optional(u.Literal("OpeningHoursSpecification",{description:"The type of opening hours"})),opens:u.Optional(u.Ref(Pp,{description:"The time the opening hours start"})),closes:u.Optional(u.Ref(Pp,{description:"The time the opening hours end"})),dayOfWeek:u.Optional(u.Union([u.Ref(Fp),u.Array(u.Ref(Fp))],{description:"The days of the week the opening hours apply to"})),validFrom:u.Optional(u.String({format:"date",description:"The date the opening hours start, in ISO 8601 format"})),validTo:u.Optional(u.String({format:"date",description:"The date the opening hours end, in ISO 8601 format"}))},{$id:"OpeningHoursSpecification"}),Sl=u.Intersect([u.Object({id:u.Ref(ei),categories:u.Array(u.Ref(Qr)),logo:u.Optional(u.String({format:"uri"})),phone:u.Optional(u.String()),social:u.Array(u.Ref(Nx)),images:u.Array(u.Ref(Ux)),links:u.Array(u.Ref(Cp)),website:u.Optional(u.Ref(Cp)),openingHours:u.Optional(u.Array(u.Ref(bl)))}),Qi(["name"]),xa(),ir],{$id:"Location"}),Op=u.Intersect([u.Object({id:u.Ref(vl),parentId:u.Ref(ei)}),u.Partial(u.Omit(Sl,["id","parentId","details"])),yn],{$id:"LocationInstance",description:"A location instance is a particular instance of an location that has some properties different from the parent."}),Ml=[ei,vl,Nx,Ux,Cp,Pp,Dx,Fp,bl,Sl,Op];var iO=u.Object({locations:u.Array(u.Ref(Sl)),locationCategories:u.Array(u.Ref(Rp)),locationInstances:u.Optional(u.Array(u.Ref(Op)))},{$id:"LocationsExtensionSchema"}),kx="locations.json",Bx="location-categories.json",zx="location-instances.json",Vx={name:"ext:locations",schema:iO,intoBundle:s(function*(t){t.locations!=null&&(yield{path:kx,contents:t.locations}),t.locationCategories!=null&&(yield{path:Bx,contents:t.locationCategories}),t.locationInstances!=null&&(yield{path:zx,contents:t.locationInstances})},"intoBundle"),fromBundle:s((t,e,n)=>{if(t===kx)return{locations:n(e)};if(t===Bx)return{locationCategories:n(e)};if(t===zx)return{locationInstances:n(e)}},"fromBundle"),references:[...Ox,...Ml],integrityCheck:Lx};l();l();var sr;(function(t){t.EnterpriseLocationWithUnknownLocationError="EnterpriseLocationWithUnknownLocationError",t.EnterpriseCategoryWithUnknownLocationCategoryError="EnterpriseCategoryWithUnknownLocationCategoryError",t.InstanceWithUnknownLocationInstanceError="InstanceWithUnknownLocationInstanceError",t.InstanceWithUnknownEnterpriseLocationError="InstanceWithUnknownEnterpriseLocationError",t.EnterpriseLocationWithUnknownSibling="EnterpriseLocationWithUnknownSibling",t.EnterpriseLocationInstanceWithUnknownSibling="EnterpriseLocationInstanceWithUnknownSibling",t.EnterpriseVenueWithUnknownTopLocationError="EnterpriseVenueWithUnknownTopLocationError",t.EnterpriseLocationWithInvalidPrimaryCategory="EnterpriseLocationWithInvalidPrimaryCategory"})(sr||(sr={}));var Gx=s(t=>{var g,x,b,E,R,A,Q,W,F,H,ie,X,Z,q,ve,he,Oe,mt,Be,ze;if(t.cms==null)return G(!0);let e=t.cms,n=pt(t.cms.categories,L=>L.id,"cms.categories");if(n.isErr())return n;let r=new Set((x=(g=t.locationCategories)==null?void 0:g.map(L=>L.id))!=null?x:[]);for(let L of(b=e.categories)!=null?b:[])if(!r.has(L.categoryId))return $({kind:sr.EnterpriseCategoryWithUnknownLocationCategoryError,properties:{enterpriseCategoryId:L.id,locationCategoryId:L.categoryId}});let i=pt(t.cms.locations,L=>L.id,"cms.locations");if(i.isErr())return i;let o=new Map((R=(E=t.locations)==null?void 0:E.map(L=>[L.id,L]))!=null?R:[]);for(let L of(A=e.locations)!=null?A:[]){if(!o.has(L.locationId))return $({kind:sr.EnterpriseLocationWithUnknownLocationError,properties:{enterpriseLocationId:L.id,locationId:L.locationId}});for(let ee of(Q=L.siblingGroups)!=null?Q:[])for(let ce of(W=ee.siblings)!=null?W:[])if(!o.has(ce))return $({kind:sr.EnterpriseLocationWithUnknownSibling,properties:{enterpriseLocationId:L.id,siblingLocationId:ce,label:ee.label}});if(L.primaryCategory!=null){let ee=o.get(L.locationId);if(ee!=null&&!ee.categories.includes(L.primaryCategory))return $({kind:sr.EnterpriseLocationWithInvalidPrimaryCategory,properties:{enterpriseLocationId:L.id,locationId:L.locationId,primaryCategory:L.primaryCategory}})}}if(((F=e.venue)==null?void 0:F.topLocations)!=null){for(let L of e.venue.topLocations)if(!o.has(L))return $({kind:sr.EnterpriseVenueWithUnknownTopLocationError,properties:{locationId:L}})}let a=new Set((ie=(H=t.cms.locations)==null?void 0:H.map(L=>L.id))!=null?ie:[]),c=pt(t.cms.locationInstances,L=>L.id,"cms.locationInstances");if(c.isErr())return c;let f=new Set((Z=(X=t.locationInstances)==null?void 0:X.map(L=>L.id))!=null?Z:[]);for(let L of(q=e.locationInstances)!=null?q:[]){if(!a.has(L.parentId))return $({kind:sr.InstanceWithUnknownEnterpriseLocationError,properties:{enterpriseLocationInstanceId:L.id,enterpriseLocationId:L.parentId}});if(!f.has(L.locationInstanceId))return $({kind:sr.InstanceWithUnknownLocationInstanceError,properties:{enterpriseLocationInstanceId:L.id,locationInstanceId:L.locationInstanceId}});for(let ee of(ve=L.siblingGroups)!=null?ve:[])for(let ce of(he=ee.siblings)!=null?he:[])if(!o.has(ce))return $({kind:sr.EnterpriseLocationInstanceWithUnknownSibling,properties:{enterpriseLocationInstanceId:L.id,siblingLocationId:ce,label:ee.label}})}let d=rr(t),p=Mt(t),h=pt(t.cms.floorText,L=>L.properties.id,"cms.floorText");if(h.isErr())return h;for(let[L,ee]of Yt((Oe=e.floorText)!=null?Oe:{})){let ce=d(L);if(ce.isErr())return ce;for(let se of ee.features){if(!("geometryId"in se.properties))continue;let Ee=p(L,se.properties.geometryId);if(Ee.isErr())return Ee}}for(let[L,ee]of Yt((mt=e.textures)!=null?mt:{})){let ce=d(L);if(ce.isErr())return ce;for(let se of ee){let Ee=p(L,se.geometryId);if(Ee.isErr())return Ee}}for(let[L,ee]of Yt((Be=e.layers)!=null?Be:{})){let ce=d(L);if(ce.isErr())return ce;for(let se of ke(ee!=null?ee:{})){let Ee=p(L,se);if(Ee.isErr())return Ee}}for(let[L,ee]of Yt((ze=e.textAreas)!=null?ze:{})){let ce=d(L);if(ce.isErr())return ce;for(let se of ee.features)if("geometryId"in se.properties){let Ee=p(L,se.properties.geometryId);if(Ee.isErr())return Ee}}return G(!0)},"validateCMS");l();l();var va=dt("el","EnterpriseLocationId"),Lp=dt("ec","EnterpriseCategoryId"),Np=dt("eli","EnterpriseLocationInstanceId"),Up=dt("ev","EnterpriseVenueId"),Dp=dt("eft","EnterpriseFloorTextId"),Hx=[va,Lp,Np,Up,Dp];var $x=u.Object({id:u.Ref(Lp),categoryId:u.Ref(Qr),color:u.Optional(u.String()),sortOrder:u.Number(),iconFromDefaultList:u.Optional(u.Union([u.String(),u.Null()])),picture:u.Optional(u.String({format:"uri",description:"The category's picture"}))},{$id:"EnterpriseCategory"}),kp=u.Object({categories:u.Optional(u.Array(u.Ref($x)))},{$id:"EnterpriseCategoriesSchema"}),Wx=[$x,kp];l();var jx=dn(["left","center","right"]),sO=jx.schema,Pne=jx.values,Bp=u.Object({id:u.Ref(Dp),text:u.String(),visible:u.Boolean({default:!0}),fontSize:u.Number({default:12,exclusiveMinimum:0}),fontFamily:u.String({default:"Droid Sans"}),color:u.String({default:"black"}),rotation:u.Number({minimum:0,maximum:360}),align:sO},{$id:"FloorTextCommonProperties"}),zp=u.Intersect([u.Ref(Bp),Wn],{$id:"AnchoredFloorTextProperties"}),Vp=u.Intersect([u.Ref(Bp),u.Object({verticalOffset:u.Number()})],{$id:"FloatingFloorTextProperties"}),Xx=u.Union([u.Ref(zp),u.Ref(Vp)],{$id:"FloorTextProperties"}),qx=Ft(Wt,u.Ref(Xx),{$id:"FloorTextFeature"}),oO=Ft(Wt,u.Ref(zp),{$id:"AnchoredFloorTextFeature"}),aO=Ft(Wt,u.Ref(Vp),{$id:"FloatingFloorTextFeature"}),Kx=nn(u.Ref(qx),{$id:"EnterpriseFloorTextFeatureCollection"}),Yx=u.Record(_e,u.Ref(Kx),{$id:"EnterpriseFloorTextCollectionsByFloor",additionalProperties:!1}),Gp=u.Object({floorText:u.Optional(u.Ref(Yx))},{$id:"EnterpriseFloorTextSchema"}),Zx=[Bp,zp,Vp,Xx,qx,oO,aO,Kx,Yx,Gp];l();var Jx=ht(u.Record(jt,u.String({minLength:1}),{additionalProperties:!1,$id:"EnterpriseLayers"})),Qx=ht(u.Record(_e,u.Ref(Jx),{additionalProperties:!1,$id:"EnterpriseLayersByFloor"})),Hp=u.Object({layers:u.Optional(u.Ref(Qx))},{$id:"EnterpriseLayersSchema"}),e0=[Jx,Qx,Hp];l();l();l();var $p=dn(["closed-temporarily","new","pop-up","coming-soon","relocated"]),cO=$p.schema,Gne=$p.values,Hne=$p.record,Wp=u.Object({type:cO,start:u.Optional(u.String({format:"date",description:"The start date of the state"})),end:u.Optional(u.String({format:"date",description:"The end date of the state"}))},{$id:"LocationState",description:"The state of a location. Start and end dates are optional."}),jp=u.Object({label:u.String(),siblings:u.Array(u.Ref(ei))},{$id:"SiblingGroup"}),wl=u.Object({name:u.String(),code:u.String()},{$id:"Language"}),t0=[Wp,jp,wl];var El=u.Object({id:u.Ref(va),locationId:u.Ref(ei),cmsId:u.String(),type:u.String(),sortOrder:u.Number(),tags:u.Optional(u.Array(u.String())),picture:u.Optional(u.String({format:"uri",description:"The picture of the location"})),states:u.Optional(u.Array(u.Ref(Wp),{description:"The location's state. No more than one state should be active at a time, and all but at most one should have dates set"})),siblingGroups:u.Optional(u.Array(u.Ref(jp))),gallery:u.Optional(u.Array(u.Object({caption:u.Optional(u.String()),image:u.String({format:"uri"}),embeddedUrl:u.Optional(u.String({format:"uri",description:"The URL to link from the image"}))},{description:"The location's image gallery"}),{description:"The location's image gallery"})),showFloatingLabelWhenImagePresent:u.Optional(u.Boolean({description:"Whether to show the flat label when an image is present"})),amenity:u.Optional(u.String({description:"The location's amenity type. Only set if the location is an amenity"})),showLogo:u.Optional(u.Boolean({description:"Whether to show the logo of the location"})),primaryCategory:u.Optional(u.Ref(Qr))},{$id:"EnterpriseLocation"}),Xp=u.Object({locations:u.Optional(u.Array(u.Ref(El)))},{$id:"EnterpriseLocationsSchema"}),n0=[El,Xp];var r0=u.Intersect([u.Object({id:u.Ref(Np),parentId:u.Ref(va),locationInstanceId:u.Ref(vl)}),u.Partial(u.Omit(El,["id","parentId","locationId"]))],{$id:"EnterpriseLocationInstance",description:"A locationInstance is a particular instance of an Enterprise Location that has some properties different from the parent."}),qp=u.Object({locationInstances:u.Optional(u.Array(u.Ref(r0)))},{$id:"EnterpriseLocationInstancesSchema"}),i0=[r0,qp];l();var Kp=dn(["near","center"],{$id:"EnterpriseTextAreaAlignment"}),s0=Kp.schema,cre=Kp.values,lre=Kp.record,Yp=u.Object({maxWidth:u.Number({exclusiveMinimum:0,description:"The maximum width of the label, in meters."}),maxHeight:u.Number({exclusiveMinimum:0,description:"The maximum height of the label, in meters."}),align:u.Ref(s0),rotation:u.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"EnterpriseBaseTextAreaProperties"}),o0=u.Intersect([u.Ref(Yp),Wn],{$id:"EnterpriseAnchoredTextAreaProperties"}),a0=u.Intersect([u.Ref(Yp),u.Object({verticalOffset:u.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"EnterpriseFloatingTextAreaProperties"}),c0=u.Union([o0,a0],{$id:"EnterpriseTextAreaProperties"}),l0=Ft(u.Ref(Wt),c0,{$id:"EnterpriseTextAreaFeature"}),u0=nn(u.Ref(l0),{$id:"EnterpriseTextAreaCollection"}),f0=u.Record(_e,u.Ref(u0),{$id:"EnterpriseTextAreasByFloor",additionalProperties:!1}),d0=u.Object({textAreas:u.Optional(u.Ref(f0))},{$id:"EnterpriseTextAreasSchema"}),p0=[s0,Yp,o0,a0,c0,l0,u0,f0];l();var Zp=u.Object({u:u.Number(),v:u.Number()},{$id:"EnterpriseTextureUV"}),Jp=dn(["top","side"],{$id:"EnterpriseTextureFace"}),h0=Jp.schema,hre=Jp.values,mre=Jp.record,Qp=dn(["inside","outside","both"],{$id:"EnterpriseTextureSurface"}),m0=Qp.schema,gre=Qp.values,yre=Qp.record,g0=u.Tuple([Xs,qs,Xs,qs],{$id:"EnterpriseTextureBounds"}),y0=u.Intersect([u.Object({repeat:u.Ref(Zp),offset:u.Ref(Zp),rotation:u.Number({minimum:0,maximum:360}),path:u.String({format:"uri"}),face:u.Ref(h0),surface:u.Ref(m0),bounds:u.Ref(g0)},{$id:"EnterpriseTextureProperties"}),Wn],{$id:"EnterpriseTexture"}),x0=u.Array(u.Ref(y0),{$id:"EnterpriseTextures"}),_0=u.Record(_e,u.Ref(x0),{$id:"EnterpriseTexturesByFloor",additionalProperties:!1}),eh=u.Object({textures:u.Optional(u.Ref(_0))},{$id:"EnterpriseTexturesSchema"}),v0=[y0,x0,eh,Zp,h0,m0,g0,_0];l();var b0=u.Intersect([u.Object({id:u.Ref(Up),slug:u.String(),defaultLanguage:u.Ref(wl),languages:u.Array(u.Ref(wl)),countrycode:u.Optional(u.String()),logo:u.Optional(u.String({format:"uri"})),mappedinWebUrl:u.Optional(u.String({format:"uri"})),topLocations:u.Optional(u.Array(u.Ref(ei))),operationHours:u.Optional(u.Array(u.Ref(bl))),coverImage:u.Optional(u.String({format:"uri"}))}),Qi(["name"]),ir],{$id:"EnterpriseVenue"}),th=u.Object({venue:u.Optional(u.Ref(b0))},{$id:"EnterpriseVenueSchema"}),S0=[b0,th];var w0=u.Intersect([th,Xp,qp,kp,eh,Gp,Hp,d0],{$id:"CMSProperties"}),M0=u.Object({cms:u.Optional(u.Ref(w0))},{$id:"CMSExtensionSchema"}),lO=/^cms\/(?:([^/]+)\/)?([^/]+)\.(?:json|geojson)$/,E0={name:"ext:cms",schema:M0,intoBundle:s(function*(t){var n,r,i,o,a,c;if(t.cms==null)return;let e=t.cms;for(let f of ke(e))switch(f){case"floorText":for(let d of ke((n=e.floorText)!=null?n:{}))yield{path:"cms/floorText/".concat(d,".geojson"),contents:((r=e.floorText)!=null?r:{})[d]};continue;case"textures":for(let d of ke((i=e.textures)!=null?i:{}))yield{path:"cms/textures/".concat(d,".json"),contents:((o=e.textures)!=null?o:{})[d]};continue;case"textAreas":for(let d of ke((a=e.textAreas)!=null?a:{}))yield{path:"cms/textAreas/".concat(d,".geojson"),contents:((c=e.textAreas)!=null?c:{})[d]};continue;default:yield{path:"cms/".concat(f,".json"),contents:e[f]};continue}},"intoBundle"),fromBundle:s((t,e,n)=>{let r=t.match(lO);if(!r)return;let[,i,o]=r,a=n(e);switch(i){case"floorText":case"textures":case"textAreas":return{cms:{[i]:{[o]:a}}};default:return{cms:{[o]:a}}}},"fromBundle"),references:[w0,M0,...S0,...n0,...i0,...Wx,...v0,...e0,...Zx,...p0,...Hx,...t0,...Ml],integrityCheck:Gx};l();l();l();l();var or;(function(t){t.NavigationFlagMissingDeclaration="NavigationFlagMissingDeclaration",t.NavigationFlagDuplicateBit="NavigationFlagDuplicateBit",t.NavigationFlagIncorrectFlagsLength="NavigationFlagIncorrectFlagsLength",t.NavigationFlagValueTooBig="NavigationFlagValueTooBig"})(or||(or={}));var I0=s(t=>{let{navigationFlags:e}=t;if(!e||Object.keys(e).length===0)return G(!0);let n=Object.entries(e).map(([o,a])=>y({key:o},a)).sort((o,a)=>o.index!==a.index?o.index-a.index:o.bit-a.bit),r=0,i=-1;for(let o of n){if(o.bit===i)return $({kind:or.NavigationFlagDuplicateBit,properties:{index:o.index,bit:o.bit,path:"navigationFlags.".concat(o.key)}});if(o.index!=r){if(i!=31)return $({kind:or.NavigationFlagMissingDeclaration,properties:{index:r,bit:i+1,path:"navigationFlags"}});if(o.index!=r+1||o.bit!=0)return $({kind:or.NavigationFlagMissingDeclaration,properties:{index:r+1,bit:0,path:"navigationFlags"}});r=o.index,i=0}else{if(o.bit!==i+1)return $({kind:or.NavigationFlagMissingDeclaration,properties:{index:o.index,bit:i+1,path:"navigationFlags"}});i=o.bit}}return G(!0)},"validateNavigationFlags");l();var T0=2**32-1,ba=s(t=>{var i;let e=Object.keys((i=t.navigationFlags)!=null?i:{}).length;if(e===0)return{index:-1,flag:0};let n=Math.floor(e/32),r=e%32;return{index:n,flag:2**r-1}},"determineMaxNavigationFlags"),vo=s((t,e,n)=>{if(e.index==-1&&t.length===0)return G(!0);let r=e.flag>0||e.index===-1?e.index+1:e.index;if(t.length!==r)return $({kind:or.NavigationFlagIncorrectFlagsLength,properties:{expected:r,actual:t.length,path:n}});for(let i=0;i<t.length;i++){let o=t[i];if(i<e.index){if(o>T0)return $({kind:or.NavigationFlagValueTooBig,properties:{index:i,flagValue:o,expectedMaxFlagValue:T0,path:n}});continue}else if(o>e.flag)return $({kind:or.NavigationFlagValueTooBig,properties:{index:i,flagValue:o,expectedMaxFlagValue:e.flag,path:n}})}return G(!0)},"validateFlags");var uO=u.Object({index:u.Integer({description:"The index of the flag in a flags array.",minimum:0}),bit:u.Integer({description:"The bit position of the flag in a flag's bitfield.",minimum:0,maximum:31})},{$id:"NavigationFlagDeclarationCore"}),A0=u.Intersect([uO,yn],{$id:"NavigationFlagDeclaration",description:'A NavigationFlagDeclaration describes the relationship between a "key" that a developer might use to wayfind using that flag, and the index and bit position in an object\'s `flags` array.'});var R0=u.Record(u.String(),A0,{$id:"NavigationFlagDeclarations",description:"Any well known and custom flags present in the MVF"}),fO=u.Object({navigationFlags:u.Ref(R0)},{$id:"NavigationFlagsSchema"}),Il=u.Array(u.Integer({minimum:0,maximum:Math.pow(2,32)-1}),{$id:"Flags"}),nh=u.Object({flags:u.Ref(Il)},{$id:"WithFlags"}),as=u.Intersect([_o,nh],{$id:"FlaggedGeometryAnchor"}),dO=u.Object({geometryAnchor:as},{$id:"WithFlaggedGeometryAnchor"}),pO=u.Object({geometryAnchors:u.Array(as)},{$id:"WithFlaggedGeometryAnchors"}),C0={name:"ext:mvf-navigation-flags",schema:fO,intoBundle:s(function*(t){t.navigationFlags!=null&&(yield{path:"navigationFlags.json",contents:t.navigationFlags})},"intoBundle"),fromBundle:s((t,e,n)=>t!=="navigationFlags.json"?void 0:{navigationFlags:n(e)},"fromBundle"),references:[A0,R0,Il,as,dO,pO],integrityCheck:I0};l();var P0=s(t=>{if(t.connections==null)return G(!0);let e=pt(t.connections,i=>i.id,"connections");if(e.isErr())return e;let n=Mt(t),r=ba(t);for(let[i,o]of t.connections.entries()){for(let[a,c]of o.entrances.entries()){let f=n(c.floorId,c.geometryId);if(f.isErr())return f;let d=vo(c.flags,r,"connections[".concat(i,"].entrances[").concat(a,"]"));if(d.isErr())return d}for(let[a,c]of o.exits.entries()){let f=n(c.floorId,c.geometryId);if(f.isErr())return f;let d=vo(c.flags,r,"connections[".concat(i,"].exits[").concat(a,"]"));if(d.isErr())return d}}return G(!0)},"validateConnections");var O0=dt("c","ConnectionId"),{schema:hO,values:bie,record:Sie}=dn(["elevator","escalator","travelator","stairs","door","ramp"],{$id:"ConnectionType"}),L0=hO;var N0=u.Intersect([u.Object({id:u.Ref(O0,{description:"The unique identifier for the connection."}),entrances:u.Array(u.Ref(as)),exits:u.Array(u.Ref(as)),entryCost:u.Number({description:"The cost to enter the connection.",minimum:0}),floorCostMultiplier:u.Number({description:"The cost multiplier for each floor transitioned.",minimum:1}),type:u.Ref(L0,{description:"The type of connection."})}),yn,ir],{$id:"ConnectionsProperties"}),U0=u.Array(u.Ref(N0),{$id:"ConnectionsCollection"}),mO=u.Object({connections:u.Ref(U0)},{$id:"ConnectionsExtensionSchema"}),F0="connections.json",D0={name:"ext:connections",schema:mO,intoBundle:s(function*(t){t.connections!=null&&(yield{path:F0,contents:t.connections})},"intoBundle"),fromBundle:s((t,e,n)=>{if(t===F0)return{connections:n(e)}},"fromBundle"),references:[N0,U0,L0,O0,as,Il],integrityCheck:P0};l();l();var k0=s(t=>{if(t.defaultStyle==null)return G(!0);let e=Mt(t);for(let n of Object.values(t.defaultStyle))if(n!=null)for(let r of n.geometryAnchors){let i=e(r.floorId,r.geometryId);if(i.isErr())return i}return G(!0)},"validateDefaultStyle");var B0=u.Intersect([xa(),ir,u.Object({altitude:u.Number({description:"How far off the bottom of the floor the objects with this style should be drawn, in meters."}),color:u.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB"}),height:u.Number({minimum:0,description:"The height of the objects belonging to this layer, in meters."}),opacity:u.Number({minimum:0,maximum:1,description:"The opacity of the objects belonging to this layer, from 0 to 1."}),buffer:u.Number({description:"The buffer amount to apply to the geometry, in meters. This can be used to inflate line string geometry for walls, but might also be applicable as a way to grow or shrink polygon geometry for aesthetic purposes. Can be negative."}),hidden:u.Optional(u.Boolean({description:"Whether or not the objects with this style should be hidden."}))})],{$id:"DefaultStyle"}),z0=u.Record(u.String(),u.Ref(B0),{$id:"DefaultStyleCollection",additionalProperties:!1}),gO=u.Object({defaultStyle:u.Ref(z0)},{$id:"DefaultStyleSchema"}),V0={name:"ext:mvf-default-style",schema:gO,intoBundle:s(function*(t){t.defaultStyle!=null&&(yield{path:"default-style.json",contents:t.defaultStyle})},"intoBundle"),fromBundle:s((t,e,n)=>{if(t==="default-style.json")return{defaultStyle:n(e)}},"fromBundle"),references:[B0,z0],integrityCheck:k0};l();l();l();l();var Tl;(function(t){t.InvalidDefaultFloorError="InvalidDefaultFloorError"})(Tl||(Tl={}));var G0=s(t=>{if(t.floorStacks==null)return G(!0);let e=pt(t.floorStacks,r=>r.id,"floorStacks");if(e.isErr())return e;let n=rr(t);for(let r of t.floorStacks){for(let i of r.floors){let o=n(i);if(o.isErr())return o}if(r.defaultFloor!=null&&!r.floors.includes(r.defaultFloor))return $({kind:Tl.InvalidDefaultFloorError,properties:{floorStackId:r.id,floorId:r.defaultFloor}})}return G(!0)},"validateFloorStacks");var Sa=dt("fs","FloorStackId"),$0=u.Intersect([u.Object({id:u.Ref(Sa,{description:"The unique identifier for the floor stack."}),floors:u.Array(u.Ref(_e),{uniqueItems:!0,minItems:1,description:"The floors that are part of this floor stack."}),defaultFloor:u.Optional(u.Ref(_e,{description:"The default floor for the floor stack."}))}),yn],{$id:"FloorStacksProperties"}),W0=u.Array(u.Ref($0),{$id:"FloorStackCollection"}),yO=u.Object({floorStacks:u.Ref(W0)},{$id:"FloorStackExtensionSchema"}),H0="floor-stacks.json",j0={name:"ext:floor-stacks",schema:yO,intoBundle:s(function*(t){t.floorStacks!=null&&(yield{path:H0,contents:t.floorStacks})},"intoBundle"),fromBundle:s((t,e,n)=>{if(t===H0)return{floorStacks:n(e)}},"fromBundle"),references:[Sa,$0,W0],integrityCheck:G0};l();l();var Ma;(function(t){t.MissingFloorStackError="MissingFloorStackError",t.UnknownFloorStackError="UnknownFloorStackError"})(Ma||(Ma={}));var X0=s(t=>{if(t.facade==null)return G(!0);if(t.floorStacks==null)return $({kind:Ma.MissingFloorStackError,properties:null});let e=new Set(t.floorStacks.map(i=>i.id)),n=Mt(t),r=rr(t);for(let[i,o]of Yt(t.facade)){if(o==null)continue;let a=r(i);if(a.isErr())return a;for(let c of o){let{floorStackId:f,geometryIds:d}=c;if(!e.has(f))return $({kind:Ma.UnknownFloorStackError,properties:{floorStackId:f}});for(let p of d){let h=n(i,p);if(h.isErr())return h}}}return G(!0)},"validateFacade");var q0=u.Intersect([u.Object({floorStackId:u.Ref(Sa)}),ho],{$id:"Facade"}),xO=u.Object({facade:ht(u.Record(_e,u.Array(u.Ref(q0)),{additionalProperties:!1}))},{$id:"FacadeExtensionSchema"}),_O=/^facade\/(.*)\.json$/,K0={name:"ext:facade",schema:xO,intoBundle:s(function*(t){if(t.facade!=null)for(let e of ke(t.facade))yield{path:"facade/".concat(e,".json"),contents:t.facade[e]}},"intoBundle"),fromBundle:s((t,e,n)=>{var i;let r=(i=t.match(_O))==null?void 0:i[1];if(r)return{facade:{[r]:n(e)}}},"fromBundle"),references:[Sa,q0],integrityCheck:X0};l();l();var Y0=s(t=>{if(t.floorImages==null)return G(!0);let e=Mt(t);for(let[n,r]of Yt(t.floorImages))if(r!=null)for(let i of r.features){if(!("geometryId"in i.properties))continue;let o=i.properties.geometryId,a=e(n,o);if(a.isErr())return a}return G(!0)},"validateFloorImages");var rh=u.Object({path:u.String({format:"uri",description:"The path to the image. This will be a remote URL."}),width:u.Number({minimum:0,description:"The width of the image when represented on the map, in meters."}),height:u.Number({minimum:0,description:"The height of the image when represented on the map, in meters."}),rotation:u.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"BaseFloorImageProperties"}),Z0=u.Intersect([u.Ref(rh),Wn],{$id:"AnchoredFloorImageProperties"}),J0=u.Intersect([u.Ref(rh),u.Object({verticalOffset:u.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"FloatingFloorImageProperties"}),Q0=u.Union([Z0,J0],{$id:"FloorImageProperties"}),e_=Ft(u.Ref(Wt),Q0,{$id:"FloorImageFeature"}),t_=nn(u.Ref(e_),{$id:"FloorImageCollection"}),vO=u.Object({floorImages:ht(u.Record(_e,u.Ref(t_),{additionalProperties:!1}))},{$id:"FloorImagesExtensionSchema"}),bO=/^floorImages\/(.*)\.geojson$/,n_={name:"ext:floor-images",schema:vO,intoBundle:s(function*(t){if(t.floorImages!=null)for(let e of ke(t.floorImages))yield{path:"floorImages/".concat(e,".geojson"),contents:t.floorImages[e]}},"intoBundle"),fromBundle:s((t,e,n)=>{var i;let r=(i=t.match(bO))==null?void 0:i[1];if(r)return{floorImages:{[r]:n(e)}}},"fromBundle"),references:[rh,Z0,J0,Q0,e_,t_],integrityCheck:Y0};l();l();var r_=s(t=>{if(t.kinds==null)return G(!0);let e=Mt(t);for(let[n,r]of Yt(t.kinds))if(r!=null)for(let i of ke(r)){let o=e(n,i);if(o.isErr())return o}return G(!0)},"validateKinds");var{values:$se,schema:SO,record:Wse}=dn(["room","hallway","wall","object","poi","area","window"],{$id:"Kind"}),i_=SO;var s_=ht(u.Record(jt,u.Ref(i_),{additionalProperties:!1,$id:"GeometryKinds"})),MO=u.Object({kinds:ht(u.Record(_e,u.Ref(s_),{additionalProperties:!1}))},{$id:"KindsExtensionSchema"}),wO=/^kinds\/(.*)\.json$/,o_={name:"ext:kinds",schema:MO,intoBundle:s(function*(t){if(t.kinds!=null)for(let e of ke(t.kinds))yield{path:"kinds/".concat(e,".json"),contents:t.kinds[e]}},"intoBundle"),fromBundle:s((t,e,n)=>{var i;let r=(i=t.match(wO))==null?void 0:i[1];if(r)return{kinds:{[r]:n(e)}}},"fromBundle"),references:[i_,s_],integrityCheck:r_};l();l();l();var Al;(function(t){t.UnknownNeighbor="UnknownNeighbor"})(Al||(Al={}));var a_=s(t=>{if(t.nodes==null)return G(!0);let e=pt(t.nodes,i=>i.properties.id,"nodes");if(e.isErr())return e;let n=Mt(t),r=ba(t);for(let[i,o]of Yt(t.nodes)){if(o==null)continue;let a=new Set(o.features.map(c=>c.properties.id));for(let[c,f]of o.features.entries()){for(let d of f.properties.geometryIds){let p=n(i,d);if(p.isErr())return p}for(let[d,p]of f.properties.neighbors.entries()){if(!a.has(p.id))return $({kind:Al.UnknownNeighbor,properties:{floorId:i,nodeId:f.properties.id,neighborId:p.id}});let h=vo(p.flags,r,'nodes["'.concat(i,'"].features[').concat(c,"].properties.neighbors[").concat(d,"]"));if(h.isErr())return h}}}return G(!0)},"validateNodes");var ih=dt("n","NodeId"),c_=u.Intersect([u.Object({id:u.Ref(ih,{description:"The unique identifier for the node."}),extraCost:u.Number({minimum:0,description:"The extra cost to traverse to the node, above the straight-line distance."})}),nh],{$id:"NodeNeighbor"}),l_=u.Intersect([u.Object({id:u.Ref(ih,{description:"The unique identifier for the node."}),neighbors:u.Array(u.Ref(c_),{description:"The neighbors of the node."})}),ho],{$id:"NodeProperties"}),u_=Ft(u.Ref(Wt),l_,{$id:"NodeFeature"}),f_=nn(u.Ref(u_),{$id:"NodeCollection"}),EO=u.Object({nodes:ht(u.Record(_e,u.Ref(f_),{additionalProperties:!1}))},{$id:"NodesExtensionSchema"}),IO=/^nodes\/(.*)\.json$/,d_={name:"ext:nodes",schema:EO,intoBundle:s(function*(t){if(t.nodes!=null)for(let e of ke(t.nodes))yield{path:"nodes/".concat(e,".json"),contents:t.nodes[e]}},"intoBundle"),fromBundle:s((t,e,n)=>{var i;let r=(i=t.match(IO))==null?void 0:i[1];if(r)return{nodes:{[r]:n(e)}}},"fromBundle"),references:[ih,c_,l_,u_,f_],integrityCheck:a_};l();l();l();var Rl;(function(t){t.FloorInFloorStackError="FloorInFloorStackError"})(Rl||(Rl={}));var p_=s(t=>{if(t.outdoors==null)return G(!0);let e=rr(t);for(let n of t.outdoors.floors){let r=e(n);if(r.isErr())return r;if(t.floorStacks!=null){for(let i of t.floorStacks)if(i.floors.includes(n))return $({kind:Rl.FloorInFloorStackError,properties:{floorId:n,floorStackId:i.id}})}}return G(!0)},"validateOutdoors");var m_=u.Object({floors:u.Array(u.Ref(_e),{uniqueItems:!0,description:"A list of floor IDs that should be considered to contain outdoor features."})},{$id:"Outdoors"}),TO=u.Object({outdoors:u.Ref(m_)},{$id:"OutdoorsExtensionSchema"}),h_="outdoors.json",g_={name:"ext:outdoors",schema:TO,intoBundle:s(function*(t){t.outdoors!=null&&(yield{path:h_,contents:t.outdoors})},"intoBundle"),fromBundle:s((t,e,n)=>{if(t===h_)return{outdoors:n(e)}},"fromBundle"),references:[m_],integrityCheck:p_};l();l();l();var Cl;(function(t){t.TilesetDuplicateKeyError="TilesetDuplicateKeyError"})(Cl||(Cl={}));var y_=s(t=>{if(t.tileset==null)return G(!0);let e=new Set;if(e.add(t.tileset.default.key),t.tileset.others)for(let n of t.tileset.others){if(e.has(n.key))return $({kind:Cl.TilesetDuplicateKeyError,properties:{key:n.key}});e.add(n.key)}return G(!0)},"validateTilesets");var sh=u.Object({key:u.String({minLength:1,description:"Unique identifier for the tileset style."}),name:u.String({minLength:1,description:"Display name of the tileset style."}),url:u.String({format:"uri",description:"URL of the tileset style."})},{$id:"TilesetStyle",description:"A tileset style definition."}),x_=u.Object({default:u.Ref(sh,{description:"The default tileset style, which should be used."}),others:u.Optional(u.Array(u.Ref(sh,{description:"Additional tileset styles that can be used."})))},{$id:"TilesetCollection"}),AO=u.Object({tileset:u.Ref(x_)},{$id:"TilesetExtensionSchema"}),__={name:"ext:mvf-tileset",schema:AO,intoBundle:s(function*(t){t.tileset!=null&&(yield{path:"tileset.json",contents:t.tileset})},"intoBundle"),fromBundle:s((t,e,n)=>{if(t==="tileset.json")return{tileset:n(e)}},"fromBundle"),references:[sh,x_],integrityCheck:y_};l();var v_=u.Object({},{$id:"WalkableProperties"}),b_=u.Object({},{$id:"NonWalkableProperties"}),S_=ht(u.Record(jt,u.Ref(v_),{$id:"WalkableGeometries",additionalProperties:!1})),M_=ht(u.Record(jt,u.Ref(b_),{$id:"NonWalkableGeometries",additionalProperties:!1})),RO=u.Object({walkable:ht(u.Record(_e,u.Ref(S_),{additionalProperties:!1})),nonwalkable:ht(u.Record(_e,u.Ref(M_),{additionalProperties:!1}))},{$id:"TraversabilitySchema"}),CO=/^walkable\/(.*)\.json$/,PO=/^nonwalkable\/(.*)\.json$/,w_={name:"ext:mvf-traversability",schema:RO,intoBundle:s(function*(t){if(t.walkable!=null)for(let e of ke(t.walkable))yield{path:"walkable/".concat(e,".json"),contents:t.walkable[e]};if(t.nonwalkable!=null)for(let e of ke(t.nonwalkable))yield{path:"nonwalkable/".concat(e,".json"),contents:t.nonwalkable[e]}},"intoBundle"),fromBundle:s((t,e,n)=>{var o,a;let r=(o=t.match(CO))==null?void 0:o[1];if(r!=null)return{walkable:{[r]:n(e)}};let i=(a=t.match(PO))==null?void 0:a[1];if(i!=null)return{nonwalkable:{[i]:n(e)}}},"fromBundle"),references:[v_,b_,S_,M_]};l();l();l();l();l();l();l();l();l();l();l();var UO=z_(T_(),1);l();l();l();l();var Wce=Ax().extendOptional(C0).extendOptional(d_).extendOptional(D0).extendOptional(o_).extendOptional(w_).extendOptional(V0).extendOptional(j0).extendOptional(g_).extendOptional(__).extendOptional(n_).extendOptional(K0).extendOptional(Fx).extendOptional(Vx).extendOptional(E0).build({cspSafe:!0}).expect("Invalid parser, this should never happen. Likely a bug in the MVFv2 library, or one of the extensions.");l();l();l();l();var BO=60,wle=BO*60*1e3;l();var zO=60,Ole=zO*60*1e3;var C_=globalThis.fetch,P_,Vle=(P_=m==null?void 0:m.env)==null?void 0:P_.npm_package_version;function Fl(){if(C_==null)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return C_}s(Fl,"isomorphicFetch");var VO=Object.freeze({baseUri:"https://app.mappedin.com/",baseAuthUri:"https://app.mappedin.com/",analyticsBaseUri:"https://api-gateway.mappedin.com/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),Gle=Object.freeze(O(y({},VO),{baseUri:"https://api-gateway.mappedin.com/",baseAuthUri:"https://auth.mappedin.com/"})),Hle=Object.freeze({baseUri:"https://api-gateway.eu.mappedin.com/",baseAuthUri:"https://auth.eu.mappedin.com/",analyticsBaseUri:"https://api-gateway.eu.mappedin.com/track-analytics/a/",tileServerUri:"https://tiles-cdn.eu.mappedin.com/styles/mappedin/style.json"}),$le=Object.freeze({baseUri:"https://api-gateway-staging.mappedin.net/",baseAuthUri:"https://auth-staging.mappedin.net/",analyticsBaseUri:"https://api-gateway-staging.mappedin.net/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),Wle=Object.freeze({baseUri:"https://app-staging.mappedin.net/",baseAuthUri:"https://app-staging.mappedin.net/",analyticsBaseUri:"https://api-gateway-staging.mappedin.net/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"});var F_={id:Ie.string(),name:Ie.string(),type:Ie.string(),startDate:Ie.number(),endDate:Ie.number(),externalId:Ie.string().optional(),description:Ie.string().optional(),location:Ie.string().optional(),image:Ie.object({original:Ie.string(),xxsmall:Ie.string().optional(),xsmall:Ie.string().optional(),small:Ie.string().optional(),medium:Ie.string().optional(),large:Ie.string().optional(),xlarge:Ie.string().optional(),xxlarge:Ie.string().optional()}).optional(),video:Ie.object({width:Ie.number(),height:Ie.number(),thumbnail:Ie.string(),content:Ie.string(),original:Ie.string()}).optional(),_locale:Ie.record(Ie.string(),Ie.record(Ie.string(),Ie.unknown())).optional()},O_=Ie.object(F_),L_=Object.keys(F_),N_=s(async(t,e,n,r={})=>{let i=new URLSearchParams(r),o=new URL("/public/1/event/".concat(t),e);return o.search=i.toString(),await(await Fl()(o.toString(),{headers:{Authorization:"Bearer ".concat(n)}})).json()},"fetchEvents");var ti,wn,Ir,bo,So,Mo,U_,D_,uh=class uh{constructor(e,n={}){vt(this,Mo);vt(this,ti);vt(this,wn,{eventsById:new Map,eventsByLocationId:new Map});vt(this,Ir,null);vt(this,bo,!1);vt(this,So);var r;At(this,ti,e),At(this,So,O(y({includeExpired:!1},n),{fields:L_.concat((r=n.fields)!=null?r:[])}))}async load(){return N(this,Ir)!=null?N(this,Ir):(At(this,Ir,(async()=>{let e=await ii(this,Mo,U_).call(this);N(this,Ir)!=null&&(await ii(this,Mo,D_).call(this,e),At(this,bo,!0),At(this,Ir,null))})()),N(this,Ir))}get ready(){return N(this,bo)}get events(){return Array.from(N(this,wn).eventsById.values())}getById(e){return N(this,wn).eventsById.get(e)}getByLocationId(e){var n;return(n=N(this,wn).eventsByLocationId.get(e))!=null?n:[]}destroy(){N(this,wn).eventsById.clear(),N(this,wn).eventsByLocationId.clear(),At(this,Ir,null),At(this,bo,!1)}};ti=new WeakMap,wn=new WeakMap,Ir=new WeakMap,bo=new WeakMap,So=new WeakMap,Mo=new WeakSet,U_=s(async function(){if(!N(this,ti).internal.enterpriseMode)return cs.warn("Events are currently only supported for CMS maps!"),[];let e=N(this,ti).mapId;if(e==null)throw new Error("Failed to fetch events! Map ID was not specified in getMapData.");let n=N(this,ti).getAccessToken();if(n==null)throw new Error("Failed to fetch events! Could not get access token from MapData.");let r={fields:N(this,So).fields.join(","),lang:"all"};N(this,So).includeExpired||(r.activeAtOrAfter="now");let i=await N_(e,N(this,ti).getEnv().baseUri,n,r);if(!Array.isArray(i))throw new Error("Failed to fetch events! Invalid response format.");return i.filter(o=>{let a=O_.safeParse(o);return a.success||cs.warn("Failed to parse event!",o,a.error),a.success})},"#fetchEvents"),D_=s(async function(e){var n,r;N(this,wn).eventsById.clear(),N(this,wn).eventsByLocationId.clear();for(let i of e){let o=new Ka(i,N(this,ti));N(this,wn).eventsById.set(o.id,o);let a=(n=o.location)==null?void 0:n.id;a!=null&&N(this,wn).eventsByLocationId.set(a,[...(r=N(this,wn).eventsByLocationId.get(a))!=null?r:[],o])}},"#createEvents"),s(uh,"EventsManager");var lh=uh;export{lh as EventsManager};
1
+ var tT=Object.create;var Ms=Object.defineProperty,nT=Object.defineProperties,rT=Object.getOwnPropertyDescriptor,iT=Object.getOwnPropertyDescriptors,oT=Object.getOwnPropertyNames,uc=Object.getOwnPropertySymbols,sT=Object.getPrototypeOf,hf=Object.prototype.hasOwnProperty,g_=Object.prototype.propertyIsEnumerable;var cc=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),mf=e=>{throw TypeError(e)};var pf=(e,t,n)=>t in e?Ms(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,x=(e,t)=>{for(var n in t||(t={}))hf.call(t,n)&&pf(e,n,t[n]);if(uc)for(var n of uc(t))g_.call(t,n)&&pf(e,n,t[n]);return e},L=(e,t)=>nT(e,iT(t)),o=(e,t)=>Ms(e,"name",{value:t,configurable:!0});var lc=e=>typeof e=="symbol"?e:e+"",Es=(e,t)=>{var n={};for(var i in e)hf.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&uc)for(var i of uc(e))t.indexOf(i)<0&&g_.call(e,i)&&(n[i]=e[i]);return n};var aT=(e,t)=>()=>(e&&(t=e(e=0)),t);var y_=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),cn=(e,t)=>{for(var n in t)Ms(e,n,{get:t[n],enumerable:!0})},cT=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of oT(t))!hf.call(e,r)&&r!==n&&Ms(e,r,{get:()=>t[r],enumerable:!(i=rT(t,r))||i.enumerable});return e};var uT=(e,t,n)=>(n=e!=null?tT(sT(e)):{},cT(t||!e||!e.__esModule?Ms(n,"default",{value:e,enumerable:!0}):n,e));var Xe=(e,t,n)=>pf(e,typeof t!="symbol"?t+"":t,n),gf=(e,t,n)=>t.has(e)||mf("Cannot "+n);var W=(e,t,n)=>(gf(e,t,"read from private field"),n?n.call(e):t.get(e)),It=(e,t,n)=>t.has(e)?mf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ot=(e,t,n,i)=>(gf(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),ci=(e,t,n)=>(gf(e,t,"access private method"),n);var x_=function(e,t){this[0]=e,this[1]=t},v_=(e,t,n)=>{var i=(a,u,l,c)=>{try{var d=n[a](u),h=(u=d.value)instanceof x_,m=d.done;Promise.resolve(h?u[0]:u).then(y=>h?i(a==="return"?a:"next",u[1]?{done:y.done,value:y.value}:y,l,c):l({value:y,done:m})).catch(y=>i("throw",y,l,c))}catch(y){c(y)}},r=a=>s[a]=u=>new Promise((l,c)=>i(a,u,l,c)),s={};return n=n.apply(e,t),s[cc("asyncIterator")]=()=>s,r("next"),r("throw"),r("return"),s},k=e=>{var t=e[cc("asyncIterator")],n=!1,i,r={};return t==null?(t=e[cc("iterator")](),i=s=>r[s]=a=>t[s](a)):(t=t.call(e),i=s=>r[s]=a=>{if(n){if(n=!1,s==="throw")throw a;return a}return n=!0,{done:!1,value:new x_(new Promise(u=>{var l=t[s](a);l instanceof Object||mf("Object expected"),u(l)}),1)}}),r[cc("iterator")]=()=>r,i("next"),"throw"in t?i("throw"):r.throw=s=>{throw s},"return"in t&&i("return"),r};var g,f=aT(()=>{g={env:{NODE_ENV:"production",npm_package_version:"6.0.1-beta.56"}}});var zE=y_((f_,d_)=>{f();(function(e,t){typeof f_=="object"&&typeof d_<"u"?d_.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.TinyQueue=t())})(f_,function(){"use strict";var e=o(function(i,r){if(i===void 0&&(i=[]),r===void 0&&(r=t),this.data=i,this.length=this.data.length,this.compare=r,this.length>0)for(var s=(this.length>>1)-1;s>=0;s--)this._down(s)},"TinyQueue");e.prototype.push=o(function(i){this.data.push(i),this.length++,this._up(this.length-1)},"push"),e.prototype.pop=o(function(){if(this.length!==0){var i=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),i}},"pop"),e.prototype.peek=o(function(){return this.data[0]},"peek"),e.prototype._up=o(function(i){for(var r=this,s=r.data,a=r.compare,u=s[i];i>0;){var l=i-1>>1,c=s[l];if(a(u,c)>=0)break;s[i]=c,i=l}s[i]=u},"_up"),e.prototype._down=o(function(i){for(var r=this,s=r.data,a=r.compare,u=this.length>>1,l=s[i];i<u;){var c=(i<<1)+1,d=s[c],h=c+1;if(h<this.length&&a(s[h],d)<0&&(c=h,d=s[h]),a(d,l)>=0)break;s[i]=d,i=c}s[i]=l},"_down");function t(n,i){return n<i?-1:n>i?1:0}return o(t,"defaultCompare"),e})});var VE=y_((tbe,p_)=>{"use strict";f();var ff=zE();ff.default&&(ff=ff.default);p_.exports=BE;p_.exports.default=BE;function BE(e,t,n){t=t||1;for(var i,r,s,a,u=0;u<e[0].length;u++){var l=e[0][u];(!u||l[0]<i)&&(i=l[0]),(!u||l[1]<r)&&(r=l[1]),(!u||l[0]>s)&&(s=l[0]),(!u||l[1]>a)&&(a=l[1])}var c=s-i,d=a-r,h=Math.min(c,d),m=h/2;if(h===0){var y=[i,r];return y.distance=0,y}for(var v=new ff(void 0,$B),I=i;I<s;I+=h)for(var T=r;T<a;T+=h)v.push(new Ci(I+m,T+m,m,e));var U=BB(e),D=new Ci(i+c/2,r+d/2,0,e);D.d>U.d&&(U=D);for(var w=v.length;v.length;){var S=v.pop();S.d>U.d&&(U=S,n&&console.log("found best %d after %d probes",Math.round(1e4*S.d)/1e4,w)),!(S.max-U.d<=t)&&(m=S.h/2,v.push(new Ci(S.x-m,S.y-m,m,e)),v.push(new Ci(S.x+m,S.y-m,m,e)),v.push(new Ci(S.x-m,S.y+m,m,e)),v.push(new Ci(S.x+m,S.y+m,m,e)),w+=4)}n&&(console.log("num probes: "+w),console.log("best distance: "+U.d));var A=[U.x,U.y];return A.distance=U.d,A}o(BE,"polylabel");function $B(e,t){return t.max-e.max}o($B,"compareMax");function Ci(e,t,n,i){this.x=e,this.y=t,this.h=n,this.d=zB(e,t,i),this.max=this.d+this.h*Math.SQRT2}o(Ci,"Cell");function zB(e,t,n){for(var i=!1,r=1/0,s=0;s<n.length;s++)for(var a=n[s],u=0,l=a.length,c=l-1;u<l;c=u++){var d=a[u],h=a[c];d[1]>t!=h[1]>t&&e<(h[0]-d[0])*(t-d[1])/(h[1]-d[1])+d[0]&&(i=!i),r=Math.min(r,VB(e,t,d,h))}return r===0?0:(i?1:-1)*Math.sqrt(r)}o(zB,"pointToPolygonDist");function BB(e){for(var t=0,n=0,i=0,r=e[0],s=0,a=r.length,u=a-1;s<a;u=s++){var l=r[s],c=r[u],d=l[0]*c[1]-c[0]*l[1];n+=(l[0]+c[0])*d,i+=(l[1]+c[1])*d,t+=d*3}return t===0?new Ci(r[0][0],r[0][1],0,e):new Ci(n/t,i/t,0,e)}o(BB,"getCentroidCell");function VB(e,t,n,i){var r=n[0],s=n[1],a=i[0]-r,u=i[1]-s;if(a!==0||u!==0){var l=((e-r)*a+(t-s)*u)/(a*a+u*u);l>1?(r=i[0],s=i[1]):l>0&&(r+=a*l,s+=u*l)}return a=e-r,u=t-s,a*a+u*u}o(VB,"getSegDistSq")});f();f();f();f();var __="[MappedinJS]";function fT(e="",{prefix:t=__}={}){let n="".concat(t).concat(e?"-".concat(e):""),i=o((r,s)=>{if(typeof window<"u"&&window.rnDebug){let a=s.map(u=>u instanceof Error&&u.stack?"".concat(u.message,"\n").concat(u.stack):u);window.rnDebug("".concat(e," ").concat(r,": ").concat(a.join(" ")))}},"rnDebug");return{logState:g.env.NODE_ENV==="test"?3:0,log(...r){this.logState<=0&&(console.log(n,...r),i("log",r))},warn(...r){this.logState<=1&&(console.warn(n,...r),i("warn",r))},error(...r){this.logState<=2&&(console.error(n,...r),i("error",r))},assert(...r){console.assert(...r)},time(r){console.time(r)},timeEnd(r){console.timeEnd(r)},setLevel(r){0<=r&&r<=3&&(this.logState=r)}}}o(fT,"createLogger");var dT=fT();var io=dT;f();f();f();var xf=class xf extends Error{};o(xf,"InvalidTokenError");var yf=xf;yf.prototype.name="InvalidTokenError";f();f();f();var Gf="173";var Hf=0,Wf=1,Zf=2,Xf=3,qf=4,Kf=5,Jf=6,Yf=7;var F_=300;var Ef=1e3,As=1001,Tf=1002;var k_=1006;var D_=1008;var L_=1009;var $_=1023;var gc=2300,Af=2301,vf=2302,b_=2400,S_=2401,I_=2402;var Qf="",Nn="srgb",Pf="srgb-linear",Rf="linear",mc="srgb";var Ps=2e3,w_=2001;var rd=class rd{addEventListener(t,n){this._listeners===void 0&&(this._listeners={});let i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(n)===-1&&i[t].push(n)}hasEventListener(t,n){let i=this._listeners;return i===void 0?!1:i[t]!==void 0&&i[t].indexOf(n)!==-1}removeEventListener(t,n){let i=this._listeners;if(i===void 0)return;let r=i[t];if(r!==void 0){let s=r.indexOf(n);s!==-1&&r.splice(s,1)}}dispatchEvent(t){let n=this._listeners;if(n===void 0)return;let i=n[t.type];if(i!==void 0){t.target=this;let r=i.slice(0);for(let s=0,a=r.length;s<a;s++)r[s].call(this,t);t.target=null}}};o(rd,"EventDispatcher");var Cs=rd,jt=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];var u4=Math.PI/180,pT=180/Math.PI;function ed(){let e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(jt[e&255]+jt[e>>8&255]+jt[e>>16&255]+jt[e>>24&255]+"-"+jt[t&255]+jt[t>>8&255]+"-"+jt[t>>16&15|64]+jt[t>>24&255]+"-"+jt[n&63|128]+jt[n>>8&255]+"-"+jt[n>>16&255]+jt[n>>24&255]+jt[i&255]+jt[i>>8&255]+jt[i>>16&255]+jt[i>>24&255]).toLowerCase()}o(ed,"generateUUID");function Je(e,t,n){return Math.max(t,Math.min(n,e))}o(Je,"clamp");function hT(e,t){return(e%t+t)%t}o(hT,"euclideanModulo");function _f(e,t,n){return(1-n)*e+n*t}o(_f,"lerp");var vc=class vc{constructor(t=0,n=0){vc.prototype.isVector2=!0,this.x=t,this.y=n}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,n){return this.x=t,this.y=n,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,n){switch(t){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,n){return this.x=t.x+n.x,this.y=t.y+n.y,this}addScaledVector(t,n){return this.x+=t.x*n,this.y+=t.y*n,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,n){return this.x=t.x-n.x,this.y=t.y-n.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let n=this.x,i=this.y,r=t.elements;return this.x=r[0]*n+r[3]*i+r[6],this.y=r[1]*n+r[4]*i+r[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,n){return this.x=Je(this.x,t.x,n.x),this.y=Je(this.y,t.y,n.y),this}clampScalar(t,n){return this.x=Je(this.x,t,n),this.y=Je(this.y,t,n),this}clampLength(t,n){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Je(i,t,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){let n=Math.sqrt(this.lengthSq()*t.lengthSq());if(n===0)return Math.PI/2;let i=this.dot(t)/n;return Math.acos(Je(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let n=this.x-t.x,i=this.y-t.y;return n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,n){return this.x+=(t.x-this.x)*n,this.y+=(t.y-this.y)*n,this}lerpVectors(t,n,i){return this.x=t.x+(n.x-t.x)*i,this.y=t.y+(n.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,n=0){return this.x=t[n],this.y=t[n+1],this}toArray(t=[],n=0){return t[n]=this.x,t[n+1]=this.y,t}fromBufferAttribute(t,n){return this.x=t.getX(n),this.y=t.getY(n),this}rotateAround(t,n){let i=Math.cos(n),r=Math.sin(n),s=this.x-t.x,a=this.y-t.y;return this.x=s*i-a*r+t.x,this.y=s*r+a*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};o(vc,"Vector2");var Qn=vc,_c=class _c{constructor(t,n,i,r,s,a,u,l,c){_c.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,n,i,r,s,a,u,l,c)}set(t,n,i,r,s,a,u,l,c){let d=this.elements;return d[0]=t,d[1]=r,d[2]=u,d[3]=n,d[4]=s,d[5]=l,d[6]=i,d[7]=a,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let n=this.elements,i=t.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],this}extractBasis(t,n,i){return t.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let n=t.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,n){let i=t.elements,r=n.elements,s=this.elements,a=i[0],u=i[3],l=i[6],c=i[1],d=i[4],h=i[7],m=i[2],y=i[5],v=i[8],I=r[0],T=r[3],U=r[6],D=r[1],w=r[4],S=r[7],A=r[2],j=r[5],F=r[8];return s[0]=a*I+u*D+l*A,s[3]=a*T+u*w+l*j,s[6]=a*U+u*S+l*F,s[1]=c*I+d*D+h*A,s[4]=c*T+d*w+h*j,s[7]=c*U+d*S+h*F,s[2]=m*I+y*D+v*A,s[5]=m*T+y*w+v*j,s[8]=m*U+y*S+v*F,this}multiplyScalar(t){let n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=t,n[4]*=t,n[7]*=t,n[2]*=t,n[5]*=t,n[8]*=t,this}determinant(){let t=this.elements,n=t[0],i=t[1],r=t[2],s=t[3],a=t[4],u=t[5],l=t[6],c=t[7],d=t[8];return n*a*d-n*u*c-i*s*d+i*u*l+r*s*c-r*a*l}invert(){let t=this.elements,n=t[0],i=t[1],r=t[2],s=t[3],a=t[4],u=t[5],l=t[6],c=t[7],d=t[8],h=d*a-u*c,m=u*l-d*s,y=c*s-a*l,v=n*h+i*m+r*y;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);let I=1/v;return t[0]=h*I,t[1]=(r*c-d*i)*I,t[2]=(u*i-r*a)*I,t[3]=m*I,t[4]=(d*n-r*l)*I,t[5]=(r*s-u*n)*I,t[6]=y*I,t[7]=(i*l-c*n)*I,t[8]=(a*n-i*s)*I,this}transpose(){let t,n=this.elements;return t=n[1],n[1]=n[3],n[3]=t,t=n[2],n[2]=n[6],n[6]=t,t=n[5],n[5]=n[7],n[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let n=this.elements;return t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8],this}setUvTransform(t,n,i,r,s,a,u){let l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*a+c*u)+a+t,-r*c,r*l,-r*(-c*a+l*u)+u+n,0,0,1),this}scale(t,n){return this.premultiply(bf.makeScale(t,n)),this}rotate(t){return this.premultiply(bf.makeRotation(-t)),this}translate(t,n){return this.premultiply(bf.makeTranslation(t,n)),this}makeTranslation(t,n){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,n,0,0,1),this}makeRotation(t){let n=Math.cos(t),i=Math.sin(t);return this.set(n,-i,0,i,n,0,0,0,1),this}makeScale(t,n){return this.set(t,0,0,0,n,0,0,0,1),this}equals(t){let n=this.elements,i=t.elements;for(let r=0;r<9;r++)if(n[r]!==i[r])return!1;return!0}fromArray(t,n=0){for(let i=0;i<9;i++)this.elements[i]=t[i+n];return this}toArray(t=[],n=0){let i=this.elements;return t[n]=i[0],t[n+1]=i[1],t[n+2]=i[2],t[n+3]=i[3],t[n+4]=i[4],t[n+5]=i[5],t[n+6]=i[6],t[n+7]=i[7],t[n+8]=i[8],t}clone(){return new this.constructor().fromArray(this.elements)}};o(_c,"Matrix3");var me=_c,bf=new me;function Cf(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}o(Cf,"createElementNS");var M_=new me().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),E_=new me().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function mT(){let e={enabled:!0,workingColorSpace:Pf,spaces:{},convert:o(function(r,s,a){return this.enabled===!1||s===a||!s||!a||(this.spaces[s].transfer===mc&&(r.r=Fr(r.r),r.g=Fr(r.g),r.b=Fr(r.b)),this.spaces[s].primaries!==this.spaces[a].primaries&&(r.applyMatrix3(this.spaces[s].toXYZ),r.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===mc&&(r.r=fo(r.r),r.g=fo(r.g),r.b=fo(r.b))),r},"convert"),fromWorkingColorSpace:o(function(r,s){return this.convert(r,this.workingColorSpace,s)},"fromWorkingColorSpace"),toWorkingColorSpace:o(function(r,s){return this.convert(r,s,this.workingColorSpace)},"toWorkingColorSpace"),getPrimaries:o(function(r){return this.spaces[r].primaries},"getPrimaries"),getTransfer:o(function(r){return r===Qf?Rf:this.spaces[r].transfer},"getTransfer"),getLuminanceCoefficients:o(function(r,s=this.workingColorSpace){return r.fromArray(this.spaces[s].luminanceCoefficients)},"getLuminanceCoefficients"),define:o(function(r){Object.assign(this.spaces,r)},"define"),_getMatrix:o(function(r,s,a){return r.copy(this.spaces[s].toXYZ).multiply(this.spaces[a].fromXYZ)},"_getMatrix"),_getDrawingBufferColorSpace:o(function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},"_getDrawingBufferColorSpace"),_getUnpackColorSpace:o(function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},"_getUnpackColorSpace")},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],i=[.3127,.329];return e.define({[Pf]:{primaries:t,whitePoint:i,transfer:Rf,toXYZ:M_,fromXYZ:E_,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:Nn},outputColorSpaceConfig:{drawingBufferColorSpace:Nn}},[Nn]:{primaries:t,whitePoint:i,transfer:mc,toXYZ:M_,fromXYZ:E_,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:Nn}}}),e}o(mT,"createColorManagement");var Un=mT();function Fr(e){return e<.04045?e*.0773993808:Math.pow(e*.9478672986+.0521327014,2.4)}o(Fr,"SRGBToLinear");function fo(e){return e<.0031308?e*12.92:1.055*Math.pow(e,.41666)-.055}o(fo,"LinearToSRGB");var oo,id=class id{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let n;if(t instanceof HTMLCanvasElement)n=t;else{oo===void 0&&(oo=Cf("canvas")),oo.width=t.width,oo.height=t.height;let i=oo.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height),n=oo}return n.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){let n=Cf("canvas");n.width=t.width,n.height=t.height;let i=n.getContext("2d");i.drawImage(t,0,0,t.width,t.height);let r=i.getImageData(0,0,t.width,t.height),s=r.data;for(let a=0;a<s.length;a++)s[a]=Fr(s[a]/255)*255;return i.putImageData(r,0,0),n}else if(t.data){let n=t.data.slice(0);for(let i=0;i<n.length;i++)n instanceof Uint8Array||n instanceof Uint8ClampedArray?n[i]=Math.floor(Fr(n[i]/255)*255):n[i]=Fr(n[i]);return{data:n,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}};o(id,"ImageUtils");var Of=id,gT=0,od=class od{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:gT++}),this.uuid=ed(),this.data=t,this.dataReady=!0,this.version=0}set needsUpdate(t){t===!0&&this.version++}toJSON(t){let n=t===void 0||typeof t=="string";if(!n&&t.images[this.uuid]!==void 0)return t.images[this.uuid];let i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let s;if(Array.isArray(r)){s=[];for(let a=0,u=r.length;a<u;a++)r[a].isDataTexture?s.push(Sf(r[a].image)):s.push(Sf(r[a]))}else s=Sf(r);i.url=s}return n||(t.images[this.uuid]=i),i}};o(od,"Source");var Uf=od;function Sf(e){return typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap?Of.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}o(Sf,"serializeImage");var yT=0,uo=class uo extends Cs{constructor(t=uo.DEFAULT_IMAGE,n=uo.DEFAULT_MAPPING,i=As,r=As,s=k_,a=D_,u=$_,l=L_,c=uo.DEFAULT_ANISOTROPY,d=Qf){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:yT++}),this.uuid=ed(),this.name="",this.source=new Uf(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=i,this.wrapT=r,this.magFilter=s,this.minFilter=a,this.anisotropy=c,this.format=u,this.internalFormat=null,this.type=l,this.offset=new Qn(0,0),this.repeat=new Qn(1,1),this.center=new Qn(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new me,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=d,this.userData={},this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){let n=t===void 0||typeof t=="string";if(!n&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let i={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),n||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==F_)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Ef:t.x=t.x-Math.floor(t.x);break;case As:t.x=t.x<0?0:1;break;case Tf:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Ef:t.y=t.y-Math.floor(t.y);break;case As:t.y=t.y<0?0:1;break;case Tf:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}};o(uo,"Texture");var po=uo;po.DEFAULT_IMAGE=null;po.DEFAULT_MAPPING=F_;po.DEFAULT_ANISOTROPY=1;var sd=class sd{constructor(t=0,n=0,i=0,r=1){this.isQuaternion=!0,this._x=t,this._y=n,this._z=i,this._w=r}static slerpFlat(t,n,i,r,s,a,u){let l=i[r+0],c=i[r+1],d=i[r+2],h=i[r+3],m=s[a+0],y=s[a+1],v=s[a+2],I=s[a+3];if(u===0){t[n+0]=l,t[n+1]=c,t[n+2]=d,t[n+3]=h;return}if(u===1){t[n+0]=m,t[n+1]=y,t[n+2]=v,t[n+3]=I;return}if(h!==I||l!==m||c!==y||d!==v){let T=1-u,U=l*m+c*y+d*v+h*I,D=U>=0?1:-1,w=1-U*U;if(w>Number.EPSILON){let A=Math.sqrt(w),j=Math.atan2(A,U*D);T=Math.sin(T*j)/A,u=Math.sin(u*j)/A}let S=u*D;if(l=l*T+m*S,c=c*T+y*S,d=d*T+v*S,h=h*T+I*S,T===1-u){let A=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=A,c*=A,d*=A,h*=A}}t[n]=l,t[n+1]=c,t[n+2]=d,t[n+3]=h}static multiplyQuaternionsFlat(t,n,i,r,s,a){let u=i[r],l=i[r+1],c=i[r+2],d=i[r+3],h=s[a],m=s[a+1],y=s[a+2],v=s[a+3];return t[n]=u*v+d*h+l*y-c*m,t[n+1]=l*v+d*m+c*h-u*y,t[n+2]=c*v+d*y+u*m-l*h,t[n+3]=d*v-u*h-l*m-c*y,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,n,i,r){return this._x=t,this._y=n,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,n=!0){let i=t._x,r=t._y,s=t._z,a=t._order,u=Math.cos,l=Math.sin,c=u(i/2),d=u(r/2),h=u(s/2),m=l(i/2),y=l(r/2),v=l(s/2);switch(a){case"XYZ":this._x=m*d*h+c*y*v,this._y=c*y*h-m*d*v,this._z=c*d*v+m*y*h,this._w=c*d*h-m*y*v;break;case"YXZ":this._x=m*d*h+c*y*v,this._y=c*y*h-m*d*v,this._z=c*d*v-m*y*h,this._w=c*d*h+m*y*v;break;case"ZXY":this._x=m*d*h-c*y*v,this._y=c*y*h+m*d*v,this._z=c*d*v+m*y*h,this._w=c*d*h-m*y*v;break;case"ZYX":this._x=m*d*h-c*y*v,this._y=c*y*h+m*d*v,this._z=c*d*v-m*y*h,this._w=c*d*h+m*y*v;break;case"YZX":this._x=m*d*h+c*y*v,this._y=c*y*h+m*d*v,this._z=c*d*v-m*y*h,this._w=c*d*h-m*y*v;break;case"XZY":this._x=m*d*h-c*y*v,this._y=c*y*h-m*d*v,this._z=c*d*v+m*y*h,this._w=c*d*h+m*y*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,n){let i=n/2,r=Math.sin(i);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){let n=t.elements,i=n[0],r=n[4],s=n[8],a=n[1],u=n[5],l=n[9],c=n[2],d=n[6],h=n[10],m=i+u+h;if(m>0){let y=.5/Math.sqrt(m+1);this._w=.25/y,this._x=(d-l)*y,this._y=(s-c)*y,this._z=(a-r)*y}else if(i>u&&i>h){let y=2*Math.sqrt(1+i-u-h);this._w=(d-l)/y,this._x=.25*y,this._y=(r+a)/y,this._z=(s+c)/y}else if(u>h){let y=2*Math.sqrt(1+u-i-h);this._w=(s-c)/y,this._x=(r+a)/y,this._y=.25*y,this._z=(l+d)/y}else{let y=2*Math.sqrt(1+h-i-u);this._w=(a-r)/y,this._x=(s+c)/y,this._y=(l+d)/y,this._z=.25*y}return this._onChangeCallback(),this}setFromUnitVectors(t,n){let i=t.dot(n)+1;return i<Number.EPSILON?(i=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(this._x=t.y*n.z-t.z*n.y,this._y=t.z*n.x-t.x*n.z,this._z=t.x*n.y-t.y*n.x,this._w=i),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Je(this.dot(t),-1,1)))}rotateTowards(t,n){let i=this.angleTo(t);if(i===0)return this;let r=Math.min(1,n/i);return this.slerp(t,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,n){let i=t._x,r=t._y,s=t._z,a=t._w,u=n._x,l=n._y,c=n._z,d=n._w;return this._x=i*d+a*u+r*c-s*l,this._y=r*d+a*l+s*u-i*c,this._z=s*d+a*c+i*l-r*u,this._w=a*d-i*u-r*l-s*c,this._onChangeCallback(),this}slerp(t,n){if(n===0)return this;if(n===1)return this.copy(t);let i=this._x,r=this._y,s=this._z,a=this._w,u=a*t._w+i*t._x+r*t._y+s*t._z;if(u<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,u=-u):this.copy(t),u>=1)return this._w=a,this._x=i,this._y=r,this._z=s,this;let l=1-u*u;if(l<=Number.EPSILON){let y=1-n;return this._w=y*a+n*this._w,this._x=y*i+n*this._x,this._y=y*r+n*this._y,this._z=y*s+n*this._z,this.normalize(),this}let c=Math.sqrt(l),d=Math.atan2(c,u),h=Math.sin((1-n)*d)/c,m=Math.sin(n*d)/c;return this._w=a*h+this._w*m,this._x=i*h+this._x*m,this._y=r*h+this._y*m,this._z=s*h+this._z*m,this._onChangeCallback(),this}slerpQuaternions(t,n,i){return this.copy(t).slerp(n,i)}random(){let t=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),i=Math.random(),r=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(r*Math.sin(t),r*Math.cos(t),s*Math.sin(n),s*Math.cos(n))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,n=0){return this._x=t[n],this._y=t[n+1],this._z=t[n+2],this._w=t[n+3],this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._w,t}fromBufferAttribute(t,n){return this._x=t.getX(n),this._y=t.getY(n),this._z=t.getZ(n),this._w=t.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}};o(sd,"Quaternion");var di=sd,bc=class bc{constructor(t=0,n=0,i=0){bc.prototype.isVector3=!0,this.x=t,this.y=n,this.z=i}set(t,n,i){return i===void 0&&(i=this.z),this.x=t,this.y=n,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,n){switch(t){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,n){return this.x=t.x+n.x,this.y=t.y+n.y,this.z=t.z+n.z,this}addScaledVector(t,n){return this.x+=t.x*n,this.y+=t.y*n,this.z+=t.z*n,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,n){return this.x=t.x-n.x,this.y=t.y-n.y,this.z=t.z-n.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,n){return this.x=t.x*n.x,this.y=t.y*n.y,this.z=t.z*n.z,this}applyEuler(t){return this.applyQuaternion(T_.setFromEuler(t))}applyAxisAngle(t,n){return this.applyQuaternion(T_.setFromAxisAngle(t,n))}applyMatrix3(t){let n=this.x,i=this.y,r=this.z,s=t.elements;return this.x=s[0]*n+s[3]*i+s[6]*r,this.y=s[1]*n+s[4]*i+s[7]*r,this.z=s[2]*n+s[5]*i+s[8]*r,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let n=this.x,i=this.y,r=this.z,s=t.elements,a=1/(s[3]*n+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*n+s[4]*i+s[8]*r+s[12])*a,this.y=(s[1]*n+s[5]*i+s[9]*r+s[13])*a,this.z=(s[2]*n+s[6]*i+s[10]*r+s[14])*a,this}applyQuaternion(t){let n=this.x,i=this.y,r=this.z,s=t.x,a=t.y,u=t.z,l=t.w,c=2*(a*r-u*i),d=2*(u*n-s*r),h=2*(s*i-a*n);return this.x=n+l*c+a*h-u*d,this.y=i+l*d+u*c-s*h,this.z=r+l*h+s*d-a*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let n=this.x,i=this.y,r=this.z,s=t.elements;return this.x=s[0]*n+s[4]*i+s[8]*r,this.y=s[1]*n+s[5]*i+s[9]*r,this.z=s[2]*n+s[6]*i+s[10]*r,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,n){return this.x=Je(this.x,t.x,n.x),this.y=Je(this.y,t.y,n.y),this.z=Je(this.z,t.z,n.z),this}clampScalar(t,n){return this.x=Je(this.x,t,n),this.y=Je(this.y,t,n),this.z=Je(this.z,t,n),this}clampLength(t,n){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Je(i,t,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,n){return this.x+=(t.x-this.x)*n,this.y+=(t.y-this.y)*n,this.z+=(t.z-this.z)*n,this}lerpVectors(t,n,i){return this.x=t.x+(n.x-t.x)*i,this.y=t.y+(n.y-t.y)*i,this.z=t.z+(n.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,n){let i=t.x,r=t.y,s=t.z,a=n.x,u=n.y,l=n.z;return this.x=r*l-s*u,this.y=s*a-i*l,this.z=i*u-r*a,this}projectOnVector(t){let n=t.lengthSq();if(n===0)return this.set(0,0,0);let i=t.dot(this)/n;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return If.copy(this).projectOnVector(t),this.sub(If)}reflect(t){return this.sub(If.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let n=Math.sqrt(this.lengthSq()*t.lengthSq());if(n===0)return Math.PI/2;let i=this.dot(t)/n;return Math.acos(Je(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let n=this.x-t.x,i=this.y-t.y,r=this.z-t.z;return n*n+i*i+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,n,i){let r=Math.sin(n)*t;return this.x=r*Math.sin(i),this.y=Math.cos(n)*t,this.z=r*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,n,i){return this.x=t*Math.sin(n),this.y=i,this.z=t*Math.cos(n),this}setFromMatrixPosition(t){let n=t.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(t){let n=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=n,this.y=i,this.z=r,this}setFromMatrixColumn(t,n){return this.fromArray(t.elements,n*4)}setFromMatrix3Column(t,n){return this.fromArray(t.elements,n*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,n=0){return this.x=t[n],this.y=t[n+1],this.z=t[n+2],this}toArray(t=[],n=0){return t[n]=this.x,t[n+1]=this.y,t[n+2]=this.z,t}fromBufferAttribute(t,n){return this.x=t.getX(n),this.y=t.getY(n),this.z=t.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=Math.random()*Math.PI*2,n=Math.random()*2-1,i=Math.sqrt(1-n*n);return this.x=i*Math.cos(t),this.y=n,this.z=i*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};o(bc,"Vector3");var ke=bc,If=new ke,T_=new di;var Rs=class Rs{constructor(t,n,i,r,s,a,u,l,c,d,h,m,y,v,I,T){Rs.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,n,i,r,s,a,u,l,c,d,h,m,y,v,I,T)}set(t,n,i,r,s,a,u,l,c,d,h,m,y,v,I,T){let U=this.elements;return U[0]=t,U[4]=n,U[8]=i,U[12]=r,U[1]=s,U[5]=a,U[9]=u,U[13]=l,U[2]=c,U[6]=d,U[10]=h,U[14]=m,U[3]=y,U[7]=v,U[11]=I,U[15]=T,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Rs().fromArray(this.elements)}copy(t){let n=this.elements,i=t.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],n[9]=i[9],n[10]=i[10],n[11]=i[11],n[12]=i[12],n[13]=i[13],n[14]=i[14],n[15]=i[15],this}copyPosition(t){let n=this.elements,i=t.elements;return n[12]=i[12],n[13]=i[13],n[14]=i[14],this}setFromMatrix3(t){let n=t.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(t,n,i){return t.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(t,n,i){return this.set(t.x,n.x,i.x,0,t.y,n.y,i.y,0,t.z,n.z,i.z,0,0,0,0,1),this}extractRotation(t){let n=this.elements,i=t.elements,r=1/so.setFromMatrixColumn(t,0).length(),s=1/so.setFromMatrixColumn(t,1).length(),a=1/so.setFromMatrixColumn(t,2).length();return n[0]=i[0]*r,n[1]=i[1]*r,n[2]=i[2]*r,n[3]=0,n[4]=i[4]*s,n[5]=i[5]*s,n[6]=i[6]*s,n[7]=0,n[8]=i[8]*a,n[9]=i[9]*a,n[10]=i[10]*a,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(t){let n=this.elements,i=t.x,r=t.y,s=t.z,a=Math.cos(i),u=Math.sin(i),l=Math.cos(r),c=Math.sin(r),d=Math.cos(s),h=Math.sin(s);if(t.order==="XYZ"){let m=a*d,y=a*h,v=u*d,I=u*h;n[0]=l*d,n[4]=-l*h,n[8]=c,n[1]=y+v*c,n[5]=m-I*c,n[9]=-u*l,n[2]=I-m*c,n[6]=v+y*c,n[10]=a*l}else if(t.order==="YXZ"){let m=l*d,y=l*h,v=c*d,I=c*h;n[0]=m+I*u,n[4]=v*u-y,n[8]=a*c,n[1]=a*h,n[5]=a*d,n[9]=-u,n[2]=y*u-v,n[6]=I+m*u,n[10]=a*l}else if(t.order==="ZXY"){let m=l*d,y=l*h,v=c*d,I=c*h;n[0]=m-I*u,n[4]=-a*h,n[8]=v+y*u,n[1]=y+v*u,n[5]=a*d,n[9]=I-m*u,n[2]=-a*c,n[6]=u,n[10]=a*l}else if(t.order==="ZYX"){let m=a*d,y=a*h,v=u*d,I=u*h;n[0]=l*d,n[4]=v*c-y,n[8]=m*c+I,n[1]=l*h,n[5]=I*c+m,n[9]=y*c-v,n[2]=-c,n[6]=u*l,n[10]=a*l}else if(t.order==="YZX"){let m=a*l,y=a*c,v=u*l,I=u*c;n[0]=l*d,n[4]=I-m*h,n[8]=v*h+y,n[1]=h,n[5]=a*d,n[9]=-u*d,n[2]=-c*d,n[6]=y*h+v,n[10]=m-I*h}else if(t.order==="XZY"){let m=a*l,y=a*c,v=u*l,I=u*c;n[0]=l*d,n[4]=-h,n[8]=c*d,n[1]=m*h+I,n[5]=a*d,n[9]=y*h-v,n[2]=v*h-y,n[6]=u*d,n[10]=I*h+m}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(t){return this.compose(xT,t,vT)}lookAt(t,n,i){let r=this.elements;return xn.subVectors(t,n),xn.lengthSq()===0&&(xn.z=1),xn.normalize(),ui.crossVectors(i,xn),ui.lengthSq()===0&&(Math.abs(i.z)===1?xn.x+=1e-4:xn.z+=1e-4,xn.normalize(),ui.crossVectors(i,xn)),ui.normalize(),fc.crossVectors(xn,ui),r[0]=ui.x,r[4]=fc.x,r[8]=xn.x,r[1]=ui.y,r[5]=fc.y,r[9]=xn.y,r[2]=ui.z,r[6]=fc.z,r[10]=xn.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,n){let i=t.elements,r=n.elements,s=this.elements,a=i[0],u=i[4],l=i[8],c=i[12],d=i[1],h=i[5],m=i[9],y=i[13],v=i[2],I=i[6],T=i[10],U=i[14],D=i[3],w=i[7],S=i[11],A=i[15],j=r[0],F=r[4],H=r[8],G=r[12],ce=r[1],ue=r[5],he=r[9],Ge=r[13],Oe=r[2],Ue=r[6],V=r[10],ne=r[14],le=r[3],oe=r[7],Me=r[11],pt=r[15];return s[0]=a*j+u*ce+l*Oe+c*le,s[4]=a*F+u*ue+l*Ue+c*oe,s[8]=a*H+u*he+l*V+c*Me,s[12]=a*G+u*Ge+l*ne+c*pt,s[1]=d*j+h*ce+m*Oe+y*le,s[5]=d*F+h*ue+m*Ue+y*oe,s[9]=d*H+h*he+m*V+y*Me,s[13]=d*G+h*Ge+m*ne+y*pt,s[2]=v*j+I*ce+T*Oe+U*le,s[6]=v*F+I*ue+T*Ue+U*oe,s[10]=v*H+I*he+T*V+U*Me,s[14]=v*G+I*Ge+T*ne+U*pt,s[3]=D*j+w*ce+S*Oe+A*le,s[7]=D*F+w*ue+S*Ue+A*oe,s[11]=D*H+w*he+S*V+A*Me,s[15]=D*G+w*Ge+S*ne+A*pt,this}multiplyScalar(t){let n=this.elements;return n[0]*=t,n[4]*=t,n[8]*=t,n[12]*=t,n[1]*=t,n[5]*=t,n[9]*=t,n[13]*=t,n[2]*=t,n[6]*=t,n[10]*=t,n[14]*=t,n[3]*=t,n[7]*=t,n[11]*=t,n[15]*=t,this}determinant(){let t=this.elements,n=t[0],i=t[4],r=t[8],s=t[12],a=t[1],u=t[5],l=t[9],c=t[13],d=t[2],h=t[6],m=t[10],y=t[14],v=t[3],I=t[7],T=t[11],U=t[15];return v*(+s*l*h-r*c*h-s*u*m+i*c*m+r*u*y-i*l*y)+I*(+n*l*y-n*c*m+s*a*m-r*a*y+r*c*d-s*l*d)+T*(+n*c*h-n*u*y-s*a*h+i*a*y+s*u*d-i*c*d)+U*(-r*u*d-n*l*h+n*u*m+r*a*h-i*a*m+i*l*d)}transpose(){let t=this.elements,n;return n=t[1],t[1]=t[4],t[4]=n,n=t[2],t[2]=t[8],t[8]=n,n=t[6],t[6]=t[9],t[9]=n,n=t[3],t[3]=t[12],t[12]=n,n=t[7],t[7]=t[13],t[13]=n,n=t[11],t[11]=t[14],t[14]=n,this}setPosition(t,n,i){let r=this.elements;return t.isVector3?(r[12]=t.x,r[13]=t.y,r[14]=t.z):(r[12]=t,r[13]=n,r[14]=i),this}invert(){let t=this.elements,n=t[0],i=t[1],r=t[2],s=t[3],a=t[4],u=t[5],l=t[6],c=t[7],d=t[8],h=t[9],m=t[10],y=t[11],v=t[12],I=t[13],T=t[14],U=t[15],D=h*T*c-I*m*c+I*l*y-u*T*y-h*l*U+u*m*U,w=v*m*c-d*T*c-v*l*y+a*T*y+d*l*U-a*m*U,S=d*I*c-v*h*c+v*u*y-a*I*y-d*u*U+a*h*U,A=v*h*l-d*I*l-v*u*m+a*I*m+d*u*T-a*h*T,j=n*D+i*w+r*S+s*A;if(j===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let F=1/j;return t[0]=D*F,t[1]=(I*m*s-h*T*s-I*r*y+i*T*y+h*r*U-i*m*U)*F,t[2]=(u*T*s-I*l*s+I*r*c-i*T*c-u*r*U+i*l*U)*F,t[3]=(h*l*s-u*m*s-h*r*c+i*m*c+u*r*y-i*l*y)*F,t[4]=w*F,t[5]=(d*T*s-v*m*s+v*r*y-n*T*y-d*r*U+n*m*U)*F,t[6]=(v*l*s-a*T*s-v*r*c+n*T*c+a*r*U-n*l*U)*F,t[7]=(a*m*s-d*l*s+d*r*c-n*m*c-a*r*y+n*l*y)*F,t[8]=S*F,t[9]=(v*h*s-d*I*s-v*i*y+n*I*y+d*i*U-n*h*U)*F,t[10]=(a*I*s-v*u*s+v*i*c-n*I*c-a*i*U+n*u*U)*F,t[11]=(d*u*s-a*h*s-d*i*c+n*h*c+a*i*y-n*u*y)*F,t[12]=A*F,t[13]=(d*I*r-v*h*r+v*i*m-n*I*m-d*i*T+n*h*T)*F,t[14]=(v*u*r-a*I*r-v*i*l+n*I*l+a*i*T-n*u*T)*F,t[15]=(a*h*r-d*u*r+d*i*l-n*h*l-a*i*m+n*u*m)*F,this}scale(t){let n=this.elements,i=t.x,r=t.y,s=t.z;return n[0]*=i,n[4]*=r,n[8]*=s,n[1]*=i,n[5]*=r,n[9]*=s,n[2]*=i,n[6]*=r,n[10]*=s,n[3]*=i,n[7]*=r,n[11]*=s,this}getMaxScaleOnAxis(){let t=this.elements,n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(n,i,r))}makeTranslation(t,n,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,n,0,0,1,i,0,0,0,1),this}makeRotationX(t){let n=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1),this}makeRotationY(t){let n=Math.cos(t),i=Math.sin(t);return this.set(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1),this}makeRotationZ(t){let n=Math.cos(t),i=Math.sin(t);return this.set(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,n){let i=Math.cos(n),r=Math.sin(n),s=1-i,a=t.x,u=t.y,l=t.z,c=s*a,d=s*u;return this.set(c*a+i,c*u-r*l,c*l+r*u,0,c*u+r*l,d*u+i,d*l-r*a,0,c*l-r*u,d*l+r*a,s*l*l+i,0,0,0,0,1),this}makeScale(t,n,i){return this.set(t,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,n,i,r,s,a){return this.set(1,i,s,0,t,1,a,0,n,r,1,0,0,0,0,1),this}compose(t,n,i){let r=this.elements,s=n._x,a=n._y,u=n._z,l=n._w,c=s+s,d=a+a,h=u+u,m=s*c,y=s*d,v=s*h,I=a*d,T=a*h,U=u*h,D=l*c,w=l*d,S=l*h,A=i.x,j=i.y,F=i.z;return r[0]=(1-(I+U))*A,r[1]=(y+S)*A,r[2]=(v-w)*A,r[3]=0,r[4]=(y-S)*j,r[5]=(1-(m+U))*j,r[6]=(T+D)*j,r[7]=0,r[8]=(v+w)*F,r[9]=(T-D)*F,r[10]=(1-(m+I))*F,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,this}decompose(t,n,i){let r=this.elements,s=so.set(r[0],r[1],r[2]).length(),a=so.set(r[4],r[5],r[6]).length(),u=so.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),t.x=r[12],t.y=r[13],t.z=r[14],Yn.copy(this);let c=1/s,d=1/a,h=1/u;return Yn.elements[0]*=c,Yn.elements[1]*=c,Yn.elements[2]*=c,Yn.elements[4]*=d,Yn.elements[5]*=d,Yn.elements[6]*=d,Yn.elements[8]*=h,Yn.elements[9]*=h,Yn.elements[10]*=h,n.setFromRotationMatrix(Yn),i.x=s,i.y=a,i.z=u,this}makePerspective(t,n,i,r,s,a,u=Ps){let l=this.elements,c=2*s/(n-t),d=2*s/(i-r),h=(n+t)/(n-t),m=(i+r)/(i-r),y,v;if(u===Ps)y=-(a+s)/(a-s),v=-2*a*s/(a-s);else if(u===w_)y=-a/(a-s),v=-a*s/(a-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+u);return l[0]=c,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=d,l[9]=m,l[13]=0,l[2]=0,l[6]=0,l[10]=y,l[14]=v,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,n,i,r,s,a,u=Ps){let l=this.elements,c=1/(n-t),d=1/(i-r),h=1/(a-s),m=(n+t)*c,y=(i+r)*d,v,I;if(u===Ps)v=(a+s)*h,I=-2*h;else if(u===w_)v=s*h,I=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+u);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-m,l[1]=0,l[5]=2*d,l[9]=0,l[13]=-y,l[2]=0,l[6]=0,l[10]=I,l[14]=-v,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(t){let n=this.elements,i=t.elements;for(let r=0;r<16;r++)if(n[r]!==i[r])return!1;return!0}fromArray(t,n=0){for(let i=0;i<16;i++)this.elements[i]=t[i+n];return this}toArray(t=[],n=0){let i=this.elements;return t[n]=i[0],t[n+1]=i[1],t[n+2]=i[2],t[n+3]=i[3],t[n+4]=i[4],t[n+5]=i[5],t[n+6]=i[6],t[n+7]=i[7],t[n+8]=i[8],t[n+9]=i[9],t[n+10]=i[10],t[n+11]=i[11],t[n+12]=i[12],t[n+13]=i[13],t[n+14]=i[14],t[n+15]=i[15],t}};o(Rs,"Matrix4");var kr=Rs,so=new ke,Yn=new kr,xT=new ke(0,0,0),vT=new ke(1,1,1),ui=new ke,fc=new ke,xn=new ke,A_=new kr,P_=new di,Sc=class Sc{constructor(t=0,n=0,i=0,r=Sc.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=i,this._order=r}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,n,i,r=this._order){return this._x=t,this._y=n,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,n=this._order,i=!0){let r=t.elements,s=r[0],a=r[4],u=r[8],l=r[1],c=r[5],d=r[9],h=r[2],m=r[6],y=r[10];switch(n){case"XYZ":this._y=Math.asin(Je(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(-d,y),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(m,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Je(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(u,y),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,s),this._z=0);break;case"ZXY":this._x=Math.asin(Je(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-h,y),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Je(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(m,y),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(Je(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,c),this._y=Math.atan2(-h,s)):(this._x=0,this._y=Math.atan2(u,y));break;case"XZY":this._z=Math.asin(-Je(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,c),this._y=Math.atan2(u,s)):(this._x=Math.atan2(-d,y),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,i===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,i){return A_.makeRotationFromQuaternion(t),this.setFromRotationMatrix(A_,n,i)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return P_.setFromEuler(this),this.setFromQuaternion(P_,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};o(Sc,"Euler");var Os=Sc;Os.DEFAULT_ORDER="XYZ";var ad=class ad{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}};o(ad,"Layers");var yc=ad,_T=0,R_=new ke,ao=new di,Nr=new kr,dc=new ke,Ts=new ke,bT=new ke,ST=new di,C_=new ke(1,0,0),O_=new ke(0,1,0),U_=new ke(0,0,1),N_={type:"added"},IT={type:"removed"},co={type:"childadded",child:null},wf={type:"childremoved",child:null},lo=class lo extends Cs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:_T++}),this.uuid=ed(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=lo.DEFAULT_UP.clone();let t=new ke,n=new Os,i=new di,r=new ke(1,1,1);function s(){i.setFromEuler(n,!1)}o(s,"onRotationChange");function a(){n.setFromQuaternion(i,void 0,!1)}o(a,"onQuaternionChange"),n._onChange(s),i._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new kr},normalMatrix:{value:new me}}),this.matrix=new kr,this.matrixWorld=new kr,this.matrixAutoUpdate=lo.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=lo.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new yc,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,n){this.quaternion.setFromAxisAngle(t,n)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,n){return ao.setFromAxisAngle(t,n),this.quaternion.multiply(ao),this}rotateOnWorldAxis(t,n){return ao.setFromAxisAngle(t,n),this.quaternion.premultiply(ao),this}rotateX(t){return this.rotateOnAxis(C_,t)}rotateY(t){return this.rotateOnAxis(O_,t)}rotateZ(t){return this.rotateOnAxis(U_,t)}translateOnAxis(t,n){return R_.copy(t).applyQuaternion(this.quaternion),this.position.add(R_.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(C_,t)}translateY(t){return this.translateOnAxis(O_,t)}translateZ(t){return this.translateOnAxis(U_,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Nr.copy(this.matrixWorld).invert())}lookAt(t,n,i){t.isVector3?dc.copy(t):dc.set(t,n,i);let r=this.parent;this.updateWorldMatrix(!0,!1),Ts.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Nr.lookAt(Ts,dc,this.up):Nr.lookAt(dc,Ts,this.up),this.quaternion.setFromRotationMatrix(Nr),r&&(Nr.extractRotation(r.matrixWorld),ao.setFromRotationMatrix(Nr),this.quaternion.premultiply(ao.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(N_),co.child=t,this.dispatchEvent(co),co.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}let n=this.children.indexOf(t);return n!==-1&&(t.parent=null,this.children.splice(n,1),t.dispatchEvent(IT),wf.child=t,this.dispatchEvent(wf),wf.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),Nr.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),Nr.multiply(t.parent.matrixWorld)),t.applyMatrix4(Nr),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(N_),co.child=t,this.dispatchEvent(co),co.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,n){if(this[t]===n)return this;for(let i=0,r=this.children.length;i<r;i++){let a=this.children[i].getObjectByProperty(t,n);if(a!==void 0)return a}}getObjectsByProperty(t,n,i=[]){this[t]===n&&i.push(this);let r=this.children;for(let s=0,a=r.length;s<a;s++)r[s].getObjectsByProperty(t,n,i);return i}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ts,t,bT),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ts,ST,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);let n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverseVisible(t)}traverseAncestors(t){let n=this.parent;n!==null&&(t(n),n.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].updateMatrixWorld(t)}updateWorldMatrix(t,n){let i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){let r=this.children;for(let s=0,a=r.length;s<a;s++)r[s].updateWorldMatrix(!1,!0)}}toJSON(t){let n=t===void 0||typeof t=="string",i={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});let r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(u=>({boxInitialized:u.boxInitialized,boxMin:u.box.min.toArray(),boxMax:u.box.max.toArray(),sphereInitialized:u.sphereInitialized,sphereRadius:u.sphere.radius,sphereCenter:u.sphere.center.toArray()})),r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(t),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()}));function s(u,l){return u[l.uuid]===void 0&&(u[l.uuid]=l.toJSON(t)),l.uuid}if(o(s,"serialize"),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(t.geometries,this.geometry);let u=this.geometry.parameters;if(u!==void 0&&u.shapes!==void 0){let l=u.shapes;if(Array.isArray(l))for(let c=0,d=l.length;c<d;c++){let h=l[c];s(t.shapes,h)}else s(t.shapes,l)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let u=[];for(let l=0,c=this.material.length;l<c;l++)u.push(s(t.materials,this.material[l]));r.material=u}else r.material=s(t.materials,this.material);if(this.children.length>0){r.children=[];for(let u=0;u<this.children.length;u++)r.children.push(this.children[u].toJSON(t).object)}if(this.animations.length>0){r.animations=[];for(let u=0;u<this.animations.length;u++){let l=this.animations[u];r.animations.push(s(t.animations,l))}}if(n){let u=a(t.geometries),l=a(t.materials),c=a(t.textures),d=a(t.images),h=a(t.shapes),m=a(t.skeletons),y=a(t.animations),v=a(t.nodes);u.length>0&&(i.geometries=u),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),d.length>0&&(i.images=d),h.length>0&&(i.shapes=h),m.length>0&&(i.skeletons=m),y.length>0&&(i.animations=y),v.length>0&&(i.nodes=v)}return i.object=r,i;function a(u){let l=[];for(let c in u){let d=u[c];delete d.metadata,l.push(d)}return l}o(a,"extractFromCache")}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),n===!0)for(let i=0;i<t.children.length;i++){let r=t.children[i];this.add(r.clone())}return this}};o(lo,"Object3D");var Us=lo;Us.DEFAULT_UP=new ke(0,1,0);Us.DEFAULT_MATRIX_AUTO_UPDATE=!0;Us.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var z_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},li={h:0,s:0,l:0},pc={h:0,s:0,l:0};function Mf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*6*(2/3-n):e}o(Mf,"hue2rgb");var cd=class cd{constructor(t,n,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,n,i)}set(t,n,i){if(n===void 0&&i===void 0){let r=t;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(t,n,i);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,n=Nn){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,Un.toWorkingColorSpace(this,n),this}setRGB(t,n,i,r=Un.workingColorSpace){return this.r=t,this.g=n,this.b=i,Un.toWorkingColorSpace(this,r),this}setHSL(t,n,i,r=Un.workingColorSpace){if(t=hT(t,1),n=Je(n,0,1),i=Je(i,0,1),n===0)this.r=this.g=this.b=i;else{let s=i<=.5?i*(1+n):i+n-i*n,a=2*i-s;this.r=Mf(a,s,t+1/3),this.g=Mf(a,s,t),this.b=Mf(a,s,t-1/3)}return Un.toWorkingColorSpace(this,r),this}setStyle(t,n=Nn){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}o(i,"handleAlpha");let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(t)){let s,a=r[1],u=r[2];switch(a){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,n);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,n);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(t)){let s=r[1],a=s.length;if(a===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,n);if(a===6)return this.setHex(parseInt(s,16),n);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,n);return this}setColorName(t,n=Nn){let i=z_[t.toLowerCase()];return i!==void 0?this.setHex(i,n):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Fr(t.r),this.g=Fr(t.g),this.b=Fr(t.b),this}copyLinearToSRGB(t){return this.r=fo(t.r),this.g=fo(t.g),this.b=fo(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Nn){return Un.fromWorkingColorSpace(Gt.copy(this),t),Math.round(Je(Gt.r*255,0,255))*65536+Math.round(Je(Gt.g*255,0,255))*256+Math.round(Je(Gt.b*255,0,255))}getHexString(t=Nn){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,n=Un.workingColorSpace){Un.fromWorkingColorSpace(Gt.copy(this),n);let i=Gt.r,r=Gt.g,s=Gt.b,a=Math.max(i,r,s),u=Math.min(i,r,s),l,c,d=(u+a)/2;if(u===a)l=0,c=0;else{let h=a-u;switch(c=d<=.5?h/(a+u):h/(2-a-u),a){case i:l=(r-s)/h+(r<s?6:0);break;case r:l=(s-i)/h+2;break;case s:l=(i-r)/h+4;break}l/=6}return t.h=l,t.s=c,t.l=d,t}getRGB(t,n=Un.workingColorSpace){return Un.fromWorkingColorSpace(Gt.copy(this),n),t.r=Gt.r,t.g=Gt.g,t.b=Gt.b,t}getStyle(t=Nn){Un.fromWorkingColorSpace(Gt.copy(this),t);let n=Gt.r,i=Gt.g,r=Gt.b;return t!==Nn?"color(".concat(t," ").concat(n.toFixed(3)," ").concat(i.toFixed(3)," ").concat(r.toFixed(3),")"):"rgb(".concat(Math.round(n*255),",").concat(Math.round(i*255),",").concat(Math.round(r*255),")")}offsetHSL(t,n,i){return this.getHSL(li),this.setHSL(li.h+t,li.s+n,li.l+i)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,n){return this.r=t.r+n.r,this.g=t.g+n.g,this.b=t.b+n.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,n){return this.r+=(t.r-this.r)*n,this.g+=(t.g-this.g)*n,this.b+=(t.b-this.b)*n,this}lerpColors(t,n,i){return this.r=t.r+(n.r-t.r)*i,this.g=t.g+(n.g-t.g)*i,this.b=t.b+(n.b-t.b)*i,this}lerpHSL(t,n){this.getHSL(li),t.getHSL(pc);let i=_f(li.h,pc.h,n),r=_f(li.s,pc.s,n),s=_f(li.l,pc.l,n);return this.setHSL(i,r,s),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){let n=this.r,i=this.g,r=this.b,s=t.elements;return this.r=s[0]*n+s[3]*i+s[6]*r,this.g=s[1]*n+s[4]*i+s[7]*r,this.b=s[2]*n+s[5]*i+s[8]*r,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,n=0){return this.r=t[n],this.g=t[n+1],this.b=t[n+2],this}toArray(t=[],n=0){return t[n]=this.r,t[n+1]=this.g,t[n+2]=this.b,t}fromBufferAttribute(t,n){return this.r=t.getX(n),this.g=t.getY(n),this.b=t.getZ(n),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}};o(cd,"Color");var _t=cd,Gt=new _t;_t.NAMES=z_;function B_(e){let t={};for(let n in e){t[n]={};for(let i in e[n]){let r=e[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[n][i]=null):t[n][i]=r.clone():Array.isArray(r)?t[n][i]=r.slice():t[n][i]=r}}return t}o(B_,"cloneUniforms");function en(e){let t={};for(let n=0;n<e.length;n++){let i=B_(e[n]);for(let r in i)t[r]=i[r]}return t}o(en,"mergeUniforms");function hc(e,t,n){return!e||!n&&e.constructor===t?e:typeof t.BYTES_PER_ELEMENT=="number"?new t(e):Array.prototype.slice.call(e)}o(hc,"convertArray");function wT(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}o(wT,"isTypedArray");var ud=class ud{constructor(t,n,i,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=r!==void 0?r:new n.constructor(i),this.sampleValues=n,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(t){let n=this.parameterPositions,i=this._cachedIndex,r=n[i],s=n[i-1];n:{e:{let a;t:{r:if(!(t<r)){for(let u=i+2;;){if(r===void 0){if(t<s)break r;return i=n.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===u)break;if(s=r,r=n[++i],t<r)break e}a=n.length;break t}if(!(t>=s)){let u=n[1];t<u&&(i=2,s=u);for(let l=i-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===l)break;if(r=s,s=n[--i-1],t>=s)break e}a=i,i=0;break t}break n}for(;i<a;){let u=i+a>>>1;t<n[u]?a=u:i=u+1}if(r=n[i],s=n[i-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return i=n.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,s,r)}return this.interpolate_(i,s,t,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){let n=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=t*r;for(let a=0;a!==r;++a)n[a]=i[s+a];return n}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}};o(ud,"Interpolant");var ho=ud,ld=class ld extends ho{constructor(t,n,i,r){super(t,n,i,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:b_,endingEnd:b_}}intervalChanged_(t,n,i){let r=this.parameterPositions,s=t-2,a=t+1,u=r[s],l=r[a];if(u===void 0)switch(this.getSettings_().endingStart){case S_:s=t,u=2*n-i;break;case I_:s=r.length-2,u=n+r[s]-r[s+1];break;default:s=t,u=i}if(l===void 0)switch(this.getSettings_().endingEnd){case S_:a=t,l=2*i-n;break;case I_:a=1,l=i+r[1]-r[0];break;default:a=t-1,l=n}let c=(i-n)*.5,d=this.valueSize;this._weightPrev=c/(n-u),this._weightNext=c/(l-i),this._offsetPrev=s*d,this._offsetNext=a*d}interpolate_(t,n,i,r){let s=this.resultBuffer,a=this.sampleValues,u=this.valueSize,l=t*u,c=l-u,d=this._offsetPrev,h=this._offsetNext,m=this._weightPrev,y=this._weightNext,v=(i-n)/(r-n),I=v*v,T=I*v,U=-m*T+2*m*I-m*v,D=(1+m)*T+(-1.5-2*m)*I+(-.5+m)*v+1,w=(-1-y)*T+(1.5+y)*I+.5*v,S=y*T-y*I;for(let A=0;A!==u;++A)s[A]=U*a[d+A]+D*a[c+A]+w*a[l+A]+S*a[h+A];return s}};o(ld,"CubicInterpolant");var Nf=ld,fd=class fd extends ho{constructor(t,n,i,r){super(t,n,i,r)}interpolate_(t,n,i,r){let s=this.resultBuffer,a=this.sampleValues,u=this.valueSize,l=t*u,c=l-u,d=(i-n)/(r-n),h=1-d;for(let m=0;m!==u;++m)s[m]=a[c+m]*h+a[l+m]*d;return s}};o(fd,"LinearInterpolant");var Ff=fd,dd=class dd extends ho{constructor(t,n,i,r){super(t,n,i,r)}interpolate_(t){return this.copySampleValue_(t-1)}};o(dd,"DiscreteInterpolant");var kf=dd,pd=class pd{constructor(t,n,i,r){if(t===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(n===void 0||n.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=hc(n,this.TimeBufferType),this.values=hc(i,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(t){let n=t.constructor,i;if(n.toJSON!==this.toJSON)i=n.toJSON(t);else{i={name:t.name,times:hc(t.times,Array),values:hc(t.values,Array)};let r=t.getInterpolation();r!==t.DefaultInterpolation&&(i.interpolation=r)}return i.type=t.ValueTypeName,i}InterpolantFactoryMethodDiscrete(t){return new kf(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new Ff(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new Nf(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let n;switch(t){case gc:n=this.InterpolantFactoryMethodDiscrete;break;case Af:n=this.InterpolantFactoryMethodLinear;break;case vf:n=this.InterpolantFactoryMethodSmooth;break}if(n===void 0){let i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(i);return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=n,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return gc;case this.InterpolantFactoryMethodLinear:return Af;case this.InterpolantFactoryMethodSmooth:return vf}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){let n=this.times;for(let i=0,r=n.length;i!==r;++i)n[i]+=t}return this}scale(t){if(t!==1){let n=this.times;for(let i=0,r=n.length;i!==r;++i)n[i]*=t}return this}trim(t,n){let i=this.times,r=i.length,s=0,a=r-1;for(;s!==r&&i[s]<t;)++s;for(;a!==-1&&i[a]>n;)--a;if(++a,s!==0||a!==r){s>=a&&(a=Math.max(a,1),s=a-1);let u=this.getValueSize();this.times=i.slice(s,a),this.values=this.values.slice(s*u,a*u)}return this}validate(){let t=!0,n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let a=null;for(let u=0;u!==s;u++){let l=i[u];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,u,l),t=!1;break}if(a!==null&&a>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,u,l,a),t=!1;break}a=l}if(r!==void 0&&wT(r))for(let u=0,l=r.length;u!==l;++u){let c=r[u];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,u,c),t=!1;break}}return t}optimize(){let t=this.times.slice(),n=this.values.slice(),i=this.getValueSize(),r=this.getInterpolation()===vf,s=t.length-1,a=1;for(let u=1;u<s;++u){let l=!1,c=t[u],d=t[u+1];if(c!==d&&(u!==1||c!==t[0]))if(r)l=!0;else{let h=u*i,m=h-i,y=h+i;for(let v=0;v!==i;++v){let I=n[h+v];if(I!==n[m+v]||I!==n[y+v]){l=!0;break}}}if(l){if(u!==a){t[a]=t[u];let h=u*i,m=a*i;for(let y=0;y!==i;++y)n[m+y]=n[h+y]}++a}}if(s>0){t[a]=t[s];for(let u=s*i,l=a*i,c=0;c!==i;++c)n[l+c]=n[u+c];++a}return a!==t.length?(this.times=t.slice(0,a),this.values=n.slice(0,a*i)):(this.times=t,this.values=n),this}clone(){let t=this.times.slice(),n=this.values.slice(),i=this.constructor,r=new i(this.name,t,n);return r.createInterpolant=this.createInterpolant,r}};o(pd,"KeyframeTrack");var er=pd;er.prototype.TimeBufferType=Float32Array;er.prototype.ValueBufferType=Float32Array;er.prototype.DefaultInterpolation=Af;var hd=class hd extends er{constructor(t,n,i){super(t,n,i)}};o(hd,"BooleanKeyframeTrack");var Oi=hd;Oi.prototype.ValueTypeName="bool";Oi.prototype.ValueBufferType=Array;Oi.prototype.DefaultInterpolation=gc;Oi.prototype.InterpolantFactoryMethodLinear=void 0;Oi.prototype.InterpolantFactoryMethodSmooth=void 0;var md=class md extends er{};o(md,"ColorKeyframeTrack");var Df=md;Df.prototype.ValueTypeName="color";var gd=class gd extends er{};o(gd,"NumberKeyframeTrack");var Lf=gd;Lf.prototype.ValueTypeName="number";var yd=class yd extends ho{constructor(t,n,i,r){super(t,n,i,r)}interpolate_(t,n,i,r){let s=this.resultBuffer,a=this.sampleValues,u=this.valueSize,l=(i-n)/(r-n),c=t*u;for(let d=c+u;c!==d;c+=4)di.slerpFlat(s,0,a,c-u,a,c,l);return s}};o(yd,"QuaternionLinearInterpolant");var $f=yd,xd=class xd extends er{InterpolantFactoryMethodLinear(t){return new $f(this.times,this.values,this.getValueSize(),t)}};o(xd,"QuaternionKeyframeTrack");var xc=xd;xc.prototype.ValueTypeName="quaternion";xc.prototype.InterpolantFactoryMethodSmooth=void 0;var vd=class vd extends er{constructor(t,n,i){super(t,n,i)}};o(vd,"StringKeyframeTrack");var Ui=vd;Ui.prototype.ValueTypeName="string";Ui.prototype.ValueBufferType=Array;Ui.prototype.DefaultInterpolation=gc;Ui.prototype.InterpolantFactoryMethodLinear=void 0;Ui.prototype.InterpolantFactoryMethodSmooth=void 0;var _d=class _d extends er{};o(_d,"VectorKeyframeTrack");var zf=_d;zf.prototype.ValueTypeName="vector";var bd=class bd{constructor(t,n,i){let r=this,s=!1,a=0,u=0,l,c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=n,this.onError=i,this.itemStart=function(d){u++,s===!1&&r.onStart!==void 0&&r.onStart(d,a,u),s=!0},this.itemEnd=function(d){a++,r.onProgress!==void 0&&r.onProgress(d,a,u),a===u&&(s=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(d){r.onError!==void 0&&r.onError(d)},this.resolveURL=function(d){return l?l(d):d},this.setURLModifier=function(d){return l=d,this},this.addHandler=function(d,h){return c.push(d,h),this},this.removeHandler=function(d){let h=c.indexOf(d);return h!==-1&&c.splice(h,2),this},this.getHandler=function(d){for(let h=0,m=c.length;h<m;h+=2){let y=c[h],v=c[h+1];if(y.global&&(y.lastIndex=0),y.test(d))return v}return null}}};o(bd,"LoadingManager");var Bf=bd,MT=new Bf,Sd=class Sd{constructor(t){this.manager=t!==void 0?t:MT,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,n){let i=this;return new Promise(function(r,s){i.load(t,r,n,s)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}};o(Sd,"Loader");var Vf=Sd;Vf.DEFAULT_MATERIAL_NAME="__DEFAULT";var td="\\[\\]\\.:\\/",ET=new RegExp("["+td+"]","g"),nd="[^"+td+"]",TT="[^"+td.replace("\\.","")+"]",AT=/((?:WC+[\/:])*)/.source.replace("WC",nd),PT=/(WCOD+)?/.source.replace("WCOD",TT),RT=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",nd),CT=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",nd),OT=new RegExp("^"+AT+PT+RT+CT+"$"),UT=["material","materials","bones","map"],Id=class Id{constructor(t,n,i){let r=i||at.parseTrackName(n);this._targetGroup=t,this._bindings=t.subscribe_(n,r)}getValue(t,n){this.bind();let i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(t,n)}setValue(t,n){let i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(t,n)}bind(){let t=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=t.length;n!==i;++n)t[n].bind()}unbind(){let t=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=t.length;n!==i;++n)t[n].unbind()}};o(Id,"Composite");var jf=Id,fi=class fi{constructor(t,n,i){this.path=n,this.parsedPath=i||fi.parseTrackName(n),this.node=fi.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,n,i){return t&&t.isAnimationObjectGroup?new fi.Composite(t,n,i):new fi(t,n,i)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(ET,"")}static parseTrackName(t){let n=OT.exec(t);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let i={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){let s=i.nodeName.substring(r+1);UT.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return i}static findNode(t,n){if(n===void 0||n===""||n==="."||n===-1||n===t.name||n===t.uuid)return t;if(t.skeleton){let i=t.skeleton.getBoneByName(n);if(i!==void 0)return i}if(t.children){let i=o(function(s){for(let a=0;a<s.length;a++){let u=s[a];if(u.name===n||u.uuid===n)return u;let l=i(u.children);if(l)return l}return null},"searchNodeSubtree"),r=i(t.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,n){t[n]=this.targetObject[this.propertyName]}_getValue_array(t,n){let i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)t[n++]=i[r]}_getValue_arrayElement(t,n){t[n]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,n){this.resolvedProperty.toArray(t,n)}_setValue_direct(t,n){this.targetObject[this.propertyName]=t[n]}_setValue_direct_setNeedsUpdate(t,n){this.targetObject[this.propertyName]=t[n],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,n){this.targetObject[this.propertyName]=t[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,n){let i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=t[n++]}_setValue_array_setNeedsUpdate(t,n){let i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=t[n++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,n){let i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=t[n++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,n){this.resolvedProperty[this.propertyIndex]=t[n]}_setValue_arrayElement_setNeedsUpdate(t,n){this.resolvedProperty[this.propertyIndex]=t[n],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,n){this.resolvedProperty[this.propertyIndex]=t[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,n){this.resolvedProperty.fromArray(t,n)}_setValue_fromArray_setNeedsUpdate(t,n){this.resolvedProperty.fromArray(t,n),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,n){this.resolvedProperty.fromArray(t,n),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,n){this.bind(),this.getValue(t,n)}_setValue_unbound(t,n){this.bind(),this.setValue(t,n)}bind(){let t=this.node,n=this.parsedPath,i=n.objectName,r=n.propertyName,s=n.propertyIndex;if(t||(t=fi.findNode(this.rootNode,n.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(i){let c=n.objectIndex;switch(i){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}t=t.skeleton.bones;for(let d=0;d<t.length;d++)if(t[d].name===c){c=d;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}t=t.material.map;break;default:if(t[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(c!==void 0){if(t[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[c]}}let a=t[r];if(a===void 0){let c=n.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+r+" but it wasn't found.",t);return}let u=this.Versioning.None;this.targetObject=t,t.isMaterial===!0?u=this.Versioning.NeedsUpdate:t.isObject3D===!0&&(u=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(s!==void 0){if(r==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[s]!==void 0&&(s=t.morphTargetDictionary[s])}l=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=s}else a.fromArray!==void 0&&a.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(l=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=r;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][u]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};o(fi,"PropertyBinding");var at=fi;at.Composite=jf;at.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};at.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};at.prototype.GetterByBindingType=[at.prototype._getValue_direct,at.prototype._getValue_array,at.prototype._getValue_arrayElement,at.prototype._getValue_toArray];at.prototype.SetterByBindingTypeAndVersioning=[[at.prototype._setValue_direct,at.prototype._setValue_direct_setNeedsUpdate,at.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[at.prototype._setValue_array,at.prototype._setValue_array_setNeedsUpdate,at.prototype._setValue_array_setMatrixWorldNeedsUpdate],[at.prototype._setValue_arrayElement,at.prototype._setValue_arrayElement_setNeedsUpdate,at.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[at.prototype._setValue_fromArray,at.prototype._setValue_fromArray_setNeedsUpdate,at.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var l4=new Float32Array(1);typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Gf}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Gf);var NT="#ifdef USE_ALPHAHASH\n if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",FT="#ifdef USE_ALPHAHASH\n const float ALPHA_HASH_SCALE = 0.05;\n float hash2D( vec2 value ) {\n return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n }\n float hash3D( vec3 value ) {\n return hash2D( vec2( hash2D( value.xy ), value.z ) );\n }\n float getAlphaHashThreshold( vec3 position ) {\n float maxDeriv = max(\n length( dFdx( position.xyz ) ),\n length( dFdy( position.xyz ) )\n );\n float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n vec2 pixScales = vec2(\n exp2( floor( log2( pixScale ) ) ),\n exp2( ceil( log2( pixScale ) ) )\n );\n vec2 alpha = vec2(\n hash3D( floor( pixScales.x * position.xyz ) ),\n hash3D( floor( pixScales.y * position.xyz ) )\n );\n float lerpFactor = fract( log2( pixScale ) );\n float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n float a = min( lerpFactor, 1.0 - lerpFactor );\n vec3 cases = vec3(\n x * x / ( 2.0 * a * ( 1.0 - a ) ),\n ( x - 0.5 * a ) / ( 1.0 - a ),\n 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n );\n float threshold = ( x < ( 1.0 - a ) )\n ? ( ( x < a ) ? cases.x : cases.y )\n : cases.z;\n return clamp( threshold , 1.0e-6, 1.0 );\n }\n#endif",kT="#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",DT="#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",LT="#ifdef USE_ALPHATEST\n #ifdef ALPHA_TO_COVERAGE\n diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n if ( diffuseColor.a < alphaTest ) discard;\n #endif\n#endif",$T="#ifdef USE_ALPHATEST\n uniform float alphaTest;\n#endif",zT="#ifdef USE_AOMAP\n float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n #if defined( USE_CLEARCOAT ) \n clearcoatSpecularIndirect *= ambientOcclusion;\n #endif\n #if defined( USE_SHEEN ) \n sheenSpecularIndirect *= ambientOcclusion;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD )\n float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n #endif\n#endif",BT="#ifdef USE_AOMAP\n uniform sampler2D aoMap;\n uniform float aoMapIntensity;\n#endif",VT="#ifdef USE_BATCHING\n #if ! defined( GL_ANGLE_multi_draw )\n #define gl_DrawID _gl_DrawID\n uniform int _gl_DrawID;\n #endif\n uniform highp sampler2D batchingTexture;\n uniform highp usampler2D batchingIdTexture;\n mat4 getBatchingMatrix( const in float i ) {\n int size = textureSize( batchingTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n float getIndirectIndex( const in int i ) {\n int size = textureSize( batchingIdTexture, 0 ).x;\n int x = i % size;\n int y = i / size;\n return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n }\n#endif\n#ifdef USE_BATCHING_COLOR\n uniform sampler2D batchingColorTexture;\n vec3 getBatchingColor( const in float i ) {\n int size = textureSize( batchingColorTexture, 0 ).x;\n int j = int( i );\n int x = j % size;\n int y = j / size;\n return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n }\n#endif",jT="#ifdef USE_BATCHING\n mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif",GT="vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n vPosition = vec3( position );\n#endif",HT="vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n vec3 objectTangent = vec3( tangent.xyz );\n#endif",WT="float G_BlinnPhong_Implicit( ) {\n return 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( specularColor, 1.0, dotVH );\n float G = G_BlinnPhong_Implicit( );\n float D = D_BlinnPhong( shininess, dotNH );\n return F * ( G * D );\n} // validated",ZT="#ifdef USE_IRIDESCENCE\n const mat3 XYZ_TO_REC709 = mat3(\n 3.2404542, -0.9692660, 0.0556434,\n -1.5371385, 1.8760108, -0.2040259,\n -0.4985314, 0.0415560, 1.0572252\n );\n vec3 Fresnel0ToIor( vec3 fresnel0 ) {\n vec3 sqrtF0 = sqrt( fresnel0 );\n return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n }\n vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n }\n float IorToFresnel0( float transmittedIor, float incidentIor ) {\n return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n }\n vec3 evalSensitivity( float OPD, vec3 shift ) {\n float phase = 2.0 * PI * OPD * 1.0e-9;\n vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n xyz /= 1.0685e-7;\n vec3 rgb = XYZ_TO_REC709 * xyz;\n return rgb;\n }\n vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n vec3 I;\n float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n float cosTheta2Sq = 1.0 - sinTheta2Sq;\n if ( cosTheta2Sq < 0.0 ) {\n return vec3( 1.0 );\n }\n float cosTheta2 = sqrt( cosTheta2Sq );\n float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n float R12 = F_Schlick( R0, 1.0, cosTheta1 );\n float T121 = 1.0 - R12;\n float phi12 = 0.0;\n if ( iridescenceIOR < outsideIOR ) phi12 = PI;\n float phi21 = PI - phi12;\n vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n vec3 phi23 = vec3( 0.0 );\n if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n vec3 phi = vec3( phi21 ) + phi23;\n vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n vec3 r123 = sqrt( R123 );\n vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n vec3 C0 = R12 + Rs;\n I = C0;\n vec3 Cm = Rs - T121;\n for ( int m = 1; m <= 2; ++ m ) {\n Cm *= r123;\n vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n I += Cm * Sm;\n }\n return max( I, vec3( 0.0 ) );\n }\n#endif",XT="#ifdef USE_BUMPMAP\n uniform sampler2D bumpMap;\n uniform float bumpScale;\n vec2 dHdxy_fwd() {\n vec2 dSTdx = dFdx( vBumpMapUv );\n vec2 dSTdy = dFdy( vBumpMapUv );\n float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n return vec2( dBx, dBy );\n }\n vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n vec3 vN = surf_norm;\n vec3 R1 = cross( vSigmaY, vN );\n vec3 R2 = cross( vN, vSigmaX );\n float fDet = dot( vSigmaX, R1 ) * faceDirection;\n vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n return normalize( abs( fDet ) * surf_norm - vGrad );\n }\n#endif",qT="#if NUM_CLIPPING_PLANES > 0\n vec4 plane;\n #ifdef ALPHA_TO_COVERAGE\n float distanceToPlane, distanceGradient;\n float clipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n if ( clipOpacity == 0.0 ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n float unionClipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n }\n #pragma unroll_loop_end\n clipOpacity *= 1.0 - unionClipOpacity;\n #endif\n diffuseColor.a *= clipOpacity;\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n bool clipped = true;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n }\n #pragma unroll_loop_end\n if ( clipped ) discard;\n #endif\n #endif\n#endif",KT="#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",JT="#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n#endif",YT="#if NUM_CLIPPING_PLANES > 0\n vClipPosition = - mvPosition.xyz;\n#endif",QT="#if defined( USE_COLOR_ALPHA )\n diffuseColor *= vColor;\n#elif defined( USE_COLOR )\n diffuseColor.rgb *= vColor;\n#endif",eA="#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR )\n varying vec3 vColor;\n#endif",tA="#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n varying vec3 vColor;\n#endif",nA="#if defined( USE_COLOR_ALPHA )\n vColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n vColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n vColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n vColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n vColor.xyz *= batchingColor.xyz;\n#endif",rA="#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n float precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n float precisionSafeLength( vec3 v ) {\n float maxComponent = max3( abs( v ) );\n return length( v / maxComponent ) * maxComponent;\n }\n#endif\nstruct IncidentLight {\n vec3 color;\n vec3 direction;\n bool visible;\n};\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n varying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n mat3 tmp;\n tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n return tmp;\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n return RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",iA="#ifdef ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n #define cubeUV_minTileSize 16.0\n float getFace( vec3 direction ) {\n vec3 absDirection = abs( direction );\n float face = - 1.0;\n if ( absDirection.x > absDirection.z ) {\n if ( absDirection.x > absDirection.y )\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if ( absDirection.z > absDirection.y )\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n }\n vec2 getUV( vec3 direction, float face ) {\n vec2 uv;\n if ( face == 0.0 ) {\n uv = vec2( direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 1.0 ) {\n uv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n } else if ( face == 2.0 ) {\n uv = vec2( - direction.x, direction.y ) / abs( direction.z );\n } else if ( face == 3.0 ) {\n uv = vec2( - direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 4.0 ) {\n uv = vec2( - direction.x, direction.z ) / abs( direction.y );\n } else {\n uv = vec2( direction.x, direction.y ) / abs( direction.z );\n }\n return 0.5 * ( uv + 1.0 );\n }\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n float face = getFace( direction );\n float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n mipInt = max( mipInt, cubeUV_minMipLevel );\n float faceSize = exp2( mipInt );\n highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n if ( face > 2.0 ) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n uv.x += filterInt * 3.0 * cubeUV_minTileSize;\n uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n uv.x *= CUBEUV_TEXEL_WIDTH;\n uv.y *= CUBEUV_TEXEL_HEIGHT;\n #ifdef texture2DGradEXT\n return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n #else\n return texture2D( envMap, uv ).rgb;\n #endif\n }\n #define cubeUV_r0 1.0\n #define cubeUV_m0 - 2.0\n #define cubeUV_r1 0.8\n #define cubeUV_m1 - 1.0\n #define cubeUV_r4 0.4\n #define cubeUV_m4 2.0\n #define cubeUV_r5 0.305\n #define cubeUV_m5 3.0\n #define cubeUV_r6 0.21\n #define cubeUV_m6 4.0\n float roughnessToMip( float roughness ) {\n float mip = 0.0;\n if ( roughness >= cubeUV_r1 ) {\n mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n } else if ( roughness >= cubeUV_r4 ) {\n mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n } else if ( roughness >= cubeUV_r5 ) {\n mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n } else if ( roughness >= cubeUV_r6 ) {\n mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n } else {\n mip = - 2.0 * log2( 1.16 * roughness ); }\n return mip;\n }\n vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n float mipF = fract( mip );\n float mipInt = floor( mip );\n vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n if ( mipF == 0.0 ) {\n return vec4( color0, 1.0 );\n } else {\n vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n return vec4( mix( color0, color1, mipF ), 1.0 );\n }\n }\n#endif",oA="vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n vec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n mat3 bm = mat3( batchingMatrix );\n transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n transformedNormal = bm * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = bm * transformedTangent;\n #endif\n#endif\n#ifdef USE_INSTANCING\n mat3 im = mat3( instanceMatrix );\n transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n transformedNormal = im * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = im * transformedTangent;\n #endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n transformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n #ifdef FLIP_SIDED\n transformedTangent = - transformedTangent;\n #endif\n#endif",sA="#ifdef USE_DISPLACEMENTMAP\n uniform sampler2D displacementMap;\n uniform float displacementScale;\n uniform float displacementBias;\n#endif",aA="#ifdef USE_DISPLACEMENTMAP\n transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",cA="#ifdef USE_EMISSIVEMAP\n vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n emissiveColor = sRGBTransferEOTF( emissiveColor );\n #endif\n totalEmissiveRadiance *= emissiveColor.rgb;\n#endif",uA="#ifdef USE_EMISSIVEMAP\n uniform sampler2D emissiveMap;\n#endif",lA="gl_FragColor = linearToOutputTexel( gl_FragColor );",fA="vec4 LinearTransferOETF( in vec4 value ) {\n return value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",dA="#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vec3 cameraToFrag;\n if ( isOrthographic ) {\n cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToFrag = normalize( vWorldPosition - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vec3 reflectVec = reflect( cameraToFrag, worldNormal );\n #else\n vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n #endif\n #else\n vec3 reflectVec = vReflect;\n #endif\n #ifdef ENVMAP_TYPE_CUBE\n vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n #else\n vec4 envColor = vec4( 0.0 );\n #endif\n #ifdef ENVMAP_BLENDING_MULTIPLY\n outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_MIX )\n outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_ADD )\n outgoingLight += envColor.xyz * specularStrength * reflectivity;\n #endif\n#endif",pA="#ifdef USE_ENVMAP\n uniform float envMapIntensity;\n uniform float flipEnvMap;\n uniform mat3 envMapRotation;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n #else\n uniform sampler2D envMap;\n #endif\n \n#endif",hA="#ifdef USE_ENVMAP\n uniform float reflectivity;\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n varying vec3 vWorldPosition;\n uniform float refractionRatio;\n #else\n varying vec3 vReflect;\n #endif\n#endif",mA="#ifdef USE_ENVMAP\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n \n varying vec3 vWorldPosition;\n #else\n varying vec3 vReflect;\n uniform float refractionRatio;\n #endif\n#endif",gA="#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vWorldPosition = worldPosition.xyz;\n #else\n vec3 cameraToVertex;\n if ( isOrthographic ) {\n cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vReflect = reflect( cameraToVertex, worldNormal );\n #else\n vReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n #endif\n #endif\n#endif",yA="#ifdef USE_FOG\n vFogDepth = - mvPosition.z;\n#endif",xA="#ifdef USE_FOG\n varying float vFogDepth;\n#endif",vA="#ifdef USE_FOG\n #ifdef FOG_EXP2\n float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n #else\n float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n #endif\n gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",_A="#ifdef USE_FOG\n uniform vec3 fogColor;\n varying float vFogDepth;\n #ifdef FOG_EXP2\n uniform float fogDensity;\n #else\n uniform float fogNear;\n uniform float fogFar;\n #endif\n#endif",bA="#ifdef USE_GRADIENTMAP\n uniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n float dotNL = dot( normal, lightDirection );\n vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n #ifdef USE_GRADIENTMAP\n return vec3( texture2D( gradientMap, coord ).r );\n #else\n vec2 fw = fwidth( coord ) * 0.5;\n return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n #endif\n}",SA="#ifdef USE_LIGHTMAP\n uniform sampler2D lightMap;\n uniform float lightMapIntensity;\n#endif",IA="LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",wA="varying vec3 vViewPosition;\nstruct LambertMaterial {\n vec3 diffuseColor;\n float specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Lambert\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert",MA="uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n uniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n float x = normal.x, y = normal.y, z = normal.z;\n vec3 result = shCoefficients[ 0 ] * 0.886227;\n result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n return result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n return irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n vec3 irradiance = ambientLightColor;\n return irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n if ( cutoffDistance > 0.0 ) {\n distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n }\n return distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n return smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n struct DirectionalLight {\n vec3 direction;\n vec3 color;\n };\n uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n light.color = directionalLight.color;\n light.direction = directionalLight.direction;\n light.visible = true;\n }\n#endif\n#if NUM_POINT_LIGHTS > 0\n struct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n };\n uniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = pointLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float lightDistance = length( lVector );\n light.color = pointLight.color;\n light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n }\n#endif\n#if NUM_SPOT_LIGHTS > 0\n struct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n };\n uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = spotLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float angleCos = dot( light.direction, spotLight.direction );\n float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n if ( spotAttenuation > 0.0 ) {\n float lightDistance = length( lVector );\n light.color = spotLight.color * spotAttenuation;\n light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n } else {\n light.color = vec3( 0.0 );\n light.visible = false;\n }\n }\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n struct RectAreaLight {\n vec3 color;\n vec3 position;\n vec3 halfWidth;\n vec3 halfHeight;\n };\n uniform sampler2D ltc_1; uniform sampler2D ltc_2;\n uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n struct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n };\n uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n float dotNL = dot( normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n }\n#endif",EA="#ifdef USE_ENVMAP\n vec3 getIBLIrradiance( const in vec3 normal ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n return PI * envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 reflectVec = reflect( - viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n return envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n #ifdef USE_ANISOTROPY\n vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 bentNormal = cross( bitangent, viewDir );\n bentNormal = normalize( cross( bentNormal, bitangent ) );\n bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n return getIBLRadiance( viewDir, bentNormal, roughness );\n #else\n return vec3( 0.0 );\n #endif\n }\n #endif\n#endif",TA="ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",AA="varying vec3 vViewPosition;\nstruct ToonMaterial {\n vec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Toon\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon",PA="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",RA="varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n vec3 diffuseColor;\n vec3 specularColor;\n float specularShininess;\n float specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_BlinnPhong\n#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong",CA="PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n material.ior = ior;\n #ifdef USE_SPECULAR\n float specularIntensityFactor = specularIntensity;\n vec3 specularColorFactor = specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n #endif\n material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n #else\n float specularIntensityFactor = 1.0;\n vec3 specularColorFactor = vec3( 1.0 );\n material.specularF90 = 1.0;\n #endif\n material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n material.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n material.clearcoat = clearcoat;\n material.clearcoatRoughness = clearcoatRoughness;\n material.clearcoatF0 = vec3( 0.04 );\n material.clearcoatF90 = 1.0;\n #ifdef USE_CLEARCOATMAP\n material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n #endif\n #ifdef USE_CLEARCOAT_ROUGHNESSMAP\n material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n #endif\n material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n material.clearcoatRoughness += geometryRoughness;\n material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n material.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n material.iridescence = iridescence;\n material.iridescenceIOR = iridescenceIOR;\n #ifdef USE_IRIDESCENCEMAP\n material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n #endif\n #ifdef USE_IRIDESCENCE_THICKNESSMAP\n material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n #else\n material.iridescenceThickness = iridescenceThicknessMaximum;\n #endif\n#endif\n#ifdef USE_SHEEN\n material.sheenColor = sheenColor;\n #ifdef USE_SHEEN_COLORMAP\n material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n #endif\n material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n #ifdef USE_SHEEN_ROUGHNESSMAP\n material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n #ifdef USE_ANISOTROPYMAP\n mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n #else\n vec2 anisotropyV = anisotropyVector;\n #endif\n material.anisotropy = length( anisotropyV );\n if( material.anisotropy == 0.0 ) {\n anisotropyV = vec2( 1.0, 0.0 );\n } else {\n anisotropyV /= material.anisotropy;\n material.anisotropy = saturate( material.anisotropy );\n }\n material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",OA="struct PhysicalMaterial {\n vec3 diffuseColor;\n float roughness;\n vec3 specularColor;\n float specularF90;\n float dispersion;\n #ifdef USE_CLEARCOAT\n float clearcoat;\n float clearcoatRoughness;\n vec3 clearcoatF0;\n float clearcoatF90;\n #endif\n #ifdef USE_IRIDESCENCE\n float iridescence;\n float iridescenceIOR;\n float iridescenceThickness;\n vec3 iridescenceFresnel;\n vec3 iridescenceF0;\n #endif\n #ifdef USE_SHEEN\n vec3 sheenColor;\n float sheenRoughness;\n #endif\n #ifdef IOR\n float ior;\n #endif\n #ifdef USE_TRANSMISSION\n float transmission;\n float transmissionAlpha;\n float thickness;\n float attenuationDistance;\n vec3 attenuationColor;\n #endif\n #ifdef USE_ANISOTROPY\n float anisotropy;\n float alphaT;\n vec3 anisotropyT;\n vec3 anisotropyB;\n #endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n float a2 = pow2( alpha );\n float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n return 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n float v = 0.5 / ( gv + gl );\n return saturate(v);\n }\n float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n float a2 = alphaT * alphaB;\n highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n highp float v2 = dot( v, v );\n float w2 = a2 / v2;\n return RECIPROCAL_PI * a2 * pow2 ( w2 );\n }\n#endif\n#ifdef USE_CLEARCOAT\n vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n vec3 f0 = material.clearcoatF0;\n float f90 = material.clearcoatF90;\n float roughness = material.clearcoatRoughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n return F * ( V * D );\n }\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n vec3 f0 = material.specularColor;\n float f90 = material.specularF90;\n float roughness = material.roughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n #ifdef USE_IRIDESCENCE\n F = mix( F, material.iridescenceFresnel, material.iridescence );\n #endif\n #ifdef USE_ANISOTROPY\n float dotTL = dot( material.anisotropyT, lightDir );\n float dotTV = dot( material.anisotropyT, viewDir );\n float dotTH = dot( material.anisotropyT, halfDir );\n float dotBL = dot( material.anisotropyB, lightDir );\n float dotBV = dot( material.anisotropyB, viewDir );\n float dotBH = dot( material.anisotropyB, halfDir );\n float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n #else\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n #endif\n return F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n const float LUT_SIZE = 64.0;\n const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n const float LUT_BIAS = 0.5 / LUT_SIZE;\n float dotNV = saturate( dot( N, V ) );\n vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n uv = uv * LUT_SCALE + LUT_BIAS;\n return uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n float l = length( f );\n return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n float x = dot( v1, v2 );\n float y = abs( x );\n float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n float b = 3.4175940 + ( 4.1616724 + y ) * y;\n float v = a / b;\n float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n return cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n vec3 lightNormal = cross( v1, v2 );\n if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n vec3 T1, T2;\n T1 = normalize( V - N * dot( V, N ) );\n T2 = - cross( N, T1 );\n mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n vec3 coords[ 4 ];\n coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n coords[ 0 ] = normalize( coords[ 0 ] );\n coords[ 1 ] = normalize( coords[ 1 ] );\n coords[ 2 ] = normalize( coords[ 2 ] );\n coords[ 3 ] = normalize( coords[ 3 ] );\n vec3 vectorFormFactor = vec3( 0.0 );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n float result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n return vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n float alpha = pow2( roughness );\n float invAlpha = 1.0 / alpha;\n float cos2h = dotNH * dotNH;\n float sin2h = max( 1.0 - cos2h, 0.0078125 );\n return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float D = D_Charlie( sheenRoughness, dotNH );\n float V = V_Neubelt( dotNV, dotNL );\n return sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n float r2 = roughness * roughness;\n float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n return saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n return specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n #ifdef USE_IRIDESCENCE\n vec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n #else\n vec3 Fr = specularColor;\n #endif\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 normal = geometryNormal;\n vec3 viewDir = geometryViewDir;\n vec3 position = geometryPosition;\n vec3 lightPos = rectAreaLight.position;\n vec3 halfWidth = rectAreaLight.halfWidth;\n vec3 halfHeight = rectAreaLight.halfHeight;\n vec3 lightColor = rectAreaLight.color;\n float roughness = material.roughness;\n vec3 rectCoords[ 4 ];\n rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n vec2 uv = LTC_Uv( normal, viewDir, roughness );\n vec4 t1 = texture2D( ltc_1, uv );\n vec4 t2 = texture2D( ltc_2, uv );\n mat3 mInv = mat3(\n vec3( t1.x, 0, t1.y ),\n vec3( 0, 1, 0 ),\n vec3( t1.z, 0, t1.w )\n );\n vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n }\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n #ifdef USE_CLEARCOAT\n float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n vec3 ccIrradiance = dotNLcc * directLight.color;\n clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n #endif\n reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n #ifdef USE_CLEARCOAT\n clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n #endif\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n #ifdef USE_IRIDESCENCE\n computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n #else\n computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n #endif\n vec3 totalScattering = singleScattering + multiScattering;\n vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n reflectedLight.indirectSpecular += radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct RE_Direct_Physical\n#define RE_Direct_RectArea RE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular RE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",UA="\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n geometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n float dotNVi = saturate( dot( normal, geometryViewDir ) );\n if ( material.iridescenceThickness == 0.0 ) {\n material.iridescence = 0.0;\n } else {\n material.iridescence = saturate( material.iridescence );\n }\n if ( material.iridescence > 0.0 ) {\n material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n }\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointLightInfo( pointLight, geometryPosition, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n vec4 spotColor;\n vec3 spotLightCoord;\n bool inSpotLightMap;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotLightInfo( spotLight, geometryPosition, directLight );\n #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n #else\n #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #endif\n #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n #endif\n #undef SPOT_LIGHT_MAP_INDEX\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalLightInfo( directionalLight, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n #if defined( USE_LIGHT_PROBES )\n irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n #endif\n #if ( NUM_HEMI_LIGHTS > 0 )\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n#endif",NA="#if defined( RE_IndirectDiffuse )\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n irradiance += lightMapIrradiance;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n iblIrradiance += getIBLIrradiance( geometryNormal );\n #endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n #ifdef USE_ANISOTROPY\n radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n #else\n radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n #endif\n #ifdef USE_CLEARCOAT\n clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n #endif\n#endif",FA="#if defined( RE_IndirectDiffuse )\n RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",kA="#if defined( USE_LOGDEPTHBUF )\n gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",DA="#if defined( USE_LOGDEPTHBUF )\n uniform float logDepthBufFC;\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",LA="#ifdef USE_LOGDEPTHBUF\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",$A="#ifdef USE_LOGDEPTHBUF\n vFragDepth = 1.0 + gl_Position.w;\n vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",zA="#ifdef USE_MAP\n vec4 sampledDiffuseColor = texture2D( map, vMapUv );\n #ifdef DECODE_VIDEO_TEXTURE\n sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n #endif\n diffuseColor *= sampledDiffuseColor;\n#endif",BA="#ifdef USE_MAP\n uniform sampler2D map;\n#endif",VA="#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n #if defined( USE_POINTS_UV )\n vec2 uv = vUv;\n #else\n vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n #endif\n#endif\n#ifdef USE_MAP\n diffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",jA="#if defined( USE_POINTS_UV )\n varying vec2 vUv;\n#else\n #if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n uniform mat3 uvTransform;\n #endif\n#endif\n#ifdef USE_MAP\n uniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",GA="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n metalnessFactor *= texelMetalness.b;\n#endif",HA="#ifdef USE_METALNESSMAP\n uniform sampler2D metalnessMap;\n#endif",WA="#ifdef USE_INSTANCING_MORPH\n float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n }\n#endif",ZA="#if defined( USE_MORPHCOLORS )\n vColor *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n #if defined( USE_COLOR_ALPHA )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n #elif defined( USE_COLOR )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n #endif\n }\n#endif",XA="#ifdef USE_MORPHNORMALS\n objectNormal *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",qA="#ifdef USE_MORPHTARGETS\n #ifndef USE_INSTANCING_MORPH\n uniform float morphTargetBaseInfluence;\n uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n #endif\n uniform sampler2DArray morphTargetsTexture;\n uniform ivec2 morphTargetsTextureSize;\n vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n int y = texelIndex / morphTargetsTextureSize.x;\n int x = texelIndex - y * morphTargetsTextureSize.x;\n ivec3 morphUV = ivec3( x, y, morphTargetIndex );\n return texelFetch( morphTargetsTexture, morphUV, 0 );\n }\n#endif",KA="#ifdef USE_MORPHTARGETS\n transformed *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",JA="float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n vec3 fdx = dFdx( vViewPosition );\n vec3 fdy = dFdy( vViewPosition );\n vec3 normal = normalize( cross( fdx, fdy ) );\n#else\n vec3 normal = normalize( vNormal );\n #ifdef DOUBLE_SIDED\n normal *= faceDirection;\n #endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n #ifdef USE_TANGENT\n mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn = getTangentFrame( - vViewPosition, normal,\n #if defined( USE_NORMALMAP )\n vNormalMapUv\n #elif defined( USE_CLEARCOAT_NORMALMAP )\n vClearcoatNormalMapUv\n #else\n vUv\n #endif\n );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn[0] *= faceDirection;\n tbn[1] *= faceDirection;\n #endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n #ifdef USE_TANGENT\n mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn2[0] *= faceDirection;\n tbn2[1] *= faceDirection;\n #endif\n#endif\nvec3 nonPerturbedNormal = normal;",YA="#ifdef USE_NORMALMAP_OBJECTSPACE\n normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n #ifdef FLIP_SIDED\n normal = - normal;\n #endif\n #ifdef DOUBLE_SIDED\n normal = normal * faceDirection;\n #endif\n normal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n normal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",QA="#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",e1="#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",t1="#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #ifdef USE_TANGENT\n vTangent = normalize( transformedTangent );\n vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n #endif\n#endif",n1="#ifdef USE_NORMALMAP\n uniform sampler2D normalMap;\n uniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n uniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n vec3 q0 = dFdx( eye_pos.xyz );\n vec3 q1 = dFdy( eye_pos.xyz );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n vec3 N = surf_norm;\n vec3 q1perp = cross( q1, N );\n vec3 q0perp = cross( N, q0 );\n vec3 T = q1perp * st0.x + q0perp * st1.x;\n vec3 B = q1perp * st0.y + q0perp * st1.y;\n float det = max( dot( T, T ), dot( B, B ) );\n float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n return mat3( T * scale, B * scale, N );\n }\n#endif",r1="#ifdef USE_CLEARCOAT\n vec3 clearcoatNormal = nonPerturbedNormal;\n#endif",i1="#ifdef USE_CLEARCOAT_NORMALMAP\n vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n clearcoatMapN.xy *= clearcoatNormalScale;\n clearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",o1="#ifdef USE_CLEARCOATMAP\n uniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform sampler2D clearcoatNormalMap;\n uniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform sampler2D clearcoatRoughnessMap;\n#endif",s1="#ifdef USE_IRIDESCENCEMAP\n uniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform sampler2D iridescenceThicknessMap;\n#endif",a1="#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",c1="vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n if( v <= 0.0 )\n return vec4( 0., 0., 0., 0. );\n if( v >= 1.0 )\n return vec4( 1., 1., 1., 1. );\n float vuf;\n float af = modf( v * PackFactors.a, vuf );\n float bf = modf( vuf * ShiftRight8, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n if( v <= 0.0 )\n return vec3( 0., 0., 0. );\n if( v >= 1.0 )\n return vec3( 1., 1., 1. );\n float vuf;\n float bf = modf( v * PackFactors.b, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n if( v <= 0.0 )\n return vec2( 0., 0. );\n if( v >= 1.0 )\n return vec2( 1., 1. );\n float vuf;\n float gf = modf( v * 256., vuf );\n return vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n return dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n return dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * depth - far );\n}",u1="#ifdef PREMULTIPLIED_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif",l1="vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n mvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n mvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",f1="#ifdef DITHERING\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",d1="#ifdef DITHERING\n vec3 dithering( vec3 color ) {\n float grid_position = rand( gl_FragCoord.xy );\n vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n return color + dither_shift_RGB;\n }\n#endif",p1="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n roughnessFactor *= texelRoughness.g;\n#endif",h1="#ifdef USE_ROUGHNESSMAP\n uniform sampler2D roughnessMap;\n#endif",m1="#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n }\n vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n return unpackRGBATo2Half( texture2D( shadow, uv ) );\n }\n float VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n float occlusion = 1.0;\n vec2 distribution = texture2DDistribution( shadow, uv );\n float hard_shadow = step( compare , distribution.x );\n if (hard_shadow != 1.0 ) {\n float distance = compare - distribution.x ;\n float variance = max( 0.00000, distribution.y * distribution.y );\n float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n }\n return occlusion;\n }\n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n float shadow = 1.0;\n shadowCoord.xyz /= shadowCoord.w;\n shadowCoord.z += shadowBias;\n bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n bool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n if ( frustumTest ) {\n #if defined( SHADOWMAP_TYPE_PCF )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx0 = - texelSize.x * shadowRadius;\n float dy0 = - texelSize.y * shadowRadius;\n float dx1 = + texelSize.x * shadowRadius;\n float dy1 = + texelSize.y * shadowRadius;\n float dx2 = dx0 / 2.0;\n float dy2 = dy0 / 2.0;\n float dx3 = dx1 / 2.0;\n float dy3 = dy1 / 2.0;\n shadow = (\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n ) * ( 1.0 / 17.0 );\n #elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx = texelSize.x;\n float dy = texelSize.y;\n vec2 uv = shadowCoord.xy;\n vec2 f = fract( uv * shadowMapSize + 0.5 );\n uv -= f * texelSize;\n shadow = (\n texture2DCompare( shadowMap, uv, shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n f.x ),\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n f.x ),\n f.y )\n ) * ( 1.0 / 9.0 );\n #elif defined( SHADOWMAP_TYPE_VSM )\n shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n #else\n shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n vec2 cubeToUV( vec3 v, float texelSizeY ) {\n vec3 absV = abs( v );\n float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n absV *= scaleToCube;\n v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n vec2 planar = v.xy;\n float almostATexel = 1.5 * texelSizeY;\n float almostOne = 1.0 - almostATexel;\n if ( absV.z >= almostOne ) {\n if ( v.z > 0.0 )\n planar.x = 4.0 - v.x;\n } else if ( absV.x >= almostOne ) {\n float signX = sign( v.x );\n planar.x = v.z * signX + 2.0 * signX;\n } else if ( absV.y >= almostOne ) {\n float signY = sign( v.y );\n planar.x = v.x + 2.0 * signY + 2.0;\n planar.y = v.z * signY - 2.0;\n }\n return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n }\n float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n float shadow = 1.0;\n vec3 lightToPosition = shadowCoord.xyz;\n \n float lightToPositionLength = length( lightToPosition );\n if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;\n vec3 bd3D = normalize( lightToPosition );\n vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n shadow = (\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n ) * ( 1.0 / 9.0 );\n #else\n shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n#endif",g1="#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n#endif",y1="#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n vec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n #if NUM_DIR_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n shadowWorldPosition = worldPosition;\n #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n #endif\n vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n#endif",x1="float getShadowMask() {\n float shadow = 1.0;\n #ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n directionalLight = directionalLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n spotLight = spotLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n pointLight = pointLightShadows[ i ];\n shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #endif\n return shadow;\n}",v1="#ifdef USE_SKINNING\n mat4 boneMatX = getBoneMatrix( skinIndex.x );\n mat4 boneMatY = getBoneMatrix( skinIndex.y );\n mat4 boneMatZ = getBoneMatrix( skinIndex.z );\n mat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",_1="#ifdef USE_SKINNING\n uniform mat4 bindMatrix;\n uniform mat4 bindMatrixInverse;\n uniform highp sampler2D boneTexture;\n mat4 getBoneMatrix( const in float i ) {\n int size = textureSize( boneTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n#endif",b1="#ifdef USE_SKINNING\n vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n transformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",S1="#ifdef USE_SKINNING\n mat4 skinMatrix = mat4( 0.0 );\n skinMatrix += skinWeight.x * boneMatX;\n skinMatrix += skinWeight.y * boneMatY;\n skinMatrix += skinWeight.z * boneMatZ;\n skinMatrix += skinWeight.w * boneMatW;\n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n #ifdef USE_TANGENT\n objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #endif\n#endif",I1="float specularStrength;\n#ifdef USE_SPECULARMAP\n vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n specularStrength = texelSpecular.r;\n#else\n specularStrength = 1.0;\n#endif",w1="#ifdef USE_SPECULARMAP\n uniform sampler2D specularMap;\n#endif",M1="#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",E1="#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n return saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n vec3( 1.6605, - 0.1246, - 0.0182 ),\n vec3( - 0.5876, 1.1329, - 0.1006 ),\n vec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n vec3( 0.6274, 0.0691, 0.0164 ),\n vec3( 0.3293, 0.9195, 0.0880 ),\n vec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n vec3 x2 = x * x;\n vec3 x4 = x2 * x2;\n return + 15.5 * x4 * x2\n - 40.14 * x4 * x\n + 31.96 * x4\n - 6.868 * x2 * x\n + 0.4298 * x2\n + 0.1191 * x\n - 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n const mat3 AgXInsetMatrix = mat3(\n vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n );\n const mat3 AgXOutsetMatrix = mat3(\n vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n );\n const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069;\n color *= toneMappingExposure;\n color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n color = AgXInsetMatrix * color;\n color = max( color, 1e-10 ); color = log2( color );\n color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n color = clamp( color, 0.0, 1.0 );\n color = agxDefaultContrastApprox( color );\n color = AgXOutsetMatrix * color;\n color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n color = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n color = clamp( color, 0.0, 1.0 );\n return color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n const float StartCompression = 0.8 - 0.04;\n const float Desaturation = 0.15;\n color *= toneMappingExposure;\n float x = min( color.r, min( color.g, color.b ) );\n float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n color -= offset;\n float peak = max( color.r, max( color.g, color.b ) );\n if ( peak < StartCompression ) return color;\n float d = 1. - StartCompression;\n float newPeak = 1. - d * d / ( peak + d - StartCompression );\n color *= newPeak / peak;\n float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n return mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",T1="#ifdef USE_TRANSMISSION\n material.transmission = transmission;\n material.transmissionAlpha = 1.0;\n material.thickness = thickness;\n material.attenuationDistance = attenuationDistance;\n material.attenuationColor = attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n #endif\n #ifdef USE_THICKNESSMAP\n material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n #endif\n vec3 pos = vWorldPosition;\n vec3 v = normalize( cameraPosition - pos );\n vec3 n = inverseTransformDirection( normal, viewMatrix );\n vec4 transmitted = getIBLVolumeRefraction(\n n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n material.attenuationColor, material.attenuationDistance );\n material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",A1="#ifdef USE_TRANSMISSION\n uniform float transmission;\n uniform float thickness;\n uniform float attenuationDistance;\n uniform vec3 attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n uniform sampler2D transmissionMap;\n #endif\n #ifdef USE_THICKNESSMAP\n uniform sampler2D thicknessMap;\n #endif\n uniform vec2 transmissionSamplerSize;\n uniform sampler2D transmissionSamplerMap;\n uniform mat4 modelMatrix;\n uniform mat4 projectionMatrix;\n varying vec3 vWorldPosition;\n float w0( float a ) {\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n }\n float w1( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n }\n float w2( float a ){\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n }\n float w3( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * a );\n }\n float g0( float a ) {\n return w0( a ) + w1( a );\n }\n float g1( float a ) {\n return w2( a ) + w3( a );\n }\n float h0( float a ) {\n return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n }\n float h1( float a ) {\n return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n }\n vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n uv = uv * texelSize.zw + 0.5;\n vec2 iuv = floor( uv );\n vec2 fuv = fract( uv );\n float g0x = g0( fuv.x );\n float g1x = g1( fuv.x );\n float h0x = h0( fuv.x );\n float h1x = h1( fuv.x );\n float h0y = h0( fuv.y );\n float h1y = h1( fuv.y );\n vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n }\n vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n vec2 fLodSizeInv = 1.0 / fLodSize;\n vec2 cLodSizeInv = 1.0 / cLodSize;\n vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n return mix( fSample, cSample, fract( lod ) );\n }\n vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n vec3 modelScale;\n modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n return normalize( refractionVector ) * thickness * modelScale;\n }\n float applyIorToRoughness( const in float roughness, const in float ior ) {\n return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n }\n vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n }\n vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n if ( isinf( attenuationDistance ) ) {\n return vec3( 1.0 );\n } else {\n vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance;\n }\n }\n vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n const in vec3 attenuationColor, const in float attenuationDistance ) {\n vec4 transmittedLight;\n vec3 transmittance;\n #ifdef USE_DISPERSION\n float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n for ( int i = 0; i < 3; i ++ ) {\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n transmittedLight[ i ] = transmissionSample[ i ];\n transmittedLight.a += transmissionSample.a;\n transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n }\n transmittedLight.a /= 3.0;\n #else\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n #endif\n vec3 attenuatedColor = transmittance * transmittedLight.rgb;\n vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n }\n#endif",P1="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",R1="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n uniform mat3 mapTransform;\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n uniform mat3 alphaMapTransform;\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n uniform mat3 lightMapTransform;\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n uniform mat3 aoMapTransform;\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n uniform mat3 bumpMapTransform;\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n uniform mat3 normalMapTransform;\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n uniform mat3 displacementMapTransform;\n varying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n uniform mat3 emissiveMapTransform;\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n uniform mat3 metalnessMapTransform;\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n uniform mat3 roughnessMapTransform;\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n uniform mat3 anisotropyMapTransform;\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n uniform mat3 clearcoatMapTransform;\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform mat3 clearcoatNormalMapTransform;\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform mat3 clearcoatRoughnessMapTransform;\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n uniform mat3 sheenColorMapTransform;\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n uniform mat3 sheenRoughnessMapTransform;\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n uniform mat3 iridescenceMapTransform;\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform mat3 iridescenceThicknessMapTransform;\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n uniform mat3 specularMapTransform;\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n uniform mat3 specularColorMapTransform;\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n uniform mat3 specularIntensityMapTransform;\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",C1="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n vUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",O1="#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n vec4 worldPosition = vec4( transformed, 1.0 );\n #ifdef USE_BATCHING\n worldPosition = batchingMatrix * worldPosition;\n #endif\n #ifdef USE_INSTANCING\n worldPosition = instanceMatrix * worldPosition;\n #endif\n worldPosition = modelMatrix * worldPosition;\n#endif",U1="varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n gl_Position = vec4( position.xy, 1.0, 1.0 );\n}",N1="uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n vec4 texColor = texture2D( t2D, vUv );\n #ifdef DECODE_VIDEO_TEXTURE\n texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",F1="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n gl_Position.z = gl_Position.w;\n}",k1="#ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n uniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n #ifdef ENVMAP_TYPE_CUBE\n vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n #else\n vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",D1="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n gl_Position.z = gl_Position.w;\n}",L1="uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n gl_FragColor = texColor;\n gl_FragColor.a *= opacity;\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",$1="#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include <uv_vertex>\n #include <batching_vertex>\n #include <skinbase_vertex>\n #include <morphinstance_vertex>\n #ifdef USE_DISPLACEMENTMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vHighPrecisionZW = gl_Position.zw;\n}",z1="#if DEPTH_PACKING == 3200\n uniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n vec4 diffuseColor = vec4( 1.0 );\n #include <clipping_planes_fragment>\n #if DEPTH_PACKING == 3200\n diffuseColor.a = opacity;\n #endif\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <logdepthbuf_fragment>\n float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n #if DEPTH_PACKING == 3200\n gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n #elif DEPTH_PACKING == 3201\n gl_FragColor = packDepthToRGBA( fragCoordZ );\n #elif DEPTH_PACKING == 3202\n gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n #elif DEPTH_PACKING == 3203\n gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n #endif\n}",B1="#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <batching_vertex>\n #include <skinbase_vertex>\n #include <morphinstance_vertex>\n #ifdef USE_DISPLACEMENTMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <worldpos_vertex>\n #include <clipping_planes_vertex>\n vWorldPosition = worldPosition.xyz;\n}",V1="#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n vec4 diffuseColor = vec4( 1.0 );\n #include <clipping_planes_fragment>\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n float dist = length( vWorldPosition - referencePosition );\n dist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n dist = saturate( dist );\n gl_FragColor = packDepthToRGBA( dist );\n}",j1="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n}",G1="uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",H1="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n vLineDistance = scale * lineDistance;\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n}",W1="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n discard;\n }\n vec3 outgoingLight = vec3( 0.0 );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}",Z1="#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <fog_vertex>\n}",X1="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n #else\n reflectedLight.indirectDiffuse += vec3( 1.0 );\n #endif\n #include <aomap_fragment>\n reflectedLight.indirectDiffuse *= diffuseColor.rgb;\n vec3 outgoingLight = reflectedLight.indirectDiffuse;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",q1="#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",K1="#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_lambert_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",J1="#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n vViewPosition = - mvPosition.xyz;\n}",Y1="#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n vec3 viewDir = normalize( vViewPosition );\n vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n vec3 y = cross( viewDir, x );\n vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n #ifdef USE_MATCAP\n vec4 matcapColor = texture2D( matcap, uv );\n #else\n vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n #endif\n vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",Q1="#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphinstance_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n vViewPosition = - mvPosition.xyz;\n#endif\n}",eP="#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n #ifdef OPAQUE\n gl_FragColor.a = 1.0;\n #endif\n}",tP="#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphinstance_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",nP="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_phong_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",rP="#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n varying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n#ifdef USE_TRANSMISSION\n vWorldPosition = worldPosition.xyz;\n#endif\n}",iP="#define STANDARD\n#ifdef PHYSICAL\n #define IOR\n #define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n uniform float ior;\n#endif\n#ifdef USE_SPECULAR\n uniform float specularIntensity;\n uniform vec3 specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n uniform sampler2D specularColorMap;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n uniform sampler2D specularIntensityMap;\n #endif\n#endif\n#ifdef USE_CLEARCOAT\n uniform float clearcoat;\n uniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n uniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n uniform float iridescence;\n uniform float iridescenceIOR;\n uniform float iridescenceThicknessMinimum;\n uniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n uniform vec3 sheenColor;\n uniform float sheenRoughness;\n #ifdef USE_SHEEN_COLORMAP\n uniform sampler2D sheenColorMap;\n #endif\n #ifdef USE_SHEEN_ROUGHNESSMAP\n uniform sampler2D sheenRoughnessMap;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n uniform vec2 anisotropyVector;\n #ifdef USE_ANISOTROPYMAP\n uniform sampler2D anisotropyMap;\n #endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <roughnessmap_fragment>\n #include <metalnessmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <clearcoat_normal_fragment_begin>\n #include <clearcoat_normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_physical_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n #include <transmission_fragment>\n vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n #ifdef USE_SHEEN\n float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n #endif\n #ifdef USE_CLEARCOAT\n float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n #endif\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",oP="#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",sP="#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_toon_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",aP="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n varying vec2 vUv;\n uniform mat3 uvTransform;\n#endif\nvoid main() {\n #ifdef USE_POINTS_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n gl_PointSize = size;\n #ifdef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n #endif\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <worldpos_vertex>\n #include <fog_vertex>\n}",cP="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n vec3 outgoingLight = vec3( 0.0 );\n #include <logdepthbuf_fragment>\n #include <map_particle_fragment>\n #include <color_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}",uP="#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphinstance_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",lP="uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n #include <logdepthbuf_fragment>\n gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n}",fP="uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n vec4 mvPosition = modelViewMatrix[ 3 ];\n vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n #ifndef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n #endif\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n mvPosition.xy += rotatedPosition;\n gl_Position = projectionMatrix * mvPosition;\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n}",dP="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n vec3 outgoingLight = vec3( 0.0 );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n}",ve={alphahash_fragment:NT,alphahash_pars_fragment:FT,alphamap_fragment:kT,alphamap_pars_fragment:DT,alphatest_fragment:LT,alphatest_pars_fragment:$T,aomap_fragment:zT,aomap_pars_fragment:BT,batching_pars_vertex:VT,batching_vertex:jT,begin_vertex:GT,beginnormal_vertex:HT,bsdfs:WT,iridescence_fragment:ZT,bumpmap_pars_fragment:XT,clipping_planes_fragment:qT,clipping_planes_pars_fragment:KT,clipping_planes_pars_vertex:JT,clipping_planes_vertex:YT,color_fragment:QT,color_pars_fragment:eA,color_pars_vertex:tA,color_vertex:nA,common:rA,cube_uv_reflection_fragment:iA,defaultnormal_vertex:oA,displacementmap_pars_vertex:sA,displacementmap_vertex:aA,emissivemap_fragment:cA,emissivemap_pars_fragment:uA,colorspace_fragment:lA,colorspace_pars_fragment:fA,envmap_fragment:dA,envmap_common_pars_fragment:pA,envmap_pars_fragment:hA,envmap_pars_vertex:mA,envmap_physical_pars_fragment:EA,envmap_vertex:gA,fog_vertex:yA,fog_pars_vertex:xA,fog_fragment:vA,fog_pars_fragment:_A,gradientmap_pars_fragment:bA,lightmap_pars_fragment:SA,lights_lambert_fragment:IA,lights_lambert_pars_fragment:wA,lights_pars_begin:MA,lights_toon_fragment:TA,lights_toon_pars_fragment:AA,lights_phong_fragment:PA,lights_phong_pars_fragment:RA,lights_physical_fragment:CA,lights_physical_pars_fragment:OA,lights_fragment_begin:UA,lights_fragment_maps:NA,lights_fragment_end:FA,logdepthbuf_fragment:kA,logdepthbuf_pars_fragment:DA,logdepthbuf_pars_vertex:LA,logdepthbuf_vertex:$A,map_fragment:zA,map_pars_fragment:BA,map_particle_fragment:VA,map_particle_pars_fragment:jA,metalnessmap_fragment:GA,metalnessmap_pars_fragment:HA,morphinstance_vertex:WA,morphcolor_vertex:ZA,morphnormal_vertex:XA,morphtarget_pars_vertex:qA,morphtarget_vertex:KA,normal_fragment_begin:JA,normal_fragment_maps:YA,normal_pars_fragment:QA,normal_pars_vertex:e1,normal_vertex:t1,normalmap_pars_fragment:n1,clearcoat_normal_fragment_begin:r1,clearcoat_normal_fragment_maps:i1,clearcoat_pars_fragment:o1,iridescence_pars_fragment:s1,opaque_fragment:a1,packing:c1,premultiplied_alpha_fragment:u1,project_vertex:l1,dithering_fragment:f1,dithering_pars_fragment:d1,roughnessmap_fragment:p1,roughnessmap_pars_fragment:h1,shadowmap_pars_fragment:m1,shadowmap_pars_vertex:g1,shadowmap_vertex:y1,shadowmask_pars_fragment:x1,skinbase_vertex:v1,skinning_pars_vertex:_1,skinning_vertex:b1,skinnormal_vertex:S1,specularmap_fragment:I1,specularmap_pars_fragment:w1,tonemapping_fragment:M1,tonemapping_pars_fragment:E1,transmission_fragment:T1,transmission_pars_fragment:A1,uv_pars_fragment:P1,uv_pars_vertex:R1,uv_vertex:C1,worldpos_vertex:O1,background_vert:U1,background_frag:N1,backgroundCube_vert:F1,backgroundCube_frag:k1,cube_vert:D1,cube_frag:L1,depth_vert:$1,depth_frag:z1,distanceRGBA_vert:B1,distanceRGBA_frag:V1,equirect_vert:j1,equirect_frag:G1,linedashed_vert:H1,linedashed_frag:W1,meshbasic_vert:Z1,meshbasic_frag:X1,meshlambert_vert:q1,meshlambert_frag:K1,meshmatcap_vert:J1,meshmatcap_frag:Y1,meshnormal_vert:Q1,meshnormal_frag:eP,meshphong_vert:tP,meshphong_frag:nP,meshphysical_vert:rP,meshphysical_frag:iP,meshtoon_vert:oP,meshtoon_frag:sP,points_vert:aP,points_frag:cP,shadow_vert:uP,shadow_frag:lP,sprite_vert:fP,sprite_frag:dP},K={common:{diffuse:{value:new _t(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new me},alphaMap:{value:null},alphaMapTransform:{value:new me},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new me}},envmap:{envMap:{value:null},envMapRotation:{value:new me},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new me}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new me}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new me},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new me},normalScale:{value:new Qn(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new me},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new me}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new me}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new me}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new _t(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new _t(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new me},alphaTest:{value:0},uvTransform:{value:new me}},sprite:{diffuse:{value:new _t(16777215)},opacity:{value:1},center:{value:new Qn(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new me},alphaMap:{value:null},alphaMapTransform:{value:new me},alphaTest:{value:0}}},V_={basic:{uniforms:en([K.common,K.specularmap,K.envmap,K.aomap,K.lightmap,K.fog]),vertexShader:ve.meshbasic_vert,fragmentShader:ve.meshbasic_frag},lambert:{uniforms:en([K.common,K.specularmap,K.envmap,K.aomap,K.lightmap,K.emissivemap,K.bumpmap,K.normalmap,K.displacementmap,K.fog,K.lights,{emissive:{value:new _t(0)}}]),vertexShader:ve.meshlambert_vert,fragmentShader:ve.meshlambert_frag},phong:{uniforms:en([K.common,K.specularmap,K.envmap,K.aomap,K.lightmap,K.emissivemap,K.bumpmap,K.normalmap,K.displacementmap,K.fog,K.lights,{emissive:{value:new _t(0)},specular:{value:new _t(1118481)},shininess:{value:30}}]),vertexShader:ve.meshphong_vert,fragmentShader:ve.meshphong_frag},standard:{uniforms:en([K.common,K.envmap,K.aomap,K.lightmap,K.emissivemap,K.bumpmap,K.normalmap,K.displacementmap,K.roughnessmap,K.metalnessmap,K.fog,K.lights,{emissive:{value:new _t(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ve.meshphysical_vert,fragmentShader:ve.meshphysical_frag},toon:{uniforms:en([K.common,K.aomap,K.lightmap,K.emissivemap,K.bumpmap,K.normalmap,K.displacementmap,K.gradientmap,K.fog,K.lights,{emissive:{value:new _t(0)}}]),vertexShader:ve.meshtoon_vert,fragmentShader:ve.meshtoon_frag},matcap:{uniforms:en([K.common,K.bumpmap,K.normalmap,K.displacementmap,K.fog,{matcap:{value:null}}]),vertexShader:ve.meshmatcap_vert,fragmentShader:ve.meshmatcap_frag},points:{uniforms:en([K.points,K.fog]),vertexShader:ve.points_vert,fragmentShader:ve.points_frag},dashed:{uniforms:en([K.common,K.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ve.linedashed_vert,fragmentShader:ve.linedashed_frag},depth:{uniforms:en([K.common,K.displacementmap]),vertexShader:ve.depth_vert,fragmentShader:ve.depth_frag},normal:{uniforms:en([K.common,K.bumpmap,K.normalmap,K.displacementmap,{opacity:{value:1}}]),vertexShader:ve.meshnormal_vert,fragmentShader:ve.meshnormal_frag},sprite:{uniforms:en([K.sprite,K.fog]),vertexShader:ve.sprite_vert,fragmentShader:ve.sprite_frag},background:{uniforms:{uvTransform:{value:new me},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ve.background_vert,fragmentShader:ve.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new me}},vertexShader:ve.backgroundCube_vert,fragmentShader:ve.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ve.cube_vert,fragmentShader:ve.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ve.equirect_vert,fragmentShader:ve.equirect_frag},distanceRGBA:{uniforms:en([K.common,K.displacementmap,{referencePosition:{value:new ke},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ve.distanceRGBA_vert,fragmentShader:ve.distanceRGBA_frag},shadow:{uniforms:en([K.lights,K.fog,{color:{value:new _t(0)},opacity:{value:1}}]),vertexShader:ve.shadow_vert,fragmentShader:ve.shadow_frag}};V_.physical={uniforms:en([V_.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new me},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new me},clearcoatNormalScale:{value:new Qn(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new me},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new me},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new me},sheen:{value:0},sheenColor:{value:new _t(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new me},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new me},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new me},transmissionSamplerSize:{value:new Qn},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new me},attenuationDistance:{value:0},attenuationColor:{value:new _t(0)},specularColor:{value:new _t(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new me},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new me},anisotropyVector:{value:new Qn},anisotropyMap:{value:null},anisotropyMapTransform:{value:new me}}]),vertexShader:ve.meshphysical_vert,fragmentShader:ve.meshphysical_frag};var Ni=(1+Math.sqrt(5))/2,mo=1/Ni,a6=[new ke(-Ni,mo,0),new ke(Ni,mo,0),new ke(-mo,0,Ni),new ke(mo,0,Ni),new ke(0,Ni,-mo),new ke(0,Ni,mo),new ke(-1,1,-1),new ke(1,1,-1),new ke(-1,1,1),new ke(1,1,1)];var c6=new Float32Array(16),u6=new Float32Array(9),l6=new Float32Array(4);var f6={[Hf]:Wf,[Zf]:Jf,[qf]:Yf,[Xf]:Kf,[Wf]:Hf,[Jf]:Zf,[Yf]:qf,[Kf]:Xf};f();f();f();f();f();f();f();f();var J6=new Set(Object.keys(_t.NAMES));f();f();var pr,yo,Fi,Ns,go=class go{constructor(t,n){It(this,Fi);Xe(this,"__type",go.__type);It(this,pr);It(this,yo);Xe(this,"id");Xe(this,"type");Ot(this,pr,t),Ot(this,yo,n),this.id="ev_".concat(t.id),this.type=t.type}static is(t){return t!=null&&typeof t=="object"&&"__type"in t&&t.__type===go.__type}get name(){var t;return(t=ci(this,Fi,Ns).call(this,"name"))!=null?t:""}get startDate(){return new Date(W(this,pr).startDate)}get endDate(){return new Date(W(this,pr).endDate)}get externalId(){return W(this,pr).externalId}get description(){return ci(this,Fi,Ns).call(this,"description")}get location(){let t=W(this,pr).location,n=t!=null&&t.startsWith("el_")?t:"el_".concat(t);return W(this,yo).getById("enterprise-location",n)}get image(){let t=ci(this,Fi,Ns).call(this,"image");if(t!=null)return x({url:t.original},t)}get video(){let t=ci(this,Fi,Ns).call(this,"video");if(t!=null)return{url:t.original,thumbnail:t.thumbnail,width:t.width,height:t.height}}};pr=new WeakMap,yo=new WeakMap,Fi=new WeakSet,Ns=o(function(t){var n,i,r,s,a;return(a=(s=(r=W(this,pr)._locale)==null?void 0:r[(i=(n=W(this,yo).currentLanguage)==null?void 0:n.code)!=null?i:"en"])==null?void 0:s[t])!=null?a:W(this,pr)[t]},"#getLocalizedResource"),o(go,"EventMetaData"),Xe(go,"__type","event");var Ic=go;f();f();var Ne={};cn(Ne,{$brand:()=>wc,$input:()=>Fm,$output:()=>Nm,NEVER:()=>wd,TimePrecision:()=>$m,ZodAny:()=>A0,ZodArray:()=>O0,ZodBase64:()=>iy,ZodBase64URL:()=>oy,ZodBigInt:()=>Sa,ZodBigIntFormat:()=>cy,ZodBoolean:()=>ba,ZodCIDRv4:()=>ny,ZodCIDRv6:()=>ry,ZodCUID:()=>qg,ZodCUID2:()=>Kg,ZodCatch:()=>J0,ZodCodec:()=>xy,ZodCustom:()=>Au,ZodCustomStringFormat:()=>va,ZodDate:()=>Mu,ZodDefault:()=>H0,ZodDiscriminatedUnion:()=>U0,ZodE164:()=>sy,ZodEmail:()=>Wg,ZodEmoji:()=>Zg,ZodEnum:()=>ya,ZodError:()=>BC,ZodFile:()=>V0,ZodFirstPartyTypeKind:()=>vy,ZodFunction:()=>sb,ZodGUID:()=>_u,ZodIPv4:()=>ey,ZodIPv6:()=>ty,ZodISODate:()=>yu,ZodISODateTime:()=>gu,ZodISODuration:()=>vu,ZodISOTime:()=>xu,ZodIntersection:()=>N0,ZodIssueCode:()=>YO,ZodJWT:()=>ay,ZodKSUID:()=>Qg,ZodLazy:()=>rb,ZodLiteral:()=>B0,ZodMap:()=>$0,ZodNaN:()=>Q0,ZodNanoID:()=>Xg,ZodNever:()=>R0,ZodNonOptional:()=>gy,ZodNull:()=>E0,ZodNullable:()=>G0,ZodNumber:()=>_a,ZodNumberFormat:()=>Oo,ZodObject:()=>Tu,ZodOptional:()=>my,ZodPipe:()=>yy,ZodPrefault:()=>Z0,ZodPromise:()=>ob,ZodReadonly:()=>eb,ZodRealError:()=>fn,ZodRecord:()=>dy,ZodSet:()=>z0,ZodString:()=>xa,ZodStringFormat:()=>Ye,ZodSuccess:()=>K0,ZodSymbol:()=>w0,ZodTemplateLiteral:()=>nb,ZodTransform:()=>j0,ZodTuple:()=>k0,ZodType:()=>de,ZodULID:()=>Jg,ZodURL:()=>wu,ZodUUID:()=>zr,ZodUndefined:()=>M0,ZodUnion:()=>ly,ZodUnknown:()=>P0,ZodVoid:()=>C0,ZodXID:()=>Yg,_ZodString:()=>Hg,_default:()=>W0,_function:()=>HO,any:()=>MO,array:()=>Eu,base64:()=>cO,base64url:()=>uO,bigint:()=>_O,boolean:()=>I0,catch:()=>Y0,check:()=>WO,cidrv4:()=>sO,cidrv6:()=>aO,clone:()=>tn,codec:()=>VO,coerce:()=>Pu,config:()=>xt,core:()=>gr,cuid:()=>QC,cuid2:()=>eO,custom:()=>ZO,date:()=>TO,decode:()=>kg,decodeAsync:()=>Lg,discriminatedUnion:()=>OO,e164:()=>lO,email:()=>jC,emoji:()=>JC,encode:()=>Fg,encodeAsync:()=>Dg,endsWith:()=>ua,enum:()=>py,file:()=>LO,flattenError:()=>js,float32:()=>gO,float64:()=>yO,formatError:()=>Gs,function:()=>HO,getErrorMap:()=>eU,globalRegistry:()=>mr,gt:()=>Lr,gte:()=>ln,guid:()=>GC,hash:()=>mO,hex:()=>hO,hostname:()=>pO,httpUrl:()=>KC,includes:()=>aa,instanceof:()=>XO,int:()=>Gg,int32:()=>xO,int64:()=>bO,intersection:()=>F0,ipv4:()=>iO,ipv6:()=>oO,iso:()=>ga,json:()=>KO,jwt:()=>fO,keyof:()=>AO,ksuid:()=>rO,lazy:()=>ib,length:()=>Po,literal:()=>DO,locales:()=>$i,looseObject:()=>CO,lowercase:()=>oa,lt:()=>Dr,lte:()=>Fn,map:()=>NO,maxLength:()=>Ao,maxSize:()=>To,mime:()=>la,minLength:()=>vi,minSize:()=>Bi,multipleOf:()=>zi,nan:()=>BO,nanoid:()=>YC,nativeEnum:()=>kO,negative:()=>hg,never:()=>uy,nonnegative:()=>gg,nonoptional:()=>q0,nonpositive:()=>mg,normalize:()=>fa,null:()=>T0,nullable:()=>Su,nullish:()=>$O,number:()=>S0,object:()=>PO,optional:()=>bu,overwrite:()=>$r,parse:()=>Cg,parseAsync:()=>Og,partialRecord:()=>UO,pipe:()=>Iu,positive:()=>pg,prefault:()=>X0,preprocess:()=>JO,prettifyError:()=>Ld,promise:()=>GO,property:()=>yg,readonly:()=>tb,record:()=>L0,refine:()=>ab,regex:()=>ia,regexes:()=>bn,registry:()=>qc,safeDecode:()=>zg,safeDecodeAsync:()=>Vg,safeEncode:()=>$g,safeEncodeAsync:()=>Bg,safeParse:()=>Ug,safeParseAsync:()=>Ng,set:()=>FO,setErrorMap:()=>QO,size:()=>ra,startsWith:()=>ca,strictObject:()=>RO,string:()=>jg,stringFormat:()=>dO,stringbool:()=>qO,success:()=>zO,superRefine:()=>cb,symbol:()=>IO,templateLiteral:()=>jO,toJSONSchema:()=>wg,toLowerCase:()=>pa,toUpperCase:()=>ha,transform:()=>hy,treeifyError:()=>Dd,trim:()=>da,tuple:()=>D0,uint32:()=>vO,uint64:()=>SO,ulid:()=>tO,undefined:()=>wO,union:()=>fy,unknown:()=>Co,uppercase:()=>sa,url:()=>qC,util:()=>z,uuid:()=>HC,uuidv4:()=>WC,uuidv6:()=>ZC,uuidv7:()=>XC,void:()=>EO,xid:()=>nO});f();var gr={};cn(gr,{$ZodAny:()=>ph,$ZodArray:()=>xh,$ZodAsyncError:()=>tr,$ZodBase64:()=>rh,$ZodBase64URL:()=>ih,$ZodBigInt:()=>Wc,$ZodBigIntFormat:()=>uh,$ZodBoolean:()=>Xs,$ZodCIDRv4:()=>eh,$ZodCIDRv6:()=>th,$ZodCUID:()=>jp,$ZodCUID2:()=>Gp,$ZodCatch:()=>Fh,$ZodCheck:()=>rt,$ZodCheckBigIntFormat:()=>xp,$ZodCheckEndsWith:()=>Rp,$ZodCheckGreaterThan:()=>$c,$ZodCheckIncludes:()=>Ap,$ZodCheckLengthEquals:()=>wp,$ZodCheckLessThan:()=>Lc,$ZodCheckLowerCase:()=>Ep,$ZodCheckMaxLength:()=>Sp,$ZodCheckMaxSize:()=>vp,$ZodCheckMimeType:()=>Op,$ZodCheckMinLength:()=>Ip,$ZodCheckMinSize:()=>_p,$ZodCheckMultipleOf:()=>gp,$ZodCheckNumberFormat:()=>yp,$ZodCheckOverwrite:()=>Up,$ZodCheckProperty:()=>Cp,$ZodCheckRegex:()=>Mp,$ZodCheckSizeEquals:()=>bp,$ZodCheckStartsWith:()=>Pp,$ZodCheckStringFormat:()=>Mo,$ZodCheckUpperCase:()=>Tp,$ZodCodec:()=>qs,$ZodCustom:()=>jh,$ZodCustomStringFormat:()=>ah,$ZodDate:()=>yh,$ZodDefault:()=>Ch,$ZodDiscriminatedUnion:()=>_h,$ZodE164:()=>oh,$ZodEmail:()=>$p,$ZodEmoji:()=>Bp,$ZodEncodeError:()=>pi,$ZodEnum:()=>Mh,$ZodError:()=>Vs,$ZodFile:()=>Th,$ZodFunction:()=>zh,$ZodGUID:()=>Dp,$ZodIPv4:()=>Yp,$ZodIPv6:()=>Qp,$ZodISODate:()=>qp,$ZodISODateTime:()=>Xp,$ZodISODuration:()=>Jp,$ZodISOTime:()=>Kp,$ZodIntersection:()=>bh,$ZodJWT:()=>sh,$ZodKSUID:()=>Zp,$ZodLazy:()=>Vh,$ZodLiteral:()=>Eh,$ZodMap:()=>Ih,$ZodNaN:()=>kh,$ZodNanoID:()=>Vp,$ZodNever:()=>mh,$ZodNonOptional:()=>Uh,$ZodNull:()=>dh,$ZodNullable:()=>Rh,$ZodNumber:()=>Hc,$ZodNumberFormat:()=>ch,$ZodObject:()=>m0,$ZodObjectJIT:()=>vh,$ZodOptional:()=>Ph,$ZodPipe:()=>Dh,$ZodPrefault:()=>Oh,$ZodPromise:()=>Bh,$ZodReadonly:()=>Lh,$ZodRealError:()=>un,$ZodRecord:()=>Sh,$ZodRegistry:()=>Eo,$ZodSet:()=>wh,$ZodString:()=>Li,$ZodStringFormat:()=>qe,$ZodSuccess:()=>Nh,$ZodSymbol:()=>lh,$ZodTemplateLiteral:()=>$h,$ZodTransform:()=>Ah,$ZodTuple:()=>Xc,$ZodType:()=>se,$ZodULID:()=>Hp,$ZodURL:()=>zp,$ZodUUID:()=>Lp,$ZodUndefined:()=>fh,$ZodUnion:()=>Zc,$ZodUnknown:()=>hh,$ZodVoid:()=>gh,$ZodXID:()=>Wp,$brand:()=>wc,$constructor:()=>M,$input:()=>Fm,$output:()=>Nm,Doc:()=>Zs,JSONSchema:()=>Eg,JSONSchemaGenerator:()=>ma,NEVER:()=>wd,TimePrecision:()=>$m,_any:()=>sg,_array:()=>xg,_base64:()=>du,_base64url:()=>pu,_bigint:()=>Qm,_boolean:()=>Jm,_catch:()=>NC,_check:()=>v0,_cidrv4:()=>lu,_cidrv6:()=>fu,_coercedBigint:()=>eg,_coercedBoolean:()=>Ym,_coercedDate:()=>fg,_coercedNumber:()=>Hm,_coercedString:()=>Lm,_cuid:()=>ru,_cuid2:()=>iu,_custom:()=>_g,_date:()=>lg,_decode:()=>Rc,_decodeAsync:()=>Oc,_default:()=>CC,_discriminatedUnion:()=>vC,_e164:()=>hu,_email:()=>Kc,_emoji:()=>tu,_encode:()=>Pc,_encodeAsync:()=>Cc,_endsWith:()=>ua,_enum:()=>MC,_file:()=>vg,_float32:()=>Zm,_float64:()=>Xm,_gt:()=>Lr,_gte:()=>ln,_guid:()=>ta,_includes:()=>aa,_int:()=>Wm,_int32:()=>qm,_int64:()=>tg,_intersection:()=>_C,_ipv4:()=>cu,_ipv6:()=>uu,_isoDate:()=>Bm,_isoDateTime:()=>zm,_isoDuration:()=>jm,_isoTime:()=>Vm,_jwt:()=>mu,_ksuid:()=>au,_lazy:()=>LC,_length:()=>Po,_literal:()=>TC,_lowercase:()=>oa,_lt:()=>Dr,_lte:()=>Fn,_map:()=>IC,_max:()=>Fn,_maxLength:()=>Ao,_maxSize:()=>To,_mime:()=>la,_min:()=>ln,_minLength:()=>vi,_minSize:()=>Bi,_multipleOf:()=>zi,_nan:()=>dg,_nanoid:()=>nu,_nativeEnum:()=>EC,_negative:()=>hg,_never:()=>cg,_nonnegative:()=>gg,_nonoptional:()=>OC,_nonpositive:()=>mg,_normalize:()=>fa,_null:()=>og,_nullable:()=>RC,_number:()=>Gm,_optional:()=>PC,_overwrite:()=>$r,_parse:()=>bo,_parseAsync:()=>So,_pipe:()=>FC,_positive:()=>pg,_promise:()=>$C,_property:()=>yg,_readonly:()=>kC,_record:()=>SC,_refine:()=>bg,_regex:()=>ia,_safeDecode:()=>Nc,_safeDecodeAsync:()=>kc,_safeEncode:()=>Uc,_safeEncodeAsync:()=>Fc,_safeParse:()=>Io,_safeParseAsync:()=>wo,_set:()=>wC,_size:()=>ra,_startsWith:()=>ca,_string:()=>Dm,_stringFormat:()=>Ro,_stringbool:()=>Ig,_success:()=>UC,_superRefine:()=>Sg,_symbol:()=>rg,_templateLiteral:()=>DC,_toLowerCase:()=>pa,_toUpperCase:()=>ha,_transform:()=>AC,_trim:()=>da,_tuple:()=>bC,_uint32:()=>Km,_uint64:()=>ng,_ulid:()=>ou,_undefined:()=>ig,_union:()=>xC,_unknown:()=>ag,_uppercase:()=>sa,_url:()=>na,_uuid:()=>Jc,_uuidv4:()=>Yc,_uuidv6:()=>Qc,_uuidv7:()=>eu,_void:()=>ug,_xid:()=>su,clone:()=>tn,config:()=>xt,decode:()=>zP,decodeAsync:()=>VP,encode:()=>$P,encodeAsync:()=>BP,flattenError:()=>js,formatError:()=>Gs,globalConfig:()=>Fs,globalRegistry:()=>mr,isValidBase64:()=>nh,isValidBase64URL:()=>f0,isValidJWT:()=>d0,locales:()=>$i,parse:()=>Tc,parseAsync:()=>Ac,prettifyError:()=>Ld,regexes:()=>bn,registry:()=>qc,safeDecode:()=>GP,safeDecodeAsync:()=>WP,safeEncode:()=>jP,safeEncodeAsync:()=>HP,safeParse:()=>$d,safeParseAsync:()=>zd,toDotPath:()=>X_,toJSONSchema:()=>wg,treeifyError:()=>Dd,util:()=>z,version:()=>Fp});f();f();var wd=Object.freeze({status:"aborted"});function M(e,t,n){var u;function i(c,d){var m,y;var h;Object.defineProperty(c,"_zod",{value:(m=c._zod)!=null?m:{},enumerable:!1}),(y=(h=c._zod).traits)!=null||(h.traits=new Set),c._zod.traits.add(e),t(c,d);for(let v in a.prototype)v in c||Object.defineProperty(c,v,{value:a.prototype[v].bind(c)});c._zod.constr=a,c._zod.def=d}o(i,"init");let r=(u=n==null?void 0:n.Parent)!=null?u:Object,l=class l extends r{};o(l,"Definition");let s=l;Object.defineProperty(s,"name",{value:e});function a(c){var m;var d;let h=n!=null&&n.Parent?new s:this;i(h,c),(m=(d=h._zod).deferred)!=null||(d.deferred=[]);for(let y of h._zod.deferred)y();return h}return o(a,"_"),Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:o(c=>{var d,h;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(h=(d=c==null?void 0:c._zod)==null?void 0:d.traits)==null?void 0:h.has(e)},"value")}),Object.defineProperty(a,"name",{value:e}),a}o(M,"$constructor");var wc=Symbol("zod_brand"),Ed=class Ed extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};o(Ed,"$ZodAsyncError");var tr=Ed,Td=class Td extends Error{constructor(t){super("Encountered unidirectional transform during encode: ".concat(t)),this.name="ZodEncodeError"}};o(Td,"$ZodEncodeError");var pi=Td,Fs={};function xt(e){return e&&Object.assign(Fs,e),Fs}o(xt,"config");f();f();var z={};cn(z,{BIGINT_FORMAT_RANGES:()=>Fd,Class:()=>Ad,NUMBER_FORMAT_RANGES:()=>Nd,aborted:()=>xi,allowsEval:()=>Rd,assert:()=>yP,assertEqual:()=>pP,assertIs:()=>mP,assertNever:()=>gP,assertNotEqual:()=>hP,assignProp:()=>mi,base64ToUint8Array:()=>H_,base64urlToUint8Array:()=>NP,cached:()=>vo,captureStackTrace:()=>Ec,cleanEnum:()=>UP,cleanRegex:()=>Ls,clone:()=>tn,cloneDef:()=>vP,createTransparentProxy:()=>MP,defineLazy:()=>ge,esc:()=>Mc,escapeRegex:()=>hr,extend:()=>AP,finalizeIssue:()=>_n,floatSafeRemainder:()=>Pd,getElementAtPath:()=>_P,getEnumValues:()=>Ds,getLengthableOrigin:()=>Bs,getParsedType:()=>wP,getSizableOrigin:()=>zs,hexToUint8Array:()=>kP,isObject:()=>ki,isPlainObject:()=>yi,issue:()=>_o,joinValues:()=>C,jsonStringifyReplacer:()=>xo,merge:()=>RP,mergeDefs:()=>gi,normalizeParams:()=>B,nullish:()=>hi,numKeys:()=>IP,objectClone:()=>xP,omit:()=>TP,optionalKeys:()=>Ud,partial:()=>CP,pick:()=>EP,prefixIssues:()=>vn,primitiveTypes:()=>Od,promiseAllObject:()=>bP,propertyKeyTypes:()=>$s,randomString:()=>SP,required:()=>OP,safeExtend:()=>PP,shallowClone:()=>Cd,stringifyPrimitive:()=>$,uint8ArrayToBase64:()=>W_,uint8ArrayToBase64url:()=>FP,uint8ArrayToHex:()=>DP,unwrapMessage:()=>ks});f();function pP(e){return e}o(pP,"assertEqual");function hP(e){return e}o(hP,"assertNotEqual");function mP(e){}o(mP,"assertIs");function gP(e){throw new Error}o(gP,"assertNever");function yP(e){}o(yP,"assert");function Ds(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}o(Ds,"getEnumValues");function C(e,t="|"){return e.map(n=>$(n)).join(t)}o(C,"joinValues");function xo(e,t){return typeof t=="bigint"?t.toString():t}o(xo,"jsonStringifyReplacer");function vo(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}o(vo,"cached");function hi(e){return e==null}o(hi,"nullish");function Ls(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}o(Ls,"cleanRegex");function Pd(e,t){let n=(e.toString().split(".")[1]||"").length,i=t.toString(),r=(i.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(i)){let l=i.match(/\d?e-(\d?)/);l!=null&&l[1]&&(r=Number.parseInt(l[1]))}let s=n>r?n:r,a=Number.parseInt(e.toFixed(s).replace(".","")),u=Number.parseInt(t.toFixed(s).replace(".",""));return a%u/10**s}o(Pd,"floatSafeRemainder");var G_=Symbol("evaluating");function ge(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==G_)return i===void 0&&(i=G_,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}o(ge,"defineLazy");function xP(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}o(xP,"objectClone");function mi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}o(mi,"assignProp");function gi(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}o(gi,"mergeDefs");function vP(e){return gi(e._zod.def)}o(vP,"cloneDef");function _P(e,t){return t?t.reduce((n,i)=>n==null?void 0:n[i],e):e}o(_P,"getElementAtPath");function bP(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let s=0;s<t.length;s++)r[t[s]]=i[s];return r})}o(bP,"promiseAllObject");function SP(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}o(SP,"randomString");function Mc(e){return JSON.stringify(e)}o(Mc,"esc");var Ec="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ki(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(ki,"isObject");var Rd=vo(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{let t=Function;return new t(""),!0}catch(t){return!1}});function yi(e){if(ki(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(ki(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}o(yi,"isPlainObject");function Cd(e){return yi(e)?x({},e):Array.isArray(e)?[...e]:e}o(Cd,"shallowClone");function IP(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}o(IP,"numKeys");var wP=o(e=>{let 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: ".concat(t))}},"getParsedType"),$s=new Set(["string","number","symbol"]),Od=new Set(["string","number","bigint","boolean","symbol","undefined"]);function hr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(hr,"escapeRegex");function tn(e,t,n){let i=new e._zod.constr(t!=null?t:e._zod.def);return(!t||n!=null&&n.parent)&&(i._zod.parent=e),i}o(tn,"clone");function B(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};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"?L(x({},t),{error:o(()=>t.error,"error")}):t}o(B,"normalizeParams");function MP(e){let t;return new Proxy({},{get(n,i,r){return t!=null||(t=e()),Reflect.get(t,i,r)},set(n,i,r,s){return t!=null||(t=e()),Reflect.set(t,i,r,s)},has(n,i){return t!=null||(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t!=null||(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t!=null||(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t!=null||(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t!=null||(t=e()),Reflect.defineProperty(t,i,r)}})}o(MP,"createTransparentProxy");function $(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?'"'.concat(e,'"'):"".concat(e)}o($,"stringifyPrimitive");function Ud(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(Ud,"optionalKeys");var Nd={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]},Fd={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function EP(e,t){let n=e._zod.def,i=gi(e._zod.def,{get shape(){let r={};for(let s in t){if(!(s in n.shape))throw new Error('Unrecognized key: "'.concat(s,'"'));t[s]&&(r[s]=n.shape[s])}return mi(this,"shape",r),r},checks:[]});return tn(e,i)}o(EP,"pick");function TP(e,t){let n=e._zod.def,i=gi(e._zod.def,{get shape(){let r=x({},e._zod.def.shape);for(let s in t){if(!(s in n.shape))throw new Error('Unrecognized key: "'.concat(s,'"'));t[s]&&delete r[s]}return mi(this,"shape",r),r},checks:[]});return tn(e,i)}o(TP,"omit");function AP(e,t){if(!yi(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let r=gi(e._zod.def,{get shape(){let s=x(x({},e._zod.def.shape),t);return mi(this,"shape",s),s},checks:[]});return tn(e,r)}o(AP,"extend");function PP(e,t){if(!yi(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=L(x({},e._zod.def),{get shape(){let i=x(x({},e._zod.def.shape),t);return mi(this,"shape",i),i},checks:e._zod.def.checks});return tn(e,n)}o(PP,"safeExtend");function RP(e,t){let n=gi(e._zod.def,{get shape(){let i=x(x({},e._zod.def.shape),t._zod.def.shape);return mi(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return tn(e,n)}o(RP,"merge");function CP(e,t,n){let i=gi(t._zod.def,{get shape(){let r=t._zod.def.shape,s=x({},r);if(n)for(let a in n){if(!(a in r))throw new Error('Unrecognized key: "'.concat(a,'"'));n[a]&&(s[a]=e?new e({type:"optional",innerType:r[a]}):r[a])}else for(let a in r)s[a]=e?new e({type:"optional",innerType:r[a]}):r[a];return mi(this,"shape",s),s},checks:[]});return tn(t,i)}o(CP,"partial");function OP(e,t,n){let i=gi(t._zod.def,{get shape(){let r=t._zod.def.shape,s=x({},r);if(n)for(let a in n){if(!(a in s))throw new Error('Unrecognized key: "'.concat(a,'"'));n[a]&&(s[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)s[a]=new e({type:"nonoptional",innerType:r[a]});return mi(this,"shape",s),s},checks:[]});return tn(t,i)}o(OP,"required");function xi(e,t=0){var n;if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(((n=e.issues[i])==null?void 0:n.continue)!==!0)return!0;return!1}o(xi,"aborted");function vn(e,t){return t.map(n=>{var r;var i;return(r=(i=n).path)!=null||(i.path=[]),n.path.unshift(e),n})}o(vn,"prefixIssues");function ks(e){return typeof e=="string"?e:e==null?void 0:e.message}o(ks,"unwrapMessage");function _n(e,t,n){var r,s,a,u,l,c,d,h,m,y,v;let i=L(x({},e),{path:(r=e.path)!=null?r:[]});if(!e.message){let I=(v=(y=(h=(c=ks((u=(a=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:a.error)==null?void 0:u.call(a,e)))!=null?c:ks((l=t==null?void 0:t.error)==null?void 0:l.call(t,e)))!=null?h:ks((d=n.customError)==null?void 0:d.call(n,e)))!=null?y:ks((m=n.localeError)==null?void 0:m.call(n,e)))!=null?v:"Invalid input";i.message=I}return delete i.inst,delete i.continue,t!=null&&t.reportInput||delete i.input,i}o(_n,"finalizeIssue");function zs(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}o(zs,"getSizableOrigin");function Bs(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Bs,"getLengthableOrigin");function _o(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:x({},t)}o(_o,"issue");function UP(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}o(UP,"cleanEnum");function H_(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}o(H_,"base64ToUint8Array");function W_(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}o(W_,"uint8ArrayToBase64");function NP(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return H_(t+n)}o(NP,"base64urlToUint8Array");function FP(e){return W_(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}o(FP,"uint8ArrayToBase64url");function kP(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}o(kP,"hexToUint8Array");function DP(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}o(DP,"uint8ArrayToHex");var kd=class kd{constructor(...t){}};o(kd,"Class");var Ad=kd;var Z_=o((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,xo,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Vs=M("$ZodError",Z_),un=M("$ZodError",Z_,{Parent:Error});function js(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}o(js,"flattenError");function Gs(e,t=n=>n.message){let n={_errors:[]},i=o(r=>{for(let s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>i({issues:a}));else if(s.code==="invalid_key")i({issues:s.issues});else if(s.code==="invalid_element")i({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let a=n,u=0;for(;u<s.path.length;){let l=s.path[u];u===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(t(s))):a[l]=a[l]||{_errors:[]},a=a[l],u++}}},"processError");return i(e),n}o(Gs,"formatError");function Dd(e,t=n=>n.message){let n={errors:[]},i=o((r,s=[])=>{var l,c,d,h;var a,u;for(let m of r.issues)if(m.code==="invalid_union"&&m.errors.length)m.errors.map(y=>i({issues:y},m.path));else if(m.code==="invalid_key")i({issues:m.issues},m.path);else if(m.code==="invalid_element")i({issues:m.issues},m.path);else{let y=[...s,...m.path];if(y.length===0){n.errors.push(t(m));continue}let v=n,I=0;for(;I<y.length;){let T=y[I],U=I===y.length-1;typeof T=="string"?((l=v.properties)!=null||(v.properties={}),(c=(a=v.properties)[T])!=null||(a[T]={errors:[]}),v=v.properties[T]):((d=v.items)!=null||(v.items=[]),(h=(u=v.items)[T])!=null||(u[T]={errors:[]}),v=v.items[T]),U&&v.errors.push(t(m)),I++}}},"processError");return i(e),n}o(Dd,"treeifyError");function X_(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push("[".concat(i,"]")):typeof i=="symbol"?t.push("[".concat(JSON.stringify(String(i)),"]")):/[^\w$]/.test(i)?t.push("[".concat(JSON.stringify(i),"]")):(t.length&&t.push("."),t.push(i));return t.join("")}o(X_,"toDotPath");function Ld(e){var i;let t=[],n=[...e.issues].sort((r,s)=>{var a,u;return((a=r.path)!=null?a:[]).length-((u=s.path)!=null?u:[]).length});for(let r of n)t.push("\u2716 ".concat(r.message)),(i=r.path)!=null&&i.length&&t.push(" \u2192 at ".concat(X_(r.path)));return t.join("\n")}o(Ld,"prettifyError");var bo=o(e=>(t,n,i,r)=>{var u;let s=i?Object.assign(i,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},s);if(a instanceof Promise)throw new tr;if(a.issues.length){let l=new((u=r==null?void 0:r.Err)!=null?u:e)(a.issues.map(c=>_n(c,s,xt())));throw Ec(l,r==null?void 0:r.callee),l}return a.value},"_parse"),Tc=bo(un),So=o(e=>async(t,n,i,r)=>{var u;let s=i?Object.assign(i,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){let l=new((u=r==null?void 0:r.Err)!=null?u:e)(a.issues.map(c=>_n(c,s,xt())));throw Ec(l,r==null?void 0:r.callee),l}return a.value},"_parseAsync"),Ac=So(un),Io=o(e=>(t,n,i)=>{let r=i?L(x({},i),{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},r);if(s instanceof Promise)throw new tr;return s.issues.length?{success:!1,error:new(e!=null?e:Vs)(s.issues.map(a=>_n(a,r,xt())))}:{success:!0,data:s.value}},"_safeParse"),$d=Io(un),wo=o(e=>async(t,n,i)=>{let r=i?Object.assign(i,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},r);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(a=>_n(a,r,xt())))}:{success:!0,data:s.value}},"_safeParseAsync"),zd=wo(un),Pc=o(e=>(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return bo(e)(t,n,r)},"_encode"),$P=Pc(un),Rc=o(e=>(t,n,i)=>bo(e)(t,n,i),"_decode"),zP=Rc(un),Cc=o(e=>async(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return So(e)(t,n,r)},"_encodeAsync"),BP=Cc(un),Oc=o(e=>async(t,n,i)=>So(e)(t,n,i),"_decodeAsync"),VP=Oc(un),Uc=o(e=>(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Io(e)(t,n,r)},"_safeEncode"),jP=Uc(un),Nc=o(e=>(t,n,i)=>Io(e)(t,n,i),"_safeDecode"),GP=Nc(un),Fc=o(e=>async(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return wo(e)(t,n,r)},"_safeEncodeAsync"),HP=Fc(un),kc=o(e=>async(t,n,i)=>wo(e)(t,n,i),"_safeDecodeAsync"),WP=kc(un);f();f();var bn={};cn(bn,{base64:()=>tp,base64url:()=>Dc,bigint:()=>cp,boolean:()=>fp,browserEmail:()=>eR,cidrv4:()=>Qd,cidrv6:()=>ep,cuid:()=>Bd,cuid2:()=>Vd,date:()=>ip,datetime:()=>sp,domain:()=>nR,duration:()=>Zd,e164:()=>rp,email:()=>qd,emoji:()=>Kd,extendedDuration:()=>ZP,guid:()=>Xd,hex:()=>rR,hostname:()=>np,html5Email:()=>JP,idnEmail:()=>QP,integer:()=>up,ipv4:()=>Jd,ipv6:()=>Yd,ksuid:()=>Hd,lowercase:()=>hp,md5_base64:()=>oR,md5_base64url:()=>sR,md5_hex:()=>iR,nanoid:()=>Wd,null:()=>dp,number:()=>lp,rfc5322Email:()=>YP,sha1_base64:()=>cR,sha1_base64url:()=>uR,sha1_hex:()=>aR,sha256_base64:()=>fR,sha256_base64url:()=>dR,sha256_hex:()=>lR,sha384_base64:()=>hR,sha384_base64url:()=>mR,sha384_hex:()=>pR,sha512_base64:()=>yR,sha512_base64url:()=>xR,sha512_hex:()=>gR,string:()=>ap,time:()=>op,ulid:()=>jd,undefined:()=>pp,unicodeEmail:()=>q_,uppercase:()=>mp,uuid:()=>Di,uuid4:()=>XP,uuid6:()=>qP,uuid7:()=>KP,xid:()=>Gd});f();var Bd=/^[cC][^\s-]{8,}$/,Vd=/^[0-9a-z]+$/,jd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gd=/^[0-9a-vA-V]{20}$/,Hd=/^[A-Za-z0-9]{27}$/,Wd=/^[a-zA-Z0-9_-]{21}$/,Zd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ZP=/^[-+]?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)?)??$/,Xd=/^([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})$/,Di=o(e=>e?new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-".concat(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)$/,"uuid"),XP=Di(4),qP=Di(6),KP=Di(7),qd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,JP=/^[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])?)*$/,YP=/^(([^<>()\[\]\\.,;:\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,}))$/,q_=new RegExp('^[^\\s@"]{1,64}@[^\\s@]{1,255}$',"u"),QP=q_,eR=/^[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])?)*$/,tR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Kd(){return new RegExp(tR,"u")}o(Kd,"emoji");var Jd=/^(?:(?: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])$/,Yd=/^(([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}|:))$/,Qd=/^((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])$/,ep=/^(([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])$/,tp=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dc=/^[A-Za-z0-9_-]*$/,np=/^(?=.{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])?)*\.?$/,nR=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,rp=/^\+(?:[0-9]){6,14}[0-9]$/,K_="(?:(?:\\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])))",ip=new RegExp("^".concat(K_,"$"));function J_(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?"".concat(t):e.precision===0?"".concat(t,":[0-5]\\d"):"".concat(t,":[0-5]\\d\\.\\d{").concat(e.precision,"}"):"".concat(t,"(?::[0-5]\\d(?:\\.\\d+)?)?")}o(J_,"timeSource");function op(e){return new RegExp("^".concat(J_(e),"$"))}o(op,"time");function sp(e){let t=J_({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i="".concat(t,"(?:").concat(n.join("|"),")");return new RegExp("^".concat(K_,"T(?:").concat(i,")$"))}o(sp,"datetime");var ap=o(e=>{var n,i;let t=e?"[\\s\\S]{".concat((n=e==null?void 0:e.minimum)!=null?n:0,",").concat((i=e==null?void 0:e.maximum)!=null?i:"","}"):"[\\s\\S]*";return new RegExp("^".concat(t,"$"))},"string"),cp=/^-?\d+n?$/,up=/^-?\d+$/,lp=/^-?\d+(?:\.\d+)?/,fp=/^(?:true|false)$/i,dp=/^null$/i;var pp=/^undefined$/i;var hp=/^[^A-Z]*$/,mp=/^[^a-z]*$/,rR=/^[0-9a-fA-F]*$/;function Hs(e,t){return new RegExp("^[A-Za-z0-9+/]{".concat(e,"}").concat(t,"$"))}o(Hs,"fixedBase64");function Ws(e){return new RegExp("^[A-Za-z0-9_-]{".concat(e,"}$"))}o(Ws,"fixedBase64url");var iR=/^[0-9a-fA-F]{32}$/,oR=Hs(22,"=="),sR=Ws(22),aR=/^[0-9a-fA-F]{40}$/,cR=Hs(27,"="),uR=Ws(27),lR=/^[0-9a-fA-F]{64}$/,fR=Hs(43,"="),dR=Ws(43),pR=/^[0-9a-fA-F]{96}$/,hR=Hs(64,""),mR=Ws(64),gR=/^[0-9a-fA-F]{128}$/,yR=Hs(86,"=="),xR=Ws(86);var rt=M("$ZodCheck",(e,t)=>{var i,r;var n;(i=e._zod)!=null||(e._zod={}),e._zod.def=t,(r=(n=e._zod).onattach)!=null||(n.onattach=[])}),Q_={number:"number",bigint:"bigint",object:"date"},Lc=M("$ZodCheckLessThan",(e,t)=>{rt.init(e,t);let n=Q_[typeof t.value];e._zod.onattach.push(i=>{var a;let r=i._zod.bag,s=(a=t.inclusive?r.maximum:r.exclusiveMaximum)!=null?a:Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),$c=M("$ZodCheckGreaterThan",(e,t)=>{rt.init(e,t);let n=Q_[typeof t.value];e._zod.onattach.push(i=>{var a;let r=i._zod.bag,s=(a=t.inclusive?r.minimum:r.exclusiveMinimum)!=null?a:Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),gp=M("$ZodCheckMultipleOf",(e,t)=>{rt.init(e,t),e._zod.onattach.push(n=>{var r;var i;(r=(i=n._zod.bag).multipleOf)!=null||(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Pd(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),yp=M("$ZodCheckNumberFormat",(e,t)=>{var a;rt.init(e,t),t.format=t.format||"float64";let n=(a=t.format)==null?void 0:a.includes("int"),i=n?"int":"number",[r,s]=Nd[t.format];e._zod.onattach.push(u=>{let l=u._zod.bag;l.format=t.format,l.minimum=r,l.maximum=s,n&&(l.pattern=up)}),e._zod.check=u=>{let l=u.value;if(n){if(!Number.isInteger(l)){u.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?u.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}):u.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort});return}}l<r&&u.issues.push({origin:"number",input:l,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),l>s&&u.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inst:e})}}),xp=M("$ZodCheckBigIntFormat",(e,t)=>{rt.init(e,t);let[n,i]=Fd[t.format];e._zod.onattach.push(r=>{let s=r._zod.bag;s.format=t.format,s.minimum=n,s.maximum=i}),e._zod.check=r=>{let s=r.value;s<n&&r.issues.push({origin:"bigint",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>i&&r.issues.push({origin:"bigint",input:s,code:"too_big",maximum:i,inst:e})}}),vp=M("$ZodCheckMaxSize",(e,t)=>{var i;var n;rt.init(e,t),(i=(n=e._zod.def).when)!=null||(n.when=r=>{let s=r.value;return!hi(s)&&s.size!==void 0}),e._zod.onattach.push(r=>{var a;let s=(a=r._zod.bag.maximum)!=null?a:Number.POSITIVE_INFINITY;t.maximum<s&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let s=r.value;s.size<=t.maximum||r.issues.push({origin:zs(s),code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),_p=M("$ZodCheckMinSize",(e,t)=>{var i;var n;rt.init(e,t),(i=(n=e._zod.def).when)!=null||(n.when=r=>{let s=r.value;return!hi(s)&&s.size!==void 0}),e._zod.onattach.push(r=>{var a;let s=(a=r._zod.bag.minimum)!=null?a:Number.NEGATIVE_INFINITY;t.minimum>s&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let s=r.value;s.size>=t.minimum||r.issues.push({origin:zs(s),code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),bp=M("$ZodCheckSizeEquals",(e,t)=>{var i;var n;rt.init(e,t),(i=(n=e._zod.def).when)!=null||(n.when=r=>{let s=r.value;return!hi(s)&&s.size!==void 0}),e._zod.onattach.push(r=>{let s=r._zod.bag;s.minimum=t.size,s.maximum=t.size,s.size=t.size}),e._zod.check=r=>{let s=r.value,a=s.size;if(a===t.size)return;let u=a>t.size;r.issues.push(L(x({origin:zs(s)},u?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size}),{inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort}))}}),Sp=M("$ZodCheckMaxLength",(e,t)=>{var i;var n;rt.init(e,t),(i=(n=e._zod.def).when)!=null||(n.when=r=>{let s=r.value;return!hi(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{var a;let s=(a=r._zod.bag.maximum)!=null?a:Number.POSITIVE_INFINITY;t.maximum<s&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let s=r.value;if(s.length<=t.maximum)return;let u=Bs(s);r.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Ip=M("$ZodCheckMinLength",(e,t)=>{var i;var n;rt.init(e,t),(i=(n=e._zod.def).when)!=null||(n.when=r=>{let s=r.value;return!hi(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{var a;let s=(a=r._zod.bag.minimum)!=null?a:Number.NEGATIVE_INFINITY;t.minimum>s&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let s=r.value;if(s.length>=t.minimum)return;let u=Bs(s);r.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),wp=M("$ZodCheckLengthEquals",(e,t)=>{var i;var n;rt.init(e,t),(i=(n=e._zod.def).when)!=null||(n.when=r=>{let s=r.value;return!hi(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{let s=r._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=r=>{let s=r.value,a=s.length;if(a===t.length)return;let u=Bs(s),l=a>t.length;r.issues.push(L(x({origin:u},l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length}),{inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort}))}}),Mo=M("$ZodCheckStringFormat",(e,t)=>{var r,s;var n,i;rt.init(e,t),e._zod.onattach.push(a=>{var l;let u=a._zod.bag;u.format=t.format,t.pattern&&((l=u.patterns)!=null||(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=(n=e._zod).check)!=null||(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push(L(x({origin:"string",code:"invalid_format",format:t.format,input:a.value},t.pattern?{pattern:t.pattern.toString()}:{}),{inst:e,continue:!t.abort}))}):(s=(i=e._zod).check)!=null||(i.check=()=>{})}),Mp=M("$ZodCheckRegex",(e,t)=>{Mo.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ep=M("$ZodCheckLowerCase",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=hp),Mo.init(e,t)}),Tp=M("$ZodCheckUpperCase",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=mp),Mo.init(e,t)}),Ap=M("$ZodCheckIncludes",(e,t)=>{rt.init(e,t);let n=hr(t.includes),i=new RegExp(typeof t.position=="number"?"^.{".concat(t.position,"}").concat(n):n);t.pattern=i,e._zod.onattach.push(r=>{var a;let s=r._zod.bag;(a=s.patterns)!=null||(s.patterns=new Set),s.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Pp=M("$ZodCheckStartsWith",(e,t)=>{var i;rt.init(e,t);let n=new RegExp("^".concat(hr(t.prefix),".*"));(i=t.pattern)!=null||(t.pattern=n),e._zod.onattach.push(r=>{var a;let s=r._zod.bag;(a=s.patterns)!=null||(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Rp=M("$ZodCheckEndsWith",(e,t)=>{var i;rt.init(e,t);let n=new RegExp(".*".concat(hr(t.suffix),"$"));(i=t.pattern)!=null||(t.pattern=n),e._zod.onattach.push(r=>{var a;let s=r._zod.bag;(a=s.patterns)!=null||(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});function Y_(e,t,n){e.issues.length&&t.issues.push(...vn(n,e.issues))}o(Y_,"handleCheckPropertyResult");var Cp=M("$ZodCheckProperty",(e,t)=>{rt.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>Y_(r,n,t.property));Y_(i,n,t.property)}}),Op=M("$ZodCheckMimeType",(e,t)=>{rt.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Up=M("$ZodCheckOverwrite",(e,t)=>{rt.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});f();var Np=class Np{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}let i=t.split("\n").filter(a=>a),r=Math.min(...i.map(a=>a.length-a.trimStart().length)),s=i.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of s)this.content.push(a)}compile(){var s;let t=Function,n=this==null?void 0:this.args,r=[...((s=this==null?void 0:this.content)!=null?s:[""]).map(a=>" ".concat(a))];return new t(...n,r.join("\n"))}};o(Np,"Doc");var Zs=Np;f();var Fp={major:4,minor:1,patch:12};var se=M("$ZodType",(e,t)=>{var r,s,a;var n;e!=null||(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Fp;let i=[...(r=e._zod.def.checks)!=null?r:[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let u of i)for(let l of u._zod.onattach)l(e);if(i.length===0)(s=(n=e._zod).deferred)!=null||(n.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse});else{let u=o((c,d,h)=>{let m=xi(c),y;for(let v of d){if(v._zod.def.when){if(!v._zod.def.when(c))continue}else if(m)continue;let I=c.issues.length,T=v._zod.check(c);if(T instanceof Promise&&(h==null?void 0:h.async)===!1)throw new tr;if(y||T instanceof Promise)y=(y!=null?y:Promise.resolve()).then(async()=>{await T,c.issues.length!==I&&(m||(m=xi(c,I)))});else{if(c.issues.length===I)continue;m||(m=xi(c,I))}}return y?y.then(()=>c):c},"runChecks"),l=o((c,d,h)=>{if(xi(c))return c.aborted=!0,c;let m=u(d,i,h);if(m instanceof Promise){if(h.async===!1)throw new tr;return m.then(y=>e._zod.parse(y,h))}return e._zod.parse(m,h)},"handleCanaryResult");e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){let m=e._zod.parse({value:c.value,issues:[]},L(x({},d),{skipChecks:!0}));return m instanceof Promise?m.then(y=>l(y,c,d)):l(m,c,d)}let h=e._zod.parse(c,d);if(h instanceof Promise){if(d.async===!1)throw new tr;return h.then(m=>u(m,i,d))}return u(h,i,d)}}e["~standard"]={validate:o(u=>{var l;try{let c=$d(e,u);return c.success?{value:c.data}:{issues:(l=c.error)==null?void 0:l.issues}}catch(c){return zd(e,u).then(d=>{var h;return d.success?{value:d.data}:{issues:(h=d.error)==null?void 0:h.issues}})}},"validate"),vendor:"zod",version:1}}),Li=M("$ZodString",(e,t)=>{var n,i,r;se.init(e,t),e._zod.pattern=(r=[...(i=(n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)!=null?i:[]].pop())!=null?r:ap(e._zod.bag),e._zod.parse=(s,a)=>{if(t.coerce)try{s.value=String(s.value)}catch(u){}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:e}),s}}),qe=M("$ZodStringFormat",(e,t)=>{Mo.init(e,t),Li.init(e,t)}),Dp=M("$ZodGUID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Xd),qe.init(e,t)}),Lp=M("$ZodUUID",(e,t)=>{var n,i;if(t.version){let s={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(s===void 0)throw new Error('Invalid UUID version: "'.concat(t.version,'"'));(n=t.pattern)!=null||(t.pattern=Di(s))}else(i=t.pattern)!=null||(t.pattern=Di());qe.init(e,t)}),$p=M("$ZodEmail",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=qd),qe.init(e,t)}),zp=M("$ZodURL",(e,t)=>{qe.init(e,t),e._zod.check=n=>{try{let i=n.value.trim(),r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:np.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Bp=M("$ZodEmoji",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Kd()),qe.init(e,t)}),Vp=M("$ZodNanoID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Wd),qe.init(e,t)}),jp=M("$ZodCUID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Bd),qe.init(e,t)}),Gp=M("$ZodCUID2",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Vd),qe.init(e,t)}),Hp=M("$ZodULID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=jd),qe.init(e,t)}),Wp=M("$ZodXID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Gd),qe.init(e,t)}),Zp=M("$ZodKSUID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Hd),qe.init(e,t)}),Xp=M("$ZodISODateTime",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=sp(t)),qe.init(e,t)}),qp=M("$ZodISODate",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=ip),qe.init(e,t)}),Kp=M("$ZodISOTime",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=op(t)),qe.init(e,t)}),Jp=M("$ZodISODuration",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Zd),qe.init(e,t)}),Yp=M("$ZodIPv4",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Jd),qe.init(e,t),e._zod.onattach.push(i=>{let r=i._zod.bag;r.format="ipv4"})}),Qp=M("$ZodIPv6",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Yd),qe.init(e,t),e._zod.onattach.push(i=>{let r=i._zod.bag;r.format="ipv6"}),e._zod.check=i=>{try{new URL("http://[".concat(i.value,"]"))}catch(r){i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!t.abort})}}}),eh=M("$ZodCIDRv4",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Qd),qe.init(e,t)}),th=M("$ZodCIDRv6",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=ep),qe.init(e,t),e._zod.check=i=>{let r=i.value.split("/");try{if(r.length!==2)throw new Error;let[s,a]=r;if(!a)throw new Error;let u=Number(a);if("".concat(u)!==a)throw new Error;if(u<0||u>128)throw new Error;new URL("http://[".concat(s,"]"))}catch(s){i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!t.abort})}}});function nh(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch(t){return!1}}o(nh,"isValidBase64");var rh=M("$ZodBase64",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=tp),qe.init(e,t),e._zod.onattach.push(i=>{i._zod.bag.contentEncoding="base64"}),e._zod.check=i=>{nh(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!t.abort})}});function f0(e){if(!Dc.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return nh(n)}o(f0,"isValidBase64URL");var ih=M("$ZodBase64URL",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Dc),qe.init(e,t),e._zod.onattach.push(i=>{i._zod.bag.contentEncoding="base64url"}),e._zod.check=i=>{f0(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!t.abort})}}),oh=M("$ZodE164",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=rp),qe.init(e,t)});function d0(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&(r==null?void 0:r.typ)!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch(n){return!1}}o(d0,"isValidJWT");var sh=M("$ZodJWT",(e,t)=>{qe.init(e,t),e._zod.check=n=>{d0(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),ah=M("$ZodCustomStringFormat",(e,t)=>{qe.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Hc=M("$ZodNumber",(e,t)=>{var n;se.init(e,t),e._zod.pattern=(n=e._zod.bag.pattern)!=null?n:lp,e._zod.parse=(i,r)=>{if(t.coerce)try{i.value=Number(i.value)}catch(u){}let s=i.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return i;let a=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return i.issues.push(x({expected:"number",code:"invalid_type",input:s,inst:e},a?{received:a}:{})),i}}),ch=M("$ZodNumber",(e,t)=>{yp.init(e,t),Hc.init(e,t)}),Xs=M("$ZodBoolean",(e,t)=>{se.init(e,t),e._zod.pattern=fp,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch(s){}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Wc=M("$ZodBigInt",(e,t)=>{se.init(e,t),e._zod.pattern=cp,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(r){}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),uh=M("$ZodBigInt",(e,t)=>{xp.init(e,t),Wc.init(e,t)}),lh=M("$ZodSymbol",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),fh=M("$ZodUndefined",(e,t)=>{se.init(e,t),e._zod.pattern=pp,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),dh=M("$ZodNull",(e,t)=>{se.init(e,t),e._zod.pattern=dp,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),ph=M("$ZodAny",(e,t)=>{se.init(e,t),e._zod.parse=n=>n}),hh=M("$ZodUnknown",(e,t)=>{se.init(e,t),e._zod.parse=n=>n}),mh=M("$ZodNever",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),gh=M("$ZodVoid",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),yh=M("$ZodDate",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(u){}let r=n.value,s=r instanceof Date;return s&&!Number.isNaN(r.getTime())||n.issues.push(L(x({expected:"date",code:"invalid_type",input:r},s?{received:"Invalid Date"}:{}),{inst:e})),n}});function t0(e,t,n){e.issues.length&&t.issues.push(...vn(n,e.issues)),t.value[n]=e.value}o(t0,"handleArrayResult");var xh=M("$ZodArray",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let s=[];for(let a=0;a<r.length;a++){let u=r[a],l=t.element._zod.run({value:u,issues:[]},i);l instanceof Promise?s.push(l.then(c=>t0(c,n,a))):t0(l,n,a)}return s.length?Promise.all(s).then(()=>n):n}});function Gc(e,t,n,i){e.issues.length&&t.issues.push(...vn(n,e.issues)),e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}o(Gc,"handlePropertyResult");function p0(e){var i,r,s,a;let t=Object.keys(e.shape);for(let u of t)if(!((a=(s=(r=(i=e.shape)==null?void 0:i[u])==null?void 0:r._zod)==null?void 0:s.traits)!=null&&a.has("$ZodType")))throw new Error('Invalid element at key "'.concat(u,'": expected a Zod schema'));let n=Ud(e.shape);return L(x({},e),{keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)})}o(p0,"normalizeDef");function h0(e,t,n,i,r,s){let a=[],u=r.keySet,l=r.catchall._zod,c=l.def.type;for(let d of Object.keys(t)){if(u.has(d))continue;if(c==="never"){a.push(d);continue}let h=l.run({value:t[d],issues:[]},i);h instanceof Promise?e.push(h.then(m=>Gc(m,n,d,t))):Gc(h,n,d,t)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}o(h0,"handleCatchall");var m0=M("$ZodObject",(e,t)=>{se.init(e,t);let n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){let u=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let l=x({},u);return Object.defineProperty(t,"shape",{value:l}),l},"get")})}let i=vo(()=>p0(t));ge(e._zod,"propValues",()=>{var c;let u=t.shape,l={};for(let d in u){let h=u[d]._zod;if(h.values){(c=l[d])!=null||(l[d]=new Set);for(let m of h.values)l[d].add(m)}}return l});let r=ki,s=t.catchall,a;e._zod.parse=(u,l)=>{a!=null||(a=i.value);let c=u.value;if(!r(c))return u.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),u;u.value={};let d=[],h=a.shape;for(let m of a.keys){let v=h[m]._zod.run({value:c[m],issues:[]},l);v instanceof Promise?d.push(v.then(I=>Gc(I,u,m,c))):Gc(v,u,m,c)}return s?h0(d,c,u,l,i.value,e):d.length?Promise.all(d).then(()=>u):u}}),vh=M("$ZodObjectJIT",(e,t)=>{m0.init(e,t);let n=e._zod.parse,i=vo(()=>p0(t)),r=o(m=>{let y=new Zs(["shape","payload","ctx"]),v=i.value,I=o(w=>{let S=Mc(w);return"shape[".concat(S,"]._zod.run({ value: input[").concat(S,"], issues: [] }, ctx)")},"parseStr");y.write("const input = payload.value;");let T=Object.create(null),U=0;for(let w of v.keys)T[w]="key_".concat(U++);y.write("const newResult = {};");for(let w of v.keys){let S=T[w],A=Mc(w);y.write("const ".concat(S," = ").concat(I(w),";")),y.write("\n if (".concat(S,".issues.length) {\n payload.issues = payload.issues.concat(").concat(S,".issues.map(iss => ({\n ...iss,\n path: iss.path ? [").concat(A,", ...iss.path] : [").concat(A,"]\n })));\n }\n \n \n if (").concat(S,".value === undefined) {\n if (").concat(A," in input) {\n newResult[").concat(A,"] = undefined;\n }\n } else {\n newResult[").concat(A,"] = ").concat(S,".value;\n }\n \n "))}y.write("payload.value = newResult;"),y.write("return payload;");let D=y.compile();return(w,S)=>D(m,w,S)},"generateFastpass"),s,a=ki,u=!Fs.jitless,c=u&&Rd.value,d=t.catchall,h;e._zod.parse=(m,y)=>{h!=null||(h=i.value);let v=m.value;return a(v)?u&&c&&(y==null?void 0:y.async)===!1&&y.jitless!==!0?(s||(s=r(t.shape)),m=s(m,y),d?h0([],v,m,y,h,e):m):n(m,y):(m.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),m)}});function n0(e,t,n,i){for(let s of e)if(s.issues.length===0)return t.value=s.value,t;let r=e.filter(s=>!xi(s));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(a=>_n(a,i,xt())))}),t)}o(n0,"handleUnionResults");var Zc=M("$ZodUnion",(e,t)=>{se.init(e,t),ge(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ge(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ge(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ge(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(s=>s._zod.pattern);return new RegExp("^(".concat(r.map(s=>Ls(s.source)).join("|"),")$"))}});let n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(r,s)=>{if(n)return i(r,s);let a=!1,u=[];for(let l of t.options){let c=l._zod.run({value:r.value,issues:[]},s);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(l=>n0(l,r,e,s)):n0(u,r,e,s)}}),_h=M("$ZodDiscriminatedUnion",(e,t)=>{Zc.init(e,t);let n=e._zod.parse;ge(e._zod,"propValues",()=>{let r={};for(let s of t.options){let a=s._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error('Invalid discriminated union option at index "'.concat(t.options.indexOf(s),'"'));for(let[u,l]of Object.entries(a)){r[u]||(r[u]=new Set);for(let c of l)r[u].add(c)}}return r});let i=vo(()=>{var a;let r=t.options,s=new Map;for(let u of r){let l=(a=u._zod.propValues)==null?void 0:a[t.discriminator];if(!l||l.size===0)throw new Error('Invalid discriminated union option at index "'.concat(t.options.indexOf(u),'"'));for(let c of l){if(s.has(c))throw new Error('Duplicate discriminator value "'.concat(String(c),'"'));s.set(c,u)}}return s});e._zod.parse=(r,s)=>{let a=r.value;if(!ki(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let u=i.value.get(a==null?void 0:a[t.discriminator]);return u?u._zod.run(r,s):t.unionFallback?n(r,s):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),r)}}),bh=M("$ZodIntersection",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,s=t.left._zod.run({value:r,issues:[]},i),a=t.right._zod.run({value:r,issues:[]},i);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([l,c])=>r0(n,l,c)):r0(n,s,a)}});function kp(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(yi(e)&&yi(t)){let n=Object.keys(t),i=Object.keys(e).filter(s=>n.indexOf(s)!==-1),r=x(x({},e),t);for(let s of i){let a=kp(e[s],t[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};r[s]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],s=t[i],a=kp(r,s);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}o(kp,"mergeValues");function r0(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),xi(e))return e;let i=kp(t.value,n.value);if(!i.valid)throw new Error("Unmergable intersection. Error path: "+"".concat(JSON.stringify(i.mergeErrorPath)));return e.value=i.data,e}o(r0,"handleIntersectionResults");var Xc=M("$ZodTuple",(e,t)=>{se.init(e,t);let n=t.items,i=n.length-[...n].reverse().findIndex(r=>r._zod.optin!=="optional");e._zod.parse=(r,s)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let u=[];if(!t.rest){let c=a.length>n.length,d=a.length<i-1;if(c||d)return r.issues.push(L(x({},c?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length}),{input:a,inst:e,origin:"array"})),r}let l=-1;for(let c of n){if(l++,l>=a.length&&l>=i)continue;let d=c._zod.run({value:a[l],issues:[]},s);d instanceof Promise?u.push(d.then(h=>zc(h,r,l))):zc(d,r,l)}if(t.rest){let c=a.slice(n.length);for(let d of c){l++;let h=t.rest._zod.run({value:d,issues:[]},s);h instanceof Promise?u.push(h.then(m=>zc(m,r,l))):zc(h,r,l)}}return u.length?Promise.all(u).then(()=>r):r}});function zc(e,t,n){e.issues.length&&t.issues.push(...vn(n,e.issues)),t.value[n]=e.value}o(zc,"handleTupleResult");var Sh=M("$ZodRecord",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!yi(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let s=[];if(t.keyType._zod.values){let a=t.keyType._zod.values;n.value={};for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){let c=t.valueType._zod.run({value:r[l],issues:[]},i);c instanceof Promise?s.push(c.then(d=>{d.issues.length&&n.issues.push(...vn(l,d.issues)),n.value[l]=d.value})):(c.issues.length&&n.issues.push(...vn(l,c.issues)),n.value[l]=c.value)}let u;for(let l in r)a.has(l)||(u=u!=null?u:[],u.push(l));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a==="__proto__")continue;let u=t.keyType._zod.run({value:a,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(c=>_n(c,i,xt())),input:a,path:[a],inst:e}),n.value[u.value]=u.value;continue}let l=t.valueType._zod.run({value:r[a],issues:[]},i);l instanceof Promise?s.push(l.then(c=>{c.issues.length&&n.issues.push(...vn(a,c.issues)),n.value[u.value]=c.value})):(l.issues.length&&n.issues.push(...vn(a,l.issues)),n.value[u.value]=l.value)}}return s.length?Promise.all(s).then(()=>n):n}}),Ih=M("$ZodMap",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let s=[];n.value=new Map;for(let[a,u]of r){let l=t.keyType._zod.run({value:a,issues:[]},i),c=t.valueType._zod.run({value:u,issues:[]},i);l instanceof Promise||c instanceof Promise?s.push(Promise.all([l,c]).then(([d,h])=>{i0(d,h,n,a,r,e,i)})):i0(l,c,n,a,r,e,i)}return s.length?Promise.all(s).then(()=>n):n}});function i0(e,t,n,i,r,s,a){e.issues.length&&($s.has(typeof i)?n.issues.push(...vn(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:s,issues:e.issues.map(u=>_n(u,a,xt()))})),t.issues.length&&($s.has(typeof i)?n.issues.push(...vn(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:s,key:i,issues:t.issues.map(u=>_n(u,a,xt()))})),n.value.set(e.value,t.value)}o(i0,"handleMapResult");var wh=M("$ZodSet",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let s=[];n.value=new Set;for(let a of r){let u=t.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise?s.push(u.then(l=>o0(l,n))):o0(u,n)}return s.length?Promise.all(s).then(()=>n):n}});function o0(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}o(o0,"handleSetResult");var Mh=M("$ZodEnum",(e,t)=>{se.init(e,t);let n=Ds(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp("^(".concat(n.filter(r=>$s.has(typeof r)).map(r=>typeof r=="string"?hr(r):r.toString()).join("|"),")$")),e._zod.parse=(r,s)=>{let a=r.value;return i.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),Eh=M("$ZodLiteral",(e,t)=>{if(se.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp("^(".concat(t.values.map(n=>typeof n=="string"?hr(n):n?hr(n.toString()):String(n)).join("|"),")$")),e._zod.parse=(n,i)=>{let r=n.value;return e._zod.values.has(r)||n.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),n}}),Th=M("$ZodFile",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Ah=M("$ZodTransform",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new pi(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n));if(r instanceof Promise)throw new tr;return n.value=r,n}});function s0(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(s0,"handleOptionalResult");var Ph=M("$ZodOptional",(e,t)=>{se.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ge(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp("^(".concat(Ls(n.source),")?$")):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(s=>s0(s,n.value)):s0(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),Rh=M("$ZodNullable",(e,t)=>{se.init(e,t),ge(e._zod,"optin",()=>t.innerType._zod.optin),ge(e._zod,"optout",()=>t.innerType._zod.optout),ge(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp("^(".concat(Ls(n.source),"|null)$")):void 0}),ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),Ch=M("$ZodDefault",(e,t)=>{se.init(e,t),e._zod.optin="optional",ge(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(s=>a0(s,t)):a0(r,t)}});function a0(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}o(a0,"handleDefaultResult");var Oh=M("$ZodPrefault",(e,t)=>{se.init(e,t),e._zod.optin="optional",ge(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),Uh=M("$ZodNonOptional",(e,t)=>{se.init(e,t),ge(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(s=>c0(s,e)):c0(r,e)}});function c0(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}o(c0,"handleNonOptionalResult");var Nh=M("$ZodSuccess",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new pi("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(s=>(n.value=s.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),Fh=M("$ZodCatch",(e,t)=>{se.init(e,t),ge(e._zod,"optin",()=>t.innerType._zod.optin),ge(e._zod,"optout",()=>t.innerType._zod.optout),ge(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue(L(x({},n),{error:{issues:s.issues.map(a=>_n(a,i,xt()))},input:n.value})),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue(L(x({},n),{error:{issues:r.issues.map(s=>_n(s,i,xt()))},input:n.value})),n.issues=[]),n)}}),kh=M("$ZodNaN",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Dh=M("$ZodPipe",(e,t)=>{se.init(e,t),ge(e._zod,"values",()=>t.in._zod.values),ge(e._zod,"optin",()=>t.in._zod.optin),ge(e._zod,"optout",()=>t.out._zod.optout),ge(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let s=t.out._zod.run(n,i);return s instanceof Promise?s.then(a=>Bc(a,t.in,i)):Bc(s,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(s=>Bc(s,t.out,i)):Bc(r,t.out,i)}});function Bc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}o(Bc,"handlePipeResult");var qs=M("$ZodCodec",(e,t)=>{se.init(e,t),ge(e._zod,"values",()=>t.in._zod.values),ge(e._zod,"optin",()=>t.in._zod.optin),ge(e._zod,"optout",()=>t.out._zod.optout),ge(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let s=t.in._zod.run(n,i);return s instanceof Promise?s.then(a=>Vc(a,t,i)):Vc(s,t,i)}else{let s=t.out._zod.run(n,i);return s instanceof Promise?s.then(a=>Vc(a,t,i)):Vc(s,t,i)}}});function Vc(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(s=>jc(e,s,t.out,n)):jc(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(s=>jc(e,s,t.in,n)):jc(e,r,t.in,n)}}o(Vc,"handleCodecAResult");function jc(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}o(jc,"handleCodecTxResult");var Lh=M("$ZodReadonly",(e,t)=>{se.init(e,t),ge(e._zod,"propValues",()=>t.innerType._zod.propValues),ge(e._zod,"values",()=>t.innerType._zod.values),ge(e._zod,"optin",()=>t.innerType._zod.optin),ge(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(u0):u0(r)}});function u0(e){return e.value=Object.freeze(e.value),e}o(u0,"handleReadonlyResult");var $h=M("$ZodTemplateLiteral",(e,t)=>{se.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error("Invalid template literal part, no pattern found: ".concat([...i._zod.traits].shift()));let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error("Invalid template literal part: ".concat(i._zod.traits));let s=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(s,a))}else if(i===null||Od.has(typeof i))n.push(hr("".concat(i)));else throw new Error("Invalid template literal part: ".concat(i));e._zod.pattern=new RegExp("^".concat(n.join(""),"$")),e._zod.parse=(i,r)=>{var s;return typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"template_literal",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:(s=t.format)!=null?s:"template_literal",pattern:e._zod.pattern.source}),i)}}),zh=M("$ZodFunction",(e,t)=>(se.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let r=e._def.input?Tc(e._def.input,i):i,s=Reflect.apply(n,this,r);return e._def.output?Tc(e._def.output,s):s}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await Ac(e._def.input,i):i,s=await Reflect.apply(n,this,r);return e._def.output?await Ac(e._def.output,s):s}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new Xc({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),Bh=M("$ZodPromise",(e,t)=>{se.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),Vh=M("$ZodLazy",(e,t)=>{se.init(e,t),ge(e._zod,"innerType",()=>t.getter()),ge(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),ge(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),ge(e._zod,"optin",()=>{var n;return(n=e._zod.innerType._zod.optin)!=null?n:void 0}),ge(e._zod,"optout",()=>{var n;return(n=e._zod.innerType._zod.optout)!=null?n:void 0}),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),jh=M("$ZodCustom",(e,t)=>{rt.init(e,t),se.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(s=>l0(s,n,i,e));l0(r,n,i,e)}});function l0(e,t,n,i){var r;if(!e){let s={code:"custom",input:n,inst:i,path:[...(r=i._zod.def.path)!=null?r:[]],continue:!i._zod.def.abort};i._zod.def.params&&(s.params=i._zod.def.params),t.issues.push(_o(s))}}o(l0,"handleRefineResult");var $i={};cn($i,{ar:()=>Gh,az:()=>Hh,be:()=>Wh,bg:()=>Zh,ca:()=>Xh,cs:()=>qh,da:()=>Kh,de:()=>Jh,en:()=>Ks,eo:()=>Yh,es:()=>Qh,fa:()=>em,fi:()=>tm,fr:()=>nm,frCA:()=>rm,he:()=>im,hu:()=>om,id:()=>sm,is:()=>am,it:()=>cm,ja:()=>um,ka:()=>lm,kh:()=>fm,km:()=>Js,ko:()=>dm,lt:()=>pm,mk:()=>hm,ms:()=>mm,nl:()=>gm,no:()=>ym,ota:()=>xm,pl:()=>_m,ps:()=>vm,pt:()=>bm,ru:()=>Sm,sl:()=>Im,sv:()=>wm,ta:()=>Mm,th:()=>Em,tr:()=>Tm,ua:()=>Am,uk:()=>ea,ur:()=>Pm,vi:()=>Rm,yo:()=>Um,zhCN:()=>Cm,zhTW:()=>Om});f();f();var _R=o(()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ".concat(r.expected,"\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ".concat($(r.values[0])):"\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?" \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ".concat((s=r.origin)!=null?s:"\u0627\u0644\u0642\u064A\u0645\u0629"," ").concat(c," ").concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"\u0639\u0646\u0635\u0631"):"\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ".concat((u=r.origin)!=null?u:"\u0627\u0644\u0642\u064A\u0645\u0629"," ").concat(c," ").concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ".concat(r.origin," \u0623\u0646 \u064A\u0643\u0648\u0646 ").concat(c," ").concat(r.minimum.toString()," ").concat(d.unit):"\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ".concat(r.origin," \u0623\u0646 \u064A\u0643\u0648\u0646 ").concat(c," ").concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "'.concat(r.prefix,'"'):c.format==="ends_with"?'\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "'.concat(c.suffix,'"'):c.format==="includes"?'\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "'.concat(c.includes,'"'):c.format==="regex"?"\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ".concat(c.pattern):"".concat((l=i[c.format])!=null?l:r.format," \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644")}case"not_multiple_of":return"\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ".concat(r.divisor);case"unrecognized_keys":return"\u0645\u0639\u0631\u0641".concat(r.keys.length>1?"\u0627\u062A":""," \u063A\u0631\u064A\u0628").concat(r.keys.length>1?"\u0629":"",": ").concat(C(r.keys,"\u060C "));case"invalid_key":return"\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ".concat(r.origin);case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ".concat(r.origin);default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function Gh(){return{localeError:_R()}}o(Gh,"default");f();var bR=o(()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={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"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ".concat(r.expected,", daxil olan ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ".concat($(r.values[0])):"Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ".concat((s=r.origin)!=null?s:"d\u0259y\u0259r"," ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"element"):"\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ".concat((u=r.origin)!=null?u:"d\u0259y\u0259r"," ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ".concat(r.origin," ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ".concat(r.origin," ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'Yanl\u0131\u015F m\u0259tn: "'.concat(c.prefix,'" il\u0259 ba\u015Flamal\u0131d\u0131r'):c.format==="ends_with"?'Yanl\u0131\u015F m\u0259tn: "'.concat(c.suffix,'" il\u0259 bitm\u0259lidir'):c.format==="includes"?'Yanl\u0131\u015F m\u0259tn: "'.concat(c.includes,'" daxil olmal\u0131d\u0131r'):c.format==="regex"?"Yanl\u0131\u015F m\u0259tn: ".concat(c.pattern," \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r"):"Yanl\u0131\u015F ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"Yanl\u0131\u015F \u0259d\u0259d: ".concat(r.divisor," il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r");case"unrecognized_keys":return"Tan\u0131nmayan a\xE7ar".concat(r.keys.length>1?"lar":"",": ").concat(C(r.keys,", "));case"invalid_key":return"".concat(r.origin," daxilind\u0259 yanl\u0131\u015F a\xE7ar");case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return"".concat(r.origin," daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r");default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function Hh(){return{localeError:bR()}}o(Hh,"default");f();function g0(e,t,n,i){let r=Math.abs(e),s=r%10,a=r%100;return a>=11&&a<=19?i:s===1?t:s>=2&&s<=4?n:i}o(g0,"getBelarusianPlural");var SR=o(()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(r))return"\u043C\u0430\u0441\u0456\u045E";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return r=>{var s,a,u;switch(r.code){case"invalid_type":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ".concat(r.expected,", \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ".concat($(r.values[0])):"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ".concat(C(r.values,"|"));case"too_big":{let l=r.inclusive?"<=":"<",c=t(r.origin);if(c){let d=Number(r.maximum),h=g0(d,c.unit.one,c.unit.few,c.unit.many);return"\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ".concat((s=r.origin)!=null?s:"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"," \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ").concat(c.verb," ").concat(l).concat(r.maximum.toString()," ").concat(h)}return"\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ".concat((a=r.origin)!=null?a:"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"," \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ").concat(l).concat(r.maximum.toString())}case"too_small":{let l=r.inclusive?">=":">",c=t(r.origin);if(c){let d=Number(r.minimum),h=g0(d,c.unit.one,c.unit.few,c.unit.many);return"\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ".concat(r.origin," \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ").concat(c.verb," ").concat(l).concat(r.minimum.toString()," ").concat(h)}return"\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ".concat(r.origin," \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ").concat(l).concat(r.minimum.toString())}case"invalid_format":{let l=r;return l.format==="starts_with"?'\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "'.concat(l.prefix,'"'):l.format==="ends_with"?'\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "'.concat(l.suffix,'"'):l.format==="includes"?'\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "'.concat(l.includes,'"'):l.format==="regex"?"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ".concat(l.pattern):"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ".concat((u=i[l.format])!=null?u:r.format)}case"not_multiple_of":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ".concat(r.divisor);case"unrecognized_keys":return"\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ".concat(r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447",": ").concat(C(r.keys,", "));case"invalid_key":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ".concat(r.origin);case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ".concat(r.origin);default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function Wh(){return{localeError:SR()}}o(Wh,"default");f();var IR=o(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(e))return"\u043C\u0430\u0441\u0438\u0432";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},"parsedType"),wR=o(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(i){var r;return(r=e[i])!=null?r:null}o(t,"getSizing");let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"};return i=>{var r,s,a,u;switch(i.code){case"invalid_type":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ".concat(i.expected,", \u043F\u043E\u043B\u0443\u0447\u0435\u043D ").concat(IR(i.input));case"invalid_value":return i.values.length===1?"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ".concat($(i.values[0])):"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ".concat(C(i.values,"|"));case"too_big":{let l=i.inclusive?"<=":"<",c=t(i.origin);return c?"\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ".concat((r=i.origin)!=null?r:"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"," \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ").concat(l).concat(i.maximum.toString()," ").concat((s=c.unit)!=null?s:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"):"\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ".concat((a=i.origin)!=null?a:"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"," \u0434\u0430 \u0431\u044A\u0434\u0435 ").concat(l).concat(i.maximum.toString())}case"too_small":{let l=i.inclusive?">=":">",c=t(i.origin);return c?"\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ".concat(i.origin," \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ").concat(l).concat(i.minimum.toString()," ").concat(c.unit):"\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ".concat(i.origin," \u0434\u0430 \u0431\u044A\u0434\u0435 ").concat(l).concat(i.minimum.toString())}case"invalid_format":{let l=i;if(l.format==="starts_with")return'\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "'.concat(l.prefix,'"');if(l.format==="ends_with")return'\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "'.concat(l.suffix,'"');if(l.format==="includes")return'\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "'.concat(l.includes,'"');if(l.format==="regex")return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ".concat(l.pattern);let c="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return l.format==="emoji"&&(c="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),l.format==="datetime"&&(c="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),l.format==="date"&&(c="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),l.format==="time"&&(c="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),l.format==="duration"&&(c="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),"".concat(c," ").concat((u=n[l.format])!=null?u:i.format)}case"not_multiple_of":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ".concat(i.divisor);case"unrecognized_keys":return"\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442".concat(i.keys.length>1?"\u0438":""," \u043A\u043B\u044E\u0447").concat(i.keys.length>1?"\u043E\u0432\u0435":"",": ").concat(C(i.keys,", "));case"invalid_key":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ".concat(i.origin);case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ".concat(i.origin);default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}},"error");function Zh(){return{localeError:wR()}}o(Zh,"default");f();var MR=o(()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"entrada",email:"adre\xE7a electr\xF2nica",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\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"Tipus inv\xE0lid: s'esperava ".concat(r.expected,", s'ha rebut ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Valor inv\xE0lid: s'esperava ".concat($(r.values[0])):"Opci\xF3 inv\xE0lida: s'esperava una de ".concat(C(r.values," o "));case"too_big":{let c=r.inclusive?"com a m\xE0xim":"menys de",d=t(r.origin);return d?"Massa gran: s'esperava que ".concat((s=r.origin)!=null?s:"el valor"," contingu\xE9s ").concat(c," ").concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"elements"):"Massa gran: s'esperava que ".concat((u=r.origin)!=null?u:"el valor"," fos ").concat(c," ").concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?"com a m\xEDnim":"m\xE9s de",d=t(r.origin);return d?"Massa petit: s'esperava que ".concat(r.origin," contingu\xE9s ").concat(c," ").concat(r.minimum.toString()," ").concat(d.unit):"Massa petit: s'esperava que ".concat(r.origin," fos ").concat(c," ").concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'Format inv\xE0lid: ha de comen\xE7ar amb "'.concat(c.prefix,'"'):c.format==="ends_with"?"Format inv\xE0lid: ha d'acabar amb \"".concat(c.suffix,'"'):c.format==="includes"?"Format inv\xE0lid: ha d'incloure \"".concat(c.includes,'"'):c.format==="regex"?"Format inv\xE0lid: ha de coincidir amb el patr\xF3 ".concat(c.pattern):"Format inv\xE0lid per a ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ".concat(r.divisor);case"unrecognized_keys":return"Clau".concat(r.keys.length>1?"s":""," no reconeguda").concat(r.keys.length>1?"s":"",": ").concat(C(r.keys,", "));case"invalid_key":return"Clau inv\xE0lida a ".concat(r.origin);case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return"Element inv\xE0lid a ".concat(r.origin);default:return"Entrada inv\xE0lida"}}},"error");function Xh(){return{localeError:MR()}}o(Xh,"default");f();var ER=o(()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(r))return"pole";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 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 \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return r=>{var s,a,u,l,c,d,h;switch(r.code){case"invalid_type":return"Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ".concat(r.expected,", obdr\u017Eeno ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ".concat($(r.values[0])):"Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ".concat(C(r.values,"|"));case"too_big":{let m=r.inclusive?"<=":"<",y=t(r.origin);return y?"Hodnota je p\u0159\xEDli\u0161 velk\xE1: ".concat((s=r.origin)!=null?s:"hodnota"," mus\xED m\xEDt ").concat(m).concat(r.maximum.toString()," ").concat((a=y.unit)!=null?a:"prvk\u016F"):"Hodnota je p\u0159\xEDli\u0161 velk\xE1: ".concat((u=r.origin)!=null?u:"hodnota"," mus\xED b\xFDt ").concat(m).concat(r.maximum.toString())}case"too_small":{let m=r.inclusive?">=":">",y=t(r.origin);return y?"Hodnota je p\u0159\xEDli\u0161 mal\xE1: ".concat((l=r.origin)!=null?l:"hodnota"," mus\xED m\xEDt ").concat(m).concat(r.minimum.toString()," ").concat((c=y.unit)!=null?c:"prvk\u016F"):"Hodnota je p\u0159\xEDli\u0161 mal\xE1: ".concat((d=r.origin)!=null?d:"hodnota"," mus\xED b\xFDt ").concat(m).concat(r.minimum.toString())}case"invalid_format":{let m=r;return m.format==="starts_with"?'Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "'.concat(m.prefix,'"'):m.format==="ends_with"?'Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "'.concat(m.suffix,'"'):m.format==="includes"?'Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "'.concat(m.includes,'"'):m.format==="regex"?"Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ".concat(m.pattern):"Neplatn\xFD form\xE1t ".concat((h=i[m.format])!=null?h:r.format)}case"not_multiple_of":return"Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ".concat(r.divisor);case"unrecognized_keys":return"Nezn\xE1m\xE9 kl\xED\u010De: ".concat(C(r.keys,", "));case"invalid_key":return"Neplatn\xFD kl\xED\u010D v ".concat(r.origin);case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return"Neplatn\xE1 hodnota v ".concat(r.origin);default:return"Neplatn\xFD vstup"}}},"error");function qh(){return{localeError:ER()}}o(qh,"default");f();var TR=o(()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};function n(a){var u;return(u=e[a])!=null?u:null}o(n,"getSizing");function i(a){var u;return(u=t[a])!=null?u:a}o(i,"getTypeName");let r=o(a=>{let u=typeof a;switch(u){case"number":return Number.isNaN(a)?"NaN":"tal";case"object":return Array.isArray(a)?"liste":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype&&a.constructor?a.constructor.name:"objekt"}return u},"parsedType"),s={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\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",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"};return a=>{var u,l;switch(a.code){case"invalid_type":return"Ugyldigt input: forventede ".concat(i(a.expected),", fik ").concat(i(r(a.input)));case"invalid_value":return a.values.length===1?"Ugyldig v\xE6rdi: forventede ".concat($(a.values[0])):"Ugyldigt valg: forventede en af f\xF8lgende ".concat(C(a.values,"|"));case"too_big":{let c=a.inclusive?"<=":"<",d=n(a.origin),h=i(a.origin);return d?"For stor: forventede ".concat(h!=null?h:"value"," ").concat(d.verb," ").concat(c," ").concat(a.maximum.toString()," ").concat((u=d.unit)!=null?u:"elementer"):"For stor: forventede ".concat(h!=null?h:"value"," havde ").concat(c," ").concat(a.maximum.toString())}case"too_small":{let c=a.inclusive?">=":">",d=n(a.origin),h=i(a.origin);return d?"For lille: forventede ".concat(h," ").concat(d.verb," ").concat(c," ").concat(a.minimum.toString()," ").concat(d.unit):"For lille: forventede ".concat(h," havde ").concat(c," ").concat(a.minimum.toString())}case"invalid_format":{let c=a;return c.format==="starts_with"?'Ugyldig streng: skal starte med "'.concat(c.prefix,'"'):c.format==="ends_with"?'Ugyldig streng: skal ende med "'.concat(c.suffix,'"'):c.format==="includes"?'Ugyldig streng: skal indeholde "'.concat(c.includes,'"'):c.format==="regex"?"Ugyldig streng: skal matche m\xF8nsteret ".concat(c.pattern):"Ugyldig ".concat((l=s[c.format])!=null?l:a.format)}case"not_multiple_of":return"Ugyldigt tal: skal v\xE6re deleligt med ".concat(a.divisor);case"unrecognized_keys":return"".concat(a.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle",": ").concat(C(a.keys,", "));case"invalid_key":return"Ugyldig n\xF8gle i ".concat(a.origin);case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return"Ugyldig v\xE6rdi i ".concat(a.origin);default:return"Ugyldigt input"}}},"error");function Kh(){return{localeError:TR()}}o(Kh,"default");f();var AR=o(()=>{let 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(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"Zahl";case"object":{if(Array.isArray(r))return"Array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={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"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"Ung\xFCltige Eingabe: erwartet ".concat(r.expected,", erhalten ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Ung\xFCltige Eingabe: erwartet ".concat($(r.values[0])):"Ung\xFCltige Option: erwartet eine von ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"Zu gro\xDF: erwartet, dass ".concat((s=r.origin)!=null?s:"Wert"," ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"Elemente"," hat"):"Zu gro\xDF: erwartet, dass ".concat((u=r.origin)!=null?u:"Wert"," ").concat(c).concat(r.maximum.toString()," ist")}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"Zu klein: erwartet, dass ".concat(r.origin," ").concat(c).concat(r.minimum.toString()," ").concat(d.unit," hat"):"Zu klein: erwartet, dass ".concat(r.origin," ").concat(c).concat(r.minimum.toString()," ist")}case"invalid_format":{let c=r;return c.format==="starts_with"?'Ung\xFCltiger String: muss mit "'.concat(c.prefix,'" beginnen'):c.format==="ends_with"?'Ung\xFCltiger String: muss mit "'.concat(c.suffix,'" enden'):c.format==="includes"?'Ung\xFCltiger String: muss "'.concat(c.includes,'" enthalten'):c.format==="regex"?"Ung\xFCltiger String: muss dem Muster ".concat(c.pattern," entsprechen"):"Ung\xFCltig: ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"Ung\xFCltige Zahl: muss ein Vielfaches von ".concat(r.divisor," sein");case"unrecognized_keys":return"".concat(r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel",": ").concat(C(r.keys,", "));case"invalid_key":return"Ung\xFCltiger Schl\xFCssel in ".concat(r.origin);case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return"Ung\xFCltiger Wert in ".concat(r.origin);default:return"Ung\xFCltige Eingabe"}}},"error");function Jh(){return{localeError:AR()}}o(Jh,"default");f();var PR=o(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},"parsedType"),RR=o(()=>{let 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"}};function t(i){var r;return(r=e[i])!=null?r:null}o(t,"getSizing");let n={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"};return i=>{var r,s,a,u;switch(i.code){case"invalid_type":return"Invalid input: expected ".concat(i.expected,", received ").concat(PR(i.input));case"invalid_value":return i.values.length===1?"Invalid input: expected ".concat($(i.values[0])):"Invalid option: expected one of ".concat(C(i.values,"|"));case"too_big":{let l=i.inclusive?"<=":"<",c=t(i.origin);return c?"Too big: expected ".concat((r=i.origin)!=null?r:"value"," to have ").concat(l).concat(i.maximum.toString()," ").concat((s=c.unit)!=null?s:"elements"):"Too big: expected ".concat((a=i.origin)!=null?a:"value"," to be ").concat(l).concat(i.maximum.toString())}case"too_small":{let l=i.inclusive?">=":">",c=t(i.origin);return c?"Too small: expected ".concat(i.origin," to have ").concat(l).concat(i.minimum.toString()," ").concat(c.unit):"Too small: expected ".concat(i.origin," to be ").concat(l).concat(i.minimum.toString())}case"invalid_format":{let l=i;return l.format==="starts_with"?'Invalid string: must start with "'.concat(l.prefix,'"'):l.format==="ends_with"?'Invalid string: must end with "'.concat(l.suffix,'"'):l.format==="includes"?'Invalid string: must include "'.concat(l.includes,'"'):l.format==="regex"?"Invalid string: must match pattern ".concat(l.pattern):"Invalid ".concat((u=n[l.format])!=null?u:i.format)}case"not_multiple_of":return"Invalid number: must be a multiple of ".concat(i.divisor);case"unrecognized_keys":return"Unrecognized key".concat(i.keys.length>1?"s":"",": ").concat(C(i.keys,", "));case"invalid_key":return"Invalid key in ".concat(i.origin);case"invalid_union":return"Invalid input";case"invalid_element":return"Invalid value in ".concat(i.origin);default:return"Invalid input"}}},"error");function Ks(){return{localeError:RR()}}o(Ks,"default");f();var CR=o(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},"parsedType"),OR=o(()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){var r;return(r=e[i])!=null?r:null}o(t,"getSizing");let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",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\u016Dro",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"};return i=>{var r,s,a,u;switch(i.code){case"invalid_type":return"Nevalida enigo: atendi\u011Dis ".concat(i.expected,", ricevi\u011Dis ").concat(CR(i.input));case"invalid_value":return i.values.length===1?"Nevalida enigo: atendi\u011Dis ".concat($(i.values[0])):"Nevalida opcio: atendi\u011Dis unu el ".concat(C(i.values,"|"));case"too_big":{let l=i.inclusive?"<=":"<",c=t(i.origin);return c?"Tro granda: atendi\u011Dis ke ".concat((r=i.origin)!=null?r:"valoro"," havu ").concat(l).concat(i.maximum.toString()," ").concat((s=c.unit)!=null?s:"elementojn"):"Tro granda: atendi\u011Dis ke ".concat((a=i.origin)!=null?a:"valoro"," havu ").concat(l).concat(i.maximum.toString())}case"too_small":{let l=i.inclusive?">=":">",c=t(i.origin);return c?"Tro malgranda: atendi\u011Dis ke ".concat(i.origin," havu ").concat(l).concat(i.minimum.toString()," ").concat(c.unit):"Tro malgranda: atendi\u011Dis ke ".concat(i.origin," estu ").concat(l).concat(i.minimum.toString())}case"invalid_format":{let l=i;return l.format==="starts_with"?'Nevalida karaktraro: devas komenci\u011Di per "'.concat(l.prefix,'"'):l.format==="ends_with"?'Nevalida karaktraro: devas fini\u011Di per "'.concat(l.suffix,'"'):l.format==="includes"?'Nevalida karaktraro: devas inkluzivi "'.concat(l.includes,'"'):l.format==="regex"?"Nevalida karaktraro: devas kongrui kun la modelo ".concat(l.pattern):"Nevalida ".concat((u=n[l.format])!=null?u:i.format)}case"not_multiple_of":return"Nevalida nombro: devas esti oblo de ".concat(i.divisor);case"unrecognized_keys":return"Nekonata".concat(i.keys.length>1?"j":""," \u015Dlosilo").concat(i.keys.length>1?"j":"",": ").concat(C(i.keys,", "));case"invalid_key":return"Nevalida \u015Dlosilo en ".concat(i.origin);case"invalid_union":return"Nevalida enigo";case"invalid_element":return"Nevalida valoro en ".concat(i.origin);default:return"Nevalida enigo"}}},"error");function Yh(){return{localeError:OR()}}o(Yh,"default");f();var UR=o(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function n(a){var u;return(u=e[a])!=null?u:null}o(n,"getSizing");function i(a){var u;return(u=t[a])!=null?u:a}o(i,"getTypeName");let r=o(a=>{let u=typeof a;switch(u){case"number":return Number.isNaN(a)?"NaN":"number";case"object":return Array.isArray(a)?"array":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype?a.constructor.name:"object"}return u},"parsedType"),s={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return a=>{var u,l;switch(a.code){case"invalid_type":return"Entrada inv\xE1lida: se esperaba ".concat(i(a.expected),", recibido ").concat(i(r(a.input)));case"invalid_value":return a.values.length===1?"Entrada inv\xE1lida: se esperaba ".concat($(a.values[0])):"Opci\xF3n inv\xE1lida: se esperaba una de ".concat(C(a.values,"|"));case"too_big":{let c=a.inclusive?"<=":"<",d=n(a.origin),h=i(a.origin);return d?"Demasiado grande: se esperaba que ".concat(h!=null?h:"valor"," tuviera ").concat(c).concat(a.maximum.toString()," ").concat((u=d.unit)!=null?u:"elementos"):"Demasiado grande: se esperaba que ".concat(h!=null?h:"valor"," fuera ").concat(c).concat(a.maximum.toString())}case"too_small":{let c=a.inclusive?">=":">",d=n(a.origin),h=i(a.origin);return d?"Demasiado peque\xF1o: se esperaba que ".concat(h," tuviera ").concat(c).concat(a.minimum.toString()," ").concat(d.unit):"Demasiado peque\xF1o: se esperaba que ".concat(h," fuera ").concat(c).concat(a.minimum.toString())}case"invalid_format":{let c=a;return c.format==="starts_with"?'Cadena inv\xE1lida: debe comenzar con "'.concat(c.prefix,'"'):c.format==="ends_with"?'Cadena inv\xE1lida: debe terminar en "'.concat(c.suffix,'"'):c.format==="includes"?'Cadena inv\xE1lida: debe incluir "'.concat(c.includes,'"'):c.format==="regex"?"Cadena inv\xE1lida: debe coincidir con el patr\xF3n ".concat(c.pattern):"Inv\xE1lido ".concat((l=s[c.format])!=null?l:a.format)}case"not_multiple_of":return"N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ".concat(a.divisor);case"unrecognized_keys":return"Llave".concat(a.keys.length>1?"s":""," desconocida").concat(a.keys.length>1?"s":"",": ").concat(C(a.keys,", "));case"invalid_key":return"Llave inv\xE1lida en ".concat(i(a.origin));case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return"Valor inv\xE1lido en ".concat(i(a.origin));default:return"Entrada inv\xE1lida"}}},"error");function Qh(){return{localeError:UR()}}o(Qh,"default");f();var NR=o(()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(r))return"\u0622\u0631\u0627\u06CC\u0647";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ".concat(r.expected," \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ").concat(n(r.input)," \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F");case"invalid_value":return r.values.length===1?"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ".concat($(r.values[0])," \u0645\u06CC\u200C\u0628\u0648\u062F"):"\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ".concat(C(r.values,"|")," \u0645\u06CC\u200C\u0628\u0648\u062F");case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ".concat((s=r.origin)!=null?s:"\u0645\u0642\u062F\u0627\u0631"," \u0628\u0627\u06CC\u062F ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"\u0639\u0646\u0635\u0631"," \u0628\u0627\u0634\u062F"):"\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ".concat((u=r.origin)!=null?u:"\u0645\u0642\u062F\u0627\u0631"," \u0628\u0627\u06CC\u062F ").concat(c).concat(r.maximum.toString()," \u0628\u0627\u0634\u062F")}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ".concat(r.origin," \u0628\u0627\u06CC\u062F ").concat(c).concat(r.minimum.toString()," ").concat(d.unit," \u0628\u0627\u0634\u062F"):"\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ".concat(r.origin," \u0628\u0627\u06CC\u062F ").concat(c).concat(r.minimum.toString()," \u0628\u0627\u0634\u062F")}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "'.concat(c.prefix,'" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F'):c.format==="ends_with"?'\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "'.concat(c.suffix,'" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F'):c.format==="includes"?'\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "'.concat(c.includes,'" \u0628\u0627\u0634\u062F'):c.format==="regex"?"\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ".concat(c.pattern," \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"):"".concat((l=i[c.format])!=null?l:r.format," \u0646\u0627\u0645\u0639\u062A\u0628\u0631")}case"not_multiple_of":return"\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ".concat(r.divisor," \u0628\u0627\u0634\u062F");case"unrecognized_keys":return"\u06A9\u0644\u06CC\u062F".concat(r.keys.length>1?"\u0647\u0627\u06CC":""," \u0646\u0627\u0634\u0646\u0627\u0633: ").concat(C(r.keys,", "));case"invalid_key":return"\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ".concat(r.origin);case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return"\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ".concat(r.origin);default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function em(){return{localeError:NR()}}o(em,"default");f();var FR=o(()=>{let e={string:{unit:"merkki\xE4",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\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",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\xE4iv\xE4m\xE4\xE4r\xE4",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"};return r=>{var s;switch(r.code){case"invalid_type":return"Virheellinen tyyppi: odotettiin ".concat(r.expected,", oli ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Virheellinen sy\xF6te: t\xE4ytyy olla ".concat($(r.values[0])):"Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ".concat(C(r.values,"|"));case"too_big":{let a=r.inclusive?"<=":"<",u=t(r.origin);return u?"Liian suuri: ".concat(u.subject," t\xE4ytyy olla ").concat(a).concat(r.maximum.toString()," ").concat(u.unit).trim():"Liian suuri: arvon t\xE4ytyy olla ".concat(a).concat(r.maximum.toString())}case"too_small":{let a=r.inclusive?">=":">",u=t(r.origin);return u?"Liian pieni: ".concat(u.subject," t\xE4ytyy olla ").concat(a).concat(r.minimum.toString()," ").concat(u.unit).trim():"Liian pieni: arvon t\xE4ytyy olla ".concat(a).concat(r.minimum.toString())}case"invalid_format":{let a=r;return a.format==="starts_with"?'Virheellinen sy\xF6te: t\xE4ytyy alkaa "'.concat(a.prefix,'"'):a.format==="ends_with"?'Virheellinen sy\xF6te: t\xE4ytyy loppua "'.concat(a.suffix,'"'):a.format==="includes"?'Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "'.concat(a.includes,'"'):a.format==="regex"?"Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ".concat(a.pattern):"Virheellinen ".concat((s=i[a.format])!=null?s:r.format)}case"not_multiple_of":return"Virheellinen luku: t\xE4ytyy olla luvun ".concat(r.divisor," monikerta");case"unrecognized_keys":return"".concat(r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain",": ").concat(C(r.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\xF6te"}}},"error");function tm(){return{localeError:FR()}}o(tm,"default");f();var kR=o(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"nombre";case"object":{if(Array.isArray(r))return"tableau";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"Entr\xE9e invalide : ".concat(r.expected," attendu, ").concat(n(r.input)," re\xE7u");case"invalid_value":return r.values.length===1?"Entr\xE9e invalide : ".concat($(r.values[0])," attendu"):"Option invalide : une valeur parmi ".concat(C(r.values,"|")," attendue");case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"Trop grand : ".concat((s=r.origin)!=null?s:"valeur"," doit ").concat(d.verb," ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"\xE9l\xE9ment(s)"):"Trop grand : ".concat((u=r.origin)!=null?u:"valeur"," doit \xEAtre ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"Trop petit : ".concat(r.origin," doit ").concat(d.verb," ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"Trop petit : ".concat(r.origin," doit \xEAtre ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'Cha\xEEne invalide : doit commencer par "'.concat(c.prefix,'"'):c.format==="ends_with"?'Cha\xEEne invalide : doit se terminer par "'.concat(c.suffix,'"'):c.format==="includes"?'Cha\xEEne invalide : doit inclure "'.concat(c.includes,'"'):c.format==="regex"?"Cha\xEEne invalide : doit correspondre au mod\xE8le ".concat(c.pattern):"".concat((l=i[c.format])!=null?l:r.format," invalide")}case"not_multiple_of":return"Nombre invalide : doit \xEAtre un multiple de ".concat(r.divisor);case"unrecognized_keys":return"Cl\xE9".concat(r.keys.length>1?"s":""," non reconnue").concat(r.keys.length>1?"s":""," : ").concat(C(r.keys,", "));case"invalid_key":return"Cl\xE9 invalide dans ".concat(r.origin);case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return"Valeur invalide dans ".concat(r.origin);default:return"Entr\xE9e invalide"}}},"error");function nm(){return{localeError:kR()}}o(nm,"default");f();var DR=o(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return r=>{var s,a,u;switch(r.code){case"invalid_type":return"Entr\xE9e invalide : attendu ".concat(r.expected,", re\xE7u ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Entr\xE9e invalide : attendu ".concat($(r.values[0])):"Option invalide : attendu l'une des valeurs suivantes ".concat(C(r.values,"|"));case"too_big":{let l=r.inclusive?"\u2264":"<",c=t(r.origin);return c?"Trop grand : attendu que ".concat((s=r.origin)!=null?s:"la valeur"," ait ").concat(l).concat(r.maximum.toString()," ").concat(c.unit):"Trop grand : attendu que ".concat((a=r.origin)!=null?a:"la valeur"," soit ").concat(l).concat(r.maximum.toString())}case"too_small":{let l=r.inclusive?"\u2265":">",c=t(r.origin);return c?"Trop petit : attendu que ".concat(r.origin," ait ").concat(l).concat(r.minimum.toString()," ").concat(c.unit):"Trop petit : attendu que ".concat(r.origin," soit ").concat(l).concat(r.minimum.toString())}case"invalid_format":{let l=r;return l.format==="starts_with"?'Cha\xEEne invalide : doit commencer par "'.concat(l.prefix,'"'):l.format==="ends_with"?'Cha\xEEne invalide : doit se terminer par "'.concat(l.suffix,'"'):l.format==="includes"?'Cha\xEEne invalide : doit inclure "'.concat(l.includes,'"'):l.format==="regex"?"Cha\xEEne invalide : doit correspondre au motif ".concat(l.pattern):"".concat((u=i[l.format])!=null?u:r.format," invalide")}case"not_multiple_of":return"Nombre invalide : doit \xEAtre un multiple de ".concat(r.divisor);case"unrecognized_keys":return"Cl\xE9".concat(r.keys.length>1?"s":""," non reconnue").concat(r.keys.length>1?"s":""," : ").concat(C(r.keys,", "));case"invalid_key":return"Cl\xE9 invalide dans ".concat(r.origin);case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return"Valeur invalide dans ".concat(r.origin);default:return"Entr\xE9e invalide"}}},"error");function rm(){return{localeError:DR()}}o(rm,"default");f();var LR=o(()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ".concat(r.expected,", \u05D4\u05EA\u05E7\u05D1\u05DC ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ".concat($(r.values[0])):"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ".concat((s=r.origin)!=null?s:"value"," \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"elements"):"\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ".concat((u=r.origin)!=null?u:"value"," \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ".concat(r.origin," \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ".concat(r.origin," \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"'.concat(c.prefix,'"'):c.format==="ends_with"?'\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "'.concat(c.suffix,'"'):c.format==="includes"?'\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "'.concat(c.includes,'"'):c.format==="regex"?"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ".concat(c.pattern):"".concat((l=i[c.format])!=null?l:r.format," \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF")}case"not_multiple_of":return"\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ".concat(r.divisor);case"unrecognized_keys":return"\u05DE\u05E4\u05EA\u05D7".concat(r.keys.length>1?"\u05D5\u05EA":""," \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4").concat(r.keys.length>1?"\u05D9\u05DD":"\u05D4",": ").concat(C(r.keys,", "));case"invalid_key":return"\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1".concat(r.origin);case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1".concat(r.origin);default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function im(){return{localeError:LR()}}o(im,"default");f();var $R=o(()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(r))return"t\xF6mb";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"bemenet",email:"email c\xEDm",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\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ".concat(r.expected,", a kapott \xE9rt\xE9k ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ".concat($(r.values[0])):"\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"T\xFAl nagy: ".concat((s=r.origin)!=null?s:"\xE9rt\xE9k"," m\xE9rete t\xFAl nagy ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"elem"):"T\xFAl nagy: a bemeneti \xE9rt\xE9k ".concat((u=r.origin)!=null?u:"\xE9rt\xE9k"," t\xFAl nagy: ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"T\xFAl kicsi: a bemeneti \xE9rt\xE9k ".concat(r.origin," m\xE9rete t\xFAl kicsi ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"T\xFAl kicsi: a bemeneti \xE9rt\xE9k ".concat(r.origin," t\xFAl kicsi ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'\xC9rv\xE9nytelen string: "'.concat(c.prefix,'" \xE9rt\xE9kkel kell kezd\u0151dnie'):c.format==="ends_with"?'\xC9rv\xE9nytelen string: "'.concat(c.suffix,'" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie'):c.format==="includes"?'\xC9rv\xE9nytelen string: "'.concat(c.includes,'" \xE9rt\xE9ket kell tartalmaznia'):c.format==="regex"?"\xC9rv\xE9nytelen string: ".concat(c.pattern," mint\xE1nak kell megfelelnie"):"\xC9rv\xE9nytelen ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"\xC9rv\xE9nytelen sz\xE1m: ".concat(r.divisor," t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie");case"unrecognized_keys":return"Ismeretlen kulcs".concat(r.keys.length>1?"s":"",": ").concat(C(r.keys,", "));case"invalid_key":return"\xC9rv\xE9nytelen kulcs ".concat(r.origin);case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return"\xC9rv\xE9nytelen \xE9rt\xE9k: ".concat(r.origin);default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function om(){return{localeError:$R()}}o(om,"default");f();var zR=o(()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={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"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"Input tidak valid: diharapkan ".concat(r.expected,", diterima ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Input tidak valid: diharapkan ".concat($(r.values[0])):"Pilihan tidak valid: diharapkan salah satu dari ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"Terlalu besar: diharapkan ".concat((s=r.origin)!=null?s:"value"," memiliki ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"elemen"):"Terlalu besar: diharapkan ".concat((u=r.origin)!=null?u:"value"," menjadi ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"Terlalu kecil: diharapkan ".concat(r.origin," memiliki ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"Terlalu kecil: diharapkan ".concat(r.origin," menjadi ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'String tidak valid: harus dimulai dengan "'.concat(c.prefix,'"'):c.format==="ends_with"?'String tidak valid: harus berakhir dengan "'.concat(c.suffix,'"'):c.format==="includes"?'String tidak valid: harus menyertakan "'.concat(c.includes,'"'):c.format==="regex"?"String tidak valid: harus sesuai pola ".concat(c.pattern):"".concat((l=i[c.format])!=null?l:r.format," tidak valid")}case"not_multiple_of":return"Angka tidak valid: harus kelipatan dari ".concat(r.divisor);case"unrecognized_keys":return"Kunci tidak dikenali ".concat(r.keys.length>1?"s":"",": ").concat(C(r.keys,", "));case"invalid_key":return"Kunci tidak valid di ".concat(r.origin);case"invalid_union":return"Input tidak valid";case"invalid_element":return"Nilai tidak valid di ".concat(r.origin);default:return"Input tidak valid"}}},"error");function sm(){return{localeError:zR()}}o(sm,"default");f();var BR=o(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"n\xFAmer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},"parsedType"),VR=o(()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(i){var r;return(r=e[i])!=null?r:null}o(t,"getSizing");let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",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\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",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\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return i=>{var r,s,a,u;switch(i.code){case"invalid_type":return"Rangt gildi: \xDE\xFA sl\xF3st inn ".concat(BR(i.input)," \xFEar sem \xE1 a\xF0 vera ").concat(i.expected);case"invalid_value":return i.values.length===1?"Rangt gildi: gert r\xE1\xF0 fyrir ".concat($(i.values[0])):"\xD3gilt val: m\xE1 vera eitt af eftirfarandi ".concat(C(i.values,"|"));case"too_big":{let l=i.inclusive?"<=":"<",c=t(i.origin);return c?"Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ".concat((r=i.origin)!=null?r:"gildi"," hafi ").concat(l).concat(i.maximum.toString()," ").concat((s=c.unit)!=null?s:"hluti"):"Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ".concat((a=i.origin)!=null?a:"gildi"," s\xE9 ").concat(l).concat(i.maximum.toString())}case"too_small":{let l=i.inclusive?">=":">",c=t(i.origin);return c?"Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ".concat(i.origin," hafi ").concat(l).concat(i.minimum.toString()," ").concat(c.unit):"Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ".concat(i.origin," s\xE9 ").concat(l).concat(i.minimum.toString())}case"invalid_format":{let l=i;return l.format==="starts_with"?'\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "'.concat(l.prefix,'"'):l.format==="ends_with"?'\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "'.concat(l.suffix,'"'):l.format==="includes"?'\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "'.concat(l.includes,'"'):l.format==="regex"?"\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ".concat(l.pattern):"Rangt ".concat((u=n[l.format])!=null?u:i.format)}case"not_multiple_of":return"R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ".concat(i.divisor);case"unrecognized_keys":return"\xD3\xFEekkt ".concat(i.keys.length>1?"ir lyklar":"ur lykill",": ").concat(C(i.keys,", "));case"invalid_key":return"Rangur lykill \xED ".concat(i.origin);case"invalid_union":return"Rangt gildi";case"invalid_element":return"Rangt gildi \xED ".concat(i.origin);default:return"Rangt gildi"}}},"error");function am(){return{localeError:VR()}}o(am,"default");f();var jR=o(()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"numero";case"object":{if(Array.isArray(r))return"vettore";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={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"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"Input non valido: atteso ".concat(r.expected,", ricevuto ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Input non valido: atteso ".concat($(r.values[0])):"Opzione non valida: atteso uno tra ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"Troppo grande: ".concat((s=r.origin)!=null?s:"valore"," deve avere ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"elementi"):"Troppo grande: ".concat((u=r.origin)!=null?u:"valore"," deve essere ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"Troppo piccolo: ".concat(r.origin," deve avere ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"Troppo piccolo: ".concat(r.origin," deve essere ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'Stringa non valida: deve iniziare con "'.concat(c.prefix,'"'):c.format==="ends_with"?'Stringa non valida: deve terminare con "'.concat(c.suffix,'"'):c.format==="includes"?'Stringa non valida: deve includere "'.concat(c.includes,'"'):c.format==="regex"?"Stringa non valida: deve corrispondere al pattern ".concat(c.pattern):"Invalid ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"Numero non valido: deve essere un multiplo di ".concat(r.divisor);case"unrecognized_keys":return"Chiav".concat(r.keys.length>1?"i":"e"," non riconosciut").concat(r.keys.length>1?"e":"a",": ").concat(C(r.keys,", "));case"invalid_key":return"Chiave non valida in ".concat(r.origin);case"invalid_union":return"Input non valido";case"invalid_element":return"Valore non valido in ".concat(r.origin);default:return"Input non valido"}}},"error");function cm(){return{localeError:jR()}}o(cm,"default");f();var GR=o(()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(r))return"\u914D\u5217";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u7121\u52B9\u306A\u5165\u529B: ".concat(r.expected,"\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001").concat(n(r.input),"\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F");case"invalid_value":return r.values.length===1?"\u7121\u52B9\u306A\u5165\u529B: ".concat($(r.values[0]),"\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F"):"\u7121\u52B9\u306A\u9078\u629E: ".concat(C(r.values,"\u3001"),"\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059");case"too_big":{let c=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",d=t(r.origin);return d?"\u5927\u304D\u3059\u304E\u308B\u5024: ".concat((s=r.origin)!=null?s:"\u5024","\u306F").concat(r.maximum.toString()).concat((a=d.unit)!=null?a:"\u8981\u7D20").concat(c,"\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"):"\u5927\u304D\u3059\u304E\u308B\u5024: ".concat((u=r.origin)!=null?u:"\u5024","\u306F").concat(r.maximum.toString()).concat(c,"\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059")}case"too_small":{let c=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",d=t(r.origin);return d?"\u5C0F\u3055\u3059\u304E\u308B\u5024: ".concat(r.origin,"\u306F").concat(r.minimum.toString()).concat(d.unit).concat(c,"\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"):"\u5C0F\u3055\u3059\u304E\u308B\u5024: ".concat(r.origin,"\u306F").concat(r.minimum.toString()).concat(c,"\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059")}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u7121\u52B9\u306A\u6587\u5B57\u5217: "'.concat(c.prefix,'"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059'):c.format==="ends_with"?'\u7121\u52B9\u306A\u6587\u5B57\u5217: "'.concat(c.suffix,'"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059'):c.format==="includes"?'\u7121\u52B9\u306A\u6587\u5B57\u5217: "'.concat(c.includes,'"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059'):c.format==="regex"?"\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3".concat(c.pattern,"\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"):"\u7121\u52B9\u306A".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"\u7121\u52B9\u306A\u6570\u5024: ".concat(r.divisor,"\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059");case"unrecognized_keys":return"\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC".concat(r.keys.length>1?"\u7FA4":"",": ").concat(C(r.keys,"\u3001"));case"invalid_key":return"".concat(r.origin,"\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC");case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return"".concat(r.origin,"\u5185\u306E\u7121\u52B9\u306A\u5024");default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function um(){return{localeError:GR()}}o(um,"default");f();var HR=o(e=>{var i;let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8";case"object":{if(Array.isArray(e))return"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return(i={string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0"}[t])!=null?i:t},"parsedType"),WR=o(()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(i){var r;return(r=e[i])!=null?r:null}o(t,"getSizing");let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"};return i=>{var r,s,a;switch(i.code){case"invalid_type":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ".concat(i.expected,", \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ").concat(HR(i.input));case"invalid_value":return i.values.length===1?"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ".concat($(i.values[0])):"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ".concat(C(i.values,"|"),"-\u10D3\u10D0\u10DC");case"too_big":{let u=i.inclusive?"<=":"<",l=t(i.origin);return l?"\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ".concat((r=i.origin)!=null?r:"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"," ").concat(l.verb," ").concat(u).concat(i.maximum.toString()," ").concat(l.unit):"\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ".concat((s=i.origin)!=null?s:"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"," \u10D8\u10E7\u10DD\u10E1 ").concat(u).concat(i.maximum.toString())}case"too_small":{let u=i.inclusive?">=":">",l=t(i.origin);return l?"\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ".concat(i.origin," ").concat(l.verb," ").concat(u).concat(i.minimum.toString()," ").concat(l.unit):"\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ".concat(i.origin," \u10D8\u10E7\u10DD\u10E1 ").concat(u).concat(i.minimum.toString())}case"invalid_format":{let u=i;return u.format==="starts_with"?'\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "'.concat(u.prefix,'"-\u10D8\u10D7'):u.format==="ends_with"?'\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "'.concat(u.suffix,'"-\u10D8\u10D7'):u.format==="includes"?'\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "'.concat(u.includes,'"-\u10E1'):u.format==="regex"?"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ".concat(u.pattern):"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ".concat((a=n[u.format])!=null?a:i.format)}case"not_multiple_of":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ".concat(i.divisor,"-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8");case"unrecognized_keys":return"\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1".concat(i.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8",": ").concat(C(i.keys,", "));case"invalid_key":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ".concat(i.origin,"-\u10E8\u10D8");case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ".concat(i.origin,"-\u10E8\u10D8");default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}},"error");function lm(){return{localeError:WR()}}o(lm,"default");f();f();var ZR=o(()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(r))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(r===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ".concat(r.expected," \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ".concat($(r.values[0])):"\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ".concat((s=r.origin)!=null?s:"\u178F\u1798\u17D2\u179B\u17C3"," ").concat(c," ").concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"\u1792\u17B6\u178F\u17BB"):"\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ".concat((u=r.origin)!=null?u:"\u178F\u1798\u17D2\u179B\u17C3"," ").concat(c," ").concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ".concat(r.origin," ").concat(c," ").concat(r.minimum.toString()," ").concat(d.unit):"\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ".concat(r.origin," ").concat(c," ").concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "'.concat(c.prefix,'"'):c.format==="ends_with"?'\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "'.concat(c.suffix,'"'):c.format==="includes"?'\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "'.concat(c.includes,'"'):c.format==="regex"?"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ".concat(c.pattern):"\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ".concat(r.divisor);case"unrecognized_keys":return"\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ".concat(C(r.keys,", "));case"invalid_key":return"\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ".concat(r.origin);case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ".concat(r.origin);default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function Js(){return{localeError:ZR()}}o(Js,"default");function fm(){return Js()}o(fm,"default");f();var XR=o(()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return r=>{var s,a,u,l,c,d,h;switch(r.code){case"invalid_type":return"\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ".concat(r.expected,", \uBC1B\uC740 \uD0C0\uC785\uC740 ").concat(n(r.input),"\uC785\uB2C8\uB2E4");case"invalid_value":return r.values.length===1?"\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ".concat($(r.values[0])," \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4"):"\uC798\uBABB\uB41C \uC635\uC158: ".concat(C(r.values,"\uB610\uB294 ")," \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4");case"too_big":{let m=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",y=m==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",v=t(r.origin),I=(s=v==null?void 0:v.unit)!=null?s:"\uC694\uC18C";return v?"".concat((a=r.origin)!=null?a:"\uAC12","\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ").concat(r.maximum.toString()).concat(I," ").concat(m).concat(y):"".concat((u=r.origin)!=null?u:"\uAC12","\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ").concat(r.maximum.toString()," ").concat(m).concat(y)}case"too_small":{let m=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",y=m==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",v=t(r.origin),I=(l=v==null?void 0:v.unit)!=null?l:"\uC694\uC18C";return v?"".concat((c=r.origin)!=null?c:"\uAC12","\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ").concat(r.minimum.toString()).concat(I," ").concat(m).concat(y):"".concat((d=r.origin)!=null?d:"\uAC12","\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ").concat(r.minimum.toString()," ").concat(m).concat(y)}case"invalid_format":{let m=r;return m.format==="starts_with"?'\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "'.concat(m.prefix,'"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4'):m.format==="ends_with"?'\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "'.concat(m.suffix,'"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4'):m.format==="includes"?'\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "'.concat(m.includes,'"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4'):m.format==="regex"?"\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ".concat(m.pattern," \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4"):"\uC798\uBABB\uB41C ".concat((h=i[m.format])!=null?h:r.format)}case"not_multiple_of":return"\uC798\uBABB\uB41C \uC22B\uC790: ".concat(r.divisor,"\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4");case"unrecognized_keys":return"\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ".concat(C(r.keys,", "));case"invalid_key":return"\uC798\uBABB\uB41C \uD0A4: ".concat(r.origin);case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return"\uC798\uBABB\uB41C \uAC12: ".concat(r.origin);default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function dm(){return{localeError:XR()}}o(dm,"default");f();var qR=o(e=>Qs(typeof e,e),"parsedType"),Qs=o((e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skai\u010Dius";case"bigint":return"sveikasis skai\u010Dius";case"string":return"eilut\u0117";case"boolean":return"login\u0117 reik\u0161m\u0117";case"undefined":case"void":return"neapibr\u0117\u017Eta reik\u0161m\u0117";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return t===void 0?"ne\u017Einomas objektas":t===null?"nulin\u0117 reik\u0161m\u0117":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulin\u0117 reik\u0161m\u0117"}return e},"parsedTypeFromType"),Ys=o(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function y0(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}o(y0,"getUnitTypeFromNumber");var KR=o(()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(i,r,s,a){var l;let u=(l=e[i])!=null?l:null;return u===null?u:{unit:u.unit[r],verb:u.verb[a][s?"inclusive":"notInclusive"]}}o(t,"getSizing");let n={regex:"\u012Fvestis",email:"el. pa\u0161to 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\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"};return i=>{var r,s,a,u,l,c,d,h,m,y;switch(i.code){case"invalid_type":return"Gautas tipas ".concat(qR(i.input),", o tik\u0117tasi - ").concat(Qs(i.expected));case"invalid_value":return i.values.length===1?"Privalo b\u016Bti ".concat($(i.values[0])):"Privalo b\u016Bti vienas i\u0161 ".concat(C(i.values,"|")," pasirinkim\u0173");case"too_big":{let v=Qs(i.origin),I=t(i.origin,y0(Number(i.maximum)),(r=i.inclusive)!=null?r:!1,"smaller");if(I!=null&&I.verb)return"".concat(Ys((s=v!=null?v:i.origin)!=null?s:"reik\u0161m\u0117")," ").concat(I.verb," ").concat(i.maximum.toString()," ").concat((a=I.unit)!=null?a:"element\u0173");let T=i.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return"".concat(Ys((u=v!=null?v:i.origin)!=null?u:"reik\u0161m\u0117")," turi b\u016Bti ").concat(T," ").concat(i.maximum.toString()," ").concat(I==null?void 0:I.unit)}case"too_small":{let v=Qs(i.origin),I=t(i.origin,y0(Number(i.minimum)),(l=i.inclusive)!=null?l:!1,"bigger");if(I!=null&&I.verb)return"".concat(Ys((c=v!=null?v:i.origin)!=null?c:"reik\u0161m\u0117")," ").concat(I.verb," ").concat(i.minimum.toString()," ").concat((d=I.unit)!=null?d:"element\u0173");let T=i.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return"".concat(Ys((h=v!=null?v:i.origin)!=null?h:"reik\u0161m\u0117")," turi b\u016Bti ").concat(T," ").concat(i.minimum.toString()," ").concat(I==null?void 0:I.unit)}case"invalid_format":{let v=i;return v.format==="starts_with"?'Eilut\u0117 privalo prasid\u0117ti "'.concat(v.prefix,'"'):v.format==="ends_with"?'Eilut\u0117 privalo pasibaigti "'.concat(v.suffix,'"'):v.format==="includes"?'Eilut\u0117 privalo \u012Ftraukti "'.concat(v.includes,'"'):v.format==="regex"?"Eilut\u0117 privalo atitikti ".concat(v.pattern):"Neteisingas ".concat((m=n[v.format])!=null?m:i.format)}case"not_multiple_of":return"Skai\u010Dius privalo b\u016Bti ".concat(i.divisor," kartotinis.");case"unrecognized_keys":return"Neatpa\u017Eint".concat(i.keys.length>1?"i":"as"," rakt").concat(i.keys.length>1?"ai":"as",": ").concat(C(i.keys,", "));case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let v=Qs(i.origin);return"".concat(Ys((y=v!=null?v:i.origin)!=null?y:"reik\u0161m\u0117")," turi klaiding\u0105 \u012Fvest\u012F")}default:return"Klaidinga \u012Fvestis"}}},"error");function pm(){return{localeError:KR()}}o(pm,"default");f();var JR=o(()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(r))return"\u043D\u0438\u0437\u0430";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ".concat(r.expected,", \u043F\u0440\u0438\u043C\u0435\u043D\u043E ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Invalid input: expected ".concat($(r.values[0])):"\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ".concat((s=r.origin)!=null?s:"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"," \u0434\u0430 \u0438\u043C\u0430 ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"):"\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ".concat((u=r.origin)!=null?u:"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"," \u0434\u0430 \u0431\u0438\u0434\u0435 ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ".concat(r.origin," \u0434\u0430 \u0438\u043C\u0430 ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ".concat(r.origin," \u0434\u0430 \u0431\u0438\u0434\u0435 ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "'.concat(c.prefix,'"'):c.format==="ends_with"?'\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "'.concat(c.suffix,'"'):c.format==="includes"?'\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "'.concat(c.includes,'"'):c.format==="regex"?"\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ".concat(c.pattern):"Invalid ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ".concat(r.divisor);case"unrecognized_keys":return"".concat(r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447",": ").concat(C(r.keys,", "));case"invalid_key":return"\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ".concat(r.origin);case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return"\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ".concat(r.origin);default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function hm(){return{localeError:JR()}}o(hm,"default");f();var YR=o(()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"nombor";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={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"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"Input tidak sah: dijangka ".concat(r.expected,", diterima ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Input tidak sah: dijangka ".concat($(r.values[0])):"Pilihan tidak sah: dijangka salah satu daripada ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"Terlalu besar: dijangka ".concat((s=r.origin)!=null?s:"nilai"," ").concat(d.verb," ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"elemen"):"Terlalu besar: dijangka ".concat((u=r.origin)!=null?u:"nilai"," adalah ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"Terlalu kecil: dijangka ".concat(r.origin," ").concat(d.verb," ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"Terlalu kecil: dijangka ".concat(r.origin," adalah ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'String tidak sah: mesti bermula dengan "'.concat(c.prefix,'"'):c.format==="ends_with"?'String tidak sah: mesti berakhir dengan "'.concat(c.suffix,'"'):c.format==="includes"?'String tidak sah: mesti mengandungi "'.concat(c.includes,'"'):c.format==="regex"?"String tidak sah: mesti sepadan dengan corak ".concat(c.pattern):"".concat((l=i[c.format])!=null?l:r.format," tidak sah")}case"not_multiple_of":return"Nombor tidak sah: perlu gandaan ".concat(r.divisor);case"unrecognized_keys":return"Kunci tidak dikenali: ".concat(C(r.keys,", "));case"invalid_key":return"Kunci tidak sah dalam ".concat(r.origin);case"invalid_union":return"Input tidak sah";case"invalid_element":return"Nilai tidak sah dalam ".concat(r.origin);default:return"Input tidak sah"}}},"error");function mm(){return{localeError:YR()}}o(mm,"default");f();var QR=o(()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"getal";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={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"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"Ongeldige invoer: verwacht ".concat(r.expected,", ontving ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Ongeldige invoer: verwacht ".concat($(r.values[0])):"Ongeldige optie: verwacht \xE9\xE9n van ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"Te lang: verwacht dat ".concat((s=r.origin)!=null?s:"waarde"," ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"elementen"," bevat"):"Te lang: verwacht dat ".concat((u=r.origin)!=null?u:"waarde"," ").concat(c).concat(r.maximum.toString()," is")}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"Te kort: verwacht dat ".concat(r.origin," ").concat(c).concat(r.minimum.toString()," ").concat(d.unit," bevat"):"Te kort: verwacht dat ".concat(r.origin," ").concat(c).concat(r.minimum.toString()," is")}case"invalid_format":{let c=r;return c.format==="starts_with"?'Ongeldige tekst: moet met "'.concat(c.prefix,'" beginnen'):c.format==="ends_with"?'Ongeldige tekst: moet op "'.concat(c.suffix,'" eindigen'):c.format==="includes"?'Ongeldige tekst: moet "'.concat(c.includes,'" bevatten'):c.format==="regex"?"Ongeldige tekst: moet overeenkomen met patroon ".concat(c.pattern):"Ongeldig: ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"Ongeldig getal: moet een veelvoud van ".concat(r.divisor," zijn");case"unrecognized_keys":return"Onbekende key".concat(r.keys.length>1?"s":"",": ").concat(C(r.keys,", "));case"invalid_key":return"Ongeldige key in ".concat(r.origin);case"invalid_union":return"Ongeldige invoer";case"invalid_element":return"Ongeldige waarde in ".concat(r.origin);default:return"Ongeldige invoer"}}},"error");function gm(){return{localeError:QR()}}o(gm,"default");f();var eC=o(()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"tall";case"object":{if(Array.isArray(r))return"liste";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={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\xE5de",ipv6:"IPv6-omr\xE5de",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"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"Ugyldig input: forventet ".concat(r.expected,", fikk ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Ugyldig verdi: forventet ".concat($(r.values[0])):"Ugyldig valg: forventet en av ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"For stor(t): forventet ".concat((s=r.origin)!=null?s:"value"," til \xE5 ha ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"elementer"):"For stor(t): forventet ".concat((u=r.origin)!=null?u:"value"," til \xE5 ha ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"For lite(n): forventet ".concat(r.origin," til \xE5 ha ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"For lite(n): forventet ".concat(r.origin," til \xE5 ha ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'Ugyldig streng: m\xE5 starte med "'.concat(c.prefix,'"'):c.format==="ends_with"?'Ugyldig streng: m\xE5 ende med "'.concat(c.suffix,'"'):c.format==="includes"?'Ugyldig streng: m\xE5 inneholde "'.concat(c.includes,'"'):c.format==="regex"?"Ugyldig streng: m\xE5 matche m\xF8nsteret ".concat(c.pattern):"Ugyldig ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"Ugyldig tall: m\xE5 v\xE6re et multiplum av ".concat(r.divisor);case"unrecognized_keys":return"".concat(r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel",": ").concat(C(r.keys,", "));case"invalid_key":return"Ugyldig n\xF8kkel i ".concat(r.origin);case"invalid_union":return"Ugyldig input";case"invalid_element":return"Ugyldig verdi i ".concat(r.origin);default:return"Ugyldig input"}}},"error");function ym(){return{localeError:eC()}}o(ym,"default");f();var tC=o(()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"numara";case"object":{if(Array.isArray(r))return"saf";if(r===null)return"gayb";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"giren",email:"epostag\xE2h",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\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"F\xE2sit giren: umulan ".concat(r.expected,", al\u0131nan ").concat(n(r.input));case"invalid_value":return r.values.length===1?"F\xE2sit giren: umulan ".concat($(r.values[0])):"F\xE2sit tercih: m\xFBteberler ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"Fazla b\xFCy\xFCk: ".concat((s=r.origin)!=null?s:"value",", ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"elements"," sahip olmal\u0131yd\u0131."):"Fazla b\xFCy\xFCk: ".concat((u=r.origin)!=null?u:"value",", ").concat(c).concat(r.maximum.toString()," olmal\u0131yd\u0131.")}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"Fazla k\xFC\xE7\xFCk: ".concat(r.origin,", ").concat(c).concat(r.minimum.toString()," ").concat(d.unit," sahip olmal\u0131yd\u0131."):"Fazla k\xFC\xE7\xFCk: ".concat(r.origin,", ").concat(c).concat(r.minimum.toString()," olmal\u0131yd\u0131.")}case"invalid_format":{let c=r;return c.format==="starts_with"?'F\xE2sit metin: "'.concat(c.prefix,'" ile ba\u015Flamal\u0131.'):c.format==="ends_with"?'F\xE2sit metin: "'.concat(c.suffix,'" ile bitmeli.'):c.format==="includes"?'F\xE2sit metin: "'.concat(c.includes,'" ihtiv\xE2 etmeli.'):c.format==="regex"?"F\xE2sit metin: ".concat(c.pattern," nak\u015F\u0131na uymal\u0131."):"F\xE2sit ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"F\xE2sit say\u0131: ".concat(r.divisor," kat\u0131 olmal\u0131yd\u0131.");case"unrecognized_keys":return"Tan\u0131nmayan anahtar ".concat(r.keys.length>1?"s":"",": ").concat(C(r.keys,", "));case"invalid_key":return"".concat(r.origin," i\xE7in tan\u0131nmayan anahtar var.");case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return"".concat(r.origin," i\xE7in tan\u0131nmayan k\u0131ymet var.");default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function xm(){return{localeError:tC()}}o(xm,"default");f();var nC=o(()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(r))return"\u0627\u0631\u06D0";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ".concat(r.expected," \u0648\u0627\u06CC, \u0645\u06AB\u0631 ").concat(n(r.input)," \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648");case"invalid_value":return r.values.length===1?"\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ".concat($(r.values[0])," \u0648\u0627\u06CC"):"\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ".concat(C(r.values,"|")," \u0685\u062E\u0647 \u0648\u0627\u06CC");case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"\u0689\u06CC\u0631 \u0644\u0648\u06CC: ".concat((s=r.origin)!=null?s:"\u0627\u0631\u0632\u069A\u062A"," \u0628\u0627\u06CC\u062F ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"," \u0648\u0644\u0631\u064A"):"\u0689\u06CC\u0631 \u0644\u0648\u06CC: ".concat((u=r.origin)!=null?u:"\u0627\u0631\u0632\u069A\u062A"," \u0628\u0627\u06CC\u062F ").concat(c).concat(r.maximum.toString()," \u0648\u064A")}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ".concat(r.origin," \u0628\u0627\u06CC\u062F ").concat(c).concat(r.minimum.toString()," ").concat(d.unit," \u0648\u0644\u0631\u064A"):"\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ".concat(r.origin," \u0628\u0627\u06CC\u062F ").concat(c).concat(r.minimum.toString()," \u0648\u064A")}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "'.concat(c.prefix,'" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A'):c.format==="ends_with"?'\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "'.concat(c.suffix,'" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A'):c.format==="includes"?'\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "'.concat(c.includes,'" \u0648\u0644\u0631\u064A'):c.format==="regex"?"\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ".concat(c.pattern," \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A"):"".concat((l=i[c.format])!=null?l:r.format," \u0646\u0627\u0633\u0645 \u062F\u06CC")}case"not_multiple_of":return"\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ".concat(r.divisor," \u0645\u0636\u0631\u0628 \u0648\u064A");case"unrecognized_keys":return"\u0646\u0627\u0633\u0645 ".concat(r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689",": ").concat(C(r.keys,", "));case"invalid_key":return"\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ".concat(r.origin," \u06A9\u06D0");case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return"\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ".concat(r.origin," \u06A9\u06D0");default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function vm(){return{localeError:nC()}}o(vm,"default");f();var rC=o(()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"liczba";case"object":{if(Array.isArray(r))return"tablica";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"wyra\u017Cenie",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\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return r=>{var s,a,u,l,c,d,h;switch(r.code){case"invalid_type":return"Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ".concat(r.expected,", otrzymano ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ".concat($(r.values[0])):"Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ".concat(C(r.values,"|"));case"too_big":{let m=r.inclusive?"<=":"<",y=t(r.origin);return y?"Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ".concat((s=r.origin)!=null?s:"warto\u015B\u0107"," b\u0119dzie mie\u0107 ").concat(m).concat(r.maximum.toString()," ").concat((a=y.unit)!=null?a:"element\xF3w"):"Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ".concat((u=r.origin)!=null?u:"warto\u015B\u0107"," b\u0119dzie wynosi\u0107 ").concat(m).concat(r.maximum.toString())}case"too_small":{let m=r.inclusive?">=":">",y=t(r.origin);return y?"Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ".concat((l=r.origin)!=null?l:"warto\u015B\u0107"," b\u0119dzie mie\u0107 ").concat(m).concat(r.minimum.toString()," ").concat((c=y.unit)!=null?c:"element\xF3w"):"Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ".concat((d=r.origin)!=null?d:"warto\u015B\u0107"," b\u0119dzie wynosi\u0107 ").concat(m).concat(r.minimum.toString())}case"invalid_format":{let m=r;return m.format==="starts_with"?'Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "'.concat(m.prefix,'"'):m.format==="ends_with"?'Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "'.concat(m.suffix,'"'):m.format==="includes"?'Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "'.concat(m.includes,'"'):m.format==="regex"?"Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ".concat(m.pattern):"Nieprawid\u0142ow(y/a/e) ".concat((h=i[m.format])!=null?h:r.format)}case"not_multiple_of":return"Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ".concat(r.divisor);case"unrecognized_keys":return"Nierozpoznane klucze".concat(r.keys.length>1?"s":"",": ").concat(C(r.keys,", "));case"invalid_key":return"Nieprawid\u0142owy klucz w ".concat(r.origin);case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return"Nieprawid\u0142owa warto\u015B\u0107 w ".concat(r.origin);default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function _m(){return{localeError:rC()}}o(_m,"default");f();var iC=o(()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(r))return"array";if(r===null)return"nulo";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"padr\xE3o",email:"endere\xE7o 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\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o 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\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"Tipo inv\xE1lido: esperado ".concat(r.expected,", recebido ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Entrada inv\xE1lida: esperado ".concat($(r.values[0])):"Op\xE7\xE3o inv\xE1lida: esperada uma das ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"Muito grande: esperado que ".concat((s=r.origin)!=null?s:"valor"," tivesse ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"elementos"):"Muito grande: esperado que ".concat((u=r.origin)!=null?u:"valor"," fosse ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"Muito pequeno: esperado que ".concat(r.origin," tivesse ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"Muito pequeno: esperado que ".concat(r.origin," fosse ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'Texto inv\xE1lido: deve come\xE7ar com "'.concat(c.prefix,'"'):c.format==="ends_with"?'Texto inv\xE1lido: deve terminar com "'.concat(c.suffix,'"'):c.format==="includes"?'Texto inv\xE1lido: deve incluir "'.concat(c.includes,'"'):c.format==="regex"?"Texto inv\xE1lido: deve corresponder ao padr\xE3o ".concat(c.pattern):"".concat((l=i[c.format])!=null?l:r.format," inv\xE1lido")}case"not_multiple_of":return"N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ".concat(r.divisor);case"unrecognized_keys":return"Chave".concat(r.keys.length>1?"s":""," desconhecida").concat(r.keys.length>1?"s":"",": ").concat(C(r.keys,", "));case"invalid_key":return"Chave inv\xE1lida em ".concat(r.origin);case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return"Valor inv\xE1lido em ".concat(r.origin);default:return"Campo inv\xE1lido"}}},"error");function bm(){return{localeError:iC()}}o(bm,"default");f();function x0(e,t,n,i){let r=Math.abs(e),s=r%10,a=r%100;return a>=11&&a<=19?i:s===1?t:s>=2&&s<=4?n:i}o(x0,"getRussianPlural");var oC=o(()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(r))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return r=>{var s,a,u;switch(r.code){case"invalid_type":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ".concat(r.expected,", \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ".concat($(r.values[0])):"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ".concat(C(r.values,"|"));case"too_big":{let l=r.inclusive?"<=":"<",c=t(r.origin);if(c){let d=Number(r.maximum),h=x0(d,c.unit.one,c.unit.few,c.unit.many);return"\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ".concat((s=r.origin)!=null?s:"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"," \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ").concat(l).concat(r.maximum.toString()," ").concat(h)}return"\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ".concat((a=r.origin)!=null?a:"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"," \u0431\u0443\u0434\u0435\u0442 ").concat(l).concat(r.maximum.toString())}case"too_small":{let l=r.inclusive?">=":">",c=t(r.origin);if(c){let d=Number(r.minimum),h=x0(d,c.unit.one,c.unit.few,c.unit.many);return"\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ".concat(r.origin," \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ").concat(l).concat(r.minimum.toString()," ").concat(h)}return"\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ".concat(r.origin," \u0431\u0443\u0434\u0435\u0442 ").concat(l).concat(r.minimum.toString())}case"invalid_format":{let l=r;return l.format==="starts_with"?'\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "'.concat(l.prefix,'"'):l.format==="ends_with"?'\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "'.concat(l.suffix,'"'):l.format==="includes"?'\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "'.concat(l.includes,'"'):l.format==="regex"?"\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ".concat(l.pattern):"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ".concat((u=i[l.format])!=null?u:r.format)}case"not_multiple_of":return"\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ".concat(r.divisor);case"unrecognized_keys":return"\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D".concat(r.keys.length>1?"\u044B\u0435":"\u044B\u0439"," \u043A\u043B\u044E\u0447").concat(r.keys.length>1?"\u0438":"",": ").concat(C(r.keys,", "));case"invalid_key":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ".concat(r.origin);case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return"\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ".concat(r.origin);default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function Sm(){return{localeError:oC()}}o(Sm,"default");f();var sC=o(()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(r))return"tabela";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"vnos",email:"e-po\u0161tni 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 \u010Das",date:"ISO datum",time:"ISO \u010Das",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 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"Neveljaven vnos: pri\u010Dakovano ".concat(r.expected,", prejeto ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Neveljaven vnos: pri\u010Dakovano ".concat($(r.values[0])):"Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"Preveliko: pri\u010Dakovano, da bo ".concat((s=r.origin)!=null?s:"vrednost"," imelo ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"elementov"):"Preveliko: pri\u010Dakovano, da bo ".concat((u=r.origin)!=null?u:"vrednost"," ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"Premajhno: pri\u010Dakovano, da bo ".concat(r.origin," imelo ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"Premajhno: pri\u010Dakovano, da bo ".concat(r.origin," ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'Neveljaven niz: mora se za\u010Deti z "'.concat(c.prefix,'"'):c.format==="ends_with"?'Neveljaven niz: mora se kon\u010Dati z "'.concat(c.suffix,'"'):c.format==="includes"?'Neveljaven niz: mora vsebovati "'.concat(c.includes,'"'):c.format==="regex"?"Neveljaven niz: mora ustrezati vzorcu ".concat(c.pattern):"Neveljaven ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ".concat(r.divisor);case"unrecognized_keys":return"Neprepoznan".concat(r.keys.length>1?"i klju\u010Di":" klju\u010D",": ").concat(C(r.keys,", "));case"invalid_key":return"Neveljaven klju\u010D v ".concat(r.origin);case"invalid_union":return"Neveljaven vnos";case"invalid_element":return"Neveljavna vrednost v ".concat(r.origin);default:return"Neveljaven vnos"}}},"error");function Im(){return{localeError:sC()}}o(Im,"default");f();var aC=o(()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"antal";case"object":{if(Array.isArray(r))return"lista";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"regulj\xE4rt 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\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return r=>{var s,a,u,l,c,d,h,m;switch(r.code){case"invalid_type":return"Ogiltig inmatning: f\xF6rv\xE4ntat ".concat(r.expected,", fick ").concat(n(r.input));case"invalid_value":return r.values.length===1?"Ogiltig inmatning: f\xF6rv\xE4ntat ".concat($(r.values[0])):"Ogiltigt val: f\xF6rv\xE4ntade en av ".concat(C(r.values,"|"));case"too_big":{let y=r.inclusive?"<=":"<",v=t(r.origin);return v?"F\xF6r stor(t): f\xF6rv\xE4ntade ".concat((s=r.origin)!=null?s:"v\xE4rdet"," att ha ").concat(y).concat(r.maximum.toString()," ").concat((a=v.unit)!=null?a:"element"):"F\xF6r stor(t): f\xF6rv\xE4ntat ".concat((u=r.origin)!=null?u:"v\xE4rdet"," att ha ").concat(y).concat(r.maximum.toString())}case"too_small":{let y=r.inclusive?">=":">",v=t(r.origin);return v?"F\xF6r lite(t): f\xF6rv\xE4ntade ".concat((l=r.origin)!=null?l:"v\xE4rdet"," att ha ").concat(y).concat(r.minimum.toString()," ").concat(v.unit):"F\xF6r lite(t): f\xF6rv\xE4ntade ".concat((c=r.origin)!=null?c:"v\xE4rdet"," att ha ").concat(y).concat(r.minimum.toString())}case"invalid_format":{let y=r;return y.format==="starts_with"?'Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "'.concat(y.prefix,'"'):y.format==="ends_with"?'Ogiltig str\xE4ng: m\xE5ste sluta med "'.concat(y.suffix,'"'):y.format==="includes"?'Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "'.concat(y.includes,'"'):y.format==="regex"?'Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "'.concat(y.pattern,'"'):"Ogiltig(t) ".concat((d=i[y.format])!=null?d:r.format)}case"not_multiple_of":return"Ogiltigt tal: m\xE5ste vara en multipel av ".concat(r.divisor);case"unrecognized_keys":return"".concat(r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel",": ").concat(C(r.keys,", "));case"invalid_key":return"Ogiltig nyckel i ".concat((h=r.origin)!=null?h:"v\xE4rdet");case"invalid_union":return"Ogiltig input";case"invalid_element":return"Ogiltigt v\xE4rde i ".concat((m=r.origin)!=null?m:"v\xE4rdet");default:return"Ogiltig input"}}},"error");function wm(){return{localeError:aC()}}o(wm,"default");f();var cC=o(()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(r))return"\u0B85\u0BA3\u0BBF";if(r===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ".concat(r.expected,", \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ".concat($(r.values[0])):"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ".concat(C(r.values,"|")," \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1");case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ".concat((s=r.origin)!=null?s:"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"," ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"," \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"):"\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ".concat((u=r.origin)!=null?u:"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"," ").concat(c).concat(r.maximum.toString()," \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD")}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ".concat(r.origin," ").concat(c).concat(r.minimum.toString()," ").concat(d.unit," \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"):"\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ".concat(r.origin," ").concat(c).concat(r.minimum.toString()," \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD")}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "'.concat(c.prefix,'" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD'):c.format==="ends_with"?'\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "'.concat(c.suffix,'" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD'):c.format==="includes"?'\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "'.concat(c.includes,'" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD'):c.format==="regex"?"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ".concat(c.pattern," \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"):"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ".concat(r.divisor," \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD");case"unrecognized_keys":return"\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8".concat(r.keys.length>1?"\u0B95\u0BB3\u0BCD":"",": ").concat(C(r.keys,", "));case"invalid_key":return"".concat(r.origin," \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8");case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return"".concat(r.origin," \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1");default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}},"error");function Mm(){return{localeError:cC()}}o(Mm,"default");f();var uC=o(()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(r))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(r===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ".concat(r.expected," \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ".concat($(r.values[0])):"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",d=t(r.origin);return d?"\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ".concat((s=r.origin)!=null?s:"\u0E04\u0E48\u0E32"," \u0E04\u0E27\u0E23\u0E21\u0E35").concat(c," ").concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"):"\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ".concat((u=r.origin)!=null?u:"\u0E04\u0E48\u0E32"," \u0E04\u0E27\u0E23\u0E21\u0E35").concat(c," ").concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",d=t(r.origin);return d?"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ".concat(r.origin," \u0E04\u0E27\u0E23\u0E21\u0E35").concat(c," ").concat(r.minimum.toString()," ").concat(d.unit):"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ".concat(r.origin," \u0E04\u0E27\u0E23\u0E21\u0E35").concat(c," ").concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "'.concat(c.prefix,'"'):c.format==="ends_with"?'\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "'.concat(c.suffix,'"'):c.format==="includes"?'\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "'.concat(c.includes,'" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21'):c.format==="regex"?"\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ".concat(c.pattern):"\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ".concat(r.divisor," \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27");case"unrecognized_keys":return"\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ".concat(C(r.keys,", "));case"invalid_key":return"\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ".concat(r.origin);case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ".concat(r.origin);default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function Em(){return{localeError:uC()}}o(Em,"default");f();var lC=o(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},"parsedType"),fC=o(()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(i){var r;return(r=e[i])!=null?r:null}o(t,"getSizing");let n={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\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return i=>{var r,s,a,u;switch(i.code){case"invalid_type":return"Ge\xE7ersiz de\u011Fer: beklenen ".concat(i.expected,", al\u0131nan ").concat(lC(i.input));case"invalid_value":return i.values.length===1?"Ge\xE7ersiz de\u011Fer: beklenen ".concat($(i.values[0])):"Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ".concat(C(i.values,"|"));case"too_big":{let l=i.inclusive?"<=":"<",c=t(i.origin);return c?"\xC7ok b\xFCy\xFCk: beklenen ".concat((r=i.origin)!=null?r:"de\u011Fer"," ").concat(l).concat(i.maximum.toString()," ").concat((s=c.unit)!=null?s:"\xF6\u011Fe"):"\xC7ok b\xFCy\xFCk: beklenen ".concat((a=i.origin)!=null?a:"de\u011Fer"," ").concat(l).concat(i.maximum.toString())}case"too_small":{let l=i.inclusive?">=":">",c=t(i.origin);return c?"\xC7ok k\xFC\xE7\xFCk: beklenen ".concat(i.origin," ").concat(l).concat(i.minimum.toString()," ").concat(c.unit):"\xC7ok k\xFC\xE7\xFCk: beklenen ".concat(i.origin," ").concat(l).concat(i.minimum.toString())}case"invalid_format":{let l=i;return l.format==="starts_with"?'Ge\xE7ersiz metin: "'.concat(l.prefix,'" ile ba\u015Flamal\u0131'):l.format==="ends_with"?'Ge\xE7ersiz metin: "'.concat(l.suffix,'" ile bitmeli'):l.format==="includes"?'Ge\xE7ersiz metin: "'.concat(l.includes,'" i\xE7ermeli'):l.format==="regex"?"Ge\xE7ersiz metin: ".concat(l.pattern," desenine uymal\u0131"):"Ge\xE7ersiz ".concat((u=n[l.format])!=null?u:i.format)}case"not_multiple_of":return"Ge\xE7ersiz say\u0131: ".concat(i.divisor," ile tam b\xF6l\xFCnebilmeli");case"unrecognized_keys":return"Tan\u0131nmayan anahtar".concat(i.keys.length>1?"lar":"",": ").concat(C(i.keys,", "));case"invalid_key":return"".concat(i.origin," i\xE7inde ge\xE7ersiz anahtar");case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return"".concat(i.origin," i\xE7inde ge\xE7ersiz de\u011Fer");default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function Tm(){return{localeError:fC()}}o(Tm,"default");f();f();var dC=o(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(r))return"\u043C\u0430\u0441\u0438\u0432";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ".concat(r.expected,", \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ".concat($(r.values[0])):"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ".concat((s=r.origin)!=null?s:"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"," ").concat(d.verb," ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"):"\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ".concat((u=r.origin)!=null?u:"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"," \u0431\u0443\u0434\u0435 ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ".concat(r.origin," ").concat(d.verb," ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ".concat(r.origin," \u0431\u0443\u0434\u0435 ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "'.concat(c.prefix,'"'):c.format==="ends_with"?'\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "'.concat(c.suffix,'"'):c.format==="includes"?'\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "'.concat(c.includes,'"'):c.format==="regex"?"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ".concat(c.pattern):"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ".concat(r.divisor);case"unrecognized_keys":return"\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447".concat(r.keys.length>1?"\u0456":"",": ").concat(C(r.keys,", "));case"invalid_key":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ".concat(r.origin);case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ".concat(r.origin);default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function ea(){return{localeError:dC()}}o(ea,"default");function Am(){return ea()}o(Am,"default");f();var pC=o(()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(r))return"\u0622\u0631\u06D2";if(r===null)return"\u0646\u0644";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ".concat(r.expected," \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ").concat(n(r.input)," \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627");case"invalid_value":return r.values.length===1?"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ".concat($(r.values[0])," \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627"):"\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ".concat(C(r.values,"|")," \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627");case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"\u0628\u06C1\u062A \u0628\u0691\u0627: ".concat((s=r.origin)!=null?s:"\u0648\u06CC\u0644\u06CC\u0648"," \u06A9\u06D2 ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"\u0639\u0646\u0627\u0635\u0631"," \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2"):"\u0628\u06C1\u062A \u0628\u0691\u0627: ".concat((u=r.origin)!=null?u:"\u0648\u06CC\u0644\u06CC\u0648"," \u06A9\u0627 ").concat(c).concat(r.maximum.toString()," \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627")}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ".concat(r.origin," \u06A9\u06D2 ").concat(c).concat(r.minimum.toString()," ").concat(d.unit," \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2"):"\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ".concat(r.origin," \u06A9\u0627 ").concat(c).concat(r.minimum.toString()," \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627")}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "'.concat(c.prefix,'" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2'):c.format==="ends_with"?'\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "'.concat(c.suffix,'" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2'):c.format==="includes"?'\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "'.concat(c.includes,'" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2'):c.format==="regex"?"\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ".concat(c.pattern," \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2"):"\u063A\u0644\u0637 ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ".concat(r.divisor," \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2");case"unrecognized_keys":return"\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC".concat(r.keys.length>1?"\u0632":"",": ").concat(C(r.keys,"\u060C "));case"invalid_key":return"".concat(r.origin," \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC");case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return"".concat(r.origin," \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648");default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function Pm(){return{localeError:pC()}}o(Pm,"default");f();var hC=o(()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(r))return"m\u1EA3ng";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 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\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ".concat(r.expected,", nh\u1EADn \u0111\u01B0\u1EE3c ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ".concat($(r.values[0])):"T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ".concat((s=r.origin)!=null?s:"gi\xE1 tr\u1ECB"," ").concat(d.verb," ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"ph\u1EA7n t\u1EED"):"Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ".concat((u=r.origin)!=null?u:"gi\xE1 tr\u1ECB"," ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ".concat(r.origin," ").concat(d.verb," ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ".concat(r.origin," ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "'.concat(c.prefix,'"'):c.format==="ends_with"?'Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "'.concat(c.suffix,'"'):c.format==="includes"?'Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "'.concat(c.includes,'"'):c.format==="regex"?"Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ".concat(c.pattern):"".concat((l=i[c.format])!=null?l:r.format," kh\xF4ng h\u1EE3p l\u1EC7")}case"not_multiple_of":return"S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ".concat(r.divisor);case"unrecognized_keys":return"Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ".concat(C(r.keys,", "));case"invalid_key":return"Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ".concat(r.origin);case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return"Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ".concat(r.origin);default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function Rm(){return{localeError:hC()}}o(Rm,"default");f();var mC=o(()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(r))return"\u6570\u7EC4";if(r===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ".concat(r.expected,"\uFF0C\u5B9E\u9645\u63A5\u6536 ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ".concat($(r.values[0])):"\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ".concat((s=r.origin)!=null?s:"\u503C"," ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"\u4E2A\u5143\u7D20"):"\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ".concat((u=r.origin)!=null?u:"\u503C"," ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ".concat(r.origin," ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ".concat(r.origin," ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "'.concat(c.prefix,'" \u5F00\u5934'):c.format==="ends_with"?'\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "'.concat(c.suffix,'" \u7ED3\u5C3E'):c.format==="includes"?'\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "'.concat(c.includes,'"'):c.format==="regex"?"\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ".concat(c.pattern):"\u65E0\u6548".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ".concat(r.divisor," \u7684\u500D\u6570");case"unrecognized_keys":return"\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ".concat(C(r.keys,", "));case"invalid_key":return"".concat(r.origin," \u4E2D\u7684\u952E(key)\u65E0\u6548");case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return"".concat(r.origin," \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)");default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function Cm(){return{localeError:mC()}}o(Cm,"default");f();var gC=o(()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return r=>{var s,a,u,l;switch(r.code){case"invalid_type":return"\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ".concat(r.expected,"\uFF0C\u4F46\u6536\u5230 ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ".concat($(r.values[0])):"\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ".concat(C(r.values,"|"));case"too_big":{let c=r.inclusive?"<=":"<",d=t(r.origin);return d?"\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ".concat((s=r.origin)!=null?s:"\u503C"," \u61C9\u70BA ").concat(c).concat(r.maximum.toString()," ").concat((a=d.unit)!=null?a:"\u500B\u5143\u7D20"):"\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ".concat((u=r.origin)!=null?u:"\u503C"," \u61C9\u70BA ").concat(c).concat(r.maximum.toString())}case"too_small":{let c=r.inclusive?">=":">",d=t(r.origin);return d?"\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ".concat(r.origin," \u61C9\u70BA ").concat(c).concat(r.minimum.toString()," ").concat(d.unit):"\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ".concat(r.origin," \u61C9\u70BA ").concat(c).concat(r.minimum.toString())}case"invalid_format":{let c=r;return c.format==="starts_with"?'\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "'.concat(c.prefix,'" \u958B\u982D'):c.format==="ends_with"?'\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "'.concat(c.suffix,'" \u7D50\u5C3E'):c.format==="includes"?'\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "'.concat(c.includes,'"'):c.format==="regex"?"\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ".concat(c.pattern):"\u7121\u6548\u7684 ".concat((l=i[c.format])!=null?l:r.format)}case"not_multiple_of":return"\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ".concat(r.divisor," \u7684\u500D\u6578");case"unrecognized_keys":return"\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C".concat(r.keys.length>1?"\u5011":"","\uFF1A").concat(C(r.keys,"\u3001"));case"invalid_key":return"".concat(r.origin," \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C");case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return"".concat(r.origin," \u4E2D\u6709\u7121\u6548\u7684\u503C");default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function Om(){return{localeError:gC()}}o(Om,"default");f();var yC=o(()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){var s;return(s=e[r])!=null?s:null}o(t,"getSizing");let n=o(r=>{let s=typeof r;switch(s){case"number":return Number.isNaN(r)?"NaN":"n\u1ECD\u0301mb\xE0";case"object":{if(Array.isArray(r))return"akop\u1ECD";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return s},"parsedType"),i={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"};return r=>{var s,a;switch(r.code){case"invalid_type":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ".concat(r.expected,", \xE0m\u1ECD\u0300 a r\xED ").concat(n(r.input));case"invalid_value":return r.values.length===1?"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ".concat($(r.values[0])):"\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ".concat(C(r.values,"|"));case"too_big":{let u=r.inclusive?"<=":"<",l=t(r.origin);return l?"T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ".concat((s=r.origin)!=null?s:"iye"," ").concat(l.verb," ").concat(u).concat(r.maximum," ").concat(l.unit):"T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ".concat(u).concat(r.maximum)}case"too_small":{let u=r.inclusive?">=":">",l=t(r.origin);return l?"K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ".concat(r.origin," ").concat(l.verb," ").concat(u).concat(r.minimum," ").concat(l.unit):"K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ".concat(u).concat(r.minimum)}case"invalid_format":{let u=r;return u.format==="starts_with"?'\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "'.concat(u.prefix,'"'):u.format==="ends_with"?'\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "'.concat(u.suffix,'"'):u.format==="includes"?'\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "'.concat(u.includes,'"'):u.format==="regex"?"\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ".concat(u.pattern):"A\u1E63\xEC\u1E63e: ".concat((a=i[u.format])!=null?a:r.format)}case"not_multiple_of":return"N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ".concat(r.divisor);case"unrecognized_keys":return"B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ".concat(C(r.keys,", "));case"invalid_key":return"B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ".concat(r.origin);case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return"Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ".concat(r.origin);default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}},"error");function Um(){return{localeError:yC()}}o(Um,"default");f();var Nm=Symbol("ZodOutput"),Fm=Symbol("ZodInput"),km=class km{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];if(this._map.set(t,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error("ID ".concat(i.id," already exists in the registry"));this._idmap.set(i.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){var i;let n=t._zod.parent;if(n){let r=x({},(i=this.get(n))!=null?i:{});delete r.id;let s=x(x({},r),this._map.get(t));return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};o(km,"$ZodRegistry");var Eo=km;function qc(){return new Eo}o(qc,"registry");var mr=qc();f();function Dm(e,t){return new e(x({type:"string"},B(t)))}o(Dm,"_string");function Lm(e,t){return new e(x({type:"string",coerce:!0},B(t)))}o(Lm,"_coercedString");function Kc(e,t){return new e(x({type:"string",format:"email",check:"string_format",abort:!1},B(t)))}o(Kc,"_email");function ta(e,t){return new e(x({type:"string",format:"guid",check:"string_format",abort:!1},B(t)))}o(ta,"_guid");function Jc(e,t){return new e(x({type:"string",format:"uuid",check:"string_format",abort:!1},B(t)))}o(Jc,"_uuid");function Yc(e,t){return new e(x({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4"},B(t)))}o(Yc,"_uuidv4");function Qc(e,t){return new e(x({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6"},B(t)))}o(Qc,"_uuidv6");function eu(e,t){return new e(x({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},B(t)))}o(eu,"_uuidv7");function na(e,t){return new e(x({type:"string",format:"url",check:"string_format",abort:!1},B(t)))}o(na,"_url");function tu(e,t){return new e(x({type:"string",format:"emoji",check:"string_format",abort:!1},B(t)))}o(tu,"_emoji");function nu(e,t){return new e(x({type:"string",format:"nanoid",check:"string_format",abort:!1},B(t)))}o(nu,"_nanoid");function ru(e,t){return new e(x({type:"string",format:"cuid",check:"string_format",abort:!1},B(t)))}o(ru,"_cuid");function iu(e,t){return new e(x({type:"string",format:"cuid2",check:"string_format",abort:!1},B(t)))}o(iu,"_cuid2");function ou(e,t){return new e(x({type:"string",format:"ulid",check:"string_format",abort:!1},B(t)))}o(ou,"_ulid");function su(e,t){return new e(x({type:"string",format:"xid",check:"string_format",abort:!1},B(t)))}o(su,"_xid");function au(e,t){return new e(x({type:"string",format:"ksuid",check:"string_format",abort:!1},B(t)))}o(au,"_ksuid");function cu(e,t){return new e(x({type:"string",format:"ipv4",check:"string_format",abort:!1},B(t)))}o(cu,"_ipv4");function uu(e,t){return new e(x({type:"string",format:"ipv6",check:"string_format",abort:!1},B(t)))}o(uu,"_ipv6");function lu(e,t){return new e(x({type:"string",format:"cidrv4",check:"string_format",abort:!1},B(t)))}o(lu,"_cidrv4");function fu(e,t){return new e(x({type:"string",format:"cidrv6",check:"string_format",abort:!1},B(t)))}o(fu,"_cidrv6");function du(e,t){return new e(x({type:"string",format:"base64",check:"string_format",abort:!1},B(t)))}o(du,"_base64");function pu(e,t){return new e(x({type:"string",format:"base64url",check:"string_format",abort:!1},B(t)))}o(pu,"_base64url");function hu(e,t){return new e(x({type:"string",format:"e164",check:"string_format",abort:!1},B(t)))}o(hu,"_e164");function mu(e,t){return new e(x({type:"string",format:"jwt",check:"string_format",abort:!1},B(t)))}o(mu,"_jwt");var $m={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function zm(e,t){return new e(x({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null},B(t)))}o(zm,"_isoDateTime");function Bm(e,t){return new e(x({type:"string",format:"date",check:"string_format"},B(t)))}o(Bm,"_isoDate");function Vm(e,t){return new e(x({type:"string",format:"time",check:"string_format",precision:null},B(t)))}o(Vm,"_isoTime");function jm(e,t){return new e(x({type:"string",format:"duration",check:"string_format"},B(t)))}o(jm,"_isoDuration");function Gm(e,t){return new e(x({type:"number",checks:[]},B(t)))}o(Gm,"_number");function Hm(e,t){return new e(x({type:"number",coerce:!0,checks:[]},B(t)))}o(Hm,"_coercedNumber");function Wm(e,t){return new e(x({type:"number",check:"number_format",abort:!1,format:"safeint"},B(t)))}o(Wm,"_int");function Zm(e,t){return new e(x({type:"number",check:"number_format",abort:!1,format:"float32"},B(t)))}o(Zm,"_float32");function Xm(e,t){return new e(x({type:"number",check:"number_format",abort:!1,format:"float64"},B(t)))}o(Xm,"_float64");function qm(e,t){return new e(x({type:"number",check:"number_format",abort:!1,format:"int32"},B(t)))}o(qm,"_int32");function Km(e,t){return new e(x({type:"number",check:"number_format",abort:!1,format:"uint32"},B(t)))}o(Km,"_uint32");function Jm(e,t){return new e(x({type:"boolean"},B(t)))}o(Jm,"_boolean");function Ym(e,t){return new e(x({type:"boolean",coerce:!0},B(t)))}o(Ym,"_coercedBoolean");function Qm(e,t){return new e(x({type:"bigint"},B(t)))}o(Qm,"_bigint");function eg(e,t){return new e(x({type:"bigint",coerce:!0},B(t)))}o(eg,"_coercedBigint");function tg(e,t){return new e(x({type:"bigint",check:"bigint_format",abort:!1,format:"int64"},B(t)))}o(tg,"_int64");function ng(e,t){return new e(x({type:"bigint",check:"bigint_format",abort:!1,format:"uint64"},B(t)))}o(ng,"_uint64");function rg(e,t){return new e(x({type:"symbol"},B(t)))}o(rg,"_symbol");function ig(e,t){return new e(x({type:"undefined"},B(t)))}o(ig,"_undefined");function og(e,t){return new e(x({type:"null"},B(t)))}o(og,"_null");function sg(e){return new e({type:"any"})}o(sg,"_any");function ag(e){return new e({type:"unknown"})}o(ag,"_unknown");function cg(e,t){return new e(x({type:"never"},B(t)))}o(cg,"_never");function ug(e,t){return new e(x({type:"void"},B(t)))}o(ug,"_void");function lg(e,t){return new e(x({type:"date"},B(t)))}o(lg,"_date");function fg(e,t){return new e(x({type:"date",coerce:!0},B(t)))}o(fg,"_coercedDate");function dg(e,t){return new e(x({type:"nan"},B(t)))}o(dg,"_nan");function Dr(e,t){return new Lc(L(x({check:"less_than"},B(t)),{value:e,inclusive:!1}))}o(Dr,"_lt");function Fn(e,t){return new Lc(L(x({check:"less_than"},B(t)),{value:e,inclusive:!0}))}o(Fn,"_lte");function Lr(e,t){return new $c(L(x({check:"greater_than"},B(t)),{value:e,inclusive:!1}))}o(Lr,"_gt");function ln(e,t){return new $c(L(x({check:"greater_than"},B(t)),{value:e,inclusive:!0}))}o(ln,"_gte");function pg(e){return Lr(0,e)}o(pg,"_positive");function hg(e){return Dr(0,e)}o(hg,"_negative");function mg(e){return Fn(0,e)}o(mg,"_nonpositive");function gg(e){return ln(0,e)}o(gg,"_nonnegative");function zi(e,t){return new gp(L(x({check:"multiple_of"},B(t)),{value:e}))}o(zi,"_multipleOf");function To(e,t){return new vp(L(x({check:"max_size"},B(t)),{maximum:e}))}o(To,"_maxSize");function Bi(e,t){return new _p(L(x({check:"min_size"},B(t)),{minimum:e}))}o(Bi,"_minSize");function ra(e,t){return new bp(L(x({check:"size_equals"},B(t)),{size:e}))}o(ra,"_size");function Ao(e,t){return new Sp(L(x({check:"max_length"},B(t)),{maximum:e}))}o(Ao,"_maxLength");function vi(e,t){return new Ip(L(x({check:"min_length"},B(t)),{minimum:e}))}o(vi,"_minLength");function Po(e,t){return new wp(L(x({check:"length_equals"},B(t)),{length:e}))}o(Po,"_length");function ia(e,t){return new Mp(L(x({check:"string_format",format:"regex"},B(t)),{pattern:e}))}o(ia,"_regex");function oa(e){return new Ep(x({check:"string_format",format:"lowercase"},B(e)))}o(oa,"_lowercase");function sa(e){return new Tp(x({check:"string_format",format:"uppercase"},B(e)))}o(sa,"_uppercase");function aa(e,t){return new Ap(L(x({check:"string_format",format:"includes"},B(t)),{includes:e}))}o(aa,"_includes");function ca(e,t){return new Pp(L(x({check:"string_format",format:"starts_with"},B(t)),{prefix:e}))}o(ca,"_startsWith");function ua(e,t){return new Rp(L(x({check:"string_format",format:"ends_with"},B(t)),{suffix:e}))}o(ua,"_endsWith");function yg(e,t,n){return new Cp(x({check:"property",property:e,schema:t},B(n)))}o(yg,"_property");function la(e,t){return new Op(x({check:"mime_type",mime:e},B(t)))}o(la,"_mime");function $r(e){return new Up({check:"overwrite",tx:e})}o($r,"_overwrite");function fa(e){return $r(t=>t.normalize(e))}o(fa,"_normalize");function da(){return $r(e=>e.trim())}o(da,"_trim");function pa(){return $r(e=>e.toLowerCase())}o(pa,"_toLowerCase");function ha(){return $r(e=>e.toUpperCase())}o(ha,"_toUpperCase");function xg(e,t,n){return new e(x({type:"array",element:t},B(n)))}o(xg,"_array");function xC(e,t,n){return new e(x({type:"union",options:t},B(n)))}o(xC,"_union");function vC(e,t,n,i){return new e(x({type:"union",options:n,discriminator:t},B(i)))}o(vC,"_discriminatedUnion");function _C(e,t,n){return new e({type:"intersection",left:t,right:n})}o(_C,"_intersection");function bC(e,t,n,i){let r=n instanceof se,s=r?i:n,a=r?n:null;return new e(x({type:"tuple",items:t,rest:a},B(s)))}o(bC,"_tuple");function SC(e,t,n,i){return new e(x({type:"record",keyType:t,valueType:n},B(i)))}o(SC,"_record");function IC(e,t,n,i){return new e(x({type:"map",keyType:t,valueType:n},B(i)))}o(IC,"_map");function wC(e,t,n){return new e(x({type:"set",valueType:t},B(n)))}o(wC,"_set");function MC(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e(x({type:"enum",entries:i},B(n)))}o(MC,"_enum");function EC(e,t,n){return new e(x({type:"enum",entries:t},B(n)))}o(EC,"_nativeEnum");function TC(e,t,n){return new e(x({type:"literal",values:Array.isArray(t)?t:[t]},B(n)))}o(TC,"_literal");function vg(e,t){return new e(x({type:"file"},B(t)))}o(vg,"_file");function AC(e,t){return new e({type:"transform",transform:t})}o(AC,"_transform");function PC(e,t){return new e({type:"optional",innerType:t})}o(PC,"_optional");function RC(e,t){return new e({type:"nullable",innerType:t})}o(RC,"_nullable");function CC(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Cd(n)}})}o(CC,"_default");function OC(e,t,n){return new e(x({type:"nonoptional",innerType:t},B(n)))}o(OC,"_nonoptional");function UC(e,t){return new e({type:"success",innerType:t})}o(UC,"_success");function NC(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}o(NC,"_catch");function FC(e,t,n){return new e({type:"pipe",in:t,out:n})}o(FC,"_pipe");function kC(e,t){return new e({type:"readonly",innerType:t})}o(kC,"_readonly");function DC(e,t,n){return new e(x({type:"template_literal",parts:t},B(n)))}o(DC,"_templateLiteral");function LC(e,t){return new e({type:"lazy",getter:t})}o(LC,"_lazy");function $C(e,t){return new e({type:"promise",innerType:t})}o($C,"_promise");function _g(e,t,n){var s;let i=B(n);return(s=i.abort)!=null||(i.abort=!0),new e(x({type:"custom",check:"custom",fn:t},i))}o(_g,"_custom");function bg(e,t,n){return new e(x({type:"custom",check:"custom",fn:t},B(n)))}o(bg,"_refine");function Sg(e){let t=v0(n=>(n.addIssue=i=>{var r,s,a,u;if(typeof i=="string")n.issues.push(_o(i,n.value,t._zod.def));else{let l=i;l.fatal&&(l.continue=!1),(r=l.code)!=null||(l.code="custom"),(s=l.input)!=null||(l.input=n.value),(a=l.inst)!=null||(l.inst=t),(u=l.continue)!=null||(l.continue=!t._zod.def.abort),n.issues.push(_o(l))}},e(n.value,n)));return t}o(Sg,"_superRefine");function v0(e,t){let n=new rt(x({check:"custom"},B(t)));return n._zod.check=e,n}o(v0,"_check");function Ig(e,t){var y,v,I,T,U;let n=B(t),i=(y=n.truthy)!=null?y:["true","1","yes","on","y","enabled"],r=(v=n.falsy)!=null?v:["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(D=>typeof D=="string"?D.toLowerCase():D),r=r.map(D=>typeof D=="string"?D.toLowerCase():D));let s=new Set(i),a=new Set(r),u=(I=e.Codec)!=null?I:qs,l=(T=e.Boolean)!=null?T:Xs,c=(U=e.String)!=null?U:Li,d=new c({type:"string",error:n.error}),h=new l({type:"boolean",error:n.error}),m=new u({type:"pipe",in:d,out:h,transform:o((D,w)=>{let S=D;return n.case!=="sensitive"&&(S=S.toLowerCase()),s.has(S)?!0:a.has(S)?!1:(w.issues.push({code:"invalid_value",expected:"stringbool",values:[...s,...a],input:w.value,inst:m,continue:!1}),{})},"transform"),reverseTransform:o((D,w)=>D===!0?i[0]||"true":r[0]||"false","reverseTransform"),error:n.error});return m}o(Ig,"_stringbool");function Ro(e,t,n,i={}){let r=B(i),s=x(L(x({},B(i)),{check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:u=>n.test(u)}),r);return n instanceof RegExp&&(s.pattern=n),new e(s)}o(Ro,"_stringFormat");f();var Mg=class Mg{constructor(t){var n,i,r,s,a;this.counter=0,this.metadataRegistry=(n=t==null?void 0:t.metadata)!=null?n:mr,this.target=(i=t==null?void 0:t.target)!=null?i:"draft-2020-12",this.unrepresentable=(r=t==null?void 0:t.unrepresentable)!=null?r:"throw",this.override=(s=t==null?void 0:t.override)!=null?s:()=>{},this.io=(a=t==null?void 0:t.io)!=null?a:"output",this.seen=new Map}process(t,n={path:[],schemaPath:[]}){var h,m,y,v,I;var i;let r=t._zod.def,s={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(t);if(a)return a.count++,n.schemaPath.includes(t)&&(a.cycle=n.path),a.schema;let u={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(t,u);let l=(m=(h=t._zod).toJSONSchema)==null?void 0:m.call(h);if(l)u.schema=l;else{let T=L(x({},n),{schemaPath:[...n.schemaPath,t],path:n.path}),U=t._zod.parent;if(U)u.ref=U,this.process(U,T),this.seen.get(U).isParent=!0;else{let D=u.schema;switch(r.type){case"string":{let w=D;w.type="string";let{minimum:S,maximum:A,format:j,patterns:F,contentEncoding:H}=t._zod.bag;if(typeof S=="number"&&(w.minLength=S),typeof A=="number"&&(w.maxLength=A),j&&(w.format=(y=s[j])!=null?y:j,w.format===""&&delete w.format),H&&(w.contentEncoding=H),F&&F.size>0){let G=[...F];G.length===1?w.pattern=G[0].source:G.length>1&&(u.schema.allOf=[...G.map(ce=>L(x({},this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{}),{pattern:ce.source}))])}break}case"number":{let w=D,{minimum:S,maximum:A,format:j,multipleOf:F,exclusiveMaximum:H,exclusiveMinimum:G}=t._zod.bag;typeof j=="string"&&j.includes("int")?w.type="integer":w.type="number",typeof G=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(w.minimum=G,w.exclusiveMinimum=!0):w.exclusiveMinimum=G),typeof S=="number"&&(w.minimum=S,typeof G=="number"&&this.target!=="draft-4"&&(G>=S?delete w.minimum:delete w.exclusiveMinimum)),typeof H=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(w.maximum=H,w.exclusiveMaximum=!0):w.exclusiveMaximum=H),typeof A=="number"&&(w.maximum=A,typeof H=="number"&&this.target!=="draft-4"&&(H<=A?delete w.maximum:delete w.exclusiveMaximum)),typeof F=="number"&&(w.multipleOf=F);break}case"boolean":{let w=D;w.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(D.type="string",D.nullable=!0,D.enum=[null]):D.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{D.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let w=D,{minimum:S,maximum:A}=t._zod.bag;typeof S=="number"&&(w.minItems=S),typeof A=="number"&&(w.maxItems=A),w.type="array",w.items=this.process(r.element,L(x({},T),{path:[...T.path,"items"]}));break}case"object":{let w=D;w.type="object",w.properties={};let S=r.shape;for(let F in S)w.properties[F]=this.process(S[F],L(x({},T),{path:[...T.path,"properties",F]}));let A=new Set(Object.keys(S)),j=new Set([...A].filter(F=>{let H=r.shape[F]._zod;return this.io==="input"?H.optin===void 0:H.optout===void 0}));j.size>0&&(w.required=Array.from(j)),((v=r.catchall)==null?void 0:v._zod.def.type)==="never"?w.additionalProperties=!1:r.catchall?r.catchall&&(w.additionalProperties=this.process(r.catchall,L(x({},T),{path:[...T.path,"additionalProperties"]}))):this.io==="output"&&(w.additionalProperties=!1);break}case"union":{let w=D,S=r.options.map((A,j)=>this.process(A,L(x({},T),{path:[...T.path,"anyOf",j]})));w.anyOf=S;break}case"intersection":{let w=D,S=this.process(r.left,L(x({},T),{path:[...T.path,"allOf",0]})),A=this.process(r.right,L(x({},T),{path:[...T.path,"allOf",1]})),j=o(H=>"allOf"in H&&Object.keys(H).length===1,"isSimpleIntersection"),F=[...j(S)?S.allOf:[S],...j(A)?A.allOf:[A]];w.allOf=F;break}case"tuple":{let w=D;w.type="array";let S=this.target==="draft-2020-12"?"prefixItems":"items",A=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",j=r.items.map((ce,ue)=>this.process(ce,L(x({},T),{path:[...T.path,S,ue]}))),F=r.rest?this.process(r.rest,L(x({},T),{path:[...T.path,A,...this.target==="openapi-3.0"?[r.items.length]:[]]})):null;this.target==="draft-2020-12"?(w.prefixItems=j,F&&(w.items=F)):this.target==="openapi-3.0"?(w.items={anyOf:j},F&&w.items.anyOf.push(F),w.minItems=j.length,F||(w.maxItems=j.length)):(w.items=j,F&&(w.additionalItems=F));let{minimum:H,maximum:G}=t._zod.bag;typeof H=="number"&&(w.minItems=H),typeof G=="number"&&(w.maxItems=G);break}case"record":{let w=D;w.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(w.propertyNames=this.process(r.keyType,L(x({},T),{path:[...T.path,"propertyNames"]}))),w.additionalProperties=this.process(r.valueType,L(x({},T),{path:[...T.path,"additionalProperties"]}));break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let w=D,S=Ds(r.entries);S.every(A=>typeof A=="number")&&(w.type="number"),S.every(A=>typeof A=="string")&&(w.type="string"),w.enum=S;break}case"literal":{let w=D,S=[];for(let A of r.values)if(A===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof A=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");S.push(Number(A))}else S.push(A);if(S.length!==0)if(S.length===1){let A=S[0];w.type=A===null?"null":typeof A,this.target==="draft-4"||this.target==="openapi-3.0"?w.enum=[A]:w.const=A}else S.every(A=>typeof A=="number")&&(w.type="number"),S.every(A=>typeof A=="string")&&(w.type="string"),S.every(A=>typeof A=="boolean")&&(w.type="string"),S.every(A=>A===null)&&(w.type="null"),w.enum=S;break}case"file":{let w=D,S={type:"string",format:"binary",contentEncoding:"binary"},{minimum:A,maximum:j,mime:F}=t._zod.bag;A!==void 0&&(S.minLength=A),j!==void 0&&(S.maxLength=j),F?F.length===1?(S.contentMediaType=F[0],Object.assign(w,S)):w.anyOf=F.map(H=>L(x({},S),{contentMediaType:H})):Object.assign(w,S);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let w=this.process(r.innerType,T);this.target==="openapi-3.0"?(u.ref=r.innerType,D.nullable=!0):D.anyOf=[w,{type:"null"}];break}case"nonoptional":{this.process(r.innerType,T),u.ref=r.innerType;break}case"success":{let w=D;w.type="boolean";break}case"default":{this.process(r.innerType,T),u.ref=r.innerType,D.default=JSON.parse(JSON.stringify(r.defaultValue));break}case"prefault":{this.process(r.innerType,T),u.ref=r.innerType,this.io==="input"&&(D._prefault=JSON.parse(JSON.stringify(r.defaultValue)));break}case"catch":{this.process(r.innerType,T),u.ref=r.innerType;let w;try{w=r.catchValue(void 0)}catch(S){throw new Error("Dynamic catch values are not supported in JSON Schema")}D.default=w;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let w=D,S=t._zod.pattern;if(!S)throw new Error("Pattern not found in template literal");w.type="string",w.pattern=S.source;break}case"pipe":{let w=this.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;this.process(w,T),u.ref=w;break}case"readonly":{this.process(r.innerType,T),u.ref=r.innerType,D.readOnly=!0;break}case"promise":{this.process(r.innerType,T),u.ref=r.innerType;break}case"optional":{this.process(r.innerType,T),u.ref=r.innerType;break}case"lazy":{let w=t._zod.innerType;this.process(w,T),u.ref=w;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}default:}}}let c=this.metadataRegistry.get(t);return c&&Object.assign(u.schema,c),this.io==="input"&&wt(t)&&(delete u.schema.examples,delete u.schema.default),this.io==="input"&&u.schema._prefault&&((I=(i=u.schema).default)!=null||(i.default=u.schema._prefault)),delete u.schema._prefault,this.seen.get(t).schema}emit(t,n){var d,h,m,y,v,I,T,U,D,w;let i={cycles:(d=n==null?void 0:n.cycles)!=null?d:"ref",reused:(h=n==null?void 0:n.reused)!=null?h:"inline",external:(m=n==null?void 0:n.external)!=null?m:void 0},r=this.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let s=o(S=>{var G,ce,ue,he,Ge;let A=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){let Oe=(G=i.external.registry.get(S[0]))==null?void 0:G.id,Ue=(ce=i.external.uri)!=null?ce:ne=>ne;if(Oe)return{ref:Ue(Oe)};let V=(he=(ue=S[1].defId)!=null?ue:S[1].schema.id)!=null?he:"schema".concat(this.counter++);return S[1].defId=V,{defId:V,ref:"".concat(Ue("__shared"),"#/").concat(A,"/").concat(V)}}if(S[1]===r)return{ref:"#"};let F="".concat("#","/").concat(A,"/"),H=(Ge=S[1].schema.id)!=null?Ge:"__schema".concat(this.counter++);return{defId:H,ref:F+H}},"makeURI"),a=o(S=>{if(S[1].schema.$ref)return;let A=S[1],{ref:j,defId:F}=s(S);A.def=x({},A.schema),F&&(A.defId=F);let H=A.schema;for(let G in H)delete H[G];H.$ref=j},"extractToDef");if(i.cycles==="throw")for(let S of this.seen.entries()){let A=S[1];if(A.cycle)throw new Error("Cycle detected: "+"#/".concat((y=A.cycle)==null?void 0:y.join("/"),"/<root>")+'\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.')}for(let S of this.seen.entries()){let A=S[1];if(t===S[0]){a(S);continue}if(i.external){let F=(v=i.external.registry.get(S[0]))==null?void 0:v.id;if(t!==S[0]&&F){a(S);continue}}if((I=this.metadataRegistry.get(S[0]))==null?void 0:I.id){a(S);continue}if(A.cycle){a(S);continue}if(A.count>1&&i.reused==="ref"){a(S);continue}}let u=o((S,A)=>{var ce,ue,he;let j=this.seen.get(S),F=(ce=j.def)!=null?ce:j.schema,H=x({},F);if(j.ref===null)return;let G=j.ref;if(j.ref=null,G){u(G,A);let Ge=this.seen.get(G).schema;Ge.$ref&&(A.target==="draft-7"||A.target==="draft-4"||A.target==="openapi-3.0")?(F.allOf=(ue=F.allOf)!=null?ue:[],F.allOf.push(Ge)):(Object.assign(F,Ge),Object.assign(F,H))}j.isParent||this.override({zodSchema:S,jsonSchema:F,path:(he=j.path)!=null?he:[]})},"flattenRef");for(let S of[...this.seen.entries()].reverse())u(S[0],{target:this.target});let l={};if(this.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?l.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?l.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn("Invalid target: ".concat(this.target)),(T=i.external)!=null&&T.uri){let S=(U=i.external.registry.get(t))==null?void 0:U.id;if(!S)throw new Error("Schema is missing an `id` property");l.$id=i.external.uri(S)}Object.assign(l,r.def);let c=(w=(D=i.external)==null?void 0:D.defs)!=null?w:{};for(let S of this.seen.entries()){let A=S[1];A.def&&A.defId&&(c[A.defId]=A.def)}i.external||Object.keys(c).length>0&&(this.target==="draft-2020-12"?l.$defs=c:l.definitions=c);try{return JSON.parse(JSON.stringify(l))}catch(S){throw new Error("Error converting schema to JSON.")}}};o(Mg,"JSONSchemaGenerator");var ma=Mg;function wg(e,t){if(e instanceof Eo){let i=new ma(t),r={};for(let u of e._idmap.entries()){let[l,c]=u;i.process(c)}let s={},a={registry:e,uri:t==null?void 0:t.uri,defs:r};for(let u of e._idmap.entries()){let[l,c]=u;s[l]=i.emit(c,L(x({},t),{external:a}))}if(Object.keys(r).length>0){let u=i.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:r}}return{schemas:s}}let n=new ma(t);return n.process(e),n.emit(e,t)}o(wg,"toJSONSchema");function wt(e,t){let n=t!=null?t:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;switch(r.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return wt(r.element,n);case"object":{for(let s in r.shape)if(wt(r.shape[s],n))return!0;return!1}case"union":{for(let s of r.options)if(wt(s,n))return!0;return!1}case"intersection":return wt(r.left,n)||wt(r.right,n);case"tuple":{for(let s of r.items)if(wt(s,n))return!0;return!!(r.rest&&wt(r.rest,n))}case"record":return wt(r.keyType,n)||wt(r.valueType,n);case"map":return wt(r.keyType,n)||wt(r.valueType,n);case"set":return wt(r.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return wt(r.innerType,n);case"lazy":return wt(r.getter(),n);case"default":return wt(r.innerType,n);case"prefault":return wt(r.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return wt(r.in,n)||wt(r.out,n);case"success":return!1;case"catch":return!1;case"function":return!1;default:}throw new Error("Unknown schema type: ".concat(r.type))}o(wt,"isTransforming");var Eg={};f();f();f();var ga={};cn(ga,{ZodISODate:()=>yu,ZodISODateTime:()=>gu,ZodISODuration:()=>vu,ZodISOTime:()=>xu,date:()=>Ag,datetime:()=>Tg,duration:()=>Rg,time:()=>Pg});f();var gu=M("ZodISODateTime",(e,t)=>{Xp.init(e,t),Ye.init(e,t)});function Tg(e){return zm(gu,e)}o(Tg,"datetime");var yu=M("ZodISODate",(e,t)=>{qp.init(e,t),Ye.init(e,t)});function Ag(e){return Bm(yu,e)}o(Ag,"date");var xu=M("ZodISOTime",(e,t)=>{Kp.init(e,t),Ye.init(e,t)});function Pg(e){return Vm(xu,e)}o(Pg,"time");var vu=M("ZodISODuration",(e,t)=>{Jp.init(e,t),Ye.init(e,t)});function Rg(e){return jm(vu,e)}o(Rg,"duration");f();f();var b0=o((e,t)=>{Vs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:o(n=>Gs(e,n),"value")},flatten:{value:o(n=>js(e,n),"value")},addIssue:{value:o(n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,xo,2)},"value")},addIssues:{value:o(n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,xo,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),BC=M("ZodError",b0),fn=M("ZodError",b0,{Parent:Error});var Cg=bo(fn),Og=So(fn),Ug=Io(fn),Ng=wo(fn),Fg=Pc(fn),kg=Rc(fn),Dg=Cc(fn),Lg=Oc(fn),$g=Uc(fn),zg=Nc(fn),Bg=Fc(fn),Vg=kc(fn);var de=M("ZodType",(e,t)=>(se.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>{var i;return e.clone(z.mergeDefs(t,{checks:[...(i=t.checks)!=null?i:[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}))},e.clone=(n,i)=>tn(e,n,i),e.brand=()=>e,e.register=(n,i)=>(n.add(e,i),e),e.parse=(n,i)=>Cg(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>Ug(e,n,i),e.parseAsync=async(n,i)=>Og(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Ng(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Fg(e,n,i),e.decode=(n,i)=>kg(e,n,i),e.encodeAsync=async(n,i)=>Dg(e,n,i),e.decodeAsync=async(n,i)=>Lg(e,n,i),e.safeEncode=(n,i)=>$g(e,n,i),e.safeDecode=(n,i)=>zg(e,n,i),e.safeEncodeAsync=async(n,i)=>Bg(e,n,i),e.safeDecodeAsync=async(n,i)=>Vg(e,n,i),e.refine=(n,i)=>e.check(ab(n,i)),e.superRefine=n=>e.check(cb(n)),e.overwrite=n=>e.check($r(n)),e.optional=()=>bu(e),e.nullable=()=>Su(e),e.nullish=()=>bu(Su(e)),e.nonoptional=n=>q0(e,n),e.array=()=>Eu(e),e.or=n=>fy([e,n]),e.and=n=>F0(e,n),e.transform=n=>Iu(e,hy(n)),e.default=n=>W0(e,n),e.prefault=n=>X0(e,n),e.catch=n=>Y0(e,n),e.pipe=n=>Iu(e,n),e.readonly=()=>tb(e),e.describe=n=>{let i=e.clone();return mr.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){var n;return(n=mr.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return mr.get(e);let i=e.clone();return mr.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Hg=M("_ZodString",(e,t)=>{var i,r,s;Li.init(e,t),de.init(e,t);let n=e._zod.bag;e.format=(i=n.format)!=null?i:null,e.minLength=(r=n.minimum)!=null?r:null,e.maxLength=(s=n.maximum)!=null?s:null,e.regex=(...a)=>e.check(ia(...a)),e.includes=(...a)=>e.check(aa(...a)),e.startsWith=(...a)=>e.check(ca(...a)),e.endsWith=(...a)=>e.check(ua(...a)),e.min=(...a)=>e.check(vi(...a)),e.max=(...a)=>e.check(Ao(...a)),e.length=(...a)=>e.check(Po(...a)),e.nonempty=(...a)=>e.check(vi(1,...a)),e.lowercase=a=>e.check(oa(a)),e.uppercase=a=>e.check(sa(a)),e.trim=()=>e.check(da()),e.normalize=(...a)=>e.check(fa(...a)),e.toLowerCase=()=>e.check(pa()),e.toUpperCase=()=>e.check(ha())}),xa=M("ZodString",(e,t)=>{Li.init(e,t),Hg.init(e,t),e.email=n=>e.check(Kc(Wg,n)),e.url=n=>e.check(na(wu,n)),e.jwt=n=>e.check(mu(ay,n)),e.emoji=n=>e.check(tu(Zg,n)),e.guid=n=>e.check(ta(_u,n)),e.uuid=n=>e.check(Jc(zr,n)),e.uuidv4=n=>e.check(Yc(zr,n)),e.uuidv6=n=>e.check(Qc(zr,n)),e.uuidv7=n=>e.check(eu(zr,n)),e.nanoid=n=>e.check(nu(Xg,n)),e.guid=n=>e.check(ta(_u,n)),e.cuid=n=>e.check(ru(qg,n)),e.cuid2=n=>e.check(iu(Kg,n)),e.ulid=n=>e.check(ou(Jg,n)),e.base64=n=>e.check(du(iy,n)),e.base64url=n=>e.check(pu(oy,n)),e.xid=n=>e.check(su(Yg,n)),e.ksuid=n=>e.check(au(Qg,n)),e.ipv4=n=>e.check(cu(ey,n)),e.ipv6=n=>e.check(uu(ty,n)),e.cidrv4=n=>e.check(lu(ny,n)),e.cidrv6=n=>e.check(fu(ry,n)),e.e164=n=>e.check(hu(sy,n)),e.datetime=n=>e.check(Tg(n)),e.date=n=>e.check(Ag(n)),e.time=n=>e.check(Pg(n)),e.duration=n=>e.check(Rg(n))});function jg(e){return Dm(xa,e)}o(jg,"string");var Ye=M("ZodStringFormat",(e,t)=>{qe.init(e,t),Hg.init(e,t)}),Wg=M("ZodEmail",(e,t)=>{$p.init(e,t),Ye.init(e,t)});function jC(e){return Kc(Wg,e)}o(jC,"email");var _u=M("ZodGUID",(e,t)=>{Dp.init(e,t),Ye.init(e,t)});function GC(e){return ta(_u,e)}o(GC,"guid");var zr=M("ZodUUID",(e,t)=>{Lp.init(e,t),Ye.init(e,t)});function HC(e){return Jc(zr,e)}o(HC,"uuid");function WC(e){return Yc(zr,e)}o(WC,"uuidv4");function ZC(e){return Qc(zr,e)}o(ZC,"uuidv6");function XC(e){return eu(zr,e)}o(XC,"uuidv7");var wu=M("ZodURL",(e,t)=>{zp.init(e,t),Ye.init(e,t)});function qC(e){return na(wu,e)}o(qC,"url");function KC(e){return na(wu,x({protocol:/^https?$/,hostname:bn.domain},z.normalizeParams(e)))}o(KC,"httpUrl");var Zg=M("ZodEmoji",(e,t)=>{Bp.init(e,t),Ye.init(e,t)});function JC(e){return tu(Zg,e)}o(JC,"emoji");var Xg=M("ZodNanoID",(e,t)=>{Vp.init(e,t),Ye.init(e,t)});function YC(e){return nu(Xg,e)}o(YC,"nanoid");var qg=M("ZodCUID",(e,t)=>{jp.init(e,t),Ye.init(e,t)});function QC(e){return ru(qg,e)}o(QC,"cuid");var Kg=M("ZodCUID2",(e,t)=>{Gp.init(e,t),Ye.init(e,t)});function eO(e){return iu(Kg,e)}o(eO,"cuid2");var Jg=M("ZodULID",(e,t)=>{Hp.init(e,t),Ye.init(e,t)});function tO(e){return ou(Jg,e)}o(tO,"ulid");var Yg=M("ZodXID",(e,t)=>{Wp.init(e,t),Ye.init(e,t)});function nO(e){return su(Yg,e)}o(nO,"xid");var Qg=M("ZodKSUID",(e,t)=>{Zp.init(e,t),Ye.init(e,t)});function rO(e){return au(Qg,e)}o(rO,"ksuid");var ey=M("ZodIPv4",(e,t)=>{Yp.init(e,t),Ye.init(e,t)});function iO(e){return cu(ey,e)}o(iO,"ipv4");var ty=M("ZodIPv6",(e,t)=>{Qp.init(e,t),Ye.init(e,t)});function oO(e){return uu(ty,e)}o(oO,"ipv6");var ny=M("ZodCIDRv4",(e,t)=>{eh.init(e,t),Ye.init(e,t)});function sO(e){return lu(ny,e)}o(sO,"cidrv4");var ry=M("ZodCIDRv6",(e,t)=>{th.init(e,t),Ye.init(e,t)});function aO(e){return fu(ry,e)}o(aO,"cidrv6");var iy=M("ZodBase64",(e,t)=>{rh.init(e,t),Ye.init(e,t)});function cO(e){return du(iy,e)}o(cO,"base64");var oy=M("ZodBase64URL",(e,t)=>{ih.init(e,t),Ye.init(e,t)});function uO(e){return pu(oy,e)}o(uO,"base64url");var sy=M("ZodE164",(e,t)=>{oh.init(e,t),Ye.init(e,t)});function lO(e){return hu(sy,e)}o(lO,"e164");var ay=M("ZodJWT",(e,t)=>{sh.init(e,t),Ye.init(e,t)});function fO(e){return mu(ay,e)}o(fO,"jwt");var va=M("ZodCustomStringFormat",(e,t)=>{ah.init(e,t),Ye.init(e,t)});function dO(e,t,n={}){return Ro(va,e,t,n)}o(dO,"stringFormat");function pO(e){return Ro(va,"hostname",bn.hostname,e)}o(pO,"hostname");function hO(e){return Ro(va,"hex",bn.hex,e)}o(hO,"hex");function mO(e,t){var s;let n=(s=t==null?void 0:t.enc)!=null?s:"hex",i="".concat(e,"_").concat(n),r=bn[i];if(!r)throw new Error("Unrecognized hash format: ".concat(i));return Ro(va,i,r,t)}o(mO,"hash");var _a=M("ZodNumber",(e,t)=>{var i,r,s,a,u,l,c,d,h;Hc.init(e,t),de.init(e,t),e.gt=(m,y)=>e.check(Lr(m,y)),e.gte=(m,y)=>e.check(ln(m,y)),e.min=(m,y)=>e.check(ln(m,y)),e.lt=(m,y)=>e.check(Dr(m,y)),e.lte=(m,y)=>e.check(Fn(m,y)),e.max=(m,y)=>e.check(Fn(m,y)),e.int=m=>e.check(Gg(m)),e.safe=m=>e.check(Gg(m)),e.positive=m=>e.check(Lr(0,m)),e.nonnegative=m=>e.check(ln(0,m)),e.negative=m=>e.check(Dr(0,m)),e.nonpositive=m=>e.check(Fn(0,m)),e.multipleOf=(m,y)=>e.check(zi(m,y)),e.step=(m,y)=>e.check(zi(m,y)),e.finite=()=>e;let n=e._zod.bag;e.minValue=(s=Math.max((i=n.minimum)!=null?i:Number.NEGATIVE_INFINITY,(r=n.exclusiveMinimum)!=null?r:Number.NEGATIVE_INFINITY))!=null?s:null,e.maxValue=(l=Math.min((a=n.maximum)!=null?a:Number.POSITIVE_INFINITY,(u=n.exclusiveMaximum)!=null?u:Number.POSITIVE_INFINITY))!=null?l:null,e.isInt=((c=n.format)!=null?c:"").includes("int")||Number.isSafeInteger((d=n.multipleOf)!=null?d:.5),e.isFinite=!0,e.format=(h=n.format)!=null?h:null});function S0(e){return Gm(_a,e)}o(S0,"number");var Oo=M("ZodNumberFormat",(e,t)=>{ch.init(e,t),_a.init(e,t)});function Gg(e){return Wm(Oo,e)}o(Gg,"int");function gO(e){return Zm(Oo,e)}o(gO,"float32");function yO(e){return Xm(Oo,e)}o(yO,"float64");function xO(e){return qm(Oo,e)}o(xO,"int32");function vO(e){return Km(Oo,e)}o(vO,"uint32");var ba=M("ZodBoolean",(e,t)=>{Xs.init(e,t),de.init(e,t)});function I0(e){return Jm(ba,e)}o(I0,"boolean");var Sa=M("ZodBigInt",(e,t)=>{var i,r,s;Wc.init(e,t),de.init(e,t),e.gte=(a,u)=>e.check(ln(a,u)),e.min=(a,u)=>e.check(ln(a,u)),e.gt=(a,u)=>e.check(Lr(a,u)),e.gte=(a,u)=>e.check(ln(a,u)),e.min=(a,u)=>e.check(ln(a,u)),e.lt=(a,u)=>e.check(Dr(a,u)),e.lte=(a,u)=>e.check(Fn(a,u)),e.max=(a,u)=>e.check(Fn(a,u)),e.positive=a=>e.check(Lr(BigInt(0),a)),e.negative=a=>e.check(Dr(BigInt(0),a)),e.nonpositive=a=>e.check(Fn(BigInt(0),a)),e.nonnegative=a=>e.check(ln(BigInt(0),a)),e.multipleOf=(a,u)=>e.check(zi(a,u));let n=e._zod.bag;e.minValue=(i=n.minimum)!=null?i:null,e.maxValue=(r=n.maximum)!=null?r:null,e.format=(s=n.format)!=null?s:null});function _O(e){return Qm(Sa,e)}o(_O,"bigint");var cy=M("ZodBigIntFormat",(e,t)=>{uh.init(e,t),Sa.init(e,t)});function bO(e){return tg(cy,e)}o(bO,"int64");function SO(e){return ng(cy,e)}o(SO,"uint64");var w0=M("ZodSymbol",(e,t)=>{lh.init(e,t),de.init(e,t)});function IO(e){return rg(w0,e)}o(IO,"symbol");var M0=M("ZodUndefined",(e,t)=>{fh.init(e,t),de.init(e,t)});function wO(e){return ig(M0,e)}o(wO,"_undefined");var E0=M("ZodNull",(e,t)=>{dh.init(e,t),de.init(e,t)});function T0(e){return og(E0,e)}o(T0,"_null");var A0=M("ZodAny",(e,t)=>{ph.init(e,t),de.init(e,t)});function MO(){return sg(A0)}o(MO,"any");var P0=M("ZodUnknown",(e,t)=>{hh.init(e,t),de.init(e,t)});function Co(){return ag(P0)}o(Co,"unknown");var R0=M("ZodNever",(e,t)=>{mh.init(e,t),de.init(e,t)});function uy(e){return cg(R0,e)}o(uy,"never");var C0=M("ZodVoid",(e,t)=>{gh.init(e,t),de.init(e,t)});function EO(e){return ug(C0,e)}o(EO,"_void");var Mu=M("ZodDate",(e,t)=>{yh.init(e,t),de.init(e,t),e.min=(i,r)=>e.check(ln(i,r)),e.max=(i,r)=>e.check(Fn(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function TO(e){return lg(Mu,e)}o(TO,"date");var O0=M("ZodArray",(e,t)=>{xh.init(e,t),de.init(e,t),e.element=t.element,e.min=(n,i)=>e.check(vi(n,i)),e.nonempty=n=>e.check(vi(1,n)),e.max=(n,i)=>e.check(Ao(n,i)),e.length=(n,i)=>e.check(Po(n,i)),e.unwrap=()=>e.element});function Eu(e,t){return xg(O0,e,t)}o(Eu,"array");function AO(e){let t=e._zod.def.shape;return py(Object.keys(t))}o(AO,"keyof");var Tu=M("ZodObject",(e,t)=>{vh.init(e,t),de.init(e,t),z.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>py(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone(L(x({},e._zod.def),{catchall:n})),e.passthrough=()=>e.clone(L(x({},e._zod.def),{catchall:Co()})),e.loose=()=>e.clone(L(x({},e._zod.def),{catchall:Co()})),e.strict=()=>e.clone(L(x({},e._zod.def),{catchall:uy()})),e.strip=()=>e.clone(L(x({},e._zod.def),{catchall:void 0})),e.extend=n=>z.extend(e,n),e.safeExtend=n=>z.safeExtend(e,n),e.merge=n=>z.merge(e,n),e.pick=n=>z.pick(e,n),e.omit=n=>z.omit(e,n),e.partial=(...n)=>z.partial(my,e,n[0]),e.required=(...n)=>z.required(gy,e,n[0])});function PO(e,t){let n=x({type:"object",shape:e!=null?e:{}},z.normalizeParams(t));return new Tu(n)}o(PO,"object");function RO(e,t){return new Tu(x({type:"object",shape:e,catchall:uy()},z.normalizeParams(t)))}o(RO,"strictObject");function CO(e,t){return new Tu(x({type:"object",shape:e,catchall:Co()},z.normalizeParams(t)))}o(CO,"looseObject");var ly=M("ZodUnion",(e,t)=>{Zc.init(e,t),de.init(e,t),e.options=t.options});function fy(e,t){return new ly(x({type:"union",options:e},z.normalizeParams(t)))}o(fy,"union");var U0=M("ZodDiscriminatedUnion",(e,t)=>{ly.init(e,t),_h.init(e,t)});function OO(e,t,n){return new U0(x({type:"union",options:t,discriminator:e},z.normalizeParams(n)))}o(OO,"discriminatedUnion");var N0=M("ZodIntersection",(e,t)=>{bh.init(e,t),de.init(e,t)});function F0(e,t){return new N0({type:"intersection",left:e,right:t})}o(F0,"intersection");var k0=M("ZodTuple",(e,t)=>{Xc.init(e,t),de.init(e,t),e.rest=n=>e.clone(L(x({},e._zod.def),{rest:n}))});function D0(e,t,n){let i=t instanceof se,r=i?n:t,s=i?t:null;return new k0(x({type:"tuple",items:e,rest:s},z.normalizeParams(r)))}o(D0,"tuple");var dy=M("ZodRecord",(e,t)=>{Sh.init(e,t),de.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function L0(e,t,n){return new dy(x({type:"record",keyType:e,valueType:t},z.normalizeParams(n)))}o(L0,"record");function UO(e,t,n){let i=tn(e);return i._zod.values=void 0,new dy(x({type:"record",keyType:i,valueType:t},z.normalizeParams(n)))}o(UO,"partialRecord");var $0=M("ZodMap",(e,t)=>{Ih.init(e,t),de.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function NO(e,t,n){return new $0(x({type:"map",keyType:e,valueType:t},z.normalizeParams(n)))}o(NO,"map");var z0=M("ZodSet",(e,t)=>{wh.init(e,t),de.init(e,t),e.min=(...n)=>e.check(Bi(...n)),e.nonempty=n=>e.check(Bi(1,n)),e.max=(...n)=>e.check(To(...n)),e.size=(...n)=>e.check(ra(...n))});function FO(e,t){return new z0(x({type:"set",valueType:e},z.normalizeParams(t)))}o(FO,"set");var ya=M("ZodEnum",(e,t)=>{Mh.init(e,t),de.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let s={};for(let a of i)if(n.has(a))s[a]=t.entries[a];else throw new Error("Key ".concat(a," not found in enum"));return new ya(L(x(L(x({},t),{checks:[]}),z.normalizeParams(r)),{entries:s}))},e.exclude=(i,r)=>{let s=x({},t.entries);for(let a of i)if(n.has(a))delete s[a];else throw new Error("Key ".concat(a," not found in enum"));return new ya(L(x(L(x({},t),{checks:[]}),z.normalizeParams(r)),{entries:s}))}});function py(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ya(x({type:"enum",entries:n},z.normalizeParams(t)))}o(py,"_enum");function kO(e,t){return new ya(x({type:"enum",entries:e},z.normalizeParams(t)))}o(kO,"nativeEnum");var B0=M("ZodLiteral",(e,t)=>{Eh.init(e,t),de.init(e,t),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 DO(e,t){return new B0(x({type:"literal",values:Array.isArray(e)?e:[e]},z.normalizeParams(t)))}o(DO,"literal");var V0=M("ZodFile",(e,t)=>{Th.init(e,t),de.init(e,t),e.min=(n,i)=>e.check(Bi(n,i)),e.max=(n,i)=>e.check(To(n,i)),e.mime=(n,i)=>e.check(la(Array.isArray(n)?n:[n],i))});function LO(e){return vg(V0,e)}o(LO,"file");var j0=M("ZodTransform",(e,t)=>{Ah.init(e,t),de.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new pi(e.constructor.name);n.addIssue=s=>{var a,u,l;if(typeof s=="string")n.issues.push(z.issue(s,n.value,t));else{let c=s;c.fatal&&(c.continue=!1),(a=c.code)!=null||(c.code="custom"),(u=c.input)!=null||(c.input=n.value),(l=c.inst)!=null||(c.inst=e),n.issues.push(z.issue(c))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(s=>(n.value=s,n)):(n.value=r,n)}});function hy(e){return new j0({type:"transform",transform:e})}o(hy,"transform");var my=M("ZodOptional",(e,t)=>{Ph.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function bu(e){return new my({type:"optional",innerType:e})}o(bu,"optional");var G0=M("ZodNullable",(e,t)=>{Rh.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Su(e){return new G0({type:"nullable",innerType:e})}o(Su,"nullable");function $O(e){return bu(Su(e))}o($O,"nullish");var H0=M("ZodDefault",(e,t)=>{Ch.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function W0(e,t){return new H0({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():z.shallowClone(t)}})}o(W0,"_default");var Z0=M("ZodPrefault",(e,t)=>{Oh.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function X0(e,t){return new Z0({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():z.shallowClone(t)}})}o(X0,"prefault");var gy=M("ZodNonOptional",(e,t)=>{Uh.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function q0(e,t){return new gy(x({type:"nonoptional",innerType:e},z.normalizeParams(t)))}o(q0,"nonoptional");var K0=M("ZodSuccess",(e,t)=>{Nh.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function zO(e){return new K0({type:"success",innerType:e})}o(zO,"success");var J0=M("ZodCatch",(e,t)=>{Fh.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Y0(e,t){return new J0({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}o(Y0,"_catch");var Q0=M("ZodNaN",(e,t)=>{kh.init(e,t),de.init(e,t)});function BO(e){return dg(Q0,e)}o(BO,"nan");var yy=M("ZodPipe",(e,t)=>{Dh.init(e,t),de.init(e,t),e.in=t.in,e.out=t.out});function Iu(e,t){return new yy({type:"pipe",in:e,out:t})}o(Iu,"pipe");var xy=M("ZodCodec",(e,t)=>{yy.init(e,t),qs.init(e,t)});function VO(e,t,n){return new xy({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}o(VO,"codec");var eb=M("ZodReadonly",(e,t)=>{Lh.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function tb(e){return new eb({type:"readonly",innerType:e})}o(tb,"readonly");var nb=M("ZodTemplateLiteral",(e,t)=>{$h.init(e,t),de.init(e,t)});function jO(e,t){return new nb(x({type:"template_literal",parts:e},z.normalizeParams(t)))}o(jO,"templateLiteral");var rb=M("ZodLazy",(e,t)=>{Vh.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.getter()});function ib(e){return new rb({type:"lazy",getter:e})}o(ib,"lazy");var ob=M("ZodPromise",(e,t)=>{Bh.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function GO(e){return new ob({type:"promise",innerType:e})}o(GO,"promise");var sb=M("ZodFunction",(e,t)=>{zh.init(e,t),de.init(e,t)});function HO(e){var t,n;return new sb({type:"function",input:Array.isArray(e==null?void 0:e.input)?D0(e==null?void 0:e.input):(t=e==null?void 0:e.input)!=null?t:Eu(Co()),output:(n=e==null?void 0:e.output)!=null?n:Co()})}o(HO,"_function");var Au=M("ZodCustom",(e,t)=>{jh.init(e,t),de.init(e,t)});function WO(e){let t=new rt({check:"custom"});return t._zod.check=e,t}o(WO,"check");function ZO(e,t){return _g(Au,e!=null?e:()=>!0,t)}o(ZO,"custom");function ab(e,t={}){return bg(Au,e,t)}o(ab,"refine");function cb(e){return Sg(e)}o(cb,"superRefine");function XO(e,t={error:"Input not instance of ".concat(e.name)}){let n=new Au(x({type:"custom",check:"custom",fn:o(i=>i instanceof e,"fn"),abort:!0},z.normalizeParams(t)));return n._zod.bag.Class=e,n}o(XO,"_instanceof");var qO=o((...e)=>Ig({Codec:xy,Boolean:ba,String:xa},...e),"stringbool");function KO(e){let t=ib(()=>fy([jg(e),S0(),I0(),T0(),Eu(t),L0(jg(),t)]));return t}o(KO,"json");function JO(e,t){return Iu(hy(e),t)}o(JO,"preprocess");f();var YO={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 QO(e){xt({customError:e})}o(QO,"setErrorMap");function eU(){return xt().customError}o(eU,"getErrorMap");var vy;vy||(vy={});var Pu={};cn(Pu,{bigint:()=>iU,boolean:()=>rU,date:()=>oU,number:()=>nU,string:()=>tU});f();function tU(e){return Lm(xa,e)}o(tU,"string");function nU(e){return Hm(_a,e)}o(nU,"number");function rU(e){return Ym(ba,e)}o(rU,"boolean");function iU(e){return eg(Sa,e)}o(iU,"bigint");function oU(e){return fg(Mu,e)}o(oU,"date");xt(Ks());f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();var be={};cn(be,{HasPropertyKey:()=>sU,IsArray:()=>Ht,IsAsyncIterator:()=>_y,IsBigInt:()=>Ia,IsBoolean:()=>_i,IsDate:()=>Vi,IsFunction:()=>by,IsIterator:()=>Sy,IsNull:()=>Iy,IsNumber:()=>nr,IsObject:()=>He,IsRegExp:()=>wa,IsString:()=>Qe,IsSymbol:()=>wy,IsUint8Array:()=>Br,IsUndefined:()=>ct});f();function sU(e,t){return t in e}o(sU,"HasPropertyKey");function _y(e){return He(e)&&!Ht(e)&&!Br(e)&&Symbol.asyncIterator in e}o(_y,"IsAsyncIterator");function Ht(e){return Array.isArray(e)}o(Ht,"IsArray");function Ia(e){return typeof e=="bigint"}o(Ia,"IsBigInt");function _i(e){return typeof e=="boolean"}o(_i,"IsBoolean");function Vi(e){return e instanceof globalThis.Date}o(Vi,"IsDate");function by(e){return typeof e=="function"}o(by,"IsFunction");function Sy(e){return He(e)&&!Ht(e)&&!Br(e)&&Symbol.iterator in e}o(Sy,"IsIterator");function Iy(e){return e===null}o(Iy,"IsNull");function nr(e){return typeof e=="number"}o(nr,"IsNumber");function He(e){return typeof e=="object"&&e!==null}o(He,"IsObject");function wa(e){return e instanceof globalThis.RegExp}o(wa,"IsRegExp");function Qe(e){return typeof e=="string"}o(Qe,"IsString");function wy(e){return typeof e=="symbol"}o(wy,"IsSymbol");function Br(e){return e instanceof globalThis.Uint8Array}o(Br,"IsUint8Array");function ct(e){return e===void 0}o(ct,"IsUndefined");function aU(e){return e.map(t=>Ru(t))}o(aU,"ArrayType");function cU(e){return new Date(e.getTime())}o(cU,"DateType");function uU(e){return new Uint8Array(e)}o(uU,"Uint8ArrayType");function lU(e){return new RegExp(e.source,e.flags)}o(lU,"RegExpType");function fU(e){let t={};for(let n of Object.getOwnPropertyNames(e))t[n]=Ru(e[n]);for(let n of Object.getOwnPropertySymbols(e))t[n]=Ru(e[n]);return t}o(fU,"ObjectType");function Ru(e){return Ht(e)?aU(e):Vi(e)?cU(e):Br(e)?uU(e):wa(e)?lU(e):He(e)?fU(e):e}o(Ru,"Visit");function it(e){return Ru(e)}o(it,"Clone");function ub(e){return e.map(t=>Ma(t))}o(ub,"CloneRest");function Ma(e,t){return t===void 0?it(e):it(x(x({},t),e))}o(Ma,"CloneType");f();f();f();function Cu(e){return fe(e)&&Symbol.asyncIterator in e}o(Cu,"IsAsyncIterator");function Ou(e){return fe(e)&&Symbol.iterator in e}o(Ou,"IsIterator");function My(e){return fe(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}o(My,"IsStandardObject");function Uu(e){return e instanceof Promise}o(Uu,"IsPromise");function nn(e){return e instanceof Date&&Number.isFinite(e.getTime())}o(nn,"IsDate");function lb(e){return e instanceof globalThis.Map}o(lb,"IsMap");function fb(e){return e instanceof globalThis.Set}o(fb,"IsSet");function kn(e){return ArrayBuffer.isView(e)}o(kn,"IsTypedArray");function Uo(e){return e instanceof globalThis.Uint8Array}o(Uo,"IsUint8Array");function ie(e,t){return t in e}o(ie,"HasPropertyKey");function fe(e){return e!==null&&typeof e=="object"}o(fe,"IsObject");function ae(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)}o(ae,"IsArray");function ut(e){return e===void 0}o(ut,"IsUndefined");function Vr(e){return e===null}o(Vr,"IsNull");function yr(e){return typeof e=="boolean"}o(yr,"IsBoolean");function ee(e){return typeof e=="number"}o(ee,"IsNumber");function Nu(e){return Number.isInteger(e)}o(Nu,"IsInteger");function Ut(e){return typeof e=="bigint"}o(Ut,"IsBigInt");function Se(e){return typeof e=="string"}o(Se,"IsString");function bi(e){return typeof e=="function"}o(bi,"IsFunction");function jr(e){return typeof e=="symbol"}o(jr,"IsSymbol");function Nt(e){return Ut(e)||yr(e)||Vr(e)||ee(e)||Se(e)||jr(e)||ut(e)}o(Nt,"IsValueType");var Le;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(a,u){return e.ExactOptionalPropertyTypes?u in a:a[u]!==void 0}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function n(a){let u=fe(a);return e.AllowArrayObject?u:u&&!ae(a)}o(n,"IsObjectLike"),e.IsObjectLike=n;function i(a){return n(a)&&!(a instanceof Date)&&!(a instanceof Uint8Array)}o(i,"IsRecordLike"),e.IsRecordLike=i;function r(a){return e.AllowNaN?ee(a):Number.isFinite(a)}o(r,"IsNumberLike"),e.IsNumberLike=r;function s(a){let u=ut(a);return e.AllowNullVoid?u||a===null:u}o(s,"IsVoidLike"),e.IsVoidLike=s})(Le||(Le={}));f();function dU(e){return globalThis.Object.freeze(e).map(t=>Ea(t))}o(dU,"ImmutableArray");function pU(e){let t={};for(let n of Object.getOwnPropertyNames(e))t[n]=Ea(e[n]);for(let n of Object.getOwnPropertySymbols(e))t[n]=Ea(e[n]);return globalThis.Object.freeze(t)}o(pU,"ImmutableObject");function Ea(e){return Ht(e)?dU(e):Vi(e)?e:Br(e)?e:wa(e)?e:He(e)?pU(e):e}o(Ea,"Immutable");function N(e,t){let n=t!==void 0?x(x({},t),e):e;switch(Le.InstanceMode){case"freeze":return Ea(n);case"clone":return it(n);default:return n}}o(N,"CreateType");f();var Ey=class Ey extends Error{constructor(t){super(t)}};o(Ey,"TypeBoxError");var re=Ey;f();f();f();var ot=Symbol.for("TypeBox.Transform"),Gr=Symbol.for("TypeBox.Readonly"),rn=Symbol.for("TypeBox.Optional"),Dn=Symbol.for("TypeBox.Hint"),P=Symbol.for("TypeBox.Kind");function db(e){return He(e)&&e[Gr]==="Readonly"}o(db,"IsReadonly");function xr(e){return He(e)&&e[rn]==="Optional"}o(xr,"IsOptional");function Ty(e){return Ee(e,"Any")}o(Ty,"IsAny");function Hr(e){return Ee(e,"Array")}o(Hr,"IsArray");function Ta(e){return Ee(e,"AsyncIterator")}o(Ta,"IsAsyncIterator");function Ay(e){return Ee(e,"BigInt")}o(Ay,"IsBigInt");function Py(e){return Ee(e,"Boolean")}o(Py,"IsBoolean");function Aa(e){return Ee(e,"Constructor")}o(Aa,"IsConstructor");function hU(e){return Ee(e,"Date")}o(hU,"IsDate");function Pa(e){return Ee(e,"Function")}o(Pa,"IsFunction");function ji(e){return Ee(e,"Integer")}o(ji,"IsInteger");function vt(e){return Ee(e,"Intersect")}o(vt,"IsIntersect");function Ra(e){return Ee(e,"Iterator")}o(Ra,"IsIterator");function Ee(e,t){return He(e)&&P in e&&e[P]===t}o(Ee,"IsKindOf");function Wr(e){return Ee(e,"Literal")}o(Wr,"IsLiteral");function Sn(e){return Ee(e,"MappedKey")}o(Sn,"IsMappedKey");function st(e){return Ee(e,"MappedResult")}o(st,"IsMappedResult");function Si(e){return Ee(e,"Never")}o(Si,"IsNever");function mU(e){return Ee(e,"Not")}o(mU,"IsNot");function gU(e){return Ee(e,"Null")}o(gU,"IsNull");function Gi(e){return Ee(e,"Number")}o(Gi,"IsNumber");function Mt(e){return Ee(e,"Object")}o(Mt,"IsObject");function Hi(e){return Ee(e,"Promise")}o(Hi,"IsPromise");function Ry(e){return Ee(e,"Record")}o(Ry,"IsRecord");function Cy(e){return Ee(e,"Ref")}o(Cy,"IsRef");function Oy(e){return Ee(e,"RegExp")}o(Oy,"IsRegExp");function Ca(e){return Ee(e,"String")}o(Ca,"IsString");function yU(e){return Ee(e,"Symbol")}o(yU,"IsSymbol");function In(e){return Ee(e,"TemplateLiteral")}o(In,"IsTemplateLiteral");function xU(e){return Ee(e,"This")}o(xU,"IsThis");function No(e){return He(e)&&ot in e}o(No,"IsTransform");function rr(e){return Ee(e,"Tuple")}o(rr,"IsTuple");function vU(e){return Ee(e,"Undefined")}o(vU,"IsUndefined");function Ce(e){return Ee(e,"Union")}o(Ce,"IsUnion");function _U(e){return Ee(e,"Uint8Array")}o(_U,"IsUint8Array");function bU(e){return Ee(e,"Unknown")}o(bU,"IsUnknown");function SU(e){return Ee(e,"Unsafe")}o(SU,"IsUnsafe");function IU(e){return Ee(e,"Void")}o(IU,"IsVoid");function Ii(e){return He(e)&&P in e&&Qe(e[P])}o(Ii,"IsKind");function ir(e){return Ty(e)||Hr(e)||Py(e)||Ay(e)||Ta(e)||Aa(e)||hU(e)||Pa(e)||ji(e)||vt(e)||Ra(e)||Wr(e)||Sn(e)||st(e)||Si(e)||mU(e)||gU(e)||Gi(e)||Mt(e)||Hi(e)||Ry(e)||Cy(e)||Oy(e)||Ca(e)||yU(e)||In(e)||xU(e)||rr(e)||vU(e)||Ce(e)||_U(e)||bU(e)||SU(e)||IU(e)||Ii(e)}o(ir,"IsSchema");var _={};cn(_,{IsAny:()=>gb,IsArray:()=>yb,IsAsyncIterator:()=>xb,IsBigInt:()=>vb,IsBoolean:()=>_b,IsConstructor:()=>bb,IsDate:()=>Sb,IsFunction:()=>Ib,IsInteger:()=>wb,IsIntersect:()=>Mb,IsIterator:()=>Eb,IsKind:()=>Kb,IsKindOf:()=>we,IsLiteral:()=>Ua,IsLiteralBoolean:()=>PU,IsLiteralNumber:()=>Ab,IsLiteralString:()=>Tb,IsLiteralValue:()=>Pb,IsMappedKey:()=>Rb,IsMappedResult:()=>Cb,IsNever:()=>Ob,IsNot:()=>Ub,IsNull:()=>Nb,IsNumber:()=>Fb,IsObject:()=>kb,IsOptional:()=>AU,IsPromise:()=>Db,IsProperties:()=>ky,IsReadonly:()=>TU,IsRecord:()=>Lb,IsRecursive:()=>RU,IsRef:()=>$b,IsRegExp:()=>zb,IsSchema:()=>Ie,IsString:()=>Bb,IsSymbol:()=>Vb,IsTemplateLiteral:()=>jb,IsThis:()=>Gb,IsTransform:()=>et,IsTuple:()=>Hb,IsUint8Array:()=>Wb,IsUndefined:()=>Fo,IsUnion:()=>Dy,IsUnionLiteral:()=>CU,IsUnknown:()=>Zb,IsUnsafe:()=>Xb,IsVoid:()=>qb,TypeGuardUnknownTypeError:()=>Uy});f();var Ly=class Ly extends re{};o(Ly,"TypeGuardUnknownTypeError");var Uy=Ly,wU=["Any","Array","AsyncIterator","BigInt","Boolean","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function pb(e){try{return new RegExp(e),!0}catch(t){return!1}}o(pb,"IsPattern");function Ny(e){if(!Qe(e))return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=7&&n<=13||n===27||n===127)return!1}return!0}o(Ny,"IsControlCharacterFree");function hb(e){return Fy(e)||Ie(e)}o(hb,"IsAdditionalProperties");function Oa(e){return ct(e)||Ia(e)}o(Oa,"IsOptionalBigInt");function Ke(e){return ct(e)||nr(e)}o(Ke,"IsOptionalNumber");function Fy(e){return ct(e)||_i(e)}o(Fy,"IsOptionalBoolean");function ze(e){return ct(e)||Qe(e)}o(ze,"IsOptionalString");function MU(e){return ct(e)||Qe(e)&&Ny(e)&&pb(e)}o(MU,"IsOptionalPattern");function EU(e){return ct(e)||Qe(e)&&Ny(e)}o(EU,"IsOptionalFormat");function mb(e){return ct(e)||Ie(e)}o(mb,"IsOptionalSchema");function TU(e){return He(e)&&e[Gr]==="Readonly"}o(TU,"IsReadonly");function AU(e){return He(e)&&e[rn]==="Optional"}o(AU,"IsOptional");function gb(e){return we(e,"Any")&&ze(e.$id)}o(gb,"IsAny");function yb(e){return we(e,"Array")&&e.type==="array"&&ze(e.$id)&&Ie(e.items)&&Ke(e.minItems)&&Ke(e.maxItems)&&Fy(e.uniqueItems)&&mb(e.contains)&&Ke(e.minContains)&&Ke(e.maxContains)}o(yb,"IsArray");function xb(e){return we(e,"AsyncIterator")&&e.type==="AsyncIterator"&&ze(e.$id)&&Ie(e.items)}o(xb,"IsAsyncIterator");function vb(e){return we(e,"BigInt")&&e.type==="bigint"&&ze(e.$id)&&Oa(e.exclusiveMaximum)&&Oa(e.exclusiveMinimum)&&Oa(e.maximum)&&Oa(e.minimum)&&Oa(e.multipleOf)}o(vb,"IsBigInt");function _b(e){return we(e,"Boolean")&&e.type==="boolean"&&ze(e.$id)}o(_b,"IsBoolean");function bb(e){return we(e,"Constructor")&&e.type==="Constructor"&&ze(e.$id)&&Ht(e.parameters)&&e.parameters.every(t=>Ie(t))&&Ie(e.returns)}o(bb,"IsConstructor");function Sb(e){return we(e,"Date")&&e.type==="Date"&&ze(e.$id)&&Ke(e.exclusiveMaximumTimestamp)&&Ke(e.exclusiveMinimumTimestamp)&&Ke(e.maximumTimestamp)&&Ke(e.minimumTimestamp)&&Ke(e.multipleOfTimestamp)}o(Sb,"IsDate");function Ib(e){return we(e,"Function")&&e.type==="Function"&&ze(e.$id)&&Ht(e.parameters)&&e.parameters.every(t=>Ie(t))&&Ie(e.returns)}o(Ib,"IsFunction");function wb(e){return we(e,"Integer")&&e.type==="integer"&&ze(e.$id)&&Ke(e.exclusiveMaximum)&&Ke(e.exclusiveMinimum)&&Ke(e.maximum)&&Ke(e.minimum)&&Ke(e.multipleOf)}o(wb,"IsInteger");function ky(e){return He(e)&&Object.entries(e).every(([t,n])=>Ny(t)&&Ie(n))}o(ky,"IsProperties");function Mb(e){return we(e,"Intersect")&&!(Qe(e.type)&&e.type!=="object")&&Ht(e.allOf)&&e.allOf.every(t=>Ie(t)&&!et(t))&&ze(e.type)&&(Fy(e.unevaluatedProperties)||mb(e.unevaluatedProperties))&&ze(e.$id)}o(Mb,"IsIntersect");function Eb(e){return we(e,"Iterator")&&e.type==="Iterator"&&ze(e.$id)&&Ie(e.items)}o(Eb,"IsIterator");function we(e,t){return He(e)&&P in e&&e[P]===t}o(we,"IsKindOf");function Tb(e){return Ua(e)&&Qe(e.const)}o(Tb,"IsLiteralString");function Ab(e){return Ua(e)&&nr(e.const)}o(Ab,"IsLiteralNumber");function PU(e){return Ua(e)&&_i(e.const)}o(PU,"IsLiteralBoolean");function Ua(e){return we(e,"Literal")&&ze(e.$id)&&Pb(e.const)}o(Ua,"IsLiteral");function Pb(e){return _i(e)||nr(e)||Qe(e)}o(Pb,"IsLiteralValue");function Rb(e){return we(e,"MappedKey")&&Ht(e.keys)&&e.keys.every(t=>nr(t)||Qe(t))}o(Rb,"IsMappedKey");function Cb(e){return we(e,"MappedResult")&&ky(e.properties)}o(Cb,"IsMappedResult");function Ob(e){return we(e,"Never")&&He(e.not)&&Object.getOwnPropertyNames(e.not).length===0}o(Ob,"IsNever");function Ub(e){return we(e,"Not")&&Ie(e.not)}o(Ub,"IsNot");function Nb(e){return we(e,"Null")&&e.type==="null"&&ze(e.$id)}o(Nb,"IsNull");function Fb(e){return we(e,"Number")&&e.type==="number"&&ze(e.$id)&&Ke(e.exclusiveMaximum)&&Ke(e.exclusiveMinimum)&&Ke(e.maximum)&&Ke(e.minimum)&&Ke(e.multipleOf)}o(Fb,"IsNumber");function kb(e){return we(e,"Object")&&e.type==="object"&&ze(e.$id)&&ky(e.properties)&&hb(e.additionalProperties)&&Ke(e.minProperties)&&Ke(e.maxProperties)}o(kb,"IsObject");function Db(e){return we(e,"Promise")&&e.type==="Promise"&&ze(e.$id)&&Ie(e.item)}o(Db,"IsPromise");function Lb(e){return we(e,"Record")&&e.type==="object"&&ze(e.$id)&&hb(e.additionalProperties)&&He(e.patternProperties)&&(t=>{let n=Object.getOwnPropertyNames(t.patternProperties);return n.length===1&&pb(n[0])&&He(t.patternProperties)&&Ie(t.patternProperties[n[0]])})(e)}o(Lb,"IsRecord");function RU(e){return He(e)&&Dn in e&&e[Dn]==="Recursive"}o(RU,"IsRecursive");function $b(e){return we(e,"Ref")&&ze(e.$id)&&Qe(e.$ref)}o($b,"IsRef");function zb(e){return we(e,"RegExp")&&ze(e.$id)&&Qe(e.source)&&Qe(e.flags)&&Ke(e.maxLength)&&Ke(e.minLength)}o(zb,"IsRegExp");function Bb(e){return we(e,"String")&&e.type==="string"&&ze(e.$id)&&Ke(e.minLength)&&Ke(e.maxLength)&&MU(e.pattern)&&EU(e.format)}o(Bb,"IsString");function Vb(e){return we(e,"Symbol")&&e.type==="symbol"&&ze(e.$id)}o(Vb,"IsSymbol");function jb(e){return we(e,"TemplateLiteral")&&e.type==="string"&&Qe(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}o(jb,"IsTemplateLiteral");function Gb(e){return we(e,"This")&&ze(e.$id)&&Qe(e.$ref)}o(Gb,"IsThis");function et(e){return He(e)&&ot in e}o(et,"IsTransform");function Hb(e){return we(e,"Tuple")&&e.type==="array"&&ze(e.$id)&&nr(e.minItems)&&nr(e.maxItems)&&e.minItems===e.maxItems&&(ct(e.items)&&ct(e.additionalItems)&&e.minItems===0||Ht(e.items)&&e.items.every(t=>Ie(t)))}o(Hb,"IsTuple");function Fo(e){return we(e,"Undefined")&&e.type==="undefined"&&ze(e.$id)}o(Fo,"IsUndefined");function CU(e){return Dy(e)&&e.anyOf.every(t=>Tb(t)||Ab(t))}o(CU,"IsUnionLiteral");function Dy(e){return we(e,"Union")&&ze(e.$id)&&He(e)&&Ht(e.anyOf)&&e.anyOf.every(t=>Ie(t))}o(Dy,"IsUnion");function Wb(e){return we(e,"Uint8Array")&&e.type==="Uint8Array"&&ze(e.$id)&&Ke(e.minByteLength)&&Ke(e.maxByteLength)}o(Wb,"IsUint8Array");function Zb(e){return we(e,"Unknown")&&ze(e.$id)}o(Zb,"IsUnknown");function Xb(e){return we(e,"Unsafe")}o(Xb,"IsUnsafe");function qb(e){return we(e,"Void")&&e.type==="void"&&ze(e.$id)}o(qb,"IsVoid");function Kb(e){return He(e)&&P in e&&Qe(e[P])&&!wU.includes(e[P])}o(Kb,"IsKind");function Ie(e){return He(e)&&(gb(e)||yb(e)||_b(e)||vb(e)||xb(e)||bb(e)||Sb(e)||Ib(e)||wb(e)||Mb(e)||Eb(e)||Ua(e)||Rb(e)||Cb(e)||Ob(e)||Ub(e)||Nb(e)||Fb(e)||kb(e)||Db(e)||Lb(e)||$b(e)||zb(e)||Bb(e)||Vb(e)||jb(e)||Gb(e)||Hb(e)||Fo(e)||Dy(e)||Wb(e)||Zb(e)||Xb(e)||qb(e)||Kb(e))}o(Ie,"IsSchema");f();var $y="(true|false)",Na="(0|[1-9][0-9]*)",zy="(.*)",OU="(?!.*)",Z9="^".concat($y,"$"),Zr="^".concat(Na,"$"),Xr="^".concat(zy,"$"),Jb="^".concat(OU,"$");f();var on={};cn(on,{Clear:()=>NU,Delete:()=>FU,Entries:()=>UU,Get:()=>LU,Has:()=>kU,Set:()=>DU});f();var ko=new Map;function UU(){return new Map(ko)}o(UU,"Entries");function NU(){return ko.clear()}o(NU,"Clear");function FU(e){return ko.delete(e)}o(FU,"Delete");function kU(e){return ko.has(e)}o(kU,"Has");function DU(e,t){ko.set(e,t)}o(DU,"Set");function LU(e){return ko.get(e)}o(LU,"Get");var Et={};cn(Et,{Clear:()=>zU,Delete:()=>BU,Entries:()=>$U,Get:()=>GU,Has:()=>VU,Set:()=>jU});f();var Do=new Map;function $U(){return new Map(Do)}o($U,"Entries");function zU(){return Do.clear()}o(zU,"Clear");function BU(e){return Do.delete(e)}o(BU,"Delete");function VU(e){return Do.has(e)}o(VU,"Has");function jU(e,t){Do.set(e,t)}o(jU,"Set");function GU(e){return Do.get(e)}o(GU,"Get");f();function Yb(e,t){return e.includes(t)}o(Yb,"SetIncludes");function Qb(e){return[...new Set(e)]}o(Qb,"SetDistinct");function HU(e,t){return e.filter(n=>t.includes(n))}o(HU,"SetIntersect");function WU(e,t){return e.reduce((n,i)=>HU(n,i),t)}o(WU,"SetIntersectManyResolve");function eS(e){return e.length===1?e[0]:e.length>1?WU(e.slice(1),e[0]):[]}o(eS,"SetIntersectMany");function tS(e){let t=[];for(let n of e)t.push(...n);return t}o(tS,"SetUnionMany");f();function wi(e){return N({[P]:"Any"},e)}o(wi,"Any");f();function Fu(e,t){return N({[P]:"Array",type:"array",items:e},t)}o(Fu,"Array");f();function ku(e,t){return N({[P]:"AsyncIterator",type:"AsyncIterator",items:e},t)}o(ku,"AsyncIterator");f();f();f();function ZU(e,t){let r=e,{[t]:n}=r;return Es(r,[lc(t)])}o(ZU,"DiscardKey");function ht(e,t){return t.reduce((n,i)=>ZU(n,i),e)}o(ht,"Discard");f();function Be(e){return N({[P]:"Never",not:{}},e)}o(Be,"Never");f();f();function Te(e){return N({[P]:"MappedResult",properties:e})}o(Te,"MappedResult");f();f();function Du(e,t,n){return N({[P]:"Constructor",type:"Constructor",parameters:e,returns:t},n)}o(Du,"Constructor");f();function Mi(e,t,n){return N({[P]:"Function",type:"Function",parameters:e,returns:t},n)}o(Mi,"Function");f();f();f();f();function Fa(e,t){return N({[P]:"Union",anyOf:e},t)}o(Fa,"UnionCreate");function XU(e){return e.some(t=>xr(t))}o(XU,"IsUnionOptional");function nS(e){return e.map(t=>xr(t)?qU(t):t)}o(nS,"RemoveOptionalFromRest");function qU(e){return ht(e,[rn])}o(qU,"RemoveOptionalFromType");function KU(e,t){return XU(e)?dn(Fa(nS(e),t)):Fa(nS(e),t)}o(KU,"ResolveUnion");function vr(e,t){return e.length===0?Be(t):e.length===1?N(e[0],t):KU(e,t)}o(vr,"UnionEvaluated");f();function Ve(e,t){return e.length===0?Be(t):e.length===1?N(e[0],t):Fa(e,t)}o(Ve,"Union");f();f();f();var Vy=class Vy extends re{};o(Vy,"TemplateLiteralParserError");var Lu=Vy;function JU(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}o(JU,"Unescape");function By(e,t,n){return e[t]===n&&e.charCodeAt(t-1)!==92}o(By,"IsNonEscaped");function qr(e,t){return By(e,t,"(")}o(qr,"IsOpenParen");function ka(e,t){return By(e,t,")")}o(ka,"IsCloseParen");function rS(e,t){return By(e,t,"|")}o(rS,"IsSeparator");function YU(e){if(!(qr(e,0)&&ka(e,e.length-1)))return!1;let t=0;for(let n=0;n<e.length;n++)if(qr(e,n)&&(t+=1),ka(e,n)&&(t-=1),t===0&&n!==e.length-1)return!1;return!0}o(YU,"IsGroup");function QU(e){return e.slice(1,e.length-1)}o(QU,"InGroup");function eN(e){let t=0;for(let n=0;n<e.length;n++)if(qr(e,n)&&(t+=1),ka(e,n)&&(t-=1),rS(e,n)&&t===0)return!0;return!1}o(eN,"IsPrecedenceOr");function tN(e){for(let t=0;t<e.length;t++)if(qr(e,t))return!0;return!1}o(tN,"IsPrecedenceAnd");function nN(e){let[t,n]=[0,0],i=[];for(let s=0;s<e.length;s++)if(qr(e,s)&&(t+=1),ka(e,s)&&(t-=1),rS(e,s)&&t===0){let a=e.slice(n,s);a.length>0&&i.push(Lo(a)),n=s+1}let r=e.slice(n);return r.length>0&&i.push(Lo(r)),i.length===0?{type:"const",const:""}:i.length===1?i[0]:{type:"or",expr:i}}o(nN,"Or");function rN(e){function t(r,s){if(!qr(r,s))throw new Lu("TemplateLiteralParser: Index must point to open parens");let a=0;for(let u=s;u<r.length;u++)if(qr(r,u)&&(a+=1),ka(r,u)&&(a-=1),a===0)return[s,u];throw new Lu("TemplateLiteralParser: Unclosed group parens in expression")}o(t,"Group");function n(r,s){for(let a=s;a<r.length;a++)if(qr(r,a))return[s,a];return[s,r.length]}o(n,"Range");let i=[];for(let r=0;r<e.length;r++)if(qr(e,r)){let[s,a]=t(e,r),u=e.slice(s,a+1);i.push(Lo(u)),r=a}else{let[s,a]=n(e,r),u=e.slice(s,a);u.length>0&&i.push(Lo(u)),r=a-1}return i.length===0?{type:"const",const:""}:i.length===1?i[0]:{type:"and",expr:i}}o(rN,"And");function Lo(e){return YU(e)?Lo(QU(e)):eN(e)?nN(e):tN(e)?rN(e):{type:"const",const:JU(e)}}o(Lo,"TemplateLiteralParse");function $o(e){return Lo(e.slice(1,e.length-1))}o($o,"TemplateLiteralParseExact");var Gy=class Gy extends re{};o(Gy,"TemplateLiteralFiniteError");var jy=Gy;function iN(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="0"&&e.expr[1].type==="const"&&e.expr[1].const==="[1-9][0-9]*"}o(iN,"IsNumberExpression");function oN(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="true"&&e.expr[1].type==="const"&&e.expr[1].const==="false"}o(oN,"IsBooleanExpression");function sN(e){return e.type==="const"&&e.const===".*"}o(sN,"IsStringExpression");function Wi(e){return iN(e)||sN(e)?!1:oN(e)?!0:e.type==="and"?e.expr.every(t=>Wi(t)):e.type==="or"?e.expr.every(t=>Wi(t)):e.type==="const"?!0:(()=>{throw new jy("Unknown expression type")})()}o(Wi,"IsTemplateLiteralExpressionFinite");function $u(e){let t=$o(e.pattern);return Wi(t)}o($u,"IsTemplateLiteralFinite");f();var Wy=class Wy extends re{};o(Wy,"TemplateLiteralGenerateError");var Hy=Wy;function*iS(e){if(e.length===1)return yield*k(e[0]);for(let t of e[0])for(let n of iS(e.slice(1)))yield"".concat(t).concat(n)}o(iS,"GenerateReduce");function*aN(e){return yield*k(iS(e.expr.map(t=>[...Da(t)])))}o(aN,"GenerateAnd");function*cN(e){for(let t of e.expr)yield*k(Da(t))}o(cN,"GenerateOr");function*uN(e){return yield e.const}o(uN,"GenerateConst");function*Da(e){return e.type==="and"?yield*k(aN(e)):e.type==="or"?yield*k(cN(e)):e.type==="const"?yield*k(uN(e)):(()=>{throw new Hy("Unknown expression")})()}o(Da,"TemplateLiteralExpressionGenerate");function zo(e){let t=$o(e.pattern);return Wi(t)?[...Da(t)]:[]}o(zo,"TemplateLiteralGenerate");f();f();function Fe(e,t){return N({[P]:"Literal",const:e,type:typeof e},t)}o(Fe,"Literal");f();function zu(e){return N({[P]:"Boolean",type:"boolean"},e)}o(zu,"Boolean");f();function Bo(e){return N({[P]:"BigInt",type:"bigint"},e)}o(Bo,"BigInt");f();function _r(e){return N({[P]:"Number",type:"number"},e)}o(_r,"Number");f();function Ln(e){return N({[P]:"String",type:"string"},e)}o(Ln,"String");function*lN(e){let t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield zu():t==="number"?yield _r():t==="bigint"?yield Bo():t==="string"?yield Ln():yield(()=>{let n=t.split("|").map(i=>Fe(i.trim()));return n.length===0?Be():n.length===1?n[0]:vr(n)})()}o(lN,"FromUnion");function*fN(e){if(e[1]!=="{"){let t=Fe("$"),n=Zy(e.slice(1));return yield*k([t,...n])}for(let t=2;t<e.length;t++)if(e[t]==="}"){let n=lN(e.slice(2,t)),i=Zy(e.slice(t+1));return yield*k([...n,...i])}yield Fe(e)}o(fN,"FromTerminal");function*Zy(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){let n=Fe(e.slice(0,t)),i=fN(e.slice(t));return yield*k([n,...i])}yield Fe(e)}o(Zy,"FromSyntax");function oS(e){return[...Zy(e)]}o(oS,"TemplateLiteralSyntax");f();var Ky=class Ky extends re{};o(Ky,"TemplateLiteralPatternError");var Xy=Ky;function dN(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(dN,"Escape");function sS(e,t){return In(e)?e.pattern.slice(1,e.pattern.length-1):Ce(e)?"(".concat(e.anyOf.map(n=>sS(n,t)).join("|"),")"):Gi(e)?"".concat(t).concat(Na):ji(e)?"".concat(t).concat(Na):Ay(e)?"".concat(t).concat(Na):Ca(e)?"".concat(t).concat(zy):Wr(e)?"".concat(t).concat(dN(e.const.toString())):Py(e)?"".concat(t).concat($y):(()=>{throw new Xy("Unexpected Kind '".concat(e[P],"'"))})()}o(sS,"Visit");function qy(e){return"^".concat(e.map(t=>sS(t,"")).join(""),"$")}o(qy,"TemplateLiteralPattern");f();function Zi(e){let n=zo(e).map(i=>Fe(i));return vr(n)}o(Zi,"TemplateLiteralToUnion");f();function Bu(e,t){let n=Qe(e)?qy(oS(e)):qy(e);return N({[P]:"TemplateLiteral",type:"string",pattern:n},t)}o(Bu,"TemplateLiteral");function pN(e){return zo(e).map(n=>n.toString())}o(pN,"FromTemplateLiteral");function hN(e){let t=[];for(let n of e)t.push(...pn(n));return t}o(hN,"FromUnion");function mN(e){return[e.toString()]}o(mN,"FromLiteral");function pn(e){return[...new Set(In(e)?pN(e):Ce(e)?hN(e.anyOf):Wr(e)?mN(e.const):Gi(e)?["[number]"]:ji(e)?["[number]"]:[])]}o(pn,"IndexPropertyKeys");f();function gN(e,t,n){let i={};for(let r of Object.getOwnPropertyNames(t))i[r]=Vo(e,pn(t[r]),n);return i}o(gN,"FromProperties");function yN(e,t,n){return gN(e,t.properties,n)}o(yN,"FromMappedResult");function aS(e,t,n){let i=yN(e,t,n);return Te(i)}o(aS,"IndexFromMappedResult");function uS(e,t){return e.map(n=>lS(n,t))}o(uS,"FromRest");function xN(e){return e.filter(t=>!Si(t))}o(xN,"FromIntersectRest");function vN(e,t){return Vu(xN(uS(e,t)))}o(vN,"FromIntersect");function _N(e){return e.some(t=>Si(t))?[]:e}o(_N,"FromUnionRest");function bN(e,t){return vr(_N(uS(e,t)))}o(bN,"FromUnion");function SN(e,t){return t in e?e[t]:t==="[number]"?vr(e):Be()}o(SN,"FromTuple");function IN(e,t){return t==="[number]"?e:Be()}o(IN,"FromArray");function wN(e,t){return t in e?e[t]:Be()}o(wN,"FromProperty");function lS(e,t){var n;return vt(e)?vN(e.allOf,t):Ce(e)?bN(e.anyOf,t):rr(e)?SN((n=e.items)!=null?n:[],t):Hr(e)?IN(e.items,t):Mt(e)?wN(e.properties,t):Be()}o(lS,"IndexFromPropertyKey");function La(e,t){return t.map(n=>lS(e,n))}o(La,"IndexFromPropertyKeys");function cS(e,t){return vr(La(e,t))}o(cS,"FromSchema");function Vo(e,t,n){return st(t)?aS(e,t,n):Sn(t)?fS(e,t,n):N(ir(t)?cS(e,pn(t)):cS(e,t),n)}o(Vo,"Index");function MN(e,t,n){return{[t]:Vo(e,[t],it(n))}}o(MN,"MappedIndexPropertyKey");function EN(e,t,n){return t.reduce((i,r)=>x(x({},i),MN(e,r,n)),{})}o(EN,"MappedIndexPropertyKeys");function TN(e,t,n){return EN(e,t.keys,n)}o(TN,"MappedIndexProperties");function fS(e,t,n){let i=TN(e,t,n);return Te(i)}o(fS,"IndexFromMappedKey");f();function ju(e,t){return N({[P]:"Iterator",type:"Iterator",items:e},t)}o(ju,"Iterator");f();function AN(e){let t=[];for(let n in e)xr(e[n])||t.push(n);return t}o(AN,"RequiredKeys");function PN(e,t){let n=AN(e),i=n.length>0?{[P]:"Object",type:"object",properties:e,required:n}:{[P]:"Object",type:"object",properties:e};return N(i,t)}o(PN,"_Object");var We=PN;f();function Gu(e,t){return N({[P]:"Promise",type:"Promise",item:e},t)}o(Gu,"Promise");f();f();function RN(e){return N(ht(e,[Gr]))}o(RN,"RemoveReadonly");function CN(e){return N(L(x({},e),{[Gr]:"Readonly"}))}o(CN,"AddReadonly");function ON(e,t){return t===!1?RN(e):CN(e)}o(ON,"ReadonlyWithFlag");function $n(e,t){let n=t!=null?t:!0;return st(e)?dS(e,n):ON(e,n)}o($n,"Readonly");function UN(e,t){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=$n(e[i],t);return n}o(UN,"FromProperties");function NN(e,t){return UN(e.properties,t)}o(NN,"FromMappedResult");function dS(e,t){let n=NN(e,t);return Te(n)}o(dS,"ReadonlyFromMappedResult");f();function br(e,t){return N(e.length>0?{[P]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[P]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},t)}o(br,"Tuple");function pS(e,t){return e in t?zn(e,t[e]):Te(t)}o(pS,"FromMappedResult");function FN(e){return{[e]:Fe(e)}}o(FN,"MappedKeyToKnownMappedResultProperties");function kN(e){let t={};for(let n of e)t[n]=Fe(n);return t}o(kN,"MappedKeyToUnknownMappedResultProperties");function DN(e,t){return Yb(t,e)?FN(e):kN(t)}o(DN,"MappedKeyToMappedResultProperties");function LN(e,t){let n=DN(e,t);return pS(e,n)}o(LN,"FromMappedKey");function $a(e,t){return t.map(n=>zn(e,n))}o($a,"FromRest");function $N(e,t){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=zn(e,t[i]);return n}o($N,"FromProperties");function zn(e,t){var i;let n=x({},t);return xr(t)?dn(zn(e,ht(t,[rn]))):db(t)?$n(zn(e,ht(t,[Gr]))):st(t)?pS(e,t.properties):Sn(t)?LN(e,t.keys):Aa(t)?Du($a(e,t.parameters),zn(e,t.returns),n):Pa(t)?Mi($a(e,t.parameters),zn(e,t.returns),n):Ta(t)?ku(zn(e,t.items),n):Ra(t)?ju(zn(e,t.items),n):vt(t)?hn($a(e,t.allOf),n):Ce(t)?Ve($a(e,t.anyOf),n):rr(t)?br($a(e,(i=t.items)!=null?i:[]),n):Mt(t)?We($N(e,t.properties),n):Hr(t)?Fu(zn(e,t.items),n):Hi(t)?Gu(zn(e,t.item),n):t}o(zn,"FromSchemaType");function zN(e,t){let n={};for(let i of e)n[i]=zn(i,t);return n}o(zN,"MappedFunctionReturnType");function hS(e,t,n){let i=ir(e)?pn(e):e,r=t({[P]:"MappedKey",keys:i}),s=zN(i,r);return We(s,n)}o(hS,"Mapped");f();function BN(e){return N(ht(e,[rn]))}o(BN,"RemoveOptional");function VN(e){return N(L(x({},e),{[rn]:"Optional"}))}o(VN,"AddOptional");function jN(e,t){return t===!1?BN(e):VN(e)}o(jN,"OptionalWithFlag");function dn(e,t){let n=t!=null?t:!0;return st(e)?mS(e,n):jN(e,n)}o(dn,"Optional");function GN(e,t){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=dn(e[i],t);return n}o(GN,"FromProperties");function HN(e,t){return GN(e.properties,t)}o(HN,"FromMappedResult");function mS(e,t){let n=HN(e,t);return Te(n)}o(mS,"OptionalFromMappedResult");f();function za(e,t={}){let n=e.every(r=>Mt(r)),i=ir(t.unevaluatedProperties)?{unevaluatedProperties:t.unevaluatedProperties}:{};return N(t.unevaluatedProperties===!1||ir(t.unevaluatedProperties)||n?L(x({},i),{[P]:"Intersect",type:"object",allOf:e}):L(x({},i),{[P]:"Intersect",allOf:e}),t)}o(za,"IntersectCreate");function WN(e){return e.every(t=>xr(t))}o(WN,"IsIntersectOptional");function ZN(e){return ht(e,[rn])}o(ZN,"RemoveOptionalFromType");function gS(e){return e.map(t=>xr(t)?ZN(t):t)}o(gS,"RemoveOptionalFromRest");function XN(e,t){return WN(e)?dn(za(gS(e),t)):za(gS(e),t)}o(XN,"ResolveIntersect");function Vu(e,t={}){if(e.length===0)return Be(t);if(e.length===1)return N(e[0],t);if(e.some(n=>No(n)))throw new Error("Cannot intersect transform types");return XN(e,t)}o(Vu,"IntersectEvaluated");f();function hn(e,t){if(e.length===0)return Be(t);if(e.length===1)return N(e[0],t);if(e.some(n=>No(n)))throw new Error("Cannot intersect transform types");return za(e,t)}o(hn,"Intersect");function yS(e){return e.map(t=>Jy(t))}o(yS,"FromRest");function qN(e){return hn(yS(e))}o(qN,"FromIntersect");function KN(e){return Ve(yS(e))}o(KN,"FromUnion");function JN(e){return Jy(e)}o(JN,"FromPromise");function Jy(e){return vt(e)?qN(e.allOf):Ce(e)?KN(e.anyOf):Hi(e)?JN(e.item):e}o(Jy,"AwaitedResolve");function xS(e,t){return N(Jy(e),t)}o(xS,"Awaited");f();f();f();f();function vS(e){let t=[];for(let n of e)t.push(Pt(n));return t}o(vS,"FromRest");function YN(e){let t=vS(e);return tS(t)}o(YN,"FromIntersect");function QN(e){let t=vS(e);return eS(t)}o(QN,"FromUnion");function eF(e){return e.map((t,n)=>n.toString())}o(eF,"FromTuple");function tF(e){return["[number]"]}o(tF,"FromArray");function nF(e){return globalThis.Object.getOwnPropertyNames(e)}o(nF,"FromProperties");function rF(e){return Yy?globalThis.Object.getOwnPropertyNames(e).map(n=>n[0]==="^"&&n[n.length-1]==="$"?n.slice(1,n.length-1):n):[]}o(rF,"FromPatternProperties");function Pt(e){var t;return vt(e)?YN(e.allOf):Ce(e)?QN(e.anyOf):rr(e)?eF((t=e.items)!=null?t:[]):Hr(e)?tF(e.items):Mt(e)?nF(e.properties):Ry(e)?rF(e.patternProperties):[]}o(Pt,"KeyOfPropertyKeys");var Yy=!1;function Kr(e){Yy=!0;let t=Pt(e);Yy=!1;let n=t.map(i=>"(".concat(i,")"));return"^(".concat(n.join("|"),")$")}o(Kr,"KeyOfPattern");function iF(e){return e.map(t=>t==="[number]"?_r():Fe(t))}o(iF,"KeyOfPropertyKeysToRest");function Hu(e,t){if(st(e))return _S(e,t);{let n=Pt(e),i=iF(n),r=vr(i);return N(r,t)}}o(Hu,"KeyOf");function oF(e,t){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Hu(e[i],it(t));return n}o(oF,"FromProperties");function sF(e,t){return oF(e.properties,t)}o(sF,"FromMappedResult");function _S(e,t){let n=sF(e,t);return Te(n)}o(_S,"KeyOfFromMappedResult");f();function Ei(e){let t=Pt(e),n=La(e,t);return t.map((i,r)=>[t[r],n[r]])}o(Ei,"KeyOfPropertyEntries");function aF(e){let t=[];for(let n of e)t.push(...Pt(n));return Qb(t)}o(aF,"CompositeKeys");function cF(e){return e.filter(t=>!Si(t))}o(cF,"FilterNever");function uF(e,t){let n=[];for(let i of e)n.push(...La(i,[t]));return cF(n)}o(uF,"CompositeProperty");function lF(e,t){let n={};for(let i of t)n[i]=Vu(uF(e,i));return n}o(lF,"CompositeProperties");function bS(e,t){let n=aF(e),i=lF(e,n);return We(i,t)}o(bS,"Composite");f();f();function Wu(e){return N({[P]:"Date",type:"Date"},e)}o(Wu,"Date");f();function Zu(e){return N({[P]:"Null",type:"null"},e)}o(Zu,"Null");f();function Xu(e){return N({[P]:"Symbol",type:"symbol"},e)}o(Xu,"Symbol");f();function qu(e){return N({[P]:"Undefined",type:"undefined"},e)}o(qu,"Undefined");f();function Ku(e){return N({[P]:"Uint8Array",type:"Uint8Array"},e)}o(Ku,"Uint8Array");f();function Jr(e){return N({[P]:"Unknown"},e)}o(Jr,"Unknown");function fF(e){return e.map(t=>Qy(t,!1))}o(fF,"FromArray");function dF(e){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=$n(Qy(e[n],!1));return t}o(dF,"FromProperties");function Ju(e,t){return t===!0?e:$n(e)}o(Ju,"ConditionalReadonly");function Qy(e,t){return _y(e)?Ju(wi(),t):Sy(e)?Ju(wi(),t):Ht(e)?$n(br(fF(e))):Br(e)?Ku():Vi(e)?Wu():He(e)?Ju(We(dF(e)),t):by(e)?Ju(Mi([],Jr()),t):ct(e)?qu():Iy(e)?Zu():wy(e)?Xu():Ia(e)?Bo():nr(e)?Fe(e):_i(e)?Fe(e):Qe(e)?Fe(e):We({})}o(Qy,"FromValue");function SS(e,t){return N(Qy(e,!0),t)}o(SS,"Const");f();function IS(e,t){return br(e.parameters,t)}o(IS,"ConstructorParameters");f();function Ba(e,t){return e.map(n=>or(n,t))}o(Ba,"FromRest");function pF(e,t){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=or(e[i],t);return n}o(pF,"FromProperties");function hF(e,t){return e.parameters=Ba(e.parameters,t),e.returns=or(e.returns,t),e}o(hF,"FromConstructor");function mF(e,t){return e.parameters=Ba(e.parameters,t),e.returns=or(e.returns,t),e}o(mF,"FromFunction");function gF(e,t){return e.allOf=Ba(e.allOf,t),e}o(gF,"FromIntersect");function yF(e,t){return e.anyOf=Ba(e.anyOf,t),e}o(yF,"FromUnion");function xF(e,t){return ct(e.items)||(e.items=Ba(e.items,t)),e}o(xF,"FromTuple");function vF(e,t){return e.items=or(e.items,t),e}o(vF,"FromArray");function _F(e,t){return e.properties=pF(e.properties,t),e}o(_F,"FromObject");function bF(e,t){return e.item=or(e.item,t),e}o(bF,"FromPromise");function SF(e,t){return e.items=or(e.items,t),e}o(SF,"FromAsyncIterator");function IF(e,t){return e.items=or(e.items,t),e}o(IF,"FromIterator");function wF(e,t){let n=t.find(r=>r.$id===e.$ref);if(n===void 0)throw Error("Unable to dereference schema with $id ".concat(e.$ref));let i=ht(n,["$id"]);return or(i,t)}o(wF,"FromRef");function MF(e,t){return Aa(e)?hF(e,t):Pa(e)?mF(e,t):vt(e)?gF(e,t):Ce(e)?yF(e,t):rr(e)?xF(e,t):Hr(e)?vF(e,t):Mt(e)?_F(e,t):Hi(e)?bF(e,t):Ta(e)?SF(e,t):Ra(e)?IF(e,t):Cy(e)?wF(e,t):e}o(MF,"DerefResolve");function or(e,t){return MF(Ma(e),ub(t))}o(or,"Deref");f();function wS(e,t){if(ct(e))throw new Error("Enum undefined or empty");let n=globalThis.Object.getOwnPropertyNames(e).filter(s=>isNaN(s)).map(s=>e[s]),r=[...new Set(n)].map(s=>Fe(s));return Ve(r,L(x({},t),{[Dn]:"Enum"}))}o(wS,"Enum");f();f();f();var sx=class sx extends re{};o(sx,"ExtendsResolverError");var tx=sx,O;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(O||(O={}));function Bn(e){return e===O.False?e:O.True}o(Bn,"IntoBooleanResult");function jo(e){throw new tx(e)}o(jo,"Throw");function bt(e){return _.IsNever(e)||_.IsIntersect(e)||_.IsUnion(e)||_.IsUnknown(e)||_.IsAny(e)}o(bt,"IsStructuralRight");function St(e,t){return _.IsNever(t)?CS(e,t):_.IsIntersect(t)?Yu(e,t):_.IsUnion(t)?ox(e,t):_.IsUnknown(t)?FS(e,t):_.IsAny(t)?ix(e,t):jo("StructuralRight")}o(St,"StructuralRight");function ix(e,t){return O.True}o(ix,"FromAnyRight");function EF(e,t){return _.IsIntersect(t)?Yu(e,t):_.IsUnion(t)&&t.anyOf.some(n=>_.IsAny(n)||_.IsUnknown(n))?O.True:_.IsUnion(t)?O.Union:_.IsUnknown(t)||_.IsAny(t)?O.True:O.Union}o(EF,"FromAny");function TF(e,t){return _.IsUnknown(e)?O.False:_.IsAny(e)?O.Union:_.IsNever(e)?O.True:O.False}o(TF,"FromArrayRight");function AF(e,t){return _.IsObject(t)&&Qu(t)?O.True:bt(t)?St(e,t):_.IsArray(t)?Bn(je(e.items,t.items)):O.False}o(AF,"FromArray");function PF(e,t){return bt(t)?St(e,t):_.IsAsyncIterator(t)?Bn(je(e.items,t.items)):O.False}o(PF,"FromAsyncIterator");function RF(e,t){return bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsRecord(t)?Vn(e,t):_.IsBigInt(t)?O.True:O.False}o(RF,"FromBigInt");function PS(e,t){return _.IsLiteralBoolean(e)||_.IsBoolean(e)?O.True:O.False}o(PS,"FromBooleanRight");function CF(e,t){return bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsRecord(t)?Vn(e,t):_.IsBoolean(t)?O.True:O.False}o(CF,"FromBoolean");function OF(e,t){return bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsConstructor(t)?e.parameters.length>t.parameters.length?O.False:e.parameters.every((n,i)=>Bn(je(t.parameters[i],n))===O.True)?Bn(je(e.returns,t.returns)):O.False:O.False}o(OF,"FromConstructor");function UF(e,t){return bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsRecord(t)?Vn(e,t):_.IsDate(t)?O.True:O.False}o(UF,"FromDate");function NF(e,t){return bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsFunction(t)?e.parameters.length>t.parameters.length?O.False:e.parameters.every((n,i)=>Bn(je(t.parameters[i],n))===O.True)?Bn(je(e.returns,t.returns)):O.False:O.False}o(NF,"FromFunction");function RS(e,t){return _.IsLiteral(e)&&be.IsNumber(e.const)||_.IsNumber(e)||_.IsInteger(e)?O.True:O.False}o(RS,"FromIntegerRight");function FF(e,t){return _.IsInteger(t)||_.IsNumber(t)?O.True:bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsRecord(t)?Vn(e,t):O.False}o(FF,"FromInteger");function Yu(e,t){return t.allOf.every(n=>je(e,n)===O.True)?O.True:O.False}o(Yu,"FromIntersectRight");function kF(e,t){return e.allOf.some(n=>je(n,t)===O.True)?O.True:O.False}o(kF,"FromIntersect");function DF(e,t){return bt(t)?St(e,t):_.IsIterator(t)?Bn(je(e.items,t.items)):O.False}o(DF,"FromIterator");function LF(e,t){return _.IsLiteral(t)&&t.const===e.const?O.True:bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsRecord(t)?Vn(e,t):_.IsString(t)?NS(e,t):_.IsNumber(t)?OS(e,t):_.IsInteger(t)?RS(e,t):_.IsBoolean(t)?PS(e,t):O.False}o(LF,"FromLiteral");function CS(e,t){return O.False}o(CS,"FromNeverRight");function $F(e,t){return O.True}o($F,"FromNever");function MS(e){let[t,n]=[e,0];for(;_.IsNot(t);)t=t.not,n+=1;return n%2===0?t:Jr()}o(MS,"UnwrapTNot");function zF(e,t){return _.IsNot(e)?je(MS(e),t):_.IsNot(t)?je(e,MS(t)):jo("Invalid fallthrough for Not")}o(zF,"FromNot");function BF(e,t){return bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsRecord(t)?Vn(e,t):_.IsNull(t)?O.True:O.False}o(BF,"FromNull");function OS(e,t){return _.IsLiteralNumber(e)||_.IsNumber(e)||_.IsInteger(e)?O.True:O.False}o(OS,"FromNumberRight");function VF(e,t){return bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsRecord(t)?Vn(e,t):_.IsInteger(t)||_.IsNumber(t)?O.True:O.False}o(VF,"FromNumber");function mn(e,t){return Object.getOwnPropertyNames(e.properties).length===t}o(mn,"IsObjectPropertyCount");function ES(e){return Qu(e)}o(ES,"IsObjectStringLike");function TS(e){return mn(e,0)||mn(e,1)&&"description"in e.properties&&_.IsUnion(e.properties.description)&&e.properties.description.anyOf.length===2&&(_.IsString(e.properties.description.anyOf[0])&&_.IsUndefined(e.properties.description.anyOf[1])||_.IsString(e.properties.description.anyOf[1])&&_.IsUndefined(e.properties.description.anyOf[0]))}o(TS,"IsObjectSymbolLike");function ex(e){return mn(e,0)}o(ex,"IsObjectNumberLike");function AS(e){return mn(e,0)}o(AS,"IsObjectBooleanLike");function jF(e){return mn(e,0)}o(jF,"IsObjectBigIntLike");function GF(e){return mn(e,0)}o(GF,"IsObjectDateLike");function HF(e){return Qu(e)}o(HF,"IsObjectUint8ArrayLike");function WF(e){let t=_r();return mn(e,0)||mn(e,1)&&"length"in e.properties&&Bn(je(e.properties.length,t))===O.True}o(WF,"IsObjectFunctionLike");function ZF(e){return mn(e,0)}o(ZF,"IsObjectConstructorLike");function Qu(e){let t=_r();return mn(e,0)||mn(e,1)&&"length"in e.properties&&Bn(je(e.properties.length,t))===O.True}o(Qu,"IsObjectArrayLike");function XF(e){let t=Mi([wi()],wi());return mn(e,0)||mn(e,1)&&"then"in e.properties&&Bn(je(e.properties.then,t))===O.True}o(XF,"IsObjectPromiseLike");function US(e,t){return je(e,t)===O.False||_.IsOptional(e)&&!_.IsOptional(t)?O.False:O.True}o(US,"Property");function Wt(e,t){return _.IsUnknown(e)?O.False:_.IsAny(e)?O.Union:_.IsNever(e)||_.IsLiteralString(e)&&ES(t)||_.IsLiteralNumber(e)&&ex(t)||_.IsLiteralBoolean(e)&&AS(t)||_.IsSymbol(e)&&TS(t)||_.IsBigInt(e)&&jF(t)||_.IsString(e)&&ES(t)||_.IsSymbol(e)&&TS(t)||_.IsNumber(e)&&ex(t)||_.IsInteger(e)&&ex(t)||_.IsBoolean(e)&&AS(t)||_.IsUint8Array(e)&&HF(t)||_.IsDate(e)&&GF(t)||_.IsConstructor(e)&&ZF(t)||_.IsFunction(e)&&WF(t)?O.True:_.IsRecord(e)&&_.IsString(nx(e))?t[Dn]==="Record"?O.True:O.False:_.IsRecord(e)&&_.IsNumber(nx(e))?mn(t,0)?O.True:O.False:O.False}o(Wt,"FromObjectRight");function qF(e,t){return bt(t)?St(e,t):_.IsRecord(t)?Vn(e,t):_.IsObject(t)?(()=>{for(let n of Object.getOwnPropertyNames(t.properties)){if(!(n in e.properties)&&!_.IsOptional(t.properties[n]))return O.False;if(_.IsOptional(t.properties[n]))return O.True;if(US(e.properties[n],t.properties[n])===O.False)return O.False}return O.True})():O.False}o(qF,"FromObject");function KF(e,t){return bt(t)?St(e,t):_.IsObject(t)&&XF(t)?O.True:_.IsPromise(t)?Bn(je(e.item,t.item)):O.False}o(KF,"FromPromise");function nx(e){return Zr in e.patternProperties?_r():Xr in e.patternProperties?Ln():jo("Unknown record key pattern")}o(nx,"RecordKey");function rx(e){return Zr in e.patternProperties?e.patternProperties[Zr]:Xr in e.patternProperties?e.patternProperties[Xr]:jo("Unable to get record value schema")}o(rx,"RecordValue");function Vn(e,t){let[n,i]=[nx(t),rx(t)];return _.IsLiteralString(e)&&_.IsNumber(n)&&Bn(je(e,i))===O.True?O.True:_.IsUint8Array(e)&&_.IsNumber(n)||_.IsString(e)&&_.IsNumber(n)||_.IsArray(e)&&_.IsNumber(n)?je(e,i):_.IsObject(e)?(()=>{for(let r of Object.getOwnPropertyNames(e.properties))if(US(i,e.properties[r])===O.False)return O.False;return O.True})():O.False}o(Vn,"FromRecordRight");function JF(e,t){return bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsRecord(t)?je(rx(e),rx(t)):O.False}o(JF,"FromRecord");function YF(e,t){let n=_.IsRegExp(e)?Ln():e,i=_.IsRegExp(t)?Ln():t;return je(n,i)}o(YF,"FromRegExp");function NS(e,t){return _.IsLiteral(e)&&be.IsString(e.const)||_.IsString(e)?O.True:O.False}o(NS,"FromStringRight");function QF(e,t){return bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsRecord(t)?Vn(e,t):_.IsString(t)?O.True:O.False}o(QF,"FromString");function ek(e,t){return bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsRecord(t)?Vn(e,t):_.IsSymbol(t)?O.True:O.False}o(ek,"FromSymbol");function tk(e,t){return _.IsTemplateLiteral(e)?je(Zi(e),t):_.IsTemplateLiteral(t)?je(e,Zi(t)):jo("Invalid fallthrough for TemplateLiteral")}o(tk,"FromTemplateLiteral");function nk(e,t){return _.IsArray(t)&&e.items!==void 0&&e.items.every(n=>je(n,t.items)===O.True)}o(nk,"IsArrayOfTuple");function rk(e,t){return _.IsNever(e)?O.True:_.IsUnknown(e)?O.False:_.IsAny(e)?O.Union:O.False}o(rk,"FromTupleRight");function ik(e,t){return bt(t)?St(e,t):_.IsObject(t)&&Qu(t)||_.IsArray(t)&&nk(e,t)?O.True:_.IsTuple(t)?be.IsUndefined(e.items)&&!be.IsUndefined(t.items)||!be.IsUndefined(e.items)&&be.IsUndefined(t.items)?O.False:be.IsUndefined(e.items)&&!be.IsUndefined(t.items)||e.items.every((n,i)=>je(n,t.items[i])===O.True)?O.True:O.False:O.False}o(ik,"FromTuple");function ok(e,t){return bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsRecord(t)?Vn(e,t):_.IsUint8Array(t)?O.True:O.False}o(ok,"FromUint8Array");function sk(e,t){return bt(t)?St(e,t):_.IsObject(t)?Wt(e,t):_.IsRecord(t)?Vn(e,t):_.IsVoid(t)?uk(e,t):_.IsUndefined(t)?O.True:O.False}o(sk,"FromUndefined");function ox(e,t){return t.anyOf.some(n=>je(e,n)===O.True)?O.True:O.False}o(ox,"FromUnionRight");function ak(e,t){return e.anyOf.every(n=>je(n,t)===O.True)?O.True:O.False}o(ak,"FromUnion");function FS(e,t){return O.True}o(FS,"FromUnknownRight");function ck(e,t){return _.IsNever(t)?CS(e,t):_.IsIntersect(t)?Yu(e,t):_.IsUnion(t)?ox(e,t):_.IsAny(t)?ix(e,t):_.IsString(t)?NS(e,t):_.IsNumber(t)?OS(e,t):_.IsInteger(t)?RS(e,t):_.IsBoolean(t)?PS(e,t):_.IsArray(t)?TF(e,t):_.IsTuple(t)?rk(e,t):_.IsObject(t)?Wt(e,t):_.IsUnknown(t)?O.True:O.False}o(ck,"FromUnknown");function uk(e,t){return _.IsUndefined(e)||_.IsUndefined(e)?O.True:O.False}o(uk,"FromVoidRight");function lk(e,t){return _.IsIntersect(t)?Yu(e,t):_.IsUnion(t)?ox(e,t):_.IsUnknown(t)?FS(e,t):_.IsAny(t)?ix(e,t):_.IsObject(t)?Wt(e,t):_.IsVoid(t)?O.True:O.False}o(lk,"FromVoid");function je(e,t){return _.IsTemplateLiteral(e)||_.IsTemplateLiteral(t)?tk(e,t):_.IsRegExp(e)||_.IsRegExp(t)?YF(e,t):_.IsNot(e)||_.IsNot(t)?zF(e,t):_.IsAny(e)?EF(e,t):_.IsArray(e)?AF(e,t):_.IsBigInt(e)?RF(e,t):_.IsBoolean(e)?CF(e,t):_.IsAsyncIterator(e)?PF(e,t):_.IsConstructor(e)?OF(e,t):_.IsDate(e)?UF(e,t):_.IsFunction(e)?NF(e,t):_.IsInteger(e)?FF(e,t):_.IsIntersect(e)?kF(e,t):_.IsIterator(e)?DF(e,t):_.IsLiteral(e)?LF(e,t):_.IsNever(e)?$F(e,t):_.IsNull(e)?BF(e,t):_.IsNumber(e)?VF(e,t):_.IsObject(e)?qF(e,t):_.IsRecord(e)?JF(e,t):_.IsString(e)?QF(e,t):_.IsSymbol(e)?ek(e,t):_.IsTuple(e)?ik(e,t):_.IsPromise(e)?KF(e,t):_.IsUint8Array(e)?ok(e,t):_.IsUndefined(e)?sk(e,t):_.IsUnion(e)?ak(e,t):_.IsUnknown(e)?ck(e,t):_.IsVoid(e)?lk(e,t):jo("Unknown left type operand '".concat(e[P],"'"))}o(je,"Visit");function Ti(e,t){return je(e,t)}o(Ti,"ExtendsCheck");f();f();f();function fk(e,t,n,i,r){let s={};for(let a of globalThis.Object.getOwnPropertyNames(e))s[a]=Go(e[a],t,n,i,it(r));return s}o(fk,"FromProperties");function dk(e,t,n,i,r){return fk(e.properties,t,n,i,r)}o(dk,"FromMappedResult");function kS(e,t,n,i,r){let s=dk(e,t,n,i,r);return Te(s)}o(kS,"ExtendsFromMappedResult");function pk(e,t,n,i){let r=Ti(e,t);return r===O.Union?Ve([n,i]):r===O.True?n:i}o(pk,"ExtendsResolve");function Go(e,t,n,i,r){return st(e)?kS(e,t,n,i,r):Sn(e)?N(DS(e,t,n,i,r)):N(pk(e,t,n,i),r)}o(Go,"Extends");function hk(e,t,n,i,r){return{[e]:Go(Fe(e),t,n,i,it(r))}}o(hk,"FromPropertyKey");function mk(e,t,n,i,r){return e.reduce((s,a)=>x(x({},s),hk(a,t,n,i,r)),{})}o(mk,"FromPropertyKeys");function gk(e,t,n,i,r){return mk(e.keys,t,n,i,r)}o(gk,"FromMappedKey");function DS(e,t,n,i,r){let s=gk(e,t,n,i,r);return Te(s)}o(DS,"ExtendsFromMappedKey");f();function yk(e){return e.allOf.every(t=>Yr(t))}o(yk,"Intersect");function xk(e){return e.anyOf.some(t=>Yr(t))}o(xk,"Union");function vk(e){return!Yr(e.not)}o(vk,"Not");function Yr(e){return e[P]==="Intersect"?yk(e):e[P]==="Union"?xk(e):e[P]==="Not"?vk(e):e[P]==="Undefined"}o(Yr,"ExtendsUndefinedCheck");f();function LS(e,t){return Ho(Zi(e),t)}o(LS,"ExcludeFromTemplateLiteral");function _k(e,t){let n=e.filter(i=>Ti(i,t)===O.False);return n.length===1?n[0]:Ve(n)}o(_k,"ExcludeRest");function Ho(e,t,n={}){return In(e)?N(LS(e,t),n):st(e)?N($S(e,t),n):N(Ce(e)?_k(e.anyOf,t):Ti(e,t)!==O.False?Be():e,n)}o(Ho,"Exclude");function bk(e,t){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Ho(e[i],t);return n}o(bk,"FromProperties");function Sk(e,t){return bk(e.properties,t)}o(Sk,"FromMappedResult");function $S(e,t){let n=Sk(e,t);return Te(n)}o($S,"ExcludeFromMappedResult");f();f();f();function zS(e,t){return Wo(Zi(e),t)}o(zS,"ExtractFromTemplateLiteral");function Ik(e,t){let n=e.filter(i=>Ti(i,t)!==O.False);return n.length===1?n[0]:Ve(n)}o(Ik,"ExtractRest");function Wo(e,t,n){return In(e)?N(zS(e,t),n):st(e)?N(BS(e,t),n):N(Ce(e)?Ik(e.anyOf,t):Ti(e,t)!==O.False?e:Be(),n)}o(Wo,"Extract");function wk(e,t){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Wo(e[i],t);return n}o(wk,"FromProperties");function Mk(e,t){return wk(e.properties,t)}o(Mk,"FromMappedResult");function BS(e,t){let n=Mk(e,t);return Te(n)}o(BS,"ExtractFromMappedResult");f();function VS(e,t){return N(e.returns,t)}o(VS,"InstanceType");f();function jS(e){return N({[P]:"Integer",type:"integer"},e)}o(jS,"Integer");f();f();f();function Ek(e,t,n){return{[e]:sr(Fe(e),t,it(n))}}o(Ek,"MappedIntrinsicPropertyKey");function Tk(e,t,n){return e.reduce((r,s)=>x(x({},r),Ek(s,t,n)),{})}o(Tk,"MappedIntrinsicPropertyKeys");function Ak(e,t,n){return Tk(e.keys,t,n)}o(Ak,"MappedIntrinsicProperties");function GS(e,t,n){let i=Ak(e,t,n);return Te(i)}o(GS,"IntrinsicFromMappedKey");function Pk(e){let[t,n]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),n].join("")}o(Pk,"ApplyUncapitalize");function Rk(e){let[t,n]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),n].join("")}o(Rk,"ApplyCapitalize");function Ck(e){return e.toUpperCase()}o(Ck,"ApplyUppercase");function Ok(e){return e.toLowerCase()}o(Ok,"ApplyLowercase");function Uk(e,t,n){let i=$o(e.pattern);if(!Wi(i))return L(x({},e),{pattern:HS(e.pattern,t)});let a=[...Da(i)].map(c=>Fe(c)),u=WS(a,t),l=Ve(u);return Bu([l],n)}o(Uk,"FromTemplateLiteral");function HS(e,t){return typeof e=="string"?t==="Uncapitalize"?Pk(e):t==="Capitalize"?Rk(e):t==="Uppercase"?Ck(e):t==="Lowercase"?Ok(e):e:e.toString()}o(HS,"FromLiteralValue");function WS(e,t){return e.map(n=>sr(n,t))}o(WS,"FromRest");function sr(e,t,n={}){return Sn(e)?GS(e,t,n):In(e)?Uk(e,t,n):Ce(e)?Ve(WS(e.anyOf,t),n):Wr(e)?Fe(HS(e.const,t),n):N(e,n)}o(sr,"Intrinsic");function ZS(e,t={}){return sr(e,"Capitalize",t)}o(ZS,"Capitalize");f();function XS(e,t={}){return sr(e,"Lowercase",t)}o(XS,"Lowercase");f();function qS(e,t={}){return sr(e,"Uncapitalize",t)}o(qS,"Uncapitalize");f();function KS(e,t={}){return sr(e,"Uppercase",t)}o(KS,"Uppercase");f();function JS(e,t){return N({[P]:"Not",not:e},t)}o(JS,"Not");f();f();f();function Nk(e,t,n){let i={};for(let r of globalThis.Object.getOwnPropertyNames(e))i[r]=Zo(e[r],t,it(n));return i}o(Nk,"FromProperties");function Fk(e,t,n){return Nk(e.properties,t,n)}o(Fk,"FromMappedResult");function YS(e,t,n){let i=Fk(e,t,n);return Te(i)}o(YS,"OmitFromMappedResult");function kk(e,t){return e.map(n=>ax(n,t))}o(kk,"FromIntersect");function Dk(e,t){return e.map(n=>ax(n,t))}o(Dk,"FromUnion");function Lk(e,t){let r=e,{[t]:n}=r;return Es(r,[lc(t)])}o(Lk,"FromProperty");function $k(e,t){return t.reduce((n,i)=>Lk(n,i),e)}o($k,"FromProperties");function zk(e,t){let n=ht(e,[ot,"$id","required","properties"]),i=$k(e.properties,t);return We(i,n)}o(zk,"FromObject");function ax(e,t){return vt(e)?hn(kk(e.allOf,t)):Ce(e)?Ve(Dk(e.anyOf,t)):Mt(e)?zk(e,t):We({})}o(ax,"OmitResolve");function Zo(e,t,n){if(Sn(t))return QS(e,t,n);if(st(e))return YS(e,t,n);let i=ir(t)?pn(t):t;return N(x(x({},ax(e,i)),n))}o(Zo,"Omit");function Bk(e,t,n){return{[t]:Zo(e,[t],it(n))}}o(Bk,"FromPropertyKey");function Vk(e,t,n){return t.reduce((i,r)=>x(x({},i),Bk(e,r,n)),{})}o(Vk,"FromPropertyKeys");function jk(e,t,n){return Vk(e,t.keys,n)}o(jk,"FromMappedKey");function QS(e,t,n){let i=jk(e,t,n);return Te(i)}o(QS,"OmitFromMappedKey");f();function eI(e,t){return br(e.parameters,t)}o(eI,"Parameters");f();f();function tI(e){return e.map(t=>nI(t))}o(tI,"FromRest");function Gk(e){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=dn(e[n]);return t}o(Gk,"FromProperties");function Hk(e){let t=ht(e,[ot,"$id","required","properties"]),n=Gk(e.properties);return We(n,t)}o(Hk,"FromObject");function nI(e){return vt(e)?hn(tI(e.allOf)):Ce(e)?Ve(tI(e.anyOf)):Mt(e)?Hk(e):We({})}o(nI,"PartialResolve");function el(e,t){return st(e)?rI(e,t):N(x(x({},nI(e)),t))}o(el,"Partial");function Wk(e,t){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=el(e[i],it(t));return n}o(Wk,"FromProperties");function Zk(e,t){return Wk(e.properties,t)}o(Zk,"FromMappedResult");function rI(e,t){let n=Zk(e,t);return Te(n)}o(rI,"PartialFromMappedResult");f();f();f();function Xk(e,t,n){let i={};for(let r of globalThis.Object.getOwnPropertyNames(e))i[r]=Xo(e[r],t,it(n));return i}o(Xk,"FromProperties");function qk(e,t,n){return Xk(e.properties,t,n)}o(qk,"FromMappedResult");function iI(e,t,n){let i=qk(e,t,n);return Te(i)}o(iI,"PickFromMappedResult");function Kk(e,t){return e.map(n=>cx(n,t))}o(Kk,"FromIntersect");function Jk(e,t){return e.map(n=>cx(n,t))}o(Jk,"FromUnion");function Yk(e,t){let n={};for(let i of t)i in e&&(n[i]=e[i]);return n}o(Yk,"FromProperties");function Qk(e,t){let n=ht(e,[ot,"$id","required","properties"]),i=Yk(e.properties,t);return We(i,n)}o(Qk,"FromObject");function cx(e,t){return vt(e)?hn(Kk(e.allOf,t)):Ce(e)?Ve(Jk(e.anyOf,t)):Mt(e)?Qk(e,t):We({})}o(cx,"PickResolve");function Xo(e,t,n){if(Sn(t))return oI(e,t,n);if(st(e))return iI(e,t,n);let i=ir(t)?pn(t):t;return N(x(x({},cx(e,i)),n))}o(Xo,"Pick");function eD(e,t,n){return{[t]:Xo(e,[t],it(n))}}o(eD,"FromPropertyKey");function tD(e,t,n){return t.reduce((i,r)=>x(x({},i),eD(e,r,n)),{})}o(tD,"FromPropertyKeys");function nD(e,t,n){return tD(e,t.keys,n)}o(nD,"FromMappedKey");function oI(e,t,n){let i=nD(e,t,n);return Te(i)}o(oI,"PickFromMappedKey");f();function sI(e){return $n(dn(e))}o(sI,"ReadonlyOptional");f();function Xi(e,t,n){return N({[P]:"Record",type:"object",patternProperties:{[e]:t}},n)}o(Xi,"RecordCreateFromPattern");function ux(e,t,n){let i={};for(let r of e)i[r]=t;return We(i,L(x({},n),{[Dn]:"Record"}))}o(ux,"RecordCreateFromKeys");function rD(e,t,n){return $u(e)?ux(pn(e),t,n):Xi(e.pattern,t,n)}o(rD,"FromTemplateLiteralKey");function iD(e,t,n){return ux(pn(Ve(e)),t,n)}o(iD,"FromUnionKey");function oD(e,t,n){return ux([e.toString()],t,n)}o(oD,"FromLiteralKey");function sD(e,t,n){return Xi(e.source,t,n)}o(sD,"FromRegExpKey");function aD(e,t,n){let i=ct(e.pattern)?Xr:e.pattern;return Xi(i,t,n)}o(aD,"FromStringKey");function cD(e,t,n){return Xi(Xr,t,n)}o(cD,"FromAnyKey");function uD(e,t,n){return Xi(Jb,t,n)}o(uD,"FromNeverKey");function lD(e,t,n){return Xi(Zr,t,n)}o(lD,"FromIntegerKey");function fD(e,t,n){return Xi(Zr,t,n)}o(fD,"FromNumberKey");function aI(e,t,n={}){return Ce(e)?iD(e.anyOf,t,n):In(e)?rD(e,t,n):Wr(e)?oD(e.const,t,n):ji(e)?lD(e,t,n):Gi(e)?fD(e,t,n):Oy(e)?sD(e,t,n):Ca(e)?aD(e,t,n):Ty(e)?cD(e,t,n):Si(e)?uD(e,t,n):Be(n)}o(aI,"Record");f();var dD=0;function cI(e,t={}){ct(t.$id)&&(t.$id="T".concat(dD++));let n=Ma(e({[P]:"This",$ref:"".concat(t.$id)}));return n.$id=t.$id,N(x({[Dn]:"Recursive"},n),t)}o(cI,"Recursive");f();function uI(e,t){if(Qe(e))return N({[P]:"Ref",$ref:e},t);if(ct(e.$id))throw new Error("Reference target type must specify an $id");return N({[P]:"Ref",$ref:e.$id},t)}o(uI,"Ref");f();function lI(e,t){let n=Qe(e)?new globalThis.RegExp(e):e;return N({[P]:"RegExp",type:"RegExp",source:n.source,flags:n.flags},t)}o(lI,"RegExp");f();f();function fI(e){return e.map(t=>dI(t))}o(fI,"FromRest");function pD(e){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=ht(e[n],[rn]);return t}o(pD,"FromProperties");function hD(e){let t=ht(e,[ot,"$id","required","properties"]),n=pD(e.properties);return We(n,t)}o(hD,"FromObject");function dI(e){return vt(e)?hn(fI(e.allOf)):Ce(e)?Ve(fI(e.anyOf)):Mt(e)?hD(e):We({})}o(dI,"RequiredResolve");function tl(e,t){return st(e)?pI(e,t):N(x(x({},dI(e)),t))}o(tl,"Required");function mD(e,t){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=tl(e[i],t);return n}o(mD,"FromProperties");function gD(e,t){return mD(e.properties,t)}o(gD,"FromMappedResult");function pI(e,t){let n=gD(e,t);return Te(n)}o(pI,"RequiredFromMappedResult");f();function yD(e){var t;return vt(e)?e.allOf:Ce(e)?e.anyOf:rr(e)?(t=e.items)!=null?t:[]:[]}o(yD,"RestResolve");function hI(e){return yD(e)}o(hI,"Rest");f();function mI(e,t){return N(e.returns,t)}o(mI,"ReturnType");f();function gI(e){return JSON.parse(JSON.stringify(e))}o(gI,"Strict");f();var dx=class dx{constructor(t){this.schema=t}Decode(t){return new fx(this.schema,t)}};o(dx,"TransformDecodeBuilder");var lx=dx,px=class px{constructor(t,n){this.schema=t,this.decode=n}EncodeTransform(t,n){let s={Encode:o(a=>n[ot].Encode(t(a)),"Encode"),Decode:o(a=>this.decode(n[ot].Decode(a)),"Decode")};return L(x({},n),{[ot]:s})}EncodeSchema(t,n){let i={Decode:this.decode,Encode:t};return L(x({},n),{[ot]:i})}Encode(t){return No(this.schema)?this.EncodeTransform(t,this.schema):this.EncodeSchema(t,this.schema)}};o(px,"TransformEncodeBuilder");var fx=px;function yI(e){return new lx(e)}o(yI,"Transform");f();function nl(e={}){var t;return N({[P]:(t=e[P])!=null?t:"Unsafe"},e)}o(nl,"Unsafe");f();function xI(e){return N({[P]:"Void",type:"void"},e)}o(xI,"Void");f();var hx={};cn(hx,{Any:()=>wi,Array:()=>Fu,AsyncIterator:()=>ku,Awaited:()=>xS,BigInt:()=>Bo,Boolean:()=>zu,Capitalize:()=>ZS,Composite:()=>bS,Const:()=>SS,Constructor:()=>Du,ConstructorParameters:()=>IS,Date:()=>Wu,Deref:()=>or,Enum:()=>wS,Exclude:()=>Ho,Extends:()=>Go,Extract:()=>Wo,Function:()=>Mi,Index:()=>Vo,InstanceType:()=>VS,Integer:()=>jS,Intersect:()=>hn,Iterator:()=>ju,KeyOf:()=>Hu,Literal:()=>Fe,Lowercase:()=>XS,Mapped:()=>hS,Never:()=>Be,Not:()=>JS,Null:()=>Zu,Number:()=>_r,Object:()=>We,Omit:()=>Zo,Optional:()=>dn,Parameters:()=>eI,Partial:()=>el,Pick:()=>Xo,Promise:()=>Gu,Readonly:()=>$n,ReadonlyOptional:()=>sI,Record:()=>aI,Recursive:()=>cI,Ref:()=>uI,RegExp:()=>lI,Required:()=>tl,Rest:()=>hI,ReturnType:()=>mI,Strict:()=>gI,String:()=>Ln,Symbol:()=>Xu,TemplateLiteral:()=>Bu,Transform:()=>yI,Tuple:()=>br,Uint8Array:()=>Ku,Uncapitalize:()=>qS,Undefined:()=>qu,Union:()=>Ve,Unknown:()=>Jr,Unsafe:()=>nl,Uppercase:()=>KS,Void:()=>xI});f();var p=hx;f();var Va=p.Object({externalId:p.String({description:"An identifier that can be used to link this entity to data outside of the MVF."}),name:p.String({description:"The name of the entity."}),shortName:p.String({description:"A short name for the entity."}),description:p.String({description:"A description of the entity."}),icon:p.String({format:"uri",description:"A URL to an icon for the entity."})},{$id:"BaseDetails",description:"Additional information about a given entity."}),mx=p.Partial(Va,{$id:"Details",description:"Additional information about a given entity."}),wn=p.Object({details:p.Optional(p.Ref(mx))},{$id:"WithDetails"}),qi=o(e=>{let t=[...e].sort(),n=p.Pick(Va,e),i=p.Omit(Va,e);return p.Object({details:p.Intersect([n,p.Partial(i)])},{$id:"WithRequiredDetails_".concat(t.join("_"))})},"WithRequiredDetails"),gx=[Va,mx];f();var qo=p.Number({$id:"Longitude",minimum:-180,maximum:180,description:"A WGS 84-compatible longitude coordinate value."}),Ko=p.Number({$id:"Latitude",minimum:-90,maximum:90,description:"A WGS 84-compatible latitude coordinate value."}),Ki=p.Tuple([p.Ref(qo),p.Ref(Ko)],{$id:"Position",minItems:2,maxItems:2,description:"A valid WGS 84 position consisting of a longitude value, followed by a latitude value."}),Zt=p.Object({type:p.Literal("Point"),coordinates:p.Ref(Ki)},{$id:"Point",description:"An RFC-7946 compatible GeoJSON Point geometry."}),rl=p.Object({type:p.Literal("MultiPoint"),coordinates:p.Array(p.Ref(Ki))},{$id:"MultiPoint",description:"An RFC-7946 compatible GeoJSON MultiPoint geometry."}),il=p.Object({type:p.Literal("LineString"),coordinates:p.Array(p.Ref(Ki),{minItems:2,description:"At least two positions are required."})},{$id:"LineString",description:"An RFC-7946 compatible GeoJSON LineString geometry."}),ol=p.Object({type:p.Literal("MultiLineString"),coordinates:p.Array(p.Array(p.Ref(Ki),{minItems:2}))},{$id:"MultiLineString",description:"An RFC-7946 compatible GeoJSON MultiLineString geometry."}),vI=p.Array(p.Ref(Ki),{$id:"LinearRing",minItems:4,description:"A linear ring is a building block of a polygon or multi-polygon."}),yx=p.Array(p.Ref(vI),{$id:"LinearRings",minItems:1,description:"A collection of linear rings, at least one of which is the exterior ring of a polygon."}),Jo=p.Object({type:p.Literal("Polygon"),coordinates:p.Ref(yx)},{$id:"Polygon",description:"An RFC-7946 compatible GeoJSON Polygon geometry."}),Yo=p.Object({type:p.Literal("MultiPolygon"),coordinates:p.Array(p.Ref(yx))},{$id:"MultiPolygon",description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry."}),Ft=o((e,t,n)=>p.Object({type:p.Literal("Feature"),geometry:e,properties:t},n),"Feature"),sn=o((e,t,n)=>p.Object({type:p.Literal("FeatureCollection"),features:p.Array(e,n)},t),"FeatureCollection"),xx=[qo,Ko,Ki,Zt,rl,il,ol,vI,yx,Jo,Yo];f();var mt=o((e,t)=>p.Unsafe(p.String({$id:t,pattern:"^".concat(e,"_[A-Za-z0-9-]+$")})),"Ident"),Xt=mt("g","GeometryId"),_e=mt("f","FloorId"),vx=[Xt,_e];f();f();f();var _x=class _x{constructor(t){Xe(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(_x,"OptionIterator");var sl=_x,bx=class bx{constructor(t){Xe(this,"_tag","Some");Xe(this,"_value");this._value=t}get value(){return this._value}isSome(){return!0}isSomeAnd(t){return t(this.value)}isNone(){return!1}equals(t){return t.isSome()&&t.value===this.value}expect(t){return this.value}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectNone(t){return this}map(t){return _I(t(this.value))}mapAsync(t){return t(this.value).then(n=>_I(n))}mapOr(t,n){return this.map(t).unwrapOr(n)}mapOrAsync(t,n){return this.mapAsync(t).then(i=>i.unwrapOr(n))}mapOrElse(t,n){return this.map(t).unwrapOrElse(n)}mapOrElseAsync(t,n){return this.mapAsync(t).then(i=>i.unwrapOrElse(n))}and(t){return t}andThen(t){return t(this.value)}andThenAsync(t){return t(this.value)}filter(t){return t(this.value)?this:Ai()}or(t){return this}orElse(t){return this}xor(t){return t.isSome()?Ai():this}toString(){return"Some(".concat(this.value,")")}okOr(t){return J(this.value)}okOrElse(t){return J(this.value)}iter(){return new sl(this.value)}[Symbol.iterator](){return this.iter()}zip(t){return t.isSome()?Qo([this.value,t.value]):Ai()}zipWith(t,n){return t.isSome()?Qo(n(this.value,t.value)):Ai()}get[Symbol.toStringTag](){return"Some"}};o(bx,"Some");var al=bx,Sx=class Sx{constructor(){Xe(this,"_tag","None")}get value(){return null}isSome(){return!1}isSomeAnd(t){return!1}isNone(){return!0}equals(t){return t.isNone()}expect(t){throw new Error(t)}unwrap(){throw new Error("Tried to unwrap a None value!")}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(t){return this}inspectNone(t){return t(),this}map(t){return this}mapAsync(t){return Promise.resolve(this)}mapOr(t,n){return n}mapOrAsync(t,n){return Promise.resolve(n)}mapOrElse(t,n){return n()}mapOrElseAsync(t,n){return n()}and(t){return this}andThen(t){return this}andThenAsync(t){return Promise.resolve(this)}filter(t){return this}or(t){return t}orElse(t){return t()}xor(t){return t}toString(){return"None"}okOr(t){return Y(t)}okOrElse(t){return Y(t())}iter(){return new sl(null)}[Symbol.iterator](){return this.iter()}zip(t){return this}zipWith(t,n){return this}get[Symbol.toStringTag](){return"None"}};o(Sx,"None");var cl=Sx,Qo=o(e=>new al(e),"some"),Ai=o(()=>new cl,"none"),_I=o(e=>e instanceof al||e instanceof cl?e:e==null?Ai():Qo(e),"option");var Mx=class Mx{constructor(t){Xe(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(Mx,"ResultIterator");var ul=Mx,Ex=class Ex{constructor(t){Xe(this,"_tag","Ok");Xe(this,"_value");this._value=t}get value(){return this._value}get error(){return null}isOk(){return!0}isOkAnd(t){return t(this.value)}isErr(){return!1}isErrAnd(t){return!1}ok(){return Qo(this.value)}err(){return Ai()}expect(t){return this.value}expectErr(t){throw new Error(t)}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectErr(){return this}map(t){return J(t(this.value))}async mapAsync(t){return t(this.value).then(J)}mapOr(t,n){return t(this.value)}async mapOrAsync(t,n){return t(this.value)}mapOrElse(t,n){return t(this.value)}async mapOrElseAsync(t,n){return t(this.value)}mapErr(t){return this}iter(){return new ul(this.value)}[Symbol.iterator](){return this.iter()}and(t){return t}andThen(t){return t(this.value)}or(t){return this}orElse(t){return this}async andThenAsync(t){return t(this.value)}toString(){return"Ok(".concat(this.value,")")}get[Symbol.toStringTag](){return"Ok"}};o(Ex,"Ok");var Ix=Ex,ll=class ll{constructor(t){Xe(this,"_tag","Err");Xe(this,"_error");this._error=t}get value(){return null}get error(){return this._error}isOk(){return!1}isOkAnd(t){return!1}isErr(){return!0}isErrAnd(t){return t(this.error)}ok(){return Ai()}err(){return Qo(this.error)}expect(t){throw new Error(t)}expectErr(t){return this.error}unwrap(){throw this.error}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(){return this}inspectErr(t){return t(this.error),this}map(t){return this}iter(){return new ul(null)}[Symbol.iterator](){return this.iter()}async mapAsync(t){return this}mapOr(t,n){return n}async mapOrAsync(t,n){return n}mapOrElse(t,n){return n()}async mapOrElseAsync(t,n){return n()}mapErr(t){return new ll(t(this.error))}and(t){return this}andThen(t){return this}async andThenAsync(t){return this}or(t){return t}orElse(t){return t(this.error)}toString(){return"Err(".concat(this.error,")")}get[Symbol.toStringTag](){return"Err"}};o(ll,"Err");var wx=ll,J=o(e=>new Ix(e),"ok"),Y=o(e=>new wx(e),"err");f();var gn;(function(e){e.GeometryMissingError="GeometryMissingError",e.FloorMissingError="FloorMissingError",e.UnknownFloorError="UnknownFloorError",e.UnknownGeometryError="UnknownGeometryError",e.DuplicateIdError="DuplicateIdError"})(gn||(gn={}));f();f();f();f();var Ax=class Ax extends re{constructor(t){super("Duplicate type kind '".concat(t,"' detected"))}};o(Ax,"TypeSystemDuplicateTypeKind");var Tx=Ax,Px=class Px extends re{constructor(t){super("Duplicate string format '".concat(t,"' detected"))}};o(Px,"TypeSystemDuplicateFormat");var ja=Px,fl;(function(e){function t(i,r){if(Et.Has(i))throw new Tx(i);return Et.Set(i,r),(s={})=>nl(L(x({},s),{[P]:i}))}o(t,"Type"),e.Type=t;function n(i,r){if(on.Has(i))throw new ja(i);return on.Set(i,r),i}o(n,"Format"),e.Format=n})(fl||(fl={}));f();function xD(e){switch(e.errorType){case R.ArrayContains:return"Expected array to contain at least one matching value";case R.ArrayMaxContains:return"Expected array to contain no more than ".concat(e.schema.maxContains," matching values");case R.ArrayMinContains:return"Expected array to contain at least ".concat(e.schema.minContains," matching values");case R.ArrayMaxItems:return"Expected array length to be less or equal to ".concat(e.schema.maxItems);case R.ArrayMinItems:return"Expected array length to be greater or equal to ".concat(e.schema.minItems);case R.ArrayUniqueItems:return"Expected array elements to be unique";case R.Array:return"Expected array";case R.AsyncIterator:return"Expected AsyncIterator";case R.BigIntExclusiveMaximum:return"Expected bigint to be less than ".concat(e.schema.exclusiveMaximum);case R.BigIntExclusiveMinimum:return"Expected bigint to be greater than ".concat(e.schema.exclusiveMinimum);case R.BigIntMaximum:return"Expected bigint to be less or equal to ".concat(e.schema.maximum);case R.BigIntMinimum:return"Expected bigint to be greater or equal to ".concat(e.schema.minimum);case R.BigIntMultipleOf:return"Expected bigint to be a multiple of ".concat(e.schema.multipleOf);case R.BigInt:return"Expected bigint";case R.Boolean:return"Expected boolean";case R.DateExclusiveMinimumTimestamp:return"Expected Date timestamp to be greater than ".concat(e.schema.exclusiveMinimumTimestamp);case R.DateExclusiveMaximumTimestamp:return"Expected Date timestamp to be less than ".concat(e.schema.exclusiveMaximumTimestamp);case R.DateMinimumTimestamp:return"Expected Date timestamp to be greater or equal to ".concat(e.schema.minimumTimestamp);case R.DateMaximumTimestamp:return"Expected Date timestamp to be less or equal to ".concat(e.schema.maximumTimestamp);case R.DateMultipleOfTimestamp:return"Expected Date timestamp to be a multiple of ".concat(e.schema.multipleOfTimestamp);case R.Date:return"Expected Date";case R.Function:return"Expected function";case R.IntegerExclusiveMaximum:return"Expected integer to be less than ".concat(e.schema.exclusiveMaximum);case R.IntegerExclusiveMinimum:return"Expected integer to be greater than ".concat(e.schema.exclusiveMinimum);case R.IntegerMaximum:return"Expected integer to be less or equal to ".concat(e.schema.maximum);case R.IntegerMinimum:return"Expected integer to be greater or equal to ".concat(e.schema.minimum);case R.IntegerMultipleOf:return"Expected integer to be a multiple of ".concat(e.schema.multipleOf);case R.Integer:return"Expected integer";case R.IntersectUnevaluatedProperties:return"Unexpected property";case R.Intersect:return"Expected all values to match";case R.Iterator:return"Expected Iterator";case R.Literal:return"Expected ".concat(typeof e.schema.const=="string"?"'".concat(e.schema.const,"'"):e.schema.const);case R.Never:return"Never";case R.Not:return"Value should not match";case R.Null:return"Expected null";case R.NumberExclusiveMaximum:return"Expected number to be less than ".concat(e.schema.exclusiveMaximum);case R.NumberExclusiveMinimum:return"Expected number to be greater than ".concat(e.schema.exclusiveMinimum);case R.NumberMaximum:return"Expected number to be less or equal to ".concat(e.schema.maximum);case R.NumberMinimum:return"Expected number to be greater or equal to ".concat(e.schema.minimum);case R.NumberMultipleOf:return"Expected number to be a multiple of ".concat(e.schema.multipleOf);case R.Number:return"Expected number";case R.Object:return"Expected object";case R.ObjectAdditionalProperties:return"Unexpected property";case R.ObjectMaxProperties:return"Expected object to have no more than ".concat(e.schema.maxProperties," properties");case R.ObjectMinProperties:return"Expected object to have at least ".concat(e.schema.minProperties," properties");case R.ObjectRequiredProperty:return"Expected required property";case R.Promise:return"Expected Promise";case R.RegExp:return"Expected string to match regular expression";case R.StringFormatUnknown:return"Unknown format '".concat(e.schema.format,"'");case R.StringFormat:return"Expected string to match '".concat(e.schema.format,"' format");case R.StringMaxLength:return"Expected string length less or equal to ".concat(e.schema.maxLength);case R.StringMinLength:return"Expected string length greater or equal to ".concat(e.schema.minLength);case R.StringPattern:return"Expected string to match '".concat(e.schema.pattern,"'");case R.String:return"Expected string";case R.Symbol:return"Expected symbol";case R.TupleLength:return"Expected tuple to have ".concat(e.schema.maxItems||0," elements");case R.Tuple:return"Expected tuple";case R.Uint8ArrayMaxByteLength:return"Expected byte length less or equal to ".concat(e.schema.maxByteLength);case R.Uint8ArrayMinByteLength:return"Expected byte length greater or equal to ".concat(e.schema.minByteLength);case R.Uint8Array:return"Expected Uint8Array";case R.Undefined:return"Expected undefined";case R.Union:return"Expected union value";case R.Void:return"Expected void";case R.Kind:return"Expected kind '".concat(e.schema[P],"'");default:return"Unknown error type"}}o(xD,"DefaultErrorFunction");var vD=xD;function bI(){return vD}o(bI,"GetErrorFunction");f();var Cx=class Cx extends re{constructor(t){super("Unable to dereference schema with $id '".concat(t.$ref,"'")),this.schema=t}};o(Cx,"TypeDereferenceError");var Rx=Cx;function _D(e,t){let n=t.find(i=>i.$id===e.$ref);if(n===void 0)throw new Rx(e);return Ae(n,t)}o(_D,"Resolve");function jn(e,t){return!Se(e.$id)||t.some(n=>n.$id===e.$id)||t.push(e),t}o(jn,"Pushref");function Ae(e,t){return e[P]==="This"||e[P]==="Ref"?_D(e,t):e}o(Ae,"Deref");f();var Ux=class Ux extends re{constructor(t){super("Unable to hash value"),this.value=t}};o(Ux,"ValueHashError");var Ox=Ux,Mn;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(Mn||(Mn={}));var es=BigInt("14695981039346656037"),[bD,SD]=[BigInt("1099511628211"),BigInt("18446744073709551616")],ID=Array.from({length:256}).map((e,t)=>BigInt(t)),SI=new Float64Array(1),II=new DataView(SI.buffer),wI=new Uint8Array(SI.buffer);function*wD(e){let t=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let n=0;n<t;n++)yield e>>8*(t-1-n)&255}o(wD,"NumberToBytes");function MD(e){qt(Mn.Array);for(let t of e)ts(t)}o(MD,"ArrayType");function ED(e){qt(Mn.Boolean),qt(e?1:0)}o(ED,"BooleanType");function TD(e){qt(Mn.BigInt),II.setBigInt64(0,e);for(let t of wI)qt(t)}o(TD,"BigIntType");function AD(e){qt(Mn.Date),ts(e.getTime())}o(AD,"DateType");function PD(e){qt(Mn.Null)}o(PD,"NullType");function RD(e){qt(Mn.Number),II.setFloat64(0,e);for(let t of wI)qt(t)}o(RD,"NumberType");function CD(e){qt(Mn.Object);for(let t of globalThis.Object.getOwnPropertyNames(e).sort())ts(t),ts(e[t])}o(CD,"ObjectType");function OD(e){qt(Mn.String);for(let t=0;t<e.length;t++)for(let n of wD(e.charCodeAt(t)))qt(n)}o(OD,"StringType");function UD(e){qt(Mn.Symbol),ts(e.description)}o(UD,"SymbolType");function ND(e){qt(Mn.Uint8Array);for(let t=0;t<e.length;t++)qt(e[t])}o(ND,"Uint8ArrayType");function FD(e){return qt(Mn.Undefined)}o(FD,"UndefinedType");function ts(e){if(ae(e))return MD(e);if(yr(e))return ED(e);if(Ut(e))return TD(e);if(nn(e))return AD(e);if(Vr(e))return PD(e);if(ee(e))return RD(e);if(fe(e))return CD(e);if(Se(e))return OD(e);if(jr(e))return UD(e);if(Uo(e))return ND(e);if(ut(e))return FD(e);throw new Ox(e)}o(ts,"Visit");function qt(e){es=es^ID[e],es=es*bD%SD}o(qt,"FNV1A64");function Pi(e){return es=BigInt("14695981039346656037"),ts(e),es}o(Pi,"Hash");f();var Fx=class Fx extends re{constructor(t){super("Unknown type"),this.schema=t}};o(Fx,"ValueCheckUnknownTypeError");var Nx=Fx;function kD(e){return e[P]==="Any"||e[P]==="Unknown"}o(kD,"IsAnyOrUnknown");function ye(e){return e!==void 0}o(ye,"IsDefined");function DD(e,t,n){return!0}o(DD,"FromAny");function LD(e,t,n){if(!ae(n)||ye(e.minItems)&&!(n.length>=e.minItems)||ye(e.maxItems)&&!(n.length<=e.maxItems)||!n.every(s=>kt(e.items,t,s))||e.uniqueItems===!0&&!function(){let s=new Set;for(let a of n){let u=Pi(a);if(s.has(u))return!1;s.add(u)}return!0}())return!1;if(!(ye(e.contains)||ee(e.minContains)||ee(e.maxContains)))return!0;let i=ye(e.contains)?e.contains:Be(),r=n.reduce((s,a)=>kt(i,t,a)?s+1:s,0);return!(r===0||ee(e.minContains)&&r<e.minContains||ee(e.maxContains)&&r>e.maxContains)}o(LD,"FromArray");function $D(e,t,n){return Cu(n)}o($D,"FromAsyncIterator");function zD(e,t,n){return!(!Ut(n)||ye(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)||ye(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)||ye(e.maximum)&&!(n<=e.maximum)||ye(e.minimum)&&!(n>=e.minimum)||ye(e.multipleOf)&&n%e.multipleOf!==BigInt(0))}o(zD,"FromBigInt");function BD(e,t,n){return yr(n)}o(BD,"FromBoolean");function VD(e,t,n){return kt(e.returns,t,n.prototype)}o(VD,"FromConstructor");function jD(e,t,n){return!(!nn(n)||ye(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)||ye(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)||ye(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)||ye(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)||ye(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0)}o(jD,"FromDate");function GD(e,t,n){return bi(n)}o(GD,"FromFunction");function HD(e,t,n){return!(!Nu(n)||ye(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)||ye(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)||ye(e.maximum)&&!(n<=e.maximum)||ye(e.minimum)&&!(n>=e.minimum)||ye(e.multipleOf)&&n%e.multipleOf!==0)}o(HD,"FromInteger");function WD(e,t,n){let i=e.allOf.every(r=>kt(r,t,n));if(e.unevaluatedProperties===!1){let r=new RegExp(Kr(e)),s=Object.getOwnPropertyNames(n).every(a=>r.test(a));return i&&s}else if(Ie(e.unevaluatedProperties)){let r=new RegExp(Kr(e)),s=Object.getOwnPropertyNames(n).every(a=>r.test(a)||kt(e.unevaluatedProperties,t,n[a]));return i&&s}else return i}o(WD,"FromIntersect");function ZD(e,t,n){return Ou(n)}o(ZD,"FromIterator");function XD(e,t,n){return n===e.const}o(XD,"FromLiteral");function qD(e,t,n){return!1}o(qD,"FromNever");function KD(e,t,n){return!kt(e.not,t,n)}o(KD,"FromNot");function JD(e,t,n){return Vr(n)}o(JD,"FromNull");function YD(e,t,n){return!(!Le.IsNumberLike(n)||ye(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)||ye(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)||ye(e.minimum)&&!(n>=e.minimum)||ye(e.maximum)&&!(n<=e.maximum)||ye(e.multipleOf)&&n%e.multipleOf!==0)}o(YD,"FromNumber");function QD(e,t,n){if(!Le.IsObjectLike(n)||ye(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)||ye(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties))return!1;let i=Object.getOwnPropertyNames(e.properties);for(let r of i){let s=e.properties[r];if(e.required&&e.required.includes(r)){if(!kt(s,t,n[r])||(Yr(s)||kD(s))&&!(r in n))return!1}else if(Le.IsExactOptionalProperty(n,r)&&!kt(s,t,n[r]))return!1}if(e.additionalProperties===!1){let r=Object.getOwnPropertyNames(n);return e.required&&e.required.length===i.length&&r.length===i.length?!0:r.every(s=>i.includes(s))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(n).every(s=>i.includes(s)||kt(e.additionalProperties,t,n[s])):!0}o(QD,"FromObject");function eL(e,t,n){return Uu(n)}o(eL,"FromPromise");function tL(e,t,n){if(!Le.IsRecordLike(n)||ye(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)||ye(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties))return!1;let[i,r]=Object.entries(e.patternProperties)[0],s=new RegExp(i),a=Object.entries(n).every(([c,d])=>s.test(c)?kt(r,t,d):!0),u=typeof e.additionalProperties=="object"?Object.entries(n).every(([c,d])=>s.test(c)?!0:kt(e.additionalProperties,t,d)):!0,l=e.additionalProperties===!1?Object.getOwnPropertyNames(n).every(c=>s.test(c)):!0;return a&&u&&l}o(tL,"FromRecord");function nL(e,t,n){return kt(Ae(e,t),t,n)}o(nL,"FromRef");function rL(e,t,n){let i=new RegExp(e.source,e.flags);return ye(e.minLength)&&!(n.length>=e.minLength)||ye(e.maxLength)&&!(n.length<=e.maxLength)?!1:i.test(n)}o(rL,"FromRegExp");function iL(e,t,n){return!Se(n)||ye(e.minLength)&&!(n.length>=e.minLength)||ye(e.maxLength)&&!(n.length<=e.maxLength)||ye(e.pattern)&&!new RegExp(e.pattern).test(n)?!1:ye(e.format)?on.Has(e.format)?on.Get(e.format)(n):!1:!0}o(iL,"FromString");function oL(e,t,n){return jr(n)}o(oL,"FromSymbol");function sL(e,t,n){return Se(n)&&new RegExp(e.pattern).test(n)}o(sL,"FromTemplateLiteral");function aL(e,t,n){return kt(Ae(e,t),t,n)}o(aL,"FromThis");function cL(e,t,n){if(!ae(n)||e.items===void 0&&n.length!==0||n.length!==e.maxItems)return!1;if(!e.items)return!0;for(let i=0;i<e.items.length;i++)if(!kt(e.items[i],t,n[i]))return!1;return!0}o(cL,"FromTuple");function uL(e,t,n){return ut(n)}o(uL,"FromUndefined");function lL(e,t,n){return e.anyOf.some(i=>kt(i,t,n))}o(lL,"FromUnion");function fL(e,t,n){return!(!Uo(n)||ye(e.maxByteLength)&&!(n.length<=e.maxByteLength)||ye(e.minByteLength)&&!(n.length>=e.minByteLength))}o(fL,"FromUint8Array");function dL(e,t,n){return!0}o(dL,"FromUnknown");function pL(e,t,n){return Le.IsVoidLike(n)}o(pL,"FromVoid");function hL(e,t,n){return Et.Has(e[P])?Et.Get(e[P])(e,n):!1}o(hL,"FromKind");function kt(e,t,n){let i=ye(e.$id)?[...t,e]:t,r=e;switch(r[P]){case"Any":return DD(r,i,n);case"Array":return LD(r,i,n);case"AsyncIterator":return $D(r,i,n);case"BigInt":return zD(r,i,n);case"Boolean":return BD(r,i,n);case"Constructor":return VD(r,i,n);case"Date":return jD(r,i,n);case"Function":return GD(r,i,n);case"Integer":return HD(r,i,n);case"Intersect":return WD(r,i,n);case"Iterator":return ZD(r,i,n);case"Literal":return XD(r,i,n);case"Never":return qD(r,i,n);case"Not":return KD(r,i,n);case"Null":return JD(r,i,n);case"Number":return YD(r,i,n);case"Object":return QD(r,i,n);case"Promise":return eL(r,i,n);case"Record":return tL(r,i,n);case"Ref":return nL(r,i,n);case"RegExp":return rL(r,i,n);case"String":return iL(r,i,n);case"Symbol":return oL(r,i,n);case"TemplateLiteral":return sL(r,i,n);case"This":return aL(r,i,n);case"Tuple":return cL(r,i,n);case"Undefined":return uL(r,i,n);case"Union":return lL(r,i,n);case"Uint8Array":return fL(r,i,n);case"Unknown":return dL(r,i,n);case"Void":return pL(r,i,n);default:if(!Et.Has(r[P]))throw new Nx(r);return hL(r,i,n)}}o(kt,"Visit");function pe(...e){return e.length===3?kt(e[0],e[1],e[2]):kt(e[0],[],e[1])}o(pe,"Check");var R;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(R||(R={}));var Dx=class Dx extends re{constructor(t){super("Unknown type"),this.schema=t}};o(Dx,"ValueErrorsUnknownTypeError");var kx=Dx;function Qr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}o(Qr,"EscapeKey");function xe(e){return e!==void 0}o(xe,"IsDefined");var Lx=class Lx{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){let t=this.iterator.next();return t.done?void 0:t.value}};o(Lx,"ValueErrorIterator");var Gn=Lx;function Z(e,t,n,i,r=[]){return{type:e,schema:t,path:n,value:i,message:bI()({errorType:e,path:n,schema:t,value:i,errors:r}),errors:r}}o(Z,"Create");function*mL(e,t,n,i){}o(mL,"FromAny");function*gL(e,t,n,i){if(!ae(i))return yield Z(R.Array,e,n,i);xe(e.minItems)&&!(i.length>=e.minItems)&&(yield Z(R.ArrayMinItems,e,n,i)),xe(e.maxItems)&&!(i.length<=e.maxItems)&&(yield Z(R.ArrayMaxItems,e,n,i));for(let a=0;a<i.length;a++)yield*k(Dt(e.items,t,"".concat(n,"/").concat(a),i[a]));if(e.uniqueItems===!0&&!function(){let a=new Set;for(let u of i){let l=Pi(u);if(a.has(l))return!1;a.add(l)}return!0}()&&(yield Z(R.ArrayUniqueItems,e,n,i)),!(xe(e.contains)||xe(e.minContains)||xe(e.maxContains)))return;let r=xe(e.contains)?e.contains:Be(),s=i.reduce((a,u,l)=>Dt(r,t,"".concat(n).concat(l),u).next().done===!0?a+1:a,0);s===0&&(yield Z(R.ArrayContains,e,n,i)),ee(e.minContains)&&s<e.minContains&&(yield Z(R.ArrayMinContains,e,n,i)),ee(e.maxContains)&&s>e.maxContains&&(yield Z(R.ArrayMaxContains,e,n,i))}o(gL,"FromArray");function*yL(e,t,n,i){Cu(i)||(yield Z(R.AsyncIterator,e,n,i))}o(yL,"FromAsyncIterator");function*xL(e,t,n,i){if(!Ut(i))return yield Z(R.BigInt,e,n,i);xe(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)&&(yield Z(R.BigIntExclusiveMaximum,e,n,i)),xe(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)&&(yield Z(R.BigIntExclusiveMinimum,e,n,i)),xe(e.maximum)&&!(i<=e.maximum)&&(yield Z(R.BigIntMaximum,e,n,i)),xe(e.minimum)&&!(i>=e.minimum)&&(yield Z(R.BigIntMinimum,e,n,i)),xe(e.multipleOf)&&i%e.multipleOf!==BigInt(0)&&(yield Z(R.BigIntMultipleOf,e,n,i))}o(xL,"FromBigInt");function*vL(e,t,n,i){yr(i)||(yield Z(R.Boolean,e,n,i))}o(vL,"FromBoolean");function*_L(e,t,n,i){yield*k(Dt(e.returns,t,n,i.prototype))}o(_L,"FromConstructor");function*bL(e,t,n,i){if(!nn(i))return yield Z(R.Date,e,n,i);xe(e.exclusiveMaximumTimestamp)&&!(i.getTime()<e.exclusiveMaximumTimestamp)&&(yield Z(R.DateExclusiveMaximumTimestamp,e,n,i)),xe(e.exclusiveMinimumTimestamp)&&!(i.getTime()>e.exclusiveMinimumTimestamp)&&(yield Z(R.DateExclusiveMinimumTimestamp,e,n,i)),xe(e.maximumTimestamp)&&!(i.getTime()<=e.maximumTimestamp)&&(yield Z(R.DateMaximumTimestamp,e,n,i)),xe(e.minimumTimestamp)&&!(i.getTime()>=e.minimumTimestamp)&&(yield Z(R.DateMinimumTimestamp,e,n,i)),xe(e.multipleOfTimestamp)&&i.getTime()%e.multipleOfTimestamp!==0&&(yield Z(R.DateMultipleOfTimestamp,e,n,i))}o(bL,"FromDate");function*SL(e,t,n,i){bi(i)||(yield Z(R.Function,e,n,i))}o(SL,"FromFunction");function*IL(e,t,n,i){if(!Nu(i))return yield Z(R.Integer,e,n,i);xe(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)&&(yield Z(R.IntegerExclusiveMaximum,e,n,i)),xe(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)&&(yield Z(R.IntegerExclusiveMinimum,e,n,i)),xe(e.maximum)&&!(i<=e.maximum)&&(yield Z(R.IntegerMaximum,e,n,i)),xe(e.minimum)&&!(i>=e.minimum)&&(yield Z(R.IntegerMinimum,e,n,i)),xe(e.multipleOf)&&i%e.multipleOf!==0&&(yield Z(R.IntegerMultipleOf,e,n,i))}o(IL,"FromInteger");function*wL(e,t,n,i){let r=!1;for(let s of e.allOf)for(let a of Dt(s,t,n,i))r=!0,yield a;if(r)return yield Z(R.Intersect,e,n,i);if(e.unevaluatedProperties===!1){let s=new RegExp(Kr(e));for(let a of Object.getOwnPropertyNames(i))s.test(a)||(yield Z(R.IntersectUnevaluatedProperties,e,"".concat(n,"/").concat(a),i))}if(typeof e.unevaluatedProperties=="object"){let s=new RegExp(Kr(e));for(let a of Object.getOwnPropertyNames(i))if(!s.test(a)){let u=Dt(e.unevaluatedProperties,t,"".concat(n,"/").concat(a),i[a]).next();u.done||(yield u.value)}}}o(wL,"FromIntersect");function*ML(e,t,n,i){Ou(i)||(yield Z(R.Iterator,e,n,i))}o(ML,"FromIterator");function*EL(e,t,n,i){i!==e.const&&(yield Z(R.Literal,e,n,i))}o(EL,"FromLiteral");function*TL(e,t,n,i){yield Z(R.Never,e,n,i)}o(TL,"FromNever");function*AL(e,t,n,i){Dt(e.not,t,n,i).next().done===!0&&(yield Z(R.Not,e,n,i))}o(AL,"FromNot");function*PL(e,t,n,i){Vr(i)||(yield Z(R.Null,e,n,i))}o(PL,"FromNull");function*RL(e,t,n,i){if(!Le.IsNumberLike(i))return yield Z(R.Number,e,n,i);xe(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)&&(yield Z(R.NumberExclusiveMaximum,e,n,i)),xe(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)&&(yield Z(R.NumberExclusiveMinimum,e,n,i)),xe(e.maximum)&&!(i<=e.maximum)&&(yield Z(R.NumberMaximum,e,n,i)),xe(e.minimum)&&!(i>=e.minimum)&&(yield Z(R.NumberMinimum,e,n,i)),xe(e.multipleOf)&&i%e.multipleOf!==0&&(yield Z(R.NumberMultipleOf,e,n,i))}o(RL,"FromNumber");function*CL(e,t,n,i){if(!Le.IsObjectLike(i))return yield Z(R.Object,e,n,i);xe(e.minProperties)&&!(Object.getOwnPropertyNames(i).length>=e.minProperties)&&(yield Z(R.ObjectMinProperties,e,n,i)),xe(e.maxProperties)&&!(Object.getOwnPropertyNames(i).length<=e.maxProperties)&&(yield Z(R.ObjectMaxProperties,e,n,i));let r=Array.isArray(e.required)?e.required:[],s=Object.getOwnPropertyNames(e.properties),a=Object.getOwnPropertyNames(i);for(let u of r)a.includes(u)||(yield Z(R.ObjectRequiredProperty,e.properties[u],"".concat(n,"/").concat(Qr(u)),void 0));if(e.additionalProperties===!1)for(let u of a)s.includes(u)||(yield Z(R.ObjectAdditionalProperties,e,"".concat(n,"/").concat(Qr(u)),i[u]));if(typeof e.additionalProperties=="object")for(let u of a)s.includes(u)||(yield*k(Dt(e.additionalProperties,t,"".concat(n,"/").concat(Qr(u)),i[u])));for(let u of s){let l=e.properties[u];e.required&&e.required.includes(u)?(yield*k(Dt(l,t,"".concat(n,"/").concat(Qr(u)),i[u])),Yr(e)&&!(u in i)&&(yield Z(R.ObjectRequiredProperty,l,"".concat(n,"/").concat(Qr(u)),void 0))):Le.IsExactOptionalProperty(i,u)&&(yield*k(Dt(l,t,"".concat(n,"/").concat(Qr(u)),i[u])))}}o(CL,"FromObject");function*OL(e,t,n,i){Uu(i)||(yield Z(R.Promise,e,n,i))}o(OL,"FromPromise");function*UL(e,t,n,i){if(!Le.IsRecordLike(i))return yield Z(R.Object,e,n,i);xe(e.minProperties)&&!(Object.getOwnPropertyNames(i).length>=e.minProperties)&&(yield Z(R.ObjectMinProperties,e,n,i)),xe(e.maxProperties)&&!(Object.getOwnPropertyNames(i).length<=e.maxProperties)&&(yield Z(R.ObjectMaxProperties,e,n,i));let[r,s]=Object.entries(e.patternProperties)[0],a=new RegExp(r);for(let[u,l]of Object.entries(i))a.test(u)&&(yield*k(Dt(s,t,"".concat(n,"/").concat(Qr(u)),l)));if(typeof e.additionalProperties=="object")for(let[u,l]of Object.entries(i))a.test(u)||(yield*k(Dt(e.additionalProperties,t,"".concat(n,"/").concat(Qr(u)),l)));if(e.additionalProperties===!1){for(let[u,l]of Object.entries(i))if(!a.test(u))return yield Z(R.ObjectAdditionalProperties,e,"".concat(n,"/").concat(Qr(u)),l)}}o(UL,"FromRecord");function*NL(e,t,n,i){yield*k(Dt(Ae(e,t),t,n,i))}o(NL,"FromRef");function*FL(e,t,n,i){if(!Se(i))return yield Z(R.String,e,n,i);if(xe(e.minLength)&&!(i.length>=e.minLength)&&(yield Z(R.StringMinLength,e,n,i)),xe(e.maxLength)&&!(i.length<=e.maxLength)&&(yield Z(R.StringMaxLength,e,n,i)),!new RegExp(e.source,e.flags).test(i))return yield Z(R.RegExp,e,n,i)}o(FL,"FromRegExp");function*kL(e,t,n,i){if(!Se(i))return yield Z(R.String,e,n,i);xe(e.minLength)&&!(i.length>=e.minLength)&&(yield Z(R.StringMinLength,e,n,i)),xe(e.maxLength)&&!(i.length<=e.maxLength)&&(yield Z(R.StringMaxLength,e,n,i)),Se(e.pattern)&&(new RegExp(e.pattern).test(i)||(yield Z(R.StringPattern,e,n,i))),Se(e.format)&&(on.Has(e.format)?on.Get(e.format)(i)||(yield Z(R.StringFormat,e,n,i)):yield Z(R.StringFormatUnknown,e,n,i))}o(kL,"FromString");function*DL(e,t,n,i){jr(i)||(yield Z(R.Symbol,e,n,i))}o(DL,"FromSymbol");function*LL(e,t,n,i){if(!Se(i))return yield Z(R.String,e,n,i);new RegExp(e.pattern).test(i)||(yield Z(R.StringPattern,e,n,i))}o(LL,"FromTemplateLiteral");function*$L(e,t,n,i){yield*k(Dt(Ae(e,t),t,n,i))}o($L,"FromThis");function*zL(e,t,n,i){if(!ae(i))return yield Z(R.Tuple,e,n,i);if(e.items===void 0&&i.length!==0)return yield Z(R.TupleLength,e,n,i);if(i.length!==e.maxItems)return yield Z(R.TupleLength,e,n,i);if(e.items)for(let r=0;r<e.items.length;r++)yield*k(Dt(e.items[r],t,"".concat(n,"/").concat(r),i[r]))}o(zL,"FromTuple");function*BL(e,t,n,i){ut(i)||(yield Z(R.Undefined,e,n,i))}o(BL,"FromUndefined");function*VL(e,t,n,i){if(pe(e,t,i))return;let r=e.anyOf.map(s=>new Gn(Dt(s,t,n,i)));yield Z(R.Union,e,n,i,r)}o(VL,"FromUnion");function*jL(e,t,n,i){if(!Uo(i))return yield Z(R.Uint8Array,e,n,i);xe(e.maxByteLength)&&!(i.length<=e.maxByteLength)&&(yield Z(R.Uint8ArrayMaxByteLength,e,n,i)),xe(e.minByteLength)&&!(i.length>=e.minByteLength)&&(yield Z(R.Uint8ArrayMinByteLength,e,n,i))}o(jL,"FromUint8Array");function*GL(e,t,n,i){}o(GL,"FromUnknown");function*HL(e,t,n,i){Le.IsVoidLike(i)||(yield Z(R.Void,e,n,i))}o(HL,"FromVoid");function*WL(e,t,n,i){Et.Get(e[P])(e,i)||(yield Z(R.Kind,e,n,i))}o(WL,"FromKind");function*Dt(e,t,n,i){let r=xe(e.$id)?[...t,e]:t,s=e;switch(s[P]){case"Any":return yield*k(mL(s,r,n,i));case"Array":return yield*k(gL(s,r,n,i));case"AsyncIterator":return yield*k(yL(s,r,n,i));case"BigInt":return yield*k(xL(s,r,n,i));case"Boolean":return yield*k(vL(s,r,n,i));case"Constructor":return yield*k(_L(s,r,n,i));case"Date":return yield*k(bL(s,r,n,i));case"Function":return yield*k(SL(s,r,n,i));case"Integer":return yield*k(IL(s,r,n,i));case"Intersect":return yield*k(wL(s,r,n,i));case"Iterator":return yield*k(ML(s,r,n,i));case"Literal":return yield*k(EL(s,r,n,i));case"Never":return yield*k(TL(s,r,n,i));case"Not":return yield*k(AL(s,r,n,i));case"Null":return yield*k(PL(s,r,n,i));case"Number":return yield*k(RL(s,r,n,i));case"Object":return yield*k(CL(s,r,n,i));case"Promise":return yield*k(OL(s,r,n,i));case"Record":return yield*k(UL(s,r,n,i));case"Ref":return yield*k(NL(s,r,n,i));case"RegExp":return yield*k(FL(s,r,n,i));case"String":return yield*k(kL(s,r,n,i));case"Symbol":return yield*k(DL(s,r,n,i));case"TemplateLiteral":return yield*k(LL(s,r,n,i));case"This":return yield*k($L(s,r,n,i));case"Tuple":return yield*k(zL(s,r,n,i));case"Undefined":return yield*k(BL(s,r,n,i));case"Union":return yield*k(VL(s,r,n,i));case"Uint8Array":return yield*k(jL(s,r,n,i));case"Unknown":return yield*k(GL(s,r,n,i));case"Void":return yield*k(HL(s,r,n,i));default:if(!Et.Has(s[P]))throw new kx(e);return yield*k(WL(s,r,n,i))}}o(Dt,"Visit");function Sr(...e){let t=e.length===3?Dt(e[0],e[1],"",e[2]):Dt(e[0],[],"",e[1]);return new Gn(t)}o(Sr,"Errors");f();f();var ZL=function(e,t,n,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(e,n):r?r.value=n:t.set(e,n),n},EI=function(e,t,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(e):i?i.value:t.get(e)},$x,dl,TI,Bx=class Bx extends re{constructor(t){let n=t.First();super(n===void 0?"Invalid Value":n.message),$x.add(this),dl.set(this,void 0),ZL(this,dl,t,"f"),this.error=n}Errors(){return new Gn(EI(this,$x,"m",TI).call(this))}};o(Bx,"AssertError");var zx=Bx;dl=new WeakMap,$x=new WeakSet,TI=o(function*(){this.error&&(yield this.error),yield*k(EI(this,dl,"f"))},"_AssertError_Iterator");function MI(e,t,n){if(!pe(e,t,n))throw new zx(Sr(e,t,n))}o(MI,"AssertValue");function pl(...e){return e.length===3?MI(e[0],e[1],e[2]):MI(e[0],[],e[1])}o(pl,"Assert");f();f();f();function XL(e){let t={};for(let n of Object.getOwnPropertyNames(e))t[n]=Pe(e[n]);for(let n of Object.getOwnPropertySymbols(e))t[n]=Pe(e[n]);return t}o(XL,"FromObject");function qL(e){return e.map(t=>Pe(t))}o(qL,"FromArray");function KL(e){return e.slice()}o(KL,"FromTypedArray");function JL(e){return new Map(Pe([...e.entries()]))}o(JL,"FromMap");function YL(e){return new Set(Pe([...e.entries()]))}o(YL,"FromSet");function QL(e){return new Date(e.toISOString())}o(QL,"FromDate");function Pe(e){if(ae(e))return qL(e);if(nn(e))return QL(e);if(kn(e))return KL(e);if(lb(e))return JL(e);if(fb(e))return YL(e);if(fe(e))return XL(e);if(Nt(e))return e;throw new Error("ValueClone: Unable to clone value")}o(Pe,"Clone");var Vx=class Vx extends re{constructor(t,n){super(n),this.schema=t}};o(Vx,"ValueCreateError");var En=Vx;function Re(e){return bi(e)?e():Pe(e)}o(Re,"FromDefault");function e$(e,t){return ie(e,"default")?Re(e.default):{}}o(e$,"FromAny");function t$(e,t){if(e.uniqueItems===!0&&!ie(e,"default"))throw new En(e,"Array with the uniqueItems constraint requires a default value");if("contains"in e&&!ie(e,"default"))throw new En(e,"Array with the contains constraint requires a default value");return"default"in e?Re(e.default):e.minItems!==void 0?Array.from({length:e.minItems}).map(n=>Tn(e.items,t)):[]}o(t$,"FromArray");function n$(e,t){return ie(e,"default")?Re(e.default):function(){return v_(this,null,function*(){})}()}o(n$,"FromAsyncIterator");function r$(e,t){return ie(e,"default")?Re(e.default):BigInt(0)}o(r$,"FromBigInt");function i$(e,t){return ie(e,"default")?Re(e.default):!1}o(i$,"FromBoolean");function o$(e,t){if(ie(e,"default"))return Re(e.default);{let n=Tn(e.returns,t);return typeof n=="object"&&!Array.isArray(n)?class{constructor(){for(let[i,r]of Object.entries(n)){let s=this;s[i]=r}}}:class{}}}o(o$,"FromConstructor");function s$(e,t){return ie(e,"default")?Re(e.default):e.minimumTimestamp!==void 0?new Date(e.minimumTimestamp):new Date}o(s$,"FromDate");function a$(e,t){return ie(e,"default")?Re(e.default):()=>Tn(e.returns,t)}o(a$,"FromFunction");function c$(e,t){return ie(e,"default")?Re(e.default):e.minimum!==void 0?e.minimum:0}o(c$,"FromInteger");function u$(e,t){if(ie(e,"default"))return Re(e.default);{let n=e.allOf.reduce((i,r)=>{let s=Tn(r,t);return typeof s=="object"?x(x({},i),s):s},{});if(!pe(e,t,n))throw new En(e,"Intersect produced invalid value. Consider using a default value.");return n}}o(u$,"FromIntersect");function l$(e,t){return ie(e,"default")?Re(e.default):function*(){}()}o(l$,"FromIterator");function f$(e,t){return ie(e,"default")?Re(e.default):e.const}o(f$,"FromLiteral");function d$(e,t){if(ie(e,"default"))return Re(e.default);throw new En(e,"Never types cannot be created. Consider using a default value.")}o(d$,"FromNever");function p$(e,t){if(ie(e,"default"))return Re(e.default);throw new En(e,"Not types must have a default value")}o(p$,"FromNot");function h$(e,t){return ie(e,"default")?Re(e.default):null}o(h$,"FromNull");function m$(e,t){return ie(e,"default")?Re(e.default):e.minimum!==void 0?e.minimum:0}o(m$,"FromNumber");function g$(e,t){if(ie(e,"default"))return Re(e.default);{let n=new Set(e.required),i={};for(let[r,s]of Object.entries(e.properties))n.has(r)&&(i[r]=Tn(s,t));return i}}o(g$,"FromObject");function y$(e,t){return ie(e,"default")?Re(e.default):Promise.resolve(Tn(e.item,t))}o(y$,"FromPromise");function x$(e,t){let[n,i]=Object.entries(e.patternProperties)[0];if(ie(e,"default"))return Re(e.default);if(n===Xr||n===Zr)return{};{let r=n.slice(1,n.length-1).split("|"),s={};for(let a of r)s[a]=Tn(i,t);return s}}o(x$,"FromRecord");function v$(e,t){return ie(e,"default")?Re(e.default):Tn(Ae(e,t),t)}o(v$,"FromRef");function _$(e,t){if(ie(e,"default"))return Re(e.default);throw new En(e,"RegExp types cannot be created. Consider using a default value.")}o(_$,"FromRegExp");function b$(e,t){if(e.pattern!==void 0){if(ie(e,"default"))return Re(e.default);throw new En(e,"String types with patterns must specify a default value")}else if(e.format!==void 0){if(ie(e,"default"))return Re(e.default);throw new En(e,"String types with formats must specify a default value")}else return ie(e,"default")?Re(e.default):e.minLength!==void 0?Array.from({length:e.minLength}).map(()=>" ").join(""):""}o(b$,"FromString");function S$(e,t){return ie(e,"default")?Re(e.default):"value"in e?Symbol.for(e.value):Symbol()}o(S$,"FromSymbol");function I$(e,t){if(ie(e,"default"))return Re(e.default);if(!$u(e))throw new En(e,"Can only create template literals that produce a finite variants. Consider using a default value.");return zo(e)[0]}o(I$,"FromTemplateLiteral");function w$(e,t){if(AI++>O$)throw new En(e,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return ie(e,"default")?Re(e.default):Tn(Ae(e,t),t)}o(w$,"FromThis");function M$(e,t){return ie(e,"default")?Re(e.default):e.items===void 0?[]:Array.from({length:e.minItems}).map((n,i)=>Tn(e.items[i],t))}o(M$,"FromTuple");function E$(e,t){if(ie(e,"default"))return Re(e.default)}o(E$,"FromUndefined");function T$(e,t){if(ie(e,"default"))return Re(e.default);if(e.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return Tn(e.anyOf[0],t)}o(T$,"FromUnion");function A$(e,t){return ie(e,"default")?Re(e.default):e.minByteLength!==void 0?new Uint8Array(e.minByteLength):new Uint8Array(0)}o(A$,"FromUint8Array");function P$(e,t){return ie(e,"default")?Re(e.default):{}}o(P$,"FromUnknown");function R$(e,t){if(ie(e,"default"))return Re(e.default)}o(R$,"FromVoid");function C$(e,t){if(ie(e,"default"))return Re(e.default);throw new Error("User defined types must specify a default value")}o(C$,"FromKind");function Tn(e,t){let n=jn(e,t),i=e;switch(i[P]){case"Any":return e$(i,n);case"Array":return t$(i,n);case"AsyncIterator":return n$(i,n);case"BigInt":return r$(i,n);case"Boolean":return i$(i,n);case"Constructor":return o$(i,n);case"Date":return s$(i,n);case"Function":return a$(i,n);case"Integer":return c$(i,n);case"Intersect":return u$(i,n);case"Iterator":return l$(i,n);case"Literal":return f$(i,n);case"Never":return d$(i,n);case"Not":return p$(i,n);case"Null":return h$(i,n);case"Number":return m$(i,n);case"Object":return g$(i,n);case"Promise":return y$(i,n);case"Record":return x$(i,n);case"Ref":return v$(i,n);case"RegExp":return _$(i,n);case"String":return b$(i,n);case"Symbol":return S$(i,n);case"TemplateLiteral":return I$(i,n);case"This":return w$(i,n);case"Tuple":return M$(i,n);case"Undefined":return E$(i,n);case"Union":return T$(i,n);case"Uint8Array":return A$(i,n);case"Unknown":return P$(i,n);case"Void":return R$(i,n);default:if(!Et.Has(i[P]))throw new En(i,"Unknown type");return C$(i,n)}}o(Tn,"Visit");var O$=512,AI=0;function Hn(...e){return AI=0,e.length===2?Tn(e[0],e[1]):Tn(e[0],[])}o(Hn,"Create");var Gx=class Gx extends re{constructor(t,n){super(n),this.schema=t}};o(Gx,"ValueCastError");var hl=Gx;function U$(e,t,n){if(e[P]==="Object"&&typeof n=="object"&&!Vr(n)){let i=e,r=Object.getOwnPropertyNames(n),s=Object.entries(i.properties),[a,u]=[1/s.length,s.length];return s.reduce((l,[c,d])=>{let h=d[P]==="Literal"&&d.const===n[c]?u:0,m=pe(d,t,n[c])?a:0,y=r.includes(c)?a:0;return l+(h+m+y)},0)}else return pe(e,t,n)?1:0}o(U$,"ScoreUnion");function N$(e,t,n){let i=e.anyOf.map(a=>Ae(a,t)),[r,s]=[i[0],0];for(let a of i){let u=U$(a,t,n);u>s&&(r=a,s=u)}return r}o(N$,"SelectUnion");function F$(e,t,n){if("default"in e)return typeof n=="function"?e.default:Pe(e.default);{let i=N$(e,t,n);return jx(i,t,n)}}o(F$,"CastUnion");function k$(e,t,n){return pe(e,t,n)?Pe(n):Hn(e,t)}o(k$,"DefaultClone");function D$(e,t,n){return pe(e,t,n)?n:Hn(e,t)}o(D$,"Default");function L$(e,t,n){if(pe(e,t,n))return Pe(n);let i=ae(n)?Pe(n):Hn(e,t),r=ee(e.minItems)&&i.length<e.minItems?[...i,...Array.from({length:e.minItems-i.length},()=>null)]:i,a=(ee(e.maxItems)&&r.length>e.maxItems?r.slice(0,e.maxItems):r).map(l=>Ir(e.items,t,l));if(e.uniqueItems!==!0)return a;let u=[...new Set(a)];if(!pe(e,t,u))throw new hl(e,"Array cast produced invalid data due to uniqueItems constraint");return u}o(L$,"FromArray");function $$(e,t,n){if(pe(e,t,n))return Hn(e,t);let i=new Set(e.returns.required||[]),r=o(function(){},"result");for(let[s,a]of Object.entries(e.returns.properties))!i.has(s)&&n.prototype[s]===void 0||(r.prototype[s]=Ir(a,t,n.prototype[s]));return r}o($$,"FromConstructor");function z$(e,t,n){let i=Hn(e,t),r=fe(i)&&fe(n)?x(x({},i),n):n;return pe(e,t,r)?r:Hn(e,t)}o(z$,"FromIntersect");function B$(e,t,n){throw new hl(e,"Never types cannot be cast")}o(B$,"FromNever");function V$(e,t,n){if(pe(e,t,n))return n;if(n===null||typeof n!="object")return Hn(e,t);let i=new Set(e.required||[]),r={};for(let[s,a]of Object.entries(e.properties))!i.has(s)&&n[s]===void 0||(r[s]=Ir(a,t,n[s]));if(typeof e.additionalProperties=="object"){let s=Object.getOwnPropertyNames(e.properties);for(let a of Object.getOwnPropertyNames(n))s.includes(a)||(r[a]=Ir(e.additionalProperties,t,n[a]))}return r}o(V$,"FromObject");function j$(e,t,n){if(pe(e,t,n))return Pe(n);if(n===null||typeof n!="object"||Array.isArray(n)||n instanceof Date)return Hn(e,t);let i=Object.getOwnPropertyNames(e.patternProperties)[0],r=e.patternProperties[i],s={};for(let[a,u]of Object.entries(n))s[a]=Ir(r,t,u);return s}o(j$,"FromRecord");function G$(e,t,n){return Ir(Ae(e,t),t,n)}o(G$,"FromRef");function H$(e,t,n){return Ir(Ae(e,t),t,n)}o(H$,"FromThis");function W$(e,t,n){return pe(e,t,n)?Pe(n):ae(n)?e.items===void 0?[]:e.items.map((i,r)=>Ir(i,t,n[r])):Hn(e,t)}o(W$,"FromTuple");function Z$(e,t,n){return pe(e,t,n)?Pe(n):F$(e,t,n)}o(Z$,"FromUnion");function Ir(e,t,n){let i=Se(e.$id)?[...t,e]:t,r=e;switch(e[P]){case"Array":return L$(r,i,n);case"Constructor":return $$(r,i,n);case"Intersect":return z$(r,i,n);case"Never":return B$(r,i,n);case"Object":return V$(r,i,n);case"Record":return j$(r,i,n);case"Ref":return G$(r,i,n);case"This":return H$(r,i,n);case"Tuple":return W$(r,i,n);case"Union":return Z$(r,i,n);case"Date":case"Symbol":case"Uint8Array":return k$(e,t,n);default:return D$(r,i,n)}}o(Ir,"Visit");function jx(...e){return e.length===3?Ir(e[0],e[1],e[2]):Ir(e[0],[],e[1])}o(jx,"Cast");f();function X$(e){return Ii(e)&&e[P]!=="Unsafe"}o(X$,"IsCheckable");function q$(e,t,n){return ae(n)?n.map(i=>An(e.items,t,i)):n}o(q$,"FromArray");function K$(e,t,n){let i=e.unevaluatedProperties,s=e.allOf.map(u=>An(u,t,Pe(n))).reduce((u,l)=>fe(l)?x(x({},u),l):l,{});if(!fe(n)||!fe(s)||!Ii(i))return s;let a=Pt(e);for(let u of Object.getOwnPropertyNames(n))a.includes(u)||pe(i,t,n[u])&&(s[u]=An(i,t,n[u]));return s}o(K$,"FromIntersect");function J$(e,t,n){if(!fe(n)||ae(n))return n;let i=e.additionalProperties;for(let r of Object.getOwnPropertyNames(n)){if(ie(e.properties,r)){n[r]=An(e.properties[r],t,n[r]);continue}if(Ii(i)&&pe(i,t,n[r])){n[r]=An(i,t,n[r]);continue}delete n[r]}return n}o(J$,"FromObject");function Y$(e,t,n){if(!fe(n))return n;let i=e.additionalProperties,r=Object.getOwnPropertyNames(n),[s,a]=Object.entries(e.patternProperties)[0],u=new RegExp(s);for(let l of r){if(u.test(l)){n[l]=An(a,t,n[l]);continue}if(Ii(i)&&pe(i,t,n[l])){n[l]=An(i,t,n[l]);continue}delete n[l]}return n}o(Y$,"FromRecord");function Q$(e,t,n){return An(Ae(e,t),t,n)}o(Q$,"FromRef");function e2(e,t,n){return An(Ae(e,t),t,n)}o(e2,"FromThis");function t2(e,t,n){if(!ae(n))return n;if(ut(e.items))return[];let i=Math.min(n.length,e.items.length);for(let r=0;r<i;r++)n[r]=An(e.items[r],t,n[r]);return n.length>i?n.slice(0,i):n}o(t2,"FromTuple");function n2(e,t,n){for(let i of e.anyOf)if(X$(i)&&pe(i,t,n))return An(i,t,n);return n}o(n2,"FromUnion");function An(e,t,n){let i=Se(e.$id)?[...t,e]:t,r=e;switch(r[P]){case"Array":return q$(r,i,n);case"Intersect":return K$(r,i,n);case"Object":return J$(r,i,n);case"Record":return Y$(r,i,n);case"Ref":return Q$(r,i,n);case"This":return e2(r,i,n);case"Tuple":return t2(r,i,n);case"Union":return n2(r,i,n);default:return n}}o(An,"Visit");function ml(...e){return e.length===3?An(e[0],e[1],e[2]):An(e[0],[],e[1])}o(ml,"Clean");f();function gl(e){return Se(e)&&!isNaN(e)&&!isNaN(parseFloat(e))}o(gl,"IsStringNumeric");function r2(e){return Ut(e)||yr(e)||ee(e)}o(r2,"IsValueToString");function Ga(e){return e===!0||ee(e)&&e===1||Ut(e)&&e===BigInt("1")||Se(e)&&(e.toLowerCase()==="true"||e==="1")}o(Ga,"IsValueTrue");function Ha(e){return e===!1||ee(e)&&(e===0||Object.is(e,-0))||Ut(e)&&e===BigInt("0")||Se(e)&&(e.toLowerCase()==="false"||e==="0"||e==="-0")}o(Ha,"IsValueFalse");function i2(e){return Se(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(i2,"IsTimeStringWithTimeZone");function o2(e){return Se(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(o2,"IsTimeStringWithoutTimeZone");function s2(e){return Se(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(s2,"IsDateTimeStringWithTimeZone");function a2(e){return Se(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(a2,"IsDateTimeStringWithoutTimeZone");function c2(e){return Se(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(e)}o(c2,"IsDateString");function u2(e,t){let n=RI(e);return n===t?n:e}o(u2,"TryConvertLiteralString");function l2(e,t){let n=CI(e);return n===t?n:e}o(l2,"TryConvertLiteralNumber");function f2(e,t){let n=PI(e);return n===t?n:e}o(f2,"TryConvertLiteralBoolean");function d2(e,t){return Se(e.const)?u2(t,e.const):ee(e.const)?l2(t,e.const):yr(e.const)?f2(t,e.const):t}o(d2,"TryConvertLiteral");function PI(e){return Ga(e)?!0:Ha(e)?!1:e}o(PI,"TryConvertBoolean");function p2(e){let t=o(n=>n.split(".")[0],"truncateInteger");return gl(e)?BigInt(t(e)):ee(e)?BigInt(Math.trunc(e)):Ha(e)?BigInt(0):Ga(e)?BigInt(1):e}o(p2,"TryConvertBigInt");function RI(e){return r2(e)?e.toString():jr(e)&&e.description!==void 0?e.description.toString():e}o(RI,"TryConvertString");function CI(e){return gl(e)?parseFloat(e):Ga(e)?1:Ha(e)?0:e}o(CI,"TryConvertNumber");function h2(e){return gl(e)?parseInt(e):ee(e)?e|0:Ga(e)?1:Ha(e)?0:e}o(h2,"TryConvertInteger");function m2(e){return Se(e)&&e.toLowerCase()==="null"?null:e}o(m2,"TryConvertNull");function g2(e){return Se(e)&&e==="undefined"?void 0:e}o(g2,"TryConvertUndefined");function y2(e){return nn(e)?e:ee(e)?new Date(e):Ga(e)?new Date(1):Ha(e)?new Date(0):gl(e)?new Date(parseInt(e)):o2(e)?new Date("1970-01-01T".concat(e,".000Z")):i2(e)?new Date("1970-01-01T".concat(e)):a2(e)?new Date("".concat(e,".000Z")):s2(e)?new Date(e):c2(e)?new Date("".concat(e,"T00:00:00.000Z")):e}o(y2,"TryConvertDate");function x2(e,t,n){return(ae(n)?n:[n]).map(r=>wr(e.items,t,r))}o(x2,"FromArray");function v2(e,t,n){return p2(n)}o(v2,"FromBigInt");function _2(e,t,n){return PI(n)}o(_2,"FromBoolean");function b2(e,t,n){return y2(n)}o(b2,"FromDate");function S2(e,t,n){return h2(n)}o(S2,"FromInteger");function I2(e,t,n){return e.allOf.reduce((i,r)=>wr(r,t,i),n)}o(I2,"FromIntersect");function w2(e,t,n){return d2(e,n)}o(w2,"FromLiteral");function M2(e,t,n){return m2(n)}o(M2,"FromNull");function E2(e,t,n){return CI(n)}o(E2,"FromNumber");function T2(e,t,n){if(!fe(n))return n;for(let i of Object.getOwnPropertyNames(e.properties))ie(n,i)&&(n[i]=wr(e.properties[i],t,n[i]));return n}o(T2,"FromObject");function A2(e,t,n){if(!fe(n))return n;let r=Object.getOwnPropertyNames(e.patternProperties)[0],s=e.patternProperties[r];for(let[a,u]of Object.entries(n))n[a]=wr(s,t,u);return n}o(A2,"FromRecord");function P2(e,t,n){return wr(Ae(e,t),t,n)}o(P2,"FromRef");function R2(e,t,n){return RI(n)}o(R2,"FromString");function C2(e,t,n){return Se(n)||ee(n)?Symbol(n):n}o(C2,"FromSymbol");function O2(e,t,n){return wr(Ae(e,t),t,n)}o(O2,"FromThis");function U2(e,t,n){return ae(n)&&!ut(e.items)?n.map((r,s)=>s<e.items.length?wr(e.items[s],t,r):r):n}o(U2,"FromTuple");function N2(e,t,n){return g2(n)}o(N2,"FromUndefined");function F2(e,t,n){for(let i of e.anyOf){let r=wr(i,t,Pe(n));if(pe(i,t,r))return r}return n}o(F2,"FromUnion");function wr(e,t,n){let i=jn(e,t),r=e;switch(e[P]){case"Array":return x2(r,i,n);case"BigInt":return v2(r,i,n);case"Boolean":return _2(r,i,n);case"Date":return b2(r,i,n);case"Integer":return S2(r,i,n);case"Intersect":return I2(r,i,n);case"Literal":return w2(r,i,n);case"Null":return M2(r,i,n);case"Number":return E2(r,i,n);case"Object":return T2(r,i,n);case"Record":return A2(r,i,n);case"Ref":return P2(r,i,n);case"String":return R2(r,i,n);case"Symbol":return C2(r,i,n);case"This":return O2(r,i,n);case"Tuple":return U2(r,i,n);case"Undefined":return N2(r,i,n);case"Union":return F2(r,i,n);default:return n}}o(wr,"Visit");function yl(...e){return e.length===3?wr(e[0],e[1],e[2]):wr(e[0],[],e[1])}o(yl,"Convert");f();f();var Hx=class Hx extends re{constructor(t,n,i){super("Unable to decode value as it does not match the expected schema"),this.schema=t,this.value=n,this.error=i}};o(Hx,"TransformDecodeCheckError");var ns=Hx,Wx=class Wx extends re{constructor(t,n,i,r){super(r instanceof Error?r.message:"Unknown error"),this.schema=t,this.path=n,this.value=i,this.error=r}};o(Wx,"TransformDecodeError");var Ji=Wx;function lt(e,t,n){try{return et(e)?e[ot].Decode(n):n}catch(i){throw new Ji(e,t,n,i)}}o(lt,"Default");function k2(e,t,n,i){return ae(i)?lt(e,n,i.map((r,s)=>Mr(e.items,t,"".concat(n,"/").concat(s),r))):lt(e,n,i)}o(k2,"FromArray");function D2(e,t,n,i){if(!fe(i)||Nt(i))return lt(e,n,i);let r=Ei(e),s=r.map(d=>d[0]),a=x({},i);for(let[d,h]of r)d in a&&(a[d]=Mr(h,t,"".concat(n,"/").concat(d),a[d]));if(!et(e.unevaluatedProperties))return lt(e,n,a);let u=Object.getOwnPropertyNames(a),l=e.unevaluatedProperties,c=x({},a);for(let d of u)s.includes(d)||(c[d]=lt(l,"".concat(n,"/").concat(d),c[d]));return lt(e,n,c)}o(D2,"FromIntersect");function L2(e,t,n,i){return lt(e,n,Mr(e.not,t,n,i))}o(L2,"FromNot");function $2(e,t,n,i){if(!fe(i))return lt(e,n,i);let r=Pt(e),s=x({},i);for(let c of r)ie(s,c)&&(ut(s[c])&&(!Fo(e.properties[c])||Le.IsExactOptionalProperty(s,c))||(s[c]=Mr(e.properties[c],t,"".concat(n,"/").concat(c),s[c])));if(!Ie(e.additionalProperties))return lt(e,n,s);let a=Object.getOwnPropertyNames(s),u=e.additionalProperties,l=x({},s);for(let c of a)r.includes(c)||(l[c]=lt(u,"".concat(n,"/").concat(c),l[c]));return lt(e,n,l)}o($2,"FromObject");function z2(e,t,n,i){if(!fe(i))return lt(e,n,i);let r=Object.getOwnPropertyNames(e.patternProperties)[0],s=new RegExp(r),a=x({},i);for(let d of Object.getOwnPropertyNames(i))s.test(d)&&(a[d]=Mr(e.patternProperties[r],t,"".concat(n,"/").concat(d),a[d]));if(!Ie(e.additionalProperties))return lt(e,n,a);let u=Object.getOwnPropertyNames(a),l=e.additionalProperties,c=x({},a);for(let d of u)s.test(d)||(c[d]=lt(l,"".concat(n,"/").concat(d),c[d]));return lt(e,n,c)}o(z2,"FromRecord");function B2(e,t,n,i){let r=Ae(e,t);return lt(e,n,Mr(r,t,n,i))}o(B2,"FromRef");function V2(e,t,n,i){let r=Ae(e,t);return lt(e,n,Mr(r,t,n,i))}o(V2,"FromThis");function j2(e,t,n,i){return ae(i)&&ae(e.items)?lt(e,n,e.items.map((r,s)=>Mr(r,t,"".concat(n,"/").concat(s),i[s]))):lt(e,n,i)}o(j2,"FromTuple");function G2(e,t,n,i){for(let r of e.anyOf){if(!pe(r,t,i))continue;let s=Mr(r,t,n,i);return lt(e,n,s)}return lt(e,n,i)}o(G2,"FromUnion");function Mr(e,t,n,i){let r=jn(e,t),s=e;switch(e[P]){case"Array":return k2(s,r,n,i);case"Intersect":return D2(s,r,n,i);case"Not":return L2(s,r,n,i);case"Object":return $2(s,r,n,i);case"Record":return z2(s,r,n,i);case"Ref":return B2(s,r,n,i);case"Symbol":return lt(s,n,i);case"This":return V2(s,r,n,i);case"Tuple":return j2(s,r,n,i);case"Union":return G2(s,r,n,i);default:return lt(s,n,i)}}o(Mr,"Visit");function rs(e,t,n){return Mr(e,t,"",n)}o(rs,"TransformDecode");f();var Zx=class Zx extends re{constructor(t,n,i){super("The encoded value does not match the expected schema"),this.schema=t,this.value=n,this.error=i}};o(Zx,"TransformEncodeCheckError");var is=Zx,Xx=class Xx extends re{constructor(t,n,i,r){super("".concat(r instanceof Error?r.message:"Unknown error")),this.schema=t,this.path=n,this.value=i,this.error=r}};o(Xx,"TransformEncodeError");var Yi=Xx;function Kt(e,t,n){try{return et(e)?e[ot].Encode(n):n}catch(i){throw new Yi(e,t,n,i)}}o(Kt,"Default");function H2(e,t,n,i){let r=Kt(e,n,i);return ae(r)?r.map((s,a)=>Er(e.items,t,"".concat(n,"/").concat(a),s)):r}o(H2,"FromArray");function W2(e,t,n,i){let r=Kt(e,n,i);if(!fe(i)||Nt(i))return r;let s=Ei(e),a=s.map(h=>h[0]),u=x({},r);for(let[h,m]of s)h in u&&(u[h]=Er(m,t,"".concat(n,"/").concat(h),u[h]));if(!et(e.unevaluatedProperties))return u;let l=Object.getOwnPropertyNames(u),c=e.unevaluatedProperties,d=x({},u);for(let h of l)a.includes(h)||(d[h]=Kt(c,"".concat(n,"/").concat(h),d[h]));return d}o(W2,"FromIntersect");function Z2(e,t,n,i){return Kt(e.not,n,Kt(e,n,i))}o(Z2,"FromNot");function X2(e,t,n,i){let r=Kt(e,n,i);if(!fe(r))return r;let s=Pt(e),a=x({},r);for(let d of s)ie(a,d)&&(ut(a[d])&&(!Fo(e.properties[d])||Le.IsExactOptionalProperty(a,d))||(a[d]=Er(e.properties[d],t,"".concat(n,"/").concat(d),a[d])));if(!Ie(e.additionalProperties))return a;let u=Object.getOwnPropertyNames(a),l=e.additionalProperties,c=x({},a);for(let d of u)s.includes(d)||(c[d]=Kt(l,"".concat(n,"/").concat(d),c[d]));return c}o(X2,"FromObject");function q2(e,t,n,i){let r=Kt(e,n,i);if(!fe(i))return r;let s=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(s),u=x({},r);for(let h of Object.getOwnPropertyNames(i))a.test(h)&&(u[h]=Er(e.patternProperties[s],t,"".concat(n,"/").concat(h),u[h]));if(!Ie(e.additionalProperties))return u;let l=Object.getOwnPropertyNames(u),c=e.additionalProperties,d=x({},u);for(let h of l)a.test(h)||(d[h]=Kt(c,"".concat(n,"/").concat(h),d[h]));return d}o(q2,"FromRecord");function K2(e,t,n,i){let r=Ae(e,t),s=Er(r,t,n,i);return Kt(e,n,s)}o(K2,"FromRef");function J2(e,t,n,i){let r=Ae(e,t),s=Er(r,t,n,i);return Kt(e,n,s)}o(J2,"FromThis");function Y2(e,t,n,i){let r=Kt(e,n,i);return ae(e.items)?e.items.map((s,a)=>Er(s,t,"".concat(n,"/").concat(a),r[a])):[]}o(Y2,"FromTuple");function Q2(e,t,n,i){for(let r of e.anyOf){if(!pe(r,t,i))continue;let s=Er(r,t,n,i);return Kt(e,n,s)}for(let r of e.anyOf){let s=Er(r,t,n,i);if(pe(e,t,s))return Kt(e,n,s)}return Kt(e,n,i)}o(Q2,"FromUnion");function Er(e,t,n,i){let r=jn(e,t),s=e;switch(e[P]){case"Array":return H2(s,r,n,i);case"Intersect":return W2(s,r,n,i);case"Not":return Z2(s,r,n,i);case"Object":return X2(s,r,n,i);case"Record":return q2(s,r,n,i);case"Ref":return K2(s,r,n,i);case"This":return J2(s,r,n,i);case"Tuple":return Y2(s,r,n,i);case"Union":return Q2(s,r,n,i);default:return Kt(s,n,i)}}o(Er,"Visit");function xl(e,t,n){return Er(e,t,"",n)}o(xl,"TransformEncode");f();function ez(e,t){return et(e)||Rt(e.items,t)}o(ez,"FromArray");function tz(e,t){return et(e)||Rt(e.items,t)}o(tz,"FromAsyncIterator");function nz(e,t){return et(e)||Rt(e.returns,t)||e.parameters.some(n=>Rt(n,t))}o(nz,"FromConstructor");function rz(e,t){return et(e)||Rt(e.returns,t)||e.parameters.some(n=>Rt(n,t))}o(rz,"FromFunction");function iz(e,t){return et(e)||et(e.unevaluatedProperties)||e.allOf.some(n=>Rt(n,t))}o(iz,"FromIntersect");function oz(e,t){return et(e)||Rt(e.items,t)}o(oz,"FromIterator");function sz(e,t){return et(e)||Rt(e.not,t)}o(sz,"FromNot");function az(e,t){return et(e)||Object.values(e.properties).some(n=>Rt(n,t))||Ie(e.additionalProperties)&&Rt(e.additionalProperties,t)}o(az,"FromObject");function cz(e,t){return et(e)||Rt(e.item,t)}o(cz,"FromPromise");function uz(e,t){let n=Object.getOwnPropertyNames(e.patternProperties)[0],i=e.patternProperties[n];return et(e)||Rt(i,t)||Ie(e.additionalProperties)&&et(e.additionalProperties)}o(uz,"FromRecord");function lz(e,t){return et(e)?!0:Rt(Ae(e,t),t)}o(lz,"FromRef");function fz(e,t){return et(e)?!0:Rt(Ae(e,t),t)}o(fz,"FromThis");function dz(e,t){return et(e)||!ut(e.items)&&e.items.some(n=>Rt(n,t))}o(dz,"FromTuple");function pz(e,t){return et(e)||e.anyOf.some(n=>Rt(n,t))}o(pz,"FromUnion");function Rt(e,t){let n=jn(e,t),i=e;if(e.$id&&qx.has(e.$id))return!1;switch(e.$id&&qx.add(e.$id),e[P]){case"Array":return ez(i,n);case"AsyncIterator":return tz(i,n);case"Constructor":return nz(i,n);case"Function":return rz(i,n);case"Intersect":return iz(i,n);case"Iterator":return oz(i,n);case"Not":return sz(i,n);case"Object":return az(i,n);case"Promise":return cz(i,n);case"Record":return uz(i,n);case"Ref":return lz(i,n);case"This":return fz(i,n);case"Tuple":return dz(i,n);case"Union":return pz(i,n);default:return et(e)}}o(Rt,"Visit");var qx=new Set;function Tr(e,t){return qx.clear(),Rt(e,t)}o(Tr,"HasTransform");function OI(...e){let[t,n,i]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!pe(t,n,i))throw new ns(t,i,Sr(t,n,i).First());return Tr(t,n)?rs(t,n,i):i}o(OI,"Decode");f();function ei(e,t){let n=ie(e,"default")?e.default:void 0,i=bi(n)?n():Pe(n);return ut(t)?i:fe(t)&&fe(i)?Object.assign(i,t):t}o(ei,"ValueOrDefault");function Kx(e){return Ii(e)&&"default"in e}o(Kx,"HasDefaultProperty");function hz(e,t,n){let i=ei(e,n);if(!ae(i))return i;for(let r=0;r<i.length;r++)i[r]=Pn(e.items,t,i[r]);return i}o(hz,"FromArray");function mz(e,t,n){return nn(n)?n:ei(e,n)}o(mz,"FromDate");function gz(e,t,n){let i=ei(e,n);return e.allOf.reduce((r,s)=>{let a=Pn(s,t,i);return fe(a)?x(x({},r),a):a},{})}o(gz,"FromIntersect");function yz(e,t,n){let i=ei(e,n);if(!fe(i))return i;let r=Object.getOwnPropertyNames(e.properties);for(let s of r){let a=Pn(e.properties[s],t,i[s]);ut(a)||(i[s]=Pn(e.properties[s],t,i[s]))}if(!Kx(e.additionalProperties))return i;for(let s of Object.getOwnPropertyNames(i))r.includes(s)||(i[s]=Pn(e.additionalProperties,t,i[s]));return i}o(yz,"FromObject");function xz(e,t,n){let i=ei(e,n);if(!fe(i))return i;let r=e.additionalProperties,[s,a]=Object.entries(e.patternProperties)[0],u=new RegExp(s);for(let l of Object.getOwnPropertyNames(i))u.test(l)&&Kx(a)&&(i[l]=Pn(a,t,i[l]));if(!Kx(r))return i;for(let l of Object.getOwnPropertyNames(i))u.test(l)||(i[l]=Pn(r,t,i[l]));return i}o(xz,"FromRecord");function vz(e,t,n){return Pn(Ae(e,t),t,ei(e,n))}o(vz,"FromRef");function _z(e,t,n){return Pn(Ae(e,t),t,n)}o(_z,"FromThis");function bz(e,t,n){let i=ei(e,n);if(!ae(i)||ut(e.items))return i;let[r,s]=[e.items,Math.max(e.items.length,i.length)];for(let a=0;a<s;a++)a<r.length&&(i[a]=Pn(r[a],t,i[a]));return i}o(bz,"FromTuple");function Sz(e,t,n){let i=ei(e,n);for(let r of e.anyOf){let s=Pn(r,t,Pe(i));if(pe(r,t,s))return s}return i}o(Sz,"FromUnion");function Pn(e,t,n){let i=jn(e,t),r=e;switch(r[P]){case"Array":return hz(r,i,n);case"Date":return mz(r,i,n);case"Intersect":return gz(r,i,n);case"Object":return yz(r,i,n);case"Record":return xz(r,i,n);case"Ref":return vz(r,i,n);case"This":return _z(r,i,n);case"Tuple":return bz(r,i,n);case"Union":return Sz(r,i,n);default:return ei(r,n)}}o(Pn,"Visit");function vl(...e){return e.length===3?Pn(e[0],e[1],e[2]):Pn(e[0],[],e[1])}o(vl,"Default");f();f();var Wn={};cn(Wn,{Delete:()=>wz,Format:()=>Wa,Get:()=>Ez,Has:()=>Mz,Set:()=>Iz,ValuePointerRootDeleteError:()=>bl,ValuePointerRootSetError:()=>_l});f();var Jx=class Jx extends re{constructor(t,n,i){super("Cannot set root value"),this.value=t,this.path=n,this.update=i}};o(Jx,"ValuePointerRootSetError");var _l=Jx,Yx=class Yx extends re{constructor(t,n){super("Cannot delete root value"),this.value=t,this.path=n}};o(Yx,"ValuePointerRootDeleteError");var bl=Yx;function UI(e){return e.indexOf("~")===-1?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}o(UI,"Escape");function*Wa(e){if(e==="")return;let[t,n]=[0,0];for(let i=0;i<e.length;i++)e.charAt(i)==="/"?(i===0||(n=i,yield UI(e.slice(t,n))),t=i+1):n=i;yield UI(e.slice(t))}o(Wa,"Format");function Iz(e,t,n){if(t==="")throw new _l(e,t,n);let[i,r,s]=[null,e,""];for(let a of Wa(t))r[a]===void 0&&(r[a]={}),i=r,r=r[a],s=a;i[s]=n}o(Iz,"Set");function wz(e,t){if(t==="")throw new bl(e,t);let[n,i,r]=[null,e,""];for(let s of Wa(t)){if(i[s]===void 0||i[s]===null)return;n=i,i=i[s],r=s}if(Array.isArray(n)){let s=parseInt(r);n.splice(s,1)}else delete n[r]}o(wz,"Delete");function Mz(e,t){if(t==="")return!0;let[n,i,r]=[null,e,""];for(let s of Wa(t)){if(i[s]===void 0)return!1;n=i,i=i[s],r=s}return Object.getOwnPropertyNames(n).includes(r)}o(Mz,"Has");function Ez(e,t){if(t==="")return e;let n=e;for(let i of Wa(t)){if(n[i]===void 0)return;n=n[i]}return n}o(Ez,"Get");f();function Tz(e,t){if(!fe(t))return!1;let n=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],i=[...Object.keys(t),...Object.getOwnPropertySymbols(t)];return n.length!==i.length?!1:n.every(r=>Qi(e[r],t[r]))}o(Tz,"ObjectType");function Az(e,t){return nn(t)&&e.getTime()===t.getTime()}o(Az,"DateType");function Pz(e,t){return!ae(t)||e.length!==t.length?!1:e.every((n,i)=>Qi(n,t[i]))}o(Pz,"ArrayType");function Rz(e,t){return!kn(t)||e.length!==t.length||Object.getPrototypeOf(e).constructor.name!==Object.getPrototypeOf(t).constructor.name?!1:e.every((n,i)=>Qi(n,t[i]))}o(Rz,"TypedArrayType");function Cz(e,t){return e===t}o(Cz,"ValueType");function Qi(e,t){if(nn(e))return Az(e,t);if(kn(e))return Rz(e,t);if(ae(e))return Pz(e,t);if(fe(e))return Tz(e,t);if(Nt(e))return Cz(e,t);throw new Error("ValueEquals: Unable to compare value")}o(Qi,"Equal");var Oz=We({type:Fe("insert"),path:Ln(),value:Jr()}),Uz=We({type:Fe("update"),path:Ln(),value:Jr()}),Nz=We({type:Fe("delete"),path:Ln()}),FI=Ve([Oz,Uz,Nz]),Qx=class Qx extends re{constructor(t,n){super(n),this.value=t}};o(Qx,"ValueDiffError");var Sl=Qx;function Il(e,t){return{type:"update",path:e,value:t}}o(Il,"CreateUpdate");function kI(e,t){return{type:"insert",path:e,value:t}}o(kI,"CreateInsert");function DI(e){return{type:"delete",path:e}}o(DI,"CreateDelete");function NI(e){if(globalThis.Object.getOwnPropertySymbols(e).length>0)throw new Sl(e,"Cannot diff objects with symbols")}o(NI,"AssertDiffable");function*Fz(e,t,n){if(NI(t),NI(n),!My(n))return yield Il(e,n);let i=globalThis.Object.getOwnPropertyNames(t),r=globalThis.Object.getOwnPropertyNames(n);for(let s of r)ie(t,s)||(yield kI("".concat(e,"/").concat(s),n[s]));for(let s of i)ie(n,s)&&(Qi(t,n)||(yield*k(wl("".concat(e,"/").concat(s),t[s],n[s]))));for(let s of i)ie(n,s)||(yield DI("".concat(e,"/").concat(s)))}o(Fz,"ObjectType");function*kz(e,t,n){if(!ae(n))return yield Il(e,n);for(let i=0;i<Math.min(t.length,n.length);i++)yield*k(wl("".concat(e,"/").concat(i),t[i],n[i]));for(let i=0;i<n.length;i++)i<t.length||(yield kI("".concat(e,"/").concat(i),n[i]));for(let i=t.length-1;i>=0;i--)i<n.length||(yield DI("".concat(e,"/").concat(i)))}o(kz,"ArrayType");function*Dz(e,t,n){if(!kn(n)||t.length!==n.length||globalThis.Object.getPrototypeOf(t).constructor.name!==globalThis.Object.getPrototypeOf(n).constructor.name)return yield Il(e,n);for(let i=0;i<Math.min(t.length,n.length);i++)yield*k(wl("".concat(e,"/").concat(i),t[i],n[i]))}o(Dz,"TypedArrayType");function*Lz(e,t,n){t!==n&&(yield Il(e,n))}o(Lz,"ValueType");function*wl(e,t,n){if(My(t))return yield*k(Fz(e,t,n));if(ae(t))return yield*k(kz(e,t,n));if(kn(t))return yield*k(Dz(e,t,n));if(Nt(t))return yield*k(Lz(e,t,n));throw new Sl(t,"Unable to diff value")}o(wl,"Visit");function LI(e,t){return[...wl("",e,t)]}o(LI,"Diff");function $z(e){return e.length>0&&e[0].path===""&&e[0].type==="update"}o($z,"IsRootUpdate");function zz(e){return e.length===0}o(zz,"IsIdentity");function $I(e,t){if($z(t))return Pe(t[0].value);if(zz(t))return Pe(e);let n=Pe(e);for(let i of t)switch(i.type){case"insert":{Wn.Set(n,i.path,i.value);break}case"update":{Wn.Set(n,i.path,i.value);break}case"delete":{Wn.Delete(n,i.path);break}}return n}o($I,"Patch");f();function zI(...e){let[t,n,i]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]],r=Tr(t,n)?xl(t,n,i):i;if(!pe(t,n,r))throw new is(t,r,Sr(t,n,r).First());return r}o(zI,"Encode");f();var tv=class tv extends re{constructor(t){super(t)}};o(tv,"ValueMutateError");var Ml=tv;function Bz(e,t,n,i){if(!fe(n))Wn.Set(e,t,Pe(i));else{let r=Object.getOwnPropertyNames(n),s=Object.getOwnPropertyNames(i);for(let a of r)s.includes(a)||delete n[a];for(let a of s)r.includes(a)||(n[a]=null);for(let a of s)ev(e,"".concat(t,"/").concat(a),n[a],i[a])}}o(Bz,"ObjectType");function Vz(e,t,n,i){if(!ae(n))Wn.Set(e,t,Pe(i));else{for(let r=0;r<i.length;r++)ev(e,"".concat(t,"/").concat(r),n[r],i[r]);n.splice(i.length)}}o(Vz,"ArrayType");function jz(e,t,n,i){if(kn(n)&&n.length===i.length)for(let r=0;r<n.length;r++)n[r]=i[r];else Wn.Set(e,t,Pe(i))}o(jz,"TypedArrayType");function Gz(e,t,n,i){n!==i&&Wn.Set(e,t,i)}o(Gz,"ValueType");function ev(e,t,n,i){if(ae(i))return Vz(e,t,n,i);if(kn(i))return jz(e,t,n,i);if(fe(i))return Bz(e,t,n,i);if(Nt(i))return Gz(e,t,n,i)}o(ev,"Visit");function BI(e){return kn(e)||Nt(e)}o(BI,"IsNonMutableValue");function Hz(e,t){return fe(e)&&ae(t)||ae(e)&&fe(t)}o(Hz,"IsMismatchedValue");function VI(e,t){if(BI(e)||BI(t))throw new Ml("Only object and array types can be mutated at the root level");if(Hz(e,t))throw new Ml("Cannot assign due type mismatch of assignable values");ev(e,"",e,t)}o(VI,"Mutate");f();var Wz=[(e,t,n)=>Pe(n),(e,t,n)=>vl(e,t,n),(e,t,n)=>ml(e,t,n),(e,t,n)=>yl(e,t,n),(e,t,n)=>(pl(e,t,n),n),(e,t,n)=>Tr(e,t)?rs(e,t,n):n];function jI(e,t,n){return Wz.reduce((i,r)=>r(e,t,i),n)}o(jI,"ParseValue");function GI(...e){return e.length===3?jI(e[0],e[1],e[2]):jI(e[0],[],e[1])}o(GI,"Parse");f();var Zn={};cn(Zn,{Assert:()=>pl,Cast:()=>jx,Check:()=>pe,Clean:()=>ml,Clone:()=>Pe,Convert:()=>yl,Create:()=>Hn,Decode:()=>OI,Default:()=>vl,Diff:()=>LI,Edit:()=>FI,Encode:()=>zI,Equal:()=>Qi,Errors:()=>Sr,Hash:()=>Pi,Mutate:()=>VI,Parse:()=>GI,Patch:()=>$I,ValueErrorIterator:()=>Gn});f();f();var HI={},Zz=o(function(e,t,n,i,r){var s=new Worker(HI[t]||(HI[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return s.onmessage=function(a){var u=a.data,l=u.$e$;if(l){var c=new Error(l[0]);c.code=l[1],c.stack=l[2],r(c,null)}else r(null,u)},s.postMessage(n,i),s},"wk"),Ze=Uint8Array,an=Uint16Array,Ka=Int32Array,us=new Ze([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ls=new Ze([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Za=new Ze([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),XI=o(function(e,t){for(var n=new an(31),i=0;i<31;++i)n[i]=t+=1<<e[i-1];for(var r=new Ka(n[30]),i=1;i<30;++i)for(var s=n[i];s<n[i+1];++s)r[s]=s-n[i]<<5|i;return{b:n,r}},"freb"),qI=XI(us,2),av=qI.b,Rl=qI.r;av[28]=258,Rl[258]=28;var KI=XI(ls,0),JI=KI.b,rv=KI.r,Xa=new an(32768);for(De=0;De<32768;++De)ti=(De&43690)>>1|(De&21845)<<1,ti=(ti&52428)>>2|(ti&13107)<<2,ti=(ti&61680)>>4|(ti&3855)<<4,Xa[De]=((ti&65280)>>8|(ti&255)<<8)>>1;var ti,De,qn=o(function(e,t,n){for(var i=e.length,r=0,s=new an(t);r<i;++r)e[r]&&++s[e[r]-1];var a=new an(t);for(r=1;r<t;++r)a[r]=a[r-1]+s[r-1]<<1;var u;if(n){u=new an(1<<t);var l=15-t;for(r=0;r<i;++r)if(e[r])for(var c=r<<4|e[r],d=t-e[r],h=a[e[r]-1]++<<d,m=h|(1<<d)-1;h<=m;++h)u[Xa[h]>>l]=c}else for(u=new an(i),r=0;r<i;++r)e[r]&&(u[r]=Xa[a[e[r]-1]++]>>15-e[r]);return u},"hMap"),ni=new Ze(288);for(De=0;De<144;++De)ni[De]=8;var De;for(De=144;De<256;++De)ni[De]=9;var De;for(De=256;De<280;++De)ni[De]=7;var De;for(De=280;De<288;++De)ni[De]=8;var De,as=new Ze(32);for(De=0;De<32;++De)as[De]=5;var De,YI=qn(ni,9,0),QI=qn(ni,9,1),ew=qn(as,5,0),tw=qn(as,5,1),Tl=o(function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},"max"),Xn=o(function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(t&7)&n},"bits"),Al=o(function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},"bits16"),Ja=o(function(e){return(e+7)/8|0},"shft"),Ri=o(function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Ze(e.subarray(t,n))},"slc"),Nl={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},nw=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ft=o(function(e,t,n){var i=new Error(t||nw[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,ft),!n)throw i;return i},"err"),rw=o(function(e,t,n,i){var r=e.length,s=i?i.length:0;if(!r||t.f&&!t.l)return n||new Ze(0);var a=!n,u=a||t.i!=2,l=t.i;a&&(n=new Ze(r*3));var c=o(function(E){var te=n.length;if(E>te){var q=new Ze(Math.max(te*2,E));q.set(n),n=q}},"cbuf"),d=t.f||0,h=t.p||0,m=t.b||0,y=t.l,v=t.d,I=t.m,T=t.n,U=r*8;do{if(!y){d=Xn(e,h,1);var D=Xn(e,h+1,3);if(h+=3,D)if(D==1)y=QI,v=tw,I=9,T=5;else if(D==2){var j=Xn(e,h,31)+257,F=Xn(e,h+10,15)+4,H=j+Xn(e,h+5,31)+1;h+=14;for(var G=new Ze(H),ce=new Ze(19),ue=0;ue<F;++ue)ce[Za[ue]]=Xn(e,h+ue*3,7);h+=F*3;for(var he=Tl(ce),Ge=(1<<he)-1,Oe=qn(ce,he,1),ue=0;ue<H;){var Ue=Oe[Xn(e,h,Ge)];h+=Ue&15;var w=Ue>>4;if(w<16)G[ue++]=w;else{var V=0,ne=0;for(w==16?(ne=3+Xn(e,h,3),h+=2,V=G[ue-1]):w==17?(ne=3+Xn(e,h,7),h+=3):w==18&&(ne=11+Xn(e,h,127),h+=7);ne--;)G[ue++]=V}}var le=G.subarray(0,j),oe=G.subarray(j);I=Tl(le),T=Tl(oe),y=qn(le,I,1),v=qn(oe,T,1)}else ft(1);else{var w=Ja(h)+4,S=e[w-4]|e[w-3]<<8,A=w+S;if(A>r){l&&ft(0);break}u&&c(m+S),n.set(e.subarray(w,A),m),t.b=m+=S,t.p=h=A*8,t.f=d;continue}if(h>U){l&&ft(0);break}}u&&c(m+131072);for(var Me=(1<<I)-1,pt=(1<<T)-1,Bt=h;;Bt=h){var V=y[Al(e,h)&Me],Vt=V>>4;if(h+=V&15,h>U){l&&ft(0);break}if(V||ft(2),Vt<256)n[m++]=Vt;else if(Vt==256){Bt=h,y=null;break}else{var At=Vt-254;if(Vt>264){var ue=Vt-257,tt=us[ue];At=Xn(e,h,(1<<tt)-1)+av[ue],h+=tt}var On=v[Al(e,h)&pt],Or=On>>4;On||ft(3),h+=On&15;var oe=JI[Or];if(Or>3){var tt=ls[Or];oe+=Al(e,h)&(1<<tt)-1,h+=tt}if(h>U){l&&ft(0);break}u&&c(m+131072);var ai=m+At;if(m<oe){var b=s-oe,X=Math.min(oe,ai);for(b+m<0&&ft(3);m<X;++m)n[m]=i[b+m]}for(;m<ai;++m)n[m]=n[m-oe]}}t.l=y,t.p=Bt,t.b=m,t.f=d,y&&(d=1,t.m=I,t.d=v,t.n=T)}while(!d);return m!=n.length&&a?Ri(n,0,m):n.subarray(0,m)},"inflt"),Ar=o(function(e,t,n){n<<=t&7;var i=t/8|0;e[i]|=n,e[i+1]|=n>>8},"wbits"),os=o(function(e,t,n){n<<=t&7;var i=t/8|0;e[i]|=n,e[i+1]|=n>>8,e[i+2]|=n>>16},"wbits16"),Pl=o(function(e,t){for(var n=[],i=0;i<e.length;++i)e[i]&&n.push({s:i,f:e[i]});var r=n.length,s=n.slice();if(!r)return{t:uv,l:0};if(r==1){var a=new Ze(n[0].s+1);return a[n[0].s]=1,{t:a,l:1}}n.sort(function(A,j){return A.f-j.f}),n.push({s:-1,f:25001});var u=n[0],l=n[1],c=0,d=1,h=2;for(n[0]={s:-1,f:u.f+l.f,l:u,r:l};d!=r-1;)u=n[n[c].f<n[h].f?c++:h++],l=n[c!=d&&n[c].f<n[h].f?c++:h++],n[d++]={s:-1,f:u.f+l.f,l:u,r:l};for(var m=s[0].s,i=1;i<r;++i)s[i].s>m&&(m=s[i].s);var y=new an(m+1),v=Cl(n[d-1],y,0);if(v>t){var i=0,I=0,T=v-t,U=1<<T;for(s.sort(function(j,F){return y[F.s]-y[j.s]||j.f-F.f});i<r;++i){var D=s[i].s;if(y[D]>t)I+=U-(1<<v-y[D]),y[D]=t;else break}for(I>>=T;I>0;){var w=s[i].s;y[w]<t?I-=1<<t-y[w]++-1:++i}for(;i>=0&&I;--i){var S=s[i].s;y[S]==t&&(--y[S],++I)}v=t}return{t:new Ze(y),l:v}},"hTree"),Cl=o(function(e,t,n){return e.s==-1?Math.max(Cl(e.l,t,n+1),Cl(e.r,t,n+1)):t[e.s]=n},"ln"),iv=o(function(e){for(var t=e.length;t&&!e[--t];);for(var n=new an(++t),i=0,r=e[0],s=1,a=o(function(l){n[i++]=l},"w"),u=1;u<=t;++u)if(e[u]==r&&u!=t)++s;else{if(!r&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(r),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(r);s=1,r=e[u]}return{c:n.subarray(0,i),n:t}},"lc"),ss=o(function(e,t){for(var n=0,i=0;i<t.length;++i)n+=e[i]*t[i];return n},"clen"),cv=o(function(e,t,n){var i=n.length,r=Ja(t+2);e[r]=i&255,e[r+1]=i>>8,e[r+2]=e[r]^255,e[r+3]=e[r+1]^255;for(var s=0;s<i;++s)e[r+s+4]=n[s];return(r+4+i)*8},"wfblk"),ov=o(function(e,t,n,i,r,s,a,u,l,c,d){Ar(t,d++,n),++r[256];for(var h=Pl(r,15),m=h.t,y=h.l,v=Pl(s,15),I=v.t,T=v.l,U=iv(m),D=U.c,w=U.n,S=iv(I),A=S.c,j=S.n,F=new an(19),H=0;H<D.length;++H)++F[D[H]&31];for(var H=0;H<A.length;++H)++F[A[H]&31];for(var G=Pl(F,7),ce=G.t,ue=G.l,he=19;he>4&&!ce[Za[he-1]];--he);var Ge=c+5<<3,Oe=ss(r,ni)+ss(s,as)+a,Ue=ss(r,m)+ss(s,I)+a+14+3*he+ss(F,ce)+2*F[16]+3*F[17]+7*F[18];if(l>=0&&Ge<=Oe&&Ge<=Ue)return cv(t,d,e.subarray(l,l+c));var V,ne,le,oe;if(Ar(t,d,1+(Ue<Oe)),d+=2,Ue<Oe){V=qn(m,y,0),ne=m,le=qn(I,T,0),oe=I;var Me=qn(ce,ue,0);Ar(t,d,w-257),Ar(t,d+5,j-1),Ar(t,d+10,he-4),d+=14;for(var H=0;H<he;++H)Ar(t,d+3*H,ce[Za[H]]);d+=3*he;for(var pt=[D,A],Bt=0;Bt<2;++Bt)for(var Vt=pt[Bt],H=0;H<Vt.length;++H){var At=Vt[H]&31;Ar(t,d,Me[At]),d+=ce[At],At>15&&(Ar(t,d,Vt[H]>>5&127),d+=Vt[H]>>12)}}else V=YI,ne=ni,le=ew,oe=as;for(var H=0;H<u;++H){var tt=i[H];if(tt>255){var At=tt>>18&31;os(t,d,V[At+257]),d+=ne[At+257],At>7&&(Ar(t,d,tt>>23&31),d+=us[At]);var On=tt&31;os(t,d,le[On]),d+=oe[On],On>3&&(os(t,d,tt>>5&8191),d+=ls[On])}else os(t,d,V[tt]),d+=ne[tt]}return os(t,d,V[256]),d+ne[256]},"wblk"),iw=new Ka([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),uv=new Ze(0),ow=o(function(e,t,n,i,r,s){var a=s.z||e.length,u=new Ze(i+a+5*(1+Math.ceil(a/7e3))+r),l=u.subarray(i,u.length-r),c=s.l,d=(s.r||0)&7;if(t){d&&(l[0]=s.r>>3);for(var h=iw[t-1],m=h>>13,y=h&8191,v=(1<<n)-1,I=s.p||new an(32768),T=s.h||new an(v+1),U=Math.ceil(n/3),D=2*U,w=o(function(Q){return(e[Q]^e[Q+1]<<U^e[Q+2]<<D)&v},"hsh"),S=new Ka(25e3),A=new an(288),j=new an(32),F=0,H=0,G=s.i||0,ce=0,ue=s.w||0,he=0;G+2<a;++G){var Ge=w(G),Oe=G&32767,Ue=T[Ge];if(I[Oe]=Ue,T[Ge]=Oe,ue<=G){var V=a-G;if((F>7e3||ce>24576)&&(V>423||!c)){d=ov(e,l,0,S,A,j,H,ce,he,G-he,d),ce=F=H=0,he=G;for(var ne=0;ne<286;++ne)A[ne]=0;for(var ne=0;ne<30;++ne)j[ne]=0}var le=2,oe=0,Me=y,pt=Oe-Ue&32767;if(V>2&&Ge==w(G-pt))for(var Bt=Math.min(m,V)-1,Vt=Math.min(32767,G),At=Math.min(258,V);pt<=Vt&&--Me&&Oe!=Ue;){if(e[G+le]==e[G+le-pt]){for(var tt=0;tt<At&&e[G+tt]==e[G+tt-pt];++tt);if(tt>le){if(le=tt,oe=pt,tt>Bt)break;for(var On=Math.min(pt,tt-2),Or=0,ne=0;ne<On;++ne){var ai=G-pt+ne&32767,b=I[ai],X=ai-b&32767;X>Or&&(Or=X,Ue=ai)}}}Oe=Ue,Ue=I[Oe],pt+=Oe-Ue&32767}if(oe){S[ce++]=268435456|Rl[le]<<18|rv[oe];var E=Rl[le]&31,te=rv[oe]&31;H+=us[E]+ls[te],++A[257+E],++j[te],ue=G+le,++F}else S[ce++]=e[G],++A[e[G]]}}for(G=Math.max(G,ue);G<a;++G)S[ce++]=e[G],++A[e[G]];d=ov(e,l,c,S,A,j,H,ce,he,G-he,d),c||(s.r=d&7|l[d/8|0]<<3,d-=7,s.h=T,s.p=I,s.i=G,s.w=ue)}else{for(var G=s.w||0;G<a+c;G+=65535){var q=G+65535;q>=a&&(l[d/8|0]=c,q=a),d=cv(l,d+1,e.subarray(G,q))}s.i=a}return Ri(u,0,i+Ja(d)+r)},"dflt"),Xz=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,i=9;--i;)n=(n&1&&-306674912)^n>>>1;e[t]=n}return e}(),sw=o(function(){var e=-1;return{p:o(function(t){for(var n=e,i=0;i<t.length;++i)n=Xz[n&255^t[i]]^n>>>8;e=n},"p"),d:o(function(){return~e},"d")}},"crc");var aw=o(function(e,t,n,i,r){if(!r&&(r={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),a=new Ze(s.length+e.length);a.set(s),a.set(e,s.length),e=a,r.w=s.length}return ow(e,t.level==null?6:t.level,t.mem==null?r.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,i,r)},"dopt"),Fl=o(function(e,t){var n={};for(var i in e)n[i]=e[i];for(var i in t)n[i]=t[i];return n},"mrg"),WI=o(function(e,t,n){for(var i=e(),r=e.toString(),s=r.slice(r.indexOf("[")+1,r.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<i.length;++a){var u=i[a],l=s[a];if(typeof u=="function"){t+=";"+l+"=";var c=u.toString();if(u.prototype)if(c.indexOf("[native code]")!=-1){var d=c.indexOf(" ",8)+1;t+=c.slice(d,c.indexOf("(",d))}else{t+=c;for(var h in u.prototype)t+=";"+l+".prototype."+h+"="+u.prototype[h].toString()}else t+=c}else n[l]=u}return t},"wcln"),El=[],qz=o(function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t},"cbfs"),Kz=o(function(e,t,n,i){if(!El[n]){for(var r="",s={},a=e.length-1,u=0;u<a;++u)r=WI(e[u],r,s);El[n]={c:WI(e[a],r,s),e:s}}var l=Fl({},El[n].e);return Zz(El[n].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,l,qz(l),i)},"wrkr"),Jz=o(function(){return[Ze,an,Ka,us,ls,Za,av,JI,QI,tw,Xa,nw,qn,Tl,Xn,Al,Ja,Ri,ft,rw,Ll,kl,cw]},"bInflt"),Yz=o(function(){return[Ze,an,Ka,us,ls,Za,Rl,rv,YI,ni,ew,as,Xa,iw,uv,qn,Ar,os,Pl,Cl,iv,ss,cv,ov,Ja,Ri,ow,aw,Dl,kl]},"bDflt");var kl=o(function(e){return postMessage(e,[e.buffer])},"pbf"),cw=o(function(e){return e&&{out:e.size&&new Ze(e.size),dictionary:e.dictionary}},"gopt"),uw=o(function(e,t,n,i,r,s){var a=Kz(n,i,r,function(u,l){a.terminate(),s(u,l)});return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},"cbify");var ar=o(function(e,t){return e[t]|e[t+1]<<8},"b2"),$t=o(function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},"b4"),nv=o(function(e,t){return $t(e,t)+$t(e,t+4)*4294967296},"b8"),Lt=o(function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},"wbytes");function Qz(e,t,n){return n||(n=t,t={}),typeof n!="function"&&ft(7),uw(e,t,[Yz],function(i){return kl(Dl(i.data[0],i.data[1]))},0,n)}o(Qz,"deflate");function Dl(e,t){return aw(e,t||{},0,0)}o(Dl,"deflateSync");function e3(e,t,n){return n||(n=t,t={}),typeof n!="function"&&ft(7),uw(e,t,[Jz],function(i){return kl(Ll(i.data[0],cw(i.data[1])))},1,n)}o(e3,"inflate");function Ll(e,t){return rw(e,{i:2},t&&t.out,t&&t.dictionary)}o(Ll,"inflateSync");var lv=o(function(e,t,n,i){for(var r in e){var s=e[r],a=t+r,u=i;Array.isArray(s)&&(u=Fl(i,s[1]),s=s[0]),s instanceof Ze?n[a]=[s,u]:(n[a+="/"]=[new Ze(0),u],lv(s,a,n,i))}},"fltn"),ZI=typeof TextEncoder<"u"&&new TextEncoder,sv=typeof TextDecoder<"u"&&new TextDecoder,t3=0;try{sv.decode(uv,{stream:!0}),t3=1}catch(e){}var n3=o(function(e){for(var t="",n=0;;){var i=e[n++],r=(i>127)+(i>223)+(i>239);if(n+r>e.length)return{s:t,r:Ri(e,n-1)};r?r==3?(i=((i&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|i>>10,56320|i&1023)):r&1?t+=String.fromCharCode((i&31)<<6|e[n++]&63):t+=String.fromCharCode((i&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(i)}},"dutf8");function cs(e,t){if(t){for(var n=new Ze(e.length),i=0;i<e.length;++i)n[i]=e.charCodeAt(i);return n}if(ZI)return ZI.encode(e);for(var r=e.length,s=new Ze(e.length+(e.length>>1)),a=0,u=o(function(d){s[a++]=d},"w"),i=0;i<r;++i){if(a+5>s.length){var l=new Ze(a+8+(r-i<<1));l.set(s),s=l}var c=e.charCodeAt(i);c<128||t?u(c):c<2048?(u(192|c>>6),u(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|e.charCodeAt(++i)&1023,u(240|c>>18),u(128|c>>12&63),u(128|c>>6&63),u(128|c&63)):(u(224|c>>12),u(128|c>>6&63),u(128|c&63))}return Ri(s,0,a)}o(cs,"strToU8");function fv(e,t){if(t){for(var n="",i=0;i<e.length;i+=16384)n+=String.fromCharCode.apply(null,e.subarray(i,i+16384));return n}else{if(sv)return sv.decode(e);var r=n3(e),s=r.s,n=r.r;return n.length&&ft(8),s}}o(fv,"strFromU8");var lw=o(function(e,t){return t+30+ar(e,t+26)+ar(e,t+28)},"slzh"),fw=o(function(e,t,n){var i=ar(e,t+28),r=fv(e.subarray(t+46,t+46+i),!(ar(e,t+8)&2048)),s=t+46+i,a=$t(e,t+20),u=n&&a==4294967295?r3(e,s):[a,$t(e,t+24),$t(e,t+42)],l=u[0],c=u[1],d=u[2];return[ar(e,t+10),l,c,r,s+ar(e,t+30)+ar(e,t+32),d]},"zh"),r3=o(function(e,t){for(;ar(e,t)!=1;t+=4+ar(e,t+2));return[nv(e,t+12),nv(e,t+4),nv(e,t+20)]},"z64e"),qa=o(function(e){var t=0;if(e)for(var n in e){var i=e[n].length;i>65535&&ft(9),t+=i+4}return t},"exfl"),Ol=o(function(e,t,n,i,r,s,a,u){var l=i.length,c=n.extra,d=u&&u.length,h=qa(c);Lt(e,t,a!=null?33639248:67324752),t+=4,a!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(s<0&&8),e[t++]=r&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;var m=new Date(n.mtime==null?Date.now():n.mtime),y=m.getFullYear()-1980;if((y<0||y>119)&&ft(10),Lt(e,t,y<<25|m.getMonth()+1<<21|m.getDate()<<16|m.getHours()<<11|m.getMinutes()<<5|m.getSeconds()>>1),t+=4,s!=-1&&(Lt(e,t,n.crc),Lt(e,t+4,s<0?-s-2:s),Lt(e,t+8,n.size)),Lt(e,t+12,l),Lt(e,t+14,h),t+=16,a!=null&&(Lt(e,t,d),Lt(e,t+6,n.attrs),Lt(e,t+10,a),t+=14),e.set(i,t),t+=l,h)for(var v in c){var I=c[v],T=I.length;Lt(e,t,+v),Lt(e,t+2,T),e.set(I,t+4),t+=4+T}return d&&(e.set(u,t),t+=d),t},"wzh"),dw=o(function(e,t,n,i,r){Lt(e,t,101010256),Lt(e,t+8,n),Lt(e,t+10,n),Lt(e,t+12,i),Lt(e,t+16,r)},"wzf");function pw(e,t,n){n||(n=t,t={}),typeof n!="function"&&ft(7);var i={};lv(e,"",i,t);var r=Object.keys(i),s=r.length,a=0,u=0,l=s,c=new Array(s),d=[],h=o(function(){for(var T=0;T<d.length;++T)d[T]()},"tAll"),m=o(function(T,U){Ul(function(){n(T,U)})},"cbd");Ul(function(){m=n});var y=o(function(){var T=new Ze(u+22),U=a,D=u-a;u=0;for(var w=0;w<l;++w){var S=c[w];try{var A=S.c.length;Ol(T,u,S,S.f,S.u,A);var j=30+S.f.length+qa(S.extra),F=u+j;T.set(S.c,F),Ol(T,a,S,S.f,S.u,A,u,S.m),a+=16+j+(S.m?S.m.length:0),u=F+A}catch(H){return m(H,null)}}dw(T,a,c.length,D,U),m(null,T)},"cbf");s||y();for(var v=o(function(T){var U=r[T],D=i[U],w=D[0],S=D[1],A=sw(),j=w.length;A.p(w);var F=cs(U),H=F.length,G=S.comment,ce=G&&cs(G),ue=ce&&ce.length,he=qa(S.extra),Ge=S.level==0?0:8,Oe=o(function(Ue,V){if(Ue)h(),m(Ue,null);else{var ne=V.length;c[T]=Fl(S,{size:j,crc:A.d(),c:V,f:F,m:ce,u:H!=U.length||ce&&G.length!=ue,compression:Ge}),a+=30+H+he+ne,u+=76+2*(H+he)+(ue||0)+ne,--s||y()}},"cbl");if(H>65535&&Oe(ft(11,0,1),null),!Ge)Oe(null,w);else if(j<16e4)try{Oe(null,Dl(w,S))}catch(Ue){Oe(Ue,null)}else d.push(Qz(w,S,Oe))},"_loop_1"),I=0;I<l;++I)v(I);return h}o(pw,"zip");function hw(e,t){t||(t={});var n={},i=[];lv(e,"",n,t);var r=0,s=0;for(var a in n){var u=n[a],l=u[0],c=u[1],d=c.level==0?0:8,h=cs(a),m=h.length,y=c.comment,v=y&&cs(y),I=v&&v.length,T=qa(c.extra);m>65535&&ft(11);var U=d?Dl(l,c):l,D=U.length,w=sw();w.p(l),i.push(Fl(c,{size:l.length,crc:w.d(),c:U,f:h,m:v,u:m!=a.length||v&&y.length!=I,o:r,compression:d})),r+=30+m+T+D,s+=76+2*(m+T)+(I||0)+D}for(var S=new Ze(s+22),A=r,j=s-r,F=0;F<i.length;++F){var h=i[F];Ol(S,h.o,h,h.f,h.u,h.c.length);var H=30+h.f.length+qa(h.extra);S.set(h.c,h.o+H),Ol(S,r,h,h.f,h.u,h.c.length,h.o,h.m),r+=16+H+(h.m?h.m.length:0)}return dw(S,r,i.length,j,A),S}o(hw,"zipSync");var Ul=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(e){e()};function mw(e,t,n){n||(n=t,t={}),typeof n!="function"&&ft(7);var i=[],r=o(function(){for(var T=0;T<i.length;++T)i[T]()},"tAll"),s={},a=o(function(T,U){Ul(function(){n(T,U)})},"cbd");Ul(function(){a=n});for(var u=e.length-22;$t(e,u)!=101010256;--u)if(!u||e.length-u>65558)return a(ft(13,0,1),null),r;var l=ar(e,u+8);if(l){var c=l,d=$t(e,u+16),h=d==4294967295||c==65535;if(h){var m=$t(e,u-12);h=$t(e,m)==101075792,h&&(c=l=$t(e,m+32),d=$t(e,m+48))}for(var y=t&&t.filter,v=o(function(T){var U=fw(e,d,h),D=U[0],w=U[1],S=U[2],A=U[3],j=U[4],F=U[5],H=lw(e,F);d=j;var G=o(function(ue,he){ue?(r(),a(ue,null)):(he&&(s[A]=he),--l||a(null,s))},"cbl");if(!y||y({name:A,size:w,originalSize:S,compression:D}))if(!D)G(null,Ri(e,H,H+w));else if(D==8){var ce=e.subarray(H,H+w);if(S<524288||w>.8*S)try{G(null,Ll(ce,{out:new Ze(S)}))}catch(ue){G(ue,null)}else i.push(e3(ce,{size:S},G))}else G(ft(14,"unknown compression type "+D,1),null);else G(null,null)},"_loop_3"),I=0;I<c;++I)v(I)}else a(null,{});return r}o(mw,"unzip");function gw(e,t){for(var n={},i=e.length-22;$t(e,i)!=101010256;--i)(!i||e.length-i>65558)&&ft(13);var r=ar(e,i+8);if(!r)return{};var s=$t(e,i+16),a=s==4294967295||r==65535;if(a){var u=$t(e,i-12);a=$t(e,u)==101075792,a&&(r=$t(e,u+32),s=$t(e,u+48))}for(var l=t&&t.filter,c=0;c<r;++c){var d=fw(e,s,a),h=d[0],m=d[1],y=d[2],v=d[3],I=d[4],T=d[5],U=lw(e,T);s=I,(!l||l({name:v,size:m,originalSize:y,compression:h}))&&(h?h==8?n[v]=Ll(e.subarray(U,U+m),{out:new Ze(y)}):ft(14,"unknown compression type "+h):n[v]=Ri(e,U,U+m))}return n}o(gw,"unzipSync");f();var i3=o(e=>{if(e!=null)return e.trim()===""?void 0:e},"maybePath"),o3=o(e=>e!=null,"notNull"),$l=o((e,t,n=0)=>{var i;if(_.IsNull(e))return"null";if(_.IsUndefined(e))return"undefined";if(_.IsString(e))return"<string>";if(_.IsNumber(e))return"<number>";if(_.IsBoolean(e))return"<boolean>";if(_.IsLiteral(e))return typeof e.const=="string"?"'".concat(e.const,"'"):"".concat(e.const);if(_.IsRef(e)){let r=t.find(s=>s.$id===e.$ref);return r==null?e.$ref:$l(r,t,n)}if(_.IsArray(e))return"".concat($l(e.items,t,n+1),"[]");if(_.IsUnion(e)&&(!(e.anyOf.length>5)||e.$id==null)){let s="".concat(e.anyOf.map(a=>$l(a,t,n+1)).filter(o3).join(" | "));return n>0?"(".concat(s,")"):s}return(i=e.$id)!=null?i:""},"resolveSchemaIdent"),s3=o((e,t,n)=>{var s;let i=t.message;_.IsUnion(t.schema)&&(i="Expected one of: ".concat($l(t.schema,n)));let r="#/definitions/".concat(e).concat((s=i3(t.path))!=null?s:"");return"".concat(r,": ").concat(i)},"errorHandler"),zl=o((e,t,n)=>{let i=t.First();if(i!=null)return s3(e,i,n)},"shortError");var fs;(function(e){e.Archive="Archive",e.Validate="Validate",e.Encode="Encode",e.Unknown="Unknown"})(fs||(fs={}));var dv=class dv extends Error{constructor(n,i){super(i);Xe(this,"name");Xe(this,"kind");this.name="CompressError",this.kind=n}};o(dv,"CompressError");var ds=dv,a3=o(e=>new ds(fs.Archive,e.message),"flateErrorIntoCompressError"),c3=o(e=>{let t=Object.values(Nl);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),u3=o((e,t,n)=>{var i;return new ds(fs.Validate,(i=zl(e,t,n))!=null?i:"Unknown validate error")},"checkErrorIntoCompressError"),l3=o(e=>new ds(fs.Encode,e.message),"encodeErrorIntoCompressError"),f3=o(e=>new ds(fs.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoCompressError"),Ya=o((e,t,n)=>t instanceof Yi?l3(t):t instanceof Gn?u3(e,t,n):c3(t)?a3(t):f3(t),"intoCompressError");f();var ps;(function(e){e.Unarchive="Unarchive",e.Validate="Validate",e.Decode="Decode",e.Unknown="Unknown"})(ps||(ps={}));var pv=class pv extends Error{constructor(n,i){super(i);Xe(this,"name");Xe(this,"kind");this.name="DecompressError",this.kind=n}};o(pv,"DecompressError");var hs=pv,d3=o(e=>new hs(ps.Unarchive,e.message),"flateErrorIntoDecompressError"),p3=o(e=>{let t=Object.values(Nl);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),h3=o((e,t,n)=>{var i;return new hs(ps.Validate,(i=zl(e,t,n))!=null?i:"Unknown validate error")},"checkErrorIntoDecompressError"),m3=o(e=>new hs(ps.Decode,e.message),"decodeErrorIntoDecompressError"),g3=o(e=>new hs(ps.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoDecompressError"),Qa=o((e,t,n)=>t instanceof Ji?m3(t):t instanceof Gn?h3(e,t,n):p3(t)?d3(t):g3(t),"intoDecompressError");var yw=o(function*(e,t=""){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)yield[t+"[".concat(n,"]"),e[n]];return}if("features"in e){for(let n=0;n<e.features.length;n++)yield[t===""?"features[".concat(n,"]"):"".concat(t,".features[").concat(n,"]"),e.features[n]];return}for(let[n,i]of Object.entries(e)){let r=t===""?n:"".concat(t,".").concat(n);yield*k(yw(i,r))}}},"iterRecord"),y3=o((e,t)=>e===""?t:t.startsWith("[")?"".concat(e).concat(t):"".concat(e,".").concat(t),"getPath"),gt=o((e,t,n)=>{let i=new Set;for(let[r,s]of yw(e)){let a=t(s);if(i.has(a))return Y({kind:gn.DuplicateIdError,properties:{id:a,path:y3(n,r)}});i.add(a)}return J(!0)},"ensureUniqueIds");var xw=o(e=>e.floors==null?Y({kind:gn.FloorMissingError,properties:null}):gt(e.floors.features,t=>t.properties.id,"floors"),"validateFloors");var vw=p.Intersect([p.Object({id:p.Ref(_e),elevation:p.Integer({description:"An ordinal representing the elevation of this map relative to other maps in the stack."}),subtitle:p.Optional(p.String({description:"The subtitle of the floor."})),maxHeight:p.Optional(p.Number({description:"The maximum height of the floor in meters. This includes the thickness of the floor itself, up to the tallest point on any wall. If the floor does not have a consistent height (eg, one room on the floor has a vaulted ceiling, the rest do not), this value represents the highest point anywhere on the floor. Must be a positive number, or undefined.",minimum:0}))}),wn],{$id:"FloorProperties"}),_w=Ft(p.Union([p.Ref(Jo),p.Ref(Yo),p.Null()]),p.Ref(vw),{$id:"FloorFeature"}),bw=sn(p.Ref(_w),{$id:"FloorCollection"}),x3=p.Object({floors:p.Ref(bw)}),Sw={name:"core:floors",intoBundle:o(function*(e){e.floors!=null&&(yield{path:"floors.geojson",contents:e.floors})},"intoBundle"),fromBundle:o((e,t,n)=>{if(e==="floors.geojson")return{floors:n(t)}},"fromBundle"),integrityCheck:xw,schema:x3,references:[vw,_w,bw]};f();f();var yt=o(e=>p.Unsafe(e),"PartialRecord");f();var $e=o(e=>Object.keys(e),"typedKeys");f();f();var v3=o(e=>{var t,n;return new Map((n=(t=e.floors)==null?void 0:t.features.map(i=>[i.properties.id,i]))!=null?n:[])},"createFloorMap"),cr=o(e=>{let t=v3(e);return o(i=>{let r=t.get(i);return r==null?Y({kind:gn.UnknownFloorError,properties:{floorId:i}}):J(r)},"floorLookup")},"createFloorLookup");var Iw=o(e=>{if(e.floors==null)return Y({kind:gn.FloorMissingError,properties:null});if(e.geometry==null)return Y({kind:gn.GeometryMissingError,properties:null});let t=gt(e.geometry,i=>i.properties.id,"geometry");if(t.isErr())return t;let n=cr(e);for(let i of $e(e.geometry)){let r=n(i);if(r.isErr())return r}return J(!0)},"validateGeometry");var ww=p.Intersect([p.Object({id:p.Ref(Xt)}),wn],{$id:"GeometryProperties"}),Mw=Ft(p.Union([p.Ref(Zt),p.Ref(rl),p.Ref(il),p.Ref(ol),p.Ref(Jo),p.Ref(Yo)]),p.Ref(ww),{$id:"GeometryFeature"}),Ew=sn(p.Ref(Mw),{$id:"GeometryCollection"}),_3=p.Object({geometry:yt(p.Record(_e,p.Ref(Ew),{additionalProperties:!1}))},{$id:"GeometrySchema"}),b3=/^geometry\/(.*)\.geojson$/,Tw={name:"core:geometry",schema:_3,intoBundle:o(function*(e){if(e.geometry!=null)for(let t of $e(e.geometry))yield{path:"geometry/".concat(t,".geojson"),contents:e.geometry[t]}},"intoBundle"),fromBundle:o((e,t,n)=>{var r;let i=(r=e.match(b3))==null?void 0:r[1];if(i)return{geometry:{[i]:n(t)}}},"fromBundle"),references:[ww,Mw,Ew],integrityCheck:Iw};f();var hv=p.Object({type:p.Literal("file"),name:p.String({description:"The name of the file."})},{$id:"ManifestFile"}),Aw=p.Recursive(e=>p.Object({type:p.Literal("folder"),name:p.String({description:"The name of the folder."}),children:p.Array(p.Union([e,p.Ref(hv)]),{minItems:1,description:"The children of the folder."})}),{$id:"ManifestFolder"}),Pw=p.Object({name:p.String({description:"The name of the map."}),version:p.Literal("3.0.0",{description:"The version of the manifest."}),orgId:p.Optional(p.String({description:"The identifier of the organization that the map this MVF is for belongs to."})),mapId:p.Optional(p.String({description:"The identifier of the map that this MVF is for."})),contents:p.Array(p.Union([p.Ref(Aw),p.Ref(hv)]),{minItems:1,description:"The contents of the MVF bundle."}),time:p.String({format:"date-time",description:"An ISO 8601 date-time string, including timezone offset."}),tzid:p.Optional(p.Unsafe(p.String({description:"A valid IANA timezone identifier.",pattern:"^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$"}))),naturalBearing:p.Optional(p.Number({minimum:0,maximum:360,description:'The angle, in degrees, the map is considered to be "naturally oriented" as, rather than facing directly north. 90 degrees means East is "up"'})),defaultFloor:p.Optional(p.Ref(_e,{description:"The default floor ID of the map."})),language:p.Optional(p.String({description:"The language code of the map."}))},{$id:"ManifestProperties"}),Rw=sn(Ft(Zt,p.Ref(Pw)),{$id:"ManifestCollection"},{minItems:1,maxItems:1}),S3=p.Object({manifest:p.Ref(Rw)}),Cw={name:"core:manifest",intoBundle:o(function*(e){e.manifest!=null&&(yield{path:"manifest.geojson",contents:e.manifest})},"intoBundle"),fromBundle:o((e,t,n)=>{if(e==="manifest.geojson")return{manifest:n(t)}},"fromBundle"),schema:S3,references:[hv,Aw,Pw,Rw]};f();f();f();f();var gv=class gv extends re{constructor(n){super("Unable to dereference schema with $id '".concat(n.$ref,"'"));Xe(this,"schema");this.schema=n}};o(gv,"TypeDereferenceError");var mv=gv;function I3(e,t){let n=t.find(i=>i.$id===e.$ref);if(n===void 0)throw new mv(e);return eo(n,t)}o(I3,"Resolve");function Bl(e,t){return!be.IsString(e.$id)||t.some(n=>n.$id===e.$id)||t.push(e),t}o(Bl,"Pushref");function eo(e,t){return e[P]==="This"||e[P]==="Ref"?I3(e,t):e}o(eo,"Deref");f();function w3(e,t,n){let i=e.get(t);if(i!==void 0)return i;let r=Tr(t,n);return e.set(t,r),r}o(w3,"HasTransformCached");function Vl(){let e=new WeakMap;return{HasTransform:o((t,n)=>w3(e,t,n),"HasTransform")}}o(Vl,"CreateTransformCache");function dt(e,t,n){try{return _.IsTransform(e)?e[ot].Decode(n):n}catch(i){throw new Ji(e,t,n,i)}}o(dt,"Default");function M3(e,t,n,i,r){return be.IsArray(i)?dt(e,n,i.map((s,a)=>Pr(e.items,t,"".concat(n,"/").concat(a),s,r))):dt(e,n,i)}o(M3,"FromArray");function E3(e,t,n,i,r){if(!be.IsObject(i)||Nt(i))return dt(e,n,i);let s=Ei(e),a=s.map(h=>h[0]),u=x({},i);for(let[h,m]of s)h in u&&(u[h]=Pr(m,t,"".concat(n,"/").concat(h),u[h],r));if(!_.IsTransform(e.unevaluatedProperties))return dt(e,n,u);let l=Object.getOwnPropertyNames(u),c=e.unevaluatedProperties,d=x({},u);for(let h of l)a.includes(h)||(d[h]=dt(c,"".concat(n,"/").concat(h),d[h]));return dt(e,n,d)}o(E3,"FromIntersect");function T3(e,t,n,i,r){return dt(e,n,Pr(e.not,t,n,i,r))}o(T3,"FromNot");function A3(e,t,n,i,r){if(!be.IsObject(i))return dt(e,n,i);let s=Pt(e),a=x({},i);for(let d of s)be.HasPropertyKey(a,d)&&(be.IsUndefined(a[d])&&(!_.IsUndefined(e.properties[d])||Le.IsExactOptionalProperty(a,d))||(a[d]=Pr(e.properties[d],t,"".concat(n,"/").concat(d),a[d],r)));if(!_.IsSchema(e.additionalProperties))return dt(e,n,a);let u=Object.getOwnPropertyNames(a),l=e.additionalProperties,c=x({},a);for(let d of u)s.includes(d)||(c[d]=dt(l,"".concat(n,"/").concat(d),c[d]));return dt(e,n,c)}o(A3,"FromObject");function P3(e,t,n,i,r){if(!be.IsObject(i))return dt(e,n,i);let s=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(s),u=x({},i);for(let h of Object.getOwnPropertyNames(i))a.test(h)&&(u[h]=Pr(e.patternProperties[s],t,"".concat(n,"/").concat(h),u[h],r));if(!_.IsSchema(e.additionalProperties))return dt(e,n,u);let l=Object.getOwnPropertyNames(u),c=e.additionalProperties,d=x({},u);for(let h of l)a.test(h)||(d[h]=dt(c,"".concat(n,"/").concat(h),d[h]));return dt(e,n,d)}o(P3,"FromRecord");function R3(e,t,n,i,r){let s=eo(e,t);return dt(e,n,Pr(s,t,n,i,r))}o(R3,"FromRef");function C3(e,t,n,i,r){let s=eo(e,t);return dt(e,n,Pr(s,t,n,i,r))}o(C3,"FromThis");function O3(e,t,n,i,r){return be.IsArray(i)&&be.IsArray(e.items)?dt(e,n,e.items.map((s,a)=>Pr(s,t,"".concat(n,"/").concat(a),i[a],r))):dt(e,n,i)}o(O3,"FromTuple");function U3(e,t,n,i,r){for(let s of e.anyOf){if(!Zn.Check(s,t,i))continue;let a=Pr(s,t,n,i,r);return dt(e,n,a)}return dt(e,n,i)}o(U3,"FromUnion");function Pr(e,t,n,i,r){if(!r.HasTransform(e,t))return i;let s=Bl(e,t),a=e;switch(e[P]){case"Array":return M3(a,s,n,i,r);case"Intersect":return E3(a,s,n,i,r);case"Not":return T3(a,s,n,i,r);case"Object":return A3(a,s,n,i,r);case"Record":return P3(a,s,n,i,r);case"Ref":return R3(a,s,n,i,r);case"Symbol":return dt(a,n,i);case"This":return C3(a,s,n,i,r);case"Tuple":return O3(a,s,n,i,r);case"Union":return U3(a,s,n,i,r);default:return dt(a,n,i)}}o(Pr,"Visit");function Ow(e,t,n){let i=Vl();return Pr(e,t,"",n,i)}o(Ow,"FastTransformDecode");f();function Jt(e,t,n){try{return _.IsTransform(e)?e[ot].Encode(n):n}catch(i){throw new Yi(e,t,n,i)}}o(Jt,"Default");function N3(e,t,n,i,r){let s=Jt(e,n,i);return be.IsArray(s)?s.map((a,u)=>Rr(e.items,t,"".concat(n,"/").concat(u),a,r)):s}o(N3,"FromArray");function F3(e,t,n,i,r){let s=Jt(e,n,i);if(!be.IsObject(i)||Nt(i))return s;let a=Ei(e),u=a.map(m=>m[0]),l=x({},s);for(let[m,y]of a)m in l&&(l[m]=Rr(y,t,"".concat(n,"/").concat(m),l[m],r));if(!_.IsTransform(e.unevaluatedProperties))return l;let c=Object.getOwnPropertyNames(l),d=e.unevaluatedProperties,h=x({},l);for(let m of c)u.includes(m)||(h[m]=Jt(d,"".concat(n,"/").concat(m),h[m]));return h}o(F3,"FromIntersect");function k3(e,t,n,i){return Jt(e.not,n,Jt(e,n,i))}o(k3,"FromNot");function D3(e,t,n,i,r){let s=Jt(e,n,i);if(!be.IsObject(s))return s;let a=Pt(e),u=x({},s);for(let h of a)be.HasPropertyKey(u,h)&&(be.IsUndefined(u[h])&&(!_.IsUndefined(e.properties[h])||Le.IsExactOptionalProperty(u,h))||(u[h]=Rr(e.properties[h],t,"".concat(n,"/").concat(h),u[h],r)));if(!_.IsSchema(e.additionalProperties))return u;let l=Object.getOwnPropertyNames(u),c=e.additionalProperties,d=x({},u);for(let h of l)a.includes(h)||(d[h]=Jt(c,"".concat(n,"/").concat(h),d[h]));return d}o(D3,"FromObject");function L3(e,t,n,i,r){let s=Jt(e,n,i);if(!be.IsObject(i))return s;let a=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(a),l=x({},s);for(let m of Object.getOwnPropertyNames(i))u.test(m)&&(l[m]=Rr(e.patternProperties[a],t,"".concat(n,"/").concat(m),l[m],r));if(!_.IsSchema(e.additionalProperties))return l;let c=Object.getOwnPropertyNames(l),d=e.additionalProperties,h=x({},l);for(let m of c)u.test(m)||(h[m]=Jt(d,"".concat(n,"/").concat(m),h[m]));return h}o(L3,"FromRecord");function $3(e,t,n,i,r){let s=eo(e,t),a=Rr(s,t,n,i,r);return Jt(e,n,a)}o($3,"FromRef");function z3(e,t,n,i,r){let s=eo(e,t),a=Rr(s,t,n,i,r);return Jt(e,n,a)}o(z3,"FromThis");function B3(e,t,n,i,r){let s=Jt(e,n,i);return be.IsArray(e.items)?e.items.map((a,u)=>Rr(a,t,"".concat(n,"/").concat(u),s[u],r)):[]}o(B3,"FromTuple");function V3(e,t,n,i,r){for(let s of e.anyOf){if(!Zn.Check(s,t,i))continue;let a=Rr(s,t,n,i,r);return Jt(e,n,a)}for(let s of e.anyOf){let a=Rr(s,t,n,i,r);if(Zn.Check(e,t,a))return Jt(e,n,a)}return Jt(e,n,i)}o(V3,"FromUnion");function Rr(e,t,n,i,r){if(!r.HasTransform(e,t))return i;let s=Bl(e,t),a=e;switch(e[P]){case"Array":return N3(a,s,n,i,r);case"Intersect":return F3(a,s,n,i,r);case"Not":return k3(a,s,n,i);case"Object":return D3(a,s,n,i,r);case"Record":return L3(a,s,n,i,r);case"Ref":return $3(a,s,n,i,r);case"This":return z3(a,s,n,i,r);case"Tuple":return B3(a,s,n,i,r);case"Union":return V3(a,s,n,i,r);default:return Jt(a,n,i)}}o(Rr,"Visit");function Uw(e,t,n){let i=Vl();return Rr(e,t,"",n,i)}o(Uw,"FastTransformEncode");f();var bv=class bv{constructor(t,n,i,r){this.schema=t,this.references=n,this.checkFunc=i,this.code=r,this.hasTransform=Tr(t,n)}Code(){return this.code}Errors(t){return Sr(this.schema,this.references,t)}Check(t){return this.checkFunc(t)}Decode(t){if(!this.checkFunc(t))throw new ns(this.schema,t,this.Errors(t).First());return this.hasTransform?rs(this.schema,this.references,t):t}Encode(t){let n=this.hasTransform?xl(this.schema,this.references,t):t;if(!this.checkFunc(n))throw new is(this.schema,t,this.Errors(t).First());return n}};o(bv,"TypeCheck");var yv=bv,ri;(function(e){function t(s){return s===36}o(t,"DollarSign"),e.DollarSign=t;function n(s){return s===95}o(n,"IsUnderscore"),e.IsUnderscore=n;function i(s){return s>=65&&s<=90||s>=97&&s<=122}o(i,"IsAlpha"),e.IsAlpha=i;function r(s){return s>=48&&s<=57}o(r,"IsNumeric"),e.IsNumeric=r})(ri||(ri={}));var jl;(function(e){function t(s){return s.length===0?!1:ri.IsNumeric(s.charCodeAt(0))}o(t,"IsFirstCharacterNumeric");function n(s){if(t(s))return!1;for(let a=0;a<s.length;a++){let u=s.charCodeAt(a);if(!(ri.IsAlpha(u)||ri.IsNumeric(u)||ri.DollarSign(u)||ri.IsUnderscore(u)))return!1}return!0}o(n,"IsAccessor");function i(s){return s.replace(/'/g,"\\'")}o(i,"EscapeHyphen");function r(s,a){return n(a)?"".concat(s,".").concat(a):"".concat(s,"['").concat(i(a),"']")}o(r,"Encode"),e.Encode=r})(jl||(jl={}));var xv;(function(e){function t(n){let i=[];for(let r=0;r<n.length;r++){let s=n.charCodeAt(r);ri.IsNumeric(s)||ri.IsAlpha(s)?i.push(n.charAt(r)):i.push("_".concat(s,"_"))}return i.join("").replace(/__/g,"_")}o(t,"Encode"),e.Encode=t})(xv||(xv={}));var vv;(function(e){function t(n){return n.replace(/'/g,"\\'")}o(t,"Escape"),e.Escape=t})(vv||(vv={}));var Sv=class Sv extends re{constructor(t){super("Unknown type"),this.schema=t}};o(Sv,"TypeCompilerUnknownTypeError");var _v=Sv,Iv=class Iv extends re{constructor(t){super("Preflight validation check failed to guard for the given schema"),this.schema=t}};o(Iv,"TypeCompilerTypeGuardError");var Gl=Iv,to;(function(e){function t(a,u,l){return Le.ExactOptionalPropertyTypes?"('".concat(u,"' in ").concat(a," ? ").concat(l," : true)"):"(".concat(jl.Encode(a,u)," !== undefined ? ").concat(l," : true)")}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function n(a){return Le.AllowArrayObject?"(typeof ".concat(a," === 'object' && ").concat(a," !== null)"):"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !Array.isArray(").concat(a,"))")}o(n,"IsObjectLike"),e.IsObjectLike=n;function i(a){return Le.AllowArrayObject?"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !(").concat(a," instanceof Date) && !(").concat(a," instanceof Uint8Array))"):"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !Array.isArray(").concat(a,") && !(").concat(a," instanceof Date) && !(").concat(a," instanceof Uint8Array))")}o(i,"IsRecordLike"),e.IsRecordLike=i;function r(a){return Le.AllowNaN?"typeof ".concat(a," === 'number'"):"Number.isFinite(".concat(a,")")}o(r,"IsNumberLike"),e.IsNumberLike=r;function s(a){return Le.AllowNullVoid?"(".concat(a," === undefined || ").concat(a," === null)"):"".concat(a," === undefined")}o(s,"IsVoidLike"),e.IsVoidLike=s})(to||(to={}));var Hl;(function(e){function t(b){return b[P]==="Any"||b[P]==="Unknown"}o(t,"IsAnyOrUnknown");function*n(b,X,E){yield"true"}o(n,"FromAny");function*i(b,X,E){yield"Array.isArray(".concat(E,")");let[te,q]=[At("value","any"),At("acc","number")];ee(b.maxItems)&&(yield"".concat(E,".length <= ").concat(b.maxItems)),ee(b.minItems)&&(yield"".concat(E,".length >= ").concat(b.minItems));let Q=Me(b.items,X,"value");if(yield"".concat(E,".every((").concat(te,") => ").concat(Q,")"),Ie(b.contains)||ee(b.minContains)||ee(b.maxContains)){let nt=Ie(b.contains)?b.contains:Be(),Qt=Me(nt,X,"value"),Ur=ee(b.minContains)?["(count >= ".concat(b.minContains,")")]:[],Jn=ee(b.maxContains)?["(count <= ".concat(b.maxContains,")")]:[],dr="const count = value.reduce((".concat(q,", ").concat(te,") => ").concat(Qt," ? acc + 1 : acc, 0)"),ac=["(count > 0)",...Ur,...Jn].join(" && ");yield"((".concat(te,") => { ").concat(dr,"; return ").concat(ac,"})(").concat(E,")")}if(b.uniqueItems===!0){let Qt="const set = new Set(); for(const element of value) { ".concat("const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true"," }");yield"((".concat(te,") => { ").concat(Qt," )(").concat(E,")")}}o(i,"FromArray");function*r(b,X,E){yield"(typeof value === 'object' && Symbol.asyncIterator in ".concat(E,")")}o(r,"FromAsyncIterator");function*s(b,X,E){yield"(typeof ".concat(E," === 'bigint')"),Ut(b.exclusiveMaximum)&&(yield"".concat(E," < BigInt(").concat(b.exclusiveMaximum,")")),Ut(b.exclusiveMinimum)&&(yield"".concat(E," > BigInt(").concat(b.exclusiveMinimum,")")),Ut(b.maximum)&&(yield"".concat(E," <= BigInt(").concat(b.maximum,")")),Ut(b.minimum)&&(yield"".concat(E," >= BigInt(").concat(b.minimum,")")),Ut(b.multipleOf)&&(yield"(".concat(E," % BigInt(").concat(b.multipleOf,")) === 0"))}o(s,"FromBigInt");function*a(b,X,E){yield"(typeof ".concat(E," === 'boolean')")}o(a,"FromBoolean");function*u(b,X,E){yield*k(le(b.returns,X,"".concat(E,".prototype")))}o(u,"FromConstructor");function*l(b,X,E){yield"(".concat(E," instanceof Date) && Number.isFinite(").concat(E,".getTime())"),ee(b.exclusiveMaximumTimestamp)&&(yield"".concat(E,".getTime() < ").concat(b.exclusiveMaximumTimestamp)),ee(b.exclusiveMinimumTimestamp)&&(yield"".concat(E,".getTime() > ").concat(b.exclusiveMinimumTimestamp)),ee(b.maximumTimestamp)&&(yield"".concat(E,".getTime() <= ").concat(b.maximumTimestamp)),ee(b.minimumTimestamp)&&(yield"".concat(E,".getTime() >= ").concat(b.minimumTimestamp)),ee(b.multipleOfTimestamp)&&(yield"(".concat(E,".getTime() % ").concat(b.multipleOfTimestamp,") === 0"))}o(l,"FromDate");function*c(b,X,E){yield"(typeof ".concat(E," === 'function')")}o(c,"FromFunction");function*d(b,X,E){yield"Number.isInteger(".concat(E,")"),ee(b.exclusiveMaximum)&&(yield"".concat(E," < ").concat(b.exclusiveMaximum)),ee(b.exclusiveMinimum)&&(yield"".concat(E," > ").concat(b.exclusiveMinimum)),ee(b.maximum)&&(yield"".concat(E," <= ").concat(b.maximum)),ee(b.minimum)&&(yield"".concat(E," >= ").concat(b.minimum)),ee(b.multipleOf)&&(yield"(".concat(E," % ").concat(b.multipleOf,") === 0"))}o(d,"FromInteger");function*h(b,X,E){let te=b.allOf.map(q=>Me(q,X,E)).join(" && ");if(b.unevaluatedProperties===!1){let q=Bt("".concat(new RegExp(Kr(b)),";")),Q="Object.getOwnPropertyNames(".concat(E,").every(key => ").concat(q,".test(key))");yield"(".concat(te," && ").concat(Q,")")}else if(Ie(b.unevaluatedProperties)){let q=Bt("".concat(new RegExp(Kr(b)),";")),Q="Object.getOwnPropertyNames(".concat(E,").every(key => ").concat(q,".test(key) || ").concat(Me(b.unevaluatedProperties,X,"".concat(E,"[key]")),")");yield"(".concat(te," && ").concat(Q,")")}else yield"(".concat(te,")")}o(h,"FromIntersect");function*m(b,X,E){yield"(typeof value === 'object' && Symbol.iterator in ".concat(E,")")}o(m,"FromIterator");function*y(b,X,E){typeof b.const=="number"||typeof b.const=="boolean"?yield"(".concat(E," === ").concat(b.const,")"):yield"(".concat(E," === '").concat(vv.Escape(b.const),"')")}o(y,"FromLiteral");function*v(b,X,E){yield"false"}o(v,"FromNever");function*I(b,X,E){let te=Me(b.not,X,E);yield"(!".concat(te,")")}o(I,"FromNot");function*T(b,X,E){yield"(".concat(E," === null)")}o(T,"FromNull");function*U(b,X,E){yield to.IsNumberLike(E),ee(b.exclusiveMaximum)&&(yield"".concat(E," < ").concat(b.exclusiveMaximum)),ee(b.exclusiveMinimum)&&(yield"".concat(E," > ").concat(b.exclusiveMinimum)),ee(b.maximum)&&(yield"".concat(E," <= ").concat(b.maximum)),ee(b.minimum)&&(yield"".concat(E," >= ").concat(b.minimum)),ee(b.multipleOf)&&(yield"(".concat(E," % ").concat(b.multipleOf,") === 0"))}o(U,"FromNumber");function*D(b,X,E){yield to.IsObjectLike(E),ee(b.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(E,").length >= ").concat(b.minProperties)),ee(b.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(E,").length <= ").concat(b.maxProperties));let te=Object.getOwnPropertyNames(b.properties);for(let q of te){let Q=jl.Encode(E,q),nt=b.properties[q];if(b.required&&b.required.includes(q))yield*k(le(nt,X,Q)),(Yr(nt)||t(nt))&&(yield"('".concat(q,"' in ").concat(E,")"));else{let Qt=Me(nt,X,Q);yield to.IsExactOptionalProperty(E,q,Qt)}}if(b.additionalProperties===!1)if(b.required&&b.required.length===te.length)yield"Object.getOwnPropertyNames(".concat(E,").length === ").concat(te.length);else{let q="[".concat(te.map(Q=>"'".concat(Q,"'")).join(", "),"]");yield"Object.getOwnPropertyNames(".concat(E,").every(key => ").concat(q,".includes(key))")}if(typeof b.additionalProperties=="object"){let q=Me(b.additionalProperties,X,"".concat(E,"[key]")),Q="[".concat(te.map(nt=>"'".concat(nt,"'")).join(", "),"]");yield"(Object.getOwnPropertyNames(".concat(E,").every(key => ").concat(Q,".includes(key) || ").concat(q,"))")}}o(D,"FromObject");function*w(b,X,E){yield"(typeof value === 'object' && typeof ".concat(E,".then === 'function')")}o(w,"FromPromise");function*S(b,X,E){yield to.IsRecordLike(E),ee(b.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(E,").length >= ").concat(b.minProperties)),ee(b.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(E,").length <= ").concat(b.maxProperties));let[te,q]=Object.entries(b.patternProperties)[0],Q=Bt("".concat(new RegExp(te))),nt=Me(q,X,"value"),Qt=Ie(b.additionalProperties)?Me(b.additionalProperties,X,E):b.additionalProperties===!1?"false":"true",Ur="(".concat(Q,".test(key) ? ").concat(nt," : ").concat(Qt,")");yield"(Object.entries(".concat(E,").every(([key, value]) => ").concat(Ur,"))")}o(S,"FromRecord");function*A(b,X,E){let te=Ae(b,X);if(oe.functions.has(b.$ref))return yield"".concat(pt(b.$ref),"(").concat(E,")");yield*k(le(te,X,E))}o(A,"FromRef");function*j(b,X,E){let te=Bt("".concat(new RegExp(b.source,b.flags),";"));yield"(typeof ".concat(E," === 'string')"),ee(b.maxLength)&&(yield"".concat(E,".length <= ").concat(b.maxLength)),ee(b.minLength)&&(yield"".concat(E,".length >= ").concat(b.minLength)),yield"".concat(te,".test(").concat(E,")")}o(j,"FromRegExp");function*F(b,X,E){if(yield"(typeof ".concat(E," === 'string')"),ee(b.maxLength)&&(yield"".concat(E,".length <= ").concat(b.maxLength)),ee(b.minLength)&&(yield"".concat(E,".length >= ").concat(b.minLength)),b.pattern!==void 0){let te=Bt("".concat(new RegExp(b.pattern),";"));yield"".concat(te,".test(").concat(E,")")}b.format!==void 0&&(yield"format('".concat(b.format,"', ").concat(E,")"))}o(F,"FromString");function*H(b,X,E){yield"(typeof ".concat(E," === 'symbol')")}o(H,"FromSymbol");function*G(b,X,E){yield"(typeof ".concat(E," === 'string')");let te=Bt("".concat(new RegExp(b.pattern),";"));yield"".concat(te,".test(").concat(E,")")}o(G,"FromTemplateLiteral");function*ce(b,X,E){yield"".concat(pt(b.$ref),"(").concat(E,")")}o(ce,"FromThis");function*ue(b,X,E){if(yield"Array.isArray(".concat(E,")"),b.items===void 0)return yield"".concat(E,".length === 0");yield"(".concat(E,".length === ").concat(b.maxItems,")");for(let te=0;te<b.items.length;te++){let q=Me(b.items[te],X,"".concat(E,"[").concat(te,"]"));yield"".concat(q)}}o(ue,"FromTuple");function*he(b,X,E){yield"".concat(E," === undefined")}o(he,"FromUndefined");function*Ge(b,X,E){let te=b.anyOf.map(q=>Me(q,X,E));yield"(".concat(te.join(" || "),")")}o(Ge,"FromUnion");function*Oe(b,X,E){yield"".concat(E," instanceof Uint8Array"),ee(b.maxByteLength)&&(yield"(".concat(E,".length <= ").concat(b.maxByteLength,")")),ee(b.minByteLength)&&(yield"(".concat(E,".length >= ").concat(b.minByteLength,")"))}o(Oe,"FromUint8Array");function*Ue(b,X,E){yield"true"}o(Ue,"FromUnknown");function*V(b,X,E){yield to.IsVoidLike(E)}o(V,"FromVoid");function*ne(b,X,E){let te=oe.instances.size;oe.instances.set(te,b),yield"kind('".concat(b[P],"', ").concat(te,", ").concat(E,")")}o(ne,"FromKind");function*le(b,X,E,te=!0){let q=Se(b.$id)?[...X,b]:X,Q=b;if(te&&Se(b.$id)){let nt=pt(b.$id);if(oe.functions.has(nt))return yield"".concat(nt,"(").concat(E,")");{let Qt=Vt(nt,b,X,"value",!1);return oe.functions.set(nt,Qt),yield"".concat(nt,"(").concat(E,")")}}switch(Q[P]){case"Any":return yield*k(n(Q,q,E));case"Array":return yield*k(i(Q,q,E));case"AsyncIterator":return yield*k(r(Q,q,E));case"BigInt":return yield*k(s(Q,q,E));case"Boolean":return yield*k(a(Q,q,E));case"Constructor":return yield*k(u(Q,q,E));case"Date":return yield*k(l(Q,q,E));case"Function":return yield*k(c(Q,q,E));case"Integer":return yield*k(d(Q,q,E));case"Intersect":return yield*k(h(Q,q,E));case"Iterator":return yield*k(m(Q,q,E));case"Literal":return yield*k(y(Q,q,E));case"Never":return yield*k(v(Q,q,E));case"Not":return yield*k(I(Q,q,E));case"Null":return yield*k(T(Q,q,E));case"Number":return yield*k(U(Q,q,E));case"Object":return yield*k(D(Q,q,E));case"Promise":return yield*k(w(Q,q,E));case"Record":return yield*k(S(Q,q,E));case"Ref":return yield*k(A(Q,q,E));case"RegExp":return yield*k(j(Q,q,E));case"String":return yield*k(F(Q,q,E));case"Symbol":return yield*k(H(Q,q,E));case"TemplateLiteral":return yield*k(G(Q,q,E));case"This":return yield*k(ce(Q,q,E));case"Tuple":return yield*k(ue(Q,q,E));case"Undefined":return yield*k(he(Q,q,E));case"Union":return yield*k(Ge(Q,q,E));case"Uint8Array":return yield*k(Oe(Q,q,E));case"Unknown":return yield*k(Ue(Q,q,E));case"Void":return yield*k(V(Q,q,E));default:if(!Et.Has(Q[P]))throw new _v(b);return yield*k(ne(Q,q,E))}}o(le,"Visit");let oe={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function Me(b,X,E,te=!0){return"(".concat([...le(b,X,E,te)].join(" && "),")")}o(Me,"CreateExpression");function pt(b){return"check_".concat(xv.Encode(b))}o(pt,"CreateFunctionName");function Bt(b){let X="local_".concat(oe.variables.size);return oe.variables.set(X,"const ".concat(X," = ").concat(b)),X}o(Bt,"CreateVariable");function Vt(b,X,E,te,q=!0){let[Q,nt]=["\n",dr=>"".padStart(dr," ")],Qt=At("value","any"),Ur=tt("boolean"),Jn=[...le(X,E,te,q)].map(dr=>"".concat(nt(4)).concat(dr)).join(" &&".concat(Q));return"function ".concat(b,"(").concat(Qt,")").concat(Ur," {").concat(Q).concat(nt(2),"return (").concat(Q).concat(Jn).concat(Q).concat(nt(2),")\n}")}o(Vt,"CreateFunction");function At(b,X){let E=oe.language==="typescript"?": ".concat(X):"";return"".concat(b).concat(E)}o(At,"CreateParameter");function tt(b){return oe.language==="typescript"?": ".concat(b):""}o(tt,"CreateReturns");function On(b,X,E){let te=Vt("check",b,X,"value"),q=At("value","any"),Q=tt("boolean"),nt=[...oe.functions.values()],Qt=[...oe.variables.values()],Ur=Se(b.$id)?"return function check(".concat(q,")").concat(Q," {\n return ").concat(pt(b.$id),"(value)\n}"):"return ".concat(te);return[...Qt,...nt,Ur].join("\n")}o(On,"Build");function Or(...b){let X={language:"javascript"},[E,te,q]=b.length===2&&ae(b[1])?[b[0],b[1],X]:b.length===2&&!ae(b[1])?[b[0],[],b[1]]:b.length===3?[b[0],b[1],b[2]]:b.length===1?[b[0],[],X]:[null,[],X];if(oe.language=q.language,oe.variables.clear(),oe.functions.clear(),oe.instances.clear(),!Ie(E))throw new Gl(E);for(let Q of te)if(!Ie(Q))throw new Gl(Q);return On(E,te,q)}o(Or,"Code"),e.Code=Or;function ai(b,X=[]){let E=Or(b,X,{language:"javascript"}),te=globalThis.Function("kind","format","hash",E),q=new Map(oe.instances);function Q(Jn,dr,ac){if(!Et.Has(Jn)||!q.has(dr))return!1;let QE=Et.Get(Jn),eT=q.get(dr);return QE(eT,ac)}o(Q,"typeRegistryFunction");function nt(Jn,dr){return on.Has(Jn)?on.Get(Jn)(dr):!1}o(nt,"formatRegistryFunction");function Qt(Jn){return Pi(Jn)}o(Qt,"hashFunction");let Ur=te(Q,nt,Qt);return new yv(b,X,Ur,E)}o(ai,"Compile"),e.Compile=ai})(Hl||(Hl={}));f();f();f();var j3=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,G3=[0,31,28,31,30,31,30,31,31,30,31,30,31],H3=o(e=>e%4===0&&(e%100!==0||e%400===0),"isLeapYear"),Wl=o(e=>{let t=j3.exec(e);if(!t)return!1;let n=+t[1],i=+t[2],r=+t[3];return i>=1&&i<=12&&r>=1&&r<=(i===2&&H3(n)?29:G3[i])},"isDate");f();var W3=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i,Zl=o(e=>{let t=W3.exec(e);if(!t)return!1;let n=+t[1],i=+t[2],r=+t[3],s=t[4],a=t[5]==="-"?-1:1,u=+(t[6]||0),l=+(t[7]||0);if(u>23||l>59||!s)return!1;if(n<=23&&i<=59&&r<60)return!0;let c=i-l*a,d=n-u*a-(c<0?1:0);return(d===23||d===-1)&&(c===59||c===-1)&&r<61},"isTime");var Z3=/t|\s/i,Nw=o(e=>{let t=e.split(Z3);return t.length===2&&Wl(t[0])&&Zl(t[1])},"isDateTime");f();var X3=/\/|:/,q3=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Fw=o(e=>X3.test(e)&&q3.test(e),"isUri");var K3=[["date",Wl],["time",Zl],["date-time",Nw],["uri",Fw]],kw=o(()=>{for(let[e,t]of K3)try{fl.Format(e,t)}catch(n){if(n instanceof ja)continue;throw n}},"registerFormats");f();var wv=p.Record(p.String(),p.Unknown(),{$id:"Extra"}),ur=p.Object({extra:p.Optional(p.Ref(wv))}),Mv=[wv];f();f();f();f();f();f();var Yt=o(e=>Object.entries(e),"typedEntries");var J3=o(e=>{var n;let t=new Map;for(let[i,r]of Yt((n=e.geometry)!=null?n:{}))t.set(i,new Map(r==null?void 0:r.features.map(s=>[s.properties.id,s])));return t},"createLookupMap"),Tt=o(e=>{let t=J3(e);return o((i,r)=>{let s=t.get(i);if(s==null)return Y({kind:gn.UnknownFloorError,properties:{floorId:i}});let a=s.get(r);return a==null?Y({kind:gn.UnknownGeometryError,properties:{floorId:i,geometryId:r}}):J(a)},"geometryLookup")},"createGeometryLookup");f();var Kn=p.Object({geometryId:p.Ref(Xt)},{$id:"WithGeometryId"}),ms=p.Object({geometryIds:p.Array(p.Ref(Xt))},{$id:"WithGeometryIds"}),Ev=[Kn,ms];f();f();f();var Dw=o(e=>e instanceof Error?e:new Error(String(e)),"asError");var gs=o(e=>(...t)=>{try{return J(e(...t))}catch(n){return Y(Dw(n))}},"safeFn");var Lw=gs((e,t)=>{let n={};for(let i of t)for(let r of i.intoBundle(e))n[r.path]=cs(JSON.stringify(r.contents));return n}),Tv=o(async(e,t,n)=>Lw(e,t).andThenAsync(i=>new Promise(r=>{pw(i,L(x({},n),{consume:!0}),(s,a)=>{r(s?Y(s):J(a))})})),"compress"),Y3=gs(hw),Av=o((e,t,n)=>Lw(e,t).andThen(i=>Y3(i,n)),"compressSync");f();f();function Xl(e,t,n=[]){let i=x({},e);for(let[r,s]of Object.entries(t))if(s!==void 0)if(r in i){let a=r;if(Array.isArray(s)&&s.length>0){let u=Q3(s[0],n);if(u){let l=i[a];if(!Array.isArray(l))throw new Error("Expected array at ".concat(r,", got ").concat(typeof l));let c=new Map(s.map(m=>[$w(m,u),m])),h=l.map(m=>{let y=c.get($w(m,u));return y?Xl(m,y,n):m});i[a]=h}else i[a]=s}else{let u=i[a];typeof u=="object"&&u!==null&&typeof s=="object"&&s!==null?Object.keys(s).length===0?i[a]=s:i[a]=Xl(u,s,n):i[r]=s}}else i[r]=s;return i}o(Xl,"deepMergeOn");function Q3(e,t){function n(i){if(typeof i!="object"||i===null)return null;for(let r of t)if(r in i&&typeof i[r]<"u")return[r];if(Array.isArray(i))return null;for(let[r,s]of Object.entries(i)){let a=n(s);if(a)return[r,...a]}return null}return o(n,"search"),n(e)}o(Q3,"findIdentifierKey");function $w(e,t){return t.reduce((n,i)=>{if(n&&typeof n=="object")return n[i]},e)}o($w,"getValueByKeyPath");var eB=o(e=>e,"identity"),tB=o(e=>JSON.parse(fv(e)),"jsonDecode"),zw=o((e,t)=>t.some(n=>n.fromBundle(e.name,new Uint8Array,eB)!==void 0),"isFileExpected"),Bw=gs((e,t)=>{let n={};for(let i of Object.keys(e)){let r=e[i];for(let s of t){let a=s.fromBundle(i,r,tB);if(a){n=Xl(n,a,[]);break}}}return n}),Pv=o(async(e,t)=>new Promise(n=>mw(e,{filter:o(i=>zw(i,t),"filter")},(i,r)=>{n(i?Y(i):J(r))})).then(n=>n.andThen(i=>Bw(i,t))),"decompress"),nB=gs(gw),Rv=o((e,t)=>nB(e,{filter:o(n=>zw(n,t),"filter")}).andThen(n=>Bw(n,t)),"decompressSync");f();var rB=o(e=>typeof e=="object"&&e!=null&&"$ref"in e&&typeof e.$ref=="string","isRef"),iB=o(e=>{if(e.length<2)return!1;let t=e.filter(rB);if(t.length!==e.length)return!1;let n=t[0].$ref;return t.slice(1).every(i=>i.$ref===n)},"isDuplicateRef"),ql=o(e=>typeof e=="object"&&e!=null&&"allOf"in e&&Array.isArray(e.allOf)&&iB(e.allOf)?e.allOf[0]:typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,n])=>[t,ql(n)])):Array.isArray(e)?e.map(ql):e,"fixDuplicateAllOf");f();var Kl=o(e=>typeof e=="object"&&e!=null&&"$ref"in e?L(x({},e),{$ref:"#/definitions/".concat(e.$ref)}):typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,n])=>[t,Kl(n)])):Array.isArray(e)?e.map(Kl):e,"prefixReferences");var ys;(function(e){e.InvalidTypeboxSchema="InvalidTypeboxSchema",e.MissingReferenceId="MissingReferenceId",e.DuplicateReferenceId="DuplicateReferenceId",e.TypeboxError="TypeboxError",e.UnknownError="UnknownError"})(ys||(ys={}));var oB=o(e=>({next(){for(let n of e){let i=n.next();if(!i.done)return i}return{done:!0,value:void 0}},[Symbol.iterator](){return this}}),"join"),sB=o((...e)=>{let t=new Map;for(let n of oB(e)){if(!n.$id)continue;let i=t.get(n.$id);if(i!=null&&i!==n)return Y({kind:ys.DuplicateReferenceId,message:"Failed to register a reference for a schema with an $id that has already been used",schema:n});t.set(n.$id,n)}return J(t)},"computeReferenceMap"),Ct,xs,Rn,zt,Yl=class Yl{constructor(t,n,i,r){It(this,Ct);It(this,xs);It(this,Rn,[]);It(this,zt);Ot(this,Ct,t),Ot(this,xs,n),Ot(this,Rn,i),Ot(this,zt,r),this.is=this.is.bind(this),this.parse=this.parse.bind(this),this.verify=this.verify.bind(this),this.jsonSchema=this.jsonSchema.bind(this),this.compress=this.compress.bind(this),this.decompress=this.decompress.bind(this)}static create(t,n="CoreMVF",i=!1){let r=p.Composite(t.extensions.map(a=>a.schema),{$id:n});if(!_.IsSchema(r))return Y({kind:ys.InvalidTypeboxSchema,message:"Attempting to merge schemas produced an invalid schema",schema:r});let s=sB(xx.values(),vx.values(),gx.values(),Mv.values(),Cv.values(),Ev.values(),t.extensions.flatMap(a=>{var u;return(u=a.references)!=null?u:[]}).values());if(!s.isOk())return s;try{kw();let a=i?null:Hl.Compile(r,[...s.value.values()]);return J(new Yl(r,a,t.extensions,s.value))}catch(a){return a instanceof re?Y({kind:ys.TypeboxError,message:a.message,original:a}):Y({kind:ys.UnknownError,message:"An unknown error occurred while compiling the schema",original:a})}}is(t){var n,i;return(i=(n=W(this,xs))==null?void 0:n.Check(t))!=null?i:Zn.Check(W(this,Ct),[...W(this,zt).values()],t)}parse(t){var n,i;return this.is(t)?J(t):Y((i=(n=W(this,xs))==null?void 0:n.Errors(t))!=null?i:Zn.Errors(W(this,Ct),[...W(this,zt).values()],t))}decode(t){try{return J(Ow(W(this,Ct),[...W(this,zt).values()],t))}catch(n){return Y(n)}}encode(t){try{return J(Uw(W(this,Ct),[...W(this,zt).values()],t))}catch(n){return Y(n)}}verify(t){for(let n of W(this,Rn))if(n.integrityCheck){let i=n.integrityCheck(t);if(i.isErr())return Y(i.error)}return J(!0)}jsonSchema(){var i;let t=JSON.parse(JSON.stringify([W(this,Ct),...W(this,zt).values()])),n=ql(Kl({$id:"#/definitions/".concat((i=W(this,Ct).$id)!=null?i:"CoreMVF"),$schema:"http://json-schema.org/draft-07/schema#",references:t}));return JSON.stringify(n,null,2)}async compress(t){return this.encode(t).andThen(n=>this.parse(n)).andThenAsync(n=>Tv(n,W(this,Rn))).then(n=>n.mapErr(i=>{var r;return Ya((r=W(this,Ct).$id)!=null?r:"CoreMVF",i,[...W(this,zt).values()])}))}async compressUnsafe(t){return this.encode(t).andThenAsync(n=>Tv(n,W(this,Rn))).then(n=>n.mapErr(i=>{var r;return Ya((r=W(this,Ct).$id)!=null?r:"CoreMVF",i,[...W(this,zt).values()])}))}compressSync(t){return this.encode(t).andThen(n=>this.parse(n)).andThen(n=>Av(n,W(this,Rn))).mapErr(n=>{var i;return Ya((i=W(this,Ct).$id)!=null?i:"CoreMVF",n,[...W(this,zt).values()])})}compressUnsafeSync(t){return this.encode(t).andThen(n=>Av(n,W(this,Rn))).mapErr(n=>{var i;return Ya((i=W(this,Ct).$id)!=null?i:"CoreMVF",n,[...W(this,zt).values()])})}async decompress(t){return Pv(t,W(this,Rn)).then(n=>n.andThen(i=>this.parse(i)).andThen(i=>this.decode(i)).mapErr(i=>{var r;return Qa((r=W(this,Ct).$id)!=null?r:"CoreMVF",i,[...W(this,zt).values()])}))}async decompressUnsafe(t){return Pv(t,W(this,Rn)).then(n=>n.andThen(i=>this.decode(i)).mapErr(i=>{var r;return Qa((r=W(this,Ct).$id)!=null?r:"CoreMVF",i,[...W(this,zt).values()])}))}decompressSync(t){return Rv(t,W(this,Rn)).andThen(n=>this.parse(n)).andThen(n=>this.decode(n)).mapErr(n=>{var i;return Qa((i=W(this,Ct).$id)!=null?i:"CoreMVF",n,[...W(this,zt).values()])})}decompressUnsafeSync(t){return Rv(t,W(this,Rn)).andThen(n=>this.decode(n)).mapErr(n=>{var i;return Qa((i=W(this,Ct).$id)!=null?i:"CoreMVF",n,[...W(this,zt).values()])})}};Ct=new WeakMap,xs=new WeakMap,Rn=new WeakMap,zt=new WeakMap,o(Yl,"MVFParser");var Jl=Yl;var vs,Ov=class Ov{constructor(){It(this,vs,[]);this.extend=this.extend.bind(this)}extend(t){return W(this,vs).push(t),this}extendOptional(t){let n=L(x({},t),{schema:p.Partial(t.schema)});return W(this,vs).push(n),this}build(t){return Jl.create(this,void 0,t==null?void 0:t.cspSafe)}get extensions(){return W(this,vs)}};vs=new WeakMap,o(Ov,"MVFParserBuilder");var Ql=Ov;f();f();f();f();var _s=p.Object({geometryId:p.Ref(Xt),floorId:p.Ref(_e)},{$id:"GeometryAnchor"}),aB=p.Object({geometryAnchor:p.Ref(_s)}),ec=o((e,t)=>p.Object({geometryAnchors:p.Array(p.Ref(_s),e)},t),"WithGeometryAnchors"),Cv=[_s];f();f();f();var Vw=o((e,t)=>p.Unsafe(p.Transform(p.String(t)).Decode(n=>e.includes(n)?n:"unknown").Encode(n=>n)),"SafeStringEnumSchema"),yn=o((e,t)=>{let n=Vw(e,t),i=[...e,"unknown"],r=Object.freeze(Object.fromEntries([...e,"unknown"].map(s=>[s,s])));return{schema:n,values:i,record:r}},"SafeStringEnum");var jw=o(()=>new Ql().extend(Sw).extend(Tw).extend(Cw),"createParser");f();f();f();f();f();f();var tc;(function(e){e.AnnotationNonPointGeometryError="AnnotationNonPointGeometryError",e.AnnotationUnknownSymbolError="AnnotationUnknownSymbolError"})(tc||(tc={}));var Gw=o(e=>{var r;if(e.annotations==null)return J(!0);let t=gt(e.annotations,s=>s.id,"annotations");if(t.isErr())return t;let n=Tt(e),i=new Set($e((r=e.annotationSymbols)!=null?r:{}));for(let s of $e(e.annotations)){let a=e.annotations[s];if(a!=null)for(let u of a){if(!i.has(u.symbolKey))return Y({kind:tc.AnnotationUnknownSymbolError,properties:{annotationId:u.id,symbolKey:u.symbolKey}});let l=n(s,u.geometryId);if(l.isErr())return l;if(l.value.geometry.type!=="Point")return Y({kind:tc.AnnotationNonPointGeometryError,properties:{annotationId:u.id,floorId:s,geometryId:u.geometryId}})}}return J(!0)},"validateAnnotations");var Hw=mt("a","AnnotationId"),Uv=p.Intersect([Kn,p.Object({id:p.Ref(Hw,{description:"The unique identifier for the annotation."}),externalId:p.Optional(p.String({description:"The external identifier for the annotation."})),symbolKey:p.String({description:"The symbol identifier for the annotation."})})],{$id:"AnnotationProperties"}),Ww=p.Object({url:p.String({format:"uri",description:"The URL for the symbol."}),name:p.String({description:"The name of the symbol."})},{$id:"AnnotationSymbol"}),cB=p.Object({annotations:yt(p.Record(_e,p.Array(p.Ref(Uv)),{additionalProperties:!1})),annotationSymbols:yt(p.Record(p.Index(Uv,["symbolKey"]),p.Ref(Ww)))},{$id:"AnnotationsSchema"}),uB=/^annotations\/(.*)\.json$/,Zw={name:"ext:mvf-annotations",schema:cB,intoBundle:o(function*(e){if(e.annotations!=null)for(let t of $e(e.annotations))yield{path:"annotations/".concat(t,".json"),contents:e.annotations[t]};e.annotationSymbols!=null&&(yield{path:"annotation-symbols.json",contents:e.annotationSymbols})},"intoBundle"),fromBundle:o((e,t,n)=>{var r;if(e==="annotation-symbols.json")return{annotationSymbols:n(t)};let i=(r=e.match(uB))==null?void 0:r[1];if(i)return{annotations:{[i]:n(t)}}},"fromBundle"),references:[Hw,Uv,Ww],integrityCheck:Gw};f();f();f();var ii=mt("lcat","LocationCategoryId"),Nv=p.Intersect([p.Object({id:p.Ref(ii),parent:p.Optional(p.Ref(ii))}),qi(["name"]),ur],{$id:"LocationCategory"}),Xw=[ii,Nv];f();f();var no;(function(e){e.UnknownCategoryError="UnknownCategoryError",e.UnknownParentCategoryError="UnknownParentCategoryError",e.UnknownParentLocationError="UnknownParentLocationError"})(no||(no={}));var qw=o(e=>{var r,s,a,u,l,c,d,h,m;if(e.locationCategories==null&&e.locations==null)return J(!0);if(e.locationCategories!=null){let y=gt(e.locationCategories,v=>v.id,"locationCategories");if(y.isErr())return y}if(e.locations!=null){let y=gt(e.locations,v=>v.id,"locations");if(y.isErr())return y}if(e.locationInstances!=null){let y=gt(e.locationInstances,v=>v.id,"locationInstances");if(y.isErr())return y}let t=new Set((s=(r=e.locationCategories)==null?void 0:r.map(y=>y.id))!=null?s:[]);for(let y of(a=e.locationCategories)!=null?a:[])if(y.parent!=null&&!t.has(y.parent))return Y({kind:no.UnknownParentCategoryError,properties:{categoryId:y.id,parentCategoryId:y.parent}});let n=Tt(e);for(let y of(u=e.locations)!=null?u:[]){for(let v of y.categories)if(!t.has(v))return Y({kind:no.UnknownCategoryError,properties:{locationId:y.id,categoryId:v}});for(let v of y.geometryAnchors){let I=n(v.floorId,v.geometryId);if(I.isErr())return I}}let i=new Set((c=(l=e.locations)==null?void 0:l.map(y=>y.id))!=null?c:[]);for(let y of(d=e.locationInstances)!=null?d:[]){if(!i.has(y.parentId))return Y({kind:no.UnknownParentLocationError,properties:{locationInstanceId:y.id,parentLocationId:y.parentId}});for(let v of(h=y.categories)!=null?h:[])if(!t.has(v))return Y({kind:no.UnknownCategoryError,properties:{locationId:y.id,categoryId:v}});for(let v of(m=y.geometryAnchors)!=null?m:[]){let I=n(v.floorId,v.geometryId);if(I.isErr())return I}}return J(!0)},"validateLocations");f();var oi=mt("loc","LocationId"),ef=mt("loci","LocationInstanceId"),Kw=p.Object({name:p.String(),url:p.String({format:"uri"})},{$id:"LocationSocial"}),Jw=p.Object({url:p.String({format:"uri"})},{$id:"LocationImage"}),Fv=p.Object({label:p.String(),url:p.String({format:"uri"})},{$id:"LocationLink"}),kv=p.String({pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",$id:"OpeningHoursTime"}),Yw=p.Union([p.Literal("Sunday"),p.Literal("Monday"),p.Literal("Tuesday"),p.Literal("Wednesday"),p.Literal("Thursday"),p.Literal("Friday"),p.Literal("Saturday")],{$id:"OpeningHoursDay"}),lB="PublicHolidays",Dv=p.Union([Yw,p.Literal(lB)],{$id:"OpeningHoursDayOrPublicHoliday"}),tf=p.Object({"@type":p.Optional(p.Literal("OpeningHoursSpecification",{description:"The type of opening hours"})),opens:p.Optional(p.Ref(kv,{description:"The time the opening hours start"})),closes:p.Optional(p.Ref(kv,{description:"The time the opening hours end"})),dayOfWeek:p.Optional(p.Union([p.Ref(Dv),p.Array(p.Ref(Dv))],{description:"The days of the week the opening hours apply to"})),validFrom:p.Optional(p.String({format:"date",description:"The date the opening hours start, in ISO 8601 format"})),validThrough:p.Optional(p.String({format:"date",description:"The date the opening hours end, in ISO 8601 format"}))},{$id:"OpeningHoursSpecification"}),nf=p.Intersect([p.Object({id:p.Ref(oi),categories:p.Array(p.Ref(ii)),logo:p.Optional(p.String({format:"uri"})),phone:p.Optional(p.String()),social:p.Array(p.Ref(Kw)),images:p.Array(p.Ref(Jw)),links:p.Array(p.Ref(Fv)),website:p.Optional(p.Ref(Fv)),openingHours:p.Optional(p.Array(p.Ref(tf)))}),qi(["name"]),ec(),ur],{$id:"Location"}),Lv=p.Intersect([p.Object({id:p.Ref(ef),parentId:p.Ref(oi)}),p.Partial(p.Omit(nf,["id","parentId","details"])),wn],{$id:"LocationInstance",description:"A location instance is a particular instance of an location that has some properties different from the parent."}),rf=[oi,ef,Kw,Jw,Fv,kv,Yw,Dv,tf,nf,Lv];var fB=p.Object({locations:p.Array(p.Ref(nf)),locationCategories:p.Array(p.Ref(Nv)),locationInstances:p.Optional(p.Array(p.Ref(Lv)))},{$id:"LocationsExtensionSchema"}),Qw="locations.json",eM="location-categories.json",tM="location-instances.json",nM={name:"ext:locations",schema:fB,intoBundle:o(function*(e){e.locations!=null&&(yield{path:Qw,contents:e.locations}),e.locationCategories!=null&&(yield{path:eM,contents:e.locationCategories}),e.locationInstances!=null&&(yield{path:tM,contents:e.locationInstances})},"intoBundle"),fromBundle:o((e,t,n)=>{if(e===Qw)return{locations:n(t)};if(e===eM)return{locationCategories:n(t)};if(e===tM)return{locationInstances:n(t)}},"fromBundle"),references:[...Xw,...rf],integrityCheck:qw};f();f();var lr;(function(e){e.EnterpriseLocationWithUnknownLocationError="EnterpriseLocationWithUnknownLocationError",e.EnterpriseCategoryWithUnknownLocationCategoryError="EnterpriseCategoryWithUnknownLocationCategoryError",e.InstanceWithUnknownLocationInstanceError="InstanceWithUnknownLocationInstanceError",e.InstanceWithUnknownEnterpriseLocationError="InstanceWithUnknownEnterpriseLocationError",e.EnterpriseLocationWithUnknownSibling="EnterpriseLocationWithUnknownSibling",e.EnterpriseLocationInstanceWithUnknownSibling="EnterpriseLocationInstanceWithUnknownSibling",e.EnterpriseVenueWithUnknownTopLocationError="EnterpriseVenueWithUnknownTopLocationError",e.EnterpriseLocationWithInvalidPrimaryCategory="EnterpriseLocationWithInvalidPrimaryCategory"})(lr||(lr={}));var rM=o(e=>{var m,y,v,I,T,U,D,w,S,A,j,F,H,G,ce,ue,he,Ge,Oe,Ue;if(e.cms==null)return J(!0);let t=e.cms,n=gt(e.cms.categories,V=>V.id,"cms.categories");if(n.isErr())return n;let i=new Set((y=(m=e.locationCategories)==null?void 0:m.map(V=>V.id))!=null?y:[]);for(let V of(v=t.categories)!=null?v:[])if(!i.has(V.categoryId))return Y({kind:lr.EnterpriseCategoryWithUnknownLocationCategoryError,properties:{enterpriseCategoryId:V.id,locationCategoryId:V.categoryId}});let r=gt(e.cms.locations,V=>V.id,"cms.locations");if(r.isErr())return r;let s=new Map((T=(I=e.locations)==null?void 0:I.map(V=>[V.id,V]))!=null?T:[]);for(let V of(U=t.locations)!=null?U:[]){if(!s.has(V.locationId))return Y({kind:lr.EnterpriseLocationWithUnknownLocationError,properties:{enterpriseLocationId:V.id,locationId:V.locationId}});for(let ne of(D=V.siblingGroups)!=null?D:[])for(let le of(w=ne.siblings)!=null?w:[])if(!s.has(le))return Y({kind:lr.EnterpriseLocationWithUnknownSibling,properties:{enterpriseLocationId:V.id,siblingLocationId:le,label:ne.label}});if(V.primaryCategory!=null){let ne=s.get(V.locationId);if(ne!=null&&!ne.categories.includes(V.primaryCategory))return Y({kind:lr.EnterpriseLocationWithInvalidPrimaryCategory,properties:{enterpriseLocationId:V.id,locationId:V.locationId,primaryCategory:V.primaryCategory}})}}if(((S=t.venue)==null?void 0:S.topLocations)!=null){for(let V of t.venue.topLocations)if(!s.has(V))return Y({kind:lr.EnterpriseVenueWithUnknownTopLocationError,properties:{locationId:V}})}let a=new Set((j=(A=e.cms.locations)==null?void 0:A.map(V=>V.id))!=null?j:[]),u=gt(e.cms.locationInstances,V=>V.id,"cms.locationInstances");if(u.isErr())return u;let l=new Set((H=(F=e.locationInstances)==null?void 0:F.map(V=>V.id))!=null?H:[]);for(let V of(G=t.locationInstances)!=null?G:[]){if(!a.has(V.parentId))return Y({kind:lr.InstanceWithUnknownEnterpriseLocationError,properties:{enterpriseLocationInstanceId:V.id,enterpriseLocationId:V.parentId}});if(!l.has(V.locationInstanceId))return Y({kind:lr.InstanceWithUnknownLocationInstanceError,properties:{enterpriseLocationInstanceId:V.id,locationInstanceId:V.locationInstanceId}});for(let ne of(ce=V.siblingGroups)!=null?ce:[])for(let le of(ue=ne.siblings)!=null?ue:[])if(!s.has(le))return Y({kind:lr.EnterpriseLocationInstanceWithUnknownSibling,properties:{enterpriseLocationInstanceId:V.id,siblingLocationId:le,label:ne.label}})}let c=cr(e),d=Tt(e),h=gt(e.cms.floorText,V=>V.properties.id,"cms.floorText");if(h.isErr())return h;for(let[V,ne]of Yt((he=t.floorText)!=null?he:{})){let le=c(V);if(le.isErr())return le;for(let oe of ne.features){if(!("geometryId"in oe.properties))continue;let Me=d(V,oe.properties.geometryId);if(Me.isErr())return Me}}for(let[V,ne]of Yt((Ge=t.textures)!=null?Ge:{})){let le=c(V);if(le.isErr())return le;for(let oe of ne){let Me=d(V,oe.geometryId);if(Me.isErr())return Me}}for(let[V,ne]of Yt((Oe=t.layers)!=null?Oe:{})){let le=c(V);if(le.isErr())return le;for(let oe of $e(ne!=null?ne:{})){let Me=d(V,oe);if(Me.isErr())return Me}}for(let[V,ne]of Yt((Ue=t.textAreas)!=null?Ue:{})){let le=c(V);if(le.isErr())return le;for(let oe of ne.features)if("geometryId"in oe.properties){let Me=d(V,oe.properties.geometryId);if(Me.isErr())return Me}}return J(!0)},"validateCMS");f();f();var nc=mt("el","EnterpriseLocationId"),$v=mt("ec","EnterpriseCategoryId"),zv=mt("eli","EnterpriseLocationInstanceId"),Bv=mt("ev","EnterpriseVenueId"),Vv=mt("eft","EnterpriseFloorTextId"),iM=[nc,$v,zv,Bv,Vv];var oM=p.Object({id:p.Ref($v),categoryId:p.Ref(ii),color:p.Optional(p.String()),sortOrder:p.Number(),iconFromDefaultList:p.Optional(p.Union([p.String(),p.Null()])),picture:p.Optional(p.String({format:"uri",description:"The category's picture"}))},{$id:"EnterpriseCategory"}),jv=p.Object({categories:p.Optional(p.Array(p.Ref(oM)))},{$id:"EnterpriseCategoriesSchema"}),sM=[oM,jv];f();var aM=yn(["left","center","right"]),dB=aM.schema,eye=aM.values,Gv=p.Object({id:p.Ref(Vv),text:p.String(),visible:p.Boolean({default:!0}),fontSize:p.Number({default:12,exclusiveMinimum:0}),fontFamily:p.String({default:"Droid Sans"}),color:p.String({default:"black"}),rotation:p.Number({minimum:0,maximum:360}),align:dB},{$id:"FloorTextCommonProperties"}),Hv=p.Intersect([p.Ref(Gv),Kn],{$id:"AnchoredFloorTextProperties"}),Wv=p.Intersect([p.Ref(Gv),p.Object({verticalOffset:p.Number()})],{$id:"FloatingFloorTextProperties"}),cM=p.Union([p.Ref(Hv),p.Ref(Wv)],{$id:"FloorTextProperties"}),uM=Ft(Zt,p.Ref(cM),{$id:"FloorTextFeature"}),pB=Ft(Zt,p.Ref(Hv),{$id:"AnchoredFloorTextFeature"}),hB=Ft(Zt,p.Ref(Wv),{$id:"FloatingFloorTextFeature"}),lM=sn(p.Ref(uM),{$id:"EnterpriseFloorTextFeatureCollection"}),fM=p.Record(_e,p.Ref(lM),{$id:"EnterpriseFloorTextCollectionsByFloor",additionalProperties:!1}),Zv=p.Object({floorText:p.Optional(p.Ref(fM))},{$id:"EnterpriseFloorTextSchema"}),dM=[Gv,Hv,Wv,cM,uM,pB,hB,lM,fM,Zv];f();var pM=yt(p.Record(Xt,p.String({minLength:1}),{additionalProperties:!1,$id:"EnterpriseLayers"})),hM=yt(p.Record(_e,p.Ref(pM),{additionalProperties:!1,$id:"EnterpriseLayersByFloor"})),Xv=p.Object({layers:p.Optional(p.Ref(hM))},{$id:"EnterpriseLayersSchema"}),mM=[pM,hM,Xv];f();f();f();var qv=yn(["closed-temporarily","new","pop-up","coming-soon","relocated"]),mB=qv.schema,fye=qv.values,dye=qv.record,Kv=p.Object({type:mB,start:p.Optional(p.String({format:"date",description:"The start date of the state"})),end:p.Optional(p.String({format:"date",description:"The end date of the state"}))},{$id:"LocationState",description:"The state of a location. Start and end dates are optional."}),Jv=p.Object({label:p.String(),siblings:p.Array(p.Ref(oi))},{$id:"SiblingGroup"}),of=p.Object({name:p.String(),code:p.String()},{$id:"Language"}),gM=[Kv,Jv,of];var sf=p.Object({id:p.Ref(nc),locationId:p.Ref(oi),cmsId:p.String(),type:p.String(),sortOrder:p.Number(),tags:p.Optional(p.Array(p.String())),picture:p.Optional(p.String({format:"uri",description:"The picture of the location"})),states:p.Optional(p.Array(p.Ref(Kv),{description:"The location's state. No more than one state should be active at a time, and all but at most one should have dates set"})),siblingGroups:p.Optional(p.Array(p.Ref(Jv))),gallery:p.Optional(p.Array(p.Object({caption:p.Optional(p.String()),image:p.String({format:"uri"}),embeddedUrl:p.Optional(p.String({format:"uri",description:"The URL to link from the image"}))},{description:"The location's image gallery"}),{description:"The location's image gallery"})),showFloatingLabelWhenImagePresent:p.Optional(p.Boolean({description:"Whether to show the flat label when an image is present"})),amenity:p.Optional(p.String({description:"The location's amenity type. Only set if the location is an amenity"})),showLogo:p.Optional(p.Boolean({description:"Whether to show the logo of the location"})),primaryCategory:p.Optional(p.Ref(ii))},{$id:"EnterpriseLocation"}),Yv=p.Object({locations:p.Optional(p.Array(p.Ref(sf)))},{$id:"EnterpriseLocationsSchema"}),yM=[sf,Yv];var xM=p.Intersect([p.Object({id:p.Ref(zv),parentId:p.Ref(nc),locationInstanceId:p.Ref(ef)}),p.Partial(p.Omit(sf,["id","parentId","locationId"]))],{$id:"EnterpriseLocationInstance",description:"A locationInstance is a particular instance of an Enterprise Location that has some properties different from the parent."}),Qv=p.Object({locationInstances:p.Optional(p.Array(p.Ref(xM)))},{$id:"EnterpriseLocationInstancesSchema"}),vM=[xM,Qv];f();var e_=yn(["near","center"],{$id:"EnterpriseTextAreaAlignment"}),_M=e_.schema,Cye=e_.values,Oye=e_.record,t_=p.Object({maxWidth:p.Number({exclusiveMinimum:0,description:"The maximum width of the label, in meters."}),maxHeight:p.Number({exclusiveMinimum:0,description:"The maximum height of the label, in meters."}),align:p.Ref(_M),rotation:p.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"EnterpriseBaseTextAreaProperties"}),bM=p.Intersect([p.Ref(t_),Kn],{$id:"EnterpriseAnchoredTextAreaProperties"}),SM=p.Intersect([p.Ref(t_),p.Object({verticalOffset:p.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"EnterpriseFloatingTextAreaProperties"}),IM=p.Union([bM,SM],{$id:"EnterpriseTextAreaProperties"}),wM=Ft(p.Ref(Zt),IM,{$id:"EnterpriseTextAreaFeature"}),MM=sn(p.Ref(wM),{$id:"EnterpriseTextAreaCollection"}),EM=p.Record(_e,p.Ref(MM),{$id:"EnterpriseTextAreasByFloor",additionalProperties:!1}),TM=p.Object({textAreas:p.Optional(p.Ref(EM))},{$id:"EnterpriseTextAreasSchema"}),AM=[_M,t_,bM,SM,IM,wM,MM,EM];f();var n_=p.Object({u:p.Number(),v:p.Number()},{$id:"EnterpriseTextureUV"}),r_=yn(["top","side"],{$id:"EnterpriseTextureFace"}),PM=r_.schema,Dye=r_.values,Lye=r_.record,i_=yn(["inside","outside","both"],{$id:"EnterpriseTextureSurface"}),RM=i_.schema,$ye=i_.values,zye=i_.record,CM=p.Tuple([qo,Ko,qo,Ko],{$id:"EnterpriseTextureBounds"}),OM=p.Intersect([p.Object({repeat:p.Ref(n_),offset:p.Ref(n_),rotation:p.Number({minimum:0,maximum:360}),path:p.String({format:"uri"}),face:p.Ref(PM),surface:p.Ref(RM),bounds:p.Ref(CM)},{$id:"EnterpriseTextureProperties"}),Kn],{$id:"EnterpriseTexture"}),UM=p.Array(p.Ref(OM),{$id:"EnterpriseTextures"}),NM=p.Record(_e,p.Ref(UM),{$id:"EnterpriseTexturesByFloor",additionalProperties:!1}),o_=p.Object({textures:p.Optional(p.Ref(NM))},{$id:"EnterpriseTexturesSchema"}),FM=[OM,UM,o_,n_,PM,RM,CM,NM];f();var kM=p.Intersect([p.Object({id:p.Ref(Bv),slug:p.String(),defaultLanguage:p.Ref(of),languages:p.Array(p.Ref(of)),countrycode:p.Optional(p.String()),logo:p.Optional(p.String({format:"uri"})),mappedinWebUrl:p.Optional(p.String({format:"uri"})),topLocations:p.Optional(p.Array(p.Ref(oi))),operationHours:p.Optional(p.Array(p.Ref(tf))),coverImage:p.Optional(p.String({format:"uri"}))}),qi(["name"]),ur],{$id:"EnterpriseVenue"}),s_=p.Object({venue:p.Optional(p.Ref(kM))},{$id:"EnterpriseVenueSchema"}),DM=[kM,s_];var $M=p.Intersect([s_,Yv,Qv,jv,o_,Zv,Xv,TM],{$id:"CMSProperties"}),LM=p.Object({cms:p.Optional(p.Ref($M))},{$id:"CMSExtensionSchema"}),gB=/^cms\/(?:([^/]+)\/)?([^/]+)\.(?:json|geojson)$/,zM={name:"ext:cms",schema:LM,intoBundle:o(function*(e){var n,i,r,s,a,u;if(e.cms==null)return;let t=e.cms;for(let l of $e(t))switch(l){case"floorText":for(let c of $e((n=t.floorText)!=null?n:{}))yield{path:"cms/floorText/".concat(c,".geojson"),contents:((i=t.floorText)!=null?i:{})[c]};continue;case"textures":for(let c of $e((r=t.textures)!=null?r:{}))yield{path:"cms/textures/".concat(c,".json"),contents:((s=t.textures)!=null?s:{})[c]};continue;case"textAreas":for(let c of $e((a=t.textAreas)!=null?a:{}))yield{path:"cms/textAreas/".concat(c,".geojson"),contents:((u=t.textAreas)!=null?u:{})[c]};continue;default:yield{path:"cms/".concat(l,".json"),contents:t[l]};continue}},"intoBundle"),fromBundle:o((e,t,n)=>{let i=e.match(gB);if(!i)return;let[,r,s]=i,a=n(t);switch(r){case"floorText":case"textures":case"textAreas":return{cms:{[r]:{[s]:a}}};default:return{cms:{[s]:a}}}},"fromBundle"),references:[$M,LM,...DM,...yM,...vM,...sM,...FM,...mM,...dM,...AM,...iM,...gM,...rf],integrityCheck:rM};f();f();f();f();var fr;(function(e){e.NavigationFlagMissingDeclaration="NavigationFlagMissingDeclaration",e.NavigationFlagDuplicateBit="NavigationFlagDuplicateBit",e.NavigationFlagIncorrectFlagsLength="NavigationFlagIncorrectFlagsLength",e.NavigationFlagValueTooBig="NavigationFlagValueTooBig"})(fr||(fr={}));var BM=o(e=>{let{navigationFlags:t}=e;if(!t||Object.keys(t).length===0)return J(!0);let n=Object.entries(t).map(([s,a])=>x({key:s},a)).sort((s,a)=>s.index!==a.index?s.index-a.index:s.bit-a.bit),i=0,r=-1;for(let s of n){if(s.bit===r)return Y({kind:fr.NavigationFlagDuplicateBit,properties:{index:s.index,bit:s.bit,path:"navigationFlags.".concat(s.key)}});if(s.index!=i){if(r!=31)return Y({kind:fr.NavigationFlagMissingDeclaration,properties:{index:i,bit:r+1,path:"navigationFlags"}});if(s.index!=i+1||s.bit!=0)return Y({kind:fr.NavigationFlagMissingDeclaration,properties:{index:i+1,bit:0,path:"navigationFlags"}});i=s.index,r=0}else{if(s.bit!==r+1)return Y({kind:fr.NavigationFlagMissingDeclaration,properties:{index:s.index,bit:r+1,path:"navigationFlags"}});r=s.bit}}return J(!0)},"validateNavigationFlags");f();var VM=2**32-1,rc=o(e=>{var r;let t=Object.keys((r=e.navigationFlags)!=null?r:{}).length;if(t===0)return{index:-1,flag:0};let n=Math.floor(t/32),i=t%32;return{index:n,flag:2**i-1}},"determineMaxNavigationFlags"),bs=o((e,t,n)=>{if(t.index==-1&&e.length===0)return J(!0);let i=t.flag>0||t.index===-1?t.index+1:t.index;if(e.length!==i)return Y({kind:fr.NavigationFlagIncorrectFlagsLength,properties:{expected:i,actual:e.length,path:n}});for(let r=0;r<e.length;r++){let s=e[r];if(r<t.index){if(s>VM)return Y({kind:fr.NavigationFlagValueTooBig,properties:{index:r,flagValue:s,expectedMaxFlagValue:VM,path:n}});continue}else if(s>t.flag)return Y({kind:fr.NavigationFlagValueTooBig,properties:{index:r,flagValue:s,expectedMaxFlagValue:t.flag,path:n}})}return J(!0)},"validateFlags");var yB=p.Object({index:p.Integer({description:"The index of the flag in a flags array.",minimum:0}),bit:p.Integer({description:"The bit position of the flag in a flag's bitfield.",minimum:0,maximum:31})},{$id:"NavigationFlagDeclarationCore"}),jM=p.Intersect([yB,wn],{$id:"NavigationFlagDeclaration",description:'A NavigationFlagDeclaration describes the relationship between a "key" that a developer might use to wayfind using that flag, and the index and bit position in an object\'s `flags` array.'});var GM=p.Record(p.String(),jM,{$id:"NavigationFlagDeclarations",description:"Any well known and custom flags present in the MVF"}),xB=p.Object({navigationFlags:p.Ref(GM)},{$id:"NavigationFlagsSchema"}),af=p.Array(p.Integer({minimum:0,maximum:Math.pow(2,32)-1}),{$id:"Flags"}),a_=p.Object({flags:p.Ref(af)},{$id:"WithFlags"}),ro=p.Intersect([_s,a_],{$id:"FlaggedGeometryAnchor"}),vB=p.Object({geometryAnchor:ro},{$id:"WithFlaggedGeometryAnchor"}),_B=p.Object({geometryAnchors:p.Array(ro)},{$id:"WithFlaggedGeometryAnchors"}),HM={name:"ext:mvf-navigation-flags",schema:xB,intoBundle:o(function*(e){e.navigationFlags!=null&&(yield{path:"navigationFlags.json",contents:e.navigationFlags})},"intoBundle"),fromBundle:o((e,t,n)=>e!=="navigationFlags.json"?void 0:{navigationFlags:n(t)},"fromBundle"),references:[jM,GM,af,ro,vB,_B],integrityCheck:BM};f();var WM=o(e=>{if(e.connections==null)return J(!0);let t=gt(e.connections,r=>r.id,"connections");if(t.isErr())return t;let n=Tt(e),i=rc(e);for(let[r,s]of e.connections.entries()){for(let[a,u]of s.entrances.entries()){let l=n(u.floorId,u.geometryId);if(l.isErr())return l;let c=bs(u.flags,i,"connections[".concat(r,"].entrances[").concat(a,"]"));if(c.isErr())return c}for(let[a,u]of s.exits.entries()){let l=n(u.floorId,u.geometryId);if(l.isErr())return l;let c=bs(u.flags,i,"connections[".concat(r,"].exits[").concat(a,"]"));if(c.isErr())return c}}return J(!0)},"validateConnections");var XM=mt("c","ConnectionId"),{schema:bB,values:Hxe,record:Wxe}=yn(["elevator","escalator","travelator","stairs","door","ramp","ladder"],{$id:"ConnectionType"}),qM=bB;var KM=p.Intersect([p.Object({id:p.Ref(XM,{description:"The unique identifier for the connection."}),entrances:p.Array(p.Ref(ro)),exits:p.Array(p.Ref(ro)),entryCost:p.Number({description:"The cost to enter the connection.",minimum:0}),floorCostMultiplier:p.Number({description:"The cost multiplier for each floor transitioned.",minimum:1}),type:p.Ref(qM,{description:"The type of connection."})}),wn,ur],{$id:"ConnectionsProperties"}),JM=p.Array(p.Ref(KM),{$id:"ConnectionsCollection"}),SB=p.Object({connections:p.Ref(JM)},{$id:"ConnectionsExtensionSchema"}),ZM="connections.json",YM={name:"ext:connections",schema:SB,intoBundle:o(function*(e){e.connections!=null&&(yield{path:ZM,contents:e.connections})},"intoBundle"),fromBundle:o((e,t,n)=>{if(e===ZM)return{connections:n(t)}},"fromBundle"),references:[KM,JM,qM,XM,ro,af],integrityCheck:WM};f();f();var QM=o(e=>{if(e.defaultStyle==null)return J(!0);let t=Tt(e);for(let n of Object.values(e.defaultStyle))if(n!=null)for(let i of n.geometryAnchors){let r=t(i.floorId,i.geometryId);if(r.isErr())return r}return J(!0)},"validateDefaultStyle");var eE=p.Intersect([ec(),ur,p.Object({altitude:p.Number({description:"How far off the bottom of the floor the objects with this style should be drawn, in meters."}),color:p.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB"}),height:p.Number({minimum:0,description:"The height of the objects belonging to this layer, in meters."}),opacity:p.Number({minimum:0,maximum:1,description:"The opacity of the objects belonging to this layer, from 0 to 1."}),buffer:p.Number({description:"The buffer amount to apply to the geometry, in meters. This can be used to inflate line string geometry for walls, but might also be applicable as a way to grow or shrink polygon geometry for aesthetic purposes. Can be negative."}),hidden:p.Optional(p.Boolean({description:"Whether or not the objects with this style should be hidden."}))})],{$id:"DefaultStyle"}),tE=p.Record(p.String(),p.Ref(eE),{$id:"DefaultStyleCollection",additionalProperties:!1}),IB=p.Object({defaultStyle:p.Ref(tE)},{$id:"DefaultStyleSchema"}),nE={name:"ext:mvf-default-style",schema:IB,intoBundle:o(function*(e){e.defaultStyle!=null&&(yield{path:"default-style.json",contents:e.defaultStyle})},"intoBundle"),fromBundle:o((e,t,n)=>{if(e==="default-style.json")return{defaultStyle:n(t)}},"fromBundle"),references:[eE,tE],integrityCheck:QM};f();f();f();f();var cf;(function(e){e.InvalidDefaultFloorError="InvalidDefaultFloorError"})(cf||(cf={}));var rE=o(e=>{if(e.floorStacks==null)return J(!0);let t=gt(e.floorStacks,i=>i.id,"floorStacks");if(t.isErr())return t;let n=cr(e);for(let i of e.floorStacks){for(let r of i.floors){let s=n(r);if(s.isErr())return s}if(i.defaultFloor!=null&&!i.floors.includes(i.defaultFloor))return Y({kind:cf.InvalidDefaultFloorError,properties:{floorStackId:i.id,floorId:i.defaultFloor}})}return J(!0)},"validateFloorStacks");var ic=mt("fs","FloorStackId"),oE=p.Intersect([p.Object({id:p.Ref(ic,{description:"The unique identifier for the floor stack."}),floors:p.Array(p.Ref(_e),{uniqueItems:!0,minItems:1,description:"The floors that are part of this floor stack."}),defaultFloor:p.Optional(p.Ref(_e,{description:"The default floor for the floor stack."}))}),wn],{$id:"FloorStacksProperties"}),sE=p.Array(p.Ref(oE),{$id:"FloorStackCollection"}),wB=p.Object({floorStacks:p.Ref(sE)},{$id:"FloorStackExtensionSchema"}),iE="floor-stacks.json",aE={name:"ext:floor-stacks",schema:wB,intoBundle:o(function*(e){e.floorStacks!=null&&(yield{path:iE,contents:e.floorStacks})},"intoBundle"),fromBundle:o((e,t,n)=>{if(e===iE)return{floorStacks:n(t)}},"fromBundle"),references:[ic,oE,sE],integrityCheck:rE};f();f();var oc;(function(e){e.MissingFloorStackError="MissingFloorStackError",e.UnknownFloorStackError="UnknownFloorStackError"})(oc||(oc={}));var cE=o(e=>{if(e.facade==null)return J(!0);if(e.floorStacks==null)return Y({kind:oc.MissingFloorStackError,properties:null});let t=new Set(e.floorStacks.map(r=>r.id)),n=Tt(e),i=cr(e);for(let[r,s]of Yt(e.facade)){if(s==null)continue;let a=i(r);if(a.isErr())return a;for(let u of s){let{floorStackId:l,geometryIds:c}=u;if(!t.has(l))return Y({kind:oc.UnknownFloorStackError,properties:{floorStackId:l}});for(let d of c){let h=n(r,d);if(h.isErr())return h}}}return J(!0)},"validateFacade");var uE=p.Intersect([p.Object({floorStackId:p.Ref(ic)}),ms],{$id:"Facade"}),MB=p.Object({facade:yt(p.Record(_e,p.Array(p.Ref(uE)),{additionalProperties:!1}))},{$id:"FacadeExtensionSchema"}),EB=/^facade\/(.*)\.json$/,lE={name:"ext:facade",schema:MB,intoBundle:o(function*(e){if(e.facade!=null)for(let t of $e(e.facade))yield{path:"facade/".concat(t,".json"),contents:e.facade[t]}},"intoBundle"),fromBundle:o((e,t,n)=>{var r;let i=(r=e.match(EB))==null?void 0:r[1];if(i)return{facade:{[i]:n(t)}}},"fromBundle"),references:[ic,uE],integrityCheck:cE};f();f();var fE=o(e=>{if(e.floorImages==null)return J(!0);let t=Tt(e);for(let[n,i]of Yt(e.floorImages))if(i!=null)for(let r of i.features){if(!("geometryId"in r.properties))continue;let s=r.properties.geometryId,a=t(n,s);if(a.isErr())return a}return J(!0)},"validateFloorImages");var c_=p.Object({path:p.String({format:"uri",description:"The path to the image. This will be a remote URL."}),width:p.Number({minimum:0,description:"The width of the image when represented on the map, in meters."}),height:p.Number({minimum:0,description:"The height of the image when represented on the map, in meters."}),rotation:p.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"BaseFloorImageProperties"}),dE=p.Intersect([p.Ref(c_),Kn],{$id:"AnchoredFloorImageProperties"}),pE=p.Intersect([p.Ref(c_),p.Object({verticalOffset:p.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"FloatingFloorImageProperties"}),hE=p.Union([dE,pE],{$id:"FloorImageProperties"}),mE=Ft(p.Ref(Zt),hE,{$id:"FloorImageFeature"}),gE=sn(p.Ref(mE),{$id:"FloorImageCollection"}),TB=p.Object({floorImages:yt(p.Record(_e,p.Ref(gE),{additionalProperties:!1}))},{$id:"FloorImagesExtensionSchema"}),AB=/^floorImages\/(.*)\.geojson$/,yE={name:"ext:floor-images",schema:TB,intoBundle:o(function*(e){if(e.floorImages!=null)for(let t of $e(e.floorImages))yield{path:"floorImages/".concat(t,".geojson"),contents:e.floorImages[t]}},"intoBundle"),fromBundle:o((e,t,n)=>{var r;let i=(r=e.match(AB))==null?void 0:r[1];if(i)return{floorImages:{[i]:n(t)}}},"fromBundle"),references:[c_,dE,pE,hE,mE,gE],integrityCheck:fE};f();f();var xE=o(e=>{if(e.kinds==null)return J(!0);let t=Tt(e);for(let[n,i]of Yt(e.kinds))if(i!=null)for(let r of $e(i)){let s=t(n,r);if(s.isErr())return s}return J(!0)},"validateKinds");var{values:h_e,schema:PB,record:m_e}=yn(["room","hallway","wall","object","poi","area","window"],{$id:"Kind"}),vE=PB;var _E=yt(p.Record(Xt,p.Ref(vE),{additionalProperties:!1,$id:"GeometryKinds"})),RB=p.Object({kinds:yt(p.Record(_e,p.Ref(_E),{additionalProperties:!1}))},{$id:"KindsExtensionSchema"}),CB=/^kinds\/(.*)\.json$/,bE={name:"ext:kinds",schema:RB,intoBundle:o(function*(e){if(e.kinds!=null)for(let t of $e(e.kinds))yield{path:"kinds/".concat(t,".json"),contents:e.kinds[t]}},"intoBundle"),fromBundle:o((e,t,n)=>{var r;let i=(r=e.match(CB))==null?void 0:r[1];if(i)return{kinds:{[i]:n(t)}}},"fromBundle"),references:[vE,_E],integrityCheck:xE};f();f();f();var sc;(function(e){e.UnknownNeighbor="UnknownNeighbor",e.SelfReference="SelfReference"})(sc||(sc={}));var SE=o(e=>{if(e.nodes==null)return J(!0);let t=gt(e.nodes,r=>r.properties.id,"nodes");if(t.isErr())return t;let n=Tt(e),i=rc(e);for(let[r,s]of Yt(e.nodes)){if(s==null)continue;let a=new Set(s.features.map(u=>u.properties.id));for(let[u,l]of s.features.entries()){for(let c of l.properties.geometryIds){let d=n(r,c);if(d.isErr())return d}for(let[c,d]of l.properties.neighbors.entries()){if(!a.has(d.id))return Y({kind:sc.UnknownNeighbor,properties:{floorId:r,nodeId:l.properties.id,neighborId:d.id}});if(d.id===l.properties.id)return Y({kind:sc.SelfReference,properties:{floorId:r,nodeId:l.properties.id}});let h=bs(d.flags,i,'nodes["'.concat(r,'"].features[').concat(u,"].properties.neighbors[").concat(c,"]"));if(h.isErr())return h}}}return J(!0)},"validateNodes");var u_=mt("n","NodeId"),IE=p.Intersect([p.Object({id:p.Ref(u_,{description:"The unique identifier for the node."}),extraCost:p.Number({minimum:0,description:"The extra cost to traverse to the node, above the straight-line distance."})}),a_],{$id:"NodeNeighbor"}),wE=p.Intersect([p.Object({id:p.Ref(u_,{description:"The unique identifier for the node."}),neighbors:p.Array(p.Ref(IE),{description:"The neighbors of the node."})}),ms],{$id:"NodeProperties"}),ME=Ft(p.Ref(Zt),wE,{$id:"NodeFeature"}),EE=sn(p.Ref(ME),{$id:"NodeCollection"}),OB=p.Object({nodes:yt(p.Record(_e,p.Ref(EE),{additionalProperties:!1}))},{$id:"NodesExtensionSchema"}),UB=/^nodes\/(.*)\.(geo)?json$/,TE={name:"ext:nodes",schema:OB,intoBundle:o(function*(e){if(e.nodes!=null)for(let t of $e(e.nodes))yield{path:"nodes/".concat(t,".geojson"),contents:e.nodes[t]}},"intoBundle"),fromBundle:o((e,t,n)=>{var r;let i=(r=e.match(UB))==null?void 0:r[1];if(i)return{nodes:{[i]:n(t)}}},"fromBundle"),references:[u_,IE,wE,ME,EE],integrityCheck:SE};f();f();f();var uf;(function(e){e.FloorInFloorStackError="FloorInFloorStackError"})(uf||(uf={}));var AE=o(e=>{if(e.outdoors==null)return J(!0);let t=cr(e);for(let n of e.outdoors.floors){let i=t(n);if(i.isErr())return i;if(e.floorStacks!=null){for(let r of e.floorStacks)if(r.floors.includes(n))return Y({kind:uf.FloorInFloorStackError,properties:{floorId:n,floorStackId:r.id}})}}return J(!0)},"validateOutdoors");var RE=p.Object({floors:p.Array(p.Ref(_e),{uniqueItems:!0,description:"A list of floor IDs that should be considered to contain outdoor features."})},{$id:"Outdoors"}),NB=p.Object({outdoors:p.Ref(RE)},{$id:"OutdoorsExtensionSchema"}),PE="outdoors.json",CE={name:"ext:outdoors",schema:NB,intoBundle:o(function*(e){e.outdoors!=null&&(yield{path:PE,contents:e.outdoors})},"intoBundle"),fromBundle:o((e,t,n)=>{if(e===PE)return{outdoors:n(t)}},"fromBundle"),references:[RE],integrityCheck:AE};f();f();f();var lf;(function(e){e.TilesetDuplicateKeyError="TilesetDuplicateKeyError"})(lf||(lf={}));var OE=o(e=>{if(e.tileset==null)return J(!0);let t=new Set;if(t.add(e.tileset.default.key),e.tileset.others)for(let n of e.tileset.others){if(t.has(n.key))return Y({kind:lf.TilesetDuplicateKeyError,properties:{key:n.key}});t.add(n.key)}return J(!0)},"validateTilesets");var l_=p.Object({key:p.String({minLength:1,description:"Unique identifier for the tileset style."}),name:p.String({minLength:1,description:"Display name of the tileset style."}),url:p.String({format:"uri",description:"URL of the tileset style."})},{$id:"TilesetStyle",description:"A tileset style definition."}),UE=p.Object({default:p.Ref(l_,{description:"The default tileset style, which should be used."}),others:p.Optional(p.Array(p.Ref(l_,{description:"Additional tileset styles that can be used."})))},{$id:"TilesetCollection"}),FB=p.Object({tileset:p.Ref(UE)},{$id:"TilesetExtensionSchema"}),NE={name:"ext:mvf-tileset",schema:FB,intoBundle:o(function*(e){e.tileset!=null&&(yield{path:"tileset.json",contents:e.tileset})},"intoBundle"),fromBundle:o((e,t,n)=>{if(e==="tileset.json")return{tileset:n(t)}},"fromBundle"),references:[l_,UE],integrityCheck:OE};f();var FE=p.Object({},{$id:"WalkableProperties"}),kE=p.Object({},{$id:"NonWalkableProperties"}),DE=yt(p.Record(Xt,p.Ref(FE),{$id:"WalkableGeometries",additionalProperties:!1})),LE=yt(p.Record(Xt,p.Ref(kE),{$id:"NonWalkableGeometries",additionalProperties:!1})),kB=p.Object({walkable:yt(p.Record(_e,p.Ref(DE),{additionalProperties:!1})),nonwalkable:yt(p.Record(_e,p.Ref(LE),{additionalProperties:!1}))},{$id:"TraversabilitySchema"}),DB=/^walkable\/(.*)\.json$/,LB=/^nonwalkable\/(.*)\.json$/,$E={name:"ext:mvf-traversability",schema:kB,intoBundle:o(function*(e){if(e.walkable!=null)for(let t of $e(e.walkable))yield{path:"walkable/".concat(t,".json"),contents:e.walkable[t]};if(e.nonwalkable!=null)for(let t of $e(e.nonwalkable))yield{path:"nonwalkable/".concat(t,".json"),contents:e.nonwalkable[t]}},"intoBundle"),fromBundle:o((e,t,n)=>{var s,a;let i=(s=e.match(DB))==null?void 0:s[1];if(i!=null)return{walkable:{[i]:n(t)}};let r=(a=e.match(LB))==null?void 0:a[1];if(r!=null)return{nonwalkable:{[r]:n(t)}}},"fromBundle"),references:[FE,kE,DE,LE]};f();f();f();f();f();f();f();f();f();f();f();var jB=uT(VE(),1);f();f();f();f();var xSe=jw().extendOptional(HM).extendOptional(TE).extendOptional(YM).extendOptional(bE).extendOptional($E).extendOptional(nE).extendOptional(aE).extendOptional(CE).extendOptional(NE).extendOptional(yE).extendOptional(lE).extendOptional(Zw).extendOptional(nM).extendOptional(zM).build({cspSafe:!0}).expect("Invalid parser, this should never happen. Likely a bug in the MVFv2 library, or one of the extensions.");f();f();var HB=Object.freeze({baseUri:"https://app.mappedin.com/",baseAuthUri:"https://app.mappedin.com/",analyticsBaseUri:"https://api-gateway.mappedin.com/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),zSe=Object.freeze(L(x({},HB),{baseUri:"https://api-gateway.mappedin.com/",baseAuthUri:"https://auth.mappedin.com/"})),BSe=Object.freeze({baseUri:"https://api-gateway.eu.mappedin.com/",baseAuthUri:"https://auth.eu.mappedin.com/",analyticsBaseUri:"https://api-gateway.eu.mappedin.com/track-analytics/a/",tileServerUri:"https://tiles-cdn.eu.mappedin.com/styles/mappedin/style.json"}),VSe=Object.freeze({baseUri:"https://api-gateway-staging.mappedin.net/",baseAuthUri:"https://auth-staging.mappedin.net/",analyticsBaseUri:"https://api-gateway-staging.mappedin.net/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),jSe=Object.freeze({baseUri:"https://app-staging.mappedin.net/",baseAuthUri:"https://app-staging.mappedin.net/",analyticsBaseUri:"https://api-gateway-staging.mappedin.net/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"});f();f();var ZB=60,nIe=ZB*60*1e3;f();var XB=60,fIe=XB*60*1e3;var HE=globalThis.fetch,WE,_Ie=(WE=g==null?void 0:g.env)==null?void 0:WE.npm_package_version;function df(){if(HE==null)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return HE}o(df,"isomorphicFetch");var ZE={id:Ne.string(),name:Ne.string(),type:Ne.string(),startDate:Ne.number(),endDate:Ne.number(),externalId:Ne.string().optional(),description:Ne.string().optional(),location:Ne.string().optional(),image:Ne.object({original:Ne.string(),xxsmall:Ne.string().optional(),xsmall:Ne.string().optional(),small:Ne.string().optional(),medium:Ne.string().optional(),large:Ne.string().optional(),xlarge:Ne.string().optional(),xxlarge:Ne.string().optional()}).optional(),video:Ne.object({width:Ne.number(),height:Ne.number(),thumbnail:Ne.string(),content:Ne.string(),original:Ne.string()}).optional(),_locale:Ne.record(Ne.string(),Ne.record(Ne.string(),Ne.unknown())).optional()},XE=Ne.object(ZE),qE=Object.keys(ZE),KE=o(async(e,t,n,i={})=>{let r=new URLSearchParams(i),s=new URL("/public/1/event/".concat(e),t);return s.search=r.toString(),await(await df()(s.toString(),{headers:{Authorization:"Bearer ".concat(n)}})).json()},"fetchEvents");var si,Cn,Cr,Ss,Is,ws,JE,YE,m_=class m_{constructor(t,n={}){It(this,ws);It(this,si);It(this,Cn,{eventsById:new Map,eventsByLocationId:new Map});It(this,Cr,null);It(this,Ss,!1);It(this,Is);var i;Ot(this,si,t),Ot(this,Is,L(x({includeExpired:!1},n),{fields:qE.concat((i=n.fields)!=null?i:[])}))}async load(){return W(this,Cr)!=null?W(this,Cr):(Ot(this,Cr,(async()=>{let t=await ci(this,ws,JE).call(this);W(this,Cr)!=null&&(await ci(this,ws,YE).call(this,t),Ot(this,Ss,!0),Ot(this,Cr,null))})()),W(this,Cr))}get ready(){return W(this,Ss)}get events(){return Array.from(W(this,Cn).eventsById.values())}getById(t){return W(this,Cn).eventsById.get(t)}getByLocationId(t){var n;return(n=W(this,Cn).eventsByLocationId.get(t))!=null?n:[]}destroy(){W(this,Cn).eventsById.clear(),W(this,Cn).eventsByLocationId.clear(),Ot(this,Cr,null),Ot(this,Ss,!1)}};si=new WeakMap,Cn=new WeakMap,Cr=new WeakMap,Ss=new WeakMap,Is=new WeakMap,ws=new WeakSet,JE=o(async function(){if(!W(this,si).internal.enterpriseMode)return io.warn("Events are currently only supported for CMS maps!"),[];let t=W(this,si).mapId;if(t==null)throw new Error("Failed to fetch events! Map ID was not specified in getMapData.");let n=W(this,si).getAccessToken();if(n==null)throw new Error("Failed to fetch events! Could not get access token from MapData.");let i={fields:W(this,Is).fields.join(","),lang:"all"};W(this,Is).includeExpired||(i.activeAtOrAfter="now");let r=await KE(t,W(this,si).getEnv().baseUri,n,i);if(!Array.isArray(r))throw new Error("Failed to fetch events! Invalid response format.");return r.filter(s=>{let a=XE.safeParse(s);return a.success||io.warn("Failed to parse event!",s,a.error),a.success})},"#fetchEvents"),YE=o(async function(t){var n,i;W(this,Cn).eventsById.clear(),W(this,Cn).eventsByLocationId.clear();for(let r of t){let s=new Ic(r,W(this,si));W(this,Cn).eventsById.set(s.id,s);let a=(n=s.location)==null?void 0:n.id;a!=null&&W(this,Cn).eventsByLocationId.set(a,[...(i=W(this,Cn).eventsByLocationId.get(a))!=null?i:[],s])}},"#createEvents"),o(m_,"EventsManager");var h_=m_;export{h_ as EventsManager};