conformtools 0.6.9 → 0.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -22
- package/dist/account-IUWNSDG5.js +3 -0
- package/dist/analysis-engine-M7W32RRC.js +3 -0
- package/dist/bridge-SV7PCLQY.js +3 -0
- package/dist/browser/timeline_core_bg.wasm +0 -0
- package/dist/{chunk-TXQR2HI2.js → chunk-2CY2OOOJ.js} +1 -1
- package/dist/chunk-2QT5MMBP.js +499 -0
- package/dist/chunk-2WBGXD27.js +8 -0
- package/dist/chunk-5YULBQJX.js +3 -0
- package/dist/chunk-5YWO2LBG.js +3 -0
- package/dist/chunk-64X5DLH5.js +6 -0
- package/dist/{chunk-GM6QKY7W.js → chunk-6HZP2OJA.js} +1 -1
- package/dist/chunk-6NLB5TZ2.js +7 -0
- package/dist/chunk-6VP6G7CY.js +10 -0
- package/dist/{chunk-3D3Z4TBR.js → chunk-DGXZB7MO.js} +1 -1
- package/dist/chunk-DPA26AOI.js +3 -0
- package/dist/{chunk-A7FNR3T5.js → chunk-EEDLRRKU.js} +1 -1
- package/dist/chunk-G3SZDPDS.js +3 -0
- package/dist/chunk-IK6RKNS5.js +3 -0
- package/dist/chunk-IN6XVTUS.js +3 -0
- package/dist/{chunk-D4WPRRBT.js → chunk-ISKNIQVO.js} +1 -1
- package/dist/chunk-JKOB3U54.js +3 -0
- package/dist/{chunk-2BPR6LK6.js → chunk-JXTRQ3UG.js} +1 -1
- package/dist/chunk-LVGGCRDW.js +3 -0
- package/dist/chunk-N34DQ6MH.js +14 -0
- package/dist/chunk-NSQP6CTA.js +20 -0
- package/dist/chunk-QTFFVLVJ.js +8 -0
- package/dist/chunk-RKIRHMON.js +5 -0
- package/dist/chunk-ROPKSAFP.js +6 -0
- package/dist/{chunk-GTJ3EM6H.js → chunk-S6KP52OG.js} +1 -1
- package/dist/chunk-THVX57I3.js +4 -0
- package/dist/chunk-VE423Z2L.js +132 -0
- package/dist/chunk-WJ5EWXP2.js +3 -0
- package/dist/chunk-XDI6CPPV.js +3 -0
- package/dist/chunk-XF3YMBI7.js +3 -0
- package/dist/chunk-XIAG7ACN.js +7 -0
- package/dist/chunk-YU3SUSK3.js +3 -0
- package/dist/chunk-YUO3UWPH.js +3 -0
- package/dist/claude-setup-REU4AOKX.js +13 -0
- package/dist/cli.js +8 -8
- package/dist/{cr3-wasm-HLJWEV2S.js → cr3-wasm-NYCB34ND.js} +1 -1
- package/dist/{dng-wasm-CQDLPM5V.js → dng-wasm-XCPPBXPZ.js} +1 -1
- package/dist/{dpx-wasm-TLGMM7BO.js → dpx-wasm-XACWNFPB.js} +1 -1
- package/dist/emscripten-module-Q67P5WYC-HW3D2R5O.js +2161 -0
- package/dist/engine-274GQLUB.js +5 -0
- package/dist/{exr-wasm-2NPKPTVB.js → exr-wasm-FQBUR6QT.js} +1 -1
- package/dist/ffi-7KTOX2T4.js +3 -0
- package/dist/flame/hook/conformtools_flame/verbs.py +9 -9
- package/dist/framing-ZTMYZR2S.js +3 -0
- package/dist/gfx-worker.js +1 -1
- package/dist/{h264-JJMZSUWW.js → h264-B2TLLEMI.js} +1 -1
- package/dist/{h264-mxf-DCUOGLDU.js → h264-mxf-3GED5PBT.js} +1 -1
- package/dist/host-relink-FHNXXMHW.js +10 -0
- package/dist/hosted-BWAYLJXR.js +3 -0
- package/dist/hosts-Y6HGDRLM.js +3 -0
- package/dist/http.js +3 -3
- package/dist/{inspect-FJKYPEXL.js → inspect-RJFJQSHZ.js} +3 -3
- package/dist/{isobmff-VJOWP4MH.js → isobmff-C5A2EFKH.js} +1 -1
- package/dist/{mc-video-5MGGOQN4.js → mc-video-ARKIHPA7.js} +1 -1
- package/dist/mcp.js +7 -7
- package/dist/{media-NZYVREUF.js → media-22VAJIVT.js} +1 -1
- package/dist/media_core-XOKN7UUF.js +9 -0
- package/dist/module-ES6BEMUI-L6VQ7K3J.js +3 -0
- package/dist/module-asyncify-2EFITU5U-Z4EEM6X7.js +3 -0
- package/dist/mxf-CQSI6H5T.js +3 -0
- package/dist/nuke/panel/python/conformtools_nuke/verbs.py +5 -5
- package/dist/{ops-X7NAREC4.js → ops-BCTGDBXT.js} +1 -1
- package/dist/peer-kit/ctpeer/__init__.py +1 -1
- package/dist/peer-kit/ctpeer/neutral.py +10 -10
- package/dist/premiere-uxp/lib/edit.js +94 -9
- package/dist/premiere-uxp/lib/markers.js +12 -11
- package/dist/premiere-uxp/lib/probe.js +6 -3
- package/dist/premiere-uxp/lib/verbs.js +1 -1
- package/dist/premiere-uxp/manifest.json +1 -1
- package/dist/{probe-F7WQHMIA.js → probe-72QZKMCC.js} +1 -1
- package/dist/{r3d-T5O6IIZZ.js → r3d-FX7V4BIE.js} +1 -1
- package/dist/{r3d-CXUNG6VS.js → r3d-I6EYEYX7.js} +1 -1
- package/dist/resolve-bridge.py +725 -88
- package/dist/sequence-patch-CN4VC5W3.js +3 -0
- package/dist/{still-P4JJNTEO.js → still-WUCFH2WX.js} +1 -1
- package/dist/{still-wasm-DN5LPASS.js → still-wasm-RTPOMH7S.js} +1 -1
- package/dist/store-H676BOKI.js +3 -0
- package/dist/{tiff-wasm-BPRDR6EB.js → tiff-wasm-N2S267IA.js} +1 -1
- package/dist/timeline-5TGA5HBY.js +3 -0
- package/dist/timeline_core-ZKQQHUA2.js +3 -0
- package/dist/wasm/media_core_bg.wasm +0 -0
- package/dist/wasm-threads/media_core_bg.wasm +0 -0
- package/dist/{wav-64SC6P7U.js → wav-HSCUCY4U.js} +1 -1
- package/package.json +10 -1
- package/dist/account-M53GEV7P.js +0 -3
- package/dist/bridge-SX5TW4LC.js +0 -3
- package/dist/chunk-5BSXYKLN.js +0 -20
- package/dist/chunk-623EA3TK.js +0 -6
- package/dist/chunk-AMRJXYL4.js +0 -3
- package/dist/chunk-DQGINJDV.js +0 -5
- package/dist/chunk-GK4YYKJ6.js +0 -19
- package/dist/chunk-GRQJGEGV.js +0 -378
- package/dist/chunk-HNBA43BF.js +0 -5
- package/dist/chunk-J2JXLEAI.js +0 -3
- package/dist/chunk-MWDF2R26.js +0 -7
- package/dist/chunk-NFJHWZJX.js +0 -3
- package/dist/chunk-PFISREY4.js +0 -3
- package/dist/chunk-PLRB2YXJ.js +0 -3
- package/dist/chunk-QVH44I66.js +0 -39
- package/dist/chunk-RJ6JA2LZ.js +0 -3
- package/dist/chunk-SGLQY53R.js +0 -3
- package/dist/chunk-VIBEEWPC.js +0 -10
- package/dist/chunk-WN53ARHJ.js +0 -3
- package/dist/chunk-XCKQHL4G.js +0 -9
- package/dist/claude-setup-IIWUB4CE.js +0 -5
- package/dist/conformtools-analyze +0 -0
- package/dist/conformtools-decode +0 -0
- package/dist/engine-P6H5P6HP.js +0 -5
- package/dist/framing-3XIVHSUZ.js +0 -3
- package/dist/host-relink-UWML4C7W.js +0 -10
- package/dist/hosts-SRS5TEM6.js +0 -3
- package/dist/i2o-transfer +0 -0
- package/dist/media_core-YZ3PABEG.js +0 -9
- package/dist/mxf-FJSRFLJC.js +0 -3
- package/dist/store-53BBZBND.js +0 -3
- package/dist/timeline-C3OZJBCZ.js +0 -3
- package/dist/timeline_core-IOENXK4Z.js +0 -3
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
import{a as T1}from"./chunk-IN6XVTUS.js";import{e as x1,f as w1,g as z1,i as P1,k as Un,o as k1}from"./chunk-6VP6G7CY.js";import{a as Qf}from"./chunk-PFZVET7S.js";import{b as N1,c as O1}from"./chunk-THVX57I3.js";import{a as fn}from"./chunk-IK6RKNS5.js";import{b as y1}from"./chunk-YUO3UWPH.js";import{b as Ho,c as ic,d as Gi,e as m1,g as p1}from"./chunk-JV7TZDKJ.js";import{b as v1}from"./chunk-ISKNIQVO.js";import{a as h1,b as oc}from"./chunk-JKOB3U54.js";import{b as b1}from"./chunk-EEDLRRKU.js";import{a as ac}from"./chunk-DKGGJM6Z.js";import{b as g1}from"./chunk-WJ5EWXP2.js";import{S as c1}from"./chunk-C2ESM27Z.js";import{a as Bf}from"./chunk-XDI6CPPV.js";import{b as S1,i as X1,p as j1}from"./chunk-N34DQ6MH.js";import{a as l1,b as Me,c as Uf,d as Te,f as Do}from"./chunk-NU3X7P4N.js";import{Ia as An,ba as f1,j as Yf,t as u1,u as d1}from"./chunk-DPA26AOI.js";import{w as s1}from"./chunk-S6KP52OG.js";import{a as xr,d as Kn,e as o1}from"./chunk-6NLB5TZ2.js";import{c as Gn,d as a1}from"./chunk-64X5DLH5.js";import{a as Je,b as i1}from"./chunk-PHAMF4JF.js";import{$,A as Ce,B as nc,D as Gf,F as e1,I as Kf,J as Ji,K as dt,L as Af,M as t1,N as r1,Y as Q,Z as Be,_ as rt,aa as n1,b as dn,c as Uw,d as Yw,h as Bw,l as Jf,m as Ke,o as Qw,p as _w,r as rc,s as Ii,t as Ht,u as $w,v as Ei,w as ut,x as Gt,y as Ci,z as Ee}from"./chunk-G3SZDPDS.js";import{a as Zr,c as Y,d as Mr,f as $4}from"./chunk-PSANHDZM.js";var Uo=Y((QE,km)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?km.exports={nextTick:WO}:km.exports=process;function WO(e,t,r,i){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,a,o;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,r)});case 4:return process.nextTick(function(){e.call(null,t,r,i)});default:for(a=new Array(n-1),o=0;o<a.length;)a[o++]=arguments[o];return process.nextTick(function(){e.apply(null,a)})}}});var K9=Y((_E,G9)=>{var LO={}.toString;G9.exports=Array.isArray||function(e){return LO.call(e)=="[object Array]"}});var Tm=Y(($E,A9)=>{A9.exports=Zr("stream")});var Yo=Y((Nm,Y9)=>{var wc=Zr("buffer"),Er=wc.Buffer;function U9(e,t){for(var r in e)t[r]=e[r]}Er.from&&Er.alloc&&Er.allocUnsafe&&Er.allocUnsafeSlow?Y9.exports=wc:(U9(wc,Nm),Nm.Buffer=Bi);function Bi(e,t,r){return Er(e,t,r)}U9(Er,Bi);Bi.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Er(e,t,r)};Bi.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=Er(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};Bi.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Er(e)};Bi.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return wc.SlowBuffer(e)}});var Qi=Y(ft=>{function VO(e){return Array.isArray?Array.isArray(e):zc(e)==="[object Array]"}ft.isArray=VO;function qO(e){return typeof e=="boolean"}ft.isBoolean=qO;function ZO(e){return e===null}ft.isNull=ZO;function MO(e){return e==null}ft.isNullOrUndefined=MO;function HO(e){return typeof e=="number"}ft.isNumber=HO;function DO(e){return typeof e=="string"}ft.isString=DO;function RO(e){return typeof e=="symbol"}ft.isSymbol=RO;function FO(e){return e===void 0}ft.isUndefined=FO;function IO(e){return zc(e)==="[object RegExp]"}ft.isRegExp=IO;function EO(e){return typeof e=="object"&&e!==null}ft.isObject=EO;function CO(e){return zc(e)==="[object Date]"}ft.isDate=CO;function JO(e){return zc(e)==="[object Error]"||e instanceof Error}ft.isError=JO;function GO(e){return typeof e=="function"}ft.isFunction=GO;function KO(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}ft.isPrimitive=KO;ft.isBuffer=Zr("buffer").Buffer.isBuffer;function zc(e){return Object.prototype.toString.call(e)}});var B9=Y((tC,Om)=>{typeof Object.create=="function"?Om.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Om.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var _i=Y((rC,Xm)=>{try{if(Sm=Zr("util"),typeof Sm.inherits!="function")throw"";Xm.exports=Sm.inherits}catch{Xm.exports=B9()}var Sm});var _9=Y((nC,jm)=>{"use strict";function AO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Q9=Yo().Buffer,Bo=Zr("util");function UO(e,t,r){e.copy(t,r)}jm.exports=(function(){function e(){AO(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},e.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},e.prototype.concat=function(r){if(this.length===0)return Q9.alloc(0);for(var i=Q9.allocUnsafe(r>>>0),n=this.head,a=0;n;)UO(n.data,i,a),a+=n.data.length,n=n.next;return i},e})();Bo&&Bo.inspect&&Bo.inspect.custom&&(jm.exports.prototype[Bo.inspect.custom]=function(){var e=Bo.inspect({length:this.length});return this.constructor.name+" "+e})});var Wm=Y((iC,$9)=>{"use strict";var Pc=Uo();function YO(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Pc.nextTick(kc,this,e)):Pc.nextTick(kc,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,Pc.nextTick(kc,r,a)):Pc.nextTick(kc,r,a):t&&t(a)}),this)}function BO(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function kc(e,t){e.emit("error",t)}$9.exports={destroy:YO,undestroy:BO}});var tz=Y((aC,ez)=>{ez.exports=Zr("util").deprecate});var Vm=Y((oC,cz)=>{"use strict";var $n=Uo();cz.exports=Ue;function nz(e){var t=this;this.next=null,this.entry=null,this.finish=function(){p5(t,e)}}var QO=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:$n.nextTick,$i;Ue.WritableState=_o;var iz=Object.create(Qi());iz.inherits=_i();var _O={deprecate:tz()},az=Tm(),Nc=Yo().Buffer,$O=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function e5(e){return Nc.from(e)}function t5(e){return Nc.isBuffer(e)||e instanceof $O}var oz=Wm();iz.inherits(Ue,az);function r5(){}function _o(e,t){$i=$i||ei(),e=e||{};var r=t instanceof $i;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=e.writableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=e.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){c5(t,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new nz(this)}_o.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(_o.prototype,"buffer",{get:_O.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Tc;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Tc=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ue,Symbol.hasInstance,{value:function(e){return Tc.call(this,e)?!0:this!==Ue?!1:e&&e._writableState instanceof _o}})):Tc=function(e){return e instanceof this};function Ue(e){if($i=$i||ei(),!Tc.call(Ue,this)&&!(this instanceof $i))return new Ue(e);this._writableState=new _o(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),az.call(this)}Ue.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function n5(e,t){var r=new Error("write after end");e.emit("error",r),$n.nextTick(t,r)}function i5(e,t,r,i){var n=!0,a=!1;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),$n.nextTick(i,a),n=!1),n}Ue.prototype.write=function(e,t,r){var i=this._writableState,n=!1,a=!i.objectMode&&t5(e);return a&&!Nc.isBuffer(e)&&(e=e5(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=r5),i.ended?n5(this,r):(a||i5(this,i,e,r))&&(i.pendingcb++,n=o5(this,i,a,e,t,r)),n};Ue.prototype.cork=function(){var e=this._writableState;e.corked++};Ue.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&sz(this,e))};Ue.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function a5(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Nc.from(t,r)),t}Object.defineProperty(Ue.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function o5(e,t,r,i,n,a){if(!r){var o=a5(t,i,n);i!==o&&(r=!0,n="buffer",i=o)}var s=t.objectMode?1:i.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Lm(e,t,!1,s,i,n,a);return c}function Lm(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function s5(e,t,r,i,n){--t.pendingcb,r?($n.nextTick(n,i),$n.nextTick(Qo,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),Qo(e,t))}function l5(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function c5(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(l5(r),t)s5(e,r,i,t,n);else{var a=lz(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&sz(e,r),i?QO(rz,e,r,a,n):rz(e,r,a,n)}}function rz(e,t,r,i){r||u5(e,t),t.pendingcb--,i(),Qo(e,t)}function u5(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function sz(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var o=0,s=!0;r;)n[o]=r,r.isBuf||(s=!1),r=r.next,o+=1;n.allBuffers=s,Lm(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new nz(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,u=r.callback,d=t.objectMode?1:c.length;if(Lm(e,t,!1,d,c,l,u),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}Ue.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};Ue.prototype._writev=null;Ue.prototype.end=function(e,t,r){var i=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||m5(this,i,r)};function lz(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function d5(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),Qo(e,t)})}function f5(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,$n.nextTick(d5,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function Qo(e,t){var r=lz(t);return r&&(f5(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function m5(e,t,r){t.ending=!0,Qo(e,t),r&&(t.finished?$n.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function p5(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(Ue.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Ue.prototype.destroy=oz.destroy;Ue.prototype._undestroy=oz.undestroy;Ue.prototype._destroy=function(e,t){this.end(),t(e)}});var ei=Y((sC,mz)=>{"use strict";var uz=Uo(),v5=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};mz.exports=Cr;var dz=Object.create(Qi());dz.inherits=_i();var fz=Mm(),Zm=Vm();dz.inherits(Cr,fz);for(qm=v5(Zm.prototype),Oc=0;Oc<qm.length;Oc++)Sc=qm[Oc],Cr.prototype[Sc]||(Cr.prototype[Sc]=Zm.prototype[Sc]);var qm,Sc,Oc;function Cr(e){if(!(this instanceof Cr))return new Cr(e);fz.call(this,e),Zm.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",h5)}Object.defineProperty(Cr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function h5(){this.allowHalfOpen||this._writableState.ended||uz.nextTick(b5,this)}function b5(e){e.end()}Object.defineProperty(Cr.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}});Cr.prototype._destroy=function(e,t){this.push(null),this.end(),uz.nextTick(t,e)}});var Rm=Y(vz=>{"use strict";var Dm=Yo().Buffer,pz=Dm.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g5(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function y5(e){var t=g5(e);if(typeof t!="string"&&(Dm.isEncoding===pz||!pz(e)))throw new Error("Unknown encoding: "+e);return t||e}vz.StringDecoder=$o;function $o(e){this.encoding=y5(e);var t;switch(this.encoding){case"utf16le":this.text=T5,this.end=N5,t=4;break;case"utf8":this.fillLast=z5,t=4;break;case"base64":this.text=O5,this.end=S5,t=3;break;default:this.write=X5,this.end=j5;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Dm.allocUnsafe(t)}$o.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};$o.prototype.end=k5;$o.prototype.text=P5;$o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Hm(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function x5(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Hm(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Hm(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Hm(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function w5(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function z5(e){var t=this.lastTotal-this.lastNeed,r=w5(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function P5(e,t){var r=x5(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function k5(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function T5(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function N5(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function O5(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function S5(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function X5(e){return e.toString(this.encoding)}function j5(e){return e&&e.length?this.write(e):""}});var Mm=Y((uC,Oz)=>{"use strict";var ta=Uo();Oz.exports=Ze;var W5=K9(),es;Ze.ReadableState=zz;var cC=Zr("events").EventEmitter,yz=function(e,t){return e.listeners(t).length},Jm=Tm(),ts=Yo().Buffer,L5=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function V5(e){return ts.from(e)}function q5(e){return ts.isBuffer(e)||e instanceof L5}var xz=Object.create(Qi());xz.inherits=_i();var Fm=Zr("util"),Ne=void 0;Fm&&Fm.debuglog?Ne=Fm.debuglog("stream"):Ne=function(){};var Z5=_9(),wz=Wm(),ea;xz.inherits(Ze,Jm);var Im=["error","close","destroy","pause","resume"];function M5(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):W5(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function zz(e,t){es=es||ei(),e=e||{};var r=t instanceof es;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=e.readableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Z5,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(ea||(ea=Rm().StringDecoder),this.decoder=new ea(e.encoding),this.encoding=e.encoding)}function Ze(e){if(es=es||ei(),!(this instanceof Ze))return new Ze(e);this._readableState=new zz(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Jm.call(this)}Object.defineProperty(Ze.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Ze.prototype.destroy=wz.destroy;Ze.prototype._undestroy=wz.undestroy;Ze.prototype._destroy=function(e,t){this.push(null),t(e)};Ze.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=ts.from(e,t),t=""),i=!0),Pz(this,e,t,!1,i)};Ze.prototype.unshift=function(e){return Pz(this,e,null,!0,!1)};function Pz(e,t,r,i,n){var a=e._readableState;if(t===null)a.reading=!1,F5(e,a);else{var o;n||(o=H5(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==ts.prototype&&(t=V5(t)),i?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):Em(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Em(e,a,t,!1):kz(e,a)):Em(e,a,t,!1))):i||(a.reading=!1)}return D5(a)}function Em(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Xc(e)),kz(e,t)}function H5(e,t){var r;return!q5(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function D5(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Ze.prototype.isPaused=function(){return this._readableState.flowing===!1};Ze.prototype.setEncoding=function(e){return ea||(ea=Rm().StringDecoder),this._readableState.decoder=new ea(e),this._readableState.encoding=e,this};var hz=8388608;function R5(e){return e>=hz?e=hz:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function bz(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=R5(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Ze.prototype.read=function(e){Ne("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Ne("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Cm(this):Xc(this),null;if(e=bz(e,t),e===0&&t.ended)return t.length===0&&Cm(this),null;var i=t.needReadable;Ne("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,Ne("length less than watermark",i)),t.ended||t.reading?(i=!1,Ne("reading or ended",i)):i&&(Ne("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=bz(r,t)));var n;return e>0?n=Tz(e,t):n=null,n===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Cm(this)),n!==null&&this.emit("data",n),n};function F5(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,Xc(e)}}function Xc(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Ne("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?ta.nextTick(gz,e):gz(e))}function gz(e){Ne("emit readable"),e.emit("readable"),Gm(e)}function kz(e,t){t.readingMore||(t.readingMore=!0,ta.nextTick(I5,e,t))}function I5(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Ne("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}Ze.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Ze.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,Ne("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=n?s:h;i.endEmitted?ta.nextTick(a):r.once("end",a),e.on("unpipe",o);function o(b,g){Ne("onunpipe"),b===r&&g&&g.hasUnpiped===!1&&(g.hasUnpiped=!0,u())}function s(){Ne("onend"),e.end()}var c=E5(r);e.on("drain",c);var l=!1;function u(){Ne("cleanup"),e.removeListener("close",p),e.removeListener("finish",v),e.removeListener("drain",c),e.removeListener("error",f),e.removeListener("unpipe",o),r.removeListener("end",s),r.removeListener("end",h),r.removeListener("data",m),l=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c()}var d=!1;r.on("data",m);function m(b){Ne("ondata"),d=!1;var g=e.write(b);g===!1&&!d&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&Nz(i.pipes,e)!==-1)&&!l&&(Ne("false write response, pause",i.awaitDrain),i.awaitDrain++,d=!0),r.pause())}function f(b){Ne("onerror",b),h(),e.removeListener("error",f),yz(e,"error")===0&&e.emit("error",b)}M5(e,"error",f);function p(){e.removeListener("finish",v),h()}e.once("close",p);function v(){Ne("onfinish"),e.removeListener("close",p),h()}e.once("finish",v);function h(){Ne("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(Ne("pipe resume"),r.resume()),e};function E5(e){return function(){var t=e._readableState;Ne("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&yz(e,"data")&&(t.flowing=!0,Gm(e))}}Ze.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=Nz(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};Ze.prototype.on=function(e,t){var r=Jm.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&Xc(this):ta.nextTick(C5,this))}return r};Ze.prototype.addListener=Ze.prototype.on;function C5(e){Ne("readable nexttick read 0"),e.read(0)}Ze.prototype.resume=function(){var e=this._readableState;return e.flowing||(Ne("resume"),e.flowing=!0,J5(this,e)),this};function J5(e,t){t.resumeScheduled||(t.resumeScheduled=!0,ta.nextTick(G5,e,t))}function G5(e,t){t.reading||(Ne("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Gm(e),t.flowing&&!t.reading&&e.read(0)}Ze.prototype.pause=function(){return Ne("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ne("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Gm(e){var t=e._readableState;for(Ne("flow",t.flowing);t.flowing&&e.read()!==null;);}Ze.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(Ne("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(Ne("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(o){return function(){return e[o].apply(e,arguments)}})(n));for(var a=0;a<Im.length;a++)e.on(Im[a],this.emit.bind(this,Im[a]));return this._read=function(o){Ne("wrapped _read",o),i&&(i=!1,e.resume())},this};Object.defineProperty(Ze.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Ze._fromList=Tz;function Tz(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=K5(e,t.buffer,t.decoder),r}function K5(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?i=t.shift():i=r?A5(e,t):U5(e,t),i}function A5(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),e-=o,e===0){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function U5(e,t){var r=ts.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),e-=o,e===0){o===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++n}return t.length-=n,r}function Cm(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,ta.nextTick(Y5,t,e))}function Y5(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Nz(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var Km=Y((dC,jz)=>{"use strict";jz.exports=Jr;var jc=ei(),Xz=Object.create(Qi());Xz.inherits=_i();Xz.inherits(Jr,jc);function B5(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Jr(e){if(!(this instanceof Jr))return new Jr(e);jc.call(this,e),this._transformState={afterTransform:B5.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Q5)}function Q5(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){Sz(e,t,r)}):Sz(this,null,null)}Jr.prototype.push=function(e,t){return this._transformState.needTransform=!1,jc.prototype.push.call(this,e,t)};Jr.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};Jr.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Jr.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Jr.prototype._destroy=function(e,t){var r=this;jc.prototype._destroy.call(this,e,function(i){t(i),r.emit("close")})};function Sz(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var qz=Y((fC,Vz)=>{"use strict";Vz.exports=rs;var Wz=Km(),Lz=Object.create(Qi());Lz.inherits=_i();Lz.inherits(rs,Wz);function rs(e){if(!(this instanceof rs))return new rs(e);Wz.call(this,e)}rs.prototype._transform=function(e,t,r){r(null,e)}});var Am=Y((it,Wc)=>{var zr=Zr("stream");process.env.READABLE_STREAM==="disable"&&zr?(Wc.exports=zr,it=Wc.exports=zr.Readable,it.Readable=zr.Readable,it.Writable=zr.Writable,it.Duplex=zr.Duplex,it.Transform=zr.Transform,it.PassThrough=zr.PassThrough,it.Stream=zr):(it=Wc.exports=Mm(),it.Stream=zr||it,it.Readable=it,it.Writable=Vm(),it.Duplex=ei(),it.Transform=Km(),it.PassThrough=qz())});var Gr=Y(Dt=>{"use strict";Dt.base64=!0;Dt.array=!0;Dt.string=!0;Dt.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";Dt.nodebuffer=typeof Buffer<"u";Dt.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")Dt.blob=!1;else{Um=new ArrayBuffer(0);try{Dt.blob=new Blob([Um],{type:"application/zip"}).size===0}catch{try{Zz=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Ym=new Zz,Ym.append(Um),Dt.blob=Ym.getBlob("application/zip").size===0}catch{Dt.blob=!1}}}var Um,Zz,Ym;try{Dt.nodestream=!!Am().Readable}catch{Dt.nodestream=!1}});var Qm=Y(Bm=>{"use strict";var _5=Ie(),$5=Gr(),Pr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Bm.encode=function(e){for(var t=[],r,i,n,a,o,s,c,l=0,u=e.length,d=u,m=_5.getTypeOf(e)!=="string";l<e.length;)d=u-l,m?(r=e[l++],i=l<u?e[l++]:0,n=l<u?e[l++]:0):(r=e.charCodeAt(l++),i=l<u?e.charCodeAt(l++):0,n=l<u?e.charCodeAt(l++):0),a=r>>2,o=(r&3)<<4|i>>4,s=d>1?(i&15)<<2|n>>6:64,c=d>2?n&63:64,t.push(Pr.charAt(a)+Pr.charAt(o)+Pr.charAt(s)+Pr.charAt(c));return t.join("")};Bm.decode=function(e){var t,r,i,n,a,o,s,c=0,l=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var d=e.length*3/4;if(e.charAt(e.length-1)===Pr.charAt(64)&&d--,e.charAt(e.length-2)===Pr.charAt(64)&&d--,d%1!==0)throw new Error("Invalid base64 input, bad content length.");var m;for($5.uint8array?m=new Uint8Array(d|0):m=new Array(d|0);c<e.length;)n=Pr.indexOf(e.charAt(c++)),a=Pr.indexOf(e.charAt(c++)),o=Pr.indexOf(e.charAt(c++)),s=Pr.indexOf(e.charAt(c++)),t=n<<2|a>>4,r=(a&15)<<4|o>>2,i=(o&3)<<6|s,m[l++]=t,o!==64&&(m[l++]=r),s!==64&&(m[l++]=i);return m}});var ns=Y((vC,Mz)=>{"use strict";Mz.exports={isNode:typeof Buffer<"u",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}}});var Fz=Y((hC,Rz)=>{"use strict";var Hz=global.MutationObserver||global.WebKitMutationObserver,ra;process.browser?Hz?(_m=0,Dz=new Hz(is),$m=global.document.createTextNode(""),Dz.observe($m,{characterData:!0}),ra=function(){$m.data=_m=++_m%2}):!global.setImmediate&&typeof global.MessageChannel<"u"?(ep=new global.MessageChannel,ep.port1.onmessage=is,ra=function(){ep.port2.postMessage(0)}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?ra=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){is(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},global.document.documentElement.appendChild(e)}:ra=function(){setTimeout(is,0)}:ra=function(){process.nextTick(is)};var _m,Dz,$m,ep,tp,as=[];function is(){tp=!0;for(var e,t,r=as.length;r;){for(t=as,as=[],e=-1;++e<r;)t[e]();r=as.length}tp=!1}Rz.exports=eS;function eS(e){as.push(e)===1&&!tp&&ra()}});var Az=Y((bC,Kz)=>{"use strict";var Iz=Fz();function na(){}var mt={},Ez=["REJECTED"],rp=["FULFILLED"],Cz=["PENDING"];process.browser||(os=["UNHANDLED"]);var os;Kz.exports=pn;function pn(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=Cz,this.queue=[],this.outcome=void 0,process.browser||(this.handled=os),e!==na&&Jz(this,e)}pn.prototype.finally=function(e){if(typeof e!="function")return this;var t=this.constructor;return this.then(r,i);function r(n){function a(){return n}return t.resolve(e()).then(a)}function i(n){function a(){throw n}return t.resolve(e()).then(a)}};pn.prototype.catch=function(e){return this.then(null,e)};pn.prototype.then=function(e,t){if(typeof e!="function"&&this.state===rp||typeof t!="function"&&this.state===Ez)return this;var r=new this.constructor(na);if(process.browser||this.handled===os&&(this.handled=null),this.state!==Cz){var i=this.state===rp?e:t;np(r,i,this.outcome)}else this.queue.push(new ss(r,e,t));return r};function ss(e,t,r){this.promise=e,typeof t=="function"&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof r=="function"&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}ss.prototype.callFulfilled=function(e){mt.resolve(this.promise,e)};ss.prototype.otherCallFulfilled=function(e){np(this.promise,this.onFulfilled,e)};ss.prototype.callRejected=function(e){mt.reject(this.promise,e)};ss.prototype.otherCallRejected=function(e){np(this.promise,this.onRejected,e)};function np(e,t,r){Iz(function(){var i;try{i=t(r)}catch(n){return mt.reject(e,n)}i===e?mt.reject(e,new TypeError("Cannot resolve promise with itself")):mt.resolve(e,i)})}mt.resolve=function(e,t){var r=Gz(tS,t);if(r.status==="error")return mt.reject(e,r.value);var i=r.value;if(i)Jz(e,i);else{e.state=rp,e.outcome=t;for(var n=-1,a=e.queue.length;++n<a;)e.queue[n].callFulfilled(t)}return e};mt.reject=function(e,t){e.state=Ez,e.outcome=t,process.browser||e.handled===os&&Iz(function(){e.handled===os&&process.emit("unhandledRejection",t,e)});for(var r=-1,i=e.queue.length;++r<i;)e.queue[r].callRejected(t);return e};function tS(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments)}}function Jz(e,t){var r=!1;function i(s){r||(r=!0,mt.reject(e,s))}function n(s){r||(r=!0,mt.resolve(e,s))}function a(){t(n,i)}var o=Gz(a);o.status==="error"&&i(o.value)}function Gz(e,t){var r={};try{r.value=e(t),r.status="success"}catch(i){r.status="error",r.value=i}return r}pn.resolve=rS;function rS(e){return e instanceof this?e:mt.resolve(new this(na),e)}pn.reject=nS;function nS(e){var t=new this(na);return mt.reject(t,e)}pn.all=iS;function iS(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,i=!1;if(!r)return this.resolve([]);for(var n=new Array(r),a=0,o=-1,s=new this(na);++o<r;)c(e[o],o);return s;function c(l,u){t.resolve(l).then(d,function(m){i||(i=!0,mt.reject(s,m))});function d(m){n[u]=m,++a===r&&!i&&(i=!0,mt.resolve(s,n))}}}pn.race=aS;function aS(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,i=!1;if(!r)return this.resolve([]);for(var n=-1,a=new this(na);++n<r;)o(e[n]);return a;function o(s){t.resolve(s).then(function(c){i||(i=!0,mt.resolve(a,c))},function(c){i||(i=!0,mt.reject(a,c))})}}});var ia=Y((gC,Uz)=>{"use strict";var ip=null;typeof Promise<"u"?ip=Promise:ip=Az();Uz.exports={Promise:ip}});var Bz=Y(Yz=>{(function(e,t){"use strict";if(e.setImmediate)return;var r=1,i={},n=!1,a=e.document,o;function s(g){typeof g!="function"&&(g=new Function(""+g));for(var y=new Array(arguments.length-1),x=0;x<y.length;x++)y[x]=arguments[x+1];var z={callback:g,args:y};return i[r]=z,o(r),r++}function c(g){delete i[g]}function l(g){var y=g.callback,x=g.args;switch(x.length){case 0:y();break;case 1:y(x[0]);break;case 2:y(x[0],x[1]);break;case 3:y(x[0],x[1],x[2]);break;default:y.apply(t,x);break}}function u(g){if(n)setTimeout(u,0,g);else{var y=i[g];if(y){n=!0;try{l(y)}finally{c(g),n=!1}}}}function d(){o=function(g){process.nextTick(function(){u(g)})}}function m(){if(e.postMessage&&!e.importScripts){var g=!0,y=e.onmessage;return e.onmessage=function(){g=!1},e.postMessage("","*"),e.onmessage=y,g}}function f(){var g="setImmediate$"+Math.random()+"$",y=function(x){x.source===e&&typeof x.data=="string"&&x.data.indexOf(g)===0&&u(+x.data.slice(g.length))};e.addEventListener?e.addEventListener("message",y,!1):e.attachEvent("onmessage",y),o=function(x){e.postMessage(g+x,"*")}}function p(){var g=new MessageChannel;g.port1.onmessage=function(y){var x=y.data;u(x)},o=function(y){g.port2.postMessage(y)}}function v(){var g=a.documentElement;o=function(y){var x=a.createElement("script");x.onreadystatechange=function(){u(y),x.onreadystatechange=null,g.removeChild(x),x=null},g.appendChild(x)}}function h(){o=function(g){setTimeout(u,0,g)}}var b=Object.getPrototypeOf&&Object.getPrototypeOf(e);b=b&&b.setTimeout?b:e,{}.toString.call(e.process)==="[object process]"?d():m()?f():e.MessageChannel?p():a&&"onreadystatechange"in a.createElement("script")?v():h(),b.setImmediate=s,b.clearImmediate=c})(typeof self>"u"?typeof global>"u"?Yz:global:self)});var Ie=Y(Ye=>{"use strict";var vn=Gr(),oS=Qm(),aa=ns(),ap=ia();Bz();function sS(e){var t=null;return vn.uint8array?t=new Uint8Array(e.length):t=new Array(e.length),Vc(e,t)}Ye.newBlob=function(e,t){Ye.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,i=new r;return i.append(e),i.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};function ls(e){return e}function Vc(e,t){for(var r=0;r<e.length;++r)t[r]=e.charCodeAt(r)&255;return t}var Lc={stringifyByChunk:function(e,t,r){var i=[],n=0,a=e.length;if(a<=r)return String.fromCharCode.apply(null,e);for(;n<a;)t==="array"||t==="nodebuffer"?i.push(String.fromCharCode.apply(null,e.slice(n,Math.min(n+r,a)))):i.push(String.fromCharCode.apply(null,e.subarray(n,Math.min(n+r,a)))),n+=r;return i.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:(function(){try{return vn.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return vn.nodebuffer&&String.fromCharCode.apply(null,aa.allocBuffer(1)).length===1}catch{return!1}})()}};function cs(e){var t=65536,r=Ye.getTypeOf(e),i=!0;if(r==="uint8array"?i=Lc.applyCanBeUsed.uint8array:r==="nodebuffer"&&(i=Lc.applyCanBeUsed.nodebuffer),i)for(;t>1;)try{return Lc.stringifyByChunk(e,r,t)}catch{t=Math.floor(t/2)}return Lc.stringifyByChar(e)}Ye.applyFromCharCode=cs;function qc(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}var hn={};hn.string={string:ls,array:function(e){return Vc(e,new Array(e.length))},arraybuffer:function(e){return hn.string.uint8array(e).buffer},uint8array:function(e){return Vc(e,new Uint8Array(e.length))},nodebuffer:function(e){return Vc(e,aa.allocBuffer(e.length))}};hn.array={string:cs,array:ls,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return aa.newBufferFrom(e)}};hn.arraybuffer={string:function(e){return cs(new Uint8Array(e))},array:function(e){return qc(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:ls,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return aa.newBufferFrom(new Uint8Array(e))}};hn.uint8array={string:cs,array:function(e){return qc(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:ls,nodebuffer:function(e){return aa.newBufferFrom(e)}};hn.nodebuffer={string:cs,array:function(e){return qc(e,new Array(e.length))},arraybuffer:function(e){return hn.nodebuffer.uint8array(e).buffer},uint8array:function(e){return qc(e,new Uint8Array(e.length))},nodebuffer:ls};Ye.transformTo=function(e,t){if(t||(t=""),!e)return t;Ye.checkSupport(e);var r=Ye.getTypeOf(t),i=hn[r][e](t);return i};Ye.resolve=function(e){for(var t=e.split("/"),r=[],i=0;i<t.length;i++){var n=t[i];n==="."||n===""&&i!==0&&i!==t.length-1||(n===".."?r.pop():r.push(n))}return r.join("/")};Ye.getTypeOf=function(e){if(typeof e=="string")return"string";if(Object.prototype.toString.call(e)==="[object Array]")return"array";if(vn.nodebuffer&&aa.isBuffer(e))return"nodebuffer";if(vn.uint8array&&e instanceof Uint8Array)return"uint8array";if(vn.arraybuffer&&e instanceof ArrayBuffer)return"arraybuffer"};Ye.checkSupport=function(e){var t=vn[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this platform")};Ye.MAX_VALUE_16BITS=65535;Ye.MAX_VALUE_32BITS=-1;Ye.pretty=function(e){var t="",r,i;for(i=0;i<(e||"").length;i++)r=e.charCodeAt(i),t+="\\x"+(r<16?"0":"")+r.toString(16).toUpperCase();return t};Ye.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[])})};Ye.inherits=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r};Ye.extend=function(){var e={},t,r;for(t=0;t<arguments.length;t++)for(r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&typeof e[r]>"u"&&(e[r]=arguments[t][r]);return e};Ye.prepareContent=function(e,t,r,i,n){var a=ap.Promise.resolve(t).then(function(o){var s=vn.blob&&(o instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(o))!==-1);return s&&typeof FileReader<"u"?new ap.Promise(function(c,l){var u=new FileReader;u.onload=function(d){c(d.target.result)},u.onerror=function(d){l(d.target.error)},u.readAsArrayBuffer(o)}):o});return a.then(function(o){var s=Ye.getTypeOf(o);return s?(s==="arraybuffer"?o=Ye.transformTo("uint8array",o):s==="string"&&(n?o=oS.decode(o):r&&i!==!0&&(o=sS(o))),o):ap.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}});var Rt=Y((wC,_z)=>{"use strict";function Qz(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}Qz.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return this.isFinished?!1:(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(r){t.processChunk(r)}),e.on("end",function(){t.end()}),e.on("error",function(r){t.error(r)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};_z.exports=Qz});var sa=Y(bn=>{"use strict";var oa=Ie(),ti=Gr(),lS=ns(),Zc=Rt(),us=new Array(256);for(Kr=0;Kr<256;Kr++)us[Kr]=Kr>=252?6:Kr>=248?5:Kr>=240?4:Kr>=224?3:Kr>=192?2:1;var Kr;us[254]=us[254]=1;var cS=function(e){var t,r,i,n,a,o=e.length,s=0;for(n=0;n<o;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(ti.uint8array?t=new Uint8Array(s):t=new Array(s),a=0,n=0;a<s;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t},uS=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+us[e[r]]>t?r:t},dS=function(e){var t,r,i,n,a=e.length,o=new Array(a*2);for(r=0,t=0;t<a;){if(i=e[t++],i<128){o[r++]=i;continue}if(n=us[i],n>4){o[r++]=65533,t+=n-1;continue}for(i&=n===2?31:n===3?15:7;n>1&&t<a;)i=i<<6|e[t++]&63,n--;if(n>1){o[r++]=65533;continue}i<65536?o[r++]=i:(i-=65536,o[r++]=55296|i>>10&1023,o[r++]=56320|i&1023)}return o.length!==r&&(o.subarray?o=o.subarray(0,r):o.length=r),oa.applyFromCharCode(o)};bn.utf8encode=function(t){return ti.nodebuffer?lS.newBufferFrom(t,"utf-8"):cS(t)};bn.utf8decode=function(t){return ti.nodebuffer?oa.transformTo("nodebuffer",t).toString("utf-8"):(t=oa.transformTo(ti.uint8array?"uint8array":"array",t),dS(t))};function Mc(){Zc.call(this,"utf-8 decode"),this.leftOver=null}oa.inherits(Mc,Zc);Mc.prototype.processChunk=function(e){var t=oa.transformTo(ti.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(ti.uint8array){var r=t;t=new Uint8Array(r.length+this.leftOver.length),t.set(this.leftOver,0),t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var i=uS(t),n=t;i!==t.length&&(ti.uint8array?(n=t.subarray(0,i),this.leftOver=t.subarray(i,t.length)):(n=t.slice(0,i),this.leftOver=t.slice(i,t.length))),this.push({data:bn.utf8decode(n),meta:e.meta})};Mc.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:bn.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)};bn.Utf8DecodeWorker=Mc;function op(){Zc.call(this,"utf-8 encode")}oa.inherits(op,Zc);op.prototype.processChunk=function(e){this.push({data:bn.utf8encode(e.data),meta:e.meta})};bn.Utf8EncodeWorker=op});var rP=Y((PC,tP)=>{"use strict";var $z=Rt(),eP=Ie();function sp(e){$z.call(this,"ConvertWorker to "+e),this.destType=e}eP.inherits(sp,$z);sp.prototype.processChunk=function(e){this.push({data:eP.transformTo(this.destType,e.data),meta:e.meta})};tP.exports=sp});var aP=Y((kC,iP)=>{"use strict";var nP=Am().Readable,fS=Ie();fS.inherits(lp,nP);function lp(e,t,r){nP.call(this,t),this._helper=e;var i=this;e.on("data",function(n,a){i.push(n)||i._helper.pause(),r&&r(a)}).on("error",function(n){i.emit("error",n)}).on("end",function(){i.push(null)})}lp.prototype._read=function(){this._helper.resume()};iP.exports=lp});var cp=Y((TC,lP)=>{"use strict";var ri=Ie(),mS=rP(),pS=Rt(),vS=Qm(),hS=Gr(),bS=ia(),oP=null;if(hS.nodestream)try{oP=aP()}catch{}function gS(e,t,r){switch(e){case"blob":return ri.newBlob(ri.transformTo("arraybuffer",t),r);case"base64":return vS.encode(t);default:return ri.transformTo(e,t)}}function yS(e,t){var r,i=0,n=null,a=0;for(r=0;r<t.length;r++)a+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(n=new Uint8Array(a),r=0;r<t.length;r++)n.set(t[r],i),i+=t[r].length;return n;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}function xS(e,t){return new bS.Promise(function(r,i){var n=[],a=e._internalType,o=e._outputType,s=e._mimeType;e.on("data",function(c,l){n.push(c),t&&t(l)}).on("error",function(c){n=[],i(c)}).on("end",function(){try{var c=gS(o,yS(a,n),s);r(c)}catch(l){i(l)}n=[]}).resume()})}function sP(e,t,r){var i=t;switch(t){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string";break}try{this._internalType=i,this._outputType=t,this._mimeType=r,ri.checkSupport(i),this._worker=e.pipe(new mS(i)),e.lock()}catch(n){this._worker=new pS("error"),this._worker.error(n)}}sP.prototype={accumulate:function(e){return xS(this,e)},on:function(e,t){var r=this;return e==="data"?this._worker.on(e,function(i){t.call(r,i.data,i.meta)}):this._worker.on(e,function(){ri.delay(t,arguments,r)}),this},resume:function(){return ri.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(ri.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new oP(this,{objectMode:this._outputType!=="nodebuffer"},e)}};lP.exports=sP});var up=Y(ir=>{"use strict";ir.base64=!1;ir.binary=!1;ir.dir=!1;ir.createFolders=!0;ir.date=null;ir.compression=null;ir.compressionOptions=null;ir.comment=null;ir.unixPermissions=null;ir.dosPermissions=null});var dp=Y((OC,cP)=>{"use strict";var Hc=Ie(),Dc=Rt(),wS=16*1024;function la(e){Dc.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(r){t.dataIsReady=!0,t.data=r,t.max=r&&r.length||0,t.type=Hc.getTypeOf(r),t.isPaused||t._tickAndRepeat()},function(r){t.error(r)})}Hc.inherits(la,Dc);la.prototype.cleanUp=function(){Dc.prototype.cleanUp.call(this),this.data=null};la.prototype.resume=function(){return Dc.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,Hc.delay(this._tickAndRepeat,[],this)),!0):!1};la.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(Hc.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))};la.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=wS,t=null,r=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,r);break;case"uint8array":t=this.data.subarray(this.index,r);break;case"array":case"nodebuffer":t=this.data.slice(this.index,r);break}return this.index=r,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})};cP.exports=la});var Rc=Y((SC,dP)=>{"use strict";var zS=Ie();function PS(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var uP=PS();function kS(e,t,r,i){var n=uP,a=i+r;e=e^-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}function TS(e,t,r,i){var n=uP,a=i+r;e=e^-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t.charCodeAt(o))&255];return e^-1}dP.exports=function(t,r){if(typeof t>"u"||!t.length)return 0;var i=zS.getTypeOf(t)!=="string";return i?kS(r|0,t,t.length,0):TS(r|0,t,t.length,0)}});var mp=Y((XC,mP)=>{"use strict";var fP=Rt(),NS=Rc(),OS=Ie();function fp(){fP.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}OS.inherits(fp,fP);fp.prototype.processChunk=function(e){this.streamInfo.crc32=NS(e.data,this.streamInfo.crc32||0),this.push(e)};mP.exports=fp});var vP=Y((jC,pP)=>{"use strict";var SS=Ie(),pp=Rt();function vp(e){pp.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}SS.inherits(vp,pp);vp.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}pp.prototype.processChunk.call(this,e)};pP.exports=vp});var Fc=Y((WC,gP)=>{"use strict";var hP=ia(),bP=dp(),XS=mp(),hp=vP();function bp(e,t,r,i,n){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=i,this.compressedContent=n}bp.prototype={getContentWorker:function(){var e=new bP(hP.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new hp("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new bP(hP.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};bp.createWorkerFrom=function(e,t,r){return e.pipe(new XS).pipe(new hp("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new hp("compressedSize")).withStreamInfo("compression",t)};gP.exports=bp});var zP=Y((LC,wP)=>{"use strict";var jS=cp(),WS=dp(),gp=sa(),yp=Fc(),yP=Rt(),xp=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};xp.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");r=e.toLowerCase();var i=r==="string"||r==="text";(r==="binarystring"||r==="text")&&(r="string"),t=this._decompressWorker();var n=!this._dataBinary;n&&!i&&(t=t.pipe(new gp.Utf8EncodeWorker)),!n&&i&&(t=t.pipe(new gp.Utf8DecodeWorker))}catch(a){t=new yP("error"),t.error(a)}return new jS(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof yp&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new gp.Utf8EncodeWorker)),yp.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof yp?this._data.getContentWorker():this._data instanceof yP?this._data:new WS(this._data)}};var xP=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],LS=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(Ic=0;Ic<xP.length;Ic++)xp.prototype[xP[Ic]]=LS;var Ic;wP.exports=xp});var Ar=Y(ht=>{"use strict";var VS=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function qS(e,t){return Object.prototype.hasOwnProperty.call(e,t)}ht.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var i in r)qS(r,i)&&(e[i]=r[i])}}return e};ht.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var ZS={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+i),n);return}for(var a=0;a<i;a++)e[n+a]=t[r+a]},flattenChunks:function(e){var t,r,i,n,a,o;for(i=0,t=0,r=e.length;t<r;t++)i+=e[t].length;for(o=new Uint8Array(i),n=0,t=0,r=e.length;t<r;t++)a=e[t],o.set(a,n),n+=a.length;return o}},MS={arraySet:function(e,t,r,i,n){for(var a=0;a<i;a++)e[n+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};ht.setTyped=function(e){e?(ht.Buf8=Uint8Array,ht.Buf16=Uint16Array,ht.Buf32=Int32Array,ht.assign(ht,ZS)):(ht.Buf8=Array,ht.Buf16=Array,ht.Buf32=Array,ht.assign(ht,MS))};ht.setTyped(VS)});var GP=Y(da=>{"use strict";var HS=Ar(),DS=4,PP=0,kP=1,RS=2;function ua(e){for(var t=e.length;--t>=0;)e[t]=0}var FS=0,jP=1,IS=2,ES=3,CS=258,Op=29,hs=256,fs=hs+1+Op,ca=30,Sp=19,WP=2*fs+1,ni=15,wp=16,JS=7,Xp=256,LP=16,VP=17,qP=18,Tp=[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],Ec=[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],GS=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ZP=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],KS=512,Ur=new Array((fs+2)*2);ua(Ur);var ds=new Array(ca*2);ua(ds);var ms=new Array(KS);ua(ms);var ps=new Array(CS-ES+1);ua(ps);var jp=new Array(Op);ua(jp);var Cc=new Array(ca);ua(Cc);function zp(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length}var MP,HP,DP;function Pp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function RP(e){return e<256?ms[e]:ms[256+(e>>>7)]}function vs(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function St(e,t,r){e.bi_valid>wp-r?(e.bi_buf|=t<<e.bi_valid&65535,vs(e,e.bi_buf),e.bi_buf=t>>wp-e.bi_valid,e.bi_valid+=r-wp):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function kr(e,t,r){St(e,r[t*2],r[t*2+1])}function FP(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function AS(e){e.bi_valid===16?(vs(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function US(e,t){var r=t.dyn_tree,i=t.max_code,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,m,f,p,v=0;for(m=0;m<=ni;m++)e.bl_count[m]=0;for(r[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<WP;l++)u=e.heap[l],m=r[r[u*2+1]*2+1]+1,m>c&&(m=c,v++),r[u*2+1]=m,!(u>i)&&(e.bl_count[m]++,f=0,u>=s&&(f=o[u-s]),p=r[u*2],e.opt_len+=p*(m+f),a&&(e.static_len+=p*(n[u*2+1]+f)));if(v!==0){do{for(m=c-1;e.bl_count[m]===0;)m--;e.bl_count[m]--,e.bl_count[m+1]+=2,e.bl_count[c]--,v-=2}while(v>0);for(m=c;m!==0;m--)for(u=e.bl_count[m];u!==0;)d=e.heap[--l],!(d>i)&&(r[d*2+1]!==m&&(e.opt_len+=(m-r[d*2+1])*r[d*2],r[d*2+1]=m),u--)}}function IP(e,t,r){var i=new Array(ni+1),n=0,a,o;for(a=1;a<=ni;a++)i[a]=n=n+r[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=FP(i[s]++,s))}}function YS(){var e,t,r,i,n,a=new Array(ni+1);for(r=0,i=0;i<Op-1;i++)for(jp[i]=r,e=0;e<1<<Tp[i];e++)ps[r++]=i;for(ps[r-1]=i,n=0,i=0;i<16;i++)for(Cc[i]=n,e=0;e<1<<Ec[i];e++)ms[n++]=i;for(n>>=7;i<ca;i++)for(Cc[i]=n<<7,e=0;e<1<<Ec[i]-7;e++)ms[256+n++]=i;for(t=0;t<=ni;t++)a[t]=0;for(e=0;e<=143;)Ur[e*2+1]=8,e++,a[8]++;for(;e<=255;)Ur[e*2+1]=9,e++,a[9]++;for(;e<=279;)Ur[e*2+1]=7,e++,a[7]++;for(;e<=287;)Ur[e*2+1]=8,e++,a[8]++;for(IP(Ur,fs+1,a),e=0;e<ca;e++)ds[e*2+1]=5,ds[e*2]=FP(e,5);MP=new zp(Ur,Tp,hs+1,fs,ni),HP=new zp(ds,Ec,0,ca,ni),DP=new zp(new Array(0),GS,0,Sp,JS)}function EP(e){var t;for(t=0;t<fs;t++)e.dyn_ltree[t*2]=0;for(t=0;t<ca;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Sp;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Xp*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function CP(e){e.bi_valid>8?vs(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function BS(e,t,r,i){CP(e),i&&(vs(e,r),vs(e,~r)),HS.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function TP(e,t,r,i){var n=t*2,a=r*2;return e[n]<e[a]||e[n]===e[a]&&i[t]<=i[r]}function kp(e,t,r){for(var i=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&TP(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!TP(t,i,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=i}function NP(e,t,r){var i,n,a=0,o,s;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],n=e.pending_buf[e.l_buf+a],a++,i===0?kr(e,n,t):(o=ps[n],kr(e,o+hs+1,t),s=Tp[o],s!==0&&(n-=jp[o],St(e,n,s)),i--,o=RP(i),kr(e,o,r),s=Ec[o],s!==0&&(i-=Cc[o],St(e,i,s)));while(a<e.last_lit);kr(e,Xp,t)}function Np(e,t){var r=t.dyn_tree,i=t.stat_desc.static_tree,n=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=WP,o=0;o<a;o++)r[o*2]!==0?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):r[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,r[l*2]=1,e.depth[l]=0,e.opt_len--,n&&(e.static_len-=i[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)kp(e,r,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],kp(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[l*2]=r[o*2]+r[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[o*2+1]=r[s*2+1]=l,e.heap[1]=l++,kp(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],US(e,t),IP(r,c,e.bl_count)}function OP(e,t,r){var i,n=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(r+1)*2+1]=65535,i=0;i<=r;i++)a=o,o=t[(i+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==n&&e.bl_tree[a*2]++,e.bl_tree[LP*2]++):s<=10?e.bl_tree[VP*2]++:e.bl_tree[qP*2]++,s=0,n=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))}function SP(e,t,r){var i,n=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),i=0;i<=r;i++)if(a=o,o=t[(i+1)*2+1],!(++s<c&&a===o)){if(s<l)do kr(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==n&&(kr(e,a,e.bl_tree),s--),kr(e,LP,e.bl_tree),St(e,s-3,2)):s<=10?(kr(e,VP,e.bl_tree),St(e,s-3,3)):(kr(e,qP,e.bl_tree),St(e,s-11,7));s=0,n=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}}function QS(e){var t;for(OP(e,e.dyn_ltree,e.l_desc.max_code),OP(e,e.dyn_dtree,e.d_desc.max_code),Np(e,e.bl_desc),t=Sp-1;t>=3&&e.bl_tree[ZP[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function _S(e,t,r,i){var n;for(St(e,t-257,5),St(e,r-1,5),St(e,i-4,4),n=0;n<i;n++)St(e,e.bl_tree[ZP[n]*2+1],3);SP(e,e.dyn_ltree,t-1),SP(e,e.dyn_dtree,r-1)}function $S(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return PP;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return kP;for(r=32;r<hs;r++)if(e.dyn_ltree[r*2]!==0)return kP;return PP}var XP=!1;function eX(e){XP||(YS(),XP=!0),e.l_desc=new Pp(e.dyn_ltree,MP),e.d_desc=new Pp(e.dyn_dtree,HP),e.bl_desc=new Pp(e.bl_tree,DP),e.bi_buf=0,e.bi_valid=0,EP(e)}function JP(e,t,r,i){St(e,(FS<<1)+(i?1:0),3),BS(e,t,r,!0)}function tX(e){St(e,jP<<1,3),kr(e,Xp,Ur),AS(e)}function rX(e,t,r,i){var n,a,o=0;e.level>0?(e.strm.data_type===RS&&(e.strm.data_type=$S(e)),Np(e,e.l_desc),Np(e,e.d_desc),o=QS(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&t!==-1?JP(e,t,r,i):e.strategy===DS||a===n?(St(e,(jP<<1)+(i?1:0),3),NP(e,Ur,ds)):(St(e,(IS<<1)+(i?1:0),3),_S(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),NP(e,e.dyn_ltree,e.dyn_dtree)),EP(e),i&&CP(e)}function nX(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(ps[r]+hs+1)*2]++,e.dyn_dtree[RP(t)*2]++),e.last_lit===e.lit_bufsize-1}da._tr_init=eX;da._tr_stored_block=JP;da._tr_flush_block=rX;da._tr_tally=nX;da._tr_align=tX});var Wp=Y((ZC,KP)=>{"use strict";function iX(e,t,r,i){for(var n=e&65535|0,a=e>>>16&65535|0,o=0;r!==0;){o=r>2e3?2e3:r,r-=o;do n=n+t[i++]|0,a=a+n|0;while(--o);n%=65521,a%=65521}return n|a<<16|0}KP.exports=iX});var Lp=Y((MC,AP)=>{"use strict";function aX(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var oX=aX();function sX(e,t,r,i){var n=oX,a=i+r;e^=-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}AP.exports=sX});var Jc=Y((HC,UP)=>{"use strict";UP.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var n3=Y(Or=>{"use strict";var bt=Ar(),Kt=GP(),_P=Wp(),gn=Lp(),lX=Jc(),si=0,cX=1,uX=3,Pn=4,YP=5,Nr=0,BP=1,At=-2,dX=-3,Vp=-5,fX=-1,mX=1,Gc=2,pX=3,vX=4,hX=0,bX=2,Yc=8,gX=9,yX=15,xX=8,wX=29,zX=256,Zp=zX+1+wX,PX=30,kX=19,TX=2*Zp+1,NX=15,xe=3,wn=258,ar=wn+xe+1,OX=32,Bc=42,Mp=69,Kc=73,Ac=91,Uc=103,ii=113,gs=666,$e=1,ys=2,ai=3,pa=4,SX=3;function zn(e,t){return e.msg=lX[t],t}function QP(e){return(e<<1)-(e>4?9:0)}function xn(e){for(var t=e.length;--t>=0;)e[t]=0}function yn(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(bt.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function at(e,t){Kt._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,yn(e.strm)}function Pe(e,t){e.pending_buf[e.pending++]=t}function bs(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function XX(e,t,r,i){var n=e.avail_in;return n>i&&(n=i),n===0?0:(e.avail_in-=n,bt.arraySet(t,e.input,e.next_in,n,r),e.state.wrap===1?e.adler=_P(e.adler,t,n,r):e.state.wrap===2&&(e.adler=gn(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)}function $P(e,t){var r=e.max_chain_length,i=e.strstart,n,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-ar?e.strstart-(e.w_size-ar):0,l=e.window,u=e.w_mask,d=e.prev,m=e.strstart+wn,f=l[i+o-1],p=l[i+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=t,!(l[n+o]!==p||l[n+o-1]!==f||l[n]!==l[i]||l[++n]!==l[i+1])){i+=2,n++;do;while(l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&i<m);if(a=wn-(m-i),i=m-wn,a>o){if(e.match_start=t,o=a,a>=s)break;f=l[i+o-1],p=l[i+o]}}while((t=d[t&u])>c&&--r!==0);return o<=e.lookahead?o:e.lookahead}function oi(e){var t=e.w_size,r,i,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-ar)){bt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,r=i;do n=e.head[--r],e.head[r]=n>=t?n-t:0;while(--i);i=t,r=i;do n=e.prev[--r],e.prev[r]=n>=t?n-t:0;while(--i);a+=t}if(e.strm.avail_in===0)break;if(i=XX(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=xe)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+xe-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<xe)););}while(e.lookahead<ar&&e.strm.avail_in!==0)}function jX(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(oi(e),e.lookahead===0&&t===si)return $e;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,at(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-ar&&(at(e,!1),e.strm.avail_out===0))return $e}return e.insert=0,t===Pn?(at(e,!0),e.strm.avail_out===0?ai:pa):(e.strstart>e.block_start&&(at(e,!1),e.strm.avail_out===0),$e)}function qp(e,t){for(var r,i;;){if(e.lookahead<ar){if(oi(e),e.lookahead<ar&&t===si)return $e;if(e.lookahead===0)break}if(r=0,e.lookahead>=xe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+xe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-ar&&(e.match_length=$P(e,r)),e.match_length>=xe)if(i=Kt._tr_tally(e,e.strstart-e.match_start,e.match_length-xe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=xe){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+xe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=Kt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(at(e,!1),e.strm.avail_out===0))return $e}return e.insert=e.strstart<xe-1?e.strstart:xe-1,t===Pn?(at(e,!0),e.strm.avail_out===0?ai:pa):e.last_lit&&(at(e,!1),e.strm.avail_out===0)?$e:ys}function fa(e,t){for(var r,i,n;;){if(e.lookahead<ar){if(oi(e),e.lookahead<ar&&t===si)return $e;if(e.lookahead===0)break}if(r=0,e.lookahead>=xe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+xe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=xe-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-ar&&(e.match_length=$P(e,r),e.match_length<=5&&(e.strategy===mX||e.match_length===xe&&e.strstart-e.match_start>4096)&&(e.match_length=xe-1)),e.prev_length>=xe&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-xe,i=Kt._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-xe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+xe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=xe-1,e.strstart++,i&&(at(e,!1),e.strm.avail_out===0))return $e}else if(e.match_available){if(i=Kt._tr_tally(e,0,e.window[e.strstart-1]),i&&at(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return $e}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=Kt._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<xe-1?e.strstart:xe-1,t===Pn?(at(e,!0),e.strm.avail_out===0?ai:pa):e.last_lit&&(at(e,!1),e.strm.avail_out===0)?$e:ys}function WX(e,t){for(var r,i,n,a,o=e.window;;){if(e.lookahead<=wn){if(oi(e),e.lookahead<=wn&&t===si)return $e;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=xe&&e.strstart>0&&(n=e.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){a=e.strstart+wn;do;while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<a);e.match_length=wn-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=xe?(r=Kt._tr_tally(e,1,e.match_length-xe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Kt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(at(e,!1),e.strm.avail_out===0))return $e}return e.insert=0,t===Pn?(at(e,!0),e.strm.avail_out===0?ai:pa):e.last_lit&&(at(e,!1),e.strm.avail_out===0)?$e:ys}function LX(e,t){for(var r;;){if(e.lookahead===0&&(oi(e),e.lookahead===0)){if(t===si)return $e;break}if(e.match_length=0,r=Kt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(at(e,!1),e.strm.avail_out===0))return $e}return e.insert=0,t===Pn?(at(e,!0),e.strm.avail_out===0?ai:pa):e.last_lit&&(at(e,!1),e.strm.avail_out===0)?$e:ys}function Tr(e,t,r,i,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=n}var ma;ma=[new Tr(0,0,0,0,jX),new Tr(4,4,8,4,qp),new Tr(4,5,16,8,qp),new Tr(4,6,32,32,qp),new Tr(4,4,16,16,fa),new Tr(8,16,32,32,fa),new Tr(8,16,128,128,fa),new Tr(8,32,128,256,fa),new Tr(32,128,258,1024,fa),new Tr(32,258,258,4096,fa)];function VX(e){e.window_size=2*e.w_size,xn(e.head),e.max_lazy_match=ma[e.level].max_lazy,e.good_match=ma[e.level].good_length,e.nice_match=ma[e.level].nice_length,e.max_chain_length=ma[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=xe-1,e.match_available=0,e.ins_h=0}function qX(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Yc,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new bt.Buf16(TX*2),this.dyn_dtree=new bt.Buf16((2*PX+1)*2),this.bl_tree=new bt.Buf16((2*kX+1)*2),xn(this.dyn_ltree),xn(this.dyn_dtree),xn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new bt.Buf16(NX+1),this.heap=new bt.Buf16(2*Zp+1),xn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new bt.Buf16(2*Zp+1),xn(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function e3(e){var t;return!e||!e.state?zn(e,At):(e.total_in=e.total_out=0,e.data_type=bX,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Bc:ii,e.adler=t.wrap===2?0:1,t.last_flush=si,Kt._tr_init(t),Nr)}function t3(e){var t=e3(e);return t===Nr&&VX(e.state),t}function ZX(e,t){return!e||!e.state||e.state.wrap!==2?At:(e.state.gzhead=t,Nr)}function r3(e,t,r,i,n,a){if(!e)return At;var o=1;if(t===fX&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>gX||r!==Yc||i<8||i>15||t<0||t>9||a<0||a>vX)return zn(e,At);i===8&&(i=9);var s=new qX;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+xe-1)/xe),s.window=new bt.Buf8(s.w_size*2),s.head=new bt.Buf16(s.hash_size),s.prev=new bt.Buf16(s.w_size),s.lit_bufsize=1<<n+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new bt.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=r,t3(e)}function MX(e,t){return r3(e,t,Yc,yX,xX,hX)}function HX(e,t){var r,i,n,a;if(!e||!e.state||t>YP||t<0)return e?zn(e,At):At;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===gs&&t!==Pn)return zn(e,e.avail_out===0?Vp:At);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===Bc)if(i.wrap===2)e.adler=0,Pe(i,31),Pe(i,139),Pe(i,8),i.gzhead?(Pe(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Pe(i,i.gzhead.time&255),Pe(i,i.gzhead.time>>8&255),Pe(i,i.gzhead.time>>16&255),Pe(i,i.gzhead.time>>24&255),Pe(i,i.level===9?2:i.strategy>=Gc||i.level<2?4:0),Pe(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(Pe(i,i.gzhead.extra.length&255),Pe(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=gn(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=Mp):(Pe(i,0),Pe(i,0),Pe(i,0),Pe(i,0),Pe(i,0),Pe(i,i.level===9?2:i.strategy>=Gc||i.level<2?4:0),Pe(i,SX),i.status=ii);else{var o=Yc+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=Gc||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=OX),o+=31-o%31,i.status=ii,bs(i,o),i.strstart!==0&&(bs(i,e.adler>>>16),bs(i,e.adler&65535)),e.adler=1}if(i.status===Mp)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=gn(e.adler,i.pending_buf,i.pending-n,n)),yn(e),n=i.pending,i.pending===i.pending_buf_size));)Pe(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=gn(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Kc)}else i.status=Kc;if(i.status===Kc)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=gn(e.adler,i.pending_buf,i.pending-n,n)),yn(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.name.length?a=i.gzhead.name.charCodeAt(i.gzindex++)&255:a=0,Pe(i,a)}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=gn(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.gzindex=0,i.status=Ac)}else i.status=Ac;if(i.status===Ac)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=gn(e.adler,i.pending_buf,i.pending-n,n)),yn(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.comment.length?a=i.gzhead.comment.charCodeAt(i.gzindex++)&255:a=0,Pe(i,a)}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=gn(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.status=Uc)}else i.status=Uc;if(i.status===Uc&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&yn(e),i.pending+2<=i.pending_buf_size&&(Pe(i,e.adler&255),Pe(i,e.adler>>8&255),e.adler=0,i.status=ii)):i.status=ii),i.pending!==0){if(yn(e),e.avail_out===0)return i.last_flush=-1,Nr}else if(e.avail_in===0&&QP(t)<=QP(r)&&t!==Pn)return zn(e,Vp);if(i.status===gs&&e.avail_in!==0)return zn(e,Vp);if(e.avail_in!==0||i.lookahead!==0||t!==si&&i.status!==gs){var c=i.strategy===Gc?LX(i,t):i.strategy===pX?WX(i,t):ma[i.level].func(i,t);if((c===ai||c===pa)&&(i.status=gs),c===$e||c===ai)return e.avail_out===0&&(i.last_flush=-1),Nr;if(c===ys&&(t===cX?Kt._tr_align(i):t!==YP&&(Kt._tr_stored_block(i,0,0,!1),t===uX&&(xn(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),yn(e),e.avail_out===0))return i.last_flush=-1,Nr}return t!==Pn?Nr:i.wrap<=0?BP:(i.wrap===2?(Pe(i,e.adler&255),Pe(i,e.adler>>8&255),Pe(i,e.adler>>16&255),Pe(i,e.adler>>24&255),Pe(i,e.total_in&255),Pe(i,e.total_in>>8&255),Pe(i,e.total_in>>16&255),Pe(i,e.total_in>>24&255)):(bs(i,e.adler>>>16),bs(i,e.adler&65535)),yn(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?Nr:BP)}function DX(e){var t;return!e||!e.state?At:(t=e.state.status,t!==Bc&&t!==Mp&&t!==Kc&&t!==Ac&&t!==Uc&&t!==ii&&t!==gs?zn(e,At):(e.state=null,t===ii?zn(e,dX):Nr))}function RX(e,t){var r=t.length,i,n,a,o,s,c,l,u;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==Bc||i.lookahead))return At;for(o===1&&(e.adler=_P(e.adler,t,r,0)),i.wrap=0,r>=i.w_size&&(o===0&&(xn(i.head),i.strstart=0,i.block_start=0,i.insert=0),u=new bt.Buf8(i.w_size),bt.arraySet(u,t,r-i.w_size,i.w_size,0),t=u,r=i.w_size),s=e.avail_in,c=e.next_in,l=e.input,e.avail_in=r,e.next_in=0,e.input=t,oi(i);i.lookahead>=xe;){n=i.strstart,a=i.lookahead-(xe-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+xe-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++;while(--a);i.strstart=n,i.lookahead=xe-1,oi(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=xe-1,i.match_available=0,e.next_in=c,e.input=l,e.avail_in=s,i.wrap=o,Nr}Or.deflateInit=MX;Or.deflateInit2=r3;Or.deflateReset=t3;Or.deflateResetKeep=e3;Or.deflateSetHeader=ZX;Or.deflate=HX;Or.deflateEnd=DX;Or.deflateSetDictionary=RX;Or.deflateInfo="pako deflate (from Nodeca project)"});var Hp=Y(va=>{"use strict";var Qc=Ar(),i3=!0,a3=!0;try{String.fromCharCode.apply(null,[0])}catch{i3=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a3=!1}var xs=new Qc.Buf8(256);for(Yr=0;Yr<256;Yr++)xs[Yr]=Yr>=252?6:Yr>=248?5:Yr>=240?4:Yr>=224?3:Yr>=192?2:1;var Yr;xs[254]=xs[254]=1;va.string2buf=function(e){var t,r,i,n,a,o=e.length,s=0;for(n=0;n<o;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Qc.Buf8(s),a=0,n=0;a<s;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};function o3(e,t){if(t<65534&&(e.subarray&&a3||!e.subarray&&i3))return String.fromCharCode.apply(null,Qc.shrinkBuf(e,t));for(var r="",i=0;i<t;i++)r+=String.fromCharCode(e[i]);return r}va.buf2binstring=function(e){return o3(e,e.length)};va.binstring2buf=function(e){for(var t=new Qc.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t};va.buf2string=function(e,t){var r,i,n,a,o=t||e.length,s=new Array(o*2);for(i=0,r=0;r<o;){if(n=e[r++],n<128){s[i++]=n;continue}if(a=xs[n],a>4){s[i++]=65533,r+=a-1;continue}for(n&=a===2?31:a===3?15:7;a>1&&r<o;)n=n<<6|e[r++]&63,a--;if(a>1){s[i++]=65533;continue}n<65536?s[i++]=n:(n-=65536,s[i++]=55296|n>>10&1023,s[i++]=56320|n&1023)}return o3(s,i)};va.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+xs[e[r]]>t?r:t}});var Dp=Y((FC,s3)=>{"use strict";function FX(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}s3.exports=FX});var d3=Y(Ps=>{"use strict";var ws=n3(),zs=Ar(),Fp=Hp(),Ip=Jc(),IX=Dp(),u3=Object.prototype.toString,EX=0,Rp=4,ha=0,l3=1,c3=2,CX=-1,JX=0,GX=8;function li(e){if(!(this instanceof li))return new li(e);this.options=zs.assign({level:CX,method:GX,chunkSize:16384,windowBits:15,memLevel:8,strategy:JX,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new IX,this.strm.avail_out=0;var r=ws.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==ha)throw new Error(Ip[r]);if(t.header&&ws.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(typeof t.dictionary=="string"?i=Fp.string2buf(t.dictionary):u3.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,r=ws.deflateSetDictionary(this.strm,i),r!==ha)throw new Error(Ip[r]);this._dict_set=!0}}li.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,n,a;if(this.ended)return!1;a=t===~~t?t:t===!0?Rp:EX,typeof e=="string"?r.input=Fp.string2buf(e):u3.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new zs.Buf8(i),r.next_out=0,r.avail_out=i),n=ws.deflate(r,a),n!==l3&&n!==ha)return this.onEnd(n),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(a===Rp||a===c3))&&(this.options.to==="string"?this.onData(Fp.buf2binstring(zs.shrinkBuf(r.output,r.next_out))):this.onData(zs.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&n!==l3);return a===Rp?(n=ws.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===ha):(a===c3&&(this.onEnd(ha),r.avail_out=0),!0)};li.prototype.onData=function(e){this.chunks.push(e)};li.prototype.onEnd=function(e){e===ha&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=zs.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ep(e,t){var r=new li(t);if(r.push(e,!0),r.err)throw r.msg||Ip[r.err];return r.result}function KX(e,t){return t=t||{},t.raw=!0,Ep(e,t)}function AX(e,t){return t=t||{},t.gzip=!0,Ep(e,t)}Ps.Deflate=li;Ps.deflate=Ep;Ps.deflateRaw=KX;Ps.gzip=AX});var m3=Y((EC,f3)=>{"use strict";var _c=30,UX=12;f3.exports=function(t,r){var i,n,a,o,s,c,l,u,d,m,f,p,v,h,b,g,y,x,z,N,P,O,X,S,w;i=t.state,n=t.next_in,S=t.input,a=n+(t.avail_in-5),o=t.next_out,w=t.output,s=o-(r-t.avail_out),c=o+(t.avail_out-257),l=i.dmax,u=i.wsize,d=i.whave,m=i.wnext,f=i.window,p=i.hold,v=i.bits,h=i.lencode,b=i.distcode,g=(1<<i.lenbits)-1,y=(1<<i.distbits)-1;e:do{v<15&&(p+=S[n++]<<v,v+=8,p+=S[n++]<<v,v+=8),x=h[p&g];t:for(;;){if(z=x>>>24,p>>>=z,v-=z,z=x>>>16&255,z===0)w[o++]=x&65535;else if(z&16){N=x&65535,z&=15,z&&(v<z&&(p+=S[n++]<<v,v+=8),N+=p&(1<<z)-1,p>>>=z,v-=z),v<15&&(p+=S[n++]<<v,v+=8,p+=S[n++]<<v,v+=8),x=b[p&y];r:for(;;){if(z=x>>>24,p>>>=z,v-=z,z=x>>>16&255,z&16){if(P=x&65535,z&=15,v<z&&(p+=S[n++]<<v,v+=8,v<z&&(p+=S[n++]<<v,v+=8)),P+=p&(1<<z)-1,P>l){t.msg="invalid distance too far back",i.mode=_c;break e}if(p>>>=z,v-=z,z=o-s,P>z){if(z=P-z,z>d&&i.sane){t.msg="invalid distance too far back",i.mode=_c;break e}if(O=0,X=f,m===0){if(O+=u-z,z<N){N-=z;do w[o++]=f[O++];while(--z);O=o-P,X=w}}else if(m<z){if(O+=u+m-z,z-=m,z<N){N-=z;do w[o++]=f[O++];while(--z);if(O=0,m<N){z=m,N-=z;do w[o++]=f[O++];while(--z);O=o-P,X=w}}}else if(O+=m-z,z<N){N-=z;do w[o++]=f[O++];while(--z);O=o-P,X=w}for(;N>2;)w[o++]=X[O++],w[o++]=X[O++],w[o++]=X[O++],N-=3;N&&(w[o++]=X[O++],N>1&&(w[o++]=X[O++]))}else{O=o-P;do w[o++]=w[O++],w[o++]=w[O++],w[o++]=w[O++],N-=3;while(N>2);N&&(w[o++]=w[O++],N>1&&(w[o++]=w[O++]))}}else if((z&64)===0){x=b[(x&65535)+(p&(1<<z)-1)];continue r}else{t.msg="invalid distance code",i.mode=_c;break e}break}}else if((z&64)===0){x=h[(x&65535)+(p&(1<<z)-1)];continue t}else if(z&32){i.mode=UX;break e}else{t.msg="invalid literal/length code",i.mode=_c;break e}break}}while(n<a&&o<c);N=v>>3,n-=N,v-=N<<3,p&=(1<<v)-1,t.next_in=n,t.next_out=o,t.avail_in=n<a?5+(a-n):5-(n-a),t.avail_out=o<c?257+(c-o):257-(o-c),i.hold=p,i.bits=v}});var x3=Y((CC,y3)=>{"use strict";var p3=Ar(),ba=15,v3=852,h3=592,b3=0,Cp=1,g3=2,YX=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],BX=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],QX=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],_X=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];y3.exports=function(t,r,i,n,a,o,s,c){var l=c.bits,u=0,d=0,m=0,f=0,p=0,v=0,h=0,b=0,g=0,y=0,x,z,N,P,O,X=null,S=0,w,j=new p3.Buf16(ba+1),M=new p3.Buf16(ba+1),G=null,Z=0,J,K,_;for(u=0;u<=ba;u++)j[u]=0;for(d=0;d<n;d++)j[r[i+d]]++;for(p=l,f=ba;f>=1&&j[f]===0;f--);if(p>f&&(p=f),f===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,c.bits=1,0;for(m=1;m<f&&j[m]===0;m++);for(p<m&&(p=m),b=1,u=1;u<=ba;u++)if(b<<=1,b-=j[u],b<0)return-1;if(b>0&&(t===b3||f!==1))return-1;for(M[1]=0,u=1;u<ba;u++)M[u+1]=M[u]+j[u];for(d=0;d<n;d++)r[i+d]!==0&&(s[M[r[i+d]]++]=d);if(t===b3?(X=G=s,w=19):t===Cp?(X=YX,S-=257,G=BX,Z-=257,w=256):(X=QX,G=_X,w=-1),y=0,d=0,u=m,O=o,v=p,h=0,N=-1,g=1<<p,P=g-1,t===Cp&&g>v3||t===g3&&g>h3)return 1;for(;;){J=u-h,s[d]<w?(K=0,_=s[d]):s[d]>w?(K=G[Z+s[d]],_=X[S+s[d]]):(K=96,_=0),x=1<<u-h,z=1<<v,m=z;do z-=x,a[O+(y>>h)+z]=J<<24|K<<16|_|0;while(z!==0);for(x=1<<u-1;y&x;)x>>=1;if(x!==0?(y&=x-1,y+=x):y=0,d++,--j[u]===0){if(u===f)break;u=r[i+s[d]]}if(u>p&&(y&P)!==N){for(h===0&&(h=p),O+=m,v=u-h,b=1<<v;v+h<f&&(b-=j[v+h],!(b<=0));)v++,b<<=1;if(g+=1<<v,t===Cp&&g>v3||t===g3&&g>h3)return 1;N=y&P,a[N]=p<<24|v<<16|O-o|0}}return y!==0&&(a[O+y]=u-h<<24|64<<16|0),c.bits=p,0}});var t7=Y(or=>{"use strict";var Ft=Ar(),Yp=Wp(),Sr=Lp(),$X=m3(),ks=x3(),ej=0,K3=1,A3=2,w3=4,tj=5,$c=6,ci=0,rj=1,nj=2,Ut=-2,U3=-3,Bp=-4,ij=-5,z3=8,Y3=1,P3=2,k3=3,T3=4,N3=5,O3=6,S3=7,X3=8,j3=9,W3=10,ru=11,Br=12,Jp=13,L3=14,Gp=15,V3=16,q3=17,Z3=18,M3=19,eu=20,tu=21,H3=22,D3=23,R3=24,F3=25,I3=26,Kp=27,E3=28,C3=29,He=30,Qp=31,aj=32,oj=852,sj=592,lj=15,cj=lj;function J3(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function uj(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Ft.Buf16(320),this.work=new Ft.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function B3(e){var t;return!e||!e.state?Ut:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Y3,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Ft.Buf32(oj),t.distcode=t.distdyn=new Ft.Buf32(sj),t.sane=1,t.back=-1,ci)}function Q3(e){var t;return!e||!e.state?Ut:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,B3(e))}function _3(e,t){var r,i;return!e||!e.state||(i=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Ut:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,Q3(e))}function $3(e,t){var r,i;return e?(i=new uj,e.state=i,i.window=null,r=_3(e,t),r!==ci&&(e.state=null),r):Ut}function dj(e){return $3(e,cj)}var G3=!0,Ap,Up;function fj(e){if(G3){var t;for(Ap=new Ft.Buf32(512),Up=new Ft.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ks(K3,e.lens,0,288,Ap,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ks(A3,e.lens,0,32,Up,0,e.work,{bits:5}),G3=!1}e.lencode=Ap,e.lenbits=9,e.distcode=Up,e.distbits=5}function e7(e,t,r,i){var n,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Ft.Buf8(a.wsize)),i>=a.wsize?(Ft.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),Ft.arraySet(a.window,t,r-i,n,a.wnext),i-=n,i?(Ft.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}function mj(e,t){var r,i,n,a,o,s,c,l,u,d,m,f,p,v,h=0,b,g,y,x,z,N,P,O,X=new Ft.Buf8(4),S,w,j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Ut;r=e.state,r.mode===Br&&(r.mode=Jp),o=e.next_out,n=e.output,c=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,l=r.hold,u=r.bits,d=s,m=c,O=ci;e:for(;;)switch(r.mode){case Y3:if(r.wrap===0){r.mode=Jp;break}for(;u<16;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}if(r.wrap&2&&l===35615){r.check=0,X[0]=l&255,X[1]=l>>>8&255,r.check=Sr(r.check,X,2,0),l=0,u=0,r.mode=P3;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=He;break}if((l&15)!==z3){e.msg="unknown compression method",r.mode=He;break}if(l>>>=4,u-=4,P=(l&15)+8,r.wbits===0)r.wbits=P;else if(P>r.wbits){e.msg="invalid window size",r.mode=He;break}r.dmax=1<<P,e.adler=r.check=1,r.mode=l&512?W3:Br,l=0,u=0;break;case P3:for(;u<16;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}if(r.flags=l,(r.flags&255)!==z3){e.msg="unknown compression method",r.mode=He;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=He;break}r.head&&(r.head.text=l>>8&1),r.flags&512&&(X[0]=l&255,X[1]=l>>>8&255,r.check=Sr(r.check,X,2,0)),l=0,u=0,r.mode=k3;case k3:for(;u<32;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}r.head&&(r.head.time=l),r.flags&512&&(X[0]=l&255,X[1]=l>>>8&255,X[2]=l>>>16&255,X[3]=l>>>24&255,r.check=Sr(r.check,X,4,0)),l=0,u=0,r.mode=T3;case T3:for(;u<16;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}r.head&&(r.head.xflags=l&255,r.head.os=l>>8),r.flags&512&&(X[0]=l&255,X[1]=l>>>8&255,r.check=Sr(r.check,X,2,0)),l=0,u=0,r.mode=N3;case N3:if(r.flags&1024){for(;u<16;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}r.length=l,r.head&&(r.head.extra_len=l),r.flags&512&&(X[0]=l&255,X[1]=l>>>8&255,r.check=Sr(r.check,X,2,0)),l=0,u=0}else r.head&&(r.head.extra=null);r.mode=O3;case O3:if(r.flags&1024&&(f=r.length,f>s&&(f=s),f&&(r.head&&(P=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Ft.arraySet(r.head.extra,i,a,f,P)),r.flags&512&&(r.check=Sr(r.check,i,f,a)),s-=f,a+=f,r.length-=f),r.length))break e;r.length=0,r.mode=S3;case S3:if(r.flags&2048){if(s===0)break e;f=0;do P=i[a+f++],r.head&&P&&r.length<65536&&(r.head.name+=String.fromCharCode(P));while(P&&f<s);if(r.flags&512&&(r.check=Sr(r.check,i,f,a)),s-=f,a+=f,P)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=X3;case X3:if(r.flags&4096){if(s===0)break e;f=0;do P=i[a+f++],r.head&&P&&r.length<65536&&(r.head.comment+=String.fromCharCode(P));while(P&&f<s);if(r.flags&512&&(r.check=Sr(r.check,i,f,a)),s-=f,a+=f,P)break e}else r.head&&(r.head.comment=null);r.mode=j3;case j3:if(r.flags&512){for(;u<16;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}if(l!==(r.check&65535)){e.msg="header crc mismatch",r.mode=He;break}l=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Br;break;case W3:for(;u<32;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}e.adler=r.check=J3(l),l=0,u=0,r.mode=ru;case ru:if(r.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=u,nj;e.adler=r.check=1,r.mode=Br;case Br:if(t===tj||t===$c)break e;case Jp:if(r.last){l>>>=u&7,u-=u&7,r.mode=Kp;break}for(;u<3;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}switch(r.last=l&1,l>>>=1,u-=1,l&3){case 0:r.mode=L3;break;case 1:if(fj(r),r.mode=eu,t===$c){l>>>=2,u-=2;break e}break;case 2:r.mode=q3;break;case 3:e.msg="invalid block type",r.mode=He}l>>>=2,u-=2;break;case L3:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",r.mode=He;break}if(r.length=l&65535,l=0,u=0,r.mode=Gp,t===$c)break e;case Gp:r.mode=V3;case V3:if(f=r.length,f){if(f>s&&(f=s),f>c&&(f=c),f===0)break e;Ft.arraySet(n,i,a,f,o),s-=f,a+=f,c-=f,o+=f,r.length-=f;break}r.mode=Br;break;case q3:for(;u<14;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}if(r.nlen=(l&31)+257,l>>>=5,u-=5,r.ndist=(l&31)+1,l>>>=5,u-=5,r.ncode=(l&15)+4,l>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=He;break}r.have=0,r.mode=Z3;case Z3:for(;r.have<r.ncode;){for(;u<3;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}r.lens[j[r.have++]]=l&7,l>>>=3,u-=3}for(;r.have<19;)r.lens[j[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},O=ks(ej,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,O){e.msg="invalid code lengths set",r.mode=He;break}r.have=0,r.mode=M3;case M3:for(;r.have<r.nlen+r.ndist;){for(;h=r.lencode[l&(1<<r.lenbits)-1],b=h>>>24,g=h>>>16&255,y=h&65535,!(b<=u);){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}if(y<16)l>>>=b,u-=b,r.lens[r.have++]=y;else{if(y===16){for(w=b+2;u<w;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}if(l>>>=b,u-=b,r.have===0){e.msg="invalid bit length repeat",r.mode=He;break}P=r.lens[r.have-1],f=3+(l&3),l>>>=2,u-=2}else if(y===17){for(w=b+3;u<w;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}l>>>=b,u-=b,P=0,f=3+(l&7),l>>>=3,u-=3}else{for(w=b+7;u<w;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}l>>>=b,u-=b,P=0,f=11+(l&127),l>>>=7,u-=7}if(r.have+f>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=He;break}for(;f--;)r.lens[r.have++]=P}}if(r.mode===He)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=He;break}if(r.lenbits=9,S={bits:r.lenbits},O=ks(K3,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,O){e.msg="invalid literal/lengths set",r.mode=He;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},O=ks(A3,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,O){e.msg="invalid distances set",r.mode=He;break}if(r.mode=eu,t===$c)break e;case eu:r.mode=tu;case tu:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=u,$X(e,m),o=e.next_out,n=e.output,c=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,l=r.hold,u=r.bits,r.mode===Br&&(r.back=-1);break}for(r.back=0;h=r.lencode[l&(1<<r.lenbits)-1],b=h>>>24,g=h>>>16&255,y=h&65535,!(b<=u);){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}if(g&&(g&240)===0){for(x=b,z=g,N=y;h=r.lencode[N+((l&(1<<x+z)-1)>>x)],b=h>>>24,g=h>>>16&255,y=h&65535,!(x+b<=u);){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}l>>>=x,u-=x,r.back+=x}if(l>>>=b,u-=b,r.back+=b,r.length=y,g===0){r.mode=I3;break}if(g&32){r.back=-1,r.mode=Br;break}if(g&64){e.msg="invalid literal/length code",r.mode=He;break}r.extra=g&15,r.mode=H3;case H3:if(r.extra){for(w=r.extra;u<w;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}r.length+=l&(1<<r.extra)-1,l>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=D3;case D3:for(;h=r.distcode[l&(1<<r.distbits)-1],b=h>>>24,g=h>>>16&255,y=h&65535,!(b<=u);){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}if((g&240)===0){for(x=b,z=g,N=y;h=r.distcode[N+((l&(1<<x+z)-1)>>x)],b=h>>>24,g=h>>>16&255,y=h&65535,!(x+b<=u);){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}l>>>=x,u-=x,r.back+=x}if(l>>>=b,u-=b,r.back+=b,g&64){e.msg="invalid distance code",r.mode=He;break}r.offset=y,r.extra=g&15,r.mode=R3;case R3:if(r.extra){for(w=r.extra;u<w;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}r.offset+=l&(1<<r.extra)-1,l>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=He;break}r.mode=F3;case F3:if(c===0)break e;if(f=m-c,r.offset>f){if(f=r.offset-f,f>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=He;break}f>r.wnext?(f-=r.wnext,p=r.wsize-f):p=r.wnext-f,f>r.length&&(f=r.length),v=r.window}else v=n,p=o-r.offset,f=r.length;f>c&&(f=c),c-=f,r.length-=f;do n[o++]=v[p++];while(--f);r.length===0&&(r.mode=tu);break;case I3:if(c===0)break e;n[o++]=r.length,c--,r.mode=tu;break;case Kp:if(r.wrap){for(;u<32;){if(s===0)break e;s--,l|=i[a++]<<u,u+=8}if(m-=c,e.total_out+=m,r.total+=m,m&&(e.adler=r.check=r.flags?Sr(r.check,n,m,o-m):Yp(r.check,n,m,o-m)),m=c,(r.flags?l:J3(l))!==r.check){e.msg="incorrect data check",r.mode=He;break}l=0,u=0}r.mode=E3;case E3:if(r.wrap&&r.flags){for(;u<32;){if(s===0)break e;s--,l+=i[a++]<<u,u+=8}if(l!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=He;break}l=0,u=0}r.mode=C3;case C3:O=rj;break e;case He:O=U3;break e;case Qp:return Bp;case aj:default:return Ut}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=u,(r.wsize||m!==e.avail_out&&r.mode<He&&(r.mode<Kp||t!==w3))&&e7(e,e.output,e.next_out,m-e.avail_out)?(r.mode=Qp,Bp):(d-=e.avail_in,m-=e.avail_out,e.total_in+=d,e.total_out+=m,r.total+=m,r.wrap&&m&&(e.adler=r.check=r.flags?Sr(r.check,n,m,e.next_out-m):Yp(r.check,n,m,e.next_out-m)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Br?128:0)+(r.mode===eu||r.mode===Gp?256:0),(d===0&&m===0||t===w3)&&O===ci&&(O=ij),O)}function pj(e){if(!e||!e.state)return Ut;var t=e.state;return t.window&&(t.window=null),e.state=null,ci}function vj(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Ut:(r.head=t,t.done=!1,ci)}function hj(e,t){var r=t.length,i,n,a;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==ru)?Ut:i.mode===ru&&(n=1,n=Yp(n,t,r,0),n!==i.check)?U3:(a=e7(e,t,r,r),a?(i.mode=Qp,Bp):(i.havedict=1,ci))}or.inflateReset=Q3;or.inflateReset2=_3;or.inflateResetKeep=B3;or.inflateInit=dj;or.inflateInit2=$3;or.inflate=mj;or.inflateEnd=pj;or.inflateGetHeader=vj;or.inflateSetDictionary=hj;or.inflateInfo="pako inflate (from Nodeca project)"});var _p=Y((GC,r7)=>{"use strict";r7.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var i7=Y((KC,n7)=>{"use strict";function bj(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}n7.exports=bj});var o7=Y(Ns=>{"use strict";var ga=t7(),Ts=Ar(),nu=Hp(),Ae=_p(),$p=Jc(),gj=Dp(),yj=i7(),a7=Object.prototype.toString;function ui(e){if(!(this instanceof ui))return new ui(e);this.options=Ts.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gj,this.strm.avail_out=0;var r=ga.inflateInit2(this.strm,t.windowBits);if(r!==Ae.Z_OK)throw new Error($p[r]);if(this.header=new yj,ga.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=nu.string2buf(t.dictionary):a7.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=ga.inflateSetDictionary(this.strm,t.dictionary),r!==Ae.Z_OK)))throw new Error($p[r])}ui.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,n=this.options.dictionary,a,o,s,c,l,u=!1;if(this.ended)return!1;o=t===~~t?t:t===!0?Ae.Z_FINISH:Ae.Z_NO_FLUSH,typeof e=="string"?r.input=nu.binstring2buf(e):a7.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Ts.Buf8(i),r.next_out=0,r.avail_out=i),a=ga.inflate(r,Ae.Z_NO_FLUSH),a===Ae.Z_NEED_DICT&&n&&(a=ga.inflateSetDictionary(this.strm,n)),a===Ae.Z_BUF_ERROR&&u===!0&&(a=Ae.Z_OK,u=!1),a!==Ae.Z_STREAM_END&&a!==Ae.Z_OK)return this.onEnd(a),this.ended=!0,!1;r.next_out&&(r.avail_out===0||a===Ae.Z_STREAM_END||r.avail_in===0&&(o===Ae.Z_FINISH||o===Ae.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=nu.utf8border(r.output,r.next_out),c=r.next_out-s,l=nu.buf2string(r.output,s),r.next_out=c,r.avail_out=i-c,c&&Ts.arraySet(r.output,r.output,s,c,0),this.onData(l)):this.onData(Ts.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(u=!0)}while((r.avail_in>0||r.avail_out===0)&&a!==Ae.Z_STREAM_END);return a===Ae.Z_STREAM_END&&(o=Ae.Z_FINISH),o===Ae.Z_FINISH?(a=ga.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Ae.Z_OK):(o===Ae.Z_SYNC_FLUSH&&(this.onEnd(Ae.Z_OK),r.avail_out=0),!0)};ui.prototype.onData=function(e){this.chunks.push(e)};ui.prototype.onEnd=function(e){e===Ae.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ts.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ev(e,t){var r=new ui(t);if(r.push(e,!0),r.err)throw r.msg||$p[r.err];return r.result}function xj(e,t){return t=t||{},t.raw=!0,ev(e,t)}Ns.Inflate=ui;Ns.inflate=ev;Ns.inflateRaw=xj;Ns.ungzip=ev});var c7=Y((UC,l7)=>{"use strict";var wj=Ar().assign,zj=d3(),Pj=o7(),kj=_p(),s7={};wj(s7,zj,Pj,kj);l7.exports=s7});var d7=Y(au=>{"use strict";var Tj=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",Nj=c7(),u7=Ie(),iu=Rt(),Oj=Tj?"uint8array":"array";au.magic="\b\0";function di(e,t){iu.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}u7.inherits(di,iu);di.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(u7.transformTo(Oj,e.data),!1)};di.prototype.flush=function(){iu.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)};di.prototype.cleanUp=function(){iu.prototype.cleanUp.call(this),this._pako=null};di.prototype._createPako=function(){this._pako=new Nj[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};au.compressWorker=function(e){return new di("Deflate",e)};au.uncompressWorker=function(){return new di("Inflate",{})}});var rv=Y(tv=>{"use strict";var f7=Rt();tv.STORE={magic:"\0\0",compressWorker:function(){return new f7("STORE compression")},uncompressWorker:function(){return new f7("STORE decompression")}};tv.DEFLATE=d7()});var nv=Y(fi=>{"use strict";fi.LOCAL_FILE_HEADER="PK";fi.CENTRAL_FILE_HEADER="PK";fi.CENTRAL_DIRECTORY_END="PK";fi.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";fi.ZIP64_CENTRAL_DIRECTORY_END="PK";fi.DATA_DESCRIPTOR="PK\x07\b"});var h7=Y((_C,v7)=>{"use strict";var ya=Ie(),xa=Rt(),iv=sa(),m7=Rc(),ou=nv(),qe=function(e,t){var r="",i;for(i=0;i<t;i++)r+=String.fromCharCode(e&255),e=e>>>8;return r},Sj=function(e,t){var r=e;return e||(r=t?16893:33204),(r&65535)<<16},Xj=function(e){return(e||0)&63},p7=function(e,t,r,i,n,a){var o=e.file,s=e.compression,c=a!==iv.utf8encode,l=ya.transformTo("string",a(o.name)),u=ya.transformTo("string",iv.utf8encode(o.name)),d=o.comment,m=ya.transformTo("string",a(d)),f=ya.transformTo("string",iv.utf8encode(d)),p=u.length!==o.name.length,v=f.length!==d.length,h,b,g="",y="",x="",z=o.dir,N=o.date,P={crc32:0,compressedSize:0,uncompressedSize:0};(!t||r)&&(P.crc32=e.crc32,P.compressedSize=e.compressedSize,P.uncompressedSize=e.uncompressedSize);var O=0;t&&(O|=8),!c&&(p||v)&&(O|=2048);var X=0,S=0;z&&(X|=16),n==="UNIX"?(S=798,X|=Sj(o.unixPermissions,z)):(S=20,X|=Xj(o.dosPermissions,z)),h=N.getUTCHours(),h=h<<6,h=h|N.getUTCMinutes(),h=h<<5,h=h|N.getUTCSeconds()/2,b=N.getUTCFullYear()-1980,b=b<<4,b=b|N.getUTCMonth()+1,b=b<<5,b=b|N.getUTCDate(),p&&(y=qe(1,1)+qe(m7(l),4)+u,g+="up"+qe(y.length,2)+y),v&&(x=qe(1,1)+qe(m7(m),4)+f,g+="uc"+qe(x.length,2)+x);var w="";w+=`
|
|
4
|
+
\0`,w+=qe(O,2),w+=s.magic,w+=qe(h,2),w+=qe(b,2),w+=qe(P.crc32,4),w+=qe(P.compressedSize,4),w+=qe(P.uncompressedSize,4),w+=qe(l.length,2),w+=qe(g.length,2);var j=ou.LOCAL_FILE_HEADER+w+l+g,M=ou.CENTRAL_FILE_HEADER+qe(S,2)+w+qe(m.length,2)+"\0\0\0\0"+qe(X,4)+qe(i,4)+l+g+m;return{fileRecord:j,dirRecord:M}},jj=function(e,t,r,i,n){var a="",o=ya.transformTo("string",n(i));return a=ou.CENTRAL_DIRECTORY_END+"\0\0\0\0"+qe(e,2)+qe(e,2)+qe(t,4)+qe(r,4)+qe(o.length,2)+o,a},Wj=function(e){var t="";return t=ou.DATA_DESCRIPTOR+qe(e.crc32,4)+qe(e.compressedSize,4)+qe(e.uncompressedSize,4),t};function sr(e,t,r,i){xa.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}ya.inherits(sr,xa);sr.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,xa.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-i-1))/r:100}}))};sr.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=p7(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0};sr.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=p7(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:Wj(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null};sr.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,i=jj(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})};sr.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()};sr.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(r){t.processChunk(r)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(r){t.error(r)}),this};sr.prototype.resume=function(){if(!xa.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};sr.prototype.error=function(e){var t=this._sources;if(!xa.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch{}return!0};sr.prototype.lock=function(){xa.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()};v7.exports=sr});var g7=Y(b7=>{"use strict";var Lj=rv(),Vj=h7(),qj=function(e,t){var r=e||t,i=Lj[r];if(!i)throw new Error(r+" is not a valid compression method !");return i};b7.generateWorker=function(e,t,r){var i=new Vj(t.streamFiles,r,t.platform,t.encodeFileName),n=0;try{e.forEach(function(a,o){n++;var s=qj(o.options.compression,t.compression),c=o.options.compressionOptions||t.compressionOptions||{},l=o.dir,u=o.date;o._compressWorker(s,c).withStreamInfo("file",{name:a,dir:l,date:u,comment:o.comment||"",unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions}).pipe(i)}),i.entriesCount=n}catch(a){i.error(a)}return i}});var x7=Y((eJ,y7)=>{"use strict";var Zj=Ie(),su=Rt();function Os(e,t){su.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}Zj.inherits(Os,su);Os.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(r){t.push({data:r,meta:{percent:0}})}).on("error",function(r){t.isPaused?this.generatedError=r:t.error(r)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})};Os.prototype.pause=function(){return su.prototype.pause.call(this)?(this._stream.pause(),!0):!1};Os.prototype.resume=function(){return su.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),!0):!1};y7.exports=Os});var j7=Y((tJ,X7)=>{"use strict";var Mj=sa(),Ss=Ie(),k7=Rt(),Hj=cp(),T7=up(),w7=Fc(),Dj=zP(),Rj=g7(),z7=ns(),Fj=x7(),N7=function(e,t,r){var i=Ss.getTypeOf(t),n,a=Ss.extend(r||{},T7);a.date=a.date||new Date,a.compression!==null&&(a.compression=a.compression.toUpperCase()),typeof a.unixPermissions=="string"&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&a.unixPermissions&16384&&(a.dir=!0),a.dosPermissions&&a.dosPermissions&16&&(a.dir=!0),a.dir&&(e=O7(e)),a.createFolders&&(n=Ij(e))&&S7.call(this,n,!0);var o=i==="string"&&a.binary===!1&&a.base64===!1;(!r||typeof r.binary>"u")&&(a.binary=!o);var s=t instanceof w7&&t.uncompressedSize===0;(s||a.dir||!t||t.length===0)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",i="string");var c=null;t instanceof w7||t instanceof k7?c=t:z7.isNode&&z7.isStream(t)?c=new Fj(e,t):c=Ss.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var l=new Dj(e,c,a);this.files[e]=l},Ij=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},O7=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},S7=function(e,t){return t=typeof t<"u"?t:T7.createFolders,e=O7(e),this.files[e]||N7.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function P7(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Ej={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,i;for(t in this.files)i=this.files[t],r=t.slice(this.root.length,t.length),r&&t.slice(0,this.root.length)===this.root&&e(r,i)},filter:function(e){var t=[];return this.forEach(function(r,i){e(r,i)&&t.push(i)}),t},file:function(e,t,r){if(arguments.length===1)if(P7(e)){var i=e;return this.filter(function(a,o){return!o.dir&&i.test(a)})}else{var n=this.files[this.root+e];return n&&!n.dir?n:null}else e=this.root+e,N7.call(this,e,t,r);return this},folder:function(e){if(!e)return this;if(P7(e))return this.filter(function(n,a){return a.dir&&e.test(n)});var t=this.root+e,r=S7.call(this,t),i=this.clone();return i.root=r.name,i},remove:function(e){e=this.root+e;var t=this.files[e];if(t||(e.slice(-1)!=="/"&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(n,a){return a.name.slice(0,e.length)===e}),i=0;i<r.length;i++)delete this.files[r[i].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if(r=Ss.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:Mj.utf8encode}),r.type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),r.type==="binarystring"&&(r.type="string"),!r.type)throw new Error("No output type specified.");Ss.checkSupport(r.type),(r.platform==="darwin"||r.platform==="freebsd"||r.platform==="linux"||r.platform==="sunos")&&(r.platform="UNIX"),r.platform==="win32"&&(r.platform="DOS");var i=r.comment||this.comment||"";t=Rj.generateWorker(this,r,i)}catch(n){t=new k7("error"),t.error(n)}return new Hj(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};X7.exports=Ej});var av=Y((rJ,L7)=>{"use strict";var Cj=Ie();function W7(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}W7.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t=0,r;for(this.checkOffset(e),r=this.index+e-1;r>=this.index;r--)t=(t<<8)+this.byteAt(r);return this.index+=e,t},readString:function(e){return Cj.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1))}};L7.exports=W7});var ov=Y((nJ,q7)=>{"use strict";var V7=av(),Jj=Ie();function wa(e){V7.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255}Jj.inherits(wa,V7);wa.prototype.byteAt=function(e){return this.data[this.zero+e]};wa.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2),n=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===t&&this.data[a+1]===r&&this.data[a+2]===i&&this.data[a+3]===n)return a-this.zero;return-1};wa.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2),n=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&r===a[1]&&i===a[2]&&n===a[3]};wa.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};q7.exports=wa});var H7=Y((iJ,M7)=>{"use strict";var Z7=av(),Gj=Ie();function za(e){Z7.call(this,e)}Gj.inherits(za,Z7);za.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)};za.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero};za.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t};za.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};M7.exports=za});var lv=Y((aJ,R7)=>{"use strict";var D7=ov(),Kj=Ie();function sv(e){D7.call(this,e)}Kj.inherits(sv,D7);sv.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};R7.exports=sv});var E7=Y((oJ,I7)=>{"use strict";var F7=lv(),Aj=Ie();function cv(e){F7.call(this,e)}Aj.inherits(cv,F7);cv.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};I7.exports=cv});var uv=Y((sJ,J7)=>{"use strict";var lu=Ie(),C7=Gr(),Uj=ov(),Yj=H7(),Bj=E7(),Qj=lv();J7.exports=function(e){var t=lu.getTypeOf(e);return lu.checkSupport(t),t==="string"&&!C7.uint8array?new Yj(e):t==="nodebuffer"?new Bj(e):C7.uint8array?new Qj(lu.transformTo("uint8array",e)):new Uj(lu.transformTo("array",e))}});var U7=Y((lJ,A7)=>{"use strict";var dv=uv(),kn=Ie(),_j=Fc(),G7=Rc(),cu=sa(),uu=rv(),$j=Gr(),eW=0,tW=3,rW=function(e){for(var t in uu)if(Object.prototype.hasOwnProperty.call(uu,t)&&uu[t].magic===e)return uu[t];return null};function K7(e,t){this.options=e,this.loadOptions=t}K7.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(t=rW(this.compressionMethod),t===null)throw new Error("Corrupted zip : compression "+kn.pretty(this.compressionMethod)+" unknown (inner file : "+kn.transformTo("string",this.fileName)+")");this.decompressed=new _j(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),e===eW&&(this.dosPermissions=this.externalFileAttributes&63),e===tW&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=dv(this.extraFields[1].value);this.uncompressedSize===kn.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===kn.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===kn.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===kn.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t=e.index+this.extraFieldsLength,r,i,n;for(this.extraFields||(this.extraFields={});e.index+4<t;)r=e.readInt(2),i=e.readInt(2),n=e.readData(i),this.extraFields[r]={id:r,length:i,value:n};e.setIndex(t)},handleUTF8:function(){var e=$j.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=cu.utf8decode(this.fileName),this.fileCommentStr=cu.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(t!==null)this.fileNameStr=t;else{var r=kn.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var i=this.findExtraFieldUnicodeComment();if(i!==null)this.fileCommentStr=i;else{var n=kn.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(n)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=dv(e.value);return t.readInt(1)!==1||G7(this.fileName)!==t.readInt(4)?null:cu.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=dv(e.value);return t.readInt(1)!==1||G7(this.fileComment)!==t.readInt(4)?null:cu.utf8decode(t.readData(e.length-5))}return null}};A7.exports=K7});var Q7=Y((cJ,B7)=>{"use strict";var nW=uv(),Qr=Ie(),lr=nv(),iW=U7(),aW=Gr();function Y7(e){this.files=[],this.loadOptions=e}Y7.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+Qr.pretty(t)+", expected "+Qr.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var i=this.reader.readString(4),n=i===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=aW.uint8array?"uint8array":"array",r=Qr.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e=this.zip64EndOfCentralSize-44,t=0,r,i,n;t<e;)r=this.reader.readInt(2),i=this.reader.readInt(4),n=this.reader.readData(i),this.zip64ExtensibleData[r]={id:r,length:i,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(lr.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(lr.CENTRAL_FILE_HEADER);)e=new iW({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(lr.CENTRAL_DIRECTORY_END);if(e<0){var t=!this.isSignature(0,lr.LOCAL_FILE_HEADER);throw t?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(e);var r=e;if(this.checkSignature(lr.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===Qr.MAX_VALUE_16BITS||this.diskWithCentralDirStart===Qr.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===Qr.MAX_VALUE_16BITS||this.centralDirRecords===Qr.MAX_VALUE_16BITS||this.centralDirSize===Qr.MAX_VALUE_32BITS||this.centralDirOffset===Qr.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(lr.ZIP64_CENTRAL_DIRECTORY_LOCATOR),e<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(lr.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,lr.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(lr.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(lr.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var n=r-i;if(n>0)this.isSignature(r,lr.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=nW(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};B7.exports=Y7});var e0=Y((uJ,$7)=>{"use strict";var fv=Ie(),du=ia(),oW=sa(),sW=Q7(),lW=mp(),_7=ns();function cW(e){return new du.Promise(function(t,r){var i=e.decompressed.getContentWorker().pipe(new lW);i.on("error",function(n){r(n)}).on("end",function(){i.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}$7.exports=function(e,t){var r=this;return t=fv.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:oW.utf8decode}),_7.isNode&&_7.isStream(e)?du.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):fv.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(i){var n=new sW(t);return n.load(i),n}).then(function(n){var a=[du.Promise.resolve(n)],o=n.files;if(t.checkCRC32)for(var s=0;s<o.length;s++)a.push(cW(o[s]));return du.Promise.all(a)}).then(function(n){for(var a=n.shift(),o=a.files,s=0;s<o.length;s++){var c=o[s],l=c.fileNameStr,u=fv.resolve(c.fileNameStr);r.file(u,c.decompressed,{binary:!0,optimizedBinaryString:!0,date:c.date,dir:c.dir,comment:c.fileCommentStr.length?c.fileCommentStr:null,unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions,createFolders:t.createFolders}),c.dir||(r.file(u).unsafeOriginalName=l)}return a.zipComment.length&&(r.comment=a.zipComment),r})}});var r0=Y((dJ,t0)=>{"use strict";function Yt(){if(!(this instanceof Yt))return new Yt;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new Yt;for(var t in this)typeof this[t]!="function"&&(e[t]=this[t]);return e}}Yt.prototype=j7();Yt.prototype.loadAsync=e0();Yt.support=Gr();Yt.defaults=up();Yt.version="3.10.1";Yt.loadAsync=function(e,t){return new Yt().loadAsync(e,t)};Yt.external=ia();t0.exports=Yt});function eN(e){return{path:e.path,resolution_w:e.resolution_w??null,resolution_h:e.resolution_h??null,codec:e.codec??null,container:e.container??null,fps:e.fps??null,bit_depth:e.bit_depth??null,reel:e.reel_name??null,timecode:e.timecode??null}}function _f(e,t,r,i,n){if(!(e>0&&t>0&&i>0&&n>0))return{baseW:i,baseH:n,kx:1,ky:1};let a=e/t,o=i/n,[s,c]=a>o?[1,a/o]:a<o?[o/a,1]:[1,1],l=Math.max(e/i,t/n)||1;return{baseW:e*r/l,baseH:t/l,kx:s,ky:c}}var sc=(e,{matches:t})=>{let r=e.media_references??[],i=[];for(let a of t){let o=r.find(G=>G.id===a.ref_id);if(!o)continue;let s=o.source_facts_origin??null,c={path:o.target_url??null,resolution_w:o.source_resolution_w??null,resolution_h:o.source_resolution_h??null,codec:o.codec??null,container:o.container??null,fps:o.source_fps??null,bit_depth:o.streams?.[0]?.bit_depth??null,reel:o.reel_name??null,timecode:o.source_timecode??null},l=o.metadata??={};l.pre_relink||(l.pre_relink={...c,pixel_aspect:o.source_pixel_aspect??null,facts_origin:o.source_facts_origin??null,available_range:o.available_range?JSON.parse(JSON.stringify(o.available_range)):null});let u=a.to;o.target_url=u.path,u.size_bytes!=null&&(o.size_bytes=u.size_bytes),u.resolution_w!=null&&(o.source_resolution_w=u.resolution_w),u.resolution_h!=null&&(o.source_resolution_h=u.resolution_h),u.codec!=null&&(o.codec=u.codec),u.container!=null&&(o.container=u.container),u.fps!=null&&(o.source_fps=u.fps),u.pixel_aspect!=null&&(o.source_pixel_aspect=u.pixel_aspect),u.bitrate_bps!=null&&(o.bitrate_bps=u.bitrate_bps),u.reel_name!=null&&(o.reel_name=u.reel_name),u.timecode!=null&&(o.source_timecode=u.timecode),u.local_path!=null&&(o.local_path=u.local_path),u.streams&&u.streams.length>0&&(o.streams=u.streams),(u.resolution_w!=null||u.timecode!=null||u.fps!=null||u.pixel_aspect!=null)&&(o.source_facts_origin="probed",o.codec=u.codec??null,u.streams&&u.streams.length>0||(o.streams=(o.streams??[]).map(G=>G.kind!=="video"?G:{...G,codec:u.codec??null,codec_specific:null,...u.resolution_w!=null?{width:u.resolution_w}:{},...u.resolution_h!=null?{height:u.resolution_h}:{},...u.fps!=null?{rate:u.fps}:{}}))),u.vendor_metadata&&Object.keys(u.vendor_metadata).length>0&&(o.vendor_metadata={...o.vendor_metadata??{},...u.vendor_metadata}),u.reel_sources&&(o.reel_sources={...o.reel_sources??{},...u.reel_sources}),u.recipe!==void 0&&(o.recipe=u.recipe);let d=u.fps??null,m=u.recipe&&"frame_count"in u.recipe?u.recipe.frame_count:u.frame_count??null,f=m??null,p=d??o.source_fps??null;f!=null&&p?o.available_range={start:{value:0,rate:p},duration:{value:f,rate:p}}:u.keep_range_if_unknown||(o.available_range=null);let v=o.raw_extraction;v&&"proxyResolution"in v&&delete v.proxyResolution;let h=c.resolution_w,b=c.resolution_h,g=u.resolution_w??null,y=u.resolution_h??null,x=u.pixel_aspect??o.source_pixel_aspect??1,z=h!=null&&b!=null&&g!=null&&y!=null&&h*y!==g*b,N=g!=null&&y!=null,P=[];for(let G of e.timelines??[]){let Z=G.resolution_w??0,J=G.resolution_h??0;for(let K of G.tracks??[])for(let _ of K.items??[])if(_.media_reference_id===a.ref_id&&_.source_range){if(P.push({it:_}),z){let R=_f(h,b,1,Z,J),te=_f(g,y,x,Z,J),H=R.kx!==0?te.kx/R.kx:1,D=R.ky!==0?te.ky/R.ky:1;typeof _.position_x=="number"&&(_.position_x*=H),typeof _.position_y=="number"&&(_.position_y*=D);for(let V of _.keyframes??[])if(V.parameter_path==="position"&&Array.isArray(V.value)){let I=V.value;typeof I[0]=="number"&&(I[0]*=H),typeof I[1]=="number"&&(I[1]*=D)}}if(N){let R=_f(g,y,x,Z,J);_.render_base_w=R.baseW,_.render_base_h=R.baseH,_.render_pos_div_x=R.kx,_.render_pos_div_y=R.ky}}}let O="linked",X,S=!1,w=u.path.split(/[/\\]/).pop()??u.path,j=()=>{let G=P.find(({it:Z})=>(Z.source_range.duration?.value??0)>f);if(G){O="unbound",S=!0,X=`cut duration ${G.it.source_range.duration?.value??0}f exceeds linked media ${w} extent ${f}f`;return}for(let{it:Z}of P){let J=Z.source_range.duration?.value??0,K=Z.source_range.start.value;if(K<0||K+J>f){let _=Math.max(0,Math.floor((f-J)/2));Z.source_range={...Z.source_range,start:{...Z.source_range.start,value:_}};let R=Z.raw_extraction??(Z.raw_extraction={});R.sourceConformedToMedia=!0}}};if(ic(o))o.content_kind==null&&(o.content_kind="still");else if(f==null)O="unbound",X=`matched ${w} by name but not probed \u2014 coverage unverified`;else if(c.timecode&&u.timecode!=null){let G=u.fps??c.fps??0,Z=G>0?Te(c.timecode,G):null,J=G>0?Te(u.timecode,G):null;if(Z==null||J==null)O="unbound",X=`could not verify ${w} timecode placement \u2014 coverage unverified`;else{let K=Z-J,_=P.find(({it:R})=>{let te=R.source_range.start.value+K,H=R.source_range.duration?.value??0;return te<0||te+H>f});if(_)if(s!=="probed"&&Z===0)j();else{O="unbound",S=!0;let te=_.it.source_range.start.value+K,H=_.it.source_range.duration?.value??0;X=`cut [${te}..${te+H}] not within linked media ${w} [0..${f}] (source TC ${c.timecode} \u2192 ${u.timecode})`}else if(K!==0)for(let{it:R}of P){let te=R.source_range.start.rate||1;R.source_range={...R.source_range,start:{...R.source_range.start,value:R.source_range.start.value+K}};for(let D of R.keyframes??[])if(!(!D.time||typeof D.time.value!="number"))if(D.parameter_path==="speed"){let V=K/te;if(D.time.value===0&&D.value===0)continue;D.time={...D.time,value:Math.max(0,D.time.value+V)},typeof D.value=="number"&&(D.value=Math.max(0,D.value+V))}else{let V=D.time.rate||te;D.time={...D.time,value:Math.max(0,D.time.value+K*(V/te))}}let H=R.raw_extraction??(R.raw_extraction={});typeof H.alternateFrame=="number"&&(H.alternateFrame=J),H.sourceConformedToMedia=!0}}}else j();o.binding_state=O;let M;X?(o.coverage_reason=X,S&&(M=X)):delete o.coverage_reason,i.push({ref_id:a.ref_id,confidence:a.confidence,reasons:a.reasons??[],before:c,after:eN(u),...M?{warning:M}:{}})}let n=i.filter(a=>a.warning).length;return{summary:`Relinked ${i.length} reference${i.length===1?"":"s"}`+(n?` \xB7 ${n} unresolved (cut not covered)`:""),meta:{applied:i}}};function Hr(e,t){return e.timelines?.find(r=>r.id===t)}function Ki(e,t,r){let i=Hr(e,t);if(i)for(let n of i.tracks??[]){let a=(n.items??[]).findIndex(o=>o.id===r);if(a!==-1)return{timeline:i,track:n,item:n.items[a],index:a}}}function Dr(e){(e.items??[]).forEach((t,r)=>{t.item_index=r})}function Ot(e){let t=0;for(let r of e.tracks??[])for(let i of r.items??[])t=Math.max(t,i.timeline_range.start.value+i.timeline_range.duration.value);e.duration_frames=t}function Ro(e,t){let r=new Set;for(let n of e.timelines??[])for(let a of n.tracks??[]){r.add(a.id);for(let o of a.items??[])r.add(o.id)}for(let n of e.media_references??[])r.add(n.id);let i=1;for(;r.has(`${t}-${i}`);)i++;return`${t}-${i}`}function W1(e){let t=e.timeline_range.start.value;return[t,t+e.timeline_range.duration.value]}function tN(e,t,r,i){return r>t?(e.items??[]).filter(n=>{if(i&&n.id===i)return!1;let[a,o]=W1(n);return a<r&&t<o}):[]}function mn(e,t,r,i,n){let a={removed:0,trimmed:0,split:0},o=tN(t,r,i,n);if(o.length===0)return a;let s=new Set,c=[];for(let l of o){let[u,d]=W1(l);if(l.kind==="transition"||u>=r&&d<=i){s.add(l),a.removed++;continue}if(u<r&&d>i){let m=structuredClone(l);m.id=Ro(e,"ov-it"),m.timeline_range.start.value=i,m.timeline_range.duration.value=d-i,m.source_range&&(m.source_range.start.value+=i-u,m.source_range.duration.value=d-i),c.push(m),l.timeline_range.duration.value=r-u,l.source_range&&(l.source_range.duration.value=r-u),a.split++;continue}if(u<r)l.timeline_range.duration.value=r-u,l.source_range&&(l.source_range.duration.value=r-u);else{let m=i-u;l.timeline_range.start.value=i,l.timeline_range.duration.value=d-i,l.source_range&&(l.source_range.start.value+=m,l.source_range.duration.value=d-i)}a.trimmed++}return(s.size||c.length)&&(t.items=[...(t.items??[]).filter(l=>!s.has(l)),...c]),(t.items??=[]).sort((l,u)=>l.timeline_range.start.value-u.timeline_range.start.value),Dr(t),a}function Ai(e){let t=[];return e.removed&&t.push(`${e.removed} overwritten`),e.trimmed&&t.push(`${e.trimmed} trimmed`),e.split&&t.push(`${e.split} split`),t.length?` \xB7 ${t.join(", ")}`:""}var lc={head:null,tail:null};function rN(e,t){if(!t?.start||!t.duration||!e||e.content_kind==="still")return lc;let r=e.available_range,i=r?.duration?.value;if(!r||typeof i!="number"||!(i>1))return lc;let n=r.start?.value??0,a=n+i,o=t.start.value,s=o+t.duration.value;return{head:Math.max(0,Math.round(o-n)),tail:Math.max(0,Math.round(a-s))}}function $f(e,t){if(!t.media_reference_id)return lc;let r=(e.media_references??[]).find(i=>i.id===t.media_reference_id);return rN(r,t.source_range)}function nN(e,t,r,i,n={}){let a=Math.round(t),o=Math.max(0,r-1);if(e==="in"){let c=[i.head,n.startFrame,n.sourceStart].filter(u=>typeof u=="number").map(u=>-Math.max(0,u)),l=c.length?Math.max(...c):-1/0;return Math.min(o,Math.max(l,a))}let s=i.tail==null?1/0:i.tail;return Math.max(-o,Math.min(s,a))}function iN(e,t,r,i,n){return(e==="in"?t<0:t>0)?e==="out"?"there is no media after its out point":n<=0?"it already starts at the head of the timeline":"there is no media before its in point":r<=1?"it is already one frame long":"it cannot get any shorter"}var L1=(e,{timeline_id:t,item_id:r,edge:i,delta_frames:n,ripple:a})=>{let o=Hr(e,t);if(!o)return{summary:"Trim: timeline not found"};for(let s of o.tracks??[]){let c=(s.items??[]).find(x=>x.id===r);if(!c)continue;let l=c.timeline_range,u=c.source_range,d=c.name??"clip",m=l.start.value,f=m+l.duration.value,p=$f(e,c),v=Math.round(Number(n)||0),h=nN(i,v,l.duration.value,p,{startFrame:m,sourceStart:u?.start.value});if(h===0)return{summary:v===0?`Trim: "${d}" \u2014 no change`:`Trim: "${d}" won't move \u2014 ${iN(i,v,l.duration.value,p,m)}`,meta:{timeline_id:t,item_id:r,edge:i,delta_frames:0,asked:v,clamped:v!==0}};let b=0;if(i==="out"?(l.duration.value+=h,u&&(u.duration.value+=h),b=h):(l.start.value+=h,l.duration.value-=h,u&&(u.start.value+=h,u.duration.value-=h),b=-h),a&&b!==0)for(let x of s.items)x.id!==c.id&&x.timeline_range.start.value>=f&&(x.timeline_range.start.value+=b);let g={removed:0,trimmed:0,split:0};i==="in"&&h<0?g=mn(e,s,l.start.value,m,c.id):i==="out"&&h>0&&!a&&(g=mn(e,s,f,l.start.value+l.duration.value,c.id)),Ot(o);let y=h>0?"+":"";return{summary:`Trimmed ${i} of "${d}" by ${y}${h}f`+(a?" (rippled)":"")+(h!==v?" (limited by the media)":"")+Ai(g),meta:{timeline_id:t,item_id:r,edge:i,delta_frames:h,asked:v,clamped:h!==v,ripple:!!a,cleared:g}}}return{summary:"Trim: item not found"}};var V1=(e,{timeline_id:t,item_id:r,delta_frames:i})=>{let n=Ki(e,t,r);if(!n)return{summary:"Slip: item not found"};let{item:a}=n;if(!a.source_range)return{summary:"Slip: clip has no source range"};let{head:o,tail:s}=$f(e,a),c=Math.round(Number(i)||0),l=s??1/0,u=o==null?-a.source_range.start.value:-o,d=Math.max(u,Math.min(l,c)),m=Math.max(0,a.source_range.start.value+d),f=m-a.source_range.start.value;if(a.source_range.start.value=m,f===0)return{summary:c===0?`Slip: "${a.name??"clip"}" \u2014 no change`:`Slip: "${a.name??"clip"}" is already at the ${c>0?"end":"start"} of its media`,meta:{timeline_id:t,item_id:r,delta_frames:0,asked:c,clamped:c!==0}};let p=f>0?"+":"";return{summary:`Slipped "${a.name??"clip"}" ${p}${f}f`+(f!==c?" (limited by the media)":""),meta:{timeline_id:t,item_id:r,delta_frames:f,asked:c,clamped:f!==c}}};var q1=(e,{timeline_id:t,item_id:r,item_ids:i,ripple:n})=>{let a=Hr(e,t);if(!a)return{summary:"Delete: timeline not found"};let o=[...new Set([...i??[],...r?[r]:[]])];if(!o.length)return{summary:"Delete: give item_id or item_ids"};let s=(a.tracks??[]).flatMap(d=>(d.items??[]).filter(m=>o.includes(m.id)).map(m=>({track:d,item:m}))).sort((d,m)=>m.item.timeline_range.start.value-d.item.timeline_range.start.value);for(let{track:d,item:m}of s){let f=m.timeline_range.start.value,p=m.timeline_range.duration.value;if(d.items.splice(d.items.indexOf(m),1),n)for(let v of d.items)v.timeline_range.start.value>=f&&(v.timeline_range.start.value-=p)}for(let d of new Set(s.map(m=>m.track)))Dr(d);Ot(a);let c=new Set(s.map(d=>d.item.id)),l=o.filter(d=>!c.has(d));return s.length?{summary:`Deleted ${s.length===1?`"${s[0].item.name??"clip"}"`:`${s.length} clips`}${n?" (rippled)":""}${l.length?`; not found: ${l.slice(0,10).join(", ")}${l.length>10?` (+${l.length-10})`:""}`:""}`,meta:{timeline_id:t,...r&&!i?{item_id:r}:{deleted:s.length},...l.length?{missing:l}:{},ripple:!!n}}:{summary:"Delete: item not found",meta:{timeline_id:t,missing:l}}};function cc(e){return e==="fit"||e==="fill"||e==="stretch"||e==="none"}var aN=.005;function oN(e,t,r,i){if(e<=0||t<=0||r<=0||i<=0)return!1;let n=e/t,a=r/i;return Math.abs(n-a)/Math.max(n,a)<=aN}function tm(e,t,r,i,n){let a=i,o=n;if(!e||!t||e<=0||t<=0||a<=0||o<=0)return[a,o,1,1];let s=e,c=t,l=s/c,u=a/o,d=1,m=1;l>u?m=l/u:l<u&&(d=u/l);let f=Math.max(s/a,c/o);return f>0||(f=1),[s*r/f,c/f,d,m]}function rm(e,t,r,i){let n=Math.max(e/r,t/i);return n>0?n:1}function Z1(e,t,r,i){let n=e/r,a=t/i,o=Math.max(n,a),s=Math.min(n,a);return s>0?o/s:1}function Fo(e,t){return`${e}\xD7${t}`}function sN(e,t){for(let r of e.tracks??[])if(r.kind==="Video"){for(let i of r.items??[])if(M1(i)&&(i.reframe_fit??"fit")!==t)return!0}return!1}function M1(e){let t=e.kind??"clip";return t==="clip"||t==="nested"}function H1(e,t,r,i){return e/r<t/i?"x":"y"}function lN(e,t,r,i,n){let a=e.reframe_fit;if(!a||a==="fit")return;let o=a==="none"?rm(t,r,i,n):Z1(t,r,i,n);o!==1&&(a==="fill"||a==="none"?(e.scale!=null&&(e.scale=e.scale/o),e.raw_scale!=null&&(e.raw_scale=e.raw_scale/o)):a==="stretch"&&(H1(t,r,i,n)==="x"?e.scale_x!=null&&(e.scale_x=e.scale_x/o):e.scale_y!=null&&(e.scale_y=e.scale_y/o)))}function D1(e,t,r,i,n,a){if(!r||!i||r<=0||i<=0){e.reframe_fit=t;return}R1(e,t,r,i,n,a)}function R1(e,t,r,i,n,a){if(e.reframe_fit=t,t==="fit")return;if(t==="none"){let s=rm(r,i,n,a);if(s===1)return;e.scale=(e.scale??100)*s,e.raw_scale!=null&&(e.raw_scale=e.raw_scale*s);return}let o=Z1(r,i,n,a);if(o!==1)if(t==="fill")e.scale=(e.scale??100)*o,e.raw_scale!=null&&(e.raw_scale=e.raw_scale*o);else{let s=e.scale??100;H1(r,i,n,a)==="x"?e.scale_x=(e.scale_x??s)*o:e.scale_y=(e.scale_y??s)*o}}function em(e,t,r,i,n,a,o){let s=0;for(let c of e.tracks??[])if(c.kind==="Video")for(let l of c.items??[]){if(!M1(l))continue;let{w:u,h:d,par:m}=t(l),f=!!u&&!!d&&u>0&&d>0;f&&o!=null&&lN(l,u,d,n,a);let[p,v,h,b]=tm(u,d,m,r,i);l.render_base_w=p,l.render_base_h=v,l.render_pos_div_x=h,l.render_pos_div_y=b,l.raw_scale!=null&&f&&(l.raw_scale=(l.scale??100)/rm(u,d,r,i)),f&&o!=null&&R1(l,o,u,d,r,i),s++}return o!=null&&(e.mismatch_policy=o),s}var F1=(e,t)=>{let r=Math.round(Number(t?.resolution_w)),i=Math.round(Number(t?.resolution_h));if(!Number.isFinite(r)||!Number.isFinite(i)||r<=0||i<=0)return{summary:"Reformat: resolution must be two positive numbers"};if(r%2!==0||i%2!==0)return{summary:`Reformat: ${Fo(r,i)} \u2014 dimensions must be even`};let n=t?.fit??null;if(n!=null&&!cc(n))return{summary:`Reformat: unknown fit policy "${n}"`};let a=new Map;for(let g of e.media_references??[])g.id&&a.set(g.id,g);let o=g=>{let y=g.media_reference_id?a.get(g.media_reference_id):void 0,x=g.pixel_aspect_ratio??y?.source_pixel_aspect??1;return{w:y?.source_resolution_w??null,h:y?.source_resolution_h??null,par:x>0?x:1}},s=e.timelines??[],c;if(t.timeline_id&&t.timeline_id!=="*"){let g=Hr(e,t.timeline_id);if(!g)return{summary:"Reformat: timeline not found"};c=[g]}else c=s;if(c.length===0)return{summary:"Reformat: no timelines in this session"};let l=[],u=[],d=0,m=!1,f=!1;for(let g of c){let y=g.resolution_w,x=g.resolution_h;if(y==null||x==null||y<=0||x<=0){g.resolution_w=r,g.resolution_h=i,d+=em(g,o,r,i,r,i,n),l.push(g.id);continue}if(y===r&&x===i){let N=n!=null&&sN(g,n),P=n!=null&&(g.mismatch_policy??"fit")!==n;if(N||P){N?d+=em(g,o,r,i,y,x,n):n!=null&&(g.mismatch_policy=n),l.push(g.id),f=!0;continue}u.push({timeline_id:g.id,name:g.name??null,reason:`already ${Fo(r,i)}`});continue}let z=!oN(y,x,r,i);if(z&&n==null){u.push({timeline_id:g.id,name:g.name??null,reason:`${Fo(y,x)} \u2192 ${Fo(r,i)} changes the aspect ratio \u2014 choose fit (bars), fill (crop), stretch (distort) or none (native pixels)`});continue}g.resolution_w=r,g.resolution_h=i,d+=em(g,o,r,i,y,x,n),l.push(g.id),z&&(m=!0)}let p=l.length,v=d>0?` \xB7 ${d} clip${d===1?"":"s"}`:"",h=u.length>0?` \xB7 ${u.length} skipped`:"";return{summary:p===0?`Reformat: nothing changed \u2014 ${u[0]?.reason??"no eligible timeline"}`:f&&!m?`Reframed ${p} timeline${p===1?"":"s"} to ${n}${v}${h}`:`Reformatted ${p} timeline${p===1?"":"s"} to ${Fo(r,i)}`+(m&&n?` (${n})`:"")+(v?`${v} re-based`:"")+h,meta:{resolution_w:r,resolution_h:i,fit:n??void 0,changed:l,skipped:u,clips_rebased:d,reframe_only:f}}};var cN=[{label:"23.976",num:24e3,den:1001},{label:"24",num:24,den:1},{label:"25",num:25,den:1},{label:"29.97",num:3e4,den:1001},{label:"30",num:30,den:1},{label:"48",num:48,den:1},{label:"50",num:50,den:1},{label:"59.94",num:6e4,den:1001},{label:"60",num:60,den:1}],I1=[...cN,{label:"47.952",num:48e3,den:1001},{label:"119.88",num:12e4,den:1001},{label:"120",num:120,den:1}];function _R(e){if(e==null||!Number.isFinite(e)||e<=0)return null;let t=null,r=1/0;for(let i of I1){let n=Math.abs(i.num/i.den-e);n<r&&n<=e*.005&&(t={num:i.num,den:i.den},r=n)}return t||(Number.isInteger(e)?{num:e,den:1}:{num:Math.round(e*1e3),den:1e3})}function uc(e,t){if(!(t>0))return"\u2014";let r=I1.find(n=>n.num===e&&n.den===t);if(r)return r.label;let i=e/t;return Number.isInteger(i)?String(i):i.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")}function nm(e){return e==null||!Number.isFinite(e)?"?":uc(e,1)}function Qe(e){let t=e.fps_num??0;if(t>0)return t/((e.fps_den??0)>0?e.fps_den:1);for(let r of e.tracks??[])for(let i of r.items??[]){let n=i.timeline_range?.start?.rate;if(n&&n>0)return n}return 24}var J1="conform.stringout",E1=(e,t)=>({value:e,rate:t}),C1=(e,t,r)=>({start:E1(e,r),duration:E1(t,r)});function dc(e){return e.generated_by===J1}function uN(e){let t=e?.available_range;if(!t)return null;let r=t.start?.value,i=t.duration?.value;return typeof r!="number"||typeof i!="number"||i<=0?null:{start:r,duration:i}}function dN(e,t,r,i){let n=e.source_range,a=uN(t);if(r==="full")return a||(n?{start:n.start.value,duration:n.duration.value}:null);if(!n||!(n.duration.value>0))return null;let o=n.start.value,s=n.duration.value;if(r==="handles"&&i>0){let c=o-i,l=o+s+i;a?(c=Math.max(a.start,c),l=Math.min(a.start+a.duration,l)):c=Math.max(0,c),o=c,s=Math.max(1,l-c)}return{start:o,duration:s}}function fN(e,t,r){let i=new Map;for(let u of e.media_references??[])u.id&&i.set(u.id,u);let n=(e.timelines??[]).filter(u=>!dc(u)),a=n[0],o=a?Qe(a):24,s=[],c=0,l=0;for(let u of n)for(let d of u.tracks??[])if(d.kind==="Video")for(let m of d.items??[]){if(m.kind!=="clip"||m.enabled===!1)continue;let f=m.media_reference_id?i.get(m.media_reference_id):void 0,p=f?.source_resolution_w,v=f?.source_resolution_h;if(!p||!v||p<=0||v<=0){l++;continue}let h=dN(m,f,t,r);if(!h){c++;continue}let b=m.source_range,g=b?.duration?.rate||b?.start?.rate||f?.available_range?.duration?.rate||o,y=m.pixel_aspect_ratio??f?.source_pixel_aspect??1;s.push({item:m,mrefId:m.media_reference_id??null,w:p,h:v,par:y>0?y:1,start:h.start,duration:h.duration,rate:g,name:m.name,reel:m.reel_name??null})}return{shots:s,fallbackRate:o,noRange:c,noRaster:l}}function mN(e,t){let r=new Set,i=[];for(let n of e){let a=t==="full"?`m:${n.mrefId??n.item.id}`:`m:${n.mrefId??n.item.id}|${n.start}|${n.duration}`;r.has(a)||(r.add(a),i.push(n))}return i}var G1=(e,t)=>{let r=t?.extent??"cut";if(r!=="cut"&&r!=="handles"&&r!=="full")return{summary:`Stringout: unknown extent "${r}"`};let i=r==="handles"?Math.max(0,Math.round(t?.handles??24)):0,n=(t?.name_prefix??"STRINGOUT").trim()||"STRINGOUT",{shots:a,fallbackRate:o,noRange:s,noRaster:c}=fN(e,r,i),l=mN(a,r);if(l.length===0)return{summary:c>0?`Stringout: no clip has a probed resolution to group by (${c} unprobed)`:"Stringout: no clips with a usable range in this session"};let u=new Map;for(let P of l){let O=`${P.w}x${P.h}`,X=u.get(O);X?X.push(P):u.set(O,[P])}let d=[...u.entries()].sort((P,O)=>{let[X,S]=P[0].split("x").map(Number),[w,j]=O[0].split("x").map(Number);return w*j-X*S||w-X||j-S}),m=(e.timelines??[]).filter(P=>!dc(P)),f=m[0]?.fps_num??Math.round(o*1e3),p=m[0]?.fps_den??1e3,v=p?f/p:o,h=0,b=P=>`so-${P}-${++h}`,g=[],y=(e.timelines??[]).length;for(let[,P]of d){let{w:O,h:X,par:S}=P[0],w=b("tl"),j=`${n} ${O}\xD7${X}${S!==1?` PAR ${pN(S)}`:""}`,M=[],G=0;P.forEach((J,K)=>{M.push({id:b("it"),kind:"clip",item_index:K,name:J.name,enabled:!0,timeline_range:C1(G,J.duration,v),source_range:C1(J.start,J.duration,J.rate||v),media_reference_id:J.mrefId,reel_name:J.reel,pixel_aspect_ratio:J.par,scale:100,position_x:0,position_y:0,rotation:0,crop_left:0,crop_right:0,crop_top:0,crop_bottom:0,render_base_w:O*J.par,render_base_h:X,render_pos_div_x:1,render_pos_div_y:1,keyframes:[],effects:[]}),G+=J.duration});let Z={id:b("tr"),kind:"Video",track_index:0,name:"V1",enabled:!0,items:M};(e.timelines??=[]).push({id:w,name:j,kind:"primary",timeline_index:y++,fps_num:f,fps_den:p,resolution_w:O,resolution_h:X,pixel_aspect_ratio:S,start_frame:0,is_drop_frame:m[0]?.is_drop_frame??!1,duration_frames:G,tracks:[Z],markers:[],generated_by:J1}),g.push({id:w,name:j,w:O,h:X,clips:P.length})}let x=a.length-l.length,z=r==="handles"?`handles \xB1${i}f`:r;return{summary:`Strung out ${l.length} clip${l.length===1?"":"s"} into ${g.length} reel${g.length===1?"":"s"} by resolution (${g.map(P=>`${P.w}\xD7${P.h}\xD7${P.clips}`).join(", ")}) \xB7 ${z}`+(x>0?` \xB7 ${x} duplicate${x===1?"":"s"} collapsed`:"")+(c>0?` \xB7 ${c} unprobed skipped`:"")+(s>0?` \xB7 ${s} skipped (no range)`:""),meta:{timelines:g,clips:l.length,extent:r,handles:i,duplicates_collapsed:x,skipped_no_raster:c,skipped_no_range:s}}};function pN(e){return Math.round(e*1e4)/1e4}var vN=["position","scale","rotation"];function fc(e,t){return t.length===0?[e,e]:[Math.min(...t),Math.max(...t)]}var hN={"anchor-or-flip":"off-centre anchor",nested:"compound clip",retimed:"retimed",cropped:"cropped","mixed-format":"mixed-format conform sizing",revealing:"zooms out or repositions past the frame",transition:"animated under a transition"};function bN(e,t){let r=new Map;for(let V of e.keyframes??[]){let I=V.parameter_path??"";if(!vN.some(oe=>I===oe||I.startsWith(oe+".")))continue;let ae=r.get(I)??[];ae.push(V.value),r.set(I,ae)}let i=V=>{let I=r.get(V);if(!I||I.length===0)return!1;let ae=JSON.stringify(I[0]);return I.some(oe=>JSON.stringify(oe)!==ae)},n=[...r.keys()].some(i),a=V=>typeof V=="number"?V:null,o=(V,I)=>(r.get(V)??[]).map(ae=>I?I(ae):a(ae)).filter(ae=>ae!=null),s=[...o("position",V=>Array.isArray(V)?a(V[0]):null),...o("position.x")],c=[...o("position",V=>Array.isArray(V)?a(V[1]):null),...o("position.y")],l=o("scale"),u=o("rotation"),d=e.position_x??0,m=e.position_y??0,f=e.scale??100,p=e.scale_x??null,v=e.scale_y??null,h=e.rotation??0,b=e;if(!(n||b.flip_horizontal===!0||b.flip_vertical===!0||Math.abs(d)>1e-9||Math.abs(m)>1e-9||Math.abs(f-100)>1e-9||p!=null&&Math.abs(p-f)>1e-9||v!=null&&Math.abs(v-f)>1e-9||Math.abs(h)>1e-9||s.some(V=>Math.abs(V)>1e-9)||c.some(V=>Math.abs(V)>1e-9)||l.some(V=>Math.abs(V-100)>1e-9)||u.some(V=>Math.abs(V)>1e-9)))return{verdict:"none"};let y=Math.abs(e.anchor_x??0)>1e-9||Math.abs(e.anchor_y??0)>1e-9,x=e;if(y)return{verdict:"kept",reason:"anchor-or-flip"};if(e.kind==="nested")return{verdict:"kept",reason:"nested"};if((x.speed!=null&&Math.abs(x.speed-100)>1e-9||x.speed_reverse===!0||x.speed_ramped===!0)&&(n||x.speed_ramped===!0))return{verdict:"kept",reason:"retimed"};if(n&&t?.transitionOverlap)return{verdict:"kept",reason:"transition"};if([e.crop_left,e.crop_right,e.crop_top,e.crop_bottom].some(V=>Math.abs(V??0)>1e-9)||(e.keyframes??[]).some(V=>(V.parameter_path??"").startsWith("crop")&&Math.abs(a(V.value)??0)>1e-9))return{verdict:"kept",reason:"cropped"};if(t){let V=t.sourcePar??1;if(Math.abs(V-1)>1e-4)return{verdict:"kept",reason:"mixed-format"};let I=t.sourceW??0,ae=t.sourceH??0;if(I>0&&ae>0&&Math.abs(I/ae-t.frameAr)/t.frameAr>.005)return{verdict:"kept",reason:"mixed-format"}}let P=t?.frameAr??16/9,[O]=fc(f,l),[X,S]=fc(d,s),[w,j]=fc(m,c),[M,G]=fc(h,u),Z=Math.max(Math.abs(X),Math.abs(S)),J=Math.max(Math.abs(w),Math.abs(j)),_=Math.max(Math.abs(M),Math.abs(G))*Math.PI/180,R=Math.cos(_)+P*Math.sin(_),te=(p!=null&&l.length===0?p:O)/100,H=(v!=null&&l.length===0?v:O)/100;return te>=R+2*Z-1e-6&&H>=R+2*J-1e-6||(t?.surface??"node")!=="input"?{verdict:"moves"}:{verdict:"kept",reason:"revealing"}}function gN(e,t){let r=e.timeline_range;if(!r)return!1;let i=r.start.value,n=r.start.value+r.duration.value;return(t.items??[]).some(a=>{if(a.kind!=="transition"||!a.timeline_range)return!1;let o=a.timeline_range.start.value,s=a.timeline_range.start.value+a.timeline_range.duration.value;return o<n&&s>i})}function yN(e,t,r="node"){let i=new Map((t?.media_references??[]).map(c=>[c.id,c])),n=(e.resolution_w||1920)/(e.resolution_h||1080),a=0,o=0,s={};for(let c of e.tracks??[])if(c.kind==="Video")for(let l of c.items??[]){if(l.kind!=="clip"&&l.kind!=="nested")continue;let u=l.media_reference_id?i.get(l.media_reference_id):void 0,d=bN(l,{frameAr:n,sourceW:u?.source_resolution_w,sourceH:u?.source_resolution_h,sourcePar:u?.source_pixel_aspect,transitionOverlap:gN(l,c),surface:r});d.verdict==="moves"?a++:d.verdict==="kept"&&(o++,d.reason&&(s[d.reason]=(s[d.reason]??0)+1))}return{moves:a,kept:o,reasons:s}}var K1=(e,t)=>{let r=t?.surface==="edit"?"edit":"node",i=t?.timeline_id,n=(e.timelines??[]).filter(u=>!i||i==="*"||u.id===i);if(n.length===0)return{summary:"No matching timeline"};let a=0,o=0,s={};for(let u of n){u.sizing_surface=r;let d=yN(u,e);a+=d.moves,o+=d.kept;for(let[m,f]of Object.entries(d.reasons)){let p=m;s[p]=(s[p]??0)+(f??0)}}let c=Object.entries(s).sort((u,d)=>(d[1]??0)-(u[1]??0)).map(([u,d])=>`${d} ${hN[u]}`).join(" \xB7 ");if(r==="edit")return{summary:"Sizing back on the edit page \u2014 the next Resolve export keeps clip transforms in the inspector",meta:{surface:r,moves:a,kept:o,reasons:s,timelines:n.length}};let l=[`${a} clip${a===1?"":"s"} move to the color page in the next Resolve export`];return o>0&&l.push(`${o} stay on the edit page (${c})`),a===0&&o===0&&(l[0]="No clip transforms to move \u2014 the flag is set for anything added later"),{summary:l.join(" \xB7 "),meta:{surface:r,moves:a,kept:o,reasons:s,timelines:n.length}}};var A1=(e,t)=>({value:e,rate:t}),mc=(e,t,r)=>({start:A1(e,r),duration:A1(t,r)});function xN(e){let t=e.streams??[];return t.length?t.some(r=>r.kind==="video"):e.content_kind!=="audio"}function wN(e){let t=e.streams??[];return t.length?t.some(r=>r.kind==="audio"):e.content_kind==="audio"||e.content_kind==="video_audio"}function zN(e){return(e.streams??[]).find(t=>t.kind==="audio")?.channels??null}function U1(e,t,r){let i=[...t.tracks??[]].reverse().find(o=>o.kind===r);if(i)return i;let n=(t.tracks??[]).filter(o=>o.kind===r).length,a={id:Ro(e,"ac-tr"),kind:r,track_index:n,name:`${r==="Video"?"V":"A"}${n+1}`,enabled:!0,items:[]};return(t.tracks??=[]).push(a),a}function im(e){return e.display_name?e.display_name:(e.target_url??"").split("/").pop()||e.id}var Y1=(e,t)=>{let r=(e.timelines??[]).find(X=>X.id===t.timeline_id);if(!r)return{summary:"Add clip: timeline not found"};let i=(e.media_references??[]).find(X=>X.id===t.media_reference_id);if(!i){if(!t.media_reference||t.media_reference.id!==t.media_reference_id)return{summary:"Add clip: media reference not in session and none supplied"};(e.media_references??=[]).push(t.media_reference),i=t.media_reference}let n=Qe(r),a=i.available_range,o=a?.duration?.rate||a?.start?.rate||n,s=t.source_start??a?.start?.value??0,c=Math.max(1,Math.round(t.source_duration??a?.duration?.value??n)),l=xN(i),u=!t.without_audio&&wN(i),d=l?"Video":"Audio",m=t.track_id?(r.tracks??[]).find(X=>X.id===t.track_id):null;if(t.track_id&&!m)return{summary:"Add clip: track not found"};if(m&&m.kind!==d)return{summary:`Add clip: ${m.name??m.id} is a ${m.kind} track`};let f=m??U1(e,r,d),p=0;for(let X of f.items??[]){let S=X.timeline_range.start.value+X.timeline_range.duration.value;S>p&&(p=S)}typeof t.at_frame=="number"&&Number.isFinite(t.at_frame)&&(p=Math.max(0,Math.round(t.at_frame)));let v=mn(e,f,p,p+c),h=i.source_pixel_aspect??1,[b,g,y,x]=tm(i.source_resolution_w,i.source_resolution_h,h,r.resolution_w??0,r.resolution_h??0),z=cc(t.fit)?t.fit:cc(r.mismatch_policy)?r.mismatch_policy:"fit",N={id:Ro(e,"ac-it"),kind:"clip",item_index:(f.items??[]).length,name:im(i),enabled:!0,timeline_range:mc(p,c,n),source_range:mc(s,c,o),media_reference_id:i.id,reel_name:i.reel_name??null,pixel_aspect_ratio:h,scale:100,position_x:0,position_y:0,rotation:0,crop_left:0,crop_right:0,crop_top:0,crop_bottom:0,render_base_w:b,render_base_h:g,render_pos_div_x:y,render_pos_div_y:x,keyframes:[],effects:[]};D1(N,z,i.source_resolution_w,i.source_resolution_h,r.resolution_w??0,r.resolution_h??0),(f.items??=[]).push(N),f.items.sort((X,S)=>X.timeline_range.start.value-S.timeline_range.start.value),Dr(f);let P=null;if(u&&l){let X=U1(e,r,"Audio");X.audio_channel_count==null&&(X.audio_channel_count=zN(i)),mn(e,X,p,p+c);let S={id:Ro(e,"ac-it"),kind:"clip",item_index:(X.items??[]).length,name:im(i),enabled:!0,timeline_range:mc(p,c,n),source_range:mc(s,c,o),media_reference_id:i.id,reel_name:i.reel_name??null,keyframes:[],effects:[]};(X.items??=[]).push(S),X.items.sort((w,j)=>w.timeline_range.start.value-j.timeline_range.start.value),Dr(X),P={track:X,item:S}}Ot(r);let O=P?"picture + sound":l?"picture":"sound";return{summary:`Added "${im(i)}" (${O}) to ${r.name??"timeline"} at ${p}f (${c}f)`+Ai(v),meta:{timeline_id:r.id,track_id:f.id,item_id:N.id,media_reference_id:i.id,at_frame:p,duration_frames:c,ref_added:i===t.media_reference,fit:z,cleared:v,audio_track_id:P?.track.id??null,audio_item_id:P?.item.id??null}}};function PN(e,t){let r=new Set((e.timelines??[]).map(n=>n.id)),i=1;for(;r.has(`${t}-${i}`);)i++;return`${t}-${i}`}function kN(e){let t=new Set((e.timelines??[]).map(i=>i.name)),r=(e.timelines??[]).length+1;for(;t.has(`Timeline ${r}`);)r++;return`Timeline ${r}`}var B1=(e,t)=>{let r=e.timelines??[];if(t.timeline_id&&r.some(m=>m.id===t.timeline_id))return{summary:`New timeline: id "${t.timeline_id}" is already in the session`};let i=t.timeline_id||PN(e,"nt-tl"),n=t.name||kN(e),a=r.find(m=>m.kind==="primary")??r[0],o=typeof t.fps_num=="number"&&t.fps_num>0&&typeof t.fps_den=="number"&&t.fps_den>0,s=o?t.fps_num:a?.fps_num??24,c=o?t.fps_den:a?.fps_den??1,l={id:`${i}-v1`,kind:"Video",track_index:0,name:"V1",enabled:!0,items:[]},u={id:i,name:n,kind:"primary",timeline_index:r.length,fps_num:s,fps_den:c,resolution_w:t.resolution_w||a?.resolution_w||1920,resolution_h:t.resolution_h||a?.resolution_h||1080,pixel_aspect_ratio:t.pixel_aspect_ratio??1,start_frame:t.start_frame??0,is_drop_frame:t.is_drop_frame??!1,duration_frames:0,tracks:[l],markers:[],source_element_id:null,raw_extraction:{},metadata:{}};(e.timelines??=[]).push(u);let d=c?s/c:0;return{summary:`New timeline "${n}" \u2014 ${u.resolution_w}\xD7${u.resolution_h} @ ${Number.isInteger(d)?d:d.toFixed(3)}`,meta:{timeline_id:i,track_id:l.id,name:n,fps_num:s,fps_den:c,resolution_w:u.resolution_w,resolution_h:u.resolution_h}}};function TN(e,t){let r=new Set;for(let n of e.timelines??[])for(let a of n.tracks??[])r.add(a.id);let i=1;for(;r.has(`${t}-${i}`);)i++;return`${t}-${i}`}var Q1=(e,t)=>{let r=(e.timelines??[]).find(c=>c.id===t.timeline_id);if(!r)return{summary:"Add track: timeline not found"};let i=String(t.kind??"Video").toLowerCase();if(i!=="video"&&i!=="audio")return{summary:`Add track: kind must be Video or Audio, not '${t.kind}'`};let n=i==="video"?"Video":"Audio",a=(r.tracks??[]).filter(c=>c.kind===n).length,o=`${n==="Video"?"V":"A"}${a+1}`,s={id:TN(e,"at-tr"),kind:n,track_index:a,name:o,enabled:!0,items:[]};return(r.tracks??=[]).push(s),{summary:`Added ${o} to ${r.name??"timeline"}`,meta:{timeline_id:r.id,track_id:s.id,kind:n,name:o}}};var _1=(e,t)=>{let r=e.timelines??[],i=m=>r.find(f=>f.id===m||f.name===m),n=i(t.timeline_id),a=i(t.from);if(!n)return{summary:`Stack track: no timeline ${t.timeline_id}`};if(!a)return{summary:`Stack track: no timeline ${t.from} (a timeline of another session comes in through sources)`};let o=Math.max(1,Math.round(t.from_track??1)),s=(a.tracks??[]).filter(m=>m.kind==="Video").sort((m,f)=>m.track_index-f.track_index)[o-1];if(!s)return{summary:`Stack track: ${a.name} has no V${o}`};let c=(n.tracks??[]).filter(m=>m.kind==="Video").length,l=new Set((n.tracks??[]).flatMap(m=>[m.id,...m.items.map(f=>f.id)])),u=m=>{let f=`stk-${m}`,p=1;for(;l.has(f);)f=`stk-${m}-${p++}`;return l.add(f),f},d=structuredClone(s);Object.assign(d,{id:u(s.id),track_index:c,name:t.name?.trim()||`REF ${a.name??""}`.trim(),enabled:!1});for(let m of d.items)m.id=u(m.id);return(n.tracks??=[]).push(d),{summary:`Stacked ${a.name}'s V${o} (${d.items.filter(m=>m.kind==="clip").length} clips) onto ${n.name} as V${c+1}`,meta:{timeline_id:n.id,track:c+1,track_id:d.id}}};function NN(e){let t=e;return t.finish_ops??=[]}var $1=(e,t)=>{let r,i,n;if(t.timeline_level){let s=(e.timelines??[]).find(c=>c.id===t.timeline_id);if(!s)return{summary:"Finish: timeline not found"};r=s,i=s.name??"timeline",n=s.id}else{if(!t.item_id)return{summary:"Finish: item_id required for a clip-level stack"};let s=Ki(e,t.timeline_id,t.item_id);if(!s)return{summary:"Finish: item not found"};r=s.item,i=s.item.name??"clip",n=s.item.id}let a={id:n},o=NN(r);if(t.entry){let s=o.findIndex(l=>l.id===t.entry.id),c=s>=0;return c?o[s]=t.entry:o.push(t.entry),{summary:`${c?"Updated":"Added"} ${t.entry.label??t.entry.kind} on "${i}"`,meta:{item_id:a.id,entry_id:t.entry.id,upserted:!0}}}if(t.toggle_id){let s=o.find(c=>c.id===t.toggle_id);return s?(s.enabled=!s.enabled,{summary:`${s.enabled?"Enabled":"Bypassed"} ${s.label??s.kind} on "${i}"`,meta:{item_id:a.id,entry_id:s.id,enabled:s.enabled}}):{summary:`Finish: operator not found on "${i}"`}}if(t.remove_id){let s=o.findIndex(l=>l.id===t.remove_id);if(s<0)return{summary:`Finish: operator not found on "${i}"`};let[c]=o.splice(s,1);return{summary:`Removed ${c.label??c.kind} from "${i}"`,meta:{item_id:a.id,entry_id:c.id,removed:!0}}}return{summary:"Finish: nothing to do (no entry / toggle_id / remove_id)"}};var e9=(e,t)=>{let r=(e.timelines??[]).find(s=>s.id===t.timeline_id);if(!r)return{summary:"Delete track: timeline not found"};let i=(r.tracks??[]).findIndex(s=>s.id===t.track_id);if(i<0)return{summary:"Delete track: track not found"};let[n]=r.tracks.splice(i,1),a=0;for(let s of r.tracks)s.kind===n.kind&&(s.track_index=a++);Ot(r);let o=(n.items??[]).filter(s=>s.kind!=="gap").length;return{summary:`Deleted ${n.name??n.kind} (${o} clip${o===1?"":"s"}) from ${r.name??"timeline"}`,meta:{timeline_id:r.id,track_id:n.id,kind:n.kind,clips:o}}};var t9=(e,t)=>{let r=(e.timelines??[]).find(f=>f.id===t.timeline_id);if(!r)return{summary:"Move: timeline not found"};let i,n,a=-1;for(let f of r.tracks??[]){let p=(f.items??[]).findIndex(v=>v.id===t.item_id);if(p>=0){i=f,n=f.items[p],a=p;break}}if(!i||!n)return{summary:"Move: clip not found"};let o=t.to_track_id?(r.tracks??[]).find(f=>f.id===t.to_track_id):i;if(!o)return{summary:"Move: destination track not found"};if(o.kind!==i.kind)return{summary:`Move: can't put a ${i.kind} clip on a ${o.kind} track`};let s=n.timeline_range.start.value,c=n.timeline_range.duration.value,l=typeof t.to_frame=="number"&&Number.isFinite(t.to_frame)?Math.max(0,Math.round(t.to_frame)):s;if(o===i&&l===s)return{summary:"Move: already there"};let u=mn(e,o,l,l+c,n.id);if(o!==i){let f=i.items.findIndex(p=>p.id===n.id);i.items.splice(f>=0?f:a,1),(o.items??=[]).push(n)}n.timeline_range.start.value=l,o.items.sort((f,p)=>f.timeline_range.start.value-p.timeline_range.start.value),Dr(i),o!==i&&Dr(o),Ot(r);let d=o!==i?` to ${o.name??"track"}`:"",m=l!==s?` to ${l}f`:"";return{summary:`Moved "${n.name??"clip"}"${d}${m}${Ai(u)}`,meta:{timeline_id:r.id,item_id:n.id,from_track_id:i.id,to_track_id:o.id,from_frame:s,to_frame:l,cleared:u}}};function ON(e){let t=0;for(let r of e.tracks??[])t+=(r.items??[]).length;return t}var r9=(e,t)=>{let r=Math.round(Number(t?.fps_num)),i=Math.round(Number(t?.fps_den));if(!Number.isFinite(r)||!Number.isFinite(i)||r<=0||i<=0)return{summary:"Frame rate: must be a positive rational (fps_num / fps_den)"};let n=Hr(e,t?.timeline_id);if(!n)return{summary:"Frame rate: timeline not found"};let a=uc(n.fps_num??0,n.fps_den??0),o=uc(r,i);if(n.fps_num===r&&n.fps_den===i)return{summary:`Frame rate: already ${o} fps`};let s=ON(n);return s>0?{summary:`Frame rate: ${n.name??"this timeline"} has ${s} item${s===1?"":"s"} in it \u2014 changing ${a} \u2192 ${o} would move every cut. Set the rate on an empty timeline, or export and re-conform at the new rate.`,meta:{timeline_id:n.id,refused:"populated",items:s}}:(n.fps_num=r,n.fps_den=i,{summary:`Frame rate: ${a} \u2192 ${o} fps`,meta:{timeline_id:n.id,fps_num:r,fps_den:i,was:a}})};var SN=["crop_left","crop_right","crop_top","crop_bottom"],XN={scale:"scale",opacity:"opacity",position_x:"position X",position_y:"position Y",rotation:"rotation",crop_left:"crop L",crop_right:"crop R",crop_top:"crop T",crop_bottom:"crop B"},am=(e,t,r)=>Math.min(r,Math.max(t,e));function Ui(e){return typeof e=="number"&&Number.isFinite(e)?e:null}var n9=(e,t)=>{let r=Ki(e,t.timeline_id,t.item_id);if(!r)return{summary:"Transform: clip not found"};let i=r.item,n=[],a=(f,p)=>{i[f]!==p&&(i[f]=p,n.push(f))},o=Ui(t.scale);o!=null&&a("scale",am(o,.01,1e5));let s=Ui(t.opacity);s!=null&&a("opacity",am(s,0,100));let c=Ui(t.position_x);c!=null&&a("position_x",c);let l=Ui(t.position_y);l!=null&&a("position_y",l);let u=Ui(t.rotation);u!=null&&a("rotation",u);for(let f of SN){let p=Ui(t[f]);p!=null&&a(f,am(p,0,100))}if(n.length===0)return{summary:"Transform: nothing changed"};let d=i.name??t.item_id;return{summary:`Set ${n.map(f=>XN[f]??f).join(", ")} on "${d}"`,meta:{timeline_id:t.timeline_id,item_id:t.item_id,changed:n}}};var jN=e=>!!e&&typeof e=="object"&&Number.isFinite(e.value)&&Number.isFinite(e.rate)&&e.rate>0,i9=(e,t)=>{let r=e.timelines??[],i=t.timeline_id?r.find(d=>d.id===t.timeline_id):r.length===1?r[0]:r.find(d=>d.kind==="primary");if(!i)return{summary:`Add markers: timeline not found (${t.timeline_id??"no timeline_id"}); timelines: ${r.map(d=>d.id).join(", ")||"none"}`};let n=Qe(i),a=(d,m)=>typeof d=="number"&&Number.isFinite(d)?{value:d,rate:n}:jN(d)?d:d==null&&m?m:null,o=new Set((i.tracks??[]).flatMap(d=>(d.items??[]).map(m=>m.id))),s=new Set((i.markers??[]).map(d=>d.id)),c=[],l=[];(t.markers??[]).forEach((d,m)=>{let f=d??{},p=`marker ${m}${typeof f.name=="string"?` "${f.name}"`:""}`;if(typeof d!="object"||d===null)return void l.push(`${p}: not an object`);let v=a(f.time??f.frame);if(!v)return void l.push(`${p}: time must be timeline frames or {value, rate}, got ${JSON.stringify(f.time??f.frame)}`);if(v.value<0)return void l.push(`${p}: time ${v.value} is before the timeline start`);let h=a(f.duration,{value:1,rate:v.rate});if(!h||h.value<0)return void l.push(`${p}: duration must be frames or {value, rate}, got ${JSON.stringify(f.duration)}`);let b=typeof f.item_id=="string"?f.item_id:null;if(b&&!o.has(b))return void l.push(`${p}: no item ${b} on this timeline`);let g=typeof f.id=="string"&&f.id?f.id:"";if(g&&s.has(g))return void l.push(`${p}: id ${g} already present`);for(let y=(i.markers??[]).length+c.length;!g||s.has(g);y++)g=`marker-${y}`;s.add(g),c.push({kind:null,raw_extraction:{},source_element_id:null,metadata:{},...f,id:g,time:v,duration:h,item_id:b,name:typeof f.name=="string"?f.name:null,note:typeof f.note=="string"?f.note:null,color:typeof f.color=="string"?f.color:null})});let u=l.length?`; dropped ${l.length}: ${l.join("; ")}`:"";return c.length===0?{summary:`Add markers: nothing added${u||" (no markers given)"}`,meta:{added:0,dropped:l}}:(i.markers=[...i.markers??[],...c],{summary:`Added ${c.length} marker(s) to "${i.name}"${u}`,meta:{timeline_id:i.id,added:c.length,dropped:l}})};var s9="generated_by",WN="conform.add_handles",om=e=>typeof e[s9]=="string"||dc(e);function LN(e,t){return t<0?`${e}_TRIM_${-t}FR`:`${e}_${t}FR_HANDLES`}function Yn(e,t){let r=new Set(t);if(!r.has(e))return e;for(let i=2;;i++){let n=`${e}_${String(i).padStart(2,"0")}`;if(!r.has(n))return n}}var sm=e=>!!e&&!Gi(e)&&ic(e);function Io(e){let t=e?.available_range,r=t?.start?.value,i=t?.duration?.value;return typeof r=="number"&&typeof i=="number"&&i>0?{start:r,end:r+i}:null}function lm(e,t,r,i){let n=Io(i),a=Math.max(n?.start??0,e-r),o=n?Math.min(n.end,t+r):t+r;return o<=a?null:{start:a,end:o,clamped:a!==e-r||o!==t+r,unverified:!n&&r>0}}var a9=(e,t)=>({value:e,rate:t}),o9=(e,t,r)=>({start:a9(e,r),duration:a9(t,r)});function cm(e,t,r,i,n,a,o,s){return{id:e,kind:"clip",item_index:0,name:t.name,enabled:!0,timeline_range:o9(o,n,s),source_range:o9(i,n,a),media_reference_id:r,reel_name:t.reel_name??null,...t.pixel_aspect_ratio!=null?{pixel_aspect_ratio:t.pixel_aspect_ratio}:{},keyframes:[],effects:[]}}function Eo(e,t,r,i,n,a,o){return{id:t,name:r,kind:"primary",timeline_index:i,...e.project_id?{project_id:e.project_id}:{},fps_num:e.fps_num,fps_den:e.fps_den,resolution_w:e.resolution_w,resolution_h:e.resolution_h,pixel_aspect_ratio:e.pixel_aspect_ratio??1,start_frame:e.start_frame,is_drop_frame:e.is_drop_frame,duration_frames:a,tracks:n,markers:[],source_element_id:null,raw_extraction:{},metadata:{},[s9]:o}}function VN(e,t){let r=e.timelines??[];return t?r.find(i=>i.id===t):r.find(i=>i.kind==="primary"&&!om(i))??r[0]}var l9=(e,t)=>{let r=Math.round(Number(t?.handles));if(!Number.isFinite(r)||r===0)return{summary:"Add handles: handles must be a non-zero frame count (positive adds, negative trims)"};let i=VN(e,t?.timeline_id);if(!i)return{summary:`Add handles: timeline not found (${t?.timeline_id??"no timeline in session"})`};let n=new Map;for(let b of e.media_references??[])b.id&&n.set(b.id,b);let a=[];(i.tracks??[]).filter(b=>b.kind==="Video").forEach((b,g)=>{for(let y of b.items??[])y.kind==="clip"&&a.push({item:y,track:g})}),a.sort((b,g)=>b.item.timeline_range.start.value-g.item.timeline_range.start.value||b.track-g.track);let o=i.fps_den?i.fps_num/i.fps_den:24,s=(e.timelines??[]).length,c=[],l=[],u=0,d=0,m=0;for(let{item:b}of a){let g=b.media_reference_id?n.get(b.media_reference_id):void 0,y=b.source_range,x=P=>l.push({item_id:b.id,name:b.name,reason:P});if(!g){x("no media (generator, title or compound)");continue}if(sm(g)){x("still");continue}if(!y||!(y.duration.value>0)){x("no source range");continue}let z=lm(y.start.value,y.start.value+y.duration.value,r,g);if(!z){x(r<0?`shorter than the ${-r*2}-frame trim`:"cut lies outside the media's extent");continue}z.clamped&&r>0&&d++,z.unverified&&m++;let N=z.end-z.start;c.push(cm(`ah${s}-it-${c.length+1}`,b,g.id,z.start,N,y.start.rate||o,u,o)),u+=N}if(c.forEach((b,g)=>b.item_index=g),c.length===0)return{summary:`Add handles: no usable video clips on "${i.name}"`,meta:{skipped:l}};let f=Yn(t?.name?.trim()||LN(i.name,r),(e.timelines??[]).map(b=>b.name)),p=`ah${s}-tl`,v={id:`ah${s}-v1`,kind:"Video",track_index:0,name:"V1",enabled:!0,items:c};(e.timelines??=[]).push(Eo(i,p,f,s,[v],u,WN));let h=r>0?`\xB1${r}f handles`:`trimmed ${-r}f each end`;return{summary:`New timeline "${f}": ${c.length} clip${c.length===1?"":"s"}, ${h}`+(d?` \xB7 ${d} clamped at the media's ends`:"")+(m?` \xB7 ${m} unprobed (tail handle not checked against the file)`:"")+(l.length?` \xB7 ${l.length} skipped`:""),meta:{timeline_id:p,name:f,source_timeline_id:i.id,handles:r,clips:c.length,clamped:d,unverified:m,skipped:l}}};var qN="conform.all_clips",ZN="_REF|_REFERENCE| REF",Co=e=>e.replace(/\\/g,"/").replace(/\/+$/,"").split("/").pop()??"",u9=(e,t)=>e.source_fps||e.available_range?.duration?.rate||t;function d9(e,t){return e.source_timecode?Te(e.source_timecode,u9(e,t)):null}function MN(e,t){let i=(Co(e.target_url??"")||e.display_name||"").replace(/\.[^.]*$/,"").replace(/[._ ]?\[\d+\s*-\s*\d+\]/,"");return Gi(e)&&(i=i.replace(/[._ ]\d{3,}$/,"")),i=i.trim().toLowerCase(),!i&&e.reel_name&&(i=`reel:${e.reel_name.trim().toLowerCase()}`),i?`${i}@${u9(e,t).toFixed(3)}`:null}function HN(e){let t=Io(e.mref);return t?[e.tc+t.start,e.tc+t.end]:[e.tc+Math.min(...e.uses.map(r=>r.start)),e.tc+Math.max(...e.uses.map(r=>r.end))]}function DN(e,t){let r=new Map;for(let a of e){let o=MN(a.mref,t)??`mref:${a.mref.id}`,s=r.get(o);s||r.set(o,s=new Map);let c=s.get(a.mref.id);c||s.set(a.mref.id,c={mref:a.mref,tc:d9(a.mref,t),uses:[]}),c.uses.push(a)}let i=[];for(let a of r.values()){let o=[...a.keys()],s=o.filter(m=>a.get(m).tc!=null),c=new Map(s.map(m=>[m,m])),l=m=>c.get(m)===m?m:l(c.get(m)),u=new Map(s.map(m=>[m,HN(a.get(m))]));for(let m=0;m<s.length;m++)for(let f=m+1;f<s.length;f++){let[p,v]=[u.get(s[m]),u.get(s[f])];p[0]<v[1]&&v[0]<p[1]&&c.set(l(s[m]),l(s[f]))}let d=new Map;for(let m of o){let f=c.has(m)?l(m):`alone:${m}`;d.has(f)||d.set(f,new Map),d.get(f).set(m,a.get(m))}for(let m of d.values())i.push({members:m,aligned:[...m.values()].every(f=>f.tc!=null)})}let n=a=>Math.min(...[...a.members.values()].flatMap(o=>o.uses.map(s=>s.pos)));return i.sort((a,o)=>n(a)-n(o)),i.forEach((a,o)=>a.members.forEach(s=>s.uses.forEach(c=>c.group=o))),i}var Rr=(e,t,r)=>(e.aligned?t.tc:0)+r,um=e=>(e.source_resolution_w??0)*(e.source_resolution_h??0),pc=e=>e.kind==="missing",c9=e=>{let t=e.display_name||Co(e.target_url??"")||e.id,r=Co((e.target_url??"").replace(/\\/g,"/").replace(/\/[^/]*$/,""));return r?`${t} (${r})`:t};function RN(e){let t=[...e.members.values()].flatMap(l=>l.uses.map(u=>[Rr(e,l,u.start),Rr(e,l,u.end)])),r=l=>{let u=Io(l.mref);return l.tc!=null&&!!u&&t.every(([d,m])=>l.tc+u.start<=d&&m<=l.tc+u.end)},i=[...e.members.keys()],n=i.filter(l=>r(e.members.get(l)));if(n.length===0)return{best:null,reason:"no single clip holds every frame the edit uses"};let a=l=>{let u=e.members.get(l).mref;return[pc(u)?0:1,um(u),Io(u)?.end??0,-i.indexOf(l)]},o=n.reduce((l,u)=>{let[d,m]=[a(l),a(u)];for(let f=0;f<d.length;f++)if(d[f]!==m[f])return d[f]>m[f]?l:u;return l}),s=[];!pc(e.members.get(o).mref)&&i.some(l=>l!==o&&pc(e.members.get(l).mref))&&s.push("online");let c=n.filter(l=>l!==o).map(l=>um(e.members.get(l).mref));return c.length&&um(e.members.get(o).mref)>Math.max(...c)&&s.push("largest picture"),s.push(n.length===1?"the only clip that holds every frame used":"holds every frame used"),{best:o,reason:s.join(", ")}}function FN(e){let t=[...e.members.values()];for(let r=0;r<t.length;r++)for(let i=r+1;i<t.length;i++)for(let n of t[r].uses)for(let a of t[i].uses)if(Rr(e,t[r],n.start)<Rr(e,t[i],a.end)&&Rr(e,t[i],a.start)<Rr(e,t[r],n.end))return"overlap";return"separate"}function IN(e){let t=new Map;for(let i of e)(t.get(i.mref.id)??t.set(i.mref.id,[]).get(i.mref.id)).push(i);let r=[];for(let i of t.values()){i.sort((a,o)=>a.start-o.start||a.pos-o.pos);let n=null;for(let a of i)n&&a.start<=n.end?(n.end=Math.max(n.end,a.end),a.pos<n.pos&&(n.pos=a.pos,n.item=a.item)):r.push(n={mref:a.mref,item:a.item,start:a.start,end:a.end,rate:a.rate,pos:a.pos,group:a.group,track:1,at:0})}return r}function EN(e,t,r){let i=new Set,n=new Map;for(let s of e){let c=`${s.mref.id}|${s.start}|${s.end}`;i.has(c)||(i.add(c),(n.get(s.group)??n.set(s.group,[]).get(s.group)).push(s))}let a=[],o=0;for(let[s,c]of n){let l=t[s],u=(b,g)=>Rr(l,l.members.get(b.mref.id),g),d=new Map;for(let b of c){let g=d.get(b.mref.id);g?(b.start<g.lo&&(g.lo=b.start,g.first=b),g.hi=Math.max(g.hi,b.end)):d.set(b.mref.id,{lo:b.start,hi:b.end,first:b})}let m=[...d.values()].reduce((b,g)=>{let y=b.hi-b.lo,x=g.hi-g.lo;return x>y||x===y&&u(g.first,g.lo)<u(b.first,b.lo)?g:b}),f=Math.min(...c.map(b=>u(b,b.start))),p=Math.max(...c.map(b=>u(b,b.end)));a.push({...m.first,start:m.lo,end:m.hi,track:1,at:o+u(m.first,m.lo)-f});let v=c.filter(b=>!(b.mref.id===m.first.mref.id&&b.start===m.lo&&b.end===m.hi)).sort((b,g)=>u(b,b.start)-u(g,g.start)||u(g,g.end)-u(b,b.end)),h=[];for(let b of v){let g=u(b,b.start),y=h.findIndex(x=>x<=g);y<0&&(h.push(0),y=h.length-1),h[y]=u(b,b.end),a.push({...b,track:y+2,at:o+g-f})}o+=p-f+r}return a}var f9=(e,t={})=>{let r=t??{},i=Math.max(0,Math.round(Number(r.handles??0))||0),n=(e.timelines??[]).filter(H=>r.timeline_ids?.length?r.timeline_ids.includes(H.id):H.kind==="primary"&&!om(H));if(n.length===0)return{summary:`All clips: no timelines to gather${r.timeline_ids?.length?` (${r.timeline_ids.join(", ")} not found)`:""}`};let a=n[0],o=a.fps_den?a.fps_num/a.fps_den:24,s=(r.reference_pattern??ZN).split("|").map(H=>H.toUpperCase()).filter(Boolean),c=new Map;for(let H of e.media_references??[])H.id&&c.set(H.id,H);let l={disabled:0,reference:0,still:0,image_sequence:0,offline:0,no_media:0,no_range:0,nested:0},u=0,d=[],m=H=>(Co(H.target_url??"").split(".").pop()??"").toLowerCase(),f=H=>{let V=((typeof H=="string"?H.split(","):H)??[]).map(I=>I.trim().replace(/^\./,"").toLowerCase()).filter(Boolean);return V.length?new Set(V):null},p=f(r.still_extensions),v=f(r.sequence_extensions),h=H=>v?v.has(m(H))&&Gi(H):Gi(H),b=H=>p?p.has(m(H)):sm(H),g=new Map((e.timelines??[]).map(H=>[H.id,H])),y=(H,D)=>{let V=H.nested_timeline_id?g.get(H.nested_timeline_id):void 0,I=H.source_range;if(!V||!I||D>3)return[];let[ae,oe]=[I.start.value,I.start.value+I.duration.value];return(V.tracks??[]).filter(ie=>ie.kind==="Video").flatMap(ie=>ie.items??[]).flatMap(ie=>{if(ie.kind==="nested")return y(ie,D+1);let ne=ie.timeline_range.start.value,he=ne+ie.timeline_range.duration.value,Le=Math.max(ne,ae),ve=Math.min(he,oe);if(ie.kind!=="clip"||!ie.source_range||ve<=Le)return[];let Ve=(ie.speed??100)/100;return[{...ie,timeline_range:{start:{...H.timeline_range.start,value:H.timeline_range.start.value+(Le-ae)},duration:{...ie.timeline_range.duration,value:ve-Le}},source_range:{start:{...ie.source_range.start,value:ie.source_range.start.value+(Le-ne)*Ve},duration:{...ie.source_range.duration,value:(ve-Le)*Ve}}}]})};for(let H of n){let D=[];(H.tracks??[]).filter(V=>V.kind==="Video").forEach((V,I)=>(V.items??[]).forEach(ae=>{if(ae.kind==="nested"&&r.include_nested!==!1)for(let oe of y(ae,1))D.push({item:oe,track:I});else D.push({item:ae,track:I})})),D.sort((V,I)=>V.item.timeline_range.start.value-I.item.timeline_range.start.value||V.track-I.track);for(let{item:V}of D){if(V.kind==="nested"){l.nested++;continue}if(V.kind!=="clip")continue;if(V.enabled===!1&&!r.include_disabled){l.disabled++;continue}let I=V.media_reference_id?c.get(V.media_reference_id):void 0;if(!I){l.no_media++;continue}let ae=[V.name,I.display_name,Co(I.target_url??"")].filter(Boolean).map(ie=>ie.toUpperCase());if(!r.include_references&&(I.role==="reference"||ae.some(ie=>s.some(ne=>ie.includes(ne))))){l.reference++;continue}if(h(I)){if(r.include_image_sequences===!1){l.image_sequence++;continue}}else if(b(I)&&!r.include_stills){l.still++;continue}if(pc(I)&&r.include_offline===!1){l.offline++;continue}let oe=V.source_range;if(!oe||!(oe.duration.value>0)){l.no_range++;continue}V.speed!=null&&V.speed!==100&&u++,d.push({pos:d.length,item:V,mref:I,start:oe.start.value,end:oe.start.value+oe.duration.value,rate:oe.start.rate||o,group:-1})}}if(d.length===0)return{summary:"All clips: nothing to gather after the filters",meta:{skipped:l}};let x=DN(d,o),z=[];for(let[H,D]of x.entries()){if(D.members.size<2)continue;let V=FN(D),I=[...D.members.values()].map(ne=>c9(ne.mref)),{best:ae,reason:oe}=RN(D),ie=!!r.reduce_duplicates&&!!ae;if(ie){let ne=D.members.get(ae);for(let[he,Le]of D.members)if(he!==ae){for(let ve of Le.uses)Object.assign(ve,{mref:ne.mref,start:Rr(D,Le,ve.start)-ne.tc,end:Rr(D,Le,ve.end)-ne.tc}),ne.uses.push(ve);D.members.delete(he)}}z.push({group:H,kind:V,clips:I,best:ae?c9(c.get(ae)):null,reason:oe,reduced:ie})}let N=0,P=0;for(let H of d){if(!i)continue;let D=lm(H.start,H.end,i,H.mref);D.clamped&&N++,D.unverified&&P++,H.start=D.start,H.end=D.end}let O=new Map,X=H=>(O.has(H.id)||O.set(H.id,d9(H,o)),O.get(H.id)),S=H=>r.order==="source_tc"?H.sort((D,V)=>{let I=X(D.mref),ae=X(V.mref);return I==null!=(ae==null)?I==null?1:-1:(I==null?0:I+D.start-(ae+V.start))||D.pos-V.pos}):H.sort((D,V)=>D.pos-V.pos),w=H=>H.map(D=>({mref:D.mref,item:D.item,start:D.start,end:D.end,rate:D.rate,pos:D.pos,group:D.group,track:1,at:0})),j=H=>{if(r.stack)return EN(S(w(H)),x,Math.round(o));let D=0;return S(IN(H)).map(V=>{let I={...V,at:D};return D+=V.end-V.start,I})},M=(e.timelines??[]).map(H=>H.name),G=r.name?.trim()||`All_Clips_Timeline_${i}FR_HANDLES`,Z=new Map(z.map(H=>[H.group,H])),J=[],K=(H,D,V)=>{let I=(e.timelines??[]).length,ae=`ac${I}`,oe=Math.max(1,...H.map(ve=>ve.track)),ie=Array.from({length:oe},(ve,Ve)=>({id:`${ae}-v${Ve+1}`,kind:"Video",track_index:Ve,name:`V${Ve+1}`,enabled:!0,items:H.filter(ze=>ze.track===Ve+1).sort((ze,Mt)=>ze.at-Mt.at).map((ze,Mt)=>cm(`${ae}-it-${Ve+1}-${Mt+1}`,ze.item,ze.mref.id,ze.start,ze.end-ze.start,ze.rate,ze.at,o))}));ie.forEach(ve=>ve.items.forEach((Ve,ze)=>Ve.item_index=ze));let ne=Math.max(0,...H.map(ve=>ve.at+ve.end-ve.start)),he=Yn(D,M);M.push(he);let Le=Eo(a,`${ae}-tl`,he,I,ie,ne,qN);if(Object.assign(Le,{start_frame:0},V?{resolution_w:V[0],resolution_h:V[1]}:{}),r.mark_duplicates!==!1){let ve=[];for(let Ve of H){let ze=Z.get(Ve.group);ze&&ve.push({id:`${ae}-dup-${ve.length+1}`,name:"Duplicate footage",color:"Yellow",kind:null,note:`${ze.clips.length} clips hold this footage: ${ze.clips.join(", ")} \xB7 `+(ze.kind==="overlap"?"the same frames are cut in from different clips":"different parts of one camera clip come from different copies")+(ze.reduced?` \xB7 this timeline uses ${ze.best}`:ze.best?` \xB7 best version: ${ze.best} (${ze.reason})`:` \xB7 ${ze.reason}`),time:{value:Ve.at,rate:o},duration:{value:Ve.end-Ve.start,rate:o},item_id:null,raw_extraction:{},source_element_id:null,metadata:{}})}Le.markers=ve}return(e.timelines??=[]).push(Le),J.push({id:Le.id,name:he,clips:H.length,tracks:oe,resolution:V?`${V[0]}x${V[1]}`:null}),Le},_=j(d);if(K(_,G,null),r.per_resolution){let H=new Map;for(let V of d){let I=V.mref.source_resolution_w,ae=V.mref.source_resolution_h,oe=I&&ae?`${I}x${ae}`:"unknown";(H.get(oe)??H.set(oe,[]).get(oe)).push(V)}let D=[...H.keys()].sort((V,I)=>{let ae=V==="unknown"?-1:V.split("x").map(Number).reduce((ie,ne)=>ie*ne);return(I==="unknown"?-1:I.split("x").map(Number).reduce((ie,ne)=>ie*ne))-ae||V.localeCompare(I)});for(let V of D){let I=V==="unknown"?null:V.split("x").map(Number);if(!r.disable_non_matching){K(j(H.get(V)),`${G}_${V==="unknown"?"UNKNOWN_RES":V}`,I);continue}let ae=K(j(d),`${G}_${V==="unknown"?"UNKNOWN_RES":V}`,I),oe=new Set(H.get(V).map(ie=>ie.mref.id));for(let ie of ae.tracks)for(let ne of ie.items)oe.has(String(ne.media_reference_id))||(ne.enabled=!1)}}let R=Object.values(l).reduce((H,D)=>H+D,0),te=J[0].clips;return{summary:`All clips: ${d.length} use${d.length===1?"":"s"} from ${n.length} timeline${n.length===1?"":"s"} \u2192 ${te} piece${te===1?"":"s"} on "${J[0].name}"${r.stack?` (stacked, ${J[0].tracks} tracks)`:""}`+(i?` \xB7 \xB1${i}f handles${N?` (${N} clamped)`:""}`:"")+(J.length>1?` \xB7 ${J.length-1} per-resolution timeline${J.length===2?"":"s"}`:"")+(z.length?` \xB7 ${z.length} duplicate footage group${z.length===1?"":"s"}${z.some(H=>H.reduced)?` (${z.filter(H=>H.reduced).length} reduced)`:""}`:"")+(u?` \xB7 ${u} retimed clip${u===1?"":"s"} land at 100%`:"")+(R?` \xB7 ${R} skipped`:""),meta:{timelines:J,uses:d.length,handles:i,clamped:N,unverified:P,retimed:u,skipped:l,duplicates:z}}};var m9=e=>e.fps_den?e.fps_num/e.fps_den:24,p9=(e,t={})=>{let r=e.timelines??[],i=t.timeline_ids?.length?t.timeline_ids.map(h=>r.find(b=>b.id===h||b.name===h)):r.filter(h=>h.kind==="primary"),n=(t.timeline_ids??[]).filter((h,b)=>!i[b]);if(n.length)return{summary:`Join: no timeline ${n.join(", ")}`};let a=i;if(a.length<2)return{summary:"Join: needs two timelines or more"};let o=a[0],s=m9(o),c=Math.max(0,Math.round(t.gap_frames??0)),l=[],u=(h,b,g)=>{let y=l.find(x=>x.kind===h&&x.track_index===b);return y||(y={...structuredClone({...g,items:[]}),id:`join-${h[0].toLowerCase()}${b+1}`,track_index:b,items:[]},l.push(y)),y},d=[],m=0,f=0;a.forEach((h,b)=>{let g=s/m9(h),y=Math.round((h.duration_frames??Math.max(0,...(h.tracks??[]).flatMap(z=>(z.items??[]).map(N=>N.timeline_range.start.value+N.timeline_range.duration.value))))*g);t.mark!==!1&&d.push({id:`join-m${b+1}`,name:h.name,color:"Blue",kind:null,note:`from ${h.name}`,time:{value:m,rate:s},duration:{value:1,rate:s},item_id:null,raw_extraction:{},source_element_id:null,metadata:{}});let x=new Map;for(let z of h.tracks??[]){let N=x.get(z.kind)??0;x.set(z.kind,N+1);let P=u(z.kind,N,z);for(let O of z.items??[]){if(O.kind==="gap")continue;let X=structuredClone(O);X.id=`j${b+1}-${O.id}`,X.timeline_range={start:{value:m+Math.round(O.timeline_range.start.value*g),rate:s},duration:{value:Math.round(O.timeline_range.duration.value*g),rate:s}};for(let S of X.markers??[])S.id=`j${b+1}-${S.id}`,S.item_id=X.id;P.items.push(X),f++}}for(let z of h.markers??[])d.push({...structuredClone(z),id:`j${b+1}-${z.id}`,time:{value:m+Math.round(z.time.value*g),rate:s}});m+=y+c});for(let h of l)h.items.sort((b,g)=>b.timeline_range.start.value-g.timeline_range.start.value),h.items.forEach((b,g)=>{b.item_index=g});l.sort((h,b)=>h.kind===b.kind?h.track_index-b.track_index:h.kind==="Video"?-1:1);let p=Yn(t.name?.trim()||`${o.name}_JOINED`,r.map(h=>h.name)),v=Eo(o,`join-${r.length+1}`,p,r.length,l,m-c,"conform.join");return v.markers=d,Ot(v),e.timelines.push(v),{summary:`Joined ${a.length} timelines (${a.map(h=>h.name).join(" + ")}) into ${p}: ${f} items, ${v.duration_frames} frames`,meta:{timeline_id:v.id,name:p,timelines:a.length,items:f}}};var v9=(e,t={})=>{let r=(e.timelines??[]).filter(o=>t.timeline_id?o.id===t.timeline_id||o.name===t.timeline_id:o.kind==="primary");if(!r.length)return{summary:`Remove audio: no timeline ${t.timeline_id??""}`.trim()};let i=new Set((t.keep_tracks??[]).map(o=>o.toUpperCase())),n=0,a=0;for(let o of r){let s=0;o.tracks=(o.tracks??[]).filter(l=>l.kind!=="Audio"||(s++,i.has(`A${s}`)||l.name&&i.has(l.name.toUpperCase()))?!0:(n++,a+=(l.items??[]).filter(u=>u.kind!=="gap").length,!1));let c=0;for(let l of o.tracks)l.kind==="Audio"&&(l.track_index=c++);Ot(o)}return{summary:`Removed ${n} audio track${n===1?"":"s"} (${a} clips) from ${r.map(o=>o.name).join(", ")}`,meta:{tracks:n,clips:a}}};var dm={sizing:{fields:["position_x","position_y","position_z","scale","scale_x","scale_y","scale_z","rotation","rotation_x","rotation_y","rotation_z","anchor_x","anchor_y","anchor_z","raw_scale","raw_position_x","raw_position_y","reframe_fit","render_base_w","render_base_h","render_pos_div_x","render_pos_div_y"],paths:/^(position|scale|rotation|anchor)(\.|$)/},crop:{fields:["crop_left","crop_right","crop_top","crop_bottom"],paths:/^crop(\.|$)/},opacity:{fields:["opacity","blend_mode"],paths:/^opacity$/},effects:{fields:["effects"],paths:/^effect\./}},h9=e=>e.source_range?[e.source_range.start.value,e.source_range.start.value+e.source_range.duration.value]:null,Jo=(e,t)=>e.rate===t?e.value:e.value*t/e.rate,fm=e=>e.tracks.filter(t=>t.kind==="Video").flatMap(t=>t.items.map(r=>({it:r,track:t.track_index}))),b9=(e,t)=>{let r=e.timelines??[],i=v=>r.find(h=>h.id===v||h.name===v),n=t?.sources?.[0],a=t?.from?i(t.from):n?r.find(v=>v.kind==="primary"&&v.id.startsWith(`${n}/`)):void 0;if(!a)return{summary:`Carry: no timeline ${t?.from??"to carry from (from, or a source session)"}`};let o=t.to?i(t.to):r.find(v=>v.kind==="primary"&&v!==a&&!v.id.includes("/"));if(!o)return{summary:`Carry: no timeline ${t.to??"to carry onto"}`};let s=t,c=(t.what?.length?t.what:Object.keys(dm).filter(v=>s[v]!==!1)).filter(v=>dm[v]),l=structuredClone(o);l.id=`carry-${o.id.replace(/\W+/g,"")}`,l.name=Yn(t.name?.trim()||`${o.name}_RECONFORMED`,r.map(v=>v.name)),l.timeline_index=r.length,l.kind="primary";for(let v of l.tracks){v.id=`${l.id}-${v.id}`;for(let h of v.items)h.id=`${l.id}-${h.id}`}let u=fm(a),d=new Map,m=0,f=[];for(let{it:v}of fm(l)){let h=h9(v);if(!h||!v.media_reference_id)continue;let b=u.map(({it:g,track:y})=>{let x=g.media_reference_id===v.media_reference_id?h9(g):null;return{a:g,track:y,common:x?Math.min(x[1],h[1])-Math.max(x[0],h[0]):0}}).filter(g=>g.common>0).sort((g,y)=>y.common-g.common||y.track-g.track)[0];if(!b){f.push(v.name??v.id);continue}d.has(b.a)||d.set(b.a,v);for(let g of c){let{fields:y,paths:x}=dm[g];for(let z of y)v[z]=structuredClone(b.a[z]??null);v.keyframes=[...(v.keyframes??[]).filter(z=>!x.test(z.parameter_path)),...structuredClone((b.a.keyframes??[]).filter(z=>x.test(z.parameter_path)))]}m++}let p=t.markers===!1?null:CN(a,l,u,d);return e.timelines.push(l),{summary:`Carry: "${l.name}" \u2014 ${m} clip(s) took ${c.join(", ")} from "${a.name}"${f.length?`; ${f.length} new (no clip of the same media in A): ${f.slice(0,8).join(", ")}${f.length>8?" \u2026":""}`:""}${p?`; ${p.carried} marker(s) carried${p.dropped.length?`, ${p.dropped.length} dropped`:""}`:""}`,meta:{timeline_id:l.id,carried:m,new_material:f,what:c,...p?{markers:p}:{}}}};function CN(e,t,r,i){let n={carried:0,kept_in_place:0,duplicates:0,dropped:[]},a=(u,d)=>[Jo(u.timeline_range.start,d),Jo(u.timeline_range.start,d)+Jo(u.timeline_range.duration,d)],o=fm(t).map(u=>u.it),s=Math.max(0,...o.map(u=>a(u,u.timeline_range.start.rate)[1])),c=new Set((t.markers??[]).map(u=>`${Math.round(u.time.value)}|${u.name??""}`)),l=new Map(r.map(({it:u})=>[u.id,u]));for(let u of e.markers??[]){let d=u.time.rate,m=u.time.value,f=u.name??"",p=u.item_id?l.get(u.item_id):r.filter(({it:y})=>y.enabled!==!1&&a(y,d)[0]<=m&&m<a(y,d)[1]).sort((y,x)=>x.track-y.track)[0]?.it,v,h;if(p){let y=i.get(p);if(!y||!p.source_range||!y.source_range){n.dropped.push({name:f||(p.name??p.id),reason:"its shot is gone from the new cut"});continue}let x=u.item_id?1:(p.speed??100)/100,z=u.item_id?1:(y.speed??100)/100,N=Jo(p.source_range.start,d)+(m-a(p,d)[0])*x;if(v=Math.abs(z)<1e-6?a(y,d)[0]:a(y,d)[0]+Math.round((N-Jo(y.source_range.start,d))/z),v<a(y,d)[0]||v>=a(y,d)[1]){n.dropped.push({name:f||(p.name??p.id),reason:"the frame it marks was trimmed out of the new cut"});continue}u.item_id&&(h=y)}else{if(u.item_id){n.dropped.push({name:f,reason:"its clip is not a video clip of the old cut"});continue}if(v=m,v<0||v>=s){n.dropped.push({name:f,reason:"past the end of the new cut"});continue}n.kept_in_place++}let b=`${Math.round(v)}|${f}`;if(c.has(b)){n.duplicates++;continue}c.add(b);let g={...structuredClone(u),id:`${t.id}-m${(t.markers??[]).length}`,time:{value:v,rate:d},item_id:h?.id??null};(t.markers??=[]).push(g),n.carried++}return n}var mm={relink:sc,slip:V1,delete:q1,trim:L1,reformat:F1,stringout:G1,node_sizing:K1,add_clip:Y1,new_timeline:B1,add_track:Q1,stack_track:_1,finish_op:$1,delete_track:e9,move_clip:t9,timeline_rate:r9,transform:n9,add_markers:i9,add_handles:l9,all_clips:f9,join:p9,carry:b9,remove_audio:v9};function g9(e){return mm[e]}var JN=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});JN.decode();var pm=new TextEncoder;"encodeInto"in pm||(pm.encodeInto=function(e,t){let r=pm.encode(e);return t.set(r),{read:e.length,written:r.length}});var xI=new TextEncoder,wI=new TextDecoder;var zI=256*1024;var PI=new Uint8Array(0);var qI=2*1024*1024,vm=["resolve-otio","resolve-xmeml","premiere-xmeml","flame-fcpxml","flame-archive","resolve-drt","avid-aaf","resolve-aaf","avid-avb","premiere-prproj","premiere-otio","baselight-blscene","finalcut-fcpxmld","protools-aaf","protools-ptx","session_json"],y9=["premiere-prproj","resolve-drt","flame-archive","avid-avb","resolve-xmeml"],x9=["resolve-otio","flame-fcpxml","avid-aaf","resolve-aaf","premiere-otio","session_json"],w9=["baselight-blscene","finalcut-fcpxmld","protools-ptx","protools-aaf"],z9=[];var vc={prproj:"premiere-prproj",otio:"resolve-otio","resolve-xml":"resolve-xmeml",xmeml:"resolve-xmeml",drt:"resolve-drt",fcpxml:"flame-fcpxml",aaf:"avid-aaf",avb:"avid-avb"};function P9(e){return e==="Video"?"V":e==="Audio"?"A":e?.[0]??"T"}function hm(e,t){let r=e.name?.trim();if(r)return r;let i=KN(e.kind,t),n=i.indexOf(e);return n<0&&e.id&&(n=i.findIndex(a=>a?.id===e.id)),n<0?`${P9(e.kind)}${Math.max(1,Math.abs(e.track_index??0))}`:`${P9(e.kind)}${n+1}`}function KN(e,t){let r=t.filter(a=>a?.kind===e),i=r.length>0&&r.every(a=>(a.track_index??0)<=0),n=a=>i?-(a.track_index??0):a.track_index??0;return[...r].sort((a,o)=>n(a)-n(o))}var AN=["proxy","prx","low","offline","rough","preview","comp","temp","draft","h264","dnxhr","prores"];function hc(e,t,r,i={}){let n=_N(i),a=[],o=[],s=[],c=new Map,l=aO(t),u=rO(r.fileExtensions),d=u?l.filter(f=>u.has(tO(f.filename))):l;for(let f of e){let p=[];for(let x of d){let z=$N(f,x,r,n);if(z.confidence>0){let N=Go(f,x,n);p.push({candidate:x,contains:N.known&&N.contains,confidence:z.confidence,reasons:z.reasons})}else z.refusal&&!c.has(f.id)&&c.set(f.id,{candidate_id:x.id,reason:z.refusal})}if(p.sort((x,z)=>z.confidence-x.confidence),p.length===0){o.push(f.id);continue}let v=p[0].confidence,h=p.filter(x=>v-x.confidence<.05),b=h.filter(x=>x.contains);if(b.length===1&&!h[0].contains){let x=p.indexOf(b[0]);p.splice(x,1),p.unshift(b[0])}let g=p[0],y=p.slice(1).filter(x=>g.confidence-x.confidence<.05&&x.contains===g.contains);y.length>0&&s.push({proxy_id:f.id,candidate_ids:[g,...y].map(x=>x.candidate.id)}),a.push({proxy_id:f.id,candidate_id:g.candidate.id,matched_path:g.candidate.path??g.candidate.filename,confidence:g.confidence,reasons:g.reasons})}if(o.length>0&&a.length>0){let f=new Map(e.map(y=>[y.id,y])),p=new Map(d.map(y=>[y.id,y])),v=new Map;for(let y of d){let x=Bn(y.filename).toLowerCase(),z=v.get(x);z?z.push(y):v.set(x,[y])}let h=a.filter(y=>y.confidence>=.5),b=new Set,g=[];for(let y of h){let x=f.get(y.proxy_id),z=p.get(y.candidate_id);if(!x||!z)continue;let N=YN(Bn(x.filename),Bn(z.filename));N&&b.add(N);let P=x.original_path??x.id,O=BN(P,z.path);O&&g.push(O)}if(b.size>0||g.length>0){let y=[];for(let x of o){let z=f.get(x);if(!z){y.push(x);continue}let N=null,P=null;for(let X of b){let S=(Bn(z.filename)+X).toLowerCase(),w=v.get(S);if(w&&w.length>0){N=UN(z,w,n),P=`filename pattern inferred (${X} suffix)`;break}}if(!N&&z.original_path)for(let X of g){let S=QN(z.original_path,X);if(!S)continue;let w=S.toLowerCase();for(let j of d){let M=(j.path??"").replace(/\\/g,"/").toLowerCase();if(M&&M.endsWith(w)){N=j,P="directory proximity";break}}if(N)break}let O=N?Go(z,N,n):null;N&&O?.known&&!O.contains?(c.has(z.id)||c.set(z.id,{candidate_id:N.id,reason:`cut not within linked media ${N.filename} (inferred name ${P??""})`}),y.push(x)):N?a.push({proxy_id:z.id,candidate_id:N.id,matched_path:N.path??N.filename,confidence:.5,reasons:P?[P]:[]}):y.push(x)}o.length=0,o.push(...y)}}let m=o.filter(f=>c.has(f)).map(f=>({proxy_id:f,...c.get(f)}));return{matches:a,unmatched:o,ambiguous:s,refusals:m}}function UN(e,t,r){return t.length===1?t[0]:t.find(n=>Go(e,n,r).contains)??t[0]}function bc(e,t,r,i,n){if(r==null||i==null||t==null)return{known:!1,contains:!1};let a=Te(r,n);if(a==null)return{known:!1,contains:!1};let o=Te(e??"00:00:00:00",n)??0;return{known:!0,contains:o<=a&&a+i<=o+t}}function Go(e,t,r){if(e.cut_timecode_start==null||e.cut_duration_frames==null)return{known:!1,contains:!1};let i=e.fps??t.fps??r.timecode_rate,n=t.duration_frames??(t.duration_seconds!=null?Math.round(t.duration_seconds*i):null);return bc(t.timecode_start,n,e.cut_timecode_start,e.cut_duration_frames,i)}function YN(e,t){let r=e.toLowerCase(),i=t.toLowerCase();if(i.length<=r.length||!i.startsWith(r))return null;let n=i.slice(r.length);return!n.startsWith("_")&&!n.startsWith("-")?null:t.slice(e.length)}function BN(e,t){if(!e||!t)return null;let r=e.replace(/\\/g,"/").split("/").filter(Boolean),i=t.replace(/\\/g,"/").split("/").filter(Boolean),n=0;for(;n<r.length&&n<i.length&&r[r.length-1-n].toLowerCase()===i[i.length-1-n].toLowerCase();)n++;return n===0?null:{proxyPrefix:r.slice(0,r.length-n).join("/")}}function QN(e,t){let r=e.replace(/\\/g,"/").replace(/^\/+/,""),i=t.proxyPrefix.replace(/^\/+/,"");return i?r.toLowerCase().startsWith(i.toLowerCase())?r.slice(i.length).replace(/^\/+/,""):null:r}function _N(e){return{timecode_tolerance_frames:e.timecode_tolerance_frames??1,timecode_rate:e.timecode_rate??24,duration_tolerance_seconds:e.duration_tolerance_seconds??.1,min_name_similarity:e.min_name_similarity??.6,aspect_tolerance:e.aspect_tolerance??.01,fps_tolerance:e.fps_tolerance??.005}}function $N(e,t,r,i){let n=[],a=0;if(r.fileName)if(r.fileNameMode==="tight"){if(Bn(e.filename)!==Bn(t.filename))return{confidence:0,reasons:[]};a+=.6,n.push("exact filename")}else{let s=gc(Fr(e.filename),Fr(t.filename));if(s<i.min_name_similarity)return{confidence:0,reasons:[]};let c=e.cut_timecode_start??e.timecode_start,l=c==null||/^00:00:00[:;]00$/.test(c),u=Fr(e.filename).toLowerCase(),d=Fr(t.filename).toLowerCase(),m=u===d||d.startsWith(u)||u.startsWith(d);if(l&&!m)return{confidence:0,reasons:[],refusal:`filename similarity ${s.toFixed(2)} but no source timecode to confirm a non-exact name \u2014 exact name required`};a+=s*.6,n.push(`filename similarity ${s.toFixed(2)}`)}else a+=.1;let o=Ho(e.filename)||Ho(t.filename);if(!o)if(e.tc_unrecorded){let s=Go(e,t,i);s.known&&s.contains&&(a+=.2,n.push("cut within source timecode range"))}else{let s=Go(e,t,i);if(s.known)if(s.contains)a+=.2,n.push("cut within source timecode range");else{let c=e.fps??t.fps??i.timecode_rate,l=Te(e.cut_timecode_start??"00:00:00:00",c)??0,u=Te(t.timecode_start??"00:00:00:00",c)??0,d=t.duration_frames??(t.duration_seconds!=null?Math.round(t.duration_seconds*c):0);return{confidence:0,reasons:[],refusal:`cut [${l}..${l+(e.cut_duration_frames??0)}] not within linked media ${t.filename} [${u}..${u+d}]`}}else{let c=e.fps??t.fps??i.timecode_rate,l=Te(e.cut_timecode_start??e.timecode_start??"00:00:00:00",c),u=Te(t.timecode_start??"00:00:00:00",c),d=e.duration_seconds!=null?Math.round(e.duration_seconds*c):null,m=t.duration_seconds!=null?Math.round(t.duration_seconds*c):null;if(l!=null&&u!=null)if(d!=null&&m!=null)if(Math.max(l,u)<Math.min(l+d,u+m))a+=.2,n.push("source timecode overlaps");else return{confidence:0,reasons:[],refusal:`source timecode [${l}..${l+d}] does not overlap ${t.filename} [${u}..${u+m}]`};else Math.abs(l-u)<=i.timecode_tolerance_frames&&(a+=.2,n.push("source timecode aligned"))}}if(r.reelName){let s=e.reel_name&&t.reel_name&&e.reel_name===t.reel_name,c=s?null:eO(e.reel_sources,t.reel_sources);if(s)a+=.15,n.push("reel name matched");else if(c)a+=.075,n.push(`reel matched (proxy.${c.proxySource} = candidate.${c.candidateSource})`);else if(e.reel_name&&t.reel_name)return{confidence:0,reasons:[]}}if(r.totalDuration&&!o&&e.duration_seconds!=null&&t.duration_seconds!=null){let s=u=>u==null?null:u>=1e3?"sample":"frame",c=s(e.duration_rate),l=s(t.duration_rate);if(c!=null&&l!=null&&c!==l)n.push("duration units differ (frames vs samples) \u2014 not compared");else if(Math.abs(e.duration_seconds-t.duration_seconds)<=i.duration_tolerance_seconds)a+=.1,n.push("duration matches");else return{confidence:0,reasons:[]}}if(r.resolution&&e.resolution_w!=null&&e.resolution_h!=null&&t.resolution_w!=null&&t.resolution_h!=null)if(e.resolution_w===t.resolution_w&&e.resolution_h===t.resolution_h)a+=.05,n.push(`resolution ${t.resolution_w}\xD7${t.resolution_h}`);else return{confidence:0,reasons:[]};if(r.bitDepth&&e.bit_depth!=null&&t.bit_depth!=null)if(e.bit_depth===t.bit_depth)a+=.05,n.push(`${t.bit_depth}-bit`);else return{confidence:0,reasons:[]};if(e.fps!=null&&t.fps!=null&&!Ho(e.filename)&&!Ho(t.filename)){let s=e.fps;if(Math.abs(t.fps-s)/s<i.fps_tolerance)a+=.05,n.push(`${s} fps`);else return{confidence:0,reasons:[],refusal:`frame rate ${t.fps} does not match the edit's ${s} \u2014 different-rate media is never the same clip`}}if(r.fileFormat&&e.container&&t.container)if(nO(t.container,e.container))a+=.05,n.push(`container ${t.container}`);else return{confidence:0,reasons:[]};if(r.codec&&e.codec&&t.codec)if(iO(t.codec,e.codec))a+=.05,n.push(`codec ${t.codec}`);else return{confidence:0,reasons:[]};return r.mediaUmid&&e.media_umid&&t.media_umid&&e.media_umid===t.media_umid&&(a=Math.max(a,.95),n.push("UMID match")),{confidence:Math.min(a,1),reasons:n}}function Bn(e){return e.replace(/\.[^.]+$/,"").toLowerCase()}function Fr(e){let t=Bn(e);t=t.replace(/[-_]s\d{3}$/i,""),t=t.replace(/[-_]+v\d+$/i,"");let r=new Set(AN);return t.split(/[-_\s]+/).filter(i=>i&&!r.has(i)).join("_")}function eO(e,t){if(!e||!t)return null;let r=["embedded","project_metadata","parent_folder","filename_pattern"];for(let i of r){let n=e[i];if(n)for(let a of r){let o=t[a];if(o&&n===o)return{proxySource:i,candidateSource:a}}}return null}function gc(e,t){if(!e||!t)return 0;if(e===t)return 1;if(Math.min(e.length,t.length)>=6&&(e.includes(t)||t.includes(e)))return .8;let i=e.split(/[_\-\s]+/),n=new Set(t.split(/[_\-\s]+/)),a=i.filter(o=>n.has(o));return a.length===0?0:a.length/Math.max(i.length,n.size)}function tO(e){let t=e.match(/\.([^.]+)$/);return t?t[1].toLowerCase():""}function rO(e){if(!e||!e.trim())return null;let t=e.split(/[,\s]+/).map(r=>r.replace(/^\./,"").toLowerCase()).filter(Boolean);return t.length===0?null:new Set(t)}function nO(e,t){let r=e.toLowerCase(),i=t.toLowerCase();return!!(r===i||i.includes("quicktime")&&(r==="mov"||r==="quicktime")||i.includes("mxf")&&r==="mxf"||i.includes("mp4")&&(r==="mp4"||r==="mpeg-4"))}function iO(e,t){let r=Bf(e),i=Bf(t);if(r&&i)return r===i;let n=e.toLowerCase(),a=t.toLowerCase();return n.includes(a)||a.includes(n)}function aO(e){let t=e.filter(n=>/\.r3d$/i.test(n.filename)),r=e.filter(n=>!/\.r3d$/i.test(n.filename));if(t.length===0)return e;let i=new Map;for(let n of t){let o=`${n.filename.toLowerCase().replace(/_\d{3}\.r3d$/i,"")}|${n.timecode_start??n.id??""}`,s=i.get(o);(!s||n.filename<s.filename)&&i.set(o,n)}return[...r,...i.values()]}function oO(e){return e?e.split(/[/\\]/).pop()??"":""}var sO={fileName:"a file name",timecode:"source timecode",reelName:"a reel name",totalDuration:"duration data",resolution:"resolution data",bitDepth:"bit-depth data",frameRate:"frame-rate data",fileFormat:"container/format data",codec:"codec data",mediaUmid:"a UMID/clip-ID"};function Ir(e,t){let r=e.length,i=0;for(let n of e)n!=null&&n!==""&&i++;return k9(i,r,t)}function k9(e,t,r){return t===0?{populated:0,total:0,available:!0,unavailable_reason:null}:e===0?{populated:e,total:t,available:!1,unavailable_reason:`No clips in this timeline carry ${sO[r]}.`}:{populated:e,total:t,available:!0,unavailable_reason:null}}function lO(e){let t=e.vendor_metadata??{},r=["umid","media_umid","clip_id","mxf_umid","package_uid","material_package_uid","source_package_uid","mob_id","MobID","avid_mob_id","MasterMobID","SourceMobID","SourceID","media_pool_item_id"];for(let i of r){let n=t[i];if(typeof n=="string"&&n.length>0)return n}return null}function yc(e){for(let t of e.streams??[]){if(t.kind!=="video")continue;if(typeof t.bit_depth=="number")return t.bit_depth;let r=t.codec_specific;if(!r)continue;let i=r.BitDepth??r.bit_depth??r.bits_per_sample;if(typeof i=="number")return i;if(typeof i=="string"&&/^\d+$/.test(i))return parseInt(i,10)}return null}function T9(e){let t=e.length,i=e.map(n=>oO(n.target_url)).filter(n=>n.length>0).length;return{fileName:k9(i,t,"fileName"),timecode:Ir(e.map(n=>n.source_timecode),"timecode"),reelName:Ir(e.map(n=>n.reel_name),"reelName"),totalDuration:Ir(e.map(n=>{let a=n.available_range?.duration;if(a&&a.value!=null&&a.rate)return a.value;let o=n.declared_duration;return o&&o.value!=null&&o.rate?o.value:null}),"totalDuration"),resolution:Ir(e.map(n=>n.source_resolution_w&&n.source_resolution_h?`${n.source_resolution_w}\xD7${n.source_resolution_h}`:null),"resolution"),bitDepth:Ir(e.map(n=>yc(n)),"bitDepth"),frameRate:Ir(e.map(n=>n.source_fps??null),"frameRate"),fileFormat:Ir(e.map(n=>n.container??null),"fileFormat"),codec:Ir(e.map(n=>n.codec??null),"codec"),mediaUmid:Ir(e.map(n=>lO(n)),"mediaUmid")}}function O9(e){let t=xc(e.target_url);return{id:e.id,filename:t,original_path:e.target_url??null,container:e.container??null,codec:e.codec??null,size_bytes:e.size_bytes??null,duration_seconds:e.available_range?.duration?.value?e.available_range.duration.value/(e.available_range.duration.rate??1):e.declared_duration?.value&&e.declared_duration.rate?e.declared_duration.value/e.declared_duration.rate:null,duration_rate:e.available_range?.duration?.rate??e.declared_duration?.rate??null,duration_frames:e.available_range?.duration?.value??(typeof e.vendor_metadata?.frame_count=="number"?e.vendor_metadata.frame_count:null),timecode_start:e.source_timecode??null,reel_name:e.reel_name??null,reel_sources:e.reel_sources,resolution_w:e.source_resolution_w??null,resolution_h:e.source_resolution_h??null,fps:e.source_fps??null,bit_depth:yc(e),media_umid:e.vendor_metadata?.umid??null,facts_origin:e.source_facts_origin??null}}function S9(e){return{...O9(e),path:e.local_path??e.target_url??null}}function X9(e,t){let r=O9(t),i=j9(e,t);i&&(r.cut_timecode_start=i.tcStart,r.cut_duration_frames=i.durFrames);let n=Te(t.source_timecode,t.source_fps??24);return(t.source_facts_origin??"declared")!=="probed"&&(n==null||n===0)&&(r.tc_unrecorded=!0),r}function j9(e,t){let r=t.source_fps??24,i=Te(t.source_timecode,r);if(i==null)return null;let n=1/0,a=-1/0;for(let o of e.timelines??[])for(let s of o.tracks??[])for(let c of s.items??[])if(c.media_reference_id===t.id&&c.source_range){let l=i+c.source_range.start.value,u=l+(c.source_range.duration?.value??0);l<n&&(n=l),u>a&&(a=u)}return n===1/0?null:{tcStart:Me(n,r,Uf(t.source_timecode)),durFrames:Math.max(0,a-n)}}var Qn=/_S\d{3}$/i,wr=e=>((e??"").split(/[/\\]/).pop()??"").replace(/\.[^.]+$/,"");function KI(e,t,r){let i=[];if(!t.filter(c=>Qn.test(wr(c.target_url))).length)return{session:e,splits:i};let a=structuredClone(e),o=(a.timelines??[]).flatMap(c=>(c.tracks??[]).flatMap(l=>l.items??[])),s=[];for(let c of a.media_references??[]){if((c.binding_state??"unbound")==="linked"||r&&!r.has(c.id))continue;let l=wr(c.target_url).toLowerCase();if(!l||Qn.test(l))continue;let u=t.filter(P=>{let O=wr(P.target_url).toLowerCase();return O===l||Qn.test(O)&&O.replace(Qn,"")===l});if(!u.some(P=>Qn.test(wr(P.target_url))))continue;let d=c.source_fps??24,m=Te(c.source_timecode,d),f=o.filter(P=>P.media_reference_id===c.id&&P.source_range);if(m==null||f.length===0)continue;let p=Uf(c.source_timecode),v=(P,O,X)=>bc(P.source_timecode,P.available_range?.duration?.value??null,Me(O,d,p),X,d).contains,h=j9(a,c);if(h&&u.some(P=>!Qn.test(wr(P.target_url))&&bc(P.source_timecode,P.available_range?.duration?.value??null,h.tcStart,h.durFrames,d).contains))continue;let b=new Map,g=!0;for(let P of f){let O=m+P.source_range.start.value,X=u.find(S=>Qn.test(wr(S.target_url))&&v(S,O,P.source_range.duration?.value??0));if(!X){g=!1;break}b.set(X,[...b.get(X)??[],P])}if(!g)continue;let y=[...b].sort((P,O)=>wr(P[0].target_url).localeCompare(wr(O[0].target_url))),x=[],z=wr(c.target_url),N=structuredClone(c);y.forEach(([P,O],X)=>{let S=wr(P.target_url),w=M=>{if(!M)return M;let G=Math.max(M.lastIndexOf("/"),M.lastIndexOf("\\"))+1,Z=M.slice(G);return Z.startsWith(z)?M.slice(0,G)+S+Z.slice(z.length):M},j=X===0?c:{...structuredClone(N),id:`${c.id}~${S.slice(-4)}`};j.target_url=w(N.target_url)??j.target_url,N.local_path&&(j.local_path=w(N.local_path)??j.local_path);for(let M of O)M.media_reference_id=j.id;X>0&&s.push(j),x.push(j.id)}),i.push({ref_id:c.id,into:x})}return i.length?(a.media_references=[...a.media_references??[],...s],{session:a,splits:i}):{session:e,splits:i}}function W9(e,t,r,i=!1){let n=new Map;for(let d of t)n.set(d.id,d);let a=[],o=new Set;for(let d of r){let m=n.get(d.candidate_id);m&&(a.push({ref_id:d.proxy_id,to:{path:m.local_path??m.target_url??"",size_bytes:m.size_bytes??null,resolution_w:m.source_resolution_w??null,resolution_h:m.source_resolution_h??null,codec:m.codec??null,container:m.container??null,fps:m.source_fps??null,bit_depth:yc(m),reel_name:m.reel_name??null,timecode:m.source_timecode??null,recipe:m.recipe??null,frame_count:m.available_range?.duration?.value??null,pixel_aspect:m.source_pixel_aspect??null,bitrate_bps:m.bitrate_bps??null,local_path:m.local_path??null,vendor_metadata:m.vendor_metadata??null,reel_sources:m.reel_sources??null},confidence:d.confidence,reasons:d.reasons}),o.add(m.id))}let s=cO(e)?structuredClone(e):e,l=sc(s,{matches:a}).meta?.applied??[],u=i?(s.media_references??[]).filter(d=>!o.has(d.id)):s.media_references??[];return{session:{...s,media_references:u},applied:l}}function cO(e){return Object.isFrozen(e)||Object.isFrozen(e.media_references??{})||(e.media_references??[]).some(t=>Object.isFrozen(t)||Object.isFrozen(t.metadata??{}))}function xc(e){return e?e.split(/[/\\]/).pop()??"":""}var N9=(e,t)=>`${xc(e)}|${t}`,uO=2;function L9(e,t){let r=new Map,i=new Map;for(let c of t){r.set(N9(c.source_path,c.source_in),c);let l=xc(c.source_path);(i.get(l)??(i.set(l,[]),i.get(l))).push(c)}let n=e.media_references??(e.media_references=[]),a=new Map(n.map(c=>[c.id,c])),o=0,s=0;for(let c of e.timelines??[])for(let l of c.tracks??[])for(let u of l.items??[]){if(!u.media_reference_id)continue;let d=a.get(u.media_reference_id);if(!d){s++;continue}let m=u.source_range?.start?.value??0,f=d.target_url??"",p=r.get(N9(f,m));if(!p&&f&&(p=dO(i.get(xc(f)),m)),!p){s++;continue}let v={...d,id:crypto.randomUUID(),kind:"external",content_kind:d.content_kind??"video",target_url:p.render_path,local_path:p.render_path,size_bytes:null,source_timecode:p.render_start_tc??d.source_timecode,available_range:{start:{value:0,rate:p.rate},duration:{value:p.render_frames,rate:p.rate}}};n.push(v),a.set(v.id,v),u.media_reference_id=v.id;let h=u.source_range?.duration??{value:p.render_frames,rate:p.rate};if(u.source_range={start:{value:p.lead_handle,rate:p.rate},duration:h},p.render_start_frame!=null){let b=u.raw_extraction??(u.raw_extraction={});b.alternateFrame=p.render_start_frame}o++}return{matched:o,unmatched:s}}function dO(e,t){if(!e||e.length===0)return;let r,i=1/0,n=!1;for(let a of e){let o=Math.abs(a.source_in-t);o<i?(i=o,r=a,n=!1):o===i&&(n=!0)}if(!(!r||i>uO||n))return r}async function V9(e){await An();try{return ac(d1(e))}catch{return null}}async function q9(e){await An();try{return ac(u1(e))}catch{return null}}var fO=/\.(dpx|exr|tif|tiff|cin|ari|arx|jpg|jpeg|png)$/i;function bm(e){if(!fO.test(e))return null;let t=e.match(/^(.*?)(\d{3,})(\.[^.]+)$/);return t?{stem:t[1],frame:parseInt(t[2],10),digits:t[2].length,ext:t[3].toLowerCase()}:null}var mO=new Set([".png",".jpg",".jpeg",".jpe",".jfif",".tif",".tiff",".exr",".dpx",".dng",".cr3"]),pO=new Set([".webp",".avif",".heic",".heif",".gif",".bmp"]),gm=e=>mO.has(rt(e).toLowerCase());async function ym(e){let t=rt(e).toLowerCase();if(pO.has(t))throw new Error(`${Q(e)}: ${t.slice(1)} stills are not decoded by the engine yet \u2014 save it as PNG or JPEG`);let r=t===".png"?V9:t===".jpg"||t===".jpeg"||t===".jpe"||t===".jfif"?q9:t===".dpx"?v1:t===".exr"?oc:t===".tif"||t===".tiff"?y1:t===".dng"?b1:t===".cr3"?g1:null;if(!r)throw new Error(`unsupported still: ${Q(e)}`);let i=await r(await ut(e));if(!i)throw new Error(`could not decode ${Q(e)}`);return{rgba:new Uint8Array(i.rgba.buffer,i.rgba.byteOffset,i.rgba.byteLength),width:i.width,height:i.height}}var vO=["none","rle","zips","zip","piz","pxr24","b44","b44a","dwaa","dwab"];async function Z9(e){let t=await h1(await ut(e));if(!t)return null;let r=t.attributes??{},i=/^(\d+)\/(\d+)$/.exec(r.framesPerSecond??"");return{meta:t,fps:i&&+i[2]?+i[1]/+i[2]:null,timecode:r.timeCode??null}}async function pE(e){let t=rt(e).toLowerCase(),r={file:Q(e),width:null,height:null,fps:null,timecode:null};if(t===".exr"){let n=await Z9(e);n&&Object.assign(r,{width:n.meta.width,height:n.meta.height,fps:n.fps,timecode:n.timecode,exr:{compression:n.meta.compression,channels:n.meta.channels.map(a=>a.name),attributes:n.meta.attributes??{}}})}else{let n=await p1(t.slice(1),m1(await ut(e)));if(n)Object.assign(r,{width:n.width,height:n.height});else{let a=await ym(e);Object.assign(r,{width:a.width,height:a.height})}}let i=bm(Q(e));if(i){let n=[],a=Q(e),o=Q(e);for await(let l of dt(Be(e))){let u=l.isFile?bm(l.name):null;!u||u.stem!==i.stem||u.digits!==i.digits||u.ext!==i.ext||n.push(u.frame)}n.sort((l,u)=>l-u);let s=l=>`${i.stem}${String(l).padStart(i.digits,"0")}${i.ext}`;a=s(n[0]),o=s(n[n.length-1]);let c=null;if(t===".exr"&&(c=(await Z9($(Be(e),a)).catch(()=>null))?.timecode??null),!c&&r.timecode&&r.fps){let l=Te(r.timecode,r.fps);l!=null&&(c=Me(l-(i.frame-n[0]),r.fps,r.timecode.includes(";")))}r.sequence={first:a,last:o,frames:n.length,first_frame:n[0],last_frame:n[n.length-1],missing:n[n.length-1]-n[0]+1-n.length,start_tc:c,index:n.indexOf(i.frame)}}return r}function vE(e){let t=e.fps?String(Math.round(e.fps*1e3)/1e3):null;return[`${e.file}: still${e.exr?` OpenEXR (${vO[e.exr.compression]??e.exr.compression}, channels ${e.exr.channels.join(",")})`:""}, ${e.width??"?"}x${e.height??"?"}`,e.exr?`header: ${t?`${t} fps`:"no framesPerSecond"}; ${e.timecode?`timeCode ${e.timecode}`:"no timeCode"} (what the file says, not a timeline's declaration)`:"",e.sequence?`sequence: ${e.sequence.first} \u2026 ${e.sequence.last}, ${e.sequence.frames} frames (${e.sequence.first_frame}\u2013${e.sequence.last_frame}${e.sequence.missing?`, ${e.sequence.missing} MISSING`:""})${e.sequence.start_tc?`, starts ${e.sequence.start_tc}`:""}; this is frame ${e.sequence.index} of it`:"",e.exr&&Object.keys(e.exr.attributes).length?`attributes: ${Object.entries(e.exr.attributes).filter(([r])=>!["channels","chlist"].includes(r)).map(([r,i])=>`${r}=${i.length>60?i.slice(0,60)+"\u2026":i}`).join("; ")}`:""].filter(Boolean).join(`
|
|
5
|
+
`)}var H9=.35,hO=e=>(/\.[^./]+$/.exec(e)?.[0]??"").toLowerCase();async function bO(e,t){let r=await t(await ut(e));if(!r)throw new Error(`could not decode ${Q(e)}`);return r}async function gO(e,t){if(e.codec==="still")return ym(e.path);if(e.codec==="exr"){let r=await x1(e.path);return bO(r.frames[t]??r.frames[0],oc)}return P1(e.path,t,e.codec)}async function Ko(e){if(gm(e)&&hO(e)!==".exr")return{path:e,name:Q(e),fps:24,start:0,df:!1,frames:1,codec:"still"};let t=await Un(e),r=t.streams?.find(a=>a.kind==="video");if(!r)throw new Error(`${Q(e)} has no video`);let i=t.source_fps??r.rate??24,n=t.source_timecode??null;return{path:e,name:Q(e),fps:i,start:n?Te(n,i)??0:0,df:!!n?.includes(";"),frames:t.available_range?.duration?.value??0,codec:(r.codec??"").toLowerCase()}}var _e=(e,t)=>Me(e.start+t,e.fps,e.df);function _n(e,t){let r=t==null?Math.floor(e.frames/2):Do(t,e.fps,e.start?_e(e,0):null);if(e.frames&&(r<0||r>=e.frames))throw new Error(`frame ${r} is outside ${e.name} (0\u2013${e.frames-1}, ${_e(e,0)}\u2013${_e(e,e.frames-1)})`);return r}async function NE(e){if(e.out_path&&!/\.png$/i.test(e.out_path))throw new Je("invalid_args",`out_path must be a .png file (${Q(e.out_path)})`);let t=await Ko(e.path),r=_n(t,e.frame),i=e.b?await Ko(e.b):null,n=i?e.b_frame!=null?_n(i,e.b_frame):_n(i,_e(t,r)):0,a=Math.max(0,Math.floor(e.around??0)),o=Math.max(1,Math.floor(e.step??1)),s=Array.from({length:2*Math.floor(a/o)+1},(P,O)=>(O-Math.floor(a/o))*o),c=s.length>1||!!i,l=[{clip:t,frames:s.map(P=>r+P)}];i&&l.push({clip:i,frames:s.map(P=>n+P)});let u=[];for(let P of l){let O=[];for(let X of P.frames){if(X<0||P.clip.frames&&X>=P.clip.frames){O.push(null);continue}let S=await gO(P.clip,X),w=e.width??(c?Math.min(S.width,480):S.width),j=w===S.width?{rgba:S.rgba,w:S.width,h:S.height}:yO(S.rgba,S.width,S.height,w);O.push({...j,label:`${i?P.clip===t?"A ":"B ":""}${_e(P.clip,X)} f${X}`})}u.push(O)}let d=u.flat().filter(Boolean);if(!d.length)throw new Error("no frame in range");let m=Math.max(...d.map(P=>P.w)),f=Math.max(...d.map(P=>P.h)),p=Math.max(1,Math.round(m/240)),v=c?7*p+6:0,h=c?4:0,b=s.length*m+(s.length-1)*h,g=l.length*(f+v)+(l.length-1)*h,y=new Uint8Array(b*g*4);for(let P=3;P<y.length;P+=4)y[P]=255;u.forEach((P,O)=>P.forEach((X,S)=>{if(!X)return;let w=S*(m+h),j=O*(f+v+h);for(let M=0;M<X.h;M++)y.set(X.rgba.subarray(M*X.w*4,(M+1)*X.w*4),((j+M)*b+w)*4);c&&wO(y,b,w+3,j+f+3,X.label,p)}));let x=e.out_path??$(await Ji("conform-frame-"),`${t.name.replace(/\.[^.]+$/,"")}_${_e(t,r).replace(/[:;]/g,"")}${i?"_AB":a?`_pm${a}`:""}.png`);await Ci(x,await kO(y,b,g));let z=l.flatMap(P=>P.frames.filter(O=>O>=0&&(!P.clip.frames||O<P.clip.frames)).map(O=>({file:P.clip.name,frame:O,tc:_e(P.clip,O)}))),N;if(i){let P=s.map((S,w)=>({o:S,a:u[0][w],b:u[1][w]})).filter(S=>S.a&&S.b),O=S=>({w:S.w,h:S.h,y:Array.from({length:S.w*S.h},(w,j)=>S.rgba[j*4+1])}),X=await Gn({op:"pairs",pairs:P.map(S=>[O(S.a),O(S.b)])});N=P.map((S,w)=>{let j=X.distance[w]??1/0;return{a_frame:r+S.o,b_frame:n+S.o,tc:_e(t,r+S.o),distance:j,same:j<=H9}})}return{out_path:x,w:b,h:g,frames:z,...N?{diff:N}:{}}}function OE(e){let t=`wrote ${e.out_path} (${e.w}x${e.h} PNG, ${e.frames.length} frame${e.frames.length>1?"s":""})`;if(!e.diff)return[t,...e.frames.map(i=>`${i.file} f${i.frame} ${i.tc}`)].join(`
|
|
6
|
+
`);let r=e.diff[e.diff.length>>1];return[`${r?.same?"A and B show the same picture":"A and B DIFFER"} at A ${r?.tc??"?"} (distance ${r?.distance??"?"}; 0 = identical, \u2264${H9} = same picture through a grade/burn-in/rescale; a neighbouring frame also scores low, so prove the frame offset with media_align)`,t,...e.diff.map(i=>`A f${i.a_frame} vs B f${i.b_frame} (A ${i.tc}): ${i.distance}${i.same?"":" DIFFERENT"}`)].join(`
|
|
7
|
+
`)}function yO(e,t,r,i){i=Math.max(1,Math.round(i));let n=Math.max(1,Math.round(r*i/t)),a=new Uint8Array(i*n*4);for(let o=0;o<n;o++){let s=Math.floor(o*r/n),c=Math.max(s+1,Math.floor((o+1)*r/n));for(let l=0;l<i;l++){let u=Math.floor(l*t/i),d=Math.max(u+1,Math.floor((l+1)*t/i)),m=0,f=0,p=0,v=0;for(let b=s;b<c;b++)for(let g=u;g<d;g++){let y=(b*t+g)*4;m+=e[y],f+=e[y+1],p+=e[y+2],v++}let h=(o*i+l)*4;a[h]=m/v,a[h+1]=f/v,a[h+2]=p/v,a[h+3]=255}}return{rgba:a,w:i,h:n}}var xO={0:[14,17,19,21,25,17,14],1:[4,12,4,4,4,4,14],2:[14,17,1,2,4,8,31],3:[31,2,4,2,1,17,14],4:[2,6,10,18,31,2,2],5:[31,16,30,1,1,17,14],6:[6,8,16,30,17,17,14],7:[31,1,2,4,8,8,8],8:[14,17,17,14,17,17,14],9:[14,17,17,15,1,2,12],":":[0,12,12,0,12,12,0],";":[0,12,12,0,12,4,8],"+":[0,4,4,31,4,4,0],"-":[0,0,0,31,0,0,0],A:[14,17,17,31,17,17,17],B:[30,17,17,30,17,17,30],f:[6,9,8,28,8,8,8]};function wO(e,t,r,i,n,a){for(let o of n){let s=xO[o];if(s){for(let c=0;c<7;c++)for(let l=0;l<5;l++)if(s[c]>>4-l&1)for(let u=0;u<a;u++)for(let d=0;d<a;d++){let m=((i+c*a+u)*t+r+l*a+d)*4;e[m]=e[m+1]=e[m+2]=255}}r+=6*a}}var zO=Array.from({length:256},(e,t)=>{let r=t;for(let i=0;i<8;i++)r=r&1?3988292384^r>>>1:r>>>1;return r>>>0});function PO(e){let t=4294967295;for(let r of e)t=zO[(t^r)&255]^t>>>8;return(t^4294967295)>>>0}async function kO(e,t,r){let i=new Uint8Array(r*(t*3+1));for(let d=0,m=0;d<r;d++){i[m++]=1;for(let f=0;f<t;f++){let p=(d*t+f)*4;for(let v=0;v<3;v++)i[m++]=e[p+v]-(f?e[p+v-4]:0)&255}}let n=new Uint8Array(await new Response(new Blob([i]).stream().pipeThrough(new CompressionStream("deflate"))).arrayBuffer()),a=(d,m)=>{let f=new Uint8Array(12+m.length),p=new DataView(f.buffer);return p.setUint32(0,m.length),f.set(new TextEncoder().encode(d),4),f.set(m,8),p.setUint32(8+m.length,PO(f.subarray(4,8+m.length))),f},o=new Uint8Array(13),s=new DataView(o.buffer);s.setUint32(0,t),s.setUint32(4,r),o[8]=8,o[9]=2;let c=[new Uint8Array([137,80,78,71,13,10,26,10]),a("IHDR",o),a("IDAT",n),a("IEND",new Uint8Array(0))],l=new Uint8Array(c.reduce((d,m)=>d+m.length,0)),u=0;for(let d of c)l.set(d,u),u+=d.length;return l}async function D9(e){let t=await Ko(e.a),r=await Ko(e.b),i=e.a_in!=null?_n(t,e.a_in):0,n=e.a_out!=null?_n(t,e.a_out):t.frames?t.frames-1:void 0;if(n!=null&&n<i)throw new Error(`a_out (${n}) is before a_in (${i})`);let a=e.b_in!=null?_n(r,e.b_in):null,o=await Gn({op:"align",a:e.a,b:e.b,aIn:i,aOut:n,bIn:a,search:Math.max(1,Math.floor(e.search??12)),aFrames:t.frames||void 0,bFrames:r.frames||void 0},void 0,e.signal),s=f=>({a_in:f.aIn,a_out:f.aOut,a_tc:_e(t,f.aIn),verdict:f.verdict,offset:f.offset,confidence:f.confidence,...f.ambiguous?{ambiguous:f.ambiguous}:{},cost:f.cost}),[c,l]=o.aRange,u=o.bIn,d=s(o.overall),m=o.flash.map(f=>f.kind==="inside"?`B has a shot change inside the range that A does not, at B ${_e(r,f.at.b)} (A ${_e(t,f.at.a)}): a flash frame / wrong shot`:f.kind==="early"?`B cuts ${f.frames} frame(s) before the head (B ${_e(r,f.at.b)}): a ${f.frames}-frame slip early shows the previous shot`:`B cuts ${f.frames} frame(s) after the tail (B ${_e(r,f.at.b)}): a slip late shows the next shot`);return a!=null&&d.offset&&m.unshift(`the client's in-point ${_e(r,a)} is ${d.offset>0?"early":"late"} by ${Math.abs(d.offset)} frame(s): the measured in-point is ${_e(r,u)}`),{a:t.name,b:r.name,a_range:[c,l],a_tc:[_e(t,c),_e(t,l)],proposed_b_in:a,b_in:u,b_tc:_e(r,u),searched:a==null,overall:d,shots:o.shots.map(s),anchors:o.anchors.map(f=>({a_cut:f.aCut,tc:_e(t,f.aCut+1),in_b:f.inB})),flash:m}}function SE(e){let t=e.overall,r=t.verdict==="exact"?`EXACT: ${e.a} ${e.a_tc[0]} = ${e.b} ${e.b_tc} (confidence ${t.confidence})`:t.verdict==="offset"?`OFFSET ${t.offset>0?"+":""}${t.offset} frame(s): ${e.a} ${e.a_tc[0]} = ${e.b} ${e.b_tc}${e.proposed_b_in!=null?" (not the client's in-point)":""} (confidence ${t.confidence})`:t.verdict==="unverifiable"?`UNVERIFIABLE: offsets ${t.ambiguous[0]}\u2026${t.ambiguous[1]} fit equally (static picture, no shot change to anchor on)`:`NO MATCH: ${e.a} ${e.a_tc[0]}\u2013${e.a_tc[1]} is not in ${e.b} within the searched frames (cost ${t.cost})`,i=n=>` shot A ${n.a_tc} (f${n.a_in}\u2013${n.a_out}): ${n.verdict}${n.offset?` ${n.offset>0?"+":""}${n.offset}`:""}${n.ambiguous?` (${n.ambiguous[0]}\u2026${n.ambiguous[1]})`:""}, confidence ${n.confidence}`;return[r,`A ${e.a} ${e.a_tc[0]}\u2013${e.a_tc[1]} (${e.a_range[1]-e.a_range[0]+1} frames) vs B ${e.b}${e.searched?" (searched all of B)":` from ${e.b_tc}`}; offset = measured \u2212 client in-point (+ = later in B)`,`anchors: ${e.anchors.length?`${e.anchors.filter(n=>n.in_b).length} of ${e.anchors.length} shot change(s) in A are in B at the same frame`:"no shot change inside the range: the offset rests on motion alone"}`,`shots (${e.shots.length}):`,...e.shots.map(i),...e.flash.length?["flash-frame risk:",...e.flash.map(n=>` ${n}`)]:["flash-frame risk: none found (no B shot change within 3 frames of the range ends)"]].join(`
|
|
8
|
+
`)}var M9=(e,t)=>[...e].sort((r,i)=>r.track_index-i.track_index).indexOf(t)+1;function TO(e,t){let r=e.timelines.filter(b=>!t.timeline||b.id===t.timeline||b.name===t.timeline),i=t.item_id?r.find(b=>b.tracks.some(g=>g.items.some(y=>y.id===t.item_id))):r.find(b=>b.kind==="primary")??r[0];if(!i)throw new Error(t.item_id?`no item ${t.item_id} in this session`:`no timeline ${t.timeline??""} in this session`);let n=Qe(i),a=i.start_frame??0,o=!!i.is_drop_frame,s=t.record!=null?Do(t.record,n,Me(a,n,o)):null,c=i.tracks.filter(b=>b.kind==="Video"),l;if(t.item_id){for(let b of c)for(let g of b.items)g.id===t.item_id&&(l={it:g,tr:b});if(!l)throw new Error(`${t.item_id} is not a video clip`)}else{if(s==null)throw new Error("give item_id or record (a record TC or frame)");let b=t.track?c.filter(g=>M9(c,g)===t.track):c.filter(g=>g.enabled!==!1);for(let g of[...b].sort((y,x)=>x.track_index-y.track_index)){let y=g.items.find(x=>x.kind==="clip"&&x.enabled!==!1&&x.timeline_range.start.value<=s&&s<x.timeline_range.start.value+x.timeline_range.duration.value);if(y){l={it:y,tr:g};break}}if(!l)throw new Error(`no enabled video clip at record ${Me(a+s,n,o)}`)}let{it:u,tr:d}=l,m=e.media_references.find(b=>b.id===u.media_reference_id),f=m?.local_path??m?.target_url?.replace(/^file:\/\//,"");if(!f||!u.source_range)throw new Error(`${u.name??u.id} has no linked media (relink it first)`);let p=u.timeline_range.start.value,v=s!=null?s-p:0;if(v<0||v>=u.timeline_range.duration.value)throw new Error(`record ${s} is outside ${u.name??u.id}`);let h=Math.round(u.source_range.start.value)+Math.floor(v*u.source_range.duration.value/Math.max(1,u.timeline_range.duration.value));return{path:f,frame:h,item:u.id,track:d.name??`V${d.track_index}`,record_tc:Me(a+p+v,n,o),video_track:M9(c,d),record_start:p}}var xm=new Map,wm=null,NO=0;async function OO(e,t,r,i,n,a){if(n==="offline"){let f=e.timelines.find(b=>!i||b.id===i||b.name===i)??e.timelines[0],{offlineLane:p}=await import("./framing-ZTMYZR2S.js"),{lane:v,media:h}=await p(e,f);f.tracks.push(v),e.media_references.push(...h);try{return await OO(e,t,r,i,f.tracks.filter(b=>b.kind==="Video").length)}finally{f.tracks.splice(f.tracks.indexOf(v),1),e.media_references=e.media_references.filter(b=>!h.includes(b))}}let o=TO(e,{record:t,timeline:i,track:n});if(gm(o.path))return null;let s=xm.get(o.path);s||(s=Ko(o.path),xm.set(o.path,s),s.catch(()=>xm.delete(o.path)));let c=await s;if(c.codec==="still")return null;let l=await(wm??=a1().catch(f=>{throw wm=null,f})),u=$(Ke(),"tmp",`picture-${process.pid}-${NO++%1024}.raw`);await Ce($(Ke(),"tmp"));let d=await l.ask({op:"picture",path:o.path,frame:_n(c,o.frame),width:r,out:u,...a?{lut:a}:{}});if(!d.ok)throw d.why?.startsWith("the analysis engine exited")&&(wm=null),new Error(d.why==="no_picture"?`no picture at frame ${o.frame} of ${Q(o.path)}`:d.why??"no picture");let m=await ut(u);return await nc(u).catch(()=>{}),{w:d.w,h:d.h,px:m,order:d.order??"rgba"}}var SO=new Set(["mov","mp4","m4v","mxf","avi","mkv","mts","m2ts","webm","r3d","braw","ari","arx","arri","crm","dng","dpx","exr","png","jpg","jpeg","tif","tiff","wav","aif","aiff","psd","tga","bmp","gif","webp","avif"]),XO={...T1,fileName:!0,fileNameMode:"tight"};function RE(e){return{...XO,...e?.file_name!=null?{fileName:e.file_name}:{},...e?.file_name_mode?{fileNameMode:e.file_name_mode}:{},...e?.reel_name!=null?{reelName:e.reel_name}:{},...e?.total_duration!=null?{totalDuration:e.total_duration}:{},...e?.resolution!=null?{resolution:e.resolution}:{},...e?.bit_depth!=null?{bitDepth:e.bit_depth}:{},...e?.file_format!=null?{fileFormat:e.file_format}:{},...e?.codec!=null?{codec:e.codec}:{},...e?.media_umid!=null?{mediaUmid:e.media_umid}:{},...e?.extensions?.length?{fileExtensions:e.extensions.join(",")}:{}}}function FE(e,t){let r=new Map;for(let n of e.timelines)for(let a of n.tracks)for(let o of a.items)o.media_reference_id&&(r.get(o.media_reference_id)??r.set(o.media_reference_id,new Set).get(o.media_reference_id)).add(a.kind);let i=t.ref_ids?new Set(t.ref_ids):null;return(e.media_references??[]).filter(n=>{if(!r.has(n.id)||i&&!i.has(n.id)||!t.reset&&n.binding_state==="linked")return!1;if(t.lane&&t.lane!=="both"){let a=r.get(n.id),o=a.has("Video"),s=a.has("Audio");if(t.lane==="video"&&!o||t.lane==="audio"&&!s)return!1}return!0})}var Ao=e=>e.replace(/\.[^.]+$/,"");async function IE(e,t,r=2e3){let i=t.map(l=>Fr(Ao(Q(l.target_url??l.reel_name??"")).toLowerCase())).filter(Boolean),n=new Set(t.map(l=>Qf(Q(l.target_url??""))?.clipBase.toLowerCase()).filter(Boolean)),a=l=>{if(!i.length)return!0;let u=Qf(l)?.clipBase.toLowerCase();if(u&&n.has(u))return!0;let d=Fr(Ao(l.toLowerCase()));return!!d&&i.some(m=>gc(m,d)>=.5)},o=[],s=!1;async function c(l,u){if(u>12||s)return;let d=[];try{for await(let m of dt(l))d.push(m)}catch{return}for(let m of d){if(m.name.startsWith("."))continue;let f=$(l,m.name);if(m.isDirectory){await c(f,u+1);continue}if(!m.isFile)continue;let p=rt(m.name).slice(1).toLowerCase();if(!(!SO.has(p)||!a(m.name))&&(o.push(f),o.length>=r)){s=!0;return}}}return await c(e,0),{paths:o,capped:s}}async function EE(e,t){let r=t.split(/[/\\]/).filter(Boolean),i=Q(e).toLowerCase(),n=[];for(let a=r.length-2;a>=0;a--)r[a].toLowerCase()===i&&n.push(r.slice(a+1));n.push([r[r.length-1]]);for(let a of n){let o=$(e,...a);try{if((await Ii(o)).isFile)return o}catch{}}return null}async function CE(e){let t=[],r=[],i=new Set,n=0;for(let a of e){let o=await z1(a).catch(()=>[a]);if(!i.has(o[0])){o.forEach(s=>i.add(s));try{let s=await Un(o[0]);s.id=`cand-${++n}`,s.binding_state="unbound",t.push(s)}catch(s){r.push(`${Q(a)}: ${s.message.slice(0,80)}`),t.push({id:`cand-${++n}`,kind:"external",target_url:o[0],local_path:o[0],reel_name:Ao(Q(o[0])),binding_state:"unbound",streams:[],raw_extraction:{},metadata:{}})}}}return{refs:t,failed:r}}function JE(e,t,r,i,n){let a=t.map(d=>X9(e,d)),o=r.map(S9),s=hc(a,o,i,n),c=hc(a,o,{...i,reelName:!1,totalDuration:!1,resolution:!1,bitDepth:!1,fileFormat:!1,codec:!1,mediaUmid:!1,fileNameMode:"loose"},n),l=new Map(r.map(d=>[d.id,d]));return{rows:t.map(d=>{let m=s.matches.find(h=>h.proxy_id===d.id),f=s.ambiguous.find(h=>h.proxy_id===d.id),p=s.refusals?.filter(h=>h.proxy_id===d.id).map(h=>`${Q(l.get(h.candidate_id)?.target_url??h.candidate_id)}: ${h.reason}`).join("; "),v=new Set;for(let h of c.matches)h.proxy_id===d.id&&h.candidate_id!==m?.candidate_id&&v.add(h.candidate_id);for(let h of c.ambiguous)h.proxy_id===d.id&&h.candidate_ids.forEach(b=>b!==m?.candidate_id&&v.add(b));if(f&&f.candidate_ids.forEach(h=>v.add(h)),!m&&!f&&!v.size){let h=Fr(Ao(Q(d.target_url??"")).toLowerCase()),b=r.map(g=>({c:g,s:gc(h,Fr(Ao(Q(g.target_url??"")).toLowerCase()))})).filter(g=>g.s>=.4).sort((g,y)=>y.s-g.s)[0];b&&v.add(b.c.id)}return{ref_id:d.id,name:Q(d.target_url??d.reel_name??d.id),status:m?"matched":f?"ambiguous":"unmatched",candidate:m?l.get(m.candidate_id):void 0,confidence:m?.confidence??0,reasons:m?.reasons??[],alternatives:[...v].map(h=>l.get(h)).filter(Boolean),refusal:p||void 0}}),result:s,candidates:r,config:i}}var R9=24;async function GE(e,t){let r=[],i=n=>{let a=n.source_fps??n.available_range?.duration.rate??0;return{fps:a,tc:n.source_timecode?Te(n.source_timecode,a):null}};for(let n of t.rows.filter(a=>a.status!=="unmatched")){let a=e.media_references.find(x=>x.id===n.ref_id),o=a.local_path??a.target_url?.replace(/^file:\/\//,""),s=null;try{o&&(await Ii(o)).isFile&&(s=await Un(o))}catch{}let c=s&&i(s),l=s?.available_range?.duration.value??0;if(!s||c?.tc==null||l<1)continue;let u=Math.max(0,Math.floor(l/2)-R9/2),d=Math.min(l-1,u+R9-1),m=[...new Set([...n.candidate?[n.candidate.id]:[],...t.result.ambiguous.find(x=>x.proxy_id===n.ref_id)?.candidate_ids??[],...n.alternatives.map(x=>x.id)])],f=new Map;for(let x of m){let z=t.candidates.find(O=>O.id===x),N=z?.local_path??z?.target_url?.replace(/^file:\/\//,""),P=z&&i(z);if(!(!z||!N||P?.tc==null||Math.abs(P.fps-c.fps)>.01))try{let O=await D9({a:o,b:N,a_in:u,a_out:d,b_in:c.tc+u-P.tc,search:2});f.set(x,O.overall.verdict==="offset"?`offset ${O.overall.offset>0?"+":""}${O.overall.offset}`:O.overall.verdict)}catch(O){f.set(x,`unreadable (${String(O.message??O).slice(0,80)})`)}}let p=m.filter(x=>f.get(x)==="exact"),v=x=>t.candidates.find(z=>z.id===x),h=x=>(v(x).target_url??x).replace(/^file:\/\//,"").split("/").slice(-2).join("/"),b=m.filter(x=>f.has(x)).map(x=>`${h(x)}: ${f.get(x)}`).join(", "),g=n.candidate?.id,y=x=>f.has(x)&&f.get(x)!=="exact"&&f.get(x)!=="unverifiable";if(p.length===1&&p[0]!==g){let x=n.candidate;n.status="matched",n.candidate=v(p[0]),n.confidence=1,n.reasons=["picture: the only candidate with the same frames at the same TC"],n.alternatives=[...x?[x]:[],...n.alternatives.filter(z=>z.id!==p[0]&&z.id!==x?.id)],x&&(n.refusal=[n.refusal,`picture: ${h(x.id)} is ${f.get(x.id)??"unread"}`].filter(Boolean).join("; "))}else g&&p.includes(g)?n.reasons=[...n.reasons,p.length>1?`picture: the same frames at the same TC (as ${p.length-1} other copy/copies)`:"picture: the same frames at the same TC"]:g&&y(g)&&(n.refusal=[n.refusal,`picture: ${b} (another picture, or the TC is off by the offset)`].filter(Boolean).join("; "),n.alternatives=[n.candidate,...n.alternatives.filter(x=>x.id!==g)],n.status="unmatched",n.candidate=void 0,n.confidence=0,n.reasons=[]);b&&r.push(`picture ${n.ref_id} ${n.name}: ${b}`)}return r}function jO(e,t,r,i){let n=o=>o.streams?.find(s=>s.kind==="video");return[["file name",i.fileName,Q(t.target_url??""),Q(r.target_url??"")],["reel",i.reelName,t.reel_name??"\u2014",r.reel_name??"\u2014"],["timecode (cut must be inside)",!0,`${t.source_timecode??"\u2014"}`,`${r.source_timecode??"\u2014"} \xD7 ${r.available_range?.duration?.value??r.declared_duration?.value??"?"} fr`],["fps (must agree)",!0,`${t.source_fps??"\u2014"}`,`${r.source_fps??n(r)?.rate??"\u2014"}`],["duration",i.totalDuration,`${t.declared_duration?.value??"\u2014"} fr`,`${r.available_range?.duration?.value??r.declared_duration?.value??"\u2014"} fr`],["resolution",i.resolution,`${t.source_resolution_w??"\u2014"}x${t.source_resolution_h??"\u2014"}`,`${r.source_resolution_w??n(r)?.width??"\u2014"}x${r.source_resolution_h??n(r)?.height??"\u2014"}`],["bit depth",i.bitDepth,`${n(t)?.bit_depth??"\u2014"}`,`${n(r)?.bit_depth??"\u2014"}`],["format",i.fileFormat,rt(t.target_url??"").slice(1)||"\u2014",rt(r.target_url??"").slice(1)||"\u2014"],["codec",i.codec,n(t)?.codec??"\u2014",n(r)?.codec??"\u2014"]].map(([o,s,c,l])=>` ${s?"\u2022":"\xB7"} ${o}: ${c} \u2192 ${l}`)}function KE(e,t,r){let i=r.map(n=>({proxy_id:n.ref_id,candidate_id:n.candidate_id,matched_path:t.candidates.find(a=>a.id===n.candidate_id)?.target_url??"",confidence:1,reasons:["accepted"]}));return W9(e,t.candidates,i,!0)}var F9=Ke(),I9=$(F9,"locations.json");async function zm(){try{return JSON.parse(await Gt(I9))}catch{return[]}}async function AE(e){await Ce(F9);let t=(await zm()).filter(r=>r!==e);await Ee(I9,JSON.stringify([e,...t].slice(0,12)))}function E9(e){let t=e.media_references??[],r=T9(t);return Object.entries(r).map(([i,n])=>`- ${i}: ${n.available?"usable":"not usable"} (${n.populated}/${n.total} populated${n.unavailable_reason?`; ${n.unavailable_reason}`:""})`).join(`
|
|
9
|
+
`)}function UE(e,t,r){let i=[],n=a=>t.rows.filter(o=>o.status===a).length;i.push(`proposal: ${n("matched")} matched, ${n("ambiguous")} ambiguous, ${n("unmatched")} unmatched of ${t.rows.length} in scope; ${t.candidates.length} candidates`);for(let a of t.rows){let o=e.media_references.find(c=>c.id===a.ref_id),s=`- ${a.ref_id} ${a.name}: ${a.status}`;a.candidate&&(s+=` \u2192 ${a.candidate.target_url} (${Math.round(a.confidence*100)}%${a.reasons.length?`; ${a.reasons.join("; ")}`:""})`),a.refusal&&(s+=`
|
|
10
|
+
refused: ${a.refusal}`),a.alternatives.length&&(s+=`
|
|
11
|
+
alternatives: ${a.alternatives.slice(0,4).map(c=>`${c.id} ${Q(c.target_url??"")}`).join(", ")}`),i.push(s),r.compare&&a.candidate&&i.push(...jO(e,o,a.candidate,t.config))}return i.join(`
|
|
12
|
+
`)}var Yi=[{id:"resolve",short:"Resolve",label:"Blackmagic DaVinci Resolve",folder:"DaVinci Resolve",primary:{target:"resolve-drt",label:"Resolve timeline (.drt)",extension:"drt",status:"ready",open:"In Resolve: File > Import > Timeline, choose the .drt."},fallback:{target:"resolve-xmeml",label:"XML for Resolve (.xml)",extension:"xml",status:"ready",open:"In Resolve: File > Import > Timeline, choose the .xml."}},{id:"premiere",short:"Premiere",label:"Adobe Premiere Pro",folder:"Premiere Pro",primary:{target:"premiere-prproj",label:"Premiere project (.prproj)",extension:"prproj",status:"ready",open:"In Premiere Pro: File > Open Project, choose the .prproj."},fallback:{target:"premiere-xmeml",label:"XML for Premiere (.xml)",extension:"xml",status:"pending",open:"In Premiere Pro: File > Import, choose the .xml."}},{id:"avid",short:"Avid",label:"Avid Media Composer",folder:"Media Composer",primary:{target:"avid-avb",label:"Media Composer bin (.avb)",extension:"avb",status:"ready",open:"Copy the .avb into your project folder, then open it from the Project window."},fallback:{target:"avid-aaf",label:"AAF for Media Composer (.aaf)",extension:"aaf",status:"ready",open:"In Media Composer: File > Input > Import, choose the .aaf."}},{id:"flame",short:"Flame",label:"Autodesk Flame",folder:"Flame",quality:"Beta",primary:{target:"flame-archive",label:"Flame archive (.hdr + .seg)",extension:"flame-archive.zip",status:"ready",open:"Unzip, then open the .hdr in Project Manager > Archive Browser and restore."},fallback:{target:"flame-xmeml",label:"XML for Flame (.xml)",extension:"xml",status:"pending",open:"In Flame: import the .xml from the MediaHub."}},{id:"finalcut",short:"Final Cut",label:"Apple Final Cut Pro",folder:"Final Cut Pro",quality:"Beta",primary:{target:"finalcut-fcpxmld",label:"Final Cut Pro bundle (.fcpxmld)",extension:"fcpxmld.zip",status:"ready",open:"Unzip, then in Final Cut Pro: File > Import > XML, choose the .fcpxmld."},fallback:null},{id:"baselight",short:"Baselight",label:"FilmLight Baselight",folder:"Baselight",quality:"Beta",primary:{target:"baselight-blscene",label:"Baselight scene (.blscene)",extension:"blscene",status:"ready",open:"Open the .blscene in Baselight."},fallback:{target:"baselight-xmeml",label:"XML for Baselight (.xml)",extension:"xml",status:"pending",open:"In Baselight: import the .xml as an edit."}},{id:"protools",short:"Pro Tools",label:"Avid Pro Tools",folder:"Pro Tools",quality:"Beta",primary:{target:"protools-ptx",label:"Pro Tools session (.ptx)",extension:"ptx",status:"ready",open:"Open the .ptx in Pro Tools."},fallback:{target:"protools-aaf",label:"AAF for Pro Tools (.aaf)",extension:"aaf",status:"ready",open:"In Pro Tools: File > Open Session, choose the .aaf."}}];function C9(e){let t=e.trim().toLowerCase();return Yi.find(r=>r.id===t)}function Pm(e){return[e.primary,...e.fallback&&e.fallback.status==="ready"?[e.fallback]:[]]}function J9(e,t,r){let i=[];i.push(`${e.label}${r?` \u2014 ${r}`:""}`,"");let n=t.find(o=>o.file.target===e.primary.target),a=e.fallback?t.find(o=>o.file.target===e.fallback.target):void 0;n&&i.push(`1. Open ${n.filename} first.`,` ${e.primary.open}`),e.fallback&&a?i.push("",`2. If ${e.label.replace(/^\S+ /,"")} refuses it, use ${a.filename} instead.`,` ${e.fallback.open}`):e.fallback&&e.fallback.status==="pending"&&i.push("",`${e.fallback.label} is not included yet: its writer is still being built to ${e.label.replace(/^\S+ /,"")}'s own import rules.`);for(let o of t){if(i.push("",`${o.filename} \u2014 ${o.file.label}`),!o.issues.length){i.push(" Everything in the source timeline carried.");continue}i.push(" Not carried / check:");for(let s of o.issues)i.push(` - ${s.message}`)}return i.join(`
|
|
13
|
+
`)+`
|
|
14
|
+
`}var B4=$4(r0(),1);import{AsyncLocalStorage as o0}from"node:async_hooks";var mv=()=>{throw new Error("this build has no local engine \u2014 timelines are read and written on conform.tools")};function n0(e,t){return mv()}function i0(e,t){return mv()}function a0(e){return mv()}var dW=new o0;function vv(e){let t=dW.getStore();if(!t||t.declared.includes(e))return;let r=`verb '${t.verb}' reached the protected stage '${e}' without declaring it in protectedStages (core/verbs.ts)`;if(dn("CONFORM_STRICT_STAGES")==="1")throw new Je("internal",r);console.error(`[conform] warning: ${r}`)}var gJ=!1,fW=new o0;function mi(){let e=fW.getStore();if(e==="hosted")return"hosted";if(e==="local"){if(!!1)throw new Je("unsupported","offline conversion needs the app's own engine (this build converts on conform.tools)");return"local"}return dn("CONFORM_ENGINE")==="hosted"||!!1?"hosted":"local"}async function hv(e){return vv("canonicalize"),mi()==="local"?await n0(e.fmt,e.data):await N1(e.fmt,e.file)}async function s0(e,t){return vv("write"),mi()==="local"?await i0(e,t):await O1(e,t)}async function yJ(e){if(mi()!=="local")return null;vv("canonicalize");let t=JSON.parse(await a0(JSON.stringify(e)));return{session:t.session,issues:t.issues??[]}}function _r(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}var Xs=class{constructor(t){this.value=t}};function mW(e){let t=new TextDecoder;if(t.decode(e.subarray(0,8))!=="bplist00")throw new Error("not a bplist00");let r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=e.length-32,n=e[i+6],a=e[i+7],o=Number(r.getBigUint64(i+8)),s=Number(r.getBigUint64(i+16)),c=Number(r.getBigUint64(i+24)),l=(f,p)=>{let v=0;for(let h=0;h<p;h++)v=v*256+e[f+h];return v},u=Array.from({length:o},(f,p)=>l(c+p*n,n)),d=new Map,m=f=>{if(d.has(f))return d.get(f);let p=u[f],v=e[p],h=v>>4,b=v&15,g=()=>{if(b!==15)return b;let x=e[p+1]&15,z=1<<x,N=l(p+2,z);return p+=1+z,N},y;switch(h){case 0:y=b===8?!1:b===9?!0:null;break;case 1:{let x=1<<b;y=x===8?Number(r.getBigInt64(p+1)):l(p+1,x);break}case 2:y=b===2?r.getFloat32(p+1):r.getFloat64(p+1);break;case 3:y=r.getFloat64(p+1);break;case 4:{let x=g();y=e.slice(p+1,p+1+x);break}case 5:{let x=g();y=t.decode(e.subarray(p+1,p+1+x));break}case 6:{let x=g(),z="";for(let N=0;N<x;N++)z+=String.fromCharCode(r.getUint16(p+1+2*N));y=z;break}case 8:y=new Xs(l(p+1,b+1));break;case 10:case 12:{let x=g(),z=[];d.set(f,z);for(let N=0;N<x;N++)z.push(m(l(p+1+N*a,a)));return z}case 13:{let x=g(),z={};d.set(f,z);for(let N=0;N<x;N++)z[String(m(l(p+1+N*a,a)))]=m(l(p+1+(x+N)*a,a));return z}default:throw new Error(`bplist: unknown object marker 0x${v.toString(16)}`)}return d.set(f,y),y};return m(s)}function pW(e){let t=mW(e),r=t.$objects,i=new Map,n=o=>{if(o instanceof Xs){if(i.has(o.value))return i.get(o.value);i.set(o.value,null);let s=n(r[o.value]);return i.set(o.value,s),s}if(o==="$null")return null;if(Array.isArray(o))return o.map(n);if(o&&typeof o=="object"&&!(o instanceof Uint8Array)){let s=o,c=s.$class instanceof Xs?r[s.$class.value]?.$classname:void 0;if(c==="NSNull")return null;if("NS.keys"in s){let u=s["NS.keys"].map(n),d=s["NS.objects"].map(n),m={};return u.forEach((f,p)=>{m[typeof f=="string"?f:JSON.stringify(f)]=d[p]}),m}if("NS.objects"in s)return s["NS.objects"].map(n);if("NS.string"in s)return n(s["NS.string"]);if("NS.time"in s)return s["NS.time"];if("NS.data"in s)return n(s["NS.data"]);let l={};for(let[u,d]of Object.entries(s))u!=="$class"&&(l[u]=n(d));return c&&(l.$cls=c),l}return o},a=t.$top;return n("root"in a?a.root:Object.values(a)[0])??{}}var vW=(e,t)=>{for(e=e<0n?-e:e,t=t<0n?-t:t;t;)[e,t]=[t,e%t];return e||1n},cr=class e{constructor(t,r=1n){r<0n&&(t=-t,r=-r);let i=vW(t,r);this.n=t/i,this.d=r/i}static parse(t){let r=/^\s*(-?\d+)(?:\/(\d+))?\s*$/.exec(t??"");return r&&r[2]!=="0"?new e(BigInt(r[1]),BigInt(r[2]??"1")):null}add(t){return new e(this.n*t.d+t.n*this.d,this.d*t.d)}sub(t){return new e(this.n*t.d-t.n*this.d,this.d*t.d)}half(){return new e(this.n,this.d*2n)}cmp(t){let r=this.n*t.d-t.n*this.d;return r<0n?-1:r>0n?1:0}get num(){return Number(this.n)/Number(this.d)}get fcp(){return this.d===1n?`${this.n}s`:`${this.n}/${this.d}s`}},ot=new cr(0n);function Bt(e){let t=/^\{\((-?\d+(?:\/\d+)?)\),\((-?\d+(?:\/\d+)?)\)\}$/.exec(String(e??"").replace(/\s+/g,""));if(!t)return null;let r=cr.parse(t[1]),i=cr.parse(t[2]);return r&&i?[r,i]:null}var fu=class e{constructor(t,r,i){this.path=t;this.objs=r;this.byIdent=i}static async open(t){let r=await Ji("conform-fcp-");try{return await e.load(t,r)}finally{await e1(r)}}static async load(t,r){let i=$(r,"CurrentVersion.fcpevent");await Gf(t,i);for(let m of["-wal","-shm"])await Ht(t+m)&&await Gf(t+m,i+m);let n=async m=>await _w(i,m),[a]=await n("select name from sqlite_master where type='table' and name like 'Z\\_%CHILDCOLLECTIONS' escape '\\'");if(!a)throw new Error(`${t}: no Z_*CHILDCOLLECTIONS table \u2014 not a Final Cut project/event store`);let o=(await n(`pragma table_info("${a.name}")`)).map(m=>m.name),s=o.find(m=>/PARENTCOLLECTIONS$/.test(m)),c=o.find(m=>/CHILDCOLLECTIONS$/.test(m));if(!s||!c)throw new Error(`${t}: unexpected columns in ${a.name}: ${o.join(",")}`);let l=await n("select c.Z_PK pk, c.ZTYPE t, c.ZNAME n, c.ZIDENTIFIER i, hex(m.ZDICTIONARYDATA) d from ZCOLLECTION c left join ZCOLLECTIONMD m on m.Z_PK = c.ZMETADATA"),u=new Map,d=new Map;for(let m of l)u.set(m.pk,{pk:m.pk,type:m.t??"",name:m.n,ident:m.i,kids:[],hex:m.d||null}),m.i&&d.set(m.i,m.pk);for(let m of await n(`select "${s}" p, "${c}" c from "${a.name}" order by 1, 2`))u.get(m.p)?.kids.push(m.c);return new e(t,u,d)}d(t){if(!t._d)try{t._d=t.hex?pW(Uint8Array.from(t.hex.match(/../g),r=>parseInt(r,16))):{}}catch{t._d={}}return t._d}ofType(t){return[...this.objs.values()].filter(r=>r.type===t)}rel(t,r){for(let i of t.kids){let n=this.objs.get(i);if(!n||n.name!==r||n.type!=="NSSet"&&n.type!=="NSArray")continue;let a=n.kids.map(s=>this.objs.get(s)).filter(Boolean),o=this.d(n).$order;if(n.type==="NSArray"&&Array.isArray(o)&&o.length){let s=new Map(a.map(l=>[l.ident,l])),c=o.map(l=>s.get(String(l))??(this.byIdent.has(String(l))?this.objs.get(this.byIdent.get(String(l))):void 0)).filter(l=>!!l);if(c.length)return c}return a}return[]}subtree(t,r){let i=[],n=new Set([t.pk]),a=[...t.kids];for(;a.length;){let o=a.pop();if(n.has(o))continue;n.add(o);let s=this.objs.get(o);s&&(i.push(s),r.has(s.type)||a.push(...s.kids))}return i}},bv=new Set(["FFAnchoredCollection","FFAnchoredClip","FFAnchoredTransition","FFAnchoredGeneratorComponent","FFAnchoredGapGeneratorComponent","FFAssetRef","FFClipRef"]),hW=new Set(["FFHeConformEffect","FFIntrinsicColorConformEffect","FFHeColorEffect","FFRateConformVideoEffect","FFRateConformAudioEffect"]),gv=class e{constructor(t,r){this.eventDir=t;this.library=r;this.assets=new Map;this.formats=new Map;this.media=new Map;this.eventStores=new Map;this.nextId=1;this.headExt=null;this.layout=[];this.issues=[];this.notes=[];this.eventDirsCache=null}id(t){return`${t}${this.nextId++}`}issue(t,r,i){this.issues.push({at:t.num,duration:r?.num??0,note:i})}formatId(t,r,i){let n=`${t}x${r}@${i?`${i.n}/${i.d}`:"-"}`,a=this.formats.get(n);return a||(a=this.id("r"),this.formats.set(n,a)),a}formatOf(t,r,i=!1){let n=t.d(r).videoProps,a=/\{\{[-\d.]+,\s*[-\d.]+\},\s*\{(\d+),\s*(\d+)\}\}/.exec(String(n?.PB??"")),o=n?.FRD;if(n?.FRU===!0&&i)return this.formatId(0,0,null);if(a)return this.formatId(Number(a[1]),Number(a[2]),o?.value&&o.timescale?new cr(BigInt(o.value),BigInt(o.timescale)):null)}async eventStore(t){if(!this.eventStores.has(t)){let r=$(t,"CurrentVersion.fcpevent");this.eventStores.set(t,await Ht(r)?await fu.open(r).catch(()=>null):null)}return this.eventStores.get(t)}async eventDirs(){if(this.eventDirsCache)return this.eventDirsCache;let t=[this.eventDir];try{for await(let r of dt(this.library))r.isDirectory&&$(this.library,r.name)!==this.eventDir&&!r.name.startsWith("__")&&t.push($(this.library,r.name))}catch{}return this.eventDirsCache=t}async inEvents(t,r){for(let i of await this.eventDirs()){let n=await this.eventStore(i),a=n?.ofType(t).find(o=>n.d(o).mediaIdentifier===r);if(n&&a)return{store:n,obj:a,dir:i}}return null}async asset(t,r,i,n,a){let o=r.d(t),s=String(o.mediaIdentifier??t.ident),c=this.assets.get(s);if(c)return c;let l=String(o.displayName??s),u=Bt(r.d(i).clippedRange),d={id:this.id("r"),name:l,start:u?.[0]??ot,duration:u?.[1]??ot,hasVideo:!1,hasAudio:!1},m=await this.inEvents("FFAsset",s);if(m){let p=m.store.d(m.obj),v=Bt(p.mediaRange);v&&(d.start=v[0],d.duration=v[1]),d.hasVideo=p.hasVideo===!0,d.hasAudio=p.hasAudio===!0,typeof p.audioChannelCount=="number"&&(d.channels=p.audioChannelCount),typeof p.audioSampleRate=="number"&&(d.rate=p.audioSampleRate),typeof p.displayName=="string"&&(d.name=p.displayName);let h=m.store.rel(m.obj,"originalMediaRep")[0],b=h?m.store.d(h).projectRelativePath:void 0;if(typeof b=="string"){let g=$(m.dir,b);d.src=await Kf(g)??void 0,d.src||this.notes.push(`media offline: ${g} does not resolve`)}}if(!d.src){let p=$(this.eventDir,"Original Media");try{for await(let v of dt(p))if(v.name===l||v.name.replace(/\.[^.]+$/,"")===l){d.src=await Kf($(p,v.name))??void 0;break}}catch{}d.src||this.notes.push(`no media path found for "${l}" (${s})`)}let f=String(r.d(i).providerSourceKey??"");if(m||(d.hasVideo=f.startsWith("v"),d.hasAudio=!f.startsWith("v")||r.rel(i,"anchoredItems").length>0),d.hasVideo&&(d.format=this.formatOf(a,n)),f==="still"){d.start=ot,d.duration=ot,d.hasVideo=!0;let p=/\{(\d+),\s*(\d+)\}\}/.exec(String(r.d(i).videoProps?.PB??""));d.format=p?this.formatId(Number(p[1]),Number(p[2]),null):this.formatId(0,0,null)}return this.assets.set(s,d),d}levels(t,r){let i=t.subtree(r,bv).filter(c=>c.type==="FFEffectStack"&&t.d(c).audioChannelsData?.audioLevelChannelData);if(!i.length)return null;let n=null,a=!1,o=!1,s=[];for(let c of i){let l=t.d(c).audioChannelsData.audioLevelChannelData,u=l instanceof Uint8Array?new TextDecoder().decode(l):String(l??"");for(let d of u.matchAll(/<parameter name="([^"]*)"[^>]*>([\s\S]*?)<\/parameter>/g)){if(d[1]!=="Volume"){s.push(d[1]);continue}let m=/<curve[^>]*\bvalue="([-\d.e]+)"/.exec(d[2]);m&&n===null&&(n=Number(m[1])),/<keypoint\b/.test(d[2])&&(a=!0),/<fade(In|Out)Offset>/.test(d[2])&&(o=!0)}}return{gain:n,keyframed:a,fades:o,other:s}}timeMap(t,r,i,n,a,o){let s=[...t.rel(r,"videoEffects"),...t.rel(r,"audioEffects")].flatMap(y=>t.subtree(y,bv)),c=s.find(y=>y.type==="FFRetimingVideoEffect")??s.find(y=>y.type==="FFRetimingAudioEffect");if(!c)return"";let l=t.d(c).channelData,u=l instanceof Uint8Array?new TextDecoder().decode(l):String(l??""),d=/<parameter name="Time Map"[\s\S]*?<\/curve>/.exec(u)?.[0]??"",m=[],f=[],p=!0;for(let y of d.matchAll(/<keypoint interpolation="(\d+)"[^>]*>[\s\S]*?<time>(-?\d+) (\d+)[^<]*<\/time>\s*<value>([-\d.e]+)<\/value>/g)){let x=new cr(BigInt(y[2]),BigInt(y[3])).add(i),z=BigInt(y[3]),N=new cr(BigInt(Math.round(Number(y[4])*Number(z))),z).add(i);x.cmp(N)!==0&&(p=!1),f.push([x,N]),m.push(`<timept time="${x.fcp}" value="${N.fcp}" interp="${y[1]==="1"?"linear":"smooth2"}"/>`)}if(p&&m.length>=2)return"";if(m.length<2)return this.issue(a,o,`Final Cut clip "${String(t.d(r).displayName??"")}": retime could not be decoded \u2014 plays at 100% here`),"";let[v,h]=[n,n.add(o)],b=y=>f[y+1][1].sub(f[y][1]).num/(f[y+1][0].sub(f[y][0]).num||1);return f.some(([y],x)=>x>0&&x<f.length-1&&y.cmp(v)>0&&y.cmp(h)<0&&Math.abs(b(x-1)-b(x))>1e-9)&&this.issue(a,o,`Final Cut clip "${String(t.d(r).displayName??"")}": speed ramp carried as its time map; FCP's ease handles are not \u2014 check the ramp's shape`),`<timeMap>${m.join("")}</timeMap>`}volume(t,r){let i=this.levels(t,r);if(!i||i.gain===null||i.keyframed||Math.abs(i.gain-1)<1e-9)return"";let n=i.gain<=0?-96:20*Math.log10(i.gain);return`<adjust-volume amount="${Number(n.toFixed(4))}dB"/>`}effectIssues(t,r,i,n){let a=String(t.d(r).displayName??r.type),o=t.subtree(r,bv),s=new Set;for(let l of o)if(!/^FFRetiming/.test(l.type)){if(l.type==="FFHeXForm3DEffect")s.add("transform (position/scale/rotation)");else if(l.type==="NSArray"&&l.name==="effects"&&l.kids.length){let u=l.kids.map(d=>t.objs.get(d)).filter(Boolean).map(d=>String(t.d(d).displayName??d.type));s.add(`effects: ${[...new Set(u)].join(", ")}`)}else if(l.type==="NSArray"&&l.name==="intrinsicEffects")for(let u of l.kids){let d=t.objs.get(u);d&&!hW.has(d.type)&&!/^FFRetiming/.test(d.type)&&d.type!=="FFHeXForm3DEffect"&&s.add(`${String(t.d(d).displayName??d.type)}`)}}let c=this.levels(t,r);c?.keyframed&&s.add("volume keyframes (the static level is carried)"),c?.fades&&s.add("audio fade handles"),c?.other.length&&s.add(`audio ${[...new Set(c.other)].join(", ")}`),s.size&&this.issue(i,n,`Final Cut clip "${a}": ${[...s].join("; ")} \u2014 not carried, rebuild by hand`)}async element(t,r,i,n,a,o){let s=t.d(r),[c,l]=Bt(s.clippedRange)??[ot,ot],u=String(s.displayName??""),d=u?` name="${_r(u)}"`:"",m=this.headExt??ot;switch(this.headExt=null,r.type){case"FFAnchoredGapGeneratorComponent":{let v=await this.connected(t,r,c,c,n);return{xml:`<gap${d} offset="${i.fcp}" start="${c.fcp}" duration="${l.fcp}"${v?`>${v}</gap>`:"/>"}`,dur:l}}case"FFAnchoredTransition":return{xml:`<transition${d} offset="${i.fcp}" duration="${l.fcp}"/>`,dur:l};case"FFAnchoredClip":return this.compound(t,r,i,n,a,o,m);case"FFAnchoredMediaComponent":return this.clip(t,r,r,null,i,n,a,o,m);case"FFAnchoredCollection":{let v=t.rel(r,"containedItems"),h=v.filter(b=>b.type==="FFAnchoredMediaComponent");if(h.length===1&&v.length===1)return this.clip(t,r,h[0],null,i,n,a,o,m);if(v.length===1&&v[0].type==="FFAnchoredGapGeneratorComponent"){let b=t.rel(v[0],"anchoredItems").filter(g=>g.type==="FFAnchoredMediaComponent");if(b.length){let g=x=>Math.abs(Number(t.d(x).anchoredLane??0)),y=[...b].sort((x,z)=>g(x)-g(z))[0];return this.clip(t,r,y,v[0],i,n,a,o,m)}}if(a!==null&&!s.isCompoundClip&&v.length)return this.storyline(t,r,i,n,a);break}}let f=r.type==="FFAnchoredGeneratorComponent"?"title/generator":r.type==="FFAnchoredCollection"?"compound/multi-component clip":r.type.replace(/^FFAnchored/,"");if(this.issue(n,l,`Final Cut ${f}${u?` "${u}"`:""} was not translated \u2014 rebuild by hand`),a!==null)return{xml:"",dur:l};let p=await this.connected(t,r,c,c,n);return{xml:`<gap${d} offset="${i.fcp}" start="${c.fcp}" duration="${l.fcp}"${p?`>${p}</gap>`:"/>"}`,dur:l}}async clip(t,r,i,n,a,o,s,c,l){let u=s!==null?` lane="${s}"`:"",d=t.d(r),m=t.d(i),[f,p]=Bt(d.clippedRange)??[ot,ot],v=t.rel(i,"media")[0];if(!v||v.type!=="FFAssetRef")return this.issue(o,p,`Final Cut clip "${String(d.displayName??"")}" refers to ${v?.type??"nothing"} \u2014 not translated`),{xml:u?"":`<gap offset="${a.fcp}" duration="${p.fcp}"/>`,dur:p};let h=await this.asset(v,t,i,r,t),b=Bt(m.clippedRange)?.[0]??h.start,g=cr.parse(String(d.unclippedStart??""))??b,y=b.sub(g);if(n){let M=Bt(t.d(n).clippedRange)?.[0]??g,G=Bt(m.anchorPair),Z=G?G[1].add(b.sub(G[0])):M;y=b.sub(g).add(M.sub(Z))}let x=f.add(y),z=String(m.providerSourceKey??"").startsWith("v"),N=t.rel(i,"anchoredItems").filter(M=>M.type==="FFAnchoredMediaComponent"&&!String(t.d(M).providerSourceKey??"").startsWith("v")),P=z&&!N.length&&h.hasAudio?' srcEnable="video"':!z&&h.hasVideo?' srcEnable="audio"':"",O=String(d.displayName??h.name);this.layout.push({name:O,lane:s??0,record:o.sub(l).num,duration:p.add(l).num,source_in:x.sub(l).num,path:h.src,storyline:c||void 0}),this.effectIssues(t,r,o,p);let X=this.timeMap(t,r,y,x,o,p)+this.volume(t,r)+await this.connected(t,r,f,x,o),S=h.format?` format="${h.format}"`:"",w=m.providerSourceKey==="still"?"video":"asset-clip";return{xml:`<${w} ref="${h.id}"${u} offset="${a.sub(l).fcp}" name="${_r(O)}" start="${x.sub(l).fcp}" duration="${p.add(l).fcp}"${w==="video"?"":S+P}${X?`>${X}</${w}>`:"/>"}`,dur:p}}async compound(t,r,i,n,a,o,s){let c=a!==null?` lane="${a}"`:"",l=t.d(r),[u,d]=Bt(l.clippedRange)??[ot,ot],m=String(l.displayName??"Compound Clip"),f=t.rel(r,"media")[0],p=f?String(t.d(f).mediaIdentifier??""):"",v=this.media.get(p);if(!v&&p){let b=await this.inEvents("FFAnchoredSequence",p),g=b?{st:b.store,obj:b.obj}:null;if(g){let y=this.id("r");v={id:y,xml:""},this.media.set(p,v);let x=new e(this.eventDir,this.library);x.assets=this.assets,x.formats=this.formats,x.media=this.media,x.eventStores=this.eventStores,x.eventDirsCache=this.eventDirsCache,x.nextId=this.nextId;let z=await x.sequence(g.st,g.obj);this.nextId=x.nextId;for(let N of x.issues)this.notes.push(`in compound clip "${m}": ${N.note}`);this.notes.push(...x.notes),v.xml=`<media id="${y}" name="${_r(String(g.st.d(g.obj).displayName??m))}">${z}</media>`}}if(!v)return this.issue(n,d,`Final Cut compound clip "${m}": its sequence was not found in the event \u2014 not translated`),{xml:c?"":`<gap offset="${i.fcp}" duration="${d.fcp}"/>`,dur:d};this.layout.push({name:m,lane:a??0,record:n.sub(s).num,duration:d.add(s).num,source_in:u.sub(s).num,compound:m,storyline:o||void 0}),this.effectIssues(t,r,n,d);let h=await this.connected(t,r,u,u,n);return{xml:`<ref-clip ref="${v.id}"${c} offset="${i.sub(s).fcp}" name="${_r(m)}" start="${u.sub(s).fcp}" duration="${d.add(s).fcp}"${h?`>${h}</ref-clip>`:"/>"}`,dur:d}}async run(t,r,i,n,a){let o=i,s=[];for(let c=0;c<r.length;c++){let l=r[c];if(l.type==="FFAnchoredTransition"){let[,m]=Bt(t.d(l).clippedRange)??[ot,ot],f=c>0&&r[c-1].type!=="FFAnchoredTransition",p=c+1<r.length,v=f?p?o.sub(m.half()):o.sub(m):o;s.push((await this.element(t,l,v,n.add(v.sub(i)),null,a)).xml),!f&&p&&(o=o.add(m.half()),this.headExt=m.half());continue}let{xml:u,dur:d}=await this.element(t,l,o,n.add(o.sub(i)),null,a);s.push(u),o=o.add(d)}return{xml:s.join(""),end:o}}async storyline(t,r,i,n,a){let{xml:o,end:s}=await this.run(t,t.rel(r,"containedItems"),ot,n,!0);return{xml:`<spine lane="${a}" offset="${i.fcp}">${o}</spine>`,dur:s}}async connected(t,r,i,n,a){let o=[];for(let c of t.rel(r,"anchoredItems")){if(c.type==="FFAnchoredMediaComponent")continue;if(/Marker$/.test(c.type)){this.notes.push(`${c.type.replace(/^FFAnchored/,"")}s are not carried`);continue}let l=t.d(c),u=Bt(l.anchorPair);if(!u)continue;let d=Bt(l.clippedRange)?.[0]??ot,m=Number(l.anchoredLane??0);o.push({off:u[1].add(d.sub(u[0])),lane:m,o:c})}o.sort((c,l)=>c.off.cmp(l.off)||c.lane-l.lane);let s=[];for(let c of o){let l=a.add(c.off.sub(i)),u=c.off.add(n.sub(i));s.push((await this.element(t,c.o,u,l,c.lane,!1)).xml)}return s.join("")}async sequence(t,r){let i=t.rel(r,"primaryObject")[0];if(!i)throw new Error(`Final Cut sequence ${String(t.d(r).displayName??r.pk)} has no primary storyline`);let n=t.rel(r,"sequenceInfo")[0],a=n?t.d(n):{},o=Bt(a.mediaRange)?.[0]??ot,s=this.formatOf(t,i,!0);s??=this.formatId(1920,1080,cr.parse(String(a.timecodeFrameDuration??""))??new cr(1001n,24000n));let{xml:c,end:l}=await this.run(t,t.rel(i,"containedItems"),o,ot,!1),u=a.timecodeDisplayDropFrame===1||a.timecodeDisplayDropFrame===!0?"DF":"NDF";return`<sequence format="${s}" duration="${l.sub(o).fcp}" tcStart="${o.fcp}" tcFormat="${u}"><spine>${c}</spine></sequence>`}resources(){let t=[];for(let[r,i]of this.formats){let[,n,a,o]=/^(\d+)x(\d+)@(.*)$/.exec(r);t.push(o==="-"?`<format id="${i}" name="FFVideoFormatRateUndefined"${n!=="0"?` width="${n}" height="${a}"`:""}/>`:`<format id="${i}" frameDuration="${o}s" width="${n}" height="${a}"/>`)}for(let r of this.assets.values()){let i=r.hasAudio?` hasAudio="1" audioSources="1"${r.channels?` audioChannels="${r.channels}"`:""}${r.rate?` audioRate="${r.rate}"`:""}`:"",n=r.src?`<media-rep kind="original-media" src="${_r(bW(r.src))}"/>`:"";t.push(`<asset id="${r.id}" name="${_r(r.name)}" start="${r.start.fcp}" duration="${r.duration.fcp}"${r.hasVideo?' hasVideo="1"':""}${r.format?` format="${r.format}"`:""}${i}>${n}</asset>`)}for(let r of this.media.values())t.push(r.xml);return t.join(`
|
|
15
|
+
`)}},bW=e=>"file://"+e.split("/").map(t=>encodeURIComponent(t)).join("/");async function l0(e,t={}){let r=await fu.open(e),i=t.eventDir??Be(Be(e)),n=Be(i),a=r.ofType("FFAnchoredSequence"),o=Q(Be(e)),s=a.find(m=>r.d(m).displayName===o)??a[0];if(!s)throw new Error(`${e}: no Final Cut sequence in this store`);let c=String(r.d(s).displayName??o),l=new gv(i,n),u=await l.sequence(r,s),d=`<?xml version="1.0" encoding="UTF-8"?>
|
|
16
|
+
<!DOCTYPE fcpxml>
|
|
17
|
+
<fcpxml version="1.10">
|
|
18
|
+
<resources>
|
|
19
|
+
${l.resources()}
|
|
20
|
+
</resources>
|
|
21
|
+
<library><event name="${_r(Q(i))}"><project name="${_r(c)}">${u}</project></event></library>
|
|
22
|
+
</fcpxml>
|
|
23
|
+
`;return l.layout.sort((m,f)=>m.record-f.record||m.lane-f.lane),{project:c,fcpxml:d,layout:l.layout,issues:l.issues,notes:[...new Set(l.notes)]}}function c0(e,t){return e.map((r,i)=>({id:`fcp-decode-${i}`,name:"ConformTools",color:"Red",kind:"conform_issue",note:r.note,time:{value:Math.round(r.at*t),rate:t},duration:{value:Math.round(r.duration*t),rate:t}}))}var u0=new Set([".wav",".bwf",".wave"]),d0=1<<18;function f0(e){let t=new DataView(e.buffer,e.byteOffset,24),r=a=>t.getUint32(a*4,!0),i={rate:r(0),channels:r(1),frames:r(2),bits:r(3),total:r(4)+r(5)*2**32},n=e.slice(24);return{h:i,samples:new Float32Array(n.buffer,n.byteOffset,n.byteLength/4)}}function gW(e,t,r,i,n,a){let o=e*(r/8),s=i*o,c=602,l=44+c+8,u=new Uint8Array(l),d=new DataView(u.buffer),m=(p,v)=>{for(let h=0;h<4;h++)u[p+h]=v.charCodeAt(h)};m(0,"RIFF"),d.setUint32(4,l-8+s+(s&1),!0),m(8,"WAVE"),m(12,"fmt "),d.setUint32(16,16,!0),d.setUint16(20,1,!0),d.setUint16(22,e,!0),d.setUint32(24,t,!0),d.setUint32(28,t*o,!0),d.setUint16(32,o,!0),d.setUint16(34,r,!0),m(36,"bext"),d.setUint32(40,c,!0);let f=44;return new TextEncoder().encodeInto(a.slice(0,255),u.subarray(f,f+256)),new TextEncoder().encodeInto("conform.tools",u.subarray(f+256,f+288)),d.setUint32(f+338,n%2**32,!0),d.setUint32(f+342,Math.floor(n/2**32),!0),d.setUint16(f+346,1,!0),m(f+c,"data"),d.setUint32(f+c+4,s,!0),u}function yW(e,t,r,i){let n=t.reduce((l,u)=>l+u,0),a=i/8,o=new Uint8Array(r*n*a),s=2**(i-1),c=0;for(let l=0;l<r;l++)for(let u=0;u<e.length;u++)for(let d=0;d<t[u];d++){let m=e[u][l*t[u]+d]??0,f=Math.max(-s,Math.min(s-1,Math.round(m*s)));for(let p=0;p<a;p++)o[c++]=f>>8*p&255}return o}async function xW(e,t,r){let i=await Af(e);try{let n=(m,f)=>i.readAt(m,f),a=[];for(let m=0;;m++){let f;try{f=await Yf(n,i.size,m,0,1)}catch(v){if(m===0)throw v;break}let{h:p}=f0(f);if(a.length&&p.rate!==a[0].rate)break;a.push(p)}let o=a[0].rate,s=a.every(m=>m.bits>0&&m.bits<=16)?16:24,c=a.map(m=>m.channels),l=c.reduce((m,f)=>m+f,0),u=Math.max(...a.map(m=>m.total));if(u*l*(s/8)>4294966256)throw new Error(`its sound is over 4 GB as one WAV (${l} ch, ${u} samples)`);let d=await t1(t);try{let m=gW(l,o,s,u,r(o),Q(e));await d.writeAt(0,m);let f=m.byteLength;for(let p=0;p<u;p+=d0){let v=Math.min(d0,u-p),h=[];for(let g=0;g<a.length;g++)h.push(p<a[g].total?f0(await Yf(n,i.size,g,p,Math.min(v,a[g].total-p))).samples:new Float32Array(0));let b=yW(h,c,v,s);await d.writeAt(f,b),f+=b.byteLength}f-m.byteLength&1&&await d.writeAt(f,new Uint8Array(1))}finally{await d.close()}return{channels:l,rate:o,bits:s,frames:u}}finally{await i.close()}}async function wW(e){let t=await e.readAt(0,Math.min(e.size,65536)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);for(let i=12;i+8<=t.length;){let n=String.fromCharCode(...t.subarray(i,i+4)),a=r.getUint32(i+4,!0);if(n==="bext"&&i+8+380<=t.length){let o=t.subarray(i+8+348,i+8+380);return o.some(s=>s!==0)?[...o].map(s=>s.toString(16).padStart(2,"0")).join(""):null}if(n==="data")break;i+=8+a+(a&1)}return null}async function zW(e){await An();let t=await Af(e);try{let r=JSON.parse(await f1((i,n)=>t.readAt(i,n),t.size));return{rate:r.sample_rate,channels:r.channels,bits:r.bits_per_sample,frames:Math.floor(r.data_length/r.block_align),umid:await wW(t)}}finally{await t.close()}}async function m0(e,t){let r=structuredClone(e),i=new Map((r.media_references??[]).map(u=>[u.id,u])),n=new Set;for(let u of r.timelines)for(let d of u.tracks)if(d.kind?.toLowerCase()==="audio")for(let m of d.items)m.kind==="clip"&&m.media_reference_id&&n.add(m.media_reference_id);let a=[],o=[],s=new Map,c=$(t,"Audio Files"),l=new Set;for(let u of n){let d=i.get(u),m=d?.local_path??d?.target_url?.replace(/^file:\/\//,"")??null;if(!d||!m||u0.has(rt(m).toLowerCase()))continue;let f=Q(m);if(!await Ht(m)){o.push(`${f}: not found on this machine (relink it first)`);continue}if(rt(m).toLowerCase()===".aaf"){o.push(`${f}: audio embedded in the AAF; open the AAF in Pro Tools directly for these clips`);continue}let p=f.replace(/\.[^.]+$/,"");for(let h=2;l.has(p.toLowerCase());h++)p=`${f.replace(/\.[^.]+$/,"")}_${h}`;l.add(p.toLowerCase());let v=$(c,`${p}.wav`);try{await An(),await Ce(c);let h=d.source_fps??24,b=d.source_timecode?Te(d.source_timecode,h)??0:0,g=await xW(m,v,x=>Math.round(b/h*x)),y={...d,id:`${d.id}~wav`,name:`${p}.wav`,target_url:v,local_path:v,content_kind:"audio",streams:[{kind:"audio",codec:`pcm_s${g.bits}le`,rate:g.rate,channels:g.channels,bit_depth:g.bits}]};r.media_references.push(y),s.set(d.id,y.id),a.push(`${f} \u2192 Audio Files/${p}.wav (${g.channels} ch, ${g.bits}-bit ${g.rate} Hz)`)}catch(h){o.push(`${f}: ${h instanceof Error?h.message:String(h)}`)}}for(let u of r.timelines)for(let d of u.tracks)if(d.kind?.toLowerCase()==="audio")for(let m of d.items)m.media_reference_id&&s.has(m.media_reference_id)&&(m.media_reference_id=s.get(m.media_reference_id));for(let u of[...n].map(d=>s.get(d)??d)){let d=(r.media_references??[]).find(p=>p.id===u),m=d?.local_path??d?.target_url?.replace(/^file:\/\//,"")??null;if(!d||!m||!u0.has(rt(m).toLowerCase())||!await Ht(m))continue;let f=await zW(m).catch(()=>null);f&&(d.streams=[...(d.streams??[]).filter(p=>p.kind!=="audio"),{kind:"audio",codec:`pcm_s${f.bits}le`,rate:f.rate,channels:f.channels,bit_depth:f.bits}],d.available_range={start:{value:0,rate:f.rate},duration:{value:f.frames,rate:f.rate}},f.umid&&(d.metadata={...d.metadata??{},bext_umid:f.umid}))}return{session:r,lines:a,skipped:o}}var PW=()=>$(Ke(),"logs","engine.jsonl"),yv=crypto.randomUUID(),p0=new Set;function LJ(e){if(!e||typeof e!="object")return{};let t={};for(let[r,i]of Object.entries(e))typeof i=="string"?t[r]=i.length>200?`${i.slice(0,200)}\u2026`:i:Array.isArray(i)?t[r]=i.length>20?`[${i.length} items]`:i:i&&typeof i=="object"?t[r]=JSON.stringify(i).length>400?"{\u2026}":i:t[r]=i;return t}async function VJ(e){let t=JSON.stringify({...e,run:yv});console.error(`[conform] ${e.verb} ${e.ok?"ok":`FAIL ${e.code??""}`} ${e.ms} ms${e.job?` job ${e.job}`:""}`);try{let r=PW(),i=$(Ke(),"logs");p0.has(i)||(await Ce(i),p0.add(i)),await Ee(r,t+`
|
|
24
|
+
`,{append:!0})}catch{}}var v0=["issue","gap","note"],kW=["low","medium","high","blocker"],TW=["missing_tool","missing_option","tool_failed","did_not_know","other"];var xv=String.raw`[^\s"'${"`"}<>|,;()[\]{}\\/]+(?: [^\s"'${"`"}<>|,;()[\]{}\\/:]+(?=$|[\s"'${"`"}<>|,;()[\]{}\\/]))*`,h0=String.raw`[^\s"'${"`"}<>|,;()[\]{}\\/]+`,x0=new RegExp(String.raw`(?<![A-Za-z0-9_.~:\\/-])(?:file://)?(?:~|[A-Za-z]:)?(?:[\\/]${xv}){2,}[\\/]?|\\\\${xv}(?:\\${xv})+`+String.raw`|(?<![A-Za-z0-9_.~:\\/-])${h0}(?:[\\/]${h0}){2,}`,"g");function w0(e){let t=e.replace(/[\\/]+$/,""),r=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return r>=0?t.slice(r+1):t}function z0(e){return e.replace(x0,t=>w0(t.replace(/^file:\/\//,"")))}function wv(e,t=300,r=0){if(typeof e=="string")return Ws(z0(e),t);if(typeof e=="number"||typeof e=="boolean"||e===null)return e;if(r>4)return null;if(Array.isArray(e))return e.slice(0,20).map(i=>wv(i,t,r+1));if(e&&typeof e=="object"){let i={};for(let[n,a]of Object.entries(e).slice(0,40))i[Ws(n,64)]=wv(a,t,r+1);return i}return null}var Ws=(e,t)=>e.length>t?`${e.slice(0,t)}\u2026`:e;function Tn(e,t){if(typeof e!="string")return null;let r=e.trim();return r?Ws(z0(r),t):null}var NW=/^[A-Za-z0-9_.:-]{1,64}$/;function ur(e){return typeof e=="string"&&NW.test(e)?e:null}var Nn=(e,t)=>typeof e=="string"&&t.includes(e)?e:null,OW=300,SW=["solved","partly","failed"],XW=new Set("AAF EDL XML DCP KDM IMF VFX QC OCF MOV MP4 MXF LUT CDL ACES HDR SDR VFR CFR ISO AVB DRT DRP FCP FCPXML OTIO RGB YUV ARRI RED BRAW DNX DNXHD DNXHR HEVC AVC PRORES EXR DPX TIFF TIF PNG JPG JPEG WAV AIFF OMF LTFS UHD NLE API CLI MCP PDF CSV JSON SRT SCC STL TTML PAL NTSC SMPTE LTC VITC CST IDT ODT RRT ALE ASC TC GPU CPU SSD NAS USB HDD MAM DIT VND RAW CC SFX ADR MNE ME LFE HFR DCI DCDM AUDIO NOTE TODO ALL ANY EVERY EACH ONLY NOT NEW OLD AND THE FOR WITH NEVER ALWAYS MUST".split(" ")),jW=/\b(?:https?|ftp|s3|gs|file):\/\/\S+/gi,WW=/\b[\w.+-]+@[\w-]+(?:\.[\w-]+)+\b/g,LW=/\b\d{1,2}[:;]\d{2}[:;]\d{2}[:;.]\d{2,3}\b/g,VW=/"[^"]{1,200}"|“[^”]{1,200}”|‘[^’]{1,200}’|(?<![A-Za-z])'[^']{1,200}'(?![A-Za-z])/g,qW=/(?<![{\w])[\w][\w.+-]+\.[A-Za-z][A-Za-z0-9]{1,4}\b/g,ZW=/(?<![{\w])(?=[\w-]*[A-Za-z])(?=[\w-]*\d)(?:[\w]+[_-][\w-]+|[A-Za-z]+\d+[A-Za-z]+\d+\w*)(?![\w}])/g,MW=/(?<![{\w])[A-Z][A-Z0-9&]{2,}(?:\s+[A-Z][A-Z0-9&]{2,})*(?![\w}])/g;function js(e,t=OW){if(typeof e!="string")return null;let r=e.replace(/\s+/g," ").trim();return r?(r=r.replace(jW,"{url}").replace(WW,"{email}").replace(x0,i=>{let n=w0(i),a=n.indexOf(" ");return`{path}${a>=0?n.slice(a):""}`}).replace(VW,"{text}").replace(LW,"{tc}").replace(qW,i=>i.toLowerCase()==="conform.tools"?i:"{file}").replace(ZW,i=>/^\d+-[a-z]+$/.test(i)?i:"{id}").replace(MW,i=>i.split(/\s+/).every(n=>XW.has(n))?i:"{title}").replace(/\{([^{}]*)\}/g,(i,n)=>/^[a-z_]{1,24}$/.test(n)?`{${n}}`:"{text}"),Ws(r,t)):null}function P0(e){if(typeof e!="string")return{asked:null,previous:null,previous_why:null};let t=/^\s*\[\s*(solved|partly|failed)\s*(?::\s*([^\]]*))?\]\s*/i.exec(e),r=t?e.slice(t[0].length):e;return{asked:js(r),previous:t?t[1].toLowerCase():null,previous_why:t?.[2]?js(t[2],200):null}}function HW(e){if(!e||typeof e!="object")return null;let t=e,r={};typeof t.ts=="string"&&(r.ts=Ws(t.ts,40));let i=ur(t.verb);i&&(r.verb=i),typeof t.ms=="number"&&Number.isFinite(t.ms)&&(r.ms=Math.round(t.ms)),typeof t.ok=="boolean"&&(r.ok=t.ok);for(let a of["code","job","session"]){let o=ur(t[a]);o&&(r[a]=o)}typeof t.run=="string"&&zv.test(t.run)&&(r.run=t.run);let n=Tn(t.msg,500);return n&&(r.msg=n),t.args&&typeof t.args=="object"&&(r.args=wv(t.args,160)),r.verb?r:null}var On={summary:300,task:500,used_instead:300,what_happened:4e3,expected:4e3};function k0(e){if(!e||typeof e!="object")return"body must be a JSON object";let t=e,r=Nn(t.kind??"issue",v0);if(!r)return`kind must be one of ${v0.join(", ")}`;let i=Tn(t.task,On.task),n=Tn(t.summary,On.summary)??(r==="gap"?i:null);if(!n)return r==="gap"?"task is required":"summary is required";let a=Array.isArray(t.log_lines)?t.log_lines.slice(-20).map(HW).filter(o=>!!o):[];return{kind:r,summary:n,what_happened:Tn(t.what_happened,On.what_happened),expected:Tn(t.expected,On.expected),severity:r==="issue"?Nn(t.severity,kW)??"medium":null,session_id:ur(t.session_id),verb:ur(t.verb),job_id:ur(t.job_id),task:r==="gap"?i:null,used_instead:r==="gap"?Tn(t.used_instead,On.used_instead):null,why_not_conformtools:r==="gap"?Nn(t.why_not_conformtools,TW)??(t.why_not_conformtools?"other":null):null,conformtools_verb_tried:ur(t.conformtools_verb_tried),version:ur(t.version),engine:Nn(t.engine,["local","hosted"]),platform:Tn(t.platform,80),runtime:Tn(t.runtime,80),account_env:Nn(t.account_env,["production","staging"]),log_lines:a}}var DW=["outcome","invalid_args","dropped"],RW=300,b0=/^[A-Za-z0-9 ._()-]{1,80}$/,g0=(e,t)=>typeof e=="number"&&Number.isInteger(e)&&e>0&&e<=t?e:null,FW=/^[a-z_]{1,32}$/,y0=/^[A-Za-z0-9_.]{1,64}$/,zv=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function IW(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t={};for(let[r,i]of Object.entries(e).slice(0,16))FW.test(r)&&typeof i=="number"&&Number.isFinite(i)&&i>=0&&(t[r]=Math.round(i));return Object.keys(t).length?t:null}function Pv(e){if(!e||typeof e!="object")return null;let t=e,r=Nn(t.kind,DW),i=ur(t.verb);if(!r||!i)return null;let n=Array.isArray(t.fields)?t.fields.filter(a=>typeof a=="string"&&y0.test(a)).slice(0,32):null;return{kind:r,verb:i,ok:r==="outcome"&&typeof t.ok=="boolean"?t.ok:null,code:ur(t.code),duration_ms:typeof t.duration_ms=="number"&&Number.isFinite(t.duration_ms)&&t.duration_ms>=0?Math.round(t.duration_ms):null,version:ur(t.version),engine:Nn(t.engine,["local","hosted"]),counts:r!=="invalid_args"?IW(t.counts):null,fields:n?.length?n:null,run_id:typeof t.run_id=="string"&&zv.test(t.run_id)?t.run_id:null,seq:typeof t.seq=="number"&&Number.isInteger(t.seq)&&t.seq>0&&t.seq<1e6?t.seq:null,run_at:typeof t.run_at=="string"&&!Number.isNaN(Date.parse(t.run_at))?new Date(t.run_at).toISOString():null,event_id:typeof t.event_id=="string"&&zv.test(t.event_id)?t.event_id:null,req:typeof t.req=="number"&&Number.isInteger(t.req)&&t.req>0&&t.req<1e6?t.req:null,asked:r==="outcome"?js(t.asked):null,previous:r==="outcome"?Nn(t.previous,SW):null,previous_why:r==="outcome"?js(t.previous_why,200):null,client:typeof t.client=="string"?ur(t.client.toLowerCase().replace(/[^a-z0-9_.:-]+/g,"-").slice(0,64)):null,hits:Array.isArray(t.hits)?t.hits.filter(a=>typeof a=="string"&&y0.test(a)).slice(0,8):null,error:r==="outcome"&&t.ok===!1?js(t.error,RW):null,platform:typeof t.platform=="string"&&b0.test(t.platform)?t.platform:null,runtime:typeof t.runtime=="string"&&b0.test(t.runtime)?t.runtime:null,memory_gb:g0(t.memory_gb,4096),cpus:g0(t.cpus,1024)}}var T0={facility:"",templates:{}},EW={TITLE:"[^_]+",NN:"\\d{2,3}",INITIALS:"[A-Z]{2,3}",COLORSPACE:"[A-Z0-9]+",GAMMA:"[A-Z0-9.]+",FORMAT:"\\d+x\\d+[pi]\\d+",YYYYMMDD:"\\d{8}",HHMM:"\\d{4}"},Tv=()=>$(Ke(),"profile.json");async function vi(e){let t=T0;for(let r of[Tv(),$(Ke(),"naming.json")])try{t={...T0,...JSON.parse(await Gt(r))};break}catch{}return e?Nv(t,e):t}async function RJ(e){return vi(e??(await s1())?.name)}function Nv(e,t){let r=e.projects?.[t]??e.projects?.[t.toUpperCase()];return r?{...e,...r,templates:{...e.templates,...r.templates},values:{...e.values,...r.values},patterns:{...e.patterns,...r.patterns},codec_folders:{...e.codec_folders,...r.codec_folders},deliverables:r.deliverables??e.deliverables,conventions:{...e.conventions,...r.conventions}}:e}function FJ(e,t,r){let i=/p(\d+)$/.exec(t.FORMAT??"")?.[1];if(!t.FORMAT||!i)throw new Je("invalid_args","deliverables needs FORMAT at the program's OAR, e.g. 3840x2160p23976");let n=[];for(let a of e.deliverables??[]){if(a.optional&&!r.include_optional)continue;let o=a.raster==="OAR"?t.FORMAT.replace(/p\d+$/,""):a.raster;for(let s of a.texts.length?a.texts:[""]){if(CW.test(s)&&!r.textless)continue;let c=mu(e,"deliverable",{...S0(),...t,TEXT:s,CODEC:a.CODEC,AUDIOCONFIG:a.AUDIOCONFIG,FORMAT:`${o}p${i}`,HHMM:t.HHMM??""})+`.${a.ext}`;n.push({label:a.label,text:s,name:c,codec:a.CODEC,audio:a.AUDIOCONFIG,raster:o,container:a.raster!=="OAR"&&o!==t.FORMAT.replace(/p\d+$/,"")})}}return n}var CW=/LESS|CLEAN|NOTEXT|NO-TEXT/i;async function Ov(e,t={}){if(!e||typeof e.templates!="object")throw new Je("invalid_args","a profile needs templates: {kind: template}");for(let[r,i]of Object.entries(e.templates))if(!/\[[A-Z0-9]+\??\]/.test(i))throw new Je("invalid_args",`template ${r} has no [TOKEN] elements: ${i}`);return await Ce(Ke()),await Ee(Tv(),JSON.stringify(t.stamp===!1?e:{...e,updated_at:new Date().toISOString()},null,2)),Tv()}function pi(e,t){let r=e.templates[t];if(!r&&!Object.keys(e.templates).length)throw new Je("invalid_args",`no artist profile yet, so no '${t}' naming: learn it from their delivered files (artist_profile action=learn path=<a delivery folder>) or ask the artist how they name a ${t}`);if(!r)throw new Je("invalid_args",`no '${t}' template in the ${e.facility||"artist"} profile (has: ${Object.keys(e.templates).join(", ")}): ask the artist, then artist_profile action=set`);return r}var O0=e=>e.split(/(\[[A-Z0-9]+\??\])/).filter(Boolean).map(t=>t.startsWith("[")?{tok:t.slice(1,-1).replace("?",""),opt:t.endsWith("?]")}:{lit:t}),kv=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function mu(e,t,r){let i=O0(pi(e,t)),n="";return i.forEach((a,o)=>{if("lit"in a){n+=a.lit;return}let s=r[a.tok];if(s==null||s===""){if(!a.opt)throw new Je("invalid_args",`${t} name needs ${a.tok} (template ${pi(e,t)})`);let c=i[o-1];c&&"lit"in c&&n.endsWith(c.lit.slice(-1))&&(n=n.slice(0,-1));return}n+=s}),n}function Pa(e,t,r){let i=O0(pi(e,t)),n=[],a="";i.forEach((c,l)=>{if("lit"in c){let m=i[l+1];a+=kv(m&&"tok"in m&&m.opt?c.lit.slice(0,-1):c.lit);return}let u=e.values?.[c.tok],d=e.patterns?.[c.tok]??(u?u.map(kv).join("|"):EW[c.tok]??".+?");n.push(c.tok),a+=c.opt?`(?:${kv(i[l-1]?.lit?.slice(-1)??"")}(${d}))?`:`(${d})`});let o=new RegExp(`^${a}(?:\\.([A-Za-z0-9]{2,5}))?$`).exec(Q(r));if(!o)return null;let s={};return n.forEach((c,l)=>{o[l+1]!=null&&(s[c]=o[l+1])}),{values:s,ext:o[n.length+1]??""}}var Ls=e=>String(e).padStart(2,"0"),S0=(e=new Date)=>({YYYYMMDD:`${e.getFullYear()}${Ls(e.getMonth()+1)}${Ls(e.getDate())}`,HHMM:`${Ls(e.getHours())}${Ls(e.getMinutes())}`});function JW(e){let t=Number(/^(\d+)x/.exec(e.FORMAT??"")?.[1]??0);return{JOBCODEC:/^PR/i.test(e.CODEC??"")?"pr":(e.CODEC??"").split("_")[0].toLowerCase(),JOBTEXT:e.TEXT==="TEXTLESS"?"txtls":"txtd",JOBRASTER:t>=3840?"uhd":t>=1920?"hd":"sd"}}function IJ(e,t,r){let i=e.conventions?.no_audio_tag;if(r.picture_only!==!1&&/\[AUDIOCONFIG/.test(pi(e,"patch"))&&!i)throw new Je("invalid_args","how does this artist mark a picture-only file in AUDIOCONFIG (NOAUDIO, MOS\u2026)? ask, then artist_profile action=remember conventions={no_audio_tag: '\u2026'}");let n=Pa(e,"deliverable",t);if(!n)throw new Je("invalid_args",`'${Q(t)}' does not follow the ${e.facility} deliverable template ${pi(e,"deliverable")}; name the patch from a real deliverable`);let a={...n.values,...S0(r.when),NN:Ls(r.nn),...r.text?{TEXT:r.text}:{},...r.picture_only!==!1&&i?{AUDIOCONFIG:i}:{},...Object.fromEntries((e.deprecated??[]).map(m=>[m,""]))},o=mu(e,"patch",a)+(n.ext?`.${n.ext}`:""),s=[],c=e.templates.render_job?mu(e,"render_job",{...a,...JW(a)}):"";c||s.push(`no 'render_job' template in the ${e.facility||"artist"} profile: name the render job yourself, or ask the artist and artist_profile action=set`);let l=Object.entries(e.codec_folders??{}).find(([m])=>(a.CODEC??"").toUpperCase().startsWith(m))?.[1]??"",u=e.templates.patches_folder?"patches_folder":e.templates.deliverables_folder?"deliverables_folder":"",d=u?mu(e,u,{...a,CODECFOLDER:l}):"";return{file:o,job:c,folder:d,master_values:n.values,warnings:s}}var N0={ap4h:"PR4444",ap4x:"PR4444XQ",apch:"PRHQ",apcn:"PR422",apcs:"PRLT",apco:"PRPROXY"},GW={bt709:"REC709",bt2020:"REC2020",smpte432:"P3D65",smpte431:"P3DCI"},KW={smpte2084:"PQ","arib-std-b67":"HLG"},AW=e=>String(Math.round(e*1e3)/1e3).replace(".","");function Sv(e){let t=e.streams?.find(a=>a.kind==="video"),r=t?.codec_specific??{},i=e.source_fps??t?.rate??0,n=e.streams?.filter(a=>a.kind==="audio")??[];return{CODEC:r.fourcc&&N0[r.fourcc]?N0[r.fourcc]:/h264|avc/i.test(t?.codec??"")?"H264":null,FORMAT:t?.width&&t.height&&i?`${t.width}x${t.height}p${AW(i)}`:null,COLORSPACE:r.colr?GW[r.colr.primaries]??null:null,GAMMA:r.colr?KW[r.colr.transfer]??null:null,AUDIOCH:n.length?String(n.reduce((a,o)=>a+(o.channels??0),0)):"0"}}function X0(e,t,r={}){let i=r.kind??(/[_-]PATCH\d/i.test(t)&&e.templates.patch?"patch":"deliverable"),n=Pa(e,i,t),a=[];if(!n){let s=/\]_\[/.test(pi(e,i))&&/[A-Z0-9]-[A-Z]/.test(t.replace(/\d-\d/g,""))?" ('-' used as a separator: this profile separates every element with '_')":"";return a.push({element:"template",level:"error",message:`does not follow the ${e.facility} ${i} template ${pi(e,i)}${s}`}),{kind:i,values:null,issues:a}}let o=n.values;for(let s of e.deprecated??[])o[s]&&a.push({element:s,level:"warn",message:`${s} ${o[s]}: in older names, left out of new ones (unless asked)`});if(r.probe){let s=Sv(r.probe);for(let u of["CODEC","FORMAT","COLORSPACE","GAMMA"]){if(o[u]==null)continue;if(s[u]==null){u==="GAMMA"&&/^(PQ|HLG)$/.test(o[u])&&a.push({element:u,level:"error",message:`name says ${o[u]}, the file's transfer tag is not ${o[u]}`});continue}(u==="CODEC"?o[u]===s[u]||s[u]==="H264"&&o[u].startsWith("H264"):o[u]===s[u])||a.push({element:u,level:"error",message:`name says ${o[u]}, the file is ${s[u]}`})}let c=/^H26[45]_(\d+)mbps$/i.exec(o.CODEC??"")?.[1],l=r.probe.available_range?r.probe.available_range.duration.value/(r.probe.available_range.duration.rate||1):0;if(c&&r.probe.size_bytes&&l>1){let u=r.probe.size_bytes*8/l/1e6;(u<Number(c)*.6||u>Number(c)*1.3)&&a.push({element:"CODEC",level:"error",message:`name says ${c} Mbps, the file averages ${u.toFixed(1)} Mbps`})}if(o.AUDIOCONFIG){let u=/^(\d+)CH/.exec(o.AUDIOCONFIG)?.[1],d=e.conventions?.no_audio_tag??"NOAUDIO";o.AUDIOCONFIG===d&&s.AUDIOCH!=="0"&&a.push({element:"AUDIOCONFIG",level:"error",message:`name says ${d}, the file has ${s.AUDIOCH} audio channels`}),u&&u!==s.AUDIOCH&&a.push({element:"AUDIOCONFIG",level:"error",message:`name says ${u}CH, the file has ${s.AUDIOCH} audio channels`})}}if(r.master){let s=Pa(e,"deliverable",r.master)?.values;if(!s)a.push({element:"master",level:"error",message:`master '${Q(r.master)}' does not follow the deliverable template`});else for(let[c,l]of Object.entries(s))/^(YYYYMMDD|HHMM|TEXT)$/.test(c)||c==="AUDIOCONFIG"&&o[c]===(e.conventions?.no_audio_tag??"NOAUDIO")||o[c]!==l&&a.push({element:c,level:"error",message:`${o[c]??"(missing)"} \u2260 the master's ${l}`})}return{kind:i,values:o,issues:a}}var UW=/\.(mov|mp4|mxf|m4v|wav|aif|aiff)$/i,YW=/^(REC709|REC2020|REC2100|P3D65|P3DCI|P3D60|DCIP3|ACES|ACESCG|SRGB|XYZ)$/i,BW=/^(G\d(\.\d)?|G\d\d|PQ|HLG|ST2084|LOGC\d?|SLOG3|LINEAR|SRGB)$/i,QW=/^(TEXTED|TEXTLESS|TXTD|TXTLS|TXTLESS|CLEAN|TEXT|NOTEXT|NO-TEXT|SUBBED|SUBTITLED)$/i,_W=/^(\d+CH|NOAUDIO|MOS|STEREO|5-1|51|LTRT|LORO)$/i,$W=e=>/^(19|20)\d\d(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])$/.test(e);function eL(e){let t=r=>e.split(r).length-1;return["_","-"," ","."].reduce((r,i)=>t(i)>t(r)?i:r,"_")}function tL(e,t,r={}){let i=e.split(t),n=[],a=(s,c)=>$W(s)?"YYYYMMDD":/^([01]\d|2[0-3])[0-5]\d$/.test(s)&&c?.tok==="YYYYMMDD"?"HHMM":/^PATCH\d{1,3}$/i.test(s)?"PATCH":/^v\d{1,3}$/i.test(s)?"VERSION":r.FORMAT&&s===r.FORMAT||/^\d{3,5}x\d{3,5}[pi]\d{2,5}$/.test(s)?"FORMAT":r.CODEC&&(s===r.CODEC||r.CODEC==="H264"&&/^(H\.?264|AVC)/i.test(s))||/^(PR(4444(XQ)?|HQ|422|LT|PROXY)|H\.?26[45]|HEVC|DNX\w+|XAVC\w*|J2K|JPEG2000)$/i.test(s)?"CODEC":YW.test(s)||r.COLORSPACE&&s===r.COLORSPACE?"COLORSPACE":BW.test(s)||r.GAMMA&&s===r.GAMMA?"GAMMA":QW.test(s)?"TEXT":_W.test(s)?"AUDIOCONFIG":null;for(let s=0;s<i.length;s++){let c=i[s],l=a(c,n[n.length-1]);if(l==="CODEC"&&/^\d+mbps$/i.test(i[s+1]??"")){n.push({tok:l,raw:c+t+i[++s]});continue}if(l==="AUDIOCONFIG"){let u=c;for(;s+1<i.length&&!["YYYYMMDD","FORMAT","CODEC","COLORSPACE","GAMMA","TEXT","VERSION","PATCH"].includes(a(i[s+1])??"")&&!/^\d+$/.test(i[s+1]);)u+=t+i[++s];n.push({tok:l,raw:u});continue}n.push({tok:l??"?",raw:c})}let o=0;for(;o<n.length&&n[o].tok==="?";)o++;return o&&n.splice(0,o,{tok:"TITLE",raw:n.slice(0,o).map(s=>s.raw).join(t)}),n}function rL(e,t){let r=[],i=0;for(let n of e){for(;i<t.length&&t[i]!==n.tok;)i++;if(i===t.length)return null;r.push(i++)}return r}function nL(e,t){let r=Array.from({length:e.length+1},()=>new Array(t.length+1).fill(0));for(let o=e.length-1;o>=0;o--)for(let s=t.length-1;s>=0;s--)r[o][s]=e[o]===t[s]?r[o+1][s+1]+1:Math.max(r[o+1][s],r[o][s+1]);let i=[],n=0,a=0;for(;n<e.length&&a<t.length;)e[n]===t[a]?(i.push(e[n]),n++,a++):r[n+1][a]>=r[n][a+1]?i.push(e[n++]):i.push(t[a++]);return[r[0][0],[...i,...e.slice(n),...t.slice(a)]]}function iL(e,t){if(!e.length)throw new Je("invalid_args","no names to learn from");let r=new Map;for(let d of e)r.set(d.toks.map(m=>m.tok).join(" "),(r.get(d.toks.map(m=>m.tok).join(" "))??0)+1);let i=[];for(let[d]of[...r].sort((m,f)=>f[1]-m[1])){let m=d.split(" ");if(!i.length){i=m;continue}let[f,p]=nL(i,m);f*2>=m.length&&(i=p)}let n=i.map(()=>[]),a=[];for(let d of e){let m=rL(d.toks,i);if(!m){a.push(d.file);continue}m.forEach((f,p)=>n[f].push(d.toks[p].raw))}let o=e.length-a.length,s={},c={},l=0;return{template:i.map((d,m)=>{let f=[...new Set(n[m])],p=n[m].length<o?"?":"";if(d==="?"){if(f.length===1&&!p)return f[0];let v=`FIELD${++l}`;return c[v]=f,`[${v}${p}]`}return d==="PATCH"?"PATCH[NN]":(d==="TEXT"&&(c.TEXT=f),d==="TITLE"&&(t!=="_"||f.some(v=>v.includes(t)))&&(s.TITLE=".+?"),`[${d}${p}]`)}).join(t),patterns:s,values:c,fitted:o,misfits:a}}async function*j0(e,t=3){for await(let r of dt(e)){if(r.name.startsWith("."))continue;let i=$(e,r.name);r.isDirectory&&t>0?yield*j0(i,t-1):r.isFile&&UW.test(r.name)&&(yield i)}}async function UJ(e,t={}){let r=e.replace(/\/+$/,""),i=[];if(await Ei(r))for await(let S of j0(r))i.push(S);else i.push(r);if(!i.length)throw new Je("not_found",`no media files under ${Q(r)}`);i.length>200&&(i.length=200);let n=await Promise.all(i.map(async S=>{let w=await Un(S).catch(()=>null);return{file:S,m:w,e:w?Sv(w):{}}})),a=S=>Q(S,rt(S)),o=eL(a(i[0])),s=n.map(S=>({...S,toks:tL(a(S.file),o,S.e)})),c=S=>S.toks.some(w=>w.tok==="PATCH"),l={templates:{},patterns:{},values:{}},u=[];for(let[S,w]of[["deliverable",s.filter(j=>!c(j))],["patch",s.filter(c)]]){if(!w.length)continue;let j=iL(w.map(M=>({file:Q(M.file),toks:M.toks})),o);l.templates[S]=j.template,Object.assign(l.patterns,j.patterns);for(let[M,G]of Object.entries(j.values))l.values[M]=[...new Set([...l.values[M]??[],...G])];u.push(...j.misfits)}let d={facility:"",...l},m=s.filter(S=>!c(S)).map(S=>({x:S,v:Pa(d,"deliverable",S.file)?.values})).filter(S=>S.v),f=S=>(S.m?.size_bytes??0)/Math.max(1,S.m?.available_range?S.m.available_range.duration.value/(S.m.available_range.duration.rate||1):1),p=S=>/^(\d+x\d+)/.exec(S.FORMAT??"")?.[1]??"",v=[...m].sort((S,w)=>f(w.x)-f(S.x))[0],h=v?p(v.v):"",b=new Map;for(let{x:S,v:w}of m){let j=p(w),M=rt(S.file).slice(1).toLowerCase(),G=[w.CODEC,w.AUDIOCONFIG,M,j===h?"OAR":j].join("|"),Z=b.get(G)??{label:`${w.CODEC??M} ${j===h?"at the OAR":j}`,CODEC:w.CODEC??"",AUDIOCONFIG:w.AUDIOCONFIG??"",ext:M,raster:j===h||!j?"OAR":j,texts:[]};w.TEXT&&!Z.texts.includes(w.TEXT)&&Z.texts.push(w.TEXT),b.set(G,Z)}for(let S of b.values())S.texts.sort();if(b.size&&(l.deliverables=[...b.values()]),await Ei(r)){let S=/(19|20)\d{6}/,w={},j=S.test(Q(r))?r:null;for(let{x:M,v:G}of m){let Z=n1(r,Be(M.file)).split(/[\\/]/).filter(Boolean),J=Z.findIndex(te=>S.test(te));J>=0&&!j&&(j=$(r,...Z.slice(0,J+1)));let K=Z[Z.length-1],_=G.CODEC?.split(o)[0]??"",R=_.replace(/\d+$/,"");K&&!S.test(K)&&_&&(w[R.length>=2?R:_]=K)}if(Object.keys(w).length&&(l.codec_folders=w),j){let M=Q(j).replace(S,"[YYYYMMDD]").replace(/(\[YYYYMMDD\]\D?)([01]\d|2[0-3])[0-5]\d/,"$1[HHMM]");l.templates.deliverables_folder=`${Q(Be(j))}/${M}${Object.keys(w).length?"/[CODECFOLDER]":""}`}}let g=new Set(s.filter(S=>c(S)&&S.m&&!S.m.streams?.some(w=>w.kind==="audio")).map(S=>Pa({facility:"",...l},"patch",S.file)?.values.AUDIOCONFIG).filter(Boolean));g.size===1&&(l.conventions={no_audio_tag:[...g][0]});let y=t.today??new Date().toISOString().slice(0,10),x=`learned from ${i.length} file(s) in ${Q(r)} (${y})`;l.provenance=Object.fromEntries([...Object.keys(l.templates).map(S=>[`templates.${S}`,x]),...l.deliverables?[["deliverables",x]]:[],...l.codec_folders?[["codec_folders",x]]:[]]);let z=await vi(),N=aL(z,l,t.project,t.facility),P=t.project?Nv(N,t.project):N,O=n.flatMap(S=>{let j=X0(P,Q(S.file),{probe:S.m??void 0}).issues.filter(M=>M.level==="error").map(M=>`${M.element}: ${M.message}`);return j.length?[{file:Q(S.file),issues:j}]:[]}),X={profile:N,learned:l,files:i.length,misfits:u,name_issues:O,source:x};return t.save!==!1&&(X.saved=await q0(N)),X}function aL(e,t,r,i){let n=o=>({...o,templates:{...o.templates,...t.templates},patterns:{...o.patterns,...t.patterns},values:{...o.values,...t.values},codec_folders:{...o.codec_folders,...t.codec_folders},deliverables:t.deliverables??o.deliverables,...t.conventions?{conventions:{...o.conventions,...t.conventions}}:{}}),a={...e.provenance,...Object.fromEntries(Object.entries(t.provenance??{}).map(([o,s])=>[r?`projects.${r}.${o}`:o,s]))};return r?{...e,facility:i??e.facility,provenance:a,projects:{...e.projects,[r]:n(e.projects?.[r]??{})}}:{...n(e),facility:i??e.facility,provenance:a}}function YJ(e,t){let r=t.at??new Date().toISOString().slice(0,10);return{...e,rules:[...(e.rules??[]).filter(i=>i.rule!==t.rule),{...t,at:r}]}}function BJ(e,t){let r=e.rules??[],i=typeof t=="number"?t-1:r.findIndex(n=>n.rule.toLowerCase().includes(t.toLowerCase()));if(i<0||i>=r.length)throw new Je("not_found",`no rule matching ${t}`);return{...e,rules:r.filter((n,a)=>a!==i)}}function QJ(e,t,r){let i=new Date().toISOString().slice(0,10);return{...e,conventions:{...e.conventions,...t},provenance:{...e.provenance,...Object.fromEntries(Object.keys(t).map(n=>[`conventions.${n}`,`${r} (${i})`]))}}}var jv=e=>!Object.keys(e.templates).length&&!e.rules?.length&&!Object.keys(e.conventions??{}).length&&!e.tools?.length;function _J(e){if(jv(e))return"No artist profile yet. Learn it: artist_profile action=learn path=<a folder of their delivered files>; ask what the files cannot show (usual deliverable set, program start TC, how they route audio).";let t=i=>e.provenance?.[i]??e.provenance?.["*"],r=[`Artist profile${e.facility?`: ${e.facility}`:""}`];for(let[i,n]of Object.entries(e.templates))r.push(` ${i}: ${n}${t(`templates.${i}`)?` [${t(`templates.${i}`)}]`:""}`);if(e.deliverables?.length){r.push(` usual deliverables${t("deliverables")?` [${t("deliverables")}]`:""}:`);for(let i of e.deliverables)r.push(` ${i.label}: ${i.CODEC} ${i.AUDIOCONFIG} .${i.ext} ${i.raster}${i.texts.length?` (${i.texts.join(", ")})`:""}${i.optional?" \u2014 on request":""}`)}for(let[i,n]of Object.entries(e.conventions??{}))r.push(` ${i}: ${n}${t(`conventions.${i}`)?` [${t(`conventions.${i}`)}]`:""}`);return(e.rules??[]).forEach((i,n)=>r.push(` rule ${n+1}${i.topic?` (${i.topic})`:""}: ${i.rule} [${i.source}, ${i.at}]`)),e.projects&&r.push(` projects: ${Object.keys(e.projects).join(", ")}`),r.join(`
|
|
25
|
+
`)}async function W0(){await cL();let e=await vi().catch(()=>null);return!e||jv(e)?"Artist profile: none yet. Conventions that are the artist's choice (naming, usual deliverables, start TC, bins, routing) are not assumed: learn them (artist_profile action=learn) or ask, and save the answer (artist_profile action=remember).":`Artist profile: ${e.facility||"this artist"} (${Object.keys(e.templates).length} naming templates, ${e.deliverables?.length??0} deliverable kinds, ${e.rules?.length??0} workflow rules). Read it (artist_profile) before naming, rendering or delivering, and follow it. When the artist corrects you, ask whether it is their preference (artist_profile action=remember) or a rule for everyone (report_issue).`}var oL=()=>`${xr().supabaseUrl}/functions/v1/v1-me/v1/engine/artist-profile`;async function Xv(e,t){let r=await Kn().catch(()=>null);if(!r)return null;let i=await fetch(oL(),{method:e,signal:AbortSignal.timeout(5e3),headers:{authorization:`Bearer ${r}`,apikey:xr().anonKey,...t?{"content-type":"application/json"}:{}},...t?{body:JSON.stringify(t)}:{}});return i.ok?await i.json():null}var pu=()=>$(Ke(),"tools"),L0=()=>$(Ke(),"tool-layout.json");async function V0(e){let t=[];try{for await(let i of dt(pu()))if(i.name.endsWith(".json"))try{t.push(JSON.parse(await Gt($(pu(),i.name))))}catch{}}catch{}let r;try{r=JSON.parse(await Gt(L0()))}catch{}return{...e,tools:t,...r?{tool_layout:r}:{}}}async function sL(e){let{tools:t,tool_layout:r,...i}=e;if(await Ov(i,{stamp:!1}),!!Array.isArray(t)){await Ce(pu());for(let n of t)typeof n?.id!="string"||!/^[a-z][a-z0-9_-]{0,63}$/.test(n.id)||await Ee($(pu(),`${n.id}.json`),JSON.stringify(n,null,2));r&&await Ee(L0(),JSON.stringify(r,null,2))}}async function q0(e){let t=await Ov(e);return await Xv("PATCH",{profile:await V0(await vi())}).catch(()=>null),t}var $J=async()=>{await q0(await vi())};function lL(e,t){let r=e.updated_at??"",i=t?.updated_at??"";return t&&i>r?"pull":!jv(e)&&r>i?"push":"same"}async function cL(){try{let e=await Xv("GET");if(!e)return"offline";let t=await V0(await vi()),r=e.profile??null,i=lL(t,r);return i==="pull"&&await sL(r),i==="push"&&await Xv("PATCH",{profile:t}),i==="pull"?"pulled":i==="push"?"pushed":"same"}catch{return"offline"}}var Z0={mode:"before_keyword",separator:"_",token_count:1,regex:"",fallback:""},Wv={...Z0,mode:"none"},ka=(e,t={})=>({rules:e,project:{...Z0},unmatched_action:"leave",unmatched_destination:"",operation:"move",conflict:"skip",case_sensitive:!1,folder_case:"none",...t}),gt=(e,t,r,i,n)=>({id:e,name:t,enabled:!0,match_mode:r,patterns:i,destination:n}),M0=[{id:"mixes-splits",name:"Audio - Mixes & Splits",about:"Per project: full mixes in MIXES, dialogue / effects / music / VO stems in SPLITS.",recipe:ka([gt("mixes","MIXES","token",["BRDCST","WEB","Master","Mix","THEATRICAL"],"{PROJECT}/MIXES"),gt("splits","SPLITS","token",["DX","FX","MX","VO_M"],"{PROJECT}/SPLITS")])},{id:"stems-by-type",name:"Audio - One Folder per Stem",about:"Per project: a folder for each stem type, named after the keyword that matched.",recipe:ka([gt("mixes","MIXES","token",["BRDCST","WEB","Master","Mix","THEATRICAL"],"{PROJECT}/MIXES"),gt("stems","STEMS","token",["DX","FX","MX","VO_M","BG","FOLEY","SFX","PFX"],"{PROJECT}/STEMS/{KEYWORD}")])},{id:"picture-deliverables",name:"Picture - Deliverables by Version",about:"Per project: texted, textless and subtitled masters apart, everything else left alone.",recipe:ka([gt("textless","TEXTLESS","token",["TEXTLESS","TXTLS","CLEAN"],"{PROJECT}/TEXTLESS"),gt("subtitled","SUBTITLED","token",["SUBTITLED","SUBS","SUBBED"],"{PROJECT}/SUBTITLED"),gt("texted","TEXTED","token",["TEXTED","TXTD","MASTER"],"{PROJECT}/TEXTED")])},{id:"by-file-type",name:"By File Type",about:"Video, audio, image sequences and stills, documents - each in its own folder.",recipe:ka([gt("video","VIDEO","extension",["mov","mp4","mxf","m4v","avi","mkv","webm","r3d","braw"],"VIDEO"),gt("audio","AUDIO","extension",["wav","aif","aiff","mp3","m4a","flac","bwf","caf"],"AUDIO"),gt("images","IMAGES","extension",["exr","dpx","tif","tiff","png","jpg","jpeg","tga","dng","psd"],"IMAGES/{EXT}"),gt("timelines","TIMELINES","extension",["edl","xml","fcpxml","aaf","drt","drp","otio","ale","avb","prproj"],"TIMELINES"),gt("docs","DOCUMENTS","extension",["pdf","txt","csv","doc","docx","xls","xlsx","rtf","md"],"DOCUMENTS"),gt("looks","LOOKS","extension",["cube","3dl","cdl","ccc","cc","dctl","drx","look"],"LOOKS")],{project:Wv})},{id:"by-date",name:"By Date Modified",about:"Every file into a dated folder: 2026/2026-09-17.",recipe:ka([gt("dated","DATED","any",[],"{YYYY}/{YYYY}-{MM}-{DD}")],{project:Wv})},{id:"vfx-by-shot",name:"VFX - By Shot and Version",about:"SH010_comp_v003.exr goes to SH010/v003. Edit the regex to match your shot names.",recipe:ka([gt("shots","SHOTS","regex",["^([A-Za-z]+[_-]?\\d{2,4}(?:[_-]\\d{2,4})?)_.*?_?v(\\d{2,4})"],"{1}/v{2}")],{project:Wv})}];var D0=Symbol("Let zodToJsonSchema decide on which parser to use");var H0={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},R0=e=>typeof e=="string"?{...H0,name:e}:{...H0,...e};var F0=e=>{let t=R0(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([i,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,i],jsonSchema:void 0}]))}};function Lv(e,t,r,i){i?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function we(e,t,r,i,n){e[t]=r,Lv(e,t,i,n)}var vu=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};var ye;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let a={};for(let o of n)a[o]=o;return a},e.getValidEnumValues=n=>{let a=e.objectKeys(n).filter(s=>typeof n[n[s]]!="number"),o={};for(let s of a)o[s]=n[s];return e.objectValues(o)},e.objectValues=n=>e.objectKeys(n).map(function(a){return n[a]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&a.push(o);return a},e.find=(n,a)=>{for(let o of n)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function i(n,a=" | "){return n.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=i,e.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(ye||(ye={}));var I0;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(I0||(I0={}));var B=ye.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$r=e=>{switch(typeof e){case"undefined":return B.undefined;case"string":return B.string;case"number":return Number.isNaN(e)?B.nan:B.number;case"boolean":return B.boolean;case"function":return B.function;case"bigint":return B.bigint;case"symbol":return B.symbol;case"object":return Array.isArray(e)?B.array:e===null?B.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?B.promise:typeof Map<"u"&&e instanceof Map?B.map:typeof Set<"u"&&e instanceof Set?B.set:typeof Date<"u"&&e instanceof Date?B.date:B.object;default:return B.unknown}};var F=ye.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"]);var It=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(a){return a.message},i={_errors:[]},n=a=>{for(let o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(n);else if(o.code==="invalid_return_type")n(o.returnTypeError);else if(o.code==="invalid_arguments")n(o.argumentsError);else if(o.path.length===0)i._errors.push(r(o));else{let s=i,c=0;for(;c<o.path.length;){let l=o.path[c],u=c===o.path.length-1;if(l==="_errors"){u&&s._errors.push(r(o)),c++;continue}Object.prototype.hasOwnProperty.call(s,l)||(l==="__proto__"?Object.defineProperty(s,l,{value:{_errors:[]},writable:!0,enumerable:!0,configurable:!0}):s[l]={_errors:[]}),s=s[l],u&&s._errors.push(r(o)),c++}}};return n(this),i}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ye.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r=Object.create(null),i=[];for(let n of this.issues)if(n.path.length>0){let a=n.path[0];r[a]=r[a]||[],r[a].push(t(n))}else i.push(t(n));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};It.create=e=>new It(e);var uL=(e,t)=>{let r;switch(e.code){case F.invalid_type:e.received===B.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case F.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ye.jsonStringifyReplacer)}`;break;case F.unrecognized_keys:r=`Unrecognized key(s) in object: ${ye.joinValues(e.keys,", ")}`;break;case F.invalid_union:r="Invalid input";break;case F.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ye.joinValues(e.options)}`;break;case F.invalid_enum_value:r=`Invalid enum value. Expected ${ye.joinValues(e.options)}, received '${e.received}'`;break;case F.invalid_arguments:r="Invalid function arguments";break;case F.invalid_return_type:r="Invalid function return type";break;case F.invalid_date:r="Invalid date";break;case F.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ye.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case F.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case F.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case F.custom:r="Invalid input";break;case F.invalid_intersection_types:r="Intersection results could not be merged";break;case F.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case F.not_finite:r="Number must be finite";break;default:r=t.defaultError,ye.assertNever(e)}return{message:r}},Sn=uL;var dL=Sn;function Vs(){return dL}var hu=e=>{let{data:t,path:r,errorMaps:i,issueData:n}=e,a=[...r,...n.path||[]],o={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let s="",c=i.filter(l=>!!l).slice().reverse();for(let l of c)s=l(o,{data:t,defaultError:s}).message;return{...n,path:a,message:s}};function A(e,t){let r=Vs(),i=hu({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Sn?void 0:Sn].filter(n=>!!n)});e.common.issues.push(i)}var pt=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let i=[];for(let n of r){if(n.status==="aborted")return se;n.status==="dirty"&&t.dirty(),i.push(n.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,r){let i=[];for(let n of r){let a=await n.key,o=await n.value;i.push({key:a,value:o})}return e.mergeObjectSync(t,i)}static mergeObjectSync(t,r){let i={};for(let n of r){let{key:a,value:o}=n;if(a.status==="aborted"||o.status==="aborted")return se;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||n.alwaysSet)&&(i[a.value]=o.value)}return{status:t.value,value:i}}},se=Object.freeze({status:"aborted"}),Ta=e=>({status:"dirty",value:e}),yt=e=>({status:"valid",value:e}),Vv=e=>e.status==="aborted",qv=e=>e.status==="dirty",hi=e=>e.status==="valid",qs=e=>typeof Promise<"u"&&e instanceof Promise;var ee;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ee||(ee={}));var Qt=class{constructor(t,r,i,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=i,this._key=n}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}},E0=(e,t)=>{if(hi(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new It(e.common.issues);return this._error=r,this._error}}};function fe(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:i,description:n}=e;if(t&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(o,s)=>{let{message:c}=e;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??i??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:c??r??s.defaultError}},description:n}}var be=class{get description(){return this._def.description}_getType(t){return $r(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:$r(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new pt,ctx:{common:t.parent.common,data:t.data,parsedType:$r(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(qs(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let i=this.safeParse(t,r);if(i.success)return i.data;throw i.error}safeParse(t,r){let i={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:$r(t)},n=this._parseSync({data:t,path:i.path,parent:i});return E0(i,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:$r(t)};if(!this["~standard"].async)try{let i=this._parseSync({data:t,path:[],parent:r});return hi(i)?{value:i.value}:{issues:r.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(i=>hi(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(t,r){let i=await this.safeParseAsync(t,r);if(i.success)return i.data;throw i.error}async safeParseAsync(t,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:$r(t)},n=this._parse({data:t,path:i.path,parent:i}),a=await(qs(n)?n:Promise.resolve(n));return E0(i,a)}refine(t,r){let i=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,a)=>{let o=t(n),s=()=>a.addIssue({code:F.custom,...i(n)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,r){return this._refinement((i,n)=>t(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(t){return new fr({schema:this,typeName:E.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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:r=>this["~validate"](r)}}optional(){return dr.create(this,this._def)}nullable(){return rn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return jn.create(this)}promise(){return bi.create(this,this._def)}or(t){return ja.create([this,t],this._def)}and(t){return Wa.create(this,t,this._def)}transform(t){return new fr({...fe(this._def),schema:this,typeName:E.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Ma({...fe(this._def),innerType:this,defaultValue:r,typeName:E.ZodDefault})}brand(){return new bu({typeName:E.ZodBranded,type:this,...fe(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Ha({...fe(this._def),innerType:this,catchValue:r,typeName:E.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return gu.create(this,t)}readonly(){return Da.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},fL=/^c[^\s-]{8,}$/i,mL=/^[0-9a-z]+$/,pL=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vL=/^[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,hL=/^[a-z0-9_-]{21}$/i,bL=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gL=/^[-+]?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)?)??$/,yL=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xL="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$",Zv,wL=/^(?:(?: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])$/,zL=/^(?:(?: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])$/,PL=/^(([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]))$/,kL=/^(([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])$/,TL=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,NL=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,C0="((\\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])))",OL=new RegExp(`^${C0}$`);function J0(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function SL(e){return new RegExp(`^${J0(e)}$`)}function XL(e){let t=`${C0}T${J0(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function jL(e,t){return!!((t==="v4"||!t)&&wL.test(e)||(t==="v6"||!t)&&PL.test(e))}function WL(e,t){if(!bL.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let i=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(i));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return!1}}function LL(e,t){return!!((t==="v4"||!t)&&zL.test(e)||(t==="v6"||!t)&&kL.test(e))}var Oa=class e extends be{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==B.string){let a=this._getOrReturnCtx(t);return A(a,{code:F.invalid_type,expected:B.string,received:a.parsedType}),se}let i=new pt,n;for(let a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:F.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="max")t.data.length>a.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:F.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="length"){let o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(n=this._getOrReturnCtx(t,n),o?A(n,{code:F.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&A(n,{code:F.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),i.dirty())}else if(a.kind==="email")yL.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"email",code:F.invalid_string,message:a.message}),i.dirty());else if(a.kind==="emoji")Zv||(Zv=new RegExp(xL,"u")),Zv.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"emoji",code:F.invalid_string,message:a.message}),i.dirty());else if(a.kind==="uuid")vL.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"uuid",code:F.invalid_string,message:a.message}),i.dirty());else if(a.kind==="nanoid")hL.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"nanoid",code:F.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid")fL.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cuid",code:F.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid2")mL.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cuid2",code:F.invalid_string,message:a.message}),i.dirty());else if(a.kind==="ulid")pL.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"ulid",code:F.invalid_string,message:a.message}),i.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),A(n,{validation:"url",code:F.invalid_string,message:a.message}),i.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"regex",code:F.invalid_string,message:a.message}),i.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(t,n),A(n,{code:F.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),i.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(n=this._getOrReturnCtx(t,n),A(n,{code:F.invalid_string,validation:{startsWith:a.value},message:a.message}),i.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(n=this._getOrReturnCtx(t,n),A(n,{code:F.invalid_string,validation:{endsWith:a.value},message:a.message}),i.dirty()):a.kind==="datetime"?XL(a).test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:F.invalid_string,validation:"datetime",message:a.message}),i.dirty()):a.kind==="date"?OL.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:F.invalid_string,validation:"date",message:a.message}),i.dirty()):a.kind==="time"?SL(a).test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:F.invalid_string,validation:"time",message:a.message}),i.dirty()):a.kind==="duration"?gL.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"duration",code:F.invalid_string,message:a.message}),i.dirty()):a.kind==="ip"?jL(t.data,a.version)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"ip",code:F.invalid_string,message:a.message}),i.dirty()):a.kind==="jwt"?WL(t.data,a.alg)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"jwt",code:F.invalid_string,message:a.message}),i.dirty()):a.kind==="cidr"?LL(t.data,a.version)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cidr",code:F.invalid_string,message:a.message}),i.dirty()):a.kind==="base64"?TL.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"base64",code:F.invalid_string,message:a.message}),i.dirty()):a.kind==="base64url"?NL.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"base64url",code:F.invalid_string,message:a.message}),i.dirty()):ye.assertNever(a);return{status:i.value,value:t.data}}_regex(t,r,i){return this.refinement(n=>t.test(n),{validation:r,code:F.invalid_string,...ee.errToObj(i)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ee.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ee.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ee.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ee.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ee.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ee.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ee.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ee.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ee.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ee.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ee.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ee.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ee.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...ee.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...ee.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ee.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...ee.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...ee.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...ee.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...ee.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...ee.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...ee.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...ee.errToObj(r)})}nonempty(t){return this.min(1,ee.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Oa.create=e=>new Oa({checks:[],typeName:E.ZodString,coerce:e?.coerce??!1,...fe(e)});function VL(e,t){let r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i,a=Number.parseInt(e.toFixed(n).replace(".","")),o=Number.parseInt(t.toFixed(n).replace(".",""));return a%o/10**n}var Zs=class e extends be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==B.number){let a=this._getOrReturnCtx(t);return A(a,{code:F.invalid_type,expected:B.number,received:a.parsedType}),se}let i,n=new pt;for(let a of this._def.checks)a.kind==="int"?ye.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),A(i,{code:F.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(i=this._getOrReturnCtx(t,i),A(i,{code:F.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(i=this._getOrReturnCtx(t,i),A(i,{code:F.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?VL(t.data,a.value)!==0&&(i=this._getOrReturnCtx(t,i),A(i,{code:F.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),A(i,{code:F.not_finite,message:a.message}),n.dirty()):ye.assertNever(a);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ee.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ee.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ee.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ee.toString(r))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:ee.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ee.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ee.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ee.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ee.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ee.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ee.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:ee.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ee.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ee.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ye.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Zs.create=e=>new Zs({checks:[],typeName:E.ZodNumber,coerce:e?.coerce||!1,...fe(e)});var Ms=class e extends be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==B.bigint)return this._getInvalidInput(t);let i,n=new pt;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(i=this._getOrReturnCtx(t,i),A(i,{code:F.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(i=this._getOrReturnCtx(t,i),A(i,{code:F.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),A(i,{code:F.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):ye.assertNever(a);return{status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return A(r,{code:F.invalid_type,expected:B.bigint,received:r.parsedType}),se}gte(t,r){return this.setLimit("min",t,!0,ee.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ee.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ee.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ee.toString(r))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:ee.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ee.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ee.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ee.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ee.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ee.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Ms.create=e=>new Ms({checks:[],typeName:E.ZodBigInt,coerce:e?.coerce??!1,...fe(e)});var Hs=class extends be{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==B.boolean){let i=this._getOrReturnCtx(t);return A(i,{code:F.invalid_type,expected:B.boolean,received:i.parsedType}),se}return yt(t.data)}};Hs.create=e=>new Hs({typeName:E.ZodBoolean,coerce:e?.coerce||!1,...fe(e)});var Ds=class e extends be{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==B.date){let a=this._getOrReturnCtx(t);return A(a,{code:F.invalid_type,expected:B.date,received:a.parsedType}),se}if(Number.isNaN(t.data.getTime())){let a=this._getOrReturnCtx(t);return A(a,{code:F.invalid_date}),se}let i=new pt,n;for(let a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:F.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),i.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:F.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),i.dirty()):ye.assertNever(a);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:ee.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:ee.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Ds.create=e=>new Ds({checks:[],coerce:e?.coerce||!1,typeName:E.ZodDate,...fe(e)});var Rs=class extends be{_parse(t){if(this._getType(t)!==B.symbol){let i=this._getOrReturnCtx(t);return A(i,{code:F.invalid_type,expected:B.symbol,received:i.parsedType}),se}return yt(t.data)}};Rs.create=e=>new Rs({typeName:E.ZodSymbol,...fe(e)});var Sa=class extends be{_parse(t){if(this._getType(t)!==B.undefined){let i=this._getOrReturnCtx(t);return A(i,{code:F.invalid_type,expected:B.undefined,received:i.parsedType}),se}return yt(t.data)}};Sa.create=e=>new Sa({typeName:E.ZodUndefined,...fe(e)});var Xa=class extends be{_parse(t){if(this._getType(t)!==B.null){let i=this._getOrReturnCtx(t);return A(i,{code:F.invalid_type,expected:B.null,received:i.parsedType}),se}return yt(t.data)}};Xa.create=e=>new Xa({typeName:E.ZodNull,...fe(e)});var Fs=class extends be{constructor(){super(...arguments),this._any=!0}_parse(t){return yt(t.data)}};Fs.create=e=>new Fs({typeName:E.ZodAny,...fe(e)});var Xn=class extends be{constructor(){super(...arguments),this._unknown=!0}_parse(t){return yt(t.data)}};Xn.create=e=>new Xn({typeName:E.ZodUnknown,...fe(e)});var Xr=class extends be{_parse(t){let r=this._getOrReturnCtx(t);return A(r,{code:F.invalid_type,expected:B.never,received:r.parsedType}),se}};Xr.create=e=>new Xr({typeName:E.ZodNever,...fe(e)});var Is=class extends be{_parse(t){if(this._getType(t)!==B.undefined){let i=this._getOrReturnCtx(t);return A(i,{code:F.invalid_type,expected:B.void,received:i.parsedType}),se}return yt(t.data)}};Is.create=e=>new Is({typeName:E.ZodVoid,...fe(e)});var jn=class e extends be{_parse(t){let{ctx:r,status:i}=this._processInputParams(t),n=this._def;if(r.parsedType!==B.array)return A(r,{code:F.invalid_type,expected:B.array,received:r.parsedType}),se;if(n.exactLength!==null){let o=r.data.length>n.exactLength.value,s=r.data.length<n.exactLength.value;(o||s)&&(A(r,{code:o?F.too_big:F.too_small,minimum:s?n.exactLength.value:void 0,maximum:o?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(A(r,{code:F.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(A(r,{code:F.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((o,s)=>n.type._parseAsync(new Qt(r,o,r.path,s)))).then(o=>pt.mergeArray(i,o));let a=[...r.data].map((o,s)=>n.type._parseSync(new Qt(r,o,r.path,s)));return pt.mergeArray(i,a)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:ee.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:ee.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:ee.toString(r)}})}nonempty(t){return this.min(1,t)}};jn.create=(e,t)=>new jn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:E.ZodArray,...fe(t)});function Na(e){if(e instanceof Et){let t={};for(let r in e.shape){let i=e.shape[r];t[r]=dr.create(Na(i))}return new Et({...e._def,shape:()=>t})}else return e instanceof jn?new jn({...e._def,type:Na(e.element)}):e instanceof dr?dr.create(Na(e.unwrap())):e instanceof rn?rn.create(Na(e.unwrap())):e instanceof tn?tn.create(e.items.map(t=>Na(t))):e}var Et=class e extends be{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=ye.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==B.object){let l=this._getOrReturnCtx(t);return A(l,{code:F.invalid_type,expected:B.object,received:l.parsedType}),se}let{status:i,ctx:n}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Xr&&this._def.unknownKeys==="strip"))for(let l in n.data)o.includes(l)||s.push(l);let c=[];for(let l of o){let u=a[l],d=n.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Qt(n,d,n.path,l)),alwaysSet:l in n.data})}if(this._def.catchall instanceof Xr){let l=this._def.unknownKeys;if(l==="passthrough")for(let u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(l==="strict")s.length>0&&(A(n,{code:F.unrecognized_keys,keys:s}),i.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let u of s){let d=n.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Qt(n,d,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let l=[];for(let u of c){let d=await u.key,m=await u.value;l.push({key:d,value:m,alwaysSet:u.alwaysSet})}return l}).then(l=>pt.mergeObjectSync(i,l)):pt.mergeObjectSync(i,c)}get shape(){return this._def.shape()}strict(t){return ee.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,i)=>{let n=this._def.errorMap?.(r,i).message??i.defaultError;return r.code==="unrecognized_keys"?{message:ee.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:E.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let i of ye.objectKeys(t))t[i]&&this.shape[i]&&(r[i]=this.shape[i]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let i of ye.objectKeys(this.shape))t[i]||(r[i]=this.shape[i]);return new e({...this._def,shape:()=>r})}deepPartial(){return Na(this)}partial(t){let r={};for(let i of ye.objectKeys(this.shape)){let n=this.shape[i];t&&!t[i]?r[i]=n:r[i]=n.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let i of ye.objectKeys(this.shape))if(t&&!t[i])r[i]=this.shape[i];else{let a=this.shape[i];for(;a instanceof dr;)a=a._def.innerType;r[i]=a}return new e({...this._def,shape:()=>r})}keyof(){return G0(ye.objectKeys(this.shape))}};Et.create=(e,t)=>new Et({shape:()=>e,unknownKeys:"strip",catchall:Xr.create(),typeName:E.ZodObject,...fe(t)});Et.strictCreate=(e,t)=>new Et({shape:()=>e,unknownKeys:"strict",catchall:Xr.create(),typeName:E.ZodObject,...fe(t)});Et.lazycreate=(e,t)=>new Et({shape:e,unknownKeys:"strip",catchall:Xr.create(),typeName:E.ZodObject,...fe(t)});var ja=class extends be{_parse(t){let{ctx:r}=this._processInputParams(t),i=this._def.options;function n(a){for(let s of a)if(s.result.status==="valid")return s.result;for(let s of a)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(s=>new It(s.ctx.common.issues));return A(r,{code:F.invalid_union,unionErrors:o}),se}if(r.common.async)return Promise.all(i.map(async a=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(n);{let a,o=[];for(let c of i){let l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(c=>new It(c));return A(r,{code:F.invalid_union,unionErrors:s}),se}}get options(){return this._def.options}};ja.create=(e,t)=>new ja({options:e,typeName:E.ZodUnion,...fe(t)});var en=e=>e instanceof La?en(e.schema):e instanceof fr?en(e.innerType()):e instanceof Va?[e.value]:e instanceof qa?e.options:e instanceof Za?ye.objectValues(e.enum):e instanceof Ma?en(e._def.innerType):e instanceof Sa?[void 0]:e instanceof Xa?[null]:e instanceof dr?[void 0,...en(e.unwrap())]:e instanceof rn?[null,...en(e.unwrap())]:e instanceof bu||e instanceof Da?en(e.unwrap()):e instanceof Ha?en(e._def.innerType):[],Mv=class e extends be{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==B.object)return A(r,{code:F.invalid_type,expected:B.object,received:r.parsedType}),se;let i=this.discriminator,n=r.data[i],a=this.optionsMap.get(n);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(A(r,{code:F.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),se)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,i){let n=new Map;for(let a of r){let o=en(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of o){if(n.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);n.set(s,a)}}return new e({typeName:E.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...fe(i)})}};function Hv(e,t){let r=$r(e),i=$r(t);if(e===t)return{valid:!0,data:e};if(r===B.object&&i===B.object){let n=ye.objectKeys(t),a=ye.objectKeys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let s of a){if(s==="__proto__")continue;let c=Hv(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(r===B.array&&i===B.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let a=0;a<e.length;a++){let o=e[a],s=t[a],c=Hv(o,s);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return r===B.date&&i===B.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Wa=class extends be{_parse(t){let{status:r,ctx:i}=this._processInputParams(t),n=(a,o)=>{if(Vv(a)||Vv(o))return se;let s=Hv(a.value,o.value);return s.valid?((qv(a)||qv(o))&&r.dirty(),{status:r.value,value:s.data}):(A(i,{code:F.invalid_intersection_types}),se)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([a,o])=>n(a,o)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};Wa.create=(e,t,r)=>new Wa({left:e,right:t,typeName:E.ZodIntersection,...fe(r)});var tn=class e extends be{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==B.array)return A(i,{code:F.invalid_type,expected:B.array,received:i.parsedType}),se;if(i.data.length<this._def.items.length)return A(i,{code:F.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),se;!this._def.rest&&i.data.length>this._def.items.length&&(A(i,{code:F.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...i.data].map((o,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new Qt(i,o,i.path,s)):null}).filter(o=>!!o);return i.common.async?Promise.all(a).then(o=>pt.mergeArray(r,o)):pt.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};tn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new tn({items:e,typeName:E.ZodTuple,rest:null,...fe(t)})};var Dv=class e extends be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==B.object)return A(i,{code:F.invalid_type,expected:B.object,received:i.parsedType}),se;let n=[],a=this._def.keyType,o=this._def.valueType;for(let s in i.data)n.push({key:a._parse(new Qt(i,s,i.path,s)),value:o._parse(new Qt(i,i.data[s],i.path,s)),alwaysSet:s in i.data});return i.common.async?pt.mergeObjectAsync(r,n):pt.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,i){return r instanceof be?new e({keyType:t,valueType:r,typeName:E.ZodRecord,...fe(i)}):new e({keyType:Oa.create(),valueType:t,typeName:E.ZodRecord,...fe(r)})}},Es=class extends be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==B.map)return A(i,{code:F.invalid_type,expected:B.map,received:i.parsedType}),se;let n=this._def.keyType,a=this._def.valueType,o=[...i.data.entries()].map(([s,c],l)=>({key:n._parse(new Qt(i,s,i.path,[l,"key"])),value:a._parse(new Qt(i,c,i.path,[l,"value"]))}));if(i.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of o){let l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return se;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let c of o){let l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return se;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}};Es.create=(e,t,r)=>new Es({valueType:t,keyType:e,typeName:E.ZodMap,...fe(r)});var Cs=class e extends be{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==B.set)return A(i,{code:F.invalid_type,expected:B.set,received:i.parsedType}),se;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(A(i,{code:F.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(A(i,{code:F.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let a=this._def.valueType;function o(c){let l=new Set;for(let u of c){if(u.status==="aborted")return se;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}let s=[...i.data.values()].map((c,l)=>a._parse(new Qt(i,c,i.path,l)));return i.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,r){return new e({...this._def,minSize:{value:t,message:ee.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:ee.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Cs.create=(e,t)=>new Cs({valueType:e,minSize:null,maxSize:null,typeName:E.ZodSet,...fe(t)});var Rv=class e extends be{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==B.function)return A(r,{code:F.invalid_type,expected:B.function,received:r.parsedType}),se;function i(s,c){return hu({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Vs(),Sn].filter(l=>!!l),issueData:{code:F.invalid_arguments,argumentsError:c}})}function n(s,c){return hu({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Vs(),Sn].filter(l=>!!l),issueData:{code:F.invalid_return_type,returnTypeError:c}})}let a={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof bi){let s=this;return yt(async function(...c){let l=new It([]),u=await s._def.args.parseAsync(c,a).catch(f=>{throw l.addIssue(i(c,f)),l}),d=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(d,a).catch(f=>{throw l.addIssue(n(d,f)),l})})}else{let s=this;return yt(function(...c){let l=s._def.args.safeParse(c,a);if(!l.success)throw new It([i(c,l.error)]);let u=Reflect.apply(o,this,l.data),d=s._def.returns.safeParse(u,a);if(!d.success)throw new It([n(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:tn.create(t).rest(Xn.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,i){return new e({args:t||tn.create([]).rest(Xn.create()),returns:r||Xn.create(),typeName:E.ZodFunction,...fe(i)})}},La=class extends be{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};La.create=(e,t)=>new La({getter:e,typeName:E.ZodLazy,...fe(t)});var Va=class extends be{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return A(r,{received:r.data,code:F.invalid_literal,expected:this._def.value}),se}return{status:"valid",value:t.data}}get value(){return this._def.value}};Va.create=(e,t)=>new Va({value:e,typeName:E.ZodLiteral,...fe(t)});function G0(e,t){return new qa({values:e,typeName:E.ZodEnum,...fe(t)})}var qa=class e extends be{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),i=this._def.values;return A(r,{expected:ye.joinValues(i),received:r.parsedType,code:F.invalid_type}),se}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),i=this._def.values;return A(r,{received:r.data,code:F.invalid_enum_value,options:i}),se}return yt(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(i=>!t.includes(i)),{...this._def,...r})}};qa.create=G0;var Za=class extends be{_parse(t){let r=ye.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==B.string&&i.parsedType!==B.number){let n=ye.objectValues(r);return A(i,{expected:ye.joinValues(n),received:i.parsedType,code:F.invalid_type}),se}if(this._cache||(this._cache=new Set(ye.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=ye.objectValues(r);return A(i,{received:i.data,code:F.invalid_enum_value,options:n}),se}return yt(t.data)}get enum(){return this._def.values}};Za.create=(e,t)=>new Za({values:e,typeName:E.ZodNativeEnum,...fe(t)});var bi=class extends be{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==B.promise&&r.common.async===!1)return A(r,{code:F.invalid_type,expected:B.promise,received:r.parsedType}),se;let i=r.parsedType===B.promise?r.data:Promise.resolve(r.data);return yt(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};bi.create=(e,t)=>new bi({type:e,typeName:E.ZodPromise,...fe(t)});var fr=class extends be{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===E.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:i}=this._processInputParams(t),n=this._def.effect||null,a={addIssue:o=>{A(i,o),o.fatal?r.abort():r.dirty()},get path(){return i.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let o=n.transform(i.data,a);if(i.common.async)return Promise.resolve(o).then(async s=>{if(r.value==="aborted")return se;let c=await this._def.schema._parseAsync({data:s,path:i.path,parent:i});return c.status==="aborted"?se:c.status==="dirty"?Ta(c.value):r.value==="dirty"?Ta(c.value):c});{if(r.value==="aborted")return se;let s=this._def.schema._parseSync({data:o,path:i.path,parent:i});return s.status==="aborted"?se:s.status==="dirty"?Ta(s.value):r.value==="dirty"?Ta(s.value):s}}if(n.type==="refinement"){let o=s=>{let c=n.refinement(s,a);if(i.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(i.common.async===!1){let s=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?se:(s.status==="dirty"&&r.dirty(),o(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(s=>s.status==="aborted"?se:(s.status==="dirty"&&r.dirty(),o(s.value).then(()=>({status:r.value,value:s.value}))))}if(n.type==="transform")if(i.common.async===!1){let o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!hi(o))return se;let s=n.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>hi(o)?Promise.resolve(n.transform(o.value,a)).then(s=>({status:r.value,value:s})):se);ye.assertNever(n)}};fr.create=(e,t,r)=>new fr({schema:e,typeName:E.ZodEffects,effect:t,...fe(r)});fr.createWithPreprocess=(e,t,r)=>new fr({schema:t,effect:{type:"preprocess",transform:e},typeName:E.ZodEffects,...fe(r)});var dr=class extends be{_parse(t){return this._getType(t)===B.undefined?yt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};dr.create=(e,t)=>new dr({innerType:e,typeName:E.ZodOptional,...fe(t)});var rn=class extends be{_parse(t){return this._getType(t)===B.null?yt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};rn.create=(e,t)=>new rn({innerType:e,typeName:E.ZodNullable,...fe(t)});var Ma=class extends be{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return r.parsedType===B.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ma.create=(e,t)=>new Ma({innerType:e,typeName:E.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...fe(t)});var Ha=class extends be{_parse(t){let{ctx:r}=this._processInputParams(t),i={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return qs(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new It(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new It(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};Ha.create=(e,t)=>new Ha({innerType:e,typeName:E.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...fe(t)});var Js=class extends be{_parse(t){if(this._getType(t)!==B.nan){let i=this._getOrReturnCtx(t);return A(i,{code:F.invalid_type,expected:B.nan,received:i.parsedType}),se}return{status:"valid",value:t.data}}};Js.create=e=>new Js({typeName:E.ZodNaN,...fe(e)});var kG=Symbol("zod_brand"),bu=class extends be{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},gu=class e extends be{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?se:a.status==="dirty"?(r.dirty(),Ta(a.value)):this._def.out._parseAsync({data:a.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?se:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(t,r){return new e({in:t,out:r,typeName:E.ZodPipeline})}},Da=class extends be{_parse(t){let r=this._def.innerType._parse(t),i=n=>(hi(n)&&(n.value=Object.freeze(n.value)),n);return qs(r)?r.then(n=>i(n)):i(r)}unwrap(){return this._def.innerType}};Da.create=(e,t)=>new Da({innerType:e,typeName:E.ZodReadonly,...fe(t)});var TG={object:Et.lazycreate},E;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(E||(E={}));var NG=Oa.create,OG=Zs.create,SG=Js.create,XG=Ms.create,jG=Hs.create,WG=Ds.create,LG=Rs.create,VG=Sa.create,qG=Xa.create,ZG=Fs.create,MG=Xn.create,HG=Xr.create,DG=Is.create,RG=jn.create,FG=Et.create,IG=Et.strictCreate,EG=ja.create,CG=Mv.create,JG=Wa.create,GG=tn.create,KG=Dv.create,AG=Es.create,UG=Cs.create,YG=Rv.create,BG=La.create,QG=Va.create,_G=qa.create,$G=Za.create,eK=bi.create,tK=fr.create,rK=dr.create,nK=rn.create,iK=fr.createWithPreprocess,aK=gu.create;function De(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?vu(t,e.currentPath):t.join("/")}}function K0(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==E.ZodAny&&(r.items=le(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&we(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&we(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(we(r,"minItems",e.exactLength.value,e.exactLength.message,t),we(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}function A0(e,t){let r={type:"integer",format:"int64"};if(!e.checks)return r;for(let i of e.checks)switch(i.kind){case"min":t.target==="jsonSchema7"?i.inclusive?we(r,"minimum",i.value,i.message,t):we(r,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(r.exclusiveMinimum=!0),we(r,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?we(r,"maximum",i.value,i.message,t):we(r,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(r.exclusiveMaximum=!0),we(r,"maximum",i.value,i.message,t));break;case"multipleOf":we(r,"multipleOf",i.value,i.message,t);break}return r}function U0(){return{type:"boolean"}}function yu(e,t){return le(e.type._def,t)}var Y0=(e,t)=>le(e.innerType._def,t);function Fv(e,t,r){let i=r??t.dateStrategy;if(Array.isArray(i))return{anyOf:i.map((n,a)=>Fv(e,t,n))};switch(i){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return qL(e,t)}}var qL=(e,t)=>{let r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(let i of e.checks)switch(i.kind){case"min":we(r,"minimum",i.value,i.message,t);break;case"max":we(r,"maximum",i.value,i.message,t);break}return r};function B0(e,t){return{...le(e.innerType._def,t),default:e.defaultValue()}}function Q0(e,t){return t.effectStrategy==="input"?le(e.schema._def,t):De(t)}function _0(e){return{type:"string",enum:Array.from(e.values)}}var ZL=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function $0(e,t){let r=[le(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),le(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(a=>!!a),i=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,n=[];return r.forEach(a=>{if(ZL(a))n.push(...a.allOf),a.unevaluatedProperties===void 0&&(i=void 0);else{let o=a;if("additionalProperties"in a&&a.additionalProperties===!1){let{additionalProperties:s,...c}=a;o=c}else i=void 0;n.push(o)}}),n.length?{allOf:n,...i}:void 0}function ek(e,t){let r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}var Iv,mr={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Iv===void 0&&(Iv=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Iv),uuid:/^[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}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([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])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function xu(e,t){let r={type:"string"};if(e.checks)for(let i of e.checks)switch(i.kind){case"min":we(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,i.value):i.value,i.message,t);break;case"max":we(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,i.value):i.value,i.message,t);break;case"email":switch(t.emailStrategy){case"format:email":pr(r,"email",i.message,t);break;case"format:idn-email":pr(r,"idn-email",i.message,t);break;case"pattern:zod":xt(r,mr.email,i.message,t);break}break;case"url":pr(r,"uri",i.message,t);break;case"uuid":pr(r,"uuid",i.message,t);break;case"regex":xt(r,i.regex,i.message,t);break;case"cuid":xt(r,mr.cuid,i.message,t);break;case"cuid2":xt(r,mr.cuid2,i.message,t);break;case"startsWith":xt(r,RegExp(`^${Ev(i.value,t)}`),i.message,t);break;case"endsWith":xt(r,RegExp(`${Ev(i.value,t)}$`),i.message,t);break;case"datetime":pr(r,"date-time",i.message,t);break;case"date":pr(r,"date",i.message,t);break;case"time":pr(r,"time",i.message,t);break;case"duration":pr(r,"duration",i.message,t);break;case"length":we(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,i.value):i.value,i.message,t),we(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,i.value):i.value,i.message,t);break;case"includes":{xt(r,RegExp(Ev(i.value,t)),i.message,t);break}case"ip":{i.version!=="v6"&&pr(r,"ipv4",i.message,t),i.version!=="v4"&&pr(r,"ipv6",i.message,t);break}case"base64url":xt(r,mr.base64url,i.message,t);break;case"jwt":xt(r,mr.jwt,i.message,t);break;case"cidr":{i.version!=="v6"&&xt(r,mr.ipv4Cidr,i.message,t),i.version!=="v4"&&xt(r,mr.ipv6Cidr,i.message,t);break}case"emoji":xt(r,mr.emoji(),i.message,t);break;case"ulid":{xt(r,mr.ulid,i.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{pr(r,"binary",i.message,t);break}case"contentEncoding:base64":{we(r,"contentEncoding","base64",i.message,t);break}case"pattern:zod":{xt(r,mr.base64,i.message,t);break}}break}case"nanoid":xt(r,mr.nanoid,i.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Ev(e,t){return t.patternStrategy==="escape"?HL(e):e}var ML=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function HL(e){let t="";for(let r=0;r<e.length;r++)ML.has(e[r])||(t+="\\"),t+=e[r];return t}function pr(e,t,r,i){e.format||e.anyOf?.some(n=>n.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&i.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&i.errorMessages&&{errorMessage:{format:r}}})):we(e,"format",t,r,i)}function xt(e,t,r,i){e.pattern||e.allOf?.some(n=>n.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&i.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:tk(t,i),...r&&i.errorMessages&&{errorMessage:{pattern:r}}})):we(e,"pattern",tk(t,i),r,i)}function tk(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},i=r.i?e.source.toLowerCase():e.source,n="",a=!1,o=!1,s=!1;for(let c=0;c<i.length;c++){if(a){n+=i[c],a=!1;continue}if(r.i){if(o){if(i[c].match(/[a-z]/)){s?(n+=i[c],n+=`${i[c-2]}-${i[c]}`.toUpperCase(),s=!1):i[c+1]==="-"&&i[c+2]?.match(/[a-z]/)?(n+=i[c],s=!0):n+=`${i[c]}${i[c].toUpperCase()}`;continue}}else if(i[c].match(/[a-z]/)){n+=`[${i[c]}${i[c].toUpperCase()}]`;continue}}if(r.m){if(i[c]==="^"){n+=`(^|(?<=[\r
|
|
26
|
+
]))`;continue}else if(i[c]==="$"){n+=`($|(?=[\r
|
|
27
|
+
]))`;continue}}if(r.s&&i[c]==="."){n+=o?`${i[c]}\r
|
|
28
|
+
`:`[${i[c]}\r
|
|
29
|
+
]`;continue}n+=i[c],i[c]==="\\"?a=!0:o&&i[c]==="]"?o=!1:!o&&i[c]==="["&&(o=!0)}try{new RegExp(n)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return n}function wu(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===E.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((i,n)=>({...i,[n]:le(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??De(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:le(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===E.ZodString&&e.keyType._def.checks?.length){let{type:i,...n}=xu(e.keyType._def,t);return{...r,propertyNames:n}}else{if(e.keyType?._def.typeName===E.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===E.ZodBranded&&e.keyType._def.type._def.typeName===E.ZodString&&e.keyType._def.type._def.checks?.length){let{type:i,...n}=yu(e.keyType._def,t);return{...r,propertyNames:n}}}return r}function rk(e,t){if(t.mapStrategy==="record")return wu(e,t);let r=le(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||De(t),i=le(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||De(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,i],minItems:2,maxItems:2}}}function nk(e){let t=e.values,i=Object.keys(e.values).filter(a=>typeof t[t[a]]!="number").map(a=>t[a]),n=Array.from(new Set(i.map(a=>typeof a)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:i}}function ik(e){return e.target==="openAi"?void 0:{not:De({...e,currentPath:[...e.currentPath,"not"]})}}function ak(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Gs={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function sk(e,t){if(t.target==="openApi3")return ok(e,t);let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(i=>i._def.typeName in Gs&&(!i._def.checks||!i._def.checks.length))){let i=r.reduce((n,a)=>{let o=Gs[a._def.typeName];return o&&!n.includes(o)?[...n,o]:n},[]);return{type:i.length>1?i:i[0]}}else if(r.every(i=>i._def.typeName==="ZodLiteral"&&!i.description)){let i=r.reduce((n,a)=>{let o=typeof a._def.value;switch(o){case"string":case"number":case"boolean":return[...n,o];case"bigint":return[...n,"integer"];case"object":if(a._def.value===null)return[...n,"null"];case"symbol":case"undefined":case"function":default:return n}},[]);if(i.length===r.length){let n=i.filter((a,o,s)=>s.indexOf(a)===o);return{type:n.length>1?n:n[0],enum:r.reduce((a,o)=>a.includes(o._def.value)?a:[...a,o._def.value],[])}}}else if(r.every(i=>i._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((i,n)=>[...i,...n._def.values.filter(a=>!i.includes(a))],[])};return ok(e,t)}var ok=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((i,n)=>le(i._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(i=>!!i&&(!t.strictUnions||typeof i=="object"&&Object.keys(i).length>0));return r.length?{anyOf:r}:void 0};function lk(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:Gs[e.innerType._def.typeName],nullable:!0}:{type:[Gs[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let i=le(e.innerType._def,{...t,currentPath:[...t.currentPath]});return i&&"$ref"in i?{allOf:[i],nullable:!0}:i&&{...i,nullable:!0}}let r=le(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function ck(e,t){let r={type:"number"};if(!e.checks)return r;for(let i of e.checks)switch(i.kind){case"int":r.type="integer",Lv(r,"type",i.message,t);break;case"min":t.target==="jsonSchema7"?i.inclusive?we(r,"minimum",i.value,i.message,t):we(r,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(r.exclusiveMinimum=!0),we(r,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?we(r,"maximum",i.value,i.message,t):we(r,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(r.exclusiveMaximum=!0),we(r,"maximum",i.value,i.message,t));break;case"multipleOf":we(r,"multipleOf",i.value,i.message,t);break}return r}function uk(e,t){let r=t.target==="openAi",i={type:"object",properties:{}},n=[],a=e.shape();for(let s in a){let c=a[s];if(c===void 0||c._def===void 0)continue;let l=RL(c);l&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),l=!1);let u=le(c._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});u!==void 0&&(i.properties[s]=u,l||n.push(s))}n.length&&(i.required=n);let o=DL(e,t);return o!==void 0&&(i.additionalProperties=o),i}function DL(e,t){if(e.catchall._def.typeName!=="ZodNever")return le(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function RL(e){try{return e.isOptional()}catch{return!0}}var dk=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return le(e.innerType._def,t);let r=le(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:De(t)},r]}:De(t)};var fk=(e,t)=>{if(t.pipeStrategy==="input")return le(e.in._def,t);if(t.pipeStrategy==="output")return le(e.out._def,t);let r=le(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),i=le(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,i].filter(n=>n!==void 0)}};function mk(e,t){return le(e.type._def,t)}function pk(e,t){let i={type:"array",uniqueItems:!0,items:le(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&we(i,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&we(i,"maxItems",e.maxSize.value,e.maxSize.message,t),i}function vk(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,i)=>le(r._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((r,i)=>i===void 0?r:[...r,i],[]),additionalItems:le(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,i)=>le(r._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((r,i)=>i===void 0?r:[...r,i],[])}}function hk(e){return{not:De(e)}}function bk(e){return De(e)}var gk=(e,t)=>le(e.innerType._def,t);var yk=(e,t,r)=>{switch(t){case E.ZodString:return xu(e,r);case E.ZodNumber:return ck(e,r);case E.ZodObject:return uk(e,r);case E.ZodBigInt:return A0(e,r);case E.ZodBoolean:return U0();case E.ZodDate:return Fv(e,r);case E.ZodUndefined:return hk(r);case E.ZodNull:return ak(r);case E.ZodArray:return K0(e,r);case E.ZodUnion:case E.ZodDiscriminatedUnion:return sk(e,r);case E.ZodIntersection:return $0(e,r);case E.ZodTuple:return vk(e,r);case E.ZodRecord:return wu(e,r);case E.ZodLiteral:return ek(e,r);case E.ZodEnum:return _0(e);case E.ZodNativeEnum:return nk(e);case E.ZodNullable:return lk(e,r);case E.ZodOptional:return dk(e,r);case E.ZodMap:return rk(e,r);case E.ZodSet:return pk(e,r);case E.ZodLazy:return()=>e.getter()._def;case E.ZodPromise:return mk(e,r);case E.ZodNaN:case E.ZodNever:return ik(r);case E.ZodEffects:return Q0(e,r);case E.ZodAny:return De(r);case E.ZodUnknown:return bk(r);case E.ZodDefault:return B0(e,r);case E.ZodBranded:return yu(e,r);case E.ZodReadonly:return gk(e,r);case E.ZodCatch:return Y0(e,r);case E.ZodPipeline:return fk(e,r);case E.ZodFunction:case E.ZodVoid:case E.ZodSymbol:return;default:return(i=>{})(t)}};function le(e,t,r=!1){let i=t.seen.get(e);if(t.override){let s=t.override?.(e,t,i,r);if(s!==D0)return s}if(i&&!r){let s=FL(i,t);if(s!==void 0)return s}let n={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,n);let a=yk(e,e.typeName,t),o=typeof a=="function"?le(a(),t):a;if(o&&IL(e,t,o),t.postProcess){let s=t.postProcess(o,e,t);return n.jsonSchema=o,s}return n.jsonSchema=o,o}var FL=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:vu(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,i)=>t.currentPath[i]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),De(t)):t.$refStrategy==="seen"?De(t):void 0}},IL=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r);var Cv=(e,t)=>{let r=F0(t),i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[l,u])=>({...c,[l]:le(u._def,{...r,currentPath:[...r.basePath,r.definitionPath,l]},!0)??De(r)}),{}):void 0,n=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,a=le(e._def,n===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,n]},!1)??De(r),o=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;o!==void 0&&(a.title=o),r.flags.hasReferencedOpenAiAnyType&&(i||(i={}),i[r.openAiAnyTypeName]||(i[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));let s=n===void 0?i?{...a,[r.definitionPath]:i}:a:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,n].join("/"),[r.definitionPath]:{...i,[n]:a}};return r.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s};var Xf={};Mr(Xf,{$brand:()=>nh,$input:()=>Sg,$output:()=>Og,INVALID:()=>Pt,NEVER:()=>rh,TimePrecision:()=>Rg,ZodAny:()=>Nx,ZodArray:()=>jx,ZodBase64:()=>yf,ZodBase64URL:()=>xf,ZodBigInt:()=>zo,ZodBigIntFormat:()=>Pf,ZodBoolean:()=>wo,ZodCIDRv4:()=>bf,ZodCIDRv6:()=>gf,ZodCUID:()=>uf,ZodCUID2:()=>df,ZodCatch:()=>Qx,ZodCodec:()=>Rl,ZodCompileAsyncError:()=>hr,ZodCompileUnsupportedError:()=>ge,ZodCreditCard:()=>gx,ZodCustom:()=>Fl,ZodCustomStringFormat:()=>Zi,ZodDate:()=>Vl,ZodDefault:()=>Gx,ZodDiscriminatedUnion:()=>Lx,ZodE164:()=>wf,ZodEmail:()=>of,ZodEmoji:()=>lf,ZodEnum:()=>go,ZodError:()=>nH,ZodExactOptional:()=>Of,ZodFile:()=>Ix,ZodFirstPartyTypeKind:()=>dw,ZodFunction:()=>sw,ZodGUID:()=>sf,ZodIBAN:()=>yx,ZodIPv4:()=>vf,ZodIPv6:()=>hf,ZodISODate:()=>Fn,ZodISODateTime:()=>Rn,ZodISODuration:()=>En,ZodISOTime:()=>In,ZodInstanceOf:()=>uw,ZodIntersection:()=>Vx,ZodIssueCode:()=>oH,ZodJWT:()=>zf,ZodKSUID:()=>pf,ZodLazy:()=>iw,ZodLiteral:()=>Fx,ZodMAC:()=>bx,ZodMap:()=>Dx,ZodNaN:()=>$x,ZodNanoID:()=>cf,ZodNever:()=>Sx,ZodNonOptional:()=>Sf,ZodNull:()=>kx,ZodNullable:()=>Jx,ZodNumber:()=>xo,ZodNumberFormat:()=>Mi,ZodObject:()=>Zl,ZodOptional:()=>Hl,ZodPipe:()=>Dl,ZodPrefault:()=>Ax,ZodPreprocess:()=>ew,ZodPromise:()=>ow,ZodReadonly:()=>tw,ZodRealError:()=>Vt,ZodRecord:()=>bo,ZodSet:()=>Rx,ZodString:()=>yo,ZodStringFormat:()=>je,ZodSuccess:()=>Bx,ZodSymbol:()=>zx,ZodTemplateLiteral:()=>nw,ZodTransform:()=>Ex,ZodTuple:()=>Zx,ZodType:()=>me,ZodULID:()=>ff,ZodURL:()=>Ll,ZodUUID:()=>Vr,ZodUndefined:()=>Px,ZodUnion:()=>Ml,ZodUnknown:()=>Ox,ZodVoid:()=>Xx,ZodXID:()=>mf,ZodXor:()=>Wx,_ZodString:()=>af,_default:()=>Kx,_function:()=>$6,any:()=>j6,array:()=>ql,base64:()=>u6,base64url:()=>d6,bigint:()=>T6,boolean:()=>wx,catch:()=>_x,check:()=>eT,cidrv4:()=>l6,cidrv6:()=>c6,clone:()=>Oe,codec:()=>Y6,coerce:()=>mw,compile:()=>Lg,config:()=>Ge,core:()=>ln,creditCard:()=>m6,cuid:()=>e6,cuid2:()=>t6,currencyCode:()=>y6,custom:()=>tT,date:()=>L6,decode:()=>ux,decodeAsync:()=>fx,deepPartial:()=>pT,describe:()=>rT,discriminatedUnion:()=>D6,e164:()=>f6,email:()=>J8,emoji:()=>_8,encode:()=>cx,encodeAsync:()=>dx,endsWith:()=>ao,enum:()=>Tf,exactOptional:()=>Cx,file:()=>G6,flattenError:()=>tl,float32:()=>w6,float64:()=>z6,formatError:()=>rl,fromJSONSchema:()=>fT,function:()=>$6,getDiscriminatedOption:()=>tg,getErrorMap:()=>lH,globalRegistry:()=>lt,gt:()=>Wr,gte:()=>Jt,guid:()=>G8,hash:()=>x6,hex:()=>g6,hostname:()=>b6,httpUrl:()=>Q8,iban:()=>p6,includes:()=>no,input:()=>hT,instanceof:()=>iT,int:()=>rf,int32:()=>P6,int64:()=>N6,intersection:()=>qx,invertCodec:()=>B6,ipv4:()=>a6,ipv6:()=>s6,iso:()=>Il,json:()=>oT,jwt:()=>v6,keyof:()=>V6,ksuid:()=>i6,lazy:()=>aw,length:()=>ji,literal:()=>J6,locales:()=>zl,looseObject:()=>M6,looseRecord:()=>F6,lowercase:()=>to,lt:()=>jr,lte:()=>Ct,mac:()=>o6,map:()=>I6,maxLength:()=>Xi,maxSize:()=>Zn,memoizer:()=>xl,meta:()=>nT,mime:()=>so,minLength:()=>sn,minSize:()=>Lr,multipleOf:()=>qn,nan:()=>U6,nanoid:()=>$8,nativeEnum:()=>C6,negative:()=>Gd,never:()=>kf,nonnegative:()=>Ad,nonoptional:()=>Yx,nonpositive:()=>Kd,normalize:()=>lo,null:()=>Tx,nullable:()=>Wl,nullish:()=>K6,number:()=>xx,object:()=>q6,optional:()=>Vi,output:()=>bT,overwrite:()=>br,parse:()=>ax,parseAsync:()=>ox,partialRecord:()=>R6,pipe:()=>nf,positive:()=>Jd,prefault:()=>Ux,preprocess:()=>sT,prettifyError:()=>lh,promise:()=>_6,properties:()=>oo,property:()=>Ud,readonly:()=>rw,record:()=>Hx,refine:()=>lw,regex:()=>eo,regexes:()=>er,registry:()=>yd,safeDecode:()=>px,safeDecodeAsync:()=>hx,safeEncode:()=>mx,safeEncodeAsync:()=>vx,safeParse:()=>sx,safeParseAsync:()=>lx,set:()=>E6,setErrorMap:()=>sH,size:()=>Si,slugify:()=>mo,startsWith:()=>io,strictObject:()=>Z6,string:()=>jl,stringFormat:()=>h6,stringbool:()=>aT,success:()=>A6,superRefine:()=>cw,symbol:()=>S6,templateLiteral:()=>Q6,toJSONSchema:()=>_d,toLowerCase:()=>uo,toUpperCase:()=>fo,toZod:()=>Ks,transform:()=>Nf,treeifyError:()=>sh,trim:()=>co,tuple:()=>Mx,uint32:()=>k6,uint64:()=>O6,ulid:()=>r6,undefined:()=>X6,union:()=>Po,unknown:()=>Li,uppercase:()=>ro,url:()=>B8,util:()=>W,uuid:()=>K8,uuidv4:()=>A8,uuidv6:()=>U8,uuidv7:()=>Y8,validate:()=>nl,validateAsync:()=>il,void:()=>W6,withParser:()=>xd,xid:()=>n6,xor:()=>H6});var ln={};Mr(ln,{$ZodAny:()=>Ab,$ZodArray:()=>_b,$ZodAsyncError:()=>Wt,$ZodBase64:()=>Zb,$ZodBase64URL:()=>Mb,$ZodBigInt:()=>ad,$ZodBigIntFormat:()=>Cb,$ZodBoolean:()=>pl,$ZodCIDRv4:()=>Vb,$ZodCIDRv6:()=>qb,$ZodCUID:()=>wb,$ZodCUID2:()=>zb,$ZodCatch:()=>bg,$ZodCheck:()=>We,$ZodCheckBigIntFormat:()=>Uh,$ZodCheckEndsWith:()=>ob,$ZodCheckGreaterThan:()=>Cu,$ZodCheckIncludes:()=>ib,$ZodCheckLengthEquals:()=>eb,$ZodCheckLessThan:()=>Eu,$ZodCheckLowerCase:()=>rb,$ZodCheckMaxLength:()=>_h,$ZodCheckMaxSize:()=>Yh,$ZodCheckMimeType:()=>cb,$ZodCheckMinLength:()=>$h,$ZodCheckMinSize:()=>Bh,$ZodCheckMultipleOf:()=>Kh,$ZodCheckNumberFormat:()=>Ah,$ZodCheckOverwrite:()=>ub,$ZodCheckProperties:()=>lb,$ZodCheckProperty:()=>sb,$ZodCheckRegex:()=>tb,$ZodCheckSizeEquals:()=>Qh,$ZodCheckStartsWith:()=>ab,$ZodCheckStringFormat:()=>Ya,$ZodCheckUpperCase:()=>nb,$ZodCodec:()=>hl,$ZodCreditCard:()=>Db,$ZodCustom:()=>kg,$ZodCustomStringFormat:()=>Ib,$ZodCyclicError:()=>fd,$ZodDate:()=>Qb,$ZodDefault:()=>mg,$ZodDiscriminatedUnion:()=>rg,$ZodE164:()=>Hb,$ZodEmail:()=>vb,$ZodEmoji:()=>yb,$ZodEncodeError:()=>Vn,$ZodEnum:()=>sg,$ZodError:()=>oh,$ZodExactOptional:()=>dg,$ZodFile:()=>cg,$ZodFunction:()=>zg,$ZodGUID:()=>mb,$ZodIBAN:()=>Rb,$ZodIPv4:()=>jb,$ZodIPv6:()=>Wb,$ZodISODate:()=>Ob,$ZodISODateTime:()=>Nb,$ZodISODuration:()=>Xb,$ZodISOTime:()=>Sb,$ZodIntersection:()=>ng,$ZodJWT:()=>Fb,$ZodKSUID:()=>Tb,$ZodLazy:()=>bl,$ZodLiteral:()=>lg,$ZodMAC:()=>Lb,$ZodMap:()=>ag,$ZodNaN:()=>gg,$ZodNanoID:()=>xb,$ZodNever:()=>Yb,$ZodNonOptional:()=>vg,$ZodNull:()=>Kb,$ZodNullable:()=>fg,$ZodNumber:()=>id,$ZodNumberFormat:()=>Eb,$ZodObject:()=>e2,$ZodObjectJIT:()=>$b,$ZodOptional:()=>sd,$ZodPipe:()=>ld,$ZodPrefault:()=>pg,$ZodPreprocess:()=>yg,$ZodPromise:()=>Pg,$ZodReadonly:()=>xg,$ZodRealError:()=>Lt,$ZodRecord:()=>ig,$ZodRegistry:()=>gd,$ZodSet:()=>og,$ZodString:()=>Pi,$ZodStringFormat:()=>Se,$ZodSuccess:()=>hg,$ZodSymbol:()=>Jb,$ZodTemplateLiteral:()=>wg,$ZodTransform:()=>ug,$ZodTuple:()=>od,$ZodType:()=>ue,$ZodULID:()=>Pb,$ZodURL:()=>gb,$ZodUUID:()=>pb,$ZodUndefined:()=>Gb,$ZodUnion:()=>vl,$ZodUnknown:()=>Ub,$ZodVoid:()=>Bb,$ZodXID:()=>kb,$ZodXor:()=>eg,$brand:()=>nh,$constructor:()=>k,$input:()=>Sg,$output:()=>Og,Doc:()=>zi,INVALID:()=>Pt,JSONSchema:()=>I8,JSONSchemaGenerator:()=>$d,NEVER:()=>rh,TimePrecision:()=>Rg,URL_BAD_FORMAT:()=>hb,URL_UNPARSEABLE:()=>cl,ZodCompileAsyncError:()=>hr,ZodCompileUnsupportedError:()=>ge,_any:()=>ry,_array:()=>cy,_base64:()=>Fd,_base64url:()=>Id,_bigint:()=>Yg,_boolean:()=>Ag,_catch:()=>GM,_check:()=>T8,_cidrv4:()=>Dd,_cidrv6:()=>Rd,_coercedBigint:()=>Bg,_coercedBoolean:()=>Ug,_coercedDate:()=>sy,_coercedNumber:()=>Ig,_coercedString:()=>Zg,_creditCard:()=>Hg,_cuid:()=>Wd,_cuid2:()=>Ld,_custom:()=>dy,_date:()=>oy,_decode:()=>Wu,_decodeAsync:()=>Vu,_default:()=>EM,_discriminatedUnion:()=>jM,_e164:()=>Ed,_email:()=>Pd,_emoji:()=>Xd,_encode:()=>ju,_encodeAsync:()=>Lu,_endsWith:()=>ao,_enum:()=>MM,_file:()=>uy,_float32:()=>Cg,_float64:()=>Jg,_gt:()=>Wr,_gte:()=>Jt,_guid:()=>kd,_iban:()=>Dg,_includes:()=>no,_int:()=>Eg,_int32:()=>Gg,_int64:()=>Qg,_intersection:()=>WM,_ipv4:()=>Md,_ipv6:()=>Hd,_isoDate:()=>Tl,_isoDateTime:()=>kl,_isoDuration:()=>Ol,_isoTime:()=>Nl,_jwt:()=>Cd,_ksuid:()=>Zd,_lazy:()=>YM,_length:()=>ji,_literal:()=>DM,_lowercase:()=>to,_lt:()=>jr,_lte:()=>Ct,_mac:()=>Mg,_map:()=>qM,_max:()=>Ct,_maxLength:()=>Xi,_maxSize:()=>Zn,_mime:()=>so,_min:()=>Jt,_minLength:()=>sn,_minSize:()=>Lr,_multipleOf:()=>qn,_nan:()=>ly,_nanoid:()=>jd,_nativeEnum:()=>HM,_negative:()=>Gd,_never:()=>iy,_nonnegative:()=>Ad,_nonoptional:()=>CM,_nonpositive:()=>Kd,_normalize:()=>lo,_null:()=>ty,_nullable:()=>IM,_number:()=>Fg,_optional:()=>FM,_overwrite:()=>br,_parse:()=>Ga,_parseAsync:()=>Ka,_pipe:()=>KM,_positive:()=>Jd,_promise:()=>BM,_properties:()=>oo,_property:()=>Ud,_readonly:()=>AM,_record:()=>VM,_refine:()=>fy,_regex:()=>eo,_safeDecode:()=>Zu,_safeDecodeAsync:()=>Hu,_safeEncode:()=>qu,_safeEncodeAsync:()=>Mu,_safeParse:()=>Aa,_safeParseAsync:()=>Ua,_set:()=>ZM,_size:()=>Si,_slugify:()=>mo,_startsWith:()=>io,_string:()=>qg,_stringFormat:()=>Wi,_stringbool:()=>hy,_success:()=>JM,_superRefine:()=>my,_symbol:()=>$g,_templateLiteral:()=>UM,_toLowerCase:()=>uo,_toUpperCase:()=>fo,_transform:()=>RM,_trim:()=>co,_tuple:()=>LM,_uint32:()=>Kg,_uint64:()=>_g,_ulid:()=>Vd,_undefined:()=>ey,_union:()=>SM,_unknown:()=>ny,_uppercase:()=>ro,_url:()=>Pl,_uuid:()=>Td,_uuidv4:()=>Nd,_uuidv6:()=>Od,_uuidv7:()=>Sd,_void:()=>ay,_xid:()=>qd,_xor:()=>XM,base64Charset:()=>$u,base64urlCharset:()=>ml,canParseURL:()=>bb,clone:()=>Oe,compile:()=>Lg,compileFn:()=>wd,config:()=>Ge,createStandardJSONSchemaMethod:()=>po,createToJSONSchemaMethod:()=>gy,decode:()=>LV,decodeAsync:()=>qV,describe:()=>py,encode:()=>WV,encodeAsync:()=>VV,extractDefs:()=>Hn,finalize:()=>Dn,flattenError:()=>tl,formatError:()=>rl,getDiscriminatedOption:()=>tg,globalConfig:()=>nt,globalRegistry:()=>lt,handleUnrepresentable:()=>et,initializeContext:()=>Mn,isBackEdge:()=>pd,isRecursiveSchema:()=>md,isValidBase64:()=>fl,isValidBase64URL:()=>ed,isValidCIDRv6:()=>_u,isValidCreditCard:()=>td,isValidIBAN:()=>rd,isValidIPv6:()=>dl,isValidJWT:()=>nd,locales:()=>zl,memoizer:()=>xl,mergeValues:()=>Ba,meta:()=>vy,parse:()=>Su,parseAsync:()=>Xu,parseURLObject:()=>Qk,prettifyError:()=>lh,process:()=>Xe,processSchema:()=>Xe,regexes:()=>er,registry:()=>yd,safeDecode:()=>MV,safeDecodeAsync:()=>DV,safeEncode:()=>ZV,safeEncodeAsync:()=>HV,safeParse:()=>NV,safeParseAsync:()=>OV,standardProps:()=>Uu,stripTabAndNewline:()=>ul,toDotPath:()=>jk,toJSONSchema:()=>_d,toZod:()=>Ks,treeifyError:()=>sh,urlHostnameOk:()=>Bu,urlProtocolOk:()=>Qu,util:()=>W,validate:()=>nl,validateAsync:()=>il,validateURL:()=>Yu,version:()=>db,withParser:()=>xd});var W={};Mr(W,{BIGINT_FORMAT_RANGES:()=>Qs,CONSTANT_CATCH:()=>Nu,Class:()=>Kv,NUMBER_FORMAT_RANGES:()=>Bs,aborted:()=>zt,allowsEval:()=>Yv,assert:()=>KL,assertEqual:()=>EL,assertIs:()=>JL,assertNever:()=>GL,assertNotEqual:()=>CL,assignProp:()=>st,attachSchema:()=>Tu,base64ToUint8Array:()=>kk,base64urlToUint8Array:()=>dV,cached:()=>Ea,captureStackTrace:()=>Pu,cleanEnum:()=>uV,cleanRegex:()=>an,clone:()=>Oe,cloneDef:()=>YL,codePointLength:()=>xi,constantCatch:()=>eh,createTransparentProxy:()=>tV,defineLazy:()=>Av,defineLazyInternal:()=>pe,derived:()=>vV,esc:()=>wt,escapeRegex:()=>$t,explicitlyAborted:()=>_v,extend:()=>iV,finalizeIssue:()=>jt,floatSafeRemainder:()=>As,getElementAtPath:()=>BL,getEnumValues:()=>Fa,getLengthableOrigin:()=>$s,getParsedType:()=>eV,getSizableOrigin:()=>_s,hexToUint8Array:()=>mV,hide:()=>el,installLazyProp:()=>yV,isObject:()=>yi,isPlainObject:()=>_t,issue:()=>Ja,joinValues:()=>T,jsonStringifyReplacer:()=>Ia,members:()=>$v,merge:()=>oV,mergeDefs:()=>vr,normalizeParams:()=>C,nullish:()=>zu,numKeys:()=>$L,objectClone:()=>AL,omit:()=>nV,optionalKeys:()=>Qv,own:()=>Ln,parsedType:()=>q,partial:()=>sV,pick:()=>rV,prefixIssues:()=>Xt,primitiveTypes:()=>Bv,promiseAllObject:()=>QL,propertyKeyTypes:()=>Ys,randomString:()=>_L,rawShape:()=>Ca,required:()=>lV,safeExtend:()=>aV,shallowClone:()=>Us,slugify:()=>Uv,stringifyPrimitive:()=>L,toZod:()=>Ks,uint8ArrayToBase64:()=>Tk,uint8ArrayToBase64url:()=>fV,uint8ArrayToHex:()=>pV,unwrapMessage:()=>Ra});function EL(e){return e}function CL(e){return e}function Ks(){return e=>e}function JL(e){}function GL(e){throw new Error("Unexpected value in exhaustive check")}function KL(e){}function Fa(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function T(e,t="|"){return e.map(r=>L(r)).join(t)}function Ia(e,t){return typeof t=="bigint"?t.toString():t}var Gv=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function Ea(e){return new Gv(e)}function zu(e){return e==null}function an(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function As(e,t){let r=e/t,i=Math.round(r),n=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<n?0:r-i}var xk=Symbol("evaluating");function Av(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==xk)return i===void 0&&(i=xk,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function AL(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function st(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ca(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function nn(e){return Ca(e._zod.def)??e._zod.def.shape}function wk(e,t,r){Object.defineProperty(e,t,{get(){let i=r();return st(this,t,i),i},enumerable:!0,configurable:!0})}function zk(e,t,r){t in e?st(e,t,r):e[t]=r}function gi(e,t,r,i){let n=nn(t);for(let a of r){let o=Object.getOwnPropertyDescriptor(n,a);o.enumerable&&(o.get?wk(e,a,()=>{let s=t._zod.def.shape[a];return i?i(s,a):s}):zk(e,a,i?i(o.value,a):o.value))}}function UL(e,t){for(let r of Reflect.ownKeys(t)){let i=Object.getOwnPropertyDescriptor(t,r);i.enumerable&&(i.get?wk(e,r,()=>t[r]):zk(e,r,i.value))}}function vr(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function YL(e){return vr(e._zod.def)}function BL(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function QL(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let n={};for(let a=0;a<t.length;a++)n[t[a]]=i[a];return n})}function _L(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function wt(e){return JSON.stringify(e)}function Uv(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Pu="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function yi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Yv=Ea(()=>{if(nt.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function _t(e){if(yi(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(yi(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Us(e){return _t(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function $L(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var eV=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: ${t}`)}},Ys=new Set(["string","number","symbol"]),Bv=new Set(["string","number","bigint","boolean","symbol","undefined"]);function $t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Oe(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function C(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function tV(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,a){return t??(t=e()),Reflect.set(t,i,n,a)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function L(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Qv(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var Bs={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]},Qs={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function rV(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let a={};return gi(a,e,ku(e,t)),Oe(e,vr(r,{shape:a,checks:[]}))}function ku(e,t){let r=nn(e),i=[];for(let n of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,n)?.enumerable)throw new Error(`Unrecognized key: "${String(n)}"`);t[n]&&i.push(n)}return i}function nV(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let a=new Set(ku(e,t)),o={};return gi(o,e,Reflect.ownKeys(nn(e)).filter(s=>!a.has(s))),Oe(e,vr(r,{shape:o,checks:[]}))}function iV(e,t){if(!_t(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let n=nn(e);for(let a of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Oe(e,vr(e._zod.def,{shape:Pk(e,t)}))}function Pk(e,t){let r={};return gi(r,e,Reflect.ownKeys(nn(e))),UL(r,t),r}function aV(e,t){if(!_t(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Oe(e,vr(e._zod.def,{shape:Pk(e,t)}))}function oV(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};gi(r,e,Reflect.ownKeys(nn(e))),gi(r,t,Reflect.ownKeys(nn(t)));let i=vr(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Oe(e,i)}function sV(e,t,r,i="partial"){let a=t._zod.def.checks;if(a&&a.length>0)throw new Error(`.${i}() cannot be used on object schemas containing refinements`);let s=r?new Set(ku(t,r)):void 0,c={};return gi(c,t,Reflect.ownKeys(nn(t)),e&&((l,u)=>s&&!s.has(u)?l:new e({type:"optional",innerType:l}))),Oe(t,vr(t._zod.def,{shape:c,checks:[]}))}function lV(e,t,r){let i=r?new Set(ku(t,r)):void 0,n={};return gi(n,t,Reflect.ownKeys(nn(t)),(a,o)=>i&&!i.has(o)?a:new e({type:"nonoptional",innerType:a})),Oe(t,vr(t._zod.def,{shape:n}))}function zt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function _v(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Xt(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Ra(e){return typeof e=="string"?e:e?.message}function Tu(e,t,r){var i;for(let n=t;n<e.length;n++)(i=e[n]).schema??(i.schema=r)}function jt(e,t,r){var i;let n=e.inst?._zod?.traits;n?.has("$ZodType")&&(n.has("$ZodCheck")?(i=e).schema??(i.schema=e.inst):e.schema=e.inst);let a=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,o=e.message?e.message:Ra(e.inst?._zod.def?.error?.(e))??Ra(a?.(e))??Ra(t?.error?.(e))??Ra(r.customError?.(e))??Ra(r.localeError?.(e))??"Invalid input",s={};for(let c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(s[c]=e[c]);return s.path??(s.path=[]),s.message=o,t?.reportInput&&(s.input=e.input),s}function _s(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var cV=/[\uD800-\uDBFF]/;function xi(e){let t=e.length;if(!cV.test(e))return t;let r=t;for(let i=0;i<t-1;i++)(e.charCodeAt(i)&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320&&(r--,i++);return r}function $s(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function q(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Ja(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function uV(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function kk(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function Tk(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function dV(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return kk(t+r)}function fV(e){return Tk(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function mV(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function pV(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Kv=class{constructor(...t){}};function $v(e,t){for(let r in t){let i=Object.getOwnPropertyDescriptor(t,r);i.get?Object.defineProperty(e,r,{...i,enumerable:!1}):hV(e,r,i.value)}}function Ln(e,t,r,i=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:i,value:r}),r}function el(e,t,r){return Ln(e,t,r,!1)}function vV(e,t){for(let r in e){let i=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return Ln(this,r,i(this))},set(n){Ln(this,r,n)}})}return t}function hV(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:Ln(this,t,r.bind(this))},set(i){Ln(this,t,i)}})}function bV(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}var Jv,Wn=!1,gV={configurable:!0,get(){Wn=!0}};function pe(e,t,r){let i=Object.getPrototypeOf(e._zod);if(t in i&&Jv!==e._zod){Jv=void 0;return}Jv=e._zod,Object.defineProperty(i,t,{configurable:!0,get(){Object.defineProperty(this,t,gV);let n=Wn;Wn=!1;try{let a=r(this);return Wn?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:a}),Wn=Wn||n,a}catch(a){throw delete this[t],Wn=Wn||n,a}},set(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})}function yV(e,t,r,i){let n=bV(e,t);n&&Object.defineProperty(n,t,{configurable:!0,get(){let a={configurable:!0,writable:!0,enumerable:i,value:void 0};return Object.defineProperty(this,t,a),a.value=r(this),Object.defineProperty(this,t,a),a.value},set(a){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:i,value:a})}})}var Nu="~constantCatch";function eh(e){let t=()=>e;return t[Nu]=!0,t}var Nk,rh=Object.freeze({status:"aborted"}),th={value:void 0,enumerable:!1},Ok="captureStackTrace"in Error?Error:null;function xV(e){let t=Ok;if(t){let r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return Ok=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function k(e,t,r,i){let n={};function a(m){this.def=m,this.constr=d,this.traits=new Set}a.prototype=n;let o=r,s=o&&new WeakSet;function c(m,f){if(m._zod){if(m._zod.traits.has(e))return}else{th.value=new a(f);try{Object.defineProperty(m,"_zod",th)}finally{th.value=void 0}}if(m._zod.traits.add(e),t(m,f),s){let v=Object.getPrototypeOf(m),h=m._zod.constr.prototype,b=v;for(;b&&b!==h;)b=Object.getPrototypeOf(b);let g=b??v;s.has(g)||(s.add(g),$v(g,o))}let p=d.prototype;for(let v in p)Object.prototype.hasOwnProperty.call(p,v)&&(v in m||(m[v]=p[v].bind(m)))}let l=i?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(m){let f=i?.Parent?xV(u):this;c(f,m);let p=f._zod.deferred;if(p){for(let h of p)h();f._zod.deferred=void 0}let v=globalThis.__zod_globalConfig?.postProcessor;return v&&v(f),f}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:m=>i?.Parent&&m instanceof i.Parent?!0:m?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var nh=Symbol("zod_brand"),Wt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Vn=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Nk=globalThis).__zod_globalConfig??(Nk.__zod_globalConfig={});var nt=globalThis.__zod_globalConfig;function Ge(e){return e&&Object.assign(nt,e),nt}function wV(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Ia,2)),e.message}function zV(e){this._zod.message=e}var PV={get:wV,set:zV,enumerable:!0,configurable:!0},ah={value:void 0,enumerable:!1},Sk=new WeakSet([Object.prototype,Error.prototype]),Xk=(e,t)=>{e.name="$ZodError",ah.value=t,Object.defineProperty(e,"issues",ah),ah.value=void 0,Object.defineProperty(e,"message",PV);let r=Object.getPrototypeOf(e);Sk.has(r)||(Sk.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let i=()=>this.message;return Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0})}}))},oh=k("$ZodError",Xk),Lt=k("$ZodError",Xk,void 0,{Parent:Error});function kV(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function tl(e,t=r=>r.message){let r={},i=[];for(let n of e.issues)n.path.length>0?kV(r,n.path[0],()=>[]).push(t(n)):i.push(t(n));return{formErrors:i,fieldErrors:r}}function rl(e,t=r=>r.message){let r={_errors:[]},i=(n,a=[])=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s},[...a,...o.path]));else if(o.code==="invalid_key")i({issues:o.issues},[...a,...o.path]);else if(o.code==="invalid_element")i({issues:o.issues},[...a,...o.path]);else{let s=[...a,...o.path];if(s.length===0)r._errors.push(t(o));else{let c=r,l=0;for(;l<s.length;){let u=s[l],d=l===s.length-1;if(u==="_errors"){d&&c._errors.push(t(o)),l++;continue}Object.prototype.hasOwnProperty.call(c,u)||Object.defineProperty(c,u,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let m=c[u];d&&m._errors.push(t(o)),c=m,l++}}}};return i(e),r}function sh(e,t=r=>r.message){let r={errors:[]},i=(n,a=[])=>{var o;for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c},[...a,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...a,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...a,...s.path]);else{let c=[...a,...s.path];if(c.length===0){r.errors.push(t(s));continue}let l=r,u=0;for(;u<c.length;){let d=c[u],m=u===c.length-1;typeof d=="string"?(l.properties??(l.properties={}),Object.prototype.hasOwnProperty.call(l.properties,d)||Object.defineProperty(l.properties,d,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),l=l.properties[d]):(l.items??(l.items=[]),(o=l.items)[d]??(o[d]={errors:[]}),l=l.items[d]),m&&l.errors.push(t(s)),u++}}};return i(e),r}function jk(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function lh(e){let t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${jk(i.path)}`);return t.join(`
|
|
30
|
+
`)}function Ou(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Ga=e=>{let t=(r,i,n,a)=>{let o=n?{...n,async:!1}:{async:!1},s=r._zod.run({value:i,issues:[]},o);if(s instanceof Promise)throw new Wt;if(s.issues.length){let c=new(a?.Err??e)(s.issues.map(l=>jt(l,o,Ge())));throw Pu(c,a?.callee??t),c}return s.value};return t},Su=Ga(Lt),Ka=e=>{let t=async(r,i,n,a)=>{let o=n?{...n,async:!0}:{async:!0},s=r._zod.run({value:i,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(a?.Err??e)(s.issues.map(l=>jt(l,o,Ge())));throw Pu(c,a?.callee??t),c}return s.value};return t},Xu=Ka(Lt),Aa=e=>(t,r,i)=>{let n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new Wt;return a.issues.length?Wk(e,a.issues,n):{success:!0,data:a.value}},NV=Aa(Lt);function Wk(e,t,r){let i;return{success:!1,get error(){return i||(i=new e(t.map(n=>jt(n,r,Ge()))),t=void 0,r=void 0),i},set error(n){i=n,t=void 0,r=void 0}}}var Ua=e=>async(t,r,i)=>{let n=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);return a instanceof Promise&&(a=await a),a.issues.length?Wk(e,a.issues,n):{success:!0,data:a.value}},OV=Ua(Lt),SV=Symbol.for("zod.compile.invalid"),XV=Symbol.for("zod.compile.fallback"),nl=((e,t,r)=>{let i=e._zod.bag.validator;if(i!==void 0){if(i(t)!==SV)return!0;if(i.definite===!0&&r===void 0)return!1}return jV(e,t,r)});function jV(e,t,r){let i=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},n=e._zod.bag.fallbackRun,a;if(n?(i[XV]=!0,a=n({value:t,issues:[]},i)):a=e._zod.run({value:t,issues:[]},i),a instanceof Promise)throw new Wt;return a.issues.length===0}var il=async(e,t,r)=>{let i=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},n=e._zod.run({value:t,issues:[]},i);return n instanceof Promise&&(n=await n),n.issues.length===0},ju=e=>{let t=Ga(e),r=(i,n,a,o)=>{let s=a?{...a,direction:"backward"}:{direction:"backward"};return t(i,n,s,Ou(r,o))};return r},WV=ju(Lt),Wu=e=>{let t=Ga(e),r=(i,n,a,o)=>t(i,n,a,Ou(r,o));return r},LV=Wu(Lt),Lu=e=>{let t=Ka(e),r=async(i,n,a,o)=>{let s=a?{...a,direction:"backward"}:{direction:"backward"};return await t(i,n,s,Ou(r,o))};return r},VV=Lu(Lt),Vu=e=>{let t=Ka(e),r=async(i,n,a,o)=>await t(i,n,a,Ou(r,o));return r},qV=Vu(Lt),qu=e=>(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Aa(e)(t,r,n)},ZV=qu(Lt),Zu=e=>(t,r,i)=>Aa(e)(t,r,i),MV=Zu(Lt),Mu=e=>async(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Ua(e)(t,r,n)},HV=Mu(Lt),Hu=e=>async(t,r,i)=>Ua(e)(t,r,i),DV=Hu(Lt);var er={};Mr(er,{anyString:()=>Zh,base64:()=>Nh,base64url:()=>Oh,bigint:()=>Hh,boolean:()=>Dh,browserEmail:()=>KV,cidrv4:()=>kh,cidrv6:()=>Th,creditCard:()=>Du,cuid:()=>uh,cuid2:()=>dh,currencyCode:()=>Wh,date:()=>Lh,datetime:()=>qh,domain:()=>Xh,duration:()=>bh,e164:()=>jh,email:()=>yh,emoji:()=>xh,extendedDuration:()=>RV,guid:()=>gh,hex:()=>Ch,hostname:()=>Sh,html5Email:()=>CV,httpProtocol:()=>al,iban:()=>Ru,idnEmail:()=>GV,integer:()=>ol,ipv4:()=>wh,ipv6:()=>zh,ksuid:()=>ph,lowercase:()=>Ih,mac:()=>Ph,md5_base64:()=>BV,md5_base64url:()=>QV,md5_hex:()=>YV,nanoid:()=>vh,nanoidOfLength:()=>hh,null:()=>Rh,number:()=>on,rfc5322Email:()=>JV,sha1_base64:()=>$V,sha1_base64url:()=>eq,sha1_hex:()=>_V,sha256_base64:()=>rq,sha256_base64url:()=>nq,sha256_hex:()=>tq,sha384_base64:()=>aq,sha384_base64url:()=>oq,sha384_hex:()=>iq,sha512_base64:()=>lq,sha512_base64url:()=>cq,sha512_hex:()=>sq,string:()=>Mh,time:()=>Vh,ulid:()=>fh,undefined:()=>Fh,unicodeEmail:()=>Lk,uppercase:()=>Eh,uuid:()=>wi,uuid4:()=>FV,uuid6:()=>IV,uuid7:()=>EV,xid:()=>mh});var uh=/^[cC][0-9a-z]{6,}$/,dh=/^[0-9a-z]+$/,fh=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,mh=/^[0-9a-vA-V]{20}$/,ph=/^[A-Za-z0-9]{27}$/,vh=/^[a-zA-Z0-9_-]{21}$/;function hh(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var bh=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,RV=/^[-+]?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)?)??$/,gh=/^([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})$/,wi=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,FV=wi(4),IV=wi(6),EV=wi(7),yh=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,CV=/^[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])?)*$/,JV=/^(([^<>()\[\]\\.,;:\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,}))$/,Lk=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,GV=Lk,KV=/^[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])?)*$/,AV="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function xh(){return new RegExp(AV,"u")}var wh=/^(?:(?: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])$/,zh=/^(([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}|:))$/,Ph=e=>{let t=$t(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},kh=/^((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])$/,Th=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Nh=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Oh=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Sh=/^(?=.{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])?)*\.?$/,Xh=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,al=/^https?$/,jh=/^\+[1-9]\d{6,14}$/,Du=/^\d(?:[ -]?\d){11,18}$/,Wh=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Ru=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,Vk="(?:(?:\\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])))";function UV(e){return new RegExp(`^${e}$`)}var Lh=UV(Vk);function ch(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Vh(e){return new RegExp(`^${ch(e)}$`)}function qh(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${ch({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,i=e.local?`${r}|${ch({precision:e.precision})}`:r;return new RegExp(`^${Vk}T(?:${i})$`)}var Zh=/^[\s\S]{0,}$/,Mh=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Hh=/^-?\d+n?$/,ol=/^-?\d+$/,on=/^-?\d+(?:\.\d+)?$/,Dh=/^(?:true|false)$/i,Rh=/^null$/i;var Fh=/^undefined$/i;var Ih=/^[^A-Z]*$/,Eh=/^[^a-z]*$/,Ch=/^[0-9a-fA-F]*$/;function sl(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ll(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var YV=/^[0-9a-fA-F]{32}$/,BV=sl(22,"=="),QV=ll(22),_V=/^[0-9a-fA-F]{40}$/,$V=sl(27,"="),eq=ll(27),tq=/^[0-9a-fA-F]{64}$/,rq=sl(43,"="),nq=ll(43),iq=/^[0-9a-fA-F]{96}$/,aq=sl(64,""),oq=ll(64),sq=/^[0-9a-fA-F]{128}$/,lq=sl(86,"=="),cq=ll(86);var We=k("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Jh=e=>{let t=e.value;return!zu(t)&&t.size!==void 0},Gh=e=>{let t=e.value;return!zu(t)&&t.length!==void 0},Fu={number:"number",bigint:"bigint",object:"date"},Eu=k("$ZodCheckLessThan",(e,t)=>{We.init(e,t);let r=Fu[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:Fu[typeof i.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Cu=k("$ZodCheckGreaterThan",(e,t)=>{We.init(e,t);let r=Fu[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:Fu[typeof i.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Kh=k("$ZodCheckMultipleOf",(e,t)=>{We.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):As(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Ah=k("$ZodCheckNumberFormat",(e,t)=>{We.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[n,a]=Bs[t.format];e._zod.check=o=>{let s=o.value;if(r){if(!Number.isInteger(s)){o.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<n&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Uh=k("$ZodCheckBigIntFormat",(e,t)=>{We.init(e,t);let[r,i]=Qs[t.format];e._zod.check=n=>{let a=n.value;a<r&&n.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>i&&n.issues.push({origin:"bigint",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Yh=k("$ZodCheckMaxSize",(e,t)=>{var r;We.init(e,t),(r=e._zod.def).when??(r.when=Jh),e._zod.check=i=>{let n=i.value;n.size<=t.maximum||i.issues.push({origin:_s(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Bh=k("$ZodCheckMinSize",(e,t)=>{var r;We.init(e,t),(r=e._zod.def).when??(r.when=Jh),e._zod.check=i=>{let n=i.value;n.size>=t.minimum||i.issues.push({origin:_s(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Qh=k("$ZodCheckSizeEquals",(e,t)=>{var r;We.init(e,t),(r=e._zod.def).when??(r.when=Jh),e._zod.check=i=>{let n=i.value,a=n.size;if(a===t.size)return;let o=a>t.size;i.issues.push({origin:_s(n),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),_h=k("$ZodCheckMaxLength",(e,t)=>{var r;We.init(e,t),(r=e._zod.def).when??(r.when=Gh),e._zod.check=i=>{let n=i.value,a=n.length;if((typeof n=="string"&&a>t.maximum?xi(n):a)<=t.maximum)return;let s=$s(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),$h=k("$ZodCheckMinLength",(e,t)=>{var r;We.init(e,t),(r=e._zod.def).when??(r.when=Gh),e._zod.check=i=>{let n=i.value,a=n.length;if((typeof n=="string"&&a>=t.minimum&&a<t.minimum*2?xi(n):a)>=t.minimum)return;let s=$s(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),eb=k("$ZodCheckLengthEquals",(e,t)=>{var r;We.init(e,t),(r=e._zod.def).when??(r.when=Gh),e._zod.check=i=>{let n=i.value,a=n.length,o=typeof n=="string"&&a>=t.length&&a<=t.length*2?xi(n):a;if(o===t.length)return;let s=$s(n),c=o>t.length;i.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Ya=k("$ZodCheckStringFormat",(e,t)=>{var r,i;We.init(e,t),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),tb=k("$ZodCheckRegex",(e,t)=>{Ya.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),rb=k("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ih),Ya.init(e,t)}),nb=k("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Eh),Ya.init(e,t)}),ib=k("$ZodCheckIncludes",(e,t)=>{We.init(e,t);let r=$t(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r);t.pattern=i,e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ab=k("$ZodCheckStartsWith",(e,t)=>{We.init(e,t);let r=new RegExp(`^${$t(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),ob=k("$ZodCheckEndsWith",(e,t)=>{We.init(e,t);let r=new RegExp(`.*${$t(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Iu(e,t,r){e.issues.length&&t.issues.push(...Xt(r,e.issues))}var sb=k("$ZodCheckProperty",(e,t)=>{We.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Iu(n,r,t.property));Iu(i,r,t.property)}}),lb=k("$ZodCheckProperties",(e,t)=>{We.init(e,t),el(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=i=>{if(i.value==null){i.issues.push({expected:"object",code:"invalid_type",input:i.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(o=>[o,t.shape[o]]));let n=i.value,a;for(let[o,s]of r){let c=s._zod.run({value:n[o],issues:[]},{});c instanceof Promise?(a??(a=[]),a.push(c.then(l=>Iu(l,i,o)))):Iu(c,i,o)}if(a)return Promise.all(a).then(()=>{})}}),cb=k("$ZodCheckMimeType",(e,t)=>{We.init(e,t);let r=new Set(t.mime);e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),ub=k("$ZodCheckOverwrite",(e,t)=>{We.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var zi=class{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
|
|
31
|
+
`).filter(o=>o),n=Math.min(...i.map(o=>o.length-o.trimStart().length)),a=i.map(o=>o.slice(n)).map(o=>" ".repeat(this.indent*2)+o);for(let o of a)this.content.push(o)}compile(){let t=Function,r=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
32
|
+
${r.join(`
|
|
33
|
+
`)}
|
|
34
|
+
};`)(...Object.values(this.closed))}};var db={major:4,minor:6,patch:5};var ue=k("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=db;let i=e._zod.def.checks,n=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(let a of n)for(let o of a._zod.onattach)o(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let a=(s,c,l)=>{if(s.memo)return s;let u=zt(s),d;for(let m of c){if(m._zod.def.when){if(_v(s)||!m._zod.def.when(s))continue}else if(u)continue;let f=s.issues.length,p=m._zod.check(s);if(p instanceof Promise&&l?.async===!1)throw new Wt;if(d||p instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await p,s.issues.length!==f&&(Tu(s.issues,f,e),u||(u=zt(s,f)))});else{if(s.issues.length===f)continue;Tu(s.issues,f,e),u||(u=zt(s,f))}}return d?d.then(()=>s):s},o=(s,c,l)=>{if(zt(s))return s.aborted=!0,s;let u=a(c,n,l);if(u instanceof Promise){if(l.async===!1)throw new Wt;return u.then(d=>e._zod.parse(d,l))}return e._zod.parse(u,l)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return u instanceof Promise?u.then(d=>o(d,s,c)):o(u,s,c)}let l=e._zod.parse(s,c);if(l instanceof Promise){if(c.async===!1)throw new Wt;return l.then(u=>a(u,n,c))}return a(l,n,c)}}},{get"~standard"(){return el(this,"~standard",Uu(this))},set"~standard"(e){Ln(this,"~standard",e)}}),Bk=(e,t)=>e.issues.length?{issues:e.issues.map(r=>jt(r,t,Ge()))}:{value:e.value};async function uq(e,t){let r={async:!0};return Bk(await e._zod.run({value:t,issues:[]},r),r)}function Uu(e){return{validate:t=>{let r={async:!1};try{let i=e._zod.run({value:t,issues:[]},r);if(!(i instanceof Promise))return Bk(i,r)}catch{}return uq(e,t)},vendor:"zod",version:1}}var Pi=k("$ZodString",(e,t)=>{ue.init(e,t),e._zod.pattern=t.pattern??Zh,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Se=k("$ZodStringFormat",(e,t)=>{Ya.init(e,t),Pi.init(e,t)}),mb=k("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gh),Se.init(e,t)}),pb=k("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=wi(i))}else t.pattern??(t.pattern=wi());Se.init(e,t)}),vb=k("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=yh),Se.init(e,t)}),hb=1,cl=2;function bb(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Yu(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?bb(e)||cl:Qk(e,t)}function Qk(e,t){if(!t.normalize&&t.protocol?.source===al.source&&!/^https?:\/\//i.test(e))return hb;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse=="function")return r.parse(e)??cl}return new URL(e)}catch{return cl}}var dq=/[\t\n\r]/g;function ul(e){return e.replace(dq,"")}function Bu(e,t){return t.lastIndex=0,t.test(e.hostname)}function Qu(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var gb=k("$ZodURL",(e,t)=>{Se.init(e,t),e._zod.check=r=>{try{let i=r.value.trim(),n=Yu(i,t);if(n===hb){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(n===cl){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(n===!0){r.value=ul(i);return}t.hostname&&!Bu(n,t.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&!Qu(n,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?n.href:ul(i);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),yb=k("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=xh()),Se.init(e,t)}),xb=k("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?vh:hh(t.length)),Se.init(e,t)}),wb=k("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=uh),Se.init(e,t)}),zb=k("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=dh),Se.init(e,t)}),Pb=k("$ZodULID",(e,t)=>{t.pattern??(t.pattern=fh),Se.init(e,t)}),kb=k("$ZodXID",(e,t)=>{t.pattern??(t.pattern=mh),Se.init(e,t)}),Tb=k("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ph),Se.init(e,t)}),Nb=k("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=qh(t)),Se.init(e,t)}),Ob=k("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Lh),Se.init(e,t)}),Sb=k("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Vh(t)),Se.init(e,t)}),Xb=k("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=bh),Se.init(e,t)}),jb=k("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=wh),Se.init(e,t)}),fq=/^[0-9a-fA-F:.]+$/;function dl(e){return fq.test(e)?bb(`http://[${e}]`):!1}var Wb=k("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=zh),Se.init(e,t),e._zod.check=r=>{dl(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),Lb=k("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ph(t.delimiter)),Se.init(e,t)}),Vb=k("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=kh),Se.init(e,t)});function _u(e){let t=e.split("/");if(t.length!==2)return!1;let[r,i]=t;if(!i)return!1;let n=Number(i);return`${n}`!==i||n<0||n>128?!1:dl(r)}var qb=k("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Th),Se.init(e,t),e._zod.check=r=>{_u(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function fl(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var $u=/^[0-9a-zA-Z+/]*={0,2}$/,Zb=k("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=$u),Se.init(e,t),e._zod.check=r=>{fl(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),ml=/^[A-Za-z0-9_-]*$/;function ed(e){if(!ml.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return fl(r)}var Mb=k("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ml),Se.init(e,t),e._zod.check=r=>{ed(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Hb=k("$ZodE164",(e,t)=>{t.pattern??(t.pattern=jh),Se.init(e,t)}),mq=/[- ]/g;function pq(e){let t=e.length,r=1,i=0;for(;t;){let n=e.charCodeAt(--t)-48;r^=1,i+=r?[0,2,4,6,8,1,3,5,7,9][n]:n}return i%10===0}function td(e){return Du.test(e)?pq(e.replace(mq,"")):!1}var Db=k("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=Du),Se.init(e,t),e._zod.check=r=>{td(r.value)||r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});function vq(e){let t=0,r=e.length;for(let i=4;i<r;i++){let n=e.charCodeAt(i);t=(n>=65?t*100+(n-55):t*10+(n-48))%97}for(let i=0;i<4;i++){let n=e.charCodeAt(i);t=(n>=65?t*100+(n-55):t*10+(n-48))%97}return t===1}function rd(e){return Ru.test(e)?vq(e):!1}var Rb=k("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=Ru),Se.init(e,t),e._zod.check=r=>{rd(r.value)||r.issues.push({code:"invalid_format",format:"iban",input:r.value,inst:e,continue:!t.abort})}});function nd(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var Fb=k("$ZodJWT",(e,t)=>{Se.init(e,t),e._zod.check=r=>{nd(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Ib=k("$ZodCustomStringFormat",(e,t)=>{Se.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),id=k("$ZodNumber",(e,t)=>{ue.init(e,t),e._zod.pattern=on,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let a=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:String(n):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...a?{received:a}:{}}),r}}),Eb=k("$ZodNumberFormat",(e,t)=>{Ah.init(e,t),id.init(e,t)}),pl=k("$ZodBoolean",(e,t)=>{ue.init(e,t),e._zod.pattern=Dh,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),ad=k("$ZodBigInt",(e,t)=>{ue.init(e,t),e._zod.pattern=Hh,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Cb=k("$ZodBigIntFormat",(e,t)=>{Uh.init(e,t),ad.init(e,t)}),Jb=k("$ZodSymbol",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Gb=k("$ZodUndefined",(e,t)=>{ue.init(e,t),e._zod.pattern=Fh,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Kb=k("$ZodNull",(e,t)=>{ue.init(e,t),e._zod.pattern=Rh,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Ab=k("$ZodAny",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),Ub=k("$ZodUnknown",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),Yb=k("$ZodNever",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Bb=k("$ZodVoid",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Qb=k("$ZodDate",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,a=n instanceof Date;return a&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...a?{received:"Invalid Date"}:{},inst:e}),r}});function Zk(e,t,r){e.issues.length&&t.issues.push(...Xt(r,e.issues)),t.value[r]=e.value}var _b=k("$ZodArray",(e,t)=>{ue.init(e,t);let r=nt.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let a=i.value;if(!Array.isArray(a))return i.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),i;i.value=r?r.alloc(e,i,Array(a.length),n):Array(a.length);let o=[],s=n?.abortEarly;for(let c=0;c<a.length;c++){let l=a[c],u=t.element._zod.run({value:l,issues:[]},n);if(u instanceof Promise)o.push(u.then(d=>Zk(d,i,c)));else if(Zk(u,i,c),s&&u.issues.length!==0&&zt(u))break}return o.length?Promise.all(o).then(()=>i):i}});function Au(e,t,r,i,n,a){let o=r in i,s=a==="optional";if(!(!o&&s&&n==="optional")){if(e.issues.length){if(n!==void 0&&s&&!o)return;t.issues.push(...Xt(r,e.issues))}if(!o&&n===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?(o||n==="defaulted"&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}var hq=[];function _k(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),i=r.length?r:hq,n=i.length?[...t,...i]:t;for(let o of n)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(o)}": expected a Zod schema`);let a=Qv(e.shape);return{...e,allKeys:n,symbolKeys:i,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function $k(e,t,r,i,n,a,o){let s=[],c=n.keySet,l=n.catchall._zod,u=l.def.type,d=l.optin,m=l.optout,f=0;for(let p in t){if(o&&r.issues.length!==f){if(zt(r,f))break;f=r.issues.length}if(c.has(p))continue;if(p==="__proto__"){u==="never"&&s.push(p);continue}if(u==="never"){s.push(p);continue}let v=l.run({value:t[p],issues:[]},i);v instanceof Promise?e.push(v.then(h=>Au(h,r,p,t,d,m))):Au(v,r,p,t,d,m)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>r):r}var e2=k("$ZodObject",(e,t)=>{ue.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),i=r?.get?r.get.raw:t.shape??{};if(i){let l=()=>{let u={...i};return Object.defineProperty(t,"shape",{value:u}),l.raw=u,u};l.raw=i,Object.defineProperty(t,"shape",{get:l})}let n=Ea(()=>_k(t));pe(e,"propValues",l=>{let u=l.def.shape,d={};for(let m in u){let f=u[m]._zod;if(f.values){Object.prototype.hasOwnProperty.call(d,m)||st(d,m,new Set);for(let p of f.values)d[m].add(p);f.optin!==void 0&&d[m].add(void 0)}}return d});let a=yi,o=t.catchall,s,c=nt.memoizer;c?.attach(e),e._zod.parse=(l,u)=>{s??(s=n.value);let d=l.value;if(!a(d))return l.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),l;l.value=c?c.alloc(e,l,{},u):{};let m=[],f=s.shape,p=u?.abortEarly,v=l.issues.length;for(let h of s.allKeys){if(p&&l.issues.length!==v){if(zt(l,v))break;v=l.issues.length}if(h==="__proto__")continue;let b=f[h],g=b._zod.optin,y=b._zod.optout,x=b._zod.run({value:d[h],issues:[]},u);x instanceof Promise?m.push(x.then(z=>Au(z,l,h,d,g,y))):Au(x,l,h,d,g,y)}return o?$k(m,d,l,u,n.value,e,p===!0):m.length?Promise.all(m).then(()=>l):l}}),$b=k("$ZodObjectJIT",(e,t)=>{e2.init(e,t);let r=e._zod.parse,i=Ea(()=>_k(t)),n=nt.memoizer,a=f=>{let p=i.value,v=p.symbolKeys,h=new zi(["payload","ctx"],{shape:f,inst:e,memo:n,syms:v}),b=z=>`shape[${z}]._zod.run({ value: input[${z}], issues: [] }, ctx)`,g=(z,N)=>`
|
|
35
|
+
let ${z}_ab = false;
|
|
36
|
+
for (let i = 0; i < ${z}.issues.length; i++) {
|
|
37
|
+
const iss = ${z}.issues[i];
|
|
38
|
+
iss.path = iss.path ? [${N}, ...iss.path] : [${N}];
|
|
39
|
+
payload.issues.push(iss);
|
|
40
|
+
if (iss.continue !== true) ${z}_ab = true;
|
|
41
|
+
}
|
|
42
|
+
if (${z}_ab && ctx && ctx.abortEarly) {
|
|
43
|
+
payload.value = newResult;
|
|
44
|
+
return payload;
|
|
45
|
+
}`;h.write("const input = payload.value;");let y=Object.create(null),x=0;for(let z of p.allKeys)y[z]=`key_${x++}`;h.write(n?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let z of p.allKeys){if(z==="__proto__")continue;let N=y[z],P=typeof z=="symbol"?`syms[${v.indexOf(z)}]`:wt(z),O=`${P} in input`,X=f[z],S=X?._zod?.optin,w=S!==void 0,j=X?._zod?.optout==="optional";if(h.write(`const ${N} = ${b(P)};`),w&&j){let M=S==="optional"?`${N}_present`:`${N}.value !== undefined || ${N}_present`;h.write(`
|
|
46
|
+
const ${N}_present = ${O};
|
|
47
|
+
if (!${N}.issues.length || ${N}_present) {
|
|
48
|
+
if (${N}.issues.length) {${g(N,P)}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (${M}) {
|
|
52
|
+
newResult[${P}] = ${N}.value;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
`)}else w?(h.write(`
|
|
57
|
+
if (${N}.issues.length) {${g(N,P)}
|
|
58
|
+
}
|
|
59
|
+
`),S==="defaulted"?h.write(`newResult[${P}] = ${N}.value;`):h.write(`
|
|
60
|
+
if (${N}.value !== undefined || ${O}) {
|
|
61
|
+
newResult[${P}] = ${N}.value;
|
|
62
|
+
}
|
|
63
|
+
`)):h.write(`
|
|
64
|
+
const ${N}_present = ${O};
|
|
65
|
+
if (${N}.issues.length) {${g(N,P)}
|
|
66
|
+
}
|
|
67
|
+
if (!${N}_present && !${N}.issues.length) {
|
|
68
|
+
payload.issues.push({
|
|
69
|
+
code: "invalid_type",
|
|
70
|
+
expected: "nonoptional",
|
|
71
|
+
input: undefined,
|
|
72
|
+
path: [${P}]
|
|
73
|
+
});
|
|
74
|
+
if (ctx && ctx.abortEarly) {
|
|
75
|
+
payload.value = newResult;
|
|
76
|
+
return payload;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (${N}_present) {
|
|
81
|
+
newResult[${P}] = ${N}.value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
`)}return h.write("payload.value = newResult;"),h.write("return payload;"),h.compile()},o,s=yi,c=!nt.jitless,u=c&&Yv.value,d=t.catchall,m;e._zod.parse=(f,p)=>{m??(m=i.value);let v=f.value;return s(v)?c&&u&&p?.async===!1&&p.jitless!==!0?(o||(o=a(t.shape)),f=o(f,p),d?$k([],v,f,p,m,e,p?.abortEarly===!0):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),f)}});function Mk(e,t,r,i){for(let a of e)if(a.issues.length===0)return t.value=a.value,t;let n=e.filter(a=>!zt(a));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(o=>jt(o,i,Ge())))}),t)}var vl=k("$ZodUnion",(e,t)=>{ue.init(e,t),pe(e,"optin",i=>i.def.options.some(n=>n._zod.optin==="defaulted")?"defaulted":i.def.options.some(n=>n._zod.optin!==void 0)?"optional":void 0),pe(e,"optout",i=>i.def.options.some(n=>n._zod.optout==="optional")?"optional":void 0),pe(e,"values",i=>{if(i.def.options.every(n=>n._zod.values))return new Set(i.def.options.flatMap(n=>Array.from(n._zod.values)))}),pe(e,"pattern",i=>{if(i.def.options.every(n=>n._zod.pattern)){let n=i.def.options.map(a=>a._zod.pattern);return new RegExp(`^(${n.map(a=>an(a.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let a=!1,o=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},n);if(c instanceof Promise)o.push(c),a=!0;else{if(c.issues.length===0)return c;o.push(c)}}return a?Promise.all(o).then(s=>Mk(s,i,e,n)):Mk(o,i,e,n)}});function Hk(e,t,r,i){let n=[];for(let a=0;a<e.length;a++)e[a].issues.length===0&&n.push(a);return n.length===1?(t.value=e[n[0]].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(o=>jt(o,i,Ge())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:n}),t)}var eg=k("$ZodXor",(e,t)=>{vl.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let a=!1,o=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},n);c instanceof Promise?(o.push(c),a=!0):o.push(c)}return a?Promise.all(o).then(s=>Hk(s,i,e,n)):Hk(o,i,e,n)}});function tg(e,t){let r=e._zod,i=r.bag.optionsMap;i||(i=t2(r.def),r.bag.optionsMap=i);let n=i.get(t);if(n===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return n}function t2(e){let t=new Map;for(let r of e.options){let i=r._zod.propValues?.[e.discriminator];if(!i||i.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let n of i)if(t.has(n)){if(n!==void 0)throw new Error(`Duplicate discriminator value "${String(n)}"`);t.set(n,null)}else t.set(n,r)}return t}var rg=k("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,vl.init(e,t);let r=e._zod.parse;pe(e,"propValues",n=>{let a={},o=0;for(let s of n.def.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${n.def.options.indexOf(s)}"`);c[n.def.discriminator]?.has(void 0)&&o++;for(let[l,u]of Object.entries(c)){Object.prototype.hasOwnProperty.call(a,l)||st(a,l,new Set);for(let d of u)a[l].add(d)}}return!n.def.unionFallback&&o>1&&a[n.def.discriminator]?.delete(void 0),a}),t.options.forEach((n,a)=>{let o=Ca(n._zod.def);if(o&&!Object.prototype.hasOwnProperty.call(o,t.discriminator))throw new Error(`Invalid discriminated union option at index "${a}"`)});let i=Ea(()=>t2(t));e._zod.parse=(n,a)=>{let o=n.value;if(!yi(o))return n.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),n;let s=o?.[t.discriminator],c=i.value.get(s);return c&&(s!==void 0||a.direction!=="backward")?c._zod.run(n,a):t.unionFallback||a.direction==="backward"?r(n,a):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()).filter(l=>i.value.get(l)!==null),input:o,path:[t.discriminator],inst:e}),n)}}),ng=k("$ZodIntersection",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{let n=r.value,a=t.left._zod.run({value:n,issues:[]},i),o=t.right._zod.run({value:n,issues:[]},i);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([c,l])=>Dk(r,c,l)):Dk(r,a,o)}});function Ba(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(_t(e)&&_t(t)){let r=Object.keys(t),i=Object.keys(e).filter(a=>r.indexOf(a)!==-1),n={...e,...t};Object.prototype.hasOwnProperty.call(n,"__proto__")&&delete n.__proto__;for(let a of i){if(a==="__proto__")continue;let o=Ba(e[a],t[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};n[a]=o.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let n=e[i],a=t[i],o=Ba(n,a);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Dk(e,t,r){let i=new Map,n,a=new Map,o=(l,u)=>{let d;if(l.code==="unrecognized_keys"&&!l.path?.length)n??(n=l),d=l.keys;else if(l.code==="invalid_key"&&l.origin==="record"&&l.path?.length===1){let m=String(l.path[0]);a.has(m)||a.set(m,l),d=[m]}else return!1;for(let m of d)i.has(m)||i.set(m,{}),i.get(m)[u]=!0;return!0};for(let l of t.issues)o(l,"l")||e.issues.push(l);for(let l of r.issues)o(l,"r")||e.issues.push(l);let s=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(s.length){let l=n?s.filter(u=>n.keys.includes(u)):[];l.length&&e.issues.push({...n,keys:l});for(let u of s)!l.includes(u)&&a.has(u)&&e.issues.push(a.get(u))}let c=Ba(t.value,r.value);if(!c.valid){if(zt(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var od=k("$ZodTuple",(e,t)=>{ue.init(e,t);let r=t.items,i=nt.memoizer;i?.attach(e),e._zod.parse=(n,a)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=i?i.alloc(e,n,[],a):[];let s=[],c=Rk(r,"optin"),l=Rk(r,"optout");if(!t.rest){if(o.length<c)return n.issues.push({code:"too_small",minimum:c,inclusive:!0,input:o,inst:e,origin:"array"}),n;o.length>r.length&&n.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:o,inst:e,origin:"array"})}let u=new Array(r.length),d=t.rest?a?.abortEarly:void 0,m=!1;for(let f=0;f<r.length;f++){let p=r[f]._zod.run({value:o[f],issues:[]},a);p instanceof Promise?s.push(p.then(v=>{u[f]=v})):(u[f]=p,d&&!m&&p.issues.length&&(m=zt(p)))}if(t.rest&&!m){let f=r.length-1,p=o.slice(r.length),v=n.issues.length;for(let h of p){if(d&&n.issues.length!==v){if(zt(n,v))break;v=n.issues.length}f++;let b=t.rest._zod.run({value:h,issues:[]},a);b instanceof Promise?s.push(b.then(g=>Fk(g,n,f))):Fk(b,n,f)}}return s.length?Promise.all(s).then(()=>Ik(u,n,r,o,l)):Ik(u,n,r,o,l)}});function Rk(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function Fk(e,t,r){e.issues.length&&t.issues.push(...Xt(r,e.issues)),t.value[r]=e.value}function Ik(e,t,r,i,n){for(let a=0;a<r.length;a++){let o=e[a],s=a<i.length;if(!s&&a>=n&&r[a]._zod.optin==="optional"){t.value.length=a;break}if(o.issues.length){if(!s&&a>=n){t.value.length=a;break}t.issues.push(...Xt(a,o.issues))}t.value[a]=o.value}for(let a=t.value.length-1;a>=i.length&&(r[a]._zod.optout==="optional"&&t.value[a]===void 0);a--)t.value.length=a;return t}var ig=k("$ZodRecord",(e,t)=>{ue.init(e,t);let r=nt.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let a=i.value;if(!_t(a))return i.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),i;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){i.value=r?r.alloc(e,i,{},n):{};let c=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){if(c.add(typeof u=="number"?u.toString():u),u==="__proto__")continue;let d=t.keyType._zod.run({value:u,issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>jt(p,n,Ge())),input:u,path:[u],inst:e});continue}let m=d.value;if(m==="__proto__")continue;let f=t.valueType._zod.run({value:a[u],issues:[]},n);f instanceof Promise?o.push(f.then(p=>{p.issues.length&&i.issues.push(...Xt(u,p.issues)),i.value[m]=p.value})):(f.issues.length&&i.issues.push(...Xt(u,f.issues)),i.value[m]=f.value)}let l;for(let u in a)if(!c.has(u))if(t.mode==="loose"){if(u==="__proto__")continue;i.value[u]=a[u]}else l=l??[],l.push(u);l&&l.length>0&&i.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:l,continue:!0})}else{i.value=r?r.alloc(e,i,{},n):{};let c;for(let l of Reflect.ownKeys(a)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(a,l))continue;let u=t.keyType._zod.run({value:l,issues:[]},n);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&on.test(l)&&u.issues.length){let p=t.keyType._zod.run({value:Number(l),issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(u=p)}if(u.issues.length){t.mode==="loose"?i.value[l]=a[l]:s?(c=c??[],c.push(l)):i.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>jt(p,n,Ge())),input:l,path:[l],inst:e});continue}let m=u.value;if(m==="__proto__")continue;let f=t.valueType._zod.run({value:a[l],issues:[]},n);f instanceof Promise?o.push(f.then(p=>{p.issues.length&&i.issues.push(...Xt(l,p.issues)),i.value[m]=p.value})):(f.issues.length&&i.issues.push(...Xt(l,f.issues)),i.value[m]=f.value)}c&&c.length>0&&i.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>i):i}}),ag=k("$ZodMap",(e,t)=>{ue.init(e,t);let r=nt.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let a=i.value;if(!(a instanceof Map))return i.issues.push({expected:"map",code:"invalid_type",input:a,inst:e}),i;let o=[];i.value=r?r.alloc(e,i,new Map,n):new Map;let s=n?.abortEarly,c=i.issues.length;for(let[l,u]of a){if(s&&i.issues.length!==c){if(zt(i,c))break;c=i.issues.length}let d=t.keyType._zod.run({value:l,issues:[]},n),m=t.valueType._zod.run({value:u,issues:[]},n);d instanceof Promise||m instanceof Promise?o.push(Promise.all([d,m]).then(([f,p])=>{Ek(f,p,i,l,a,e,n)})):Ek(d,m,i,l,a,e,n)}return o.length?Promise.all(o).then(()=>i):i}});function Ek(e,t,r,i,n,a,o){e.issues.length&&(Ys.has(typeof i)?r.issues.push(...Xt(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:a,issues:e.issues.map(s=>jt(s,o,Ge()))})),t.issues.length&&(Ys.has(typeof i)?r.issues.push(...Xt(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:a,key:i,issues:t.issues.map(s=>jt(s,o,Ge()))})),r.value.set(e.value,t.value)}var og=k("$ZodSet",(e,t)=>{ue.init(e,t);let r=nt.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let a=i.value;if(!(a instanceof Set))return i.issues.push({input:a,inst:e,expected:"set",code:"invalid_type"}),i;let o=[];i.value=r?r.alloc(e,i,new Set,n):new Set;let s=n?.abortEarly,c=i.issues.length;for(let l of a){if(s&&i.issues.length!==c){if(zt(i,c))break;c=i.issues.length}let u=t.valueType._zod.run({value:l,issues:[]},n);u instanceof Promise?o.push(u.then(d=>Ck(d,i))):Ck(u,i)}return o.length?Promise.all(o).then(()=>i):i}});function Ck(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var sg=k("$ZodEnum",(e,t)=>{ue.init(e,t);let r=Fa(t.entries),i=new Set(r);e._zod.values=i,pe(e,"pattern",n=>{let a=Fa(n.def.entries).filter(o=>Ys.has(typeof o));return new RegExp(a.length?`^(${a.map(o=>$t(o.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,a)=>{let o=n.value;return i.has(o)||n.issues.push({code:"invalid_value",values:r,input:o,inst:e}),n}}),lg=k("$ZodLiteral",(e,t)=>{ue.init(e,t);let r=new Set(t.values);e._zod.values=r,pe(e,"pattern",i=>{let n=i.def.values;return new RegExp(n.length?`^(${n.map(a=>typeof a=="string"?$t(a):a?$t(a.toString()):String(a)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(i,n)=>{let a=i.value;return r.has(a)||i.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),i}}),cg=k("$ZodFile",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),ug=k("$ZodTransform",(e,t)=>{ue.init(e,t),e._zod.optin="optional",nt.memoizer?.guard(e),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Vn(e.constructor.name);let n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(o=>(r.value=o,r));if(n instanceof Promise)throw new Wt;return r.value=n,r}});function Jk(e,t){return e.value=t.issues.length?void 0:t.value,e}var sd=k("$ZodOptional",(e,t)=>{ue.init(e,t),pe(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",pe(e,"values",r=>{let i=r.def.innerType._zod.values;return i?new Set([...i,void 0]):void 0}),pe(e,"pattern",r=>{let i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${an(i.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let n=t.innerType._zod.run({value:r.value,issues:[]},i);return n instanceof Promise?n.then(a=>Jk(r,a)):Jk(r,n)}return t.innerType._zod.run(r,i)}}),dg=k("$ZodExactOptional",(e,t)=>{sd.init(e,t),pe(e,"values",r=>r.def.innerType._zod.values),pe(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),fg=k("$ZodNullable",(e,t)=>{ue.init(e,t),pe(e,"optin",r=>r.def.innerType._zod.optin),pe(e,"optout",r=>r.def.innerType._zod.optout),pe(e,"pattern",r=>{let i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${an(i.source)}|null)$`):void 0}),pe(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),mg=k("$ZodDefault",(e,t)=>{ue.init(e,t),e._zod.optin="defaulted",pe(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(a=>Gk(a,t)):Gk(n,t)}});function Gk(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var pg=k("$ZodPrefault",(e,t)=>{ue.init(e,t),e._zod.optin="defaulted",pe(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),vg=k("$ZodNonOptional",(e,t)=>{ue.init(e,t),pe(e,"values",r=>{let i=r.def.innerType._zod.values;return i?new Set([...i].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,i)=>{let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(a=>Kk(a,e)):Kk(n,e)}});function Kk(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var hg=k("$ZodSuccess",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Vn("ZodSuccess");let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(a=>(r.value=a.issues.length===0,r)):(r.value=n.issues.length===0,r)}});function Ak(e,t,r,i){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(n=>jt(n,i,Ge()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var bg=k("$ZodCatch",(e,t)=>{ue.init(e,t),pe(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),pe(e,"optout",r=>r.def.innerType._zod.optout),pe(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run({value:r.value,issues:[]},i);return n instanceof Promise?n.then(a=>Ak(r,a,t,i)):Ak(r,n,t,i)}}),gg=k("$ZodNaN",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),ld=k("$ZodPipe",(e,t)=>{ue.init(e,t),pe(e,"values",r=>r.def.in._zod.values),pe(e,"optin",r=>r.def.in._zod.optin),pe(e,"optout",r=>r.def.out._zod.optout),pe(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let a=t.out._zod.run(r,i);return a instanceof Promise?a.then(o=>Ju(o,t.in,i)):Ju(a,t.in,i)}let n=t.in._zod.run(r,i);return n instanceof Promise?n.then(a=>Ju(a,t.out,i)):Ju(n,t.out,i)}});function Ju(e,t,r){return e.issues.some(i=>i.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var hl=k("$ZodCodec",(e,t)=>{ue.init(e,t),pe(e,"values",r=>r.def.in._zod.values),pe(e,"optin",r=>r.def.in._zod.optin),pe(e,"optout",r=>r.def.out._zod.optout),pe(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let a=t.in._zod.run(r,i);return a instanceof Promise?a.then(o=>Gu(o,t,i)):Gu(a,t,i)}else{let a=t.out._zod.run(r,i);return a instanceof Promise?a.then(o=>Gu(o,t,i)):Gu(a,t,i)}}});function Gu(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(a=>Ku(e,a,t.out,r)):Ku(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(a=>Ku(e,a,t.in,r)):Ku(e,n,t.in,r)}}function Ku(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}var yg=k("$ZodPreprocess",(e,t)=>{ld.init(e,t)}),xg=k("$ZodReadonly",(e,t)=>{ue.init(e,t),pe(e,"propValues",r=>r.def.innerType._zod.propValues),pe(e,"values",r=>r.def.innerType._zod.values),pe(e,"optin",r=>r.def.innerType?._zod?.optin),pe(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Uk):Uk(n)}});function Uk(e){return e.memo||(e.value=Object.freeze(e.value)),e}function bq(e){let t=e._zod.def,r=t.pattern,i=!!t.format?.includes("int"),n,a;for(let s of t.checks??[]){let c=s._zod.def;c.pattern&&(r=c.pattern),i||(i=!!c.format?.includes("int"));let l=c.minimum??c.length,u=c.maximum??c.length;l!==void 0&&(n===void 0||l>n)&&(n=l),u!==void 0&&(a===void 0||u<a)&&(a=u)}if(r)return r.source;if(n!==void 0&&a!==void 0&&n>a)return"(?!)";if(n!==void 0||a!==void 0)return Mh({minimum:n,maximum:a}).source;let o=e._zod.pattern;return(i&&o===on?ol:o)?.source}function fb(e){let t=e._zod.def,r=e._zod.pattern?.source,i=t.innerType??e._zod.innerType;if(i){let n=i._zod.pattern?.source,a=fb(i);return r&&n&&a&&a!==n?r.replace(an(n),()=>an(a)):r}if(t.options){let n=t.options.map(fb);if(n.every(Boolean))return`^(${n.map(a=>an(a)).join("|")})$`}return bq(e)}var wg=k("$ZodTemplateLiteral",(e,t)=>{ue.init(e,t);let r=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){let n=fb(i);if(!n)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);r.push(an(n))}else if(i===null||Bv.has(typeof i))r.push($t(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),zg=k("$ZodFunction",(e,t)=>(ue.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...i){let n=e._def.input?Su(e._def.input,i):i,a=Reflect.apply(r,this,n);return e._def.output?Su(e._def.output,a):a},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...i){let n=e._def.input?await Xu(e._def.input,i):i,a=await Reflect.apply(r,this,n);return e._def.output?await Xu(e._def.output,a):a},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new od({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),Pg=k("$ZodPromise",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),bl=k("$ZodLazy",(e,t)=>{ue.init(e,t),Av(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),pe(e,"pattern",r=>r.innerType?._zod?.pattern),pe(e,"propValues",r=>r.innerType?._zod?.propValues),pe(e,"optin",r=>r.innerType?._zod?.optin??void 0),pe(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),kg=k("$ZodCustom",(e,t)=>{We.init(e,t),ue.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(a=>Yk(a,r,i,e));Yk(n,r,i,e)}});function Yk(e,t,r,i){if(!e){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(Ja(n))}}var fd=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},Ng="~memo",n2=[];function i2(e){return e!==null&&typeof e=="object"}function Tg(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var a2=new WeakMap,Qa=0,dd=1,gl=2;function yl(e,t,r){let i=a2.get(e);if(i!==void 0)return i?gl:Qa;if(t.has(e))return gl;t.add(e);let n=Qa,a=u=>{if(n!==gl&&u?._zod){let d=yl(u,t,r);d>n&&(n=d)}},o=(u,d)=>{let m=Qa;for(let f of Reflect.ownKeys(u)){let p=Object.getOwnPropertyDescriptor(u,f);if(d&&!p.enumerable)continue;let v=p.get?dd:p.value?._zod?yl(p.value,t,r):Qa;v>m&&(m=v)}return m},s=u=>{u>n&&(n=u)},c=e._zod.def,l=c.type;switch(l){case"object":{let u=Ca(c);s(u?o(u,!0):dd),a(c.catchall);break}case"array":a(c.element);break;case"tuple":for(let u of c.items)a(u);a(c.rest);break;case"record":case"map":a(c.keyType),a(c.valueType);break;case"set":a(c.valueType);break;case"union":for(let u of c.options)a(u);break;case"intersection":a(c.left),a(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":a(c.innerType);break;case"pipe":a(c.in),a(c.out);break;case"function":a(c.input),a(c.output);break;case"lazy":{let u=c._cachedInner??(r?e._zod.innerType:void 0);s(u?yl(u,t,!1):dd);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let u in c){let d=Object.getOwnPropertyDescriptor(c,u);if(!d||d.get)continue;let m=d.value;if(!(!m||typeof m!="object")){if(m._zod)a(m);else if(Array.isArray(m))for(let f of m)a(f)}}}return t.delete(e),gq(e,n)}function gq(e,t){return t!==dd&&a2.set(e,t===gl),t}function md(e){return yl(e,new Set,!0)!==Qa}function yq(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}var cd,ud=[],xq={alloc(e,t,r){let i=cd;if(!i)return r;cd=void 0;let n={value:r,issues:null};return i.set(t.value,n),ud.push(n),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,i=(n,a)=>{if(a.direction!=="backward"&&pd(a,n.value))throw new fd;return r(n,a)};e._zod.parse=i,e._zod.run===r&&(e._zod.run=i)})},attach(e){var t;let r,i=!1,n,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let o=e._zod.parse,s=(c,l)=>{if(r===void 0){let b=yl(e,new Set,!1);if(b===Qa)return e._zod.parse=o,e._zod.run===s&&(e._zod.run=o),o(c,l);b===gl||i?r=!0:i=!0}let u=c.value;if(!i2(u))return o(c,l);let d=l[Ng];d||(d={buckets:new WeakMap,backEdges:void 0},l[Ng]=d);let m;n===l?m=a:(m=yq(d,e),n=l,a=m);let f=m.get(u);if(f)return c.value=f.value,f.issues?f.issues.length&&c.issues.push(...Tg(f.issues)):(c.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(f.value)),c;cd=m;let p=ud.length,v=o(c,l);cd=void 0;let h=ud.length>p?ud.pop():void 0;return v instanceof Promise?v.then(b=>(h&&(h.issues=b.issues.length?Tg(b.issues):n2),b)):(h&&(h.issues=v.issues.length?Tg(v.issues):n2),v)};e._zod.parse=s,e._zod.run===o&&(e._zod.run=s)})}};function xl(){return xq}function pd(e,t){let r=e[Ng]?.backEdges;return r!==void 0&&i2(t)&&r.has(t)}var zl={};Mr(zl,{ar:()=>o2,az:()=>s2,be:()=>c2,bg:()=>u2,bn:()=>d2,ca:()=>f2,ckb:()=>m2,cs:()=>p2,da:()=>v2,de:()=>h2,el:()=>b2,en:()=>vd,eo:()=>g2,es:()=>y2,fa:()=>x2,fi:()=>w2,fr:()=>z2,frCA:()=>P2,gu:()=>k2,he:()=>T2,hi:()=>N2,hr:()=>O2,hu:()=>S2,hy:()=>j2,id:()=>W2,is:()=>L2,it:()=>V2,ja:()=>q2,ka:()=>Z2,kh:()=>M2,km:()=>hd,kn:()=>H2,ko:()=>D2,lt:()=>F2,mk:()=>I2,ms:()=>E2,ne:()=>C2,nl:()=>J2,nn:()=>G2,no:()=>K2,ota:()=>A2,pl:()=>Y2,ps:()=>U2,pt:()=>B2,ptBR:()=>Q2,ro:()=>_2,ru:()=>e8,sk:()=>t8,sl:()=>r8,sv:()=>n8,ta:()=>i8,tg:()=>a8,th:()=>o8,tk:()=>s8,tr:()=>l8,ua:()=>c8,uk:()=>bd,ur:()=>u8,uz:()=>d8,vi:()=>f8,yo:()=>v8,zhCN:()=>m8,zhTW:()=>p8});var wq=()=>{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"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r={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",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",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",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\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 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\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 ${a}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return n.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 ${L(n.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: ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${a} ${n.maximum.toString()} ${o.unit??"\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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${a} ${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${a} ${n.minimum.toString()} ${o.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${a} ${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.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 "${n.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`${r[a.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${T(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.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 ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function o2(){return{localeError:wq()}}var zq=()=>{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"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${a}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${L(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${a}${n.maximum.toString()} ${o.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${a}${n.minimum.toString()} ${o.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${a.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:a.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${a.suffix}" il\u0259 bitm\u0259lidir`:a.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${a.includes}" daxil olmal\u0131d\u0131r`:a.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${a.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[a.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${T(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function s2(){return{localeError:zq()}}function l2(e,t,r,i){let n=Math.abs(e),a=n%10,o=n%100;return o>=11&&o<=19?i:a===1?t:a>=2&&a<=4?r:i}var Pq=()=>{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"},map:{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(n){return e[n]??null}let r={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",mac:"MAC \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",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${a}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return n.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 ${L(n.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 ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);if(o){let s=Number(n.maximum),c=l2(s,o.unit.one,o.unit.few,o.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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${o.verb} ${a}${n.maximum.toString()} ${c}`}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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);if(o){let s=Number(n.minimum),c=l2(s,o.unit.one,o.unit.few,o.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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${o.verb} ${a}${n.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[a.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${T(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function c2(){return{localeError:Pq()}}var kq=()=>{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"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={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",mac:"MAC \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",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${a}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${L(n.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 ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${a}${n.maximum.toString()} ${o.unit??"\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 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${a}${n.minimum.toString()} ${o.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;if(a.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 "${a.prefix}"`;if(a.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 "${a.suffix}"`;if(a.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 "${a.includes}"`;if(a.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 ${a.pattern}`;let o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return a.format==="emoji"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),a.format==="datetime"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),a.format==="date"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),a.format==="time"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),a.format==="duration"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${o} ${r[a.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${T(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function u2(){return{localeError:kq()}}var Tq=()=>{let e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(n){return e[n]??null}let r={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${a}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return n.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${L(n.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${T(n.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${n.origin??"\u09AE\u09BE\u09A8"} ${a}${n.maximum.toString()} ${o.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${n.origin??"\u09AE\u09BE\u09A8"} ${a}${n.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${n.origin} ${a}${n.minimum.toString()} ${o.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${n.origin} ${a}${n.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${a.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:a.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${a.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:a.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${a.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:a.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${a.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${r[a.format]??n.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${n.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${n.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${T(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${n.options.map(o=>`'${o}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${n.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function d2(){return{localeError:Tq()}}var Nq=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={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",mac:"adre\xE7a MAC",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",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${a}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${L(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${T(n.values," o ")}`;case"too_big":{let a=n.inclusive?"com a m\xE0xim":"menys de",o=t(n.origin);return o?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${a} ${n.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${a} ${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?"com a m\xEDnim":"m\xE9s de",o=t(n.origin);return o?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${a} ${n.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${a} ${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${a.prefix}"`:a.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${a.suffix}"`:a.format==="includes"?`Format inv\xE0lid: ha d'incloure "${a.includes}"`:a.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${a.pattern}`:`Format inv\xE0lid per a ${r[a.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${T(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function f2(){return{localeError:Nq()}}var Oq=()=>{let e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(n){return e[n]??null}let r={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},i={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o,c=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(u=>s.endsWith(u))?"\u06CC\u06D5":"\u06D5",l=/^[a-zA-Z]+$/.test(s);return o==="null"||o==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${a} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${l?"":c}`}case"invalid_value":return n.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${L(n.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${T(n.values,"|")}`;case"too_big":{let a=t(n.origin);return a?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${n.maximum.toString()} ${a.unit} ${a.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${n.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let a=t(n.origin);return a?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${n.minimum.toString()} ${a.unit} ${a.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${n.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${a.prefix}"`:a.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${a.suffix}"`:a.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${a.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:a.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${a.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${r[a.format]??n.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${n.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${T(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${n.options.map(o=>`'${o}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${n.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function m2(){return{localeError:Oq()}}var Sq=()=>{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"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r={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",mac:"MAC 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",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${a}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${L(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${a}${n.maximum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${a}${n.minimum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${a.prefix}"`:a.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${a.suffix}"`:a.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${a.includes}"`:a.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${a.pattern}`:`Neplatn\xFD form\xE1t ${r[a.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${T(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function p2(){return{localeError:Sq()}}var Xq=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${a}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${L(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin),s=i[n.origin]??n.origin;return o?`For stor: forventede ${s??"value"} ${o.verb} ${a} ${n.maximum.toString()} ${o.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${a} ${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin),s=i[n.origin]??n.origin;return o?`For lille: forventede ${s} ${o.verb} ${a} ${n.minimum.toString()} ${o.unit}`:`For lille: forventede ${s} havde ${a} ${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${r[a.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${T(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function v2(){return{localeError:Xq()}}var jq=()=>{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"},map:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${a}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${L(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${a}${n.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${a}${n.maximum.toString()} ist`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Zu klein: erwartet, dass ${n.origin} ${a}${n.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${a}${n.minimum.toString()} ist`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Ung\xFCltiger String: muss mit "${a.prefix}" beginnen`:a.format==="ends_with"?`Ung\xFCltiger String: muss mit "${a.suffix}" enden`:a.format==="includes"?`Ung\xFCltiger String: muss "${a.includes}" enthalten`:a.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${a.pattern} entsprechen`:`Ung\xFCltig: ${r[a.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${T(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function h2(){return{localeError:jq()}}var Wq=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(n){return e[n]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return typeof n.expected=="string"&&/^[A-Z]/.test(n.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${n.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${a}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return n.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${L(n.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${a}${n.maximum.toString()} ${o.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${a}${n.minimum.toString()} ${o.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${a.prefix}"`:a.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${a.suffix}"`:a.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${a.includes}"`:a.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${a.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[a.format]??n.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${T(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function b2(){return{localeError:Wq()}}var Lq=()=>{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"},map:{unit:"entries",verb:"to have"}};function t(a){return e[a]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};function n(a,o){return a==="number"&&typeof o=="number"&&!Number.isFinite(o)?String(o):i[a]??a}return a=>{switch(a.code){case"invalid_type":{let o=n(a.expected),s=q(a.input),c=n(s,a.input);return`Invalid input: expected ${o}, received ${c}`}case"invalid_value":return a.values.length===1?`Invalid input: expected ${L(a.values[0])}`:`Invalid option: expected one of ${T(a.values,"|")}`;case"too_big":{let o=a.exact?"exactly ":a.inclusive?"<=":"<",s=t(a.origin);return s?`Too big: expected ${a.origin??"value"} to have ${o}${a.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${a.origin??"value"} to be ${o}${a.maximum.toString()}`}case"too_small":{let o=a.exact?"exactly ":a.inclusive?">=":">",s=t(a.origin);return s?`Too small: expected ${a.origin} to have ${o}${a.minimum.toString()} ${s.unit}`:`Too small: expected ${a.origin} to be ${o}${a.minimum.toString()}`}case"invalid_format":{let o=a;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??a.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${a.divisor}`;case"unrecognized_keys":return`Unrecognized key${a.keys.length>1?"s":""}: ${T(a.keys,", ")}`;case"invalid_key":return`Invalid key in ${a.origin}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Invalid discriminator value. Expected ${a.options.map(s=>`'${s}'`).join(" | ")}`:a.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${a.origin}`;default:return"Invalid input"}}};function vd(){return{localeError:Lq()}}var Vq=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={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",mac:"MAC-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",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${a}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${L(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${a}${n.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${a}${n.minimum.toString()} ${o.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${a.prefix}"`:a.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${a.suffix}"`:a.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${a.includes}"`:a.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${a.pattern}`:`Nevalida ${r[a.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${T(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function g2(){return{localeError:Vq()}}var qq=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={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",mac:"direcci\xF3n MAC",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",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",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"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${a}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${L(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin),s=i[n.origin]??n.origin;return o?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${a}${n.maximum.toString()} ${o.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin),s=i[n.origin]??n.origin;return o?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${a}${n.minimum.toString()} ${o.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${r[a.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${T(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function y2(){return{localeError:qq()}}var Zq=()=>{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"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r={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",mac:"MAC \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",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${a} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${L(n.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 ${T(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${n.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${a}${n.minimum.toString()} ${o.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${a}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:a.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:a.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${a.includes}" \u0628\u0627\u0634\u062F`:a.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${a.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[a.format]??n.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 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${T(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.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 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function x2(){return{localeError:Zq()}}var Mq=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r={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",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${a}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${L(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Liian suuri: ${o.subject} t\xE4ytyy olla ${a}${n.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Liian pieni: ${o.subject} t\xE4ytyy olla ${a}${n.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${a.prefix}"`:a.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${a.suffix}"`:a.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${a.includes}"`:a.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${a.pattern}`:`Virheellinen ${r[a.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${T(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function w2(){return{localeError:Mq()}}var Hq=()=>{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(n){return e[n]??null}let r={regex:"expression r\xE9guli\xE8re",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",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instance de ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${a} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${L(n.values[0])} attendu`:`Option invalide : une valeur parmi ${T(n.values,"|")} attendue`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Trop grand : ${i[n.origin]??"valeur"} doit ${o.verb} ${a}${n.maximum.toString()} ${o.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[n.origin]??"valeur"} doit \xEAtre ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Trop petit : ${i[n.origin]??"valeur"} doit ${o.verb} ${a}${n.minimum.toString()} ${o.unit}`:`Trop petit : ${i[n.origin]??"valeur"} doit \xEAtre ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${a.pattern}`:`${r[a.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${T(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function z2(){return{localeError:Hq()}}var Dq=()=>{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"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={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",mac:"adresse MAC",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",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${a}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${L(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"\u2264":"<",o=t(n.origin);return o?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${a}${n.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?"\u2265":">",o=t(n.origin);return o?`Trop petit : attendu que ${n.origin} ait ${a}${n.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${n.origin} soit ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${a.pattern}`:`${r[a.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${T(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function P2(){return{localeError:Dq()}}var Rq=()=>{let e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(n){return e[n]??null}let r={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${a}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return n.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${L(n.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${T(n.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${n.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${a}${n.maximum.toString()} ${o.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${n.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${a}${n.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${n.origin} ${a}${n.minimum.toString()} ${o.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${n.origin} ${a}${n.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${a.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:a.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${a.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:a.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${a.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:a.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${a.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${r[a.format]??n.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${n.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${n.keys.length>1?"\u0A93":""}: ${T(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${n.options.map(o=>`'${o}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${n.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function k2(){return{localeError:Rq()}}var Fq=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=l=>l?e[l]:void 0,i=l=>{let u=r(l);return u?u.label:l??e.unknown.label},n=l=>`\u05D4${i(l)}`,a=l=>(r(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",o=l=>l?t[l]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let u=l.expected,d=c[u??""]??i(u),m=q(l.input),f=c[m]??e[m]?.label??m;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${L(l.values[0])}`;let u=l.values.map(f=>L(f));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let d=u[u.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let u=o(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let p=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}`}if(l.origin==="array"||l.origin==="set"){let p=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",v=l.inclusive?`${l.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${v}`.trim()}let m=l.inclusive?"<=":"<",f=a(l.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${l.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${l.maximum.toString()}`}case"too_small":{let u=o(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let p=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}`}if(l.origin==="array"||l.origin==="set"){let p=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let h=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`}let v=l.inclusive?`${l.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${v}`.trim()}let m=l.inclusive?">=":">",f=a(l.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${l.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${l.minimum.toString()}`}case"invalid_format":{let u=l;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${u.pattern}`;let d=s[u.format],m=d?.label??u.format,p=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${p}`}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 ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${T(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";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${n(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function T2(){return{localeError:Fq()}}var Iq=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(n){return e[n]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${a}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return n.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${L(n.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${a}${n.maximum} ${o.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin??"\u092E\u093E\u0928"} ${a}${n.maximum} \u0939\u094B`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin} \u092E\u0947\u0902 ${a}${n.minimum} ${o.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin} ${a}${n.minimum} \u0939\u094B`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${a.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:a.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${a.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:a.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${a.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:a.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${a.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[a.format]??n.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${n.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${n.keys.length>1?"\u092F\u093E\u0901":""}: ${T(n.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${n.origin} \u092E\u0947\u0902`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${n.options.map(o=>`'${o}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${n.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function N2(){return{localeError:Iq()}}var Eq=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={regex:"unos",email:"email 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:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${a}, a primljeno je ${s}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${L(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin),s=i[n.origin]??n.origin;return o?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${a}${n.maximum.toString()} ${o.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin),s=i[n.origin]??n.origin;return o?`Premalo: o\u010Dekivano da ${s} ima ${a}${n.minimum.toString()} ${o.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${a.prefix}"`:a.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${a.suffix}"`:a.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${a.includes}"`:a.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${a.pattern}`:`Neispravna ${r[a.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${T(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[n.origin]??n.origin}`;default:return"Neispravan unos"}}};function O2(){return{localeError:Eq()}}var Cq=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={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",mac:"MAC 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",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${a}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${L(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${a}${n.maximum.toString()} ${o.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${a}${n.minimum.toString()} ${o.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\xC9rv\xE9nytelen string: "${a.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:a.format==="ends_with"?`\xC9rv\xE9nytelen string: "${a.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:a.format==="includes"?`\xC9rv\xE9nytelen string: "${a.includes}" \xE9rt\xE9ket kell tartalmaznia`:a.format==="regex"?`\xC9rv\xE9nytelen string: ${a.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[a.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${T(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function S2(){return{localeError:Cq()}}function X2(e,t,r){return Math.abs(e)===1?t:r}function _a(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var Jq=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${a}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${L(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);if(o){let s=Number(n.maximum),c=X2(s,o.unit.one,o.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${_a(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${a}${n.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${_a(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);if(o){let s=Number(n.minimum),c=X2(s,o.unit.one,o.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${_a(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${a}${n.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${_a(n.origin)} \u056C\u056B\u0576\u056B ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${a.prefix}"-\u0578\u057E`:a.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${a.suffix}"-\u0578\u057E`:a.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${a.includes}"`:a.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${a.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[a.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${T(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${_a(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${_a(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function j2(){return{localeError:Jq()}}var Gq=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",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",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${a}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${L(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${a}${n.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Terlalu kecil: diharapkan ${n.origin} memiliki ${a}${n.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`String tidak valid: harus dimulai dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak valid: harus berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak valid: harus menyertakan "${a.includes}"`:a.format==="regex"?`String tidak valid: harus sesuai pola ${a.pattern}`:`${r[a.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${T(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function W2(){return{localeError:Gq()}}var Kq=()=>{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"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={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",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${a}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${L(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${a}${n.maximum.toString()} ${o.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${a}${n.minimum.toString()} ${o.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${a.prefix}"`:a.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${a.suffix}"`:a.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${a.includes}"`:a.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${a.pattern}`:`Rangt ${r[a.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${T(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function L2(){return{localeError:Kq()}}var Aq=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${a}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${L(n.values[0])}`:`Opzione non valida: atteso uno tra ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Troppo grande: ${n.origin??"valore"} deve avere ${a}${n.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Troppo piccolo: ${n.origin} deve avere ${a}${n.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${n.origin} deve essere ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Stringa non valida: deve iniziare con "${a.prefix}"`:a.format==="ends_with"?`Stringa non valida: deve terminare con "${a.suffix}"`:a.format==="includes"?`Stringa non valida: deve includere "${a.includes}"`:a.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${a.pattern}`:`Input non valido: ${r[a.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${T(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function V2(){return{localeError:Aq()}}var Uq=()=>{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"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r={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",mac:"MAC\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",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${a}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${L(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${T(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let a=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",o=t(n.origin);return o?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o.unit??"\u8981\u7D20"}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let a=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",o=t(n.origin);return o?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o.unit}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${a.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[a.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.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${n.keys.length>1?"\u7FA4":""}: ${T(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function q2(){return{localeError:Uq()}}var Yq=()=>{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"},map:{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(n){return e[n]??null}let r={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",mac:"MAC \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 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\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 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\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 ${a}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return n.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 ${L(n.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 ${T(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${o.verb} ${a}${n.maximum.toString()} ${o.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\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 ${n.origin} ${o.verb} ${a}${n.minimum.toString()} ${o.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 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${a.prefix}"-\u10D8\u10D7`:a.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${a.suffix}"-\u10D8\u10D7`:a.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${a.includes}"-\u10E1`:a.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\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 ${a.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[a.format]??n.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 ${n.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${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${T(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.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 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Z2(){return{localeError:Yq()}}var Bq=()=>{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"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r={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",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",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",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\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 instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\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 ${a} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return n.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 ${L(n.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 ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${a} ${n.maximum.toString()} ${o.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${a} ${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${a} ${n.minimum.toString()} ${o.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${a} ${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[a.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${T(n.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 ${n.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 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function hd(){return{localeError:Bq()}}function M2(){return hd()}var Qq=()=>{let e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(n){return e[n]??null}let r={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",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 \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${a}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return n.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${L(n.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${a}${n.maximum.toString()} ${o.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${a}${n.minimum.toString()} ${o.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${a.prefix}"`:a.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${a.suffix}"`:a.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${a.includes}"`:a.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${a.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${r[a.format]??n.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${n.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${n.keys.length>1?"s":""}: ${T(n.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.options.map(o=>`'${o}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${n.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function H2(){return{localeError:Qq()}}var _q=()=>{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"},map:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r={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",mac:"MAC \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",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${a}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${L(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${T(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let a=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",o=a==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${a}${o}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${a}${o}`}case"too_small":{let a=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",o=a==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${a}${o}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${a}${o}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:a.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:a.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:a.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${a.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[a.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${T(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function D2(){return{localeError:_q()}}var wl=e=>e.charAt(0).toUpperCase()+e.slice(1);function R2(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}var $q=()=>{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(n,a,o,s){let c=e[n]??null;return c===null?c:{unit:c.unit[a],verb:c.verb[s][o?"inclusive":"notInclusive"]}}let r={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",mac:"MAC 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",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${a}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${L(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${T(n.values,"|")} pasirinkim\u0173`;case"too_big":{let a=i[n.origin]??n.origin,o=t(n.origin,R2(Number(n.maximum)),n.inclusive??!1,"smaller");if(o?.verb)return`${wl(a??n.origin??"reik\u0161m\u0117")} ${o.verb} ${n.maximum.toString()} ${o.unit??"element\u0173"}`;let s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${wl(a??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${o?.unit}`}case"too_small":{let a=i[n.origin]??n.origin,o=t(n.origin,R2(Number(n.minimum)),n.inclusive??!1,"bigger");if(o?.verb)return`${wl(a??n.origin??"reik\u0161m\u0117")} ${o.verb} ${n.minimum.toString()} ${o.unit??"element\u0173"}`;let s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${wl(a??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${o?.unit}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${a.prefix}"`:a.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${a.suffix}"`:a.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${a.includes}"`:a.format==="regex"?`Eilut\u0117 privalo atitikti ${a.pattern}`:`Neteisingas ${r[a.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${T(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let a=i[n.origin]??n.origin;return`${wl(a??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function F2(){return{localeError:$q()}}var eZ=()=>{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"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r={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",mac:"MAC \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",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${a}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${L(n.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 ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${a}${n.maximum.toString()} ${o.unit??"\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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${a}${n.minimum.toString()} ${o.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`Invalid ${r[a.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`${n.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"}: ${T(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.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 ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function I2(){return{localeError:eZ()}}var tZ=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${a}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${L(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Terlalu besar: dijangka ${n.origin??"nilai"} ${o.verb} ${a}${n.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Terlalu kecil: dijangka ${n.origin} ${o.verb} ${a}${n.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`String tidak sah: mesti bermula dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak sah: mesti mengandungi "${a.includes}"`:a.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${a.pattern}`:`${r[a.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${T(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function E2(){return{localeError:tZ()}}var rZ=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(n){return e[n]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${a}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return n.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${L(n.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${n.origin??"\u092E\u093E\u0928"} \u092E\u093E ${a}${n.maximum.toString()} ${o.unit} ${o.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${n.origin??"\u092E\u093E\u0928"} ${a}${n.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${n.origin} \u092E\u093E ${a}${n.minimum.toString()} ${o.unit} ${o.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${n.origin} ${a}${n.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${a.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:a.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${a.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:a.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${a.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:a.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${a.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[a.format]??n.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${n.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${n.keys.length>1?"\u0939\u0930\u0942":""}: ${T(n.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${n.origin} \u092E\u093E`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${n.options.map(o=>`'${o}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${n.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function C2(){return{localeError:rZ()}}var nZ=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${a}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${L(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return o?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${a}${n.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${a}${n.maximum.toString()} is`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return o?`Te ${s}: verwacht dat ${n.origin} ${a}${n.minimum.toString()} ${o.unit} ${o.verb}`:`Te ${s}: verwacht dat ${n.origin} ${a}${n.minimum.toString()} is`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Ongeldige tekst: moet met "${a.prefix}" beginnen`:a.format==="ends_with"?`Ongeldige tekst: moet op "${a.suffix}" eindigen`:a.format==="includes"?`Ongeldige tekst: moet "${a.includes}" bevatten`:a.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}`:`Ongeldig: ${r[a.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${T(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function J2(){return{localeError:nZ()}}var iZ=()=>{let e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tal",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventa instanceof ${n.expected}, fekk ${s}`:`Ugyldig input: forventa ${a}, fekk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventa ${L(n.values[0])}`:`Ugyldig val: forventa eitt av ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`For stor(t): forventa ${n.origin??"value"} til \xE5 ha ${a}${n.maximum.toString()} ${o.unit??"element"}`:`For stor(t): forventa ${n.origin??"value"} til \xE5 ha ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`For lite(n): forventa ${n.origin} til \xE5 ha ${a}${n.minimum.toString()} ${o.unit}`:`For lite(n): forventa ${n.origin} til \xE5 ha ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${r[a.format]??n.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${T(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function G2(){return{localeError:iZ()}}var aZ=()=>{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"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${a}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${L(n.values[0])}`:`Ugyldig valg: forventet en av ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${a}${n.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`For lite(n): forventet ${n.origin} til \xE5 ha ${a}${n.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${r[a.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${T(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function K2(){return{localeError:aZ()}}var oZ=()=>{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"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={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",mac:"MAC 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",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${a}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${L(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${a}${n.maximum.toString()} ${o.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${a}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${a}${n.minimum.toString()} ${o.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${a}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let a=n;return a.format==="starts_with"?`F\xE2sit metin: "${a.prefix}" ile ba\u015Flamal\u0131.`:a.format==="ends_with"?`F\xE2sit metin: "${a.suffix}" ile bitmeli.`:a.format==="includes"?`F\xE2sit metin: "${a.includes}" ihtiv\xE2 etmeli.`:a.format==="regex"?`F\xE2sit metin: ${a.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[a.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${T(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function A2(){return{localeError:oZ()}}var sZ=()=>{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"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r={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",mac:"\u062F MAC \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",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${a} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${L(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${T(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${n.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${a}${n.minimum.toString()} ${o.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${a}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:a.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:a.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${a.includes}" \u0648\u0644\u0631\u064A`:a.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${a.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[a.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${T(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.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 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function U2(){return{localeError:sZ()}}var lZ=()=>{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"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r={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",mac:"adres MAC",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",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${a}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${L(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${n.maximum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${n.minimum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${a.prefix}"`:a.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${a.suffix}"`:a.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${a.includes}"`:a.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${a.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[a.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${T(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Y2(){return{localeError:lZ()}}var cZ=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(o){return e[o]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tuplo",articles:i.masculine},record:{name:"registo",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"ficheiro",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function a(o,s){let c=n[o]??{name:`valor "${o}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return o=>{switch(o.code){case"invalid_type":{let s=a(o.expected,"indefinite"),c=q(o.input),l=a(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${l}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: esperava ${L(o.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${T(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=t(o.origin);return c?`Demasiado grande: esperava que ${a(o.origin,"definite")} tivesse ${s} ${o.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: esperava que ${a(o.origin,"definite")} fosse ${s} ${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=t(o.origin);return c?`Demasiado pequeno: esperava que ${a(o.origin,"definite")} tivesse ${s} ${o.minimum.toString()} ${c.unit??"elementos"}`:`Demasiado pequeno: esperava que ${a(o.origin,"definite")} fosse ${s} ${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??o.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":{let s=o.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${T(o.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${a(o.origin,"definite")}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${o.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${a(o.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function B2(){return{localeError:cZ()}}var uZ=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(o){return e[o]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tupla",articles:i.feminine},record:{name:"registro",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"arquivo",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function a(o,s){let c=n[o]??{name:`valor "${o}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return o=>{switch(o.code){case"invalid_type":{let s=a(o.expected,"indefinite"),c=q(o.input),l=a(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${l}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: esperava ${L(o.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${T(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=t(o.origin);return c?`Grande demais: esperava que ${a(o.origin,"definite")} tivesse ${s} ${o.maximum.toString()} ${c.unit??"elementos"}`:`Grande demais: esperava que ${a(o.origin,"definite")} fosse ${s} ${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=t(o.origin);return c?`Pequeno demais: esperava que ${a(o.origin,"definite")} tivesse ${s} ${o.minimum.toString()} ${c.unit??"elementos"}`:`Pequeno demais: esperava que ${a(o.origin,"definite")} fosse ${s} ${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??o.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":{let s=o.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${T(o.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${a(o.origin,"definite")}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${o.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${a(o.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function Q2(){return{localeError:uZ()}}var dZ=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(n){return e[n]??null}let r={regex:"intrare",email:"adres\u0103 de 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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return`Intrare invalid\u0103: a\u0219teptat ${a}, primit ${s}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${L(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${o.verb} ${a}${n.maximum.toString()} ${o.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Prea mic: a\u0219teptat ca ${n.origin} ${o.verb} ${a}${n.minimum.toString()} ${o.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${a.prefix}"`:a.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${a.suffix}"`:a.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${a.includes}"`:a.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${a.pattern}`:`Format invalid: ${r[a.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${T(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}};function _2(){return{localeError:dZ()}}function $2(e,t,r,i){let n=Math.abs(e),a=n%10,o=n%100;return o>=11&&o<=19?i:a===1?t:a>=2&&a<=4?r:i}var fZ=()=>{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"},map:{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(n){return e[n]??null}let r={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",mac:"MAC \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",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${a}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${L(n.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 ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);if(o){let s=Number(n.maximum),c=$2(s,o.unit.one,o.unit.few,o.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${a}${n.maximum.toString()} ${c}`}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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);if(o){let s=Number(n.minimum),c=$2(s,o.unit.one,o.unit.few,o.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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${a}${n.minimum.toString()} ${c}`}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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[a.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${T(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function e8(){return{localeError:fZ()}}var mZ=()=>{let e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rny 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:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${n.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${a}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${L(n.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${n.origin??"hodnota"} mus\xED ma\u0165 ${a}${n.maximum.toString()} ${o.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${n.origin??"hodnota"} mus\xED by\u0165 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Hodnota je pr\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED ma\u0165 ${a}${n.minimum.toString()} ${o.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED by\u0165 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${a.prefix}"`:a.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${a.suffix}"`:a.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${a.includes}"`:a.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${a.pattern}`:`Neplatn\xFD form\xE1t ${r[a.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${T(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function t8(){return{localeError:mZ()}}var pZ=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={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",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${a}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${L(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${a}${n.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${a}${n.minimum.toString()} ${o.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${a.prefix}"`:a.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${a.suffix}"`:a.format==="includes"?`Neveljaven niz: mora vsebovati "${a.includes}"`:a.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${a.pattern}`:`Neveljaven ${r[a.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${T(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function r8(){return{localeError:pZ()}}var vZ=()=>{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"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r={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-adress",ipv6:"IPv6-adress",mac:"MAC-adress",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",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${a}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${L(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${a}${n.maximum.toString()} ${o.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${a}${n.minimum.toString()} ${o.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${a.prefix}"`:a.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${a.suffix}"`:a.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${a.includes}"`:a.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${a.pattern}"`:`Ogiltig(t) ${r[a.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${T(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function n8(){return{localeError:vZ()}}var hZ=()=>{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"},map:{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(n){return e[n]??null}let r={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",mac:"MAC \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",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\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 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\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 ${a}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return n.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 ${L(n.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 ${T(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${a}${n.maximum.toString()} ${o.unit??"\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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${a}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\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 ${n.origin} ${a}${n.minimum.toString()} ${o.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 ${n.origin} ${a}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${a.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 ${r[a.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.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${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${T(n.keys,", ")}`;case"invalid_key":return`${n.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`${n.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"}}};function i8(){return{localeError:hZ()}}var bZ=()=>{let e={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},i={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${a} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${s} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return n.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${L(n.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${T(n.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${n.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${a}${n.maximum.toString()} ${o.unit} ${o.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${n.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${a}${n.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${n.origin} \u0431\u043E\u044F\u0434 ${a}${n.minimum.toString()} ${o.unit} ${o.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${n.origin} \u0431\u043E\u044F\u0434 ${a}${n.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${a.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:a.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${a.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:a.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${a.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:a.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${a.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${r[a.format]??n.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${n.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${n.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${T(n.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${n.options.map(o=>`'${o}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${n.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function a8(){return{localeError:bZ()}}var gZ=()=>{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"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r={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",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",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)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\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 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\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 ${a} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${L(n.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 ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",o=t(n.origin);return o?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${n.maximum.toString()} ${o.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",o=t(n.origin);return o?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${n.minimum.toString()} ${o.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:a.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 ${a.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[a.format]??n.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 ${n.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: ${T(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.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 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function o8(){return{localeError:gZ()}}var yZ=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(n){return e[n]??null}let r={regex:"giri\u015F",email:"e-po\xE7ta salgysy",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 sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return`N\xE4dogry baha: gara\u015Fylan ${a} \xFDerine ${s} alyndy`}case"invalid_value":return n.values.length===1?`N\xE4dogry baha: ${L(n.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Has uly: gara\u015Fyl\xFDan ${n.origin??"baha"} ${a} ${n.maximum.toString()} ${o.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${n.origin??"baha"} ${a} ${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Has ki\xE7i: gara\u015Fyl\xFDan ${n.origin} ${a} ${n.minimum.toString()} ${o.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${n.origin} ${a} ${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`N\xE4dogry setir: "${a.prefix}" bilen ba\u015Flamaly`:a.format==="ends_with"?`N\xE4dogry setir: "${a.suffix}" bilen gutarmaly`:a.format==="includes"?`N\xE4dogry setir: "${a.includes}" saklamaly`:a.format==="regex"?`N\xE4dogry setir: ${a.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${r[a.format]??n.format}`}case"not_multiple_of":return`N\xE4dogry san: ${n.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${n.keys.length>1?"lar":""}: ${T(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${n.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function s8(){return{localeError:yZ()}}var xZ=()=>{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"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC 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",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${a}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${L(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${a}${n.maximum.toString()} ${o.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${a}${n.minimum.toString()} ${o.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Ge\xE7ersiz metin: "${a.prefix}" ile ba\u015Flamal\u0131`:a.format==="ends_with"?`Ge\xE7ersiz metin: "${a.suffix}" ile bitmeli`:a.format==="includes"?`Ge\xE7ersiz metin: "${a.includes}" i\xE7ermeli`:a.format==="regex"?`Ge\xE7ersiz metin: ${a.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[a.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${T(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function l8(){return{localeError:xZ()}}var wZ=()=>{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"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r={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",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",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",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\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 instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\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 ${a}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return n.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 ${L(n.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 ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${o.verb} ${a}${n.maximum.toString()} ${o.unit??"\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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${o.verb} ${a}${n.minimum.toString()} ${o.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[a.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${T(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function bd(){return{localeError:wZ()}}function c8(){return bd()}var zZ=()=>{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"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r={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",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \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",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${a} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${L(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${T(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${a}${n.maximum.toString()} ${o.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${a}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${a}${n.minimum.toString()} ${o.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${a}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${a.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[a.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.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${n.keys.length>1?"\u0632":""}: ${T(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function u8(){return{localeError:zZ()}}var PZ=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${a}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${L(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Juda katta: kutilgan ${n.origin??"qiymat"} ${a}${n.maximum.toString()} ${o.unit} ${o.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Juda kichik: kutilgan ${n.origin} ${a}${n.minimum.toString()} ${o.unit} ${o.verb}`:`Juda kichik: kutilgan ${n.origin} ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${a.prefix}" bilan boshlanishi kerak`:a.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${a.suffix}" bilan tugashi kerak`:a.format==="includes"?`Noto\u2018g\u2018ri satr: "${a.includes}" ni o\u2018z ichiga olishi kerak`:a.format==="regex"?`Noto\u2018g\u2018ri satr: ${a.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[a.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${T(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function d8(){return{localeError:PZ()}}var kZ=()=>{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"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r={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",mac:"\u0111\u1ECBa ch\u1EC9 MAC",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",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${a}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${L(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o.verb} ${a}${n.maximum.toString()} ${o.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o.verb} ${a}${n.minimum.toString()} ${o.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${a.prefix}"`:a.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${a.suffix}"`:a.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${a.includes}"`:a.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${a.pattern}`:`${r[a.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${T(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.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 ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function f8(){return{localeError:kZ()}}var TZ=()=>{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"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r={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",mac:"MAC\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",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${a}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${L(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${a}${n.maximum.toString()} ${o.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${a}${n.minimum.toString()} ${o.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.prefix}" \u5F00\u5934`:a.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.suffix}" \u7ED3\u5C3E`:a.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${a.pattern}`:`\u65E0\u6548${r[a.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${T(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function m8(){return{localeError:TZ()}}var NZ=()=>{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"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r={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",mac:"MAC \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",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${a}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${L(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${a}${n.maximum.toString()} ${o.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${a}${n.minimum.toString()} ${o.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.prefix}" \u958B\u982D`:a.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.suffix}" \u7D50\u5C3E`:a.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${a.pattern}`:`\u7121\u6548\u7684 ${r[a.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${T(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function p8(){return{localeError:NZ()}}var OZ=()=>{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"},map:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r={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",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",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",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let a=i[n.expected]??n.expected,o=q(n.input),s=i[o]??o;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${a}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${L(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${T(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",o=t(n.origin);return o?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${o.verb} ${a}${n.maximum} ${o.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${a}${n.maximum}`}case"too_small":{let a=n.inclusive?">=":">",o=t(n.origin);return o?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${o.verb} ${a}${n.minimum} ${o.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${a}${n.minimum}`}case"invalid_format":{let a=n;return a.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 "${a.prefix}"`:a.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${a.suffix}"`:a.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${a.includes}"`:a.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${a.pattern}`:`A\u1E63\xEC\u1E63e: ${r[a.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${T(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.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 ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function v8(){return{localeError:OZ()}}var h8,Og=Symbol("ZodOutput"),Sg=Symbol("ZodInput"),gd=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function yd(){return new gd}(h8=globalThis).__zod_globalRegistry??(h8.__zod_globalRegistry=yd());var lt=globalThis.__zod_globalRegistry;var Pt=Symbol.for("zod.compile.invalid"),b8=Symbol.for("zod.compile.fallback"),hr=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},ge=class extends Error{constructor(t,r=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=r}};function XZ(e,t){try{return wd(e,{assertOnly:!0})}catch{return t}}function Lg(e,t){try{let r=wd(e),i=xd(e,r);return i._zod.bag.validator=XZ(e,r),i}catch(r){if(t?.strict)throw r;return e}}function xd(e,t){if(md(e))throw new ge("a schema whose subtree contains a reference cycle");let r=Oe(e),i=e._zod.run,n=i.__originalRun??i,a=(o,s)=>{if(s?.async||s?.direction==="backward"||s?.skipChecks||s?.[b8]||s&&pd(s,o.value))return n(o,s);let c=t(o.value);return c!==Pt?(o.value=c,o):(s&&(s[b8]=!0),n(o,s))};return a.__originalRun=n,r._zod.bag.fallbackRun=n,r._zod.bag.validator=t,r._zod.run=a,i.__originalRun||jZ(r,e,t),r}function jZ(e,t,r){let i=e,n=t;if(typeof n.safeParse=="function"){let a=n.safeParse;i.safeParse=(o,s)=>{let c=r(o);return c!==Pt?{success:!0,data:c}:a(o,s)}}if(typeof n.parse=="function"){let a=n.parse;i.parse=(o,s)=>{let c=r(o);return c!==Pt?c:a(o,s)}}}function wd(e,t){let r=!0;try{r=md(e)}catch{}if(r)throw new ge("a schema whose subtree contains a reference cycle");let i={constants:new Map,constantCounter:0,varCounter:0,definite:!0},n=new zi(["input"]),a=Re(n,i,e,"input",!t?.assertOnly);n.write(a===null?"return true;":`return ${a};`);let o=["INVALID",...i.constants.keys()],s=[Pt,...i.constants.values()],c=n.content.join(`
|
|
85
|
+
`),l=t?.debug?o.length>0?`// Constants: ${o.join(", ")}
|
|
86
|
+
${c}`:c:"",u=Function,d=`return (input) => {
|
|
87
|
+
${c}
|
|
88
|
+
}`,m;try{m=new u(...o,d)(...s)}catch(f){throw new ge(`this schema (generated code failed to evaluate: ${f.message})`)}return t?.debug&&(m.code=l),m.definite=i.definite,m}function ce(e,t){for(let[i,n]of e.constants)if(n===t)return i;let r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function Ni(e,t){return e.definite=!1,ce(e,t)}function re(e){return`v${e.varCounter++}`}function WZ(e,t){let r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then=="function")return Pt;let i=r;return i.issues.length===0?i.value:Pt}function vt(e,t,r,i,n=!0){let a=e.content.length,o=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return Re(e,t,r,i,n)}catch(l){if(!(l instanceof ge)||!l.islandable)throw l;if(e.content.length=a,t.constants.size>o){let u=Array.from(t.constants.keys()).slice(o);for(let d of u)t.constants.delete(d)}return t.constantCounter=s,t.varCounter=c,LZ(e,t,r,i)}}function LZ(e,t,r,i){t.definite=!1;let n=ce(t,r),a=ce(t,WZ),o=re(t);return e.write(`const ${o} = ${a}(${n}, ${i});`),e.write(`if (${o} === INVALID) return INVALID;`),o}var VZ=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function qZ(e,t,r,i){let n=r._zod.def.checks;if(!n||n.length===0)return i;let a=i;for(let o of n){let s=o._zod.def;if(s.when&&!VZ.has(s.check))throw new ge('check with a custom "when" condition');switch(s.check){case"greater_than":ZZ(e,t,s,a);break;case"less_than":MZ(e,t,s,a);break;case"multiple_of":HZ(e,t,s,a);break;case"number_format":P8(e,s,a);break;case"min_length":{let c=ki(s.minimum,"min_length"),l=Xg(e,t,a,`${a}.length >= ${c} && ${a}.length < ${s.minimum*2}`);e.write(`if (${l} < ${c}) return INVALID;`);break}case"max_length":{let c=ki(s.maximum,"max_length"),l=Xg(e,t,a,`${a}.length > ${c}`);e.write(`if (${l} > ${c}) return INVALID;`);break}case"length_equals":{let c=ki(s.length,"length_equals"),l=Xg(e,t,a,`${a}.length >= ${c} && ${a}.length <= ${s.length*2}`);e.write(`if (${l} !== ${c}) return INVALID;`);break}case"min_size":e.write(`if (${a}.size < ${ki(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${a}.size > ${ki(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${a}.size !== ${ki(s.size,"size_equals")}) return INVALID;`);break;case"string_format":a=k8(e,t,s,a);break;case"custom":a=CZ(e,t,o,a);break;case"bigint_format":DZ(e,s,a);break;case"mime_type":RZ(e,t,s,a);break;case"property":IZ(e,t,s,a);break;case"properties":FZ(e,t,s,a);break;case"overwrite":{let c=re(t);EZ(e,t,o,a,c),a=c;break}default:throw new ge(`check type ${s.check}`)}}return a}function Xg(e,t,r,i){let n=ce(t,xi),a=re(t);return e.write(`const ${a} = typeof ${r} === "string" && ${i} ? ${n}(${r}) : ${r}.length;`),a}function ki(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new ge(`${t} bound of type ${typeof e}`);return`${e}`}function z8(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new ge("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new ge("comparison check with Invalid Date bound");return ce(e,t)}throw new ge(`comparison check bound of type ${typeof t}`)}function ZZ(e,t,r,i){let n=r.inclusive?"<":"<=";e.write(`if (${i} ${n} ${z8(t,r.value)}) return INVALID;`)}function MZ(e,t,r,i){let n=r.inclusive?">":">=";e.write(`if (${i} ${n} ${z8(t,r.value)}) return INVALID;`)}function HZ(e,t,r,i){if(typeof r.value=="bigint"){if(r.value===BigInt(0))throw new ge("multiple_of check with a zero divisor");e.write(`if (${i} % ${r.value}n !== 0n) return INVALID;`)}else{let n=ce(t,As);e.write(`if (${n}(${i}, ${ki(r.value,"multiple_of")}) !== 0) return INVALID;`)}}function P8(e,t,r){let i=t.format;switch(i){case"safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new ge(`number format ${i}`)}}function DZ(e,t,r){let i=t.format;if(i)switch(i){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new ge(`bigint format ${i}`)}}function RZ(e,t,r,i){let n=r.mime;if(n&&n.length>0){let a=ce(t,new Set(n));e.write(`if (!${a}.has(${i}.type)) return INVALID;`)}}function FZ(e,t,r,i){if(r.when)throw new ge('check with a custom "when" condition');e.write(`if (${i} == null) return INVALID;`);let n=r.shape;for(let a of Reflect.ownKeys(n)){let o=typeof a=="symbol"?ce(t,a):wt(a),s=re(t);e.write(`const ${s} = ${i}[${o}];`),vt(e,t,n[a],s,!1)}}function IZ(e,t,r,i){let n=`${i}[${JSON.stringify(r.property)}]`;Re(e,t,r.schema,n)}function EZ(e,t,r,i,n){let a=r._zod.def.tx;if(!a)throw new ge("overwrite check without a transform function");if(Oi(a))throw new hr("z.compile: async overwrite transforms are not supported");let o=ce(t,a);e.write(`const ${n} = ${o}(${i});`)}function jg(){throw new Wt}function Vg(e){this.issues.push(e)}function CZ(e,t,r,i){let n=r._zod.def;if(n.fn){if(Oi(n.fn))throw new hr("z.compile: async .refine() predicates are not supported");let a=Ni(t,n.fn),o=ce(t,jg),s=re(t);return e.write(`const ${s} = ${a}(${i});`),e.write(`if (${s} instanceof Promise) ${o}();`),e.write(`if (!${s}) return INVALID;`),i}if(r._zod.check){if(Oi(r._zod.check))throw new hr("z.compile: async .superRefine() / check functions are not supported");let a=r._zod.check,s=Ni(t,l=>{let u={value:l,issues:[],addIssue:Vg};return a(u)instanceof Promise&&jg(),u.issues.length===0?u.value:Pt}),c=re(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}throw new ge("custom check without a predicate or check function")}var JZ=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function k8(e,t,r,i,n=!0){let a=r.format;if(a==="base64"){let l=ce(t,fl);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(a==="base64url"){let l=ce(t,ed);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(a==="jwt"){let l=ce(t,nd),u=ce(t,r.alg??null);return e.write(`if (!${l}(${i}, ${u})) return INVALID;`),i}if(a==="ipv6"){let l=ce(t,dl);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(a==="cidrv6"){let l=ce(t,_u);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(a==="credit_card"){let l=ce(t,td);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(a==="iban"){let l=ce(t,rd);return e.write(`if (!${l}(${i})) return INVALID;`),i}let o=r;if(a==="url"||a==="httpurl"||o.normalize||o.hostname!==void 0||o.protocol!==void 0){let l=ce(t,Yu),u=ce(t,r),d=re(t),m=re(t);if(e.write(`const ${d} = ${i}.trim();`),e.write(`const ${m} = ${l}(${d}, ${u});`),e.write(`if (typeof ${m} === "number") return INVALID;`),o.hostname!==void 0){let v=ce(t,Bu);e.write(`if (!${v}(${m}, ${u}.hostname)) return INVALID;`)}if(o.protocol!==void 0){let v=ce(t,Qu);e.write(`if (!${v}(${m}, ${u}.protocol)) return INVALID;`)}if(!n)return null;let f=re(t),p=o.normalize?`${m}.href`:`${ce(t,ul)}(${d})`;return e.write(`const ${f} = ${p};`),f}let s=r.fn;if(s){if(Oi(s))throw new ge(`async string format ${a}`);let l=ce(t,s);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(JZ.has(a)&&r.pattern){let l=ce(t,r.pattern);return e.write(`${l}.lastIndex = 0;`),e.write(`if (!${l}.test(${i})) return INVALID;`),i}let c=r.format;switch(c){case"regex":throw new ge("regex format without a pattern");case"lowercase":e.write(`if (${i} !== ${i}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${i} !== ${i}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${i}.includes(${wt(r.includes)})) return INVALID;`);break;case"starts_with":{let l=r.prefix;e.write(`if (${i}.slice(0, ${l.length}) !== ${wt(l)}) return INVALID;`);break}case"ends_with":{let l=r.suffix;e.write(`if (${i}.slice(-${l.length}) !== ${wt(l)}) return INVALID;`);break}default:throw new ge(`string format ${c}`)}return i}function Re(e,t,r,i,n=!0){let a=r._zod.def,o=a.type;if(a.coerce)throw new ge(`coercion (z.coerce.${o}())`);let s=n||!!a.checks?.length,c;switch(o){case"string":c=GZ(e,t,r,i,s);break;case"number":c=KZ(e,r,i);break;case"boolean":c=AZ(e,i);break;case"bigint":c=UZ(e,r,i);break;case"symbol":c=YZ(e,i);break;case"undefined":c=BZ(e,i);break;case"null":c=QZ(e,i);break;case"any":case"unknown":c=i;break;case"never":e.write("return INVALID;"),c=i;break;case"void":c=_Z(e,i);break;case"nan":c=$Z(e,i);break;case"date":c=eM(e,i);break;case"object":c=tM(e,t,r,i,s);break;case"optional":c=rM(e,t,r,i,s);break;case"nullable":c=aM(e,t,r,i,s);break;case"array":c=oM(e,t,r,i,s);break;case"literal":c=sM(e,t,r,i);break;case"enum":c=lM(e,t,r,i);break;case"readonly":{let l=y8(e,t,r,i),u=re(t);e.write(`const ${u} = Object.freeze(${l});`),c=u;break}case"success":y8(e,t,r,i),c="true";break;case"default":case"prefault":c=cM(e,t,r,i);break;case"nonoptional":c=uM(e,t,r,i);break;case"tuple":c=dM(e,t,r,i);break;case"union":c=fM(e,t,r,i);break;case"intersection":c=vM(e,t,r,i);break;case"record":c=hM(e,t,r,i);break;case"map":c=gM(e,t,r,i);break;case"set":c=yM(e,t,r,i);break;case"file":c=xM(e,i);break;case"template_literal":c=wM(e,t,r,i);break;case"lazy":c=zM(e,t,r,i);break;case"pipe":c=PM(e,t,r,i);break;case"custom":c=kM(e,t,r,i);break;case"transform":c=OM(e,t,r,i);break;case"catch":c=NM(e,t,r,i);break;default:throw new ge(`schema type ${o}`)}return c===null?null:qZ(e,t,r,c)}function GZ(e,t,r,i,n=!0){e.write(`if (typeof ${i} !== "string") return INVALID;`);let a=r._zod.def;return a.format===void 0?i:k8(e,t,a,i,n)}function KZ(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);let i=t._zod.def;return i.check==="number_format"&&i.format&&P8(e,{format:i.format},r),r}function AZ(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function UZ(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);let i=t._zod.def;if(i.format)switch(i.format){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function YZ(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function BZ(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function QZ(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function _Z(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function $Z(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function eM(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function tM(e,t,r,i,n=!0){let a=r._zod.def;e.write(`if (typeof ${i} !== "object" || ${i} === null || Array.isArray(${i})) return INVALID;`);let o=a.shape,s=Object.keys(o),c=Object.getOwnPropertySymbols(o),l=c.length?[...s,...c]:s,u=g=>typeof g=="symbol"?ce(t,g):wt(g),d=g=>typeof g=="symbol"?`[${u(g)}]`:wt(g),m=o;if(s.includes("__proto__"))throw new ge('object shape key "__proto__"');let f=new Map;for(let g of l){let y=m[g],x=u(g),z=re(t);if(e.write(`const ${z} = ${i}[${x}];`),y._zod.optin!==void 0){let N=re(t);e.write(`let ${N} = (() => {`),e.indented(P=>{let O=vt(P,t,y,z);P.write(`return ${O};`)}),e.write("})();"),y._zod.optout==="optional"?(e.write(`if (${N} === INVALID) {`),e.indented(P=>{P.write(`if (${x} in ${i}) return INVALID;`),P.write(`${N} = undefined;`)}),e.write("}")):e.write(`if (${N} === INVALID) return INVALID;`),f.set(g,N)}else{iM(y)&&e.write(`if (!(${x} in ${i})) return INVALID;`);let N=vt(e,t,y,z,n);N!==null&&f.set(g,N)}}let p=a.catchall,v="none";if(p){let g=p._zod.def.type;if(g==="never"){let y=s.map(x=>`k !== ${wt(x)}`).join(" && ")||"true";e.write(`for (const k in ${i}) {`),e.indented(x=>{x.write(`if (${y}) return INVALID;`)}),e.write("}")}else(g==="unknown"||g==="any")&&!p._zod.def.checks?.length?v="passthrough":v="schema"}let h=re(t),b=l.some(g=>g8(m[g])||Wg(m[g]));if(!n){if(v==="schema"){let g=s.length>0?ce(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(y=>{y.write('if (k === "__proto__") continue;'),g&&y.write(`if (${g}.has(k)) continue;`);let x=re(t);y.write(`const ${x} = ${i}[k];`),vt(y,t,p,x,!1)}),e.write("}")}return null}if(b){e.write(`const ${h} = {};`);for(let g of l){let y=u(g),x=f.get(g);Wg(m[g])?e.write(`if (${y} in ${i}) ${h}[${y}] = ${x};`):g8(m[g])?e.write(`if (${x} !== undefined || ${y} in ${i}) ${h}[${y}] = ${x};`):e.write(`${h}[${y}] = ${x};`)}}else{let g=l.map(y=>`${d(y)}: ${f.get(y)}`).join(", ");e.write(`const ${h} = { ${g} };`)}if(v!=="none"){let g=s.length>0?ce(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(y=>{if(y.write('if (k === "__proto__") continue;'),g&&y.write(`if (${g}.has(k)) continue;`),v==="passthrough")y.write(`${h}[k] = ${i}[k];`);else{let x=re(t);y.write(`const ${x} = ${i}[k];`);let z=vt(y,t,p,x);y.write(`${h}[k] = ${z};`)}}),e.write("}")}return h}function rM(e,t,r,i,n=!0){let a=r._zod.def;if(nM(r))return Re(e,t,a.innerType,i,n);if(a.innerType._zod.optin==="defaulted"){let s=re(t),c=re(t);return e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(l=>{l.write(`const ${c} = (() => {`),l.indented(u=>{let d=Re(u,t,a.innerType,i);u.write(`return ${d};`)}),l.write("})();"),l.write(`if (${c} !== INVALID) ${s} = ${c};`)}),e.write("} else {"),e.indented(l=>{let u=Re(l,t,a.innerType,i);l.write(`${s} = ${u};`)}),e.write("}"),s}let o=n?re(t):null;return o&&e.write(`let ${o};`),e.write(`if (${i} !== undefined) {`),e.indented(s=>{let c=Re(s,t,a.innerType,i,n);o&&c!==null&&s.write(`${o} = ${c};`)}),e.write("}"),o}function nM(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function iM(e){return e._zod.optin===void 0&&Ti(e)}function Ti(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?Ti(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?Ti(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(Ti):!0;case"intersection":return!t.left||!t.right?!0:Ti(t.left)&&Ti(t.right);case"pipe":return t.in?Ti(t.in):!0;default:return!0}}function Wg(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function g8(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&$a(e)}function $a(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?$a(t.innerType):!0;case"union":return t.options?t.options.some($a):!0;case"intersection":return!t.left||!t.right||$a(t.left)||$a(t.right);case"pipe":return t.out?$a(t.out):!0;default:return!0}}function aM(e,t,r,i,n=!0){let a=r._zod.def,o=n?re(t):null;return o&&e.write(`let ${o} = null;`),e.write(`if (${i} !== null) {`),e.indented(s=>{let c=Re(s,t,a.innerType,i,n);o&&c!==null&&s.write(`${o} = ${c};`)}),e.write("}"),o}function oM(e,t,r,i,n=!0){let a=r._zod.def;e.write(`if (!Array.isArray(${i})) return INVALID;`);let o=n?re(t):null,s=re(t),c=re(t);return o&&e.write(`const ${o} = new Array(${i}.length);`),e.write(`for (let ${s} = 0; ${s} < ${i}.length; ${s}++) {`),e.indented(l=>{l.write(`const ${c} = ${i}[${s}];`);let u=vt(l,t,a.element,c,n);o&&u!==null&&l.write(`${o}[${s}] = ${u};`)}),e.write("}"),o}function sM(e,t,r,i){let a=r._zod.def.values;if(a.length!==1){let s=ce(t,new Set(a));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}let o=a[0];if(typeof o=="number"&&Number.isNaN(o)){let s=ce(t,new Set(a));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}if(typeof o=="string")e.write(`if (${i} !== ${wt(o)}) return INVALID;`);else if(typeof o=="number"||typeof o=="boolean")e.write(`if (${i} !== ${o}) return INVALID;`);else if(o===null)e.write(`if (${i} !== null) return INVALID;`);else if(o===void 0)e.write(`if (${i} !== undefined) return INVALID;`);else if(typeof o=="bigint")e.write(`if (${i} !== ${o}n) return INVALID;`);else throw new ge(`literal type ${typeof o}`);return i}function lM(e,t,r,i){let n=r._zod.values;if(!n)throw new ge("enum schema without enumerated values");let a=ce(t,n);return e.write(`if (!${a}.has(${i})) return INVALID;`),i}function y8(e,t,r,i){let n=r._zod.def;return Re(e,t,n.innerType,i)}function cM(e,t,r,i){let n=r._zod.def,o=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!o)return Re(e,t,n.innerType,i);let c=ce(t,o),l=re(t);return e.write(`let ${l} = ${i};`),e.write(`if (${i} === undefined) ${l} = ${c}();`),Re(e,t,n.innerType,l)}let s=re(t);if(o){let c=ce(t,o),l=ce(t,Us);e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(u=>{u.write(`${s} = ${l}(${c}());`)}),e.write("} else {"),e.indented(u=>{let d=Re(u,t,n.innerType,i);u.write(`${s} = ${d} === undefined ? ${l}(${c}()) : ${d};`)}),e.write("}")}else e.write(`let ${s};`),e.write(`if (${i} !== undefined) {`),e.indented(c=>{let l=Re(c,t,n.innerType,i);c.write(`${s} = ${l};`)}),e.write("}");return s}function uM(e,t,r,i){let n=r._zod.def,a=Re(e,t,n.innerType,i),o=re(t);return e.write(`const ${o} = ${a};`),e.write(`if (${o} === undefined) return INVALID;`),o}function dM(e,t,r,i){let n=r._zod.def,a=n.items,o=n.rest;e.write(`if (!Array.isArray(${i})) return INVALID;`);let s=x8(a,"optin"),c=x8(a,"optout");o?e.write(`if (${i}.length < ${s}) return INVALID;`):e.write(`if (${i}.length < ${s} || ${i}.length > ${a.length}) return INVALID;`);let l=re(t);e.write(`const ${l} = [];`);for(let u=0;u<a.length;u++){let d=a[u];if(u>=c)e.write(`if (${l}.length === ${u}) {`),e.indented(m=>{m.write(`if (${u} < ${i}.length) {`),m.indented(f=>{let p=re(t);f.write(`const ${p} = ${i}[${u}];`);let v=vt(f,t,d,p);f.write(`${l}[${u}] = ${v};`)}),m.write("} else {"),m.indented(f=>{if(Wg(d)){f.write(`${l}.length = ${u};`);return}let p=re(t),v=re(t);f.write(`const ${p} = undefined;`),f.write(`const ${v} = (() => {`),f.indented(h=>{let b=vt(h,t,d,p);h.write(`return ${b};`)}),f.write("})();"),f.write(`if (${v} === INVALID || ${v} === undefined) ${l}.length = ${u};`),f.write(`else ${l}[${u}] = ${v};`)}),m.write("}")}),e.write("}");else{let m=re(t);e.write(`const ${m} = ${i}[${u}];`);let f=vt(e,t,d,m);e.write(`${l}[${u}] = ${f};`)}}if(o){let u=re(t),d=re(t);e.write(`for (let ${u} = ${a.length}; ${u} < ${i}.length; ${u}++) {`),e.indented(m=>{m.write(`const ${d} = ${i}[${u}];`);let f=vt(m,t,o,d);m.write(`${l}[${u}] = ${f};`)}),e.write("}")}return l}function x8(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function fM(e,t,r,i){let n=r._zod.def,a=n.options;if(n.discriminator)return mM(e,t,n,i);if(n.inclusive===!1)throw new ge("exclusive unions (z.xor)");if(a.length===0)return e.write("return INVALID;"),i;if(a.length===1)return Re(e,t,a[0],i);if(a.every(c=>c._zod.def.type==="literal"&&!c._zod.def.checks?.length)){let c=new Set(a.flatMap(u=>u._zod.def.values)),l=ce(t,c);return e.write(`if (!${l}.has(${i})) return INVALID;`),i}let s=re(t);e.write(`let ${s};`);for(let c=0;c<a.length;c++){let l=a[c];c===0?e.write(`${s} = (() => {`):e.write(`if (${s} === INVALID) ${s} = (() => {`),e.indented(u=>{let d=Re(u,t,l,i);u.write(`return ${d};`)}),e.write("})();")}return e.write(`if (${s} === INVALID) return INVALID;`),s}function mM(e,t,r,i){if(r.unionFallback)throw new ge("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),i;let n=re(t),a=re(t);e.write(`const ${n} = ${i}?.[${wt(r.discriminator)}];`),e.write(`let ${a};`);let o=!0,s=new Set;for(let c of r.options){let l=c._zod.propValues?.[r.discriminator];if(!l||l.size===0)throw new ge("discriminated union option without static discriminator values");for(let m of l){if(s.has(m))throw new ge(`duplicate discriminator value ${String(m)}`);s.add(m)}let u=Array.from(l,m=>pM(t,n,m)),d=o?"if":"else if";e.write(`${d} (${u.join(" || ")}) {`),e.indented(m=>{let f=Re(m,t,c,i);m.write(`${a} = ${f};`)}),e.write("}"),o=!1}return e.write("else { return INVALID; }"),a}function pM(e,t,r){if(typeof r=="string")return`${t} === ${wt(r)}`;if(typeof r=="number")return Number.isNaN(r)?`Number.isNaN(${t})`:`${t} === ${r}`;if(typeof r=="boolean")return`${t} === ${r}`;if(r===null)return`${t} === null`;if(r===void 0)return`${t} === undefined`;if(typeof r=="bigint")return`${t} === ${r}n`;if(typeof r=="symbol"){let i=ce(e,r);return`${t} === ${i}`}throw new ge(`literal discriminator value ${String(r)}`)}function vM(e,t,r,i){let n=r._zod.def;t.definite=!1;let a=vt(e,t,n.left,i),o=vt(e,t,n.right,i),s=ce(t,Ba),c=re(t);return e.write(`const ${c} = ${s}(${a}, ${o});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function hM(e,t,r,i){let n=r._zod.def,a=ce(t,_t);e.write(`if (!${a}(${i})) return INVALID;`);let o=re(t),s=re(t),c=re(t);e.write(`const ${o} = {};`);let l=n,u=l.partial?void 0:n.keyType._zod.values;if(u){let f=[];for(let v of u){if(!(typeof v=="string"||typeof v=="number"||typeof v=="symbol"))throw new ge(`record key value ${String(v)}`);let h=typeof v=="number"?v.toString():v;if(h==="__proto__")throw new ge('record key "__proto__"');f.push(h);let b=ce(t,v),g=Re(e,t,n.keyType,b),y=re(t);e.write(`const ${y} = ${i}[${bM(t,h)}];`);let x=vt(e,t,n.valueType,y);e.write(`${o}[${g}] = ${x};`)}let p=ce(t,new Set(f));return e.write(`for (const ${s} in ${i}) {`),e.indented(v=>{v.write(`if (${p}.has(${s})) continue;`),l.mode==="loose"?v.write(`if (${s} !== "__proto__") ${o}[${s}] = ${i}[${s}];`):v.write("return INVALID;")}),e.write("}"),o}let d=n.keyType._zod.def;if(!(d.type==="string"&&d.format===void 0&&!d.coerce&&(d.checks?.length??0)===0)){let f=n.mode==="loose",p=wd(n.keyType);p.definite===!1&&(t.definite=!1);let v=ce(t,p),h=ce(t,on),b=re(t);return w8(e,t,i,s,g=>{g.write(`let ${b} = ${v}(${s});`),g.write(`if (${b} === INVALID && typeof ${s} === "string" && ${h}.test(${s})) ${b} = ${v}(Number(${s}));`),f?g.write(`if (${b} === INVALID) { ${o}[${s}] = ${i}[${s}]; continue; }`):g.write(`if (${b} === INVALID) return INVALID;`),g.write(`if (${b} === "__proto__") continue;`);let y=re(t);g.write(`const ${y} = ${i}[${s}];`);let x=vt(g,t,n.valueType,y);g.write(`${o}[${b}] = ${x};`)}),o}return w8(e,t,i,s,f=>{f.write(`const ${c} = ${i}[${s}];`);let p=vt(f,t,n.valueType,c);f.write(`${o}[${s}] = ${p};`)},"return INVALID;"),o}function w8(e,t,r,i,n,a){let o=ce(t,Object.prototype.propertyIsEnumerable),s=re(t),c=re(t),l=re(t);e.write(`const ${s} = Object.getOwnPropertySymbols(${r});`),e.write(`const ${c} = Object.getOwnPropertyNames(${r});`),e.write(`for (let ${l} = 0; ${l} < ${c}.length; ${l}++) {`),e.indented(u=>{u.write(`const ${i} = ${c}[${l}];`),u.write(`if (${i} === "__proto__" || !${o}.call(${r}, ${i})) continue;`),n(u)}),e.write("}"),e.write(`for (let ${l} = 0; ${l} < ${s}.length; ${l}++) {`),e.indented(u=>{u.write(`const ${i} = ${s}[${l}];`),u.write(`if (!${o}.call(${r}, ${i})) continue;`),a?u.write(a):n(u)}),e.write("}")}function bM(e,t){return typeof t=="string"?wt(t):ce(e,t)}function gM(e,t,r,i){let n=r._zod.def;e.write(`if (!(${i} instanceof Map)) return INVALID;`);let a=re(t),o=re(t),s=re(t);return e.write(`const ${a} = new Map();`),e.write(`for (const [${o}, ${s}] of ${i}) {`),e.indented(c=>{let l=Re(c,t,n.keyType,o),u=Re(c,t,n.valueType,s);c.write(`${a}.set(${l}, ${u});`)}),e.write("}"),a}function yM(e,t,r,i){let n=r._zod.def;e.write(`if (!(${i} instanceof Set)) return INVALID;`);let a=re(t),o=re(t);return e.write(`const ${a} = new Set();`),e.write(`for (const ${o} of ${i}) {`),e.indented(s=>{let c=Re(s,t,n.valueType,o);s.write(`${a}.add(${c});`)}),e.write("}"),a}function xM(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function wM(e,t,r,i){e.write(`if (typeof ${i} !== "string") return INVALID;`);let n=r._zod.pattern;if(n){let a=ce(t,n);e.write(`${a}.lastIndex = 0;`),e.write(`if (!${a}.test(${i})) return INVALID;`)}return i}function zM(e,t,r,i){let n=r._zod.def,a=Ni(t,n.getter),o=ce(t,{parser:null});e.write(`if (!${o}.parser) {`),e.indented(c=>{c.write(`const inner = ${a}();`),c.write(`${o}.parser = function(input) {`),c.indented(l=>{l.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),l.write("return result.issues.length === 0 ? result.value : INVALID;")}),c.write("};")}),e.write("}");let s=re(t);return e.write(`const ${s} = ${o}.parser(${i});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function PM(e,t,r,i){let n=r._zod.def,a=Re(e,t,n.in,i);if(n.transform){if(Oi(n.transform))throw new hr("z.compile: async transforms in pipes are not supported");let o=n.transform,c=Ni(t,u=>{let d={value:u,issues:[],addIssue:Vg},m=o(u,d);return m instanceof Promise?Pt:d.issues.length===0?m:Pt}),l=re(t);return e.write(`const ${l} = ${c}(${a});`),e.write(`if (${l} === INVALID) return INVALID;`),Re(e,t,n.out,l)}else return Re(e,t,n.out,a)}function Oi(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function kM(e,t,r,i){let n=r._zod.def;if(n.fn){if(Oi(n.fn))throw new hr("z.compile: async custom predicates are not supported");let a=Ni(t,n.fn),o=ce(t,jg),s=re(t);e.write(`const ${s} = ${a}(${i});`),e.write(`if (${s} instanceof Promise) ${o}();`),e.write(`if (!${s}) return INVALID;`)}else throw new ge("custom schema without a predicate function");return i}function TM(e,t,r){let i=e._zod.run({value:r,issues:[]},{});if(i&&typeof i.then=="function")return Pt;let n=i;return n.issues.length===0?n.value:t()}function NM(e,t,r,i){let n=r._zod.def;if(!n.catchValue[Nu])throw new ge("catch with a callback (only a constant catch value compiles)",!1);let a=re(t);e.write(`let ${a} = (() => {`),e.indented(l=>{let u=vt(l,t,n.innerType,i);l.write(`return ${u};`)}),e.write("})();");let o=ce(t,n.innerType),s=Ni(t,n.catchValue),c=ce(t,TM);return e.write(`if (${a} === INVALID) {`),e.indented(l=>{l.write(`${a} = ${c}(${o}, ${s}, ${i});`),l.write(`if (${a} === INVALID) return INVALID;`)}),e.write("}"),a}function OM(e,t,r,i){let n=r._zod.def;if(n.transform){if(Oi(n.transform))throw new hr("z.compile: async transforms are not supported");let a=n.transform,s=Ni(t,l=>{let u={value:l,issues:[],addIssue:Vg},d=a(l,u);return d instanceof Promise?Pt:u.issues.length===0?d:Pt}),c=re(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}return i}function zd(e){return e.checks&&(e.checks=[...e.checks]),e}function qg(e,t){return new e(zd({type:"string",...C(t)}))}function Zg(e,t){return new e(zd({type:"string",coerce:!0,...C(t)}))}function Pd(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...C(t)})}function kd(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...C(t)})}function Td(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...C(t)})}function Nd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C(t)})}function Od(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C(t)})}function Sd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C(t)})}function Pl(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...C(t)})}function Xd(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...C(t)})}function jd(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...C(t)})}function Wd(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...C(t)})}function Ld(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...C(t)})}function Vd(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...C(t)})}function qd(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...C(t)})}function Zd(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...C(t)})}function Md(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...C(t)})}function Hd(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...C(t)})}function Mg(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...C(t)})}function Dd(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C(t)})}function Rd(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C(t)})}function Fd(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...C(t)})}function Id(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...C(t)})}function Ed(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...C(t)})}function Hg(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...C(t)})}function Dg(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,...C(t)})}function Cd(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...C(t)})}var Rg={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function kl(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C(t)})}function Tl(e,t){return new e({type:"string",format:"date",check:"string_format",...C(t)})}function Nl(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...C(t)})}function Ol(e,t){return new e({type:"string",format:"duration",check:"string_format",...C(t)})}function Fg(e,t){return new e(zd({type:"number",checks:[],...C(t)}))}function Ig(e,t){return new e(zd({type:"number",coerce:!0,checks:[],...C(t)}))}function Eg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...C(t)})}function Cg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...C(t)})}function Jg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...C(t)})}function Gg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...C(t)})}function Kg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...C(t)})}function Ag(e,t){return new e({type:"boolean",...C(t)})}function Ug(e,t){return new e({type:"boolean",coerce:!0,...C(t)})}function Yg(e,t){return new e({type:"bigint",...C(t)})}function Bg(e,t){return new e({type:"bigint",coerce:!0,...C(t)})}function Qg(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...C(t)})}function _g(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...C(t)})}function $g(e,t){return new e({type:"symbol",...C(t)})}function ey(e,t){return new e({type:"undefined",...C(t)})}function ty(e,t){return new e({type:"null",...C(t)})}function ry(e){return new e({type:"any"})}function ny(e){return new e({type:"unknown"})}function iy(e,t){return new e({type:"never",...C(t)})}function ay(e,t){return new e({type:"void",...C(t)})}function oy(e,t){return new e({type:"date",...C(t)})}function sy(e,t){return new e({type:"date",coerce:!0,...C(t)})}function ly(e,t){return new e({type:"nan",...C(t)})}function jr(e,t){return new Eu({check:"less_than",...C(t),value:e,inclusive:!1})}function Ct(e,t){return new Eu({check:"less_than",...C(t),value:e,inclusive:!0})}function Wr(e,t){return new Cu({check:"greater_than",...C(t),value:e,inclusive:!1})}function Jt(e,t){return new Cu({check:"greater_than",...C(t),value:e,inclusive:!0})}function Jd(e){return Wr(0,e)}function Gd(e){return jr(0,e)}function Kd(e){return Ct(0,e)}function Ad(e){return Jt(0,e)}function qn(e,t){return new Kh({check:"multiple_of",...C(t),value:e})}function Zn(e,t){return new Yh({check:"max_size",...C(t),maximum:e})}function Lr(e,t){return new Bh({check:"min_size",...C(t),minimum:e})}function Si(e,t){return new Qh({check:"size_equals",...C(t),size:e})}function Xi(e,t){return new _h({check:"max_length",...C(t),maximum:e})}function sn(e,t){return new $h({check:"min_length",...C(t),minimum:e})}function ji(e,t){return new eb({check:"length_equals",...C(t),length:e})}function eo(e,t){return new tb({check:"string_format",format:"regex",...C(t),pattern:e})}function to(e){return new rb({check:"string_format",format:"lowercase",...C(e)})}function ro(e){return new nb({check:"string_format",format:"uppercase",...C(e)})}function no(e,t){return new ib({check:"string_format",format:"includes",...C(t),includes:e})}function io(e,t){return new ab({check:"string_format",format:"starts_with",...C(t),prefix:e})}function ao(e,t){return new ob({check:"string_format",format:"ends_with",...C(t),suffix:e})}function Ud(e,t,r){return new sb({check:"property",property:e,schema:t,...C(r)})}function oo(e,t){return new lb({check:"properties",shape:e,...C(t)})}function so(e,t){return new cb({check:"mime_type",mime:e,...C(t)})}function br(e){return new ub({check:"overwrite",tx:e})}function lo(e){return br(t=>t.normalize(e))}function co(){return br(e=>e.trim())}function uo(){return br(e=>e.toLowerCase())}function fo(){return br(e=>e.toUpperCase())}function mo(){return br(e=>Uv(e))}function cy(e,t,r){return new e({type:"array",element:t,...C(r)})}function SM(e,t,r){return new e({type:"union",options:t,...C(r)})}function XM(e,t,r){return new e({type:"union",options:t,inclusive:!1,...C(r)})}function jM(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...C(i)})}function WM(e,t,r){return new e({type:"intersection",left:t,right:r})}function LM(e,t,r,i){let n=r instanceof ue,a=n?i:r,o=n?r:null;return new e({type:"tuple",items:t,rest:o,...C(a)})}function VM(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...C(i)})}function qM(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...C(i)})}function ZM(e,t,r){return new e({type:"set",valueType:t,...C(r)})}function MM(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...C(r)})}function HM(e,t,r){return new e({type:"enum",entries:t,...C(r)})}function DM(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...C(r)})}function uy(e,t){return new e({type:"file",...C(t)})}function RM(e,t){return new e({type:"transform",transform:t})}function FM(e,t){return new e({type:"optional",innerType:t})}function IM(e,t){return new e({type:"nullable",innerType:t})}function EM(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Us(r)}})}function CM(e,t,r){return new e({type:"nonoptional",innerType:t,...C(r)})}function JM(e,t){return new e({type:"success",innerType:t})}function GM(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:eh(r)})}function KM(e,t,r){return new e({type:"pipe",in:t,out:r})}function AM(e,t){return new e({type:"readonly",innerType:t})}function UM(e,t,r){return new e({type:"template_literal",parts:t,...C(r)})}function YM(e,t){return new e({type:"lazy",getter:t})}function BM(e,t){return new e({type:"promise",innerType:t})}function dy(e,t,r){let i=C(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function fy(e,t,r){return new e({type:"custom",check:"custom",fn:t,...C(r)})}function my(e,t){let r=T8(i=>(i.addIssue=n=>{if(typeof n=="string")i.issues.push(Ja(n,i.value,r._zod.def));else{let a=n;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=i.value),a.inst??(a.inst=r),a.continue??(a.continue=!r._zod.def.abort),i.issues.push(Ja(a))}},e(i.value,i)),t);return r}function T8(e,t){let r=new We({check:"custom",...C(t)});return r._zod.check=e,r}function py(e){let t=new We({check:"describe"});return t._zod.onattach=[r=>{let i=lt.get(r)??{};lt.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function vy(e){let t=new We({check:"meta"});return t._zod.onattach=[r=>{let i=lt.get(r)??{};lt.add(r,{...i,...e})}],t._zod.check=()=>{},t}function hy(e,t){let r=C(t),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),n=n.map(f=>typeof f=="string"?f.toLowerCase():f));let a=new Set(i),o=new Set(n),s=e.Codec??hl,c=e.Boolean??pl,l=e.String??Pi,u=new l({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),m=new s({type:"pipe",in:u,out:d,transform:((f,p)=>{let v=f;return r.case!=="sensitive"&&(v=v.toLowerCase()),a.has(v)?!0:o.has(v)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...o],input:p.value,inst:m,continue:!1}),{})}),reverseTransform:((f,p)=>f===!0?i[0]||"true":n[0]||"false"),error:r.error});return m._zod.bag.truthy=i,m._zod.bag.falsy=n,m._zod.bag.case=r.case??"insensitive",m}function Wi(e,t,r,i={}){let n=C(i),a={check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(a.pattern=r),new e(a)}function Sl(e,...t){for(let r of t)for(let i of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,i)&&st(e,i,r[i]);return e}function Mn(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??lt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function et(e,t,r,i,n){let a=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:i.path,message:n}):t.unrepresentable;if(a==="any")return!1;if(a===void 0||a==="throw")throw new Error(n);return Object.assign(r,a),!0}function Xe(e,t,r={path:[],schemaPath:[]}){var i;let n=e._zod.def,a=t.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let u={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,u);else{let m=o.schema,f=t.processors[n.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(e,t,m,u)}let d=e._zod.parent;d&&(o.ref||(o.ref=d),Xe(d,t,u),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Sl(o.schema,c),t.io==="input"&&kt(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&"_prefault"in o.schema&&((i=o.schema).default??(i.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function N8(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Hn(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let i=new Map;for(let o of e.seen.entries()){let s=e.metadataRegistry.get(o[0])?.id;if(s){let c=i.get(s);if(c&&c!==o[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,o[0])}}let n=o=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(o[0])?.id,m=e.external.uri??(p=>p);if(d)return{ref:m(d)};let f=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=f,{defId:f,ref:`${m("__shared")}#/${s}/${N8(f)}`}}let c="#",l=`${c}/${s}/`;if(o[1]===r&&!o[1].schema.id)return{ref:c};let u=o[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:l+N8(u)}},a=o=>{if(o[1].schema.$ref)return;let s=o[1],{ref:c,defId:l}=n(o);s.def={...s.schema},l&&(s.defId=l);let u=s.schema;for(let d in u)delete u[d];u.$ref=c};if(e.cycles==="throw")for(let o of e.seen.entries()){let s=o[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
89
|
+
|
|
90
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let o of e.seen.entries()){let s=o[1];if(t===o[0]){a(o);continue}if(e.external){let l=e.external.registry.get(o[0])?.id;if(t!==o[0]&&l){a(o);continue}}if(e.metadataRegistry.get(o[0])?.id){a(o);continue}if(s.cycle){a(o);continue}s.count>1&&e.reused==="ref"&&a(o)}e.external&&(e.sharedDefsExtractedFor=e.external)}function X8(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let i of t){if(!i||typeof i!="object")return;X8(i);let n=Object.keys(i);if(n.length!==1||n[0]!=="type")return;let a=i.type;for(let o of Array.isArray(a)?a:[a]){if(typeof o!="string")return;r.includes(o)||r.push(o)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var j8=new Set(["type","properties","required","additionalProperties"]),O8=["oneOf","anyOf"];function S8(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function by(e){let t=[];for(let a of e){if(typeof a!="object"||a.type!=="object")return null;for(let o in a)if(!j8.has(o))return null;t.push(a)}let r={},i=new Set;for(let a of t){for(let o in a.properties){if(Object.prototype.hasOwnProperty.call(r,o))continue;let s=[];for(let l of t){let u=l.properties?.[o]??S8(l);u!=null&&(s.some(d=>JSON.stringify(d)===JSON.stringify(u))||s.push(u))}let c=s.length===1?s[0]:by(s)??{allOf:s};st(r,o,c)}for(let o of a.required??[])i.add(o)}let n={type:"object",properties:r};if(i.size&&(n.required=[...i]),t.every(a=>a.additionalProperties===!1))n.additionalProperties=!1;else{let a=[];for(let o of t){let s=S8(o);s&&!a.some(c=>JSON.stringify(c)===JSON.stringify(s))&&a.push(s)}a.length===1?n.additionalProperties=a[0]:a.length>1&&(n.additionalProperties={allOf:a})}return n}function QM(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let n of j8)if(n in e)return;let r=t.filter(n=>O8.some(a=>Array.isArray(n[a]))),i=null;if(!r.length)i=by(t);else{let n=r[0],a=O8.find(c=>Array.isArray(n[c]));if(Object.keys(n).length!==1)return;let o=t.filter(c=>c!==n),s=n[a].map(c=>by([...o,c]));if(s.some(c=>!c))return;i={[a]:s}}i&&(delete e.allOf,Sl(e,i))}function Dn(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,u={...l},d=c.ref;if(c.ref=null,d){i(d);let f=e.seen.get(d),p=f.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(p)):Sl(l,p),Sl(l,u),s._zod.parent===d)for(let h in l)h==="$ref"||h==="allOf"||h in u||delete l[h];if(p.$ref&&f.def)for(let h in l)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(l[h])===JSON.stringify(f.def[h])&&delete l[h]}let m=s._zod.parent;if(m&&m!==d){i(m);let f=e.seen.get(m);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(let p in l)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(l[p])===JSON.stringify(f.def[p])&&delete l[p]}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let s of[...e.seen.entries()].reverse())i(s[0]);if(e.target!=="openapi-3.0")for(let s of e.seen.entries())X8(s[1].def??s[1].schema);for(let s of e.deferred)s();if(e.intersections.length){let s=new Map;for(let c of e.seen.values())for(let l of[c.schema,c.def]){let u=l?.allOf;if(!Array.isArray(u))continue;let d=s.get(u);d?d.push(l):s.set(u,[l])}for(let c of e.intersections)for(let l of s.get(c)??[])QM(l)}}let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Sl(n,r.defId?r.schema:r.def??r.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&n.id===a&&delete n.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,st(o,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?n.$defs=o:n.definitions=o);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:po(t,"input",e.processors),output:po(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function kt(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return kt(i.element,r);if(i.type==="set")return kt(i.valueType,r);if(i.type==="lazy")return kt(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault"||i.type==="catch")return kt(i.innerType,r);if(i.type==="intersection")return kt(i.left,r)||kt(i.right,r);if(i.type==="record"||i.type==="map")return kt(i.keyType,r)||kt(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:kt(i.in,r)||kt(i.out,r);if(i.type==="object"){for(let n in i.shape)if(kt(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(kt(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(kt(n,r))return!0;return!!(i.rest&&kt(i.rest,r))}return!1}var gy=(e,t={})=>r=>{let i=Mn({...r,processors:t});return Xe(e,i),Hn(i,e),Dn(i,e)},po=(e,t,r={})=>i=>{let{libraryOptions:n,target:a}=i??{},o=Mn({...n??{},target:a,io:t,processors:r});return Xe(e,o),Hn(o,e),Dn(o,e)};var vo=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},ho=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},W8=(e,t)=>{vo(e,"minimum",t),ho(e,"maximum",t)},Z8=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},M8=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},H8=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},D8=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},L8=(e,t)=>vo(e,"minimum",t.minimum),V8=(e,t)=>ho(e,"maximum",t.maximum),q8=e=>(t,r)=>{D8(t,r.format);let[i,n]=e[r.format];vo(t,"minimum",i),ho(t,"maximum",n)},_M={greater_than:(e,t)=>vo(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>ho(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>Z8(e,t.value),number_format:q8(Bs),bigint_format:q8(Qs),min_length:L8,max_length:V8,length_equals:(e,t)=>W8(e,t.length),min_size:L8,max_size:V8,size_equals:(e,t)=>W8(e,t.size),string_format:(e,t)=>{D8(e,t.format),t.pattern&&M8(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>H8(e,t.mime)};function tt(e){let t={},r=e._zod.def,i=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let a of i)_M[a._zod.def.check]?.(t,a._zod.def);let n=e._zod.bag;n.minimum!==void 0&&vo(t,"minimum",n.minimum),n.exclusiveMinimum!==void 0&&vo(t,"exclusiveMinimum",n.exclusiveMinimum),n.maximum!==void 0&&ho(t,"maximum",n.maximum),n.exclusiveMaximum!==void 0&&ho(t,"exclusiveMaximum",n.exclusiveMaximum),n.multipleOf!==void 0&&Z8(t,n.multipleOf),n.format!==void 0&&(t.format??(t.format=n.format),n.format.includes("int")&&(t.isInt=!0)),n.mime&&H8(t,n.mime);for(let a of n.patterns??[])M8(t,a);return t}var $M={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},eH=new Map([[$u,Nh],[ml,Oh]]),R8=e=>eH.get(e)??e,wy=(e,t,r,i)=>{let n=r;n.type="string";let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=tt(e);if(typeof a=="number"&&(n.minLength=a),typeof o=="number"&&(n.maxLength=o),s&&(n.format=$M[s]??s,n.format===""&&delete n.format,(s==="time"||u)&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let d=[...c].map(R8);d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},zy=(e,t,r,i)=>{let n=r,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=tt(e);n.type=u?"integer":"number";let d=typeof l=="number"&&l>=(a??Number.NEGATIVE_INFINITY),m=typeof c=="number"&&c<=(o??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";if(d?f?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:typeof a=="number"&&(n.minimum=a),m?f?(n.maximum=c,n.exclusiveMaximum=!0):n.exclusiveMaximum=c:typeof o=="number"&&(n.maximum=o),s){let p=new Set;for(let b of s)Number.isFinite(b)&&b!==0?p.add(Math.abs(b)):et(e,t,n,i,`A multipleOf divisor of ${b} cannot be represented in JSON Schema`);let[v,...h]=p;v!==void 0&&(n.multipleOf=v),h.length&&(n.allOf=[...n.allOf??[],...h.map(b=>({multipleOf:b}))])}},Py=(e,t,r,i)=>{r.type="boolean"},ky=(e,t,r,i)=>{et(e,t,r,i,"BigInt cannot be represented in JSON Schema")},Ty=(e,t,r,i)=>{et(e,t,r,i,"Symbols cannot be represented in JSON Schema")},Ny=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Oy=(e,t,r,i)=>{et(e,t,r,i,"Undefined cannot be represented in JSON Schema")},Sy=(e,t,r,i)=>{et(e,t,r,i,"Void cannot be represented in JSON Schema")},Xy=(e,t,r,i)=>{r.not={}},jy=(e,t,r,i)=>{},Wy=(e,t,r,i)=>{},Ly=(e,t,r,i)=>{et(e,t,r,i,"Date cannot be represented in JSON Schema")},Vy=(e,t,r,i)=>{let n=e._zod.def,a=Fa(n.entries);if(a.length===0){r.not={};return}a.every(o=>typeof o=="number")&&(r.type="number"),a.every(o=>typeof o=="string")&&(r.type="string"),r.enum=a},qy=(e,t,r,i)=>{let n=e._zod.def;if(n.values.length===0){r.not={};return}let a=[];for(let o of n.values)if(o===void 0){if(et(e,t,r,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o=="bigint"){if(et(e,t,r,i,"BigInt literals cannot be represented in JSON Schema"))return;a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let o=a[0];r.type=o===null?"null":typeof o,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[o]:r.const=o}else a.every(o=>typeof o=="number")&&(r.type="number"),a.every(o=>typeof o=="string")&&(r.type="string"),a.every(o=>typeof o=="boolean")&&(r.type="boolean"),a.every(o=>o===null)&&(r.type="null"),r.enum=a},Zy=(e,t,r,i)=>{et(e,t,r,i,"NaN cannot be represented in JSON Schema")},My=(e,t,r,i)=>{let n=r,a=e._zod.pattern;if(!a)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=a.source},Hy=(e,t,r,i)=>{let n=r;n.type="string",n.format="binary",n.contentEncoding="binary";let{minimum:a,maximum:o,mime:s}=tt(e);a!==void 0&&(n.minLength=a),o!==void 0&&(n.maxLength=o),s&&(s.length===0?n.not={}:s.length===1?n.contentMediaType=s[0]:n.anyOf=s.map(c=>({contentMediaType:c})))},Dy=(e,t,r,i)=>{r.type="boolean"},Ry=(e,t,r,i)=>{et(e,t,r,i,"Custom types cannot be represented in JSON Schema")},Fy=(e,t,r,i)=>{et(e,t,r,i,"Function types cannot be represented in JSON Schema")},Iy=(e,t,r,i)=>{et(e,t,r,i,"Transforms cannot be represented in JSON Schema")},Ey=(e,t,r,i)=>{et(e,t,r,i,"Map cannot be represented in JSON Schema")},Cy=(e,t,r,i)=>{et(e,t,r,i,"Set cannot be represented in JSON Schema")},Jy=(e,t,r,i)=>{let n=r,a=e._zod.def,{minimum:o,maximum:s}=tt(e);typeof o=="number"&&(n.minItems=o),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=Xe(a.element,t,{...i,path:[...i.path,"items"]})};function Xl(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Xl(t.out):t.type==="catch"?Xl(t.innerType):e._zod.optin}var Gy=(e,t,r,i)=>{let n=r,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&et(e,t,n,i,"Symbol keys cannot be represented in JSON Schema"))return;n.type="object",n.properties={};for(let l in o)st(n.properties,l,Xe(o[l],t,{...i,path:[...i.path,"properties",l]}));let c=[];for(let l of Object.keys(o)){let u=a.shape[l];(t.io==="input"?Xl(u)===void 0:u._zod.optout===void 0)&&c.push(l)}c.length>0&&(n.required=c),a.catchall?._zod.def.type==="never"?n.additionalProperties=!1:a.catchall?a.catchall&&(n.additionalProperties=Xe(a.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Bd=(e,t,r,i)=>{let n=e._zod.def,a=n.inclusive===!1,o=n.options.map((s,c)=>Xe(s,t,{...i,path:[...i.path,a?"oneOf":"anyOf",c]}));a?r.oneOf=o:r.anyOf=o},Ky=(e,t,r,i)=>{let n=e._zod.def,a=Xe(n.left,t,{...i,path:[...i.path,"allOf",0]}),o=Xe(n.right,t,{...i,path:[...i.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];r.allOf=c,t.intersections.push(c)},Ay=(e,t,r,i)=>{let n=r,a=e._zod.def;n.type="array";let o=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=a.items.map((v,h)=>Xe(v,t,{...i,path:[...i.path,o,h]})),l=a.rest?Xe(a.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let v=a.items[u-1];if(!(t.io==="input"?Xl(v)!==void 0:v._zod.optout==="optional"))break;u--}let d=a.items.length,m=!a.rest;t.target==="draft-2020-12"?(n.prefixItems=c,m?n.items=!1:l&&(n.items=l),u>0&&(n.minItems=u),m&&(n.maxItems=d)):t.target==="openapi-3.0"?(n.items={anyOf:c},l&&n.items.anyOf.push(l),u>0&&(n.minItems=u),m&&(n.maxItems=d)):(n.items=c,m?n.additionalItems=!1:l&&(n.additionalItems=l),u>0&&(n.minItems=u),m&&(n.maxItems=d));let{minimum:f,maximum:p}=tt(e);typeof f=="number"&&(n.minItems=f),typeof p=="number"&&(n.maxItems=p)};function yy(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let p=e.get(t)?.def;if(!p)return t;let v=yy(e,p,r);return v===p?t:v}for(let p of["anyOf","oneOf"]){let v=t[p];if(!Array.isArray(v))continue;let h=v.map(b=>yy(e,b,r));h.some((b,g)=>b!==v[g])&&(t={...t,[p]:h})}let i=Array.isArray(t.type)?t.type:[t.type],n=!i.includes("string")&&i.some(p=>p==="number"||p==="integer"),a=t.enum??(t.const!==void 0?[t.const]:void 0);if(!n&&!a?.some(p=>typeof p=="number"))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:m,...f}=t;return f.enum?f.enum=f.enum.map(p=>typeof p=="number"?String(p):p):typeof f.const=="number"&&(f.const=String(f.const)),n&&(f.type="string",a||(f.pattern=(i.includes("number")?on:ol).source)),f}var xy=new WeakMap;function tH(e){let t=new Map;for(let i of e.seen.values())i.def&&!t.has(i.schema)&&t.set(i.schema,i);let r=new Map;for(let i of xy.get(e)??[]){let n=e.seen.get(i),a=(n?.def??n?.schema)?.propertyNames;if(!a||a===!0||r.has(a))continue;let o=yy(t,a,new Set);o!==a&&r.set(a,o)}if(r.size)for(let i of e.seen.values())for(let n of[i.schema,i.def]){let a=n&&r.get(n.propertyNames);a&&(n.propertyNames=a)}}var Uy=(e,t,r,i)=>{let n=r,a=e._zod.def;n.type="object";let o=a.keyType,s=tt(o).patterns;if(a.mode==="loose"&&s&&s.size>0){let u=Xe(a.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let d of s)st(n.patternProperties,R8(d).source,u)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){n.propertyNames=Xe(a.keyType,t,{...i,path:[...i.path,"propertyNames"]});let u=xy.get(t);u||(u=[],xy.set(t,u),t.deferred.push(()=>tH(t))),u.push(e)}n.additionalProperties=Xe(a.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let c=o._zod.values,l=t.io==="input"&&Xl(a.valueType)!==void 0;if(c&&!a.partial&&!l){let u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(n.required=u.map(String))}},Yy=(e,t,r,i)=>{let n=e._zod.def,a=Xe(n.innerType,t,i),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=n.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}]},By=(e,t,r,i)=>{let n=e._zod.def;Xe(n.innerType,t,i);let a=t.seen.get(e);a.ref=n.innerType},Qy=Symbol();function F8(e,t,r,i,n){let a=!1,o=JSON.stringify(e,(s,c)=>typeof c!="bigint"?c:(a=!0,null));return a?(et(t,r,i,n,"BigInt defaults cannot be represented in JSON Schema"),Qy):JSON.parse(o)}var _y=(e,t,r,i)=>{let n=e._zod.def;Xe(n.innerType,t,i);let a=t.seen.get(e);a.ref=n.innerType;let o=F8(n.defaultValue,e,t,r,i);o!==Qy&&(r.default=o)},$y=(e,t,r,i)=>{let n=e._zod.def;Xe(n.innerType,t,i);let a=t.seen.get(e);if(a.ref=n.innerType,t.io!=="input")return;let o=F8(n.defaultValue,e,t,r,i);o!==Qy&&(r._prefault=o)},ex=(e,t,r,i)=>{let n=e._zod.def;Xe(n.innerType,t,i);let a=t.seen.get(e);a.ref=n.innerType;let o;try{o=n.catchValue(void 0)}catch{et(e,t,r,i,"Dynamic catch values are not supported in JSON Schema");return}r.default=o},tx=(e,t,r,i)=>{let n=e._zod.def,a=n.in._zod.traits.has("$ZodTransform"),o=t.io==="input"?a?n.out:n.in:n.out;Xe(o,t,i);let s=t.seen.get(e);s.ref=o},rx=(e,t,r,i)=>{let n=e._zod.def;Xe(n.innerType,t,i);let a=t.seen.get(e);a.ref=n.innerType,r.readOnly=!0},nx=(e,t,r,i)=>{let n=e._zod.def;Xe(n.innerType,t,i);let a=t.seen.get(e);a.ref=n.innerType},Qd=(e,t,r,i)=>{let n=e._zod.def;Xe(n.innerType,t,i);let a=t.seen.get(e);a.ref=n.innerType},ix=(e,t,r,i)=>{let n=e._zod.innerType;Xe(n,t,i);let a=t.seen.get(e);a.ref=n},Yd={string:wy,number:zy,boolean:Py,bigint:ky,symbol:Ty,null:Ny,undefined:Oy,void:Sy,never:Xy,any:jy,unknown:Wy,date:Ly,enum:Vy,literal:qy,nan:Zy,template_literal:My,file:Hy,success:Dy,custom:Ry,function:Fy,transform:Iy,map:Ey,set:Cy,array:Jy,object:Gy,union:Bd,intersection:Ky,tuple:Ay,record:Uy,nullable:Yy,nonoptional:By,default:_y,prefault:$y,catch:ex,pipe:tx,readonly:rx,promise:nx,optional:Qd,lazy:ix};function _d(e,t){if("_idmap"in e){let i=e,n=Mn({...t,processors:Yd}),a={};for(let c of i._idmap.entries()){let[l,u]=c;Xe(u,n)}let o={},s={registry:i,uri:t?.uri,defs:a};n.external=s;for(let c of i._idmap.entries()){let[l,u]=c;Hn(n,u),st(o,l,Dn(n,u))}if(Object.keys(a).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[c]:a}}return{schemas:o}}let r=Mn({...t,processors:Yd});return Xe(e,r),Hn(r,e),Dn(r,e)}var $d=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Mn({processors:Yd,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return Xe(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Hn(this.ctx,t);let i=Dn(this.ctx,t),{"~standard":n,...a}=i;return a}};var I8={};var ko={};Mr(ko,{ZodAny:()=>Nx,ZodArray:()=>jx,ZodBase64:()=>yf,ZodBase64URL:()=>xf,ZodBigInt:()=>zo,ZodBigIntFormat:()=>Pf,ZodBoolean:()=>wo,ZodCIDRv4:()=>bf,ZodCIDRv6:()=>gf,ZodCUID:()=>uf,ZodCUID2:()=>df,ZodCatch:()=>Qx,ZodCodec:()=>Rl,ZodCreditCard:()=>gx,ZodCustom:()=>Fl,ZodCustomStringFormat:()=>Zi,ZodDate:()=>Vl,ZodDefault:()=>Gx,ZodDiscriminatedUnion:()=>Lx,ZodE164:()=>wf,ZodEmail:()=>of,ZodEmoji:()=>lf,ZodEnum:()=>go,ZodExactOptional:()=>Of,ZodFile:()=>Ix,ZodFunction:()=>sw,ZodGUID:()=>sf,ZodIBAN:()=>yx,ZodIPv4:()=>vf,ZodIPv6:()=>hf,ZodISODate:()=>Fn,ZodISODateTime:()=>Rn,ZodISODuration:()=>En,ZodISOTime:()=>In,ZodInstanceOf:()=>uw,ZodIntersection:()=>Vx,ZodJWT:()=>zf,ZodKSUID:()=>pf,ZodLazy:()=>iw,ZodLiteral:()=>Fx,ZodMAC:()=>bx,ZodMap:()=>Dx,ZodNaN:()=>$x,ZodNanoID:()=>cf,ZodNever:()=>Sx,ZodNonOptional:()=>Sf,ZodNull:()=>kx,ZodNullable:()=>Jx,ZodNumber:()=>xo,ZodNumberFormat:()=>Mi,ZodObject:()=>Zl,ZodOptional:()=>Hl,ZodPipe:()=>Dl,ZodPrefault:()=>Ax,ZodPreprocess:()=>ew,ZodPromise:()=>ow,ZodReadonly:()=>tw,ZodRecord:()=>bo,ZodSet:()=>Rx,ZodString:()=>yo,ZodStringFormat:()=>je,ZodSuccess:()=>Bx,ZodSymbol:()=>zx,ZodTemplateLiteral:()=>nw,ZodTransform:()=>Ex,ZodTuple:()=>Zx,ZodType:()=>me,ZodULID:()=>ff,ZodURL:()=>Ll,ZodUUID:()=>Vr,ZodUndefined:()=>Px,ZodUnion:()=>Ml,ZodUnknown:()=>Ox,ZodVoid:()=>Xx,ZodXID:()=>mf,ZodXor:()=>Wx,_ZodString:()=>af,_default:()=>Kx,_function:()=>$6,any:()=>j6,array:()=>ql,base64:()=>u6,base64url:()=>d6,bigint:()=>T6,boolean:()=>wx,catch:()=>_x,check:()=>eT,cidrv4:()=>l6,cidrv6:()=>c6,codec:()=>Y6,creditCard:()=>m6,cuid:()=>e6,cuid2:()=>t6,currencyCode:()=>y6,custom:()=>tT,date:()=>L6,describe:()=>rT,discriminatedUnion:()=>D6,e164:()=>f6,email:()=>J8,emoji:()=>_8,enum:()=>Tf,exactOptional:()=>Cx,file:()=>G6,float32:()=>w6,float64:()=>z6,function:()=>$6,guid:()=>G8,hash:()=>x6,hex:()=>g6,hostname:()=>b6,httpUrl:()=>Q8,iban:()=>p6,instanceof:()=>iT,int:()=>rf,int32:()=>P6,int64:()=>N6,intersection:()=>qx,invertCodec:()=>B6,ipv4:()=>a6,ipv6:()=>s6,json:()=>oT,jwt:()=>v6,keyof:()=>V6,ksuid:()=>i6,lazy:()=>aw,literal:()=>J6,looseObject:()=>M6,looseRecord:()=>F6,mac:()=>o6,map:()=>I6,meta:()=>nT,nan:()=>U6,nanoid:()=>$8,nativeEnum:()=>C6,never:()=>kf,nonoptional:()=>Yx,null:()=>Tx,nullable:()=>Wl,nullish:()=>K6,number:()=>xx,object:()=>q6,optional:()=>Vi,partialRecord:()=>R6,pipe:()=>nf,prefault:()=>Ux,preprocess:()=>sT,promise:()=>_6,readonly:()=>rw,record:()=>Hx,refine:()=>lw,set:()=>E6,strictObject:()=>Z6,string:()=>jl,stringFormat:()=>h6,stringbool:()=>aT,success:()=>A6,superRefine:()=>cw,symbol:()=>S6,templateLiteral:()=>Q6,transform:()=>Nf,tuple:()=>Mx,uint32:()=>k6,uint64:()=>O6,ulid:()=>r6,undefined:()=>X6,union:()=>Po,unknown:()=>Li,url:()=>B8,uuid:()=>K8,uuidv4:()=>A8,uuidv6:()=>U8,uuidv7:()=>Y8,void:()=>W6,xid:()=>n6,xor:()=>H6});var ef={};Mr(ef,{endsWith:()=>ao,gt:()=>Wr,gte:()=>Jt,includes:()=>no,length:()=>ji,lowercase:()=>to,lt:()=>jr,lte:()=>Ct,maxLength:()=>Xi,maxSize:()=>Zn,mime:()=>so,minLength:()=>sn,minSize:()=>Lr,multipleOf:()=>qn,negative:()=>Gd,nonnegative:()=>Ad,nonpositive:()=>Kd,normalize:()=>lo,overwrite:()=>br,positive:()=>Jd,properties:()=>oo,property:()=>Ud,regex:()=>eo,size:()=>Si,slugify:()=>mo,startsWith:()=>io,toLowerCase:()=>uo,toUpperCase:()=>fo,trim:()=>co,uppercase:()=>ro});var E8=new WeakSet([Object.prototype,Error.prototype]);function tf(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let i=r(this);return Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0})}})}var C8=(e,t)=>{oh.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);E8.has(r)||(E8.add(r),tf(r,"format",i=>n=>rl(i,n)),tf(r,"flatten",i=>n=>tl(i,n)),tf(r,"addIssue",i=>n=>{i.issues.push(n),i.message=JSON.stringify(i.issues,Ia,2)}),tf(r,"addIssues",i=>n=>{i.issues.push(...n),i.message=JSON.stringify(i.issues,Ia,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},nH=k("ZodError",C8),Vt=k("ZodError",C8,void 0,{Parent:Error});var ax=Ga(Vt),ox=Ka(Vt),sx=Aa(Vt),lx=Ua(Vt),cx=ju(Vt),ux=Wu(Vt),dx=Lu(Vt),fx=Vu(Vt),mx=qu(Vt),px=Zu(Vt),vx=Mu(Vt),hx=Hu(Vt);function aH(){nt.localeError||Ge(vd())}function qi(){nt.memoizer||Ge({memoizer:xl()})}var me=k("ZodType",(e,t)=>(aH(),ue.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(W.mergeDefs(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Oe(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(lw(e,t))},superRefine(e,t){return this.check(cw(e,t))},overwrite(e){return this.check(br(e))},optional(){return Vi(this)},exactOptional(){return Cx(this)},nullable(){return Wl(this)},nullish(){return Vi(Wl(this))},nonoptional(e){return Yx(this,e)},array(){return ql(this)},or(e){return Po([this,e])},and(e){return qx(this,e)},transform(e){return nf(this,Nf(e))},default(e){return Kx(this,e)},prefault(e){return Ux(this,e)},catch(e){return _x(this,e)},pipe(e){return nf(this,e)},readonly(){return rw(this)},describe(e){let t=this.clone();return lt.add(t,{description:e}),t},meta(...e){if(e.length===0)return lt.get(this);let t=this.clone();return lt.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return W.hide(this,"~standard",{...Uu(this),jsonSchema:{input:po(this,"input"),output:po(this,"output")}})},set"~standard"(e){W.own(this,"~standard",e)},parse:function e(t,r){return ax(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await ox(this,t,r,{callee:e})},safeParse(e,t){return sx(this,e,t)},async safeParseAsync(e,t){return lx(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){W.own(this,"spa",e)},validate(e,t){return nl(this,e,t)},validateAsync(e,t){return il(this,e,t)},encode:function e(t,r){return cx(this,t,r,{callee:e})},decode:function e(t,r){return ux(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await dx(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await fx(this,t,r,{callee:e})},safeEncode(e,t){return mx(this,e,t)},safeDecode(e,t){return px(this,e,t)},async safeEncodeAsync(e,t){return vx(this,e,t)},async safeDecodeAsync(e,t){return hx(this,e,t)},toJSONSchema(e){return gy(this,{})(e)},get description(){return lt.get(this)?.description},get _def(){return this._zod.def}}),af=k("_ZodString",(e,t)=>{Pi.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wy(e,r,i,n)},W.derived({format:e=>tt(e).format??null,minLength:e=>tt(e).minimum??null,maxLength:e=>tt(e).maximum??null},{regex(...e){return this.check(eo(...e))},includes(...e){return this.check(no(...e))},startsWith(...e){return this.check(io(...e))},endsWith(...e){return this.check(ao(...e))},min(...e){return this.check(sn(...e))},max(...e){return this.check(Xi(...e))},length(...e){return this.check(ji(...e))},nonempty(...e){return this.check(sn(1,...e))},lowercase(e){return this.check(to(e))},uppercase(e){return this.check(ro(e))},trim(){return this.check(co())},normalize(...e){return this.check(lo(...e))},toLowerCase(){return this.check(uo())},toUpperCase(){return this.check(fo())},slugify(){return this.check(mo())}})),yo=k("ZodString",(e,t)=>{Pi.init(e,t),af.init(e,t)},{email(e){return this.check(Pd(of,e))},url(e){return this.check(Pl(Ll,e))},jwt(e){return this.check(Cd(zf,e))},emoji(e){return this.check(Xd(lf,e))},guid(e){return this.check(kd(sf,e))},uuid(e){return this.check(Td(Vr,e))},uuidv4(e){return this.check(Nd(Vr,e))},uuidv6(e){return this.check(Od(Vr,e))},uuidv7(e){return this.check(Sd(Vr,e))},nanoid(e){return this.check(jd(cf,e))},cuid(e){return this.check(Wd(uf,e))},cuid2(e){return this.check(Ld(df,e))},ulid(e){return this.check(Vd(ff,e))},base64(e){return this.check(Fd(yf,e))},base64url(e){return this.check(Id(xf,e))},xid(e){return this.check(qd(mf,e))},ksuid(e){return this.check(Zd(pf,e))},ipv4(e){return this.check(Md(vf,e))},ipv6(e){return this.check(Hd(hf,e))},cidrv4(e){return this.check(Dd(bf,e))},cidrv6(e){return this.check(Rd(gf,e))},e164(e){return this.check(Ed(wf,e))},datetime(e){return this.check(kl(Rn,e))},date(e){return this.check(Tl(Fn,e))},time(e){return this.check(Nl(In,e))},duration(e){return this.check(Ol(En,e))}});function jl(e){return qg(yo,e)}var je=k("ZodStringFormat",(e,t)=>{Se.init(e,t),af.init(e,t)}),Rn=k("ZodISODateTime",(e,t)=>{Nb.init(e,t),je.init(e,t)}),Fn=k("ZodISODate",(e,t)=>{Ob.init(e,t),je.init(e,t)}),In=k("ZodISOTime",(e,t)=>{Sb.init(e,t),je.init(e,t)}),En=k("ZodISODuration",(e,t)=>{Xb.init(e,t),je.init(e,t)}),of=k("ZodEmail",(e,t)=>{vb.init(e,t),je.init(e,t)});function J8(e){return Pd(of,e)}var sf=k("ZodGUID",(e,t)=>{mb.init(e,t),je.init(e,t)});function G8(e){return kd(sf,e)}var Vr=k("ZodUUID",(e,t)=>{pb.init(e,t),je.init(e,t)});function K8(e){return Td(Vr,e)}function A8(e){return Nd(Vr,e)}function U8(e){return Od(Vr,e)}function Y8(e){return Sd(Vr,e)}var Ll=k("ZodURL",(e,t)=>{gb.init(e,t),je.init(e,t)});function B8(e){return Pl(Ll,e)}function Q8(e){return Pl(Ll,{protocol:al,hostname:Xh,...W.normalizeParams(e)})}var lf=k("ZodEmoji",(e,t)=>{yb.init(e,t),je.init(e,t)});function _8(e){return Xd(lf,e)}var cf=k("ZodNanoID",(e,t)=>{xb.init(e,t),je.init(e,t)});function $8(e){return jd(cf,e)}var uf=k("ZodCUID",(e,t)=>{wb.init(e,t),je.init(e,t)});function e6(e){return Wd(uf,e)}var df=k("ZodCUID2",(e,t)=>{zb.init(e,t),je.init(e,t)});function t6(e){return Ld(df,e)}var ff=k("ZodULID",(e,t)=>{Pb.init(e,t),je.init(e,t)});function r6(e){return Vd(ff,e)}var mf=k("ZodXID",(e,t)=>{kb.init(e,t),je.init(e,t)});function n6(e){return qd(mf,e)}var pf=k("ZodKSUID",(e,t)=>{Tb.init(e,t),je.init(e,t)});function i6(e){return Zd(pf,e)}var vf=k("ZodIPv4",(e,t)=>{jb.init(e,t),je.init(e,t)});function a6(e){return Md(vf,e)}var bx=k("ZodMAC",(e,t)=>{Lb.init(e,t),je.init(e,t)});function o6(e){return Mg(bx,e)}var hf=k("ZodIPv6",(e,t)=>{Wb.init(e,t),je.init(e,t)});function s6(e){return Hd(hf,e)}var bf=k("ZodCIDRv4",(e,t)=>{Vb.init(e,t),je.init(e,t)});function l6(e){return Dd(bf,e)}var gf=k("ZodCIDRv6",(e,t)=>{qb.init(e,t),je.init(e,t)});function c6(e){return Rd(gf,e)}var yf=k("ZodBase64",(e,t)=>{Zb.init(e,t),je.init(e,t)});function u6(e){return Fd(yf,e)}var xf=k("ZodBase64URL",(e,t)=>{Mb.init(e,t),je.init(e,t)});function d6(e){return Id(xf,e)}var wf=k("ZodE164",(e,t)=>{Hb.init(e,t),je.init(e,t)});function f6(e){return Ed(wf,e)}var gx=k("ZodCreditCard",(e,t)=>{Db.init(e,t),je.init(e,t)});function m6(e){return Hg(gx,e)}var yx=k("ZodIBAN",(e,t)=>{Rb.init(e,t),je.init(e,t)});function p6(e){return Dg(yx,e)}var zf=k("ZodJWT",(e,t)=>{Fb.init(e,t),je.init(e,t)});function v6(e){return Cd(zf,e)}var Zi=k("ZodCustomStringFormat",(e,t)=>{Ib.init(e,t),je.init(e,t)});function h6(e,t,r={}){return Wi(Zi,e,t,r)}function b6(e){return Wi(Zi,"hostname",Sh,e)}function g6(e){return Wi(Zi,"hex",Ch,e)}function y6(e){return Wi(Zi,"currency_code",Wh,e)}function x6(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,n=er[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return Wi(Zi,i,n,t)}var xo=k("ZodNumber",(e,t)=>{id.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zy(e,r,i,n),e.isFinite=!0},W.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=tt(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=tt(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:r}=tt(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>tt(e).format??null},{gt(e,t){return this.check(Wr(e,t))},gte(e,t){return this.check(Jt(e,t))},min(e,t){return this.check(Jt(e,t))},lt(e,t){return this.check(jr(e,t))},lte(e,t){return this.check(Ct(e,t))},max(e,t){return this.check(Ct(e,t))},int(e){return this.check(rf(e))},safe(e){return this.check(rf(e))},positive(e){return this.check(Wr(0,e))},nonnegative(e){return this.check(Jt(0,e))},negative(e){return this.check(jr(0,e))},nonpositive(e){return this.check(Ct(0,e))},multipleOf(e,t){return this.check(qn(e,t))},step(e,t){return this.check(qn(e,t))},finite(){return this}}));function xx(e){return Fg(xo,e)}var Mi=k("ZodNumberFormat",(e,t)=>{Eb.init(e,t),xo.init(e,t)});function rf(e){return Eg(Mi,e)}function w6(e){return Cg(Mi,e)}function z6(e){return Jg(Mi,e)}function P6(e){return Gg(Mi,e)}function k6(e){return Kg(Mi,e)}var wo=k("ZodBoolean",(e,t)=>{pl.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Py(e,r,i,n)});function wx(e){return Ag(wo,e)}var zo=k("ZodBigInt",(e,t)=>{ad.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ky(e,r,i,n)},W.derived({minValue:e=>tt(e).minimum??null,maxValue:e=>tt(e).maximum??null,format:e=>tt(e).format??null},{gte(e,t){return this.check(Jt(e,t))},min(e,t){return this.check(Jt(e,t))},gt(e,t){return this.check(Wr(e,t))},lt(e,t){return this.check(jr(e,t))},lte(e,t){return this.check(Ct(e,t))},max(e,t){return this.check(Ct(e,t))},positive(e){return this.check(Wr(BigInt(0),e))},negative(e){return this.check(jr(BigInt(0),e))},nonpositive(e){return this.check(Ct(BigInt(0),e))},nonnegative(e){return this.check(Jt(BigInt(0),e))},multipleOf(e,t){return this.check(qn(e,t))}}));function T6(e){return Yg(zo,e)}var Pf=k("ZodBigIntFormat",(e,t)=>{Cb.init(e,t),zo.init(e,t)});function N6(e){return Qg(Pf,e)}function O6(e){return _g(Pf,e)}var zx=k("ZodSymbol",(e,t)=>{Jb.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ty(e,r,i,n)});function S6(e){return $g(zx,e)}var Px=k("ZodUndefined",(e,t)=>{Gb.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Oy(e,r,i,n)});function X6(e){return ey(Px,e)}var kx=k("ZodNull",(e,t)=>{Kb.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ny(e,r,i,n)});function Tx(e){return ty(kx,e)}var Nx=k("ZodAny",(e,t)=>{Ab.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jy(e,r,i,n)});function j6(){return ry(Nx)}var Ox=k("ZodUnknown",(e,t)=>{Ub.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Wy(e,r,i,n)});function Li(){return ny(Ox)}var Sx=k("ZodNever",(e,t)=>{Yb.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Xy(e,r,i,n)});function kf(e){return iy(Sx,e)}var Xx=k("ZodVoid",(e,t)=>{Bb.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sy(e,r,i,n)});function W6(e){return ay(Xx,e)}var Vl=k("ZodDate",(e,t)=>{Qb.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ly(e,r,i,n),e.min=(r,i)=>e.check(Jt(r,i)),e.max=(r,i)=>e.check(Ct(r,i))},W.derived({minDate:e=>{let{minimum:t}=tt(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=tt(e);return t?new Date(t):null}},{}));function L6(e){return oy(Vl,e)}var jx=k("ZodArray",(e,t)=>{qi(),_b.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Jy(e,r,i,n),e.element=t.element},{min(e,t){return this.check(sn(e,t))},nonempty(e){return this.check(sn(1,e))},max(e,t){return this.check(Xi(e,t))},length(e,t){return this.check(ji(e,t))},unwrap(){return this.element}});function ql(e,t){return cy(jx,e,t)}function V6(e){let t=e._zod.def.shape;return Tf(Object.keys(t))}var Zl=k("ZodObject",(e,t)=>{qi(),$b.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Gy(e,r,i,n),W.installLazyProp(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return Tf(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(W.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(W.mergeDefs(this._zod.def,{catchall:Li()}))},loose(){return this.clone(W.mergeDefs(this._zod.def,{catchall:Li()}))},strict(){return this.clone(W.mergeDefs(this._zod.def,{catchall:kf()}))},strip(){return this.clone(W.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return W.extend(this,e)},safeExtend(e){return W.safeExtend(this,e)},merge(e){return W.merge(this,e)},pick(e){return W.pick(this,e)},omit(e){return W.omit(this,e)},partial(...e){return W.partial(Hl,this,e[0])},exactPartial(...e){return W.partial(Of,this,e[0],"exactPartial")},required(...e){return W.required(Sf,this,e[0])}});function q6(e,t){let r={type:"object",shape:e??{},...W.normalizeParams(t)};return new Zl(r)}function Z6(e,t){return new Zl({type:"object",shape:e,catchall:kf(),...W.normalizeParams(t)})}function M6(e,t){return new Zl({type:"object",shape:e,catchall:Li(),...W.normalizeParams(t)})}var Ml=k("ZodUnion",(e,t)=>{vl.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bd(e,r,i,n),e.options=t.options});function Po(e,t){return new Ml({type:"union",options:e,...W.normalizeParams(t)})}var Wx=k("ZodXor",(e,t)=>{Ml.init(e,t),eg.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bd(e,r,i,n),e.options=t.options});function H6(e,t){return new Wx({type:"union",options:e,inclusive:!1,...W.normalizeParams(t)})}var Lx=k("ZodDiscriminatedUnion",(e,t)=>{Ml.init(e,t),rg.init(e,t)});function D6(e,t,r){return new Lx({type:"union",options:t,discriminator:e,...W.normalizeParams(r)})}var Vx=k("ZodIntersection",(e,t)=>{ng.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ky(e,r,i,n)});function qx(e,t){return new Vx({type:"intersection",left:e,right:t})}var Zx=k("ZodTuple",(e,t)=>{qi(),od.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ay(e,r,i,n)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Hl({type:"optional",innerType:t}))})}});function Mx(e,t,r){let i=t instanceof ue,n=i?r:t,a=i?t:null;return new Zx({type:"tuple",items:e,rest:a,...W.normalizeParams(n)})}var bo=k("ZodRecord",(e,t)=>{qi(),ig.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Uy(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function Hx(e,t,r){return!t||!t._zod?new bo({type:"record",keyType:jl(),valueType:e,...W.normalizeParams(t)}):new bo({type:"record",keyType:e,valueType:t,...W.normalizeParams(r)})}function R6(e,t,r){return new bo({type:"record",keyType:e,valueType:t,...W.normalizeParams(r),partial:!0})}function F6(e,t,r){return new bo({type:"record",keyType:e,valueType:t,mode:"loose",...W.normalizeParams(r)})}var Dx=k("ZodMap",(e,t)=>{qi(),ag.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ey(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Lr(...r)),e.nonempty=r=>e.check(Lr(1,r)),e.max=(...r)=>e.check(Zn(...r)),e.size=(...r)=>e.check(Si(...r))});function I6(e,t,r){return new Dx({type:"map",keyType:e,valueType:t,...W.normalizeParams(r)})}var Rx=k("ZodSet",(e,t)=>{qi(),og.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Cy(e,r,i,n),e.min=(...r)=>e.check(Lr(...r)),e.nonempty=r=>e.check(Lr(1,r)),e.max=(...r)=>e.check(Zn(...r)),e.size=(...r)=>e.check(Si(...r))});function E6(e,t){return new Rx({type:"set",valueType:e,...W.normalizeParams(t)})}var go=k("ZodEnum",(e,t)=>{sg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(i,n,a)=>Vy(e,i,n,a),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{let a={};for(let o of i)if(r.has(o))a[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new go({...t,checks:[],...W.normalizeParams(n),entries:a})},e.exclude=(i,n)=>{let a={...t.entries};for(let o of i)if(r.has(o))delete a[o];else throw new Error(`Key ${o} not found in enum`);return new go({...t,checks:[],...W.normalizeParams(n),entries:a})}});function Tf(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new go({type:"enum",entries:r,...W.normalizeParams(t)})}function C6(e,t){return new go({type:"enum",entries:e,...W.normalizeParams(t)})}var Fx=k("ZodLiteral",(e,t)=>{lg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>qy(e,r,i,n),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 J6(e,t){return new Fx({type:"literal",values:Array.isArray(e)?e:[e],...W.normalizeParams(t)})}var Ix=k("ZodFile",(e,t)=>{cg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Hy(e,r,i,n),e.min=(r,i)=>e.check(Lr(r,i)),e.max=(r,i)=>e.check(Zn(r,i)),e.mime=(r,i)=>e.check(so(Array.isArray(r)?r:[r],i))});function G6(e){return uy(Ix,e)}var Ex=k("ZodTransform",(e,t)=>{qi(),ug.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Iy(e,r,i,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Vn(e.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(W.issue(a,r.value,t));else{let o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),"input"in o||(o.input=r.value),o.inst??(o.inst=e),r.issues.push(W.issue(o))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(a=>(r.value=a,r)):(r.value=n,r)}});function Nf(e){return new Ex({type:"transform",transform:e})}var Hl=k("ZodOptional",(e,t)=>{sd.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Qd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Vi(e){return new Hl({type:"optional",innerType:e})}var Of=k("ZodExactOptional",(e,t)=>{dg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Qd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Cx(e){return new Of({type:"optional",innerType:e})}var Jx=k("ZodNullable",(e,t)=>{fg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Yy(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Wl(e){return new Jx({type:"nullable",innerType:e})}function K6(e){return Vi(Wl(e))}var Gx=k("ZodDefault",(e,t)=>{mg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_y(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Kx(e,t){return new Gx({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():W.shallowClone(t)}})}var Ax=k("ZodPrefault",(e,t)=>{pg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$y(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Ux(e,t){return new Ax({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():W.shallowClone(t)}})}var Sf=k("ZodNonOptional",(e,t)=>{vg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>By(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Yx(e,t){return new Sf({type:"nonoptional",innerType:e,...W.normalizeParams(t)})}var Bx=k("ZodSuccess",(e,t)=>{hg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dy(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function A6(e){return new Bx({type:"success",innerType:e})}var Qx=k("ZodCatch",(e,t)=>{bg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ex(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function _x(e,t){return new Qx({type:"catch",innerType:e,catchValue:typeof t=="function"?t:W.constantCatch(t)})}var $x=k("ZodNaN",(e,t)=>{gg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Zy(e,r,i,n)});function U6(e){return ly($x,e)}var Dl=k("ZodPipe",(e,t)=>{ld.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>tx(e,r,i,n),e.in=t.in,e.out=t.out});function nf(e,t){return new Dl({type:"pipe",in:e,out:t})}var Rl=k("ZodCodec",(e,t)=>{Dl.init(e,t),hl.init(e,t)});function Y6(e,t,r){return new Rl({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function B6(e){let t=e._zod.def;return new Rl({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var ew=k("ZodPreprocess",(e,t)=>{Dl.init(e,t),yg.init(e,t)}),tw=k("ZodReadonly",(e,t)=>{xg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>rx(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function rw(e){return new tw({type:"readonly",innerType:e})}var nw=k("ZodTemplateLiteral",(e,t)=>{wg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>My(e,r,i,n)});function Q6(e,t){return new nw({type:"template_literal",parts:e,...W.normalizeParams(t)})}var iw=k("ZodLazy",(e,t)=>{bl.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ix(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function aw(e){return new iw({type:"lazy",getter:e})}var ow=k("ZodPromise",(e,t)=>{Pg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>nx(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function _6(e){return new ow({type:"promise",innerType:e})}var sw=k("ZodFunction",(e,t)=>{zg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fy(e,r,i,n)});function $6(e){return new sw({type:"function",input:Array.isArray(e?.input)?Mx(e?.input):e?.input??ql(Li()),output:e?.output??Li()})}var Fl=k("ZodCustom",(e,t)=>{kg.init(e,t),me.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ry(e,r,i,n)});function eT(e){let t=new We({check:"custom"});return t._zod.check=e,t}function tT(e,t){return dy(Fl,e??(()=>!0),t)}function lw(e,t={}){return fy(Fl,e,t)}function cw(e,t){return my(e,t)}var rT=py,nT=vy,uw=k("ZodInstanceOf",(e,t)=>{Fl.init(e,t)},{properties(e,t){return this.check(oo(e,t))}});function iT(e,t={}){let r=new uw({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...W.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}var aT=(...e)=>hy({Codec:Rl,Boolean:wo,String:yo},...e);function oT(e){let t=aw(()=>Po([jl(e),xx(),wx(),Tx(),ql(t),Hx(jl(),t)]));return t}function sT(e,t){return new ew({type:"pipe",in:Nf(e),out:t})}var oH={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 sH(e){Ge({customError:e})}function lH(){return Ge().customError}var dw;dw||(dw={});var Il={};Mr(Il,{ZodISODate:()=>Fn,ZodISODateTime:()=>Rn,ZodISODuration:()=>En,ZodISOTime:()=>In,date:()=>uH,datetime:()=>cH,duration:()=>fH,time:()=>dH});function cH(e){return kl(Rn,e)}function uH(e){return Tl(Fn,e)}function dH(e){return Nl(In,e)}function fH(e){return Ol(En,e)}var U={...ko,...ef,iso:Il},mH=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function pH(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function lT(e,t){return e.map((r,i)=>i<t?r:r.optional())}function vH(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function hH(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1]===void 0?void 0:vH(r[1]);if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function bH(e,t){return U.transform(i=>i).check(i=>{let n=i.value;if(typeof n!="object"||n===null||Array.isArray(n))return;let a=Object.getOwnPropertyNames(n);if(t.minProperties!==void 0&&a.length<t.minProperties&&i.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:n,inst:e,continue:!0}),t.maxProperties!==void 0&&a.length>t.maxProperties&&i.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:n,inst:e,continue:!0}),t.keySchema)for(let o of a){let s=t.keySchema.safeParse(o);s.success||i.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:o,path:[o],continue:!0})}}).pipe(e)}function fw(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let i=String(e);return`${r[0]}${i.length}:${i}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let a=[];for(let o of e){let s=fw(o,t);if(s===null)return null;a.push(s)}return`a${a.length}:[${a.join(",")}]`}let i=Object.keys(e).sort(),n=[];for(let a of i){let o=fw(e[a],t);if(o===null)return null;n.push(`${a.length}:${a}=${o}`)}return`o${n.length}:{${n.join(",")}}`}finally{t.delete(e)}}var gH=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),yH=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function El(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(El):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,r])=>gH.has(t)?El(r):!yH.has(t)||typeof r!="object"||r===null?!1:Object.values(r).some(El))}function cT(e){return e===1?"element":"elements"}function xH(e,t){return U.transform(i=>i).check(i=>{let n=i.value;if(Array.isArray(n)){if(t.uniqueItems===!0){let a=new Map;for(let o=0;o<n.length;o++){let s=fw(n[o],new Set);if(s===null)continue;let c=a.get(s);if(c===void 0){a.set(s,o);continue}i.issues.push({code:"custom",message:`Array items must be unique: element at index ${o} duplicates the one at index ${c}`,input:n,path:[o],continue:!0})}}if(t.containsSchema){let a=t.minContains??1,o=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let c of n)if(t.containsSchema.safeParse(c).success&&++s>=o)break;s<a&&i.issues.push({code:"custom",message:`Array must contain at least ${a} matching ${cT(a)}; found ${s}`,input:n,continue:!0}),t.maxContains!==void 0&&s>t.maxContains&&i.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${cT(t.maxContains)}`,input:n,continue:!0})}}}).pipe(e)}function uT(e,t){if(e!==!1)return e===void 0||e===!0?U.any():Tt(e,t)}var wH=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function dT(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return U.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return U.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let a=hH(n,t),o=Tt(a,t);return t.refs.set(n,o),t.processing.delete(n),o}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return U.null();if(n.length===0)return U.never();if(n.length===1)return U.literal(n[0]);if(n.every(o=>typeof o=="string"))return U.enum(n);let a=n.map(o=>U.literal(o));return a.length<2?a[0]:U.union([a[0],a[1],...a.slice(2)])}if(e.const!==void 0)return U.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(a=>{let o={...e,type:a};return dT(o,t)});return n.length===0?U.never():n.length===1?n[0]:U.union(n)}if(!r)return U.any();let i;switch(r){case"string":{let n=U.string();if(e.format){let a=e.format;a==="email"?n=n.check(U.email()):a==="uri"||a==="uri-reference"?n=n.check(U.url()):a==="uuid"||a==="guid"?n=n.check(U.uuid()):a==="date-time"?n=n.check(U.iso.datetime({offset:!0})):a==="date"?n=n.check(U.iso.date()):a==="time"?n=n.check(U.regex(wH)):a==="duration"?n=n.check(U.iso.duration()):a==="hostname"?n=n.check(U.hostname()):a==="ipv4"?n=n.check(U.ipv4()):a==="ipv6"?n=n.check(U.ipv6()):a==="mac"?n=n.check(U.mac()):a==="cidr"?n=n.check(U.cidrv4()):a==="cidr-v6"?n=n.check(U.cidrv6()):a==="base64"?n=n.check(U.base64()):a==="base64url"?n=n.check(U.base64url()):a==="e164"?n=n.check(U.e164()):a==="credit_card"?n=n.check(U.creditCard()):a==="iban"?n=n.check(U.iban()):a==="jwt"?n=n.check(U.jwt()):a==="emoji"?n=n.check(U.emoji()):a==="nanoid"?n=n.check(U.nanoid()):a==="cuid"?n=n.check(U.cuid()):a==="cuid2"?n=n.check(U.cuid2()):a==="ulid"?n=n.check(U.ulid()):a==="xid"?n=n.check(U.xid()):a==="ksuid"&&(n=n.check(U.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?U.number().int():U.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case"boolean":{i=U.boolean();break}case"null":{i=U.null();break}case"object":{let n={},a=e.properties||{},o=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?Tt(e.additionalProperties,t):void 0;for(let[d,m]of Object.entries(a)){let f=Tt(m,t);st(n,d,o.has(d)?f:f.optional())}if(e.patternProperties){let d=e.patternProperties,m=Object.keys(d),f=[];for(let v of m){let h=Tt(d[v],t),b=U.string().regex(new RegExp(v));f.push(U.looseRecord(b,h))}let p=[];if(Object.keys(n).length>0&&p.push(U.object(n).passthrough()),p.push(...f),p.length===0)i=U.object({}).passthrough();else if(p.length===1)i=p[0];else{let v=U.intersection(p[0],p[1]);for(let h=2;h<p.length;h++)v=U.intersection(v,p[h]);i=v}if(e.additionalProperties===!1){let v=Object.keys(n),h=m.map(g=>new RegExp(g)),b=i;i=i.check(g=>{if(!_t(g.value))return;let y=[];for(let x of Object.keys(g.value))v.includes(x)||h.some(z=>z.test(x))||y.push(x);y.length&&g.issues.push({code:"unrecognized_keys",keys:y,input:g.value,inst:b})})}}else{let d=U.object(n);e.additionalProperties===!1?i=d.strict():s?i=d.catchall(s):i=d.passthrough()}let c=e.propertyNames!==void 0&&e.propertyNames!==!0,l=typeof e.minProperties=="number"?e.minProperties:void 0,u=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(c||l!==void 0||u!==void 0){let d;if(c){let m=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;d=Tt(m,t)}i=bH(i,{keySchema:d,minProperties:l,maxProperties:u})}break}case"array":{let n=e.prefixItems,a=e.items;if(n&&Array.isArray(n)){let o=typeof e.minItems=="number"?e.minItems:0,s=n.map(d=>Tt(d,t)),c=lT(s,o),l=Array.isArray(a)?void 0:uT(a,t),u=U.tuple(c);i=l?u.rest(l):u,typeof e.minItems=="number"&&(i=i.check(U.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(U.maxLength(e.maxItems)))}else if(Array.isArray(a)){let o=typeof e.minItems=="number"?e.minItems:0,s=a.map(d=>Tt(d,t)),c=lT(s,o),l=uT(e.additionalItems,t),u=U.tuple(c);i=l?u.rest(l):u,typeof e.minItems=="number"&&(i=i.check(U.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(U.maxLength(e.maxItems)))}else if(a!==void 0){let o=Tt(a,t),s=U.array(o);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=U.array(U.any());(e.uniqueItems===!0||e.contains!==void 0)&&(i=xH(i,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?Tt(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${r}`)}return i}function Tt(e,t){if(typeof e=="boolean")return e?U.any():U.never();let r=dT(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(l=>Tt(l,t)),c=U.union(s);r=i?U.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(l=>Tt(l,t)),c=U.xor(s);r=i?U.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:U.any();else{let s=i?r:Tt(e.allOf[0],t),c=i?0:1;for(let l=c;l<e.allOf.length;l++)s=U.intersection(s,Tt(e.allOf[l],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=U.nullable(r)),e.readOnly===!0&&(r=U.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},a=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of a)s in e&&(n[s]=e[s]);let o=["contentEncoding","contentMediaType","contentSchema"];for(let s of o)s in e&&(n[s]=e[s]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!El(e.propertyNames)&&(n.propertyNames=e.propertyNames);for(let s of["minProperties","maxProperties"])e[s]!==void 0&&(n[s]=e[s])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!El(e.contains)&&(n.contains=e.contains);for(let s of["uniqueItems","minContains","maxContains"])e[s]!==void 0&&(n[s]=e[s])}for(let s of Object.keys(e))mH.has(s)||st(n,s,e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function fT(e,t){if(typeof e=="boolean")return e?U.any():U.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=pH(r,t?.defaultTarget),n=r.$defs||r.definitions||{},a={version:i,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??lt};return Tt(r,a)}var mT=Symbol("z.visit/resolving");function Cl(e,t){let r=typeof t=="function"?t:(o,s)=>{let c=t[o._zod.def.type];return c?c(o,s):o},i=new Map;function n(o){let s=i.get(o);if(s===mT)return new bl({type:"lazy",getter:()=>i.get(o)});if(s!==void 0)return s;i.set(o,mT);let c=a(o),l=r(c,c!==o);return i.set(o,l),l}function a(o){let s=o._zod.def,c=s.type;switch(c){case"object":{let l=s.shape,u=Object.keys(l),d=!1,m={};for(let p of u){let v=n(l[p]);v!==l[p]&&(d=!0),m[p]=v}let f=s.catchall;return s.catchall&&(f=n(s.catchall),f!==s.catchall&&(d=!0)),d?Oe(o,{...s,shape:m,catchall:f}):o}case"array":{let l=n(s.element);return l===s.element?o:Oe(o,{...s,element:l})}case"tuple":{let l=s.items,u=!1,d=[];for(let f of l){let p=n(f);p!==f&&(u=!0),d.push(p)}let m=s.rest;return s.rest&&(m=n(s.rest),m!==s.rest&&(u=!0)),u?Oe(o,{...s,items:d,rest:m}):o}case"record":case"map":{let l=n(s.keyType),u=n(s.valueType);return l===s.keyType&&u===s.valueType?o:Oe(o,{...s,keyType:l,valueType:u})}case"set":{let l=n(s.valueType);return l===s.valueType?o:Oe(o,{...s,valueType:l})}case"union":{let l=s.options,u=!1,d=[];for(let m of l){let f=n(m);f!==m&&(u=!0),d.push(f)}return u?Oe(o,{...s,options:d}):o}case"intersection":{let l=n(s.left),u=n(s.right);return l===s.left&&u===s.right?o:Oe(o,{...s,left:l,right:u})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let l=n(s.innerType);return l===s.innerType?o:Oe(o,{...s,innerType:l})}case"pipe":{let l=n(s.in),u=n(s.out);return l===s.in&&u===s.out?o:Oe(o,{...s,in:l,out:u})}case"function":{let l=n(s.input),u=n(s.output);return l===s.input&&u===s.output?o:Oe(o,{...s,input:l,output:u})}case"lazy":{let l=s.getter,{_cachedInner:u,...d}=s;return Oe(o,{...d,getter:()=>n(l())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return o;default:return o}}return n(e)}function pT(e){return Cl(e,{object:t=>t.partial(),union:t=>{let r=t._zod.def;return r.discriminator===void 0?t:Po(r.options)}})}function zH(e,t){if(!t?.length)return e;let r=e._zod.def;return Oe(e,vr(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function vT(e){return zH(e.out,e.checks)}function PH(e){return e.in._zod.traits.has("$ZodTransform")?vT(e):e.in}function hT(e){return Cl(e,{pipe:t=>PH(t._zod.def),default:(t,r)=>r?Vi(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function bT(e){return Cl(e,{pipe:t=>vT(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var mw={};Mr(mw,{bigint:()=>OH,boolean:()=>NH,date:()=>SH,number:()=>TH,string:()=>kH});function kH(e){return Zg(yo,e)}function TH(e){return Ig(xo,e)}function NH(e){return Ug(wo,e)}function OH(e){return Bg(zo,e)}function SH(e){return sy(Vl,e)}function gT(e,t){let r=[],i=[];for(let n of e){let a,o=0;for(let s of t){let c=Math.min(s.end,n.end)-Math.max(s.start,n.start);c>o&&(o=c,a=s)}a?r.push({dest:n,source:a,exact:a.start===n.start&&a.end===n.end}):i.push(n)}return{pairs:r,misses:i}}function yT(e,t){let r=e.time??e.timeline_range?.start;if(!r||!Number.isFinite(r.value))return null;let i=r.rate&&r.rate>0?r.rate:t;return Math.round(r.value*(t/i))}function xT(e,t){let r=e.duration??e.timeline_range?.duration;if(!r||!Number.isFinite(r.value))return 1;let i=r.rate&&r.rate>0?r.rate:t;return Math.max(1,Math.round(r.value*(t/i)))}function E_(e){let t=(e.timelines??[]).filter(r=>r.kind==="primary");return t.length?t:e.timelines??[]}function XH(e,t){if(t.media_reference_id)return(e.media_references??[]).find(r=>r.id===t.media_reference_id)}var jH={tc:35,reel:25,filename:20,camera_roll:10,duration:5,filepath:5},WH=[["Exact",95],["High",80],["Medium",60],["Low",40],["None",0]],LH=e=>WH.find(([,t])=>e>=t)?.[0]??"None";function pw(e){let t=(e??"").trim();for(let r of[".[","_["]){let i=t.lastIndexOf(r);i!==-1&&(t=t.slice(0,i))}return t}var jf=e=>(e??"").trim().toLowerCase(),wT=(e,t=3)=>e?e.replace(/\\/g,"/").trim().replace(/\/+$/,"").split("/").filter(Boolean).slice(-t).join("/").toLowerCase():"",To=e=>typeof e=="number"&&Number.isFinite(e)?Math.trunc(e):null;function VH(e,t){let[r,i,n,a]=[To(e.src_start),To(e.src_end),To(t.src_start),To(t.src_end)];if(r===null||i===null||n===null||a===null||i<=r||a<=n)return 0;let o=Math.min(i,a)-Math.max(r,n);return o<=0?0:Math.min(1,o/Math.min(i-r,a-n))}var qH=e=>{let t=e*10,r=Math.round(t);return(t-Math.floor(t)===.5&&r%2?r-1:r)/10};function ZH(e,t,r={}){let i={...jH,...r},n=f=>Math.max(0,Math.trunc(i[f])),a=Object.keys(i).reduce((f,p)=>f+n(p),0)||1,o=[],s={},c=0;if(n("tc")>0){let f=VH(e,t);c+=n("tc")*f,f>=.999?o.push("TC: full overlap"):f>0?o.push(`TC: ${Math.round(f*100)}% overlap`):s.tc={dest:[e.src_start,e.src_end],src:[t.src_start,t.src_end]}}let l=(f,p,v,h,b)=>{n(f)<=0||(p&&v&&p===v?(c+=n(f),o.push(h)):(p||v)&&(s[f]=b))};if(l("reel",jf(e.reel_name),jf(t.reel_name),`Reel: ${e.reel_name}`,{dest:e.reel_name,src:t.reel_name}),l("filename",pw(e.file_name).toLowerCase(),pw(t.file_name).toLowerCase(),`Filename: ${pw(e.file_name)}`,{dest:e.file_name,src:t.file_name}),l("camera_roll",jf(e.camera_roll),jf(t.camera_roll),`Camera Roll: ${e.camera_roll}`,{dest:e.camera_roll,src:t.camera_roll}),n("duration")>0){let f=To(e.src_dur),p=To(t.src_dur);f!==null&&p!==null&&Math.abs(f-p)<=1?(c+=n("duration"),o.push("Duration: match (\xB11f)")):f!==null&&p!==null&&(s.duration={dest:f,src:p,delta:p-f})}let u=wT(e.file_path),d=wT(t.file_path);l("filepath",u,d,"Path tail: match",{dest:u,src:d});let m=qH(c/a*100);return{score:m,band:LH(m),reasons:o,deltas:s}}function MH(e,t,r={}){return t.map(i=>({...i,match:ZH(e,i,r.weights)})).filter(i=>i.match.score>=(r.minScore??0)).sort((i,n)=>n.match.score-i.match.score).slice(0,Math.max(1,Math.trunc(r.topN??5)))}function zT(e,t,r={}){return e.map(i=>{let n=MH(i,t,{weights:r.weights,topN:r.topN??3,minScore:r.minScore??40}),a=n[0]?.match;return{dest:i,matches:n,band:a?.band??"None",confident:!!a&&a.score>=(r.floor??95)}})}var kT=[["plates","VFX_0010_PLATE01"],["scene_take","VFX_0010_SC_TK"],["clip","VFX_0010_clip name"]];function HH(e){let t=e.replace(/\.[^.]*$/,""),r=/^([A-Z]\d{3})([A-Z]\d{3})/.exec(t)??/^([A-Za-z]?\d+[A-Za-z]?)[-_]([A-Za-z]?\d+)/.exec(t);if(r)return{scene:r[1],take:r[2]};let i=t.split("_");return i.length>=2?{scene:i[0],take:i[1]}:{scene:i[0].slice(0,4),take:""}}function PT(e,t){let r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=t?new RegExp(`^${r}[_-]?(\\d+)`,"i").exec(e):/(\d+)$/.exec(e);return i?Number(i[1]):void 0}function DH(e,t){let r=Math.max(1,t||10),i=new Set(e.filter(a=>!!a)),n=0;return e.map(a=>{if(a)return n=Math.max(n,a),a;let o=(Math.floor(n/r)+1)*r;for(;i.has(o);)o+=r;return i.add(o),n=o})}function RH(e,t,r,i){let n=Math.max(i?i[0]:-1/0,e-r),a=Math.min(i?i[1]:1/0,t+r);return[n,a>n?a:n+1]}function TT(e,t,r){let i=r.prefix??"VFX",n=Math.max(0,r.handles??6),a=r.startFrame??1001,o=r.digits??4,s=e.filter(f=>r.color==="All"||f.color===r.color).sort((f,p)=>f.frame-p.frame),c=DH(s.map(f=>PT(f.name,i)),r.increment??10),l=(f,p,v,h,b)=>{let[g,y]=RH(h[0],h[1],n,v.media_range),x=h[0]-g,z=HH(v.name??""),N=v.scene||z.scene,P=v.take||z.take,O=r.naming==="scene_take"?[f,N,P].filter(Boolean).join("_").toUpperCase():r.naming==="clip"?`${f}_${(v.name??"").replace(/\.[^.]*$/,"")}`:f;return{role:p,clip:v,scene:N,take:P,src_in:g,src_out:y,name:p==="HERO"?O:p==="REFERENCE"?`${O}_reference`:`${O}_${p}`,first:a,cut_in:a+x,cut_out:a+x+b-1,last:a+(y-g)-1}},u=s.map((f,p)=>{let v=`${i}_${String(c[p]).padStart(o,"0")}`,h=t.filter(P=>P.start<=f.frame&&f.frame<P.end&&P.media&&(!r.skipDisabled||P.enabled!==!1&&P.track_enabled!==!1)),b=r.referenceTrack?h.find(P=>P.track===r.referenceTrack):void 0,g=h.filter(P=>P!==b).sort((P,O)=>r.hero==="highest"?O.track-P.track:P.track-O.track),y=g.map((P,O)=>l(v,O===0?"HERO":`PLATE${String(O).padStart(2,"0")}`,P,[P.src_in,P.src_out],P.end-P.start)),x=g[0],z=b&&x?l(v,"REFERENCE",b,[b.src_in+(x.start-b.start),b.src_in+(x.end-b.start)],x.end-x.start):void 0;z&&y[0]&&(z.name=`${y[0].name}_reference`);let N=[`Shot: ${v}`];return y.length>1&&N.push(`Plates: ${y.map(P=>P.role).join(", ")}`),y[0]?.scene&&N.push(`Scene: ${y[0].scene}`),y[0]?.take&&N.push(`Take: ${y[0].take}`),{frame:f.frame,number:c[p],name:v,committed:!!PT(f.name,i),plates:y,reference:z,note:N.join(" | ")}}),d=[],m=0;for(let f of u){let p=[...f.plates,...f.reference?[f.reference]:[]];if(p.length){d.length&&(m+=Math.max(0,r.gap??0));for(let v of p){let h=v.src_out-v.src_in,b=(r.folder||"{shot}").replace(/\{(\w+)\}/g,(g,y)=>({prefix:i,shot:f.name,number:String(f.number).padStart(o,"0"),scene:f.plates[0]?.scene??"",take:f.plates[0]?.take??""})[y]??g);d.push({shot:b,name:v.name,role:v.role,media:v.clip.media,track:1,src_in:v.src_in,src_out:v.src_out,rec_in:m,rec_out:m+h}),m+=h}}}return{shots:u,stringout:d}}var FH={"ACES 2065-1 (AP0)":"ap0",ADX:"adx","ARRI Wide Gamut":"arriwg","ARRI Wide Gamut 4":"arriwg4","BMD Film":"bmdfilm","BMD Film 4.6K":"bmdfilm46k","Canon DCI-P3+":"canonp3dci","Canon CineGamut":"canoncine",CFColor:"cfcolor","Cineon (printing density)":"cineonpd","DaVinci Wide Gamut":"dwg","DCI P3":"p3dci",DRAGONcolor:"dragonc",DRAGONcolor2:"dragonc2",REDWideGamutRGB:"rwg","Filmlight E-Gamut":"egamut","Panasonic V-Gamut":"vgamut","Rec. 709":"rec709","Rec. 2020":"rec2020","Sony S-Gamut":"sgamut","Sony S-Gamut3":"sgamut3","Sony S-Gamut3.Cine":"sgamut3-cine",sRGB:"srgb",XYZ:"xyz"},IH={"ACES 2065-1 (AP0)":"ap0",ACEScct:"acescct",ADX:"adx","ARRI LogC3":"logc3","ARRI LogC4":"logc4","BMD Log":"bmdlog","BMD Log 4.6K":"bmdlog46k","Canon Log2":"canonlog2","Canon Log3":"canonlog3",CFLog:"cflog","Cineon Log":"cineon","DaVinci Intermediate":"dint","DCI (2.6 Gamma)":"g26","Filmlight T-Log":"tlog",HLG:"hlg","ITU-R BT.1886 (2.4 Gamma)":"g24","Linear (1.0 Gamma)":"lin",LogCv3:"logc","Panasonic V-Log":"vlog","Rec. 709 (2.2 Gamma)":"g22",RedLog3G10:"log3g10",RedLogFilm:"redlogfilm","S-Log2":"slog2","S-Log3":"slog3","sRGB (2.2 Gamma)":"g22","ST-2084 (PQ)":"pq","SMPTE ST-2084 (PQ)":"pq"},EH={"Digital Cinema Distribution Master":"dcdm","Digital Cinema Distribution Master: Textless":"dcdm-txtls","Graded Archival Master":"gam","Non-Graded Archival Master":"nam","Non-Graded Archival Master: Textless":"nam-txtls","Video Display Master":"vdm"},CH={"8-bit":"8b","10-bit":"10b","12-bit":"12b","16-bit":"16b"},JH={"ProRes 422 Proxy":"prproxy","ProRes 422 LT":"prlt","ProRes 422":"pr422","ProRes 422 HQ":"prhq","ProRes 4444":"pr4444","ProRes 4444 XQ":"pr4444xq",DNxHD:"dnxhd","DNxHD HQ":"dnxhd-hq","DNxHD LB":"dnxhd-lb","DNxHR LB":"dnxhr-lb","DNxHR SQ":"dnxhr-sq","DNxHR HQ":"dnxhrhq","DNxHR HQX":"dnxhrhqx","DNxHR 444":"dnxhr444","H.264":"h264","H.265 / HEVC":"h265",AV1:"av1",VP9:"vp9","DPX 10-bit":"dpx10b","DPX 16-bit":"dpx16b","EXR 16-bit":"exr16b","EXR 32-bit":"exr32b","TIFF 8-bit":"tiff8b","TIFF 16-bit":"tiff16b",JPEG:"jpeg","JPEG 2000":"j2k",ARRIRAW:"arriraw","REDCODE RAW":"redraw","Cinema DNG":"cinemadng","XAVC-I":"xavc-i","XAVC-L":"xavc-l","XAVC HS":"xavc-hs","XDCAM HD":"xdcamhd","MXF OP1a":"mxf-op1a",CineForm:"cineform","Motion JPEG":"mjpeg"},GH={"High Dynamic Range":"hdr","Standard Dynamic Range":"sdr"},KH={"1.33 (4:3)":"133","1.78 (16:9)":"178","1.85 (Flat)":"185","2.00 (Univisium)":"200","2.35 (Scope)":"235","2.39 (Scope)":"239","2.40 (Scope)":"240"},AH={"ACES 1.0":"aces100","ACES 1.03":"aces103","ACES 1.1":"aces110","ACES 1.2":"aces120","ACES 1.3":"aces130","ACES 2.0":"aces200"},Fe=(e,t,r)=>({id:e,enabled:!0,value:t,order:r}),Hi=(e,t,r,i)=>({name:e,fields:[...t,...r.map(([n,a],o)=>Fe(n,a,t.length+o))],caseTransform:"lowercase",separator:"_",folderStructure:i}),Wf=[Fe("show","",0),Fe("episode","s01e101",1)],vw=[["bitDepth","16-bit"],["colorspace","REDWideGamutRGB"],["gamma","RedLog3G10"],["date",""],["resolution","3840x2160"]],hw=[["bitDepth","16-bit"],["dynamicRange","Standard Dynamic Range"],["colorspace","XYZ"],["gamma","DCI (2.6 Gamma)"],["date",""],["aspectRatio","2.39 (Scope)"],["resolution","4096x1716"]],Oo={conformtools:{name:"CONFORM.TOOLS",fields:[Fe("marker","",0),Fe("colorspace","Rec. 709",1),Fe("gamma","ITU-R BT.1886 (2.4 Gamma)",2),Fe("codec","ProRes 422 HQ",3),Fe("date","",4),Fe("time","",5),Fe("artist","",6)],caseTransform:"uppercase",separator:"_",folderStructure:"{project}/{timeline}/{date}"},netflix_episodic_nam:Hi("Netflix: Episodic NAM",Wf,[["assetType","Non-Graded Archival Master"],...vw],"{show}_s{season}/{show}_{episode}_nam"),netflix_episodic_nam_textless:Hi("Netflix: Episodic NAM Textless",Wf,[["assetType","Non-Graded Archival Master: Textless"],...vw],"{show}_s{season}/{show}_{episode}_nam-txtls"),netflix_episodic_dcdm:Hi("Netflix: Episodic DCDM",Wf,[["assetType","Digital Cinema Distribution Master"],...hw],"{show}_s{season}/{show}_{episode}_dcdm"),netflix_film_nam:Hi("Netflix: Film NAM",[Fe("film","",0),Fe("reel","lp",1)],[["assetType","Non-Graded Archival Master"],...vw],"{film}_nam"),netflix_film_dcdm_sdr:Hi("Netflix: Film DCDM SDR",[Fe("film","",0)],[["assetType","Digital Cinema Distribution Master"],...hw],"{film}_dcdm"),netflix_film_segmented:Hi("Netflix: Film Segmented/Reel",[Fe("film","",0),Fe("reel","r01",1)],[["assetType","Digital Cinema Distribution Master"],...hw],"{film}_dcdm/{reel}"),netflix_aces_episodic:Hi("Netflix: ACES Episodic",Wf,[["assetType","Non-Graded Archival Master"],["bitDepth","16-bit"],["acesVersion","ACES 1.03"],["colorspace","ACES 2065-1 (AP0)"],["gamma","Linear (1.0 Gamma)"],["date",""],["resolution","3840x2160"]],"{show}_s{season}/{show}_{episode}_nam_aces"),color_posting:{name:"Color Posting",fields:[Fe("marker","",0),Fe("colorspace","Rec. 709",1),Fe("gamma","ITU-R BT.1886 (2.4 Gamma)",2),Fe("date","",3)],caseTransform:"uppercase",separator:"_",folderStructure:"{project}/Deliveries/{date}"},tv_series:{name:"TV Series",fields:[Fe("marker","",0),Fe("show","",1),Fe("episode","",2),Fe("colorspace","Rec. 709",3),Fe("version","v001",4)],caseTransform:"none",separator:"_",folderStructure:"{show}/Season_{season}/{episode}"}},Lf=e=>String(e).padStart(2,"0"),bw=(e=new Date)=>`${e.getFullYear()}${Lf(e.getMonth()+1)}${Lf(e.getDate())}`,UH=(e=new Date)=>`${Lf(e.getHours())}${Lf(e.getMinutes())}`;function yw(e,t){return t==="uppercase"?e.toUpperCase():t==="lowercase"?e.toLowerCase():e}var gw={marker:"{MARKER}",timelineTC:"{TL_TC}",sourceTC:"{SRC_TC}"},YH=new Set([...Object.keys(gw),"date","time"]),No=(e,t)=>e.toLowerCase().replace(new RegExp(`[^${t}]`,"g"),""),BH={colorspace:[FH,e=>No(e,"a-z0-9")],gamma:[IH,e=>No(e,"a-z0-9")],codec:[JH,e=>No(e,"a-z0-9")],assetType:[EH,e=>No(e,"a-z0-9-")],bitDepth:[CH,e=>No(e,"a-z0-9")],dynamicRange:[GH,e=>e.toLowerCase()],aspectRatio:[KH,e=>e.replace(/[^0-9]/g,"")],acesVersion:[AH,e=>No(e,"a-z0-9")]};function QH(e,t,r){if(gw[e])return gw[e];let i=r.customDropdownOptions?.[e]?.find(o=>o.label===t)?.abbr,n=BH[e],a=i??(e==="date"?bw(r.now):e==="time"?UH(r.now):n?n[0][t]||n[1](t||""):t||"");return a&&!a.startsWith("{")?yw(a,r.caseTransform):a}function _H(e,t){let i=[...e].sort((n,a)=>n.order-a.order).filter(n=>n.enabled&&(n.value||YH.has(n.id))).map(n=>({text:QH(n.id,n.value,t),sep:n.separator})).filter(n=>n.text).reduce((n,a,o)=>o===0?a.text:n+(a.sep??t.separator)+a.text,"");if(t.markerName!==void 0){let n=yw(t.markerName,t.caseTransform);i=i.includes("{MARKER}")?i.split("{MARKER}").join(n):i?`${n}_${i}`:n}return i}var OT=["project","timeline","date","show","episode","season","film","reel","title"];function $H(e,t){let r=e;for(let i of OT)r=r.split(`{${i}}`).join(t[i]??"");return r.replace(/\/{2,}/g,"/").replace(/^\/+|\/+$/g,"")}var NT=e=>e?e.replace(/[:;]/g,"-"):"";function ST(e,t){let r=t.scope??"duration",i=Math.round(t.naming.handleFrames??0),n=e.filter(l=>l.color===t.color&&(r==="all"||(r==="frame"?l.duration<=1:l.duration>1))).sort((l,u)=>l.frame-u.frame),a={caseTransform:t.naming.caseTransform,customDropdownOptions:t.naming.customDropdownOptions,now:t.now,separator:t.naming.separator},o=n.map((l,u)=>{let m=((t.template?.trim()?yw(OT.reduce((b,g)=>b.split(`{${g}}`).join((g==="date"?bw(t.now):t.folder?.[g])??""),t.template).split("{MARKER}").join(l.name||`Marker_${u+1}`).split("{N}").join(String(u+1).padStart(3,"0")),t.naming.caseTransform):null)??_H(t.naming.fields,{...a,markerName:l.name||`Marker_${u+1}`})).split("{TL_TC}").join(NT(l.tc)).split("{SRC_TC}").join(NT(l.srcTc)).replace(/[^\w-]+/g,t.naming.separator||"_"),f=t.startFrame+l.frame,p=f+Math.max(1,l.duration)-1,v=f-i,h=p+i;return v>h&&(v=h=Math.floor((f+p)/2)),{name:m,in:Math.max(t.startFrame,v),out:Math.min(t.lastFrame,h),marker:l,dupe:!1}}),s=new Set;for(let l of o)l.dupe=s.has(l.name),s.add(l.name);return{dir:$H(t.naming.folderStructure,{date:bw(t.now),...t.folder}),jobs:o}}function XT(e){return/[",\n\r]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}function eD(e){return e==null?"":String(e)}function jT(e,t){let r=e.map(n=>XT(n.header)).join(","),i=t.map(n=>e.map(a=>XT(eD(a.value(n)))).join(","));return[r,...i].join(`
|
|
91
|
+
`)}var xw=["Blue","Cyan","Green","Yellow","Red","Pink","Purple","Fuchsia","Rose","Lavender","Sky","Mint","Lemon","Sand","Cocoa","Cream"];function $_(e,t){let r=Qe(e),i=l1(r,!!e.is_drop_frame),n=e.start_frame??0,a=new Map,o=(e.tracks??[]).filter(l=>l.kind==="Video")[0];for(let l of e.tracks??[])for(let u of l.items??[])a.set(u.id,{name:u.name??u.id});let s=l=>{for(let u of o?.items??[]){let d=u.timeline_range?.start?.value??0,m=u.timeline_range?.duration?.value??0;if(l>=d&&l<d+m)return u.name??u.id}return""},c=[];return(e.markers??[]).forEach((l,u)=>{let d=yT(l,r);if(d==null)return;let m=xT(l,r),f=l.id??`marker-${u}`,p=l.item_id&&a.get(l.item_id)?.name||s(d),v={id:f,marker:l,frame:d,tc:Me(n+d,r,i),duration:m,durationTc:m>1?Me(m,r,!1).replace(/^00:/,""):"",color:l.color??"",name:l.name??"",note:l.note??l.comment??"",clip:p,cells:{}};v.cells={tc:v.tc,frame:d,color:v.color,name:v.name,note:v.note,duration:v.durationTc,clip:p,item_id:l.item_id??"",frames:m},c.push(v)}),c.sort((l,u)=>l.frame-u.frame)}var e$={...Object.fromEntries(xw.map(e=>[e.toLowerCase(),t=>t.color.toLowerCase()===e.toLowerCase()])),duration:e=>e.duration>1};function t$(e){return jT([{header:"Record TC",value:r=>r.tc},{header:"Source TC",value:()=>""},{header:"Frame",value:r=>r.frame},{header:"Color",value:r=>r.color},{header:"Source",value:r=>r.marker.item_id?"clip":"timeline"},{header:"Clip Name",value:r=>r.clip},{header:"Name",value:r=>r.name},{header:"Note",value:r=>r.note},{header:"Duration",value:r=>r.duration},{header:"Keywords",value:()=>""},{header:"Custom Data",value:r=>r.marker.metadata?JSON.stringify(r.marker.metadata):""}],e)}var tD=["#","timeline","track","track_no","track_name","track_enabled","name","timeline_range.start","timeline_range.dur","rec_in_tc","rec_out_tc","source_range.start","source_range.dur","media_reference_id","enabled","reel_name","speed","binding_state","effect_names","speed_ramped","kind","scale","scale_x","scale_y","position_x","position_y","rotation","crop_left","crop_right","crop_top","crop_bottom"],rD=["tc","frame","color","name","note","duration","frames","clip","item_id"];function gr(e){let t=String(e.cells.track_no??e.cells.track??"").match(/^([VA])(\d+)$/),r=Number(e.cells["timeline_range.start"]);return!t||!Number.isFinite(r)?null:{kind:t[1]==="V"?"video":"audio",track:Number(t[2]),start:r}}var Di=(e,t)=>e.media.find(r=>r.id===`mr:${t.cells.media_reference_id}`);function cn(e,t){let r=gr(t);return r?e.items.find(i=>i.kind===r.kind&&i.track===r.track&&i.start===r.start)??null:null}var a$=[...xw];async function o$(e,t,r="resolve"){let i=await e("host_export",{host:r,...t?{timeline:t}:{}});if(!i.ok||!i.session_id)throw new Error(i.text);return nD(e,String(i.session_id),{host:r,project:String(i.project??""),timeline:String(i.timeline??"")})}async function nD(e,t,r={}){let i=r.host,n={ok:!0,text:""},a=Promise.resolve(n),[o,s,c,l,u]=await Promise.all([i==="resolve"?e("host_items",{timeline:r.timeline}):i==="premiere"?e("host_items",{host:i,timeline:r.timeline}).then(d=>d.ok?d:n,()=>n):a,e("timeline_query",{session_id:t,table:"clips",limit:5e3,columns:tD}),e("timeline_query",{session_id:t,table:"markers",limit:5e3,columns:rD}),i?e("host_project",{host:i,timeline:r.timeline}).catch(()=>({ok:!1,text:""})):a,e("timeline_query",{session_id:t,table:"media",limit:5e3,columns:["name","target_url","available_range.start","available_range.dur","source_fps","source_timecode","binding_state"]})]);for(let d of[o,s,c])if(!d.ok)throw new Error(d.text);return{host:i,project:r.project??"",timeline:r.timeline??"",session_id:t,start_frame:Number(o.start_frame??0),fps:Number(s.fps??24),frames:Math.max(0,...(s.rows??[]).map(d=>Number(d.cells["timeline_range.start"]??0)+Number(d.cells["timeline_range.dur"]??0))),clips:s.rows??[],markers:c.rows??[],media:u.rows??[],items:o.items??[],color_groups:o.color_groups??[],marker_data:o.marker_data??{},...o.playhead_tc?{playhead:(Te(String(o.playhead_tc),Number(s.fps??24))??0)-Number(o.start_frame??0)}:{},layers:Number(o.layers??1),tracks:l.tracks??[],...iD(o.output_blanking,o.raster)}}function iD(e,t){if(!e||!(e.top||e.bottom||e.left||e.right))return{};let[r,i]=t??[0,0],n=r-e.left-e.right,a=i-e.top-e.bottom;return{output_blanking:e,...n>0&&a>0?{output_aspect:n/a}:{}}}function So(e,t){let r=Number(t.cells.frame),i=String(t.cells.item_id??"");if(!i)return{frame:r};let n=e.clips.find(o=>o.id===i),a=n&&gr(n);return!n||!a?null:{item:{kind:a.kind??"video",track:a.track,start:a.start},frame:Number(n.cells["source_range.start"]??0)+r-a.start,record:r}}function aD(e,t,r){let i=e.clips.map(n=>({c:n,ref:gr(n)})).filter(({ref:n,c:a})=>n&&n.kind==="video"&&(!r||n.track===r)&&t>=n.start&&t<n.start+Number(a.cells["timeline_range.dur"]??0)).sort((n,a)=>a.ref.track-n.ref.track)[0];return i&&{item:{kind:"video",track:i.ref.track,start:i.ref.start},frame:Number(i.c.cells["source_range.start"]??0)+t-i.ref.start,record:t}}var oD={name:"name",note:"note",keyword:"data"},sD=(e,t,r)=>t?e.replace(new RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"),()=>r):e;function c$(e){for(let t of e.markers){let r=So(e,t);if(!r)continue;let i=r.item&&e.items.find(a=>a.kind===r.item.kind&&a.track===r.item.track&&a.start===r.item.start),n=(r.item?i?.marker_data:e.marker_data)?.[String(r.frame)];n&&(t.cells.data=n)}return e}function u$(e,t,r,i,n,a={}){let o=[],s=a.field??"name",c=a.separator??"";for(let l of t){let u=So(e,l);if(!u)continue;let d=String(l.cells.name??""),m=String(l.cells.note??""),f=Math.max(1,Number(l.cells.frames??1)),p=String(l.cells.data??l.cells.keyword??""),v={name:d,note:m,keyword:p}[s],h={...u.item?{item:u.item,record:u.record}:{},frame:u.frame},b=g=>o.push({op:"marker_update",...h,[oD[s]]:g});if(r==="recolor")o.push({op:"marker_update",...h,color:i});else if(r==="swap"){let g=String(l.cells.color);(g===i||g===n)&&o.push({op:"marker_update",...h,color:g===i?n:i})}else if(r==="rename")b(n);else if(r==="note")o.push({op:"marker_update",...h,note:n});else if(r==="keyword")o.push({op:"marker_update",...h,data:n});else if(r==="prefix")b(`${n}${v&&n?c:""}${v}`);else if(r==="suffix")b(`${v}${v&&n?c:""}${n}`);else if(r==="replace"){let g=sD(v,n,a.with??"");g!==v&&b(g)}else if(r==="duration"){let g=Math.max(1,Math.round(Number(a.frames??0)));a.frames&&g!==f&&o.push({op:"marker_update",...h,duration:g})}else if(r==="delete")o.push({op:"marker_delete",...h});else{let y=r==="to_clip"||r==="copy_to_clip"||r==="swap_places"&&!u.item?u.item?null:aD(e,u.frame,a.track):u.item?{frame:Number(l.cells.frame)}:null;if(!y)continue;r.startsWith("copy_")||o.push({op:"marker_delete",...h}),o.push({op:"marker_add",...y,color:String(l.cells.color||"Blue"),name:d,note:m,duration:f,...p?{data:p}:{}})}}return r==="swap_places"?[...o.filter(l=>l.op==="marker_delete"),...o.filter(l=>l.op!=="marker_delete")]:o}var WT=(e,t)=>e.media===t.media||!!e.alt&&e.alt===t.alt,lD=(e,t)=>WT(e,t)?Math.min(e.src_out,t.src_out)-Math.max(e.src_in,t.src_in):0;function LT(e,t){let r=e.flatMap(f=>t.map(p=>({a:f,b:p,o:lD(f,p)}))).filter(f=>f.o>0).sort((f,p)=>p.o-f.o||+(p.a.track===p.b.track)-+(f.a.track===f.b.track)||Math.abs(f.a.rec_in-f.b.rec_in)-Math.abs(p.a.rec_in-p.b.rec_in)),i=new Map,n=new Set;for(let f of r)!i.has(f.b)&&!n.has(f.a)&&(i.set(f.b,f.a),n.add(f.a));for(let f of r)!i.has(f.b)&&n.has(f.a)&&i.set(f.b,f.a);let a=new Map;for(let[f,p]of i)a.set(p,[...a.get(p)??[],f]);let o=new Map;for(let f of e){if(a.has(f))continue;let p=t.find(v=>WT(f,v)&&v.src_in<=f.src_in&&f.src_out<=v.src_out);p&&o.set(p,[...o.get(p)??[],f])}let s=new Set([...o.values()].flat()),c=new Map([...o].map(([f,p])=>[f,p.length+1])),l=[...i].sort((f,p)=>f[0].rec_in-p[0].rec_in),u=l.map(([,f])=>f.rec_in),d=cD(u),m=[];l.forEach(([f,p],v)=>{let h=[],b=f.src_in-p.src_in,g=f.src_out-p.src_out;(a.get(p)?.length??0)>1&&h.push("split"),(c.get(f)??0)>1&&h.push("joined"),d.has(v)||h.push("moved"),b&&g&&b===g?h.push("slipped"):(b>0?h.push("trimmed head"):b<0&&h.push("extended head"),g<0?h.push("trimmed tail"):g>0&&h.push("extended tail")),(p.speed??100)!==(f.speed??100)&&h.push("retimed"),(p.sizing??"")!==(f.sizing??"")&&h.push("reframed"),m.push({kinds:h.length?h:["unchanged"],a:p,b:f,...b?{head:b}:{},...g?{tail:g}:{},...p.media!==f.media?{loose:!0}:{}})});for(let f of t)i.has(f)||m.push({kinds:["inserted"],b:f});for(let f of e)!a.has(f)&&!s.has(f)&&m.push({kinds:["deleted"],a:f});return m.sort((f,p)=>(f.b?.rec_in??f.a.rec_in)-(p.b?.rec_in??p.a.rec_in)||+!f.b-+!p.b)}function cD(e){let t=[],r=Array(e.length).fill(-1);for(let n=0;n<e.length;n++){let a=0,o=t.length;for(;a<o;){let s=a+o>>1;e[t[s]]<e[n]?a=s+1:o=s}a>0&&(r[n]=t[a-1]),t[a]=n}let i=new Set;for(let n=t.length?t[t.length-1]:-1;n>=0;n=r[n])i.add(n);return i}var VT=/(?<![A-Za-z0-9])[vV](\d{1,4})(?![A-Za-z0-9])/,uD=new Set(["comp","composite","final","vfx","cg","plate","prores","dnx","dnxhr","dnxhd","h264","h265","mov","mxf","exr","dpx","png","jpg","jpeg","tif","tiff","render","out","output","delivery","rec709","rec2020","srgb","log","aces","acescg","lin","linear","1080p","2160p","4k","uhd","hd","hq","lt","master","approved","client","review","wip","temp","tmp","test","left","right","l","r","v","beauty","denoise","denoised","stab","stabilized","stabilised","retime","retimed","graded"]),dD=/^(?:19|20)\d{6}$|^\d{4}-\d{2}-\d{2}$|^\d{6}$/,fD=/^\d{3,4}x\d{3,4}$/i,mD=/^[#%]+d?$/,pD=/^(?:sh|shot|s)?[_-]?(\d{2,5})(?:[a-z])?$/i;function vD(e){let t=String(e??"").split(/[\\/]/).pop().trim();return t=t.replace(/\.\[?\d+(?:-\d+)?\]?\.[A-Za-z0-9]+$/,""),t=t.replace(/\.(?:[#%]+d?|\d{4,8})\.[A-Za-z0-9]+$/,""),t.replace(/\.[A-Za-z0-9]{2,4}$/,"")}function qT(e){let t=vD(e),r=VT.exec(t),i=r?Number(r[1]):null,n=t.replace(new RegExp(VT.source,"g")," ");n=n.replace(/(?<!\d)(?:19|20)\d{2}-\d{2}-\d{2}(?!\d)/g," ").replace(/(?<![A-Za-z0-9])\d{3,4}[xX]\d{3,4}(?![A-Za-z0-9])/g," ");let a=n.split(/[\s_\-.]+/).filter(Boolean),o=a.map(d=>!(uD.has(d.toLowerCase())||dD.test(d)||fD.test(d)||mD.test(d))),s=a.filter((d,m)=>o[m]),c=(d,m)=>{let f=[];for(let h=d-1;h>=0&&f.length<2&&o[h]&&/^[A-Za-z]{1,6}\d{0,3}$/.test(a[h]);h--)f.unshift(a[h]);let p=f.join("_"),v=[m];for(let h=d+1;h<a.length&&o[h]&&/^\d{2,5}[a-zA-Z]?$/.test(a[h]);h++)v.push(a[h]);return[[...p?[p]:[],...v].join("_"),p]},l="",u="";for(let d=0;d<a.length;d++){let m=a[d];if(!o[d])continue;if(/^\d{2,5}$/.test(m)){[l,u]=c(d,m);break}let f=pD.exec(m);if(f&&/^(sh|shot|s)/i.test(m)){[l,u]=c(d,/^(sh|shot)/i.test(m)?m:f[1]);break}}return{shot:l,version:i,tokens:s,sequence:u,stem:t}}function Xo(e){let t=String(e??"").trim().split(/[\s_\-.]+/).filter(Boolean),r=[];return t.forEach((i,n)=>{if(/^(sh|shot)$/i.test(i)&&n+1<t.length&&/^\d+[a-zA-Z]?$/.test(t[n+1]))return;let a=/^(sh|shot|s)?(\d+)([a-z]?)$/i.exec(i);r.push(a?String(Number(a[2]))+a[3].toLowerCase():/^\d+$/.test(i)?String(Number(i)):i.toLowerCase())}),r.join(":")}function jo(e){let t=new Set,r=String(e??""),i=qT(r);i.shot&&t.add(Xo(i.shot));for(let n of r.matchAll(/(?<![a-z0-9])([a-z]{2,6}\d{0,2}[_\-.])?(?:sh|shot)?[_\-.\s]?(\d{2,5})(?:[_\-.](\d{2,5}))?(?![a-z0-9])/gi)){let a=(n[1]??"").replace(/[_\-.]+$/,""),o=[n[2],...n[3]?[n[3]]:[]];t.add(Xo([...a?[a]:[],...o].join("_"))),a&&t.add(Xo(o.join("_")))}for(let n of r.matchAll(/\b(?:scene|sc)\s*[:#]?\s*(\d{1,5})\b[^\d]{0,20}\b(?:shot|sh)\s*[:#]?\s*(\d{1,5})\b/gi))t.add(Xo(`${n[1]}_${n[2]}`));return t.delete(""),t}function hD(e){if(!e.shot)return["",""];let t=Xo(e.shot);return e.sequence&&e.shot.toLowerCase().startsWith(e.sequence.toLowerCase())?[t,Xo(e.shot.slice(e.sequence.length))]:[t,t]}var Jl={marker:.95,plate_name:.9,metadata:.85,timecode:.92},bD=(e,t)=>{let r=/^(\d{1,2})[:;](\d{2})[:;](\d{2})[:;](\d{2,3})$/.exec(String(e??"").trim());if(!r)return null;let[i,n,a,o]=r.slice(1).map(Number),s=Math.round(t)||24;return((i*60+n)*60+a)*s+o},Vf=e=>String(e??"").toLowerCase().replace(/[^a-z0-9]/g,"");function gD(e,t,r){let i=Math.max(0,e),n=Math.max(0,t);if(!i||!n)return{src_in:0,src_out:0,record_offset:0,covers:0,of:n,note:"nothing to place"};let a=r<0?-r:0,o=Math.max(0,r),s=Math.min(i,r+n),c=Math.max(0,s-o);return c<=0?{src_in:0,src_out:0,record_offset:0,covers:0,of:n,note:"the comp does not reach the cut"}:{src_in:o,src_out:s,record_offset:a,covers:c,of:n,note:c<n?`covers ${c} of ${n} frames`:i>n?`trimmed to the cut (${i} frames in the comp)`:""}}function yD(e,t,r,i){let[n,a]=hD(t);if(!n)return[];let o=c=>[...i.filter(l=>l.keys.has(c)).map(l=>({tier:"marker",plate:l.plate,start:l.start,end:l.end})),...r.flatMap(l=>l.keys.has(c)?[{tier:"plate_name",plate:l,start:l.start,end:l.end}]:l.meta_keys.has(c)?[{tier:"metadata",plate:l,start:l.start,end:l.end}]:[])],s=o(n);return s.length||!a||a===n?s:o(a)}function xD(e,t){let r=bD(e.start_tc,e.fps);if(!r)return[];let i=r+e.frames,n=Vf(e.reel);return t.flatMap(a=>{if(!a.src_tc||Math.abs((a.media_fps??e.fps)-e.fps)>.01)return[];if(n&&Vf(a.reel)&&n!==Vf(a.reel))return[];let[o,s]=a.src_tc,c=Math.max(0,Math.min(i,s)-Math.max(r,o));return c>0?[{tier:"timecode",plate:a,start:a.start,end:a.end,offset:o-r,overlap:c,contained:c>=s-o,reel_agrees:!!n&&Vf(a.reel)===n}]:[]}).sort((a,o)=>o.overlap-a.overlap||a.start-o.start)}function ZT(e,t,r){return e.map(i=>{let n=qT(i.name),a={comp:i,shot:n.shot,version:n.version,status:"unmatched",matched_by:"",confidence:0,offset:0,reasons:[]},o=yD(i,n,t,r),s=xD(i,t),c=m=>`${m.start}:${m.end}`,l=new Set(o.map(c)),u;if(l.size===1){let m=[...o].sort((p,v)=>Jl[v.tier]-Jl[p.tier])[0];u={...m,confidence:Jl[m.tier]};let f=s.find(p=>c(p)===c(m));f?(u.offset=f.offset,u.confidence=Math.min(.99,u.confidence+.04),a.reasons.push("source timecode agrees")):s.length&&a.reasons.push(`source timecode points at ${s[0].plate.name} instead`)}else if(l.size>1){let m=s.filter(f=>l.has(c(f)));if(new Set(m.map(c)).size===1)u={...m[0],confidence:Math.min(.99,Jl.timecode+.04)},a.reasons.push("the shot id is on several plates; source timecode picked this one");else return a.status="ambiguous",a.reasons.push(`the shot id is on ${l.size} plates`),a}else if(s.length){let m=s[0],f=s.filter(p=>p.contained);if(f.length>1||s.length>1&&s[1].overlap>=.9*m.overlap&&!m.reel_agrees)return a.status="ambiguous",a.reasons.push(`the comp's source timecode covers ${Math.max(f.length,2)} plates - name it for the shot, or place it by hand`),a;u={...m,confidence:Jl.timecode+(m.reel_agrees?.04:0)}}if(!u)return a.reasons.push("no shot id in the name and no source timecode overlap"),a;if(Object.assign(a,{matched_by:u.tier,confidence:Math.round(u.confidence*1e3)/1e3,plate:u.plate,record_start:u.start,record_end:u.end,offset:u.offset??0}),u.plate&&Math.abs((u.plate.speed??100)-100)>1)return a.status="retimed",a.reasons.push(`the plate is retimed (${u.plate.speed}%) - place it by hand`),a;let d=gD(i.frames,u.end-u.start,a.offset);return a.plan=d,d.covers<=0?(a.reasons.push(d.note),a):(d.note&&a.reasons.push(d.note),u.plate?.raster&&i.raster&&(u.plate.raster[0]!==i.raster[0]||u.plate.raster[1]!==i.raster[1])&&a.reasons.push(`comp is ${i.raster.join("x")}, plate ${u.plate.raster.join("x")} - its sizing is not copied, check with the Aligner`),a.status="ready",a)})}var ke=e=>({track:e.track,start:e.start}),P$=[["color","Clip color"],["flag","Add flag"],["unflag","Clear flags"],["enable","Enable"],["disable","Disable"],["marker","Add marker"],["keywords","Keywords"],["version_add","New grade version"],["version_load","Load grade version"],["group","Color group"],["ungroup","Leave color group"],["prefix","Name prefix"],["suffix","Name suffix"],["cache_on","Color cache on"],["cache_off","Color cache off"],["properties","Set properties"],["metadata","Set metadata"],["keywords_add","Add keywords"],["keywords_remove","Remove keywords"],["markers_remove","Remove the clip's markers"],["fade_in","Fade in (frames; Resolve 21.1.1 does not save it)"],["fade_out","Fade out (frames; Resolve 21.1.1 does not save it)"],["audio_level","Audio level (dB)"],["normalize","Normalize audio (peak dBFS)"]];function k$(e,t){return e.clips.filter(r=>!t||t.has(r.id)).map(r=>{let i=cn(e,r);return{id:r.id,cells:{...r.cells,name:i?.name??r.cells.name,color:i?.color??"",flags:i?.flags.join(", ")??"",on:i?i.enabled?"on":"off":"",version:i?.version??"",group:i?.group??"",nodes:i?.nodes||"",keywords:i?.keywords??"",effects:i?.effects?.length?i.effects.join(", "):String(r.cells.effect_names??""),stabilized:i?.stabilized||/stabiliz/i.test(String(r.cells.effect_names??""))?"yes":"",retimed:i?.remapped||r.cells.speed_ramped===!0||r.cells.speed!=null&&Math.abs(Number(r.cells.speed)-100)>1e-6?"yes":""}}})}function MT(e,t){return Object.fromEntries(e.split(",").map(r=>r.split("=")).filter(r=>r.length===2&&r[0].trim()).map(([r,i])=>[r.trim(),t&&i.trim()!==""&&Number.isFinite(Number(i))?Number(i):i.trim()]))}function T$(e,t,r,i,n){let a=[];for(let o of t){let s=gr(o),c=cn(e,o);if(!s||!c)continue;let l={kind:s.kind,track:s.track,start:s.start};switch(r){case"color":a.push({op:"clip_color",item:l,color:i});break;case"flag":a.push({op:"flags",item:l,add:[i]});break;case"unflag":a.push({op:"flags",item:l,clear:"All"});break;case"enable":case"disable":a.push({op:"enabled",item:l,on:r==="enable"});break;case"marker":a.push({op:"marker_add",frame:s.start,color:i,name:n||"conform.tools",note:c.name});break;case"keywords":a.push({op:"metadata",item:l,set:{Keywords:n}});break;case"version_add":a.push({op:"version",item:l,add:n});break;case"version_load":a.push({op:"version",item:l,load:n});break;case"group":a.push({op:"color_group",item:l,group:n});break;case"ungroup":a.push({op:"color_group",item:l,group:""});break;case"prefix":a.push({op:"name",item:l,name:`${n}${c.name}`});break;case"suffix":a.push({op:"name",item:l,name:`${c.name}${n}`});break;case"cache_on":case"cache_off":a.push({op:"cache",item:l,color:r==="cache_on"});break;case"properties":{let u=MT(n,!0);Object.keys(u).length&&a.push({op:"properties",item:l,set:u});break}case"metadata":{let u=MT(n,!1);Object.keys(u).length&&a.push({op:"metadata",item:l,set:u});break}case"keywords_add":case"keywords_remove":{let u=c.keywords.split(",").map(f=>f.trim()).filter(Boolean),d=n.split(",").map(f=>f.trim()).filter(Boolean),m=r==="keywords_add"?[...new Set([...u,...d])]:u.filter(f=>!d.some(p=>p.toLowerCase()===f.toLowerCase()));m.join(",")!==u.join(",")&&a.push({op:"metadata",item:l,set:{Keywords:m.join(",")}});break}case"fade_in":case"fade_out":{let u=Number(n);Number.isFinite(u)&&u>=0&&a.push({op:"fades",item:l,set:{[r==="fade_in"?"FadeIn":"FadeOut"]:Math.round(u)}});break}case"audio_level":{let u=Number(n);s.kind==="audio"&&Number.isFinite(u)&&a.push({op:"properties",item:l,set:{AudioVolume:u}});break}case"normalize":s.kind==="audio"&&a.push({op:"normalize_audio",item:l,mode:"Sample Peak Program",target_level:n===""?-1:Number(n)});break;case"markers_remove":for(let u of e.markers.filter(d=>d.cells.item_id===o.id)){let d=So(e,u);d?.item&&a.push({op:"marker_delete",item:d.item,frame:d.frame,record:d.record})}break}}return r==="marker"?a.filter((o,s)=>a.findIndex(c=>c.frame===o.frame)===s):a}var ET=e=>[...e.clip_list??[],...(e.folders??[]).flatMap(ET)],wD=e=>e.match(/^(\/Volumes\/[^/]+|[A-Za-z]:\\|\/mnt\/[^/]+|\/[^/]+)/)?.[1]??"(no file)",N$=(e,t="",r=new Set)=>ET(e).filter(i=>!r.has(i.id)).filter(i=>i.type?.toLowerCase()!=="timeline"&&(i.usage===""||i.usage==="0")&&(!t||i.folder!==t)).map(i=>({id:i.id,cells:{name:i.name,folder:i.folder||"Master",start_tc:i.start_tc||"",file:i.file||"",drive:wD(i.file)}})),O$=(e,t,r)=>e.length?[t==="remove"?{op:"pool_delete",clips:e.map(i=>i.id)}:{op:"pool_move",clips:e.map(i=>i.id),folder:r||"UNUSED MEDIA",create:!0}]:[],Pw=[["grade","Grade",[]],["sizing","Sizing",["ZoomGang","Pan","Tilt","ZoomX","ZoomY","RotationAngle","AnchorPointX","AnchorPointY","Pitch","Yaw","FlipX","FlipY","DynamicZoomEase","Distortion","RetimeProcess","MotionEstimation","Scaling","ResizeFilter"]],["crop","Crop",["CropLeft","CropRight","CropTop","CropBottom","CropSoftness","CropRetain"]],["composite","Composite + opacity",["CompositeMode","Opacity"]],["clip_color","Clip color",[]],["flags","Flags",[]],["markers","Clip markers",[]],["versions","Every local grade version",[]],["group","Color group",[]],["keywords","Keywords",[]]];function zD(e,t,r){let i=!!e.media_id&&e.media_id===t.media_id;return r?{certain:!0,same_media:i,why:"same edit position"}:i?e.src_in!=null&&t.src_in!=null&&Math.abs(t.src_in-e.src_in-(t.start-e.start))<=1?{certain:!0,same_media:i,why:"same media, same moment"}:{certain:!1,same_media:i,why:"same media but another part of the take"}:{certain:!1,same_media:i,why:"different media and not at the same edit position"}}var PD=1;function Zf(e,t,r){let i=zD(e,t,r);return e.version_type===PD&&i.same_media?{do:"remote",why:`remote grade '${e.version}' selected`}:i.certain?{do:"copy",why:i.why}:{do:"skip",why:`not sure this is the same shot (${i.why}): no grade copied`}}function S$(e,t,r){let i=e.items.filter(o=>o.kind==="video"),{pairs:n,misses:a}=gT(i.filter(o=>o.track===r),i.filter(o=>o.track===t));return[...n.map(o=>({id:o.dest.id,dest:o.dest,source:o.source,exact:o.exact})),...a.map(o=>({id:o.id,dest:o,source:void 0,exact:!1}))].sort((o,s)=>o.dest.start-s.dest.start).map(o=>{let s=o.source?Zf(o.source,o.dest,o.exact):void 0;return{id:o.id,dest:o.dest,source:o.source,exact:o.exact,cells:{clip:o.dest.name,record:o.dest.start,from:o.source?o.source.name:"no clip above",color:o.source?.color??"",fit:s?s.do==="remote"?"remote: select":s.do==="copy"?o.exact?"exact":"same moment":"not sure":"",nodes:o.source?.nodes??"",...e.playhead!=null&&e.playhead>=o.dest.start&&e.playhead<o.dest.end?{at:"playhead"}:{}}}})}function kD(e,t,r){let i=c=>e.clips.find(l=>{let u=gr(l);return u?.kind===c.kind&&u.track===c.track&&u.start===c.start}),n=i(t),a=i(r);if(!n||!a)return[];let o=Number(n.cells["source_range.start"]??0),s=Number(a.cells["source_range.start"]??0);return e.markers.filter(c=>c.cells.item_id===n.id).flatMap(c=>{let l=So(e,c),u=l?l.frame-o:-1;return!l||u<0||u>=r.end-r.start?[]:[{op:"marker_add",item:{kind:r.kind,track:r.track,start:r.start},frame:s+u,record:r.start+u,color:String(c.cells.color||"Blue"),name:String(c.cells.name??""),note:String(c.cells.note??""),duration:Math.max(1,Number(c.cells.frames??1)),...c.cells.data?{data:String(c.cells.data)}:{}}]})}var TD=(e,t)=>[...new Set([...e.split(","),...t.split(",")].map(r=>r.trim()).filter(Boolean))].join(",");function X$(e,t,r,i){let n=[],a=new Map,o=new Map,s=[];for(let l of e){let u=l.dest,d=l.source;if(!d){r&&n.push({op:"marker_add",frame:u.start,color:r,name:"Copy Grades: no source",note:u.name,data:"ConformTools:copy-grades"});continue}let m=`${d.track}:${d.start}`;if(a.set(m,{src:d,dests:[...a.get(m)?.dests??[],u]}),!t.has("grade"))continue;let f=Zf(d,u,!!l.exact);f.do==="remote"?s.push({op:"version",item:ke(u),type:"remote",load:d.version}):f.do==="copy"?o.set(m,[...o.get(m)??[],u]):n.push({op:"marker_add",frame:u.start,color:r||"Yellow",name:"Copy Grades: not sure",note:`${u.name}: ${f.why}`,data:"ConformTools:copy-grades"})}let c=Pw.filter(([l])=>t.has(l)).flatMap(([,,l])=>l);for(let[l,{src:u,dests:d}]of a){let m=o.get(l);if(m?.length&&s.push({op:"copy_grade",item:ke(u),to:m.map(ke)}),t.has("versions")&&m?.length&&(u.versions?.length??0)>1){for(let f of u.versions){s.push({op:"version",item:ke(u),load:f});for(let p of m)s.push(p.versions?.includes(f)?{op:"version",item:ke(p),load:f}:{op:"version",item:ke(p),add:f});s.push({op:"copy_grade",item:ke(u),to:m.map(ke)})}u.version&&s.push({op:"version",item:ke(u),load:u.version},...m.map(f=>({op:"version",item:ke(f),load:u.version})))}c.length&&s.push({op:"copy_properties",item:ke(u),to:d.map(ke),keys:c});for(let f of d){t.has("clip_color")&&f.color!==u.color&&s.push({op:"clip_color",item:ke(f),color:u.color}),t.has("flags")&&f.flags.join()!==u.flags.join()&&s.push({op:"flags",item:ke(f),clear:"All",add:u.flags}),t.has("group")&&u.group&&f.group!==u.group&&s.push({op:"color_group",item:ke(f),group:u.group});let p=TD(f.keywords??"",u.keywords??"");t.has("keywords")&&u.keywords&&p!==(f.keywords??"")&&s.push({op:"metadata",item:ke(f),set:{Keywords:p}}),t.has("markers")&&i&&s.push(...kD(i,u,f))}}return[...s,...n]}function j$(e,t,r,i=[]){let n={clips:t,media:r,items:i};return t.flatMap(a=>{let o=gr(a);if(!o||o.kind!=="video")return[];let s=Di(n,a),c=s?String(s.cells.target_url??""):"",l=Number(s?.cells["available_range.dur"]),u=l>0?l:NaN,d=Number.isFinite(u)?Number(s?.cells["available_range.start"]):NaN,m=cn(n,a),f=m?.version;return[{timeline:e,track:o.track,start:o.start,name:String(a.cells.name??""),...f?{version:f}:{},...m?{color:m.color,flags:m.flags}:{},file_name:c?c.split(/[\\/]/).pop():String(a.cells.name??""),file_path:c||null,reel_name:a.cells.reel_name??null,src_start:Number.isFinite(d)?d:null,src_end:Number.isFinite(d)&&Number.isFinite(u)?d+u:null,src_dur:Number.isFinite(u)?u:null}]})}function W$(e,t,r){return zT(e,t,r).map(i=>({id:`${i.dest.track}:${i.dest.start}`,trace:i,cells:{clip:i.dest.name,at:`V${i.dest.track} ${i.dest.start}`,match:`${i.band}${i.matches[0]?` ${i.matches[0].match.score}`:""}`,from:i.matches[0]?`${i.matches[0].project?`${i.matches[0].project} / `:""}${i.matches[0].timeline} \xB7 V${i.matches[0].track} \xB7 ${i.matches[0].name}`:"",why:i.matches[0]?.match.reasons.join(", ")??"",others:Math.max(0,i.matches.length-1),trusted:i.confident?"trusted":i.matches.length?"review":"unmatched"}}))}function L$(e,t){let r=(t.clear??[]).filter(i=>i.cells.data==="ConformTools:trace"&&!i.cells.item_id).map(i=>({op:"marker_delete",frame:Number(i.cells.frame)}));for(let i of e){let n=i.trace,a=[ke(n.dest)],o=t.variants&&!(t.unsureOnly&&n.confident);if(!n.matches.length||t.onlyTrusted&&!n.confident&&!o){t.markColor&&r.push({op:"marker_add",frame:n.dest.start,color:t.markColor,name:n.matches.length?"Grade Tracer: below trust":"Grade Tracer: no match",note:`${n.dest.name}${n.matches.length?` \xB7 best ${n.matches[0].match.score} from ${n.matches[0].timeline}`:""}`,data:"ConformTools:trace"});continue}(o?n.matches:n.matches.slice(0,1)).forEach((c,l)=>{o&&r.push({op:"version",item:a[0],add:`${t.prefix||"trace"} ${l+1} \xB7 ${c.match.score} \xB7 ${c.timeline}`});let u=c.project;r.push({op:"copy_grade",...u?{from_project:u}:{},from_timeline:c.timeline,item:ke(c),to:a}),t.keys?.length&&!o&&!u&&r.push({op:"copy_properties",from_timeline:c.timeline,item:ke(c),to:a,keys:t.keys});let d=c;t.color&&!o&&d.color&&r.push({op:"clip_color",item:a[0],color:d.color}),t.flags&&!o&&d.flags?.length&&r.push({op:"flags",item:a[0],clear:"All",add:d.flags})});let s=n.dest.version;o&&s&&r.push({op:"version",item:a[0],load:s})}return r}var tr=(e,t=3)=>Math.abs(e)<1e-9?"0":e.toFixed(t).replace(/\.?0+$/,"");function V$(e,t){return e.map(r=>{let i=r.properties,n=r.grade_sizing,a=r.grade_keys,o=r.edit_keys,s=r.verdict==="aligned"||r.verdict==="animated"&&!!(a?.length||o?.length);return{id:r.item_id,track:r.track,start:r.start,end:r.end,transform:r.transform,keys:r.keys?.map(c=>({record:c.record,transform:c.transform})),cells:{record_tc:r.record_tc,track:`V${r.track}`,name:r.name,verdict:r.verdict==="refused"?"not aligned":r.verdict.replace("_"," "),confidence:r.confidence==null?"":tr(r.confidence,2),sizing:a?.length?`Color page ${t==="node"?"Node":"Input"} Sizing \xB7 ${a.length} keyframes${a.some(c=>c.ease_in)?" \xB7 eased":""} (${r.keys?.length??a.length} frames measured)`:o?.length?`Edit page \xB7 ${o.length} keyframes${o.some(c=>c.shape)?" \xB7 eased":""} on the timeline's ALIGNED copy (${r.keys?.length??o.length} frames measured)`:n?`Color page \xB7 Zoom ${tr(n.zoom,4)}${n.height!==1?` \xB7 Height ${tr(n.height,4)}`:""} \xB7 Pan ${tr(n.pan,4)} \xB7 Tilt ${tr(n.tilt,4)} \xB7 Rotate ${tr(n.rotation,2)}\xB0${n.flip_x?" \xB7 Flip H":""}${n.flip_y?" \xB7 Flip V":""}`:i?`Zoom ${tr(i.ZoomX,4)}${i.ZoomY!==i.ZoomX?`\xD7${tr(i.ZoomY,4)}`:""} \xB7 Pan ${tr(i.Pan,1)} \xB7 Tilt ${tr(i.Tilt,1)} \xB7 Rot ${tr(i.RotationAngle,2)}\xB0${i.FlipX?" \xB7 FlipX":""}${i.FlipY?" \xB7 FlipY":""}`:"",why:r.verdict==="aligned"?"":r.reason??"",cant:s?"":"not aligned"}}})}function q$(e,t,r){let i=new Set(t.map(n=>`${n.track}:${n.start}`));return e.filter(n=>n.op==="properties"||n.op==="grade_sizing"||n.op==="edit_keys"?i.has(`${n.item.track}:${n.item.start}`):r)}var Z$=(e,t)=>{let r=t==null?void 0:e.filter(i=>i.record_start>t).sort((i,n)=>i.record_start-n.record_start)[0];return e.map((i,n)=>({id:`${i.item_id}@${i.record_start}#${n}`,finding:i,cells:{...t!=null&&i.record_start<=t&&t<i.record_start+i.frames?{at:"playhead"}:i===r?{at:"next"}:{},record_tc:i.record_tc,frames:i.frames,track:`V${i.track}`,name:i.name,edges:["top","bottom","left","right"].filter(a=>i.edges[a]>0).map(a=>`${a} ${i.edges[a]}`).join(" \xB7 "),fix:i.fix??(i.zoom_fix==null?"keyframed: marker only":`\xD7 ${tr(i.zoom_fix,4)}`)}}))};function M$(e,t,r,i,n=!1){let a=t.map(l=>l.finding),o=new Set(a.map(l=>l.record_start)),s=new Set(a.flatMap(l=>r.items.filter(u=>u.kind==="video"&&u.track===l.track&&u.start<=l.record_start&&l.record_start<u.end).map(u=>`${u.track}:${u.start}`)));return[...n?r.markers.filter(l=>l.cells.data==="ConformTools:blanking"&&!l.cells.item_id).map(l=>({op:"marker_delete",frame:Number(l.cells.frame)})):[],...e.filter(l=>l.op==="properties"?i&&s.has(`${l.item.track}:${l.item.start}`):l.op==="marker_add"?o.has(Number(l.frame)):!0)]}var ww={only_in_a:["Removed in B","Red"],only_in_b:["New in B","Green"],different_file:["Other media","Yellow"],same_name_different_clip:["Same name, other clip","Purple"],source_tc:["Slipped","Cyan"]},qf=e=>e?`${e.file} @ ${e.src_tc??"\u2013"} [${e.track}]`:"",H$=(e,t)=>e.map((r,i)=>({id:String(i),cells:{rec_in_tc:r.rec_in_tc,rec_out_tc:r.rec_out_tc,frames:r.frames,kind:ww[r.kind]?.[0]??r.kind,a:qf(r.a),b:qf(r.b),tc:r.rec_in_tc},op:{op:"marker_add",frame:r.rec_in-t,color:ww[r.kind]?.[1]??"Blue",name:`Reconform: ${ww[r.kind]?.[0]??r.kind}`,note:`${r.note??""}
|
|
92
|
+
A ${qf(r.a)}
|
|
93
|
+
B ${qf(r.b)}`.trim(),duration:Math.max(1,r.frames),data:"ConformTools:reconform"}}));function HT(e){return e.clips.flatMap(t=>{let r=gr(t),i=cn(e,t);if(!r||r.kind!=="video"||!i)return[];let n=Di(e,t),a=i.media_id||String(n?.cells.target_url??"")||`${t.cells.reel_name??""}|${t.cells.name??""}`,o=Number(t.cells["source_range.start"]??i.src_in),s=Number(t.cells["source_range.dur"]??i.end-i.start);return!Number.isFinite(o)||!Number.isFinite(s)?[]:[{it:i,key:a,s0:o,s1:o+Math.max(1,s),tc:String(t.cells.rec_in_tc??"")}]})}function zw(e,t){let r=e.clips.find(a=>cn(e,a)?.id===t.id);if(!r)return"";let i=(a,o)=>{let s=r.cells[a],c=s==null||s===""?NaN:Number(s);return Number.isFinite(c)?Math.round(c*1e3)/1e3:o};return[i("scale_x",i("scale",100)),i("scale_y",i("scale",100)),i("position_x",0),i("position_y",0),i("rotation",0),i("crop_left",0),i("crop_right",0),i("crop_top",0),i("crop_bottom",0)].join("|")}var CT="100|100|0|0|0|0|0|0|0",DT=e=>{let[t,r,i,n,a]=e.split("|").map(Number);return e===CT?"as shot":`${t===r?`${t}%`:`${t}\xD7${r}%`}${i||n?` \xB7 ${i},${n}`:""}${a?` \xB7 ${a}\xB0`:""}`};function D$(e,t){let r=HT(e),i=new Map;for(let n of r)i.set(n.key,[...i.get(n.key)??[],n]);return HT(t).sort((n,a)=>n.it.start-a.it.start||n.it.track-a.it.track).map(n=>{let a=(i.get(n.key)??[]).map(f=>({s:f,shared:Math.min(f.s1,n.s1)-Math.max(f.s0,n.s0)})).filter(f=>f.shared>0).sort((f,p)=>p.shared-f.shared||Math.abs(f.s.it.start-n.it.start)-Math.abs(p.s.it.start-n.it.start)),o=a[0],s=o?Math.round(100*o.shared/(n.s1-n.s0)):0,c=o?Zf(o.s.it,n.it,!0):void 0,l=o?zw(e,o.s.it):"",u=zw(t,n.it),d=!!o&&!!l&&!!u&&l!==u&&u!==CT,m=(()=>{if(a.length<2||n.s1-n.s0!==n.it.end-n.it.start)return;let f=[...a].sort((p,v)=>p.s.s0-v.s.s0).map(p=>{let v=Math.max(p.s.s0,n.s0),h=Math.min(p.s.s1,n.s1);return{start:n.it.start+(v-n.s0),end:n.it.start+(h-n.s0),source:p.s.it,a_src:p.s.s0,d_src:v}}).filter(p=>p.end>p.start);return new Set(f.map(p=>zw(e,p.source))).size>1?f:void 0})();return{id:`${n.it.track}:${n.it.start}`,dest:n.it,source:o?.s.it,d_src:n.s0,a_src:o?.s.s0,...m?{segments:m}:{},cells:{...d?{sizing_differs:!0,a_sizing:DT(l),b_sizing:DT(u)}:{},clip:n.it.name,record:n.tc,from:o?`V${o.s.it.track} ${o.s.it.name} @ ${o.s.tc}`:"new in B",cover:o?`${s}%`:"",grade:c?c.do==="remote"?`remote '${o.s.it.version}'`:`${o.s.it.nodes} node${o.s.it.nodes===1?"":"s"}`:"",pieces:m?`cut into ${m.length} (A's through edit)`:a.length>1?`A has ${a.length} pieces (framed alike: whole)`:"",b_tl:t.timeline,b_at:n.it.start,...o?{a_tl:e.timeline,a_at:o.s.it.start+Math.max(0,n.s0-o.s.s0)}:{}}}})}var JT=[["grade","Grade"],["sizing","Sizing"],["crop","Crop"],["composite","Composite + opacity"],["clip_color","Clip color"],["markers","Clip markers"],["speed","Speed"],["fades","Fades (Resolve 21.1.1 does not save them)"]];function R$(e,t,r,i,n){let a=[],o=Pw.filter(([u])=>t.has(u)).flatMap(([,,u])=>u),s=new Set(Pw.filter(([u])=>u==="sizing").flatMap(([,,u])=>u)),c=r.timeline,l=e.flatMap(u=>{let d=u.segments,m=u.dest;return d?(a.push({op:"split_clip",item:ke(m),at:d.slice(1).map(f=>f.start)}),d.map(f=>({...u,dest:{...m,start:f.start,end:f.end},source:f.source,d_src:f.d_src,a_src:f.a_src}))):[u]});for(let u of l){let d=u.dest,m=u.source;if(!m){i&&a.push({op:"marker_add",frame:d.start,color:i,name:"Reconform: new in B",note:d.name,data:"ConformTools:reconform"});continue}t.has("grade")&&(Zf(m,d,!0).do==="remote"?a.push({op:"version",item:ke(d),type:"remote",load:m.version}):a.push({op:"copy_grade",from_timeline:c,item:ke(m),to:[ke(d)]}));let f=n?.has(u.id)?o.filter(p=>!s.has(p)):o;if(f.length&&a.push({op:"copy_properties",from_timeline:c,item:ke(m),to:[ke(d)],keys:f}),t.has("clip_color")&&m.color!==d.color&&a.push({op:"clip_color",item:ke(d),color:m.color}),t.has("speed")&&a.push({op:"copy_speed",from_timeline:c,item:ke(m),to:[ke(d)]}),t.has("fades")&&a.push({op:"copy_fades",from_timeline:c,item:ke(m),to:[ke(d)]}),t.has("markers")){let p=Number(u.d_src),v=d.end-d.start;for(let h of r.markers){let b=So(r,h);!b?.item||b.item.track!==m.track||b.item.start!==m.start||b.frame<p||b.frame>=p+v||a.push({op:"marker_add",item:{kind:"video",...ke(d)},frame:b.frame,record:ke(d).start+b.frame-p,color:String(h.cells.color??"Blue"),name:String(h.cells.name??""),note:String(h.cells.note??""),duration:Math.max(1,Number(h.cells.frames??1))})}}}return a}var Wo=(e,t)=>{let r=Math.round(t)||24,i=n=>String(Math.floor(n)).padStart(2,"0");return`${i(e/(r*3600))}:${i(e/(r*60)%60)}:${i(e/r%60)}:${i(e%r)}`},ND=e=>["bt","bb","bl","br"].filter(t=>e[t]>0).map(t=>`${{bt:"top",bb:"bottom",bl:"left",br:"right"}[t]} ${e[t]} px`).join(", ");function F$(e){let t=[...e.blanking.map((n,a)=>({id:`b${a}`,start:n.start_frame,key:`video.blanking|${n.start_frame}|${n.end_frame}|${n.clip.name}`,evidence:e.evidence?.blanking[a],cells:{tc:Wo(n.start_frame,e.fps),out:Wo(n.end_frame,e.fps),kind:"Black edges",severity:(e.checks.find(o=>o.id==="video.blanking")?.status??"warn").toUpperCase(),clip:n.clip.name,detail:ND(n.measured)}})),...e.black.map((n,a)=>({id:`k${a}`,start:n.start_frame,key:`video.black_frame|${n.start_frame}|${n.end_frame}|${e.evidence?.black_clip?.[a]??""}`,evidence:e.evidence?.black[a],cells:(()=>{let o=e.evidence?.black_clip?.[a];return{tc:Wo(n.start_frame,e.fps),out:Wo(n.end_frame,e.fps),kind:"Black frames",severity:o===""?"INFO":"FAIL",clip:o??"",detail:`${n.frames} frame${n.frames===1?"":"s"}, darkest ${n.darkest}${o===""?" \xB7 in a timeline gap":o?" \xB7 on the clip: missing media or a black source":""}`}})()})),...(e.findings??[]).map((n,a)=>({id:`c${a}`,start:n.start_frame,key:`${n.check??n.label}|${n.start_frame}|${n.end_frame}|${n.clip}`,evidence:n.evidence,cells:{tc:Wo(n.start_frame,e.fps),out:Wo(n.end_frame,e.fps),kind:n.label,severity:n.severity.toUpperCase(),clip:n.clip,detail:n.detail}}))].sort((n,a)=>n.start-a.start),r=e.audio?.integrated_lufs,i=[`${e.frames} frames \xB7 ${e.blanking.length} black-edge range(s) \xB7 ${e.black.length} black-frame range(s)${r!=null?` \xB7 ${r<-70?"silent":`${r.toFixed(1)} LUFS`}`:""}${e.audio?.true_peak_dbtp!=null&&e.audio.true_peak_dbtp>-70?` \xB7 ${e.audio.true_peak_dbtp.toFixed(1)} dBTP`:""}`,e.checks.map(n=>`${n.label}: ${n.status}`).join(" \xB7 "),...e.notes].filter(Boolean).join(`
|
|
94
|
+
`);return{rows:t,text:i}}function I$(e,t){let r=e.clips.flatMap(o=>{let s=gr(o),c=cn(e,o),l=Di(e,o);if(!s||s.kind!=="video"||!c)return[];let u=Number(o.cells["source_range.start"]??0),d=Number(l?.cells["available_range.start"]),m=Number(l?.cells["available_range.dur"]);return[{...c,media:String(l?.cells.target_url??"")||void 0,src_in:u,src_out:u+(c.end-c.start),media_range:Number.isFinite(d)&&m>0?[d,d+m]:void 0,track_enabled:o.cells.track_enabled!==!1}]}),i=TT(e.markers.filter(o=>!o.cells.item_id).map(o=>({frame:Number(o.cells.frame),color:String(o.cells.color),name:String(o.cells.name??""),note:String(o.cells.note??"")})),r,t),n=new Map(String(t.names??"").split(",").map(o=>o.split("=").map(s=>s.trim())).filter(o=>o.length===2&&o[0]&&o[1]));if(n.size){for(let o of i.shots)for(let s of[...o.plates,...o.reference?[o.reference]:[]])s.name=n.get(s.name)??s.name;for(let o of i.stringout)o.name=n.get(o.name)??o.name}let a=i.shots.flatMap(o=>[...o.plates,...o.reference?[o.reference]:[]].map((s,c)=>({id:`${o.name}-${c}`,shot:o.name,pull:s.name,cells:{shot:o.name,role:s.role,name:s.name,clip:`${s.clip.name??""}${s.scene?` \xB7 sc ${s.scene}`:""}${s.take?` tk ${s.take}`:""}`,frames:`${s.first}\u2013${s.last}`,cut:`${s.cut_in}\u2013${s.cut_out}`}})));return{...i,rows:a}}var E$=(e,t)=>{let r=new Set(t.map(i=>i.shot));return e.shots.filter(i=>r.has(i.name)).map(i=>({op:"marker_update",frame:i.frame,name:i.name,note:i.note}))},OD=(e,t)=>{let r=new Set(t.map(i=>i.pull));return e.stringout.filter(i=>r.has(i.name)&&i.media)};function C$(e,t,r,i,n,a="",o=""){let s=/\\/.test(n)?"\\":"/",c=new Set(t.map(d=>d.pull)),l=[...new Set(r.items.filter(d=>d.kind==="video").map(d=>d.track))],u=r.start_frame+Math.max(0,...r.items.map(d=>d.end))-1;return e.shots.flatMap(d=>[...d.plates,...d.reference?[d.reference]:[]].filter(m=>c.has(m.name)).map(m=>{let f=m.role==="REFERENCE",p=f?o:a;return{name:m.name,in:Math.max(r.start_frame,r.start_frame+m.clip.start-i),out:Math.min(u,r.start_frame+m.clip.end-1+i),target_dir:`${n.replace(/[\\/]$/,"")}${s}${d.name}`,...f?{}:{disable_tracks:l.filter(v=>v!==m.clip.track).map(v=>`V${v}`)},...p?{preset:p}:{}}}))}function J$(e,t,r,i,n="",a=""){let o=/\\/.test(i)?"\\":"/";return OD(e,t).map(s=>({name:s.name,in:r+s.rec_in,out:r+s.rec_out-1,target_dir:`${i.replace(/[\\/]$/,"")}${o}${s.shot}`,...(s.role==="REFERENCE"?a:n)?{preset:s.role==="REFERENCE"?a:n}:{}}))}function SD(e,t){let r=e.clips.filter(c=>c.cells.kind!=="audio"&&/^V\d+$/.test(String(c.cells.track_no??""))&&c.cells.enabled!==!1&&c.cells.track_enabled!==!1).filter(c=>{let l=Number(c.cells["timeline_range.start"]);return t>=l&&t<l+Number(c.cells["timeline_range.dur"])}).sort((c,l)=>Number(String(l.cells.track_no).slice(1))-Number(String(c.cells.track_no).slice(1)))[0];if(!r)return"";let i=Di(e,r),n=Number(i?.cells.source_fps)||e.fps||24,a=r.cells.speed==null||r.cells.speed===""?1:Number(r.cells.speed)/100,s=(i?.cells.binding_state==="linked"?Te(String(i.cells.source_timecode??""),n)??0:0)+Number(r.cells["source_range.start"]??0)+Math.floor((t-Number(r.cells["timeline_range.start"]))*a);return Me(s,n)}var GT=Object.entries(Oo).map(([e,t])=>[e,t.name]);function G$(e,t){let r=Oo[t.naming]??Oo.conformtools,i=t.case?{...r,caseTransform:t.case}:r,n={...i,handleFrames:t.handles,...t.folder?{folderStructure:t.folder}:{},fields:i.fields.map(l=>t.fields[l.id]?{...l,value:t.fields[l.id]}:l)},a=e.start_frame+Math.max(0,...e.items.map(l=>l.end))-1,o=ST(e.markers.filter(l=>!l.cells.item_id).map(l=>({frame:Number(l.cells.frame),duration:Number(l.cells.frames??1),color:String(l.cells.color),name:String(l.cells.name??""),tc:String(l.cells.tc??""),srcTc:SD(e,Number(l.cells.frame))})),{color:t.color,scope:t.scope,naming:n,startFrame:e.start_frame,lastFrame:a,folder:{project:e.project,timeline:e.timeline,...Object.fromEntries(n.fields.map(l=>[l.id,l.value])),...t.fields},...t.template?{template:t.template}:{}}),s=/\\/.test(t.root)?"\\":"/",c=t.root?`${t.root.replace(/[\\/]$/,"")}${o.dir?s+o.dir:""}`:"";return o.jobs.map((l,u)=>({id:String(u),job:{name:l.name,in:l.in,out:l.out,target_dir:c,...t.preset?{preset:t.preset}:{}},cells:{tc:l.marker.tc??"",marker:l.marker.name,frames:l.out-l.in+1,name:l.name,folder:c,dupe:l.dupe?"same name as another job":""}}))}function RT(e){return e.clips.flatMap(t=>{let r=gr(t);if(!r||r.kind!=="video"||t.cells.kind==="transition")return[];let i=Di(e,t),n=Number(t.cells["timeline_range.dur"]??0),a=Number(t.cells["source_range.start"]??0),o=String(i?.cells.target_url||t.cells.name||""),s=["scale","scale_x","scale_y","position_x","position_y","rotation","crop_left","crop_right","crop_top","crop_bottom"].map(u=>t.cells[u]??"").join("|"),c=(o.split(/[\\/]/).pop()??"").replace(/\.[^.]+$/,"").toLowerCase(),l=String(t.cells.reel_name??"").toLowerCase();return[{id:t.id,name:String(t.cells.name??""),track:r.track,rec_in:r.start,rec_out:r.start+n,media:o,alt:c||l||void 0,src_in:a,src_out:a+Number(t.cells["source_range.dur"]??n),speed:t.cells.speed==null||t.cells.speed===""?100:Number(t.cells.speed),sizing:s}]})}var FT={inserted:"Green",deleted:"Red",moved:"Purple",split:"Pink",joined:"Pink",slipped:"Cyan",retimed:"Yellow",reframed:"Sand"};function K$(e,t){let r=o=>new Map(o.clips.map(s=>[s.id,String(s.cells.rec_in_tc??"")])),i=r(e),n=r(t),a=(o,s,c)=>c&&(o===e?i:n).get(c)||Me(o.start_frame+s,o.fps||24);return LT(RT(e),RT(t)).filter(o=>o.kinds[0]!=="unchanged"||o.loose).map((o,s)=>{let c=o.kinds.join(", "),l=FT[o.kinds.find(p=>FT[p])??""]??"Blue",u=`${c}${o.head?` \xB7 head ${o.head>0?"+":""}${o.head}f`:""}${o.tail?` \xB7 tail ${o.tail>0?"+":""}${o.tail}f`:""}${o.a&&o.b?` \xB7 A ${a(e,o.a.rec_in,o.a.id)}`:""}`,d=o.b?{side:"B",frame:o.b.rec_in}:{side:"A",frame:o.a.rec_in},m=o.a&&o.b?Math.floor((Math.max(o.a.src_in,o.b.src_in)+Math.min(o.a.src_out,o.b.src_out))/2):void 0,f=m!=null&&o.a.media&&o.b.media?{a:{path:o.a.media,frame:m},b:{path:o.b.media}}:void 0;return{id:String(s),...f?{pair:f}:{},mark:{...d,op:{op:"marker_add",frame:d.frame,color:l,name:`Reconform: ${o.kinds[0]}`,note:u,data:"ConformTools:reconform"}},cells:{b_tc:o.b?a(t,o.b.rec_in,o.b.id):"",a_tc:o.a?a(e,o.a.rec_in,o.a.id):"",change:c,clip:(o.b??o.a).name,paired:o.loose?"by name: check the picture":"",head:o.head??"",tail:o.tail??"",frames:o.b?o.b.rec_out-o.b.rec_in:o.a.rec_out-o.a.rec_in}}})}function A$(e,t,r){let i=new Set((r?.markers??[]).filter(n=>!n.cells.item_id).map(n=>Number(n.cells.frame)));return e.filter(n=>n.cells.change!=="unchanged"||/differs/i.test(String(n.cells.picture??""))).map(n=>n.mark).filter(n=>n?.side===t).map(({op:n})=>{let a=n.frame;for(;i.has(a);)a++;return i.add(a),a===n.frame?n:{...n,frame:a,note:`${n.note} \xB7 ${a-n.frame}f after its cut (a marker was there)`}})}function U$(e){let t=new Set(e.tracks.filter(o=>o.kind==="video"&&o.enabled===!1).map(o=>o.index)),r=new Map;for(let o of e.clips){let s=cn(e,o),c=Number(o.cells["timeline_range.dur"]??0),l=Number(o.cells["source_range.dur"]??c);s&&c>0&&r.set(s.id,l/c)}let i=e.items.filter(o=>o.kind==="video"&&o.enabled!==!1&&o.media_id&&o.src_in!=null&&!t.has(o.track)),n=[...new Set(i.flatMap(o=>[o.start,o.end]))].sort((o,s)=>o-s),a=[];for(let o=0;o+1<n.length;o++){let[s,c]=[n[o],n[o+1]],l=i.filter(p=>p.start<=s&&p.end>=c).sort((p,v)=>v.track-p.track)[0];if(!l)continue;let u=r.get(l.id)??1,d=l.src_in+Math.round((s-l.start)*u),m=d+Math.round((c-s)*u),f=a.at(-1);if(f&&f.id===l.id&&f.end===s&&f.src_out===d){f.end=c,f.src_out=m;continue}a.push({id:l.id,media_id:l.media_id,name:l.name,start:s,end:c,src_in:d,src_out:m})}return a.map(({id:o,...s})=>s)}var XD=e=>{let t=/(\d+)\s*[xX×]\s*(\d+)/.exec(String(e??""));return t?[Number(t[1]),Number(t[2])]:void 0};function jD(e){let t=e.clips.flatMap(i=>{let n=cn(e,i),a=Di(e,i);if(!n||n.kind!=="video"||i.cells.kind==="transition")return[];let o=String(a?.cells.target_url??""),s=Number(a?.cells["available_range.start"]),c=Number(i.cells["source_range.start"]??0),l=Number(i.cells["source_range.dur"]??n.end-n.start);return[{id:n.id,name:n.name,track:n.track,start:n.start,end:n.end,keys:new Set([...jo(n.name),...jo(o.split(/[\\/]/).pop()??"")]),meta_keys:new Set([...jo(String(i.cells.reel_name??""))]),...Number.isFinite(s)?{src_tc:[s+c,s+c+l]}:{},media_fps:Number(a?.cells["available_range.rate"]??a?.cells.source_fps??e.fps??24),reel:String(i.cells.reel_name??"")||void 0,speed:i.cells.speed==null||i.cells.speed===""?100:Number(i.cells.speed),raster:XD(i.cells.Resolution)}]}),r=e.markers.filter(i=>!i.cells.item_id).flatMap(i=>{let n=new Set([...jo(String(i.cells.name??"")),...jo(String(i.cells.note??""))]);if(!n.size)return[];let a=Number(i.cells.frame),o=t.filter(s=>s.start<=a&&a<s.end).sort((s,c)=>s.track-c.track)[0];return[{frame:a,name:String(i.cells.name??""),keys:n,start:o?.start??a,end:o?.end??a+Math.max(1,Number(i.cells.duration??1)),plate:o}]});return{plates:t,markers:r}}var IT={marker:"shot marker",plate_name:"plate name",metadata:"plate metadata",timecode:"source timecode","":""};function Y$(e,t){let{plates:r,markers:i}=jD(e),n=a=>Me(e.start_frame+a,e.fps||24);return ZT(t,r,i).map((a,o)=>({id:String(o),...a.status==="ready"&&a.plan?{piece:{path:a.comp.path,src_in:a.plan.src_in,src_out:a.plan.src_out,start:a.record_start+a.plan.record_offset,end:a.record_start+a.plan.record_offset+a.plan.covers,...a.plate?{plate:{track:a.plate.track,start:a.plate.start}}:{},copy_sizing:!!a.plate&&(!a.plate.raster||!a.comp.raster||a.plate.raster[0]===a.comp.raster[0]&&a.plate.raster[1]===a.comp.raster[1]),note:`Matched by ${IT[a.matched_by]} \xB7 confidence ${Math.round(a.confidence*100)}% \xB7 comp frame ${a.plan.src_in} on the cut${a.plan.note?` \xB7 ${a.plan.note}`:""}`}}:{},cells:{cant:a.status!=="ready",comp:a.comp.name,shot:a.shot,version:a.version??"",status:a.status,by:IT[a.matched_by],confidence:a.confidence?`${Math.round(a.confidence*100)}%`:"",plate:a.plate?.name??"",at:a.record_start!=null?n(a.record_start):"",why:a.reasons.join("; ")}}))}function B$(e,t){let r=e.map(i=>i.piece).filter(Boolean);return r.length?[{op:"drop_in",name:t.name||"VFX",disable_plates:!!t.disable_plates,pieces:r}]:[]}var kw=[["rec709","Rec.709 (gamma 2.4)"],["srgb","sRGB"],["p3d65","P3-D65 (gamma 2.6)"]],KT=[["flat","Flat 1.85"],["scope","Scope 2.39"],["full","Full 1.90"]],AT=[["2k","2K"],["4k","4K"]],UT=[["feature","Feature"],["trailer","Trailer"],["teaser","Teaser"],["short","Short"],["advertisement","Ad"],["test","Test"]],_$=e=>e.map(t=>t[0]);var YT=[{id:"resolve",label:"Resolve",reads:!0,edits:!0},{id:"premiere",label:"Premiere",reads:!0,edits:!0},{id:"avid",label:"Avid",reads:!0,edits:!1},{id:"flame",label:"Flame",reads:!0,edits:!1},{id:"nuke",label:"Nuke Studio",reads:!0,edits:!1},{id:"fcp",label:"Final Cut",reads:!1,edits:!1},{id:"baselight",label:"Baselight",reads:!0,edits:!1},{id:"protools",label:"Pro Tools",reads:!0,edits:!1}],un=YT.filter(e=>e.edits).map(e=>[e.id,e.label]),eee=YT.map(e=>e.id);var Gl=["marker_add","marker_update","marker_delete"],WD={resolve:"all",premiere:["clip_color","enabled","metadata","name","playhead","properties","timeline_rename",...Gl],flame:["clip_color","enabled",...Gl],nuke:Gl,avid:Gl,protools:Gl,baselight:[]},tee=(e,t)=>{let r=WD[e];return r==="all"||!!r?.includes(t)};var Al={strict:{tolerance_px:1,min_frames:1,gap_frames:0,black_threshold:16},standard:{tolerance_px:2,min_frames:2,gap_frames:1,black_threshold:10},relaxed:{tolerance_px:6,min_frames:4,gap_frames:3,black_threshold:6}},Tw="strict",BT={tolerance_px:[0,512],min_frames:[1,600],gap_frames:[0,600],black_threshold:[0,255]};function QT(e,t={}){let r=(e??Tw).trim().toLowerCase(),i=Al[r]??Al[Tw],n=Al[r]?r:r==="custom"?"custom":Tw,a={...i};for(let o of Object.keys(BT)){let s=t[o];if(s===void 0||!Number.isFinite(Number(s)))continue;let[c,l]=BT[o],u=Math.max(c,Math.min(l,Math.round(Number(s))));u!==a[o]&&(n="custom"),a[o]=u}return{...a,preset:n}}function Kl(e,t){let r=Number(e),i=Number(t);return!Number.isFinite(r)||!Number.isFinite(i)?!1:r>0&&r>=i}function LD(e,t,r){return!(e>0)||!(t>0)||!(r>0)?!1:Math.abs(t/r-e)/e>=.02}function VD(e,t,r,i,n){let a=Math.max(2,Number(n)||0);return Math.abs(e-t)<=a&&Math.abs(r-i)<=a}function qD(e,t,r,i,n,a){return!n||!(n.top>0||n.bottom>0||n.left>0||n.right>0)?!1:Math.abs(e-n.top)<=a&&Math.abs(t-n.bottom)<=a&&Math.abs(r-n.left)<=a&&Math.abs(i-n.right)<=a}var _T=[["bt","ct"],["bb","cb"],["bl","cl"],["br","cr"]],Mf=e=>Math.max(0,Math.trunc(Number(e)||0)),Hf=e=>Math.max(0,Math.min(1,Number(e)||0));function ZD(e,t,r,i,n,a={}){let o=a.tolerance_px??4;i=Math.max(1,Math.trunc(i)),n=Math.max(1,Math.trunc(n));let s=[];for(let c of e??[]){let l=Math.trunc(Number(c.pts)||0),u=Mf(c.bt),d=Mf(c.bb),m=Mf(c.bl),f=Mf(c.br);if(!Kl(Math.max(u,d,m,f),o)||qD(u,d,m,f,a.declared_blanking,o))continue;let p=Number(a.expected_aspect_ratio)||0;if(p>0){let b=Math.max(1,i-m-f),g=Math.max(1,n-u-d),y=m<=o&&f<=o,x=u<=o&&d<=o;if((y||x)&&LD(p,i,n)&&VD(u,d,m,f,o)&&Math.abs(b/g-p)/p<.02)continue}let v=r+l,h;for(let b of t??[])b.start<=v&&v<b.end&&(!h||b.track>h.track)&&(h=b);h&&s.push({frame_abs:v,bt:u,bb:d,bl:m,br:f,ct:Hf(c.ct),cb:Hf(c.cb),cl:Hf(c.cl),cr:Hf(c.cr),source:c.source??"pixels",clip:h})}return s.sort((c,l)=>c.frame_abs-l.frame_abs)}function MD(e,t){let r=[];return Kl(e.bt,t)&&r.push("Top"),Kl(e.bb,t)&&r.push("Bottom"),Kl(e.bl,t)&&r.push("Left"),Kl(e.br,t)&&r.push("Right"),r}function $T(e,t,r,i,n,a={}){let o=Math.max(1,Math.trunc(a.min_frames??1)),s=Math.max(0,Math.trunc(a.gap_frames??0)),c=a.tolerance_px??4,l=[],u;for(let d of ZD(e,t,r,i,n,a)){(!u||u.clip!==d.clip||d.frame_abs-u.end_frame-1>s)&&(u={clip:d.clip,start_frame:d.frame_abs,end_frame:d.frame_abs,frame_count:0,measured:{bt:0,bb:0,bl:0,br:0},coverage:{ct:0,cb:0,cl:0,cr:0},sources:new Set},l.push(u)),u.end_frame=d.frame_abs,u.frame_count++,u.sources.add(d.source);for(let[m,f]of _T)d[m]>=u.measured[m]&&(u.measured[m]=d[m],u.coverage[f]=d[f])}return l.filter(d=>d.frame_count>=o).map(d=>({...d,duration_frames:d.end_frame-d.start_frame+1,sources:[...d.sources].sort(),zones:MD(d.measured,c)}))}function nee(e){let t=new Map;for(let i of e){let n=t.get(i.clip.id);n||(n={clip:i.clip,measured:{bt:0,bb:0,bl:0,br:0},coverage:{ct:0,cb:0,cl:0,cr:0},frames:0,first_frame_abs:i.start_frame,zones:[],sources:[],ranges:[]},t.set(i.clip.id,n)),n.frames+=i.frame_count,n.first_frame_abs=Math.min(n.first_frame_abs,i.start_frame);for(let[a,o]of _T)i.measured[a]>=n.measured[a]&&(n.measured[a]=i.measured[a],n.coverage[o]=i.coverage[o]);n.sources=[...new Set([...n.sources,...i.sources])].sort(),n.ranges.push(i)}let r=["Top","Bottom","Left","Right"];return[...t.values()].map(i=>{let n=new Set(i.ranges.flatMap(a=>a.zones));return{...i,zones:r.filter(a=>n.has(a)),ranges:i.ranges.sort((a,o)=>a.start_frame-o.start_frame)}}).sort((i,n)=>i.clip.start-n.clip.start)}function iee(e,t=1){let r=Math.max(0,Math.trunc(t)),i=[];for(let n of[...e].sort((a,o)=>a.frame-o.frame)){let a=i.at(-1);if(a&&n.frame-a.end_frame<=r+1){a.end_frame=Math.max(a.end_frame,n.frame),a.frames++,a.darkest=Math.min(a.darkest,n.avg);continue}i.push({start_frame:n.frame,end_frame:n.frame,duration_frames:1,frames:1,darkest:n.avg})}for(let n of i)n.duration_frames=n.end_frame-n.start_frame+1;return i}var qt=()=>({"video.black_frame":{enabled:!0},"video.white_frame":{enabled:!0},"video.blanking":{enabled:!0,min_bar_px:1,min_reveal_depth_px:4},"video.clipping":{enabled:!0},"video.legal_range":{enabled:!0,max_pct:1},"video.banding":{enabled:!0,max_pct:.8},"video.interlace":{enabled:!0,expect:"progressive"},"video.freeze":{enabled:!0},"video.dead_pixel":{enabled:!0,min_run_frames:20},"video.maxcll":{enabled:!0,max_cll:0,max_fall:0},"video.aspect":{enabled:!0},"video.pse":{enabled:!0,sdr_peak_nits:200,flash_delta_nits:20,dark_max_nits:160,area_frac:.25,max_flashes_per_sec:3,red_flash:!0,patterns:!0,pattern_min_pairs:5},"video.shots":{enabled:!0,cut_threshold:.35,cut_ratio:4},"video.log_look":{enabled:!0},"video.video_range":{enabled:!0},"video.effective_resolution":{enabled:!0,soft_ratio:.5},"video.blockiness":{enabled:!0,threshold:.35},"video.noise":{enabled:!0},"video.exposure_outlier":{enabled:!0,z:3},"video.cadence":{enabled:!0,min_repeats:4},"video.gamut":{enabled:!0,max_pct:1,low:-.05,high:1.05},"video.text":{enabled:!0,fail_on_text:0},"video.burn_in":{enabled:!0,min_frames:24,change_frac:.8},"video.overlay":{enabled:!0,persist_frac:.8,min_shots:3},"video.leader":{enabled:!0,window_secs:120},"video.hdr_metadata":{enabled:!0}}),rr=(e,t,r,i=20)=>({"audio.integrated_loudness":{enabled:!0,target_lufs:e,tolerance_lu:t},"audio.true_peak":{enabled:!0,max_dbtp:r},"audio.lra":{enabled:!0,max_lra:i},"audio.short_term":{enabled:!1,max_lufs:0},"audio.momentary":{enabled:!1,max_lufs:0},"audio.silence":{enabled:!0,threshold_dbfs:-60,min_secs:1},"audio.phase":{enabled:!0,min_corr:-.3},"audio.clipping":{enabled:!0},"audio.clicks":{enabled:!0,ratio:12},"audio.dc_offset":{enabled:!0},"audio.tone":{enabled:!1,expected:0,level_dbfs:-20,tolerance_db:1.5},"audio.pop":{enabled:!1,expected:0}}),Nw=()=>Object.fromEntries(Object.keys(rr(-23,2,-1)).map(e=>[e,{enabled:!1}])),Ow=(e,...t)=>Object.fromEntries(Object.entries(e).map(([r,i])=>[r,{...i,enabled:t.includes(r)}])),Sw=e=>({...e,"video.maxcll":{enabled:!0,max_cll:0,max_fall:0},"video.hdr_metadata":{enabled:!0},"video.legal_range":{enabled:!1}}),Zt=(e,t,r,i,n,a,o)=>({id:e,label:t,group:r,description:i,color_space:n,checks:a,audio:o}),e4=[Zt("conform_default","Conform default","Conform","Every video check (dead / stuck / hot pixels included), PSE, a 120 s leader window, EBU R128 audio (-23 LUFS, -1 dBTP) with a house \xB12 LU tolerance. The pack when there is no delivery spec.","sdr_rec709",{...qt(),...rr(-23,2,-1)},{lufs:-23,tolerance:2,true_peak:-1}),Zt("proxy_leak","Proxy leak (shots on offline media)","Conform","Only the per-shot checks that expose offline media in the online: shots, effective resolution, blockiness, burn-in counters, text. Fast: no PSE, no audio.","sdr_rec709",{...Ow(qt(),"video.shots","video.effective_resolution","video.blockiness","video.burn_in","video.text"),...Nw()},null),Zt("textless_master","Textless master","Conform","Conform default, and any text-like graphics anywhere in the picture fails.","sdr_rec709",{...qt(),...rr(-23,2,-1),"video.text":{enabled:!0,fail_on_text:1}},{lufs:-23,tolerance:2,true_peak:-1}),Zt("blanking_only","Blanking only","Conform","Black edges, partial reveals and black frames, nothing else.","sdr_rec709",{...Ow(qt(),"video.blanking","video.black_frame","video.aspect"),...Nw()},null),Zt("pse_only","PSE (Harding-style) only","Conform","The Ofcom / ITU-R BT.1702 flash, red-flash and pattern rules alone. Not a certified Harding test.","sdr_rec709",{...Ow(qt(),"video.pse","video.shots"),...Nw()},null),Zt("netflix_sdr","Netflix SDR","Streaming","Rec.709 legal range, PSE mandatory, -27 LKFS \xB12 (programme-gated here, dialogue-gated in the spec), -2 dBTP.","sdr_rec709",{...qt(),...rr(-27,2,-2)},{lufs:-27,tolerance:2,true_peak:-2}),Zt("netflix_hdr","Netflix HDR (PQ)","Streaming","PQ light levels measured and reported, declared-vs-measured HDR metadata, PSE, -27 LKFS \xB12 / -2 dBTP.","hdr_pq",{...Sw(qt()),...rr(-27,2,-2)},{lufs:-27,tolerance:2,true_peak:-2}),Zt("apple_tv_sdr","Apple TV+ SDR","Streaming","Rec.709 legal range, PSE, -24 LKFS \xB12, -2 dBTP.","sdr_rec709",{...qt(),...rr(-24,2,-2)},{lufs:-24,tolerance:2,true_peak:-2}),Zt("apple_tv_hdr","Apple TV+ HDR (PQ)","Streaming","PQ light levels reported, HDR metadata checked, PSE, -24 LKFS \xB12 / -2 dBTP.","hdr_pq",{...Sw(qt()),...rr(-24,2,-2)},{lufs:-24,tolerance:2,true_peak:-2}),Zt("amazon_sdr","Amazon / Prime Video SDR","Streaming","Rec.709 legal range, PSE, -24 LKFS \xB12, -2 dBTP.","sdr_rec709",{...qt(),...rr(-24,2,-2)},{lufs:-24,tolerance:2,true_peak:-2}),Zt("amazon_hdr","Amazon / Prime Video HDR (PQ)","Streaming","PQ light levels reported, HDR metadata checked, PSE, -24 LKFS \xB12 / -2 dBTP.","hdr_pq",{...Sw(qt()),...rr(-24,2,-2)},{lufs:-24,tolerance:2,true_peak:-2}),Zt("ebu_r128","EBU R128","Broadcast","Programme loudness -23 LUFS \xB11, true peak -1 dBTP, LRA \u2264 20 LU; EBU R103 RGB gamut on.","sdr_rec709",{...qt(),...rr(-23,1,-1,20)},{lufs:-23,tolerance:1,true_peak:-1}),Zt("bbc_dpp","BBC / DPP (AS-11 UK)","Broadcast","EBU R128 loudness (-23 LUFS \xB11), true peak -3 dBTP, R103 gamut, PSE mandatory.","sdr_rec709",{...qt(),...rr(-23,1,-3,20)},{lufs:-23,tolerance:1,true_peak:-3}),Zt("atsc_a85","ATSC A/85 (US broadcast)","Broadcast","Dialnorm target -24 LKFS \xB12, true peak -2 dBTP; SMPTE legal range and PSE on.","sdr_rec709",{...qt(),...rr(-24,2,-2,20)},{lufs:-24,tolerance:2,true_peak:-2})],t4=e4.map(e=>[e.id,e.label]),oee=e=>e4.find(t=>t.id===e);function Lo(e,t,r,i,n){let a=1-n;return a*a*a*e+3*a*a*n*t+3*a*n*n*r+n*n*n*i}function HD(e,t,r){let i=0,n=1;for(let o=0;o<48;o++){let s=(i+n)/2;Lo(t[0],t[1],t[2],t[3],s)<e?i=s:n=s}let a=(i+n)/2;return Lo(r[0],r[1],r[2],r[3],a)}var Xw=e=>!!(e.sOutX||e.sOutY||e.sInX||e.sInY);function n4(e){return e.some(t=>Xw(t)||t.interp==="bezier")}var r4=new WeakMap;function DD(e,t){let r=r4.get(e);if(r&&r.to===t)return r;let i=e.x,n=e.y,a=t.x,o=t.y,s,c,l,u;Xw(e)||Xw(t)?(s=i+(e.sOutX??0),c=n+(e.sOutY??0),l=a+(t.sInX??0),u=o+(t.sInY??0)):(s=i+(a-i)/3,c=n+(o-n)/3,l=a-(a-i)/3,u=o-(o-n)/3);let d=[0],m=i,f=n;for(let v=1;v<=256;v++){let h=v/256,b=Lo(i,s,l,a,h),g=Lo(n,c,u,o,h);d.push(d[d.length-1]+Math.hypot(b-m,g-f)),m=b,f=g}let p={to:t,arc:d,ctrl:[i,s,l,a,n,c,u,o]};return r4.set(e,p),p}function i4(e,t,r){if(!e.length)return[0,0];let i=e[0],n=e[e.length-1];if(t<=i.time)return[i.x,i.y];if(t>=n.time)return[n.x,n.y];for(let a=0;a<e.length-1;a++){let o=e[a],s=e[a+1];if(!(t>=o.time&&t<s.time))continue;if(o.interp==="hold")return[o.x,o.y];let c=s.time-o.time;if(c<=0)return[s.x,s.y];let l=c/(r||24),{arc:u,ctrl:d}=DD(o,s),m=u[u.length-1];if(!(m>1e-12))return[o.x,o.y];let f=l>0?m/l:0,p=o.interp==="bezier"&&o.outSpeed!=null?o.outSpeed:f,v=o.interp==="bezier"&&o.outInfluence!=null?o.outInfluence:1/3,h=s.interp==="bezier"&&s.inSpeed!=null?s.inSpeed:f,b=s.interp==="bezier"&&s.inInfluence!=null?s.inInfluence:1/3,g=1/6,y=(G,Z)=>Math.abs(G-Z)<1e-9,x=p===0&&y(v,1/3),z=h===0&&y(b,1/3);y(v,g)&&(p=f,v=z?.5:1/3),y(b,g)&&(h=f,b=x?.5:1/3);let N=(t-o.time)/(r||24),P=Math.min(Math.max(HD(N,[0,v*l,l-b*l,l],[0,p*v*l,m-h*b*l,m]),0),m),O=1,X=256;for(;O<X;){let G=O+X>>1;u[G]<P?O=G+1:X=G}let S=u[O-1],w=u[O],j=w>S?(P-S)/(w-S):0,M=(O-1+j)/256;return[Lo(d[0],d[1],d[2],d[3],M),Lo(d[4],d[5],d[6],d[7],M)]}return[n.x,n.y]}function a4(e,t){if((t==="flip_horizontal"?e.flip_horizontal:e.flip_vertical)===!0)return!0;let i=e.effects;return Array.isArray(i)?i.some(n=>{let a=n;return a?.kind===t&&a.enabled!==!1}):!1}function nr(e,t){return typeof e=="number"&&Number.isFinite(e)?e:Array.isArray(e)&&typeof e[t]=="number"?e[t]:null}function RD(e,t,r,i,n){let a;Array.isArray(e.value)&&Array.isArray(t.value)?a=Math.hypot((nr(t.value,0)??0)-(nr(e.value,0)??0),(nr(t.value,1)??0)-(nr(e.value,1)??0)):a=(nr(t.value,0)??0)-(nr(e.value,0)??0);let o=i/r;if(a===0||!(n>0))return o;let s=h=>{let b=typeof h?.x=="number"?h.x:null,g=typeof h?.y=="number"?h.y:null;if(b===null||g===null)return null;let y=Math.min(Math.max(g,0),1)*r;return{dx:y,dy:b/n/a*y}},c=s(e.tout)??{dx:r/3,dy:r/3/r},l=s(t.tin)??{dx:r/3,dy:r/3/r},u=Math.min(Math.max(c.dx,0),r),d=c.dy,m=r-Math.min(Math.max(l.dx,0),r),f=1-l.dy,p=(h,b,g,y)=>{let x=1-y;return 3*h*y*x*x+3*b*y*y*x+g*y*y*y},v=o;for(let h=0;h<8;h++){let b=p(u,m,r,v)-i,g=1-v,y=3*(u*(g*g-2*v*g)+m*(2*v*g-v*v)+r*v*v);if(Math.abs(y)<1e-9)break;let x=v-b/y;if(!(x>=0&&x<=1))break;if(Math.abs(x-v)<1e-7){v=x;break}v=x}if(Math.abs(p(u,m,r,v)-i)>r*1e-4){let h=0,b=1;for(let g=0;g<40;g++)v=(h+b)/2,p(u,m,r,v)<i?h=v:b=v}return p(d,f,1,v)}function FD(e,t,r,i=0,n=0){let o=(e.keyframes??[]).filter(l=>l.parameter_path===t&&typeof l.time?.value=="number").map(l=>({time:l.time.value,value:l.value,interp:l.interp??"linear",tin:l.tangent_in,tout:l.tangent_out,drt:!!l.raw_extraction?.drt_tangent})).sort((l,u)=>l.time-u.time);if(!o.length)return;let s=nr(o[0].value,i)??0,c=nr(o[o.length-1].value,i)??0;if(r<=o[0].time)return s;if(r>=o[o.length-1].time)return c;for(let l=0;l<o.length-1;l++){let u=o[l],d=o[l+1];if(r>=u.time&&r<=d.time){let m=nr(u.value,i)??0,f=nr(d.value,i)??0;if(u.interp==="hold")return m;let p=d.time-u.time||1,v=(u.tout||d.tin)&&!u.drt&&!d.drt?RD(u,d,p,r-u.time,n):(r-u.time)/p;return m+(f-m)*v}}return c}function ID(e){let t=e.keyframes??[];for(let r of t){if(r.parameter_path==="speed")continue;let i=r.time?.rate;if(typeof i=="number"&&i>0)return i}}function o4(e){let t=e.speed;return typeof t=="number"&&Number.isFinite(t)?Math.abs(t)/100:1}function ED(e){let t=e,r=t.raw_extraction??void 0,i=c=>{let l=r?.[c];return typeof l=="number"&&Number.isFinite(l)?l:void 0};if(!(t.is_reinterpreted===!0||r?.isReinterpreted===!0))return 1;let a=t.original_fps??i("originalFps"),o=t.interpreted_fps??i("reinterpretedFps");if(a!=null&&o!=null&&a>0&&o>0)return o/a;let s=i("reinterpretationSpeedAdjustment");return s!=null&&s>0?s/100:1}function s4(e,t){let i=(e.keyframes??[]).filter(o=>o.parameter_path==="speed"&&typeof o.time?.value=="number"&&typeof o.value=="number").map(o=>({x:o.time.value,y:o.value,tan:Array.isArray(o.raw_extraction?.drtNativeTangent)?o.raw_extraction.drtNativeTangent:null})).sort((o,s)=>o.x-s.x);if(i.length<2)return null;let n=(o,s)=>{let c=i[o].tan;if(c&&c.length>=4){if(s==="in"&&c[0])return c[1]/c[0];if(s==="out"&&c[2])return c[3]/c[2]}let l=s==="out"?Math.min(o+1,i.length-1):Math.max(o-1,0),u=Math.min(o,l),d=Math.max(o,l),m=i[d].x-i[u].x;return m>0?(i[d].y-i[u].y)/m:0},a=i.length-1;if(t<=i[0].x)return i[0].y+(t-i[0].x)*n(0,"out");if(t>=i[a].x)return i[a].y+(t-i[a].x)*n(a,"in");for(let o=0;o<a;o++){let s=i[o],c=i[o+1];if(t>c.x)continue;let l=c.x-s.x;if(l<=0)return c.y;let u=(t-s.x)/l,d=u*u,m=d*u,f=n(o,"out"),p=n(o+1,"in");return(2*m-3*d+1)*s.y+(m-2*d+u)*l*f+(-2*m+3*d)*c.y+(m-d)*l*p}return i[a].y}function CD(e,t,r){let i=e.timeline_range?.start?.value??0,n=e.timeline_range?.start?.rate||r,a=(t-i)/n,o=e.source_range?.start,s=o&&typeof o.value=="number"&&o.rate?o.value/o.rate:0,c=s4(e,a);if(c!=null)return(s+c)*r;let l=o4(e);if(e.speed_reverse){let u=e.source_range?.duration,d=u&&typeof u.value=="number"&&u.rate?Math.max(0,u.value-1)/u.rate:0;return(s+d-a*l)*r}return(s+a*l)*r}function JD(e,t){let r=e.timeline_range?.start,i=r?.value??0,n=r?.rate||24,a=e.source_range?.start,o=a?.value??0,s=a?.rate||n,c=s4(e,(t-i)/n);if(c!=null)return o+c*s;let l=o4(e)*ED(e),u=(t-i)*(s/n)*l;if(e.speed_reverse){let d=e.source_range?.duration?.value??0;return o+Math.max(0,d-1)-u}return o+u}function GD(e){let t=e.keyframes??[],r=[];for(let i of t){if(i.parameter_path!=="position"||typeof i.time?.value!="number")continue;let n=i.value,a=nr(n,0),o=nr(n,1);if(a==null||o==null)return null;let s=i.raw_extraction?.tangentPs??void 0,c=(l,u)=>{let d=l?.[u];return typeof d=="number"&&Number.isFinite(d)?d:void 0};r.push({time:i.time.value,x:a,y:o,interp:i.interp??"linear",outSpeed:i.tangent_out?.x??void 0,outInfluence:i.tangent_out?.y??void 0,inSpeed:i.tangent_in?.x??void 0,inInfluence:i.tangent_in?.y??void 0,sOutX:c(s,"spatialOutX"),sOutY:c(s,"spatialOutY"),sInX:c(s,"spatialInX"),sInY:c(s,"spatialInY")})}return r.length<2?null:(r.sort((i,n)=>i.time-n.time),n4(r)?r:null)}function l4(e,t){let r=ID(e)??e.timeline_range?.start?.rate??24,i=CD(e,t,r),n=!1,a=(l,u=0)=>{let d=FD(e,l,i,u,r);return d!==void 0&&(n=!0),d},o=l=>typeof l=="number"?l:null,s=GD(e);s&&(n=!0);let c=s?i4(s,i,r):null;return{scale:a("scale")??o(e.scale),scaleX:a("scale.x")??o(e.scale_x),scaleY:a("scale.y")??o(e.scale_y),posX:c?c[0]:a("position",0)??a("position.x")??o(e.position_x)??0,posY:c?c[1]:a("position",1)??a("position.y")??o(e.position_y)??0,rotation:a("rotation")??o(e.rotation)??0,anchorX:a("anchor",0)??a("anchor.x")??o(e.anchor_x)??0,anchorY:a("anchor",1)??a("anchor.y")??o(e.anchor_y)??0,opacity:a("opacity")??o(e.opacity),cropL:a("crop.left")??o(e.crop_left)??0,cropR:a("crop.right")??o(e.crop_right)??0,cropT:a("crop.top")??o(e.crop_top)??0,cropB:a("crop.bottom")??o(e.crop_bottom)??0,flipH:a4(e,"flip_horizontal"),flipV:a4(e,"flip_vertical"),animated:n}}function c4(e,t){return Math.floor(JD(e,t)+1e-9)}function Vw(e,t){let r=t?e.timelines.find(i=>i.id===t||i.name===t):e.timelines.find(i=>i.kind==="primary")??e.timelines[0];if(!r)throw new Error(t?`no timeline ${t} in this session`:"this session has no timeline");if(!r.resolution_w||!r.resolution_h)throw new Error(`${r.name}: the timeline has no raster (resolution) in the session`);return r}var KD=e=>e.fps_den?e.fps_num/e.fps_den:e.fps_num,Vo=(e,t)=>Me((e.start_frame??0)+t,KD(e),!!e.is_drop_frame),AD=e=>e.split(/[\\/]/).pop()??e,Yl=e=>e.tracks.filter(t=>t.kind==="Video").sort((t,r)=>t.track_index-r.track_index),yr=e=>{let t=e.timeline_range.start.value;return[t,t+e.timeline_range.duration.value]},Df=e=>e.items.filter(t=>t.kind==="clip");function qo(e,t){let r=e.media_references.find(s=>s.id===t.media_reference_id),i=r?.local_path??r?.target_url?.replace(/^file:\/\//,"")??null,n=r?.source_resolution_w??0,a=r?.source_resolution_h??0,o=r?.source_pixel_aspect||1;return{path:i,w:n*o,h:a}}var Ri=(e,t)=>l4(e,t),jw=(e,t)=>c4(e,t),u4=(e,t,r)=>({box:[t,r],scale:[(e.scaleX??e.scale??100)/100,(e.scaleY??e.scale??100)/100],pos:[e.posX*t,e.posY*r],rot:e.rotation,anchor:[e.anchorX,e.anchorY],crop:[e.cropL/100,e.cropR/100,e.cropT/100,e.cropB/100],flip:[e.flipH,e.flipV]});function d4(e,t,r,i){if(!(r>0&&i>0))return[e,t];let n=Math.min(e/r,t/i);return[r*n,i*n]}function g4(e,t,r){let i=t-e,n=Math.max(1,Math.min(r,i));return[...new Set(Array.from({length:n},(a,o)=>e+Math.min(i-1,Math.floor((o+.5)*i/n))))]}var qw=["fit","fill","crop","stretch"];function y4(e,t,r){if(r)return r;let i=e.reframe_fit??t.mismatch_policy??"fit";return i==="none"?"crop":qw.includes(i)?i:"fit"}function x4(e,t,r,i,n){if(!(e>0&&t>0)||n==="fit")return[1,1];let a=r/e,o=i/t,s=[a,a],c=[o,o],l=a<=o?s:c,u=n==="crop"?[1,1]:n==="fill"?a>o?s:c:[a,o];return[u[0]/l[0],u[1]/l[1]]}var Cn=(e,t)=>Math.round(e*10**t)/10**t||0;function Ww(e,t,r,i=[1,1]){return{Pan:Cn(e.position_x*t/i[0],3),Tilt:Cn(-e.position_y*r/i[1],3),ZoomX:Cn(e.scale_x/100/i[0],5),ZoomY:Cn(e.scale_y/100/i[1],5),RotationAngle:Cn(-e.rotation,3),FlipX:e.flip_h,FlipY:e.flip_v}}function f4(e,t,r,i){let n=(t.scaleX??t.scale??100)/100,a=t.rotation*Math.PI/180,o=Math.cos(a),s=Math.sin(a),c=e.position_x*r,l=e.position_y*i;return{...e,scale_x:e.scale_x*n,scale_y:e.scale_y*n,rotation:e.rotation+t.rotation,position_x:(t.posX*r+n*(o*c-s*l))/r,position_y:(t.posY*i+n*(s*c+o*l))/i}}var w4=e=>({scale_x:e.scaleX??e.scale??100,scale_y:e.scaleY??e.scale??100,position_x:e.posX,position_y:e.posY,rotation:e.rotation,flip_h:e.flipH,flip_v:e.flipV}),m4=e=>(e.scale??100)===100&&(e.scaleX??100)===100&&(e.scaleY??100)===100&&!e.posX&&!e.posY&&!e.rotation&&!e.cropL&&!e.cropR&&!e.cropT&&!e.cropB&&!e.flipH&&!e.flipV,gee=["edit","input","node"];function p4(e){let t=e.node,r=typeof t=="object"&&t?t:{layer:e.layer??1,node:t};return{...r.node!==void 0&&r.node!==""?{node:r.node}:{},...r.layer&&r.layer!==1?{layer:r.layer}:{}}}var UD={aligned:"Green",animated:"Yellow",no_match:"Red",refused:"Red"};async function YD(e,t){let r=t.offline_reference,i=Qe(t),n=i,a=Math.max(...t.tracks.flatMap(v=>v.items.map(h=>h.timeline_range.start.value+h.timeline_range.duration.value)),0),o=v=>({kind:"Video",track_index:Math.max(0,...Yl(t).map(h=>h.track_index))+1,name:"OFFLINE REFERENCE",enabled:!0,items:v});if(r?.session_id){let{getSession:v}=await import("./store-H676BOKI.js"),h=(await v(r.session_id)).session,b=h.timelines.find(P=>P.kind==="primary")??h.timelines[0],g=(t.start_frame??0)+(r.frame_offset??0)-(b.start_frame??0),y=Yl(b).filter(P=>P.enabled!==!1).flatMap(P=>P.items.filter(O=>O.kind==="clip"&&O.enabled!==!1&&O.media_reference_id).map(O=>({i:O,top:P.track_index}))),x=[...new Set(y.flatMap(({i:P})=>[P.timeline_range.start.value,P.timeline_range.start.value+P.timeline_range.duration.value]))].sort((P,O)=>P-O),z=[];for(let P=0;P+1<x.length;P++){let[O,X]=[x[P],x[P+1]],S=y.filter(({i:H})=>H.timeline_range.start.value<=O&&O<H.timeline_range.start.value+H.timeline_range.duration.value).sort((H,D)=>D.top-H.top)[0],[w,j]=[Math.max(0,O-g),Math.min(a,X-g)];if(!S||j<=w)continue;let M=S.i,G=z.at(-1);if(G&&G.from===M.id&&G.timeline_range.start.value+G.timeline_range.duration.value===w){G.timeline_range.duration.value+=j-w,G.source_range.duration.value+=j-w;continue}let{id:Z,timeline_range:J,source_range:K,media_reference_id:_,keyframes:R,...te}=M;z.push({...te,id:`offline-ref-${z.length}`,from:M.id,kind:"clip",enabled:!0,media_reference_id:`offref:${_}`,timeline_range:{start:{value:w,rate:n},duration:{value:j-w,rate:n}},source_range:{start:{value:K.start.value+(w+g-M.timeline_range.start.value),rate:K.start.rate},duration:{value:j-w,rate:K.start.rate}}})}if(!z.length)throw new Je("not_found",`the offline reference timeline "${b.name}" has no picture over this timeline`);let N=new Set(z.map(P=>String(P.media_reference_id).slice(7)));return{lane:o(z),media:h.media_references.filter(P=>N.has(P.id)).map(P=>({...P,id:`offref:${P.id}`})),name:`timeline ${b.name}`}}let s=r?.media_reference_id?e.media_references.find(v=>v.id===r.media_reference_id):void 0,c=s?.local_path??s?.target_url?.replace(/^file:\/\//,"");if(!s||!c)throw new Je("not_found","this timeline has no offline reference linked in Resolve (Timeline \u203A Link Offline Reference Clip): a movie or another timeline");let{probeMedia:l}=await import("./media-22VAJIVT.js"),u=await l(c),d=u.source_timecode?Do(u.source_timecode,i,null):0,m=u.available_range?.duration?.value??u.declared_duration?.value??null,f=(t.start_frame??0)+(r.frame_offset??0)-d;m!=null&&(f>=m||f+a<=0)&&(f=r.frame_offset??0);let p=m!=null?Math.max(1,Math.min(a,m-f)):a;return{lane:o([{id:"offline-reference",kind:"clip",name:s.name??"offline reference",enabled:!0,media_reference_id:s.id,timeline_range:{start:{value:0,rate:n},duration:{value:p,rate:n}},source_range:{start:{value:f,rate:n},duration:{value:p,rate:n}}}]),media:[],name:s.name??AD(c)}}async function yee(e,t,r,i){if(t.reference_track!=="offline")return await v4(e,t,r,i);let n=Vw(e,t.timeline_id),{lane:a,media:o,name:s}=await YD(e,n);n.tracks.push(a),e.media_references.push(...o);try{return{...await v4(e,{...t,reference_track:Yl(n).length,reference_label:"the offline reference"},r,i),reference:`the offline reference (${s})`}}finally{n.tracks.splice(n.tracks.indexOf(a),1),e.media_references=e.media_references.filter(c=>!o.includes(c))}}async function v4(e,t,r,i){let n=Vw(e,t.timeline_id),a=n.resolution_w,o=n.resolution_h,s=Yl(n),c=s.findIndex(w=>/\b(ref|reference|offline)\b/i.test(String(w.name??""))),l=t.reference_track||(c>=0?c+1:s.length),u=s[l-1];if(!u)throw new Error(`no video track V${l} (the timeline has ${s.length})`);if(t.tracks?.includes(l))throw new Je("invalid_args",`the track to align cannot be the reference track (V${l})`);let d=(t.tracks?.length?t.tracks:s.map((w,j)=>j+1).filter(w=>s[w-1].enabled!==!1)).filter(w=>w!==l);for(let w of d)if(!s[w-1])throw new Error(`no video track V${w} (the timeline has ${s.length})`);let m=t.input_scaling??"fit",f=t.sizing_target??"edit",p=600,v=(w,j)=>{let M=Math.max(1,j-w);if(t.samples==="ends")return[...new Set([0,.25,.5,.75,1].map(J=>w+Math.round(J*(Math.max(w,j-1)-w))))];let G=(t.samples??"half")==="half"&&!t.step?Math.max(1,Math.round(Qe(n)/2)):t.step,Z=t.samples==="all"?Math.max(1,Math.ceil(M/p)):G?Math.max(1,Math.floor(G),Math.ceil(M/p)):0;if(Z){let J=[];for(let K=w;K<j;K+=Z)J.push(K);return J.at(-1)!==j-1&&J.push(j-1),J}return g4(w,j,Math.max(1,Math.min(p,Math.floor(Number(t.samples))||1)))},h=Number(n.start_frame??0),b=[],g=[],y=Df(u),x=t.scope??"all",z=new Set(t.picks??[]);if(x==="selected"&&!z.size)throw new Error("no clips selected: select clips in the timeline, or align the whole timeline");for(let w of d)for(let j of Df(s[w-1])){let[M,G]=yr(j);if(x==="playhead"&&!(M<=(t.at??-1)&&(t.at??-1)<G)||x==="selected"&&!z.has(`${w}:${M}`))continue;let Z={item_id:j.id,name:j.name??j.id,track:w,start:M,end:G,record_tc:Vo(n,M),verdict:"refused",confidence:null,samples:[]};b.push(Z);let J=ne=>{Z.reason=ne};if(j.enabled===!1){J("disabled");continue}let K,_=0,R=0;for(let ne of y){let[he,Le]=yr(ne),ve=Math.max(M,he),Ve=Math.min(G,Le);Ve-ve>R-_&&(K=ne,_=ve,R=Ve)}if(!K){if(t.reference_label){J(`${t.reference_label} does not cover it (${Vo(n,M)}\u2013${Vo(n,G)}): it ends before this clip`);continue}let ne=u.items.find(he=>{let[Le,ve]=yr(he);return he.kind!=="clip"&&he.kind!=="gap"&&Math.min(G,ve)>Math.max(M,Le)});J(ne?`V${l} has ${/compound|stack|timeline/i.test(String(ne.kind))?"a compound clip or nested timeline":`a ${ne.kind}`} over it, not a movie clip: Align reads a media file there (decompose it, or use Offline ref)`:y.length?`nothing on V${l} over it (${Vo(n,M)}\u2013${Vo(n,G)}): the reference does not cover this clip`:`V${l} has no movie clips: pick the track the reference is on, or Offline ref`);continue}let te=qo(e,K),H=qo(e,j);if(!te.path){J(`the reference clip ${K.name??K.id} is not linked (timeline_relink first)`);continue}if(!H.path){J("not linked (timeline_relink first)");continue}let D=v(_,R),V=Ri(K,_),I=m4(V)?void 0:V;if(I){let ne=I.scaleX??I.scale??100,he=I.scaleY??I.scale??100,Le=I.animated||D.some(ve=>JSON.stringify(Ri(K,ve))!==JSON.stringify(V))?"keyframed":Math.abs(ne-he)>1e-6?"scaled unevenly":I.cropL||I.cropR||I.cropT||I.cropB?"cropped":I.flipH||I.flipV?"flipped":I.anchorX||I.anchorY?"anchored off centre":f!=="edit"?"resized (Colour-page sizing is solved against an unresized reference only)":"";if(Le){J(`the reference clip ${K.name??K.id} is ${Le}; the fit is against its raw picture`);continue}}if(te.w>0&&te.h>0&&Math.abs(te.w/te.h-a/o)>.01*(a/o)){J(`the reference ${te.w}x${te.h} does not fill the ${a}x${o} frame`);continue}let ae=ne=>ne.map(he=>({ref:te.path,refFrame:jw(K,he),src:H.path,srcFrame:jw(j,he)})),oe=Array.from({length:R-_},(ne,he)=>_+he),ie=Ri(j,M);g.push({row:Z,item:j,recs:D,every:oe,refT:I,ask:{pairs:ae(D),every:ae(oe),every_t:oe.map(ne=>ne-M),edit:w4(ie),edit_identity:m4(ie),edit_animated:!!ie.animated,anchor_off:!!(ie.anchorX||ie.anchorY),...t.inputs?.get(`${w}:${M+h}`)?.length?{input:t.inputs.get(`${w}:${M+h}`)}:{}}})}let N=g.length?await Gn({op:"reframe",items:g.map(w=>w.ask),out:[a,o],target:f},r,i):{items:[],offsets:[]},P=N.offsets;N.items.forEach((w,j)=>{let{row:M,item:G,recs:Z,every:J,ask:K,refT:_}=g[j];if(_&&(w.verdict==="animated"&&Object.assign(w,{verdict:"refused",reason:"a move under a resized reference is not solved yet",keys:void 0,edit_keys:void 0,grade_keys:void 0}),w.transform&&(w.transform=f4(w.transform,_,a,o)),w.edit_transform&&(w.edit_transform=f4(w.edit_transform,_,a,o)),w.transform)){let D=K.edit,V=w.transform,I=.5/a;w.unchanged=Math.abs(V.scale_x-D.scale_x)<.05&&Math.abs(V.scale_y-D.scale_y)<.05&&Math.abs(V.position_x-D.position_x)<I&&Math.abs(V.position_y-D.position_y)<.5/o&&Math.abs(V.rotation-D.rotation)<.02}let R=w.measured==="every"?J:Z,te=w.measured==="every"?K.every:K.pairs,H=(({w:D,h:V})=>x4(D,V,a,o,y4(G,n,t.input_scaling)))(qo(e,G));M.samples=w.scores.map((D,V)=>({record:R[w.at[V]],ref_frame:te[w.at[V]].refFrame,src_frame:te[w.at[V]].srcFrame,score:D})),Object.assign(M,{verdict:w.verdict,confidence:w.confidence,...w.reason?{reason:w.reason}:{},...w.label?{label:w.label}:{},...w.unchanged?{unchanged:!0}:{},...w.grade_sizing?{grade_sizing:w.grade_sizing}:{}}),w.transform&&(M.transform=w.transform,M.properties=Ww(w.edit_transform??w.transform,a,o,H)),w.keys?.length&&(M.keys=w.keys.map(D=>({record:R[w.at[D.j]],transform:D.transform,properties:Ww(D.transform,a,o,H),confidence:D.confidence}))),w.grade_keys?.length&&(M.grade_keys=w.grade_keys.map(({shape:D,...V})=>D?.kind==="resolve_dissolve"?{...V,ease_in:D.start,ease_out:D.end}:V),M.grade_keys[0].t>0&&M.grade_keys.unshift({...M.grade_keys[0],t:0,ease_in:void 0,ease_out:void 0})),w.edit_keys?.length&&(M.edit_keys=w.edit_keys[0].t>0?[{...w.edit_keys[0],t:0,shape:void 0},...w.edit_keys]:w.edit_keys)});let O=[];for(let w of b){let j={track:w.track,start:w.start};if(w.verdict==="aligned"&&f==="edit"&&!w.unchanged){let M=w.properties;O.push({op:"properties",item:j,set:{...M.ZoomX!==M.ZoomY?{ZoomGang:!1}:{},...M}})}if(w.verdict==="animated"&&w.edit_keys&&O.push({op:"edit_keys",item:j,keys:w.edit_keys}),w.verdict==="animated"&&w.grade_keys&&O.push({op:"grade_sizing",item:j,target:f==="node"?"node":"input",keys:w.grade_keys,...f==="node"?p4(t):{}}),w.verdict==="aligned"&&w.grade_sizing&&!w.unchanged&&O.push({op:"grade_sizing",item:j,target:f,...w.grade_sizing,...f==="node"?p4(t):{}}),t.markers??!0){let M={aligned:"Aligned",animated:"Animated",no_match:"No match",refused:"Not aligned"}[w.verdict],G=[w.label,w.confidence!=null?`confidence ${w.confidence}`:"",w.reason].filter(Boolean).join(" \xB7 ");O.push({op:"marker_add",frame:w.start,color:UD[w.verdict],name:`${M}: ${w.name}`,note:G,data:"ConformTools:align"})}}let X;if(t.apply_session){X=0;for(let w of b.filter(j=>j.verdict==="aligned")){let j=w.transform;Lw(e,"transform",{timeline_id:n.id,item_id:w.item_id,scale:j.scale_x,position_x:j.position_x,position_y:j.position_y,rotation:j.rotation});let M=n.tracks.flatMap(G=>G.items).find(G=>G.id===w.item_id);Math.abs(j.scale_x-j.scale_y)>.001&&(M.scale_x=j.scale_x,M.scale_y=j.scale_y),j.flip_h?M.flip_horizontal=!0:delete M.flip_horizontal,j.flip_v?M.flip_vertical=!0:delete M.flip_vertical,X++}}let S={aligned:0,animated:0,no_match:0,refused:0};for(let w of b)S[w.verdict]++;return{timeline:n.name??n.id,raster:[a,o],reference_track:l,rows:b,counts:S,ops:O,...X!=null?{applied:X}:{},input_scaling:m,sizing_target:f,...P.length?{offsets:P}:{}}}function xee(e){let t=e.counts,r=`${e.timeline} (${e.raster.join("x")}): ${t.aligned} aligned, ${t.animated} animated, ${t.no_match} no match, ${t.refused} not aligned \u2014 against ${e.reference??`V${e.reference_track}`}${e.input_scaling!=="fit"?` (Resolve units for input scaling "${e.input_scaling}")`:""}${e.sizing_target!=="edit"?`; written as Color-page ${e.sizing_target==="input"?"Input Sizing":"node Sizing"} on top of each clip's own edit transform`:""}${e.sizing_target==="edit"&&t.animated?`; the ${t.animated} moving clip(s) get Edit-page keyframes on a copy of the timeline, "${e.timeline} ALIGNED" (Resolve cannot keyframe the Edit page from a script; the copy carries every grade and setting)`:""}${e.applied!=null?`; ${e.applied} transform(s) written into the session`:""}`,i=a=>{let o=a.properties,s=a.grade_sizing,c=s?` \u2192 ${e.sizing_target} sizing Zoom ${s.zoom}${s.height!==1?` Height ${s.height}`:""} Pan ${s.pan} Tilt ${s.tilt} Rotate ${s.rotation}${s.flip_x?" FlipH":""}${s.flip_y?" FlipV":""}`:o?` \u2192 Pan ${o.Pan} Tilt ${o.Tilt} Zoom ${o.ZoomX}${o.ZoomY!==o.ZoomX?`/${o.ZoomY}`:""} Rot ${o.RotationAngle}${o.FlipX?" FlipX":""}${o.FlipY?" FlipY":""}`:"",l=a.grade_keys?.length?` \u2192 ${a.grade_keys.length} keyframes (${e.sizing_target==="node"?"node":"Input"} Sizing)`:a.edit_keys?.length?` \u2192 ${a.edit_keys.length} Edit-page keyframes`:"";return` V${a.track} ${a.record_tc} ${a.name}: ${a.verdict.toUpperCase()}${a.label?` (${a.label})`:""}${c}${l}${a.confidence!=null?`, confidence ${a.confidence}`:""}${a.reason?` \u2014 ${a.reason}`:""}`},n=(e.offsets??[]).map(a=>` the reference differs from the ${a.raster} online by ${a.label} on ${a.clips} of ${a.of} clips: a render / decode difference, not sizing \u2014 taken out of every clip, never written`);return[r,...n,...e.rows.map(i),`host_apply ops ready: ${e.ops.filter(a=>a.op==="properties"||a.op==="grade_sizing").length} ${e.sizing_target==="edit"?"properties":"grade_sizing"}, ${e.ops.filter(a=>a.op==="marker_add").length} markers (data "ConformTools:align")`].join(`
|
|
95
|
+
`)}var Ul={"16:9":16/9,"1.85":1.85,"2.00":2,"2.20":2.2,"2.35":2.35,"2.39":2.39,"2.76":2.76,"4:3":4/3,"1:1":1,"9:16":9/16,none:null};function BD(e){if(e==null)return null;if(typeof e=="number")return e>0?e:null;if(e in Ul)return Ul[e];let t=/^(\d+(?:\.\d+)?)(?:[:/](\d+(?:\.\d+)?))?$/.exec(e.trim());if(!t)throw new Error(`aspect '${e}': one of ${Object.keys(Ul).join(", ")}, or a ratio like 1.66 or 3:2`);let r=t[2]?Number(t[1])/Number(t[2]):Number(t[1]);return r>0?r:null}function wee(e,t,r){let i=t/r,n=o=>{let s=Math.round(o);return s-s%2};if(!(e>0)||Math.abs(i-e)/e<.002)return{top:0,bottom:0,left:0,right:0};if(e>i){let o=n((r-t/e)/2);return{top:o,bottom:o,left:0,right:0}}let a=n((t-r*e)/2);return{top:0,bottom:0,left:a,right:a}}function h4(e,t,r){let i=[],n=e;for(let[a,o]of r)if(!(o<=n)&&(a>=t||(a>n&&i.push([n,Math.min(a,t)]),n=Math.max(n,o),n>=t)))break;return n<t&&i.push([n,t]),i}function b4(e,t,r){let i=[...e,[t,r]].sort((a,o)=>a[0]-o[0]),n=[];for(let a of i){let o=n.at(-1);o&&a[0]<=o[1]?o[1]=Math.max(o[1],a[1]):n.push([a[0],a[1]])}return n}async function zee(e,t,r,i){let n=Vw(e,t.timeline_id),a=n.resolution_w,o=n.resolution_h,s=BD(t.aspect),c=QT(t.strictness,{tolerance_px:t.tolerance_px,min_frames:t.min_frames,gap_frames:t.gap_frames,black_threshold:t.black_threshold}),l=!!t.pixels,u=Math.max(1,Math.min(12,Math.floor(t.samples??3))),d=Yl(n),m=d.filter(Z=>Z.enabled!==!1),f=[],p=[],v=Z=>{let J=qo(e,Z);if(!(J.w>0&&J.h>0))return!1;let[K,_]=d4(a,o,J.w,J.h),R=Ri(Z,yr(Z)[0]);return!R.animated&&Math.abs(K-a)<.5&&Math.abs(_-o)<.5&&(R.scaleX??R.scale??100)===100&&(R.scaleY??R.scale??100)===100&&!R.posX&&!R.posY&&!R.rotation&&!R.cropL&&!R.cropR&&!R.cropT&&!R.cropB},h=new Map,b=[];for(let Z of m)h.set(Z,b),b=Df(Z).filter(J=>J.enabled!==!1&&v(J)).reduce((J,K)=>b4(J,...yr(K)),b);let g=[];for(let Z of[...m].reverse()){let J=Df(Z).filter(R=>R.enabled!==!1),K=J.reduce((R,te)=>b4(R,...yr(te)),g),_=d.indexOf(Z)+1;for(let R of J){let[te,H]=yr(R),D=h.get(Z)??[],V=h4(te,H,g).flatMap(([ve,Ve])=>h4(ve,Ve,D));if(!V.length)continue;let I=qo(e,R);if(!(I.w>0&&I.h>0)){f.push({item_id:R.id,name:R.name??R.id,track:_,reason:"the source raster is unknown (timeline_relink the clip first)"});continue}l&&!I.path&&f.push({item_id:R.id,name:R.name??R.id,track:_,reason:"not linked: its source frames were not measured (timeline_relink first); its transform was checked"});let[ae,oe]=d4(a,o,I.w,I.h),ie=Ri(R,te).animated,ne=ve=>u4(Ri(R,ve),ae,oe),he=[],Le=new Map;for(let[ve,Ve]of V){let ze=new Set(l&&I.path?g4(ve,Ve,u):[]),Mt=new Set(ie?Array.from({length:Ve-ve},(Nt,qr)=>ve+qr):ze.size?[]:[ve]);for(let Nt of ze)Mt.add(Nt);let Mo=[...Mt].sort((Nt,qr)=>Nt-qr);Mo.forEach((Nt,qr)=>{Le.set(Nt,[qr?Nt:ve,Mo[qr+1]??Ve]),he.push({rec:Nt,place:ne(Nt),...ze.has(Nt)?{src:jw(R,Nt)}:{}})})}p.push({item:R,track:_,path:I.path,frames:he,hold:Le,animated:ie,box:[ae,oe]})}g=K}let y=p.length?await Gn({op:"blanking",items:p.map(Z=>({path:Z.path,frames:Z.frames})),out:[a,o],aspect:s},r,i):{items:[],target:[0,0,a,o]},x=y.target,z=[],N=new Map,P=0;y.items.forEach((Z,J)=>{let K=p[J],_=new Map;N.set(K.item.id,_);for(let R of Z){if(R.bars&&P++,R.black||!R.edges.some(D=>D>0))continue;let[te,H]=K.hold.get(R.rec);for(let D=te;D<H;D++)z.push({pts:D,bt:R.edges[0],bb:R.edges[1],bl:R.edges[2],br:R.edges[3],source:R.bars?"pixels":"geometry"}),_.set(D,R.zoom)}});let O=p.map(Z=>({id:Z.item.id,name:Z.item.name??Z.item.id,start:yr(Z.item)[0],end:yr(Z.item)[1],track:Z.track})),S=$T(z,O,0,Math.round(x[2]-x[0]),Math.round(x[3]-x[1]),{tolerance_px:c.tolerance_px,min_frames:c.min_frames,gap_frames:c.gap_frames}).map(Z=>{let J=1,K=N.get(Z.clip.id);for(let _=Z.start_frame;_<=Z.end_frame;_++){if(!K.has(_))continue;let R=K.get(_);J=R==null||J==null?null:Math.max(J,R)}return{item_id:Z.clip.id,name:Z.clip.name,track:Z.clip.track,record_start:Z.start_frame,record_end:Z.end_frame,record_tc:Vo(n,Z.start_frame),frames:Z.duration_frames,edges:{top:Z.measured.bt,bottom:Z.measured.bb,left:Z.measured.bl,right:Z.measured.br},zones:Z.zones,sources:Z.sources,zoom_fix:J}}),w=[],j=new Map;for(let Z of S)j.set(Z.item_id,[...j.get(Z.item_id)??[],Z]);let M=new Map,G=async(Z,J)=>{let _=(await Gn({op:"blanking",items:[{path:null,frames:Z.frames.map(te=>({rec:te.rec,place:u4(J,Z.box[0],Z.box[1])}))}],out:[a,o],aspect:s},void 0,i)).items[0]??[],R=[0,1,2,3].map(te=>Math.max(0,..._.map(H=>H.edges[te])));return{ok:R.every(te=>te<=c.tolerance_px),edges:R}};for(let[Z,J]of j){let K=p.find(oe=>oe.item.id===Z);if(K.animated)continue;let _=qo(e,K.item),R={track:K.track,start:yr(K.item)[0]},te=Ri(K.item,yr(K.item)[0]),H=oe=>Ww(w4(oe),a,o,x4(_.w,_.h,a,o,y4(K.item,n,t.input_scaling))),D;if(J.every(oe=>oe.sources.every(ie=>ie==="geometry"))){let oe=["top","bottom","left","right"].map(ne=>Math.max(...J.map(he=>he.edges[ne]))),ie=[];if(te.rotation&&Math.abs(te.rotation)<1){let ne={...te,rotation:0},he=await G(K,ne);he.ok?D={t:ne,what:`rotation ${Cn(te.rotation,2)}\xB0 removed`}:ie.push({t:ne,what:`rotation ${Cn(te.rotation,2)}\xB0 removed, `,edges:he.edges})}ie.push({t:te,what:"",edges:oe});for(let ne of D?[]:ie){let[he,Le,ve,Ve]=ne.edges,ze=ve-Ve,Mt=he-Le;if(!(!ze&&!Mt)){for(let[Mo,Nt]of[[1,1],[-1,1],[1,-1],[-1,-1]]){let qr={...ne.t,posX:ne.t.posX+Mo*ze/K.box[0],posY:ne.t.posY+Nt*Mt/K.box[1]};if((await G(K,qr)).ok){D={t:qr,what:`${ne.what}pan / tilt ${[ze&&`${ze>0?"+":""}${ze} px across`,Mt&&`${Mt>0?"+":""}${Mt} px up/down`].filter(Boolean).join(", ")}`};break}if(!Mt&&Nt===1&&Mo===-1)break}if(D)break}}}if(D){let oe=H(te),ie=H(D.t),ne=Object.fromEntries(["Pan","Tilt","RotationAngle"].filter(he=>ie[he]!==oe[he]).map(he=>[he,ie[he]]));w.push({op:"properties",item:R,set:ne}),M.set(Z,`${D.what} fills it`);for(let he of J)he.fix=D.what;continue}if(J.some(oe=>oe.zoom_fix==null))continue;let V=Math.max(...J.map(oe=>oe.zoom_fix)),I=H(te),ae=oe=>Math.ceil(oe*V*1e5)/1e5;w.push({op:"properties",item:R,set:{ZoomX:ae(I.ZoomX),ZoomY:ae(I.ZoomY)}})}if(t.markers??!0)for(let Z of S){let J=p.find(R=>R.item.id===Z.item_id),K=Z.zones.map(R=>`${R} ${Z.edges[R.toLowerCase()]} px`).join(" \xB7 "),_=J.animated?"keyframed sizing: fix the keys":M.get(Z.item_id)??(Z.zoom_fix==null?"no zoom about its anchor fills it":`zoom \xD7${Z.zoom_fix} fills it`);w.push({op:"marker_add",frame:Z.record_start,duration:Z.frames,color:"Red",name:`Blanking: ${Z.name}`,note:`${K} (${Z.sources.join("+")}) \u2014 ${_}`,data:"ConformTools:blanking"})}return{timeline:n.name??n.id,raster:[a,o],aspect:s,target:x,strictness:c,pixels:l,clips_checked:p.length,frames_measured:P,findings:S,refused:f,ops:w}}function Pee(e){return[`${e.findings.length?`BLANKING: ${e.findings.length} range(s) on ${new Set(e.findings.map(r=>r.item_id)).size} clip(s)`:"CLEAN: no clip shows black"} \u2014 ${e.timeline} ${e.raster.join("x")}${e.aspect?`, delivered ${Cn(e.aspect,3)}:1 (black counted inside it only)`:""}; ${e.strictness.preset} (${e.strictness.tolerance_px} px, ${e.strictness.min_frames} frame(s)); ${e.clips_checked} clip(s) by their transform${e.pixels?`, ${e.frames_measured} source frame(s) measured for their own black edges`:" (pixels:false: a black edge baked into a source is not seen)"}`,...e.findings.map(r=>` V${r.track} ${r.record_tc} ${r.name} (${r.frames} frame${r.frames>1?"s":""}): ${r.zones.map(i=>`${i} ${r.edges[i.toLowerCase()]} px`).join(", ")} [${r.sources.join("+")}]${r.zoom_fix?` \u2014 zoom \xD7${r.zoom_fix} fills it`:" \u2014 no zoom about its anchor fills it"}`),...e.refused.map(r=>` V${r.track} ${r.name}: ${r.reason}`),`host_apply ops ready: ${e.ops.filter(r=>r.op==="properties").length} ZoomX/ZoomY fixes, ${e.ops.filter(r=>r.op==="marker_add").length} markers (data "ConformTools:blanking")`].join(`
|
|
96
|
+
`)}var Bl=e=>e.map(([t,r])=>[t,r]),k4=e=>e[0].toUpperCase()+e.slice(1),Zw=Yi.map(e=>[e.id,e.short]),T4=e=>({host:e}),de=T4("resolve"),Rf=T4("premiere"),QD=S1.map(e=>[e.id,e.label]),ct={id:"source",label:"Timeline",type:"source",optional:!0,placeholder:"the timeline open in Resolve"},Jn=(e="Read the timeline")=>({id:"pull",use:"host.read",args:{...de,from:"$in.source"},label:e}),z4=JT,Ff=(e,t)=>({id:"apply",use:"host.apply",args:{...de,ops:"$ops",timeline:"$pull.timeline",source:"$pull"},...e?{when:e}:{},...t?{label:t}:{}}),P4=Object.keys(Al).map(e=>[e,k4(e)]),_D=[["","Full frame"],...Object.keys(Ul).filter(e=>e!=="none").map(e=>[e,e])],N4=e=>Object.entries(Oo).filter(([,t])=>t.folderStructure.includes(`{${e}}`)).map(([t])=>t),Mw=N4("show"),$D=N4("film"),O4=[{id:"exchange",name:"Timeline Exchange",app:!0,playbook:"conform",aka:["convert","translate","turn over","turnover","send to another app","AAF / XML / EDL / DRT","open in another host"],group:"Exchange",about:"Read a timeline from any host (a file, the one open in Resolve or Premiere, or the timeline wired in) and write it for another. In the app it runs on this machine, offline, nothing uploaded.",inputs:[{...ct,placeholder:"the From below"},{id:"from",label:"From",type:"choice",choices:[["source","This job's timeline"],["file","A timeline file"],["resolve","Resolve's open timeline"],["premiere","Premiere's open sequence"]],default:"source"},{id:"path",label:"Timeline file",type:"file",optional:!0,placeholder:".drt .aaf .avb .prproj .fcpxml .xml .otio .edl, Flame archive",when:{input:"from",is:["file"]}},{id:"target",label:"For",type:"choice",choices:Zw,default:"avid"},{id:"out",label:"Write to",type:"folder",optional:!0,placeholder:"a folder (default: next to the source)"},{id:"no_audio",label:"Picture only (no audio)",type:"bool",default:!1}],nodes:[{id:"read",use:"verb.timeline_read",args:{path:"$in.path"},when:"$in.from=file",label:"Read the timeline"},{id:"resolve",use:"verb.host_export",args:{host:"resolve"},when:"$in.from=resolve",label:"Read Resolve's open timeline"},{id:"premiere",use:"verb.host_export",args:{host:"premiere"},when:"$in.from=premiere",label:"Read Premiere's open sequence"},{id:"mute",use:"timeline.remove_audio",args:{session_id:"$read.session_id|$resolve.session_id|$premiere.session_id|$in.source.session_id"},when:"$in.no_audio=true",label:"Remove audio"},{id:"write",use:"verb.timeline_write",args:{session_id:"$read.session_id|$resolve.session_id|$premiere.session_id|$in.source.session_id",target:"$in.target",out_path:"$in.out"},label:"Write it"}]},{id:"join-timelines",name:"Join Timelines",part:!0,playbook:"conform",output:"timeline",aka:["join reels","combine reels","stitch acts","one long timeline","full film","LFOA","reel string-out","merge timelines"],group:"Exchange",about:"Several timelines (any hosts) end to end in one new timeline \u2014 a reel string-out, every act in one \u2014 written for any host. Tracks line up by number; a marker at each join names where it came from.",inputs:[{id:"paths",label:"Timelines, in order",type:"files",placeholder:"one timeline file per line"},{id:"name",label:"New timeline name",type:"text",optional:!0,placeholder:"default: the first one's name + _JOINED"},{id:"gap",label:"Black between (frames)",type:"number",default:0},{id:"no_audio",label:"Picture only (no audio)",type:"bool",default:!1},{id:"target",label:"For",type:"choice",choices:Zw,default:"resolve"},{id:"out",label:"Write to",type:"folder",optional:!0,placeholder:"a folder (default: next to the first)"}],nodes:[{id:"read",use:"timeline.read_many",args:{paths:"$in.paths"}},{id:"join",use:"timeline.join",args:{session_id:"$read.session_id",sources:"$read.sources",name:"$in.name",gap_frames:"$in.gap"}},{id:"mute",use:"timeline.remove_audio",args:{session_id:"$read.session_id",timeline_id:"$join.timeline_id"},when:"$in.no_audio=true"},{id:"write",use:"verb.timeline_write",args:{session_id:"$read.session_id",timeline_id:"$join.timeline_id",target:"$in.target",out_path:"$in.out"}}]},{id:"clips",name:"Clips",part:!0,aka:["clip list","find clips","select clips by name","clip color","flag clips","enable / disable clips","tag clips"],group:"Look",...de,about:"Every clip of the open timeline as a table \u2014 with every effect, Warp Stabilizer and retime on it. Narrow it with the query (is:stabilized, is:retimed, is:nested\u2026), untick what to leave out, change the rest in Resolve or Premiere in one undoable batch: clip color (Premiere: the clip's label), enabled, markers, names, keywords; on Resolve also flags, grade versions, color group, cache.",inputs:[ct,{id:"host",label:"In",type:"choice",choices:un,default:"resolve"},{id:"query",label:"Only clips matching",type:"text",optional:!0,placeholder:"is:stabilized \xB7 is:retimed \xB7 is:offline \xB7 speed!=100 \xB7 track:V2 \xB7 name:/^A0\\d+/"},{id:"action",label:"Do",type:"choice",default:"color",choices:[["color","Clip color"],["flag","Add flag"],["unflag","Clear flags"],["enable","Enable"],["disable","Disable"],["marker","Add marker"],["keywords","Keywords"],["version_add","New grade version"],["version_load","Load grade version"],["group","Color group"],["ungroup","Leave color group"],["prefix","Name prefix"],["suffix","Name suffix"],["cache_on","Color cache on"],["cache_off","Color cache off"],["properties","Set properties"],["metadata","Set metadata"],["keywords_add","Add keywords"],["keywords_remove","Remove keywords"],["markers_remove","Remove the clip's markers"],["fade_in","Fade in (not saved by Resolve 21.1.1)"],["fade_out","Fade out (not saved by Resolve 21.1.1)"],["audio_level","Audio level"],["normalize","Normalize audio"]]},{id:"color",label:"Colour",type:"color",default:"Orange",when:{input:"action",is:["color"]}},{id:"marker_color",label:"Colour",type:"marker_color",default:"Blue",when:{input:"action",is:["flag","marker"]}},{id:"text",label:"Text",type:"text",optional:!0,when:{input:"action",is:["marker","keywords","version_add","version_load","group","prefix","suffix","keywords_add","keywords_remove"]}},{id:"set",label:"Set",type:"text",optional:!0,placeholder:"ZoomX=1.2, Opacity=50 \xB7 Comments=VFX, Scene=12",when:{input:"action",is:["properties","metadata"]}},{id:"amount",label:"Frames / dB",type:"text",optional:!0,placeholder:"12 frames \xB7 -6 dB \xB7 -1 dBFS peak",when:{input:"action",is:["fade_in","fade_out","audio_level","normalize"]}}],nodes:[{id:"pull",use:"host.read",args:{host:"$in.host",from:"$in.source"},label:"Read the timeline"},{id:"clips",use:"plan.clips",args:{live:"$pull",query:"$in.query"}},{id:"review",use:"review",args:{rows:"$clips",columns:[["#","#"],["track","Track"],["name","Name"],["rec_in_tc","Rec In"],["rec_out_tc","Rec Out"],["reel_name","Reel"],["speed","Speed"],["retimed","Retimed"],["stabilized","Stabilized"],["effects","Effects"],["color","Colour"],["flags","Flags"],["on","On"],["version","Version"],["group","Group"],["keywords","Keywords"]]}},{id:"ops",use:"plan.index_ops",args:{live:"$pull",rows:"$review",action:"$in.action",color:"$in.color",marker_color:"$in.marker_color",text:"$in.set|$in.amount|$in.text"}},{id:"apply",use:"host.apply",args:{host:"$in.host",ops:"$ops",timeline:"$pull.timeline",source:"$pull"}}]},{id:"markers",name:"Markers",part:!0,app:!0,aka:["marker utility","marker colors","recolor markers","delete markers","rename markers","locators","marker cleanup","marker keywords"],group:"Look",...de,about:"Timeline and clip markers of the open timeline in Resolve or Premiere: filter them, then recolor, swap two colors, rename, note, keyword, find and replace, change the duration, delete, or move / copy them between the timeline and the clip, in one undoable batch. On Premiere a clip marker is on the media: it shows on every use of it, listed once.",inputs:[ct,{id:"host",label:"In",type:"choice",choices:un,default:"resolve"},{id:"only",label:"Only color",type:"marker_color",optional:!0},{id:"on",label:"On",type:"choice",choices:[["","Timeline and clips"],["timeline","Timeline"],["clip","Clips"]],default:""},{id:"find",label:"Find in name / note",type:"text",optional:!0},{id:"which",label:"Which",type:"choice",choices:[["","Every marker"],["playhead","The one at the playhead"]],default:""},{id:"action",label:"Do",type:"choice",default:"recolor",choices:[["recolor","Colour"],["swap","Swap colors"],["rename","Set text"],["note","Note"],["keyword","Keyword"],["prefix","Add before"],["suffix","Add after"],["replace","Find and replace"],["duration","Duration"],["delete","Delete"],["to_clip","Move onto the clip"],["to_timeline","Move onto the timeline"],["copy_to_clip","Copy onto the clip"],["copy_to_timeline","Copy onto the timeline"],["swap_places","Swap timeline \u2194 clip"]]},{id:"color",label:"Colour",type:"marker_color",default:"Green",when:{input:"action",is:["recolor","swap"]}},{id:"color2",label:"and",type:"marker_color",default:"Red",when:{input:"action",is:["swap"]}},{id:"field",label:"Change",type:"choice",choices:[["name","Name"],["note","Note"],["keyword","Keyword"]],default:"name",when:{input:"action",is:["rename","prefix","suffix","replace"]}},{id:"text",label:"Text",type:"text",when:{input:"action",is:["rename","note","keyword","prefix","suffix","replace"]}},{id:"with",label:"Replace with",type:"text",optional:!0,when:{input:"action",is:["replace"]}},{id:"separator",label:"Separator",type:"text",optional:!0,placeholder:"none",when:{input:"action",is:["prefix","suffix"]}},{id:"frames",label:"Frames",type:"number",default:1,when:{input:"action",is:["duration"]}},{id:"track",label:"Onto track",type:"number",optional:!0,placeholder:"the topmost clip",when:{input:"action",is:["to_clip","copy_to_clip","swap_places"]}}],nodes:[{id:"pull",use:"host.read",args:{host:"$in.host",from:"$in.source"},label:"Read the timeline"},{id:"scoped",use:"rows.filter",args:{rows:"$pull.markers",where:[["on","=","$in.on"],["name|note","contains","$in.find"],["at","=","$in.which"]]}},{id:"rows",use:"rows.filter",args:{rows:"$scoped",where:[["color","=","$in.only"]]}},{id:"review",use:"review",args:{rows:"$rows",columns:[["tc","Record TC"],["color","Colour"],["name","Name"],["note","Note"],["data","Keyword"],["frames","Frames"],["on","On"],["clip","Clip"]]}},{id:"ops",use:"plan.marker_ops",args:{live:"$pull",rows:"$review",all:"$scoped",action:"$in.action",color:"$in.color",text:"$in.color2|$in.text",field:"$in.field",with:"$in.with",separator:"$in.separator",frames:"$in.frames",track:"$in.track"}},{id:"apply",use:"host.apply",args:{host:"$in.host",ops:"$ops",timeline:"$pull.timeline",source:"$pull"}}]},{id:"unused",name:"Unused Media",part:!0,app:!0,aka:["unused media","clean the media pool","tidy the bin","purge","orphan clips","not in any timeline"],group:"Look",...de,about:"Media pool clips that no timeline in the project uses (every timeline read, and Resolve's own usage count: used if either says so), by drive: move them into one bin, take them out of the pool, or move the files themselves into a folder on disk (Undo puts them back).",inputs:[{id:"drive",label:"Only on drives",type:"text",optional:!0,placeholder:"/Volumes/RAID, /Volumes/SHUTTLE (default: every drive)"},{id:"not_drive",label:"Not on drives",type:"text",optional:!0,placeholder:"/Volumes/ARCHIVE"},{id:"find",label:"Find in name / file",type:"text",optional:!0},{id:"action",label:"Do",type:"choice",choices:[["move","Move into a bin"],["files","Move the files on disk"],["remove","Remove from the pool (cannot be undone)"]],default:"move"},{id:"bin",label:"Bin",type:"text",default:"UNUSED MEDIA",when:{input:"action",is:["move"]}},{id:"destination",label:"Into the folder",type:"folder",when:{input:"action",is:["files"]}}],nodes:[{id:"pool",use:"host.pool",args:{...de,unused:!0,skip_folder:"$in.bin"},label:"Find the unused clips"},{id:"rows",use:"rows.filter",args:{rows:"$pool",where:[["drive","starts","$in.drive"],["drive","!starts","$in.not_drive"],["name|file","contains","$in.find"]]}},{id:"review",use:"review",args:{rows:"$rows",columns:[["name","Name"],["folder","Bin"],["start_tc","Start TC"],["file","File"]]}},{id:"ops",use:"plan.pool_ops",args:{rows:"$review",action:"$in.action",folder:"$in.bin"},when:"$in.action!=files"},{id:"apply",use:"host.apply",args:{...de,ops:"$ops"},when:"$in.action!=files"},{id:"files",use:"files.move",args:{rows:"$review",destination:"$in.destination"},when:"$in.action=files",label:"Move the files"}]},{id:"rename",name:"Rename",part:!0,app:!0,aka:["clip renamer","resolve renamer","rename clips","batch rename","find and replace names","fix clip names"],group:"Prep",...de,preview:!0,about:"Timeline clips, media pool clips or timelines through an ordered list of rename steps, previewed row by row (DUPEs are never applied), renamed in Resolve or Premiere in one undoable batch (media pool clips: Resolve). Files in a folder (image sequences) are renamed on disk when that is the target.",inputs:[ct,{id:"host",label:"In",type:"choice",choices:un,default:"resolve"},{id:"target",label:"Rename",type:"choice",choices:[["clips","Timeline clips"],["pool","Media pool clips"],["timelines","Timelines"],["files","Files in a folder (image sequences)"]],default:"clips"},{id:"files_in",label:"Folder",type:"folder",when:{input:"target",is:["files"]}},{id:"offset",label:"Offset frame numbers by",type:"number",optional:!0,placeholder:"0",when:{input:"target",is:["files"]}},{id:"start_at",label:"\u2026or start each sequence at",type:"number",optional:!0,placeholder:"as they are",when:{input:"target",is:["files"]}},{id:"folder",label:"Pool folder",type:"text",optional:!0,placeholder:"all folders",when:{input:"target",is:["pool"]}},{id:"subfolders",label:"Its subfolders too",type:"bool",default:!0,when:{input:"target",is:["pool"]}},{id:"only",label:"Only names matching",type:"text",optional:!0,placeholder:"a pattern, e.g. ^A0\\d+ (numbering counts these)"},{id:"steps",label:"Steps",type:"rename_steps",default:[{type:"find_replace",find:"",replace:""}]}],nodes:[{id:"pull",use:"host.read",args:{host:"$in.host",from:"$in.source"},when:"$in.target!=files",label:"Read the timeline"},{id:"fplan",use:"files.rename_plan",args:{folder:"$in.files_in",steps:"$in.steps",only:"$in.only",offset:"$in.offset",start_at:"$in.start_at"},when:"$in.target=files",label:"Read the folder"},{id:"subjects",use:"rename.subjects",when:"$in.target!=files",args:{host:"$in.host",live:"$pull",target:"$in.target",folder:"$in.folder",subfolders:"$in.subfolders",only:"$in.only"}},{id:"plan",use:"plan.rename",args:{subjects:"$subjects",steps:"$in.steps"},when:"$in.target!=files"},{id:"review",use:"review",args:{rows:"$plan|$fplan",columns:[["where","Where"],["old","Now"],["new","New"],["dupe",""],["error",""]],skip:"hold"}},{id:"ops",use:"ops.collect",args:{rows:"$review"},when:"$in.target!=files"},{id:"apply",use:"host.apply",args:{host:"$in.host",ops:"$ops",timeline:"$pull.timeline",source:"$pull"},when:"$in.target!=files"},{id:"files",use:"files.rename",args:{rows:"$review"},when:"$in.target=files",label:"Rename the files"}]},{id:"handles",name:"Add Handles",part:!0,app:!0,playbook:"conform",output:"timeline",aka:["handles","pad clips","extend clips","add head and tail"],group:"Prep",...de,about:"A new timeline with every video clip of the open one strung out end to end, each with handles either side (clamped to the media; stills skipped), into Resolve (linked to the clips already in the pool) or Premiere (a new sequence). A negative number trims each end instead. The open timeline is never edited.",inputs:[ct,{id:"host",label:"In",type:"choice",choices:un,default:"resolve"},{id:"handles",label:"Handles (frames each side)",type:"number",default:12},{id:"name",label:"New timeline name",type:"text",optional:!0,placeholder:"{TL}_{N}FR_HANDLES"}],nodes:[{id:"pull",use:"host.read",args:{host:"$in.host",from:"$in.source"},label:"Read the timeline"},{id:"build",use:"timeline.add_handles",args:{session_id:"$pull.session_id",handles:"$in.handles",name:"$in.name"},label:"Build the timeline"},{id:"open",use:"host.open",args:{host:"$in.host",session_id:"$build.session_id",timeline_ids:"$build.timeline_ids",like:"$pull"},label:"Into the host"}],view:{split:"row",panes:[{pane:"knobs"},{pane:"viewer",show:"$build|$source"}]}},{id:"all-clips",name:"All Clips Timeline",part:!0,app:!0,playbook:"conform",output:"timeline",aka:["all clips timeline","sources reel","select reel","string-out of every clip","all source media","used clips timeline","pull list"],group:"Prep",...de,about:"One timeline of every clip the chosen timelines use (or every timeline in a bin), overlapping uses of the same media merged into one piece, with handles clamped to the media. Duplicate footage (the same shot media-managed twice) is marked or reduced to the best copy. Lands in Resolve or Premiere as a new timeline.",inputs:[{id:"host",label:"In",type:"choice",choices:un,default:"resolve"},{id:"timelines",label:"From timelines",type:"timelines",optional:!0,placeholder:"the open one"},{id:"bin",label:"Or every timeline in the bin",type:"text",optional:!0,placeholder:"a media pool folder, e.g. REELS (Resolve)"},{id:"subfolders",label:"Its subfolders too",type:"bool",default:!0},{id:"name",label:"New timeline name",type:"text",optional:!0,placeholder:"All_Clips_Timeline_{N}FR_HANDLES"},{id:"settings",label:"Timeline settings",type:"choice",choices:[["project","The project's"],["source","The (first) timeline's, checked"]],default:"project"},{id:"handles",label:"Handles (frames)",type:"number",default:0},{id:"order",label:"Order",type:"choice",choices:[["timeline","Cut order"],["source_tc","Source TC order"]],default:"timeline"},{id:"mark_duplicates",label:"Mark duplicate footage",type:"bool",default:!0},{id:"reduce_duplicates",label:"Reduce to the best copy",type:"bool",default:!1},{id:"include_disabled",label:"Include disabled clips",type:"bool",default:!1},{id:"include_image_sequences",label:"Image sequences",type:"bool",default:!0},{id:"include_stills",label:"Stills",type:"bool",default:!1},{id:"still_extensions",label:"Still extensions",type:"text",optional:!0,placeholder:"the built-in list (e.g. tif, png, jpg)"},{id:"include_nested",label:"What compound / nested clips show",type:"bool",default:!0},{id:"include_offline",label:"Offline media",type:"bool",default:!0},{id:"include_references",label:"Reference clips",type:"bool",default:!1},{id:"reference_pattern",label:"Reference clips match",type:"text",default:"_REF|_REFERENCE| REF",when:{input:"include_references",is:["false"]}},{id:"per_resolution",label:"A timeline per resolution",type:"bool",default:!1},{id:"disable_non_matching",label:"\u2026with every clip, the others disabled",type:"bool",default:!1,when:{input:"per_resolution",is:["true"]}},{id:"stack",label:"Stack takes in place",type:"bool",default:!1}],nodes:[{id:"read",use:"host.export_many",args:{host:"$in.host",timelines:"$in.timelines",bin:"$in.bin",subfolders:"$in.subfolders"},label:"Read the timelines"},{id:"build",use:"timeline.all_clips",label:"Build the timeline",args:{session_id:"$read.session_id",sources:"$read.sources",handles:"$in.handles",order:"$in.order",mark_duplicates:"$in.mark_duplicates",reduce_duplicates:"$in.reduce_duplicates",include_disabled:"$in.include_disabled",include_image_sequences:"$in.include_image_sequences",include_stills:"$in.include_stills",include_offline:"$in.include_offline",include_references:"$in.include_references",reference_pattern:"$in.reference_pattern",per_resolution:"$in.per_resolution",stack:"$in.stack",name:"$in.name",include_nested:"$in.include_nested",still_extensions:"$in.still_extensions",disable_non_matching:"$in.disable_non_matching"}},{id:"open",use:"host.open",args:{host:"$in.host",session_id:"$build.session_id",timeline_ids:"$build.timeline_ids"},when:"$in.settings!=source",label:"Into the host"},{id:"open_like",use:"host.open",args:{host:"$in.host",session_id:"$build.session_id",timeline_ids:"$build.timeline_ids",like:"$read.first"},when:"$in.settings=source & $in.per_resolution!=true",label:"Into the host"},{id:"open_res",use:"host.open",args:{host:"$in.host",session_id:"$build.session_id",timeline_ids:"$build.timeline_ids"},when:"$in.settings=source & $in.per_resolution=true",label:"Into the host"}],view:{split:"row",panes:[{pane:"knobs"},{pane:"viewer",show:"$build|$source"}]}},{id:"vfx",name:"VFX Pulls",part:!0,app:!0,aka:["vfx pulls","visual effects","VFX shots","plate pulls","pulls","shot list","turnover to VFX","EXR plates"],group:"Prep",...de,about:"Markers of one color become numbered VFX shots with their plates (the clips under each marker) and reference. Name the markers, build the string-out as a new timeline, and render a file per pull into a folder per shot: each step switched on or off.",inputs:[ct,{id:"mode",label:"Do",type:"choice",choices:[["pull","Pull the shots"],["mark","Add the next VFX marker at the playhead"]],default:"pull"},{id:"color",label:"Markers",type:"marker_color",default:"Blue"},{id:"prefix",label:"Prefix",type:"text",default:"VFX"},{id:"increment",label:"Step",type:"number",default:10},{id:"digits",label:"Digits",type:"number",default:4},{id:"handles",label:"Handles",type:"number",default:8},{id:"gap",label:"Gap between shots",type:"number",default:24},{id:"start_frame",label:"First frame",type:"number",default:1001},{id:"naming",label:"Name pulls",type:"choice",choices:kT,default:"plates"},{id:"folder",label:"Shot folder",type:"text",optional:!0,placeholder:"{shot} \xB7 {prefix} {number} {scene} {take}"},{id:"names",label:"Rename pulls",type:"text",optional:!0,placeholder:"VFX_0010_PLATE01=SMOKE_0010, \u2026"},{id:"hero",label:"Hero is the",type:"choice",choices:[["lowest","lowest track"],["highest","highest track"]],default:"lowest"},{id:"reference_track",label:"Reference track",type:"track",optional:!0},{id:"skip_disabled",label:"Skip disabled clips",type:"bool",default:!0},{id:"name_markers",label:"Name the markers",type:"bool",default:!0},{id:"build",label:"Build the string-out",type:"bool",default:!0},{id:"root",label:"Render into",type:"folder",optional:!0,placeholder:"a folder (leave empty to skip rendering)"},{id:"plate_preset",label:"Plates render with",type:"render_preset",optional:!0,placeholder:"the current settings"},{id:"reference_preset",label:"Reference renders with",type:"render_preset",optional:!0,placeholder:"the current settings"},{id:"queue",label:"Only add to Resolve's render queue",type:"bool",default:!1}],nodes:[Jn(),{id:"plan",use:"plan.vfx_pulls",args:{live:"$pull",color:"$in.color",prefix:"$in.prefix",increment:"$in.increment",digits:"$in.digits",handles:"$in.handles",gap:"$in.gap",start_frame:"$in.start_frame",hero:"$in.hero",reference_track:"$in.reference_track",skip_disabled:"$in.skip_disabled",naming:"$in.naming",folder:"$in.folder",names:"$in.names"}},{id:"review",use:"review",args:{rows:"$plan.rows",columns:[["shot","Shot"],["role","Pull"],["name","Name"],["clip","Clip"],["frames","Frames"],["cut","Cut"]]},when:"$in.mode!=mark"},{id:"names",use:"plan.vfx_names",args:{plan:"$plan",rows:"$review"},when:"$in.mode!=mark & $in.name_markers=true"},{id:"name_apply",use:"host.apply",args:{...de,ops:"$names",timeline:"$pull.timeline"},when:"$in.mode!=mark & $in.name_markers=true",label:"Name the markers"},{id:"stringout",use:"vfx.stringout",args:{...de,live:"$pull",plan:"$plan",rows:"$review"},when:"$in.mode!=mark & $in.build=true"},{id:"jobs",use:"plan.vfx_renders",args:{plan:"$plan",rows:"$review",start_frame:"$stringout.start_frame",root:"$in.root",plate_preset:"$in.plate_preset",reference_preset:"$in.reference_preset"},when:"$in.mode!=mark & $in.root!= & $in.build=true"},{id:"render",use:"host.render",args:{...de,timeline:"$stringout.timeline",jobs:"$jobs",queue:"$in.queue"},when:"$in.mode!=mark & $in.root!= & $in.build=true",label:"Render the pulls"},{id:"cut_jobs",use:"plan.vfx_cut_renders",args:{plan:"$plan",rows:"$review",live:"$pull",handles:"$in.handles",root:"$in.root",plate_preset:"$in.plate_preset",reference_preset:"$in.reference_preset"},when:"$in.mode!=mark & $in.root!= & $in.build!=true"},{id:"cut_render",use:"host.render",args:{...de,timeline:"$pull.timeline",jobs:"$cut_jobs",queue:"$in.queue"},when:"$in.mode!=mark & $in.root!= & $in.build!=true",label:"Render the pulls off the cut"},{id:"next",use:"plan.vfx_next_marker",args:{live:"$pull",plan:"$plan",color:"$in.color",prefix:"$in.prefix",digits:"$in.digits",increment:"$in.increment"},when:"$in.mode=mark"},{id:"mark",use:"host.apply",args:{...de,ops:"$next",timeline:"$pull.timeline"},when:"$in.mode=mark",label:"Add the marker"}]},{id:"align",name:"Align Clips",app:!0,aka:["match framing","match sizing","repo match","line up the online with the offline","reference track"],group:"Match",...de,about:"Fits every clip's framing (pan, tilt, zoom, rotation, flips) to the reference, measured on the media. A clip whose framing moves is measured on every frame and written as a few eased keyframes. Nothing changes until you apply.",inputs:[ct,{id:"scope",label:"Align",type:"choice",choices:[["all","Whole timeline"],["playhead","Clip at playhead"],["selected","Selected clips"]],default:"all"},{id:"at",label:"Playhead",type:"data",hidden:!0},{id:"picks",label:"Selected clips",type:"data",hidden:!0},{id:"reference",label:"Reference",type:"track",optional:!0,choices:[["offline","Offline ref"]]},{id:"tracks",label:"Track to align",type:"tracks",optional:!0,not:"reference"},{id:"samples",label:"Frames per clip",type:"choice",choices:[["1","Middle"],["ends","First & last frame"],["all","Every frame"]],default:"ends"},{id:"sizing_target",label:"Write sizing to",type:"choice",choices:[["input","Input Sizing"],["edit","Edit Sizing"],["node","Node Sizing"]],default:"edit"},{id:"node",label:"Sizing node",type:"node",optional:!0,placeholder:"node 1",when:{input:"sizing_target",is:["node"]}},{id:"markers",label:"Write markers",type:"bool",default:!0}],nodes:[Jn(),{id:"measure",use:"verb.timeline_align",args:{session_id:"$pull.session_id",reference_track:"$in.reference",tracks:"$in.tracks",samples:"$in.samples",sizing_target:"$in.sizing_target",node:"$in.node",scope:"$in.scope",at:"$in.at",picks:"$in.picks"},label:"Measure"},{id:"rows",use:"plan.align_rows",args:{result:"$measure"}},{id:"review",use:"review",args:{rows:"$rows",columns:[["record_tc","Record"],["track","Track"],["name","Clip"],["verdict","Verdict"],["confidence","Confidence"],["sizing","Sizing"],["why","Why"]],skip:"cant"}},{id:"ops",use:"plan.align_ops",args:{result:"$measure",rows:"$review",markers:"$in.markers"}},Ff()]},{id:"copy-grades",name:"Copy Grades",part:!0,app:!0,aka:["copy grades","copy grade","copy color","copy sizing","copy repo","grade transfer","track to track"],group:"Match",...de,about:"Every clip on the destination track (or the one at the playhead) takes the grade \u2014 and the sizing, crop, composite, clip color, flags, clip markers, color group and keywords you pick \u2014 from the source-track clip it overlaps most. Grades copy with Resolve's own CopyGrades, checked node for node; clips with no source get a marker.",inputs:[ct,{id:"from",label:"From track",type:"track",default:2},{id:"to",label:"To track",type:"track",default:1},{id:"grade",label:"Grade",type:"bool",default:!0},{id:"sizing",label:"Sizing",type:"bool",default:!0},{id:"crop",label:"Crop",type:"bool",default:!0},{id:"composite",label:"Composite + opacity",type:"bool",default:!0},{id:"clip_color",label:"Clip color",type:"bool",default:!0},{id:"flags",label:"Flags",type:"bool",default:!0},{id:"markers",label:"Clip markers",type:"bool",default:!0},{id:"versions",label:"Every local grade version",type:"bool",default:!1},{id:"group",label:"Color group",type:"bool",default:!1},{id:"keywords",label:"Keywords",type:"bool",default:!1},{id:"which",label:"Which",type:"choice",choices:[["","Every clip"],["playhead","The clip at the playhead"]],default:""},{id:"miss_color",label:"Mark clips with no source",type:"marker_color",default:"Red",optional:!0}],nodes:[Jn(),{id:"paired",use:"plan.copy_pairs",args:{live:"$pull",from:"$in.from",to:"$in.to"}},{id:"pairs",use:"rows.filter",args:{rows:"$paired",where:[["at","=","$in.which"]]}},{id:"review",use:"review",args:{rows:"$pairs",columns:[["clip","Clip"],["record","Record"],["color","Colour"],["from","Takes from"],["fit","Overlap"],["nodes","Nodes"]]}},{id:"ops",use:"plan.copy_ops",args:{rows:"$review",live:"$pull",grade:"$in.grade",sizing:"$in.sizing",crop:"$in.crop",composite:"$in.composite",clip_color:"$in.clip_color",flags:"$in.flags",markers:"$in.markers",versions:"$in.versions",group:"$in.group",keywords:"$in.keywords",miss_color:"$in.miss_color"}},Ff()]},{id:"trace",name:"Grade Tracer",part:!0,app:!0,playbook:"patch",aka:["grade tracer","find old grades","where grades came from","previous versions","recover grades","grade history"],group:"Match",...de,about:"After a re-conform, find each clip's earlier grade in the project's other timelines, or in other projects (source timecode, reel, file name, path, duration), and copy it across, or bring the top matches in as local versions to choose between. Another project is opened in Resolve for the search and again for the grades it gives (each carried over as a grade file), then yours is back as it was.",inputs:[ct,{id:"timelines",label:"Earlier timelines",type:"timelines",optional:!0},{id:"projects",label:"Other projects",type:"projects",optional:!0,placeholder:"none (Resolve opens each in turn, then yours again)"},{id:"min_score",label:"Least score",type:"number",default:60},{id:"floor",label:"Trust from",type:"number",default:60},{id:"top_n",label:"Variants",type:"number",default:3},{id:"only_trusted",label:"Only trusted matches",type:"bool",default:!0},{id:"variants",label:"As local versions",type:"bool",default:!1},{id:"unsure_only",label:"Versions only where unsure",type:"bool",default:!1,when:{input:"variants",is:["true"]}},{id:"prefix",label:"Version name",type:"text",default:"trace",when:{input:"variants",is:["true"]}},{id:"tracks",label:"Only tracks",type:"text",optional:!0,placeholder:"1, 3 (default all)"},{id:"sizing",label:"Sizing too",type:"bool",default:!1},{id:"crop",label:"Crop too",type:"bool",default:!1},{id:"composite",label:"Composite + opacity too",type:"bool",default:!1},{id:"clip_color",label:"Clip color too",type:"bool",default:!1},{id:"flags",label:"Flags too",type:"bool",default:!1},{id:"mark_color",label:"Mark unmatched",type:"marker_color",optional:!0},{id:"clear",label:"Clear earlier tracer markers",type:"bool",default:!0}],nodes:[Jn(),{id:"trace",use:"plan.grade_trace",args:{...de,live:"$pull",timelines:"$in.timelines",projects:"$in.projects",top_n:"$in.top_n",min_score:"$in.min_score",floor:"$in.floor",tracks:"$in.tracks",clip_color:"$in.clip_color",flags:"$in.flags"}},{id:"review",use:"review",args:{rows:"$trace",columns:[["clip","Clip"],["at","At"],["match","Match"],["trusted",""],["from","Grade from"],["why","Why"],["others","Others"]]}},{id:"ops",use:"plan.grade_trace_ops",args:{rows:"$review",live:"$pull",variants:"$in.variants",only_trusted:"$in.only_trusted",mark_color:"$in.mark_color",prefix:"$in.prefix",unsure_only:"$in.unsure_only",sizing:"$in.sizing",crop:"$in.crop",composite:"$in.composite",clip_color:"$in.clip_color",flags:"$in.flags",clear:"$in.clear"}},Ff()]},{id:"reconform",name:"Reconform",part:!0,app:!0,playbook:"patch",aka:["recut","new version of the edit","editorial changes","update to the new cut","change list","EDL changes","reconformer","carry the grade to the new cut","version parity"],group:"Match",...de,about:"The color timeline (A) and the newer cut (B): build B with A's grade (a copy of B, every clip taking the grade, sizing, crop, clip color and clip markers of the clip in A that holds the same source frames; B itself never edited), or compare where the picture comes from frame by frame and mark the changes on A.",inputs:[ct,{id:"do",label:"Do",type:"choice",choices:[["carry","Build B with A's grade"],["mark","Mark what changed on A"],["files","Two timeline files \u2192 one (no app)"],["dropin","Drop in finished VFX"],["match","Match the build's sizing to B's picture"],["discard","Discard a build (\u2026_RECONFORMED)"]],default:"carry"},{id:"copy",label:"The build",type:"timeline",when:{input:"do",is:["discard","match"]}},{id:"comps",label:"Finished comps",type:"folder",when:{input:"do",is:["dropin"]}},{id:"disable_plates",label:"Switch the plates off",type:"bool",default:!1,when:{input:"do",is:["dropin"]}},{id:"track",label:"New track",type:"text",optional:!0,placeholder:"VFX",when:{input:"do",is:["dropin"]}},{id:"a",label:"A (color)",type:"timeline",optional:!0,placeholder:"the open one",when:{input:"do",is:["carry","mark"]}},{id:"b",label:"B (new cut)",type:"timeline",optional:!0,when:{input:"do",is:["carry","mark","match"]}},{id:"a_file",label:"A, the finished cut (file)",type:"file",placeholder:".drt .aaf .xml .prproj .fcpxml .otio, Flame archive",when:{input:"do",is:["files"]}},{id:"b_file",label:"\u2026or B as a file",type:"file",optional:!0,placeholder:".aaf .xml .edl .drt .prproj",when:{input:"do",is:["carry","mark","files"]}},{id:"effects",label:"Effects",type:"bool",default:!0,when:{input:"do",is:["files"]}},{id:"carry_markers",label:"Markers (follow their clips)",type:"bool",default:!0,when:{input:"do",is:["files"]}},{id:"target",label:"Write for",type:"choice",choices:Zw,default:"resolve",when:{input:"do",is:["files"]}},{id:"out",label:"Write to",type:"folder",optional:!0,placeholder:"a folder (default: next to B)",when:{input:"do",is:["files"]}},...z4.map(([e,t])=>({id:e,label:t,type:"bool",default:e!=="fades",when:{input:"do",is:["sizing","crop","composite"].includes(e)?["carry","files"]:["carry"]}})),{id:"miss_color",label:"Mark new material",type:"marker_color",default:"Green",optional:!0,when:{input:"do",is:["carry"]}},{id:"history",label:"Keep A's program on a HISTORY track (off)",type:"bool",default:!0,when:{input:"do",is:["carry"]}},{id:"name",label:"New timeline",type:"text",optional:!0,placeholder:"default: B's name + _RECONFORMED",when:{input:"do",is:["carry","files"]}},{id:"compare",label:"Compare",type:"choice",choices:[["edit","The edit, clip by clip"],["source","What plays at each frame"]],default:"edit",when:{input:"do",is:["mark"]}},{id:"by_track",label:"Track by track",type:"bool",default:!1,when:{input:"compare",is:["source"]}},{id:"picture",label:"Check the picture",type:"choice",choices:[["loose","Pairs made by name"],["all","Every pair"],["","No"]],default:"loose",when:{input:"compare",is:["edit"]}},{id:"mark",label:"Mark the changes on A",type:"bool",default:!0,when:{input:"do",is:["mark"]}},{id:"inserts",label:"Open B's changed shots as an insert timeline",type:"bool",default:!1,when:{input:"compare",is:["source"]}},{id:"report",label:"Save the change list (HTML) into",type:"folder",optional:!0,placeholder:"no report",when:{input:"do",is:["mark","carry","dropin"]}}],nodes:[{id:"pull",use:"host.read",args:{...de,timeline:"$in.a",from:"$in.source"},when:"$in.do!=files & $in.do!=discard & $in.do!=match",label:"Read A"},{id:"mc",use:"host.read",args:{...de,timeline:"$in.copy"},when:"$in.do=match",label:"Read the build"},{id:"mb",use:"host.read",args:{...de,timeline:"$in.b"},when:"$in.do=match",label:"Read B"},{id:"measure",use:"align.against",args:{session_id:"$mc.session_id",timeline:"$mc.timeline",b_session_id:"$mb.session_id",b_timeline:"$mb.timeline"},when:"$in.do=match",label:"Measure against B"},{id:"match_rows",use:"plan.align_rows",args:{result:"$measure"},when:"$in.do=match"},{id:"match_review",use:"review",args:{rows:"$match_rows",columns:[["record_tc","Record"],["name","Clip"],["verdict","Verdict"],["confidence","Confidence"],["sizing","Sizing"],["why","Why"]],skip:"cant"},when:"$in.do=match",label:"Match sizing"},{id:"match_ops",use:"plan.align_ops",args:{result:"$measure",rows:"$match_review"},when:"$in.do=match"},{id:"match",use:"host.apply",args:{...de,ops:"$match_ops",timeline:"$mc.timeline",source:"$mc"},when:"$in.do=match",label:"Match the build's sizing"},{id:"gone_review",use:"review",args:{rows:[{id:"discard",cells:{timeline:"$in.copy",what:"deleted from the project \u2014 a deleted timeline cannot be undone"},op:{op:"timeline_discard",timeline:"$in.copy"}}],columns:[["timeline","Timeline"],["what",""]]},when:"$in.do=discard",label:"Discard"},{id:"gone_ops",use:"ops.collect",args:{rows:"$gone_review"},when:"$in.do=discard"},{id:"discard",use:"host.apply",args:{...de,ops:"$gone_ops",timeline:"$in.copy"},when:"$in.do=discard",label:"Discard the build"},{id:"drops",use:"plan.vfx_dropin",args:{live:"$pull",folder:"$in.comps"},when:"$in.do=dropin",label:"Match the comps"},{id:"drop_review",use:"review",args:{rows:"$drops",columns:[["comp","Comp"],["shot","Shot"],["version","v"],["status","Status"],["by","Matched by"],["confidence","Sure"],["plate","Over"],["at","At"],["why","Why"]],skip:"cant"},when:"$in.do=dropin"},{id:"drop_ops",use:"plan.vfx_dropin_ops",args:{rows:"$drop_review",name:"$in.track",disable_plates:"$in.disable_plates"},when:"$in.do=dropin"},{id:"drop",use:"host.apply",args:{...de,ops:"$drop_ops",timeline:"$pull.timeline"},when:"$in.do=dropin",label:"Drop the comps in"},{id:"b",use:"host.read",args:{...de,timeline:"$in.b"},when:"$in.b!= & $in.do!=match",label:"Read B"},{id:"bf",use:"source.file",args:{path:"$in.b_file"},when:"$in.b_file",label:"Read B (file)"},{id:"b_in",use:"host.open",args:{...de,session_id:"$bf.session_id",like:"$pull"},when:"$in.do=carry & $in.b_file!=",label:"Bring B into Resolve"},{id:"b2",use:"host.read",args:{...de,timeline:"$b_in.timeline"},when:"$in.do=carry & $in.b_file!=",label:"Read B"},{id:"files",use:"timeline.read_many",args:{paths:["$in.b_file","$in.a_file"]},when:"$in.do=files",label:"Read B and A"},{id:"carried_file",use:"timeline.carry",args:{session_id:"$files.session_id",sources:"$files.sources",name:"$in.name",sizing:"$in.sizing",crop:"$in.crop",opacity:"$in.composite",effects:"$in.effects",markers:"$in.carry_markers"},when:"$in.do=files",label:"Carry A onto B"},{id:"write",use:"verb.timeline_write",args:{session_id:"$files.session_id",timeline_id:"$carried_file.timeline_id",target:"$in.target",out_path:"$in.out"},when:"$in.do=files",label:"Write it"},{id:"pairs",use:"plan.carry_rows",args:{a:"$pull",b:"$b|$b2"},when:"$in.do=carry",label:"Pair B's clips with A's"},{id:"carried",use:"review",args:{rows:"$pairs",columns:[["record","Record"],["clip","Clip"],["from","Takes from A"],["cover","Same frames"],["grade","Grade"],["pieces",""]]},when:"$in.do=carry"},{id:"sizes",use:"rows.filter",args:{rows:"$carried",where:[["sizing_differs","=","true"]]},when:"$in.do=carry & $in.sizing=true"},{id:"sizing_review",use:"review",args:{rows:"$sizes",columns:[["record","Record"],["clip","Clip"],["a_sizing","A's sizing (ticked)"],["b_sizing","B's own (unticked)"]]},when:"$in.do=carry & $in.sizing=true & $sizes.0.id!=",label:"A's sizing or B's"},{id:"dup",use:"host.duplicate",args:{...de,timeline:"$b.timeline|$b2.timeline",name:"$in.name"},when:"$in.do=carry",label:"Copy B"},{id:"carry",use:"plan.carry_ops",args:{rows:"$carried",a:"$pull",...Object.fromEntries(z4.map(([e])=>[e,`$in.${e}`])),miss_color:"$in.miss_color",a_sizing:"$sizing_review"},when:"$in.do=carry"},{id:"build",use:"host.apply",args:{...de,ops:"$carry",timeline:"$dup.timeline",source:"$b|$b2"},when:"$in.do=carry",label:"Carry A onto the copy"},{id:"hist",use:"plan.history",args:{a:"$pull"},when:"$in.do=carry & $in.history=true"},{id:"keep_a",use:"host.apply",args:{...de,ops:"$hist",timeline:"$dup.timeline"},when:"$in.do=carry & $in.history=true",label:"Keep A on a HISTORY track"},{id:"bl",use:"host.read",args:{...de,from:"$bf"},when:"$in.do=mark & $in.compare=edit & $in.b_file!=",label:"Read B"},{id:"edits",use:"plan.edit_changes",args:{a:"$pull",b:"$b|$bl"},when:"$in.do=mark & $in.compare=edit",label:"Compare the edit"},{id:"pictures",use:"verify.pictures",args:{rows:"$edits",which:"$in.picture"},when:"$in.do=mark & $in.compare=edit & $in.picture!=",label:"Check the picture"},{id:"edit_review",use:"review",args:{rows:"$pictures|$edits",columns:[["b_tc","B"],["a_tc","A"],["change","Change"],["clip","Clip"],["head","Head"],["tail","Tail"],["frames","Frames"],["paired",""],["picture","Picture"]]},when:"$in.do=mark & $in.compare=edit"},{id:"b_marks",use:"plan.edit_change_ops",args:{rows:"$edit_review",side:"B",live:"$b"},when:"$in.do=mark & $in.compare=edit & $in.mark=true & $in.b!="},{id:"mark_b",use:"host.apply",args:{...de,ops:"$b_marks",timeline:"$b.timeline",source:"$b"},when:"$in.do=mark & $in.compare=edit & $in.mark=true & $in.b!=",label:"Mark the changes on B"},{id:"a_marks",use:"plan.edit_change_ops",args:{rows:"$edit_review",side:"A",live:"$pull"},when:"$in.do=mark & $in.compare=edit & $in.mark=true"},{id:"mark_a",use:"host.apply",args:{...de,ops:"$a_marks",timeline:"$pull.timeline",source:"$pull"},when:"$in.do=mark & $in.compare=edit & $in.mark=true",label:"Mark the deletions on A"},{id:"diff",use:"verb.timeline_diff",args:{a_session_id:"$pull.session_id",b_session_id:"$b.session_id|$bf.session_id",by_track:"$in.by_track",limit:5e3,session:"$in.inserts"},when:"$in.do=mark & $in.compare=source",label:"Compare"},{id:"rows",use:"plan.reconform",args:{diff:"$diff",start_frame:"$pull.start_frame"},when:"$in.do=mark & $in.compare=source"},{id:"review",use:"review",args:{rows:"$rows",columns:[["rec_in_tc","Record In"],["rec_out_tc","Record Out"],["frames","Frames"],["kind","Change"],["a","A"],["b","B"]]},when:"$in.do=mark & $in.compare=source"},{id:"ops",use:"ops.collect",args:{rows:"$review"},when:"$in.do=mark & $in.compare=source"},Ff("$in.do=mark & $in.compare=source & $in.mark=true","Mark the changes on A"),{id:"inserts",use:"host.open",args:{...de,session_id:"$diff.session_id"},when:"$in.do=mark & $in.compare=source & $in.inserts=true",label:"Open the insert timeline"},{id:"page",use:"rows.html",args:{rows:"$edit_review|$review|$carried|$drop_review",columns:[["b_tc","B"],["a_tc","A"],["change","Change"],["clip","Clip"],["head","Head"],["tail","Tail"],["record","Record"],["from","Takes from A"],["grade","Grade"],["comp","Comp"],["status","Status"],["plate","Over"],["at","At"],["why","Why"]],title:"$pull.timeline",folder:"$in.report"},when:"$in.report!= & $in.do!=files",label:"Save the report"}],view:{split:"row",panes:[{split:"col",size:.34,panes:[{pane:"knobs",size:.45},{pane:"rows"}]},{pane:"compare",show:["$pull|$source|$files","$b|$bf|$carried_file"]}]}},{id:"graphics",name:"Graphics Toolkit",aka:["titles","lower thirds","burn-ins","slates","supers","captions","name supers","locators","legal line","end crawl","credits"],group:"Make",about:"Lower thirds, locators, legal lines and end crawls designed over the job's timeline: the designer beside the viewer, the graphic drawn on the picture; Run makes ProRes 4444 with alpha for every aspect and position, and can lay them on the Resolve timeline.",inputs:[ct,{id:"kind",label:"Kind",type:"choice",choices:X1.map(e=>[e.base,e.label]),default:"lower_third",hidden:!0},{id:"name",label:"Name",type:"text",optional:!0,hidden:!0},{id:"title",label:"Title",type:"text",optional:!0,hidden:!0},{id:"location",label:"Location",type:"text",optional:!0,hidden:!0},{id:"sub",label:"Second line",type:"text",optional:!0,hidden:!0},{id:"text",label:"Legal text",type:"text",optional:!0,hidden:!0},{id:"credits",label:"Credits",type:"text",optional:!0,hidden:!0,placeholder:"# Section \xB7 Role | Name"},{id:"items",label:"Graphics",type:"data",default:[]},{id:"look_preset",label:"Look",type:"choice",choices:QD,optional:!0,hidden:!0},{id:"look",label:"Look (custom)",type:"data",optional:!0},{id:"formats",label:"Formats",type:"data",optional:!0},{id:"positions",label:"Positions",type:"data",optional:!0},{id:"duration",label:"Seconds",type:"number",optional:!0,hidden:!0},{id:"resolution",label:"Size",type:"choice",choices:j1.map(e=>[e.id,e.label]),default:"hd",hidden:!0},{id:"fps",label:"Rate",type:"number",default:23.976,hidden:!0},{id:"background",label:"Solid background",type:"text",optional:!0,hidden:!0,placeholder:"#000000 (none = alpha)"},{id:"lottie",label:"Lottie too",type:"bool",default:!1,hidden:!0},{id:"at",label:"Starts at frame",type:"number",default:0,hidden:!0},{id:"drafts",label:"Other kinds",type:"data",optional:!0},{id:"place",label:"Lay them on the Resolve timeline",type:"bool",default:!1},{id:"out",label:"Write to",type:"folder",optional:!0,placeholder:"engine home/gfx"}],nodes:[{...Jn(),when:"$in.place"},{id:"gfx",use:"ui.graphics",args:{session_id:"$pull.session_id"},label:"Design"},{id:"render",use:"verb.gfx_make",label:"Render",args:{type:"$in.kind",name:"$in.name",title:"$in.title",location:"$in.location",sub:"$in.sub",text:"$in.text",credits:"$in.credits",items:"$in.items",look:"$in.look|$in.look_preset",formats:"$in.formats",positions:"$in.positions",duration:"$in.duration",resolution:"$in.resolution",fps:"$in.fps",background_color:"$in.background",lottie:"$in.lottie",out_dir:"$in.out"}},{id:"place",use:"gfx.place",when:"$in.place",label:"Onto the timeline",args:{package:"$render",from:"$pull",at:"$in.at",position:"$in.positions"}}]},{id:"archive",name:"Archive",part:!0,playbook:"deliver",aka:["archive","deliver","package","send media","hand off","media to the colorist / VFX / sound","folder / iso / bucket / peer to peer"],group:"Deliver",about:"The job's timeline with its media, trimmed with handles, as a package: a folder, an .iso, your bucket (recipients emailed), or served peer to peer from this machine (a ticket to hand over).",inputs:[ct,{id:"destination",label:"As",type:"choice",choices:[["folder","A folder"],["iso","An .iso"],["bucket","Your bucket"],["p2p","Peer to peer"]],default:"folder"},{id:"handles",label:"Handles (frames)",type:"number",default:24},{id:"out",label:"Write to",type:"folder",optional:!0,when:{input:"destination",is:["folder","iso"]}},{id:"recipients",label:"Email to",type:"text",optional:!0,placeholder:"name@facility.com",when:{input:"destination",is:["bucket"]}}],nodes:[Jn(),{id:"send",use:"transfer.deliver",args:{session_id:"$pull.session_id",destination:"$in.destination",handles:"$in.handles",out_path:"$in.out",recipients:"$in.recipients"},label:"Deliver"}]},{id:"blanking",name:"Blanking",part:!0,app:!0,aka:["blanking detector","black edges","black borders","bad repo","sizing check","edge check"],group:"Check",...de,about:"Clips whose sizing reveals black inside the delivered frame, from each clip's transform (instant) or measured on the decoded source frames, each with the least zoom that fills. Send the fixes and markers to Resolve. For black that only shows after the grade, use Finishing QC.",inputs:[ct,{id:"host",label:"In",type:"choice",choices:un,default:"resolve"},{id:"aspect",label:"Delivered as",type:"choice",choices:_D,default:""},{id:"strictness",label:"Strictness",type:"choice",choices:P4,default:"strict"},{id:"scaling",label:"Input scaling",type:"choice",choices:qw.map(e=>[e,k4(e)]),default:"fit"},{id:"tolerance_px",label:"Tolerance (px)",type:"number",optional:!0,placeholder:"the strictness's"},{id:"min_frames",label:"At least (frames)",type:"number",optional:!0,placeholder:"the strictness's"},{id:"gap_frames",label:"Joins over (frames)",type:"number",optional:!0,placeholder:"the strictness's"},{id:"black_threshold",label:"Black at or under (8-bit)",type:"number",optional:!0,placeholder:"the strictness's"},{id:"pixels",label:"Measure pixels (slower)",type:"bool",default:!1},{id:"samples",label:"Frames measured per clip",type:"number",default:3,when:{input:"pixels",is:["true"]}},{id:"fixes",label:"Zoom fixes",type:"bool",default:!0},{id:"which",label:"Which",type:"choice",choices:[["","Every finding"],["playhead","The one at the playhead"],["next","The next one after the playhead"]],default:""},{id:"clear",label:"Clear earlier blanking markers",type:"bool",default:!0},{id:"set_blanking",label:"Set the timeline's output blanking to it",type:"bool",default:!1,when:{input:"host",is:["resolve"]}}],nodes:[{id:"pull",use:"host.read",args:{host:"$in.host",from:"$in.source"},label:"Read the timeline"},{id:"check",use:"verb.qc_blanking",args:{session_id:"$pull.session_id",aspect:"$in.aspect|$pull.output_aspect",strictness:"$in.strictness",input_scaling:"$in.scaling",pixels:"$in.pixels",samples:"$in.samples",tolerance_px:"$in.tolerance_px",min_frames:"$in.min_frames",gap_frames:"$in.gap_frames",black_threshold:"$in.black_threshold"},label:"Check"},{id:"found",use:"plan.blanking_rows",args:{result:"$check",live:"$pull"}},{id:"rows",use:"rows.filter",args:{rows:"$found",where:[["at","=","$in.which"]]}},{id:"review",use:"review",args:{rows:"$rows",columns:[["record_tc","Record"],["frames","Frames"],["track","Track"],["name","Clip"],["edges","Black (px)"],["fix","Zoom to fill"]]}},{id:"ops",use:"plan.blanking_ops",args:{result:"$check",rows:"$review",live:"$pull",fixes:"$in.fixes",clear:"$in.clear",which:"$in.which"}},{id:"apply",use:"host.apply",args:{host:"$in.host",ops:"$ops",timeline:"$pull.timeline",source:"$pull"}},{id:"blank_ops",use:"plan.output_blanking",args:{aspect:"$in.aspect",check:"$check",live:"$pull"},when:"$in.set_blanking=true & $in.aspect!="},{id:"blank",use:"host.apply",args:{host:"$in.host",ops:"$blank_ops",timeline:"$pull.timeline"},when:"$in.set_blanking=true & $in.aspect!=",label:"Set the output blanking"}],view:{split:"row",panes:[{pane:"knobs"},{pane:"viewer",show:"$source"}]}},{id:"finishing-qc",name:"Finishing QC",part:!0,app:!0,playbook:"deliverables",aka:["master qc","quality control","final check","tech check","QC report","pre-delivery check","netflix spec","ebu r128","loudness spec","proxy leak detector","proxies in the conform","offline media in the online"],group:"Check",about:"Holds the master to a delivery spec (Netflix, Apple, Amazon, EBU R128, BBC/DPP, ATSC A/85, or a conform pack \u2014 Proxy leak lists the shots still on proxy or offline media, each scored as 0.9.5's Proxy Leak Detector did). Render the timeline through the conform.tools render plugin in Resolve, which measures every frame after the grade and marks the findings on the timeline; or check a rendered master from any app, every frame measured on this machine.",inputs:[{id:"from",label:"Check",type:"choice",choices:[["resolve","The timeline (render in Resolve)"],["file","A rendered master (any app)"],["earlier","An earlier scan (no render)"]],default:"resolve"},{id:"scan_dir",label:"The scan",type:"folder",optional:!0,placeholder:"the newest scan",when:{input:"from",is:["earlier"]}},{id:"path",label:"The master",type:"file",when:{input:"from",is:["file"]}},{id:"pack",label:"Spec",type:"choice",choices:t4,default:"conform_default"},{id:"strictness",label:"Strictness",type:"choice",choices:P4,default:"strict",when:{input:"from",is:["resolve"]}},{id:"aspect",label:"Delivered as",type:"choice",choices:[["","Full frame"],["1.85","1.85"],["2.00","2.00"],["2.20","2.20"],["2.35","2.35"],["2.39","2.39"],["1.3333","4:3"],["1","1:1"]],default:"",when:{input:"from",is:["resolve"]}},{id:"timelines",label:"Timelines (a batch)",type:"timelines",optional:!0,placeholder:"the open one",when:{input:"from",is:["resolve"]}},{id:"markers",label:"Markers",type:"bool",default:!0,when:{input:"from",is:["resolve"]}},{id:"marker_scope",label:"Markers on",type:"choice",choices:[["timeline","The timeline"],["clips","The clips (picture findings)"]],default:"timeline",when:{input:"markers",is:["true"]}},{id:"audio",label:"Audio",type:"bool",default:!0,when:{input:"from",is:["resolve"]}},{id:"report",label:"Save a report (HTML) into",type:"folder",optional:!0,placeholder:"no report"}],nodes:[{id:"scan",use:"host.qc",args:{pack:"$in.pack",timelines:"$in.timelines",strictness:"$in.strictness",expected_aspect:"$in.aspect",markers:"$in.markers",marker_scope:"$in.marker_scope",audio:"$in.audio"},when:"$in.from=resolve",label:"Render through the plugin"},{id:"file",use:"qc.master_file",args:{path:"$in.path",pack:"$in.pack"},when:"$in.from=file",label:"Measure the master"},{id:"again",use:"qc.reopen",args:{folder:"$in.scan_dir"},when:"$in.from=earlier",label:"Read the scan again"},{id:"report",use:"qc.report",args:{rows:"$scan.rows|$file.rows|$again.rows",text:"$scan.text|$file.text|$again.text",subject:"$in.path|$scan.scan.timeline|$again.scan.timeline",pack:"$in.pack",folder:"$in.report",verdict:"$file.verdict"},when:"$in.report!=",label:"Save the report"},{id:"show",use:"table",args:{rows:"$scan.rows|$file.rows|$again.rows",text:"$scan.text|$file.text|$again.text",columns:[["tc","In"],["out","Out"],["kind","Finding"],["severity",""],["clip","Clip"],["detail","Measured"],["decision","Decision"]]}}]},{id:"odd-images",name:"Odd Image Fixer",part:!0,app:!0,aka:["odd image size fixer","odd dimensions","uneven image size","black line on a still","even pixels"],group:"Prep",about:"Stills whose width or height is odd \u2014 most codecs and some apps refuse them, Resolve draws a black line \u2014 rewritten at even sizes in their own format (a row / column cropped; or scaled to a maximum), color profile and metadata kept, the originals in 'zORIGINAL IMAGES' beside them. Undo puts them back. No app needed.",inputs:[{id:"folder",label:"The folder of stills",type:"folder"},{id:"max",label:"Also scale down to fit",type:"number",optional:!0,placeholder:"no maximum (pixels)"},{id:"refresh",label:"Refresh them in Resolve's media pool",type:"bool",default:!1}],nodes:[{id:"plan",use:"files.odd_plan",args:{folder:"$in.folder",max:"$in.max"},label:"Find the odd sizes"},{id:"review",use:"review",args:{rows:"$plan",columns:[["file","Still"],["now","Now"],["becomes","Becomes"],["why",""]],skip:"cant"}},{id:"fix",use:"files.odd_fix",args:{rows:"$review",max:"$in.max"},label:"Make them even"},{id:"pool",use:"host.apply",args:{host:"resolve",ops:[{op:"pool_refresh",paths:"$fix.paths"}]},when:"$in.refresh=true",label:"Refresh in Resolve"}]},{id:"output-sorter",name:"Output Sorter",part:!0,app:!0,aka:["output sorter","sort deliverables","file the mixes","mixes and splits","organise renders","sort files into folders"],group:"Deliver",about:"A folder of deliverables (mixes, stems, renders, masters) filed into folders by a recipe: ordered rules (a keyword, an extension, a pattern), the project read from each name, folder templates. Previewed file by file; nothing is ever overwritten; Undo puts every file back. No app needed.",inputs:[{id:"folder",label:"The folder to sort",type:"folder"},{id:"recipe",label:"Recipe",type:"choice",choices:M0.map(e=>[e.id,e.name]),default:"mixes-splits"},{id:"recipe_file",label:"\u2026or a recipe file",type:"file",optional:!0,placeholder:".json (0.9.5's recipe format)"},{id:"recursive",label:"Into subfolders too",type:"bool",default:!1},{id:"destination_root",label:"File into",type:"folder",optional:!0,placeholder:"inside the folder itself"},{id:"operation",label:"Move or copy",type:"choice",choices:[["move","Move"],["copy","Copy (keep the originals)"]],default:"move"}],nodes:[{id:"plan",use:"files.sort_plan",args:{folder:"$in.folder",recipe:"$in.recipe_file|$in.recipe",recursive:"$in.recursive",destination_root:"$in.destination_root",operation:"$in.operation"},label:"Plan the filing"},{id:"review",use:"review",args:{rows:"$plan",columns:[["file","File"],["rule","Rule"],["project","Project"],["to","Goes to"],["status",""],["why","Why"]],skip:"cant"}},{id:"sort",use:"files.sort",args:{folder:"$in.folder",recipe:"$in.recipe_file|$in.recipe",recursive:"$in.recursive",destination_root:"$in.destination_root",operation:"$in.operation",rows:"$review"},label:"File them"}]},{id:"seq-patch",name:"Image Sequence Patcher",part:!0,app:!0,aka:["image sequence patcher","patch frames","replace frames","fix frames in a sequence","drop in fixed frames"],group:"Deliver",about:`Fixed frames into an image sequence: every folder beside the sequence's with "patch" in its name holds frames named as the ones they replace. Previewed frame by frame; the originals kept in <sequence>_originalframes, the patch folders filed under zAPPLIED_PATCHES; Undo puts it all back. No app needed.`,inputs:[{id:"sequence",label:"The sequence's folder",type:"folder"}],nodes:[{id:"plan",use:"files.patch_plan",args:{sequence:"$in.sequence"},label:"Read the patch folders"},{id:"review",use:"review",args:{rows:"$plan",columns:[["frame","Frame"],["folder","From"],["status",""]],skip:"cant"}},{id:"patch",use:"files.patch",args:{sequence:"$in.sequence",rows:"$review"},label:"Patch the frames in"}]},{id:"renders",name:"Marker Renders",part:!0,app:!0,playbook:"deliverables",aka:["marker batch renderer","render markers","export marker ranges","stills at markers","frame grabs","review renders"],group:"Deliver",...de,about:"One render per marker of a color, named by a delivery convention (Netflix NAM / DCDM, film reels, TV, conform.tools), with handles, into that convention's folders. Only these jobs are queued; your render queue and Deliver settings stay as they are. Names two jobs share are left out.",inputs:[ct,{id:"host",label:"In",type:"choice",choices:un,default:"resolve"},{id:"color",label:"Markers",type:"marker_color",default:"Blue"},{id:"scope",label:"Which",type:"choice",choices:[["all","Every marker"],["duration","Ranges only"],["frame","Single frames"]],default:"duration"},{id:"handles",label:"Handles",type:"number",default:0},{id:"naming",label:"Naming",type:"choice",choices:GT,default:"conformtools"},{id:"show",label:"Show",type:"text",optional:!0,when:{input:"naming",is:Mw}},{id:"season",label:"Season",type:"text",optional:!0,when:{input:"naming",is:Mw}},{id:"episode",label:"Episode",type:"text",optional:!0,when:{input:"naming",is:Mw}},{id:"film",label:"Film",type:"text",optional:!0,when:{input:"naming",is:$D}},{id:"reel",label:"Reel",type:"text",optional:!0,when:{input:"naming",is:["netflix_film_nam","netflix_film_segmented"]}},{id:"version",label:"Version",type:"text",optional:!0,when:{input:"naming",is:["tv_series"]}},{id:"artist",label:"Artist",type:"text",optional:!0,when:{input:"naming",is:["conformtools"]}},{id:"title",label:"Title",type:"text",optional:!0},{id:"project",label:"Project name",type:"text",optional:!0,placeholder:"the host's project name"},{id:"template",label:"Name pattern",type:"text",optional:!0,placeholder:"the convention's (e.g. {show}_{episode}_{MARKER}_{TL_TC})"},{id:"case",label:"Case",type:"choice",choices:[["","The convention's"],["none","As typed"],["uppercase","UPPER"],["lowercase","lower"]],default:""},{id:"folder",label:"Folders",type:"text",optional:!0,placeholder:"the convention's ({project}/{timeline}/{date} \u2026)"},{id:"root",label:"Render into",type:"folder"},{id:"preset",label:"Render with",type:"render_preset",optional:!0,placeholder:"the current Deliver settings"},{id:"queue",label:"Only add to Resolve's render queue",type:"bool",default:!1},{id:"clear_jobs",label:"First delete from Resolve's render queue",type:"choice",choices:[["","Nothing"],["completed","Completed jobs"],["incomplete","Jobs not rendered"],["all","Every job (cannot be undone)"]],default:""}],nodes:[{id:"pull",use:"host.read",args:{host:"$in.host",from:"$in.source"},label:"Read the timeline"},{id:"plan",use:"plan.marker_renders",args:{live:"$pull",color:"$in.color",scope:"$in.scope",naming:"$in.naming",handles:"$in.handles",root:"$in.root",preset:"$in.preset",folder:"$in.folder",template:"$in.template",case:"$in.case",fields:{show:"$in.show",season:"$in.season",episode:"$in.episode",film:"$in.film",reel:"$in.reel",version:"$in.version",artist:"$in.artist",title:"$in.title",project:"$in.project"}}},{id:"review",use:"review",args:{rows:"$plan",columns:[["tc","Marker"],["marker","Marker name"],["frames","Frames"],["name","Renders as"],["folder","Into"],["dupe",""]],skip:"dupe"}},{id:"clear",use:"host.apply",args:{...de,ops:[{op:"render_jobs_delete",which:"$in.clear_jobs"}]},when:"$in.clear_jobs",label:"Delete render jobs"},{id:"render",use:"host.render",args:{host:"$in.host",timeline:"$pull.timeline",jobs:"$review",queue:"$in.queue"},label:"Render"}]},{id:"conform-reference",name:"Conform From a Reference",part:!0,playbook:"autoconform",output:"timeline",aka:["conform","rebuild the timeline","find the shots","match to the media","conform from a reference","online from a QuickTime","reverse conform"],group:"Match",about:"Rebuilds the edit from a reference render and the source media: every shot found in the camera originals (or proxies, color returns), frame-accurate, with its sizing, as a timeline. The job's timeline as hints is faster and keeps the editor's takes.",inputs:[{id:"reference",label:"Reference render",type:"file",placeholder:"the cut as a movie: client master, offline export, graded render"},{id:"pool",label:"Source media",type:"files",placeholder:"folders and/or files to search"},{id:"hints",label:"Use the job's timeline as hints",type:"bool",default:!1},{id:"trust",label:"Keep its takes and in-points as written",type:"bool",default:!1,when:{input:"hints",is:["true"]}},{id:"sizing",label:"Measure sizing",type:"bool",default:!0},{id:"display_transform",label:"Log originals to Rec.709",type:"bool",default:!1},{id:"reference_audio",label:"Reference sound",type:"file",optional:!0,placeholder:"a .wav beside a picture-only render"},{id:"name",label:"Timeline name",type:"text",optional:!0},ct],nodes:[{...Jn("Read the job's timeline"),when:"$in.hints"},{id:"conform",use:"verb.timeline_autoconform",label:"Conform",args:{reference:"$in.reference",pool:"$in.pool",hints_session_id:"$pull.session_id",trust:"$in.trust",sizing:"$in.sizing",display_transform:"$in.display_transform",reference_audio:"$in.reference_audio",name:"$in.name"}}],view:{split:"row",panes:[{pane:"knobs",size:.36},{pane:"viewer",show:"$conform"}]}},{id:"relink",name:"Relink",part:!0,playbook:"conform",aka:["link media","reconnect","find missing media","offline clips","point at the originals","relink to camera originals"],group:"Prep",...de,about:"Links the job's timeline to media in a folder: every clip matched by reel, timecode, name and duration (picture, sound or both). Dry run first to see what would change.",inputs:[ct,{id:"media_root",label:"Media folder",type:"folder",optional:!0,placeholder:"default: the places remembered"},{id:"lane",label:"Link",type:"choice",choices:[["both","Picture and sound"],["video","Picture"],["audio","Sound"]],default:"both"},{id:"reset",label:"Relink clips already linked",type:"bool",default:!1},{id:"dry_run",label:"Dry run (change nothing)",type:"bool",default:!1}],nodes:[Jn(),{id:"relink",use:"verb.timeline_relink",label:"Relink",args:{session_id:"$pull.session_id",media_root:"$in.media_root",lane:"$in.lane",reset:"$in.reset",dry_run:"$in.dry_run"}}]},{id:"uprez",name:"Proxies to Online",part:!0,playbook:"conform",aka:["uprez","relink the proxies to the camera originals","replace proxies with hi-res","online the proxies","attach full res","swap proxies for OCF","link media in Premiere"],group:"Prep",...Rf,about:"Premiere: every proxy in the open project matched to its camera original in a folder by our matcher (reel, timecode, loose proxy names, picture when asked) \u2014 not Premiere's Link Media \u2014 then repointed (every use follows, framing kept when the raster changes: an HD proxy on a UHD original is rescaled in every sequence) or attached as full-res behind the proxy. Dry run first to see what links to what.",inputs:[{id:"media_root",label:"Camera originals",type:"folder"},{id:"mode",label:"How",type:"choice",choices:[["replace","Replace the proxies"],["hires","Attach as full-res (keep the proxies)"],["proxy","Attach proxies to the online clips"]],default:"replace"},{id:"dry_run",label:"Dry run (change nothing)",type:"bool",default:!0}],nodes:[{id:"relink",use:"verb.host_relink",label:"Link in Premiere",args:{host:"premiere",media_root:"$in.media_root",mode:"$in.mode",dry_run:"$in.dry_run"}}]},{id:"cutin",name:"Cut In Returns",part:!0,playbook:"conform",aka:["cut in vfx","cut in the grade","vfx returns","color returns","drop in the comps","version up the shots","returns onto the timeline"],group:"Prep",...Rf,about:"Premiere: VFX or color returns (trimmed with handles) matched to the clips they replace by reel, timecode and name, then cut in over them on the track above \u2014 video only, each clip's sizing carried, the original left underneath, frame-exact \u2014 or written as a new sequence version with every effect kept.",inputs:[{id:"media_root",label:"Returns folder",type:"folder"},{id:"mode",label:"Into",type:"choice",choices:[["cut_in","The open sequence, on the track above"],["new_version","A new sequence"]],default:"cut_in"},{id:"track",label:"Onto video track",type:"number",optional:!0,placeholder:"default: above the top track"},{id:"dry_run",label:"Dry run (change nothing)",type:"bool",default:!1}],nodes:[{id:"relink",use:"verb.host_relink",label:"Cut in",args:{host:"premiere",media_root:"$in.media_root",mode:"$in.mode",track:"$in.track",dry_run:"$in.dry_run",criteria:{file_name:!0,file_name_mode:"loose"}}}]},{id:"unnest",name:"Un-nest",part:!0,playbook:"conform",aka:["flatten nests","break apart nested sequences","unnest the sequence","flatten the multicam","un-merge","nest-free timeline for the turnover"],group:"Prep",...Rf,about:"Premiere: the open sequence as a NEW sequence with every nest expanded into the cut \u2014 the nest's own scale, position, rotation, opacity and speed composed onto its clips, multicam clips as their active angle, adjustment layers kept. The open sequence is not touched.",inputs:[{id:"name",label:"New sequence name",type:"text",optional:!0,placeholder:"default: <sequence>_UNNEST"}],nodes:[{id:"edit",use:"verb.host_edit",label:"Un-nest",args:{host:"premiere",ops:[{kind:"unnest"}],name:"$in.name"}}]},{id:"resize",name:"Resize Sequence",part:!0,playbook:"conform",aka:["change the sequence resolution","HD to UHD","UHD to HD","reformat the sequence","change the raster without moving anything","make a 4K version"],group:"Prep",...Rf,about:"Premiere: the open sequence at another raster as a NEW sequence where nothing moves \u2014 every clip keeps its framing (an HD clip filling HD fills UHD at 200%). A new aspect asks how: fit (bars), fill (crop) or stretch.",inputs:[{id:"width",label:"Width",type:"number",default:3840},{id:"height",label:"Height",type:"number",default:2160},{id:"fit",label:"If the aspect changes",type:"choice",choices:[["","Ask"],["fit","Fit (bars)"],["fill","Fill (crop)"],["stretch","Stretch"]],default:""},{id:"name",label:"New sequence name",type:"text",optional:!0,placeholder:"default: <sequence>_REFORMAT"}],nodes:[{id:"edit",use:"verb.host_edit",label:"Resize",args:{host:"premiere",ops:[{kind:"reformat",args:{resolution_w:"$in.width",resolution_h:"$in.height",fit:"$in.fit"}}],name:"$in.name"}}]},{id:"consolidate",name:"Consolidate",part:!0,playbook:"deliver",aka:["media manage","copy the used media","trim with handles","collect media","archive the job","project manager","trim the Premiere project","collect files and copy to a new location"],group:"Deliver",...de,about:"Copies only the media the timeline uses, trimmed with handles (byte-exact, no re-encode: ProRes, DNx, H.264/HEVC, MXF, BRAW, R3D\u2026), into a folder, and writes the timeline there as a new project for its host \u2014 Resolve a .drt, Premiere a .prproj \u2014 linked to the copies, every clip on its exact source frames.",inputs:[ct,{id:"host",label:"From",type:"choice",choices:un,default:"resolve"},{id:"out",label:"Into",type:"folder"},{id:"handles",label:"Handles (frames)",type:"number",default:24},{id:"only_linked",label:"Linked clips only",type:"bool",default:!0}],nodes:[{id:"pull",use:"host.read",args:{host:"$in.host",from:"$in.source"},label:"Read the timeline"},{id:"consolidate",use:"verb.media_consolidate",label:"Consolidate",args:{session_id:"$pull.session_id",out_dir:"$in.out",handles:"$in.handles",only_linked:"$in.only_linked"}},{id:"prproj",use:"verb.timeline_write",when:"$in.host=premiere",label:"Write the Premiere project",args:{session_id:"$pull.session_id",target:"premiere-prproj",out_path:"$in.out"}},{id:"drt",use:"verb.timeline_write",when:"$in.host=resolve",label:"Write the Resolve timeline",args:{session_id:"$pull.session_id",target:"resolve-drt",out_path:"$in.out"}}]},{id:"compare",name:"Compare Cuts",part:!0,playbook:"deliver",aka:["what changed","diff two cuts","change list from files","old cut vs new cut","reconform EDL"],group:"Check",about:"Two versions of a cut as files: what changed between them, and the new one rebuilt from the old one's media and grade (an EDL / CSV of the changes, if asked).",inputs:[{id:"a",label:"Old version",type:"file",placeholder:"the cut whose media and grade exist"},{id:"b",label:"New version",type:"file"},{id:"edl_path",label:"Changes as an EDL",type:"file",optional:!0,placeholder:"write a CMX3600 EDL here"},{id:"csv_path",label:"Changes as a CSV",type:"file",optional:!0}],nodes:[{id:"compare",use:"verb.qc_compare",label:"Compare",args:{a:"$in.a",b:"$in.b",edl_path:"$in.edl_path",csv_path:"$in.csv_path"}}]},{id:"probe",name:"Probe",aka:["media info","what is this file","codec","frame rate of a file","timecode of a file","inspect media"],group:"Check",about:"What a media file is: codec, raster, rate, timecode, length, audio channels, color tags.",inputs:[{id:"path",label:"File",type:"file"},{id:"fps",label:"Rate for audio-only files",type:"number",optional:!0}],nodes:[{id:"probe",use:"verb.media_probe",label:"Probe",args:{path:"$in.path",fps:"$in.fps"}}]},{id:"trim",name:"Trim Media",part:!0,playbook:"deliver",aka:["cut a clip","subclip","trim a file","pull a section","shorten a file"],group:"Prep",about:"A section of a media file as a new file, without re-encoding where the codec allows: from a frame or timecode to another, with handles.",inputs:[{id:"path",label:"File",type:"file"},{id:"in",label:"From",type:"text",placeholder:"frame or timecode 01:00:10:00"},{id:"out",label:"To (last frame)",type:"text",placeholder:"frame or timecode"},{id:"handles",label:"Handles (frames)",type:"number",optional:!0},{id:"out_path",label:"Write to",type:"file",optional:!0,placeholder:"default: beside the source"}],nodes:[{id:"trim",use:"verb.media_trim",label:"Trim",args:{path:"$in.path",in:"$in.in",out:"$in.out",handles:"$in.handles",out_path:"$in.out_path"}}]},{id:"sync",name:"Sync Dailies",part:!0,output:"timeline",aka:["sync sound","dailies","match sound to picture","audio sync","sync rushes"],group:"Prep",about:"Each picture file's sound found in the sound recorder's files (by timecode, then by the sound itself), as a dailies timeline.",inputs:[{id:"picture",label:"Picture",type:"files",placeholder:"camera files or folders"},{id:"sound",label:"Sound",type:"files",placeholder:"the recorder's WAVs or folders"},{id:"name",label:"Timeline name",type:"text",optional:!0}],nodes:[{id:"sync",use:"verb.media_sync",label:"Sync",args:{picture:"$in.picture",sound:"$in.sound",name:"$in.name"}}],view:{split:"row",panes:[{pane:"knobs",size:.36},{pane:"viewer",show:"$sync"}]}},{id:"patch",name:"Patch",playbook:"deliverables",aka:["patch a master","fix frames in the master","bypass re-encode","insert a fix","drop in a fix","replace frames by timecode"],group:"Deliver",about:"Cut a render of the fixed frames into a finished ProRes / DNx master by timecode, without re-encoding: the spec is checked first and every write verified (frames, timecode, audio), rolled back if it fails. A new file beside the master unless you choose to change the master itself.",inputs:[{id:"path",label:"Master",type:"file",placeholder:"the finished master .mov"},{id:"patch",label:"Fix",type:"file",optional:!0,placeholder:"the render of the fixed frames, with record TC",when:{input:"mode",is:["new","section","in_place","check"]}},{id:"mode",label:"Write",type:"choice",choices:[["new","A new patched master"],["section","Just the patched section"],["in_place","Into the master itself"],["check","Check only"],["undo","Undo the last in-place patch"]],default:"new"},{id:"in",label:"Starts at (cross-check)",type:"text",optional:!0,placeholder:"master frame or timecode; default: the fix's own TC",when:{input:"mode",is:["new","section","in_place","check"]}},{id:"out",label:"Ends at",type:"text",optional:!0,placeholder:"last master frame; default: the end of the fix",when:{input:"mode",is:["new","section","in_place","check"]}},{id:"out_path",label:"Write to",type:"folder",optional:!0,placeholder:"default: beside the master",when:{input:"mode",is:["new","section"]}}],nodes:[{id:"patch",use:"verb.media_patch",label:"Patch",args:{path:"$in.path",patch:"$in.patch",mode:"$in.mode",in:"$in.in",out:"$in.out",out_path:"$in.out_path"}}]},{id:"dcp",name:"Make DCP",part:!0,playbook:"deliverables",aka:["digital cinema package","cinema deliverable","DCP for a festival","theatrical package"],group:"Deliver",about:"A SMPTE DCP from the ProRes master and the mix: picture to JPEG 2000 in the DCI container, sound to the DCP's channels, CPL and PKL written and checked.",inputs:[{id:"path",label:"Master",type:"file",placeholder:"the ProRes master .mov"},{id:"wav",label:"Mix",type:"file",placeholder:"5.1 WAV (L R C LFE Ls Rs) or stereo"},{id:"title",label:"Title",type:"text",placeholder:"FILM_FTR-1_F_EN-XX_51_2K_20261009_TBD_SMPTE"},{id:"color",label:"Master is",type:"choice",choices:Bl(kw),default:"rec709"},{id:"container",label:"Container",type:"choice",choices:[["","From the master"],...Bl(KT)],default:""},{id:"resolution",label:"Size",type:"choice",choices:Bl(AT),default:"2k"},{id:"kind",label:"Kind",type:"choice",choices:Bl(UT),default:"feature"},{id:"out",label:"Write to",type:"folder",optional:!0,placeholder:"default: beside the master"}],nodes:[{id:"dcp",use:"verb.media_dcp",label:"Make the DCP",args:{path:"$in.path",wav:"$in.wav",title:"$in.title",color:"$in.color",container:"$in.container",resolution:"$in.resolution",kind:"$in.kind",out_dir:"$in.out"}}]},{id:"dcp-patch",name:"Patch DCP",part:!0,playbook:"finishing-fixes",aka:["fix a shot in the DCP","replace frames in a DCP","DCP patch","drop j2c into a DCP","version file","VF"],group:"Deliver",about:"A fix dropped into a finished DCP without rebuilding it: a ProRes render, .j2c frames, an MXF or a WAV over the frames it replaces. Only the touched reels are re-wrapped; the rest are carried, or referenced from the OV in a VF. Checked before writing, proven after.",inputs:[{id:"dcp",label:"DCP",type:"folder",placeholder:"the DCP folder (with ASSETMAP.xml)"},{id:"path",label:"Fix",type:"file",placeholder:"ProRes .mov, .j2c (or a folder of them), .mxf or .wav"},{id:"at",label:"From frame",type:"text",placeholder:"frame or HH:MM:SS:FF from the start"},{id:"reel",label:"In reel",type:"number",optional:!0,placeholder:"makes From relative to this reel"},{id:"color",label:"Render is",type:"choice",choices:Bl(kw),default:"rec709"},{id:"mode",label:"Package",type:"choice",choices:[["ov","New OV (plays anywhere)"],["vf","VF (only what changed)"],["check","Check only"]],default:"ov"},{id:"title",label:"Title",type:"text",optional:!0,placeholder:"default: the DCP's name, OV/VF set"},{id:"out",label:"Write to",type:"folder",optional:!0,placeholder:"default: beside the DCP"}],nodes:[{id:"patch",use:"verb.media_dcp_patch",label:"Patch the DCP",args:{dcp:"$in.dcp",path:"$in.path",at:"$in.at",reel:"$in.reel",color:"$in.color",mode:"$in.mode",title:"$in.title",out_dir:"$in.out"}}]},{id:"signoff",name:"Deliverable QC",part:!0,playbook:"deliverables",aka:["check the render","sign off a deliverable","spec check","is the master right","check the export","loudness check"],group:"Check",about:"Signs off a rendered deliverable against its spec: start timecode and length, codec, raster, rate, bit depth, audio channels and loudness, the name against your naming, and the picture against the approved reference.",inputs:[{id:"path",label:"The render",type:"file"},{id:"ref",label:"Approved reference",type:"file",optional:!0},{id:"start_tc",label:"Starts at",type:"text",optional:!0,placeholder:"01:00:00:00 (default: your profile's)"},{id:"frames",label:"Frames",type:"number",optional:!0},{id:"codec",label:"Codec",type:"text",optional:!0,placeholder:"ProRes 4444, ProRes 422 HQ, H.264"},{id:"width",label:"Width",type:"number",optional:!0},{id:"height",label:"Height",type:"number",optional:!0},{id:"fps",label:"Rate",type:"number",optional:!0},{id:"channels",label:"Audio channels",type:"number",optional:!0},{id:"loudness_lufs",label:"Loudness (LUFS)",type:"number",optional:!0},{id:"true_peak",label:"True peak (dBTP)",type:"number",optional:!0},{id:"end_on_picture",label:"Ends on its end card",type:"bool",default:!1}],nodes:[{id:"signoff",use:"verb.qc_deliverable",label:"Check",args:{path:"$in.path",ref:"$in.ref",start_tc:"$in.start_tc",frames:"$in.frames",codec:"$in.codec",width:"$in.width",height:"$in.height",fps:"$in.fps",channels:"$in.channels",loudness_lufs:"$in.loudness_lufs",true_peak:"$in.true_peak",end_on_picture:"$in.end_on_picture"}}]}];function Fi(e,t){let r=[{id:"mode",label:"Do",type:"choice",choices:t.map(([a,o])=>[a,o]),default:t[0][0]}],i=[],n=t.map(([a,,o])=>[a,O4.find(s=>s.id===o)]);for(let[a,o]of n){let s=c=>c==="source"?c:`${a}_${c}`;for(let c of o.inputs){if(c.id==="source"){r.some(l=>l.id==="source")||r.splice(0,0,c);continue}r.push({...c,id:s(c.id),...c.not?{not:s(c.not)}:{},when:c.when?{input:s(c.when.input),is:c.when.is}:{input:"mode",is:[a]}})}i.push({id:a,use:`tool.${o.id}`,args:Object.fromEntries(o.inputs.map(c=>[c.id,`$in.${s(c.id)}`])),when:`$in.mode=${a}`,label:o.name})}return{...e,aka:[...e.aka??[],...n.flatMap(([,a])=>[a.name,...a.aka??[]])],inputs:r,nodes:i,...n[0][1].view?{view:n[0][1].view}:{}}}var S4=[...O4,Fi({id:"index",name:"Edit Index+",app:!0,aka:["edit index +","edit index plus"],group:"Look",...de,about:"The open timeline's clips as a table to filter and change in one undoable batch; relink; and on Premiere: proxies to online, cut in returns, un-nest, resize the sequence."},[["clips","Clips","clips"],["relink","Relink","relink"],["uprez","Proxies to online (Premiere)","uprez"],["cutin","Cut in returns (Premiere)","cutin"],["unnest","Un-nest (Premiere)","unnest"],["resize","Resize sequence (Premiere)","resize"]]),Fi({id:"grades",name:"Grades",playbook:"patch",group:"Match",...de,about:"Copy grades (and sizing, crop, composite, color, flags) from one track to another, or find each clip's earlier grade in the project's other timelines after a re-conform and bring it across."},[["copy","Copy track to track","copy-grades"],["trace","Find earlier grades","trace"]]),Fi({id:"allclips",name:"Build Timeline",playbook:"conform",output:"timeline",group:"Prep",...de,about:"A new timeline from the cut: every clip the timelines use (overlaps merged, duplicates marked), every clip strung out with handles, or several timelines end to end. The open timeline is never edited."},[["all","All clips","all-clips"],["handles","Every clip with handles","handles"],["join","Join timelines","join-timelines"]]),Fi({id:"autoconform",name:"Auto Conform",playbook:"autoconform",output:"timeline",group:"Match",about:"Rebuild the edit from a reference render and the source media; or bring a color timeline up to a new cut (reconform); or compare two cut files and rebuild the new one from the old one's media."},[["conform","From a reference movie","conform-reference"],["recut","To a new cut (reconform)","reconform"],["compare","Compare two cut files","compare"],["sync","Sync dailies","sync"]]),Fi({id:"qc",name:"QC",playbook:"deliverables",group:"Check",...de,about:"Check the timeline after the grade through the render plugin (black edges and frames, clipping, freezes, flashes, dead pixels, loudness), find clips whose sizing shows black, or sign off a rendered deliverable against its spec."},[["finishing","Finishing QC","finishing-qc"],["blanking","Blanking","blanking"],["deliverable","Deliverable QC","signoff"]]),Fi({id:"deliver",name:"Trim & Archive",playbook:"deliver",group:"Deliver",about:"The timeline's media trimmed with handles: a package (folder, .iso, bucket, peer to peer), a consolidated project for its host, or one file cut down."},[["archive","Archive","archive"],["consolidate","Consolidate","consolidate"],["trim","Trim a file","trim"]]),Fi({id:"delivery",name:"Manage Delivery",playbook:"deliverables",group:"Deliver",about:"Deliverables out of the cut: a render per marker named by a delivery convention, a DCP from the master and the mix, or a fix dropped into a finished DCP."},[["renders","Marker renders","renders"],["dcp","Make a DCP","dcp"],["dcppatch","Patch a DCP","dcp-patch"]])],eR=new Set(["account_login","account_status","account_logout","account_telemetry","conform_learn","report","job","tool","app","project","project_link","team","timeline_routes","timeline_sessions","artist_profile","naming"]),tR=new Set(["path","reference","a","b","plate","render","master","patch","edl_path","csv_path","credits_path","look_path"]),rR=new Set(["out_dir","media_root","target_dir","images_dir","pool"]),nR=new Set(["pool","paths","picture","sound","mix","media_dirs","fonts"]);function Fee(e){let t=[];for(let r of e){if(eR.has(r.name)||r.name.startsWith("host_"))continue;let i=Cv(Xf.object(r.inputSchema)),n=[],a=!0;for(let[o,s]of Object.entries(i.properties??{})){if(o==="background"||o.startsWith("__"))continue;let c=!!i.required?.includes(o)&&s.default===void 0,l=Array.isArray(s.type)?s.type[0]:s.type,u=s.enum?"choice":l==="boolean"?"bool":l==="number"||l==="integer"?"number":l==="string"?tR.has(o)?"file":rR.has(o)?"folder":"text":l==="array"&&s.items?.type==="string"&&nR.has(o)?"files":null;if(!u){if(c){a=!1;break}continue}n.push({id:o,label:o.replace(/_/g," "),type:u,optional:!c,...s.default!==void 0?{default:s.default}:{},...s.enum?{choices:s.enum.map(d=>[d,d])}:{},...s.description?{placeholder:s.description.slice(0,120)}:{}})}a&&t.push({id:`verb-${r.name.replace(/_/g,"-")}`,name:r.title??r.name,group:"API",about:String(r.description??"").split(/(?<=\.)\s/)[0],inputs:n,nodes:[{id:"run",use:`verb.${r.name}`,args:Object.fromEntries(n.map(o=>[o.id,`$in.${o.id}`]))}]})}return t}var Gee="io.modelcontextprotocol/skills",W4=3e5,iR=512,aR=16*1024*1024;async function oR(){let e=dn("CONFORM_PLAYBOOKS_DIR");if(e)return await Ei(e)?e:null;let t=rc(new URL("../../api/playbooks/",import.meta.url));return await Ei(t)?t:null}var sR={md:"text/markdown",txt:"text/plain",json:"application/json",yaml:"application/yaml",yml:"application/yaml",py:"text/x-python",ts:"text/typescript",js:"text/javascript",sh:"text/x-shellscript",csv:"text/csv",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",svg:"image/svg+xml",pdf:"application/pdf"},lR=e=>sR[e.split(".").pop()?.toLowerCase()??""]??"application/octet-stream";async function cR(e){let t=new Uint8Array(await crypto.subtle.digest("SHA-256",e));return"sha256:"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function uR(e){let t=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/.exec(e);if(!t)return null;let r={};for(let i of t[1].split(/\r?\n/)){let n=/^([A-Za-z0-9_-]+):\s*(.*)$/.exec(i);if(!n)continue;let a=n[2].trim();(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))&&(a=a.slice(1,-1)),r[n[1]]=a}return r}async function L4(e,t,r,i){let n=[];for await(let a of dt(e))n.push(a);n.sort((a,o)=>a.name.localeCompare(o.name));for(let a of n){if(a.name.startsWith("."))continue;let o=t?`${t}/${a.name}`:a.name;a.isDirectory?(i.push(o),await L4($(e,a.name),o,r,i)):a.isFile&&r.push({rel:o,abs:$(e,a.name)})}}async function dR(e){let t=[];for await(let i of dt(e))i.isDirectory&&!i.name.startsWith(".")&&t.push(i.name);let r=[];for(let i of t.sort()){let n=[];await L4($(e,i),"",n,[]),r.push({name:i,files:await Promise.all(n.filter(a=>a.rel.endsWith(".md")).map(async a=>({path:a.rel,bytes:await ut(a.abs)})))})}return r}var fR=()=>`${xr().supabaseUrl}/functions/v1/v1-me/v1/engine/playbooks`;async function mR(){let e=await Kn().catch(()=>null);if(!e)throw new Error("not signed in: call account_login, then try again");let t=await fetch(fR(),{headers:{authorization:`Bearer ${e}`,apikey:xr().anonKey},signal:AbortSignal.timeout(8e3)}),r=await t.json().catch(()=>null);if(!t.ok||!Array.isArray(r?.playbooks))throw new Error(r?.error?.message??`conform.tools answered ${t.status}`);let i=new TextEncoder;return{version:String(r.version??"unknown"),skills:r.playbooks.map(n=>({name:n.name,files:n.files.map(a=>({path:a.path,bytes:i.encode(a.text)}))}))}}async function X4(e){let t=[];for(let r of e){if(!r.files.some(s=>s.path==="SKILL.md"))continue;let i=`skill://${r.name}`,n=[],a=new Set([""]);for(let s of[...r.files].sort((c,l)=>c.path.localeCompare(l.path))){let c=s.path.split("/");for(let l=1;l<c.length;l++)a.add(c.slice(0,l).join("/"));n.push({uri:`${i}/${s.path}`,path:s.path,name:c[c.length-1],bytes:s.bytes,digest:await cR(s.bytes),mimeType:lR(s.path)})}let o=uR(new TextDecoder().decode(n.find(s=>s.path==="SKILL.md").bytes));!o||o.name!==r.name||typeof o.description!="string"||n.length>iR||n.reduce((s,c)=>s+c.bytes.length,0)>aR||t.push({name:r.name,uri:`${i}/SKILL.md`,root:i,frontmatter:o,files:n,dirs:a})}return t}var If=null;function Hw(){If??=(async()=>{let t=await oR();if(t)return{skills:await X4(await dR(t)),source:"local",version:"local"};let r=await mR();return{skills:await X4(r.skills),source:"conform.tools",version:r.version}})();let e=If;return e.catch(()=>{If===e&&(If=null)}),e}async function Cf(){try{return(await Hw()).skills}catch{return[]}}function V4(e){return{uri:e.uri,frontmatter:e.frontmatter,resources:e.files.map(t=>({uri:t.uri,digest:t.digest,size:t.bytes.length}))}}var Ef=class extends Error{constructor(r,i){super(i);this.code=r}},q4=-32602;async function Kee(){return{resultType:"complete",skills:(await Cf()).map(V4),ttlMs:W4,cacheScope:"public"}}async function Aee(e){let t=(await Cf()).find(r=>r.uri===e);if(!t)throw new Ef(q4,`No skill is served at ${String(e)}`);return{resultType:"complete",skill:V4(t),ttlMs:W4,cacheScope:"public"}}async function Uee(e){let t=String(e??"").replace(/\/$/,"");for(let r of await Cf()){if(t!==r.root&&!t.startsWith(r.root+"/"))continue;let i=t===r.root?"":t.slice(r.root.length+1);if(!r.dirs.has(i))break;let n=i?i+"/":"",a=[];for(let o of[...r.dirs].sort())o&&o.startsWith(n)&&!o.slice(n.length).includes("/")&&a.push({uri:`${r.root}/${o}`,name:o.slice(n.length),mimeType:"inode/directory"});for(let o of r.files)o.path.startsWith(n)&&!o.path.slice(n.length).includes("/")&&a.push({uri:o.uri,name:o.name,mimeType:o.mimeType});return{resultType:"complete",resources:a}}throw new Ef(q4,`No skill directory at ${t}`)}async function Z4(){let e=await Cf();return e.length?["Skills: this server ships Agent Skills that say how a conform artist uses these tools. Load the one that fits the task:",...e.map(t=>`- ${t.uri} \u2014 ${t.frontmatter.description}`)].join(`
|
|
97
|
+
`):""}var Yee=["conform","autoconform","deliver","deliverables","troubleshoot","patch"],Bee=["avid","premiere","resolve","finalcut","flame","baselight","protools"],pR={conform:["conform-artist",["SKILL.md","references/turnover-checklist.md"]],autoconform:["auto-conform",["SKILL.md"]],deliver:["delivery-qc",["SKILL.md"]],deliverables:["deliverables",["SKILL.md"]],troubleshoot:["conform-artist",["references/troubleshooting.md"]],patch:["finishing-fixes",["SKILL.md"]]},j4={avid:"references/avid.md",premiere:"references/premiere.md",resolve:"references/resolve.md",finalcut:"references/other-hosts.md",flame:"references/other-hosts.md",baselight:"references/other-hosts.md",protools:"references/other-hosts.md"},vR=e=>e.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/,"").trimStart(),M4=new Set,Qee=()=>M4.size>0;async function _ee(e,t=[]){let{skills:r,version:i}=await Hw(),[n,a]=pR[e],o=r.find(m=>m.name===n);if(!o)throw new Error(`the ${n} playbook is not available (version ${i})`);let s=r.find(m=>m.name==="conform-artist"),c=a.map(m=>[o,m]);for(let m of t)c.some(([,f])=>f===j4[m])||c.push([s,j4[m]]);let l=[],u=[];for(let[m,f]of c){let p=m?.files.find(v=>v.path===f);p&&(u.push(p.uri),l.push(`<!-- ${p.uri} -->
|
|
98
|
+
${vR(new TextDecoder().decode(p.bytes)).trimEnd()}`))}M4.add(e);let d=`conform.tools playbook \u2014 ${e} (version ${i}). Follow it for this task; it says how a conform artist uses these tools and what to tell the user.`;return{task:e,version:i,files:u,text:[d,...l,hR(e)].filter(Boolean).join(`
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
`)}}function hR(e){let t=S4.filter(r=>r.playbook===e);return t.length?`Tools for this (tool_run id=\u2026, the same ones on the conform.tools app's desktop; each runs on the settings the artist left for it in this job): ${t.map(r=>`${r.name} (${r.id})`).join(", ")}.`:""}async function $ee(e,t){let r;try{r=(await Hw()).skills.find(o=>o.name===e)}catch{return""}let i=r?.files.find(o=>o.path==="SKILL.md");if(!i)return"";let n=new Set(["always",...t]),a=[];for(let o of new TextDecoder().decode(i.bytes).split(/^(?=#{1,3} )/m)){let s=o.match(/^### (.+?) \(when: ([a-z_, ]+)\)\s*\n/);s&&s[2].split(",").some(c=>n.has(c.trim()))&&a.push(`**${s[1]}.** ${o.slice(s[0].length).trim().replace(/\s*\n\s*/g," ")}`)}return a.join(`
|
|
103
|
+
`)}var R4="the conform.tools engine on this machine: timeline exchange between editing hosts (Avid, Premiere, Resolve, Final Cut, Flame), relinking, media probe/trim/consolidate, QC, graphics, delivery packages and auto conform",F4=["Before any conform, timeline conversion, relink, verification or delivery task, call conform_learn with the task (and the hosts involved) and follow the playbook it returns. It needs a signed-in account; if it cannot load (offline), carry on with the tools.","Work on a job happens in its project: when the user names the job (or you can tell which it is from project action=list), call project action=open first and follow the context it returns \u2014 the same notes the conform.tools app, its offline assistant and the user's teammates work from. Add what you learn about the job (spec, deliverables, naming, decisions) with project action=context text=\u2026 (the whole notes, edited).","The artist's tools are recipes (tool action=list: Auto Conform, Relink, Copy Grades, VFX Pulls, Graphics, Finishing QC\u2026, plus the artist's own) \u2014 the same tools the conform.tools app shows on its desktop and its offline model picks. When one fits the request, run it (tool_run id, inputs) rather than rebuilding it from verbs: it runs on the settings the artist left for it in this job, and a review it reaches waits for an OK (tool_run action=list / apply with keep or drop / undo) wherever it was started. When the artist describes a tool nothing does, build the recipe (tool action=blocks, then save).","When the conform.tools app is open on this machine you drive the artist's window, the way they would by hand (it is the same engine: tool, tool_run and app run in it). app action=state says which job and tabs are open, each tab's settings and timeline, and what waits for an OK; app action=open (tool, settings, source) brings that tool to the front with what they asked for filled in, ready to look at or Run; action=job switches job, home goes back to Home. When the artist will want to see or check the result, open the tool for them as well as running it: every tool_run you start shows live in that tool's tab, and a review they have open there is yours to read and apply.",'A wrong or failed result needs no report: the run records it (with the error); when the user says a result was wrong, say so in the next `asked` ([failed: what was wrong]). A lesson, workflow rule or suggestion (nothing broke: "the patch range runs whole clip before to whole clip after") goes to report.'],H4=[`conformtools ${fn} is ${R4}.`,"find_verb first: whenever a request touches media, audio, picture, timelines or post-production (transcripts, subtitles, codecs, timecode, relinking, conforming, QC, delivery\u2026) and no conformtools tool you know does exactly that, call find_verb with the request BEFORE ffmpeg, Bash, a script, another tool or manual host steps, and before telling the user it cannot be done. It takes one call and is how missing tools get built.",'When you call one of these tools, say so in one short line first: "using conformtools: <tool>".',"Many calls in one job (every file, clip or timeline): ONE script_run (TypeScript, `await ct.<tool>(args)`; script_read if it only reads), not a tool call each; only its return value comes back.",'On the first call for each new user request, fill `asked` with the request in one line, every show, person, clip, reel, scene and path as a {placeholder} ("relink {reel} to the camera originals"), starting with [solved], [partly] or [failed: why] for the request before once you know how it went (solved only when the user got what they asked for).',"report never sends media, file contents or timeline files. Outcome telemetry is on unless the user turned it off (account_telemetry): tool names, codes and errors, timings, counts, argument names, the system and the {placeholder} request line, never names, paths or content."],D4=[`You are the assistant inside the conform.tools app (engine ${fn}), ${R4}. You work for a post-production conform artist on one project at a time.`,"The app shows every tool call and its result to the person, so do not narrate which tool you are calling; say what you found and what you recommend, briefly. Lead with the answer.","Tools that change or overwrite things wait for the person to allow them; propose them plainly and do not ask for permission in text as well.","Paths are on this machine. When a result names a session_id, the app can show that timeline; refer to timelines by name, not by id.","The app's Home is a desktop of every tool; each opens in a tab of its own with its own screen (the recipe's view: knobs, viewer, rows, compare\u2026), all working on the project's timeline (Resolve or Premiere live, a project timeline, a file). app action=state says which tabs are open, the job's timeline and what is waiting for an OK; app action=open (tool, settings) opens a tool for the artist with what they asked for filled in. Prefer an existing tool, opened and filled in, over a new one. Every tool_run you start shows in that tool's tab, and a review the artist has open in a tab is yours to read and apply. When you build a recipe, its screen too when they say how they want to see it, open it for them.","Working in the open Resolve timeline: host_current via=export reads it exactly into a session; timeline_query finds clips/markers (rows carry track V1/A1 and timeline_range.start = the record frame from the timeline start); host_items adds what the file lacks (clip color, flags, versions, groups). To change clips in place, host_apply with items addressed {kind, track, start} from those rows (its reply's undo_id puts the batch back: offer it). To build a timeline (handles, all clips, inserts), timeline_edit on the session, then host_open session_id + timeline_id with link_existing=true; the open timeline is never edited. Finishing QC on the timeline: host_render renderplugin=true."],I4=[H4[0],...F4,...H4.slice(1)].map((e,t)=>t?`${t}. ${e}`:e).join(`
|
|
104
|
+
`),bR=[D4[0],...F4,...D4.slice(1)].join(`
|
|
105
|
+
`);async function ite(e){let t=await Promise.all([W0().catch(()=>""),Z4().catch(()=>"")]);return[e==="mcp"?I4:bR,...t].filter(Boolean).join(e==="mcp"?`
|
|
106
|
+
`:`
|
|
107
|
+
|
|
108
|
+
`)}var yR="support@conform.tools",J4=15,Dw=2e3,G4=()=>$(Ke(),"config.json");async function K4(){try{return JSON.parse(await Gt(G4()))}catch{return{}}}async function xR(e){await Ce(Ke()),await Ee(G4(),JSON.stringify(e,null,1))}async function Zo(){return dn("CONFORM_TELEMETRY")==="off"||dn("CONFORM_TELEMETRY")==="0"?!1:(await K4()).telemetry!==!1}async function mte(e){let t=await K4();t.telemetry=e,t.telemetry_changed_at=new Date().toISOString(),await xR(t),e||await nc(ec()).catch(()=>{})}var E4="per tool run: the tool name, ok or the error code (and a failure's message, every name and path a {placeholder}), duration, package version, engine mode (local/hosted) and counts (clips, files, matched/unmatched\u2026, numbers only), the names of the arguments given (never their values) and the call's place in this conversation (a random run id + call number), the agent app it came from and the system (OS and version, chip, runtime, memory, CPU count); per request, the AI's one-line summary of what was asked with every name, path and title replaced by a {placeholder} (scrubbed again before it is sent and on arrival) and whether the request before was solved; per rejected call: the tool name and the names of the arguments that failed validation. Never paths, file or clip names, timeline contents, project notes, your own words or media. Apart from telemetry, under the same switch: a timeline converted on conform.tools has its original timeline file kept with that conversion, as on the website, so the result is checked against it (never media).";async function pte(){let e=await Zo(),t=(await Iw()).length;return e?`outcome telemetry: ON (the default) \u2014 records ${E4}
|
|
109
|
+
sent in batches at most every ${J4} min${t?`; ${t} event(s) waiting`:""}. It is how conform.tools finds where its tools fail and fixes them. Turn off: conformtools telemetry off`:`outcome telemetry: OFF. Nothing is recorded. If turned on it records ${E4} Turn on: conformtools telemetry on`}async function vte(){return await Zo()?"outcome telemetry: on \u2014 tool names, ok/error codes, timings, counts and argument names; never paths, names, contents or prompts (conformtools telemetry off)":"outcome telemetry: off (conformtools telemetry on)"}var wR=e=>`${xr().supabaseUrl}/functions/v1/v1-me/v1/engine/${e}`;async function Cw(e,t,r){return await fetch(wR(e),{method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${r}`,apikey:xr().anonKey},body:JSON.stringify(t),signal:AbortSignal.timeout(1e4)})}async function hte(e){let{platform:t,runtime:r}=Jf(),i=k0({...e,kind:"note",version:fn,engine:mi(),platform:t,runtime:r,account_env:xr().env,log_lines:[]});if(typeof i=="string")throw new Error(i);return i}async function bte(e){let t=$(Ke(),"reports");await Ce(t);let r=$(t,`${new Date().toISOString().replace(/[:.]/g,"-")}-${e.kind}.json`);await Ee(r,JSON.stringify(e,null,1));let i=await Kn().catch(()=>null);if(!i)return{sent:!1,saved:r,reason:"not signed in (account_login)"};let n=(await o1().catch(()=>null))?.email??null;try{let a=await Cw("report",e,i),o=await a.json().catch(()=>({}));return!a.ok||!o.id?{sent:!1,saved:r,email:n,status:a.status,reason:`conform.tools answered ${a.status}${o.error?.message?`: ${o.error.message}`:""}`}:(await Ee(r,JSON.stringify({id:o.id,...e},null,1)),{sent:!0,id:o.id,saved:r,email:n,resent:await PR(i)})}catch(a){return{sent:!1,saved:r,email:n,reason:`conform.tools is unreachable (${a instanceof Error?a.message:String(a)})`}}}var zR=20,Rw=!1;async function PR(e){if(Rw)return 0;Rw=!0;let t=0,r=0;try{let i=$(Ke(),"reports"),n=[];for await(let a of dt(i))a.isFile&&a.name.endsWith(".json")&&n.push(a.name);for(let a of n.sort()){if(r>=zR)break;let o=$(i,a),s;try{s=JSON.parse(await Gt(o))}catch{continue}if(s.id||s.rejected)continue;r++;let c=await Cw("report",s,e).catch(()=>null),l=await c?.json().catch(()=>({}));if(c?.status===400){await Ee(o,JSON.stringify({rejected:l?.error?.message??"400",...s},null,1));continue}if(!c?.ok||!l?.id)break;await Ee(o,JSON.stringify({id:l.id,...s},null,1)),t++}}catch{}finally{Rw=!1}return t}function kR(e){let t=e;return Object.entries(On).filter(([r,i])=>typeof t[r]=="string"&&t[r].trim().length>i).map(([r])=>r)}function gte(e,t){let r=kR(t),i=i1(TR(e,r),{sent:e.sent,report_id:e.id??null,saved:e.saved,reason:e.reason??null,status:e.status??null,resent:e.resent??0,clipped:r});return e.sent||(i.structuredContent.ok=!1),i}function TR(e,t=[]){let r="note",i=t.length?`
|
|
110
|
+
Cut to fit: ${t.map(n=>`${n} (max ${On[n]} chars)`).join(", ")}.`:"";return e.sent?`sent ${r} to conform.tools \u2014 report id ${e.id.slice(0,8)}${e.email?` (account ${e.email})`:""}.
|
|
111
|
+
No media, file contents or timeline files were sent; paths were cut to file names. Copy of what was sent: ${e.saved}`+(e.resent?`
|
|
112
|
+
Also sent ${e.resent} earlier report(s) that had been saved unsent.`:"")+i:`NOT SENT \u2014 ${e.reason}. The ${r} is saved to ${e.saved}; it is resent automatically after the next report that gets through, or send that file to ${yR}.`+i}var $l=()=>$(Ke(),"telemetry"),ec=()=>$($l(),"queue.jsonl"),Fw=()=>$($l(),"state.json");async function Iw(){try{return(await Gt(ec())).split(`
|
|
113
|
+
`).filter(Boolean).flatMap(e=>{try{return[JSON.parse(e)]}catch{return[]}})}catch{return[]}}var NR=new Set(["account_login","account_status","account_logout","account_telemetry","report","job","report_issue","report_note","job_status","job_cancel","job_list","timeline_routes","timeline_sessions"]),OR=[["clips",/\b(\d+) clips?\b/i],["files",/\b(\d+) (?:output )?files?(?:\(s\))?\b/i],["sources",/\b(\d+) sources?(?:\(s\))?\b/i],["skipped",/\bskipped (\d+)\b/i],["matched",/\b(?:(\d+) matched|matched[: =]+(\d+))\b/i],["unmatched",/\b(?:(\d+) unmatched|unmatched[: =]+(\d+))\b/i],["ambiguous",/\b(?:(\d+) ambiguous|ambiguous[: =]+(\d+))\b/i],["unresolved",/\b(?:(\d+) unresolved|unresolved[: =]+(\d+))\b/i],["linked",/\b(?:(\d+) linked|linked[: =]+(\d+))\b/i],["issues",/\bissues \((\d+)\)/i],["frames",/\((\d+) frames\)/i]];function SR(e){let t={},r=e.content.map(i=>i.text).join(`
|
|
114
|
+
`);for(let[i,n]of OR){let a=r.match(n),o=a?Number(a[1]??a[2]):NaN;Number.isFinite(o)&&(t[i]=o)}for(let[i,n]of Object.entries(e.structuredContent??{}))typeof n=="number"&&/^[a-z_]{1,32}$/.test(i)&&!(i in t)&&(t[i]=n);return t}async function A4(e){let t=Pv(e);t&&(await Ce($l()),await Ee(ec(),JSON.stringify(t)+`
|
|
115
|
+
`,{append:!0}))}var Ew=new Set;function Jw(e){return Ew.add(e),e.finally(()=>Ew.delete(e)),e}async function yte(){await Promise.allSettled([...Ew])}var C4=new Set;function U4(e,t){return!e||C4.has(e)?Promise.resolve():(C4.add(e),Jw((async()=>{try{if(!await Zo()||!await $w(t))return;let{shareOriginal:r}=await import("./hosted-BWAYLJXR.js");await r(e,Q(t),await ut(t))}catch{}})()))}var XR=0,_l=0,Gw=null,jR=null;function WR(){return jR??={...Jf(),memory_gb:Math.round(Uw()/2**30),cpus:Yw()}}var Kw=()=>({run_id:yv,seq:++XR,..._l?{req:_l}:{},client:Gw,event_id:crypto.randomUUID(),...WR()});function xte(e){e&&(Gw=e)}var wte=()=>Gw;function zte(e){return typeof e=="string"&&e.trim()?{...P0(e),req:++_l}:_l?{req:_l}:null}function Pte(e,t,r,i=[],n={}){return Jw(LR(e,t,r,i,n))}async function LR(e,t,r,i,{request:n,hits:a,client:o}){try{if(NR.has(e)&&!n?.asked||!await Zo())return;await A4({kind:"outcome",verb:e,ok:!t.isError,code:t.isError?String(t.structuredContent?.code??"engine"):void 0,...t.isError?{error:String(t.structuredContent?.message??t.content?.[0]?.text??"")}:{},duration_ms:r,version:fn,engine:mi(),counts:SR(t),fields:i,...Kw(),run_at:new Date().toISOString(),...n??{},...a?{hits:a}:{},...o?{client:o}:{}}),Y4()}catch{}}function kte(e,t){return Jw(VR(e,t))}async function VR(e,t){try{if(!await Zo())return;await A4({kind:"invalid_args",verb:e,fields:t,version:fn,engine:mi(),...Kw(),run_at:new Date().toISOString()}),Y4()}catch{}}function Tte(e){return[...new Set(e.map(t=>t.path.map(String).join(".")||"(root)"))]}var Ql=null;function Y4(e={}){return Ql||(Ql=(async()=>{try{if(!await Zo())return;let t={};try{t=JSON.parse(await Gt(Fw()))}catch{}if(!e.force&&!t.last_flush){await Ce($l()),await Ee(Fw(),JSON.stringify({last_flush:Date.now()}));return}if(!e.force&&Date.now()-t.last_flush<J4*6e4)return;let r=await Iw();if(!r.length)return;let i=await Kn().catch(()=>null);if(!i)return;await Ce($l()),await Ee(Fw(),JSON.stringify({last_flush:Date.now()}));let n=r.slice(0,500),a=await Cw("telemetry",{events:n},i).catch(()=>null);if(a?.ok||a?.status===400){let o=await Iw();await Ee(ec(),o.slice(n.length).map(s=>JSON.stringify(s)+`
|
|
116
|
+
`).join(""))}else if(r.length>Dw){let o=Pv({kind:"dropped",verb:"telemetry",counts:{events:r.length-Dw},version:fn,...Kw(),run_at:new Date().toISOString()});await Ee(ec(),[...r.slice(-Dw),...o?[o]:[]].map(s=>JSON.stringify(s)+`
|
|
117
|
+
`).join(""))}await a?.body?.cancel().catch(()=>{})}catch{}finally{Ql=null}})(),Ql)}var Q4=["aaf","avb","prproj","drt","fcpxml","xmeml","otio","capcut","flame","ptx","fcpevent","blscene"];function qR(e){switch(rt(e).toLowerCase()){case".aaf":return"aaf";case".avb":return"avb";case".ptx":return"ptx";case".prproj":return"prproj";case".drt":return"drt";case".fcpxml":case".fcpxmld":return"fcpxml";case".fcpevent":return"fcpevent";case".xml":return"xmeml";case".otio":return"otio";case".blscene":return"blscene";case".json":return/(^|[/\\])draft_(content|info)\.json$/i.test(e)?"capcut":null;default:return null}}async function ZR(e){if(!await Ht($(e,"draft_content.json"))&&!await Ht($(e,"draft_info.json")))return null;try{let t=JSON.parse(new TextDecoder().decode(await ut($(e,"Timelines","project.json"))));for(let r of["draft_content.json","draft_info.json"]){let i=$(e,"Timelines",String(t.main_timeline_id??""),r);if(t.main_timeline_id&&await Ht(i))return i}}catch{}return await Ht($(e,"draft_content.json"))?$(e,"draft_content.json"):$(e,"draft_info.json")}async function Cte(e,t){let r=!t||t==="capcut"?await ZR(e):null;r&&(e=r);let i=t??(r?"capcut":qR(e));if(!i)throw new Error(`cannot detect timeline format from '${e}' \u2014 pass format explicitly (${Q4.join("|")})`);if(i==="fcpevent")return MR(e);let n,a=null;if(i==="drt"){a=await ut(e);let l=await B4.default.loadAsync(a),u={};for(let[d,m]of Object.entries(l.files))m.dir||(u[d]=await m.async("string"));n=new TextEncoder().encode(JSON.stringify(u))}else i==="fcpxml"&&e.toLowerCase().endsWith(".fcpxmld")?n=await ut($(e,"Info.fcpxml")):n=await ut(e);let o=i==="fcpxml"&&e.toLowerCase().endsWith(".fcpxmld")?"Info.fcpxml":Q(e),s=new File([a??n],o),c=JSON.parse(await hv({fmt:i,data:n,file:s}));return c.source_format=i,c.source_filename=Q(e),{session:c,format:i}}async function MR(e){let t=await l0(e),r=$(await Ji("conform-fcp-"),`${t.project.replace(/[^\w.-]+/g,"_").slice(0,80)||"project"}.fcpxml`);await Ee(r,t.fcpxml);let i=new TextEncoder().encode(t.fcpxml),n=JSON.parse(await hv({fmt:"fcpxml",data:i,file:new File([i],Q(r))})),a=n.timelines[0];a&&t.issues.length&&(a.markers=[...a.markers??[],...c0(t.issues,Qe(a))]),n.source_format="fcpxml",n.source_filename=Q(r);let o=[`decoded from the Final Cut project store ${e} (no export); as FCPXML: ${r}`,...t.notes];return{session:n,format:"fcpevent",sourcePath:r,notes:o}}function tc(e,t){return Me(e,Qe(t),!!t.is_drop_frame)}async function Jte(e){let t=[],r=e.media_references??[];for(let c of e.timelines){let l=Qe(c),u=c.start_frame??0;t.push(`timeline ${c.id} "${c.name}" \u2014 ${nm(l)} fps${c.is_drop_frame?" DF":""}, ${c.resolution_w}x${c.resolution_h}, start ${tc(u,c)}, duration ${c.duration_frames} fr (${tc(c.duration_frames??0,c)})${c.kind&&c.kind!=="primary"?` [${c.kind}]`:""}`);let d={},m=0,f=0,p=0,v=[];for(let h of c.tracks){let b=h.items.length,g=h.items.filter(y=>y.kind==="clip").length;v.push(`${hm(h,c.tracks)}${h.enabled===!1?"(off)":""}:${g}`);for(let y of h.items)d[y.kind]=(d[y.kind]??0)+1,m+=y.effects?.length??0,f+=y.metadata?.conform_flags?.length??0,(y.speed_ramped||y.speed_reverse||y.speed_factor!=null&&y.speed_factor!==1)&&p++}f+=Aw(c).length,t.push(` tracks: ${v.join(" ")}`),t.push(` items: ${Object.entries(d).map(([h,b])=>`${b} ${h}`).join(", ")}; ${m} effects, ${p} retimes, ${c.markers?.length??0} markers, ${f} conform flags`)}let i=r.filter(c=>c.binding_state==="linked").length,n=r.filter(c=>c.kind==="missing").length,a=r.filter(c=>c.binding_state!=="linked"&&c.kind!=="generator"),o=a.map(c=>c.local_path||c.target_url).filter(c=>!!c).map(c=>c.startsWith("file://")?Qw(c):c),s="paths not checked";return o.length&&o.length<=5e3&&(s=`${(await Promise.all(o.map(l=>Ht(l)))).filter(Boolean).length} of ${a.length} on disk at their recorded paths`),t.push(`media: ${r.length} references (${i} linked, ${a.length} not linked yet \u2014 ${a.length?`${s}; timeline_relink probes and links them`:"nothing to link"}${n?`, ${n} missing`:""})`),t.join(`
|
|
118
|
+
`)}function Gte(e,t){let r=new Map((e.media_references??[]).map(n=>[n.id,n])),i=[];for(let n of e.timelines)if(!(t&&n.id!==t)){i.push(`# ${n.id} "${n.name}"`);for(let a of n.tracks){i.push(`## track ${a.id} ${a.kind} ${hm(a,n.tracks)}${a.enabled===!1?" (disabled)":""}`);for(let o of a.items){let s=o.timeline_range.start.value+(n.start_frame??0),c=s+o.timeline_range.duration.value,l=`- ${o.id} [${o.kind}] "${o.name??""}" rec ${tc(s,n)}\u2013${tc(c,n)} (${o.timeline_range.duration.value} fr)`;if(o.source_range){let d=o.media_reference_id?r.get(o.media_reference_id):void 0,m=o.source_range.start.rate||Qe(n),f=o.source_range.start.value,p=f+o.source_range.duration.value,v=d?.source_timecode??null,h=d?.source_fps||m,b=v?Te(v,h):null,g=!!v?.includes(";"),y=x=>b==null?Me(x,m):Me(b+x*h/m,h,g);l+=` src ${y(f)}\u2013${y(p)}${v?` (file TC ${v})`:""}`,d&&(l+=` media ${d.id}${d.reel_name?` reel "${d.reel_name}"`:""}${d.binding_state==="linked"?"":" UNBOUND"}`)}o.speed_factor!=null&&o.speed_factor!==1&&(l+=` speed ${o.speed_factor}${o.speed_reverse?" reverse":""}`),o.speed_ramped&&(l+=" ramped"),o.enabled===!1&&(l+=" DISABLED"),o.effects?.length&&(l+=` effects[${o.effects.map(d=>d.name??d.kind).join(", ")}]`);let u=o.metadata?.conform_flags;u?.length&&(l+=`
|
|
119
|
+
\u2691 ${u.join(`
|
|
120
|
+
\u2691 `)}`),i.push(l)}}}return i.join(`
|
|
121
|
+
`)}function Kte(e){let t=new Set;for(let r of e.timelines)for(let i of r.tracks)for(let n of i.items)n.media_reference_id&&t.add(n.media_reference_id);return(e.media_references??[]).map(r=>{let i=r.streams?.find(n=>n.kind==="video");return`- ${r.id} [${r.kind}${r.binding_state==="linked"?", linked":", unbound"}${t.has(r.id)?"":", unused"}] ${r.target_url??"(no path)"}${r.reel_name?` reel "${r.reel_name}"`:""}${r.source_timecode?` TC ${r.source_timecode}`:""}${r.source_resolution_w?` ${r.source_resolution_w}x${r.source_resolution_h}`:""}${r.source_fps?` ${nm(r.source_fps)} fps`:""}${i?.codec?` ${i.codec}`:""}${r.declared_duration?` dur ${r.declared_duration.value} fr`:""}${r.binding_state!=="linked"&&r.coverage_reason?`
|
|
122
|
+
\u26A0 ${r.coverage_reason}`:""}`}).join(`
|
|
123
|
+
`)}function Aw(e){return(e.markers??[]).filter(t=>t.kind==="conform_issue").map(t=>({note:t.note??"",frame:Number(t.time?.value??0)}))}function Ate(e){let t=Aw(e).length;for(let r of e.tracks)for(let i of r.items)t+=(i.metadata?.conform_flags??[]).length;return t}function Ute(e){let t=[];for(let r of e.timelines){for(let i of r.tracks)for(let n of i.items){let a=n.metadata?.conform_flags;for(let o of a??[])t.push(`- ${r.id}/${n.id} "${n.name??""}": ${o}`)}for(let i of Aw(r))t.push(`- ${r.id} @ ${tc(i.frame,r)}: ${i.note}`)}return t.length?t.join(`
|
|
124
|
+
`):"(no conform flags)"}var _4=Object.keys(mm);function Lw(e,t,r){let i=g9(t);if(!i)throw new Error(`unknown operation '${t}'; known: ${_4.join(", ")}`);return i(e,r)}function Yte(e,t,r,i){let n=[...e.media_references??[]],a=(f,p)=>!!f.target_url&&f.target_url===p.target_url&&(f.source_timecode??null)===(p.source_timecode??null),o=[...e.timelines];for(let f of t){let p=structuredClone(f.session),v=new Map;for(let b of p.media_references??[]){let g=n.find(y=>a(y,b));if(g){v.set(b.id,g.id);continue}v.set(b.id,`${f.id}/${b.id}`),n.push({...b,id:`${f.id}/${b.id}`})}let h=new Set(p.timelines.map(b=>b.id));for(let b of p.timelines){b.id=`${f.id}/${b.id}`;for(let g of b.tracks)for(let y of g.items)y.media_reference_id&&(y.media_reference_id=v.get(y.media_reference_id)??y.media_reference_id),y.nested_timeline_id&&h.has(y.nested_timeline_id)&&(y.nested_timeline_id=`${f.id}/${y.nested_timeline_id}`);o.push(b)}}let s={...e,timelines:o,media_references:n},c=o.length,l=Lw(s,r,i),u=s.timelines.slice(c),d=new Set((e.media_references??[]).map(f=>f.id)),m=new Set([...u,...e.timelines].flatMap(f=>f.tracks.flatMap(p=>p.items.map(v=>v.media_reference_id))));for(let f of n)m.has(f.id)&&!d.has(f.id)&&(e.media_references??=[]).push(f);return u.forEach((f,p)=>f.timeline_index=e.timelines.length+p),e.timelines.push(...u),l}function HR(e){let t=e.trim().toLowerCase(),r=vc[t]??t;if(!vm.includes(r))throw new Error(`unknown target '${e}'; valid: ${vm.filter(i=>!z9.includes(i)).join(", ")} (aliases: ${Object.keys(vc).join(", ")})`);return r}async function DR(e,t,r,i){let n=HR(t),a=await s0(n,e);U4(a.serverSession,i);let o=typeof a.body=="string"?new TextEncoder().encode(a.body):a.body,s=(e.timelines.find(m=>m.kind==="primary")??e.timelines[0])?.name?.trim(),c=s?s.replace(/[\\/:*?"<>|\x00-\x1f]+/g,"_").slice(0,120):"",l=c?a.filenameSuggestion.replace(/^[^.]+/,c):a.filenameSuggestion,u=r;if(!u)u=$(Be(i),l);else if(/[\\/]$/.test(u))await Ce(u),u=$(u,l);else try{(await Ii(u)).isDirectory&&(u=$(u,l))}catch{}let d=a.issues??[];if(n==="finalcut-fcpxmld"){let m=c1(o),f=u.toLowerCase().endsWith(".fcpxmld.zip")?Be(u):u.toLowerCase().endsWith(".fcpxmld")?Be(u):u,p="",v=0;for(let[h,b]of Object.entries(m)){if(h.endsWith("/"))continue;let g=u.toLowerCase().endsWith(".fcpxmld")?$(Q(u),...h.split("/").slice(1)):h,y=$(f,g);await Ce(Be(y)),await Ci(y,b),p=$(f,g.split("/")[0]),v+=b.byteLength}return{path:p,bytes:v,issues:d}}return await Ii(u).then(()=>!0,()=>!1)&&d.push({severity:"warning",code:"overwrote-existing",message:`${Q(u)} already existed and was overwritten`}),await Ci(u,o),{path:u,bytes:o.byteLength,issues:d}}async function Bte(e,t,r,i){let n=C9(t);if(!n)throw new Error(`unknown destination ${t} (one of ${Yi.map(u=>u.id).join(", ")})`);let a=$(r??Be(i),n.folder);await Ce(a);let o=n.id==="protools"?await m0(e,a):null;o&&(e=o.session),e={...e,id:e.id??crypto.randomUUID()};let s=[];for(let u of Pm(n)){let d=await DR(e,u.target,a,i);o?.lines.length&&d.issues.push({severity:"info",code:"protools-audio-extracted",message:`Sound of camera files written as WAV in Audio Files/: ${o.lines.join("; ")}`});for(let m of o?.skipped??[])d.issues.push({severity:"warning",code:"protools-audio-not-extracted",message:`Not written as WAV: ${m}`});s.push({...d,target:u.target})}let c=(e.timelines.find(u=>u.kind==="primary")??e.timelines[0])?.name?.trim(),l=J9(n,s.map(u=>({file:[n.primary,n.fallback].find(d=>d?.target===u.target),filename:Q(u.path),issues:u.issues})),c);return await Ci($(a,"README.txt"),new TextEncoder().encode(l)),{folder:a,files:s,pending:n.fallback?.status==="pending"?n.fallback.label:null}}function Qte(){return[`read (any of): ${Q4.join(", ")} \u2014 .aaf .avb .prproj .drt .fcpxml/.fcpxmld .xml(FCP7/xmeml) .otio, flame archive (pass format=flame)`,`destinations (pick the host; each delivers its native file + fallback): ${Yi.map(e=>`${e.id} = ${Pm(e).map(t=>t.target).join(" + ")}${e.fallback?.status==="pending"?` (${e.fallback.label} pending)`:""}`).join("; ")}`,`write first-class: ${y9.join(", ")}`,`write beta: ${w9.join(", ")}`,`write deprecated (still available): ${x9.join(", ")}`,`aliases: ${Object.entries(vc).map(([e,t])=>`${e}\u2192${t}`).join(", ")}`,`edit operations: ${_4.join(", ")}`,"Loss report: timeline_write returns per-target capability issues (what the target host cannot carry)."].join(`
|
|
125
|
+
`)}async function _te(e){let t=e.media_references??[],r=t.filter(n=>n.binding_state!=="linked").map(n=>`- ${n.id} ${Q(n.target_url??n.reel_name??"")}: ${n.coverage_reason??"no file matched yet"}`),i=await zm();return["match criteria usable on this timeline:",E9(e),`unresolved (${r.length} of ${t.length}):`,...r.length?r:[" (none)"],`remembered locations: ${i.length?i.join(", "):"(none)"}`].join(`
|
|
126
|
+
`)}async function $te(e,t,r,i){let n=new Map((e.media_references??[]).map(m=>[m.id,m])),a=new Map;for(let m of e.timelines)for(let f of m.tracks)for(let p of f.items)p.kind!=="clip"||!p.media_reference_id||!p.source_range||(a.get(p.media_reference_id)??a.set(p.media_reference_id,[]).get(p.media_reference_id)).push(p);let o=[],s=[],c=[],l=[];for(let[m,f]of a){let p=n.get(m),v=p?.local_path??p?.target_url??null;if(!p||!v){s.push(`${m}: no path`);continue}if(i.only_linked&&p.binding_state!=="linked"){s.push(`${m} ${Q(v)}: not linked (run timeline_relink first, or only_linked=false)`);continue}if(!await Ht(v)){s.push(`${m} ${v}: file not found on this machine`);continue}if(!w1.has(rt(v).toLowerCase())){s.push(`${m} ${Q(v)}: unsupported container`);continue}try{let h=await k1(v,f,r,t),b=f[0].source_range.start.rate||p.source_fps||24,g=p.source_timecode?Te(p.source_timecode,b)??0:0;for(let y of h.outputs)if(o.push(y),!(!y.island||(y.part??1)!==1))for(let x of f){let z=x.source_range.start.value;z<y.island.first_frame||z>y.island.last_frame||c.push({source_path:v,source_in:z,render_path:y.path,render_frames:y.island.last_frame-y.island.first_frame+1,lead_handle:z-y.island.first_frame,rate:b,render_start_tc:p.source_timecode?Me(g+y.island.first_frame,b):void 0})}l.push(`- ${Q(v)} \u2192 ${h.outputs.map(y=>`${Q(Be(y.path))===Q(t)?Q(y.path):`${Q(Be(y.path))}/${Q(y.path)}`} (${y.island?`${y.island.last_frame-y.island.first_frame+1} fr`:""}${y.part?` part ${y.part}`:""})`).join(", ")}`)}catch(h){s.push(`${m} ${Q(v)}: ${h.message}`)}}let u="";if(i.relink&&c.length){let m=L9(e,c);u=`
|
|
127
|
+
relinked ${m.matched} references to the trims (${m.unmatched} unmatched)`}return{text:[`consolidated ${o.length} output file(s) from ${c.length} source(s) into ${t} with ${r}-frame handles`,...l,...s.length?[`skipped ${s.length}:`,...s.map(m=>` - ${m}`)]:[]].join(`
|
|
128
|
+
`)+u,outputs:o,skipped:s}}async function ere(e,t){let r=Bw(),i=rc(new URL("./judge_local.py",import.meta.url)),n=await r1(r,[i,e,t]),a=n.stderr.trim();if(!n.success)throw new Error(`judge failed: ${a.split(`
|
|
129
|
+
`).slice(-4).join(" | ")}`);let o=JSON.parse(n.stdout.trim().split(`
|
|
130
|
+
`).pop()),s=o.tiers??{},c=[`verdict: ${o.verdict} (${o.source_format} \u2192 ${o.target_format})`,...(o.reasons??[]).map(m=>`- ${m}`),...Object.entries(s).map(([m,f])=>`${m}: ${f?.tally?Object.entries(f.tally).map(([p,v])=>`${p} ${v}`).join(", "):"not run"}${f?.notes?.length?`
|
|
131
|
+
notes: ${f.notes.join("; ")}`:""}`)],l=o.clips_with_issues??[];l.length&&c.push(`clips with issues (${l.length}):`,...l.slice(0,20).map(m=>`- ${m.track??"?"} @${m.rec??"?"} ${m.name??""}: ${m.issues.map(f=>`${f.check}: ${f.reason}`).join("; ").slice(0,300)}`));let u=o.clips?.not_checked??{},d=Object.entries(u).flatMap(([m,f])=>Object.entries(f).map(([p,v])=>`- ${m}: ${v}\xD7 ${p}`));return d.length&&c.push("not checked:",...d),c.join(`
|
|
132
|
+
`)}export{FG as a,Oe as b,C as c,Ln as d,yV as e,k as f,Su as g,Xu as h,NV as i,OV as j,ue as k,e2 as l,_d as m,jl as n,xx as o,wx as p,Tx as q,Li as r,ql as s,q6 as t,M6 as u,Po as v,D6 as w,qx as x,Hx as y,Tf as z,J6 as A,Hl as B,Vi as C,tT as D,sT as E,Il as F,Xf as G,Cv as H,M0 as I,_R as J,nm as K,Qe as L,E_ as M,XH as N,jT as O,$_ as P,e$ as Q,t$ as R,gr as S,o$ as T,nD as U,c$ as V,u$ as W,P$ as X,k$ as Y,T$ as Z,ET as _,wD as $,N$ as aa,O$ as ba,Pw as ca,S$ as da,X$ as ea,j$ as fa,W$ as ga,L$ as ha,V$ as ia,q$ as ja,Z$ as ka,M$ as la,H$ as ma,D$ as na,JT as oa,R$ as pa,F$ as qa,I$ as ra,E$ as sa,OD as ta,C$ as ua,J$ as va,GT as wa,G$ as xa,K$ as ya,A$ as za,U$ as Aa,Y$ as Ba,B$ as Ca,kw as Da,KT as Ea,AT as Fa,UT as Ga,_$ as Ha,C9 as Ia,eee as Ja,tee as Ka,Al as La,QT as Ma,$T as Na,nee as Oa,iee as Pa,e4 as Qa,oee as Ra,wN as Sa,mm as Ta,g9 as Ua,hm as Va,KI as Wa,mO as Xa,pO as Ya,gm as Za,ym as _a,pE as $a,vE as ab,NE as bb,OE as cb,D9 as db,SE as eb,TO as fb,OO as gb,RE as hb,FE as ib,IE as jb,EE as kb,CE as lb,JE as mb,GE as nb,KE as ob,zm as pb,AE as qb,UE as rb,dW as sb,gJ as tb,fW as ub,mi as vb,s0 as wb,yJ as xb,LJ as yb,VJ as zb,OW as Ab,On as Bb,vi as Cb,RJ as Db,FJ as Eb,Ov as Fb,mu as Gb,S0 as Hb,IJ as Ib,X0 as Jb,UJ as Kb,YJ as Lb,BJ as Mb,QJ as Nb,_J as Ob,q0 as Pb,$J as Qb,Gee as Rb,Cf as Sb,Ef as Tb,Kee as Ub,Aee as Vb,Uee as Wb,Yee as Xb,Bee as Yb,Qee as Zb,_ee as _b,$ee as $b,ite as ac,Zo as bc,mte as cc,pte as dc,vte as ec,hte as fc,bte as gc,gte as hc,yte as ic,xte as jc,wte as kc,zte as lc,Pte as mc,kte as nc,Tte as oc,Q4 as pc,qR as qc,Cte as rc,Jte as sc,Gte as tc,Kte as uc,Ate as vc,Ute as wc,_4 as xc,Lw as yc,Yte as zc,HR as Ac,DR as Bc,Bte as Cc,Qte as Dc,_te as Ec,$te as Fc,ere as Gc,qw as Hc,y4 as Ic,x4 as Jc,Ww as Kc,f4 as Lc,gee as Mc,YD as Nc,yee as Oc,xee as Pc,Ul as Qc,BD as Rc,wee as Sc,zee as Tc,Pee as Uc,S4 as Vc,Fee as Wc};
|