@superglue/cli 1.1.238 → 1.1.239

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";var S6=Object.create;var $h=Object.defineProperty;var w6=Object.getOwnPropertyDescriptor;var _6=Object.getOwnPropertyNames;var B6=Object.getPrototypeOf,v6=Object.prototype.hasOwnProperty;var ft=(t,e)=>()=>(t&&(e=t(t=0)),e);var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),_D=(t,e)=>{for(var r in e)$h(t,r,{get:e[r],enumerable:!0})},BD=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _6(e))!v6.call(t,i)&&i!==r&&$h(t,i,{get:()=>e[i],enumerable:!(n=w6(e,i))||n.enumerable});return t};var Qe=(t,e,r)=>(r=t!=null?S6(B6(t)):{},BD(e||!t||!t.__esModule?$h(r,"default",{value:t,enumerable:!0}):r,t)),PC=t=>BD($h({},"__esModule",{value:!0}),t);var $C=y(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.MAX_FOLLOW_UPS=qn.FOLLOW_UPS_PREFIX=void 0;qn.splitFollowUps=LC;qn.getMessageFollowUps=T6;qn.getPartDisplayText=D6;qn.FOLLOW_UPS_PREFIX="Follow-ups:";qn.MAX_FOLLOW_UPS=3;var Q6=/\[([^[\]\n]+)\]/g;function LC(t,{streaming:e=!1}={}){let r=t.trimEnd(),n=r.lastIndexOf(`
3
- `)+1,i=r.slice(n);return i.startsWith(qn.FOLLOW_UPS_PREFIX)||e&&i.length>0&&qn.FOLLOW_UPS_PREFIX.startsWith(i)?{reply:r.slice(0,n).trimEnd(),followUps:[...i.matchAll(Q6)].map(s=>s[1].trim()).filter(Boolean).slice(0,qn.MAX_FOLLOW_UPS)}:{reply:t,followUps:[]}}function T6(t){if(t.role!=="assistant")return[];let e=[...t.parts??[]].reverse().find(r=>r.type==="content"&&r.content?.trim());return LC(e?.content??t.content).followUps}function D6(t,e){return t.role!=="assistant"?e:LC(e,{streaming:!!t.isStreaming}).reply}});var hn=y(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.PLAYBOOK_LIMITS=M.MCP_SERVER_AUTH_MODES=M.OAUTH_POPUP_CLOSED_MESSAGE=M.OAUTH_CONTINUATION_REASON_MAX_CHARS=M.TEAMS_CHANNEL_STARTER_PROMPTS=M.AGENT_REQUEST_BUSY_STATUSES=M.NEXT_STEP_LINK_ACTIONS=M.NEXT_STEP_LINK_PARAMS=M.NEXT_STEP_STATUSES=M.AGENT_SESSION_TEAMS_METADATA_KEY=M.AGENT_SESSION_PREPARATION_METADATA_KEY=M.AGENT_SESSION_USER_OPENED_METADATA_KEY=M.AGENT_SESSION_RESOURCE_KINDS=M.AGENT_MESSAGE_SCHEMA_VERSION=M.AGENT_APPROVAL_MODES=M.ConfirmationAction=M.LOADABLE_MARKDOWN_NAMES=M.SKILL_REFERENCE_NAMES=M.SKILL_BODY_NAMES=M.AGENT_CHECKLIST_MAX_LABEL_CHARS=M.AGENT_CHECKLIST_MAX_ITEMS=M.AGENT_CHECKLIST_MIN_ITEMS=M.DYNAMIC_AGENT_TOOLS=M.AGENT_TOOLS=M.AGENT_NATIVE_TOOLS=M.MEMORY_AGENT_TYPES=M.PLAYGROUND_TOOL_DRAFT_ID=M.AgentType=M.FileStatus=M.MAX_BULK_RESOURCE_SHARE_OPERATIONS=M.MAX_BULK_MUTATION_IDS=M.SERVER_MANAGED_CONFIG_FIELDS=M.RunExecutionKind=M.RequestSource=M.RunStatus=M.CredentialMode=M.UpsertMode=M.LogLevel=M.PaginationType=M.DecompressionMethod=M.AuthType=M.FileType=M.CacheMode=M.HttpMethod=M.SupportedFileType=M.AGENT_SESSION_BACKGROUND_JOBS_METADATA_KEY=M.AGENT_BACKGROUND_JOB_STATUSES=M.RUN_COMMAND_EFFECT_KINDS=M.CONNECTION_PROTOCOLS=M.TURN_CONTEXT_BLOCK_TYPES=void 0;M.isRequestConfig=k6;M.isTransformConfig=R6;M.isAgentSessionOpenedByUser=jD;M.isAgentSessionHiddenUntilOpened=N6;M.TURN_CONTEXT_BLOCK_TYPES=["connections","playbooks","files","project","background-job"];M.CONNECTION_PROTOCOLS=["http","postgres","mssql","redis","mongodb","sftp","smb","odbc","script","suitecloud"];M.RUN_COMMAND_EFFECT_KINDS=["tool","tool_state","system","connection","project","schedule","session","briefing","mcp_server","role","playbook","share","org_settings","design_system","file","memory","visual","checklist"];M.AGENT_BACKGROUND_JOB_STATUSES=["running","completed","failed","stopped","lost"];M.AGENT_SESSION_BACKGROUND_JOBS_METADATA_KEY="backgroundJobs";var vD;(function(t){t.JSON="JSON",t.CSV="CSV",t.XML="XML",t.HTML="HTML",t.YAML="YAML",t.EXCEL="EXCEL",t.PDF="PDF",t.DOCX="DOCX",t.PPTX="PPTX",t.ZIP="ZIP",t.GZIP="GZIP",t.QBM="QBM",t.BINARY="BINARY",t.RAW="RAW",t.AUTO="AUTO"})(vD||(M.SupportedFileType=vD={}));var QD;(function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.PATCH="PATCH",t.HEAD="HEAD",t.OPTIONS="OPTIONS"})(QD||(M.HttpMethod=QD={}));var TD;(function(t){t.ENABLED="ENABLED",t.READONLY="READONLY",t.WRITEONLY="WRITEONLY",t.DISABLED="DISABLED"})(TD||(M.CacheMode=TD={}));var DD;(function(t){t.CSV="CSV",t.JSON="JSON",t.XML="XML",t.YAML="YAML",t.EXCEL="EXCEL",t.HTML="HTML",t.PDF="PDF",t.DOCX="DOCX",t.PPTX="PPTX",t.ZIP="ZIP",t.BINARY="BINARY",t.RAW="RAW",t.AUTO="AUTO"})(DD||(M.FileType=DD={}));var kD;(function(t){t.NONE="NONE",t.OAUTH2="OAUTH2",t.HEADER="HEADER",t.QUERY_PARAM="QUERY_PARAM"})(kD||(M.AuthType=kD={}));var RD;(function(t){t.GZIP="GZIP",t.DEFLATE="DEFLATE",t.NONE="NONE",t.AUTO="AUTO",t.ZIP="ZIP"})(RD||(M.DecompressionMethod=RD={}));var ND;(function(t){t.OFFSET_BASED="OFFSET_BASED",t.PAGE_BASED="PAGE_BASED",t.CURSOR_BASED="CURSOR_BASED",t.DISABLED="DISABLED"})(ND||(M.PaginationType=ND={}));var OD;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR"})(OD||(M.LogLevel=OD={}));var xD;(function(t){t.CREATE="CREATE",t.UPDATE="UPDATE",t.UPSERT="UPSERT"})(xD||(M.UpsertMode=xD={}));var UD;(function(t){t.MERGE="MERGE",t.REPLACE="REPLACE"})(UD||(M.CredentialMode=UD={}));var MD;(function(t){t.RUNNING="RUNNING",t.SUCCESS="SUCCESS",t.FAILED="FAILED",t.ABORTED="ABORTED"})(MD||(M.RunStatus=MD={}));var PD;(function(t){t.API="api",t.FRONTEND="frontend",t.AGENT="agent",t.SCHEDULER="scheduler",t.MCP="mcp",t.TOOL_CHAIN="tool-chain",t.WEBHOOK="webhook",t.CLI="cli"})(PD||(M.RequestSource=PD={}));var LD;(function(t){t.FULL="full",t.DRAFT="draft",t.SINGLE_STEP="single-step"})(LD||(M.RunExecutionKind=LD={}));M.SERVER_MANAGED_CONFIG_FIELDS=["version","createdByUserId","createdAt","updatedAt","lastUsedAt"];M.MAX_BULK_MUTATION_IDS=100;M.MAX_BULK_RESOURCE_SHARE_OPERATIONS=1e3;function k6(t){return!t||typeof t!="object"?!1:t.type==="request"||!("type"in t)||t.type===void 0}function R6(t){return t?.type==="transform"}var $D;(function(t){t.PENDING="PENDING",t.UPLOADING="UPLOADING",t.PROCESSING="PROCESSING",t.COMPLETED="COMPLETED",t.FAILED="FAILED"})($D||(M.FileStatus=$D={}));var ys;(function(t){t.MAIN="main",t.PLAYGROUND="playground",t.PLAYBOOK_PLAYGROUND="playbook_playground",t.FILE_PLAYGROUND="file_playground",t.ACCESS_RULES="access_rules",t.CONNECTION_PLAYGROUND="connection_playground"})(ys||(M.AgentType=ys={}));M.PLAYGROUND_TOOL_DRAFT_ID="@playground-draft";M.MEMORY_AGENT_TYPES=[ys.MAIN];M.AGENT_NATIVE_TOOLS=["run_command","load_skill","connect","setup_gateway","setup_oauth_app","request_sign_off"];M.AGENT_TOOLS={[ys.MAIN]:[...M.AGENT_NATIVE_TOOLS],[ys.PLAYGROUND]:[...M.AGENT_NATIVE_TOOLS],[ys.PLAYBOOK_PLAYGROUND]:[...M.AGENT_NATIVE_TOOLS],[ys.FILE_PLAYGROUND]:[...M.AGENT_NATIVE_TOOLS],[ys.ACCESS_RULES]:[...M.AGENT_NATIVE_TOOLS],[ys.CONNECTION_PLAYGROUND]:[...M.AGENT_NATIVE_TOOLS]};M.DYNAMIC_AGENT_TOOLS=["web_search"];M.AGENT_CHECKLIST_MIN_ITEMS=4;M.AGENT_CHECKLIST_MAX_ITEMS=15;M.AGENT_CHECKLIST_MAX_LABEL_CHARS=120;M.SKILL_BODY_NAMES=["superglue-info","tools","connections","access-management","tool-deployment","notifications","artifacts","playbooks","projects","superglue-brain","email","workspace-apps","meetings","design-system","demos","chat-visuals","acumatica","netsuite","sage-intacct","microsoft-dynamics"];M.SKILL_REFERENCE_NAMES=["http","graphql","postgres","mssql","odbc","redis","mongodb","sftp-smb","suitecloud","project-preparation","acumatica-configuration","microsoft-dynamics-dependencies","power-automate","sage-intacct-configuration","quickbooks-desktop-files","office-files","tool-files","tunnel-handling","artifacts-html","artifacts-excel"];M.LOADABLE_MARKDOWN_NAMES=[...M.SKILL_BODY_NAMES,...M.SKILL_REFERENCE_NAMES];var FD;(function(t){t.CONFIRMED="confirmed",t.DECLINED="declined",t.OAUTH_SUCCESS="oauth_success",t.OAUTH_FAILURE="oauth_failure"})(FD||(M.ConfirmationAction=FD={}));M.AGENT_APPROVAL_MODES=["ask","act"];M.AGENT_MESSAGE_SCHEMA_VERSION=1;M.AGENT_SESSION_RESOURCE_KINDS=["tool","system","playbook","file","briefing","credential"];M.AGENT_SESSION_USER_OPENED_METADATA_KEY="userOpened";M.AGENT_SESSION_PREPARATION_METADATA_KEY="taskPreparation";M.AGENT_SESSION_TEAMS_METADATA_KEY="teams";function jD(t){return t[M.AGENT_SESSION_USER_OPENED_METADATA_KEY]===!0}function N6(t){return(t.resourceBinding?.kind==="briefing"||t.metadata[M.AGENT_SESSION_PREPARATION_METADATA_KEY]===!0)&&!jD(t.metadata)}M.NEXT_STEP_STATUSES=["open","started","done"];M.NEXT_STEP_LINK_PARAMS={id:"nextStep",action:"nextStepAction"};M.NEXT_STEP_LINK_ACTIONS=["start","done"];M.AGENT_REQUEST_BUSY_STATUSES=["queued","claimed","running","cancelling"];M.TEAMS_CHANNEL_STARTER_PROMPTS=[{title:"What is the project status?",description:"Progress, blockers, owners and dates"},{title:"What is waiting on me?",description:"Ask superglue anything in plain words"},{title:"Recap the last meeting",description:"Recap a meeting and update the tasks"}];M.OAUTH_CONTINUATION_REASON_MAX_CHARS=500;M.OAUTH_POPUP_CLOSED_MESSAGE="OAuth authentication did not complete.";M.MCP_SERVER_AUTH_MODES=["oauth","creator_api_key"];M.PLAYBOOK_LIMITS={name:120,whenToRun:500,instructions:1e5,compiledRender:512e3}});var lc=y(_r=>{"use strict";var zD;Object.defineProperty(_r,"__esModule",{value:!0});_r.globalConfig=_r.$ZodEncodeError=_r.$ZodAsyncError=_r.$brand=_r.NEVER=void 0;_r.$constructor=O6;_r.config=x6;_r.NEVER=Object.freeze({status:"aborted"});function O6(t,e,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,c);let l=s.prototype,u=Object.keys(l);for(let d=0;d<u.length;d++){let A=u[d];A in a||(a[A]=l[A].bind(a))}}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:t});function s(a){var c;let l=r?.Parent?new o:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}_r.$brand=Symbol("zod_brand");var FC=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};_r.$ZodAsyncError=FC;var jC=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};_r.$ZodEncodeError=jC;(zD=globalThis).__zod_globalConfig??(zD.__zod_globalConfig={});_r.globalConfig=globalThis.__zod_globalConfig;function x6(t){return t&&Object.assign(_r.globalConfig,t),_r.globalConfig}});var pe=y(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.Class=ne.BIGINT_FORMAT_RANGES=ne.NUMBER_FORMAT_RANGES=ne.primitiveTypes=ne.propertyKeyTypes=ne.getParsedType=ne.allowsEval=ne.captureStackTrace=void 0;ne.assertEqual=M6;ne.assertNotEqual=P6;ne.assertIs=L6;ne.assertNever=$6;ne.assert=F6;ne.getEnumValues=j6;ne.joinValues=z6;ne.jsonStringifyReplacer=q6;ne.cached=HD;ne.nullish=H6;ne.cleanRegex=G6;ne.floatSafeRemainder=Y6;ne.defineLazy=V6;ne.objectClone=W6;ne.assignProp=sa;ne.mergeDefs=Es;ne.cloneDef=J6;ne.getElementAtPath=Z6;ne.promiseAllObject=K6;ne.randomString=X6;ne.esc=e3;ne.slugify=t3;ne.isObject=zC;ne.isPlainObject=Fh;ne.shallowClone=r3;ne.numKeys=n3;ne.escapeRegex=o3;ne.clone=aa;ne.normalizeParams=s3;ne.createTransparentProxy=a3;ne.stringifyPrimitive=GD;ne.optionalKeys=c3;ne.pick=l3;ne.omit=u3;ne.extend=d3;ne.safeExtend=A3;ne.merge=p3;ne.partial=h3;ne.required=f3;ne.aborted=g3;ne.explicitlyAborted=m3;ne.prefixIssues=y3;ne.unwrapMessage=Fd;ne.finalizeIssue=E3;ne.getSizableOrigin=I3;ne.getLengthableOrigin=C3;ne.parsedType=b3;ne.issue=S3;ne.cleanEnum=w3;ne.base64ToUint8Array=YD;ne.uint8ArrayToBase64=VD;ne.base64urlToUint8Array=_3;ne.uint8ArrayToBase64url=B3;ne.hexToUint8Array=v3;ne.uint8ArrayToHex=Q3;var U6=lc();function M6(t){return t}function P6(t){return t}function L6(t){}function $6(t){throw new Error("Unexpected value in exhaustive check")}function F6(t){}function j6(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}function z6(t,e="|"){return t.map(r=>GD(r)).join(e)}function q6(t,e){return typeof e=="bigint"?e.toString():e}function HD(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function H6(t){return t==null}function G6(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Y6(t,e){let r=t/e,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}var qD=Symbol("evaluating");function V6(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==qD)return n===void 0&&(n=qD,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function W6(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function sa(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Es(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function J6(t){return Es(t._zod.def)}function Z6(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function K6(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let o=0;o<e.length;o++)i[e[o]]=n[o];return i})}function X6(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function e3(t){return JSON.stringify(t)}function t3(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}ne.captureStackTrace="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function zC(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}ne.allowsEval=HD(()=>{if(U6.globalConfig.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function Fh(t){if(zC(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(zC(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function r3(t){return Fh(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function n3(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var i3=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}};ne.getParsedType=i3;ne.propertyKeyTypes=new Set(["string","number","symbol"]);ne.primitiveTypes=new Set(["string","number","bigint","boolean","symbol","undefined"]);function o3(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function aa(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function s3(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function a3(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,o){return e??(e=t()),Reflect.set(e,n,i,o)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function GD(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function c3(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}ne.NUMBER_FORMAT_RANGES={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]};ne.BIGINT_FORMAT_RANGES={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function l3(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Es(t._zod.def,{get shape(){let s={};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(s[a]=r.shape[a])}return sa(this,"shape",s),s},checks:[]});return aa(t,o)}function u3(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Es(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete s[a]}return sa(this,"shape",s),s},checks:[]});return aa(t,o)}function d3(t,e){if(!Fh(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Es(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return sa(this,"shape",o),o}});return aa(t,i)}function A3(t,e){if(!Fh(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Es(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return sa(this,"shape",n),n}});return aa(t,r)}function p3(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Es(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return sa(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return aa(t,r)}function h3(t,e,r){let i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Es(e._zod.def,{get shape(){let a=e._zod.def.shape,c={...a};if(r)for(let l in r){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=t?new t({type:"optional",innerType:a[l]}):a[l])}else for(let l in a)c[l]=t?new t({type:"optional",innerType:a[l]}):a[l];return sa(this,"shape",c),c},checks:[]});return aa(e,s)}function f3(t,e,r){let n=Es(e._zod.def,{get shape(){let i=e._zod.def.shape,o={...i};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:i[s]}))}else for(let s in i)o[s]=new t({type:"nonoptional",innerType:i[s]});return sa(this,"shape",o),o}});return aa(e,n)}function g3(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function m3(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function y3(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Fd(t){return typeof t=="string"?t:t?.message}function E3(t,e,r){let n=t.message?t.message:Fd(t.inst?._zod.def?.error?.(t))??Fd(e?.error?.(t))??Fd(r.customError?.(t))??Fd(r.localeError?.(t))??"Invalid input",{inst:i,continue:o,input:s,...a}=t;return a.path??(a.path=[]),a.message=n,e?.reportInput&&(a.input=s),a}function I3(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function C3(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function b3(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function S3(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function w3(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function YD(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function VD(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function _3(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return YD(e+r)}function B3(t){return VD(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function v3(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function Q3(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var qC=class{constructor(...e){}};ne.Class=qC});var HC=y(Ir=>{"use strict";var T3=Ir&&Ir.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),D3=Ir&&Ir.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),k3=Ir&&Ir.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&T3(e,t,r);return D3(e,t),e};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.$ZodRealError=Ir.$ZodError=void 0;Ir.flattenError=N3;Ir.formatError=O3;Ir.treeifyError=x3;Ir.toDotPath=ZD;Ir.prettifyError=U3;var WD=lc(),R3=k3(pe()),JD=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,R3.jsonStringifyReplacer,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})};Ir.$ZodError=(0,WD.$constructor)("$ZodError",JD);Ir.$ZodRealError=(0,WD.$constructor)("$ZodError",JD,{Parent:Error});function N3(t,e=r=>r.message){let r={},n=[];for(let i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function O3(t,e=r=>r.message){let r={_errors:[]},n=(i,o=[])=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)r._errors.push(e(s));else{let c=r,l=0;for(;l<a.length;){let u=a[l];l===a.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(e(s))):c[u]=c[u]||{_errors:[]},c=c[u],l++}}}};return n(t),r}function x3(t,e=r=>r.message){let r={errors:[]},n=(i,o=[])=>{var s,a;for(let c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>n({issues:l},[...o,...c.path]));else if(c.code==="invalid_key")n({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")n({issues:c.issues},[...o,...c.path]);else{let l=[...o,...c.path];if(l.length===0){r.errors.push(e(c));continue}let u=r,d=0;for(;d<l.length;){let A=l[d],p=d===l.length-1;typeof A=="string"?(u.properties??(u.properties={}),(s=u.properties)[A]??(s[A]={errors:[]}),u=u.properties[A]):(u.items??(u.items=[]),(a=u.items)[A]??(a[A]={errors:[]}),u=u.items[A]),p&&u.errors.push(e(c)),d++}}};return n(t),r}function ZD(t){let e=[],r=t.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function U3(t){let e=[],r=[...t.issues].sort((n,i)=>(n.path??[]).length-(i.path??[]).length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${ZD(n.path)}`);return e.join(`
3
+ `)+1,i=r.slice(n);return i.startsWith(qn.FOLLOW_UPS_PREFIX)||e&&i.length>0&&qn.FOLLOW_UPS_PREFIX.startsWith(i)?{reply:r.slice(0,n).trimEnd(),followUps:[...i.matchAll(Q6)].map(s=>s[1].trim()).filter(Boolean).slice(0,qn.MAX_FOLLOW_UPS)}:{reply:t,followUps:[]}}function T6(t){if(t.role!=="assistant")return[];let e=[...t.parts??[]].reverse().find(r=>r.type==="content"&&r.content?.trim());return LC(e?.content??t.content).followUps}function D6(t,e){return t.role!=="assistant"?e:LC(e,{streaming:!!t.isStreaming}).reply}});var hn=y(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.PLAYBOOK_LIMITS=M.MCP_SERVER_AUTH_MODES=M.OAUTH_POPUP_CLOSED_MESSAGE=M.OAUTH_CONTINUATION_REASON_MAX_CHARS=M.TEAMS_CHANNEL_STARTER_PROMPTS=M.AGENT_REQUEST_BUSY_STATUSES=M.NEXT_STEP_LINK_ACTIONS=M.NEXT_STEP_LINK_PARAMS=M.NEXT_STEP_STATUSES=M.AGENT_SESSION_TEAMS_METADATA_KEY=M.AGENT_SESSION_PREPARATION_METADATA_KEY=M.AGENT_SESSION_USER_OPENED_METADATA_KEY=M.AGENT_SESSION_RESOURCE_KINDS=M.AGENT_MESSAGE_SCHEMA_VERSION=M.AGENT_APPROVAL_MODES=M.ConfirmationAction=M.LOADABLE_MARKDOWN_NAMES=M.SKILL_REFERENCE_NAMES=M.SKILL_BODY_NAMES=M.AGENT_CHECKLIST_MAX_LABEL_CHARS=M.AGENT_CHECKLIST_MAX_ITEMS=M.AGENT_CHECKLIST_MIN_ITEMS=M.DYNAMIC_AGENT_TOOLS=M.AGENT_TOOLS=M.AGENT_NATIVE_TOOLS=M.MEMORY_AGENT_TYPES=M.PLAYGROUND_TOOL_DRAFT_ID=M.AgentType=M.FileStatus=M.MAX_BULK_RESOURCE_SHARE_OPERATIONS=M.MAX_BULK_MUTATION_IDS=M.SERVER_MANAGED_CONFIG_FIELDS=M.RunExecutionKind=M.RequestSource=M.RunStatus=M.CredentialMode=M.UpsertMode=M.LogLevel=M.PaginationType=M.DecompressionMethod=M.AuthType=M.FileType=M.CacheMode=M.HttpMethod=M.SupportedFileType=M.AGENT_SESSION_BACKGROUND_JOBS_METADATA_KEY=M.AGENT_BACKGROUND_JOB_STATUSES=M.RUN_COMMAND_EFFECT_KINDS=M.CONNECTION_PROTOCOLS=M.TURN_CONTEXT_BLOCK_TYPES=void 0;M.isRequestConfig=k6;M.isTransformConfig=R6;M.isAgentSessionOpenedByUser=jD;M.isAgentSessionHiddenUntilOpened=N6;M.TURN_CONTEXT_BLOCK_TYPES=["connections","playbooks","files","project","background-job"];M.CONNECTION_PROTOCOLS=["http","postgres","mssql","redis","mongodb","sftp","smb","odbc","script","suitecloud"];M.RUN_COMMAND_EFFECT_KINDS=["tool","tool_state","system","connection","project","schedule","session","briefing","mcp_server","role","playbook","share","org_settings","design_system","file","memory","visual","checklist","browser"];M.AGENT_BACKGROUND_JOB_STATUSES=["running","completed","failed","stopped","lost"];M.AGENT_SESSION_BACKGROUND_JOBS_METADATA_KEY="backgroundJobs";var vD;(function(t){t.JSON="JSON",t.CSV="CSV",t.XML="XML",t.HTML="HTML",t.YAML="YAML",t.EXCEL="EXCEL",t.PDF="PDF",t.DOCX="DOCX",t.PPTX="PPTX",t.ZIP="ZIP",t.GZIP="GZIP",t.QBM="QBM",t.BINARY="BINARY",t.RAW="RAW",t.AUTO="AUTO"})(vD||(M.SupportedFileType=vD={}));var QD;(function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.PATCH="PATCH",t.HEAD="HEAD",t.OPTIONS="OPTIONS"})(QD||(M.HttpMethod=QD={}));var TD;(function(t){t.ENABLED="ENABLED",t.READONLY="READONLY",t.WRITEONLY="WRITEONLY",t.DISABLED="DISABLED"})(TD||(M.CacheMode=TD={}));var DD;(function(t){t.CSV="CSV",t.JSON="JSON",t.XML="XML",t.YAML="YAML",t.EXCEL="EXCEL",t.HTML="HTML",t.PDF="PDF",t.DOCX="DOCX",t.PPTX="PPTX",t.ZIP="ZIP",t.BINARY="BINARY",t.RAW="RAW",t.AUTO="AUTO"})(DD||(M.FileType=DD={}));var kD;(function(t){t.NONE="NONE",t.OAUTH2="OAUTH2",t.HEADER="HEADER",t.QUERY_PARAM="QUERY_PARAM"})(kD||(M.AuthType=kD={}));var RD;(function(t){t.GZIP="GZIP",t.DEFLATE="DEFLATE",t.NONE="NONE",t.AUTO="AUTO",t.ZIP="ZIP"})(RD||(M.DecompressionMethod=RD={}));var ND;(function(t){t.OFFSET_BASED="OFFSET_BASED",t.PAGE_BASED="PAGE_BASED",t.CURSOR_BASED="CURSOR_BASED",t.DISABLED="DISABLED"})(ND||(M.PaginationType=ND={}));var OD;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR"})(OD||(M.LogLevel=OD={}));var xD;(function(t){t.CREATE="CREATE",t.UPDATE="UPDATE",t.UPSERT="UPSERT"})(xD||(M.UpsertMode=xD={}));var UD;(function(t){t.MERGE="MERGE",t.REPLACE="REPLACE"})(UD||(M.CredentialMode=UD={}));var MD;(function(t){t.RUNNING="RUNNING",t.SUCCESS="SUCCESS",t.FAILED="FAILED",t.ABORTED="ABORTED"})(MD||(M.RunStatus=MD={}));var PD;(function(t){t.API="api",t.FRONTEND="frontend",t.AGENT="agent",t.SCHEDULER="scheduler",t.MCP="mcp",t.TOOL_CHAIN="tool-chain",t.WEBHOOK="webhook",t.CLI="cli"})(PD||(M.RequestSource=PD={}));var LD;(function(t){t.FULL="full",t.DRAFT="draft",t.SINGLE_STEP="single-step"})(LD||(M.RunExecutionKind=LD={}));M.SERVER_MANAGED_CONFIG_FIELDS=["version","createdByUserId","createdAt","updatedAt","lastUsedAt"];M.MAX_BULK_MUTATION_IDS=100;M.MAX_BULK_RESOURCE_SHARE_OPERATIONS=1e3;function k6(t){return!t||typeof t!="object"?!1:t.type==="request"||!("type"in t)||t.type===void 0}function R6(t){return t?.type==="transform"}var $D;(function(t){t.PENDING="PENDING",t.UPLOADING="UPLOADING",t.PROCESSING="PROCESSING",t.COMPLETED="COMPLETED",t.FAILED="FAILED"})($D||(M.FileStatus=$D={}));var ys;(function(t){t.MAIN="main",t.PLAYGROUND="playground",t.PLAYBOOK_PLAYGROUND="playbook_playground",t.FILE_PLAYGROUND="file_playground",t.ACCESS_RULES="access_rules",t.CONNECTION_PLAYGROUND="connection_playground"})(ys||(M.AgentType=ys={}));M.PLAYGROUND_TOOL_DRAFT_ID="@playground-draft";M.MEMORY_AGENT_TYPES=[ys.MAIN];M.AGENT_NATIVE_TOOLS=["run_command","load_skill","connect","setup_gateway","setup_oauth_app","request_sign_off"];M.AGENT_TOOLS={[ys.MAIN]:[...M.AGENT_NATIVE_TOOLS],[ys.PLAYGROUND]:[...M.AGENT_NATIVE_TOOLS],[ys.PLAYBOOK_PLAYGROUND]:[...M.AGENT_NATIVE_TOOLS],[ys.FILE_PLAYGROUND]:[...M.AGENT_NATIVE_TOOLS],[ys.ACCESS_RULES]:[...M.AGENT_NATIVE_TOOLS],[ys.CONNECTION_PLAYGROUND]:[...M.AGENT_NATIVE_TOOLS]};M.DYNAMIC_AGENT_TOOLS=["web_search"];M.AGENT_CHECKLIST_MIN_ITEMS=4;M.AGENT_CHECKLIST_MAX_ITEMS=15;M.AGENT_CHECKLIST_MAX_LABEL_CHARS=120;M.SKILL_BODY_NAMES=["superglue-info","tools","connections","access-management","tool-deployment","notifications","artifacts","playbooks","projects","superglue-brain","email","workspace-apps","meetings","design-system","demos","chat-visuals","acumatica","netsuite","sage-intacct","microsoft-dynamics"];M.SKILL_REFERENCE_NAMES=["http","graphql","postgres","mssql","odbc","redis","mongodb","sftp-smb","suitecloud","project-preparation","acumatica-configuration","microsoft-dynamics-dependencies","power-automate","sage-intacct-configuration","quickbooks-desktop-files","office-files","tool-files","tunnel-handling","browser","artifacts-html","artifacts-excel"];M.LOADABLE_MARKDOWN_NAMES=[...M.SKILL_BODY_NAMES,...M.SKILL_REFERENCE_NAMES];var FD;(function(t){t.CONFIRMED="confirmed",t.DECLINED="declined",t.OAUTH_SUCCESS="oauth_success",t.OAUTH_FAILURE="oauth_failure"})(FD||(M.ConfirmationAction=FD={}));M.AGENT_APPROVAL_MODES=["ask","act"];M.AGENT_MESSAGE_SCHEMA_VERSION=1;M.AGENT_SESSION_RESOURCE_KINDS=["tool","system","playbook","file","briefing","credential"];M.AGENT_SESSION_USER_OPENED_METADATA_KEY="userOpened";M.AGENT_SESSION_PREPARATION_METADATA_KEY="taskPreparation";M.AGENT_SESSION_TEAMS_METADATA_KEY="teams";function jD(t){return t[M.AGENT_SESSION_USER_OPENED_METADATA_KEY]===!0}function N6(t){return(t.resourceBinding?.kind==="briefing"||t.metadata[M.AGENT_SESSION_PREPARATION_METADATA_KEY]===!0)&&!jD(t.metadata)}M.NEXT_STEP_STATUSES=["open","started","done"];M.NEXT_STEP_LINK_PARAMS={id:"nextStep",action:"nextStepAction"};M.NEXT_STEP_LINK_ACTIONS=["start","done"];M.AGENT_REQUEST_BUSY_STATUSES=["queued","claimed","running","cancelling"];M.TEAMS_CHANNEL_STARTER_PROMPTS=[{title:"What is the project status?",description:"Progress, blockers, owners and dates"},{title:"What is waiting on me?",description:"Ask superglue anything in plain words"},{title:"Recap the last meeting",description:"Recap a meeting and update the tasks"}];M.OAUTH_CONTINUATION_REASON_MAX_CHARS=500;M.OAUTH_POPUP_CLOSED_MESSAGE="OAuth authentication did not complete.";M.MCP_SERVER_AUTH_MODES=["oauth","creator_api_key"];M.PLAYBOOK_LIMITS={name:120,whenToRun:500,instructions:1e5,compiledRender:512e3}});var lc=y(_r=>{"use strict";var zD;Object.defineProperty(_r,"__esModule",{value:!0});_r.globalConfig=_r.$ZodEncodeError=_r.$ZodAsyncError=_r.$brand=_r.NEVER=void 0;_r.$constructor=O6;_r.config=x6;_r.NEVER=Object.freeze({status:"aborted"});function O6(t,e,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,c);let l=s.prototype,u=Object.keys(l);for(let d=0;d<u.length;d++){let A=u[d];A in a||(a[A]=l[A].bind(a))}}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:t});function s(a){var c;let l=r?.Parent?new o:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(s,"name",{value:t}),s}_r.$brand=Symbol("zod_brand");var FC=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};_r.$ZodAsyncError=FC;var jC=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};_r.$ZodEncodeError=jC;(zD=globalThis).__zod_globalConfig??(zD.__zod_globalConfig={});_r.globalConfig=globalThis.__zod_globalConfig;function x6(t){return t&&Object.assign(_r.globalConfig,t),_r.globalConfig}});var pe=y(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.Class=ne.BIGINT_FORMAT_RANGES=ne.NUMBER_FORMAT_RANGES=ne.primitiveTypes=ne.propertyKeyTypes=ne.getParsedType=ne.allowsEval=ne.captureStackTrace=void 0;ne.assertEqual=M6;ne.assertNotEqual=P6;ne.assertIs=L6;ne.assertNever=$6;ne.assert=F6;ne.getEnumValues=j6;ne.joinValues=z6;ne.jsonStringifyReplacer=q6;ne.cached=HD;ne.nullish=H6;ne.cleanRegex=G6;ne.floatSafeRemainder=Y6;ne.defineLazy=V6;ne.objectClone=W6;ne.assignProp=sa;ne.mergeDefs=Es;ne.cloneDef=J6;ne.getElementAtPath=Z6;ne.promiseAllObject=K6;ne.randomString=X6;ne.esc=e3;ne.slugify=t3;ne.isObject=zC;ne.isPlainObject=Fh;ne.shallowClone=r3;ne.numKeys=n3;ne.escapeRegex=o3;ne.clone=aa;ne.normalizeParams=s3;ne.createTransparentProxy=a3;ne.stringifyPrimitive=GD;ne.optionalKeys=c3;ne.pick=l3;ne.omit=u3;ne.extend=d3;ne.safeExtend=A3;ne.merge=p3;ne.partial=h3;ne.required=f3;ne.aborted=g3;ne.explicitlyAborted=m3;ne.prefixIssues=y3;ne.unwrapMessage=Fd;ne.finalizeIssue=E3;ne.getSizableOrigin=I3;ne.getLengthableOrigin=C3;ne.parsedType=b3;ne.issue=S3;ne.cleanEnum=w3;ne.base64ToUint8Array=YD;ne.uint8ArrayToBase64=VD;ne.base64urlToUint8Array=_3;ne.uint8ArrayToBase64url=B3;ne.hexToUint8Array=v3;ne.uint8ArrayToHex=Q3;var U6=lc();function M6(t){return t}function P6(t){return t}function L6(t){}function $6(t){throw new Error("Unexpected value in exhaustive check")}function F6(t){}function j6(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}function z6(t,e="|"){return t.map(r=>GD(r)).join(e)}function q6(t,e){return typeof e=="bigint"?e.toString():e}function HD(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function H6(t){return t==null}function G6(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Y6(t,e){let r=t/e,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}var qD=Symbol("evaluating");function V6(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==qD)return n===void 0&&(n=qD,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function W6(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function sa(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Es(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function J6(t){return Es(t._zod.def)}function Z6(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function K6(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let o=0;o<e.length;o++)i[e[o]]=n[o];return i})}function X6(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function e3(t){return JSON.stringify(t)}function t3(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}ne.captureStackTrace="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function zC(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}ne.allowsEval=HD(()=>{if(U6.globalConfig.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function Fh(t){if(zC(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(zC(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function r3(t){return Fh(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function n3(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var i3=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}};ne.getParsedType=i3;ne.propertyKeyTypes=new Set(["string","number","symbol"]);ne.primitiveTypes=new Set(["string","number","bigint","boolean","symbol","undefined"]);function o3(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function aa(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function s3(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function a3(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,o){return e??(e=t()),Reflect.set(e,n,i,o)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function GD(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function c3(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}ne.NUMBER_FORMAT_RANGES={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]};ne.BIGINT_FORMAT_RANGES={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function l3(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Es(t._zod.def,{get shape(){let s={};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(s[a]=r.shape[a])}return sa(this,"shape",s),s},checks:[]});return aa(t,o)}function u3(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Es(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete s[a]}return sa(this,"shape",s),s},checks:[]});return aa(t,o)}function d3(t,e){if(!Fh(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Es(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return sa(this,"shape",o),o}});return aa(t,i)}function A3(t,e){if(!Fh(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Es(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return sa(this,"shape",n),n}});return aa(t,r)}function p3(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Es(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return sa(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return aa(t,r)}function h3(t,e,r){let i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Es(e._zod.def,{get shape(){let a=e._zod.def.shape,c={...a};if(r)for(let l in r){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=t?new t({type:"optional",innerType:a[l]}):a[l])}else for(let l in a)c[l]=t?new t({type:"optional",innerType:a[l]}):a[l];return sa(this,"shape",c),c},checks:[]});return aa(e,s)}function f3(t,e,r){let n=Es(e._zod.def,{get shape(){let i=e._zod.def.shape,o={...i};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:i[s]}))}else for(let s in i)o[s]=new t({type:"nonoptional",innerType:i[s]});return sa(this,"shape",o),o}});return aa(e,n)}function g3(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function m3(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function y3(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Fd(t){return typeof t=="string"?t:t?.message}function E3(t,e,r){let n=t.message?t.message:Fd(t.inst?._zod.def?.error?.(t))??Fd(e?.error?.(t))??Fd(r.customError?.(t))??Fd(r.localeError?.(t))??"Invalid input",{inst:i,continue:o,input:s,...a}=t;return a.path??(a.path=[]),a.message=n,e?.reportInput&&(a.input=s),a}function I3(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function C3(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function b3(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function S3(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function w3(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function YD(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function VD(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function _3(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return YD(e+r)}function B3(t){return VD(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function v3(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function Q3(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var qC=class{constructor(...e){}};ne.Class=qC});var HC=y(Ir=>{"use strict";var T3=Ir&&Ir.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),D3=Ir&&Ir.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),k3=Ir&&Ir.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&T3(e,t,r);return D3(e,t),e};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.$ZodRealError=Ir.$ZodError=void 0;Ir.flattenError=N3;Ir.formatError=O3;Ir.treeifyError=x3;Ir.toDotPath=ZD;Ir.prettifyError=U3;var WD=lc(),R3=k3(pe()),JD=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,R3.jsonStringifyReplacer,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})};Ir.$ZodError=(0,WD.$constructor)("$ZodError",JD);Ir.$ZodRealError=(0,WD.$constructor)("$ZodError",JD,{Parent:Error});function N3(t,e=r=>r.message){let r={},n=[];for(let i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function O3(t,e=r=>r.message){let r={_errors:[]},n=(i,o=[])=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)r._errors.push(e(s));else{let c=r,l=0;for(;l<a.length;){let u=a[l];l===a.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(e(s))):c[u]=c[u]||{_errors:[]},c=c[u],l++}}}};return n(t),r}function x3(t,e=r=>r.message){let r={errors:[]},n=(i,o=[])=>{var s,a;for(let c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>n({issues:l},[...o,...c.path]));else if(c.code==="invalid_key")n({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")n({issues:c.issues},[...o,...c.path]);else{let l=[...o,...c.path];if(l.length===0){r.errors.push(e(c));continue}let u=r,d=0;for(;d<l.length;){let A=l[d],p=d===l.length-1;typeof A=="string"?(u.properties??(u.properties={}),(s=u.properties)[A]??(s[A]={errors:[]}),u=u.properties[A]):(u.items??(u.items=[]),(a=u.items)[A]??(a[A]={errors:[]}),u=u.items[A]),p&&u.errors.push(e(c)),d++}}};return n(t),r}function ZD(t){let e=[],r=t.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function U3(t){let e=[],r=[...t.issues].sort((n,i)=>(n.path??[]).length-(i.path??[]).length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${ZD(n.path)}`);return e.join(`
4
4
  `)}});var YC=y(K=>{"use strict";var M3=K&&K.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),P3=K&&K.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),GC=K&&K.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&M3(e,t,r);return P3(e,t),e};Object.defineProperty(K,"__esModule",{value:!0});K.safeDecodeAsync=K._safeDecodeAsync=K.safeEncodeAsync=K._safeEncodeAsync=K.safeDecode=K._safeDecode=K.safeEncode=K._safeEncode=K.decodeAsync=K._decodeAsync=K.encodeAsync=K._encodeAsync=K.decode=K._decode=K.encode=K._encode=K.safeParseAsync=K._safeParseAsync=K.safeParse=K._safeParse=K.parseAsync=K._parseAsync=K.parse=K._parse=void 0;var Nl=GC(lc()),fn=GC(HC()),Ol=GC(pe()),L3=t=>(e,r,n,i)=>{let o=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Nl.$ZodAsyncError;if(s.issues.length){let a=new(i?.Err??t)(s.issues.map(c=>Ol.finalizeIssue(c,o,Nl.config())));throw Ol.captureStackTrace(a,i?.callee),a}return s.value};K._parse=L3;K.parse=(0,K._parse)(fn.$ZodRealError);var $3=t=>async(e,r,n,i)=>{let o=n?{...n,async:!0}:{async:!0},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(i?.Err??t)(s.issues.map(c=>Ol.finalizeIssue(c,o,Nl.config())));throw Ol.captureStackTrace(a,i?.callee),a}return s.value};K._parseAsync=$3;K.parseAsync=(0,K._parseAsync)(fn.$ZodRealError);var F3=t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new Nl.$ZodAsyncError;return o.issues.length?{success:!1,error:new(t??fn.$ZodError)(o.issues.map(s=>Ol.finalizeIssue(s,i,Nl.config())))}:{success:!0,data:o.value}};K._safeParse=F3;K.safeParse=(0,K._safeParse)(fn.$ZodRealError);var j3=t=>async(e,r,n)=>{let i=n?{...n,async:!0}:{async:!0},o=e._zod.run({value:r,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(s=>Ol.finalizeIssue(s,i,Nl.config())))}:{success:!0,data:o.value}};K._safeParseAsync=j3;K.safeParseAsync=(0,K._safeParseAsync)(fn.$ZodRealError);var z3=t=>(e,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return(0,K._parse)(t)(e,r,i)};K._encode=z3;K.encode=(0,K._encode)(fn.$ZodRealError);var q3=t=>(e,r,n)=>(0,K._parse)(t)(e,r,n);K._decode=q3;K.decode=(0,K._decode)(fn.$ZodRealError);var H3=t=>async(e,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return(0,K._parseAsync)(t)(e,r,i)};K._encodeAsync=H3;K.encodeAsync=(0,K._encodeAsync)(fn.$ZodRealError);var G3=t=>async(e,r,n)=>(0,K._parseAsync)(t)(e,r,n);K._decodeAsync=G3;K.decodeAsync=(0,K._decodeAsync)(fn.$ZodRealError);var Y3=t=>(e,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return(0,K._safeParse)(t)(e,r,i)};K._safeEncode=Y3;K.safeEncode=(0,K._safeEncode)(fn.$ZodRealError);var V3=t=>(e,r,n)=>(0,K._safeParse)(t)(e,r,n);K._safeDecode=V3;K.safeDecode=(0,K._safeDecode)(fn.$ZodRealError);var W3=t=>async(e,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return(0,K._safeParseAsync)(t)(e,r,i)};K._safeEncodeAsync=W3;K.safeEncodeAsync=(0,K._safeEncodeAsync)(fn.$ZodRealError);var J3=t=>async(e,r,n)=>(0,K._safeParseAsync)(t)(e,r,n);K._safeDecodeAsync=J3;K.safeDecodeAsync=(0,K._safeDecodeAsync)(fn.$ZodRealError)});var jh=y(O=>{"use strict";var Z3=O&&O.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),K3=O&&O.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),X3=O&&O.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Z3(e,t,r);return K3(e,t),e};Object.defineProperty(O,"__esModule",{value:!0});O.sha256_base64url=O.sha256_base64=O.sha256_hex=O.sha1_base64url=O.sha1_base64=O.sha1_hex=O.md5_base64url=O.md5_base64=O.md5_hex=O.hex=O.uppercase=O.lowercase=O.undefined=O.null=O.boolean=O.number=O.integer=O.bigint=O.string=O.date=O.e164=O.httpProtocol=O.domain=O.hostname=O.base64url=O.base64=O.cidrv6=O.cidrv4=O.mac=O.ipv6=O.ipv4=O.browserEmail=O.idnEmail=O.unicodeEmail=O.rfc5322Email=O.html5Email=O.email=O.uuid7=O.uuid6=O.uuid4=O.uuid=O.guid=O.extendedDuration=O.duration=O.nanoid=O.ksuid=O.xid=O.ulid=O.cuid2=O.cuid=void 0;O.sha512_base64url=O.sha512_base64=O.sha512_hex=O.sha384_base64url=O.sha384_base64=O.sha384_hex=void 0;O.emoji=nK;O.time=oK;O.datetime=sK;var eK=X3(pe());O.cuid=/^[cC][0-9a-z]{6,}$/;O.cuid2=/^[0-9a-z]+$/;O.ulid=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;O.xid=/^[0-9a-vA-V]{20}$/;O.ksuid=/^[A-Za-z0-9]{27}$/;O.nanoid=/^[a-zA-Z0-9_-]{21}$/;O.duration=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;O.extendedDuration=/^[-+]?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)?)??$/;O.guid=/^([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})$/;var tK=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/;O.uuid=tK;O.uuid4=(0,O.uuid)(4);O.uuid6=(0,O.uuid)(6);O.uuid7=(0,O.uuid)(7);O.email=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;O.html5Email=/^[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])?)*$/;O.rfc5322Email=/^(([^<>()\[\]\\.,;:\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,}))$/;O.unicodeEmail=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u;O.idnEmail=O.unicodeEmail;O.browserEmail=/^[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])?)*$/;var rK="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function nK(){return new RegExp(rK,"u")}O.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])$/;O.ipv6=/^(([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}|:))$/;var iK=t=>{let e=eK.escapeRegex(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)};O.mac=iK;O.cidrv4=/^((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])$/;O.cidrv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;O.base64=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;O.base64url=/^[A-Za-z0-9_-]*$/;O.hostname=/^(?=.{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])?)*\.?$/;O.domain=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;O.httpProtocol=/^https?$/;O.e164=/^\+[1-9]\d{6,14}$/;var KD="(?:(?:\\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])))";O.date=new RegExp(`^${KD}$`);function XD(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function oK(t){return new RegExp(`^${XD(t)}$`)}function sK(t){let e=XD({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${KD}T(?:${n})$`)}var aK=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)};O.string=aK;O.bigint=/^-?\d+n?$/;O.integer=/^-?\d+$/;O.number=/^-?\d+(?:\.\d+)?$/;O.boolean=/^(?:true|false)$/i;var cK=/^null$/i;O.null=cK;var lK=/^undefined$/i;O.undefined=lK;O.lowercase=/^[^A-Z]*$/;O.uppercase=/^[^a-z]*$/;O.hex=/^[0-9a-fA-F]*$/;function jd(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function zd(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}O.md5_hex=/^[0-9a-fA-F]{32}$/;O.md5_base64=jd(22,"==");O.md5_base64url=zd(22);O.sha1_hex=/^[0-9a-fA-F]{40}$/;O.sha1_base64=jd(27,"=");O.sha1_base64url=zd(27);O.sha256_hex=/^[0-9a-fA-F]{64}$/;O.sha256_base64=jd(43,"=");O.sha256_base64url=zd(43);O.sha384_hex=/^[0-9a-fA-F]{96}$/;O.sha384_base64=jd(64,"");O.sha384_base64url=zd(64);O.sha512_hex=/^[0-9a-fA-F]{128}$/;O.sha512_base64=jd(86,"==");O.sha512_base64url=zd(86)});var zh=y(ie=>{"use strict";var uK=ie&&ie.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),dK=ie&&ie.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),VC=ie&&ie.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&uK(e,t,r);return dK(e,t),e};Object.defineProperty(ie,"__esModule",{value:!0});ie.$ZodCheckOverwrite=ie.$ZodCheckMimeType=ie.$ZodCheckProperty=ie.$ZodCheckEndsWith=ie.$ZodCheckStartsWith=ie.$ZodCheckIncludes=ie.$ZodCheckUpperCase=ie.$ZodCheckLowerCase=ie.$ZodCheckRegex=ie.$ZodCheckStringFormat=ie.$ZodCheckLengthEquals=ie.$ZodCheckMinLength=ie.$ZodCheckMaxLength=ie.$ZodCheckSizeEquals=ie.$ZodCheckMinSize=ie.$ZodCheckMaxSize=ie.$ZodCheckBigIntFormat=ie.$ZodCheckNumberFormat=ie.$ZodCheckMultipleOf=ie.$ZodCheckGreaterThan=ie.$ZodCheckLessThan=ie.$ZodCheck=void 0;var Ut=VC(lc()),WC=VC(jh()),sr=VC(pe());ie.$ZodCheck=Ut.$constructor("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])});var tk={number:"number",bigint:"bigint",object:"date"};ie.$ZodCheckLessThan=Ut.$constructor("$ZodCheckLessThan",(t,e)=>{ie.$ZodCheck.init(t,e);let r=tk[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}});ie.$ZodCheckGreaterThan=Ut.$constructor("$ZodCheckGreaterThan",(t,e)=>{ie.$ZodCheck.init(t,e);let r=tk[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}});ie.$ZodCheckMultipleOf=Ut.$constructor("$ZodCheckMultipleOf",(t,e)=>{ie.$ZodCheck.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):sr.floatSafeRemainder(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}});ie.$ZodCheckNumberFormat=Ut.$constructor("$ZodCheckNumberFormat",(t,e)=>{ie.$ZodCheck.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,o]=sr.NUMBER_FORMAT_RANGES[e.format];t._zod.onattach.push(s=>{let a=s._zod.bag;a.format=e.format,a.minimum=i,a.maximum=o,r&&(a.pattern=WC.integer)}),t._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}a<i&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}});ie.$ZodCheckBigIntFormat=Ut.$constructor("$ZodCheckBigIntFormat",(t,e)=>{ie.$ZodCheck.init(t,e);let[r,n]=sr.BIGINT_FORMAT_RANGES[e.format];t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,o.minimum=r,o.maximum=n}),t._zod.check=i=>{let o=i.value;o<r&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>n&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!e.abort})}});ie.$ZodCheckMaxSize=Ut.$constructor("$ZodCheckMaxSize",(t,e)=>{var r;ie.$ZodCheck.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!sr.nullish(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;i.size<=e.maximum||n.issues.push({origin:sr.getSizableOrigin(i),code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}});ie.$ZodCheckMinSize=Ut.$constructor("$ZodCheckMinSize",(t,e)=>{var r;ie.$ZodCheck.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!sr.nullish(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;i.size>=e.minimum||n.issues.push({origin:sr.getSizableOrigin(i),code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}});ie.$ZodCheckSizeEquals=Ut.$constructor("$ZodCheckSizeEquals",(t,e)=>{var r;ie.$ZodCheck.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!sr.nullish(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.size,i.maximum=e.size,i.size=e.size}),t._zod.check=n=>{let i=n.value,o=i.size;if(o===e.size)return;let s=o>e.size;n.issues.push({origin:sr.getSizableOrigin(i),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}});ie.$ZodCheckMaxLength=Ut.$constructor("$ZodCheckMaxLength",(t,e)=>{var r;ie.$ZodCheck.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!sr.nullish(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;if(i.length<=e.maximum)return;let s=sr.getLengthableOrigin(i);n.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}});ie.$ZodCheckMinLength=Ut.$constructor("$ZodCheckMinLength",(t,e)=>{var r;ie.$ZodCheck.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!sr.nullish(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;if(i.length>=e.minimum)return;let s=sr.getLengthableOrigin(i);n.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}});ie.$ZodCheckLengthEquals=Ut.$constructor("$ZodCheckLengthEquals",(t,e)=>{var r;ie.$ZodCheck.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!sr.nullish(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{let i=n.value,o=i.length;if(o===e.length)return;let s=sr.getLengthableOrigin(i),a=o>e.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}});ie.$ZodCheckStringFormat=Ut.$constructor("$ZodCheckStringFormat",(t,e)=>{var r,n;ie.$ZodCheck.init(t,e),t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})});ie.$ZodCheckRegex=Ut.$constructor("$ZodCheckRegex",(t,e)=>{ie.$ZodCheckStringFormat.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}});ie.$ZodCheckLowerCase=Ut.$constructor("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=WC.lowercase),ie.$ZodCheckStringFormat.init(t,e)});ie.$ZodCheckUpperCase=Ut.$constructor("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=WC.uppercase),ie.$ZodCheckStringFormat.init(t,e)});ie.$ZodCheckIncludes=Ut.$constructor("$ZodCheckIncludes",(t,e)=>{ie.$ZodCheck.init(t,e);let r=sr.escapeRegex(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}});ie.$ZodCheckStartsWith=Ut.$constructor("$ZodCheckStartsWith",(t,e)=>{ie.$ZodCheck.init(t,e);let r=new RegExp(`^${sr.escapeRegex(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}});ie.$ZodCheckEndsWith=Ut.$constructor("$ZodCheckEndsWith",(t,e)=>{ie.$ZodCheck.init(t,e);let r=new RegExp(`.*${sr.escapeRegex(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});function ek(t,e,r){t.issues.length&&e.issues.push(...sr.prefixIssues(r,t.issues))}ie.$ZodCheckProperty=Ut.$constructor("$ZodCheckProperty",(t,e)=>{ie.$ZodCheck.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>ek(i,r,e.property));ek(n,r,e.property)}});ie.$ZodCheckMimeType=Ut.$constructor("$ZodCheckMimeType",(t,e)=>{ie.$ZodCheck.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t,continue:!e.abort})}});ie.$ZodCheckOverwrite=Ut.$constructor("$ZodCheckOverwrite",(t,e)=>{ie.$ZodCheck.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}})});var ZC=y(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});qh.Doc=void 0;var JC=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
5
5
  `).filter(s=>s),i=Math.min(...n.map(s=>s.length-s.trimStart().length)),o=n.map(s=>s.slice(i)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){let e=Function,r=this?.args,i=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...r,i.join(`
6
6
  `))}};qh.Doc=JC});var KC=y(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});Hh.version=void 0;Hh.version={major:4,minor:4,patch:3}});var tb=y(w=>{"use strict";var AK=w&&w.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),pK=w&&w.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Jh=w&&w.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&AK(e,t,r);return pK(e,t),e};Object.defineProperty(w,"__esModule",{value:!0});w.$ZodTuple=w.$ZodIntersection=w.$ZodDiscriminatedUnion=w.$ZodXor=w.$ZodUnion=w.$ZodObjectJIT=w.$ZodObject=w.$ZodArray=w.$ZodDate=w.$ZodVoid=w.$ZodNever=w.$ZodUnknown=w.$ZodAny=w.$ZodNull=w.$ZodUndefined=w.$ZodSymbol=w.$ZodBigIntFormat=w.$ZodBigInt=w.$ZodBoolean=w.$ZodNumberFormat=w.$ZodNumber=w.$ZodCustomStringFormat=w.$ZodJWT=w.$ZodE164=w.$ZodBase64URL=w.$ZodBase64=w.$ZodCIDRv6=w.$ZodCIDRv4=w.$ZodMAC=w.$ZodIPv6=w.$ZodIPv4=w.$ZodISODuration=w.$ZodISOTime=w.$ZodISODate=w.$ZodISODateTime=w.$ZodKSUID=w.$ZodXID=w.$ZodULID=w.$ZodCUID2=w.$ZodCUID=w.$ZodNanoID=w.$ZodEmoji=w.$ZodURL=w.$ZodEmail=w.$ZodUUID=w.$ZodGUID=w.$ZodStringFormat=w.$ZodString=w.clone=w.$ZodType=void 0;w.$ZodCustom=w.$ZodLazy=w.$ZodPromise=w.$ZodFunction=w.$ZodTemplateLiteral=w.$ZodReadonly=w.$ZodPreprocess=w.$ZodCodec=w.$ZodPipe=w.$ZodNaN=w.$ZodCatch=w.$ZodSuccess=w.$ZodNonOptional=w.$ZodPrefault=w.$ZodDefault=w.$ZodNullable=w.$ZodExactOptional=w.$ZodOptional=w.$ZodTransform=w.$ZodFile=w.$ZodLiteral=w.$ZodEnum=w.$ZodSet=w.$ZodMap=w.$ZodRecord=void 0;w.isValidBase64=eb;w.isValidBase64URL=gk;w.isValidJWT=mk;var Zh=Jh(zh()),G=Jh(lc()),hK=ZC(),xl=YC(),Ze=Jh(jh()),Y=Jh(pe()),fK=KC();w.$ZodType=G.$constructor("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=fK.version;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let o of i._zod.onattach)o(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=(s,a,c)=>{let l=Y.aborted(s),u;for(let d of a){if(d._zod.def.when){if(Y.explicitlyAborted(s)||!d._zod.def.when(s))continue}else if(l)continue;let A=s.issues.length,p=d._zod.check(s);if(p instanceof Promise&&c?.async===!1)throw new G.$ZodAsyncError;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,s.issues.length!==A&&(l||(l=Y.aborted(s,A)))});else{if(s.issues.length===A)continue;l||(l=Y.aborted(s,A))}}return u?u.then(()=>s):s},o=(s,a,c)=>{if(Y.aborted(s))return s.aborted=!0,s;let l=i(a,n,c);if(l instanceof Promise){if(c.async===!1)throw new G.$ZodAsyncError;return l.then(u=>t._zod.parse(u,c))}return t._zod.parse(l,c)};t._zod.run=(s,a)=>{if(a.skipChecks)return t._zod.parse(s,a);if(a.direction==="backward"){let l=t._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(u=>o(u,s,a)):o(l,s,a)}let c=t._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new G.$ZodAsyncError;return c.then(l=>i(l,n,a))}return i(c,n,a)}}Y.defineLazy(t,"~standard",()=>({validate:i=>{try{let o=(0,xl.safeParse)(t,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return(0,xl.safeParseAsync)(t,i).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))});var gK=pe();Object.defineProperty(w,"clone",{enumerable:!0,get:function(){return gK.clone}});w.$ZodString=G.$constructor("$ZodString",(t,e)=>{w.$ZodType.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Ze.string(t._zod.bag),t._zod.parse=(r,n)=>{if(e.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:t}),r}});w.$ZodStringFormat=G.$constructor("$ZodStringFormat",(t,e)=>{Zh.$ZodCheckStringFormat.init(t,e),w.$ZodString.init(t,e)});w.$ZodGUID=G.$constructor("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Ze.guid),w.$ZodStringFormat.init(t,e)});w.$ZodUUID=G.$constructor("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Ze.uuid(n))}else e.pattern??(e.pattern=Ze.uuid());w.$ZodStringFormat.init(t,e)});w.$ZodEmail=G.$constructor("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Ze.email),w.$ZodStringFormat.init(t,e)});w.$ZodURL=G.$constructor("$ZodURL",(t,e)=>{w.$ZodStringFormat.init(t,e),t._zod.check=r=>{try{let n=r.value.trim();if(!e.normalize&&e.protocol?.source===Ze.httpProtocol.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:t,continue:!e.abort});return}let i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}});w.$ZodEmoji=G.$constructor("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Ze.emoji()),w.$ZodStringFormat.init(t,e)});w.$ZodNanoID=G.$constructor("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Ze.nanoid),w.$ZodStringFormat.init(t,e)});w.$ZodCUID=G.$constructor("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Ze.cuid),w.$ZodStringFormat.init(t,e)});w.$ZodCUID2=G.$constructor("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Ze.cuid2),w.$ZodStringFormat.init(t,e)});w.$ZodULID=G.$constructor("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Ze.ulid),w.$ZodStringFormat.init(t,e)});w.$ZodXID=G.$constructor("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Ze.xid),w.$ZodStringFormat.init(t,e)});w.$ZodKSUID=G.$constructor("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Ze.ksuid),w.$ZodStringFormat.init(t,e)});w.$ZodISODateTime=G.$constructor("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Ze.datetime(e)),w.$ZodStringFormat.init(t,e)});w.$ZodISODate=G.$constructor("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Ze.date),w.$ZodStringFormat.init(t,e)});w.$ZodISOTime=G.$constructor("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Ze.time(e)),w.$ZodStringFormat.init(t,e)});w.$ZodISODuration=G.$constructor("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Ze.duration),w.$ZodStringFormat.init(t,e)});w.$ZodIPv4=G.$constructor("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Ze.ipv4),w.$ZodStringFormat.init(t,e),t._zod.bag.format="ipv4"});w.$ZodIPv6=G.$constructor("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Ze.ipv6),w.$ZodStringFormat.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}});w.$ZodMAC=G.$constructor("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=Ze.mac(e.delimiter)),w.$ZodStringFormat.init(t,e),t._zod.bag.format="mac"});w.$ZodCIDRv4=G.$constructor("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Ze.cidrv4),w.$ZodStringFormat.init(t,e)});w.$ZodCIDRv6=G.$constructor("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Ze.cidrv6),w.$ZodStringFormat.init(t,e),t._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[i,o]=n;if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function eb(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}w.$ZodBase64=G.$constructor("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Ze.base64),w.$ZodStringFormat.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{eb(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function gk(t){if(!Ze.base64url.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return eb(r)}w.$ZodBase64URL=G.$constructor("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Ze.base64url),w.$ZodStringFormat.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{gk(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}});w.$ZodE164=G.$constructor("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Ze.e164),w.$ZodStringFormat.init(t,e)});function mk(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}w.$ZodJWT=G.$constructor("$ZodJWT",(t,e)=>{w.$ZodStringFormat.init(t,e),t._zod.check=r=>{mk(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}});w.$ZodCustomStringFormat=G.$constructor("$ZodCustomStringFormat",(t,e)=>{w.$ZodStringFormat.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}});w.$ZodNumber=G.$constructor("$ZodNumber",(t,e)=>{w.$ZodType.init(t,e),t._zod.pattern=t._zod.bag.pattern??Ze.number,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...o?{received:o}:{}}),r}});w.$ZodNumberFormat=G.$constructor("$ZodNumberFormat",(t,e)=>{Zh.$ZodCheckNumberFormat.init(t,e),w.$ZodNumber.init(t,e)});w.$ZodBoolean=G.$constructor("$ZodBoolean",(t,e)=>{w.$ZodType.init(t,e),t._zod.pattern=Ze.boolean,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}});w.$ZodBigInt=G.$constructor("$ZodBigInt",(t,e)=>{w.$ZodType.init(t,e),t._zod.pattern=Ze.bigint,t._zod.parse=(r,n)=>{if(e.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:t}),r}});w.$ZodBigIntFormat=G.$constructor("$ZodBigIntFormat",(t,e)=>{Zh.$ZodCheckBigIntFormat.init(t,e),w.$ZodBigInt.init(t,e)});w.$ZodSymbol=G.$constructor("$ZodSymbol",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),r}});w.$ZodUndefined=G.$constructor("$ZodUndefined",(t,e)=>{w.$ZodType.init(t,e),t._zod.pattern=Ze.undefined,t._zod.values=new Set([void 0]),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),r}});w.$ZodNull=G.$constructor("$ZodNull",(t,e)=>{w.$ZodType.init(t,e),t._zod.pattern=Ze.null,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),r}});w.$ZodAny=G.$constructor("$ZodAny",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=r=>r});w.$ZodUnknown=G.$constructor("$ZodUnknown",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=r=>r});w.$ZodNever=G.$constructor("$ZodNever",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)});w.$ZodVoid=G.$constructor("$ZodVoid",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}});w.$ZodDate=G.$constructor("$ZodDate",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:t}),r}});function rk(t,e,r){t.issues.length&&e.issues.push(...Y.prefixIssues(r,t.issues)),e.value[r]=t.value}w.$ZodArray=G.$constructor("$ZodArray",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let o=[];for(let s=0;s<i.length;s++){let a=i[s],c=e.element._zod.run({value:a,issues:[]},n);c instanceof Promise?o.push(c.then(l=>rk(l,r,s))):rk(c,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function Wh(t,e,r,n,i,o){let s=r in n;if(t.issues.length){if(i&&o&&!s)return;e.issues.push(...Y.prefixIssues(r,t.issues))}if(!s&&!i){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}t.value===void 0?s&&(e.value[r]=void 0):e.value[r]=t.value}function yk(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=Y.optionalKeys(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function Ek(t,e,r,n,i,o){let s=[],a=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin==="optional",d=c.optout==="optional";for(let A in e){if(A==="__proto__"||a.has(A))continue;if(l==="never"){s.push(A);continue}let p=c.run({value:e[A],issues:[]},n);p instanceof Promise?t.push(p.then(h=>Wh(h,r,A,e,u,d))):Wh(p,r,A,e,u,d)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}w.$ZodObject=G.$constructor("$ZodObject",(t,e)=>{if(w.$ZodType.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let a=e.shape;Object.defineProperty(e,"shape",{get:()=>{let c={...a};return Object.defineProperty(e,"shape",{value:c}),c}})}let n=Y.cached(()=>yk(e));Y.defineLazy(t._zod,"propValues",()=>{let a=e.shape,c={};for(let l in a){let u=a[l]._zod;if(u.values){c[l]??(c[l]=new Set);for(let d of u.values)c[l].add(d)}}return c});let i=Y.isObject,o=e.catchall,s;t._zod.parse=(a,c)=>{s??(s=n.value);let l=a.value;if(!i(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:t}),a;a.value={};let u=[],d=s.shape;for(let A of s.keys){let p=d[A],h=p._zod.optin==="optional",f=p._zod.optout==="optional",E=p._zod.run({value:l[A],issues:[]},c);E instanceof Promise?u.push(E.then(S=>Wh(S,a,A,l,h,f))):Wh(E,a,A,l,h,f)}return o?Ek(u,l,a,c,n.value,t):u.length?Promise.all(u).then(()=>a):a}});w.$ZodObjectJIT=G.$constructor("$ZodObjectJIT",(t,e)=>{w.$ZodObject.init(t,e);let r=t._zod.parse,n=Y.cached(()=>yk(e)),i=A=>{let p=new hK.Doc(["shape","payload","ctx"]),h=n.value,f=_=>{let v=Y.esc(_);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};p.write("const input = payload.value;");let E=Object.create(null),S=0;for(let _ of h.keys)E[_]=`key_${S++}`;p.write("const newResult = {};");for(let _ of h.keys){let v=E[_],T=Y.esc(_),$=A[_],k=$?._zod?.optin==="optional",L=$?._zod?.optout==="optional";p.write(`const ${v} = ${f(_)};`),k&&L?p.write(`
@@ -64,7 +64,7 @@
64
64
 
65
65
  `)}p.write("payload.value = newResult;"),p.write("return payload;");let B=p.compile();return(_,v)=>B(A,_,v)},o,s=Y.isObject,a=!G.globalConfig.jitless,c=Y.allowsEval,l=a&&c.value,u=e.catchall,d;t._zod.parse=(A,p)=>{d??(d=n.value);let h=A.value;return s(h)?a&&l&&p?.async===!1&&p.jitless!==!0?(o||(o=i(e.shape)),A=o(A,p),u?Ek([],h,A,p,d,t):A):r(A,p):(A.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),A)}});function nk(t,e,r,n){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let i=t.filter(o=>!Y.aborted(o));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>Y.finalizeIssue(s,n,G.config())))}),e)}w.$ZodUnion=G.$constructor("$ZodUnion",(t,e)=>{w.$ZodType.init(t,e),Y.defineLazy(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Y.defineLazy(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Y.defineLazy(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),Y.defineLazy(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){let n=e.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Y.cleanRegex(i.source)).join("|")})$`)}});let r=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(n,i)=>{if(r)return r(n,i);let o=!1,s=[];for(let a of e.options){let c=a._zod.run({value:n.value,issues:[]},i);if(c instanceof Promise)s.push(c),o=!0;else{if(c.issues.length===0)return c;s.push(c)}}return o?Promise.all(s).then(a=>nk(a,n,t,i)):nk(s,n,t,i)}});function ik(t,e,r,n){let i=t.filter(o=>o.issues.length===0);return i.length===1?(e.value=i[0].value,e):(i.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>Y.finalizeIssue(s,n,G.config())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}w.$ZodXor=G.$constructor("$ZodXor",(t,e)=>{w.$ZodUnion.init(t,e),e.inclusive=!1;let r=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(n,i)=>{if(r)return r(n,i);let o=!1,s=[];for(let a of e.options){let c=a._zod.run({value:n.value,issues:[]},i);c instanceof Promise?(s.push(c),o=!0):s.push(c)}return o?Promise.all(s).then(a=>ik(a,n,t,i)):ik(s,n,t,i)}});w.$ZodDiscriminatedUnion=G.$constructor("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,w.$ZodUnion.init(t,e);let r=t._zod.parse;Y.defineLazy(t._zod,"propValues",()=>{let i={};for(let o of e.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[a,c]of Object.entries(s)){i[a]||(i[a]=new Set);for(let l of c)i[a].add(l)}}return i});let n=Y.cached(()=>{let i=e.options,o=new Map;for(let s of i){let a=s._zod.propValues?.[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let c of a){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,s)}}return o});t._zod.parse=(i,o)=>{let s=i.value;if(!Y.isObject(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),i;let a=n.value.get(s?.[e.discriminator]);return a?a._zod.run(i,o):e.unionFallback||o.direction==="backward"?r(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(n.value.keys()),input:s,path:[e.discriminator],inst:t}),i)}});w.$ZodIntersection=G.$constructor("$ZodIntersection",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value,o=e.left._zod.run({value:i,issues:[]},n),s=e.right._zod.run({value:i,issues:[]},n);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([c,l])=>ok(r,c,l)):ok(r,o,s)}});function XC(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Y.isPlainObject(t)&&Y.isPlainObject(e)){let r=Object.keys(e),n=Object.keys(t).filter(o=>r.indexOf(o)!==-1),i={...t,...e};for(let o of n){let s=XC(t[o],e[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};i[o]=s.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let i=t[n],o=e[n],s=XC(i,o);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function ok(t,e,r){let n=new Map,i;for(let a of e.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(let c of a.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else t.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let c of a.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else t.issues.push(a);let o=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&i&&t.issues.push({...i,keys:o}),Y.aborted(t))return t;let s=XC(e.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}w.$ZodTuple=G.$constructor("$ZodTuple",(t,e)=>{w.$ZodType.init(t,e);let r=e.items;t._zod.parse=(n,i)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];let s=[],a=sk(r,"optin"),c=sk(r,"optout");if(!e.rest){if(o.length<a)return n.issues.push({code:"too_small",minimum:a,inclusive:!0,input:o,inst:t,origin:"array"}),n;o.length>r.length&&n.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:o,inst:t,origin:"array"})}let l=new Array(r.length);for(let u=0;u<r.length;u++){let d=r[u]._zod.run({value:o[u],issues:[]},i);d instanceof Promise?s.push(d.then(A=>{l[u]=A})):l[u]=d}if(e.rest){let u=r.length-1,d=o.slice(r.length);for(let A of d){u++;let p=e.rest._zod.run({value:A,issues:[]},i);p instanceof Promise?s.push(p.then(h=>ak(h,n,u))):ak(p,n,u)}}return s.length?Promise.all(s).then(()=>ck(l,n,r,o,c)):ck(l,n,r,o,c)}});function sk(t,e){for(let r=t.length-1;r>=0;r--)if(t[r]._zod[e]!=="optional")return r+1;return 0}function ak(t,e,r){t.issues.length&&e.issues.push(...Y.prefixIssues(r,t.issues)),e.value[r]=t.value}function ck(t,e,r,n,i){for(let o=0;o<r.length;o++){let s=t[o],a=o<n.length;if(s.issues.length){if(!a&&o>=i){e.value.length=o;break}e.issues.push(...Y.prefixIssues(o,s.issues))}e.value[o]=s.value}for(let o=e.value.length-1;o>=n.length&&(r[o]._zod.optout==="optional"&&e.value[o]===void 0);o--)e.value.length=o;return e}w.$ZodRecord=G.$constructor("$ZodRecord",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Y.isPlainObject(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let o=[],s=e.keyType._zod.values;if(s){r.value={};let a=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){a.add(typeof l=="number"?l.toString():l);let u=e.keyType._zod.run({value:l,issues:[]},n);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>Y.finalizeIssue(p,n,G.config())),input:l,path:[l],inst:t});continue}let d=u.value,A=e.valueType._zod.run({value:i[l],issues:[]},n);A instanceof Promise?o.push(A.then(p=>{p.issues.length&&r.issues.push(...Y.prefixIssues(l,p.issues)),r.value[d]=p.value})):(A.issues.length&&r.issues.push(...Y.prefixIssues(l,A.issues)),r.value[d]=A.value)}let c;for(let l in i)a.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(i)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,a))continue;let c=e.keyType._zod.run({value:a,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Ze.number.test(a)&&c.issues.length){let d=e.keyType._zod.run({value:Number(a),issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){e.mode==="loose"?r.value[a]=i[a]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>Y.finalizeIssue(d,n,G.config())),input:a,path:[a],inst:t});continue}let u=e.valueType._zod.run({value:i[a],issues:[]},n);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&r.issues.push(...Y.prefixIssues(a,d.issues)),r.value[c.value]=d.value})):(u.issues.length&&r.issues.push(...Y.prefixIssues(a,u.issues)),r.value[c.value]=u.value)}}return o.length?Promise.all(o).then(()=>r):r}});w.$ZodMap=G.$constructor("$ZodMap",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:t}),r;let o=[];r.value=new Map;for(let[s,a]of i){let c=e.keyType._zod.run({value:s,issues:[]},n),l=e.valueType._zod.run({value:a,issues:[]},n);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([u,d])=>{lk(u,d,r,s,i,t,n)})):lk(c,l,r,s,i,t,n)}return o.length?Promise.all(o).then(()=>r):r}});function lk(t,e,r,n,i,o,s){t.issues.length&&(Y.propertyKeyTypes.has(typeof n)?r.issues.push(...Y.prefixIssues(n,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:t.issues.map(a=>Y.finalizeIssue(a,s,G.config()))})),e.issues.length&&(Y.propertyKeyTypes.has(typeof n)?r.issues.push(...Y.prefixIssues(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:n,issues:e.issues.map(a=>Y.finalizeIssue(a,s,G.config()))})),r.value.set(t.value,e.value)}w.$ZodSet=G.$constructor("$ZodSet",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:t,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let s of i){let a=e.valueType._zod.run({value:s,issues:[]},n);a instanceof Promise?o.push(a.then(c=>uk(c,r))):uk(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function uk(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}w.$ZodEnum=G.$constructor("$ZodEnum",(t,e)=>{w.$ZodType.init(t,e);let r=Y.getEnumValues(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(i=>Y.propertyKeyTypes.has(typeof i)).map(i=>typeof i=="string"?Y.escapeRegex(i):i.toString()).join("|")})$`),t._zod.parse=(i,o)=>{let s=i.value;return n.has(s)||i.issues.push({code:"invalid_value",values:r,input:s,inst:t}),i}});w.$ZodLiteral=G.$constructor("$ZodLiteral",(t,e)=>{if(w.$ZodType.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?Y.escapeRegex(n):n?Y.escapeRegex(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,i)=>{let o=n.value;return r.has(o)||n.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),n}});w.$ZodFile=G.$constructor("$ZodFile",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:t}),r}});w.$ZodTransform=G.$constructor("$ZodTransform",(t,e)=>{w.$ZodType.init(t,e),t._zod.optin="optional",t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new G.$ZodEncodeError(t.constructor.name);let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r.fallback=!0,r));if(i instanceof Promise)throw new G.$ZodAsyncError;return r.value=i,r.fallback=!0,r}});function dk(t,e){return e===void 0&&(t.issues.length||t.fallback)?{issues:[],value:void 0}:t}w.$ZodOptional=G.$constructor("$ZodOptional",(t,e)=>{w.$ZodType.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Y.defineLazy(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Y.defineLazy(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Y.cleanRegex(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){let i=r.value,o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>dk(s,i)):dk(o,i)}return r.value===void 0?r:e.innerType._zod.run(r,n)}});w.$ZodExactOptional=G.$constructor("$ZodExactOptional",(t,e)=>{w.$ZodOptional.init(t,e),Y.defineLazy(t._zod,"values",()=>e.innerType._zod.values),Y.defineLazy(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)});w.$ZodNullable=G.$constructor("$ZodNullable",(t,e)=>{w.$ZodType.init(t,e),Y.defineLazy(t._zod,"optin",()=>e.innerType._zod.optin),Y.defineLazy(t._zod,"optout",()=>e.innerType._zod.optout),Y.defineLazy(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Y.cleanRegex(r.source)}|null)$`):void 0}),Y.defineLazy(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)});w.$ZodDefault=G.$constructor("$ZodDefault",(t,e)=>{w.$ZodType.init(t,e),t._zod.optin="optional",Y.defineLazy(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>Ak(o,e)):Ak(i,e)}});function Ak(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}w.$ZodPrefault=G.$constructor("$ZodPrefault",(t,e)=>{w.$ZodType.init(t,e),t._zod.optin="optional",Y.defineLazy(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))});w.$ZodNonOptional=G.$constructor("$ZodNonOptional",(t,e)=>{w.$ZodType.init(t,e),Y.defineLazy(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>pk(o,t)):pk(i,t)}});function pk(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}w.$ZodSuccess=G.$constructor("$ZodSuccess",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new G.$ZodEncodeError("ZodSuccess");let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.issues.length===0,r)):(r.value=i.issues.length===0,r)}});w.$ZodCatch=G.$constructor("$ZodCatch",(t,e)=>{w.$ZodType.init(t,e),t._zod.optin="optional",Y.defineLazy(t._zod,"optout",()=>e.innerType._zod.optout),Y.defineLazy(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(s=>Y.finalizeIssue(s,n,G.config()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(o=>Y.finalizeIssue(o,n,G.config()))},input:r.value}),r.issues=[],r.fallback=!0),r)}});w.$ZodNaN=G.$constructor("$ZodNaN",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)});w.$ZodPipe=G.$constructor("$ZodPipe",(t,e)=>{w.$ZodType.init(t,e),Y.defineLazy(t._zod,"values",()=>e.in._zod.values),Y.defineLazy(t._zod,"optin",()=>e.in._zod.optin),Y.defineLazy(t._zod,"optout",()=>e.out._zod.optout),Y.defineLazy(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){let o=e.out._zod.run(r,n);return o instanceof Promise?o.then(s=>Gh(s,e.in,n)):Gh(o,e.in,n)}let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(o=>Gh(o,e.out,n)):Gh(i,e.out,n)}});function Gh(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues,fallback:t.fallback},r)}w.$ZodCodec=G.$constructor("$ZodCodec",(t,e)=>{w.$ZodType.init(t,e),Y.defineLazy(t._zod,"values",()=>e.in._zod.values),Y.defineLazy(t._zod,"optin",()=>e.in._zod.optin),Y.defineLazy(t._zod,"optout",()=>e.out._zod.optout),Y.defineLazy(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let o=e.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Yh(s,e,n)):Yh(o,e,n)}else{let o=e.out._zod.run(r,n);return o instanceof Promise?o.then(s=>Yh(s,e,n)):Yh(o,e,n)}}});function Yh(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let i=e.transform(t.value,t);return i instanceof Promise?i.then(o=>Vh(t,o,e.out,r)):Vh(t,i,e.out,r)}else{let i=e.reverseTransform(t.value,t);return i instanceof Promise?i.then(o=>Vh(t,o,e.in,r)):Vh(t,i,e.in,r)}}function Vh(t,e,r,n){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},n)}w.$ZodPreprocess=G.$constructor("$ZodPreprocess",(t,e)=>{w.$ZodPipe.init(t,e)});w.$ZodReadonly=G.$constructor("$ZodReadonly",(t,e)=>{w.$ZodType.init(t,e),Y.defineLazy(t._zod,"propValues",()=>e.innerType._zod.propValues),Y.defineLazy(t._zod,"values",()=>e.innerType._zod.values),Y.defineLazy(t._zod,"optin",()=>e.innerType?._zod?.optin),Y.defineLazy(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(hk):hk(i)}});function hk(t){return t.value=Object.freeze(t.value),t}w.$ZodTemplateLiteral=G.$constructor("$ZodTemplateLiteral",(t,e)=>{w.$ZodType.init(t,e);let r=[];for(let n of e.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let o=i.startsWith("^")?1:0,s=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(o,s))}else if(n===null||Y.primitiveTypes.has(typeof n))r.push(Y.escapeRegex(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:t,expected:"string",code:"invalid_type"}),n):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),n)});w.$ZodFunction=G.$constructor("$ZodFunction",(t,e)=>(w.$ZodType.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let i=t._def.input?(0,xl.parse)(t._def.input,n):n,o=Reflect.apply(r,this,i);return t._def.output?(0,xl.parse)(t._def.output,o):o}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let i=t._def.input?await(0,xl.parseAsync)(t._def.input,n):n,o=await Reflect.apply(r,this,i);return t._def.output?await(0,xl.parseAsync)(t._def.output,o):o}},t._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let n=t.constructor;return Array.isArray(r[0])?new n({type:"function",input:new w.$ZodTuple({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new n({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let n=t.constructor;return new n({type:"function",input:t._def.input,output:r})},t));w.$ZodPromise=G.$constructor("$ZodPromise",(t,e)=>{w.$ZodType.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>e.innerType._zod.run({value:i,issues:[]},n))});w.$ZodLazy=G.$constructor("$ZodLazy",(t,e)=>{w.$ZodType.init(t,e),Y.defineLazy(t._zod,"innerType",()=>{let r=e;return r._cachedInner||(r._cachedInner=e.getter()),r._cachedInner}),Y.defineLazy(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),Y.defineLazy(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),Y.defineLazy(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),Y.defineLazy(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(r,n)=>t._zod.innerType._zod.run(r,n)});w.$ZodCustom=G.$constructor("$ZodCustom",(t,e)=>{Zh.$ZodCheck.init(t,e),w.$ZodType.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(o=>fk(o,r,n,t));fk(i,r,n,t)}});function fk(t,e,r,n){if(!t){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push(Y.issue(i))}}});var Ck=y((ji,Ik)=>{"use strict";var mK=ji&&ji.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),yK=ji&&ji.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),EK=ji&&ji.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&mK(e,t,r);return yK(e,t),e};Object.defineProperty(ji,"__esModule",{value:!0});ji.default=CK;var Kh=EK(pe()),IK=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(i){return t[i]??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",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Kh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.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 ${i.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\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 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return i.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 ${Kh.stringifyPrimitive(i.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: ${Kh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()} ${s.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 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${i.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`${r[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${i.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${i.keys.length>1?"\u0629":""}: ${Kh.joinValues(i.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.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 ${i.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function CK(){return{localeError:IK()}}Ik.exports=ji.default});var Sk=y((zi,bk)=>{"use strict";var bK=zi&&zi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),SK=zi&&zi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wK=zi&&zi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&bK(e,t,r);return SK(e,t),e};Object.defineProperty(zi,"__esModule",{value:!0});zi.default=BK;var Xh=wK(pe()),_K=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(i){return t[i]??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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Xh.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${i.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Xh.stringifyPrimitive(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${Xh.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??i.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${i.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${i.keys.length>1?"lar":""}: ${Xh.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${i.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function BK(){return{localeError:_K()}}bk.exports=zi.default});var Bk=y((qi,_k)=>{"use strict";var vK=qi&&qi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),QK=qi&&qi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),TK=qi&&qi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&vK(e,t,r);return QK(e,t),e};Object.defineProperty(qi,"__esModule",{value:!0});qi.default=kK;var ef=TK(pe());function wk(t,e,r,n){let i=Math.abs(t),o=i%10,s=i%100;return s>=11&&s<=19?n:o===1?e:o>=2&&o<=4?r:n}var DK=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(i){return t[i]??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",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=ef.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return i.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 ${ef.stringifyPrimitive(i.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 ${ef.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);if(s){let a=Number(i.maximum),c=wk(a,s.unit.one,s.unit.few,s.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 ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${i.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 ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);if(s){let a=Number(i.minimum),c=wk(a,s.unit.one,s.unit.few,s.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 ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${i.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 ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${i.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${ef.joinValues(i.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${i.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 ${i.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function kK(){return{localeError:DK()}}_k.exports=qi.default});var Qk=y((Hi,vk)=>{"use strict";var RK=Hi&&Hi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),NK=Hi&&Hi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),OK=Hi&&Hi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&RK(e,t,r);return NK(e,t),e};Object.defineProperty(Hi,"__esModule",{value:!0});Hi.default=UK;var tf=OK(pe()),xK=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(i){return t[i]??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",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=tf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${tf.stringifyPrimitive(i.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${tf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${i.maximum.toString()} ${s.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 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${i.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;if(o.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 "${o.prefix}"`;if(o.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 "${o.suffix}"`;if(o.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 "${o.includes}"`;if(o.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 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${i.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u043E\u0432\u0435":""}: ${tf.joinValues(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function UK(){return{localeError:xK()}}vk.exports=Hi.default});var Dk=y((Gi,Tk)=>{"use strict";var MK=Gi&&Gi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),PK=Gi&&Gi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),LK=Gi&&Gi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&MK(e,t,r);return PK(e,t),e};Object.defineProperty(Gi,"__esModule",{value:!0});Gi.default=FK;var rf=LK(pe()),$K=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(i){return t[i]??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",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=rf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${i.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${rf.stringifyPrimitive(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${rf.joinValues(i.values," o ")}`;case"too_big":{let o=i.inclusive?"com a m\xE0xim":"menys de",s=e(i.origin);return s?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${o} ${i.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"com a m\xEDnim":"m\xE9s de",s=e(i.origin);return s?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${o} ${i.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${rf.joinValues(i.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${i.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${i.origin}`;default:return"Entrada inv\xE0lida"}}};function FK(){return{localeError:$K()}}Tk.exports=Gi.default});var Rk=y((Yi,kk)=>{"use strict";var jK=Yi&&Yi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zK=Yi&&Yi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),qK=Yi&&Yi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&jK(e,t,r);return zK(e,t),e};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.default=GK;var nf=qK(pe()),HK=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(i){return t[i]??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",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=nf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${i.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${nf.stringifyPrimitive(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${nf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${nf.joinValues(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}};function GK(){return{localeError:HK()}}kk.exports=Yi.default});var Ok=y((Vi,Nk)=>{"use strict";var YK=Vi&&Vi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),VK=Vi&&Vi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),WK=Vi&&Vi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&YK(e,t,r);return VK(e,t),e};Object.defineProperty(Vi,"__esModule",{value:!0});Vi.default=ZK;var of=WK(pe()),JK=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(i){return t[i]??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-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=of.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ugyldigt input: forventede instanceof ${i.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig v\xE6rdi: forventede ${of.stringifyPrimitive(i.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${of.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin),a=n[i.origin]??i.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${i.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin),a=n[i.origin]??i.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${i.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??i.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${of.joinValues(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${i.origin}`;default:return"Ugyldigt input"}}};function ZK(){return{localeError:JK()}}Nk.exports=Vi.default});var Uk=y((Wi,xk)=>{"use strict";var KK=Wi&&Wi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),XK=Wi&&Wi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),e5=Wi&&Wi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&KK(e,t,r);return XK(e,t),e};Object.defineProperty(Wi,"__esModule",{value:!0});Wi.default=r5;var sf=e5(pe()),t5=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(i){return t[i]??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",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=sf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${i.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${sf.stringifyPrimitive(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${sf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ist`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ist`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??i.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${sf.joinValues(i.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${i.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${i.origin}`;default:return"Ung\xFCltige Eingabe"}}};function r5(){return{localeError:t5()}}xk.exports=Wi.default});var Pk=y((Ji,Mk)=>{"use strict";var n5=Ji&&Ji.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),i5=Ji&&Ji.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),o5=Ji&&Ji.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&n5(e,t,r);return i5(e,t),e};Object.defineProperty(Ji,"__esModule",{value:!0});Ji.default=a5;var af=o5(pe()),s5=()=>{let t={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 e(i){return t[i]??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",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=af.parsedType(i.input),a=n[s]??s;return typeof i.expected=="string"&&/^[A-Z]/.test(i.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 ${i.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`:`\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 ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`}case"invalid_value":return i.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 ${af.stringifyPrimitive(i.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 ${af.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${i.maximum.toString()} ${s.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 ${i.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${i.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${i.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${i.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${af.joinValues(i.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${i.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 ${i.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function a5(){return{localeError:s5()}}Mk.exports=Ji.default});var rb=y((Zi,Lk)=>{"use strict";var c5=Zi&&Zi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),l5=Zi&&Zi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),u5=Zi&&Zi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&c5(e,t,r);return l5(e,t),e};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.default=A5;var cf=u5(pe()),d5=()=>{let t={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 e(i){return t[i]??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",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=cf.parsedType(i.input),a=n[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${cf.stringifyPrimitive(i.values[0])}`:`Invalid option: expected one of ${cf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Too big: expected ${i.origin??"value"} to have ${o}${i.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Too small: expected ${i.origin} to have ${o}${i.minimum.toString()} ${s.unit}`:`Too small: expected ${i.origin} to be ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;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]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${cf.joinValues(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function A5(){return{localeError:d5()}}Lk.exports=Zi.default});var Fk=y((Ki,$k)=>{"use strict";var p5=Ki&&Ki.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),h5=Ki&&Ki.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),f5=Ki&&Ki.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&p5(e,t,r);return h5(e,t),e};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.default=m5;var lf=f5(pe()),g5=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(i){return t[i]??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",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=lf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${i.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return i.values.length===1?`Nevalida enigo: atendi\u011Dis ${lf.stringifyPrimitive(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${lf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Tro malgranda: atendi\u011Dis ke ${i.origin} havu ${o}${i.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${i.origin} estu ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} \u015Dlosilo${i.keys.length>1?"j":""}: ${lf.joinValues(i.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function m5(){return{localeError:g5()}}$k.exports=Ki.default});var zk=y((Xi,jk)=>{"use strict";var y5=Xi&&Xi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),E5=Xi&&Xi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),I5=Xi&&Xi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&y5(e,t,r);return E5(e,t),e};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.default=b5;var uf=I5(pe()),C5=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(i){return t[i]??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",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={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 i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=uf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${i.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${uf.stringifyPrimitive(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${uf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin),a=n[i.origin]??i.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${i.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin),a=n[i.origin]??i.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${i.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${r[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${uf.joinValues(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[i.origin]??i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[i.origin]??i.origin}`;default:return"Entrada inv\xE1lida"}}};function b5(){return{localeError:C5()}}jk.exports=Xi.default});var Hk=y((eo,qk)=>{"use strict";var S5=eo&&eo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),w5=eo&&eo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),_5=eo&&eo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&S5(e,t,r);return w5(e,t),e};Object.defineProperty(eo,"__esModule",{value:!0});eo.default=v5;var df=_5(pe()),B5=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(i){return t[i]??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",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=df.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \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 ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return i.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${df.stringifyPrimitive(i.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 ${df.joinValues(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??i.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 ${i.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${i.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${df.joinValues(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${i.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 ${i.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function v5(){return{localeError:B5()}}qk.exports=eo.default});var Yk=y((to,Gk)=>{"use strict";var Q5=to&&to.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),T5=to&&to.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),D5=to&&to.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Q5(e,t,r);return T5(e,t),e};Object.defineProperty(to,"__esModule",{value:!0});to.default=R5;var Af=D5(pe()),k5=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(i){return t[i]??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",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Af.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Virheellinen tyyppi: odotettiin instanceof ${i.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Af.stringifyPrimitive(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${Af.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${i.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${i.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${Af.joinValues(i.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 R5(){return{localeError:k5()}}Gk.exports=to.default});var Wk=y((ro,Vk)=>{"use strict";var N5=ro&&ro.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),O5=ro&&ro.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),x5=ro&&ro.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&N5(e,t,r);return O5(e,t),e};Object.defineProperty(ro,"__esModule",{value:!0});ro.default=M5;var pf=x5(pe()),U5=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},n={string:"cha\xEEne",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:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=pf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : instanceof ${i.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${pf.stringifyPrimitive(i.values[0])} attendu`:`Option invalide : une valeur parmi ${pf.joinValues(i.values,"|")} attendue`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Trop grand : ${n[i.origin]??"valeur"} doit ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n[i.origin]??"valeur"} doit \xEAtre ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Trop petit : ${n[i.origin]??"valeur"} doit ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Trop petit : ${n[i.origin]??"valeur"} doit \xEAtre ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${r[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${pf.joinValues(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};function M5(){return{localeError:U5()}}Vk.exports=ro.default});var Zk=y((no,Jk)=>{"use strict";var P5=no&&no.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),L5=no&&no.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),$5=no&&no.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&P5(e,t,r);return L5(e,t),e};Object.defineProperty(no,"__esModule",{value:!0});no.default=j5;var hf=$5(pe()),F5=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??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",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=hf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : attendu instanceof ${i.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${hf.stringifyPrimitive(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${hf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u2264":"<",s=e(i.origin);return s?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${o}${i.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u2265":">",s=e(i.origin);return s?`Trop petit : attendu que ${i.origin} ait ${o}${i.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${i.origin} soit ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${hf.joinValues(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};function j5(){return{localeError:F5()}}Jk.exports=no.default});var Xk=y((io,Kk)=>{"use strict";var z5=io&&io.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),q5=io&&io.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),H5=io&&io.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&z5(e,t,r);return q5(e,t),e};Object.defineProperty(io,"__esModule",{value:!0});io.default=Y5;var ff=H5(pe()),G5=()=>{let t={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"}},e={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?t[l]:void 0,n=l=>{let u=r(l);return u?u.label:l??t.unknown.label},i=l=>`\u05D4${n(l)}`,o=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",s=l=>l?e[l]??null:null,a={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"},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"},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"},jwt:{label:"JWT",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??""]??n(u),A=ff.parsedType(l.input),p=c[A]??t[A]?.label??A;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 ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}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 ${ff.stringifyPrimitive(l.values[0])}`;let u=l.values.map(p=>ff.stringifyPrimitive(p));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=s(l.origin),d=i(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 h=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 ${h}`}if(l.origin==="array"||l.origin==="set"){let h=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",f=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} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${f}`.trim()}let A=l.inclusive?"<=":"<",p=o(l.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${A}${l.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${A}${l.maximum.toString()}`}case"too_small":{let u=s(l.origin),d=i(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 h=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 ${h}`}if(l.origin==="array"||l.origin==="set"){let h=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let E=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`}let f=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} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${f}`.trim()}let A=l.inclusive?">=":">",p=o(l.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${A}${l.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${A}${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=a[u.format],A=d?.label??u.format,h=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${A} \u05DC\u05D0 ${h}`}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"}: ${ff.joinValues(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${i(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Y5(){return{localeError:G5()}}Kk.exports=io.default});var tR=y((oo,eR)=>{"use strict";var V5=oo&&oo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),W5=oo&&oo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),J5=oo&&oo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&V5(e,t,r);return W5(e,t),e};Object.defineProperty(oo,"__esModule",{value:!0});oo.default=K5;var gf=J5(pe()),Z5=()=>{let t={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function e(i){return t[i]??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",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},n={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 i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=gf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${i.expected}, a primljeno je ${a}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${a}`}case"invalid_value":return i.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${gf.stringifyPrimitive(i.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${gf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin),a=n[i.origin]??i.origin;return s?`Preveliko: o\u010Dekivano da ${a??"vrijednost"} ima ${o}${i.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${a??"vrijednost"} bude ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin),a=n[i.origin]??i.origin;return s?`Premalo: o\u010Dekivano da ${a} ima ${o}${i.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${a} bude ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${r[o.format]??i.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${i.divisor}`;case"unrecognized_keys":return`Neprepoznat${i.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${gf.joinValues(i.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${n[i.origin]??i.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${n[i.origin]??i.origin}`;default:return"Neispravan unos"}}};function K5(){return{localeError:Z5()}}eR.exports=oo.default});var nR=y((so,rR)=>{"use strict";var X5=so&&so.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),e9=so&&so.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),t9=so&&so.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&X5(e,t,r);return e9(e,t),e};Object.defineProperty(so,"__esModule",{value:!0});so.default=n9;var mf=t9(pe()),r9=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(i){return t[i]??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",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=mf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${i.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${mf.stringifyPrimitive(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${mf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${i.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${o}${i.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??i.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${i.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${mf.joinValues(i.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${i.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${i.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function n9(){return{localeError:r9()}}rR.exports=so.default});var sR=y((ao,oR)=>{"use strict";var i9=ao&&ao.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),o9=ao&&ao.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),s9=ao&&ao.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&i9(e,t,r);return o9(e,t),e};Object.defineProperty(ao,"__esModule",{value:!0});ao.default=c9;var yf=s9(pe());function iR(t,e,r){return Math.abs(t)===1?e:r}function Ul(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=t[t.length-1];return t+(e.includes(r)?"\u0576":"\u0568")}var a9=()=>{let t={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"}};function e(i){return t[i]??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",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",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=yf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.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 ${i.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\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 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return i.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 ${yf.stringifyPrimitive(i.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 ${yf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);if(s){let a=Number(i.maximum),c=iR(a,s.unit.one,s.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 ${Ul(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${i.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 ${Ul(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);if(s){let a=Number(i.minimum),c=iR(a,s.unit.one,s.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 ${Ul(i.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${i.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 ${Ul(i.origin)} \u056C\u056B\u0576\u056B ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.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 ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[o.format]??i.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 ${i.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${i.keys.length>1?"\u0576\u0565\u0580":""}. ${yf.joinValues(i.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Ul(i.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 ${Ul(i.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function c9(){return{localeError:a9()}}oR.exports=ao.default});var cR=y((co,aR)=>{"use strict";var l9=co&&co.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),u9=co&&co.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),d9=co&&co.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&l9(e,t,r);return u9(e,t),e};Object.defineProperty(co,"__esModule",{value:!0});co.default=p9;var Ef=d9(pe()),A9=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(i){return t[i]??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",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ef.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Input tidak valid: diharapkan instanceof ${i.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${Ef.stringifyPrimitive(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${Ef.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${o}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Terlalu kecil: diharapkan ${i.origin} memiliki ${o}${i.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${Ef.joinValues(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};function p9(){return{localeError:A9()}}aR.exports=co.default});var uR=y((lo,lR)=>{"use strict";var h9=lo&&lo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),f9=lo&&lo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),g9=lo&&lo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&h9(e,t,r);return f9(e,t),e};Object.defineProperty(lo,"__esModule",{value:!0});lo.default=y9;var If=g9(pe()),m9=()=>{let t={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function e(i){return t[i]??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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=If.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${i.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return i.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${If.stringifyPrimitive(i.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${If.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} hafi ${o}${i.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} s\xE9 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} hafi ${o}${i.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} s\xE9 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??i.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${If.joinValues(i.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${i.origin}`;default:return"Rangt gildi"}}};function y9(){return{localeError:m9()}}lR.exports=lo.default});var AR=y((uo,dR)=>{"use strict";var E9=uo&&uo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),I9=uo&&uo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),C9=uo&&uo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&E9(e,t,r);return I9(e,t),e};Object.defineProperty(uo,"__esModule",{value:!0});uo.default=S9;var Cf=C9(pe()),b9=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(i){return t[i]??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",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Cf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Input non valido: atteso instanceof ${i.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return i.values.length===1?`Input non valido: atteso ${Cf.stringifyPrimitive(i.values[0])}`:`Opzione non valida: atteso uno tra ${Cf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Troppo grande: ${i.origin??"valore"} deve avere ${o}${i.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Troppo piccolo: ${i.origin} deve avere ${o}${i.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${i.origin} deve essere ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${r[o.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${Cf.joinValues(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};function S9(){return{localeError:b9()}}dR.exports=uo.default});var hR=y((Ao,pR)=>{"use strict";var w9=Ao&&Ao.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),_9=Ao&&Ao.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),B9=Ao&&Ao.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&w9(e,t,r);return _9(e,t),e};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.default=Q9;var bf=B9(pe()),v9=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(i){return t[i]??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",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=bf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${bf.stringifyPrimitive(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${bf.joinValues(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=e(i.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=e(i.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${i.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${i.keys.length>1?"\u7FA4":""}: ${bf.joinValues(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Q9(){return{localeError:v9()}}pR.exports=Ao.default});var gR=y((po,fR)=>{"use strict";var T9=po&&po.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),D9=po&&po.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),k9=po&&po.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&T9(e,t,r);return D9(e,t),e};Object.defineProperty(po,"__esModule",{value:!0});po.default=N9;var Sf=k9(pe()),R9=()=>{let t={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(i){return t[i]??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",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",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={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 i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Sf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.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 ${i.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\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 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return i.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${Sf.stringifyPrimitive(i.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${Sf.joinValues(i.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\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 ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.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 ${i.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"-\u10D8\u10D7`:o.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 "${o.suffix}"-\u10D8\u10D7`:o.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 "${o.includes}"-\u10E1`:o.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 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${i.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${i.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${Sf.joinValues(i.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${i.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${i.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function N9(){return{localeError:R9()}}fR.exports=po.default});var nb=y((ho,mR)=>{"use strict";var O9=ho&&ho.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),x9=ho&&ho.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),U9=ho&&ho.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&O9(e,t,r);return x9(e,t),e};Object.defineProperty(ho,"__esModule",{value:!0});ho.default=P9;var wf=U9(pe()),M9=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(i){return t[i]??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",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},n={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 i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=wf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.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 ${i.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\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 ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return i.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 ${wf.stringifyPrimitive(i.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 ${wf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${wf.joinValues(i.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 ${i.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 ${i.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 P9(){return{localeError:M9()}}mR.exports=ho.default});var ER=y((Ml,yR)=>{"use strict";var L9=Ml&&Ml.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ml,"__esModule",{value:!0});Ml.default=F9;var $9=L9(nb());function F9(){return(0,$9.default)()}yR.exports=Ml.default});var CR=y((fo,IR)=>{"use strict";var j9=fo&&fo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),z9=fo&&fo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),q9=fo&&fo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&j9(e,t,r);return z9(e,t),e};Object.defineProperty(fo,"__esModule",{value:!0});fo.default=G9;var _f=q9(pe()),H9=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(i){return t[i]??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",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=_f.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${_f.stringifyPrimitive(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${_f.joinValues(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(i.origin),c=a?.unit??"\uC694\uC18C";return a?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${c} ${o}${s}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${o}${s}`}case"too_small":{let o=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=e(i.origin),c=a?.unit??"\uC694\uC18C";return a?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${c} ${o}${s}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??i.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${i.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${_f.joinValues(i.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${i.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${i.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function G9(){return{localeError:H9()}}IR.exports=fo.default});var wR=y((go,SR)=>{"use strict";var Y9=go&&go.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),V9=go&&go.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),W9=go&&go.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Y9(e,t,r);return V9(e,t),e};Object.defineProperty(go,"__esModule",{value:!0});go.default=Z9;var Bf=W9(pe()),qd=t=>t.charAt(0).toUpperCase()+t.slice(1);function bR(t){let e=Math.abs(t),r=e%10,n=e%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}var J9=()=>{let t={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 e(i,o,s,a){let c=t[i]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[a][s?"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",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},n={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 i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Bf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${i.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return i.values.length===1?`Privalo b\u016Bti ${Bf.stringifyPrimitive(i.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${Bf.joinValues(i.values,"|")} pasirinkim\u0173`;case"too_big":{let o=n[i.origin]??i.origin,s=e(i.origin,bR(Number(i.maximum)),i.inclusive??!1,"smaller");if(s?.verb)return`${qd(o??i.origin??"reik\u0161m\u0117")} ${s.verb} ${i.maximum.toString()} ${s.unit??"element\u0173"}`;let a=i.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${qd(o??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${i.maximum.toString()} ${s?.unit}`}case"too_small":{let o=n[i.origin]??i.origin,s=e(i.origin,bR(Number(i.minimum)),i.inclusive??!1,"bigger");if(s?.verb)return`${qd(o??i.origin??"reik\u0161m\u0117")} ${s.verb} ${i.minimum.toString()} ${s.unit??"element\u0173"}`;let a=i.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${qd(o??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${i.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??i.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${Bf.joinValues(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=n[i.origin]??i.origin;return`${qd(o??i.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Z9(){return{localeError:J9()}}SR.exports=go.default});var BR=y((mo,_R)=>{"use strict";var K9=mo&&mo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),X9=mo&&mo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),eX=mo&&mo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&K9(e,t,r);return X9(e,t),e};Object.defineProperty(mo,"__esModule",{value:!0});mo.default=rX;var vf=eX(pe()),tX=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(i){return t[i]??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",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=vf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${vf.stringifyPrimitive(i.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 ${vf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.maximum.toString()} ${s.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 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`Invalid ${r[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`${i.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"}: ${vf.joinValues(i.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${i.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 ${i.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function rX(){return{localeError:tX()}}_R.exports=mo.default});var QR=y((yo,vR)=>{"use strict";var nX=yo&&yo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),iX=yo&&yo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),oX=yo&&yo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&nX(e,t,r);return iX(e,t),e};Object.defineProperty(yo,"__esModule",{value:!0});yo.default=aX;var Qf=oX(pe()),sX=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(i){return t[i]??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",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Qf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Input tidak sah: dijangka instanceof ${i.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${Qf.stringifyPrimitive(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${Qf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Terlalu besar: dijangka ${i.origin??"nilai"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Terlalu kecil: dijangka ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${Qf.joinValues(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};function aX(){return{localeError:sX()}}vR.exports=yo.default});var DR=y((Eo,TR)=>{"use strict";var cX=Eo&&Eo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lX=Eo&&Eo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),uX=Eo&&Eo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&cX(e,t,r);return lX(e,t),e};Object.defineProperty(Eo,"__esModule",{value:!0});Eo.default=AX;var Tf=uX(pe()),dX=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(i){return t[i]??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",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Tf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ongeldige invoer: verwacht instanceof ${i.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${Tf.stringifyPrimitive(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${Tf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin),a=i.origin==="date"?"laat":i.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} is`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin),a=i.origin==="date"?"vroeg":i.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} is`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${Tf.joinValues(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};function AX(){return{localeError:dX()}}TR.exports=Eo.default});var RR=y((Io,kR)=>{"use strict";var pX=Io&&Io.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hX=Io&&Io.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),fX=Io&&Io.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&pX(e,t,r);return hX(e,t),e};Object.defineProperty(Io,"__esModule",{value:!0});Io.default=mX;var Df=fX(pe()),gX=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(i){return t[i]??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-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Df.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventet instanceof ${i.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${Df.stringifyPrimitive(i.values[0])}`:`Ugyldig valg: forventet en av ${Df.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${Df.joinValues(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function mX(){return{localeError:gX()}}kR.exports=Io.default});var OR=y((Co,NR)=>{"use strict";var yX=Co&&Co.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),EX=Co&&Co.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),IX=Co&&Co.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&yX(e,t,r);return EX(e,t),e};Object.defineProperty(Co,"__esModule",{value:!0});Co.default=bX;var kf=IX(pe()),CX=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(i){return t[i]??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",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=kf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`F\xE2sit giren: umulan instanceof ${i.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${kf.stringifyPrimitive(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${kf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=i;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??i.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${i.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${i.keys.length>1?"s":""}: ${kf.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${i.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function bX(){return{localeError:CX()}}NR.exports=Co.default});var UR=y((bo,xR)=>{"use strict";var SX=bo&&bo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),wX=bo&&bo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),_X=bo&&bo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&SX(e,t,r);return wX(e,t),e};Object.defineProperty(bo,"__esModule",{value:!0});bo.default=vX;var Rf=_X(pe()),BX=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(i){return t[i]??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",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Rf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return i.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Rf.stringifyPrimitive(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${Rf.joinValues(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??i.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${i.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${i.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${Rf.joinValues(i.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${i.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 ${i.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function vX(){return{localeError:BX()}}xR.exports=bo.default});var PR=y((So,MR)=>{"use strict";var QX=So&&So.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),TX=So&&So.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),DX=So&&So.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&QX(e,t,r);return TX(e,t),e};Object.defineProperty(So,"__esModule",{value:!0});So.default=RX;var Nf=DX(pe()),kX=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(i){return t[i]??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",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},n={nan:"NaN",number:"liczba",array:"tablica"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Nf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${i.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Nf.stringifyPrimitive(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${Nf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??i.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${Nf.joinValues(i.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${i.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${i.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function RX(){return{localeError:kX()}}MR.exports=So.default});var $R=y((wo,LR)=>{"use strict";var NX=wo&&wo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),OX=wo&&wo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),xX=wo&&wo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&NX(e,t,r);return OX(e,t),e};Object.defineProperty(wo,"__esModule",{value:!0});wo.default=MX;var Of=xX(pe()),UX=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(i){return t[i]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",number:"n\xFAmero",null:"nulo"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Of.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Tipo inv\xE1lido: esperado instanceof ${i.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: esperado ${Of.stringifyPrimitive(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${Of.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${o}${i.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Muito pequeno: esperado que ${i.origin} tivesse ${o}${i.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${r[o.format]??i.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${Of.joinValues(i.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${i.origin}`;default:return"Campo inv\xE1lido"}}};function MX(){return{localeError:UX()}}LR.exports=wo.default});var jR=y((_o,FR)=>{"use strict";var PX=_o&&_o.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),LX=_o&&_o.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),$X=_o&&_o.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&PX(e,t,r);return LX(e,t),e};Object.defineProperty(_o,"__esModule",{value:!0});_o.default=jX;var xf=$X(pe()),FX=()=>{let t={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 e(i){return t[i]??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",jwt:"JWT",template_literal:"intrare"},n={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 i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=xf.parsedType(i.input),a=n[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${a}`}case"invalid_value":return i.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${xf.stringifyPrimitive(i.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${xf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Prea mare: a\u0219teptat ca ${i.origin??"valoarea"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${i.origin??"valoarea"} s\u0103 fie ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Prea mic: a\u0219teptat ca ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${i.origin} s\u0103 fie ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${r[o.format]??i.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${i.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${xf.joinValues(i.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${i.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${i.origin}`;default:return"Intrare invalid\u0103"}}};function jX(){return{localeError:FX()}}FR.exports=_o.default});var HR=y((Bo,qR)=>{"use strict";var zX=Bo&&Bo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qX=Bo&&Bo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),HX=Bo&&Bo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&zX(e,t,r);return qX(e,t),e};Object.defineProperty(Bo,"__esModule",{value:!0});Bo.default=YX;var Uf=HX(pe());function zR(t,e,r,n){let i=Math.abs(t),o=i%10,s=i%100;return s>=11&&s<=19?n:o===1?e:o>=2&&o<=4?r:n}var GX=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(i){return t[i]??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",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Uf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Uf.stringifyPrimitive(i.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 ${Uf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);if(s){let a=Number(i.maximum),c=zR(a,s.unit.one,s.unit.few,s.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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);if(s){let a=Number(i.minimum),c=zR(a,s.unit.one,s.unit.few,s.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 ${i.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.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 ${i.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${i.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0438":""}: ${Uf.joinValues(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${i.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 ${i.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 YX(){return{localeError:GX()}}qR.exports=Bo.default});var YR=y((vo,GR)=>{"use strict";var VX=vo&&vo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),WX=vo&&vo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),JX=vo&&vo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&VX(e,t,r);return WX(e,t),e};Object.defineProperty(vo,"__esModule",{value:!0});vo.default=KX;var Mf=JX(pe()),ZX=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(i){return t[i]??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",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Mf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${i.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Mf.stringifyPrimitive(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${Mf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${o}${i.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${o}${i.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??i.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${Mf.joinValues(i.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};function KX(){return{localeError:ZX()}}GR.exports=vo.default});var WR=y((Qo,VR)=>{"use strict";var XX=Qo&&Qo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),e8=Qo&&Qo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),t8=Qo&&Qo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&XX(e,t,r);return e8(e,t),e};Object.defineProperty(Qo,"__esModule",{value:!0});Qo.default=n8;var Pf=t8(pe()),r8=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(i){return t[i]??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-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Pf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${i.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${Pf.stringifyPrimitive(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${Pf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${Pf.joinValues(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${i.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function n8(){return{localeError:r8()}}VR.exports=Qo.default});var ZR=y((To,JR)=>{"use strict";var i8=To&&To.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),o8=To&&To.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),s8=To&&To.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&i8(e,t,r);return o8(e,t),e};Object.defineProperty(To,"__esModule",{value:!0});To.default=c8;var Lf=s8(pe()),a8=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(i){return t[i]??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",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Lf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.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 ${i.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\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 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return i.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 ${Lf.stringifyPrimitive(i.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 ${Lf.joinValues(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\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 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} ${s.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 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\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 ${i.origin} ${o}${i.minimum.toString()} ${s.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 ${i.origin} ${o}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.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[o.format]??i.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${i.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${i.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${Lf.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.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`${i.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 c8(){return{localeError:a8()}}JR.exports=To.default});var XR=y((Do,KR)=>{"use strict";var l8=Do&&Do.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),u8=Do&&Do.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),d8=Do&&Do.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&l8(e,t,r);return u8(e,t),e};Object.defineProperty(Do,"__esModule",{value:!0});Do.default=p8;var $f=d8(pe()),A8=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(i){return t[i]??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",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},n={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 i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=$f.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.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 ${i.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\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 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return i.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${$f.stringifyPrimitive(i.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 ${$f.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=e(i.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=e(i.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.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 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??i.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 ${i.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: ${$f.joinValues(i.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.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 ${i.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function p8(){return{localeError:A8()}}KR.exports=Do.default});var tN=y((ko,eN)=>{"use strict";var h8=ko&&ko.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),f8=ko&&ko.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),g8=ko&&ko.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&h8(e,t,r);return f8(e,t),e};Object.defineProperty(ko,"__esModule",{value:!0});ko.default=y8;var Ff=g8(pe()),m8=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(i){return t[i]??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",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Ff.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${i.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return i.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${Ff.stringifyPrimitive(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${Ff.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${o}${i.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??i.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${i.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${i.keys.length>1?"lar":""}: ${Ff.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${i.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function y8(){return{localeError:m8()}}eN.exports=ko.default});var ib=y((Ro,rN)=>{"use strict";var E8=Ro&&Ro.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),I8=Ro&&Ro.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),C8=Ro&&Ro.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&E8(e,t,r);return I8(e,t),e};Object.defineProperty(Ro,"__esModule",{value:!0});Ro.default=S8;var jf=C8(pe()),b8=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(i){return t[i]??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",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=jf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.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 ${i.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\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 ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return i.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 ${jf.stringifyPrimitive(i.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 ${jf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${i.maximum.toString()} ${s.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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} \u0431\u0443\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0456":""}: ${jf.joinValues(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${i.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 ${i.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 S8(){return{localeError:b8()}}rN.exports=Ro.default});var iN=y((Pl,nN)=>{"use strict";var w8=Pl&&Pl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pl,"__esModule",{value:!0});Pl.default=B8;var _8=w8(ib());function B8(){return(0,_8.default)()}nN.exports=Pl.default});var sN=y((No,oN)=>{"use strict";var v8=No&&No.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Q8=No&&No.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),T8=No&&No.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&v8(e,t,r);return Q8(e,t),e};Object.defineProperty(No,"__esModule",{value:!0});No.default=k8;var zf=T8(pe()),D8=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(i){return t[i]??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",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=zf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${zf.stringifyPrimitive(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${zf.joinValues(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${i.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${o}${i.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u0627 ${o}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${i.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${i.keys.length>1?"\u0632":""}: ${zf.joinValues(i.keys,"\u060C ")}`;case"invalid_key":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function k8(){return{localeError:D8()}}oN.exports=No.default});var cN=y((Oo,aN)=>{"use strict";var R8=Oo&&Oo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),N8=Oo&&Oo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),O8=Oo&&Oo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&R8(e,t,r);return N8(e,t),e};Object.defineProperty(Oo,"__esModule",{value:!0});Oo.default=U8;var qf=O8(pe()),x8=()=>{let t={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 e(i){return t[i]??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",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=qf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${i.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return i.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${qf.stringifyPrimitive(i.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${qf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[o.format]??i.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${i.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${i.keys.length>1?"lar":""}: ${qf.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${i.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function U8(){return{localeError:x8()}}aN.exports=Oo.default});var uN=y((xo,lN)=>{"use strict";var M8=xo&&xo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),P8=xo&&xo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),L8=xo&&xo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&M8(e,t,r);return P8(e,t),e};Object.defineProperty(xo,"__esModule",{value:!0});xo.default=F8;var Hf=L8(pe()),$8=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(i){return t[i]??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",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Hf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Hf.stringifyPrimitive(i.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${Hf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${i.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${s.verb} ${o}${i.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${Hf.joinValues(i.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.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 ${i.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function F8(){return{localeError:$8()}}lN.exports=xo.default});var AN=y((Uo,dN)=>{"use strict";var j8=Uo&&Uo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),z8=Uo&&Uo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),q8=Uo&&Uo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&j8(e,t,r);return z8(e,t),e};Object.defineProperty(Uo,"__esModule",{value:!0});Uo.default=G8;var Gf=q8(pe()),H8=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(i){return t[i]??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",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Gf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Gf.stringifyPrimitive(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${Gf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??i.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${i.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${Gf.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${i.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function G8(){return{localeError:H8()}}dN.exports=Uo.default});var hN=y((Mo,pN)=>{"use strict";var Y8=Mo&&Mo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),V8=Mo&&Mo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),W8=Mo&&Mo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Y8(e,t,r);return V8(e,t),e};Object.defineProperty(Mo,"__esModule",{value:!0});Mo.default=Z8;var Yf=W8(pe()),J8=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(i){return t[i]??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",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Yf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${i.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Yf.stringifyPrimitive(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${Yf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${i.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${i.keys.length>1?"\u5011":""}\uFF1A${Yf.joinValues(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Z8(){return{localeError:J8()}}pN.exports=Mo.default});var gN=y((Po,fN)=>{"use strict";var K8=Po&&Po.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),X8=Po&&Po.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),e7=Po&&Po.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&K8(e,t,r);return X8(e,t),e};Object.defineProperty(Po,"__esModule",{value:!0});Po.default=r7;var Vf=e7(pe()),t7=()=>{let t={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function e(i){return t[i]??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",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,s=Vf.parsedType(i.input),a=n[s]??s;return/^[A-Z]/.test(i.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${i.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return i.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${Vf.stringifyPrimitive(i.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${Vf.joinValues(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",s=e(i.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin??"iye"} ${s.verb} ${o}${i.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${i.maximum}`}case"too_small":{let o=i.inclusive?">=":">",s=e(i.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin} ${s.verb} ${o}${i.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${i.minimum}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${Vf.joinValues(i.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.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 ${i.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function r7(){return{localeError:t7()}}fN.exports=Po.default});var ob=y(F=>{"use strict";var be=F&&F.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(F,"__esModule",{value:!0});F.zhCN=F.vi=F.uz=F.ur=F.uk=F.ua=F.tr=F.th=F.ta=F.sv=F.sl=F.ru=F.ro=F.pt=F.pl=F.ps=F.ota=F.no=F.nl=F.ms=F.mk=F.lt=F.ko=F.km=F.kh=F.ka=F.ja=F.it=F.is=F.id=F.hy=F.hu=F.hr=F.he=F.frCA=F.fr=F.fi=F.fa=F.es=F.eo=F.en=F.el=F.de=F.da=F.cs=F.ca=F.bg=F.be=F.az=F.ar=void 0;F.yo=F.zhTW=void 0;var n7=Ck();Object.defineProperty(F,"ar",{enumerable:!0,get:function(){return be(n7).default}});var i7=Sk();Object.defineProperty(F,"az",{enumerable:!0,get:function(){return be(i7).default}});var o7=Bk();Object.defineProperty(F,"be",{enumerable:!0,get:function(){return be(o7).default}});var s7=Qk();Object.defineProperty(F,"bg",{enumerable:!0,get:function(){return be(s7).default}});var a7=Dk();Object.defineProperty(F,"ca",{enumerable:!0,get:function(){return be(a7).default}});var c7=Rk();Object.defineProperty(F,"cs",{enumerable:!0,get:function(){return be(c7).default}});var l7=Ok();Object.defineProperty(F,"da",{enumerable:!0,get:function(){return be(l7).default}});var u7=Uk();Object.defineProperty(F,"de",{enumerable:!0,get:function(){return be(u7).default}});var d7=Pk();Object.defineProperty(F,"el",{enumerable:!0,get:function(){return be(d7).default}});var A7=rb();Object.defineProperty(F,"en",{enumerable:!0,get:function(){return be(A7).default}});var p7=Fk();Object.defineProperty(F,"eo",{enumerable:!0,get:function(){return be(p7).default}});var h7=zk();Object.defineProperty(F,"es",{enumerable:!0,get:function(){return be(h7).default}});var f7=Hk();Object.defineProperty(F,"fa",{enumerable:!0,get:function(){return be(f7).default}});var g7=Yk();Object.defineProperty(F,"fi",{enumerable:!0,get:function(){return be(g7).default}});var m7=Wk();Object.defineProperty(F,"fr",{enumerable:!0,get:function(){return be(m7).default}});var y7=Zk();Object.defineProperty(F,"frCA",{enumerable:!0,get:function(){return be(y7).default}});var E7=Xk();Object.defineProperty(F,"he",{enumerable:!0,get:function(){return be(E7).default}});var I7=tR();Object.defineProperty(F,"hr",{enumerable:!0,get:function(){return be(I7).default}});var C7=nR();Object.defineProperty(F,"hu",{enumerable:!0,get:function(){return be(C7).default}});var b7=sR();Object.defineProperty(F,"hy",{enumerable:!0,get:function(){return be(b7).default}});var S7=cR();Object.defineProperty(F,"id",{enumerable:!0,get:function(){return be(S7).default}});var w7=uR();Object.defineProperty(F,"is",{enumerable:!0,get:function(){return be(w7).default}});var _7=AR();Object.defineProperty(F,"it",{enumerable:!0,get:function(){return be(_7).default}});var B7=hR();Object.defineProperty(F,"ja",{enumerable:!0,get:function(){return be(B7).default}});var v7=gR();Object.defineProperty(F,"ka",{enumerable:!0,get:function(){return be(v7).default}});var Q7=ER();Object.defineProperty(F,"kh",{enumerable:!0,get:function(){return be(Q7).default}});var T7=nb();Object.defineProperty(F,"km",{enumerable:!0,get:function(){return be(T7).default}});var D7=CR();Object.defineProperty(F,"ko",{enumerable:!0,get:function(){return be(D7).default}});var k7=wR();Object.defineProperty(F,"lt",{enumerable:!0,get:function(){return be(k7).default}});var R7=BR();Object.defineProperty(F,"mk",{enumerable:!0,get:function(){return be(R7).default}});var N7=QR();Object.defineProperty(F,"ms",{enumerable:!0,get:function(){return be(N7).default}});var O7=DR();Object.defineProperty(F,"nl",{enumerable:!0,get:function(){return be(O7).default}});var x7=RR();Object.defineProperty(F,"no",{enumerable:!0,get:function(){return be(x7).default}});var U7=OR();Object.defineProperty(F,"ota",{enumerable:!0,get:function(){return be(U7).default}});var M7=UR();Object.defineProperty(F,"ps",{enumerable:!0,get:function(){return be(M7).default}});var P7=PR();Object.defineProperty(F,"pl",{enumerable:!0,get:function(){return be(P7).default}});var L7=$R();Object.defineProperty(F,"pt",{enumerable:!0,get:function(){return be(L7).default}});var $7=jR();Object.defineProperty(F,"ro",{enumerable:!0,get:function(){return be($7).default}});var F7=HR();Object.defineProperty(F,"ru",{enumerable:!0,get:function(){return be(F7).default}});var j7=YR();Object.defineProperty(F,"sl",{enumerable:!0,get:function(){return be(j7).default}});var z7=WR();Object.defineProperty(F,"sv",{enumerable:!0,get:function(){return be(z7).default}});var q7=ZR();Object.defineProperty(F,"ta",{enumerable:!0,get:function(){return be(q7).default}});var H7=XR();Object.defineProperty(F,"th",{enumerable:!0,get:function(){return be(H7).default}});var G7=tN();Object.defineProperty(F,"tr",{enumerable:!0,get:function(){return be(G7).default}});var Y7=iN();Object.defineProperty(F,"ua",{enumerable:!0,get:function(){return be(Y7).default}});var V7=ib();Object.defineProperty(F,"uk",{enumerable:!0,get:function(){return be(V7).default}});var W7=sN();Object.defineProperty(F,"ur",{enumerable:!0,get:function(){return be(W7).default}});var J7=cN();Object.defineProperty(F,"uz",{enumerable:!0,get:function(){return be(J7).default}});var Z7=uN();Object.defineProperty(F,"vi",{enumerable:!0,get:function(){return be(Z7).default}});var K7=AN();Object.defineProperty(F,"zhCN",{enumerable:!0,get:function(){return be(K7).default}});var X7=hN();Object.defineProperty(F,"zhTW",{enumerable:!0,get:function(){return be(X7).default}});var eee=gN();Object.defineProperty(F,"yo",{enumerable:!0,get:function(){return be(eee).default}})});var Hd=y(_i=>{"use strict";var mN;Object.defineProperty(_i,"__esModule",{value:!0});_i.globalRegistry=_i.$ZodRegistry=_i.$input=_i.$output=void 0;_i.registry=yN;_i.$output=Symbol("ZodOutput");_i.$input=Symbol("ZodInput");var Wf=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};_i.$ZodRegistry=Wf;function yN(){return new Wf}(mN=globalThis).__zod_globalRegistry??(mN.__zod_globalRegistry=yN());_i.globalRegistry=globalThis.__zod_globalRegistry});var bN=y(N=>{"use strict";var tee=N&&N.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ree=N&&N.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kf=N&&N.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&tee(e,t,r);return ree(e,t),e};Object.defineProperty(N,"__esModule",{value:!0});N.TimePrecision=void 0;N._string=nee;N._coercedString=iee;N._email=oee;N._guid=see;N._uuid=aee;N._uuidv4=cee;N._uuidv6=lee;N._uuidv7=uee;N._url=dee;N._emoji=Aee;N._nanoid=pee;N._cuid=hee;N._cuid2=fee;N._ulid=gee;N._xid=mee;N._ksuid=yee;N._ipv4=Eee;N._ipv6=Iee;N._mac=Cee;N._cidrv4=bee;N._cidrv6=See;N._base64=wee;N._base64url=_ee;N._e164=Bee;N._jwt=vee;N._isoDateTime=Qee;N._isoDate=Tee;N._isoTime=Dee;N._isoDuration=kee;N._number=Ree;N._coercedNumber=Nee;N._int=Oee;N._float32=xee;N._float64=Uee;N._int32=Mee;N._uint32=Pee;N._boolean=Lee;N._coercedBoolean=$ee;N._bigint=Fee;N._coercedBigint=jee;N._int64=zee;N._uint64=qee;N._symbol=Hee;N._undefined=Gee;N._null=Yee;N._any=Vee;N._unknown=Wee;N._never=Jee;N._void=Zee;N._date=Kee;N._coercedDate=Xee;N._nan=ete;N._lt=EN;N._lte=Gd;N._max=Gd;N._lte=Gd;N._max=Gd;N._gt=IN;N._gte=Yd;N._min=Yd;N._gte=Yd;N._min=Yd;N._positive=tte;N._negative=rte;N._nonpositive=nte;N._nonnegative=ite;N._multipleOf=ote;N._maxSize=ste;N._minSize=ate;N._size=cte;N._maxLength=lte;N._minLength=ute;N._length=dte;N._regex=Ate;N._lowercase=pte;N._uppercase=hte;N._includes=fte;N._startsWith=gte;N._endsWith=mte;N._property=yte;N._mime=Ete;N._overwrite=Ll;N._normalize=Ite;N._trim=Cte;N._toLowerCase=bte;N._toUpperCase=Ste;N._slugify=wte;N._array=_te;N._union=Bte;N._xor=vte;N._discriminatedUnion=Qte;N._intersection=Tte;N._tuple=Dte;N._record=kte;N._map=Rte;N._set=Nte;N._enum=Ote;N._nativeEnum=xte;N._literal=Ute;N._file=Mte;N._transform=Pte;N._optional=Lte;N._nullable=$te;N._default=Fte;N._nonoptional=jte;N._success=zte;N._catch=qte;N._pipe=Hte;N._readonly=Gte;N._templateLiteral=Yte;N._lazy=Vte;N._promise=Wte;N._custom=Jte;N._refine=Zte;N._superRefine=Kte;N._check=CN;N.describe=Xte;N.meta=ere;N._stringbool=tre;N._stringFormat=rre;var kt=Kf(zh()),Zf=Kf(Hd()),Jf=Kf(tb()),q=Kf(pe());function nee(t,e){return new t({type:"string",...q.normalizeParams(e)})}function iee(t,e){return new t({type:"string",coerce:!0,...q.normalizeParams(e)})}function oee(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...q.normalizeParams(e)})}function see(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...q.normalizeParams(e)})}function aee(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...q.normalizeParams(e)})}function cee(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...q.normalizeParams(e)})}function lee(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...q.normalizeParams(e)})}function uee(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...q.normalizeParams(e)})}function dee(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...q.normalizeParams(e)})}function Aee(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...q.normalizeParams(e)})}function pee(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...q.normalizeParams(e)})}function hee(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...q.normalizeParams(e)})}function fee(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...q.normalizeParams(e)})}function gee(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...q.normalizeParams(e)})}function mee(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...q.normalizeParams(e)})}function yee(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...q.normalizeParams(e)})}function Eee(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...q.normalizeParams(e)})}function Iee(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...q.normalizeParams(e)})}function Cee(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...q.normalizeParams(e)})}function bee(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...q.normalizeParams(e)})}function See(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...q.normalizeParams(e)})}function wee(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...q.normalizeParams(e)})}function _ee(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...q.normalizeParams(e)})}function Bee(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...q.normalizeParams(e)})}function vee(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...q.normalizeParams(e)})}N.TimePrecision={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Qee(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...q.normalizeParams(e)})}function Tee(t,e){return new t({type:"string",format:"date",check:"string_format",...q.normalizeParams(e)})}function Dee(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...q.normalizeParams(e)})}function kee(t,e){return new t({type:"string",format:"duration",check:"string_format",...q.normalizeParams(e)})}function Ree(t,e){return new t({type:"number",checks:[],...q.normalizeParams(e)})}function Nee(t,e){return new t({type:"number",coerce:!0,checks:[],...q.normalizeParams(e)})}function Oee(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...q.normalizeParams(e)})}function xee(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...q.normalizeParams(e)})}function Uee(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...q.normalizeParams(e)})}function Mee(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...q.normalizeParams(e)})}function Pee(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...q.normalizeParams(e)})}function Lee(t,e){return new t({type:"boolean",...q.normalizeParams(e)})}function $ee(t,e){return new t({type:"boolean",coerce:!0,...q.normalizeParams(e)})}function Fee(t,e){return new t({type:"bigint",...q.normalizeParams(e)})}function jee(t,e){return new t({type:"bigint",coerce:!0,...q.normalizeParams(e)})}function zee(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...q.normalizeParams(e)})}function qee(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...q.normalizeParams(e)})}function Hee(t,e){return new t({type:"symbol",...q.normalizeParams(e)})}function Gee(t,e){return new t({type:"undefined",...q.normalizeParams(e)})}function Yee(t,e){return new t({type:"null",...q.normalizeParams(e)})}function Vee(t){return new t({type:"any"})}function Wee(t){return new t({type:"unknown"})}function Jee(t,e){return new t({type:"never",...q.normalizeParams(e)})}function Zee(t,e){return new t({type:"void",...q.normalizeParams(e)})}function Kee(t,e){return new t({type:"date",...q.normalizeParams(e)})}function Xee(t,e){return new t({type:"date",coerce:!0,...q.normalizeParams(e)})}function ete(t,e){return new t({type:"nan",...q.normalizeParams(e)})}function EN(t,e){return new kt.$ZodCheckLessThan({check:"less_than",...q.normalizeParams(e),value:t,inclusive:!1})}function Gd(t,e){return new kt.$ZodCheckLessThan({check:"less_than",...q.normalizeParams(e),value:t,inclusive:!0})}function IN(t,e){return new kt.$ZodCheckGreaterThan({check:"greater_than",...q.normalizeParams(e),value:t,inclusive:!1})}function Yd(t,e){return new kt.$ZodCheckGreaterThan({check:"greater_than",...q.normalizeParams(e),value:t,inclusive:!0})}function tte(t){return IN(0,t)}function rte(t){return EN(0,t)}function nte(t){return Gd(0,t)}function ite(t){return Yd(0,t)}function ote(t,e){return new kt.$ZodCheckMultipleOf({check:"multiple_of",...q.normalizeParams(e),value:t})}function ste(t,e){return new kt.$ZodCheckMaxSize({check:"max_size",...q.normalizeParams(e),maximum:t})}function ate(t,e){return new kt.$ZodCheckMinSize({check:"min_size",...q.normalizeParams(e),minimum:t})}function cte(t,e){return new kt.$ZodCheckSizeEquals({check:"size_equals",...q.normalizeParams(e),size:t})}function lte(t,e){return new kt.$ZodCheckMaxLength({check:"max_length",...q.normalizeParams(e),maximum:t})}function ute(t,e){return new kt.$ZodCheckMinLength({check:"min_length",...q.normalizeParams(e),minimum:t})}function dte(t,e){return new kt.$ZodCheckLengthEquals({check:"length_equals",...q.normalizeParams(e),length:t})}function Ate(t,e){return new kt.$ZodCheckRegex({check:"string_format",format:"regex",...q.normalizeParams(e),pattern:t})}function pte(t){return new kt.$ZodCheckLowerCase({check:"string_format",format:"lowercase",...q.normalizeParams(t)})}function hte(t){return new kt.$ZodCheckUpperCase({check:"string_format",format:"uppercase",...q.normalizeParams(t)})}function fte(t,e){return new kt.$ZodCheckIncludes({check:"string_format",format:"includes",...q.normalizeParams(e),includes:t})}function gte(t,e){return new kt.$ZodCheckStartsWith({check:"string_format",format:"starts_with",...q.normalizeParams(e),prefix:t})}function mte(t,e){return new kt.$ZodCheckEndsWith({check:"string_format",format:"ends_with",...q.normalizeParams(e),suffix:t})}function yte(t,e,r){return new kt.$ZodCheckProperty({check:"property",property:t,schema:e,...q.normalizeParams(r)})}function Ete(t,e){return new kt.$ZodCheckMimeType({check:"mime_type",mime:t,...q.normalizeParams(e)})}function Ll(t){return new kt.$ZodCheckOverwrite({check:"overwrite",tx:t})}function Ite(t){return Ll(e=>e.normalize(t))}function Cte(){return Ll(t=>t.trim())}function bte(){return Ll(t=>t.toLowerCase())}function Ste(){return Ll(t=>t.toUpperCase())}function wte(){return Ll(t=>q.slugify(t))}function _te(t,e,r){return new t({type:"array",element:e,...q.normalizeParams(r)})}function Bte(t,e,r){return new t({type:"union",options:e,...q.normalizeParams(r)})}function vte(t,e,r){return new t({type:"union",options:e,inclusive:!1,...q.normalizeParams(r)})}function Qte(t,e,r,n){return new t({type:"union",options:r,discriminator:e,...q.normalizeParams(n)})}function Tte(t,e,r){return new t({type:"intersection",left:e,right:r})}function Dte(t,e,r,n){let i=r instanceof Jf.$ZodType,o=i?n:r,s=i?r:null;return new t({type:"tuple",items:e,rest:s,...q.normalizeParams(o)})}function kte(t,e,r,n){return new t({type:"record",keyType:e,valueType:r,...q.normalizeParams(n)})}function Rte(t,e,r,n){return new t({type:"map",keyType:e,valueType:r,...q.normalizeParams(n)})}function Nte(t,e,r){return new t({type:"set",valueType:e,...q.normalizeParams(r)})}function Ote(t,e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new t({type:"enum",entries:n,...q.normalizeParams(r)})}function xte(t,e,r){return new t({type:"enum",entries:e,...q.normalizeParams(r)})}function Ute(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...q.normalizeParams(r)})}function Mte(t,e){return new t({type:"file",...q.normalizeParams(e)})}function Pte(t,e){return new t({type:"transform",transform:e})}function Lte(t,e){return new t({type:"optional",innerType:e})}function $te(t,e){return new t({type:"nullable",innerType:e})}function Fte(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():q.shallowClone(r)}})}function jte(t,e,r){return new t({type:"nonoptional",innerType:e,...q.normalizeParams(r)})}function zte(t,e){return new t({type:"success",innerType:e})}function qte(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function Hte(t,e,r){return new t({type:"pipe",in:e,out:r})}function Gte(t,e){return new t({type:"readonly",innerType:e})}function Yte(t,e,r){return new t({type:"template_literal",parts:e,...q.normalizeParams(r)})}function Vte(t,e){return new t({type:"lazy",getter:e})}function Wte(t,e){return new t({type:"promise",innerType:e})}function Jte(t,e,r){let n=q.normalizeParams(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function Zte(t,e,r){return new t({type:"custom",check:"custom",fn:e,...q.normalizeParams(r)})}function Kte(t,e){let r=CN(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(q.issue(i,n.value,r._zod.def));else{let o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),n.issues.push(q.issue(o))}},t(n.value,n)),e);return r}function CN(t,e){let r=new kt.$ZodCheck({check:"custom",...q.normalizeParams(e)});return r._zod.check=t,r}function Xte(t){let e=new kt.$ZodCheck({check:"describe"});return e._zod.onattach=[r=>{let n=Zf.globalRegistry.get(r)??{};Zf.globalRegistry.add(r,{...n,description:t})}],e._zod.check=()=>{},e}function ere(t){let e=new kt.$ZodCheck({check:"meta"});return e._zod.onattach=[r=>{let n=Zf.globalRegistry.get(r)??{};Zf.globalRegistry.add(r,{...n,...t})}],e._zod.check=()=>{},e}function tre(t,e){let r=q.normalizeParams(e),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(p=>typeof p=="string"?p.toLowerCase():p),i=i.map(p=>typeof p=="string"?p.toLowerCase():p));let o=new Set(n),s=new Set(i),a=t.Codec??Jf.$ZodCodec,c=t.Boolean??Jf.$ZodBoolean,l=t.String??Jf.$ZodString,u=new l({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),A=new a({type:"pipe",in:u,out:d,transform:((p,h)=>{let f=p;return r.case!=="sensitive"&&(f=f.toLowerCase()),o.has(f)?!0:s.has(f)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:h.value,inst:A,continue:!1}),{})}),reverseTransform:((p,h)=>p===!0?n[0]||"true":i[0]||"false"),error:r.error});return A}function rre(t,e,r,n={}){let i=q.normalizeParams(n),o={...q.normalizeParams(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:a=>r.test(a),...i};return r instanceof RegExp&&(o.pattern=r),new t(o)}});var Vd=y(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.createStandardJSONSchemaMethod=Hn.createToJSONSchemaMethod=void 0;Hn.initializeContext=sb;Hn.process=Xf;Hn.extractDefs=ab;Hn.finalize=cb;var nre=Hd();function sb(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??nre.globalRegistry,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function Xf(t,e,r={path:[],schemaPath:[]}){var n;let i=t._zod.def,o=e.seen.get(t);if(o)return o.count++,r.schemaPath.includes(t)&&(o.cycle=r.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,s);let a=t._zod.toJSONSchema?.();if(a)s.schema=a;else{let u={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,s.schema,u);else{let A=s.schema,p=e.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(t,e,A,u)}let d=t._zod.parent;d&&(s.ref||(s.ref=d),Xf(d,e,u),e.seen.get(d).isParent=!0)}let c=e.metadataRegistry.get(t);return c&&Object.assign(s.schema,c),e.io==="input"&&xr(t)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(t).schema}function ab(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let s of t.seen.entries()){let a=t.metadataRegistry.get(s[0])?.id;if(a){let c=n.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,s[0])}}let i=s=>{let a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(s[0])?.id,A=t.external.uri??(h=>h);if(d)return{ref:A(d)};let p=s[1].defId??s[1].schema.id??`schema${t.counter++}`;return s[1].defId=p,{defId:p,ref:`${A("__shared")}#/${a}/${p}`}}if(s[1]===r)return{ref:"#"};let l=`#/${a}/`,u=s[1].schema.id??`__schema${t.counter++}`;return{defId:u,ref:l+u}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:l}=i(s);a.def={...a.schema},l&&(a.defId=l);let u=a.schema;for(let d in u)delete u[d];u.$ref=c};if(t.cycles==="throw")for(let s of t.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
66
66
 
67
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of t.seen.entries()){let a=s[1];if(e===s[0]){o(s);continue}if(t.external){let l=t.external.registry.get(s[0])?.id;if(e!==s[0]&&l){o(s);continue}}if(t.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&t.reused==="ref"){o(s);continue}}}function cb(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=a=>{let c=t.seen.get(a);if(c.ref===null)return;let l=c.def??c.schema,u={...l},d=c.ref;if(c.ref=null,d){n(d);let p=t.seen.get(d),h=p.schema;if(h.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(h)):Object.assign(l,h),Object.assign(l,u),a._zod.parent===d)for(let E in l)E==="$ref"||E==="allOf"||E in u||delete l[E];if(h.$ref&&p.def)for(let E in l)E==="$ref"||E==="allOf"||E in p.def&&JSON.stringify(l[E])===JSON.stringify(p.def[E])&&delete l[E]}let A=a._zod.parent;if(A&&A!==d){n(A);let p=t.seen.get(A);if(p?.schema.$ref&&(l.$ref=p.schema.$ref,p.def))for(let h in l)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(l[h])===JSON.stringify(p.def[h])&&delete l[h]}t.override({zodSchema:a,jsonSchema:l,path:c.path??[]})};for(let a of[...t.seen.entries()].reverse())n(a[0]);let i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let a=t.external.registry.get(e)?.id;if(!a)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(a)}Object.assign(i,r.def??r.schema);let o=t.metadataRegistry.get(e)?.id;o!==void 0&&i.id===o&&delete i.id;let s=t.external?.defs??{};for(let a of t.seen.entries()){let c=a[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,s[c.defId]=c.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{let a=JSON.parse(JSON.stringify(i));return Object.defineProperty(a,"~standard",{value:{...e["~standard"],jsonSchema:{input:(0,Hn.createStandardJSONSchemaMethod)(e,"input",t.processors),output:(0,Hn.createStandardJSONSchemaMethod)(e,"output",t.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function xr(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return xr(n.element,r);if(n.type==="set")return xr(n.valueType,r);if(n.type==="lazy")return xr(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return xr(n.innerType,r);if(n.type==="intersection")return xr(n.left,r)||xr(n.right,r);if(n.type==="record"||n.type==="map")return xr(n.keyType,r)||xr(n.valueType,r);if(n.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:xr(n.in,r)||xr(n.out,r);if(n.type==="object"){for(let i in n.shape)if(xr(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(xr(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(xr(i,r))return!0;return!!(n.rest&&xr(n.rest,r))}return!1}var ire=(t,e={})=>r=>{let n=sb({...r,processors:e});return Xf(t,n),ab(n,t),cb(n,t)};Hn.createToJSONSchemaMethod=ire;var ore=(t,e,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},s=sb({...i??{},target:o,io:e,processors:r});return Xf(t,s),ab(s,t),cb(s,t)};Hn.createStandardJSONSchemaMethod=ore});var Wd=y(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.allProcessors=x.lazyProcessor=x.optionalProcessor=x.promiseProcessor=x.readonlyProcessor=x.pipeProcessor=x.catchProcessor=x.prefaultProcessor=x.defaultProcessor=x.nonoptionalProcessor=x.nullableProcessor=x.recordProcessor=x.tupleProcessor=x.intersectionProcessor=x.unionProcessor=x.objectProcessor=x.arrayProcessor=x.setProcessor=x.mapProcessor=x.transformProcessor=x.functionProcessor=x.customProcessor=x.successProcessor=x.fileProcessor=x.templateLiteralProcessor=x.nanProcessor=x.literalProcessor=x.enumProcessor=x.dateProcessor=x.unknownProcessor=x.anyProcessor=x.neverProcessor=x.voidProcessor=x.undefinedProcessor=x.nullProcessor=x.symbolProcessor=x.bigintProcessor=x.booleanProcessor=x.numberProcessor=x.stringProcessor=void 0;x.toJSONSchema=Yre;var at=Vd(),sre=pe(),are={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},cre=(t,e,r,n)=>{let i=r;i.type="string";let{minimum:o,maximum:s,format:a,patterns:c,contentEncoding:l}=t._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof s=="number"&&(i.maxLength=s),a&&(i.format=are[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let u=[...c];u.length===1?i.pattern=u[0].source:u.length>1&&(i.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}};x.stringProcessor=cre;var lre=(t,e,r,n)=>{let i=r,{minimum:o,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=t._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number";let d=typeof u=="number"&&u>=(o??Number.NEGATIVE_INFINITY),A=typeof l=="number"&&l<=(s??Number.POSITIVE_INFINITY),p=e.target==="draft-04"||e.target==="openapi-3.0";d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof o=="number"&&(i.minimum=o),A?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof s=="number"&&(i.maximum=s),typeof c=="number"&&(i.multipleOf=c)};x.numberProcessor=lre;var ure=(t,e,r,n)=>{r.type="boolean"};x.booleanProcessor=ure;var dre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")};x.bigintProcessor=dre;var Are=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")};x.symbolProcessor=Are;var pre=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"};x.nullProcessor=pre;var hre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")};x.undefinedProcessor=hre;var fre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")};x.voidProcessor=fre;var gre=(t,e,r,n)=>{r.not={}};x.neverProcessor=gre;var mre=(t,e,r,n)=>{};x.anyProcessor=mre;var yre=(t,e,r,n)=>{};x.unknownProcessor=yre;var Ere=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")};x.dateProcessor=Ere;var Ire=(t,e,r,n)=>{let i=t._zod.def,o=(0,sre.getEnumValues)(i.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o};x.enumProcessor=Ire;var Cre=(t,e,r,n)=>{let i=t._zod.def,o=[];for(let s of i.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o};x.literalProcessor=Cre;var bre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")};x.nanProcessor=bre;var Sre=(t,e,r,n)=>{let i=r,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source};x.templateLiteralProcessor=Sre;var wre=(t,e,r,n)=>{let i=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=t._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),c?c.length===1?(o.contentMediaType=c[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(i,o)};x.fileProcessor=wre;var _re=(t,e,r,n)=>{r.type="boolean"};x.successProcessor=_re;var Bre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")};x.customProcessor=Bre;var vre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")};x.functionProcessor=vre;var Qre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")};x.transformProcessor=Qre;var Tre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")};x.mapProcessor=Tre;var Dre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")};x.setProcessor=Dre;var kre=(t,e,r,n)=>{let i=r,o=t._zod.def,{minimum:s,maximum:a}=t._zod.bag;typeof s=="number"&&(i.minItems=s),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=(0,at.process)(o.element,e,{...n,path:[...n.path,"items"]})};x.arrayProcessor=kre;var Rre=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object",i.properties={};let s=o.shape;for(let l in s)i.properties[l]=(0,at.process)(s[l],e,{...n,path:[...n.path,"properties",l]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{let u=o.shape[l]._zod;return e.io==="input"?u.optin===void 0:u.optout===void 0}));c.size>0&&(i.required=Array.from(c)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=(0,at.process)(o.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)};x.objectProcessor=Rre;var Nre=(t,e,r,n)=>{let i=t._zod.def,o=i.inclusive===!1,s=i.options.map((a,c)=>(0,at.process)(a,e,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s};x.unionProcessor=Nre;var Ore=(t,e,r,n)=>{let i=t._zod.def,o=(0,at.process)(i.left,e,{...n,path:[...n.path,"allOf",0]}),s=(0,at.process)(i.right,e,{...n,path:[...n.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=c};x.intersectionProcessor=Ore;var xre=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",a=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((A,p)=>(0,at.process)(A,e,{...n,path:[...n.path,s,p]})),l=o.rest?(0,at.process)(o.rest,e,{...n,path:[...n.path,a,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(i.prefixItems=c,l&&(i.items=l)):e.target==="openapi-3.0"?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=t._zod.bag;typeof u=="number"&&(i.minItems=u),typeof d=="number"&&(i.maxItems=d)};x.tupleProcessor=xre;var Ure=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object";let s=o.keyType,c=s._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let u=(0,at.process)(o.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let d of c)i.patternProperties[d.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=(0,at.process)(o.keyType,e,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=(0,at.process)(o.valueType,e,{...n,path:[...n.path,"additionalProperties"]});let l=s._zod.values;if(l){let u=[...l].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(i.required=u)}};x.recordProcessor=Ure;var Mre=(t,e,r,n)=>{let i=t._zod.def,o=(0,at.process)(i.innerType,e,n),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]};x.nullableProcessor=Mre;var Pre=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType};x.nonoptionalProcessor=Pre;var Lre=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))};x.defaultProcessor=Lre;var $re=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))};x.prefaultProcessor=$re;var Fre=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s};x.catchProcessor=Fre;var jre=(t,e,r,n)=>{let i=t._zod.def,o=i.in._zod.traits.has("$ZodTransform"),s=e.io==="input"?o?i.out:i.in:i.out;(0,at.process)(s,e,n);let a=e.seen.get(t);a.ref=s};x.pipeProcessor=jre;var zre=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.readOnly=!0};x.readonlyProcessor=zre;var qre=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType};x.promiseProcessor=qre;var Hre=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType};x.optionalProcessor=Hre;var Gre=(t,e,r,n)=>{let i=t._zod.innerType;(0,at.process)(i,e,n);let o=e.seen.get(t);o.ref=i};x.lazyProcessor=Gre;x.allProcessors={string:x.stringProcessor,number:x.numberProcessor,boolean:x.booleanProcessor,bigint:x.bigintProcessor,symbol:x.symbolProcessor,null:x.nullProcessor,undefined:x.undefinedProcessor,void:x.voidProcessor,never:x.neverProcessor,any:x.anyProcessor,unknown:x.unknownProcessor,date:x.dateProcessor,enum:x.enumProcessor,literal:x.literalProcessor,nan:x.nanProcessor,template_literal:x.templateLiteralProcessor,file:x.fileProcessor,success:x.successProcessor,custom:x.customProcessor,function:x.functionProcessor,transform:x.transformProcessor,map:x.mapProcessor,set:x.setProcessor,array:x.arrayProcessor,object:x.objectProcessor,union:x.unionProcessor,intersection:x.intersectionProcessor,tuple:x.tupleProcessor,record:x.recordProcessor,nullable:x.nullableProcessor,nonoptional:x.nonoptionalProcessor,default:x.defaultProcessor,prefault:x.prefaultProcessor,catch:x.catchProcessor,pipe:x.pipeProcessor,readonly:x.readonlyProcessor,promise:x.promiseProcessor,optional:x.optionalProcessor,lazy:x.lazyProcessor};function Yre(t,e){if("_idmap"in t){let n=t,i=(0,at.initializeContext)({...e,processors:x.allProcessors}),o={};for(let c of n._idmap.entries()){let[l,u]=c;(0,at.process)(u,i)}let s={},a={registry:n,uri:e?.uri,defs:o};i.external=a;for(let c of n._idmap.entries()){let[l,u]=c;(0,at.extractDefs)(i,u),s[l]=(0,at.finalize)(i,u)}if(Object.keys(o).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:o}}return{schemas:s}}let r=(0,at.initializeContext)({...e,processors:x.allProcessors});return(0,at.process)(t,r),(0,at.extractDefs)(r,t),(0,at.finalize)(r,t)}});var SN=y(tg=>{"use strict";Object.defineProperty(tg,"__esModule",{value:!0});tg.JSONSchemaGenerator=void 0;var Vre=Wd(),eg=Vd(),lb=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(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let r=e?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=(0,eg.initializeContext)({processors:Vre.allProcessors,target:r,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,r={path:[],schemaPath:[]}){return(0,eg.process)(e,this.ctx,r)}emit(e,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),(0,eg.extractDefs)(this.ctx,e);let n=(0,eg.finalize)(this.ctx,e),{"~standard":i,...o}=n;return o}};tg.JSONSchemaGenerator=lb});var _N=y(wN=>{"use strict";Object.defineProperty(wN,"__esModule",{value:!0})});var Wr=y(Ke=>{"use strict";var BN=Ke&&Ke.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Wre=Ke&&Ke.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Lo=Ke&&Ke.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&BN(e,t,r)},rg=Ke&&Ke.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&BN(e,t,r);return Wre(e,t),e};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.JSONSchema=Ke.JSONSchemaGenerator=Ke.toJSONSchema=Ke.locales=Ke.regexes=Ke.util=void 0;Lo(lc(),Ke);Lo(YC(),Ke);Lo(HC(),Ke);Lo(tb(),Ke);Lo(zh(),Ke);Lo(KC(),Ke);Ke.util=rg(pe());Ke.regexes=rg(jh());Ke.locales=rg(ob());Lo(Hd(),Ke);Lo(ZC(),Ke);Lo(bN(),Ke);Lo(Vd(),Ke);var Jre=Wd();Object.defineProperty(Ke,"toJSONSchema",{enumerable:!0,get:function(){return Jre.toJSONSchema}});var Zre=SN();Object.defineProperty(Ke,"JSONSchemaGenerator",{enumerable:!0,get:function(){return Zre.JSONSchemaGenerator}});Ke.JSONSchema=rg(_N())});var ng=y(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.slugify=he.toUpperCase=he.toLowerCase=he.trim=he.normalize=he.overwrite=he.mime=he.property=he.endsWith=he.startsWith=he.includes=he.uppercase=he.lowercase=he.regex=he.length=he.minLength=he.maxLength=he.size=he.minSize=he.maxSize=he.multipleOf=he.nonnegative=he.nonpositive=he.negative=he.positive=he.gte=he.gt=he.lte=he.lt=void 0;var ct=Wr();Object.defineProperty(he,"lt",{enumerable:!0,get:function(){return ct._lt}});Object.defineProperty(he,"lte",{enumerable:!0,get:function(){return ct._lte}});Object.defineProperty(he,"gt",{enumerable:!0,get:function(){return ct._gt}});Object.defineProperty(he,"gte",{enumerable:!0,get:function(){return ct._gte}});Object.defineProperty(he,"positive",{enumerable:!0,get:function(){return ct._positive}});Object.defineProperty(he,"negative",{enumerable:!0,get:function(){return ct._negative}});Object.defineProperty(he,"nonpositive",{enumerable:!0,get:function(){return ct._nonpositive}});Object.defineProperty(he,"nonnegative",{enumerable:!0,get:function(){return ct._nonnegative}});Object.defineProperty(he,"multipleOf",{enumerable:!0,get:function(){return ct._multipleOf}});Object.defineProperty(he,"maxSize",{enumerable:!0,get:function(){return ct._maxSize}});Object.defineProperty(he,"minSize",{enumerable:!0,get:function(){return ct._minSize}});Object.defineProperty(he,"size",{enumerable:!0,get:function(){return ct._size}});Object.defineProperty(he,"maxLength",{enumerable:!0,get:function(){return ct._maxLength}});Object.defineProperty(he,"minLength",{enumerable:!0,get:function(){return ct._minLength}});Object.defineProperty(he,"length",{enumerable:!0,get:function(){return ct._length}});Object.defineProperty(he,"regex",{enumerable:!0,get:function(){return ct._regex}});Object.defineProperty(he,"lowercase",{enumerable:!0,get:function(){return ct._lowercase}});Object.defineProperty(he,"uppercase",{enumerable:!0,get:function(){return ct._uppercase}});Object.defineProperty(he,"includes",{enumerable:!0,get:function(){return ct._includes}});Object.defineProperty(he,"startsWith",{enumerable:!0,get:function(){return ct._startsWith}});Object.defineProperty(he,"endsWith",{enumerable:!0,get:function(){return ct._endsWith}});Object.defineProperty(he,"property",{enumerable:!0,get:function(){return ct._property}});Object.defineProperty(he,"mime",{enumerable:!0,get:function(){return ct._mime}});Object.defineProperty(he,"overwrite",{enumerable:!0,get:function(){return ct._overwrite}});Object.defineProperty(he,"normalize",{enumerable:!0,get:function(){return ct._normalize}});Object.defineProperty(he,"trim",{enumerable:!0,get:function(){return ct._trim}});Object.defineProperty(he,"toLowerCase",{enumerable:!0,get:function(){return ct._toLowerCase}});Object.defineProperty(he,"toUpperCase",{enumerable:!0,get:function(){return ct._toUpperCase}});Object.defineProperty(he,"slugify",{enumerable:!0,get:function(){return ct._slugify}})});var Jd=y(wt=>{"use strict";var Kre=wt&&wt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Xre=wt&&wt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vN=wt&&wt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Kre(e,t,r);return Xre(e,t),e};Object.defineProperty(wt,"__esModule",{value:!0});wt.ZodISODuration=wt.ZodISOTime=wt.ZodISODate=wt.ZodISODateTime=void 0;wt.datetime=ene;wt.date=tne;wt.time=rne;wt.duration=nne;var Gn=vN(Wr()),ig=vN(Zd());wt.ZodISODateTime=Gn.$constructor("ZodISODateTime",(t,e)=>{Gn.$ZodISODateTime.init(t,e),ig.ZodStringFormat.init(t,e)});function ene(t){return Gn._isoDateTime(wt.ZodISODateTime,t)}wt.ZodISODate=Gn.$constructor("ZodISODate",(t,e)=>{Gn.$ZodISODate.init(t,e),ig.ZodStringFormat.init(t,e)});function tne(t){return Gn._isoDate(wt.ZodISODate,t)}wt.ZodISOTime=Gn.$constructor("ZodISOTime",(t,e)=>{Gn.$ZodISOTime.init(t,e),ig.ZodStringFormat.init(t,e)});function rne(t){return Gn._isoTime(wt.ZodISOTime,t)}wt.ZodISODuration=Gn.$constructor("ZodISODuration",(t,e)=>{Gn.$ZodISODuration.init(t,e),ig.ZodStringFormat.init(t,e)});function nne(t){return Gn._isoDuration(wt.ZodISODuration,t)}});var ub=y(Yn=>{"use strict";var ine=Yn&&Yn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),one=Yn&&Yn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),TN=Yn&&Yn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ine(e,t,r);return one(e,t),e};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.ZodRealError=Yn.ZodError=void 0;var og=TN(Wr()),sne=Wr(),QN=TN(pe()),DN=(t,e)=>{sne.$ZodError.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>og.formatError(t,r)},flatten:{value:r=>og.flattenError(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,QN.jsonStringifyReplacer,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,QN.jsonStringifyReplacer,2)}},isEmpty:{get(){return t.issues.length===0}}})};Yn.ZodError=og.$constructor("ZodError",DN);Yn.ZodRealError=og.$constructor("ZodError",DN,{Parent:Error})});var db=y(Xe=>{"use strict";var ane=Xe&&Xe.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),cne=Xe&&Xe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),lne=Xe&&Xe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ane(e,t,r);return cne(e,t),e};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.safeDecodeAsync=Xe.safeEncodeAsync=Xe.safeDecode=Xe.safeEncode=Xe.decodeAsync=Xe.encodeAsync=Xe.decode=Xe.encode=Xe.safeParseAsync=Xe.safeParse=Xe.parseAsync=Xe.parse=void 0;var Vn=lne(Wr()),Wn=ub();Xe.parse=Vn._parse(Wn.ZodRealError);Xe.parseAsync=Vn._parseAsync(Wn.ZodRealError);Xe.safeParse=Vn._safeParse(Wn.ZodRealError);Xe.safeParseAsync=Vn._safeParseAsync(Wn.ZodRealError);Xe.encode=Vn._encode(Wn.ZodRealError);Xe.decode=Vn._decode(Wn.ZodRealError);Xe.encodeAsync=Vn._encodeAsync(Wn.ZodRealError);Xe.decodeAsync=Vn._decodeAsync(Wn.ZodRealError);Xe.safeEncode=Vn._safeEncode(Wn.ZodRealError);Xe.safeDecode=Vn._safeDecode(Wn.ZodRealError);Xe.safeEncodeAsync=Vn._safeEncodeAsync(Wn.ZodRealError);Xe.safeDecodeAsync=Vn._safeDecodeAsync(Wn.ZodRealError)});var Zd=y(g=>{"use strict";var une=g&&g.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),dne=g&&g.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kd=g&&g.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&une(e,t,r);return dne(e,t),e};Object.defineProperty(g,"__esModule",{value:!0});g.ZodLiteral=g.ZodEnum=g.ZodSet=g.ZodMap=g.ZodRecord=g.ZodTuple=g.ZodIntersection=g.ZodDiscriminatedUnion=g.ZodXor=g.ZodUnion=g.ZodObject=g.ZodArray=g.ZodDate=g.ZodVoid=g.ZodNever=g.ZodUnknown=g.ZodAny=g.ZodNull=g.ZodUndefined=g.ZodSymbol=g.ZodBigIntFormat=g.ZodBigInt=g.ZodBoolean=g.ZodNumberFormat=g.ZodNumber=g.ZodCustomStringFormat=g.ZodJWT=g.ZodE164=g.ZodBase64URL=g.ZodBase64=g.ZodCIDRv6=g.ZodCIDRv4=g.ZodIPv6=g.ZodMAC=g.ZodIPv4=g.ZodKSUID=g.ZodXID=g.ZodULID=g.ZodCUID2=g.ZodCUID=g.ZodNanoID=g.ZodEmoji=g.ZodURL=g.ZodUUID=g.ZodGUID=g.ZodEmail=g.ZodStringFormat=g.ZodString=g._ZodString=g.ZodType=void 0;g.stringbool=g.meta=g.describe=g.ZodCustom=g.ZodFunction=g.ZodPromise=g.ZodLazy=g.ZodTemplateLiteral=g.ZodReadonly=g.ZodPreprocess=g.ZodCodec=g.ZodPipe=g.ZodNaN=g.ZodCatch=g.ZodSuccess=g.ZodNonOptional=g.ZodPrefault=g.ZodDefault=g.ZodNullable=g.ZodExactOptional=g.ZodOptional=g.ZodTransform=g.ZodFile=void 0;g.string=ag;g.email=Ane;g.guid=pne;g.uuid=hne;g.uuidv4=fne;g.uuidv6=gne;g.uuidv7=mne;g.url=yne;g.httpUrl=Ene;g.emoji=Ine;g.nanoid=Cne;g.cuid=bne;g.cuid2=Sne;g.ulid=wne;g.xid=_ne;g.ksuid=Bne;g.ipv4=vne;g.mac=Qne;g.ipv6=Tne;g.cidrv4=Dne;g.cidrv6=kne;g.base64=Rne;g.base64url=Nne;g.e164=One;g.jwt=xne;g.stringFormat=Une;g.hostname=Mne;g.hex=Pne;g.hash=Lne;g.number=RN;g.int=pb;g.float32=$ne;g.float64=Fne;g.int32=jne;g.uint32=zne;g.boolean=NN;g.bigint=qne;g.int64=Hne;g.uint64=Gne;g.symbol=Yne;g.undefined=Vne;g.null=ON;g.any=Wne;g.unknown=$l;g.never=fb;g.void=Jne;g.date=Zne;g.array=ug;g.keyof=Kne;g.object=Xne;g.strictObject=eie;g.looseObject=tie;g.union=gb;g.xor=rie;g.discriminatedUnion=nie;g.intersection=xN;g.tuple=UN;g.record=MN;g.partialRecord=iie;g.looseRecord=oie;g.map=sie;g.set=aie;g.enum=mb;g.nativeEnum=cie;g.literal=lie;g.file=uie;g.transform=yb;g.optional=cg;g.exactOptional=PN;g.nullable=lg;g.nullish=die;g._default=LN;g.prefault=$N;g.nonoptional=FN;g.success=Aie;g.catch=jN;g.nan=pie;g.pipe=hb;g.codec=hie;g.invertCodec=fie;g.readonly=zN;g.templateLiteral=gie;g.lazy=qN;g.promise=mie;g._function=dg;g.function=dg;g._function=dg;g.function=dg;g.check=yie;g.custom=Eie;g.refine=HN;g.superRefine=GN;g.instanceof=Iie;g.json=bie;g.preprocess=Sie;var b=Kd(Wr()),He=Wr(),xe=Kd(Wd()),Ab=Vd(),Te=Kd(ng()),sg=Kd(Jd()),Jn=Kd(db()),kN=new WeakMap;function Xd(t,e,r){let n=Object.getPrototypeOf(t),i=kN.get(n);if(i||(i=new Set,kN.set(n,i)),!i.has(e)){i.add(e);for(let o in r){let s=r[o];Object.defineProperty(n,o,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}g.ZodType=b.$constructor("ZodType",(t,e)=>(b.$ZodType.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:(0,Ab.createStandardJSONSchemaMethod)(t,"input"),output:(0,Ab.createStandardJSONSchemaMethod)(t,"output")}}),t.toJSONSchema=(0,Ab.createToJSONSchemaMethod)(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.parse=(r,n)=>Jn.parse(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>Jn.safeParse(t,r,n),t.parseAsync=async(r,n)=>Jn.parseAsync(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>Jn.safeParseAsync(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>Jn.encode(t,r,n),t.decode=(r,n)=>Jn.decode(t,r,n),t.encodeAsync=async(r,n)=>Jn.encodeAsync(t,r,n),t.decodeAsync=async(r,n)=>Jn.decodeAsync(t,r,n),t.safeEncode=(r,n)=>Jn.safeEncode(t,r,n),t.safeDecode=(r,n)=>Jn.safeDecode(t,r,n),t.safeEncodeAsync=async(r,n)=>Jn.safeEncodeAsync(t,r,n),t.safeDecodeAsync=async(r,n)=>Jn.safeDecodeAsync(t,r,n),Xd(t,"ZodType",{check(...r){let n=this.def;return this.clone(He.util.mergeDefs(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return b.clone(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(HN(r,n))},superRefine(r,n){return this.check(GN(r,n))},overwrite(r){return this.check(Te.overwrite(r))},optional(){return cg(this)},exactOptional(){return PN(this)},nullable(){return lg(this)},nullish(){return cg(lg(this))},nonoptional(r){return FN(this,r)},array(){return ug(this)},or(r){return gb([this,r])},and(r){return xN(this,r)},transform(r){return hb(this,yb(r))},default(r){return LN(this,r)},prefault(r){return $N(this,r)},catch(r){return jN(this,r)},pipe(r){return hb(this,r)},readonly(){return zN(this)},describe(r){let n=this.clone();return b.globalRegistry.add(n,{description:r}),n},meta(...r){if(r.length===0)return b.globalRegistry.get(this);let n=this.clone();return b.globalRegistry.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(t,"description",{get(){return b.globalRegistry.get(t)?.description},configurable:!0}),t));g._ZodString=b.$constructor("_ZodString",(t,e)=>{b.$ZodString.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>xe.stringProcessor(t,n,i,o);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,Xd(t,"_ZodString",{regex(...n){return this.check(Te.regex(...n))},includes(...n){return this.check(Te.includes(...n))},startsWith(...n){return this.check(Te.startsWith(...n))},endsWith(...n){return this.check(Te.endsWith(...n))},min(...n){return this.check(Te.minLength(...n))},max(...n){return this.check(Te.maxLength(...n))},length(...n){return this.check(Te.length(...n))},nonempty(...n){return this.check(Te.minLength(1,...n))},lowercase(n){return this.check(Te.lowercase(n))},uppercase(n){return this.check(Te.uppercase(n))},trim(){return this.check(Te.trim())},normalize(...n){return this.check(Te.normalize(...n))},toLowerCase(){return this.check(Te.toLowerCase())},toUpperCase(){return this.check(Te.toUpperCase())},slugify(){return this.check(Te.slugify())}})});g.ZodString=b.$constructor("ZodString",(t,e)=>{b.$ZodString.init(t,e),g._ZodString.init(t,e),t.email=r=>t.check(b._email(g.ZodEmail,r)),t.url=r=>t.check(b._url(g.ZodURL,r)),t.jwt=r=>t.check(b._jwt(g.ZodJWT,r)),t.emoji=r=>t.check(b._emoji(g.ZodEmoji,r)),t.guid=r=>t.check(b._guid(g.ZodGUID,r)),t.uuid=r=>t.check(b._uuid(g.ZodUUID,r)),t.uuidv4=r=>t.check(b._uuidv4(g.ZodUUID,r)),t.uuidv6=r=>t.check(b._uuidv6(g.ZodUUID,r)),t.uuidv7=r=>t.check(b._uuidv7(g.ZodUUID,r)),t.nanoid=r=>t.check(b._nanoid(g.ZodNanoID,r)),t.guid=r=>t.check(b._guid(g.ZodGUID,r)),t.cuid=r=>t.check(b._cuid(g.ZodCUID,r)),t.cuid2=r=>t.check(b._cuid2(g.ZodCUID2,r)),t.ulid=r=>t.check(b._ulid(g.ZodULID,r)),t.base64=r=>t.check(b._base64(g.ZodBase64,r)),t.base64url=r=>t.check(b._base64url(g.ZodBase64URL,r)),t.xid=r=>t.check(b._xid(g.ZodXID,r)),t.ksuid=r=>t.check(b._ksuid(g.ZodKSUID,r)),t.ipv4=r=>t.check(b._ipv4(g.ZodIPv4,r)),t.ipv6=r=>t.check(b._ipv6(g.ZodIPv6,r)),t.cidrv4=r=>t.check(b._cidrv4(g.ZodCIDRv4,r)),t.cidrv6=r=>t.check(b._cidrv6(g.ZodCIDRv6,r)),t.e164=r=>t.check(b._e164(g.ZodE164,r)),t.datetime=r=>t.check(sg.datetime(r)),t.date=r=>t.check(sg.date(r)),t.time=r=>t.check(sg.time(r)),t.duration=r=>t.check(sg.duration(r))});function ag(t){return b._string(g.ZodString,t)}g.ZodStringFormat=b.$constructor("ZodStringFormat",(t,e)=>{b.$ZodStringFormat.init(t,e),g._ZodString.init(t,e)});g.ZodEmail=b.$constructor("ZodEmail",(t,e)=>{b.$ZodEmail.init(t,e),g.ZodStringFormat.init(t,e)});function Ane(t){return b._email(g.ZodEmail,t)}g.ZodGUID=b.$constructor("ZodGUID",(t,e)=>{b.$ZodGUID.init(t,e),g.ZodStringFormat.init(t,e)});function pne(t){return b._guid(g.ZodGUID,t)}g.ZodUUID=b.$constructor("ZodUUID",(t,e)=>{b.$ZodUUID.init(t,e),g.ZodStringFormat.init(t,e)});function hne(t){return b._uuid(g.ZodUUID,t)}function fne(t){return b._uuidv4(g.ZodUUID,t)}function gne(t){return b._uuidv6(g.ZodUUID,t)}function mne(t){return b._uuidv7(g.ZodUUID,t)}g.ZodURL=b.$constructor("ZodURL",(t,e)=>{b.$ZodURL.init(t,e),g.ZodStringFormat.init(t,e)});function yne(t){return b._url(g.ZodURL,t)}function Ene(t){return b._url(g.ZodURL,{protocol:b.regexes.httpProtocol,hostname:b.regexes.domain,...He.util.normalizeParams(t)})}g.ZodEmoji=b.$constructor("ZodEmoji",(t,e)=>{b.$ZodEmoji.init(t,e),g.ZodStringFormat.init(t,e)});function Ine(t){return b._emoji(g.ZodEmoji,t)}g.ZodNanoID=b.$constructor("ZodNanoID",(t,e)=>{b.$ZodNanoID.init(t,e),g.ZodStringFormat.init(t,e)});function Cne(t){return b._nanoid(g.ZodNanoID,t)}g.ZodCUID=b.$constructor("ZodCUID",(t,e)=>{b.$ZodCUID.init(t,e),g.ZodStringFormat.init(t,e)});function bne(t){return b._cuid(g.ZodCUID,t)}g.ZodCUID2=b.$constructor("ZodCUID2",(t,e)=>{b.$ZodCUID2.init(t,e),g.ZodStringFormat.init(t,e)});function Sne(t){return b._cuid2(g.ZodCUID2,t)}g.ZodULID=b.$constructor("ZodULID",(t,e)=>{b.$ZodULID.init(t,e),g.ZodStringFormat.init(t,e)});function wne(t){return b._ulid(g.ZodULID,t)}g.ZodXID=b.$constructor("ZodXID",(t,e)=>{b.$ZodXID.init(t,e),g.ZodStringFormat.init(t,e)});function _ne(t){return b._xid(g.ZodXID,t)}g.ZodKSUID=b.$constructor("ZodKSUID",(t,e)=>{b.$ZodKSUID.init(t,e),g.ZodStringFormat.init(t,e)});function Bne(t){return b._ksuid(g.ZodKSUID,t)}g.ZodIPv4=b.$constructor("ZodIPv4",(t,e)=>{b.$ZodIPv4.init(t,e),g.ZodStringFormat.init(t,e)});function vne(t){return b._ipv4(g.ZodIPv4,t)}g.ZodMAC=b.$constructor("ZodMAC",(t,e)=>{b.$ZodMAC.init(t,e),g.ZodStringFormat.init(t,e)});function Qne(t){return b._mac(g.ZodMAC,t)}g.ZodIPv6=b.$constructor("ZodIPv6",(t,e)=>{b.$ZodIPv6.init(t,e),g.ZodStringFormat.init(t,e)});function Tne(t){return b._ipv6(g.ZodIPv6,t)}g.ZodCIDRv4=b.$constructor("ZodCIDRv4",(t,e)=>{b.$ZodCIDRv4.init(t,e),g.ZodStringFormat.init(t,e)});function Dne(t){return b._cidrv4(g.ZodCIDRv4,t)}g.ZodCIDRv6=b.$constructor("ZodCIDRv6",(t,e)=>{b.$ZodCIDRv6.init(t,e),g.ZodStringFormat.init(t,e)});function kne(t){return b._cidrv6(g.ZodCIDRv6,t)}g.ZodBase64=b.$constructor("ZodBase64",(t,e)=>{b.$ZodBase64.init(t,e),g.ZodStringFormat.init(t,e)});function Rne(t){return b._base64(g.ZodBase64,t)}g.ZodBase64URL=b.$constructor("ZodBase64URL",(t,e)=>{b.$ZodBase64URL.init(t,e),g.ZodStringFormat.init(t,e)});function Nne(t){return b._base64url(g.ZodBase64URL,t)}g.ZodE164=b.$constructor("ZodE164",(t,e)=>{b.$ZodE164.init(t,e),g.ZodStringFormat.init(t,e)});function One(t){return b._e164(g.ZodE164,t)}g.ZodJWT=b.$constructor("ZodJWT",(t,e)=>{b.$ZodJWT.init(t,e),g.ZodStringFormat.init(t,e)});function xne(t){return b._jwt(g.ZodJWT,t)}g.ZodCustomStringFormat=b.$constructor("ZodCustomStringFormat",(t,e)=>{b.$ZodCustomStringFormat.init(t,e),g.ZodStringFormat.init(t,e)});function Une(t,e,r={}){return b._stringFormat(g.ZodCustomStringFormat,t,e,r)}function Mne(t){return b._stringFormat(g.ZodCustomStringFormat,"hostname",b.regexes.hostname,t)}function Pne(t){return b._stringFormat(g.ZodCustomStringFormat,"hex",b.regexes.hex,t)}function Lne(t,e){let r=e?.enc??"hex",n=`${t}_${r}`,i=b.regexes[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return b._stringFormat(g.ZodCustomStringFormat,n,i,e)}g.ZodNumber=b.$constructor("ZodNumber",(t,e)=>{b.$ZodNumber.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>xe.numberProcessor(t,n,i,o),Xd(t,"ZodNumber",{gt(n,i){return this.check(Te.gt(n,i))},gte(n,i){return this.check(Te.gte(n,i))},min(n,i){return this.check(Te.gte(n,i))},lt(n,i){return this.check(Te.lt(n,i))},lte(n,i){return this.check(Te.lte(n,i))},max(n,i){return this.check(Te.lte(n,i))},int(n){return this.check(pb(n))},safe(n){return this.check(pb(n))},positive(n){return this.check(Te.gt(0,n))},nonnegative(n){return this.check(Te.gte(0,n))},negative(n){return this.check(Te.lt(0,n))},nonpositive(n){return this.check(Te.lte(0,n))},multipleOf(n,i){return this.check(Te.multipleOf(n,i))},step(n,i){return this.check(Te.multipleOf(n,i))},finite(){return this}});let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function RN(t){return b._number(g.ZodNumber,t)}g.ZodNumberFormat=b.$constructor("ZodNumberFormat",(t,e)=>{b.$ZodNumberFormat.init(t,e),g.ZodNumber.init(t,e)});function pb(t){return b._int(g.ZodNumberFormat,t)}function $ne(t){return b._float32(g.ZodNumberFormat,t)}function Fne(t){return b._float64(g.ZodNumberFormat,t)}function jne(t){return b._int32(g.ZodNumberFormat,t)}function zne(t){return b._uint32(g.ZodNumberFormat,t)}g.ZodBoolean=b.$constructor("ZodBoolean",(t,e)=>{b.$ZodBoolean.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.booleanProcessor(t,r,n,i)});function NN(t){return b._boolean(g.ZodBoolean,t)}g.ZodBigInt=b.$constructor("ZodBigInt",(t,e)=>{b.$ZodBigInt.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>xe.bigintProcessor(t,n,i,o),t.gte=(n,i)=>t.check(Te.gte(n,i)),t.min=(n,i)=>t.check(Te.gte(n,i)),t.gt=(n,i)=>t.check(Te.gt(n,i)),t.gte=(n,i)=>t.check(Te.gte(n,i)),t.min=(n,i)=>t.check(Te.gte(n,i)),t.lt=(n,i)=>t.check(Te.lt(n,i)),t.lte=(n,i)=>t.check(Te.lte(n,i)),t.max=(n,i)=>t.check(Te.lte(n,i)),t.positive=n=>t.check(Te.gt(BigInt(0),n)),t.negative=n=>t.check(Te.lt(BigInt(0),n)),t.nonpositive=n=>t.check(Te.lte(BigInt(0),n)),t.nonnegative=n=>t.check(Te.gte(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(Te.multipleOf(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function qne(t){return b._bigint(g.ZodBigInt,t)}g.ZodBigIntFormat=b.$constructor("ZodBigIntFormat",(t,e)=>{b.$ZodBigIntFormat.init(t,e),g.ZodBigInt.init(t,e)});function Hne(t){return b._int64(g.ZodBigIntFormat,t)}function Gne(t){return b._uint64(g.ZodBigIntFormat,t)}g.ZodSymbol=b.$constructor("ZodSymbol",(t,e)=>{b.$ZodSymbol.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.symbolProcessor(t,r,n,i)});function Yne(t){return b._symbol(g.ZodSymbol,t)}g.ZodUndefined=b.$constructor("ZodUndefined",(t,e)=>{b.$ZodUndefined.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.undefinedProcessor(t,r,n,i)});function Vne(t){return b._undefined(g.ZodUndefined,t)}g.ZodNull=b.$constructor("ZodNull",(t,e)=>{b.$ZodNull.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.nullProcessor(t,r,n,i)});function ON(t){return b._null(g.ZodNull,t)}g.ZodAny=b.$constructor("ZodAny",(t,e)=>{b.$ZodAny.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.anyProcessor(t,r,n,i)});function Wne(){return b._any(g.ZodAny)}g.ZodUnknown=b.$constructor("ZodUnknown",(t,e)=>{b.$ZodUnknown.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.unknownProcessor(t,r,n,i)});function $l(){return b._unknown(g.ZodUnknown)}g.ZodNever=b.$constructor("ZodNever",(t,e)=>{b.$ZodNever.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.neverProcessor(t,r,n,i)});function fb(t){return b._never(g.ZodNever,t)}g.ZodVoid=b.$constructor("ZodVoid",(t,e)=>{b.$ZodVoid.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.voidProcessor(t,r,n,i)});function Jne(t){return b._void(g.ZodVoid,t)}g.ZodDate=b.$constructor("ZodDate",(t,e)=>{b.$ZodDate.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>xe.dateProcessor(t,n,i,o),t.min=(n,i)=>t.check(Te.gte(n,i)),t.max=(n,i)=>t.check(Te.lte(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function Zne(t){return b._date(g.ZodDate,t)}g.ZodArray=b.$constructor("ZodArray",(t,e)=>{b.$ZodArray.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.arrayProcessor(t,r,n,i),t.element=e.element,Xd(t,"ZodArray",{min(r,n){return this.check(Te.minLength(r,n))},nonempty(r){return this.check(Te.minLength(1,r))},max(r,n){return this.check(Te.maxLength(r,n))},length(r,n){return this.check(Te.length(r,n))},unwrap(){return this.element}})});function ug(t,e){return b._array(g.ZodArray,t,e)}function Kne(t){let e=t._zod.def.shape;return mb(Object.keys(e))}g.ZodObject=b.$constructor("ZodObject",(t,e)=>{b.$ZodObjectJIT.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.objectProcessor(t,r,n,i),He.util.defineLazy(t,"shape",()=>e.shape),Xd(t,"ZodObject",{keyof(){return mb(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:$l()})},loose(){return this.clone({...this._zod.def,catchall:$l()})},strict(){return this.clone({...this._zod.def,catchall:fb()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return He.util.extend(this,r)},safeExtend(r){return He.util.safeExtend(this,r)},merge(r){return He.util.merge(this,r)},pick(r){return He.util.pick(this,r)},omit(r){return He.util.omit(this,r)},partial(...r){return He.util.partial(g.ZodOptional,this,r[0])},required(...r){return He.util.required(g.ZodNonOptional,this,r[0])}})});function Xne(t,e){let r={type:"object",shape:t??{},...He.util.normalizeParams(e)};return new g.ZodObject(r)}function eie(t,e){return new g.ZodObject({type:"object",shape:t,catchall:fb(),...He.util.normalizeParams(e)})}function tie(t,e){return new g.ZodObject({type:"object",shape:t,catchall:$l(),...He.util.normalizeParams(e)})}g.ZodUnion=b.$constructor("ZodUnion",(t,e)=>{b.$ZodUnion.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.unionProcessor(t,r,n,i),t.options=e.options});function gb(t,e){return new g.ZodUnion({type:"union",options:t,...He.util.normalizeParams(e)})}g.ZodXor=b.$constructor("ZodXor",(t,e)=>{g.ZodUnion.init(t,e),b.$ZodXor.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.unionProcessor(t,r,n,i),t.options=e.options});function rie(t,e){return new g.ZodXor({type:"union",options:t,inclusive:!1,...He.util.normalizeParams(e)})}g.ZodDiscriminatedUnion=b.$constructor("ZodDiscriminatedUnion",(t,e)=>{g.ZodUnion.init(t,e),b.$ZodDiscriminatedUnion.init(t,e)});function nie(t,e,r){return new g.ZodDiscriminatedUnion({type:"union",options:e,discriminator:t,...He.util.normalizeParams(r)})}g.ZodIntersection=b.$constructor("ZodIntersection",(t,e)=>{b.$ZodIntersection.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.intersectionProcessor(t,r,n,i)});function xN(t,e){return new g.ZodIntersection({type:"intersection",left:t,right:e})}g.ZodTuple=b.$constructor("ZodTuple",(t,e)=>{b.$ZodTuple.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.tupleProcessor(t,r,n,i),t.rest=r=>t.clone({...t._zod.def,rest:r})});function UN(t,e,r){let n=e instanceof b.$ZodType,i=n?r:e,o=n?e:null;return new g.ZodTuple({type:"tuple",items:t,rest:o,...He.util.normalizeParams(i)})}g.ZodRecord=b.$constructor("ZodRecord",(t,e)=>{b.$ZodRecord.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.recordProcessor(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType});function MN(t,e,r){return!e||!e._zod?new g.ZodRecord({type:"record",keyType:ag(),valueType:t,...He.util.normalizeParams(e)}):new g.ZodRecord({type:"record",keyType:t,valueType:e,...He.util.normalizeParams(r)})}function iie(t,e,r){let n=b.clone(t);return n._zod.values=void 0,new g.ZodRecord({type:"record",keyType:n,valueType:e,...He.util.normalizeParams(r)})}function oie(t,e,r){return new g.ZodRecord({type:"record",keyType:t,valueType:e,mode:"loose",...He.util.normalizeParams(r)})}g.ZodMap=b.$constructor("ZodMap",(t,e)=>{b.$ZodMap.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.mapProcessor(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(b._minSize(...r)),t.nonempty=r=>t.check(b._minSize(1,r)),t.max=(...r)=>t.check(b._maxSize(...r)),t.size=(...r)=>t.check(b._size(...r))});function sie(t,e,r){return new g.ZodMap({type:"map",keyType:t,valueType:e,...He.util.normalizeParams(r)})}g.ZodSet=b.$constructor("ZodSet",(t,e)=>{b.$ZodSet.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.setProcessor(t,r,n,i),t.min=(...r)=>t.check(b._minSize(...r)),t.nonempty=r=>t.check(b._minSize(1,r)),t.max=(...r)=>t.check(b._maxSize(...r)),t.size=(...r)=>t.check(b._size(...r))});function aie(t,e){return new g.ZodSet({type:"set",valueType:t,...He.util.normalizeParams(e)})}g.ZodEnum=b.$constructor("ZodEnum",(t,e)=>{b.$ZodEnum.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>xe.enumProcessor(t,n,i,o),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let o={};for(let s of n)if(r.has(s))o[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new g.ZodEnum({...e,checks:[],...He.util.normalizeParams(i),entries:o})},t.exclude=(n,i)=>{let o={...e.entries};for(let s of n)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new g.ZodEnum({...e,checks:[],...He.util.normalizeParams(i),entries:o})}});function mb(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new g.ZodEnum({type:"enum",entries:r,...He.util.normalizeParams(e)})}function cie(t,e){return new g.ZodEnum({type:"enum",entries:t,...He.util.normalizeParams(e)})}g.ZodLiteral=b.$constructor("ZodLiteral",(t,e)=>{b.$ZodLiteral.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.literalProcessor(t,r,n,i),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function lie(t,e){return new g.ZodLiteral({type:"literal",values:Array.isArray(t)?t:[t],...He.util.normalizeParams(e)})}g.ZodFile=b.$constructor("ZodFile",(t,e)=>{b.$ZodFile.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.fileProcessor(t,r,n,i),t.min=(r,n)=>t.check(b._minSize(r,n)),t.max=(r,n)=>t.check(b._maxSize(r,n)),t.mime=(r,n)=>t.check(b._mime(Array.isArray(r)?r:[r],n))});function uie(t){return b._file(g.ZodFile,t)}g.ZodTransform=b.$constructor("ZodTransform",(t,e)=>{b.$ZodTransform.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.transformProcessor(t,r,n,i),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new b.$ZodEncodeError(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(He.util.issue(o,r.value,e));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),r.issues.push(He.util.issue(s))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function yb(t){return new g.ZodTransform({type:"transform",transform:t})}g.ZodOptional=b.$constructor("ZodOptional",(t,e)=>{b.$ZodOptional.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.optionalProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function cg(t){return new g.ZodOptional({type:"optional",innerType:t})}g.ZodExactOptional=b.$constructor("ZodExactOptional",(t,e)=>{b.$ZodExactOptional.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.optionalProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function PN(t){return new g.ZodExactOptional({type:"optional",innerType:t})}g.ZodNullable=b.$constructor("ZodNullable",(t,e)=>{b.$ZodNullable.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.nullableProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function lg(t){return new g.ZodNullable({type:"nullable",innerType:t})}function die(t){return cg(lg(t))}g.ZodDefault=b.$constructor("ZodDefault",(t,e)=>{b.$ZodDefault.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.defaultProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function LN(t,e){return new g.ZodDefault({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():He.util.shallowClone(e)}})}g.ZodPrefault=b.$constructor("ZodPrefault",(t,e)=>{b.$ZodPrefault.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.prefaultProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function $N(t,e){return new g.ZodPrefault({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():He.util.shallowClone(e)}})}g.ZodNonOptional=b.$constructor("ZodNonOptional",(t,e)=>{b.$ZodNonOptional.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.nonoptionalProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function FN(t,e){return new g.ZodNonOptional({type:"nonoptional",innerType:t,...He.util.normalizeParams(e)})}g.ZodSuccess=b.$constructor("ZodSuccess",(t,e)=>{b.$ZodSuccess.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.successProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Aie(t){return new g.ZodSuccess({type:"success",innerType:t})}g.ZodCatch=b.$constructor("ZodCatch",(t,e)=>{b.$ZodCatch.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.catchProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function jN(t,e){return new g.ZodCatch({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}g.ZodNaN=b.$constructor("ZodNaN",(t,e)=>{b.$ZodNaN.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.nanProcessor(t,r,n,i)});function pie(t){return b._nan(g.ZodNaN,t)}g.ZodPipe=b.$constructor("ZodPipe",(t,e)=>{b.$ZodPipe.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.pipeProcessor(t,r,n,i),t.in=e.in,t.out=e.out});function hb(t,e){return new g.ZodPipe({type:"pipe",in:t,out:e})}g.ZodCodec=b.$constructor("ZodCodec",(t,e)=>{g.ZodPipe.init(t,e),b.$ZodCodec.init(t,e)});function hie(t,e,r){return new g.ZodCodec({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}function fie(t){let e=t._zod.def;return new g.ZodCodec({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}g.ZodPreprocess=b.$constructor("ZodPreprocess",(t,e)=>{g.ZodPipe.init(t,e),b.$ZodPreprocess.init(t,e)});g.ZodReadonly=b.$constructor("ZodReadonly",(t,e)=>{b.$ZodReadonly.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.readonlyProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function zN(t){return new g.ZodReadonly({type:"readonly",innerType:t})}g.ZodTemplateLiteral=b.$constructor("ZodTemplateLiteral",(t,e)=>{b.$ZodTemplateLiteral.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.templateLiteralProcessor(t,r,n,i)});function gie(t,e){return new g.ZodTemplateLiteral({type:"template_literal",parts:t,...He.util.normalizeParams(e)})}g.ZodLazy=b.$constructor("ZodLazy",(t,e)=>{b.$ZodLazy.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.lazyProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.getter()});function qN(t){return new g.ZodLazy({type:"lazy",getter:t})}g.ZodPromise=b.$constructor("ZodPromise",(t,e)=>{b.$ZodPromise.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.promiseProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function mie(t){return new g.ZodPromise({type:"promise",innerType:t})}g.ZodFunction=b.$constructor("ZodFunction",(t,e)=>{b.$ZodFunction.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.functionProcessor(t,r,n,i)});function dg(t){return new g.ZodFunction({type:"function",input:Array.isArray(t?.input)?UN(t?.input):t?.input??ug($l()),output:t?.output??$l()})}g.ZodCustom=b.$constructor("ZodCustom",(t,e)=>{b.$ZodCustom.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.customProcessor(t,r,n,i)});function yie(t){let e=new b.$ZodCheck({check:"custom"});return e._zod.check=t,e}function Eie(t,e){return b._custom(g.ZodCustom,t??(()=>!0),e)}function HN(t,e={}){return b._refine(g.ZodCustom,t,e)}function GN(t,e){return b._superRefine(t,e)}g.describe=b.describe;g.meta=b.meta;function Iie(t,e={}){let r=new g.ZodCustom({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...He.util.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Cie=(...t)=>b._stringbool({Codec:g.ZodCodec,Boolean:g.ZodBoolean,String:g.ZodString},...t);g.stringbool=Cie;function bie(t){let e=qN(()=>gb([ag(t),RN(),NN(),ON(),ug(e),MN(ag(),e)]));return e}function Sie(t,e){return new g.ZodPreprocess({type:"pipe",in:yb(t),out:e})}});var JN=y(dr=>{"use strict";var wie=dr&&dr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),_ie=dr&&dr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Bie=dr&&dr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&wie(e,t,r);return _ie(e,t),e};Object.defineProperty(dr,"__esModule",{value:!0});dr.ZodFirstPartyTypeKind=dr.config=dr.$brand=dr.ZodIssueCode=void 0;dr.setErrorMap=vie;dr.getErrorMap=Qie;var VN=Bie(Wr());dr.ZodIssueCode={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"};var WN=Wr();Object.defineProperty(dr,"$brand",{enumerable:!0,get:function(){return WN.$brand}});Object.defineProperty(dr,"config",{enumerable:!0,get:function(){return WN.config}});function vie(t){VN.config({customError:t})}function Qie(){return VN.config().customError}var YN;YN||(dr.ZodFirstPartyTypeKind=YN={})});var KN=y(Is=>{"use strict";var Tie=Is&&Is.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Die=Is&&Is.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Eb=Is&&Is.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Tie(e,t,r);return Die(e,t),e};Object.defineProperty(Is,"__esModule",{value:!0});Is.fromJSONSchema=Pie;var kie=Hd(),Rie=Eb(ng()),Nie=Eb(Jd()),Oie=Eb(Zd()),ee={...Oie,...Rie,iso:Nie},xie=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 Uie(t,e){let r=t.$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":e??"draft-2020-12"}function Mie(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=t.slice(1).split("/").filter(Boolean);if(r.length===0)return e.rootSchema;let n=e.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let i=r[1];if(!i||!e.defs[i])throw new Error(`Reference not found: ${t}`);return e.defs[i]}throw new Error(`Reference not found: ${t}`)}function ZN(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return ee.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let i=t.$ref;if(e.refs.has(i))return e.refs.get(i);if(e.processing.has(i))return ee.lazy(()=>{if(!e.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return e.refs.get(i)});e.processing.add(i);let o=Mie(i,e),s=Br(o,e);return e.refs.set(i,s),e.processing.delete(i),s}if(t.enum!==void 0){let i=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&i.length===1&&i[0]===null)return ee.null();if(i.length===0)return ee.never();if(i.length===1)return ee.literal(i[0]);if(i.every(s=>typeof s=="string"))return ee.enum(i);let o=i.map(s=>ee.literal(s));return o.length<2?o[0]:ee.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return ee.literal(t.const);let r=t.type;if(Array.isArray(r)){let i=r.map(o=>{let s={...t,type:o};return ZN(s,e)});return i.length===0?ee.never():i.length===1?i[0]:ee.union(i)}if(!r)return ee.any();let n;switch(r){case"string":{let i=ee.string();if(t.format){let o=t.format;o==="email"?i=i.check(ee.email()):o==="uri"||o==="uri-reference"?i=i.check(ee.url()):o==="uuid"||o==="guid"?i=i.check(ee.uuid()):o==="date-time"?i=i.check(ee.iso.datetime()):o==="date"?i=i.check(ee.iso.date()):o==="time"?i=i.check(ee.iso.time()):o==="duration"?i=i.check(ee.iso.duration()):o==="ipv4"?i=i.check(ee.ipv4()):o==="ipv6"?i=i.check(ee.ipv6()):o==="mac"?i=i.check(ee.mac()):o==="cidr"?i=i.check(ee.cidrv4()):o==="cidr-v6"?i=i.check(ee.cidrv6()):o==="base64"?i=i.check(ee.base64()):o==="base64url"?i=i.check(ee.base64url()):o==="e164"?i=i.check(ee.e164()):o==="jwt"?i=i.check(ee.jwt()):o==="emoji"?i=i.check(ee.emoji()):o==="nanoid"?i=i.check(ee.nanoid()):o==="cuid"?i=i.check(ee.cuid()):o==="cuid2"?i=i.check(ee.cuid2()):o==="ulid"?i=i.check(ee.ulid()):o==="xid"?i=i.check(ee.xid()):o==="ksuid"&&(i=i.check(ee.ksuid()))}typeof t.minLength=="number"&&(i=i.min(t.minLength)),typeof t.maxLength=="number"&&(i=i.max(t.maxLength)),t.pattern&&(i=i.regex(new RegExp(t.pattern))),n=i;break}case"number":case"integer":{let i=r==="integer"?ee.number().int():ee.number();typeof t.minimum=="number"&&(i=i.min(t.minimum)),typeof t.maximum=="number"&&(i=i.max(t.maximum)),typeof t.exclusiveMinimum=="number"?i=i.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(i=i.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?i=i.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(i=i.lt(t.maximum)),typeof t.multipleOf=="number"&&(i=i.multipleOf(t.multipleOf)),n=i;break}case"boolean":{n=ee.boolean();break}case"null":{n=ee.null();break}case"object":{let i={},o=t.properties||{},s=new Set(t.required||[]);for(let[c,l]of Object.entries(o)){let u=Br(l,e);i[c]=s.has(c)?u:u.optional()}if(t.propertyNames){let c=Br(t.propertyNames,e),l=t.additionalProperties&&typeof t.additionalProperties=="object"?Br(t.additionalProperties,e):ee.any();if(Object.keys(i).length===0){n=ee.record(c,l);break}let u=ee.object(i).passthrough(),d=ee.looseRecord(c,l);n=ee.intersection(u,d);break}if(t.patternProperties){let c=t.patternProperties,l=Object.keys(c),u=[];for(let A of l){let p=Br(c[A],e),h=ee.string().regex(new RegExp(A));u.push(ee.looseRecord(h,p))}let d=[];if(Object.keys(i).length>0&&d.push(ee.object(i).passthrough()),d.push(...u),d.length===0)n=ee.object({}).passthrough();else if(d.length===1)n=d[0];else{let A=ee.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)A=ee.intersection(A,d[p]);n=A}break}let a=ee.object(i);t.additionalProperties===!1?n=a.strict():typeof t.additionalProperties=="object"?n=a.catchall(Br(t.additionalProperties,e)):n=a.passthrough();break}case"array":{let i=t.prefixItems,o=t.items;if(i&&Array.isArray(i)){let s=i.map(c=>Br(c,e)),a=o&&typeof o=="object"&&!Array.isArray(o)?Br(o,e):void 0;a?n=ee.tuple(s).rest(a):n=ee.tuple(s),typeof t.minItems=="number"&&(n=n.check(ee.minLength(t.minItems))),typeof t.maxItems=="number"&&(n=n.check(ee.maxLength(t.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>Br(c,e)),a=t.additionalItems&&typeof t.additionalItems=="object"?Br(t.additionalItems,e):void 0;a?n=ee.tuple(s).rest(a):n=ee.tuple(s),typeof t.minItems=="number"&&(n=n.check(ee.minLength(t.minItems))),typeof t.maxItems=="number"&&(n=n.check(ee.maxLength(t.maxItems)))}else if(o!==void 0){let s=Br(o,e),a=ee.array(s);typeof t.minItems=="number"&&(a=a.min(t.minItems)),typeof t.maxItems=="number"&&(a=a.max(t.maxItems)),n=a}else n=ee.array(ee.any());break}default:throw new Error(`Unsupported type: ${r}`)}return n}function Br(t,e){if(typeof t=="boolean")return t?ee.any():ee.never();let r=ZN(t,e),n=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(l=>Br(l,e)),c=ee.union(a);r=n?ee.intersection(r,c):c}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(l=>Br(l,e)),c=ee.xor(a);r=n?ee.intersection(r,c):c}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)r=n?r:ee.any();else{let a=n?r:Br(t.allOf[0],e),c=n?0:1;for(let l=c;l<t.allOf.length;l++)a=ee.intersection(a,Br(t.allOf[l],e));r=a}t.nullable===!0&&e.version==="openapi-3.0"&&(r=ee.nullable(r)),t.readOnly===!0&&(r=ee.readonly(r)),t.default!==void 0&&(r=r.default(t.default));let i={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in t&&(i[a]=t[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in t&&(i[a]=t[a]);for(let a of Object.keys(t))xie.has(a)||(i[a]=t[a]);return Object.keys(i).length>0&&e.registry.add(r,i),t.description&&(r=r.describe(t.description)),r}function Pie(t,e){if(typeof t=="boolean")return t?ee.any():ee.never();let r;try{r=JSON.parse(JSON.stringify(t))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=Uie(r,e?.defaultTarget),i=r.$defs||r.definitions||{},o={version:n,defs:i,refs:new Map,processing:new Set,rootSchema:r,registry:e?.registry??kie.globalRegistry};return Br(r,o)}});var eO=y(gn=>{"use strict";var Lie=gn&&gn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$ie=gn&&gn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),XN=gn&&gn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Lie(e,t,r);return $ie(e,t),e};Object.defineProperty(gn,"__esModule",{value:!0});gn.string=Fie;gn.number=jie;gn.boolean=zie;gn.bigint=qie;gn.date=Hie;var eA=XN(Wr()),tA=XN(Zd());function Fie(t){return eA._coercedString(tA.ZodString,t)}function jie(t){return eA._coercedNumber(tA.ZodNumber,t)}function zie(t){return eA._coercedBoolean(tA.ZodBoolean,t)}function qie(t){return eA._coercedBigint(tA.ZodBigInt,t)}function Hie(t){return eA._coercedDate(tA.ZodDate,t)}});var Ib=y(ce=>{"use strict";var tO=ce&&ce.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Gie=ce&&ce.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ag=ce&&ce.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&tO(e,t,r);return Gie(e,t),e},rA=ce&&ce.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&tO(e,t,r)},Yie=ce&&ce.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ce,"__esModule",{value:!0});ce.coerce=ce.iso=ce.ZodISODuration=ce.ZodISOTime=ce.ZodISODate=ce.ZodISODateTime=ce.locales=ce.fromJSONSchema=ce.toJSONSchema=ce.NEVER=ce.util=ce.TimePrecision=ce.flattenError=ce.formatError=ce.prettifyError=ce.treeifyError=ce.regexes=ce.clone=ce.$brand=ce.$input=ce.$output=ce.config=ce.registry=ce.globalRegistry=ce.core=void 0;ce.core=Ag(Wr());rA(Zd(),ce);rA(ng(),ce);rA(ub(),ce);rA(db(),ce);rA(JN(),ce);var Vie=Wr(),Wie=Yie(rb());(0,Vie.config)((0,Wie.default)());var Ur=Wr();Object.defineProperty(ce,"globalRegistry",{enumerable:!0,get:function(){return Ur.globalRegistry}});Object.defineProperty(ce,"registry",{enumerable:!0,get:function(){return Ur.registry}});Object.defineProperty(ce,"config",{enumerable:!0,get:function(){return Ur.config}});Object.defineProperty(ce,"$output",{enumerable:!0,get:function(){return Ur.$output}});Object.defineProperty(ce,"$input",{enumerable:!0,get:function(){return Ur.$input}});Object.defineProperty(ce,"$brand",{enumerable:!0,get:function(){return Ur.$brand}});Object.defineProperty(ce,"clone",{enumerable:!0,get:function(){return Ur.clone}});Object.defineProperty(ce,"regexes",{enumerable:!0,get:function(){return Ur.regexes}});Object.defineProperty(ce,"treeifyError",{enumerable:!0,get:function(){return Ur.treeifyError}});Object.defineProperty(ce,"prettifyError",{enumerable:!0,get:function(){return Ur.prettifyError}});Object.defineProperty(ce,"formatError",{enumerable:!0,get:function(){return Ur.formatError}});Object.defineProperty(ce,"flattenError",{enumerable:!0,get:function(){return Ur.flattenError}});Object.defineProperty(ce,"TimePrecision",{enumerable:!0,get:function(){return Ur.TimePrecision}});Object.defineProperty(ce,"util",{enumerable:!0,get:function(){return Ur.util}});Object.defineProperty(ce,"NEVER",{enumerable:!0,get:function(){return Ur.NEVER}});var Jie=Wd();Object.defineProperty(ce,"toJSONSchema",{enumerable:!0,get:function(){return Jie.toJSONSchema}});var Zie=KN();Object.defineProperty(ce,"fromJSONSchema",{enumerable:!0,get:function(){return Zie.fromJSONSchema}});ce.locales=Ag(ob());var pg=Jd();Object.defineProperty(ce,"ZodISODateTime",{enumerable:!0,get:function(){return pg.ZodISODateTime}});Object.defineProperty(ce,"ZodISODate",{enumerable:!0,get:function(){return pg.ZodISODate}});Object.defineProperty(ce,"ZodISOTime",{enumerable:!0,get:function(){return pg.ZodISOTime}});Object.defineProperty(ce,"ZodISODuration",{enumerable:!0,get:function(){return pg.ZodISODuration}});ce.iso=Ag(Jd());ce.coerce=Ag(eO())});var uc=y(Jr=>{"use strict";var rO=Jr&&Jr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Kie=Jr&&Jr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Xie=Jr&&Jr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&rO(e,t,r);return Kie(e,t),e},eoe=Jr&&Jr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&rO(e,t,r)};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.z=void 0;var nO=Xie(Ib());Jr.z=nO;eoe(Ib(),Jr);Jr.default=nO});var mg=y(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.CHAT_VISUAL_CURRENCY_PREFIXES=V.chatVisualBlockSchema=V.chatVisualBlockShape=V.chatVisualSchema=V.CHAT_VISUAL_TYPES=V.CHAT_VISUAL_TONES=V.CHAT_VISUAL_STATUSES=V.CHAT_VISUAL_RECONCILE_KINDS=V.CHAT_VISUAL_MIGRATION_LAYERS=V.CHAT_VISUAL_MIGRATION_PHASES=V.CHAT_VISUAL_MAPPING_RULES=V.CHAT_VISUAL_LIMITS=void 0;V.parseChatVisualBlock=Soe;V.formatChatVisualNumber=dc;V.formatChatVisualValue=AO;V.groupFlowNodes=pO;V.parseLessonStepVisual=hO;V.reconcileGap=fO;V.chatVisualToMarkdown=Boe;var R=uc();V.CHAT_VISUAL_LIMITS={text:2e3,stats:6,sparklinePoints:30,chartLabels:50,chartSeries:8,flowNodes:24,flowEdges:40,steps:20,tableColumns:8,tableRows:30,mappingFields:40,cards:12,cardFacts:4,images:6,diagramChars:8e3,customHtml:6e4,customMinHeight:120,customMaxHeight:900,migrationObjects:20,migrationIssues:3,reconcileSteps:10,timelineItems:30,lessonSteps:10,lessonOptions:4,lessonCustomVisuals:2,timelineUnits:1e5};V.CHAT_VISUAL_MAPPING_RULES=["direct","transform","lookup","default","constant","skip"];V.CHAT_VISUAL_MIGRATION_PHASES=["inventory","mapping","quality","test","load","reconcile","cutover"];V.CHAT_VISUAL_MIGRATION_LAYERS=["reference","master","transaction","balance","history"];V.CHAT_VISUAL_RECONCILE_KINDS=["excluded","merged","failed","pending","added","other"];V.CHAT_VISUAL_STATUSES=["success","failed","warning","running","pending","skipped"];V.CHAT_VISUAL_TONES=["positive","negative","warning","neutral"];var iO=["flowchart","graph","sequenceDiagram","erDiagram","stateDiagram","stateDiagram-v2","classDiagram","gantt","journey","timeline","mindmap","quadrantChart","gitGraph","pie"],Ve=()=>R.z.string().trim().min(1).max(V.CHAT_VISUAL_LIMITS.text),_t=()=>R.z.string().trim().max(V.CHAT_VISUAL_LIMITS.text),bb=_t().refine(t=>/^https:\/\/[^\s]+$/i.test(t),"Must be an absolute https:// URL."),jl=R.z.enum(V.CHAT_VISUAL_STATUSES),gg=R.z.string().trim().min(1).max(80).describe("Connected system id or superglue template key, such as salesforce; shows its logo."),toe=R.z.object({type:R.z.literal("stats"),items:R.z.array(R.z.object({label:Ve(),value:R.z.union([R.z.number(),Ve()]).describe("Displayed value, such as 1240 or '4.2 s'."),unit:_t().optional().describe("Suffix, such as '%' for rates and shares, or a currency symbol prefix."),delta:_t().optional().describe("Change, such as '+12%' or '-3'."),tone:R.z.enum(V.CHAT_VISUAL_TONES).optional().describe("Meaning of the delta or value."),hint:_t().optional().describe("Context, such as 'last 7 days'."),trend:R.z.array(R.z.number()).min(2).max(V.CHAT_VISUAL_LIMITS.sparklinePoints).optional().describe("Values for a small trend line, oldest first.")})).min(1).max(V.CHAT_VISUAL_LIMITS.stats)}),roe=R.z.object({type:R.z.literal("chart"),kind:R.z.enum(["bar","hbar","line","area","donut"]).describe("bar: vertical bars; hbar: horizontal bars for rankings; donut: one series."),labels:R.z.array(Ve()).min(1).max(V.CHAT_VISUAL_LIMITS.chartLabels).describe("Category or x-axis labels in display order."),series:R.z.array(R.z.object({name:Ve(),values:R.z.array(R.z.number().nullable()).describe("One value per label, in label order; null for a gap.")})).min(1).max(V.CHAT_VISUAL_LIMITS.chartSeries),stacked:R.z.boolean().optional().describe("Stack bar or area series."),unit:_t().optional().describe("Value suffix, such as '%' for rates and shares, or a currency symbol prefix.")}).superRefine((t,e)=>{t.series.forEach((r,n)=>{r.values.length!==t.labels.length&&e.addIssue({code:"custom",path:["series",n,"values"],message:`Series "${r.name}" has ${r.values.length} values for ${t.labels.length} labels.`})}),t.kind==="donut"&&t.series.length!==1&&e.addIssue({code:"custom",path:["series"],message:"A donut takes one series."}),(t.kind==="hbar"||t.kind==="donut")&&t.series.some(r=>r.values.some(n=>n!==null&&n<0))&&e.addIssue({code:"custom",path:["series"],message:`A ${t.kind} chart takes no negative values; use a bar chart.`})}),noe=R.z.object({type:R.z.literal("flow"),direction:R.z.enum(["right","down"]).optional().describe("Layout direction; default right."),nodes:R.z.array(R.z.object({id:Ve(),label:Ve(),kind:R.z.enum(["system","step","trigger","transform","decision","store","user"]).optional(),system:gg.optional(),detail:_t().optional().describe("Shown when the node is opened."),status:jl.optional(),group:_t().optional().describe("Cluster label, such as one system's side; groups show parts that are not connected.")})).min(2).max(V.CHAT_VISUAL_LIMITS.flowNodes),edges:R.z.array(R.z.object({from:Ve(),to:Ve(),label:_t().optional(),status:jl.optional()})).max(V.CHAT_VISUAL_LIMITS.flowEdges)}).superRefine((t,e)=>{let r=new Set;t.nodes.forEach((n,i)=>{r.has(n.id)&&e.addIssue({code:"custom",path:["nodes",i,"id"],message:`Duplicate node id "${n.id}".`}),r.add(n.id)}),t.edges.forEach((n,i)=>{for(let o of["from","to"])r.has(n[o])||e.addIssue({code:"custom",path:["edges",i,o],message:`Edge ${o} "${n[o]}" is not a node id.`})})}),ioe=R.z.object({type:R.z.literal("steps"),items:R.z.array(R.z.object({title:Ve(),status:jl,detail:_t().optional(),time:_t().optional().describe("When it happened, as display text."),duration:_t().optional().describe("Such as '1.2 s'.")})).min(1).max(V.CHAT_VISUAL_LIMITS.steps)}),uO={success:"positive",failed:"negative",warning:"warning",running:"neutral",pending:"neutral",skipped:"neutral"};function ooe(t){return typeof t!="object"||t===null||!("kind"in t)?t:t.kind==="status"?{...t,kind:"tag",tones:uO}:t}function soe(t){if(typeof t!="object"||t===null||!("status"in t))return t;let{status:e,...r}=t;if(!V.CHAT_VISUAL_STATUSES.includes(e))return r;let n=e;return{...r,tag:{label:n.charAt(0).toUpperCase()+n.slice(1),tone:uO[n]}}}var aoe=R.z.object({label:Ve(),tone:R.z.enum(V.CHAT_VISUAL_TONES).optional().describe("Tag color; neutral when omitted.")}).describe("Short label shown as a tag, such as a status, priority, or effort."),coe=R.z.object({label:Ve(),kind:R.z.enum(["text","number","tag","system","date","code","link"]).optional().describe("tag cells show their text as a tag, such as a status, priority, or effort; system cells hold a system id; link cells hold an https URL or [label](https://...)."),tones:R.z.record(R.z.string(),R.z.enum(V.CHAT_VISUAL_TONES)).optional().describe("Tag color by exact cell value, such as { Failed: 'negative', High: 'warning' }; other values are neutral.")}),loe=R.z.object({type:R.z.literal("table"),columns:R.z.array(R.z.preprocess(ooe,coe)).min(1).max(V.CHAT_VISUAL_LIMITS.tableColumns),rows:R.z.array(R.z.array(R.z.union([R.z.string().max(V.CHAT_VISUAL_LIMITS.text),R.z.number(),R.z.boolean(),R.z.null()]))).max(V.CHAT_VISUAL_LIMITS.tableRows).describe("Each row holds one cell per column, in column order."),totalRows:R.z.number().int().nonnegative().optional().describe("Number of rows in the full result when rows holds a sample. Not a sum of cell values.")}).superRefine((t,e)=>{t.rows.forEach((r,n)=>{r.length!==t.columns.length&&e.addIssue({code:"custom",path:["rows",n],message:`Row ${n} has ${r.length} cells for ${t.columns.length} columns.`})})}),oO=R.z.object({label:Ve(),system:gg.optional()}),uoe=R.z.object({type:R.z.literal("mapping"),source:oO,target:oO,fields:R.z.array(R.z.object({source:_t().describe("Source field; empty when the target is unmapped."),target:Ve(),rule:R.z.enum(V.CHAT_VISUAL_MAPPING_RULES).optional().describe("direct: copied as is; transform: changed by a rule; lookup: resolved through another record; default/constant: fixed value; skip: not migrated."),transform:_t().optional().describe("The rule or value, such as 'uppercase' or 'Net 30'."),required:R.z.boolean().optional().describe("The target requires this field."),sample:R.z.object({from:R.z.string().max(V.CHAT_VISUAL_LIMITS.text).optional(),to:R.z.string().max(V.CHAT_VISUAL_LIMITS.text).optional()}).optional().describe("One real value before and after the mapping."),note:_t().optional().describe("Reason, decision, or open question."),status:jl.optional().describe("success: mapped; warning: needs review; pending: decision open; failed: required field without a source.")})).min(1).max(V.CHAT_VISUAL_LIMITS.mappingFields)}),sO=R.z.object({label:Ve(),system:gg.optional()}),doe=R.z.object({type:R.z.literal("migration"),source:sO,target:sO,phase:R.z.enum(V.CHAT_VISUAL_MIGRATION_PHASES).optional().describe("Current phase; earlier phases show as done."),objects:R.z.array(R.z.object({name:Ve(),layer:R.z.enum(V.CHAT_VISUAL_MIGRATION_LAYERS).optional().describe("reference: setup lists such as terms or accounts; master: customers, vendors, items; transaction: invoices, bills, orders; balance: opening balances; history: closed periods."),needs:R.z.array(Ve()).max(5).optional().describe("Names of objects in this list that must load first."),source:R.z.number().int().nonnegative().optional().describe("Records in the source."),loaded:R.z.number().int().nonnegative().optional(),failed:R.z.number().int().nonnegative().optional(),skipped:R.z.number().int().nonnegative().optional(),status:jl.optional(),issues:R.z.array(R.z.object({label:Ve(),count:R.z.number().int().nonnegative().optional()})).max(V.CHAT_VISUAL_LIMITS.migrationIssues).optional().describe("Top problems, such as a failure reason and its record count."),note:_t().optional()})).min(1).max(V.CHAT_VISUAL_LIMITS.migrationObjects).describe("Objects in load order.")}).superRefine((t,e)=>{let r=new Set(t.objects.map(n=>n.name));r.size!==t.objects.length&&e.addIssue({code:"custom",path:["objects"],message:"Object names must be unique."}),t.objects.forEach((n,i)=>{n.needs?.includes(n.name)&&e.addIssue({code:"custom",path:["objects",i,"needs"],message:`${n.name} cannot load after itself.`}),n.status==="success"&&(n.failed??0)>0&&e.addIssue({code:"custom",path:["objects",i,"status"],message:`${n.name} has ${n.failed} failed records; use warning or failed, not success.`}),n.needs?.forEach((o,s)=>{r.has(o)||e.addIssue({code:"custom",path:["objects",i,"needs",s],message:`"${o}" is not an object name in this migration.`})})})}),Aoe=R.z.object({type:R.z.literal("reconcile"),object:_t().optional().describe("What is counted, such as 'vendors'."),unit:_t().optional().describe("Value suffix, or a currency symbol prefix."),source:R.z.object({label:Ve(),value:R.z.number()}).describe("Starting total."),steps:R.z.array(R.z.object({label:Ve(),value:R.z.number().describe("Signed change: negative removes, positive adds."),kind:R.z.enum(V.CHAT_VISUAL_RECONCILE_KINDS).optional(),reason:_t().optional()})).max(V.CHAT_VISUAL_LIMITS.reconcileSteps),target:R.z.object({label:Ve(),value:R.z.number()}).describe("Ending total.")});function poe(t){let e=new Date(`${t}T00:00:00Z`);return!Number.isNaN(e.getTime())&&e.toISOString().startsWith(t)}var Cb=R.z.union([R.z.number().int().min(-V.CHAT_VISUAL_LIMITS.timelineUnits).max(V.CHAT_VISUAL_LIMITS.timelineUnits).describe("Week or day number for the week and day scales."),R.z.string().regex(/^\d{4}-\d{2}-\d{2}$/,"Use YYYY-MM-DD.").refine(poe,"Not a calendar date.").describe("Date for the date scale.")]);function hoe(t,e){return typeof t=="number"&&typeof e=="number"||typeof t=="string"&&typeof e=="string"?t<e:!1}var foe=R.z.object({type:R.z.literal("timeline"),scale:R.z.enum(["date","week","day"]).describe("date: YYYY-MM-DD points; week/day: numbers."),items:R.z.array(R.z.object({label:Ve(),lane:_t().optional().describe("Row group, such as an owner or a workstream."),start:Cb,end:Cb.optional().describe("Omit for milestones."),milestone:R.z.boolean().optional(),status:jl.optional(),dependsOn:R.z.array(Ve()).max(4).optional().describe("Labels of items that finish first.")})).min(1).max(V.CHAT_VISUAL_LIMITS.timelineItems),today:Cb.optional().describe("Marks the current date, week, or day.")}).superRefine((t,e)=>{let r=t.scale==="date",n=(o,s)=>{o!==void 0&&r!==(typeof o=="string")&&e.addIssue({code:"custom",path:s,message:r?"Use YYYY-MM-DD for the date scale.":"Use a number for the week and day scales."})},i=new Set(t.items.map(o=>o.label));i.size!==t.items.length&&e.addIssue({code:"custom",path:["items"],message:"Item labels must be unique."}),t.items.forEach((o,s)=>{o.dependsOn?.includes(o.label)&&e.addIssue({code:"custom",path:["items",s,"dependsOn"],message:`${o.label} cannot depend on itself.`}),n(o.start,["items",s,"start"]),n(o.end,["items",s,"end"]),o.end!==void 0&&hoe(o.end,o.start)&&e.addIssue({code:"custom",path:["items",s,"end"],message:"end is before start."}),o.dependsOn?.forEach((a,c)=>{i.has(a)||e.addIssue({code:"custom",path:["items",s,"dependsOn",c],message:`"${a}" is not an item label in this timeline.`})})}),n(t.today,["today"])}),goe=R.z.object({prompt:Ve().describe("Asked before the explanation is revealed."),options:R.z.array(R.z.object({label:Ve(),correct:R.z.boolean(),explanation:Ve().describe("Why this option is right or wrong; the UI already shows the verdict.")})).min(2).max(V.CHAT_VISUAL_LIMITS.lessonOptions),hint:_t().optional().describe("Shown after the first wrong answer.")}).superRefine((t,e)=>{t.options.filter(r=>r.correct).length!==1&&e.addIssue({code:"custom",path:["options"],message:"Mark exactly one option correct."})}),moe=R.z.object({type:R.z.literal("lesson"),steps:R.z.array(R.z.object({title:Ve(),body:_t().optional().describe("Short Markdown explanation shown with the step."),visual:R.z.record(R.z.string(),R.z.unknown()).optional().describe("Any visual object except lesson, such as a flow, mapping, or custom visual."),question:goe.optional()})).min(2).max(V.CHAT_VISUAL_LIMITS.lessonSteps),recap:_t().optional().describe("Markdown summary on the completion screen.")}).superRefine((t,e)=>{t.steps.filter(n=>n.visual?.type==="custom").length>V.CHAT_VISUAL_LIMITS.lessonCustomVisuals&&e.addIssue({code:"custom",path:["steps"],message:`A lesson can contain at most ${V.CHAT_VISUAL_LIMITS.lessonCustomVisuals} custom visuals; use built-in visuals for the other steps.`}),t.steps.forEach((n,i)=>{if(n.visual===void 0)return;let o=V.chatVisualSchema.safeParse(n.visual);if(o.success)o.data.type==="lesson"&&e.addIssue({code:"custom",path:["steps",i,"visual","type"],message:"A lesson step cannot contain a lesson."});else for(let s of o.error.issues)e.addIssue({code:"custom",path:["steps",i,"visual",...s.path.map(a=>typeof a=="symbol"?String(a):a)],message:s.message})})}),yoe=R.z.object({type:R.z.literal("cards"),items:R.z.array(R.z.preprocess(soe,R.z.object({title:Ve(),subtitle:_t().optional(),system:gg.optional(),image:bb.optional().describe("Card image URL."),tag:aoe.optional(),facts:R.z.array(R.z.object({label:Ve(),value:R.z.union([R.z.number(),Ve()])})).max(V.CHAT_VISUAL_LIMITS.cardFacts).optional(),href:bb.optional().describe("External link the card opens.")}))).min(1).max(V.CHAT_VISUAL_LIMITS.cards)}),Eoe=R.z.object({type:R.z.literal("diagram"),source:R.z.string().trim().min(1).max(V.CHAT_VISUAL_LIMITS.diagramChars).refine(t=>iO.includes(t.split(/\s/,1)[0]??""),`Must start with a Mermaid diagram keyword: ${iO.join(", ")}.`).describe("Mermaid source, such as a sequenceDiagram or erDiagram.")}),Ioe=R.z.object({type:R.z.literal("image"),images:R.z.array(R.z.object({src:bb,alt:Ve().describe("What the image shows."),caption:_t().optional()})).min(1).max(V.CHAT_VISUAL_LIMITS.images)}),Coe=R.z.object({type:R.z.literal("custom"),summary:Ve().describe("Markdown description of what the visual shows; replaces it where it cannot run, such as Microsoft Teams."),html:R.z.string().trim().min(1).max(V.CHAT_VISUAL_LIMITS.customHtml).describe("Self-contained HTML document or body fragment with inline scripts and styles, run in an isolated frame with the chat visual runtime."),height:R.z.number().int().min(V.CHAT_VISUAL_LIMITS.customMinHeight).max(V.CHAT_VISUAL_LIMITS.customMaxHeight).optional().describe("Initial height in pixels; the frame then follows the content height.")}),boe=R.z.object({type:R.z.literal("callout"),tone:R.z.enum(["info","success","warning","error"]),body:Ve().describe("Plain text with optional inline Markdown.")}),dO=[toe,roe,noe,ioe,loe,uoe,yoe,Eoe,Ioe,boe,Coe,doe,Aoe,foe,moe];V.CHAT_VISUAL_TYPES=dO.map(t=>t.shape.type.value);V.chatVisualSchema=R.z.discriminatedUnion("type",dO,{error:t=>t.code==="invalid_union"&&t.note==="No matching discriminator"?`visual needs a type key with one of: ${V.CHAT_VISUAL_TYPES.join(", ")}`:void 0});V.chatVisualBlockShape={title:Ve().optional().describe("Short heading."),caption:Ve().optional().describe("One-line takeaway shown under the heading."),visual:V.chatVisualSchema,replaces:R.z.string().trim().min(1).max(120).optional().describe("visualId of an earlier visual in the same reply that this one replaces; the earlier one is hidden.")};V.chatVisualBlockSchema=R.z.object(V.chatVisualBlockShape);function Soe(t){let e=V.chatVisualBlockSchema.safeParse(t);return e.success?e.data:null}V.CHAT_VISUAL_CURRENCY_PREFIXES=new Set(["$","\u20AC","\xA3","\xA5","CHF"]);function dc(t,e){let r=Number.isInteger(t)?t.toLocaleString("en-US"):e&&V.CHAT_VISUAL_CURRENCY_PREFIXES.has(e)&&Math.abs(t)>=.01?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):Math.abs(t)<1?t.toLocaleString("en-US",{maximumSignificantDigits:3}):t.toLocaleString("en-US",{maximumFractionDigits:2});return e?V.CHAT_VISUAL_CURRENCY_PREFIXES.has(e)?t<0?`-${e}${r.slice(1)}`:`${e}${r}`:e==="%"?`${r}%`:`${r} ${e}`:r}function AO(t,e){return typeof t=="number"?dc(t,e):!e||t.endsWith(e)||!/\d/.test(t)?t:V.CHAT_VISUAL_CURRENCY_PREFIXES.has(e)?t.startsWith(e)?t:`${e}${t}`:e==="%"?`${t}%`:`${t} ${e}`}function aO(t){return t==null?"":String(t).replace(/\|/g,"\\|").replace(/\s*\n\s*/g," ")}function Fl(t,e){return[`| ${t.map(aO).join(" | ")} |`,`| ${t.map(()=>"---").join(" | ")} |`,...e.map(r=>`| ${r.map(aO).join(" | ")} |`)].join(`
67
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of t.seen.entries()){let a=s[1];if(e===s[0]){o(s);continue}if(t.external){let l=t.external.registry.get(s[0])?.id;if(e!==s[0]&&l){o(s);continue}}if(t.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&t.reused==="ref"){o(s);continue}}}function cb(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=a=>{let c=t.seen.get(a);if(c.ref===null)return;let l=c.def??c.schema,u={...l},d=c.ref;if(c.ref=null,d){n(d);let p=t.seen.get(d),h=p.schema;if(h.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(h)):Object.assign(l,h),Object.assign(l,u),a._zod.parent===d)for(let E in l)E==="$ref"||E==="allOf"||E in u||delete l[E];if(h.$ref&&p.def)for(let E in l)E==="$ref"||E==="allOf"||E in p.def&&JSON.stringify(l[E])===JSON.stringify(p.def[E])&&delete l[E]}let A=a._zod.parent;if(A&&A!==d){n(A);let p=t.seen.get(A);if(p?.schema.$ref&&(l.$ref=p.schema.$ref,p.def))for(let h in l)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(l[h])===JSON.stringify(p.def[h])&&delete l[h]}t.override({zodSchema:a,jsonSchema:l,path:c.path??[]})};for(let a of[...t.seen.entries()].reverse())n(a[0]);let i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let a=t.external.registry.get(e)?.id;if(!a)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(a)}Object.assign(i,r.def??r.schema);let o=t.metadataRegistry.get(e)?.id;o!==void 0&&i.id===o&&delete i.id;let s=t.external?.defs??{};for(let a of t.seen.entries()){let c=a[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,s[c.defId]=c.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{let a=JSON.parse(JSON.stringify(i));return Object.defineProperty(a,"~standard",{value:{...e["~standard"],jsonSchema:{input:(0,Hn.createStandardJSONSchemaMethod)(e,"input",t.processors),output:(0,Hn.createStandardJSONSchemaMethod)(e,"output",t.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function xr(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return xr(n.element,r);if(n.type==="set")return xr(n.valueType,r);if(n.type==="lazy")return xr(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return xr(n.innerType,r);if(n.type==="intersection")return xr(n.left,r)||xr(n.right,r);if(n.type==="record"||n.type==="map")return xr(n.keyType,r)||xr(n.valueType,r);if(n.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:xr(n.in,r)||xr(n.out,r);if(n.type==="object"){for(let i in n.shape)if(xr(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(xr(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(xr(i,r))return!0;return!!(n.rest&&xr(n.rest,r))}return!1}var ire=(t,e={})=>r=>{let n=sb({...r,processors:e});return Xf(t,n),ab(n,t),cb(n,t)};Hn.createToJSONSchemaMethod=ire;var ore=(t,e,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},s=sb({...i??{},target:o,io:e,processors:r});return Xf(t,s),ab(s,t),cb(s,t)};Hn.createStandardJSONSchemaMethod=ore});var Wd=y(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.allProcessors=x.lazyProcessor=x.optionalProcessor=x.promiseProcessor=x.readonlyProcessor=x.pipeProcessor=x.catchProcessor=x.prefaultProcessor=x.defaultProcessor=x.nonoptionalProcessor=x.nullableProcessor=x.recordProcessor=x.tupleProcessor=x.intersectionProcessor=x.unionProcessor=x.objectProcessor=x.arrayProcessor=x.setProcessor=x.mapProcessor=x.transformProcessor=x.functionProcessor=x.customProcessor=x.successProcessor=x.fileProcessor=x.templateLiteralProcessor=x.nanProcessor=x.literalProcessor=x.enumProcessor=x.dateProcessor=x.unknownProcessor=x.anyProcessor=x.neverProcessor=x.voidProcessor=x.undefinedProcessor=x.nullProcessor=x.symbolProcessor=x.bigintProcessor=x.booleanProcessor=x.numberProcessor=x.stringProcessor=void 0;x.toJSONSchema=Yre;var at=Vd(),sre=pe(),are={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},cre=(t,e,r,n)=>{let i=r;i.type="string";let{minimum:o,maximum:s,format:a,patterns:c,contentEncoding:l}=t._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof s=="number"&&(i.maxLength=s),a&&(i.format=are[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let u=[...c];u.length===1?i.pattern=u[0].source:u.length>1&&(i.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}};x.stringProcessor=cre;var lre=(t,e,r,n)=>{let i=r,{minimum:o,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=t._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number";let d=typeof u=="number"&&u>=(o??Number.NEGATIVE_INFINITY),A=typeof l=="number"&&l<=(s??Number.POSITIVE_INFINITY),p=e.target==="draft-04"||e.target==="openapi-3.0";d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof o=="number"&&(i.minimum=o),A?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof s=="number"&&(i.maximum=s),typeof c=="number"&&(i.multipleOf=c)};x.numberProcessor=lre;var ure=(t,e,r,n)=>{r.type="boolean"};x.booleanProcessor=ure;var dre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")};x.bigintProcessor=dre;var Are=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")};x.symbolProcessor=Are;var pre=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"};x.nullProcessor=pre;var hre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")};x.undefinedProcessor=hre;var fre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")};x.voidProcessor=fre;var gre=(t,e,r,n)=>{r.not={}};x.neverProcessor=gre;var mre=(t,e,r,n)=>{};x.anyProcessor=mre;var yre=(t,e,r,n)=>{};x.unknownProcessor=yre;var Ere=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")};x.dateProcessor=Ere;var Ire=(t,e,r,n)=>{let i=t._zod.def,o=(0,sre.getEnumValues)(i.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o};x.enumProcessor=Ire;var Cre=(t,e,r,n)=>{let i=t._zod.def,o=[];for(let s of i.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o};x.literalProcessor=Cre;var bre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")};x.nanProcessor=bre;var Sre=(t,e,r,n)=>{let i=r,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source};x.templateLiteralProcessor=Sre;var wre=(t,e,r,n)=>{let i=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=t._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),c?c.length===1?(o.contentMediaType=c[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(i,o)};x.fileProcessor=wre;var _re=(t,e,r,n)=>{r.type="boolean"};x.successProcessor=_re;var Bre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")};x.customProcessor=Bre;var vre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")};x.functionProcessor=vre;var Qre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")};x.transformProcessor=Qre;var Tre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")};x.mapProcessor=Tre;var Dre=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")};x.setProcessor=Dre;var kre=(t,e,r,n)=>{let i=r,o=t._zod.def,{minimum:s,maximum:a}=t._zod.bag;typeof s=="number"&&(i.minItems=s),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=(0,at.process)(o.element,e,{...n,path:[...n.path,"items"]})};x.arrayProcessor=kre;var Rre=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object",i.properties={};let s=o.shape;for(let l in s)i.properties[l]=(0,at.process)(s[l],e,{...n,path:[...n.path,"properties",l]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{let u=o.shape[l]._zod;return e.io==="input"?u.optin===void 0:u.optout===void 0}));c.size>0&&(i.required=Array.from(c)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=(0,at.process)(o.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)};x.objectProcessor=Rre;var Nre=(t,e,r,n)=>{let i=t._zod.def,o=i.inclusive===!1,s=i.options.map((a,c)=>(0,at.process)(a,e,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=s:r.anyOf=s};x.unionProcessor=Nre;var Ore=(t,e,r,n)=>{let i=t._zod.def,o=(0,at.process)(i.left,e,{...n,path:[...n.path,"allOf",0]}),s=(0,at.process)(i.right,e,{...n,path:[...n.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=c};x.intersectionProcessor=Ore;var xre=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",a=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((A,p)=>(0,at.process)(A,e,{...n,path:[...n.path,s,p]})),l=o.rest?(0,at.process)(o.rest,e,{...n,path:[...n.path,a,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(i.prefixItems=c,l&&(i.items=l)):e.target==="openapi-3.0"?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=t._zod.bag;typeof u=="number"&&(i.minItems=u),typeof d=="number"&&(i.maxItems=d)};x.tupleProcessor=xre;var Ure=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object";let s=o.keyType,c=s._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let u=(0,at.process)(o.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let d of c)i.patternProperties[d.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=(0,at.process)(o.keyType,e,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=(0,at.process)(o.valueType,e,{...n,path:[...n.path,"additionalProperties"]});let l=s._zod.values;if(l){let u=[...l].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(i.required=u)}};x.recordProcessor=Ure;var Mre=(t,e,r,n)=>{let i=t._zod.def,o=(0,at.process)(i.innerType,e,n),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]};x.nullableProcessor=Mre;var Pre=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType};x.nonoptionalProcessor=Pre;var Lre=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))};x.defaultProcessor=Lre;var $re=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))};x.prefaultProcessor=$re;var Fre=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s};x.catchProcessor=Fre;var jre=(t,e,r,n)=>{let i=t._zod.def,o=i.in._zod.traits.has("$ZodTransform"),s=e.io==="input"?o?i.out:i.in:i.out;(0,at.process)(s,e,n);let a=e.seen.get(t);a.ref=s};x.pipeProcessor=jre;var zre=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.readOnly=!0};x.readonlyProcessor=zre;var qre=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType};x.promiseProcessor=qre;var Hre=(t,e,r,n)=>{let i=t._zod.def;(0,at.process)(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType};x.optionalProcessor=Hre;var Gre=(t,e,r,n)=>{let i=t._zod.innerType;(0,at.process)(i,e,n);let o=e.seen.get(t);o.ref=i};x.lazyProcessor=Gre;x.allProcessors={string:x.stringProcessor,number:x.numberProcessor,boolean:x.booleanProcessor,bigint:x.bigintProcessor,symbol:x.symbolProcessor,null:x.nullProcessor,undefined:x.undefinedProcessor,void:x.voidProcessor,never:x.neverProcessor,any:x.anyProcessor,unknown:x.unknownProcessor,date:x.dateProcessor,enum:x.enumProcessor,literal:x.literalProcessor,nan:x.nanProcessor,template_literal:x.templateLiteralProcessor,file:x.fileProcessor,success:x.successProcessor,custom:x.customProcessor,function:x.functionProcessor,transform:x.transformProcessor,map:x.mapProcessor,set:x.setProcessor,array:x.arrayProcessor,object:x.objectProcessor,union:x.unionProcessor,intersection:x.intersectionProcessor,tuple:x.tupleProcessor,record:x.recordProcessor,nullable:x.nullableProcessor,nonoptional:x.nonoptionalProcessor,default:x.defaultProcessor,prefault:x.prefaultProcessor,catch:x.catchProcessor,pipe:x.pipeProcessor,readonly:x.readonlyProcessor,promise:x.promiseProcessor,optional:x.optionalProcessor,lazy:x.lazyProcessor};function Yre(t,e){if("_idmap"in t){let n=t,i=(0,at.initializeContext)({...e,processors:x.allProcessors}),o={};for(let c of n._idmap.entries()){let[l,u]=c;(0,at.process)(u,i)}let s={},a={registry:n,uri:e?.uri,defs:o};i.external=a;for(let c of n._idmap.entries()){let[l,u]=c;(0,at.extractDefs)(i,u),s[l]=(0,at.finalize)(i,u)}if(Object.keys(o).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:o}}return{schemas:s}}let r=(0,at.initializeContext)({...e,processors:x.allProcessors});return(0,at.process)(t,r),(0,at.extractDefs)(r,t),(0,at.finalize)(r,t)}});var SN=y(tg=>{"use strict";Object.defineProperty(tg,"__esModule",{value:!0});tg.JSONSchemaGenerator=void 0;var Vre=Wd(),eg=Vd(),lb=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(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let r=e?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=(0,eg.initializeContext)({processors:Vre.allProcessors,target:r,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,r={path:[],schemaPath:[]}){return(0,eg.process)(e,this.ctx,r)}emit(e,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),(0,eg.extractDefs)(this.ctx,e);let n=(0,eg.finalize)(this.ctx,e),{"~standard":i,...o}=n;return o}};tg.JSONSchemaGenerator=lb});var _N=y(wN=>{"use strict";Object.defineProperty(wN,"__esModule",{value:!0})});var Wr=y(Ke=>{"use strict";var BN=Ke&&Ke.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Wre=Ke&&Ke.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Lo=Ke&&Ke.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&BN(e,t,r)},rg=Ke&&Ke.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&BN(e,t,r);return Wre(e,t),e};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.JSONSchema=Ke.JSONSchemaGenerator=Ke.toJSONSchema=Ke.locales=Ke.regexes=Ke.util=void 0;Lo(lc(),Ke);Lo(YC(),Ke);Lo(HC(),Ke);Lo(tb(),Ke);Lo(zh(),Ke);Lo(KC(),Ke);Ke.util=rg(pe());Ke.regexes=rg(jh());Ke.locales=rg(ob());Lo(Hd(),Ke);Lo(ZC(),Ke);Lo(bN(),Ke);Lo(Vd(),Ke);var Jre=Wd();Object.defineProperty(Ke,"toJSONSchema",{enumerable:!0,get:function(){return Jre.toJSONSchema}});var Zre=SN();Object.defineProperty(Ke,"JSONSchemaGenerator",{enumerable:!0,get:function(){return Zre.JSONSchemaGenerator}});Ke.JSONSchema=rg(_N())});var ng=y(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.slugify=he.toUpperCase=he.toLowerCase=he.trim=he.normalize=he.overwrite=he.mime=he.property=he.endsWith=he.startsWith=he.includes=he.uppercase=he.lowercase=he.regex=he.length=he.minLength=he.maxLength=he.size=he.minSize=he.maxSize=he.multipleOf=he.nonnegative=he.nonpositive=he.negative=he.positive=he.gte=he.gt=he.lte=he.lt=void 0;var ct=Wr();Object.defineProperty(he,"lt",{enumerable:!0,get:function(){return ct._lt}});Object.defineProperty(he,"lte",{enumerable:!0,get:function(){return ct._lte}});Object.defineProperty(he,"gt",{enumerable:!0,get:function(){return ct._gt}});Object.defineProperty(he,"gte",{enumerable:!0,get:function(){return ct._gte}});Object.defineProperty(he,"positive",{enumerable:!0,get:function(){return ct._positive}});Object.defineProperty(he,"negative",{enumerable:!0,get:function(){return ct._negative}});Object.defineProperty(he,"nonpositive",{enumerable:!0,get:function(){return ct._nonpositive}});Object.defineProperty(he,"nonnegative",{enumerable:!0,get:function(){return ct._nonnegative}});Object.defineProperty(he,"multipleOf",{enumerable:!0,get:function(){return ct._multipleOf}});Object.defineProperty(he,"maxSize",{enumerable:!0,get:function(){return ct._maxSize}});Object.defineProperty(he,"minSize",{enumerable:!0,get:function(){return ct._minSize}});Object.defineProperty(he,"size",{enumerable:!0,get:function(){return ct._size}});Object.defineProperty(he,"maxLength",{enumerable:!0,get:function(){return ct._maxLength}});Object.defineProperty(he,"minLength",{enumerable:!0,get:function(){return ct._minLength}});Object.defineProperty(he,"length",{enumerable:!0,get:function(){return ct._length}});Object.defineProperty(he,"regex",{enumerable:!0,get:function(){return ct._regex}});Object.defineProperty(he,"lowercase",{enumerable:!0,get:function(){return ct._lowercase}});Object.defineProperty(he,"uppercase",{enumerable:!0,get:function(){return ct._uppercase}});Object.defineProperty(he,"includes",{enumerable:!0,get:function(){return ct._includes}});Object.defineProperty(he,"startsWith",{enumerable:!0,get:function(){return ct._startsWith}});Object.defineProperty(he,"endsWith",{enumerable:!0,get:function(){return ct._endsWith}});Object.defineProperty(he,"property",{enumerable:!0,get:function(){return ct._property}});Object.defineProperty(he,"mime",{enumerable:!0,get:function(){return ct._mime}});Object.defineProperty(he,"overwrite",{enumerable:!0,get:function(){return ct._overwrite}});Object.defineProperty(he,"normalize",{enumerable:!0,get:function(){return ct._normalize}});Object.defineProperty(he,"trim",{enumerable:!0,get:function(){return ct._trim}});Object.defineProperty(he,"toLowerCase",{enumerable:!0,get:function(){return ct._toLowerCase}});Object.defineProperty(he,"toUpperCase",{enumerable:!0,get:function(){return ct._toUpperCase}});Object.defineProperty(he,"slugify",{enumerable:!0,get:function(){return ct._slugify}})});var Jd=y(wt=>{"use strict";var Kre=wt&&wt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Xre=wt&&wt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vN=wt&&wt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Kre(e,t,r);return Xre(e,t),e};Object.defineProperty(wt,"__esModule",{value:!0});wt.ZodISODuration=wt.ZodISOTime=wt.ZodISODate=wt.ZodISODateTime=void 0;wt.datetime=ene;wt.date=tne;wt.time=rne;wt.duration=nne;var Gn=vN(Wr()),ig=vN(Zd());wt.ZodISODateTime=Gn.$constructor("ZodISODateTime",(t,e)=>{Gn.$ZodISODateTime.init(t,e),ig.ZodStringFormat.init(t,e)});function ene(t){return Gn._isoDateTime(wt.ZodISODateTime,t)}wt.ZodISODate=Gn.$constructor("ZodISODate",(t,e)=>{Gn.$ZodISODate.init(t,e),ig.ZodStringFormat.init(t,e)});function tne(t){return Gn._isoDate(wt.ZodISODate,t)}wt.ZodISOTime=Gn.$constructor("ZodISOTime",(t,e)=>{Gn.$ZodISOTime.init(t,e),ig.ZodStringFormat.init(t,e)});function rne(t){return Gn._isoTime(wt.ZodISOTime,t)}wt.ZodISODuration=Gn.$constructor("ZodISODuration",(t,e)=>{Gn.$ZodISODuration.init(t,e),ig.ZodStringFormat.init(t,e)});function nne(t){return Gn._isoDuration(wt.ZodISODuration,t)}});var ub=y(Yn=>{"use strict";var ine=Yn&&Yn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),one=Yn&&Yn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),TN=Yn&&Yn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ine(e,t,r);return one(e,t),e};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.ZodRealError=Yn.ZodError=void 0;var og=TN(Wr()),sne=Wr(),QN=TN(pe()),DN=(t,e)=>{sne.$ZodError.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>og.formatError(t,r)},flatten:{value:r=>og.flattenError(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,QN.jsonStringifyReplacer,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,QN.jsonStringifyReplacer,2)}},isEmpty:{get(){return t.issues.length===0}}})};Yn.ZodError=og.$constructor("ZodError",DN);Yn.ZodRealError=og.$constructor("ZodError",DN,{Parent:Error})});var db=y(Xe=>{"use strict";var ane=Xe&&Xe.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),cne=Xe&&Xe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),lne=Xe&&Xe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ane(e,t,r);return cne(e,t),e};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.safeDecodeAsync=Xe.safeEncodeAsync=Xe.safeDecode=Xe.safeEncode=Xe.decodeAsync=Xe.encodeAsync=Xe.decode=Xe.encode=Xe.safeParseAsync=Xe.safeParse=Xe.parseAsync=Xe.parse=void 0;var Vn=lne(Wr()),Wn=ub();Xe.parse=Vn._parse(Wn.ZodRealError);Xe.parseAsync=Vn._parseAsync(Wn.ZodRealError);Xe.safeParse=Vn._safeParse(Wn.ZodRealError);Xe.safeParseAsync=Vn._safeParseAsync(Wn.ZodRealError);Xe.encode=Vn._encode(Wn.ZodRealError);Xe.decode=Vn._decode(Wn.ZodRealError);Xe.encodeAsync=Vn._encodeAsync(Wn.ZodRealError);Xe.decodeAsync=Vn._decodeAsync(Wn.ZodRealError);Xe.safeEncode=Vn._safeEncode(Wn.ZodRealError);Xe.safeDecode=Vn._safeDecode(Wn.ZodRealError);Xe.safeEncodeAsync=Vn._safeEncodeAsync(Wn.ZodRealError);Xe.safeDecodeAsync=Vn._safeDecodeAsync(Wn.ZodRealError)});var Zd=y(g=>{"use strict";var une=g&&g.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),dne=g&&g.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kd=g&&g.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&une(e,t,r);return dne(e,t),e};Object.defineProperty(g,"__esModule",{value:!0});g.ZodLiteral=g.ZodEnum=g.ZodSet=g.ZodMap=g.ZodRecord=g.ZodTuple=g.ZodIntersection=g.ZodDiscriminatedUnion=g.ZodXor=g.ZodUnion=g.ZodObject=g.ZodArray=g.ZodDate=g.ZodVoid=g.ZodNever=g.ZodUnknown=g.ZodAny=g.ZodNull=g.ZodUndefined=g.ZodSymbol=g.ZodBigIntFormat=g.ZodBigInt=g.ZodBoolean=g.ZodNumberFormat=g.ZodNumber=g.ZodCustomStringFormat=g.ZodJWT=g.ZodE164=g.ZodBase64URL=g.ZodBase64=g.ZodCIDRv6=g.ZodCIDRv4=g.ZodIPv6=g.ZodMAC=g.ZodIPv4=g.ZodKSUID=g.ZodXID=g.ZodULID=g.ZodCUID2=g.ZodCUID=g.ZodNanoID=g.ZodEmoji=g.ZodURL=g.ZodUUID=g.ZodGUID=g.ZodEmail=g.ZodStringFormat=g.ZodString=g._ZodString=g.ZodType=void 0;g.stringbool=g.meta=g.describe=g.ZodCustom=g.ZodFunction=g.ZodPromise=g.ZodLazy=g.ZodTemplateLiteral=g.ZodReadonly=g.ZodPreprocess=g.ZodCodec=g.ZodPipe=g.ZodNaN=g.ZodCatch=g.ZodSuccess=g.ZodNonOptional=g.ZodPrefault=g.ZodDefault=g.ZodNullable=g.ZodExactOptional=g.ZodOptional=g.ZodTransform=g.ZodFile=void 0;g.string=ag;g.email=Ane;g.guid=pne;g.uuid=hne;g.uuidv4=fne;g.uuidv6=gne;g.uuidv7=mne;g.url=yne;g.httpUrl=Ene;g.emoji=Ine;g.nanoid=Cne;g.cuid=bne;g.cuid2=Sne;g.ulid=wne;g.xid=_ne;g.ksuid=Bne;g.ipv4=vne;g.mac=Qne;g.ipv6=Tne;g.cidrv4=Dne;g.cidrv6=kne;g.base64=Rne;g.base64url=Nne;g.e164=One;g.jwt=xne;g.stringFormat=Une;g.hostname=Mne;g.hex=Pne;g.hash=Lne;g.number=RN;g.int=pb;g.float32=$ne;g.float64=Fne;g.int32=jne;g.uint32=zne;g.boolean=NN;g.bigint=qne;g.int64=Hne;g.uint64=Gne;g.symbol=Yne;g.undefined=Vne;g.null=ON;g.any=Wne;g.unknown=$l;g.never=fb;g.void=Jne;g.date=Zne;g.array=ug;g.keyof=Kne;g.object=Xne;g.strictObject=eie;g.looseObject=tie;g.union=gb;g.xor=rie;g.discriminatedUnion=nie;g.intersection=xN;g.tuple=UN;g.record=MN;g.partialRecord=iie;g.looseRecord=oie;g.map=sie;g.set=aie;g.enum=mb;g.nativeEnum=cie;g.literal=lie;g.file=uie;g.transform=yb;g.optional=cg;g.exactOptional=PN;g.nullable=lg;g.nullish=die;g._default=LN;g.prefault=$N;g.nonoptional=FN;g.success=Aie;g.catch=jN;g.nan=pie;g.pipe=hb;g.codec=hie;g.invertCodec=fie;g.readonly=zN;g.templateLiteral=gie;g.lazy=qN;g.promise=mie;g._function=dg;g.function=dg;g._function=dg;g.function=dg;g.check=yie;g.custom=Eie;g.refine=HN;g.superRefine=GN;g.instanceof=Iie;g.json=bie;g.preprocess=Sie;var b=Kd(Wr()),He=Wr(),xe=Kd(Wd()),Ab=Vd(),Te=Kd(ng()),sg=Kd(Jd()),Jn=Kd(db()),kN=new WeakMap;function Xd(t,e,r){let n=Object.getPrototypeOf(t),i=kN.get(n);if(i||(i=new Set,kN.set(n,i)),!i.has(e)){i.add(e);for(let o in r){let s=r[o];Object.defineProperty(n,o,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}g.ZodType=b.$constructor("ZodType",(t,e)=>(b.$ZodType.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:(0,Ab.createStandardJSONSchemaMethod)(t,"input"),output:(0,Ab.createStandardJSONSchemaMethod)(t,"output")}}),t.toJSONSchema=(0,Ab.createToJSONSchemaMethod)(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.parse=(r,n)=>Jn.parse(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>Jn.safeParse(t,r,n),t.parseAsync=async(r,n)=>Jn.parseAsync(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>Jn.safeParseAsync(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>Jn.encode(t,r,n),t.decode=(r,n)=>Jn.decode(t,r,n),t.encodeAsync=async(r,n)=>Jn.encodeAsync(t,r,n),t.decodeAsync=async(r,n)=>Jn.decodeAsync(t,r,n),t.safeEncode=(r,n)=>Jn.safeEncode(t,r,n),t.safeDecode=(r,n)=>Jn.safeDecode(t,r,n),t.safeEncodeAsync=async(r,n)=>Jn.safeEncodeAsync(t,r,n),t.safeDecodeAsync=async(r,n)=>Jn.safeDecodeAsync(t,r,n),Xd(t,"ZodType",{check(...r){let n=this.def;return this.clone(He.util.mergeDefs(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return b.clone(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(HN(r,n))},superRefine(r,n){return this.check(GN(r,n))},overwrite(r){return this.check(Te.overwrite(r))},optional(){return cg(this)},exactOptional(){return PN(this)},nullable(){return lg(this)},nullish(){return cg(lg(this))},nonoptional(r){return FN(this,r)},array(){return ug(this)},or(r){return gb([this,r])},and(r){return xN(this,r)},transform(r){return hb(this,yb(r))},default(r){return LN(this,r)},prefault(r){return $N(this,r)},catch(r){return jN(this,r)},pipe(r){return hb(this,r)},readonly(){return zN(this)},describe(r){let n=this.clone();return b.globalRegistry.add(n,{description:r}),n},meta(...r){if(r.length===0)return b.globalRegistry.get(this);let n=this.clone();return b.globalRegistry.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(t,"description",{get(){return b.globalRegistry.get(t)?.description},configurable:!0}),t));g._ZodString=b.$constructor("_ZodString",(t,e)=>{b.$ZodString.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>xe.stringProcessor(t,n,i,o);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,Xd(t,"_ZodString",{regex(...n){return this.check(Te.regex(...n))},includes(...n){return this.check(Te.includes(...n))},startsWith(...n){return this.check(Te.startsWith(...n))},endsWith(...n){return this.check(Te.endsWith(...n))},min(...n){return this.check(Te.minLength(...n))},max(...n){return this.check(Te.maxLength(...n))},length(...n){return this.check(Te.length(...n))},nonempty(...n){return this.check(Te.minLength(1,...n))},lowercase(n){return this.check(Te.lowercase(n))},uppercase(n){return this.check(Te.uppercase(n))},trim(){return this.check(Te.trim())},normalize(...n){return this.check(Te.normalize(...n))},toLowerCase(){return this.check(Te.toLowerCase())},toUpperCase(){return this.check(Te.toUpperCase())},slugify(){return this.check(Te.slugify())}})});g.ZodString=b.$constructor("ZodString",(t,e)=>{b.$ZodString.init(t,e),g._ZodString.init(t,e),t.email=r=>t.check(b._email(g.ZodEmail,r)),t.url=r=>t.check(b._url(g.ZodURL,r)),t.jwt=r=>t.check(b._jwt(g.ZodJWT,r)),t.emoji=r=>t.check(b._emoji(g.ZodEmoji,r)),t.guid=r=>t.check(b._guid(g.ZodGUID,r)),t.uuid=r=>t.check(b._uuid(g.ZodUUID,r)),t.uuidv4=r=>t.check(b._uuidv4(g.ZodUUID,r)),t.uuidv6=r=>t.check(b._uuidv6(g.ZodUUID,r)),t.uuidv7=r=>t.check(b._uuidv7(g.ZodUUID,r)),t.nanoid=r=>t.check(b._nanoid(g.ZodNanoID,r)),t.guid=r=>t.check(b._guid(g.ZodGUID,r)),t.cuid=r=>t.check(b._cuid(g.ZodCUID,r)),t.cuid2=r=>t.check(b._cuid2(g.ZodCUID2,r)),t.ulid=r=>t.check(b._ulid(g.ZodULID,r)),t.base64=r=>t.check(b._base64(g.ZodBase64,r)),t.base64url=r=>t.check(b._base64url(g.ZodBase64URL,r)),t.xid=r=>t.check(b._xid(g.ZodXID,r)),t.ksuid=r=>t.check(b._ksuid(g.ZodKSUID,r)),t.ipv4=r=>t.check(b._ipv4(g.ZodIPv4,r)),t.ipv6=r=>t.check(b._ipv6(g.ZodIPv6,r)),t.cidrv4=r=>t.check(b._cidrv4(g.ZodCIDRv4,r)),t.cidrv6=r=>t.check(b._cidrv6(g.ZodCIDRv6,r)),t.e164=r=>t.check(b._e164(g.ZodE164,r)),t.datetime=r=>t.check(sg.datetime(r)),t.date=r=>t.check(sg.date(r)),t.time=r=>t.check(sg.time(r)),t.duration=r=>t.check(sg.duration(r))});function ag(t){return b._string(g.ZodString,t)}g.ZodStringFormat=b.$constructor("ZodStringFormat",(t,e)=>{b.$ZodStringFormat.init(t,e),g._ZodString.init(t,e)});g.ZodEmail=b.$constructor("ZodEmail",(t,e)=>{b.$ZodEmail.init(t,e),g.ZodStringFormat.init(t,e)});function Ane(t){return b._email(g.ZodEmail,t)}g.ZodGUID=b.$constructor("ZodGUID",(t,e)=>{b.$ZodGUID.init(t,e),g.ZodStringFormat.init(t,e)});function pne(t){return b._guid(g.ZodGUID,t)}g.ZodUUID=b.$constructor("ZodUUID",(t,e)=>{b.$ZodUUID.init(t,e),g.ZodStringFormat.init(t,e)});function hne(t){return b._uuid(g.ZodUUID,t)}function fne(t){return b._uuidv4(g.ZodUUID,t)}function gne(t){return b._uuidv6(g.ZodUUID,t)}function mne(t){return b._uuidv7(g.ZodUUID,t)}g.ZodURL=b.$constructor("ZodURL",(t,e)=>{b.$ZodURL.init(t,e),g.ZodStringFormat.init(t,e)});function yne(t){return b._url(g.ZodURL,t)}function Ene(t){return b._url(g.ZodURL,{protocol:b.regexes.httpProtocol,hostname:b.regexes.domain,...He.util.normalizeParams(t)})}g.ZodEmoji=b.$constructor("ZodEmoji",(t,e)=>{b.$ZodEmoji.init(t,e),g.ZodStringFormat.init(t,e)});function Ine(t){return b._emoji(g.ZodEmoji,t)}g.ZodNanoID=b.$constructor("ZodNanoID",(t,e)=>{b.$ZodNanoID.init(t,e),g.ZodStringFormat.init(t,e)});function Cne(t){return b._nanoid(g.ZodNanoID,t)}g.ZodCUID=b.$constructor("ZodCUID",(t,e)=>{b.$ZodCUID.init(t,e),g.ZodStringFormat.init(t,e)});function bne(t){return b._cuid(g.ZodCUID,t)}g.ZodCUID2=b.$constructor("ZodCUID2",(t,e)=>{b.$ZodCUID2.init(t,e),g.ZodStringFormat.init(t,e)});function Sne(t){return b._cuid2(g.ZodCUID2,t)}g.ZodULID=b.$constructor("ZodULID",(t,e)=>{b.$ZodULID.init(t,e),g.ZodStringFormat.init(t,e)});function wne(t){return b._ulid(g.ZodULID,t)}g.ZodXID=b.$constructor("ZodXID",(t,e)=>{b.$ZodXID.init(t,e),g.ZodStringFormat.init(t,e)});function _ne(t){return b._xid(g.ZodXID,t)}g.ZodKSUID=b.$constructor("ZodKSUID",(t,e)=>{b.$ZodKSUID.init(t,e),g.ZodStringFormat.init(t,e)});function Bne(t){return b._ksuid(g.ZodKSUID,t)}g.ZodIPv4=b.$constructor("ZodIPv4",(t,e)=>{b.$ZodIPv4.init(t,e),g.ZodStringFormat.init(t,e)});function vne(t){return b._ipv4(g.ZodIPv4,t)}g.ZodMAC=b.$constructor("ZodMAC",(t,e)=>{b.$ZodMAC.init(t,e),g.ZodStringFormat.init(t,e)});function Qne(t){return b._mac(g.ZodMAC,t)}g.ZodIPv6=b.$constructor("ZodIPv6",(t,e)=>{b.$ZodIPv6.init(t,e),g.ZodStringFormat.init(t,e)});function Tne(t){return b._ipv6(g.ZodIPv6,t)}g.ZodCIDRv4=b.$constructor("ZodCIDRv4",(t,e)=>{b.$ZodCIDRv4.init(t,e),g.ZodStringFormat.init(t,e)});function Dne(t){return b._cidrv4(g.ZodCIDRv4,t)}g.ZodCIDRv6=b.$constructor("ZodCIDRv6",(t,e)=>{b.$ZodCIDRv6.init(t,e),g.ZodStringFormat.init(t,e)});function kne(t){return b._cidrv6(g.ZodCIDRv6,t)}g.ZodBase64=b.$constructor("ZodBase64",(t,e)=>{b.$ZodBase64.init(t,e),g.ZodStringFormat.init(t,e)});function Rne(t){return b._base64(g.ZodBase64,t)}g.ZodBase64URL=b.$constructor("ZodBase64URL",(t,e)=>{b.$ZodBase64URL.init(t,e),g.ZodStringFormat.init(t,e)});function Nne(t){return b._base64url(g.ZodBase64URL,t)}g.ZodE164=b.$constructor("ZodE164",(t,e)=>{b.$ZodE164.init(t,e),g.ZodStringFormat.init(t,e)});function One(t){return b._e164(g.ZodE164,t)}g.ZodJWT=b.$constructor("ZodJWT",(t,e)=>{b.$ZodJWT.init(t,e),g.ZodStringFormat.init(t,e)});function xne(t){return b._jwt(g.ZodJWT,t)}g.ZodCustomStringFormat=b.$constructor("ZodCustomStringFormat",(t,e)=>{b.$ZodCustomStringFormat.init(t,e),g.ZodStringFormat.init(t,e)});function Une(t,e,r={}){return b._stringFormat(g.ZodCustomStringFormat,t,e,r)}function Mne(t){return b._stringFormat(g.ZodCustomStringFormat,"hostname",b.regexes.hostname,t)}function Pne(t){return b._stringFormat(g.ZodCustomStringFormat,"hex",b.regexes.hex,t)}function Lne(t,e){let r=e?.enc??"hex",n=`${t}_${r}`,i=b.regexes[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return b._stringFormat(g.ZodCustomStringFormat,n,i,e)}g.ZodNumber=b.$constructor("ZodNumber",(t,e)=>{b.$ZodNumber.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>xe.numberProcessor(t,n,i,o),Xd(t,"ZodNumber",{gt(n,i){return this.check(Te.gt(n,i))},gte(n,i){return this.check(Te.gte(n,i))},min(n,i){return this.check(Te.gte(n,i))},lt(n,i){return this.check(Te.lt(n,i))},lte(n,i){return this.check(Te.lte(n,i))},max(n,i){return this.check(Te.lte(n,i))},int(n){return this.check(pb(n))},safe(n){return this.check(pb(n))},positive(n){return this.check(Te.gt(0,n))},nonnegative(n){return this.check(Te.gte(0,n))},negative(n){return this.check(Te.lt(0,n))},nonpositive(n){return this.check(Te.lte(0,n))},multipleOf(n,i){return this.check(Te.multipleOf(n,i))},step(n,i){return this.check(Te.multipleOf(n,i))},finite(){return this}});let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function RN(t){return b._number(g.ZodNumber,t)}g.ZodNumberFormat=b.$constructor("ZodNumberFormat",(t,e)=>{b.$ZodNumberFormat.init(t,e),g.ZodNumber.init(t,e)});function pb(t){return b._int(g.ZodNumberFormat,t)}function $ne(t){return b._float32(g.ZodNumberFormat,t)}function Fne(t){return b._float64(g.ZodNumberFormat,t)}function jne(t){return b._int32(g.ZodNumberFormat,t)}function zne(t){return b._uint32(g.ZodNumberFormat,t)}g.ZodBoolean=b.$constructor("ZodBoolean",(t,e)=>{b.$ZodBoolean.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.booleanProcessor(t,r,n,i)});function NN(t){return b._boolean(g.ZodBoolean,t)}g.ZodBigInt=b.$constructor("ZodBigInt",(t,e)=>{b.$ZodBigInt.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>xe.bigintProcessor(t,n,i,o),t.gte=(n,i)=>t.check(Te.gte(n,i)),t.min=(n,i)=>t.check(Te.gte(n,i)),t.gt=(n,i)=>t.check(Te.gt(n,i)),t.gte=(n,i)=>t.check(Te.gte(n,i)),t.min=(n,i)=>t.check(Te.gte(n,i)),t.lt=(n,i)=>t.check(Te.lt(n,i)),t.lte=(n,i)=>t.check(Te.lte(n,i)),t.max=(n,i)=>t.check(Te.lte(n,i)),t.positive=n=>t.check(Te.gt(BigInt(0),n)),t.negative=n=>t.check(Te.lt(BigInt(0),n)),t.nonpositive=n=>t.check(Te.lte(BigInt(0),n)),t.nonnegative=n=>t.check(Te.gte(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(Te.multipleOf(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function qne(t){return b._bigint(g.ZodBigInt,t)}g.ZodBigIntFormat=b.$constructor("ZodBigIntFormat",(t,e)=>{b.$ZodBigIntFormat.init(t,e),g.ZodBigInt.init(t,e)});function Hne(t){return b._int64(g.ZodBigIntFormat,t)}function Gne(t){return b._uint64(g.ZodBigIntFormat,t)}g.ZodSymbol=b.$constructor("ZodSymbol",(t,e)=>{b.$ZodSymbol.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.symbolProcessor(t,r,n,i)});function Yne(t){return b._symbol(g.ZodSymbol,t)}g.ZodUndefined=b.$constructor("ZodUndefined",(t,e)=>{b.$ZodUndefined.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.undefinedProcessor(t,r,n,i)});function Vne(t){return b._undefined(g.ZodUndefined,t)}g.ZodNull=b.$constructor("ZodNull",(t,e)=>{b.$ZodNull.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.nullProcessor(t,r,n,i)});function ON(t){return b._null(g.ZodNull,t)}g.ZodAny=b.$constructor("ZodAny",(t,e)=>{b.$ZodAny.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.anyProcessor(t,r,n,i)});function Wne(){return b._any(g.ZodAny)}g.ZodUnknown=b.$constructor("ZodUnknown",(t,e)=>{b.$ZodUnknown.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.unknownProcessor(t,r,n,i)});function $l(){return b._unknown(g.ZodUnknown)}g.ZodNever=b.$constructor("ZodNever",(t,e)=>{b.$ZodNever.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.neverProcessor(t,r,n,i)});function fb(t){return b._never(g.ZodNever,t)}g.ZodVoid=b.$constructor("ZodVoid",(t,e)=>{b.$ZodVoid.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.voidProcessor(t,r,n,i)});function Jne(t){return b._void(g.ZodVoid,t)}g.ZodDate=b.$constructor("ZodDate",(t,e)=>{b.$ZodDate.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>xe.dateProcessor(t,n,i,o),t.min=(n,i)=>t.check(Te.gte(n,i)),t.max=(n,i)=>t.check(Te.lte(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function Zne(t){return b._date(g.ZodDate,t)}g.ZodArray=b.$constructor("ZodArray",(t,e)=>{b.$ZodArray.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.arrayProcessor(t,r,n,i),t.element=e.element,Xd(t,"ZodArray",{min(r,n){return this.check(Te.minLength(r,n))},nonempty(r){return this.check(Te.minLength(1,r))},max(r,n){return this.check(Te.maxLength(r,n))},length(r,n){return this.check(Te.length(r,n))},unwrap(){return this.element}})});function ug(t,e){return b._array(g.ZodArray,t,e)}function Kne(t){let e=t._zod.def.shape;return mb(Object.keys(e))}g.ZodObject=b.$constructor("ZodObject",(t,e)=>{b.$ZodObjectJIT.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.objectProcessor(t,r,n,i),He.util.defineLazy(t,"shape",()=>e.shape),Xd(t,"ZodObject",{keyof(){return mb(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:$l()})},loose(){return this.clone({...this._zod.def,catchall:$l()})},strict(){return this.clone({...this._zod.def,catchall:fb()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return He.util.extend(this,r)},safeExtend(r){return He.util.safeExtend(this,r)},merge(r){return He.util.merge(this,r)},pick(r){return He.util.pick(this,r)},omit(r){return He.util.omit(this,r)},partial(...r){return He.util.partial(g.ZodOptional,this,r[0])},required(...r){return He.util.required(g.ZodNonOptional,this,r[0])}})});function Xne(t,e){let r={type:"object",shape:t??{},...He.util.normalizeParams(e)};return new g.ZodObject(r)}function eie(t,e){return new g.ZodObject({type:"object",shape:t,catchall:fb(),...He.util.normalizeParams(e)})}function tie(t,e){return new g.ZodObject({type:"object",shape:t,catchall:$l(),...He.util.normalizeParams(e)})}g.ZodUnion=b.$constructor("ZodUnion",(t,e)=>{b.$ZodUnion.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.unionProcessor(t,r,n,i),t.options=e.options});function gb(t,e){return new g.ZodUnion({type:"union",options:t,...He.util.normalizeParams(e)})}g.ZodXor=b.$constructor("ZodXor",(t,e)=>{g.ZodUnion.init(t,e),b.$ZodXor.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.unionProcessor(t,r,n,i),t.options=e.options});function rie(t,e){return new g.ZodXor({type:"union",options:t,inclusive:!1,...He.util.normalizeParams(e)})}g.ZodDiscriminatedUnion=b.$constructor("ZodDiscriminatedUnion",(t,e)=>{g.ZodUnion.init(t,e),b.$ZodDiscriminatedUnion.init(t,e)});function nie(t,e,r){return new g.ZodDiscriminatedUnion({type:"union",options:e,discriminator:t,...He.util.normalizeParams(r)})}g.ZodIntersection=b.$constructor("ZodIntersection",(t,e)=>{b.$ZodIntersection.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.intersectionProcessor(t,r,n,i)});function xN(t,e){return new g.ZodIntersection({type:"intersection",left:t,right:e})}g.ZodTuple=b.$constructor("ZodTuple",(t,e)=>{b.$ZodTuple.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.tupleProcessor(t,r,n,i),t.rest=r=>t.clone({...t._zod.def,rest:r})});function UN(t,e,r){let n=e instanceof b.$ZodType,i=n?r:e,o=n?e:null;return new g.ZodTuple({type:"tuple",items:t,rest:o,...He.util.normalizeParams(i)})}g.ZodRecord=b.$constructor("ZodRecord",(t,e)=>{b.$ZodRecord.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.recordProcessor(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType});function MN(t,e,r){return!e||!e._zod?new g.ZodRecord({type:"record",keyType:ag(),valueType:t,...He.util.normalizeParams(e)}):new g.ZodRecord({type:"record",keyType:t,valueType:e,...He.util.normalizeParams(r)})}function iie(t,e,r){let n=b.clone(t);return n._zod.values=void 0,new g.ZodRecord({type:"record",keyType:n,valueType:e,...He.util.normalizeParams(r)})}function oie(t,e,r){return new g.ZodRecord({type:"record",keyType:t,valueType:e,mode:"loose",...He.util.normalizeParams(r)})}g.ZodMap=b.$constructor("ZodMap",(t,e)=>{b.$ZodMap.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.mapProcessor(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(b._minSize(...r)),t.nonempty=r=>t.check(b._minSize(1,r)),t.max=(...r)=>t.check(b._maxSize(...r)),t.size=(...r)=>t.check(b._size(...r))});function sie(t,e,r){return new g.ZodMap({type:"map",keyType:t,valueType:e,...He.util.normalizeParams(r)})}g.ZodSet=b.$constructor("ZodSet",(t,e)=>{b.$ZodSet.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.setProcessor(t,r,n,i),t.min=(...r)=>t.check(b._minSize(...r)),t.nonempty=r=>t.check(b._minSize(1,r)),t.max=(...r)=>t.check(b._maxSize(...r)),t.size=(...r)=>t.check(b._size(...r))});function aie(t,e){return new g.ZodSet({type:"set",valueType:t,...He.util.normalizeParams(e)})}g.ZodEnum=b.$constructor("ZodEnum",(t,e)=>{b.$ZodEnum.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(n,i,o)=>xe.enumProcessor(t,n,i,o),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let o={};for(let s of n)if(r.has(s))o[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new g.ZodEnum({...e,checks:[],...He.util.normalizeParams(i),entries:o})},t.exclude=(n,i)=>{let o={...e.entries};for(let s of n)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new g.ZodEnum({...e,checks:[],...He.util.normalizeParams(i),entries:o})}});function mb(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new g.ZodEnum({type:"enum",entries:r,...He.util.normalizeParams(e)})}function cie(t,e){return new g.ZodEnum({type:"enum",entries:t,...He.util.normalizeParams(e)})}g.ZodLiteral=b.$constructor("ZodLiteral",(t,e)=>{b.$ZodLiteral.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.literalProcessor(t,r,n,i),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function lie(t,e){return new g.ZodLiteral({type:"literal",values:Array.isArray(t)?t:[t],...He.util.normalizeParams(e)})}g.ZodFile=b.$constructor("ZodFile",(t,e)=>{b.$ZodFile.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.fileProcessor(t,r,n,i),t.min=(r,n)=>t.check(b._minSize(r,n)),t.max=(r,n)=>t.check(b._maxSize(r,n)),t.mime=(r,n)=>t.check(b._mime(Array.isArray(r)?r:[r],n))});function uie(t){return b._file(g.ZodFile,t)}g.ZodTransform=b.$constructor("ZodTransform",(t,e)=>{b.$ZodTransform.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.transformProcessor(t,r,n,i),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new b.$ZodEncodeError(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(He.util.issue(o,r.value,e));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),r.issues.push(He.util.issue(s))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function yb(t){return new g.ZodTransform({type:"transform",transform:t})}g.ZodOptional=b.$constructor("ZodOptional",(t,e)=>{b.$ZodOptional.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.optionalProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function cg(t){return new g.ZodOptional({type:"optional",innerType:t})}g.ZodExactOptional=b.$constructor("ZodExactOptional",(t,e)=>{b.$ZodExactOptional.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.optionalProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function PN(t){return new g.ZodExactOptional({type:"optional",innerType:t})}g.ZodNullable=b.$constructor("ZodNullable",(t,e)=>{b.$ZodNullable.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.nullableProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function lg(t){return new g.ZodNullable({type:"nullable",innerType:t})}function die(t){return cg(lg(t))}g.ZodDefault=b.$constructor("ZodDefault",(t,e)=>{b.$ZodDefault.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.defaultProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function LN(t,e){return new g.ZodDefault({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():He.util.shallowClone(e)}})}g.ZodPrefault=b.$constructor("ZodPrefault",(t,e)=>{b.$ZodPrefault.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.prefaultProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function $N(t,e){return new g.ZodPrefault({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():He.util.shallowClone(e)}})}g.ZodNonOptional=b.$constructor("ZodNonOptional",(t,e)=>{b.$ZodNonOptional.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.nonoptionalProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function FN(t,e){return new g.ZodNonOptional({type:"nonoptional",innerType:t,...He.util.normalizeParams(e)})}g.ZodSuccess=b.$constructor("ZodSuccess",(t,e)=>{b.$ZodSuccess.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.successProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Aie(t){return new g.ZodSuccess({type:"success",innerType:t})}g.ZodCatch=b.$constructor("ZodCatch",(t,e)=>{b.$ZodCatch.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.catchProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function jN(t,e){return new g.ZodCatch({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}g.ZodNaN=b.$constructor("ZodNaN",(t,e)=>{b.$ZodNaN.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.nanProcessor(t,r,n,i)});function pie(t){return b._nan(g.ZodNaN,t)}g.ZodPipe=b.$constructor("ZodPipe",(t,e)=>{b.$ZodPipe.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.pipeProcessor(t,r,n,i),t.in=e.in,t.out=e.out});function hb(t,e){return new g.ZodPipe({type:"pipe",in:t,out:e})}g.ZodCodec=b.$constructor("ZodCodec",(t,e)=>{g.ZodPipe.init(t,e),b.$ZodCodec.init(t,e)});function hie(t,e,r){return new g.ZodCodec({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}function fie(t){let e=t._zod.def;return new g.ZodCodec({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}g.ZodPreprocess=b.$constructor("ZodPreprocess",(t,e)=>{g.ZodPipe.init(t,e),b.$ZodPreprocess.init(t,e)});g.ZodReadonly=b.$constructor("ZodReadonly",(t,e)=>{b.$ZodReadonly.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.readonlyProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function zN(t){return new g.ZodReadonly({type:"readonly",innerType:t})}g.ZodTemplateLiteral=b.$constructor("ZodTemplateLiteral",(t,e)=>{b.$ZodTemplateLiteral.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.templateLiteralProcessor(t,r,n,i)});function gie(t,e){return new g.ZodTemplateLiteral({type:"template_literal",parts:t,...He.util.normalizeParams(e)})}g.ZodLazy=b.$constructor("ZodLazy",(t,e)=>{b.$ZodLazy.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.lazyProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.getter()});function qN(t){return new g.ZodLazy({type:"lazy",getter:t})}g.ZodPromise=b.$constructor("ZodPromise",(t,e)=>{b.$ZodPromise.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.promiseProcessor(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function mie(t){return new g.ZodPromise({type:"promise",innerType:t})}g.ZodFunction=b.$constructor("ZodFunction",(t,e)=>{b.$ZodFunction.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.functionProcessor(t,r,n,i)});function dg(t){return new g.ZodFunction({type:"function",input:Array.isArray(t?.input)?UN(t?.input):t?.input??ug($l()),output:t?.output??$l()})}g.ZodCustom=b.$constructor("ZodCustom",(t,e)=>{b.$ZodCustom.init(t,e),g.ZodType.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xe.customProcessor(t,r,n,i)});function yie(t){let e=new b.$ZodCheck({check:"custom"});return e._zod.check=t,e}function Eie(t,e){return b._custom(g.ZodCustom,t??(()=>!0),e)}function HN(t,e={}){return b._refine(g.ZodCustom,t,e)}function GN(t,e){return b._superRefine(t,e)}g.describe=b.describe;g.meta=b.meta;function Iie(t,e={}){let r=new g.ZodCustom({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...He.util.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Cie=(...t)=>b._stringbool({Codec:g.ZodCodec,Boolean:g.ZodBoolean,String:g.ZodString},...t);g.stringbool=Cie;function bie(t){let e=qN(()=>gb([ag(t),RN(),NN(),ON(),ug(e),MN(ag(),e)]));return e}function Sie(t,e){return new g.ZodPreprocess({type:"pipe",in:yb(t),out:e})}});var JN=y(Ar=>{"use strict";var wie=Ar&&Ar.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),_ie=Ar&&Ar.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Bie=Ar&&Ar.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&wie(e,t,r);return _ie(e,t),e};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.ZodFirstPartyTypeKind=Ar.config=Ar.$brand=Ar.ZodIssueCode=void 0;Ar.setErrorMap=vie;Ar.getErrorMap=Qie;var VN=Bie(Wr());Ar.ZodIssueCode={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"};var WN=Wr();Object.defineProperty(Ar,"$brand",{enumerable:!0,get:function(){return WN.$brand}});Object.defineProperty(Ar,"config",{enumerable:!0,get:function(){return WN.config}});function vie(t){VN.config({customError:t})}function Qie(){return VN.config().customError}var YN;YN||(Ar.ZodFirstPartyTypeKind=YN={})});var KN=y(Is=>{"use strict";var Tie=Is&&Is.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Die=Is&&Is.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Eb=Is&&Is.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Tie(e,t,r);return Die(e,t),e};Object.defineProperty(Is,"__esModule",{value:!0});Is.fromJSONSchema=Pie;var kie=Hd(),Rie=Eb(ng()),Nie=Eb(Jd()),Oie=Eb(Zd()),ee={...Oie,...Rie,iso:Nie},xie=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 Uie(t,e){let r=t.$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":e??"draft-2020-12"}function Mie(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=t.slice(1).split("/").filter(Boolean);if(r.length===0)return e.rootSchema;let n=e.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let i=r[1];if(!i||!e.defs[i])throw new Error(`Reference not found: ${t}`);return e.defs[i]}throw new Error(`Reference not found: ${t}`)}function ZN(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return ee.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let i=t.$ref;if(e.refs.has(i))return e.refs.get(i);if(e.processing.has(i))return ee.lazy(()=>{if(!e.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return e.refs.get(i)});e.processing.add(i);let o=Mie(i,e),s=Br(o,e);return e.refs.set(i,s),e.processing.delete(i),s}if(t.enum!==void 0){let i=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&i.length===1&&i[0]===null)return ee.null();if(i.length===0)return ee.never();if(i.length===1)return ee.literal(i[0]);if(i.every(s=>typeof s=="string"))return ee.enum(i);let o=i.map(s=>ee.literal(s));return o.length<2?o[0]:ee.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return ee.literal(t.const);let r=t.type;if(Array.isArray(r)){let i=r.map(o=>{let s={...t,type:o};return ZN(s,e)});return i.length===0?ee.never():i.length===1?i[0]:ee.union(i)}if(!r)return ee.any();let n;switch(r){case"string":{let i=ee.string();if(t.format){let o=t.format;o==="email"?i=i.check(ee.email()):o==="uri"||o==="uri-reference"?i=i.check(ee.url()):o==="uuid"||o==="guid"?i=i.check(ee.uuid()):o==="date-time"?i=i.check(ee.iso.datetime()):o==="date"?i=i.check(ee.iso.date()):o==="time"?i=i.check(ee.iso.time()):o==="duration"?i=i.check(ee.iso.duration()):o==="ipv4"?i=i.check(ee.ipv4()):o==="ipv6"?i=i.check(ee.ipv6()):o==="mac"?i=i.check(ee.mac()):o==="cidr"?i=i.check(ee.cidrv4()):o==="cidr-v6"?i=i.check(ee.cidrv6()):o==="base64"?i=i.check(ee.base64()):o==="base64url"?i=i.check(ee.base64url()):o==="e164"?i=i.check(ee.e164()):o==="jwt"?i=i.check(ee.jwt()):o==="emoji"?i=i.check(ee.emoji()):o==="nanoid"?i=i.check(ee.nanoid()):o==="cuid"?i=i.check(ee.cuid()):o==="cuid2"?i=i.check(ee.cuid2()):o==="ulid"?i=i.check(ee.ulid()):o==="xid"?i=i.check(ee.xid()):o==="ksuid"&&(i=i.check(ee.ksuid()))}typeof t.minLength=="number"&&(i=i.min(t.minLength)),typeof t.maxLength=="number"&&(i=i.max(t.maxLength)),t.pattern&&(i=i.regex(new RegExp(t.pattern))),n=i;break}case"number":case"integer":{let i=r==="integer"?ee.number().int():ee.number();typeof t.minimum=="number"&&(i=i.min(t.minimum)),typeof t.maximum=="number"&&(i=i.max(t.maximum)),typeof t.exclusiveMinimum=="number"?i=i.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(i=i.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?i=i.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(i=i.lt(t.maximum)),typeof t.multipleOf=="number"&&(i=i.multipleOf(t.multipleOf)),n=i;break}case"boolean":{n=ee.boolean();break}case"null":{n=ee.null();break}case"object":{let i={},o=t.properties||{},s=new Set(t.required||[]);for(let[c,l]of Object.entries(o)){let u=Br(l,e);i[c]=s.has(c)?u:u.optional()}if(t.propertyNames){let c=Br(t.propertyNames,e),l=t.additionalProperties&&typeof t.additionalProperties=="object"?Br(t.additionalProperties,e):ee.any();if(Object.keys(i).length===0){n=ee.record(c,l);break}let u=ee.object(i).passthrough(),d=ee.looseRecord(c,l);n=ee.intersection(u,d);break}if(t.patternProperties){let c=t.patternProperties,l=Object.keys(c),u=[];for(let A of l){let p=Br(c[A],e),h=ee.string().regex(new RegExp(A));u.push(ee.looseRecord(h,p))}let d=[];if(Object.keys(i).length>0&&d.push(ee.object(i).passthrough()),d.push(...u),d.length===0)n=ee.object({}).passthrough();else if(d.length===1)n=d[0];else{let A=ee.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)A=ee.intersection(A,d[p]);n=A}break}let a=ee.object(i);t.additionalProperties===!1?n=a.strict():typeof t.additionalProperties=="object"?n=a.catchall(Br(t.additionalProperties,e)):n=a.passthrough();break}case"array":{let i=t.prefixItems,o=t.items;if(i&&Array.isArray(i)){let s=i.map(c=>Br(c,e)),a=o&&typeof o=="object"&&!Array.isArray(o)?Br(o,e):void 0;a?n=ee.tuple(s).rest(a):n=ee.tuple(s),typeof t.minItems=="number"&&(n=n.check(ee.minLength(t.minItems))),typeof t.maxItems=="number"&&(n=n.check(ee.maxLength(t.maxItems)))}else if(Array.isArray(o)){let s=o.map(c=>Br(c,e)),a=t.additionalItems&&typeof t.additionalItems=="object"?Br(t.additionalItems,e):void 0;a?n=ee.tuple(s).rest(a):n=ee.tuple(s),typeof t.minItems=="number"&&(n=n.check(ee.minLength(t.minItems))),typeof t.maxItems=="number"&&(n=n.check(ee.maxLength(t.maxItems)))}else if(o!==void 0){let s=Br(o,e),a=ee.array(s);typeof t.minItems=="number"&&(a=a.min(t.minItems)),typeof t.maxItems=="number"&&(a=a.max(t.maxItems)),n=a}else n=ee.array(ee.any());break}default:throw new Error(`Unsupported type: ${r}`)}return n}function Br(t,e){if(typeof t=="boolean")return t?ee.any():ee.never();let r=ZN(t,e),n=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(l=>Br(l,e)),c=ee.union(a);r=n?ee.intersection(r,c):c}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(l=>Br(l,e)),c=ee.xor(a);r=n?ee.intersection(r,c):c}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)r=n?r:ee.any();else{let a=n?r:Br(t.allOf[0],e),c=n?0:1;for(let l=c;l<t.allOf.length;l++)a=ee.intersection(a,Br(t.allOf[l],e));r=a}t.nullable===!0&&e.version==="openapi-3.0"&&(r=ee.nullable(r)),t.readOnly===!0&&(r=ee.readonly(r)),t.default!==void 0&&(r=r.default(t.default));let i={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in t&&(i[a]=t[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in t&&(i[a]=t[a]);for(let a of Object.keys(t))xie.has(a)||(i[a]=t[a]);return Object.keys(i).length>0&&e.registry.add(r,i),t.description&&(r=r.describe(t.description)),r}function Pie(t,e){if(typeof t=="boolean")return t?ee.any():ee.never();let r;try{r=JSON.parse(JSON.stringify(t))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=Uie(r,e?.defaultTarget),i=r.$defs||r.definitions||{},o={version:n,defs:i,refs:new Map,processing:new Set,rootSchema:r,registry:e?.registry??kie.globalRegistry};return Br(r,o)}});var eO=y(gn=>{"use strict";var Lie=gn&&gn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$ie=gn&&gn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),XN=gn&&gn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Lie(e,t,r);return $ie(e,t),e};Object.defineProperty(gn,"__esModule",{value:!0});gn.string=Fie;gn.number=jie;gn.boolean=zie;gn.bigint=qie;gn.date=Hie;var eA=XN(Wr()),tA=XN(Zd());function Fie(t){return eA._coercedString(tA.ZodString,t)}function jie(t){return eA._coercedNumber(tA.ZodNumber,t)}function zie(t){return eA._coercedBoolean(tA.ZodBoolean,t)}function qie(t){return eA._coercedBigint(tA.ZodBigInt,t)}function Hie(t){return eA._coercedDate(tA.ZodDate,t)}});var Ib=y(ce=>{"use strict";var tO=ce&&ce.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Gie=ce&&ce.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ag=ce&&ce.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&tO(e,t,r);return Gie(e,t),e},rA=ce&&ce.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&tO(e,t,r)},Yie=ce&&ce.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ce,"__esModule",{value:!0});ce.coerce=ce.iso=ce.ZodISODuration=ce.ZodISOTime=ce.ZodISODate=ce.ZodISODateTime=ce.locales=ce.fromJSONSchema=ce.toJSONSchema=ce.NEVER=ce.util=ce.TimePrecision=ce.flattenError=ce.formatError=ce.prettifyError=ce.treeifyError=ce.regexes=ce.clone=ce.$brand=ce.$input=ce.$output=ce.config=ce.registry=ce.globalRegistry=ce.core=void 0;ce.core=Ag(Wr());rA(Zd(),ce);rA(ng(),ce);rA(ub(),ce);rA(db(),ce);rA(JN(),ce);var Vie=Wr(),Wie=Yie(rb());(0,Vie.config)((0,Wie.default)());var Ur=Wr();Object.defineProperty(ce,"globalRegistry",{enumerable:!0,get:function(){return Ur.globalRegistry}});Object.defineProperty(ce,"registry",{enumerable:!0,get:function(){return Ur.registry}});Object.defineProperty(ce,"config",{enumerable:!0,get:function(){return Ur.config}});Object.defineProperty(ce,"$output",{enumerable:!0,get:function(){return Ur.$output}});Object.defineProperty(ce,"$input",{enumerable:!0,get:function(){return Ur.$input}});Object.defineProperty(ce,"$brand",{enumerable:!0,get:function(){return Ur.$brand}});Object.defineProperty(ce,"clone",{enumerable:!0,get:function(){return Ur.clone}});Object.defineProperty(ce,"regexes",{enumerable:!0,get:function(){return Ur.regexes}});Object.defineProperty(ce,"treeifyError",{enumerable:!0,get:function(){return Ur.treeifyError}});Object.defineProperty(ce,"prettifyError",{enumerable:!0,get:function(){return Ur.prettifyError}});Object.defineProperty(ce,"formatError",{enumerable:!0,get:function(){return Ur.formatError}});Object.defineProperty(ce,"flattenError",{enumerable:!0,get:function(){return Ur.flattenError}});Object.defineProperty(ce,"TimePrecision",{enumerable:!0,get:function(){return Ur.TimePrecision}});Object.defineProperty(ce,"util",{enumerable:!0,get:function(){return Ur.util}});Object.defineProperty(ce,"NEVER",{enumerable:!0,get:function(){return Ur.NEVER}});var Jie=Wd();Object.defineProperty(ce,"toJSONSchema",{enumerable:!0,get:function(){return Jie.toJSONSchema}});var Zie=KN();Object.defineProperty(ce,"fromJSONSchema",{enumerable:!0,get:function(){return Zie.fromJSONSchema}});ce.locales=Ag(ob());var pg=Jd();Object.defineProperty(ce,"ZodISODateTime",{enumerable:!0,get:function(){return pg.ZodISODateTime}});Object.defineProperty(ce,"ZodISODate",{enumerable:!0,get:function(){return pg.ZodISODate}});Object.defineProperty(ce,"ZodISOTime",{enumerable:!0,get:function(){return pg.ZodISOTime}});Object.defineProperty(ce,"ZodISODuration",{enumerable:!0,get:function(){return pg.ZodISODuration}});ce.iso=Ag(Jd());ce.coerce=Ag(eO())});var uc=y(Jr=>{"use strict";var rO=Jr&&Jr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Kie=Jr&&Jr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Xie=Jr&&Jr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&rO(e,t,r);return Kie(e,t),e},eoe=Jr&&Jr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&rO(e,t,r)};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.z=void 0;var nO=Xie(Ib());Jr.z=nO;eoe(Ib(),Jr);Jr.default=nO});var mg=y(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.CHAT_VISUAL_CURRENCY_PREFIXES=V.chatVisualBlockSchema=V.chatVisualBlockShape=V.chatVisualSchema=V.CHAT_VISUAL_TYPES=V.CHAT_VISUAL_TONES=V.CHAT_VISUAL_STATUSES=V.CHAT_VISUAL_RECONCILE_KINDS=V.CHAT_VISUAL_MIGRATION_LAYERS=V.CHAT_VISUAL_MIGRATION_PHASES=V.CHAT_VISUAL_MAPPING_RULES=V.CHAT_VISUAL_LIMITS=void 0;V.parseChatVisualBlock=Soe;V.formatChatVisualNumber=dc;V.formatChatVisualValue=AO;V.groupFlowNodes=pO;V.parseLessonStepVisual=hO;V.reconcileGap=fO;V.chatVisualToMarkdown=Boe;var R=uc();V.CHAT_VISUAL_LIMITS={text:2e3,stats:6,sparklinePoints:30,chartLabels:50,chartSeries:8,flowNodes:24,flowEdges:40,steps:20,tableColumns:8,tableRows:30,mappingFields:40,cards:12,cardFacts:4,images:6,diagramChars:8e3,customHtml:6e4,customMinHeight:120,customMaxHeight:900,migrationObjects:20,migrationIssues:3,reconcileSteps:10,timelineItems:30,lessonSteps:10,lessonOptions:4,lessonCustomVisuals:2,timelineUnits:1e5};V.CHAT_VISUAL_MAPPING_RULES=["direct","transform","lookup","default","constant","skip"];V.CHAT_VISUAL_MIGRATION_PHASES=["inventory","mapping","quality","test","load","reconcile","cutover"];V.CHAT_VISUAL_MIGRATION_LAYERS=["reference","master","transaction","balance","history"];V.CHAT_VISUAL_RECONCILE_KINDS=["excluded","merged","failed","pending","added","other"];V.CHAT_VISUAL_STATUSES=["success","failed","warning","running","pending","skipped"];V.CHAT_VISUAL_TONES=["positive","negative","warning","neutral"];var iO=["flowchart","graph","sequenceDiagram","erDiagram","stateDiagram","stateDiagram-v2","classDiagram","gantt","journey","timeline","mindmap","quadrantChart","gitGraph","pie"],Ve=()=>R.z.string().trim().min(1).max(V.CHAT_VISUAL_LIMITS.text),_t=()=>R.z.string().trim().max(V.CHAT_VISUAL_LIMITS.text),bb=_t().refine(t=>/^https:\/\/[^\s]+$/i.test(t),"Must be an absolute https:// URL."),jl=R.z.enum(V.CHAT_VISUAL_STATUSES),gg=R.z.string().trim().min(1).max(80).describe("Connected system id or superglue template key, such as salesforce; shows its logo."),toe=R.z.object({type:R.z.literal("stats"),items:R.z.array(R.z.object({label:Ve(),value:R.z.union([R.z.number(),Ve()]).describe("Displayed value, such as 1240 or '4.2 s'."),unit:_t().optional().describe("Suffix, such as '%' for rates and shares, or a currency symbol prefix."),delta:_t().optional().describe("Change, such as '+12%' or '-3'."),tone:R.z.enum(V.CHAT_VISUAL_TONES).optional().describe("Meaning of the delta or value."),hint:_t().optional().describe("Context, such as 'last 7 days'."),trend:R.z.array(R.z.number()).min(2).max(V.CHAT_VISUAL_LIMITS.sparklinePoints).optional().describe("Values for a small trend line, oldest first.")})).min(1).max(V.CHAT_VISUAL_LIMITS.stats)}),roe=R.z.object({type:R.z.literal("chart"),kind:R.z.enum(["bar","hbar","line","area","donut"]).describe("bar: vertical bars; hbar: horizontal bars for rankings; donut: one series."),labels:R.z.array(Ve()).min(1).max(V.CHAT_VISUAL_LIMITS.chartLabels).describe("Category or x-axis labels in display order."),series:R.z.array(R.z.object({name:Ve(),values:R.z.array(R.z.number().nullable()).describe("One value per label, in label order; null for a gap.")})).min(1).max(V.CHAT_VISUAL_LIMITS.chartSeries),stacked:R.z.boolean().optional().describe("Stack bar or area series."),unit:_t().optional().describe("Value suffix, such as '%' for rates and shares, or a currency symbol prefix.")}).superRefine((t,e)=>{t.series.forEach((r,n)=>{r.values.length!==t.labels.length&&e.addIssue({code:"custom",path:["series",n,"values"],message:`Series "${r.name}" has ${r.values.length} values for ${t.labels.length} labels.`})}),t.kind==="donut"&&t.series.length!==1&&e.addIssue({code:"custom",path:["series"],message:"A donut takes one series."}),(t.kind==="hbar"||t.kind==="donut")&&t.series.some(r=>r.values.some(n=>n!==null&&n<0))&&e.addIssue({code:"custom",path:["series"],message:`A ${t.kind} chart takes no negative values; use a bar chart.`})}),noe=R.z.object({type:R.z.literal("flow"),direction:R.z.enum(["right","down"]).optional().describe("Layout direction; default right."),nodes:R.z.array(R.z.object({id:Ve(),label:Ve(),kind:R.z.enum(["system","step","trigger","transform","decision","store","user"]).optional(),system:gg.optional(),detail:_t().optional().describe("Shown when the node is opened."),status:jl.optional(),group:_t().optional().describe("Cluster label, such as one system's side; groups show parts that are not connected.")})).min(2).max(V.CHAT_VISUAL_LIMITS.flowNodes),edges:R.z.array(R.z.object({from:Ve(),to:Ve(),label:_t().optional(),status:jl.optional()})).max(V.CHAT_VISUAL_LIMITS.flowEdges)}).superRefine((t,e)=>{let r=new Set;t.nodes.forEach((n,i)=>{r.has(n.id)&&e.addIssue({code:"custom",path:["nodes",i,"id"],message:`Duplicate node id "${n.id}".`}),r.add(n.id)}),t.edges.forEach((n,i)=>{for(let o of["from","to"])r.has(n[o])||e.addIssue({code:"custom",path:["edges",i,o],message:`Edge ${o} "${n[o]}" is not a node id.`})})}),ioe=R.z.object({type:R.z.literal("steps"),items:R.z.array(R.z.object({title:Ve(),status:jl,detail:_t().optional(),time:_t().optional().describe("When it happened, as display text."),duration:_t().optional().describe("Such as '1.2 s'.")})).min(1).max(V.CHAT_VISUAL_LIMITS.steps)}),uO={success:"positive",failed:"negative",warning:"warning",running:"neutral",pending:"neutral",skipped:"neutral"};function ooe(t){return typeof t!="object"||t===null||!("kind"in t)?t:t.kind==="status"?{...t,kind:"tag",tones:uO}:t}function soe(t){if(typeof t!="object"||t===null||!("status"in t))return t;let{status:e,...r}=t;if(!V.CHAT_VISUAL_STATUSES.includes(e))return r;let n=e;return{...r,tag:{label:n.charAt(0).toUpperCase()+n.slice(1),tone:uO[n]}}}var aoe=R.z.object({label:Ve(),tone:R.z.enum(V.CHAT_VISUAL_TONES).optional().describe("Tag color; neutral when omitted.")}).describe("Short label shown as a tag, such as a status, priority, or effort."),coe=R.z.object({label:Ve(),kind:R.z.enum(["text","number","tag","system","date","code","link"]).optional().describe("tag cells show their text as a tag, such as a status, priority, or effort; system cells hold a system id; link cells hold an https URL or [label](https://...)."),tones:R.z.record(R.z.string(),R.z.enum(V.CHAT_VISUAL_TONES)).optional().describe("Tag color by exact cell value, such as { Failed: 'negative', High: 'warning' }; other values are neutral.")}),loe=R.z.object({type:R.z.literal("table"),columns:R.z.array(R.z.preprocess(ooe,coe)).min(1).max(V.CHAT_VISUAL_LIMITS.tableColumns),rows:R.z.array(R.z.array(R.z.union([R.z.string().max(V.CHAT_VISUAL_LIMITS.text),R.z.number(),R.z.boolean(),R.z.null()]))).max(V.CHAT_VISUAL_LIMITS.tableRows).describe("Each row holds one cell per column, in column order."),totalRows:R.z.number().int().nonnegative().optional().describe("Number of rows in the full result when rows holds a sample. Not a sum of cell values.")}).superRefine((t,e)=>{t.rows.forEach((r,n)=>{r.length!==t.columns.length&&e.addIssue({code:"custom",path:["rows",n],message:`Row ${n} has ${r.length} cells for ${t.columns.length} columns.`})})}),oO=R.z.object({label:Ve(),system:gg.optional()}),uoe=R.z.object({type:R.z.literal("mapping"),source:oO,target:oO,fields:R.z.array(R.z.object({source:_t().describe("Source field; empty when the target is unmapped."),target:Ve(),rule:R.z.enum(V.CHAT_VISUAL_MAPPING_RULES).optional().describe("direct: copied as is; transform: changed by a rule; lookup: resolved through another record; default/constant: fixed value; skip: not migrated."),transform:_t().optional().describe("The rule or value, such as 'uppercase' or 'Net 30'."),required:R.z.boolean().optional().describe("The target requires this field."),sample:R.z.object({from:R.z.string().max(V.CHAT_VISUAL_LIMITS.text).optional(),to:R.z.string().max(V.CHAT_VISUAL_LIMITS.text).optional()}).optional().describe("One real value before and after the mapping."),note:_t().optional().describe("Reason, decision, or open question."),status:jl.optional().describe("success: mapped; warning: needs review; pending: decision open; failed: required field without a source.")})).min(1).max(V.CHAT_VISUAL_LIMITS.mappingFields)}),sO=R.z.object({label:Ve(),system:gg.optional()}),doe=R.z.object({type:R.z.literal("migration"),source:sO,target:sO,phase:R.z.enum(V.CHAT_VISUAL_MIGRATION_PHASES).optional().describe("Current phase; earlier phases show as done."),objects:R.z.array(R.z.object({name:Ve(),layer:R.z.enum(V.CHAT_VISUAL_MIGRATION_LAYERS).optional().describe("reference: setup lists such as terms or accounts; master: customers, vendors, items; transaction: invoices, bills, orders; balance: opening balances; history: closed periods."),needs:R.z.array(Ve()).max(5).optional().describe("Names of objects in this list that must load first."),source:R.z.number().int().nonnegative().optional().describe("Records in the source."),loaded:R.z.number().int().nonnegative().optional(),failed:R.z.number().int().nonnegative().optional(),skipped:R.z.number().int().nonnegative().optional(),status:jl.optional(),issues:R.z.array(R.z.object({label:Ve(),count:R.z.number().int().nonnegative().optional()})).max(V.CHAT_VISUAL_LIMITS.migrationIssues).optional().describe("Top problems, such as a failure reason and its record count."),note:_t().optional()})).min(1).max(V.CHAT_VISUAL_LIMITS.migrationObjects).describe("Objects in load order.")}).superRefine((t,e)=>{let r=new Set(t.objects.map(n=>n.name));r.size!==t.objects.length&&e.addIssue({code:"custom",path:["objects"],message:"Object names must be unique."}),t.objects.forEach((n,i)=>{n.needs?.includes(n.name)&&e.addIssue({code:"custom",path:["objects",i,"needs"],message:`${n.name} cannot load after itself.`}),n.status==="success"&&(n.failed??0)>0&&e.addIssue({code:"custom",path:["objects",i,"status"],message:`${n.name} has ${n.failed} failed records; use warning or failed, not success.`}),n.needs?.forEach((o,s)=>{r.has(o)||e.addIssue({code:"custom",path:["objects",i,"needs",s],message:`"${o}" is not an object name in this migration.`})})})}),Aoe=R.z.object({type:R.z.literal("reconcile"),object:_t().optional().describe("What is counted, such as 'vendors'."),unit:_t().optional().describe("Value suffix, or a currency symbol prefix."),source:R.z.object({label:Ve(),value:R.z.number()}).describe("Starting total."),steps:R.z.array(R.z.object({label:Ve(),value:R.z.number().describe("Signed change: negative removes, positive adds."),kind:R.z.enum(V.CHAT_VISUAL_RECONCILE_KINDS).optional(),reason:_t().optional()})).max(V.CHAT_VISUAL_LIMITS.reconcileSteps),target:R.z.object({label:Ve(),value:R.z.number()}).describe("Ending total.")});function poe(t){let e=new Date(`${t}T00:00:00Z`);return!Number.isNaN(e.getTime())&&e.toISOString().startsWith(t)}var Cb=R.z.union([R.z.number().int().min(-V.CHAT_VISUAL_LIMITS.timelineUnits).max(V.CHAT_VISUAL_LIMITS.timelineUnits).describe("Week or day number for the week and day scales."),R.z.string().regex(/^\d{4}-\d{2}-\d{2}$/,"Use YYYY-MM-DD.").refine(poe,"Not a calendar date.").describe("Date for the date scale.")]);function hoe(t,e){return typeof t=="number"&&typeof e=="number"||typeof t=="string"&&typeof e=="string"?t<e:!1}var foe=R.z.object({type:R.z.literal("timeline"),scale:R.z.enum(["date","week","day"]).describe("date: YYYY-MM-DD points; week/day: numbers."),items:R.z.array(R.z.object({label:Ve(),lane:_t().optional().describe("Row group, such as an owner or a workstream."),start:Cb,end:Cb.optional().describe("Omit for milestones."),milestone:R.z.boolean().optional(),status:jl.optional(),dependsOn:R.z.array(Ve()).max(4).optional().describe("Labels of items that finish first.")})).min(1).max(V.CHAT_VISUAL_LIMITS.timelineItems),today:Cb.optional().describe("Marks the current date, week, or day.")}).superRefine((t,e)=>{let r=t.scale==="date",n=(o,s)=>{o!==void 0&&r!==(typeof o=="string")&&e.addIssue({code:"custom",path:s,message:r?"Use YYYY-MM-DD for the date scale.":"Use a number for the week and day scales."})},i=new Set(t.items.map(o=>o.label));i.size!==t.items.length&&e.addIssue({code:"custom",path:["items"],message:"Item labels must be unique."}),t.items.forEach((o,s)=>{o.dependsOn?.includes(o.label)&&e.addIssue({code:"custom",path:["items",s,"dependsOn"],message:`${o.label} cannot depend on itself.`}),n(o.start,["items",s,"start"]),n(o.end,["items",s,"end"]),o.end!==void 0&&hoe(o.end,o.start)&&e.addIssue({code:"custom",path:["items",s,"end"],message:"end is before start."}),o.dependsOn?.forEach((a,c)=>{i.has(a)||e.addIssue({code:"custom",path:["items",s,"dependsOn",c],message:`"${a}" is not an item label in this timeline.`})})}),n(t.today,["today"])}),goe=R.z.object({prompt:Ve().describe("Asked before the explanation is revealed."),options:R.z.array(R.z.object({label:Ve(),correct:R.z.boolean(),explanation:Ve().describe("Why this option is right or wrong; the UI already shows the verdict.")})).min(2).max(V.CHAT_VISUAL_LIMITS.lessonOptions),hint:_t().optional().describe("Shown after the first wrong answer.")}).superRefine((t,e)=>{t.options.filter(r=>r.correct).length!==1&&e.addIssue({code:"custom",path:["options"],message:"Mark exactly one option correct."})}),moe=R.z.object({type:R.z.literal("lesson"),steps:R.z.array(R.z.object({title:Ve(),body:_t().optional().describe("Short Markdown explanation shown with the step."),visual:R.z.record(R.z.string(),R.z.unknown()).optional().describe("Any visual object except lesson, such as a flow, mapping, or custom visual."),question:goe.optional()})).min(2).max(V.CHAT_VISUAL_LIMITS.lessonSteps),recap:_t().optional().describe("Markdown summary on the completion screen.")}).superRefine((t,e)=>{t.steps.filter(n=>n.visual?.type==="custom").length>V.CHAT_VISUAL_LIMITS.lessonCustomVisuals&&e.addIssue({code:"custom",path:["steps"],message:`A lesson can contain at most ${V.CHAT_VISUAL_LIMITS.lessonCustomVisuals} custom visuals; use built-in visuals for the other steps.`}),t.steps.forEach((n,i)=>{if(n.visual===void 0)return;let o=V.chatVisualSchema.safeParse(n.visual);if(o.success)o.data.type==="lesson"&&e.addIssue({code:"custom",path:["steps",i,"visual","type"],message:"A lesson step cannot contain a lesson."});else for(let s of o.error.issues)e.addIssue({code:"custom",path:["steps",i,"visual",...s.path.map(a=>typeof a=="symbol"?String(a):a)],message:s.message})})}),yoe=R.z.object({type:R.z.literal("cards"),items:R.z.array(R.z.preprocess(soe,R.z.object({title:Ve(),subtitle:_t().optional(),system:gg.optional(),image:bb.optional().describe("Card image URL."),tag:aoe.optional(),facts:R.z.array(R.z.object({label:Ve(),value:R.z.union([R.z.number(),Ve()])})).max(V.CHAT_VISUAL_LIMITS.cardFacts).optional(),href:bb.optional().describe("External link the card opens.")}))).min(1).max(V.CHAT_VISUAL_LIMITS.cards)}),Eoe=R.z.object({type:R.z.literal("diagram"),source:R.z.string().trim().min(1).max(V.CHAT_VISUAL_LIMITS.diagramChars).refine(t=>iO.includes(t.split(/\s/,1)[0]??""),`Must start with a Mermaid diagram keyword: ${iO.join(", ")}.`).describe("Mermaid source, such as a sequenceDiagram or erDiagram.")}),Ioe=R.z.object({type:R.z.literal("image"),images:R.z.array(R.z.object({src:bb,alt:Ve().describe("What the image shows."),caption:_t().optional()})).min(1).max(V.CHAT_VISUAL_LIMITS.images)}),Coe=R.z.object({type:R.z.literal("custom"),summary:Ve().describe("Markdown description of what the visual shows; replaces it where it cannot run, such as Microsoft Teams."),html:R.z.string().trim().min(1).max(V.CHAT_VISUAL_LIMITS.customHtml).describe("Self-contained HTML document or body fragment with inline scripts and styles, run in an isolated frame with the chat visual runtime."),height:R.z.number().int().min(V.CHAT_VISUAL_LIMITS.customMinHeight).max(V.CHAT_VISUAL_LIMITS.customMaxHeight).optional().describe("Initial height in pixels; the frame then follows the content height.")}),boe=R.z.object({type:R.z.literal("callout"),tone:R.z.enum(["info","success","warning","error"]),body:Ve().describe("Plain text with optional inline Markdown.")}),dO=[toe,roe,noe,ioe,loe,uoe,yoe,Eoe,Ioe,boe,Coe,doe,Aoe,foe,moe];V.CHAT_VISUAL_TYPES=dO.map(t=>t.shape.type.value);V.chatVisualSchema=R.z.discriminatedUnion("type",dO,{error:t=>t.code==="invalid_union"&&t.note==="No matching discriminator"?`visual needs a type key with one of: ${V.CHAT_VISUAL_TYPES.join(", ")}`:void 0});V.chatVisualBlockShape={title:Ve().optional().describe("Short heading."),caption:Ve().optional().describe("One-line takeaway shown under the heading."),visual:V.chatVisualSchema,replaces:R.z.string().trim().min(1).max(120).optional().describe("visualId of an earlier visual in the same reply that this one replaces; the earlier one is hidden.")};V.chatVisualBlockSchema=R.z.object(V.chatVisualBlockShape);function Soe(t){let e=V.chatVisualBlockSchema.safeParse(t);return e.success?e.data:null}V.CHAT_VISUAL_CURRENCY_PREFIXES=new Set(["$","\u20AC","\xA3","\xA5","CHF"]);function dc(t,e){let r=Number.isInteger(t)?t.toLocaleString("en-US"):e&&V.CHAT_VISUAL_CURRENCY_PREFIXES.has(e)&&Math.abs(t)>=.01?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):Math.abs(t)<1?t.toLocaleString("en-US",{maximumSignificantDigits:3}):t.toLocaleString("en-US",{maximumFractionDigits:2});return e?V.CHAT_VISUAL_CURRENCY_PREFIXES.has(e)?t<0?`-${e}${r.slice(1)}`:`${e}${r}`:e==="%"?`${r}%`:`${r} ${e}`:r}function AO(t,e){return typeof t=="number"?dc(t,e):!e||t.endsWith(e)||!/\d/.test(t)?t:V.CHAT_VISUAL_CURRENCY_PREFIXES.has(e)?t.startsWith(e)?t:`${e}${t}`:e==="%"?`${t}%`:`${t} ${e}`}function aO(t){return t==null?"":String(t).replace(/\|/g,"\\|").replace(/\s*\n\s*/g," ")}function Fl(t,e){return[`| ${t.map(aO).join(" | ")} |`,`| ${t.map(()=>"---").join(" | ")} |`,...e.map(r=>`| ${r.map(aO).join(" | ")} |`)].join(`
68
68
  `)}function cO(t){return t.replace(/[[\]]/g,"\\$&")}function woe(t,e){let r=Math.max(2,...(e.match(/`+/g)??[]).map(i=>i.length)),n="`".repeat(r+1);return`${n}${t}
69
69
  ${e}
70
70
  ${n}`}function hg(...t){return t.filter(e=>!!e).join(" \u2014 ")}function pO(t){let e=new Map;for(let r of t){let n=r.group??"";e.set(n,[...e.get(n)??[],r])}return[...e].map(([r,n])=>({label:r||void 0,nodes:n}))}function hO(t){let e=V.chatVisualSchema.safeParse(t);return e.success&&e.data.type!=="lesson"?e.data:null}function _oe(t){let e=String(t),r=e.indexOf(".");return r<0?0:e.length-r-1}function fO(t){let e=[t.source.value,t.target.value,...t.steps.map(o=>o.value)],n=10**(t.unit!==void 0&&V.CHAT_VISUAL_CURRENCY_PREFIXES.has(t.unit)?2:Math.min(6,Math.max(...e.map(_oe)))),i=t.steps.reduce((o,s)=>o+Math.round(s.value*n),Math.round(t.source.value*n));return(Math.round(t.target.value*n)-i)/n}function lO(t,e){return`${t>0?"+":t<0?"\u2212":""}${dc(Math.abs(t),e)}`}function fg(t){return t===void 0?"":dc(t)}function gO(t){switch(t.type){case"stats":return t.items.map(e=>`- **${e.label}**: ${hg(AO(e.value,e.unit)+(e.delta?` (${e.delta})`:""),e.hint)}`).join(`
@@ -98,11 +98,11 @@ _Interactive visual in superglue._`}}function Boe(t){return[t.title?`**${t.title
98
98
  `)}});var CO=y((z1e,IO)=>{"use strict";var mO=9007199254740991,voe="[object Arguments]",Qoe="[object Function]",Toe="[object GeneratorFunction]",Doe=/^(?:0|[1-9]\d*)$/;function koe(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Roe(t,e){return function(r){return t(e(r))}}var yg=Object.prototype,Sb=yg.hasOwnProperty,yO=yg.toString,Noe=yg.propertyIsEnumerable,Ooe=Roe(Object.keys,Object);function xoe(t,e){var r=$oe(t)||Loe(t)?koe(t.length,String):[],n=r.length,i=!!n;for(var o in t)(e||Sb.call(t,o))&&!(i&&(o=="length"||Moe(o,n)))&&r.push(o);return r}function Uoe(t){if(!Poe(t))return Ooe(t);var e=[];for(var r in Object(t))Sb.call(t,r)&&r!="constructor"&&e.push(r);return e}function Moe(t,e){return e=e??mO,!!e&&(typeof t=="number"||Doe.test(t))&&t>-1&&t%1==0&&t<e}function Poe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||yg;return t===r}function Loe(t){return Foe(t)&&Sb.call(t,"callee")&&(!Noe.call(t,"callee")||yO.call(t)==voe)}var $oe=Array.isArray;function EO(t){return t!=null&&zoe(t.length)&&!joe(t)}function Foe(t){return Hoe(t)&&EO(t)}function joe(t){var e=qoe(t)?yO.call(t):"";return e==Qoe||e==Toe}function zoe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=mO}function qoe(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Hoe(t){return!!t&&typeof t=="object"}function Goe(t){return EO(t)?xoe(t):Uoe(t)}IO.exports=Goe});var JO=y((nA,zl)=>{"use strict";var Yoe=200,kO="__lodash_hash_undefined__",Voe=800,Woe=16,RO=9007199254740991,NO="[object Arguments]",Joe="[object Array]",Zoe="[object AsyncFunction]",Koe="[object Boolean]",Xoe="[object Date]",ese="[object Error]",OO="[object Function]",tse="[object GeneratorFunction]",rse="[object Map]",nse="[object Number]",ise="[object Null]",xO="[object Object]",ose="[object Proxy]",sse="[object RegExp]",ase="[object Set]",cse="[object String]",lse="[object Undefined]",use="[object WeakMap]",dse="[object ArrayBuffer]",Ase="[object DataView]",pse="[object Float32Array]",hse="[object Float64Array]",fse="[object Int8Array]",gse="[object Int16Array]",mse="[object Int32Array]",yse="[object Uint8Array]",Ese="[object Uint8ClampedArray]",Ise="[object Uint16Array]",Cse="[object Uint32Array]",bse=/[\\^$.*+?()[\]{}|]/g,Sse=/^\[object .+?Constructor\]$/,wse=/^(?:0|[1-9]\d*)$/,yt={};yt[pse]=yt[hse]=yt[fse]=yt[gse]=yt[mse]=yt[yse]=yt[Ese]=yt[Ise]=yt[Cse]=!0;yt[NO]=yt[Joe]=yt[dse]=yt[Koe]=yt[Ase]=yt[Xoe]=yt[ese]=yt[OO]=yt[rse]=yt[nse]=yt[xO]=yt[sse]=yt[ase]=yt[cse]=yt[use]=!1;var UO=typeof global=="object"&&global&&global.Object===Object&&global,_se=typeof self=="object"&&self&&self.Object===Object&&self,sA=UO||_se||Function("return this")(),MO=typeof nA=="object"&&nA&&!nA.nodeType&&nA,iA=MO&&typeof zl=="object"&&zl&&!zl.nodeType&&zl,PO=iA&&iA.exports===MO,wb=PO&&UO.process,bO=(function(){try{var t=iA&&iA.require&&iA.require("util").types;return t||wb&&wb.binding&&wb.binding("util")}catch{}})(),SO=bO&&bO.isTypedArray;function Bse(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function vse(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Qse(t){return function(e){return t(e)}}function Tse(t,e){return t?.[e]}function Dse(t,e){return function(r){return t(e(r))}}var kse=Array.prototype,Rse=Function.prototype,Cg=Object.prototype,_b=sA["__core-js_shared__"],bg=Rse.toString,Cs=Cg.hasOwnProperty,wO=(function(){var t=/[^.]+$/.exec(_b&&_b.keys&&_b.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),LO=Cg.toString,Nse=bg.call(Object),Ose=RegExp("^"+bg.call(Cs).replace(bse,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Eg=PO?sA.Buffer:void 0,_O=sA.Symbol,BO=sA.Uint8Array,vO=Eg?Eg.allocUnsafe:void 0,$O=Dse(Object.getPrototypeOf,Object),QO=Object.create,xse=Cg.propertyIsEnumerable,Use=kse.splice,Ac=_O?_O.toStringTag:void 0,Ig=(function(){try{var t=kb(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Mse=Eg?Eg.isBuffer:void 0,TO=Math.max,Pse=Date.now,FO=kb(sA,"Map"),oA=kb(Object,"create"),Lse=(function(){function t(){}return function(e){if(!hc(e))return{};if(QO)return QO(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})();function pc(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function $se(){this.__data__=oA?oA(null):{},this.size=0}function Fse(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function jse(t){var e=this.__data__;if(oA){var r=e[t];return r===kO?void 0:r}return Cs.call(e,t)?e[t]:void 0}function zse(t){var e=this.__data__;return oA?e[t]!==void 0:Cs.call(e,t)}function qse(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=oA&&e===void 0?kO:e,this}pc.prototype.clear=$se;pc.prototype.delete=Fse;pc.prototype.get=jse;pc.prototype.has=zse;pc.prototype.set=qse;function bs(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Hse(){this.__data__=[],this.size=0}function Gse(t){var e=this.__data__,r=Sg(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Use.call(e,r,1),--this.size,!0}function Yse(t){var e=this.__data__,r=Sg(e,t);return r<0?void 0:e[r][1]}function Vse(t){return Sg(this.__data__,t)>-1}function Wse(t,e){var r=this.__data__,n=Sg(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}bs.prototype.clear=Hse;bs.prototype.delete=Gse;bs.prototype.get=Yse;bs.prototype.has=Vse;bs.prototype.set=Wse;function ql(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Jse(){this.size=0,this.__data__={hash:new pc,map:new(FO||bs),string:new pc}}function Zse(t){var e=_g(this,t).delete(t);return this.size-=e?1:0,e}function Kse(t){return _g(this,t).get(t)}function Xse(t){return _g(this,t).has(t)}function eae(t,e){var r=_g(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}ql.prototype.clear=Jse;ql.prototype.delete=Zse;ql.prototype.get=Kse;ql.prototype.has=Xse;ql.prototype.set=eae;function Hl(t){var e=this.__data__=new bs(t);this.size=e.size}function tae(){this.__data__=new bs,this.size=0}function rae(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function nae(t){return this.__data__.get(t)}function iae(t){return this.__data__.has(t)}function oae(t,e){var r=this.__data__;if(r instanceof bs){var n=r.__data__;if(!FO||n.length<Yoe-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ql(n)}return r.set(t,e),this.size=r.size,this}Hl.prototype.clear=tae;Hl.prototype.delete=rae;Hl.prototype.get=nae;Hl.prototype.has=iae;Hl.prototype.set=oae;function sae(t,e){var r=Tb(t),n=!r&&Qb(t),i=!r&&!n&&HO(t),o=!r&&!n&&!i&&YO(t),s=r||n||i||o,a=s?vse(t.length,String):[],c=a.length;for(var l in t)(e||Cs.call(t,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||zO(l,c)))&&a.push(l);return a}function Bb(t,e,r){(r!==void 0&&!Bg(t[e],r)||r===void 0&&!(e in t))&&Db(t,e,r)}function aae(t,e,r){var n=t[e];(!(Cs.call(t,e)&&Bg(n,r))||r===void 0&&!(e in t))&&Db(t,e,r)}function Sg(t,e){for(var r=t.length;r--;)if(Bg(t[r][0],e))return r;return-1}function Db(t,e,r){e=="__proto__"&&Ig?Ig(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var cae=Cae();function wg(t){return t==null?t===void 0?lse:ise:Ac&&Ac in Object(t)?bae(t):Qae(t)}function DO(t){return aA(t)&&wg(t)==NO}function lae(t){if(!hc(t)||Bae(t))return!1;var e=Nb(t)?Ose:Sse;return e.test(Rae(t))}function uae(t){return aA(t)&&GO(t.length)&&!!yt[wg(t)]}function dae(t){if(!hc(t))return vae(t);var e=qO(t),r=[];for(var n in t)n=="constructor"&&(e||!Cs.call(t,n))||r.push(n);return r}function jO(t,e,r,n,i){t!==e&&cae(e,function(o,s){if(i||(i=new Hl),hc(o))Aae(t,e,s,r,jO,n,i);else{var a=n?n(vb(t,s),o,s+"",t,e,i):void 0;a===void 0&&(a=o),Bb(t,s,a)}},VO)}function Aae(t,e,r,n,i,o,s){var a=vb(t,r),c=vb(e,r),l=s.get(c);if(l){Bb(t,r,l);return}var u=o?o(a,c,r+"",t,e,s):void 0,d=u===void 0;if(d){var A=Tb(c),p=!A&&HO(c),h=!A&&!p&&YO(c);u=c,A||p||h?Tb(a)?u=a:Nae(a)?u=yae(a):p?(d=!1,u=fae(c,!0)):h?(d=!1,u=mae(c,!0)):u=[]:Oae(c)||Qb(c)?(u=a,Qb(a)?u=xae(a):(!hc(a)||Nb(a))&&(u=Sae(c))):d=!1}d&&(s.set(c,u),i(u,c,n,o,s),s.delete(c)),Bb(t,r,u)}function pae(t,e){return Dae(Tae(t,e,WO),t+"")}var hae=Ig?function(t,e){return Ig(t,"toString",{configurable:!0,enumerable:!1,value:Mae(e),writable:!0})}:WO;function fae(t,e){if(e)return t.slice();var r=t.length,n=vO?vO(r):new t.constructor(r);return t.copy(n),n}function gae(t){var e=new t.constructor(t.byteLength);return new BO(e).set(new BO(t)),e}function mae(t,e){var r=e?gae(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function yae(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function Eae(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var a=e[o],c=n?n(r[a],t[a],a,r,t):void 0;c===void 0&&(c=t[a]),i?Db(r,a,c):aae(r,a,c)}return r}function Iae(t){return pae(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&wae(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var a=r[n];a&&t(e,a,n,o)}return e})}function Cae(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var c=s[t?a:++i];if(r(o[c],c,o)===!1)break}return e}}function _g(t,e){var r=t.__data__;return _ae(e)?r[typeof e=="string"?"string":"hash"]:r.map}function kb(t,e){var r=Tse(t,e);return lae(r)?r:void 0}function bae(t){var e=Cs.call(t,Ac),r=t[Ac];try{t[Ac]=void 0;var n=!0}catch{}var i=LO.call(t);return n&&(e?t[Ac]=r:delete t[Ac]),i}function Sae(t){return typeof t.constructor=="function"&&!qO(t)?Lse($O(t)):{}}function zO(t,e){var r=typeof t;return e=e??RO,!!e&&(r=="number"||r!="symbol"&&wse.test(t))&&t>-1&&t%1==0&&t<e}function wae(t,e,r){if(!hc(r))return!1;var n=typeof e;return(n=="number"?Rb(r)&&zO(e,r.length):n=="string"&&e in r)?Bg(r[e],t):!1}function _ae(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Bae(t){return!!wO&&wO in t}function qO(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Cg;return t===r}function vae(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}function Qae(t){return LO.call(t)}function Tae(t,e,r){return e=TO(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=TO(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=r(s),Bse(t,this,a)}}function vb(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Dae=kae(hae);function kae(t){var e=0,r=0;return function(){var n=Pse(),i=Woe-(n-r);if(r=n,i>0){if(++e>=Voe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Rae(t){if(t!=null){try{return bg.call(t)}catch{}try{return t+""}catch{}}return""}function Bg(t,e){return t===e||t!==t&&e!==e}var Qb=DO((function(){return arguments})())?DO:function(t){return aA(t)&&Cs.call(t,"callee")&&!xse.call(t,"callee")},Tb=Array.isArray;function Rb(t){return t!=null&&GO(t.length)&&!Nb(t)}function Nae(t){return aA(t)&&Rb(t)}var HO=Mse||Pae;function Nb(t){if(!hc(t))return!1;var e=wg(t);return e==OO||e==tse||e==Zoe||e==ose}function GO(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=RO}function hc(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function aA(t){return t!=null&&typeof t=="object"}function Oae(t){if(!aA(t)||wg(t)!=xO)return!1;var e=$O(t);if(e===null)return!0;var r=Cs.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&bg.call(r)==Nse}var YO=SO?Qse(SO):uae;function xae(t){return Eae(t,VO(t))}function VO(t){return Rb(t)?sae(t,!0):dae(t)}var Uae=Iae(function(t,e,r){jO(t,e,r)});function Mae(t){return function(){return t}}function WO(t){return t}function Pae(){return!1}zl.exports=Uae});var ux=y((q1e,lx)=>{"use strict";var ex=200,Ub="__lodash_hash_undefined__",Lae=1/0,$ae=9007199254740991,Fae="[object Function]",jae="[object GeneratorFunction]",zae=/[\\^$.*+?()[\]{}|]/g,qae=/^\[object .+?Constructor\]$/,Hae=typeof global=="object"&&global&&global.Object===Object&&global,Gae=typeof self=="object"&&self&&self.Object===Object&&self,Mb=Hae||Gae||Function("return this")();function Yae(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Vae(t,e){for(var r=-1,n=t?t.length:0,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}function tx(t,e){var r=t?t.length:0;return!!r&&Kae(t,e,0)>-1}function rx(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function Wae(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function Jae(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function Zae(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Kae(t,e,r){if(e!==e)return Zae(t,Xae,r);for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function Xae(t){return t!==t}function ece(t){return function(e){return t(e)}}function nx(t,e){return t.has(e)}function tce(t,e){return t?.[e]}function rce(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function ix(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var nce=Array.prototype,ice=Function.prototype,ox=Object.prototype,Ob=Mb["__core-js_shared__"],ZO=(function(){var t=/[^.]+$/.exec(Ob&&Ob.keys&&Ob.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),sx=ice.toString,Pb=ox.hasOwnProperty,oce=ox.toString,sce=RegExp("^"+sx.call(Pb).replace(zae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ace=nce.splice,KO=Math.max,cce=Lb(Mb,"Map"),xb=Lb(Mb,"Set"),cA=Lb(Object,"create");function fc(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function lce(){this.__data__=cA?cA(null):{}}function uce(t){return this.has(t)&&delete this.__data__[t]}function dce(t){var e=this.__data__;if(cA){var r=e[t];return r===Ub?void 0:r}return Pb.call(e,t)?e[t]:void 0}function Ace(t){var e=this.__data__;return cA?e[t]!==void 0:Pb.call(e,t)}function pce(t,e){var r=this.__data__;return r[t]=cA&&e===void 0?Ub:e,this}fc.prototype.clear=lce;fc.prototype.delete=uce;fc.prototype.get=dce;fc.prototype.has=Ace;fc.prototype.set=pce;function Gl(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function hce(){this.__data__=[]}function fce(t){var e=this.__data__,r=vg(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():ace.call(e,r,1),!0}function gce(t){var e=this.__data__,r=vg(e,t);return r<0?void 0:e[r][1]}function mce(t){return vg(this.__data__,t)>-1}function yce(t,e){var r=this.__data__,n=vg(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}Gl.prototype.clear=hce;Gl.prototype.delete=fce;Gl.prototype.get=gce;Gl.prototype.has=mce;Gl.prototype.set=yce;function Yl(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ece(){this.__data__={hash:new fc,map:new(cce||Gl),string:new fc}}function Ice(t){return Qg(this,t).delete(t)}function Cce(t){return Qg(this,t).get(t)}function bce(t){return Qg(this,t).has(t)}function Sce(t,e){return Qg(this,t).set(t,e),this}Yl.prototype.clear=Ece;Yl.prototype.delete=Ice;Yl.prototype.get=Cce;Yl.prototype.has=bce;Yl.prototype.set=Sce;function lA(t){var e=-1,r=t?t.length:0;for(this.__data__=new Yl;++e<r;)this.add(t[e])}function wce(t){return this.__data__.set(t,Ub),this}function _ce(t){return this.__data__.has(t)}lA.prototype.add=lA.prototype.push=wce;lA.prototype.has=_ce;function vg(t,e){for(var r=t.length;r--;)if(xce(t[r][0],e))return r;return-1}function XO(t,e,r,n){var i=-1,o=tx,s=!0,a=t.length,c=[],l=e.length;if(!a)return c;r&&(e=Wae(e,ece(r))),n?(o=rx,s=!1):e.length>=ex&&(o=nx,s=!1,e=new lA(e));e:for(;++i<a;){var u=t[i],d=r?r(u):u;if(u=n||u!==0?u:0,s&&d===d){for(var A=l;A--;)if(e[A]===d)continue e;c.push(u)}else o(e,d,n)||c.push(u)}return c}function Bce(t){if(!cx(t)||Rce(t))return!1;var e=ax(t)||rce(t)?sce:qae;return e.test(Nce(t))}function vce(t,e){return e=KO(e===void 0?t.length-1:e,0),function(){for(var r=arguments,n=-1,i=KO(r.length-e,0),o=Array(i);++n<i;)o[n]=r[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=r[n];return s[e]=o,Yae(t,this,s)}}function Qce(t,e,r){var n=-1,i=tx,o=t.length,s=!0,a=[],c=a;if(r)s=!1,i=rx;else if(o>=ex){var l=e?null:Dce(t);if(l)return ix(l);s=!1,i=nx,c=new lA}else c=e?[]:a;e:for(;++n<o;){var u=t[n],d=e?e(u):u;if(u=r||u!==0?u:0,s&&d===d){for(var A=c.length;A--;)if(c[A]===d)continue e;e&&c.push(d),a.push(u)}else i(c,d,r)||(c!==a&&c.push(d),a.push(u))}return a}function Tce(t,e,r){for(var n=-1,i=t.length;++n<i;)var o=o?Jae(XO(o,t[n],e,r),XO(t[n],o,e,r)):t[n];return o&&o.length?Qce(o,e,r):[]}var Dce=xb&&1/ix(new xb([,-0]))[1]==Lae?function(t){return new xb(t)}:$ce;function Qg(t,e){var r=t.__data__;return kce(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Lb(t,e){var r=tce(t,e);return Bce(r)?r:void 0}function kce(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Rce(t){return!!ZO&&ZO in t}function Nce(t){if(t!=null){try{return sx.call(t)}catch{}try{return t+""}catch{}}return""}var Oce=vce(function(t){return Tce(Vae(t,Mce))});function xce(t,e){return t===e||t!==t&&e!==e}function Uce(t){return t!=null&&Pce(t.length)&&!ax(t)}function Mce(t){return Lce(t)&&Uce(t)}function ax(t){var e=cx(t)?oce.call(t):"";return e==Fae||e==jae}function Pce(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=$ae}function cx(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Lce(t){return!!t&&typeof t=="object"}function $ce(){}lx.exports=Oce});var Dg=y(Ss=>{"use strict";var zb=Ss&&Ss.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ss,"__esModule",{value:!0});Ss.toJsonSchema=Gce;Ss.convertRequiredToArray=uA;Ss.generateDefaultFromSchema=dA;Ss.parseJsonSafe=Tg;Ss.normalizeToolSchemas=Yce;var $b=zb(CO()),Fb=zb(JO()),Fce=zb(ux());function Vl(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;let i=e;return r.every(o=>o in i&&Vl(t[o],i[o]))}var jce={required:!1,requiredDepth:Number.POSITIVE_INFINITY,postProcessFnc:null,strings:{preProcessFnc:null},arrays:{mode:"all"},objects:{preProcessFnc:null,postProcessFnc:null,additionalProperties:!0}},zce={string:function(e){return typeof e=="string"},number:function(e){return typeof e=="number"&&isFinite(e)},integer:function(e){return typeof e=="number"&&e%1===0},boolean:function(e){return typeof e=="boolean"},array:function(e){return e instanceof Array},null:function(e){return e===null},date:function(e){return e instanceof Date},any:function(e){return!0},object:function(e){return e&&typeof e=="object"&&!(e instanceof Array)&&!(e instanceof Date)}},Wl={typeNames:["integer","number","string","array","object","boolean","null","date"],getType(t){return Wl.typeNames.find(e=>zce[e](t))},mergeSchemaObjs(t,e){if(!t||!e)return null;let r=(0,$b.default)(t),n=(0,$b.default)(e);if(!Vl(r,n)){if(t.type==="array"&&e.type==="array"&&Vl((0,Fce.default)(r,n),["items"])){let o=r.length>n.length?e:t,s=r.length>n.length?t:e;if((0,$b.default)(o).reduce((c,l)=>Vl(o[l],s[l])&&c,!0))return o}if(t.type!=="object"||e.type!=="object")return null}let i={};for(let o=0,{length:s}=r;o<s;o++){let a=r[o];if(Wl.getType(t[a])==="object"){let c=Wl.mergeSchemaObjs(t[a],e[a]);if(c)i[a]=c;else{if(t.type==="object"||e.type==="object")return{type:"object"};if(a!=="items"||t.type!=="array"||e.type!=="array")return null}}else if(a==="type")if(t[a]!==e[a])if(t[a]==="integer"&&e[a]==="number"||t[a]==="number"&&e[a]==="integer")i[a]="number";else return null;else i[a]=t[a];else{if(!Vl(t[a],e[a]))return null;i[a]=t[a]}}return i}};function qce(t){let e;for(let r=0,{length:n}=t;r<n;r++){let i=t[r];if(r>0&&(i==="integer"&&e==="number"?i="number":i==="number"&&e==="integer"&&(e="number"),e!==i))return null;e=i}return e}function Hce(t){return qce(t.map(e=>Wl.getType(e)))}var jb=class{constructor(e){this.options=(0,Fb.default)({},jce,e),this.depth=0,this.getObjectSchemaDefault=this.getObjectSchemaDefault.bind(this),this.getStringSchemaDefault=this.getStringSchemaDefault.bind(this),this.objectPostProcessDefault=this.objectPostProcessDefault.bind(this),this.commmonPostProcessDefault=this.commmonPostProcessDefault.bind(this),this.objectPostProcessDefault=this.objectPostProcessDefault.bind(this)}getCommonArrayItemSchema(e){let r=e.map(n=>{this.depth++;let i=this.getSchema(n);return this.depth--,i});return r.reduce((n,i)=>Wl.mergeSchemaObjs(n,i),r.pop())}getObjectSchemaDefault(e){let r={type:"object"},n=Object.keys(e);return n.length>0&&(r.properties=n.reduce((i,o)=>(this.depth++,i[o]=this.getSchema(e[o]),this.depth--,i),{})),r}getObjectSchema(e){return this.options.objects.preProcessFnc?this.options.objects.preProcessFnc(e,this.getObjectSchemaDefault):this.getObjectSchemaDefault(e)}getArraySchemaMerging(e){let r={type:"array"},n=Hce(e);if(n)if(r.items={type:n},n!=="integer"&&n!=="number"){let i=this.getCommonArrayItemSchema(e);i&&(r.items=i)}else this.options.required&&(r.items.required=!0);return r}getArraySchemaNoMerging(e){let r={type:"array"};return e.length>0&&(this.depth++,r.items=this.getSchema(e[0]),this.depth--),r}getArraySchemaTuple(e){let r={type:"array"};return e.length>0&&(r.items=e.map(n=>{this.depth++;let i=this.getSchema(n);return this.depth--,i})),r}getArraySchemaUniform(e){let r=this.getArraySchemaNoMerging(e);if(e.length>1)for(let n=1;n<e.length;n++){this.depth++;let i=this.getSchema(e[n]);if(this.depth--,!Vl(r.items,i))throw new Error("Invalid schema, incompatible array items")}return r}getArraySchema(e){if(e.length===0)return{type:"array"};switch(this.options.arrays.mode){case"all":return this.getArraySchemaMerging(e);case"first":return this.getArraySchemaNoMerging(e);case"uniform":return this.getArraySchemaUniform(e);case"tuple":return this.getArraySchemaTuple(e);default:throw new Error(`Unknown array mode option '${this.options.arrays.mode}'`)}}getStringSchemaDefault(e){return{type:"string"}}getStringSchema(e){return this.options.strings.preProcessFnc?this.options.strings.preProcessFnc(e,this.getStringSchemaDefault):this.getStringSchemaDefault(e)}commmonPostProcessDefault(e,r,n){return this.options.required&&this.depth<=this.options.requiredDepth?(0,Fb.default)({},r,{required:!0}):r}objectPostProcessDefault(e,r){return this.options.objects.additionalProperties===!1&&Object.getOwnPropertyNames(r).length>0?(0,Fb.default)({},e,{additionalProperties:!1}):e}getSchema(e){let r=Wl.getType(e);r||(r="null");let n;switch(r){case"object":n=this.getObjectSchema(e);break;case"array":n=this.getArraySchema(e);break;case"string":n=this.getStringSchema(e);break;default:n={type:r}}return this.options.postProcessFnc?n=this.options.postProcessFnc(r,n,e,this.commmonPostProcessDefault):n=this.commmonPostProcessDefault(r,n,e),r==="object"&&(this.options.objects.postProcessFnc?n=this.options.objects.postProcessFnc(n,e,this.objectPostProcessDefault):n=this.objectPostProcessDefault(n,e)),n}};function Gce(t,e){return new jb(e).getSchema(t)}function uA(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(r=>uA(r));let e={...t};if(delete e.required,e.properties&&typeof e.properties=="object"){let r=[],n={};for(let[i,o]of Object.entries(e.properties)){let s=o;if(s&&typeof s=="object"&&s.required===!0){r.push(i);let{required:a,...c}=s;n[i]=uA(c)}else n[i]=uA(s)}e.properties=n,r.length>0&&(e.required=r)}return e.items&&(e.items=uA(e.items)),e}function dA(t){if(!t||typeof t!="object")return null;if(t.const!==void 0)return t.const;if(t.enum&&Array.isArray(t.enum)&&t.enum.length>0)return t.enum[0];if(t.default!==void 0)return t.default;if(t.oneOf&&Array.isArray(t.oneOf)&&t.oneOf.length>0)return dA(t.oneOf[0]);if(t.anyOf&&Array.isArray(t.anyOf)&&t.anyOf.length>0)return dA(t.anyOf[0]);switch(Array.isArray(t.type)?t.type[0]:t.type){case"string":case"number":case"integer":case"boolean":return null;case"null":return null;case"array":return t.items?[]:[];case"object":let r={};if(t.properties&&typeof t.properties=="object"){let n=t.required||[];for(let[i,o]of Object.entries(t.properties))r[i]=dA(o)}return r;default:if(t.properties&&typeof t.properties=="object"){let n={};for(let[i,o]of Object.entries(t.properties))n[i]=dA(o);return n}return null}}function Tg(t){if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}}function Yce(t){let e={...t};return e.inputSchema&&(e.inputSchema=Tg(e.inputSchema)),e.outputSchema&&(e.outputSchema=Tg(e.outputSchema)),e.responseSchema&&(e.responseSchema=Tg(e.responseSchema)),e}});var Vce,Ax,dx,Wce,Jce,Zce,Kce,px=ft(()=>{"use strict";Vce=t=>{let e=dx(t,0);if(e===void 0||!Jce(t[e]))return;let r=dx(t,e+1);if(r!==void 0)return Zce(t,e,r)},Ax=Vce,dx=(t,e)=>{for(let r=e;r<t.length;r+=1){let n=t[r];if(!Wce(n))return r}},Wce=t=>t===" "||t===" "||t===`
99
99
  `||t==="\r",Jce=t=>t==="{"||t==="[",Zce=(t,e,r)=>{let n;for(let i=r-1;i>e;i-=1){let o=t[i];if(o==="\r")return;if(o===`
100
100
  `)return Kce(n);if(n===void 0)n=o;else if(n[0]===o)n+=o;else return}},Kce=t=>t===void 0?0:t[0]===" "?t.length:t});var hx,qb,Xce,ele,fx=ft(()=>{"use strict";hx=(t,e)=>{let r=qb(t,"toPrecision",e,e);return r===void 0?qb(t,"toExponential",e,e):r},qb=(t,e,r,n)=>{let o=t[e](n).replace(Xce,"$1").replace(ele,"$1");return o.length<=r?o:n===1?void 0:qb(t,e,r,n-1)},Xce=/(e)\+/iu,ele=/\.?0*($|e)/iu});var mx,tle,rle,gx,yx=ft(()=>{"use strict";mx=(t,e)=>{if(typeof t!="string")throw new TypeError(`Input must be a JSON string: ${t}`);tle(e)},tle=t=>{if(rle(t),t<0)throw new TypeError(`"maxSize" argument must be positive: ${t}`);if(t<gx)throw new TypeError(`"maxSize" argument must be at least ${gx}: ${t}`)},rle=t=>{if(t===void 0)throw new TypeError('"maxSize" argument must be defined');if(!Number.isInteger(t))throw new TypeError(`"maxSize" argument must be an integer: ${t}`)},gx=7});var kg,Ex,Rg,nle,ile,ole,sle,Ix,ale,cle,lle,ule,dle,Ale,Hb=ft(()=>{"use strict";kg=(t,e,r)=>{let n=Ix(e,r);return Ex(t,e,n)},Ex=(t,e,r)=>{if(r>=e)return r;let n=t[r];return n>=dle&&n<=Ale?Ex(t,e,r+1):r},Rg=(t,e,r)=>{if(r===void 0)return r;let n=Ix(e,r);return nle(t,n)},nle=(t,e)=>ile(t,e)?e-3:ole(t,e)?e-2:sle(t,e)?e-1:e,ile=(t,e)=>e>=3&&t[e-3]>=ale&&t[e-3]<=cle,ole=(t,e)=>e>=2&&t[e-2]>=lle,sle=(t,e)=>e>=1&&t[e-1]>=ule,Ix=(t,e)=>e<0||Object.is(e,-0)?Math.max(t+e,0):e,ale=240,cle=244,lle=224,ule=194,dle=128,Ale=191});var Cx,bx=ft(()=>{"use strict";Hb();Cx=(t,e,r)=>{let n=globalThis.Buffer.from(t),i=kg(n,n.length,e),o=Rg(n,n.length,r);return i===0&&o>=n.length?n.toString():n.toString("utf8",i,o)}});var Sx,wx=ft(()=>{"use strict";Sx=/[\uD800-\uDFFF]/gu});var Ng,hle,Vb=ft(()=>{"use strict";wx();Ng=t=>hle(t)?t.replace(Sx,"\uFFFD"):t,hle=t=>{for(let e=0;e<t.length;e+=1){let r=t.codePointAt(e);if(r>=55296&&r<=57343)return!0}return!1}});var Wb,_x=ft(()=>{"use strict";Wb=({input:t,targetByteCount:e,firstStartSurrogate:r,lastStartSurrogate:n,firstEndSurrogate:i,lastEndSurrogate:o,increment:s,canBacktrack:a,shift:c,charIndexInit:l})=>{let u=l,d=u,A=0;for(;A<e;u+=s){d=u;let h=t.charCodeAt(u);if(Number.isNaN(h))break;if(h<=127){A+=1;continue}if(h<=2047){A+=2;continue}if(A+=3,h<r||h>n)continue;let f=t.charCodeAt(u+s);Number.isNaN(f)||f<i||f>o||(A+=1,u+=s)}return(a&&A>e?d:u)+c}});var Jb,Ele,Ile,Bx=ft(()=>{"use strict";_x();Jb=(t,e,r)=>e<0||Object.is(e,-0)?Ile(t,e,r):Ele(t,e,r),Ele=(t,e,r)=>Wb({input:t,targetByteCount:e,firstStartSurrogate:55296,lastStartSurrogate:56319,firstEndSurrogate:56320,lastEndSurrogate:57343,increment:1,canBacktrack:r,shift:0,charIndexInit:0}),Ile=(t,e,r)=>Wb({input:t,targetByteCount:-e,firstStartSurrogate:56320,lastStartSurrogate:57343,firstEndSurrogate:55296,lastEndSurrogate:56319,increment:-1,canBacktrack:!r,shift:1,charIndexInit:t.length-1})});var Og,Cle,vx=ft(()=>{"use strict";Vb();Bx();Og=(t,e,r)=>{let n=Jb(t,e,!1),i=Cle(t,r),o=n===0&&i===void 0?t:t.slice(n,i);return Ng(o)},Cle=(t,e)=>{if(e===void 0)return e;let r=Jb(t,e,!0);return r===t.length?void 0:r}});var Tx,ble,Zb,Qx,Sle,wle,xg,Dx=ft(()=>{"use strict";Hb();Tx=(t,e,r)=>{let{textEncoder:n,textDecoder:i}=ble(),o=Sle(t),{written:s}=n.encodeInto(t,o),a=kg(o,s,e),c=Rg(o,s,r),l=c===void 0?s:Math.min(c,s),u=o.subarray(a,l);return i.decode(u)},ble=()=>(Zb===void 0&&(Zb=new globalThis.TextEncoder,Qx=new globalThis.TextDecoder("utf8",{fatal:!1})),{textEncoder:Zb,textDecoder:Qx}),Sle=t=>{let e=t.length*3;return e>wle?new Uint8Array(e):((xg===void 0||xg.length<e)&&(xg=new Uint8Array(e)),xg)},wle=1e5});var kx,Kb,Rx,Nx=ft(()=>{"use strict";kx=(t,e)=>{if(e===void 0)return e;let r=Kb(t,e);return r>=t.length*Rx?void 0:r},Kb=(t,e)=>e<=t.length*-Rx?0:e,Rx=4});var Ox,_le,Ble,xx,Ux=ft(()=>{"use strict";Ox=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`First argument must be a string: ${t}`);_le(e),Ble(r)},_le=t=>{if(t===void 0)throw new TypeError("Second argument is required.");xx("Second",t)},Ble=t=>{t!==void 0&&xx("Third",t)},xx=(t,e)=>{if(!Number.isInteger(e))throw new TypeError(`${t} argument must be an integer: ${e}`)}});var Mx,vle,Xb,Px=ft(()=>{"use strict";Mx=t=>{let e=!0,r=0;for(let n=0;n<Xb;n+=1){let i=vle(t,n);i<=127||(e&&(e=!1),i>2047&&(r+=1))}return{asciiOnly:e,longCharsPercentage:r/Xb}},vle=(t,e)=>{let r=Xb-1,n=1-(r-e)/r,i=Math.round(n*(t.length-1));return t.charCodeAt(i)},Xb=50});var Qle,Lx,Tle,Dle,kle,Rle,$x,Fx=ft(()=>{"use strict";bx();vx();Dx();Nx();Vb();Ux();Px();Qle=(t,e,r)=>{if(Ox(t,e,r),t==="")return t;let n=Kb(t,e),i=kx(t,r);return i===void 0&&Object.is(n,0)?Ng(t):Tle(t,n,i)},Lx=Qle,Tle=(t,e,r)=>{if(t.length<=Dle)return Og(t,e,r);let{asciiOnly:n,longCharsPercentage:i}=Mx(t);return n?Rle(t,e,r):i>=kle?Og(t,e,r):$x(t,e,r)},Dle=200,kle=.4,Rle=(t,e,r)=>"Buffer"in globalThis&&"from"in globalThis.Buffer?Cx(t,e,r):$x(t,e,r),$x=(t,e,r)=>"TextEncoder"in globalThis?Tx(t,e,r):Og(t,e,r)});var zx,Nle,Ole,xle,Ule,AA,jx,qx=ft(()=>{"use strict";Fx();zx=(t,e)=>{let r=JSON.stringify(t),n=xle(r),i=Lx(n,0,e-jx.length-AA.length*2),s=`${Nle(i)}${jx}`;return Ule(s)},Nle=t=>t.replace(Ole,""),Ole=/(\\|\\u[0-9a-fA-F]{0,3})$/u,xle=t=>t.slice(AA.length,-AA.length),Ule=t=>`${AA}${t}${AA}`,AA='"',jx="..."});var Hx,Gx=ft(()=>{"use strict";Hx=t=>globalThis.Buffer.byteLength(t)});var eS,Mle,Ple,Lle,$le,Fle,jle,Yx=ft(()=>{"use strict";eS=t=>{let e=t.length,r=e;for(let n=0;n<e;n+=1){let i=t.charCodeAt(n);if(i<=Mle)continue;if(i<=Ple){r+=1;continue}if(r+=2,i<Lle||i>$le)continue;let o=t.charCodeAt(n+1);o<Fle||o>jle||(n+=1)}return r},Mle=127,Ple=2047,Lle=55296,$le=56319,Fle=56320,jle=57343});var Vx,zle,qle,Hle,Ug,Wx=ft(()=>{"use strict";Vx=()=>zle.bind(void 0,new TextEncoder),zle=(t,e)=>{let r=qle(e);return t.encodeInto(e,r).written},qle=t=>{let e=t.length*3;return e>Hle?new Uint8Array(e):((Ug===void 0||Ug.length<e)&&(Ug=new Uint8Array(e)),Ug)},Hle=1e5});var Yle,Vle,Jx,Zx=ft(()=>{"use strict";Gx();Yx();Wx();Yle=()=>"Buffer"in globalThis&&"byteLength"in globalThis.Buffer?Hx:"TextEncoder"in globalThis?Vle.bind(void 0,Vx()):eS,Vle=(t,e)=>e.length<100?eS(e):t(e),Jx=Yle()});var Kx,Wle,Jle,Zle,Kle,tS,Xx=ft(()=>{"use strict";Zx();Kx=t=>{if(t===null)return Wle;if(t===!0)return Jle;if(t===!1)return Zle;let e=typeof t;return e==="object"?Kle:e==="number"?JSON.stringify(t).length:tS(t)},Wle=4,Jle=4,Zle=5,Kle=2,tS=t=>Jx(JSON.stringify(t))});var Mg,tU,rU,nU,Xle,iU,eU,oU,eue,pA=ft(()=>{"use strict";Xx();Mg=({size:t,increment:e,maxSize:r,truncatedProps:n,path:i,value:o})=>{let s=t+e,a=s>r;return a?{size:t,stop:a,truncatedProps:[...n,{path:i,value:o}]}:{size:s,stop:a,truncatedProps:n}},tU=t=>Kx(t),rU=(t,e,r)=>{let n=iU({empty:t,indent:e,depth:r,keySpaceSize:0}),i=oU(t);return n+i},nU=({key:t,empty:e,indent:r,depth:n})=>{let i=iU({empty:e,indent:r,depth:n,keySpaceSize:1}),o=tS(t),s=oU(e);return i+o+Xle+s},Xle=1,iU=({empty:t,indent:e,depth:r,keySpaceSize:n})=>{if(e===void 0)return 0;let i=eU+e*(r+1),o=t?eU+e*r:0;return n+i+o},eU=1,oU=t=>t?0:eue,eue=1});var Pg,tue,rS=ft(()=>{"use strict";pA();Pg=({parent:t,truncatedProps:e,path:r,increment:n,maxSize:i,key:o,empty:s,size:a,truncateValue:c,indent:l,depth:u})=>{let d=t[o],A=[...r,o],{size:p,stop:h,truncatedProps:f}=Mg({size:a,increment:n,maxSize:i,truncatedProps:e,path:A,value:d});return h?{empty:s,size:p,truncatedProps:f}:tue({value:d,truncatedProps:e,path:A,maxSize:i,empty:s,size:a,newSize:p,truncateValue:c,indent:l,depth:u})},tue=({value:t,truncatedProps:e,path:r,maxSize:n,empty:i,size:o,newSize:s,truncateValue:a,indent:c,depth:l})=>{let{value:u,size:d,truncatedProps:A}=a({value:t,truncatedProps:e,path:r,size:s,maxSize:n,indent:c,depth:l+1});return u===void 0?{empty:i,size:o,truncatedProps:A}:{empty:!1,size:d,value:u,truncatedProps:A}}});var sU,aU=ft(()=>{"use strict";rS();pA();sU=({array:t,truncatedProps:e,path:r,size:n,maxSize:i,truncateValue:o,indent:s,depth:a})=>{let c=[],l={empty:!0,size:n,truncatedProps:e};for(let u=0;u<t.length;u+=1){let d=rU(l.empty,s,a);l=Pg({parent:t,truncatedProps:l.truncatedProps,path:r,increment:d,maxSize:i,key:u,empty:l.empty,size:l.size,truncateValue:o,indent:s,depth:a}),l.value!==void 0&&c.push(l.value)}return{value:c,size:l.size,truncatedProps:l.truncatedProps}}});var cU,lU=ft(()=>{"use strict";rS();pA();cU=({object:t,truncatedProps:e,path:r,size:n,maxSize:i,truncateValue:o,indent:s,depth:a})=>{let c={},l={empty:!0,size:n,truncatedProps:e};for(let u in t){let d=nU({key:u,empty:l.empty,indent:s,depth:a});l=Pg({parent:t,truncatedProps:l.truncatedProps,path:r,increment:d,maxSize:i,key:u,empty:l.empty,size:l.size,truncateValue:o,indent:s,depth:a}),l.value!==void 0&&(c[u]=l.value)}return{value:c,size:l.size,truncatedProps:l.truncatedProps}}});var Lg,rue,uU=ft(()=>{"use strict";aU();lU();pA();Lg=({value:t,truncatedProps:e,path:r,size:n,maxSize:i,indent:o,depth:s})=>{let a=tU(t),{size:c,stop:l,truncatedProps:u}=Mg({size:n,increment:a,maxSize:i,truncatedProps:e,path:r,value:t});return l?{value:void 0,size:c,truncatedProps:u}:rue({value:t,truncatedProps:u,path:r,size:c,maxSize:i,indent:o,depth:s})},rue=({value:t,truncatedProps:e,path:r,size:n,maxSize:i,indent:o,depth:s})=>typeof t!="object"||t===null?{value:t,size:n,truncatedProps:e}:Array.isArray(t)?sU({array:t,truncatedProps:e,path:r,size:n,maxSize:i,truncateValue:Lg,indent:o,depth:s}):cU({object:t,truncatedProps:e,path:r,size:n,maxSize:i,truncateValue:Lg,indent:o,depth:s})});var dU={};_D(dU,{default:()=>iue});var nue,iue,oue,sue,aue,AU=ft(()=>{"use strict";px();fx();yx();qx();uU();nue=(t,e)=>{mx(t,e);let r=oue(t),n=sue(t),{value:i,truncatedProps:o}=Lg({value:n,truncatedProps:[],path:[],size:0,maxSize:e,indent:r,depth:0});return{jsonString:aue({newValue:i,value:n,maxSize:e,indent:r}),truncatedProps:o}},iue=nue,oue=t=>{let e=Ax(t);return typeof e=="string"?e.length:e},sue=t=>{try{return JSON.parse(t)}catch(e){throw new TypeError(`Invalid JSON string: "${t}"
101
- ${e.message}`)}},aue=({newValue:t,value:e,maxSize:r,indent:n})=>t!==void 0?JSON.stringify(t,void 0,n):typeof e=="number"?hx(e,r):zx(e,r)});var hU=y(pU=>{"use strict";Object.defineProperty(pU,"__esModule",{value:!0})});var ca=y($g=>{"use strict";Object.defineProperty($g,"__esModule",{value:!0});$g.CronField=void 0;var nS=class t{#e=!1;#t=!1;#n=!1;#i=[];options={rawValue:""};static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(e,r={rawValue:""}){if(!Array.isArray(e))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(e.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...r,rawValue:r.rawValue??""},this.#i=e.sort(t.sorter),this.#n=this.options.wildcard!==void 0?this.options.wildcard:this.#o(),this.#e=this.options.rawValue.includes("L")||e.includes("L"),this.#t=this.options.rawValue.includes("?")||e.includes("?")}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return this.#e}get hasQuestionMarkChar(){return this.#t}get isWildcard(){return this.#n}get values(){return this.#i}static sorter(e,r){let n=typeof e=="number",i=typeof r=="number";return n&&i?e-r:!n&&!i?e.localeCompare(r):n?-1:1}static findNearestValueInList(e,r,n=!1){if(n){for(let i=e.length-1;i>=0;i--)if(e[i]<r)return e[i];return null}for(let i=0;i<e.length;i++)if(e[i]>r)return e[i];return null}findNearestValue(e,r=!1){return this.constructor.findNearestValueInList(this.values,e,r)}serialize(){return{wildcard:this.#n,values:this.#i}}validate(){let e,r=this.chars.length>0?` or chars ${this.chars.join("")}`:"",n=a=>c=>new RegExp(`^\\d{0,2}${c}$`).test(a),i=a=>(e=a,typeof a=="number"?a>=this.min&&a<=this.max:this.chars.some(n(a)));if(!this.#i.every(i))throw new Error(`${this.constructor.name} Validation error, got value ${e} expected range ${this.min}-${this.max}${r}`);let s=this.#i.find((a,c)=>this.#i.indexOf(a)!==c);if(s)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${s}`)}#o(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(e,r)=>r+this.min).every(e=>this.#i.includes(e))}};$g.CronField=nS});var fU=y(Fg=>{"use strict";Object.defineProperty(Fg,"__esModule",{value:!0});Fg.CronDayOfMonth=void 0;var cue=ca(),lue=1,uue=31,due=Object.freeze(["L"]),iS=class extends cue.CronField{static get min(){return lue}static get max(){return uue}static get chars(){return due}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};Fg.CronDayOfMonth=iS});var gU=y(jg=>{"use strict";Object.defineProperty(jg,"__esModule",{value:!0});jg.CronDayOfWeek=void 0;var Aue=ca(),pue=0,hue=7,fue=Object.freeze(["L"]),oS=class extends Aue.CronField{static get min(){return pue}static get max(){return hue}static get chars(){return fue}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};jg.CronDayOfWeek=oS});var mU=y(zg=>{"use strict";Object.defineProperty(zg,"__esModule",{value:!0});zg.CronHour=void 0;var gue=ca(),mue=0,yue=23,Eue=Object.freeze([]),sS=class extends gue.CronField{static get min(){return mue}static get max(){return yue}static get chars(){return Eue}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};zg.CronHour=sS});var yU=y(qg=>{"use strict";Object.defineProperty(qg,"__esModule",{value:!0});qg.CronMinute=void 0;var Iue=ca(),Cue=0,bue=59,Sue=Object.freeze([]),aS=class extends Iue.CronField{static get min(){return Cue}static get max(){return bue}static get chars(){return Sue}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};qg.CronMinute=aS});var VM=y(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});var _s=class extends Error{},mS=class extends _s{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},yS=class extends _s{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},ES=class extends _s{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},da=class extends _s{},Kg=class extends _s{constructor(e){super(`Invalid unit ${e}`)}},Ar=class extends _s{},$o=class extends _s{constructor(){super("Zone is an abstract class")}},te="numeric",Qi="short",En="long",Xg={year:te,month:te,day:te},WU={year:te,month:Qi,day:te},wue={year:te,month:Qi,day:te,weekday:Qi},JU={year:te,month:En,day:te},ZU={year:te,month:En,day:te,weekday:En},KU={hour:te,minute:te},XU={hour:te,minute:te,second:te},eM={hour:te,minute:te,second:te,timeZoneName:Qi},tM={hour:te,minute:te,second:te,timeZoneName:En},rM={hour:te,minute:te,hourCycle:"h23"},nM={hour:te,minute:te,second:te,hourCycle:"h23"},iM={hour:te,minute:te,second:te,hourCycle:"h23",timeZoneName:Qi},oM={hour:te,minute:te,second:te,hourCycle:"h23",timeZoneName:En},sM={year:te,month:te,day:te,hour:te,minute:te},aM={year:te,month:te,day:te,hour:te,minute:te,second:te},cM={year:te,month:Qi,day:te,hour:te,minute:te},lM={year:te,month:Qi,day:te,hour:te,minute:te,second:te},_ue={year:te,month:Qi,day:te,weekday:Qi,hour:te,minute:te},uM={year:te,month:En,day:te,hour:te,minute:te,timeZoneName:Qi},dM={year:te,month:En,day:te,hour:te,minute:te,second:te,timeZoneName:Qi},AM={year:te,month:En,day:te,weekday:En,hour:te,minute:te,timeZoneName:En},pM={year:te,month:En,day:te,weekday:En,hour:te,minute:te,second:te,timeZoneName:En},pa=class{get type(){throw new $o}get name(){throw new $o}get ianaName(){return this.name}get isUniversal(){throw new $o}offsetName(e,r){throw new $o}formatOffset(e,r){throw new $o}offset(e){throw new $o}equals(e){throw new $o}get isValid(){throw new $o}},cS=null,EA=class t extends pa{static get instance(){return cS===null&&(cS=new t),cS}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return wM(e,r,n)}formatOffset(e,r){return yA(this.offset(e),r)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},IS=new Map;function Bue(t){let e=IS.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),IS.set(t,e)),e}var vue={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Que(t,e){let r=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,i,o,s,a,c,l,u]=n;return[s,i,o,a,c,l,u]}function Tue(t,e){let r=t.formatToParts(e),n=[];for(let i=0;i<r.length;i++){let{type:o,value:s}=r[i],a=vue[o];o==="era"?n[a]=s:De(a)||(n[a]=parseInt(s,10))}return n}var lS=new Map,Bs=class t extends pa{static create(e){let r=lS.get(e);return r===void 0&&lS.set(e,r=new t(e)),r}static resetCache(){lS.clear(),IS.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=t.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return wM(e,r,n,this.name)}formatOffset(e,r){return yA(this.offset(e),r)}offset(e){if(!this.valid)return NaN;let r=new Date(e);if(isNaN(r))return NaN;let n=Bue(this.name),[i,o,s,a,c,l,u]=n.formatToParts?Tue(n,r):Que(n,r);a==="BC"&&(i=-Math.abs(i)+1);let A=sm({year:i,month:o,day:s,hour:c===24?0:c,minute:l,second:u,millisecond:0}),p=+r,h=p%1e3;return p-=h>=0?h:1e3+h,(A-p)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},EU={};function Due(t,e={}){let r=JSON.stringify([t,e]),n=EU[r];return n||(n=new Intl.ListFormat(t,e),EU[r]=n),n}var CS=new Map;function bS(t,e={}){let r=JSON.stringify([t,e]),n=CS.get(r);return n===void 0&&(n=new Intl.DateTimeFormat(t,e),CS.set(r,n)),n}var SS=new Map;function kue(t,e={}){let r=JSON.stringify([t,e]),n=SS.get(r);return n===void 0&&(n=new Intl.NumberFormat(t,e),SS.set(r,n)),n}var wS=new Map;function Rue(t,e={}){let{base:r,...n}=e,i=JSON.stringify([t,n]),o=wS.get(i);return o===void 0&&(o=new Intl.RelativeTimeFormat(t,e),wS.set(i,o)),o}var fA=null;function Nue(){return fA||(fA=new Intl.DateTimeFormat().resolvedOptions().locale,fA)}var _S=new Map;function hM(t){let e=_S.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),_S.set(t,e)),e}var BS=new Map;function Oue(t){let e=BS.get(t);if(!e){let r=new Intl.Locale(t);e="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,"minimalDays"in e||(e={...fM,...e}),BS.set(t,e)}return e}function xue(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let r=t.indexOf("-u-");if(r===-1)return[t];{let n,i;try{n=bS(t).resolvedOptions(),i=t}catch{let c=t.substring(0,r);n=bS(c).resolvedOptions(),i=c}let{numberingSystem:o,calendar:s}=n;return[i,o,s]}}function Uue(t,e,r){return(r||e)&&(t.includes("-u-")||(t+="-u"),r&&(t+=`-ca-${r}`),e&&(t+=`-nu-${e}`)),t}function Mue(t){let e=[];for(let r=1;r<=12;r++){let n=Bt.utc(2009,r,1);e.push(t(n))}return e}function Pue(t){let e=[];for(let r=1;r<=7;r++){let n=Bt.utc(2016,11,13+r);e.push(t(n))}return e}function Hg(t,e,r,n){let i=t.listingMode();return i==="error"?null:i==="en"?r(e):n(e)}function Lue(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||hM(t.locale).numberingSystem==="latn"}var vS=class{constructor(e,r,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:i,floor:o,...s}=n;if(!r||Object.keys(s).length>0){let a={useGrouping:!1,...n};n.padTo>0&&(a.minimumIntegerDigits=n.padTo),this.inf=kue(e,a)}}format(e){if(this.inf){let r=this.floor?Math.floor(e):e;return this.inf.format(r)}else{let r=this.floor?Math.floor(e):PS(e,3);return Kt(r,this.padTo)}}},QS=class{constructor(e,r,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let s=-1*(e.offset/60),a=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;e.offset!==0&&Bs.create(a).valid?(i=a,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let o={...this.opts};o.timeZone=o.timeZone||i,this.dtf=bS(r,o)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(r=>{if(r.type==="timeZoneName"){let n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:n}}else return r}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},TS=class{constructor(e,r,n){this.opts={style:"long",...n},!r&&bM()&&(this.rtf=Rue(e,n))}format(e,r){return this.rtf?this.rtf.format(e,r):sde(r,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,r){return this.rtf?this.rtf.formatToParts(e,r):[]}},fM={firstDay:1,minimalDays:4,weekend:[6,7]},mt=class t{static fromOpts(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,r,n,i,o=!1){let s=e||Et.defaultLocale,a=s||(o?"en-US":Nue()),c=r||Et.defaultNumberingSystem,l=n||Et.defaultOutputCalendar,u=kS(i)||Et.defaultWeekSettings;return new t(a,c,l,u,s)}static resetCache(){fA=null,CS.clear(),SS.clear(),wS.clear(),_S.clear(),BS.clear()}static fromObject({locale:e,numberingSystem:r,outputCalendar:n,weekSettings:i}={}){return t.create(e,r,n,i)}constructor(e,r,n,i,o){let[s,a,c]=xue(e);this.locale=s,this.numberingSystem=r||a||null,this.outputCalendar=n||c||null,this.weekSettings=i,this.intl=Uue(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Lue(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&r?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,kS(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,r=!1){return Hg(this,e,vM,()=>{let n=this.intl==="ja"||this.intl.startsWith("ja-");r&=!n;let i=r?{month:e,day:"numeric"}:{month:e},o=r?"format":"standalone";if(!this.monthsCache[o][e]){let s=n?a=>this.dtFormatter(a,i).format():a=>this.extract(a,i,"month");this.monthsCache[o][e]=Mue(s)}return this.monthsCache[o][e]})}weekdays(e,r=!1){return Hg(this,e,DM,()=>{let n=r?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=r?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=Pue(o=>this.extract(o,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return Hg(this,void 0,()=>kM,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Bt.utc(2016,11,13,9),Bt.utc(2016,11,13,19)].map(r=>this.extract(r,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Hg(this,e,RM,()=>{let r={era:e};return this.eraCache[e]||(this.eraCache[e]=[Bt.utc(-40,1,1),Bt.utc(2017,1,1)].map(n=>this.extract(n,r,"era"))),this.eraCache[e]})}extract(e,r,n){let i=this.dtFormatter(e,r),o=i.formatToParts(),s=o.find(a=>a.type.toLowerCase()===n);return s?s.value:null}numberFormatter(e={}){return new vS(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,r={}){return new QS(e,this.intl,r)}relFormatter(e={}){return new TS(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Due(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||hM(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:SM()?Oue(this.locale):fM}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},uS=null,In=class t extends pa{static get utcInstance(){return uS===null&&(uS=new t(0)),uS}static instance(e){return e===0?t.utcInstance:new t(e)}static parseSpecifier(e){if(e){let r=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new t(am(r[1],r[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${yA(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${yA(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,r){return yA(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},em=class extends pa{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function ua(t,e){if(De(t)||t===null)return e;if(t instanceof pa)return t;if(Hue(t)){let r=t.toLowerCase();return r==="default"?e:r==="local"||r==="system"?EA.instance:r==="utc"||r==="gmt"?In.utcInstance:In.parseSpecifier(r)||Bs.create(t)}else return Aa(t)?In.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new em(t)}var OS={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},IU={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},$ue=OS.hanidec.replace(/[\[|\]]/g,"").split("");function Fue(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let r=0;r<t.length;r++){let n=t.charCodeAt(r);if(t[r].search(OS.hanidec)!==-1)e+=$ue.indexOf(t[r]);else for(let i in IU){let[o,s]=IU[i];n>=o&&n<=s&&(e+=n-o)}}return parseInt(e,10)}else return e}var DS=new Map;function jue(){DS.clear()}function Bi({numberingSystem:t},e=""){let r=t||"latn",n=DS.get(r);n===void 0&&(n=new Map,DS.set(r,n));let i=n.get(e);return i===void 0&&(i=new RegExp(`${OS[r]}${e}`),n.set(e,i)),i}var CU=()=>Date.now(),bU="system",SU=null,wU=null,_U=null,BU=60,vU,QU=null,Et=class{static get now(){return CU}static set now(e){CU=e}static set defaultZone(e){bU=e}static get defaultZone(){return ua(bU,EA.instance)}static get defaultLocale(){return SU}static set defaultLocale(e){SU=e}static get defaultNumberingSystem(){return wU}static set defaultNumberingSystem(e){wU=e}static get defaultOutputCalendar(){return _U}static set defaultOutputCalendar(e){_U=e}static get defaultWeekSettings(){return QU}static set defaultWeekSettings(e){QU=kS(e)}static get twoDigitCutoffYear(){return BU}static set twoDigitCutoffYear(e){BU=e%100}static get throwOnInvalid(){return vU}static set throwOnInvalid(e){vU=e}static resetCaches(){mt.resetCache(),Bs.resetCache(),Bt.resetCache(),jue()}},yn=class{constructor(e,r){this.reason=e,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},gM=[0,31,59,90,120,151,181,212,243,273,304,334],mM=[0,31,60,91,121,152,182,213,244,274,305,335];function Kn(t,e){return new yn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function xS(t,e,r){let n=new Date(Date.UTC(t,e-1,r));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let i=n.getUTCDay();return i===0?7:i}function yM(t,e,r){return r+(CA(t)?mM:gM)[e-1]}function EM(t,e){let r=CA(t)?mM:gM,n=r.findIndex(o=>o<e),i=e-r[n];return{month:n+1,day:i}}function US(t,e){return(t-e+7)%7+1}function tm(t,e=4,r=1){let{year:n,month:i,day:o}=t,s=yM(n,i,o),a=US(xS(n,i,o),r),c=Math.floor((s-a+14-e)/7),l;return c<1?(l=n-1,c=IA(l,e,r)):c>IA(n,e,r)?(l=n+1,c=1):l=n,{weekYear:l,weekNumber:c,weekday:a,...cm(t)}}function TU(t,e=4,r=1){let{weekYear:n,weekNumber:i,weekday:o}=t,s=US(xS(n,1,e),r),a=Xl(n),c=i*7+o-s-7+e,l;c<1?(l=n-1,c+=Xl(l)):c>a?(l=n+1,c-=Xl(n)):l=n;let{month:u,day:d}=EM(l,c);return{year:l,month:u,day:d,...cm(t)}}function dS(t){let{year:e,month:r,day:n}=t,i=yM(e,r,n);return{year:e,ordinal:i,...cm(t)}}function DU(t){let{year:e,ordinal:r}=t,{month:n,day:i}=EM(e,r);return{year:e,month:n,day:i,...cm(t)}}function kU(t,e){if(!De(t.localWeekday)||!De(t.localWeekNumber)||!De(t.localWeekYear)){if(!De(t.weekday)||!De(t.weekNumber)||!De(t.weekYear))throw new da("Cannot mix locale-based week fields with ISO-based week fields");return De(t.localWeekday)||(t.weekday=t.localWeekday),De(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),De(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function zue(t,e=4,r=1){let n=om(t.weekYear),i=Xn(t.weekNumber,1,IA(t.weekYear,e,r)),o=Xn(t.weekday,1,7);return n?i?o?!1:Kn("weekday",t.weekday):Kn("week",t.weekNumber):Kn("weekYear",t.weekYear)}function que(t){let e=om(t.year),r=Xn(t.ordinal,1,Xl(t.year));return e?r?!1:Kn("ordinal",t.ordinal):Kn("year",t.year)}function IM(t){let e=om(t.year),r=Xn(t.month,1,12),n=Xn(t.day,1,rm(t.year,t.month));return e?r?n?!1:Kn("day",t.day):Kn("month",t.month):Kn("year",t.year)}function CM(t){let{hour:e,minute:r,second:n,millisecond:i}=t,o=Xn(e,0,23)||e===24&&r===0&&n===0&&i===0,s=Xn(r,0,59),a=Xn(n,0,59),c=Xn(i,0,999);return o?s?a?c?!1:Kn("millisecond",i):Kn("second",n):Kn("minute",r):Kn("hour",e)}function De(t){return typeof t>"u"}function Aa(t){return typeof t=="number"}function om(t){return typeof t=="number"&&t%1===0}function Hue(t){return typeof t=="string"}function Gue(t){return Object.prototype.toString.call(t)==="[object Date]"}function bM(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function SM(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Yue(t){return Array.isArray(t)?t:[t]}function RU(t,e,r){if(t.length!==0)return t.reduce((n,i)=>{let o=[e(i),i];return n&&r(n[0],o[0])===n[0]?n:o},null)[1]}function Vue(t,e){return e.reduce((r,n)=>(r[n]=t[n],r),{})}function tu(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function kS(t){if(t==null)return null;if(typeof t!="object")throw new Ar("Week settings must be an object");if(!Xn(t.firstDay,1,7)||!Xn(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!Xn(e,1,7)))throw new Ar("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Xn(t,e,r){return om(t)&&t>=e&&t<=r}function Wue(t,e){return t-e*Math.floor(t/e)}function Kt(t,e=2){let r=t<0,n;return r?n="-"+(""+-t).padStart(e,"0"):n=(""+t).padStart(e,"0"),n}function la(t){if(!(De(t)||t===null||t===""))return parseInt(t,10)}function gc(t){if(!(De(t)||t===null||t===""))return parseFloat(t)}function MS(t){if(!(De(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function PS(t,e,r="round"){let n=10**e;switch(r){case"expand":return t>0?Math.ceil(t*n)/n:Math.floor(t*n)/n;case"trunc":return Math.trunc(t*n)/n;case"round":return Math.round(t*n)/n;case"floor":return Math.floor(t*n)/n;case"ceil":return Math.ceil(t*n)/n;default:throw new RangeError(`Value rounding ${r} is out of range`)}}function CA(t){return t%4===0&&(t%100!==0||t%400===0)}function Xl(t){return CA(t)?366:365}function rm(t,e){let r=Wue(e-1,12)+1,n=t+(e-r)/12;return r===2?CA(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function sm(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function NU(t,e,r){return-US(xS(t,1,e),r)+e-1}function IA(t,e=4,r=1){let n=NU(t,e,r),i=NU(t+1,e,r);return(Xl(t)-n+i)/7}function RS(t){return t>99?t:t>Et.twoDigitCutoffYear?1900+t:2e3+t}function wM(t,e,r,n=null){let i=new Date(t),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(o.timeZone=n);let s={timeZoneName:e,...o},a=new Intl.DateTimeFormat(r,s).formatToParts(i).find(c=>c.type.toLowerCase()==="timezonename");return a?a.value:null}function am(t,e){let r=parseInt(t,10);Number.isNaN(r)&&(r=0);let n=parseInt(e,10)||0,i=r<0||Object.is(r,-0)?-n:n;return r*60+i}function _M(t){let e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new Ar(`Invalid unit value ${t}`);return e}function nm(t,e){let r={};for(let n in t)if(tu(t,n)){let i=t[n];if(i==null)continue;r[e(n)]=_M(i)}return r}function yA(t,e){let r=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${Kt(r,2)}:${Kt(n,2)}`;case"narrow":return`${i}${r}${n>0?`:${n}`:""}`;case"techie":return`${i}${Kt(r,2)}${Kt(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function cm(t){return Vue(t,["hour","minute","second","millisecond"])}var Jue=["January","February","March","April","May","June","July","August","September","October","November","December"],BM=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Zue=["J","F","M","A","M","J","J","A","S","O","N","D"];function vM(t){switch(t){case"narrow":return[...Zue];case"short":return[...BM];case"long":return[...Jue];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var QM=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],TM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Kue=["M","T","W","T","F","S","S"];function DM(t){switch(t){case"narrow":return[...Kue];case"short":return[...TM];case"long":return[...QM];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var kM=["AM","PM"],Xue=["Before Christ","Anno Domini"],ede=["BC","AD"],tde=["B","A"];function RM(t){switch(t){case"narrow":return[...tde];case"short":return[...ede];case"long":return[...Xue];default:return null}}function rde(t){return kM[t.hour<12?0:1]}function nde(t,e){return DM(e)[t.weekday-1]}function ide(t,e){return vM(e)[t.month-1]}function ode(t,e){return RM(e)[t.year<0?0:1]}function sde(t,e,r="always",n=!1){let i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(t)===-1;if(r==="auto"&&o){let d=t==="days";switch(e){case 1:return d?"tomorrow":`next ${i[t][0]}`;case-1:return d?"yesterday":`last ${i[t][0]}`;case 0:return d?"today":`this ${i[t][0]}`}}let s=Object.is(e,-0)||e<0,a=Math.abs(e),c=a===1,l=i[t],u=n?c?l[1]:l[2]||l[1]:c?i[t][0]:t;return s?`${a} ${u} ago`:`in ${a} ${u}`}function OU(t,e){let r="";for(let n of t)n.literal?r+=n.val:r+=e(n.val);return r}var ade={D:Xg,DD:WU,DDD:JU,DDDD:ZU,t:KU,tt:XU,ttt:eM,tttt:tM,T:rM,TT:nM,TTT:iM,TTTT:oM,f:sM,ff:cM,fff:uM,ffff:AM,F:aM,FF:lM,FFF:dM,FFFF:pM},mn=class t{static create(e,r={}){return new t(e,r)}static parseFormat(e){let r=null,n="",i=!1,o=[];for(let s=0;s<e.length;s++){let a=e.charAt(s);a==="'"?((n.length>0||i)&&o.push({literal:i||/^\s+$/.test(n),val:n===""?"'":n}),r=null,n="",i=!i):i||a===r?n+=a:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=a,r=a)}return n.length>0&&o.push({literal:i||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(e){return ade[e]}constructor(e,r){this.opts=r,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...r}).format()}dtFormatter(e,r={}){return this.loc.dtFormatter(e,{...this.opts,...r})}formatDateTime(e,r){return this.dtFormatter(e,r).format()}formatDateTimeParts(e,r){return this.dtFormatter(e,r).formatToParts()}formatInterval(e,r){return this.dtFormatter(e.start,r).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,r){return this.dtFormatter(e,r).resolvedOptions()}num(e,r=0,n=void 0){if(this.opts.forceSimple)return Kt(e,r);let i={...this.opts};return r>0&&(i.padTo=r),n&&(i.signDisplay=n),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,r){let n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(p,h)=>this.loc.extract(e,p,h),s=p=>e.isOffsetFixed&&e.offset===0&&p.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,p.format):"",a=()=>n?rde(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(p,h)=>n?ide(e,p):o(h?{month:p}:{month:p,day:"numeric"},"month"),l=(p,h)=>n?nde(e,p):o(h?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),u=p=>{let h=t.macroTokenToFormatOpts(p);return h?this.formatWithSystemDefault(e,h):p},d=p=>n?ode(e,p):o({era:p},"era"),A=p=>{switch(p){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return i?o({day:"numeric"},"day"):this.num(e.day);case"dd":return i?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return i?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return i?o({month:"numeric"},"month"):this.num(e.month);case"MM":return i?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return i?o({year:"numeric"},"year"):this.num(e.year);case"yy":return i?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(p)}};return OU(t.parseFormat(r),A)}formatDurationFromString(e,r){let n=this.opts.signMode==="negativeLargestOnly"?-1:1,i=u=>{switch(u[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},o=(u,d)=>A=>{let p=i(A);if(p){let h=d.isNegativeDuration&&p!==d.largestUnit?n:1,f;return this.opts.signMode==="negativeLargestOnly"&&p!==d.largestUnit?f="never":this.opts.signMode==="all"?f="always":f="auto",this.num(u.get(p)*h,A.length,f)}else return A},s=t.parseFormat(r),a=s.reduce((u,{literal:d,val:A})=>d?u:u.concat(A),[]),c=e.shiftTo(...a.map(i).filter(u=>u)),l={isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]};return OU(s,o(c,l))}},NM=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ru(...t){let e=t.reduce((r,n)=>r+n.source,"");return RegExp(`^${e}$`)}function nu(...t){return e=>t.reduce(([r,n,i],o)=>{let[s,a,c]=o(e,i);return[{...r,...s},a||n,c]},[{},null,1]).slice(0,2)}function iu(t,...e){if(t==null)return[null,null];for(let[r,n]of e){let i=r.exec(t);if(i)return n(i)}return[null,null]}function OM(...t){return(e,r)=>{let n={},i;for(i=0;i<t.length;i++)n[t[i]]=la(e[r+i]);return[n,null,r+i]}}var xM=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,cde=`(?:${xM.source}?(?:\\[(${NM.source})\\])?)?`,LS=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,UM=RegExp(`${LS.source}${cde}`),$S=RegExp(`(?:[Tt]${UM.source})?`),lde=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ude=/(\d{4})-?W(\d\d)(?:-?(\d))?/,dde=/(\d{4})-?(\d{3})/,Ade=OM("weekYear","weekNumber","weekDay"),pde=OM("year","ordinal"),hde=/(\d{4})-(\d\d)-(\d\d)/,MM=RegExp(`${LS.source} ?(?:${xM.source}|(${NM.source}))?`),fde=RegExp(`(?: ${MM.source})?`);function eu(t,e,r){let n=t[e];return De(n)?r:la(n)}function gde(t,e){return[{year:eu(t,e),month:eu(t,e+1,1),day:eu(t,e+2,1)},null,e+3]}function ou(t,e){return[{hours:eu(t,e,0),minutes:eu(t,e+1,0),seconds:eu(t,e+2,0),milliseconds:MS(t[e+3])},null,e+4]}function bA(t,e){let r=!t[e]&&!t[e+1],n=am(t[e+1],t[e+2]),i=r?null:In.instance(n);return[{},i,e+3]}function SA(t,e){let r=t[e]?Bs.create(t[e]):null;return[{},r,e+1]}var mde=RegExp(`^T?${LS.source}$`),yde=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Ede(t){let[e,r,n,i,o,s,a,c,l]=t,u=e[0]==="-",d=c&&c[0]==="-",A=(p,h=!1)=>p!==void 0&&(h||p&&u)?-p:p;return[{years:A(gc(r)),months:A(gc(n)),weeks:A(gc(i)),days:A(gc(o)),hours:A(gc(s)),minutes:A(gc(a)),seconds:A(gc(c),c==="-0"),milliseconds:A(MS(l),d)}]}var Ide={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function FS(t,e,r,n,i,o,s){let a={year:e.length===2?RS(la(e)):la(e),month:BM.indexOf(r)+1,day:la(n),hour:la(i),minute:la(o)};return s&&(a.second=la(s)),t&&(a.weekday=t.length>3?QM.indexOf(t)+1:TM.indexOf(t)+1),a}var Cde=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function bde(t){let[,e,r,n,i,o,s,a,c,l,u,d]=t,A=FS(e,i,n,r,o,s,a),p;return c?p=Ide[c]:l?p=0:p=am(u,d),[A,new In(p)]}function Sde(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var wde=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,_de=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Bde=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function xU(t){let[,e,r,n,i,o,s,a]=t;return[FS(e,i,n,r,o,s,a),In.utcInstance]}function vde(t){let[,e,r,n,i,o,s,a]=t;return[FS(e,a,r,n,i,o,s),In.utcInstance]}var Qde=ru(lde,$S),Tde=ru(ude,$S),Dde=ru(dde,$S),kde=ru(UM),PM=nu(gde,ou,bA,SA),Rde=nu(Ade,ou,bA,SA),Nde=nu(pde,ou,bA,SA),Ode=nu(ou,bA,SA);function xde(t){return iu(t,[Qde,PM],[Tde,Rde],[Dde,Nde],[kde,Ode])}function Ude(t){return iu(Sde(t),[Cde,bde])}function Mde(t){return iu(t,[wde,xU],[_de,xU],[Bde,vde])}function Pde(t){return iu(t,[yde,Ede])}var Lde=nu(ou);function $de(t){return iu(t,[mde,Lde])}var Fde=ru(hde,fde),jde=ru(MM),zde=nu(ou,bA,SA);function qde(t){return iu(t,[Fde,PM],[jde,zde])}var UU="Invalid Duration",LM={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Hde={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...LM},Zn=146097/400,Jl=146097/4800,Gde={years:{quarters:4,months:12,weeks:Zn/7,days:Zn,hours:Zn*24,minutes:Zn*24*60,seconds:Zn*24*60*60,milliseconds:Zn*24*60*60*1e3},quarters:{months:3,weeks:Zn/28,days:Zn/4,hours:Zn*24/4,minutes:Zn*24*60/4,seconds:Zn*24*60*60/4,milliseconds:Zn*24*60*60*1e3/4},months:{weeks:Jl/7,days:Jl,hours:Jl*24,minutes:Jl*24*60,seconds:Jl*24*60*60,milliseconds:Jl*24*60*60*1e3},...LM},yc=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Yde=yc.slice(0).reverse();function ws(t,e,r=!1){let n={values:r?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new ar(n)}function $M(t,e){var r;let n=(r=e.milliseconds)!=null?r:0;for(let i of Yde.slice(1))e[i]&&(n+=e[i]*t[i].milliseconds);return n}function MU(t,e){let r=$M(t,e)<0?-1:1;yc.reduceRight((n,i)=>{if(De(e[i]))return n;if(n){let o=e[n]*r,s=t[i][n],a=Math.floor(o/s);e[i]+=a*r,e[n]-=a*s*r}return i},null),yc.reduce((n,i)=>{if(De(e[i]))return n;if(n){let o=e[n]%1;e[n]-=o,e[i]+=o*t[n][i]}return i},null)}function PU(t){let e={};for(let[r,n]of Object.entries(t))n!==0&&(e[r]=n);return e}var ar=class t{constructor(e){let r=e.conversionAccuracy==="longterm"||!1,n=r?Gde:Hde;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||mt.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,r){return t.fromObject({milliseconds:e},r)}static fromObject(e,r={}){if(e==null||typeof e!="object")throw new Ar(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new t({values:nm(e,t.normalizeUnit),loc:mt.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(e){if(Aa(e))return t.fromMillis(e);if(t.isDuration(e))return e;if(typeof e=="object")return t.fromObject(e);throw new Ar(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,r){let[n]=Pde(e);return n?t.fromObject(n,r):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,r){let[n]=$de(e);return n?t.fromObject(n,r):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,r=null){if(!e)throw new Ar("need to specify a reason the Duration is invalid");let n=e instanceof yn?e:new yn(e,r);if(Et.throwOnInvalid)throw new ES(n);return new t({invalid:n})}static normalizeUnit(e){let r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!r)throw new Kg(e);return r}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,r={}){let n={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?mn.create(this.loc,n).formatDurationFromString(this,e):UU}toHuman(e={}){if(!this.isValid)return UU;let r=e.showZeros!==!1,n=yc.map(i=>{let o=this.values[i];return De(o)||o===0&&!r?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(o)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=PS(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let r=this.toMillis();return r<0||r>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},Bt.fromMillis(r,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?$M(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let r=t.fromDurationLike(e),n={};for(let i of yc)(tu(r.values,i)||tu(this.values,i))&&(n[i]=r.get(i)+this.get(i));return ws(this,{values:n},!0)}minus(e){if(!this.isValid)return this;let r=t.fromDurationLike(e);return this.plus(r.negate())}mapUnits(e){if(!this.isValid)return this;let r={};for(let n of Object.keys(this.values))r[n]=_M(e(this.values[n],n));return ws(this,{values:r},!0)}get(e){return this[t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let r={...this.values,...nm(e,t.normalizeUnit)};return ws(this,{values:r})}reconfigure({locale:e,numberingSystem:r,conversionAccuracy:n,matrix:i}={}){let s={loc:this.loc.clone({locale:e,numberingSystem:r}),matrix:i,conversionAccuracy:n};return ws(this,s)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return MU(this.matrix,e),ws(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=PU(this.normalize().shiftToAll().toObject());return ws(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(s=>t.normalizeUnit(s));let r={},n={},i=this.toObject(),o;for(let s of yc)if(e.indexOf(s)>=0){o=s;let a=0;for(let l in n)a+=this.matrix[l][s]*n[l],n[l]=0;Aa(i[s])&&(a+=i[s]);let c=Math.trunc(a);r[s]=c,n[s]=(a*1e3-c*1e3)/1e3}else Aa(i[s])&&(n[s]=i[s]);for(let s in n)n[s]!==0&&(r[o]+=s===o?n[s]:n[s]/this.matrix[o][s]);return MU(this.matrix,r),ws(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let r of Object.keys(this.values))e[r]=this.values[r]===0?0:-this.values[r];return ws(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=PU(this.values);return ws(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function r(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(let n of yc)if(!r(this.values[n],e.values[n]))return!1;return!0}},Zl="Invalid Interval";function Vde(t,e){return!t||!t.isValid?Ic.invalid("missing or invalid start"):!e||!e.isValid?Ic.invalid("missing or invalid end"):e<t?Ic.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}var Ic=class t{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,r=null){if(!e)throw new Ar("need to specify a reason the Interval is invalid");let n=e instanceof yn?e:new yn(e,r);if(Et.throwOnInvalid)throw new yS(n);return new t({invalid:n})}static fromDateTimes(e,r){let n=hA(e),i=hA(r),o=Vde(n,i);return o??new t({start:n,end:i})}static after(e,r){let n=ar.fromDurationLike(r),i=hA(e);return t.fromDateTimes(i,i.plus(n))}static before(e,r){let n=ar.fromDurationLike(r),i=hA(e);return t.fromDateTimes(i.minus(n),i)}static fromISO(e,r){let[n,i]=(e||"").split("/",2);if(n&&i){let o,s;try{o=Bt.fromISO(n,r),s=o.isValid}catch{s=!1}let a,c;try{a=Bt.fromISO(i,r),c=a.isValid}catch{c=!1}if(s&&c)return t.fromDateTimes(o,a);if(s){let l=ar.fromISO(i,r);if(l.isValid)return t.after(o,l)}else if(c){let l=ar.fromISO(n,r);if(l.isValid)return t.before(a,l)}}return t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",r){if(!this.isValid)return NaN;let n=this.start.startOf(e,r),i;return r!=null&&r.useLocaleWeeks?i=this.end.reconfigure({locale:n.locale}):i=this.end,i=i.startOf(e,r),Math.floor(i.diff(n,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:r}={}){return this.isValid?t.fromDateTimes(e||this.s,r||this.e):this}splitAt(...e){if(!this.isValid)return[];let r=e.map(hA).filter(s=>this.contains(s)).sort((s,a)=>s.toMillis()-a.toMillis()),n=[],{s:i}=this,o=0;for(;i<this.e;){let s=r[o]||this.e,a=+s>+this.e?this.e:s;n.push(t.fromDateTimes(i,a)),i=a,o+=1}return n}splitBy(e){let r=ar.fromDurationLike(e);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:n}=this,i=1,o,s=[];for(;n<this.e;){let a=this.start.plus(r.mapUnits(c=>c*i));o=+a>+this.e?this.e:a,s.push(t.fromDateTimes(n,o)),n=o,i+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let r=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return r>=n?null:t.fromDateTimes(r,n)}union(e){if(!this.isValid)return this;let r=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return t.fromDateTimes(r,n)}static merge(e){let[r,n]=e.sort((i,o)=>i.s-o.s).reduce(([i,o],s)=>o?o.overlaps(s)||o.abutsStart(s)?[i,o.union(s)]:[i.concat([o]),s]:[i,s],[[],null]);return n&&r.push(n),r}static xor(e){let r=null,n=0,i=[],o=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),s=Array.prototype.concat(...o),a=s.sort((c,l)=>c.time-l.time);for(let c of a)n+=c.type==="s"?1:-1,n===1?r=c.time:(r&&+r!=+c.time&&i.push(t.fromDateTimes(r,c.time)),r=null);return t.merge(i)}difference(...e){return t.xor([this].concat(e)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Zl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Xg,r={}){return this.isValid?mn.create(this.s.loc.clone(r),e).formatInterval(this):Zl}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Zl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Zl}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Zl}toFormat(e,{separator:r=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${r}${this.e.toFormat(e)}`:Zl}toDuration(e,r){return this.isValid?this.e.diff(this.s,e,r):ar.invalid(this.invalidReason)}mapEndpoints(e){return t.fromDateTimes(e(this.s),e(this.e))}},Ec=class{static hasDST(e=Et.defaultZone){let r=Bt.now().setZone(e).set({month:12});return!e.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(e){return Bs.isValidZone(e)}static normalizeZone(e){return ua(e,Et.defaultZone)}static getStartOfWeek({locale:e=null,locObj:r=null}={}){return(r||mt.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:r=null}={}){return(r||mt.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:r=null}={}){return(r||mt.create(e)).getWeekendDays().slice()}static months(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||mt.create(r,n,o)).months(e)}static monthsFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||mt.create(r,n,o)).months(e,!0)}static weekdays(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||mt.create(r,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||mt.create(r,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return mt.create(e).meridiems()}static eras(e="short",{locale:r=null}={}){return mt.create(r,null,"gregory").eras(e)}static features(){return{relative:bM(),localeWeek:SM()}}};function LU(t,e){let r=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(e)-r(t);return Math.floor(ar.fromMillis(n).as("days"))}function Wde(t,e,r){let n=[["years",(c,l)=>l.year-c.year],["quarters",(c,l)=>l.quarter-c.quarter+(l.year-c.year)*4],["months",(c,l)=>l.month-c.month+(l.year-c.year)*12],["weeks",(c,l)=>{let u=LU(c,l);return(u-u%7)/7}],["days",LU]],i={},o=t,s,a;for(let[c,l]of n)r.indexOf(c)>=0&&(s=c,i[c]=l(t,e),a=o.plus(i),a>e?(i[c]--,t=o.plus(i),t>e&&(a=t,i[c]--,t=o.plus(i))):t=a);return[t,i,a,s]}function Jde(t,e,r,n){let[i,o,s,a]=Wde(t,e,r),c=e-i,l=r.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);l.length===0&&(s<e&&(s=i.plus({[a]:1})),s!==i&&(o[a]=(o[a]||0)+c/(s-i)));let u=ar.fromObject(o,n);return l.length>0?ar.fromMillis(c,n).shiftTo(...l).plus(u):u}var Zde="missing Intl.DateTimeFormat.formatToParts support";function nt(t,e=r=>r){return{regex:t,deser:([r])=>e(Fue(r))}}var Kde="\xA0",FM=`[ ${Kde}]`,jM=new RegExp(FM,"g");function Xde(t){return t.replace(/\./g,"\\.?").replace(jM,FM)}function $U(t){return t.replace(/\./g,"").replace(jM," ").toLowerCase()}function vi(t,e){return t===null?null:{regex:RegExp(t.map(Xde).join("|")),deser:([r])=>t.findIndex(n=>$U(r)===$U(n))+e}}function FU(t,e){return{regex:t,deser:([,r,n])=>am(r,n),groups:e}}function Gg(t){return{regex:t,deser:([e])=>e}}function eAe(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function tAe(t,e){let r=Bi(e),n=Bi(e,"{2}"),i=Bi(e,"{3}"),o=Bi(e,"{4}"),s=Bi(e,"{6}"),a=Bi(e,"{1,2}"),c=Bi(e,"{1,3}"),l=Bi(e,"{1,6}"),u=Bi(e,"{1,9}"),d=Bi(e,"{2,4}"),A=Bi(e,"{4,6}"),p=E=>({regex:RegExp(eAe(E.val)),deser:([S])=>S,literal:!0}),f=(E=>{if(t.literal)return p(E);switch(E.val){case"G":return vi(e.eras("short"),0);case"GG":return vi(e.eras("long"),0);case"y":return nt(l);case"yy":return nt(d,RS);case"yyyy":return nt(o);case"yyyyy":return nt(A);case"yyyyyy":return nt(s);case"M":return nt(a);case"MM":return nt(n);case"MMM":return vi(e.months("short",!0),1);case"MMMM":return vi(e.months("long",!0),1);case"L":return nt(a);case"LL":return nt(n);case"LLL":return vi(e.months("short",!1),1);case"LLLL":return vi(e.months("long",!1),1);case"d":return nt(a);case"dd":return nt(n);case"o":return nt(c);case"ooo":return nt(i);case"HH":return nt(n);case"H":return nt(a);case"hh":return nt(n);case"h":return nt(a);case"mm":return nt(n);case"m":return nt(a);case"q":return nt(a);case"qq":return nt(n);case"s":return nt(a);case"ss":return nt(n);case"S":return nt(c);case"SSS":return nt(i);case"u":return Gg(u);case"uu":return Gg(a);case"uuu":return nt(r);case"a":return vi(e.meridiems(),0);case"kkkk":return nt(o);case"kk":return nt(d,RS);case"W":return nt(a);case"WW":return nt(n);case"E":case"c":return nt(r);case"EEE":return vi(e.weekdays("short",!1),1);case"EEEE":return vi(e.weekdays("long",!1),1);case"ccc":return vi(e.weekdays("short",!0),1);case"cccc":return vi(e.weekdays("long",!0),1);case"Z":case"ZZ":return FU(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return FU(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Gg(/[a-z_+-/]{1,256}?/i);case" ":return Gg(/[^\S\n\r]/);default:return p(E)}})(t)||{invalidReason:Zde};return f.token=t,f}var rAe={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function nAe(t,e,r){let{type:n,value:i}=t;if(n==="literal"){let c=/^\s+$/.test(i);return{literal:!c,val:c?" ":i}}let o=e[n],s=n;n==="hour"&&(e.hour12!=null?s=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?s="hour12":s="hour24":s=r.hour12?"hour12":"hour24");let a=rAe[s];if(typeof a=="object"&&(a=a[o]),a)return{literal:!1,val:a}}function iAe(t){return[`^${t.map(r=>r.regex).reduce((r,n)=>`${r}(${n.source})`,"")}$`,t]}function oAe(t,e,r){let n=t.match(e);if(n){let i={},o=1;for(let s in r)if(tu(r,s)){let a=r[s],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(i[a.token.val[0]]=a.deser(n.slice(o,o+c))),o+=c}return[n,i]}else return[n,{}]}function sAe(t){let e=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},r=null,n;return De(t.z)||(r=Bs.create(t.z)),De(t.Z)||(r||(r=new In(t.Z)),n=t.Z),De(t.q)||(t.M=(t.q-1)*3+1),De(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),De(t.u)||(t.S=MS(t.u)),[Object.keys(t).reduce((o,s)=>{let a=e(s);return a&&(o[a]=t[s]),o},{}),r,n]}var AS=null;function aAe(){return AS||(AS=Bt.fromMillis(1555555555555)),AS}function cAe(t,e){if(t.literal)return t;let r=mn.macroTokenToFormatOpts(t.val),n=HM(r,e);return n==null||n.includes(void 0)?t:n}function zM(t,e){return Array.prototype.concat(...t.map(r=>cAe(r,e)))}var im=class{constructor(e,r){if(this.locale=e,this.format=r,this.tokens=zM(mn.parseFormat(r),e),this.units=this.tokens.map(n=>tAe(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){let[n,i]=iAe(this.units);this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[r,n]=oAe(e,this.regex,this.handlers),[i,o,s]=n?sAe(n):[null,null,void 0];if(tu(n,"a")&&tu(n,"H"))throw new da("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:r,matches:n,result:i,zone:o,specificOffset:s}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function qM(t,e,r){return new im(t,r).explainFromTokens(e)}function lAe(t,e,r){let{result:n,zone:i,specificOffset:o,invalidReason:s}=qM(t,e,r);return[n,i,o,s]}function HM(t,e){if(!t)return null;let n=mn.create(e,t).dtFormatter(aAe()),i=n.formatToParts(),o=n.resolvedOptions();return i.map(s=>nAe(s,t,o))}var pS="Invalid DateTime",jU=864e13;function gA(t){return new yn("unsupported zone",`the zone "${t.name}" is not supported`)}function hS(t){return t.weekData===null&&(t.weekData=tm(t.c)),t.weekData}function fS(t){return t.localWeekData===null&&(t.localWeekData=tm(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function mc(t,e){let r={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Bt({...r,...e,old:r})}function GM(t,e,r){let n=t-e*60*1e3,i=r.offset(n);if(e===i)return[n,e];n-=(i-e)*60*1e3;let o=r.offset(n);return i===o?[n,i]:[t-Math.min(i,o)*60*1e3,Math.max(i,o)]}function Yg(t,e){t+=e*60*1e3;let r=new Date(t);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function Wg(t,e,r){return GM(sm(t),e,r)}function zU(t,e){let r=t.o,n=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,o={...t.c,year:n,month:i,day:Math.min(t.c.day,rm(n,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},s=ar.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=sm(o),[c,l]=GM(a,r,t.zone);return s!==0&&(c+=s,l=t.zone.offset(c)),{ts:c,o:l}}function Kl(t,e,r,n,i,o){let{setZone:s,zone:a}=r;if(t&&Object.keys(t).length!==0||e){let c=e||a,l=Bt.fromObject(t,{...r,zone:c,specificOffset:o});return s?l:l.setZone(a)}else return Bt.invalid(new yn("unparsable",`the input "${i}" can't be parsed as ${n}`))}function Vg(t,e,r=!0){return t.isValid?mn.create(mt.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(t,e):null}function gS(t,e,r){let n=t.c.year>9999||t.c.year<0,i="";if(n&&t.c.year>=0&&(i+="+"),i+=Kt(t.c.year,n?6:4),r==="year")return i;if(e){if(i+="-",i+=Kt(t.c.month),r==="month")return i;i+="-"}else if(i+=Kt(t.c.month),r==="month")return i;return i+=Kt(t.c.day),i}function qU(t,e,r,n,i,o,s){let a=!r||t.c.millisecond!==0||t.c.second!==0,c="";switch(s){case"day":case"month":case"year":break;default:if(c+=Kt(t.c.hour),s==="hour")break;if(e){if(c+=":",c+=Kt(t.c.minute),s==="minute")break;a&&(c+=":",c+=Kt(t.c.second))}else{if(c+=Kt(t.c.minute),s==="minute")break;a&&(c+=Kt(t.c.second))}if(s==="second")break;a&&(!n||t.c.millisecond!==0)&&(c+=".",c+=Kt(t.c.millisecond,3))}return i&&(t.isOffsetFixed&&t.offset===0&&!o?c+="Z":t.o<0?(c+="-",c+=Kt(Math.trunc(-t.o/60)),c+=":",c+=Kt(Math.trunc(-t.o%60))):(c+="+",c+=Kt(Math.trunc(t.o/60)),c+=":",c+=Kt(Math.trunc(t.o%60)))),o&&(c+="["+t.zone.ianaName+"]"),c}var YM={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},uAe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},dAe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Jg=["year","month","day","hour","minute","second","millisecond"],AAe=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],pAe=["year","ordinal","hour","minute","second","millisecond"];function Zg(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new Kg(t);return e}function HU(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Zg(t)}}function hAe(t){if(mA===void 0&&(mA=Et.now()),t.type!=="iana")return t.offset(mA);let e=t.name,r=NS.get(e);return r===void 0&&(r=t.offset(mA),NS.set(e,r)),r}function GU(t,e){let r=ua(e.zone,Et.defaultZone);if(!r.isValid)return Bt.invalid(gA(r));let n=mt.fromObject(e),i,o;if(De(t.year))i=Et.now();else{for(let c of Jg)De(t[c])&&(t[c]=YM[c]);let s=IM(t)||CM(t);if(s)return Bt.invalid(s);let a=hAe(r);[i,o]=Wg(t,a,r)}return new Bt({ts:i,zone:r,loc:n,o})}function YU(t,e,r){let n=De(r.round)?!0:r.round,i=De(r.rounding)?"trunc":r.rounding,o=(a,c)=>(a=PS(a,n||r.calendary?0:2,r.calendary?"round":i),e.loc.clone(r).relFormatter(r).format(a,c)),s=a=>r.calendary?e.hasSame(t,a)?0:e.startOf(a).diff(t.startOf(a),a).get(a):e.diff(t,a).get(a);if(r.unit)return o(s(r.unit),r.unit);for(let a of r.units){let c=s(a);if(Math.abs(c)>=1)return o(c,a)}return o(t>e?-0:0,r.units[r.units.length-1])}function VU(t){let e={},r;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],r=Array.from(t).slice(0,t.length-1)):r=Array.from(t),[e,r]}var mA,NS=new Map,Bt=class t{constructor(e){let r=e.zone||Et.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new yn("invalid input"):null)||(r.isValid?null:gA(r));this.ts=De(e.ts)?Et.now():e.ts;let i=null,o=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(r))[i,o]=[e.old.c,e.old.o];else{let a=Aa(e.o)&&!e.old?e.o:r.offset(this.ts);i=Yg(this.ts,a),n=Number.isNaN(i.year)?new yn("invalid input"):null,i=n?null:i,o=n?null:a}this._zone=r,this.loc=e.loc||mt.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[e,r]=VU(arguments),[n,i,o,s,a,c,l]=r;return GU({year:n,month:i,day:o,hour:s,minute:a,second:c,millisecond:l},e)}static utc(){let[e,r]=VU(arguments),[n,i,o,s,a,c,l]=r;return e.zone=In.utcInstance,GU({year:n,month:i,day:o,hour:s,minute:a,second:c,millisecond:l},e)}static fromJSDate(e,r={}){let n=Gue(e)?e.valueOf():NaN;if(Number.isNaN(n))return t.invalid("invalid input");let i=ua(r.zone,Et.defaultZone);return i.isValid?new t({ts:n,zone:i,loc:mt.fromObject(r)}):t.invalid(gA(i))}static fromMillis(e,r={}){if(Aa(e))return e<-jU||e>jU?t.invalid("Timestamp out of range"):new t({ts:e,zone:ua(r.zone,Et.defaultZone),loc:mt.fromObject(r)});throw new Ar(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,r={}){if(Aa(e))return new t({ts:e*1e3,zone:ua(r.zone,Et.defaultZone),loc:mt.fromObject(r)});throw new Ar("fromSeconds requires a numerical input")}static fromObject(e,r={}){e=e||{};let n=ua(r.zone,Et.defaultZone);if(!n.isValid)return t.invalid(gA(n));let i=mt.fromObject(r),o=nm(e,HU),{minDaysInFirstWeek:s,startOfWeek:a}=kU(o,i),c=Et.now(),l=De(r.specificOffset)?n.offset(c):r.specificOffset,u=!De(o.ordinal),d=!De(o.year),A=!De(o.month)||!De(o.day),p=d||A,h=o.weekYear||o.weekNumber;if((p||u)&&h)throw new da("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(A&&u)throw new da("Can't mix ordinal dates with month/day");let f=h||o.weekday&&!p,E,S,B=Yg(c,l);f?(E=AAe,S=uAe,B=tm(B,s,a)):u?(E=pAe,S=dAe,B=dS(B)):(E=Jg,S=YM);let _=!1;for(let X of E){let Ae=o[X];De(Ae)?_?o[X]=S[X]:o[X]=B[X]:_=!0}let v=f?zue(o,s,a):u?que(o):IM(o),T=v||CM(o);if(T)return t.invalid(T);let $=f?TU(o,s,a):u?DU(o):o,[k,L]=Wg($,l,n),P=new t({ts:k,zone:n,o:L,loc:i});return o.weekday&&p&&e.weekday!==P.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${P.toISO()}`):P.isValid?P:t.invalid(P.invalid)}static fromISO(e,r={}){let[n,i]=xde(e);return Kl(n,i,r,"ISO 8601",e)}static fromRFC2822(e,r={}){let[n,i]=Ude(e);return Kl(n,i,r,"RFC 2822",e)}static fromHTTP(e,r={}){let[n,i]=Mde(e);return Kl(n,i,r,"HTTP",r)}static fromFormat(e,r,n={}){if(De(e)||De(r))throw new Ar("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:o=null}=n,s=mt.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0}),[a,c,l,u]=lAe(s,e,r);return u?t.invalid(u):Kl(a,c,n,`format ${r}`,e,l)}static fromString(e,r,n={}){return t.fromFormat(e,r,n)}static fromSQL(e,r={}){let[n,i]=qde(e);return Kl(n,i,r,"SQL",e)}static invalid(e,r=null){if(!e)throw new Ar("need to specify a reason the DateTime is invalid");let n=e instanceof yn?e:new yn(e,r);if(Et.throwOnInvalid)throw new mS(n);return new t({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,r={}){let n=HM(e,mt.fromObject(r));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(e,r={}){return zM(mn.parseFormat(e),mt.fromObject(r)).map(i=>i.val).join("")}static resetCache(){mA=void 0,NS.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?hS(this).weekYear:NaN}get weekNumber(){return this.isValid?hS(this).weekNumber:NaN}get weekday(){return this.isValid?hS(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?fS(this).weekday:NaN}get localWeekNumber(){return this.isValid?fS(this).weekNumber:NaN}get localWeekYear(){return this.isValid?fS(this).weekYear:NaN}get ordinal(){return this.isValid?dS(this.c).ordinal:NaN}get monthShort(){return this.isValid?Ec.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Ec.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Ec.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Ec.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,r=6e4,n=sm(this.c),i=this.zone.offset(n-e),o=this.zone.offset(n+e),s=this.zone.offset(n-i*r),a=this.zone.offset(n-o*r);if(s===a)return[this];let c=n-s*r,l=n-a*r,u=Yg(c,s),d=Yg(l,a);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[mc(this,{ts:c}),mc(this,{ts:l})]:[this]}get isInLeapYear(){return CA(this.year)}get daysInMonth(){return rm(this.year,this.month)}get daysInYear(){return this.isValid?Xl(this.year):NaN}get weeksInWeekYear(){return this.isValid?IA(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?IA(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:r,numberingSystem:n,calendar:i}=mn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:r,numberingSystem:n,outputCalendar:i}}toUTC(e=0,r={}){return this.setZone(In.instance(e),r)}toLocal(){return this.setZone(Et.defaultZone)}setZone(e,{keepLocalTime:r=!1,keepCalendarTime:n=!1}={}){if(e=ua(e,Et.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(r||n){let o=e.offset(this.ts),s=this.toObject();[i]=Wg(s,o,e)}return mc(this,{ts:i,zone:e})}else return t.invalid(gA(e))}reconfigure({locale:e,numberingSystem:r,outputCalendar:n}={}){let i=this.loc.clone({locale:e,numberingSystem:r,outputCalendar:n});return mc(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let r=nm(e,HU),{minDaysInFirstWeek:n,startOfWeek:i}=kU(r,this.loc),o=!De(r.weekYear)||!De(r.weekNumber)||!De(r.weekday),s=!De(r.ordinal),a=!De(r.year),c=!De(r.month)||!De(r.day),l=a||c,u=r.weekYear||r.weekNumber;if((l||s)&&u)throw new da("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&s)throw new da("Can't mix ordinal dates with month/day");let d;o?d=TU({...tm(this.c,n,i),...r},n,i):De(r.ordinal)?(d={...this.toObject(),...r},De(r.day)&&(d.day=Math.min(rm(d.year,d.month),d.day))):d=DU({...dS(this.c),...r});let[A,p]=Wg(d,this.o,this.zone);return mc(this,{ts:A,o:p})}plus(e){if(!this.isValid)return this;let r=ar.fromDurationLike(e);return mc(this,zU(this,r))}minus(e){if(!this.isValid)return this;let r=ar.fromDurationLike(e).negate();return mc(this,zU(this,r))}startOf(e,{useLocaleWeeks:r=!1}={}){if(!this.isValid)return this;let n={},i=ar.normalizeUnit(e);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(i==="weeks")if(r){let o=this.loc.getStartOfWeek(),{weekday:s}=this;s<o&&(n.weekNumber=this.weekNumber-1),n.weekday=o}else n.weekday=1;if(i==="quarters"){let o=Math.ceil(this.month/3);n.month=(o-1)*3+1}return this.set(n)}endOf(e,r){return this.isValid?this.plus({[e]:1}).startOf(e,r).minus(1):this}toFormat(e,r={}){return this.isValid?mn.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,e):pS}toLocaleString(e=Xg,r={}){return this.isValid?mn.create(this.loc.clone(r),e).formatDateTime(this):pS}toLocaleParts(e={}){return this.isValid?mn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:r=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:o=!1,precision:s="milliseconds"}={}){if(!this.isValid)return null;s=Zg(s);let a=e==="extended",c=gS(this,a,s);return Jg.indexOf(s)>=3&&(c+="T"),c+=qU(this,a,r,n,i,o,s),c}toISODate({format:e="extended",precision:r="day"}={}){return this.isValid?gS(this,e==="extended",Zg(r)):null}toISOWeekDate(){return Vg(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:r=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:o=!1,format:s="extended",precision:a="milliseconds"}={}){return this.isValid?(a=Zg(a),(i&&Jg.indexOf(a)>=3?"T":"")+qU(this,s==="extended",r,e,n,o,a)):null}toRFC2822(){return Vg(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Vg(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?gS(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:r=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(r||e)&&(n&&(i+=" "),r?i+="z":e&&(i+="ZZ")),Vg(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():pS}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let r={...this.c};return e.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,r="milliseconds",n={}){if(!this.isValid||!e.isValid)return ar.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...n},o=Yue(r).map(ar.normalizeUnit),s=e.valueOf()>this.valueOf(),a=s?this:e,c=s?e:this,l=Jde(a,c,o,i);return s?l.negate():l}diffNow(e="milliseconds",r={}){return this.diff(t.now(),e,r)}until(e){return this.isValid?Ic.fromDateTimes(this,e):this}hasSame(e,r,n){if(!this.isValid)return!1;let i=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(r,n)<=i&&i<=o.endOf(r,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let r=e.base||t.fromObject({},{zone:this.zone}),n=e.padding?this<r?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],o=e.unit;return Array.isArray(e.unit)&&(i=e.unit,o=void 0),YU(r,this.plus(n),{...e,numeric:"always",units:i,unit:o})}toRelativeCalendar(e={}){return this.isValid?YU(e.base||t.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(t.isDateTime))throw new Ar("min requires all arguments be DateTimes");return RU(e,r=>r.valueOf(),Math.min)}static max(...e){if(!e.every(t.isDateTime))throw new Ar("max requires all arguments be DateTimes");return RU(e,r=>r.valueOf(),Math.max)}static fromFormatExplain(e,r,n={}){let{locale:i=null,numberingSystem:o=null}=n,s=mt.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return qM(s,e,r)}static fromStringExplain(e,r,n={}){return t.fromFormatExplain(e,r,n)}static buildFormatParser(e,r={}){let{locale:n=null,numberingSystem:i=null}=r,o=mt.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new im(o,e)}static fromFormatParser(e,r,n={}){if(De(e)||De(r))throw new Ar("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:o=null}=n,s=mt.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});if(!s.equals(r.locale))throw new Ar(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${r.locale}`);let{result:a,zone:c,specificOffset:l,invalidReason:u}=r.explainFromTokens(e);return u?t.invalid(u):Kl(a,c,n,`format ${r.format}`,e,l)}static get DATE_SHORT(){return Xg}static get DATE_MED(){return WU}static get DATE_MED_WITH_WEEKDAY(){return wue}static get DATE_FULL(){return JU}static get DATE_HUGE(){return ZU}static get TIME_SIMPLE(){return KU}static get TIME_WITH_SECONDS(){return XU}static get TIME_WITH_SHORT_OFFSET(){return eM}static get TIME_WITH_LONG_OFFSET(){return tM}static get TIME_24_SIMPLE(){return rM}static get TIME_24_WITH_SECONDS(){return nM}static get TIME_24_WITH_SHORT_OFFSET(){return iM}static get TIME_24_WITH_LONG_OFFSET(){return oM}static get DATETIME_SHORT(){return sM}static get DATETIME_SHORT_WITH_SECONDS(){return aM}static get DATETIME_MED(){return cM}static get DATETIME_MED_WITH_SECONDS(){return lM}static get DATETIME_MED_WITH_WEEKDAY(){return _ue}static get DATETIME_FULL(){return uM}static get DATETIME_FULL_WITH_SECONDS(){return dM}static get DATETIME_HUGE(){return AM}static get DATETIME_HUGE_WITH_SECONDS(){return pM}};function hA(t){if(Bt.isDateTime(t))return t;if(t&&t.valueOf&&Aa(t.valueOf()))return Bt.fromJSDate(t);if(t&&typeof t=="object")return Bt.fromObject(t);throw new Ar(`Unknown datetime argument: ${t}, of type ${typeof t}`)}var fAe="3.7.2";Cn.DateTime=Bt;Cn.Duration=ar;Cn.FixedOffsetZone=In;Cn.IANAZone=Bs;Cn.Info=Ec;Cn.Interval=Ic;Cn.InvalidZone=em;Cn.Settings=Et;Cn.SystemZone=EA;Cn.VERSION=fAe;Cn.Zone=pa});var dm=y(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.CronDate=Mr.DAYS_IN_MONTH=Mr.DateMathOp=Mr.TimeUnit=void 0;var Cc=VM(),vr;(function(t){t.Second="Second",t.Minute="Minute",t.Hour="Hour",t.Day="Day",t.Month="Month",t.Year="Year"})(vr||(Mr.TimeUnit=vr={}));var lm;(function(t){t.Add="Add",t.Subtract="Subtract"})(lm||(Mr.DateMathOp=lm={}));Mr.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var um=class t{#e;#t=null;#n=null;#i={add:{[vr.Year]:this.addYear.bind(this),[vr.Month]:this.addMonth.bind(this),[vr.Day]:this.addDay.bind(this),[vr.Hour]:this.addHour.bind(this),[vr.Minute]:this.addMinute.bind(this),[vr.Second]:this.addSecond.bind(this)},subtract:{[vr.Year]:this.subtractYear.bind(this),[vr.Month]:this.subtractMonth.bind(this),[vr.Day]:this.subtractDay.bind(this),[vr.Hour]:this.subtractHour.bind(this),[vr.Minute]:this.subtractMinute.bind(this),[vr.Second]:this.subtractSecond.bind(this)}};constructor(e,r){let n={zone:r};if(e?e instanceof t?(this.#e=e.#e,this.#t=e.#t,this.#n=e.#n):e instanceof Date?this.#e=Cc.DateTime.fromJSDate(e,n):typeof e=="number"?this.#e=Cc.DateTime.fromMillis(e,n):(this.#e=Cc.DateTime.fromISO(e,n),this.#e.isValid||(this.#e=Cc.DateTime.fromRFC2822(e,n)),this.#e.isValid||(this.#e=Cc.DateTime.fromSQL(e,n)),this.#e.isValid||(this.#e=Cc.DateTime.fromFormat(e,"EEE, d MMM yyyy HH:mm:ss",n))):this.#e=Cc.DateTime.local(),!this.#e.isValid)throw new Error(`CronDate: unhandled timestamp: ${e}`);r&&r!==this.#e.zoneName&&(this.#e=this.#e.setZone(r))}static#o(e){return e%4===0&&e%100!==0||e%400===0}get dstStart(){return this.#t}set dstStart(e){this.#t=e}get dstEnd(){return this.#n}set dstEnd(e){this.#n=e}addYear(){this.#e=this.#e.plus({years:1})}addMonth(){this.#e=this.#e.plus({months:1}).startOf("month")}addDay(){this.#e=this.#e.plus({days:1}).startOf("day")}addHour(){this.#e=this.#e.plus({hours:1}).startOf("hour")}addMinute(){this.#e=this.#e.plus({minutes:1}).startOf("minute")}addSecond(){this.#e=this.#e.plus({seconds:1})}subtractYear(){this.#e=this.#e.minus({years:1})}subtractMonth(){this.#e=this.#e.minus({months:1}).endOf("month").startOf("second")}subtractDay(){this.#e=this.#e.minus({days:1}).endOf("day").startOf("second")}subtractHour(){this.#e=this.#e.minus({hours:1}).endOf("hour").startOf("second")}subtractMinute(){this.#e=this.#e.minus({minutes:1}).endOf("minute").startOf("second")}subtractSecond(){this.#e=this.#e.minus({seconds:1})}addUnit(e){this.#i.add[e]()}subtractUnit(e){this.#i.subtract[e]()}invokeDateOperation(e,r){if(e===lm.Add){this.addUnit(r);return}if(e===lm.Subtract){this.subtractUnit(r);return}throw new Error(`Invalid verb: ${e}`)}getDate(){return this.#e.day}getFullYear(){return this.#e.year}getDay(){let e=this.#e.weekday;return e===7?0:e}getMonth(){return this.#e.month-1}getHours(){return this.#e.hour}getMinutes(){return this.#e.minute}getSeconds(){return this.#e.second}getMilliseconds(){return this.#e.millisecond}getUTCOffset(){return this.#e.offset}setStartOfDay(){this.#e=this.#e.startOf("day")}setEndOfDay(){this.#e=this.#e.endOf("day")}getTime(){return this.#e.valueOf()}getUTCDate(){return this.#r().day}getUTCFullYear(){return this.#r().year}getUTCDay(){let e=this.#r().weekday;return e===7?0:e}getUTCMonth(){return this.#r().month-1}getUTCHours(){return this.#r().hour}getUTCMinutes(){return this.#r().minute}getUTCSeconds(){return this.#r().second}toISOString(){return this.#e.toUTC().toISO()}toJSON(){return this.#e.toJSON()}setDate(e){this.#e=this.#e.set({day:e})}setFullYear(e){this.#e=this.#e.set({year:e})}setDay(e){this.#e=this.#e.set({weekday:e})}setMonth(e){this.#e=this.#e.set({month:e+1})}setHours(e){this.#e=this.#e.set({hour:e})}setMinutes(e){this.#e=this.#e.set({minute:e})}setSeconds(e){this.#e=this.#e.set({second:e})}setMilliseconds(e){this.#e=this.#e.set({millisecond:e})}toString(){return this.toDate().toString()}toDate(){return this.#e.toJSDate()}isLastDayOfMonth(){let{day:e,month:r}=this.#e;if(r===2){let n=t.#o(this.#e.year);return e===Mr.DAYS_IN_MONTH[r-1]-(n?0:1)}return e===Mr.DAYS_IN_MONTH[r-1]}isLastWeekdayOfMonth(){let{day:e,month:r}=this.#e,n;return r===2?n=Mr.DAYS_IN_MONTH[r-1]-(t.#o(this.#e.year)?0:1):n=Mr.DAYS_IN_MONTH[r-1],e>n-7}applyDateOperation(e,r,n){if(r===vr.Month||r===vr.Day){this.invokeDateOperation(e,r);return}let i=this.getHours();this.invokeDateOperation(e,r);let o=this.getHours(),s=o-i;s===2?n!==24&&(this.dstStart=o):s===0&&this.getMinutes()===0&&this.getSeconds()===0&&n!==24&&(this.dstEnd=o)}#r(){return this.#e.toUTC()}};Mr.CronDate=um;Mr.default=um});var WM=y(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});Am.CronMonth=void 0;var gAe=dm(),mAe=ca(),yAe=1,EAe=12,IAe=Object.freeze([]),jS=class extends mAe.CronField{static get min(){return yAe}static get max(){return EAe}static get chars(){return IAe}static get daysInMonth(){return gAe.DAYS_IN_MONTH}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};Am.CronMonth=jS});var JM=y(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.CronSecond=void 0;var CAe=ca(),bAe=0,SAe=59,wAe=Object.freeze([]),zS=class extends CAe.CronField{static get min(){return bAe}static get max(){return SAe}static get chars(){return wAe}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};pm.CronSecond=zS});var hm=y(Zr=>{"use strict";var _Ae=Zr&&Zr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ha=Zr&&Zr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&_Ae(e,t,r)};Object.defineProperty(Zr,"__esModule",{value:!0});ha(hU(),Zr);ha(fU(),Zr);ha(gU(),Zr);ha(ca(),Zr);ha(mU(),Zr);ha(yU(),Zr);ha(WM(),Zr);ha(JM(),Zr)});var HS=y(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.CronFieldCollection=void 0;var ei=hm(),qS=class t{#e;#t;#n;#i;#o;#r;static from(e,r){return new t({second:this.resolveField(ei.CronSecond,e.second,r.second),minute:this.resolveField(ei.CronMinute,e.minute,r.minute),hour:this.resolveField(ei.CronHour,e.hour,r.hour),dayOfMonth:this.resolveField(ei.CronDayOfMonth,e.dayOfMonth,r.dayOfMonth),month:this.resolveField(ei.CronMonth,e.month,r.month),dayOfWeek:this.resolveField(ei.CronDayOfWeek,e.dayOfWeek,r.dayOfWeek)})}static resolveField(e,r,n){return n?n instanceof ei.CronField?n:new e(n):r}constructor({second:e,minute:r,hour:n,dayOfMonth:i,month:o,dayOfWeek:s}){if(!e)throw new Error("Validation error, Field second is missing");if(!r)throw new Error("Validation error, Field minute is missing");if(!n)throw new Error("Validation error, Field hour is missing");if(!i)throw new Error("Validation error, Field dayOfMonth is missing");if(!o)throw new Error("Validation error, Field month is missing");if(!s)throw new Error("Validation error, Field dayOfWeek is missing");if(o.values.length===1&&!i.hasLastChar&&!(parseInt(i.values[0],10)<=ei.CronMonth.daysInMonth[o.values[0]-1]))throw new Error("Invalid explicit day of month definition");this.#e=e,this.#t=r,this.#n=n,this.#o=o,this.#r=s,this.#i=i}get second(){return this.#e}get minute(){return this.#t}get hour(){return this.#n}get dayOfMonth(){return this.#i}get month(){return this.#o}get dayOfWeek(){return this.#r}static compactField(e){if(e.length===0)return[];let r=[],n;return e.forEach((i,o,s)=>{if(n===void 0){n={start:i,count:1};return}let a=s[o-1]||n.start,c=s[o+1];if(i==="L"||i==="W"){r.push(n),r.push({start:i,count:1}),n=void 0;return}if(n.step===void 0&&c!==void 0){let l=i-a,u=c-i;if(l<=u){n={...n,count:2,end:i,step:l};return}n.step=1}i-(n.end??0)===n.step?(n.count++,n.end=i):(n.count===1?r.push({start:n.start,count:1}):n.count===2?(r.push({start:n.start,count:1}),r.push({start:n.end??a,count:1})):r.push(n),n={start:i,count:1})}),n&&r.push(n),r}static#c(e,r,n){let i=r.step;return i?i===1&&r.start===e.min&&r.end&&r.end>=n?e.hasQuestionMarkChar?"?":"*":i!==1&&r.start===e.min&&r.end&&r.end>=n-i+1?`*/${i}`:null:null}static#s(e,r){let n=e.step;if(n===1)return`${e.start}-${e.end}`;let i=e.start===0?e.count-1:e.count;if(!n)throw new Error("Unexpected range step");if(!e.end)throw new Error("Unexpected range end");if(n*i>e.end){let o=(a,c)=>{if(typeof e.start!="number")throw new Error("Unexpected range start");return c%n===0?e.start+c:null};if(typeof e.start!="number")throw new Error("Unexpected range start");let s={length:e.end-e.start+1};return Array.from(s,o).filter(a=>a!==null).join(",")}return e.end===r-n+1?`${e.start}/${n}`:`${e.start}-${e.end}/${n}`}stringifyField(e){let r=e.max,n=e.values;if(e instanceof ei.CronDayOfWeek){r=6;let o=this.#r.values;n=o[o.length-1]===7?o.slice(0,-1):o}e instanceof ei.CronDayOfMonth&&(r=this.#o.values.length===1?ei.CronMonth.daysInMonth[this.#o.values[0]-1]:e.max);let i=t.compactField(n);if(i.length===1){let o=t.#c(e,i[0],r);if(o)return o}return i.map(o=>{let s=o.count===1?o.start.toString():t.#s(o,r);return e instanceof ei.CronDayOfWeek&&e.nthDay>0?`${s}#${e.nthDay}`:s}).join(",")}stringify(e=!1){let r=[];return e&&r.push(this.stringifyField(this.#e)),r.push(this.stringifyField(this.#t),this.stringifyField(this.#n),this.stringifyField(this.#i),this.stringifyField(this.#o),this.stringifyField(this.#r)),r.join(" ")}serialize(){return{second:this.#e.serialize(),minute:this.#t.serialize(),hour:this.#n.serialize(),dayOfMonth:this.#i.serialize(),month:this.#o.serialize(),dayOfWeek:this.#r.serialize()}}};fm.CronFieldCollection=qS});var GS=y(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.CronExpression=ti.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=ti.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var Mt=dm();ti.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range";ti.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";var ZM=1e4,gm=class t{#e;#t;#n;#i;#o;#r;#c=null;#s=!1;constructor(e,r){this.#e=r,this.#t=r.tz,this.#i=r.startDate?new Mt.CronDate(r.startDate,this.#t):null,this.#o=r.endDate?new Mt.CronDate(r.endDate,this.#t):null;let n=r.currentDate??r.startDate;if(n){let i=new Mt.CronDate(n,this.#t);this.#i&&i.getTime()<this.#i.getTime()?n=this.#i:this.#o&&i.getTime()>this.#o.getTime()&&(n=this.#o)}this.#n=new Mt.CronDate(n,this.#t),this.#r=e}get fields(){return this.#r}static fieldsToExpression(e,r){return new t(e,r||{})}static#a(e,r){return r.some(n=>n===e)}#l(e,r){return e[r?e.length-1:0]}#d(e){let r=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`;if(this.#c===r)return this.#s;let n=new Mt.CronDate(e);n.setStartOfDay();let i=new Mt.CronDate(e);return i.setEndOfDay(),this.#c=r,this.#s=n.getUTCOffset()!==i.getUTCOffset(),this.#s}#A(e,r,n){let i=this.#r.second.values,o=e.getSeconds(),s=this.#r.second.findNearestValue(o,n);if(s!==null){e.setSeconds(s);return}e.applyDateOperation(r,Mt.TimeUnit.Minute,this.#r.hour.values.length),e.setSeconds(this.#l(i,n))}#p(e,r,n){let i=this.#r.minute.values,o=this.#r.second.values,s=e.getMinutes(),a=this.#r.minute.findNearestValue(s,n);if(a!==null){e.setMinutes(a),e.setSeconds(this.#l(o,n));return}e.applyDateOperation(r,Mt.TimeUnit.Hour,this.#r.hour.values.length),e.setMinutes(this.#l(i,n)),e.setSeconds(this.#l(o,n))}static#h(e,r){let n=r.isLastWeekdayOfMonth();return e.some(i=>{let o=parseInt(i.toString().charAt(0),10)%7;if(Number.isNaN(o))throw new Error(`Invalid last weekday of the month expression: ${i}`);return r.getDay()===o&&n})}next(){return this.#g()}prev(){return this.#g(!0)}hasNext(){let e=this.#n;try{return this.#g(),!0}catch{return!1}finally{this.#n=e}}hasPrev(){let e=this.#n;try{return this.#g(!0),!0}catch{return!1}finally{this.#n=e}}take(e){let r=[];if(e>=0)for(let n=0;n<e;n++)try{r.push(this.next())}catch{return r}else for(let n=0;n>e;n--)try{r.push(this.prev())}catch{return r}return r}reset(e){this.#n=new Mt.CronDate(e||this.#e.currentDate)}stringify(e=!1){return this.#r.stringify(e)}includesDate(e){let{second:r,minute:n,hour:i,month:o}=this.#r,s=new Mt.CronDate(e,this.#t);return!(!r.values.includes(s.getSeconds())||!n.values.includes(s.getMinutes())||!i.values.includes(s.getHours())||!o.values.includes(s.getMonth()+1)||!this.#u(s)||this.#r.dayOfWeek.nthDay>0&&Math.ceil(s.getDate()/7)!==this.#r.dayOfWeek.nthDay)}toString(){return this.#e.expression||this.stringify(!0)}#u(e){let r=this.#r.dayOfMonth.isWildcard,n=!r,i=this.#r.dayOfWeek.isWildcard,o=!i,s=t.#a(e.getDate(),this.#r.dayOfMonth.values)||this.#r.dayOfMonth.hasLastChar&&e.isLastDayOfMonth(),a=t.#a(e.getDay(),this.#r.dayOfWeek.values)||this.#r.dayOfWeek.hasLastChar&&t.#h(this.#r.dayOfWeek.values,e);return!!(n&&o&&(s||a)||s&&!o||r&&!i&&a)}#m(e,r,n){let i=this.#r.hour.values,o=i,s=e.getHours(),a=t.#a(s,i),c=e.dstStart===s,l=e.dstEnd===s;if(c)return t.#a(s-1,i)?!0:(e.invokeDateOperation(r,Mt.TimeUnit.Hour),!1);if(l&&!n)return e.dstEnd=null,e.applyDateOperation(Mt.DateMathOp.Add,Mt.TimeUnit.Hour,o.length),!1;if(a)return!0;e.dstStart=null;let u=this.#r.hour.findNearestValue(s,n);if(u===null)return e.applyDateOperation(r,Mt.TimeUnit.Day,o.length),!1;if(this.#d(e)){let d=n?s-u:u-s;for(let A=0;A<d;A++)e.applyDateOperation(r,Mt.TimeUnit.Hour,o.length)}else e.setHours(u);return e.setMinutes(this.#l(this.#r.minute.values,n)),e.setSeconds(this.#l(this.#r.second.values,n)),!1}#f(e){if(!this.#i&&!this.#o)return;let r=e.getTime();if(this.#i&&r<this.#i.getTime())throw new Error(ti.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(this.#o&&r>this.#o.getTime())throw new Error(ti.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#g(e=!1){let r=e?Mt.DateMathOp.Subtract:Mt.DateMathOp.Add,n=new Mt.CronDate(this.#n),i=n.getTime(),o=0;for(;++o<ZM;){if(this.#f(n),!this.#u(n)){n.applyDateOperation(r,Mt.TimeUnit.Day,this.#r.hour.values.length);continue}if(!(this.#r.dayOfWeek.nthDay<=0||Math.ceil(n.getDate()/7)===this.#r.dayOfWeek.nthDay)){n.applyDateOperation(r,Mt.TimeUnit.Day,this.#r.hour.values.length);continue}if(!t.#a(n.getMonth()+1,this.#r.month.values)){n.applyDateOperation(r,Mt.TimeUnit.Month,this.#r.hour.values.length);continue}if(this.#m(n,r,e)){if(!t.#a(n.getMinutes(),this.#r.minute.values)){this.#p(n,r,e);continue}if(!t.#a(n.getSeconds(),this.#r.second.values)){this.#A(n,r,e);continue}if(i===n.getTime()){(r==="Add"||n.getMilliseconds()===0)&&n.applyDateOperation(r,Mt.TimeUnit.Second,this.#r.hour.values.length);continue}break}}if(o>ZM)throw new Error(ti.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return n.getMilliseconds()!==0&&n.setMilliseconds(0),this.#n=n,n}[Symbol.iterator](){return{next:()=>({value:this.#g(),done:!this.hasNext()})}}};ti.CronExpression=gm;ti.default=gm});var KM=y(YS=>{"use strict";Object.defineProperty(YS,"__esModule",{value:!0});YS.seededRandom=QAe;function BAe(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=Math.imul(e,16777619);return()=>e>>>0}function vAe(t){return()=>{let e=t+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}function QAe(t){let e=t?BAe(t)():Math.floor(Math.random()*1e10);return vAe(e)}});var mm=y(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.CronExpressionParser=ii.DayOfWeek=ii.Months=ii.CronUnit=ii.PredefinedExpressions=void 0;var TAe=HS(),DAe=GS(),kAe=KM(),ri=hm(),VS;(function(t){t["@yearly"]="0 0 0 1 1 *",t["@annually"]="0 0 0 1 1 *",t["@monthly"]="0 0 0 1 * *",t["@weekly"]="0 0 0 * * 0",t["@daily"]="0 0 0 * * *",t["@hourly"]="0 0 * * * *",t["@minutely"]="0 * * * * *",t["@secondly"]="* * * * * *",t["@weekdays"]="0 0 0 * * 1-5",t["@weekends"]="0 0 0 * * 0,6"})(VS||(ii.PredefinedExpressions=VS={}));var ni;(function(t){t.Second="Second",t.Minute="Minute",t.Hour="Hour",t.DayOfMonth="DayOfMonth",t.Month="Month",t.DayOfWeek="DayOfWeek"})(ni||(ii.CronUnit=ni={}));var WS;(function(t){t[t.jan=1]="jan",t[t.feb=2]="feb",t[t.mar=3]="mar",t[t.apr=4]="apr",t[t.may=5]="may",t[t.jun=6]="jun",t[t.jul=7]="jul",t[t.aug=8]="aug",t[t.sep=9]="sep",t[t.oct=10]="oct",t[t.nov=11]="nov",t[t.dec=12]="dec"})(WS||(ii.Months=WS={}));var JS;(function(t){t[t.sun=0]="sun",t[t.mon=1]="mon",t[t.tue=2]="tue",t[t.wed=3]="wed",t[t.thu=4]="thu",t[t.fri=5]="fri",t[t.sat=6]="sat"})(JS||(ii.DayOfWeek=JS={}));var ZS=class t{static parse(e,r={}){let{strict:n=!1,hashSeed:i}=r,o=(0,kAe.seededRandom)(i);e=VS[e]||e;let s=t.#e(e,n);if(!(s.dayOfMonth==="*"||s.dayOfWeek==="*"||!n))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");let a=t.#t(ni.Second,s.second,ri.CronSecond.constraints,o),c=t.#t(ni.Minute,s.minute,ri.CronMinute.constraints,o),l=t.#t(ni.Hour,s.hour,ri.CronHour.constraints,o),u=t.#t(ni.Month,s.month,ri.CronMonth.constraints,o),d=t.#t(ni.DayOfMonth,s.dayOfMonth,ri.CronDayOfMonth.constraints,o),{dayOfWeek:A,nthDayOfWeek:p}=t.#d(s.dayOfWeek),h=t.#t(ni.DayOfWeek,A,ri.CronDayOfWeek.constraints,o),f=new TAe.CronFieldCollection({second:new ri.CronSecond(a,{rawValue:s.second}),minute:new ri.CronMinute(c,{rawValue:s.minute}),hour:new ri.CronHour(l,{rawValue:s.hour}),dayOfMonth:new ri.CronDayOfMonth(d,{rawValue:s.dayOfMonth}),month:new ri.CronMonth(u,{rawValue:s.month}),dayOfWeek:new ri.CronDayOfWeek(h,{rawValue:s.dayOfWeek,nthDayOfWeek:p})});return new DAe.CronExpression(f,{...r,expression:e})}static#e(e,r){if(r&&!e.length)throw new Error("Invalid cron expression");e=e||"0 * * * * *";let n=e.trim().split(/\s+/);if(r&&n.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(n.length>6)throw new Error("Invalid cron expression, too many fields");let i=["*","*","*","*","*","0"];n.length<i.length&&n.unshift(...i.slice(n.length));let[o,s,a,c,l,u]=n;return{second:o,minute:s,hour:a,dayOfMonth:c,month:l,dayOfWeek:u}}static#t(e,r,n,i){if((e===ni.Month||e===ni.DayOfWeek)&&(r=r.replace(/[a-z]{3}/gi,o=>{o=o.toLowerCase();let s=WS[o]||JS[o];if(s===void 0)throw new Error(`Validation error, cannot resolve alias "${o}"`);return s.toString()})),!n.validChars.test(r))throw new Error(`Invalid characters, got value: ${r}`);return r=this.#n(r,n),r=this.#i(r,n,i),this.#o(e,r,n)}static#n(e,r){return e.replace(/[*?]/g,r.min+"-"+r.max)}static#i(e,r,n){let i=n();return e.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(o,s,a,c)=>{if(s&&a&&c){let l=parseInt(s,10),u=parseInt(a,10),d=parseInt(c,10);if(l>u)throw new Error(`Invalid range: ${l}-${u}, min > max`);if(d<=0)throw new Error(`Invalid step: ${d}, must be positive`);let A=Math.max(l,r.min),p=Math.floor(i*d),h=[];for(let f=Math.floor(A/d)*d+p;f<=u;f+=d)f>=A&&h.push(f);return h.join(",")}else if(s&&a){let l=parseInt(s,10),u=parseInt(a,10);if(l>u)throw new Error(`Invalid range: ${l}-${u}, min > max`);return String(Math.floor(i*(u-l+1))+l)}else if(c){let l=parseInt(c,10);if(l<=0)throw new Error(`Invalid step: ${l}, must be positive`);let u=Math.floor(i*l),d=[];for(let A=Math.floor(r.min/l)*l+u;A<=r.max;A+=l)A>=r.min&&d.push(A);return d.join(",")}else return String(Math.floor(i*(r.max-r.min+1)+r.min))})}static#o(e,r,n){let i=[];function o(a,c){if(Array.isArray(a))i.push(...a);else if(t.#A(c,a))i.push(a);else{let l=parseInt(a.toString(),10);if(!(l>=c.min&&l<=c.max))throw new Error(`Constraint error, got value ${a} expected range ${c.min}-${c.max}`);i.push(e===ni.DayOfWeek?l%7:a)}}return r.split(",").forEach(a=>{if(!(a.length>0))throw new Error("Invalid list value format");o(t.#r(e,a,n),n)}),i}static#r(e,r,n){let i=r.split("/");if(i.length>2)throw new Error(`Invalid repeat: ${r}`);return i.length===2?(isNaN(parseInt(i[0],10))||(i[0]=`${i[0]}-${n.max}`),t.#l(e,i[0],parseInt(i[1],10),n)):t.#l(e,r,1,n)}static#c(e,r,n){if(!(!isNaN(e)&&!isNaN(r)&&e>=n.min&&r<=n.max))throw new Error(`Constraint error, got range ${e}-${r} expected range ${n.min}-${n.max}`);if(e>r)throw new Error(`Invalid range: ${e}-${r}, min(${e}) > max(${r})`)}static#s(e){if(!(!isNaN(e)&&e>0))throw new Error(`Constraint error, cannot repeat at every ${e} time.`)}static#a(e,r,n,i){let o=[];e===ni.DayOfWeek&&n%7===0&&o.push(0);for(let s=r;s<=n;s+=i)o.indexOf(s)===-1&&o.push(s);return o}static#l(e,r,n,i){let o=r.split("-");if(o.length<=1)return isNaN(+r)?r:+r;let[s,a]=o.map(c=>parseInt(c,10));return this.#c(s,a,i),this.#s(n),this.#a(e,s,a,n)}static#d(e){let r=e.split("#");if(r.length<=1)return{dayOfWeek:r[0]};let n=+r[r.length-1],i=e.match(/([,-/])/);if(i!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${i?.[0]}\` special characters are incompatible`);if(!(r.length<=2&&!isNaN(n)&&n>=1&&n<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:r[0],nthDayOfWeek:n}}static#A(e,r){return e.chars.some(n=>r.toString().includes(n))}};ii.CronExpressionParser=ZS});var XM=y(Fo=>{"use strict";var RAe=Fo&&Fo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),NAe=Fo&&Fo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),OAe=Fo&&Fo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&RAe(r,e,n[i]);return NAe(r,e),r}})();Object.defineProperty(Fo,"__esModule",{value:!0});Fo.CronFileParser=void 0;var xAe=mm(),KS=class t{static async parseFile(e){let{readFile:r}=await Promise.resolve().then(()=>OAe(require("fs/promises"))),n=await r(e,"utf8");return t.#e(n)}static parseFileSync(e){let{readFileSync:r}=require("fs"),n=r(e,"utf8");return t.#e(n)}static#e(e){let r=e.split(`
102
- `),n={variables:{},expressions:[],errors:{}};for(let i of r){let o=i.trim();if(o.length===0||o.startsWith("#"))continue;let s=o.match(/^(.*)=(.*)$/);if(s){let[,a,c]=s;n.variables[a]=c.replace(/["']/g,"");continue}try{let a=t.#t(o);n.expressions.push(a.interval)}catch(a){n.errors[o]=a}}return n}static#t(e){let r=e.split(" ");return{interval:xAe.CronExpressionParser.parse(r.slice(0,5).join(" ")),command:r.slice(5,r.length)}}};Fo.CronFileParser=KS});var eP=y(pr=>{"use strict";var UAe=pr&&pr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),MAe=pr&&pr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&UAe(e,t,r)};Object.defineProperty(pr,"__esModule",{value:!0});pr.CronFileParser=pr.CronExpressionParser=pr.CronExpression=pr.CronFieldCollection=pr.CronDate=void 0;var PAe=mm(),LAe=dm();Object.defineProperty(pr,"CronDate",{enumerable:!0,get:function(){return LAe.CronDate}});var $Ae=HS();Object.defineProperty(pr,"CronFieldCollection",{enumerable:!0,get:function(){return $Ae.CronFieldCollection}});var FAe=GS();Object.defineProperty(pr,"CronExpression",{enumerable:!0,get:function(){return FAe.CronExpression}});var jAe=mm();Object.defineProperty(pr,"CronExpressionParser",{enumerable:!0,get:function(){return jAe.CronExpressionParser}});var zAe=XM();Object.defineProperty(pr,"CronFileParser",{enumerable:!0,get:function(){return zAe.CronFileParser}});MAe(hm(),pr);pr.default=PAe.CronExpressionParser});var Ti=y(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.Err=Kr.Valid=Kr.err=Kr.valid=void 0;var qAe=t=>new ym(t);Kr.valid=qAe;var HAe=t=>new Em(t);Kr.err=HAe;var ym=class{constructor(e){this.value=e}isValid(){return!0}isError(){return!this.isValid()}getValue(){return this.value}getError(){throw new Error("Tried to get error from a valid.")}map(e){return(0,Kr.valid)(e(this.value))}mapErr(e){return(0,Kr.valid)(this.value)}};Kr.Valid=ym;var Em=class{constructor(e){this.error=e}isError(){return!0}isValid(){return!this.isError()}getValue(){throw new Error("Tried to get success value from an error.")}getError(){return this.error}map(e){return(0,Kr.err)(this.error)}mapErr(e){return(0,Kr.err)(e(this.error))}};Kr.Err=Em});var Di=y(tP=>{"use strict";Object.defineProperty(tP,"__esModule",{value:!0})});var fa=y(XS=>{"use strict";Object.defineProperty(XS,"__esModule",{value:!0});jo();var Ue=Ti();Di();var GAe=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],YAe=["sun","mon","tue","wed","thu","fri","sat"],VAe=(t,e)=>e[t].lowerLimit===e.preset[t].minValue&&e[t].upperLimit===e.preset[t].maxValue,wA=(t,e,r)=>{if(e==="months"&&r.useAliases&&GAe.indexOf(t.toLowerCase())!==-1||e==="daysOfWeek"&&r.useAliases&&YAe.indexOf(t.toLowerCase())!==-1)return(0,Ue.valid)(!0);let n=Number(t);if(Number.isNaN(n))return(0,Ue.err)(`Element '${t}' of ${e} field is invalid.`);if(n%1!==0)return(0,Ue.err)(`Element '${t}' of ${e} field is not an integer.`);let{lowerLimit:i}=r[e],{upperLimit:o}=r[e];return i&&n<i?(0,Ue.err)(`Number '${n}' of ${e} field is smaller than lower limit '${i}'.`):o&&n>o?(0,Ue.err)(`Number '${n}' of ${e} field is bigger than upper limit '${o}'.`):(0,Ue.valid)(!0)},WAe=(t,e,r)=>{if(t==="*")return VAe(e,r)?(0,Ue.valid)(!0):(0,Ue.err)(`Field ${e} uses wildcard '*', but is limited to ${r[e].lowerLimit}-${r[e].upperLimit}.`);if(t==="")return(0,Ue.err)(`One of the elements is empty in ${e} field.`);if(e==="daysOfMonth"&&r.useLastDayOfMonth&&t==="L")return(0,Ue.valid)(!0);if(e==="daysOfWeek"&&r.useLastDayOfWeek&&t.endsWith("L")){let n=t.slice(0,-1);return n===""?(0,Ue.valid)(!0):wA(n,e,r)}if(e==="daysOfMonth"&&r.useNearestWeekday&&t.endsWith("W")){let n=t.slice(0,-1);return n===""?(0,Ue.err)("The 'W' must be preceded by a day."):r.useLastDayOfMonth&&n==="L"?(0,Ue.valid)(!0):wA(n,e,r)}if(e==="daysOfWeek"&&r.useNthWeekdayOfMonth&&t.indexOf("#")!==-1){let[n,i,...o]=t.split("#");if(o.length!==0)return(0,Ue.err)(`Unexpected number of '#' in ${t}, can only be used once.`);let s=Number(i);return!i||Number.isNaN(s)?(0,Ue.err)(`Unexpected value following the '#' symbol, a positive number was expected but found ${i}.`):s>5?(0,Ue.err)("Number of occurrence of the day of the week cannot be greater than 5."):wA(n,e,r)}return wA(t,e,r)},rP=(t,e,r,n)=>t==="*"?(0,Ue.err)(`'*' can't be part of a range in ${e} field.`):t===""?(0,Ue.err)(`One of the range elements is empty in ${e} field.`):r.useLastDayOfMonth&&e==="daysOfMonth"&&t==="L"&&n===0?(0,Ue.valid)(!0):wA(t,e,r),JAe=(t,e,r)=>{let n=t.split("-");if(n.length>2)return(0,Ue.err)(`List element '${t}' is not valid. (More than one '-').`);if(n.length===1)return WAe(n[0],e,r);if(n.length===2){let i=rP(n[0],e,r,0),o=rP(n[1],e,r,1);return i.isError()?i:o.isError()?o:Number(n[0])>Number(n[1])?(0,Ue.err)(`Lower range end '${n[0]}' is bigger than upper range end '${n[1]}' of ${e} field.`):(0,Ue.valid)(!0)}return(0,Ue.err)("Some other error in checkFirstStepElement (rangeArray less than 1)")},ZAe=(t,e,r)=>{let n=t.split("/");if(n.length>2)return(0,Ue.err)(`List element '${t}' is not valid. (More than one '/').`);if(!r.allowStepping)return(0,Ue.err)("Stepping ('/') is not allowed.");let i=JAe(n[0],e,r);if(i.isError())return i;if(n.length===2){let o=n[1];if(!o)return(0,Ue.err)(`Second step element '${o}' of '${t}' is not valid (doesnt exist).`);if(Number.isNaN(Number(o)))return(0,Ue.err)(`Second step element '${o}' of '${t}' is not valid (not a number).`);let s=Number(o);if(s===0)return(0,Ue.err)(`Second step element '${o}' of '${t}' cannot be zero.`);if(s<0)return(0,Ue.err)(`Second step element '${o}' of '${t}' cannot be negative.`);if(s%1!==0)return(0,Ue.err)(`Second step element '${o}' of '${t}' is not an integer.`);let{lowerLimit:a,upperLimit:c}=r[e];if(c&&s>c)return(0,Ue.err)(`Second step element '${o}' of '${t}' is bigger than the upper limit '${c}'.`);let l=n[0].split("-");if(l.length===2){let u=Number(l[0]),d=Number(l[1]);if(!Number.isNaN(u)&&!Number.isNaN(d)){if(s<=0)return(0,Ue.err)(`Step value '${o}' must be greater than 0.`);let A=d-u+1;if(s>=A)return(0,Ue.err)(`Step value '${o}' is too large for the range '${u}-${d}'.`)}}}return(0,Ue.valid)(!0)},KAe=(t,e,r)=>{if(!["seconds","minutes","hours","daysOfMonth","months","daysOfWeek","years"].includes(e))return(0,Ue.err)([`Cron field type '${e}' does not exist.`]);if(t==="?")return e==="daysOfMonth"||e==="daysOfWeek"?r.useBlankDay?(0,Ue.valid)(!0):(0,Ue.err)([`useBlankDay is not enabled, but is used in ${e} field.`]):(0,Ue.err)([`blank notation is not allowed in ${e} field.`]);let n=t.split(","),i=[];if(n.forEach(s=>{i.push(ZAe(s,e,r))}),i.every(s=>s.isValid()))return(0,Ue.valid)(!0);let o=[];return i.forEach(s=>{s.isError()&&o.push(s.getError())}),(0,Ue.err)(o)};XS.default=KAe});var nP=y(_A=>{"use strict";var XAe=_A&&_A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_A,"__esModule",{value:!0});jo();var epe=Ti(),tpe=XAe(fa());Di();var rpe=(t,e)=>{if(!t.seconds)return(0,epe.err)(["seconds field is undefined, but useSeconds options is enabled."]);let{seconds:r}=t;return(0,tpe.default)(r,"seconds",e)};_A.default=rpe});var iP=y(BA=>{"use strict";var npe=BA&&BA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BA,"__esModule",{value:!0});jo();var ipe=Ti(),ope=npe(fa());Di();var spe=(t,e)=>{if(!t.minutes)return(0,ipe.err)(["minutes field is undefined."]);let{minutes:r}=t;return(0,ope.default)(r,"minutes",e)};BA.default=spe});var oP=y(vA=>{"use strict";var ape=vA&&vA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vA,"__esModule",{value:!0});jo();var cpe=Ti(),lpe=ape(fa());Di();var upe=(t,e)=>{if(!t.hours)return(0,cpe.err)(["hours field is undefined."]);let{hours:r}=t;return(0,lpe.default)(r,"hours",e)};vA.default=upe});var sP=y(TA=>{"use strict";var dpe=TA&&TA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(TA,"__esModule",{value:!0});jo();var QA=Ti(),Ape=dpe(fa());Di();var ppe=(t,e)=>{if(!t.daysOfMonth)return(0,QA.err)(["daysOfMonth field is undefined."]);let{daysOfMonth:r}=t;return e.allowOnlyOneBlankDayField&&e.useBlankDay&&t.daysOfMonth==="?"&&t.daysOfWeek==="?"?(0,QA.err)(["Cannot use blank value in daysOfMonth and daysOfWeek field when allowOnlyOneBlankDayField option is enabled."]):e.mustHaveBlankDayField&&t.daysOfMonth!=="?"&&t.daysOfWeek!=="?"?(0,QA.err)(["Cannot specify both daysOfMonth and daysOfWeek field when mustHaveBlankDayField option is enabled."]):e.useLastDayOfMonth&&t.daysOfMonth.indexOf("L")!==-1&&t.daysOfMonth.match(/[,/]/)?(0,QA.err)(["Cannot specify last day of month with lists, or ranges (symbols ,/)."]):e.useNearestWeekday&&t.daysOfMonth.indexOf("W")!==-1&&t.daysOfMonth.match(/[,/-]/)?(0,QA.err)(["Cannot specify nearest weekday with lists, steps or ranges (symbols ,-/)."]):(0,Ape.default)(r,"daysOfMonth",e)};TA.default=ppe});var aP=y(DA=>{"use strict";var hpe=DA&&DA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(DA,"__esModule",{value:!0});jo();var fpe=Ti(),gpe=hpe(fa());Di();var mpe=(t,e)=>{if(!t.months)return(0,fpe.err)(["months field is undefined."]);let{months:r}=t;return(0,gpe.default)(r,"months",e)};DA.default=mpe});var cP=y(RA=>{"use strict";var ype=RA&&RA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(RA,"__esModule",{value:!0});jo();var kA=Ti(),Epe=ype(fa());Di();var Ipe=(t,e)=>{if(!t.daysOfWeek)return(0,kA.err)(["daysOfWeek field is undefined."]);let{daysOfWeek:r}=t;return e.allowOnlyOneBlankDayField&&t.daysOfMonth==="?"&&t.daysOfWeek==="?"?(0,kA.err)(["Cannot use blank value in daysOfMonth and daysOfWeek field when allowOnlyOneBlankDayField option is enabled."]):e.mustHaveBlankDayField&&t.daysOfMonth!=="?"&&t.daysOfWeek!=="?"?(0,kA.err)(["Cannot specify both daysOfMonth and daysOfWeek field when mustHaveBlankDayField option is enabled."]):e.useLastDayOfWeek&&t.daysOfWeek.indexOf("L")!==-1&&t.daysOfWeek.match(/[,/-]/)?(0,kA.err)(["Cannot specify last day of week with lists, steps or ranges (symbols ,-/)."]):e.useNthWeekdayOfMonth&&t.daysOfWeek.indexOf("#")!==-1&&t.daysOfWeek.match(/[,/-]/)?(0,kA.err)(["Cannot specify Nth weekday of month with lists, steps or ranges (symbols ,-/)."]):(0,Epe.default)(r,"daysOfWeek",e)};RA.default=Ipe});var lP=y(NA=>{"use strict";var Cpe=NA&&NA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(NA,"__esModule",{value:!0});jo();var bpe=Ti(),Spe=Cpe(fa());Di();var wpe=(t,e)=>{if(!t.years)return(0,bpe.err)(["years field is undefined, but useYears option is enabled."]);let{years:r}=t;return(0,Spe.default)(r,"years",e)};NA.default=wpe});var fP=y((S2e,hP)=>{"use strict";function bc(t){this._maxSize=t,this.clear()}bc.prototype.clear=function(){this._size=0,this._values=Object.create(null)};bc.prototype.get=function(t){return this._values[t]};bc.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var _pe=/[^.^\]^[]+|(?=\[\]|\.\.)/g,pP=/^\d+$/,Bpe=/^\d/,vpe=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Qpe=/^\s*(['"]?)(.*?)(\1)\s*$/,rw=512,uP=new bc(rw),dP=new bc(rw),AP=new bc(rw);hP.exports={Cache:bc,split:tw,normalizePath:ew,setter:function(t){var e=ew(t);return dP.get(t)||dP.set(t,function(n,i){for(var o=0,s=e.length,a=n;o<s-1;){var c=e[o];if(c==="__proto__"||c==="constructor"||c==="prototype")return n;a=a[e[o++]]}a[e[o]]=i})},getter:function(t,e){var r=ew(t);return AP.get(t)||AP.set(t,function(i){for(var o=0,s=r.length;o<s;)if(i!=null||!e)i=i[r[o++]];else return;return i})},join:function(t){return t.reduce(function(e,r){return e+(nw(r)||pP.test(r)?"["+r+"]":(e?".":"")+r)},"")},forEach:function(t,e,r){Tpe(Array.isArray(t)?t:tw(t),e,r)}};function ew(t){return uP.get(t)||uP.set(t,tw(t).map(function(e){return e.replace(Qpe,"$2")}))}function tw(t){return t.match(_pe)||[""]}function Tpe(t,e,r){var n=t.length,i,o,s,a;for(o=0;o<n;o++)i=t[o],i&&(Rpe(i)&&(i='"'+i+'"'),a=nw(i),s=!a&&/^\d+$/.test(i),e.call(r,i,a,s,o,t))}function nw(t){return typeof t=="string"&&t&&["'",'"'].indexOf(t.charAt(0))!==-1}function Dpe(t){return t.match(Bpe)&&!t.match(pP)}function kpe(t){return vpe.test(t)}function Rpe(t){return!nw(t)&&(Dpe(t)||kpe(t))}});var yP=y((w2e,mP)=>{"use strict";var Npe=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Im=t=>t.match(Npe)||[],Cm=t=>t[0].toUpperCase()+t.slice(1),iw=(t,e)=>Im(t).join(e).toLowerCase(),gP=t=>Im(t).reduce((e,r)=>`${e}${e?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),Ope=t=>Cm(gP(t)),xpe=t=>iw(t,"_"),Upe=t=>iw(t,"-"),Mpe=t=>Cm(iw(t," ")),Ppe=t=>Im(t).map(Cm).join(" ");mP.exports={words:Im,upperFirst:Cm,camelCase:gP,pascalCase:Ope,snakeCase:xpe,kebabCase:Upe,sentenceCase:Mpe,titleCase:Ppe}});var IP=y((_2e,ow)=>{"use strict";ow.exports=function(t){return EP(Lpe(t),t)};ow.exports.array=EP;function EP(t,e){var r=t.length,n=new Array(r),i={},o=r,s=$pe(e),a=Fpe(t);for(e.forEach(function(l){if(!a.has(l[0])||!a.has(l[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});o--;)i[o]||c(t[o],o,new Set);return n;function c(l,u,d){if(d.has(l)){var A;try{A=", node was:"+JSON.stringify(l)}catch{A=""}throw new Error("Cyclic dependency"+A)}if(!a.has(l))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(l));if(!i[u]){i[u]=!0;var p=s.get(l)||new Set;if(p=Array.from(p),u=p.length){d.add(l);do{var h=p[--u];c(h,a.get(h),d)}while(u);d.delete(l)}n[--r]=l}}}function Lpe(t){for(var e=new Set,r=0,n=t.length;r<n;r++){var i=t[r];e.add(i[0]),e.add(i[1])}return Array.from(e)}function $pe(t){for(var e=new Map,r=0,n=t.length;r<n;r++){var i=t[r];e.has(i[0])||e.set(i[0],new Set),e.has(i[1])||e.set(i[1],new Set),e.get(i[0]).add(i[1])}return e}function Fpe(t){for(var e=new Map,r=0,n=t.length;r<n;r++)e.set(t[r],r);return e}});var Aw={};_D(Aw,{ArraySchema:()=>$A,BooleanSchema:()=>UA,DateSchema:()=>cu,LazySchema:()=>Tm,MixedSchema:()=>xA,NumberSchema:()=>PA,ObjectSchema:()=>LA,Schema:()=>hr,StringSchema:()=>MA,TupleSchema:()=>FA,ValidationError:()=>cr,addMethod:()=>yhe,array:()=>zP,bool:()=>UP,boolean:()=>UP,date:()=>dw,defaultLocale:()=>RP,getIn:()=>lw,isSchema:()=>Sc,lazy:()=>ghe,mixed:()=>xP,number:()=>PP,object:()=>jP,printValue:()=>qo,reach:()=>Jpe,ref:()=>Wpe,setLocale:()=>mhe,string:()=>MP,tuple:()=>qP});function Ype(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function CP(t,e=!1){if(t==null||t===!0||t===!1)return""+t;let r=typeof t;if(r==="number")return Ype(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return Hpe.call(t).replace(Gpe,"Symbol($1)");let n=jpe.call(t).slice(8,-1);return n==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):n==="Error"||t instanceof Error?"["+zpe.call(t)+"]":n==="RegExp"?qpe.call(t):null}function qo(t,e){let r=CP(t,e);return r!==null?r:JSON.stringify(t,function(n,i){let o=CP(this[n],e);return o!==null?o:i},2)}function vP(t){return t==null?[]:[].concat(t)}function Wpe(t,e){return new Ho(t,e)}function su(t){function e({value:r,path:n="",options:i,originalValue:o,schema:s},a,c){let{name:l,test:u,params:d,message:A,skipAbsent:p}=t,{parent:h,context:f,abortEarly:E=s.spec.abortEarly,disableStackTrace:S=s.spec.disableStackTrace}=i,B={value:r,parent:h,context:f};function _(Ae={}){let Oe=NP(Object.assign({value:r,originalValue:o,label:s.spec.label,path:Ae.path||n,spec:s.spec,disableStackTrace:Ae.disableStackTrace||S},d,Ae.params),B),Ye=new cr(cr.formatError(Ae.message||A,Oe),r,Oe.path,Ae.type||l,Oe.disableStackTrace);return Ye.params=Oe,Ye}let v=E?a:c,T={path:n,parent:h,type:l,from:i.from,createError:_,resolve(Ae){return OP(Ae,B)},options:i,originalValue:o,schema:s},$=Ae=>{cr.isError(Ae)?v(Ae):Ae?c(null):v(_())},k=Ae=>{cr.isError(Ae)?v(Ae):a(Ae)};if(p&&ki(r))return $(!0);let P;try{var X;if(P=u.call(T,r,T),typeof((X=P)==null?void 0:X.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${T.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(P).then($,k)}}catch(Ae){k(Ae);return}$(P)}return e.OPTIONS=t,e}function NP(t,e){if(!t)return t;for(let r of Object.keys(t))t[r]=OP(t[r],e);return t}function OP(t,e){return Ho.isRef(t)?t.getValue(e.value,e.parent,e.context):t}function lw(t,e,r,n=r){let i,o,s;return e?((0,oi.forEach)(e,(a,c,l)=>{let u=c?a.slice(1,a.length-1):a;t=t.resolve({context:n,parent:i,value:r});let d=t.type==="tuple",A=l?parseInt(u,10):0;if(t.innerType||d){if(d&&!l)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&A>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${e}. because there is no value at that index. `);i=r,r=r&&r[A],t=d?t.spec.types[A]:t.innerType}if(!l){if(!t.fields||!t.fields[u])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${s} which is a type: "${t.type}")`);i=r,r=r&&r[u],t=t.fields[u]}o=u,s=c?"["+a+"]":"."+a}),{schema:t,parent:i,parentPath:o}):{parent:i,parentPath:e,schema:t}}function Jpe(t,e,r,n){return lw(t,e,r,n).schema}function au(t,e=new Map){if(Sc(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let r;if(t instanceof Date)r=new Date(t.getTime()),e.set(t,r);else if(t instanceof RegExp)r=new RegExp(t),e.set(t,r);else if(Array.isArray(t)){r=new Array(t.length),e.set(t,r);for(let n=0;n<t.length;n++)r[n]=au(t[n],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(let[n,i]of t.entries())r.set(n,au(i,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(let n of t)r.add(au(n,e))}else if(t instanceof Object){r={},e.set(t,r);for(let[n,i]of Object.entries(t))r[n]=au(i,e)}else throw Error(`Unable to clone ${t}`);return r}function Zpe(t){if(!(t!=null&&t.length))return;let e=[],r="",n=!1,i=!1;for(let o=0;o<t.length;o++){let s=t[o];if(s==="["&&!i){r&&(e.push(...r.split(".").filter(Boolean)),r=""),n=!0;continue}if(s==="]"&&!i){r&&(/^\d+$/.test(r)?e.push(r):e.push(r.replace(/^"|"$/g,"")),r=""),n=!1;continue}if(s==='"'){i=!i;continue}if(s==="."&&!n&&!i){r&&(e.push(r),r="");continue}r+=s}return r&&e.push(...r.split(".").filter(Boolean)),e}function Kpe(t,e){let r=e?`${e}.${t.path}`:t.path;return t.errors.map(n=>({message:n,path:Zpe(r)}))}function uw(t,e){var r;if(!((r=t.inner)!=null&&r.length)&&t.errors.length)return Kpe(t,e);let n=e?`${e}.${t.path}`:t.path;return t.inner.flatMap(i=>uw(i,n))}function xP(t){return new xA(t)}function UP(){return new UA}function the(t){let e=cw(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let r=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(r=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(r=0-r)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+r,e.second,e.millisecond)}function cw(t){var e,r;let n=ehe.exec(t);return n?{year:vs(n[1]),month:vs(n[2],1)-1,day:vs(n[3],1),hour:vs(n[4]),minute:vs(n[5]),second:vs(n[6]),millisecond:n[7]?vs(n[7].substring(0,3)):0,precision:(e=(r=n[7])==null?void 0:r.length)!=null?e:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:vs(n[10]),minuteOffset:vs(n[11])}:null}function vs(t,e=0){return Number(t)||e}function MP(){return new MA}function PP(){return new PA}function dw(){return new cu}function phe(t,e=[]){let r=[],n=new Set,i=new Set(e.map(([s,a])=>`${s}-${a}`));function o(s,a){let c=(0,oi.split)(s)[0];n.add(c),i.has(`${a}-${c}`)||r.push([a,c])}for(let s of Object.keys(t)){let a=t[s];n.add(s),Ho.isRef(a)&&a.isSibling?o(a.path,s):Sc(a)&&"deps"in a&&a.deps.forEach(c=>o(c,s))}return BP.default.array(Array.from(n),r).reverse()}function bP(t,e){let r=1/0;return t.some((n,i)=>{var o;if((o=e.path)!=null&&o.includes(n))return r=i,!0}),r}function $P(t){return(e,r)=>bP(t,e)-bP(t,r)}function _m(t){if("fields"in t){let e={};for(let[r,n]of Object.entries(t.fields))e[r]=_m(n);return t.setFields(e)}if(t.type==="array"){let e=t.optional();return e.innerType&&(e.innerType=_m(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(_m)}):"optional"in t?t.optional():t}function wP(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(n=>r.indexOf(n)===-1)}function jP(t){return new LA(t)}function zP(t){return new $A(t)}function qP(t){return new FA(t)}function ghe(t){return new Tm(t)}function _P(t){try{return t()}catch(e){if(cr.isError(e))return Promise.reject(e);throw e}}function mhe(t){Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(r=>{RP[e][r]=t[e][r]})})}function yhe(t,e,r){if(!t||!Sc(t.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof e!="string")throw new TypeError("A Method name must be provided");if(typeof r!="function")throw new TypeError("Method function must be provided");t.prototype[e]=r}var oi,OA,BP,jpe,zpe,qpe,Hpe,Gpe,QP,TP,DP,Vpe,Bm,cr,zo,Xr,ga,sw,aw,Sm,wm,kP,RP,Sc,vm,bm,Ho,ki,Qm,hr,Xpe,xA,UA,ehe,rhe,nhe,ihe,ohe,she,ahe,che,lhe,uhe,MA,dhe,PA,LP,Ahe,cu,FP,hhe,SP,fhe,LA,$A,FA,Tm,pw=ft(()=>{"use strict";oi=Qe(fP()),OA=Qe(yP()),BP=Qe(IP()),jpe=Object.prototype.toString,zpe=Error.prototype.toString,qpe=RegExp.prototype.toString,Hpe=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Gpe=/^Symbol\((.*)\)(.*)$/;Vpe=/\$\{\s*(\w+)\s*\}/g;QP=Symbol.toStringTag;Bm=class{constructor(e,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[QP]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],vP(e).forEach(o=>{if(cr.isError(o)){this.errors.push(...o.errors);let s=o.inner.length?o.inner:[o];this.inner.push(...s)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}};TP=Symbol.hasInstance;DP=Symbol.toStringTag;cr=class t extends Error{static formatError(e,r){let n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof e=="string"?e.replace(Vpe,(i,o)=>qo(r[o])):typeof e=="function"?e(r):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,r,n,i,o){let s=new Bm(e,r,n,i);if(o)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[DP]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,t)}static[TP](e){return Bm[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}},zo={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:r,originalValue:n})=>{let i=n!=null&&n!==r?` (cast from the value \`${qo(n,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${qo(r,!0)}\``+i:`${t} must match the configured type. The validated value was: \`${qo(r,!0)}\``+i}},Xr={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},ga={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},sw={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},aw={isValue:"${path} field must be ${value}"},Sm={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},wm={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},kP={notType:t=>{let{path:e,value:r,spec:n}=t,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${e} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${qo(r,!0)}\``;if(r.length>i)return`${e} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${qo(r,!0)}\``}return cr.formatError(zo.notType,t)}},RP=Object.assign(Object.create(null),{mixed:zo,string:Xr,number:ga,date:sw,object:Sm,array:wm,boolean:aw,tuple:kP}),Sc=t=>t&&t.__isYupSchema__,vm=class t{static fromOptions(e,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:o}=r,s=typeof n=="function"?n:(...a)=>a.every(c=>c===n);return new t(e,(a,c)=>{var l;let u=s(...a)?i:o;return(l=u?.(c))!=null?l:c})}constructor(e,r){this.fn=void 0,this.refs=e,this.refs=e,this.fn=r}resolve(e,r){let n=this.refs.map(o=>o.getValue(r?.value,r?.parent,r?.context)),i=this.fn(n,e,r);if(i===void 0||i===e)return e;if(!Sc(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}},bm={context:"$",value:"."};Ho=class{constructor(e,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===bm.context,this.isValue=this.key[0]===bm.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?bm.context:this.isValue?bm.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,oi.getter)(this.path,!0),this.map=r.map}getValue(e,r,n){let i=this.isContext?n:this.isValue?e:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(e,r){return this.getValue(e,r?.parent,r?.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}};Ho.prototype.__isYupRef=!0;ki=t=>t==null;Qm=class t extends Set{describe(){let e=[];for(let r of this.values())e.push(Ho.isRef(r)?r.describe():r);return e}resolveAll(e){let r=[];for(let n of this.values())r.push(e(n));return r}clone(){return new t(this.values())}merge(e,r){let n=this.clone();return e.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}};hr=class{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Qm,this._blacklist=new Qm,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(zo.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e?.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=au(Object.assign({},this.spec,e)),r}label(e){let r=this.clone();return r.spec.label=e,r}meta(...e){if(e.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},e[0]),r}withMutation(e){let r=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=r,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let r=this,n=e.clone(),i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=r._blacklist.merge(e._blacklist,e._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(o=>{e.tests.forEach(s=>{o.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,o)=>o.resolve(i,e),r),r=r.resolve(e)}return r}resolveOptions(e){var r,n,i,o;return Object.assign({},e,{from:e.from||[],strict:(r=e.strict)!=null?r:this.spec.strict,abortEarly:(n=e.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=e.recursive)!=null?i:this.spec.recursive,disableStackTrace:(o=e.disableStackTrace)!=null?o:this.spec.disableStackTrace})}cast(e,r={}){let n=this.resolve(Object.assign({},r,{value:e})),i=r.assert==="ignore-optionality",o=n._cast(e,r);if(r.assert!==!1&&!n.isType(o)){if(i&&ki(o))return o;let s=qo(e),a=qo(o);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
101
+ ${e.message}`)}},aue=({newValue:t,value:e,maxSize:r,indent:n})=>t!==void 0?JSON.stringify(t,void 0,n):typeof e=="number"?hx(e,r):zx(e,r)});var hU=y(pU=>{"use strict";Object.defineProperty(pU,"__esModule",{value:!0})});var ca=y($g=>{"use strict";Object.defineProperty($g,"__esModule",{value:!0});$g.CronField=void 0;var nS=class t{#e=!1;#t=!1;#n=!1;#i=[];options={rawValue:""};static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(e,r={rawValue:""}){if(!Array.isArray(e))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(e.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...r,rawValue:r.rawValue??""},this.#i=e.sort(t.sorter),this.#n=this.options.wildcard!==void 0?this.options.wildcard:this.#o(),this.#e=this.options.rawValue.includes("L")||e.includes("L"),this.#t=this.options.rawValue.includes("?")||e.includes("?")}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return this.#e}get hasQuestionMarkChar(){return this.#t}get isWildcard(){return this.#n}get values(){return this.#i}static sorter(e,r){let n=typeof e=="number",i=typeof r=="number";return n&&i?e-r:!n&&!i?e.localeCompare(r):n?-1:1}static findNearestValueInList(e,r,n=!1){if(n){for(let i=e.length-1;i>=0;i--)if(e[i]<r)return e[i];return null}for(let i=0;i<e.length;i++)if(e[i]>r)return e[i];return null}findNearestValue(e,r=!1){return this.constructor.findNearestValueInList(this.values,e,r)}serialize(){return{wildcard:this.#n,values:this.#i}}validate(){let e,r=this.chars.length>0?` or chars ${this.chars.join("")}`:"",n=a=>c=>new RegExp(`^\\d{0,2}${c}$`).test(a),i=a=>(e=a,typeof a=="number"?a>=this.min&&a<=this.max:this.chars.some(n(a)));if(!this.#i.every(i))throw new Error(`${this.constructor.name} Validation error, got value ${e} expected range ${this.min}-${this.max}${r}`);let s=this.#i.find((a,c)=>this.#i.indexOf(a)!==c);if(s)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${s}`)}#o(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(e,r)=>r+this.min).every(e=>this.#i.includes(e))}};$g.CronField=nS});var fU=y(Fg=>{"use strict";Object.defineProperty(Fg,"__esModule",{value:!0});Fg.CronDayOfMonth=void 0;var cue=ca(),lue=1,uue=31,due=Object.freeze(["L"]),iS=class extends cue.CronField{static get min(){return lue}static get max(){return uue}static get chars(){return due}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};Fg.CronDayOfMonth=iS});var gU=y(jg=>{"use strict";Object.defineProperty(jg,"__esModule",{value:!0});jg.CronDayOfWeek=void 0;var Aue=ca(),pue=0,hue=7,fue=Object.freeze(["L"]),oS=class extends Aue.CronField{static get min(){return pue}static get max(){return hue}static get chars(){return fue}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};jg.CronDayOfWeek=oS});var mU=y(zg=>{"use strict";Object.defineProperty(zg,"__esModule",{value:!0});zg.CronHour=void 0;var gue=ca(),mue=0,yue=23,Eue=Object.freeze([]),sS=class extends gue.CronField{static get min(){return mue}static get max(){return yue}static get chars(){return Eue}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};zg.CronHour=sS});var yU=y(qg=>{"use strict";Object.defineProperty(qg,"__esModule",{value:!0});qg.CronMinute=void 0;var Iue=ca(),Cue=0,bue=59,Sue=Object.freeze([]),aS=class extends Iue.CronField{static get min(){return Cue}static get max(){return bue}static get chars(){return Sue}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};qg.CronMinute=aS});var VM=y(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});var _s=class extends Error{},mS=class extends _s{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},yS=class extends _s{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},ES=class extends _s{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},da=class extends _s{},Kg=class extends _s{constructor(e){super(`Invalid unit ${e}`)}},pr=class extends _s{},$o=class extends _s{constructor(){super("Zone is an abstract class")}},te="numeric",Qi="short",En="long",Xg={year:te,month:te,day:te},WU={year:te,month:Qi,day:te},wue={year:te,month:Qi,day:te,weekday:Qi},JU={year:te,month:En,day:te},ZU={year:te,month:En,day:te,weekday:En},KU={hour:te,minute:te},XU={hour:te,minute:te,second:te},eM={hour:te,minute:te,second:te,timeZoneName:Qi},tM={hour:te,minute:te,second:te,timeZoneName:En},rM={hour:te,minute:te,hourCycle:"h23"},nM={hour:te,minute:te,second:te,hourCycle:"h23"},iM={hour:te,minute:te,second:te,hourCycle:"h23",timeZoneName:Qi},oM={hour:te,minute:te,second:te,hourCycle:"h23",timeZoneName:En},sM={year:te,month:te,day:te,hour:te,minute:te},aM={year:te,month:te,day:te,hour:te,minute:te,second:te},cM={year:te,month:Qi,day:te,hour:te,minute:te},lM={year:te,month:Qi,day:te,hour:te,minute:te,second:te},_ue={year:te,month:Qi,day:te,weekday:Qi,hour:te,minute:te},uM={year:te,month:En,day:te,hour:te,minute:te,timeZoneName:Qi},dM={year:te,month:En,day:te,hour:te,minute:te,second:te,timeZoneName:Qi},AM={year:te,month:En,day:te,weekday:En,hour:te,minute:te,timeZoneName:En},pM={year:te,month:En,day:te,weekday:En,hour:te,minute:te,second:te,timeZoneName:En},pa=class{get type(){throw new $o}get name(){throw new $o}get ianaName(){return this.name}get isUniversal(){throw new $o}offsetName(e,r){throw new $o}formatOffset(e,r){throw new $o}offset(e){throw new $o}equals(e){throw new $o}get isValid(){throw new $o}},cS=null,EA=class t extends pa{static get instance(){return cS===null&&(cS=new t),cS}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return wM(e,r,n)}formatOffset(e,r){return yA(this.offset(e),r)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},IS=new Map;function Bue(t){let e=IS.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),IS.set(t,e)),e}var vue={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Que(t,e){let r=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,i,o,s,a,c,l,u]=n;return[s,i,o,a,c,l,u]}function Tue(t,e){let r=t.formatToParts(e),n=[];for(let i=0;i<r.length;i++){let{type:o,value:s}=r[i],a=vue[o];o==="era"?n[a]=s:De(a)||(n[a]=parseInt(s,10))}return n}var lS=new Map,Bs=class t extends pa{static create(e){let r=lS.get(e);return r===void 0&&lS.set(e,r=new t(e)),r}static resetCache(){lS.clear(),IS.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=t.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return wM(e,r,n,this.name)}formatOffset(e,r){return yA(this.offset(e),r)}offset(e){if(!this.valid)return NaN;let r=new Date(e);if(isNaN(r))return NaN;let n=Bue(this.name),[i,o,s,a,c,l,u]=n.formatToParts?Tue(n,r):Que(n,r);a==="BC"&&(i=-Math.abs(i)+1);let A=sm({year:i,month:o,day:s,hour:c===24?0:c,minute:l,second:u,millisecond:0}),p=+r,h=p%1e3;return p-=h>=0?h:1e3+h,(A-p)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},EU={};function Due(t,e={}){let r=JSON.stringify([t,e]),n=EU[r];return n||(n=new Intl.ListFormat(t,e),EU[r]=n),n}var CS=new Map;function bS(t,e={}){let r=JSON.stringify([t,e]),n=CS.get(r);return n===void 0&&(n=new Intl.DateTimeFormat(t,e),CS.set(r,n)),n}var SS=new Map;function kue(t,e={}){let r=JSON.stringify([t,e]),n=SS.get(r);return n===void 0&&(n=new Intl.NumberFormat(t,e),SS.set(r,n)),n}var wS=new Map;function Rue(t,e={}){let{base:r,...n}=e,i=JSON.stringify([t,n]),o=wS.get(i);return o===void 0&&(o=new Intl.RelativeTimeFormat(t,e),wS.set(i,o)),o}var fA=null;function Nue(){return fA||(fA=new Intl.DateTimeFormat().resolvedOptions().locale,fA)}var _S=new Map;function hM(t){let e=_S.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),_S.set(t,e)),e}var BS=new Map;function Oue(t){let e=BS.get(t);if(!e){let r=new Intl.Locale(t);e="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,"minimalDays"in e||(e={...fM,...e}),BS.set(t,e)}return e}function xue(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let r=t.indexOf("-u-");if(r===-1)return[t];{let n,i;try{n=bS(t).resolvedOptions(),i=t}catch{let c=t.substring(0,r);n=bS(c).resolvedOptions(),i=c}let{numberingSystem:o,calendar:s}=n;return[i,o,s]}}function Uue(t,e,r){return(r||e)&&(t.includes("-u-")||(t+="-u"),r&&(t+=`-ca-${r}`),e&&(t+=`-nu-${e}`)),t}function Mue(t){let e=[];for(let r=1;r<=12;r++){let n=Bt.utc(2009,r,1);e.push(t(n))}return e}function Pue(t){let e=[];for(let r=1;r<=7;r++){let n=Bt.utc(2016,11,13+r);e.push(t(n))}return e}function Hg(t,e,r,n){let i=t.listingMode();return i==="error"?null:i==="en"?r(e):n(e)}function Lue(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||hM(t.locale).numberingSystem==="latn"}var vS=class{constructor(e,r,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:i,floor:o,...s}=n;if(!r||Object.keys(s).length>0){let a={useGrouping:!1,...n};n.padTo>0&&(a.minimumIntegerDigits=n.padTo),this.inf=kue(e,a)}}format(e){if(this.inf){let r=this.floor?Math.floor(e):e;return this.inf.format(r)}else{let r=this.floor?Math.floor(e):PS(e,3);return Kt(r,this.padTo)}}},QS=class{constructor(e,r,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let s=-1*(e.offset/60),a=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;e.offset!==0&&Bs.create(a).valid?(i=a,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let o={...this.opts};o.timeZone=o.timeZone||i,this.dtf=bS(r,o)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(r=>{if(r.type==="timeZoneName"){let n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:n}}else return r}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},TS=class{constructor(e,r,n){this.opts={style:"long",...n},!r&&bM()&&(this.rtf=Rue(e,n))}format(e,r){return this.rtf?this.rtf.format(e,r):sde(r,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,r){return this.rtf?this.rtf.formatToParts(e,r):[]}},fM={firstDay:1,minimalDays:4,weekend:[6,7]},mt=class t{static fromOpts(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,r,n,i,o=!1){let s=e||Et.defaultLocale,a=s||(o?"en-US":Nue()),c=r||Et.defaultNumberingSystem,l=n||Et.defaultOutputCalendar,u=kS(i)||Et.defaultWeekSettings;return new t(a,c,l,u,s)}static resetCache(){fA=null,CS.clear(),SS.clear(),wS.clear(),_S.clear(),BS.clear()}static fromObject({locale:e,numberingSystem:r,outputCalendar:n,weekSettings:i}={}){return t.create(e,r,n,i)}constructor(e,r,n,i,o){let[s,a,c]=xue(e);this.locale=s,this.numberingSystem=r||a||null,this.outputCalendar=n||c||null,this.weekSettings=i,this.intl=Uue(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Lue(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&r?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,kS(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,r=!1){return Hg(this,e,vM,()=>{let n=this.intl==="ja"||this.intl.startsWith("ja-");r&=!n;let i=r?{month:e,day:"numeric"}:{month:e},o=r?"format":"standalone";if(!this.monthsCache[o][e]){let s=n?a=>this.dtFormatter(a,i).format():a=>this.extract(a,i,"month");this.monthsCache[o][e]=Mue(s)}return this.monthsCache[o][e]})}weekdays(e,r=!1){return Hg(this,e,DM,()=>{let n=r?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=r?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=Pue(o=>this.extract(o,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return Hg(this,void 0,()=>kM,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Bt.utc(2016,11,13,9),Bt.utc(2016,11,13,19)].map(r=>this.extract(r,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Hg(this,e,RM,()=>{let r={era:e};return this.eraCache[e]||(this.eraCache[e]=[Bt.utc(-40,1,1),Bt.utc(2017,1,1)].map(n=>this.extract(n,r,"era"))),this.eraCache[e]})}extract(e,r,n){let i=this.dtFormatter(e,r),o=i.formatToParts(),s=o.find(a=>a.type.toLowerCase()===n);return s?s.value:null}numberFormatter(e={}){return new vS(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,r={}){return new QS(e,this.intl,r)}relFormatter(e={}){return new TS(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Due(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||hM(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:SM()?Oue(this.locale):fM}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},uS=null,In=class t extends pa{static get utcInstance(){return uS===null&&(uS=new t(0)),uS}static instance(e){return e===0?t.utcInstance:new t(e)}static parseSpecifier(e){if(e){let r=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new t(am(r[1],r[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${yA(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${yA(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,r){return yA(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},em=class extends pa{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function ua(t,e){if(De(t)||t===null)return e;if(t instanceof pa)return t;if(Hue(t)){let r=t.toLowerCase();return r==="default"?e:r==="local"||r==="system"?EA.instance:r==="utc"||r==="gmt"?In.utcInstance:In.parseSpecifier(r)||Bs.create(t)}else return Aa(t)?In.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new em(t)}var OS={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},IU={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},$ue=OS.hanidec.replace(/[\[|\]]/g,"").split("");function Fue(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let r=0;r<t.length;r++){let n=t.charCodeAt(r);if(t[r].search(OS.hanidec)!==-1)e+=$ue.indexOf(t[r]);else for(let i in IU){let[o,s]=IU[i];n>=o&&n<=s&&(e+=n-o)}}return parseInt(e,10)}else return e}var DS=new Map;function jue(){DS.clear()}function Bi({numberingSystem:t},e=""){let r=t||"latn",n=DS.get(r);n===void 0&&(n=new Map,DS.set(r,n));let i=n.get(e);return i===void 0&&(i=new RegExp(`${OS[r]}${e}`),n.set(e,i)),i}var CU=()=>Date.now(),bU="system",SU=null,wU=null,_U=null,BU=60,vU,QU=null,Et=class{static get now(){return CU}static set now(e){CU=e}static set defaultZone(e){bU=e}static get defaultZone(){return ua(bU,EA.instance)}static get defaultLocale(){return SU}static set defaultLocale(e){SU=e}static get defaultNumberingSystem(){return wU}static set defaultNumberingSystem(e){wU=e}static get defaultOutputCalendar(){return _U}static set defaultOutputCalendar(e){_U=e}static get defaultWeekSettings(){return QU}static set defaultWeekSettings(e){QU=kS(e)}static get twoDigitCutoffYear(){return BU}static set twoDigitCutoffYear(e){BU=e%100}static get throwOnInvalid(){return vU}static set throwOnInvalid(e){vU=e}static resetCaches(){mt.resetCache(),Bs.resetCache(),Bt.resetCache(),jue()}},yn=class{constructor(e,r){this.reason=e,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},gM=[0,31,59,90,120,151,181,212,243,273,304,334],mM=[0,31,60,91,121,152,182,213,244,274,305,335];function Kn(t,e){return new yn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function xS(t,e,r){let n=new Date(Date.UTC(t,e-1,r));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let i=n.getUTCDay();return i===0?7:i}function yM(t,e,r){return r+(CA(t)?mM:gM)[e-1]}function EM(t,e){let r=CA(t)?mM:gM,n=r.findIndex(o=>o<e),i=e-r[n];return{month:n+1,day:i}}function US(t,e){return(t-e+7)%7+1}function tm(t,e=4,r=1){let{year:n,month:i,day:o}=t,s=yM(n,i,o),a=US(xS(n,i,o),r),c=Math.floor((s-a+14-e)/7),l;return c<1?(l=n-1,c=IA(l,e,r)):c>IA(n,e,r)?(l=n+1,c=1):l=n,{weekYear:l,weekNumber:c,weekday:a,...cm(t)}}function TU(t,e=4,r=1){let{weekYear:n,weekNumber:i,weekday:o}=t,s=US(xS(n,1,e),r),a=Xl(n),c=i*7+o-s-7+e,l;c<1?(l=n-1,c+=Xl(l)):c>a?(l=n+1,c-=Xl(n)):l=n;let{month:u,day:d}=EM(l,c);return{year:l,month:u,day:d,...cm(t)}}function dS(t){let{year:e,month:r,day:n}=t,i=yM(e,r,n);return{year:e,ordinal:i,...cm(t)}}function DU(t){let{year:e,ordinal:r}=t,{month:n,day:i}=EM(e,r);return{year:e,month:n,day:i,...cm(t)}}function kU(t,e){if(!De(t.localWeekday)||!De(t.localWeekNumber)||!De(t.localWeekYear)){if(!De(t.weekday)||!De(t.weekNumber)||!De(t.weekYear))throw new da("Cannot mix locale-based week fields with ISO-based week fields");return De(t.localWeekday)||(t.weekday=t.localWeekday),De(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),De(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function zue(t,e=4,r=1){let n=om(t.weekYear),i=Xn(t.weekNumber,1,IA(t.weekYear,e,r)),o=Xn(t.weekday,1,7);return n?i?o?!1:Kn("weekday",t.weekday):Kn("week",t.weekNumber):Kn("weekYear",t.weekYear)}function que(t){let e=om(t.year),r=Xn(t.ordinal,1,Xl(t.year));return e?r?!1:Kn("ordinal",t.ordinal):Kn("year",t.year)}function IM(t){let e=om(t.year),r=Xn(t.month,1,12),n=Xn(t.day,1,rm(t.year,t.month));return e?r?n?!1:Kn("day",t.day):Kn("month",t.month):Kn("year",t.year)}function CM(t){let{hour:e,minute:r,second:n,millisecond:i}=t,o=Xn(e,0,23)||e===24&&r===0&&n===0&&i===0,s=Xn(r,0,59),a=Xn(n,0,59),c=Xn(i,0,999);return o?s?a?c?!1:Kn("millisecond",i):Kn("second",n):Kn("minute",r):Kn("hour",e)}function De(t){return typeof t>"u"}function Aa(t){return typeof t=="number"}function om(t){return typeof t=="number"&&t%1===0}function Hue(t){return typeof t=="string"}function Gue(t){return Object.prototype.toString.call(t)==="[object Date]"}function bM(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function SM(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Yue(t){return Array.isArray(t)?t:[t]}function RU(t,e,r){if(t.length!==0)return t.reduce((n,i)=>{let o=[e(i),i];return n&&r(n[0],o[0])===n[0]?n:o},null)[1]}function Vue(t,e){return e.reduce((r,n)=>(r[n]=t[n],r),{})}function tu(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function kS(t){if(t==null)return null;if(typeof t!="object")throw new pr("Week settings must be an object");if(!Xn(t.firstDay,1,7)||!Xn(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!Xn(e,1,7)))throw new pr("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Xn(t,e,r){return om(t)&&t>=e&&t<=r}function Wue(t,e){return t-e*Math.floor(t/e)}function Kt(t,e=2){let r=t<0,n;return r?n="-"+(""+-t).padStart(e,"0"):n=(""+t).padStart(e,"0"),n}function la(t){if(!(De(t)||t===null||t===""))return parseInt(t,10)}function gc(t){if(!(De(t)||t===null||t===""))return parseFloat(t)}function MS(t){if(!(De(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function PS(t,e,r="round"){let n=10**e;switch(r){case"expand":return t>0?Math.ceil(t*n)/n:Math.floor(t*n)/n;case"trunc":return Math.trunc(t*n)/n;case"round":return Math.round(t*n)/n;case"floor":return Math.floor(t*n)/n;case"ceil":return Math.ceil(t*n)/n;default:throw new RangeError(`Value rounding ${r} is out of range`)}}function CA(t){return t%4===0&&(t%100!==0||t%400===0)}function Xl(t){return CA(t)?366:365}function rm(t,e){let r=Wue(e-1,12)+1,n=t+(e-r)/12;return r===2?CA(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function sm(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function NU(t,e,r){return-US(xS(t,1,e),r)+e-1}function IA(t,e=4,r=1){let n=NU(t,e,r),i=NU(t+1,e,r);return(Xl(t)-n+i)/7}function RS(t){return t>99?t:t>Et.twoDigitCutoffYear?1900+t:2e3+t}function wM(t,e,r,n=null){let i=new Date(t),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(o.timeZone=n);let s={timeZoneName:e,...o},a=new Intl.DateTimeFormat(r,s).formatToParts(i).find(c=>c.type.toLowerCase()==="timezonename");return a?a.value:null}function am(t,e){let r=parseInt(t,10);Number.isNaN(r)&&(r=0);let n=parseInt(e,10)||0,i=r<0||Object.is(r,-0)?-n:n;return r*60+i}function _M(t){let e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new pr(`Invalid unit value ${t}`);return e}function nm(t,e){let r={};for(let n in t)if(tu(t,n)){let i=t[n];if(i==null)continue;r[e(n)]=_M(i)}return r}function yA(t,e){let r=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${Kt(r,2)}:${Kt(n,2)}`;case"narrow":return`${i}${r}${n>0?`:${n}`:""}`;case"techie":return`${i}${Kt(r,2)}${Kt(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function cm(t){return Vue(t,["hour","minute","second","millisecond"])}var Jue=["January","February","March","April","May","June","July","August","September","October","November","December"],BM=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Zue=["J","F","M","A","M","J","J","A","S","O","N","D"];function vM(t){switch(t){case"narrow":return[...Zue];case"short":return[...BM];case"long":return[...Jue];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var QM=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],TM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Kue=["M","T","W","T","F","S","S"];function DM(t){switch(t){case"narrow":return[...Kue];case"short":return[...TM];case"long":return[...QM];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var kM=["AM","PM"],Xue=["Before Christ","Anno Domini"],ede=["BC","AD"],tde=["B","A"];function RM(t){switch(t){case"narrow":return[...tde];case"short":return[...ede];case"long":return[...Xue];default:return null}}function rde(t){return kM[t.hour<12?0:1]}function nde(t,e){return DM(e)[t.weekday-1]}function ide(t,e){return vM(e)[t.month-1]}function ode(t,e){return RM(e)[t.year<0?0:1]}function sde(t,e,r="always",n=!1){let i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(t)===-1;if(r==="auto"&&o){let d=t==="days";switch(e){case 1:return d?"tomorrow":`next ${i[t][0]}`;case-1:return d?"yesterday":`last ${i[t][0]}`;case 0:return d?"today":`this ${i[t][0]}`}}let s=Object.is(e,-0)||e<0,a=Math.abs(e),c=a===1,l=i[t],u=n?c?l[1]:l[2]||l[1]:c?i[t][0]:t;return s?`${a} ${u} ago`:`in ${a} ${u}`}function OU(t,e){let r="";for(let n of t)n.literal?r+=n.val:r+=e(n.val);return r}var ade={D:Xg,DD:WU,DDD:JU,DDDD:ZU,t:KU,tt:XU,ttt:eM,tttt:tM,T:rM,TT:nM,TTT:iM,TTTT:oM,f:sM,ff:cM,fff:uM,ffff:AM,F:aM,FF:lM,FFF:dM,FFFF:pM},mn=class t{static create(e,r={}){return new t(e,r)}static parseFormat(e){let r=null,n="",i=!1,o=[];for(let s=0;s<e.length;s++){let a=e.charAt(s);a==="'"?((n.length>0||i)&&o.push({literal:i||/^\s+$/.test(n),val:n===""?"'":n}),r=null,n="",i=!i):i||a===r?n+=a:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=a,r=a)}return n.length>0&&o.push({literal:i||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(e){return ade[e]}constructor(e,r){this.opts=r,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...r}).format()}dtFormatter(e,r={}){return this.loc.dtFormatter(e,{...this.opts,...r})}formatDateTime(e,r){return this.dtFormatter(e,r).format()}formatDateTimeParts(e,r){return this.dtFormatter(e,r).formatToParts()}formatInterval(e,r){return this.dtFormatter(e.start,r).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,r){return this.dtFormatter(e,r).resolvedOptions()}num(e,r=0,n=void 0){if(this.opts.forceSimple)return Kt(e,r);let i={...this.opts};return r>0&&(i.padTo=r),n&&(i.signDisplay=n),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,r){let n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(p,h)=>this.loc.extract(e,p,h),s=p=>e.isOffsetFixed&&e.offset===0&&p.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,p.format):"",a=()=>n?rde(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(p,h)=>n?ide(e,p):o(h?{month:p}:{month:p,day:"numeric"},"month"),l=(p,h)=>n?nde(e,p):o(h?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),u=p=>{let h=t.macroTokenToFormatOpts(p);return h?this.formatWithSystemDefault(e,h):p},d=p=>n?ode(e,p):o({era:p},"era"),A=p=>{switch(p){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return i?o({day:"numeric"},"day"):this.num(e.day);case"dd":return i?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return i?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return i?o({month:"numeric"},"month"):this.num(e.month);case"MM":return i?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return i?o({year:"numeric"},"year"):this.num(e.year);case"yy":return i?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(p)}};return OU(t.parseFormat(r),A)}formatDurationFromString(e,r){let n=this.opts.signMode==="negativeLargestOnly"?-1:1,i=u=>{switch(u[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},o=(u,d)=>A=>{let p=i(A);if(p){let h=d.isNegativeDuration&&p!==d.largestUnit?n:1,f;return this.opts.signMode==="negativeLargestOnly"&&p!==d.largestUnit?f="never":this.opts.signMode==="all"?f="always":f="auto",this.num(u.get(p)*h,A.length,f)}else return A},s=t.parseFormat(r),a=s.reduce((u,{literal:d,val:A})=>d?u:u.concat(A),[]),c=e.shiftTo(...a.map(i).filter(u=>u)),l={isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]};return OU(s,o(c,l))}},NM=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ru(...t){let e=t.reduce((r,n)=>r+n.source,"");return RegExp(`^${e}$`)}function nu(...t){return e=>t.reduce(([r,n,i],o)=>{let[s,a,c]=o(e,i);return[{...r,...s},a||n,c]},[{},null,1]).slice(0,2)}function iu(t,...e){if(t==null)return[null,null];for(let[r,n]of e){let i=r.exec(t);if(i)return n(i)}return[null,null]}function OM(...t){return(e,r)=>{let n={},i;for(i=0;i<t.length;i++)n[t[i]]=la(e[r+i]);return[n,null,r+i]}}var xM=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,cde=`(?:${xM.source}?(?:\\[(${NM.source})\\])?)?`,LS=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,UM=RegExp(`${LS.source}${cde}`),$S=RegExp(`(?:[Tt]${UM.source})?`),lde=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ude=/(\d{4})-?W(\d\d)(?:-?(\d))?/,dde=/(\d{4})-?(\d{3})/,Ade=OM("weekYear","weekNumber","weekDay"),pde=OM("year","ordinal"),hde=/(\d{4})-(\d\d)-(\d\d)/,MM=RegExp(`${LS.source} ?(?:${xM.source}|(${NM.source}))?`),fde=RegExp(`(?: ${MM.source})?`);function eu(t,e,r){let n=t[e];return De(n)?r:la(n)}function gde(t,e){return[{year:eu(t,e),month:eu(t,e+1,1),day:eu(t,e+2,1)},null,e+3]}function ou(t,e){return[{hours:eu(t,e,0),minutes:eu(t,e+1,0),seconds:eu(t,e+2,0),milliseconds:MS(t[e+3])},null,e+4]}function bA(t,e){let r=!t[e]&&!t[e+1],n=am(t[e+1],t[e+2]),i=r?null:In.instance(n);return[{},i,e+3]}function SA(t,e){let r=t[e]?Bs.create(t[e]):null;return[{},r,e+1]}var mde=RegExp(`^T?${LS.source}$`),yde=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Ede(t){let[e,r,n,i,o,s,a,c,l]=t,u=e[0]==="-",d=c&&c[0]==="-",A=(p,h=!1)=>p!==void 0&&(h||p&&u)?-p:p;return[{years:A(gc(r)),months:A(gc(n)),weeks:A(gc(i)),days:A(gc(o)),hours:A(gc(s)),minutes:A(gc(a)),seconds:A(gc(c),c==="-0"),milliseconds:A(MS(l),d)}]}var Ide={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function FS(t,e,r,n,i,o,s){let a={year:e.length===2?RS(la(e)):la(e),month:BM.indexOf(r)+1,day:la(n),hour:la(i),minute:la(o)};return s&&(a.second=la(s)),t&&(a.weekday=t.length>3?QM.indexOf(t)+1:TM.indexOf(t)+1),a}var Cde=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function bde(t){let[,e,r,n,i,o,s,a,c,l,u,d]=t,A=FS(e,i,n,r,o,s,a),p;return c?p=Ide[c]:l?p=0:p=am(u,d),[A,new In(p)]}function Sde(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var wde=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,_de=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Bde=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function xU(t){let[,e,r,n,i,o,s,a]=t;return[FS(e,i,n,r,o,s,a),In.utcInstance]}function vde(t){let[,e,r,n,i,o,s,a]=t;return[FS(e,a,r,n,i,o,s),In.utcInstance]}var Qde=ru(lde,$S),Tde=ru(ude,$S),Dde=ru(dde,$S),kde=ru(UM),PM=nu(gde,ou,bA,SA),Rde=nu(Ade,ou,bA,SA),Nde=nu(pde,ou,bA,SA),Ode=nu(ou,bA,SA);function xde(t){return iu(t,[Qde,PM],[Tde,Rde],[Dde,Nde],[kde,Ode])}function Ude(t){return iu(Sde(t),[Cde,bde])}function Mde(t){return iu(t,[wde,xU],[_de,xU],[Bde,vde])}function Pde(t){return iu(t,[yde,Ede])}var Lde=nu(ou);function $de(t){return iu(t,[mde,Lde])}var Fde=ru(hde,fde),jde=ru(MM),zde=nu(ou,bA,SA);function qde(t){return iu(t,[Fde,PM],[jde,zde])}var UU="Invalid Duration",LM={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Hde={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...LM},Zn=146097/400,Jl=146097/4800,Gde={years:{quarters:4,months:12,weeks:Zn/7,days:Zn,hours:Zn*24,minutes:Zn*24*60,seconds:Zn*24*60*60,milliseconds:Zn*24*60*60*1e3},quarters:{months:3,weeks:Zn/28,days:Zn/4,hours:Zn*24/4,minutes:Zn*24*60/4,seconds:Zn*24*60*60/4,milliseconds:Zn*24*60*60*1e3/4},months:{weeks:Jl/7,days:Jl,hours:Jl*24,minutes:Jl*24*60,seconds:Jl*24*60*60,milliseconds:Jl*24*60*60*1e3},...LM},yc=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Yde=yc.slice(0).reverse();function ws(t,e,r=!1){let n={values:r?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new ar(n)}function $M(t,e){var r;let n=(r=e.milliseconds)!=null?r:0;for(let i of Yde.slice(1))e[i]&&(n+=e[i]*t[i].milliseconds);return n}function MU(t,e){let r=$M(t,e)<0?-1:1;yc.reduceRight((n,i)=>{if(De(e[i]))return n;if(n){let o=e[n]*r,s=t[i][n],a=Math.floor(o/s);e[i]+=a*r,e[n]-=a*s*r}return i},null),yc.reduce((n,i)=>{if(De(e[i]))return n;if(n){let o=e[n]%1;e[n]-=o,e[i]+=o*t[n][i]}return i},null)}function PU(t){let e={};for(let[r,n]of Object.entries(t))n!==0&&(e[r]=n);return e}var ar=class t{constructor(e){let r=e.conversionAccuracy==="longterm"||!1,n=r?Gde:Hde;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||mt.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,r){return t.fromObject({milliseconds:e},r)}static fromObject(e,r={}){if(e==null||typeof e!="object")throw new pr(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new t({values:nm(e,t.normalizeUnit),loc:mt.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(e){if(Aa(e))return t.fromMillis(e);if(t.isDuration(e))return e;if(typeof e=="object")return t.fromObject(e);throw new pr(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,r){let[n]=Pde(e);return n?t.fromObject(n,r):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,r){let[n]=$de(e);return n?t.fromObject(n,r):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,r=null){if(!e)throw new pr("need to specify a reason the Duration is invalid");let n=e instanceof yn?e:new yn(e,r);if(Et.throwOnInvalid)throw new ES(n);return new t({invalid:n})}static normalizeUnit(e){let r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!r)throw new Kg(e);return r}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,r={}){let n={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?mn.create(this.loc,n).formatDurationFromString(this,e):UU}toHuman(e={}){if(!this.isValid)return UU;let r=e.showZeros!==!1,n=yc.map(i=>{let o=this.values[i];return De(o)||o===0&&!r?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(o)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=PS(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let r=this.toMillis();return r<0||r>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},Bt.fromMillis(r,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?$M(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let r=t.fromDurationLike(e),n={};for(let i of yc)(tu(r.values,i)||tu(this.values,i))&&(n[i]=r.get(i)+this.get(i));return ws(this,{values:n},!0)}minus(e){if(!this.isValid)return this;let r=t.fromDurationLike(e);return this.plus(r.negate())}mapUnits(e){if(!this.isValid)return this;let r={};for(let n of Object.keys(this.values))r[n]=_M(e(this.values[n],n));return ws(this,{values:r},!0)}get(e){return this[t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let r={...this.values,...nm(e,t.normalizeUnit)};return ws(this,{values:r})}reconfigure({locale:e,numberingSystem:r,conversionAccuracy:n,matrix:i}={}){let s={loc:this.loc.clone({locale:e,numberingSystem:r}),matrix:i,conversionAccuracy:n};return ws(this,s)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return MU(this.matrix,e),ws(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=PU(this.normalize().shiftToAll().toObject());return ws(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(s=>t.normalizeUnit(s));let r={},n={},i=this.toObject(),o;for(let s of yc)if(e.indexOf(s)>=0){o=s;let a=0;for(let l in n)a+=this.matrix[l][s]*n[l],n[l]=0;Aa(i[s])&&(a+=i[s]);let c=Math.trunc(a);r[s]=c,n[s]=(a*1e3-c*1e3)/1e3}else Aa(i[s])&&(n[s]=i[s]);for(let s in n)n[s]!==0&&(r[o]+=s===o?n[s]:n[s]/this.matrix[o][s]);return MU(this.matrix,r),ws(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let r of Object.keys(this.values))e[r]=this.values[r]===0?0:-this.values[r];return ws(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=PU(this.values);return ws(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function r(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(let n of yc)if(!r(this.values[n],e.values[n]))return!1;return!0}},Zl="Invalid Interval";function Vde(t,e){return!t||!t.isValid?Ic.invalid("missing or invalid start"):!e||!e.isValid?Ic.invalid("missing or invalid end"):e<t?Ic.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}var Ic=class t{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,r=null){if(!e)throw new pr("need to specify a reason the Interval is invalid");let n=e instanceof yn?e:new yn(e,r);if(Et.throwOnInvalid)throw new yS(n);return new t({invalid:n})}static fromDateTimes(e,r){let n=hA(e),i=hA(r),o=Vde(n,i);return o??new t({start:n,end:i})}static after(e,r){let n=ar.fromDurationLike(r),i=hA(e);return t.fromDateTimes(i,i.plus(n))}static before(e,r){let n=ar.fromDurationLike(r),i=hA(e);return t.fromDateTimes(i.minus(n),i)}static fromISO(e,r){let[n,i]=(e||"").split("/",2);if(n&&i){let o,s;try{o=Bt.fromISO(n,r),s=o.isValid}catch{s=!1}let a,c;try{a=Bt.fromISO(i,r),c=a.isValid}catch{c=!1}if(s&&c)return t.fromDateTimes(o,a);if(s){let l=ar.fromISO(i,r);if(l.isValid)return t.after(o,l)}else if(c){let l=ar.fromISO(n,r);if(l.isValid)return t.before(a,l)}}return t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",r){if(!this.isValid)return NaN;let n=this.start.startOf(e,r),i;return r!=null&&r.useLocaleWeeks?i=this.end.reconfigure({locale:n.locale}):i=this.end,i=i.startOf(e,r),Math.floor(i.diff(n,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:r}={}){return this.isValid?t.fromDateTimes(e||this.s,r||this.e):this}splitAt(...e){if(!this.isValid)return[];let r=e.map(hA).filter(s=>this.contains(s)).sort((s,a)=>s.toMillis()-a.toMillis()),n=[],{s:i}=this,o=0;for(;i<this.e;){let s=r[o]||this.e,a=+s>+this.e?this.e:s;n.push(t.fromDateTimes(i,a)),i=a,o+=1}return n}splitBy(e){let r=ar.fromDurationLike(e);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:n}=this,i=1,o,s=[];for(;n<this.e;){let a=this.start.plus(r.mapUnits(c=>c*i));o=+a>+this.e?this.e:a,s.push(t.fromDateTimes(n,o)),n=o,i+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let r=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return r>=n?null:t.fromDateTimes(r,n)}union(e){if(!this.isValid)return this;let r=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return t.fromDateTimes(r,n)}static merge(e){let[r,n]=e.sort((i,o)=>i.s-o.s).reduce(([i,o],s)=>o?o.overlaps(s)||o.abutsStart(s)?[i,o.union(s)]:[i.concat([o]),s]:[i,s],[[],null]);return n&&r.push(n),r}static xor(e){let r=null,n=0,i=[],o=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),s=Array.prototype.concat(...o),a=s.sort((c,l)=>c.time-l.time);for(let c of a)n+=c.type==="s"?1:-1,n===1?r=c.time:(r&&+r!=+c.time&&i.push(t.fromDateTimes(r,c.time)),r=null);return t.merge(i)}difference(...e){return t.xor([this].concat(e)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Zl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Xg,r={}){return this.isValid?mn.create(this.s.loc.clone(r),e).formatInterval(this):Zl}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Zl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Zl}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Zl}toFormat(e,{separator:r=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${r}${this.e.toFormat(e)}`:Zl}toDuration(e,r){return this.isValid?this.e.diff(this.s,e,r):ar.invalid(this.invalidReason)}mapEndpoints(e){return t.fromDateTimes(e(this.s),e(this.e))}},Ec=class{static hasDST(e=Et.defaultZone){let r=Bt.now().setZone(e).set({month:12});return!e.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(e){return Bs.isValidZone(e)}static normalizeZone(e){return ua(e,Et.defaultZone)}static getStartOfWeek({locale:e=null,locObj:r=null}={}){return(r||mt.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:r=null}={}){return(r||mt.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:r=null}={}){return(r||mt.create(e)).getWeekendDays().slice()}static months(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||mt.create(r,n,o)).months(e)}static monthsFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||mt.create(r,n,o)).months(e,!0)}static weekdays(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||mt.create(r,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||mt.create(r,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return mt.create(e).meridiems()}static eras(e="short",{locale:r=null}={}){return mt.create(r,null,"gregory").eras(e)}static features(){return{relative:bM(),localeWeek:SM()}}};function LU(t,e){let r=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(e)-r(t);return Math.floor(ar.fromMillis(n).as("days"))}function Wde(t,e,r){let n=[["years",(c,l)=>l.year-c.year],["quarters",(c,l)=>l.quarter-c.quarter+(l.year-c.year)*4],["months",(c,l)=>l.month-c.month+(l.year-c.year)*12],["weeks",(c,l)=>{let u=LU(c,l);return(u-u%7)/7}],["days",LU]],i={},o=t,s,a;for(let[c,l]of n)r.indexOf(c)>=0&&(s=c,i[c]=l(t,e),a=o.plus(i),a>e?(i[c]--,t=o.plus(i),t>e&&(a=t,i[c]--,t=o.plus(i))):t=a);return[t,i,a,s]}function Jde(t,e,r,n){let[i,o,s,a]=Wde(t,e,r),c=e-i,l=r.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);l.length===0&&(s<e&&(s=i.plus({[a]:1})),s!==i&&(o[a]=(o[a]||0)+c/(s-i)));let u=ar.fromObject(o,n);return l.length>0?ar.fromMillis(c,n).shiftTo(...l).plus(u):u}var Zde="missing Intl.DateTimeFormat.formatToParts support";function nt(t,e=r=>r){return{regex:t,deser:([r])=>e(Fue(r))}}var Kde="\xA0",FM=`[ ${Kde}]`,jM=new RegExp(FM,"g");function Xde(t){return t.replace(/\./g,"\\.?").replace(jM,FM)}function $U(t){return t.replace(/\./g,"").replace(jM," ").toLowerCase()}function vi(t,e){return t===null?null:{regex:RegExp(t.map(Xde).join("|")),deser:([r])=>t.findIndex(n=>$U(r)===$U(n))+e}}function FU(t,e){return{regex:t,deser:([,r,n])=>am(r,n),groups:e}}function Gg(t){return{regex:t,deser:([e])=>e}}function eAe(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function tAe(t,e){let r=Bi(e),n=Bi(e,"{2}"),i=Bi(e,"{3}"),o=Bi(e,"{4}"),s=Bi(e,"{6}"),a=Bi(e,"{1,2}"),c=Bi(e,"{1,3}"),l=Bi(e,"{1,6}"),u=Bi(e,"{1,9}"),d=Bi(e,"{2,4}"),A=Bi(e,"{4,6}"),p=E=>({regex:RegExp(eAe(E.val)),deser:([S])=>S,literal:!0}),f=(E=>{if(t.literal)return p(E);switch(E.val){case"G":return vi(e.eras("short"),0);case"GG":return vi(e.eras("long"),0);case"y":return nt(l);case"yy":return nt(d,RS);case"yyyy":return nt(o);case"yyyyy":return nt(A);case"yyyyyy":return nt(s);case"M":return nt(a);case"MM":return nt(n);case"MMM":return vi(e.months("short",!0),1);case"MMMM":return vi(e.months("long",!0),1);case"L":return nt(a);case"LL":return nt(n);case"LLL":return vi(e.months("short",!1),1);case"LLLL":return vi(e.months("long",!1),1);case"d":return nt(a);case"dd":return nt(n);case"o":return nt(c);case"ooo":return nt(i);case"HH":return nt(n);case"H":return nt(a);case"hh":return nt(n);case"h":return nt(a);case"mm":return nt(n);case"m":return nt(a);case"q":return nt(a);case"qq":return nt(n);case"s":return nt(a);case"ss":return nt(n);case"S":return nt(c);case"SSS":return nt(i);case"u":return Gg(u);case"uu":return Gg(a);case"uuu":return nt(r);case"a":return vi(e.meridiems(),0);case"kkkk":return nt(o);case"kk":return nt(d,RS);case"W":return nt(a);case"WW":return nt(n);case"E":case"c":return nt(r);case"EEE":return vi(e.weekdays("short",!1),1);case"EEEE":return vi(e.weekdays("long",!1),1);case"ccc":return vi(e.weekdays("short",!0),1);case"cccc":return vi(e.weekdays("long",!0),1);case"Z":case"ZZ":return FU(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return FU(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Gg(/[a-z_+-/]{1,256}?/i);case" ":return Gg(/[^\S\n\r]/);default:return p(E)}})(t)||{invalidReason:Zde};return f.token=t,f}var rAe={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function nAe(t,e,r){let{type:n,value:i}=t;if(n==="literal"){let c=/^\s+$/.test(i);return{literal:!c,val:c?" ":i}}let o=e[n],s=n;n==="hour"&&(e.hour12!=null?s=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?s="hour12":s="hour24":s=r.hour12?"hour12":"hour24");let a=rAe[s];if(typeof a=="object"&&(a=a[o]),a)return{literal:!1,val:a}}function iAe(t){return[`^${t.map(r=>r.regex).reduce((r,n)=>`${r}(${n.source})`,"")}$`,t]}function oAe(t,e,r){let n=t.match(e);if(n){let i={},o=1;for(let s in r)if(tu(r,s)){let a=r[s],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(i[a.token.val[0]]=a.deser(n.slice(o,o+c))),o+=c}return[n,i]}else return[n,{}]}function sAe(t){let e=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},r=null,n;return De(t.z)||(r=Bs.create(t.z)),De(t.Z)||(r||(r=new In(t.Z)),n=t.Z),De(t.q)||(t.M=(t.q-1)*3+1),De(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),De(t.u)||(t.S=MS(t.u)),[Object.keys(t).reduce((o,s)=>{let a=e(s);return a&&(o[a]=t[s]),o},{}),r,n]}var AS=null;function aAe(){return AS||(AS=Bt.fromMillis(1555555555555)),AS}function cAe(t,e){if(t.literal)return t;let r=mn.macroTokenToFormatOpts(t.val),n=HM(r,e);return n==null||n.includes(void 0)?t:n}function zM(t,e){return Array.prototype.concat(...t.map(r=>cAe(r,e)))}var im=class{constructor(e,r){if(this.locale=e,this.format=r,this.tokens=zM(mn.parseFormat(r),e),this.units=this.tokens.map(n=>tAe(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){let[n,i]=iAe(this.units);this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[r,n]=oAe(e,this.regex,this.handlers),[i,o,s]=n?sAe(n):[null,null,void 0];if(tu(n,"a")&&tu(n,"H"))throw new da("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:r,matches:n,result:i,zone:o,specificOffset:s}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function qM(t,e,r){return new im(t,r).explainFromTokens(e)}function lAe(t,e,r){let{result:n,zone:i,specificOffset:o,invalidReason:s}=qM(t,e,r);return[n,i,o,s]}function HM(t,e){if(!t)return null;let n=mn.create(e,t).dtFormatter(aAe()),i=n.formatToParts(),o=n.resolvedOptions();return i.map(s=>nAe(s,t,o))}var pS="Invalid DateTime",jU=864e13;function gA(t){return new yn("unsupported zone",`the zone "${t.name}" is not supported`)}function hS(t){return t.weekData===null&&(t.weekData=tm(t.c)),t.weekData}function fS(t){return t.localWeekData===null&&(t.localWeekData=tm(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function mc(t,e){let r={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Bt({...r,...e,old:r})}function GM(t,e,r){let n=t-e*60*1e3,i=r.offset(n);if(e===i)return[n,e];n-=(i-e)*60*1e3;let o=r.offset(n);return i===o?[n,i]:[t-Math.min(i,o)*60*1e3,Math.max(i,o)]}function Yg(t,e){t+=e*60*1e3;let r=new Date(t);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function Wg(t,e,r){return GM(sm(t),e,r)}function zU(t,e){let r=t.o,n=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,o={...t.c,year:n,month:i,day:Math.min(t.c.day,rm(n,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},s=ar.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=sm(o),[c,l]=GM(a,r,t.zone);return s!==0&&(c+=s,l=t.zone.offset(c)),{ts:c,o:l}}function Kl(t,e,r,n,i,o){let{setZone:s,zone:a}=r;if(t&&Object.keys(t).length!==0||e){let c=e||a,l=Bt.fromObject(t,{...r,zone:c,specificOffset:o});return s?l:l.setZone(a)}else return Bt.invalid(new yn("unparsable",`the input "${i}" can't be parsed as ${n}`))}function Vg(t,e,r=!0){return t.isValid?mn.create(mt.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(t,e):null}function gS(t,e,r){let n=t.c.year>9999||t.c.year<0,i="";if(n&&t.c.year>=0&&(i+="+"),i+=Kt(t.c.year,n?6:4),r==="year")return i;if(e){if(i+="-",i+=Kt(t.c.month),r==="month")return i;i+="-"}else if(i+=Kt(t.c.month),r==="month")return i;return i+=Kt(t.c.day),i}function qU(t,e,r,n,i,o,s){let a=!r||t.c.millisecond!==0||t.c.second!==0,c="";switch(s){case"day":case"month":case"year":break;default:if(c+=Kt(t.c.hour),s==="hour")break;if(e){if(c+=":",c+=Kt(t.c.minute),s==="minute")break;a&&(c+=":",c+=Kt(t.c.second))}else{if(c+=Kt(t.c.minute),s==="minute")break;a&&(c+=Kt(t.c.second))}if(s==="second")break;a&&(!n||t.c.millisecond!==0)&&(c+=".",c+=Kt(t.c.millisecond,3))}return i&&(t.isOffsetFixed&&t.offset===0&&!o?c+="Z":t.o<0?(c+="-",c+=Kt(Math.trunc(-t.o/60)),c+=":",c+=Kt(Math.trunc(-t.o%60))):(c+="+",c+=Kt(Math.trunc(t.o/60)),c+=":",c+=Kt(Math.trunc(t.o%60)))),o&&(c+="["+t.zone.ianaName+"]"),c}var YM={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},uAe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},dAe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Jg=["year","month","day","hour","minute","second","millisecond"],AAe=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],pAe=["year","ordinal","hour","minute","second","millisecond"];function Zg(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new Kg(t);return e}function HU(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Zg(t)}}function hAe(t){if(mA===void 0&&(mA=Et.now()),t.type!=="iana")return t.offset(mA);let e=t.name,r=NS.get(e);return r===void 0&&(r=t.offset(mA),NS.set(e,r)),r}function GU(t,e){let r=ua(e.zone,Et.defaultZone);if(!r.isValid)return Bt.invalid(gA(r));let n=mt.fromObject(e),i,o;if(De(t.year))i=Et.now();else{for(let c of Jg)De(t[c])&&(t[c]=YM[c]);let s=IM(t)||CM(t);if(s)return Bt.invalid(s);let a=hAe(r);[i,o]=Wg(t,a,r)}return new Bt({ts:i,zone:r,loc:n,o})}function YU(t,e,r){let n=De(r.round)?!0:r.round,i=De(r.rounding)?"trunc":r.rounding,o=(a,c)=>(a=PS(a,n||r.calendary?0:2,r.calendary?"round":i),e.loc.clone(r).relFormatter(r).format(a,c)),s=a=>r.calendary?e.hasSame(t,a)?0:e.startOf(a).diff(t.startOf(a),a).get(a):e.diff(t,a).get(a);if(r.unit)return o(s(r.unit),r.unit);for(let a of r.units){let c=s(a);if(Math.abs(c)>=1)return o(c,a)}return o(t>e?-0:0,r.units[r.units.length-1])}function VU(t){let e={},r;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],r=Array.from(t).slice(0,t.length-1)):r=Array.from(t),[e,r]}var mA,NS=new Map,Bt=class t{constructor(e){let r=e.zone||Et.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new yn("invalid input"):null)||(r.isValid?null:gA(r));this.ts=De(e.ts)?Et.now():e.ts;let i=null,o=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(r))[i,o]=[e.old.c,e.old.o];else{let a=Aa(e.o)&&!e.old?e.o:r.offset(this.ts);i=Yg(this.ts,a),n=Number.isNaN(i.year)?new yn("invalid input"):null,i=n?null:i,o=n?null:a}this._zone=r,this.loc=e.loc||mt.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[e,r]=VU(arguments),[n,i,o,s,a,c,l]=r;return GU({year:n,month:i,day:o,hour:s,minute:a,second:c,millisecond:l},e)}static utc(){let[e,r]=VU(arguments),[n,i,o,s,a,c,l]=r;return e.zone=In.utcInstance,GU({year:n,month:i,day:o,hour:s,minute:a,second:c,millisecond:l},e)}static fromJSDate(e,r={}){let n=Gue(e)?e.valueOf():NaN;if(Number.isNaN(n))return t.invalid("invalid input");let i=ua(r.zone,Et.defaultZone);return i.isValid?new t({ts:n,zone:i,loc:mt.fromObject(r)}):t.invalid(gA(i))}static fromMillis(e,r={}){if(Aa(e))return e<-jU||e>jU?t.invalid("Timestamp out of range"):new t({ts:e,zone:ua(r.zone,Et.defaultZone),loc:mt.fromObject(r)});throw new pr(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,r={}){if(Aa(e))return new t({ts:e*1e3,zone:ua(r.zone,Et.defaultZone),loc:mt.fromObject(r)});throw new pr("fromSeconds requires a numerical input")}static fromObject(e,r={}){e=e||{};let n=ua(r.zone,Et.defaultZone);if(!n.isValid)return t.invalid(gA(n));let i=mt.fromObject(r),o=nm(e,HU),{minDaysInFirstWeek:s,startOfWeek:a}=kU(o,i),c=Et.now(),l=De(r.specificOffset)?n.offset(c):r.specificOffset,u=!De(o.ordinal),d=!De(o.year),A=!De(o.month)||!De(o.day),p=d||A,h=o.weekYear||o.weekNumber;if((p||u)&&h)throw new da("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(A&&u)throw new da("Can't mix ordinal dates with month/day");let f=h||o.weekday&&!p,E,S,B=Yg(c,l);f?(E=AAe,S=uAe,B=tm(B,s,a)):u?(E=pAe,S=dAe,B=dS(B)):(E=Jg,S=YM);let _=!1;for(let X of E){let Ae=o[X];De(Ae)?_?o[X]=S[X]:o[X]=B[X]:_=!0}let v=f?zue(o,s,a):u?que(o):IM(o),T=v||CM(o);if(T)return t.invalid(T);let $=f?TU(o,s,a):u?DU(o):o,[k,L]=Wg($,l,n),P=new t({ts:k,zone:n,o:L,loc:i});return o.weekday&&p&&e.weekday!==P.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${P.toISO()}`):P.isValid?P:t.invalid(P.invalid)}static fromISO(e,r={}){let[n,i]=xde(e);return Kl(n,i,r,"ISO 8601",e)}static fromRFC2822(e,r={}){let[n,i]=Ude(e);return Kl(n,i,r,"RFC 2822",e)}static fromHTTP(e,r={}){let[n,i]=Mde(e);return Kl(n,i,r,"HTTP",r)}static fromFormat(e,r,n={}){if(De(e)||De(r))throw new pr("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:o=null}=n,s=mt.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0}),[a,c,l,u]=lAe(s,e,r);return u?t.invalid(u):Kl(a,c,n,`format ${r}`,e,l)}static fromString(e,r,n={}){return t.fromFormat(e,r,n)}static fromSQL(e,r={}){let[n,i]=qde(e);return Kl(n,i,r,"SQL",e)}static invalid(e,r=null){if(!e)throw new pr("need to specify a reason the DateTime is invalid");let n=e instanceof yn?e:new yn(e,r);if(Et.throwOnInvalid)throw new mS(n);return new t({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,r={}){let n=HM(e,mt.fromObject(r));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(e,r={}){return zM(mn.parseFormat(e),mt.fromObject(r)).map(i=>i.val).join("")}static resetCache(){mA=void 0,NS.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?hS(this).weekYear:NaN}get weekNumber(){return this.isValid?hS(this).weekNumber:NaN}get weekday(){return this.isValid?hS(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?fS(this).weekday:NaN}get localWeekNumber(){return this.isValid?fS(this).weekNumber:NaN}get localWeekYear(){return this.isValid?fS(this).weekYear:NaN}get ordinal(){return this.isValid?dS(this.c).ordinal:NaN}get monthShort(){return this.isValid?Ec.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Ec.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Ec.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Ec.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,r=6e4,n=sm(this.c),i=this.zone.offset(n-e),o=this.zone.offset(n+e),s=this.zone.offset(n-i*r),a=this.zone.offset(n-o*r);if(s===a)return[this];let c=n-s*r,l=n-a*r,u=Yg(c,s),d=Yg(l,a);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[mc(this,{ts:c}),mc(this,{ts:l})]:[this]}get isInLeapYear(){return CA(this.year)}get daysInMonth(){return rm(this.year,this.month)}get daysInYear(){return this.isValid?Xl(this.year):NaN}get weeksInWeekYear(){return this.isValid?IA(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?IA(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:r,numberingSystem:n,calendar:i}=mn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:r,numberingSystem:n,outputCalendar:i}}toUTC(e=0,r={}){return this.setZone(In.instance(e),r)}toLocal(){return this.setZone(Et.defaultZone)}setZone(e,{keepLocalTime:r=!1,keepCalendarTime:n=!1}={}){if(e=ua(e,Et.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(r||n){let o=e.offset(this.ts),s=this.toObject();[i]=Wg(s,o,e)}return mc(this,{ts:i,zone:e})}else return t.invalid(gA(e))}reconfigure({locale:e,numberingSystem:r,outputCalendar:n}={}){let i=this.loc.clone({locale:e,numberingSystem:r,outputCalendar:n});return mc(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let r=nm(e,HU),{minDaysInFirstWeek:n,startOfWeek:i}=kU(r,this.loc),o=!De(r.weekYear)||!De(r.weekNumber)||!De(r.weekday),s=!De(r.ordinal),a=!De(r.year),c=!De(r.month)||!De(r.day),l=a||c,u=r.weekYear||r.weekNumber;if((l||s)&&u)throw new da("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&s)throw new da("Can't mix ordinal dates with month/day");let d;o?d=TU({...tm(this.c,n,i),...r},n,i):De(r.ordinal)?(d={...this.toObject(),...r},De(r.day)&&(d.day=Math.min(rm(d.year,d.month),d.day))):d=DU({...dS(this.c),...r});let[A,p]=Wg(d,this.o,this.zone);return mc(this,{ts:A,o:p})}plus(e){if(!this.isValid)return this;let r=ar.fromDurationLike(e);return mc(this,zU(this,r))}minus(e){if(!this.isValid)return this;let r=ar.fromDurationLike(e).negate();return mc(this,zU(this,r))}startOf(e,{useLocaleWeeks:r=!1}={}){if(!this.isValid)return this;let n={},i=ar.normalizeUnit(e);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(i==="weeks")if(r){let o=this.loc.getStartOfWeek(),{weekday:s}=this;s<o&&(n.weekNumber=this.weekNumber-1),n.weekday=o}else n.weekday=1;if(i==="quarters"){let o=Math.ceil(this.month/3);n.month=(o-1)*3+1}return this.set(n)}endOf(e,r){return this.isValid?this.plus({[e]:1}).startOf(e,r).minus(1):this}toFormat(e,r={}){return this.isValid?mn.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,e):pS}toLocaleString(e=Xg,r={}){return this.isValid?mn.create(this.loc.clone(r),e).formatDateTime(this):pS}toLocaleParts(e={}){return this.isValid?mn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:r=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:o=!1,precision:s="milliseconds"}={}){if(!this.isValid)return null;s=Zg(s);let a=e==="extended",c=gS(this,a,s);return Jg.indexOf(s)>=3&&(c+="T"),c+=qU(this,a,r,n,i,o,s),c}toISODate({format:e="extended",precision:r="day"}={}){return this.isValid?gS(this,e==="extended",Zg(r)):null}toISOWeekDate(){return Vg(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:r=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:o=!1,format:s="extended",precision:a="milliseconds"}={}){return this.isValid?(a=Zg(a),(i&&Jg.indexOf(a)>=3?"T":"")+qU(this,s==="extended",r,e,n,o,a)):null}toRFC2822(){return Vg(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Vg(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?gS(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:r=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(r||e)&&(n&&(i+=" "),r?i+="z":e&&(i+="ZZ")),Vg(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():pS}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let r={...this.c};return e.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,r="milliseconds",n={}){if(!this.isValid||!e.isValid)return ar.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...n},o=Yue(r).map(ar.normalizeUnit),s=e.valueOf()>this.valueOf(),a=s?this:e,c=s?e:this,l=Jde(a,c,o,i);return s?l.negate():l}diffNow(e="milliseconds",r={}){return this.diff(t.now(),e,r)}until(e){return this.isValid?Ic.fromDateTimes(this,e):this}hasSame(e,r,n){if(!this.isValid)return!1;let i=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(r,n)<=i&&i<=o.endOf(r,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let r=e.base||t.fromObject({},{zone:this.zone}),n=e.padding?this<r?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],o=e.unit;return Array.isArray(e.unit)&&(i=e.unit,o=void 0),YU(r,this.plus(n),{...e,numeric:"always",units:i,unit:o})}toRelativeCalendar(e={}){return this.isValid?YU(e.base||t.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(t.isDateTime))throw new pr("min requires all arguments be DateTimes");return RU(e,r=>r.valueOf(),Math.min)}static max(...e){if(!e.every(t.isDateTime))throw new pr("max requires all arguments be DateTimes");return RU(e,r=>r.valueOf(),Math.max)}static fromFormatExplain(e,r,n={}){let{locale:i=null,numberingSystem:o=null}=n,s=mt.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return qM(s,e,r)}static fromStringExplain(e,r,n={}){return t.fromFormatExplain(e,r,n)}static buildFormatParser(e,r={}){let{locale:n=null,numberingSystem:i=null}=r,o=mt.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new im(o,e)}static fromFormatParser(e,r,n={}){if(De(e)||De(r))throw new pr("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:o=null}=n,s=mt.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});if(!s.equals(r.locale))throw new pr(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${r.locale}`);let{result:a,zone:c,specificOffset:l,invalidReason:u}=r.explainFromTokens(e);return u?t.invalid(u):Kl(a,c,n,`format ${r.format}`,e,l)}static get DATE_SHORT(){return Xg}static get DATE_MED(){return WU}static get DATE_MED_WITH_WEEKDAY(){return wue}static get DATE_FULL(){return JU}static get DATE_HUGE(){return ZU}static get TIME_SIMPLE(){return KU}static get TIME_WITH_SECONDS(){return XU}static get TIME_WITH_SHORT_OFFSET(){return eM}static get TIME_WITH_LONG_OFFSET(){return tM}static get TIME_24_SIMPLE(){return rM}static get TIME_24_WITH_SECONDS(){return nM}static get TIME_24_WITH_SHORT_OFFSET(){return iM}static get TIME_24_WITH_LONG_OFFSET(){return oM}static get DATETIME_SHORT(){return sM}static get DATETIME_SHORT_WITH_SECONDS(){return aM}static get DATETIME_MED(){return cM}static get DATETIME_MED_WITH_SECONDS(){return lM}static get DATETIME_MED_WITH_WEEKDAY(){return _ue}static get DATETIME_FULL(){return uM}static get DATETIME_FULL_WITH_SECONDS(){return dM}static get DATETIME_HUGE(){return AM}static get DATETIME_HUGE_WITH_SECONDS(){return pM}};function hA(t){if(Bt.isDateTime(t))return t;if(t&&t.valueOf&&Aa(t.valueOf()))return Bt.fromJSDate(t);if(t&&typeof t=="object")return Bt.fromObject(t);throw new pr(`Unknown datetime argument: ${t}, of type ${typeof t}`)}var fAe="3.7.2";Cn.DateTime=Bt;Cn.Duration=ar;Cn.FixedOffsetZone=In;Cn.IANAZone=Bs;Cn.Info=Ec;Cn.Interval=Ic;Cn.InvalidZone=em;Cn.Settings=Et;Cn.SystemZone=EA;Cn.VERSION=fAe;Cn.Zone=pa});var dm=y(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.CronDate=Mr.DAYS_IN_MONTH=Mr.DateMathOp=Mr.TimeUnit=void 0;var Cc=VM(),vr;(function(t){t.Second="Second",t.Minute="Minute",t.Hour="Hour",t.Day="Day",t.Month="Month",t.Year="Year"})(vr||(Mr.TimeUnit=vr={}));var lm;(function(t){t.Add="Add",t.Subtract="Subtract"})(lm||(Mr.DateMathOp=lm={}));Mr.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var um=class t{#e;#t=null;#n=null;#i={add:{[vr.Year]:this.addYear.bind(this),[vr.Month]:this.addMonth.bind(this),[vr.Day]:this.addDay.bind(this),[vr.Hour]:this.addHour.bind(this),[vr.Minute]:this.addMinute.bind(this),[vr.Second]:this.addSecond.bind(this)},subtract:{[vr.Year]:this.subtractYear.bind(this),[vr.Month]:this.subtractMonth.bind(this),[vr.Day]:this.subtractDay.bind(this),[vr.Hour]:this.subtractHour.bind(this),[vr.Minute]:this.subtractMinute.bind(this),[vr.Second]:this.subtractSecond.bind(this)}};constructor(e,r){let n={zone:r};if(e?e instanceof t?(this.#e=e.#e,this.#t=e.#t,this.#n=e.#n):e instanceof Date?this.#e=Cc.DateTime.fromJSDate(e,n):typeof e=="number"?this.#e=Cc.DateTime.fromMillis(e,n):(this.#e=Cc.DateTime.fromISO(e,n),this.#e.isValid||(this.#e=Cc.DateTime.fromRFC2822(e,n)),this.#e.isValid||(this.#e=Cc.DateTime.fromSQL(e,n)),this.#e.isValid||(this.#e=Cc.DateTime.fromFormat(e,"EEE, d MMM yyyy HH:mm:ss",n))):this.#e=Cc.DateTime.local(),!this.#e.isValid)throw new Error(`CronDate: unhandled timestamp: ${e}`);r&&r!==this.#e.zoneName&&(this.#e=this.#e.setZone(r))}static#o(e){return e%4===0&&e%100!==0||e%400===0}get dstStart(){return this.#t}set dstStart(e){this.#t=e}get dstEnd(){return this.#n}set dstEnd(e){this.#n=e}addYear(){this.#e=this.#e.plus({years:1})}addMonth(){this.#e=this.#e.plus({months:1}).startOf("month")}addDay(){this.#e=this.#e.plus({days:1}).startOf("day")}addHour(){this.#e=this.#e.plus({hours:1}).startOf("hour")}addMinute(){this.#e=this.#e.plus({minutes:1}).startOf("minute")}addSecond(){this.#e=this.#e.plus({seconds:1})}subtractYear(){this.#e=this.#e.minus({years:1})}subtractMonth(){this.#e=this.#e.minus({months:1}).endOf("month").startOf("second")}subtractDay(){this.#e=this.#e.minus({days:1}).endOf("day").startOf("second")}subtractHour(){this.#e=this.#e.minus({hours:1}).endOf("hour").startOf("second")}subtractMinute(){this.#e=this.#e.minus({minutes:1}).endOf("minute").startOf("second")}subtractSecond(){this.#e=this.#e.minus({seconds:1})}addUnit(e){this.#i.add[e]()}subtractUnit(e){this.#i.subtract[e]()}invokeDateOperation(e,r){if(e===lm.Add){this.addUnit(r);return}if(e===lm.Subtract){this.subtractUnit(r);return}throw new Error(`Invalid verb: ${e}`)}getDate(){return this.#e.day}getFullYear(){return this.#e.year}getDay(){let e=this.#e.weekday;return e===7?0:e}getMonth(){return this.#e.month-1}getHours(){return this.#e.hour}getMinutes(){return this.#e.minute}getSeconds(){return this.#e.second}getMilliseconds(){return this.#e.millisecond}getUTCOffset(){return this.#e.offset}setStartOfDay(){this.#e=this.#e.startOf("day")}setEndOfDay(){this.#e=this.#e.endOf("day")}getTime(){return this.#e.valueOf()}getUTCDate(){return this.#r().day}getUTCFullYear(){return this.#r().year}getUTCDay(){let e=this.#r().weekday;return e===7?0:e}getUTCMonth(){return this.#r().month-1}getUTCHours(){return this.#r().hour}getUTCMinutes(){return this.#r().minute}getUTCSeconds(){return this.#r().second}toISOString(){return this.#e.toUTC().toISO()}toJSON(){return this.#e.toJSON()}setDate(e){this.#e=this.#e.set({day:e})}setFullYear(e){this.#e=this.#e.set({year:e})}setDay(e){this.#e=this.#e.set({weekday:e})}setMonth(e){this.#e=this.#e.set({month:e+1})}setHours(e){this.#e=this.#e.set({hour:e})}setMinutes(e){this.#e=this.#e.set({minute:e})}setSeconds(e){this.#e=this.#e.set({second:e})}setMilliseconds(e){this.#e=this.#e.set({millisecond:e})}toString(){return this.toDate().toString()}toDate(){return this.#e.toJSDate()}isLastDayOfMonth(){let{day:e,month:r}=this.#e;if(r===2){let n=t.#o(this.#e.year);return e===Mr.DAYS_IN_MONTH[r-1]-(n?0:1)}return e===Mr.DAYS_IN_MONTH[r-1]}isLastWeekdayOfMonth(){let{day:e,month:r}=this.#e,n;return r===2?n=Mr.DAYS_IN_MONTH[r-1]-(t.#o(this.#e.year)?0:1):n=Mr.DAYS_IN_MONTH[r-1],e>n-7}applyDateOperation(e,r,n){if(r===vr.Month||r===vr.Day){this.invokeDateOperation(e,r);return}let i=this.getHours();this.invokeDateOperation(e,r);let o=this.getHours(),s=o-i;s===2?n!==24&&(this.dstStart=o):s===0&&this.getMinutes()===0&&this.getSeconds()===0&&n!==24&&(this.dstEnd=o)}#r(){return this.#e.toUTC()}};Mr.CronDate=um;Mr.default=um});var WM=y(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});Am.CronMonth=void 0;var gAe=dm(),mAe=ca(),yAe=1,EAe=12,IAe=Object.freeze([]),jS=class extends mAe.CronField{static get min(){return yAe}static get max(){return EAe}static get chars(){return IAe}static get daysInMonth(){return gAe.DAYS_IN_MONTH}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};Am.CronMonth=jS});var JM=y(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.CronSecond=void 0;var CAe=ca(),bAe=0,SAe=59,wAe=Object.freeze([]),zS=class extends CAe.CronField{static get min(){return bAe}static get max(){return SAe}static get chars(){return wAe}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};pm.CronSecond=zS});var hm=y(Zr=>{"use strict";var _Ae=Zr&&Zr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ha=Zr&&Zr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&_Ae(e,t,r)};Object.defineProperty(Zr,"__esModule",{value:!0});ha(hU(),Zr);ha(fU(),Zr);ha(gU(),Zr);ha(ca(),Zr);ha(mU(),Zr);ha(yU(),Zr);ha(WM(),Zr);ha(JM(),Zr)});var HS=y(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.CronFieldCollection=void 0;var ei=hm(),qS=class t{#e;#t;#n;#i;#o;#r;static from(e,r){return new t({second:this.resolveField(ei.CronSecond,e.second,r.second),minute:this.resolveField(ei.CronMinute,e.minute,r.minute),hour:this.resolveField(ei.CronHour,e.hour,r.hour),dayOfMonth:this.resolveField(ei.CronDayOfMonth,e.dayOfMonth,r.dayOfMonth),month:this.resolveField(ei.CronMonth,e.month,r.month),dayOfWeek:this.resolveField(ei.CronDayOfWeek,e.dayOfWeek,r.dayOfWeek)})}static resolveField(e,r,n){return n?n instanceof ei.CronField?n:new e(n):r}constructor({second:e,minute:r,hour:n,dayOfMonth:i,month:o,dayOfWeek:s}){if(!e)throw new Error("Validation error, Field second is missing");if(!r)throw new Error("Validation error, Field minute is missing");if(!n)throw new Error("Validation error, Field hour is missing");if(!i)throw new Error("Validation error, Field dayOfMonth is missing");if(!o)throw new Error("Validation error, Field month is missing");if(!s)throw new Error("Validation error, Field dayOfWeek is missing");if(o.values.length===1&&!i.hasLastChar&&!(parseInt(i.values[0],10)<=ei.CronMonth.daysInMonth[o.values[0]-1]))throw new Error("Invalid explicit day of month definition");this.#e=e,this.#t=r,this.#n=n,this.#o=o,this.#r=s,this.#i=i}get second(){return this.#e}get minute(){return this.#t}get hour(){return this.#n}get dayOfMonth(){return this.#i}get month(){return this.#o}get dayOfWeek(){return this.#r}static compactField(e){if(e.length===0)return[];let r=[],n;return e.forEach((i,o,s)=>{if(n===void 0){n={start:i,count:1};return}let a=s[o-1]||n.start,c=s[o+1];if(i==="L"||i==="W"){r.push(n),r.push({start:i,count:1}),n=void 0;return}if(n.step===void 0&&c!==void 0){let l=i-a,u=c-i;if(l<=u){n={...n,count:2,end:i,step:l};return}n.step=1}i-(n.end??0)===n.step?(n.count++,n.end=i):(n.count===1?r.push({start:n.start,count:1}):n.count===2?(r.push({start:n.start,count:1}),r.push({start:n.end??a,count:1})):r.push(n),n={start:i,count:1})}),n&&r.push(n),r}static#c(e,r,n){let i=r.step;return i?i===1&&r.start===e.min&&r.end&&r.end>=n?e.hasQuestionMarkChar?"?":"*":i!==1&&r.start===e.min&&r.end&&r.end>=n-i+1?`*/${i}`:null:null}static#s(e,r){let n=e.step;if(n===1)return`${e.start}-${e.end}`;let i=e.start===0?e.count-1:e.count;if(!n)throw new Error("Unexpected range step");if(!e.end)throw new Error("Unexpected range end");if(n*i>e.end){let o=(a,c)=>{if(typeof e.start!="number")throw new Error("Unexpected range start");return c%n===0?e.start+c:null};if(typeof e.start!="number")throw new Error("Unexpected range start");let s={length:e.end-e.start+1};return Array.from(s,o).filter(a=>a!==null).join(",")}return e.end===r-n+1?`${e.start}/${n}`:`${e.start}-${e.end}/${n}`}stringifyField(e){let r=e.max,n=e.values;if(e instanceof ei.CronDayOfWeek){r=6;let o=this.#r.values;n=o[o.length-1]===7?o.slice(0,-1):o}e instanceof ei.CronDayOfMonth&&(r=this.#o.values.length===1?ei.CronMonth.daysInMonth[this.#o.values[0]-1]:e.max);let i=t.compactField(n);if(i.length===1){let o=t.#c(e,i[0],r);if(o)return o}return i.map(o=>{let s=o.count===1?o.start.toString():t.#s(o,r);return e instanceof ei.CronDayOfWeek&&e.nthDay>0?`${s}#${e.nthDay}`:s}).join(",")}stringify(e=!1){let r=[];return e&&r.push(this.stringifyField(this.#e)),r.push(this.stringifyField(this.#t),this.stringifyField(this.#n),this.stringifyField(this.#i),this.stringifyField(this.#o),this.stringifyField(this.#r)),r.join(" ")}serialize(){return{second:this.#e.serialize(),minute:this.#t.serialize(),hour:this.#n.serialize(),dayOfMonth:this.#i.serialize(),month:this.#o.serialize(),dayOfWeek:this.#r.serialize()}}};fm.CronFieldCollection=qS});var GS=y(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.CronExpression=ti.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=ti.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var Mt=dm();ti.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range";ti.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";var ZM=1e4,gm=class t{#e;#t;#n;#i;#o;#r;#c=null;#s=!1;constructor(e,r){this.#e=r,this.#t=r.tz,this.#i=r.startDate?new Mt.CronDate(r.startDate,this.#t):null,this.#o=r.endDate?new Mt.CronDate(r.endDate,this.#t):null;let n=r.currentDate??r.startDate;if(n){let i=new Mt.CronDate(n,this.#t);this.#i&&i.getTime()<this.#i.getTime()?n=this.#i:this.#o&&i.getTime()>this.#o.getTime()&&(n=this.#o)}this.#n=new Mt.CronDate(n,this.#t),this.#r=e}get fields(){return this.#r}static fieldsToExpression(e,r){return new t(e,r||{})}static#a(e,r){return r.some(n=>n===e)}#l(e,r){return e[r?e.length-1:0]}#d(e){let r=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`;if(this.#c===r)return this.#s;let n=new Mt.CronDate(e);n.setStartOfDay();let i=new Mt.CronDate(e);return i.setEndOfDay(),this.#c=r,this.#s=n.getUTCOffset()!==i.getUTCOffset(),this.#s}#A(e,r,n){let i=this.#r.second.values,o=e.getSeconds(),s=this.#r.second.findNearestValue(o,n);if(s!==null){e.setSeconds(s);return}e.applyDateOperation(r,Mt.TimeUnit.Minute,this.#r.hour.values.length),e.setSeconds(this.#l(i,n))}#p(e,r,n){let i=this.#r.minute.values,o=this.#r.second.values,s=e.getMinutes(),a=this.#r.minute.findNearestValue(s,n);if(a!==null){e.setMinutes(a),e.setSeconds(this.#l(o,n));return}e.applyDateOperation(r,Mt.TimeUnit.Hour,this.#r.hour.values.length),e.setMinutes(this.#l(i,n)),e.setSeconds(this.#l(o,n))}static#h(e,r){let n=r.isLastWeekdayOfMonth();return e.some(i=>{let o=parseInt(i.toString().charAt(0),10)%7;if(Number.isNaN(o))throw new Error(`Invalid last weekday of the month expression: ${i}`);return r.getDay()===o&&n})}next(){return this.#g()}prev(){return this.#g(!0)}hasNext(){let e=this.#n;try{return this.#g(),!0}catch{return!1}finally{this.#n=e}}hasPrev(){let e=this.#n;try{return this.#g(!0),!0}catch{return!1}finally{this.#n=e}}take(e){let r=[];if(e>=0)for(let n=0;n<e;n++)try{r.push(this.next())}catch{return r}else for(let n=0;n>e;n--)try{r.push(this.prev())}catch{return r}return r}reset(e){this.#n=new Mt.CronDate(e||this.#e.currentDate)}stringify(e=!1){return this.#r.stringify(e)}includesDate(e){let{second:r,minute:n,hour:i,month:o}=this.#r,s=new Mt.CronDate(e,this.#t);return!(!r.values.includes(s.getSeconds())||!n.values.includes(s.getMinutes())||!i.values.includes(s.getHours())||!o.values.includes(s.getMonth()+1)||!this.#u(s)||this.#r.dayOfWeek.nthDay>0&&Math.ceil(s.getDate()/7)!==this.#r.dayOfWeek.nthDay)}toString(){return this.#e.expression||this.stringify(!0)}#u(e){let r=this.#r.dayOfMonth.isWildcard,n=!r,i=this.#r.dayOfWeek.isWildcard,o=!i,s=t.#a(e.getDate(),this.#r.dayOfMonth.values)||this.#r.dayOfMonth.hasLastChar&&e.isLastDayOfMonth(),a=t.#a(e.getDay(),this.#r.dayOfWeek.values)||this.#r.dayOfWeek.hasLastChar&&t.#h(this.#r.dayOfWeek.values,e);return!!(n&&o&&(s||a)||s&&!o||r&&!i&&a)}#m(e,r,n){let i=this.#r.hour.values,o=i,s=e.getHours(),a=t.#a(s,i),c=e.dstStart===s,l=e.dstEnd===s;if(c)return t.#a(s-1,i)?!0:(e.invokeDateOperation(r,Mt.TimeUnit.Hour),!1);if(l&&!n)return e.dstEnd=null,e.applyDateOperation(Mt.DateMathOp.Add,Mt.TimeUnit.Hour,o.length),!1;if(a)return!0;e.dstStart=null;let u=this.#r.hour.findNearestValue(s,n);if(u===null)return e.applyDateOperation(r,Mt.TimeUnit.Day,o.length),!1;if(this.#d(e)){let d=n?s-u:u-s;for(let A=0;A<d;A++)e.applyDateOperation(r,Mt.TimeUnit.Hour,o.length)}else e.setHours(u);return e.setMinutes(this.#l(this.#r.minute.values,n)),e.setSeconds(this.#l(this.#r.second.values,n)),!1}#f(e){if(!this.#i&&!this.#o)return;let r=e.getTime();if(this.#i&&r<this.#i.getTime())throw new Error(ti.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(this.#o&&r>this.#o.getTime())throw new Error(ti.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#g(e=!1){let r=e?Mt.DateMathOp.Subtract:Mt.DateMathOp.Add,n=new Mt.CronDate(this.#n),i=n.getTime(),o=0;for(;++o<ZM;){if(this.#f(n),!this.#u(n)){n.applyDateOperation(r,Mt.TimeUnit.Day,this.#r.hour.values.length);continue}if(!(this.#r.dayOfWeek.nthDay<=0||Math.ceil(n.getDate()/7)===this.#r.dayOfWeek.nthDay)){n.applyDateOperation(r,Mt.TimeUnit.Day,this.#r.hour.values.length);continue}if(!t.#a(n.getMonth()+1,this.#r.month.values)){n.applyDateOperation(r,Mt.TimeUnit.Month,this.#r.hour.values.length);continue}if(this.#m(n,r,e)){if(!t.#a(n.getMinutes(),this.#r.minute.values)){this.#p(n,r,e);continue}if(!t.#a(n.getSeconds(),this.#r.second.values)){this.#A(n,r,e);continue}if(i===n.getTime()){(r==="Add"||n.getMilliseconds()===0)&&n.applyDateOperation(r,Mt.TimeUnit.Second,this.#r.hour.values.length);continue}break}}if(o>ZM)throw new Error(ti.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return n.getMilliseconds()!==0&&n.setMilliseconds(0),this.#n=n,n}[Symbol.iterator](){return{next:()=>({value:this.#g(),done:!this.hasNext()})}}};ti.CronExpression=gm;ti.default=gm});var KM=y(YS=>{"use strict";Object.defineProperty(YS,"__esModule",{value:!0});YS.seededRandom=QAe;function BAe(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=Math.imul(e,16777619);return()=>e>>>0}function vAe(t){return()=>{let e=t+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}function QAe(t){let e=t?BAe(t)():Math.floor(Math.random()*1e10);return vAe(e)}});var mm=y(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.CronExpressionParser=ii.DayOfWeek=ii.Months=ii.CronUnit=ii.PredefinedExpressions=void 0;var TAe=HS(),DAe=GS(),kAe=KM(),ri=hm(),VS;(function(t){t["@yearly"]="0 0 0 1 1 *",t["@annually"]="0 0 0 1 1 *",t["@monthly"]="0 0 0 1 * *",t["@weekly"]="0 0 0 * * 0",t["@daily"]="0 0 0 * * *",t["@hourly"]="0 0 * * * *",t["@minutely"]="0 * * * * *",t["@secondly"]="* * * * * *",t["@weekdays"]="0 0 0 * * 1-5",t["@weekends"]="0 0 0 * * 0,6"})(VS||(ii.PredefinedExpressions=VS={}));var ni;(function(t){t.Second="Second",t.Minute="Minute",t.Hour="Hour",t.DayOfMonth="DayOfMonth",t.Month="Month",t.DayOfWeek="DayOfWeek"})(ni||(ii.CronUnit=ni={}));var WS;(function(t){t[t.jan=1]="jan",t[t.feb=2]="feb",t[t.mar=3]="mar",t[t.apr=4]="apr",t[t.may=5]="may",t[t.jun=6]="jun",t[t.jul=7]="jul",t[t.aug=8]="aug",t[t.sep=9]="sep",t[t.oct=10]="oct",t[t.nov=11]="nov",t[t.dec=12]="dec"})(WS||(ii.Months=WS={}));var JS;(function(t){t[t.sun=0]="sun",t[t.mon=1]="mon",t[t.tue=2]="tue",t[t.wed=3]="wed",t[t.thu=4]="thu",t[t.fri=5]="fri",t[t.sat=6]="sat"})(JS||(ii.DayOfWeek=JS={}));var ZS=class t{static parse(e,r={}){let{strict:n=!1,hashSeed:i}=r,o=(0,kAe.seededRandom)(i);e=VS[e]||e;let s=t.#e(e,n);if(!(s.dayOfMonth==="*"||s.dayOfWeek==="*"||!n))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");let a=t.#t(ni.Second,s.second,ri.CronSecond.constraints,o),c=t.#t(ni.Minute,s.minute,ri.CronMinute.constraints,o),l=t.#t(ni.Hour,s.hour,ri.CronHour.constraints,o),u=t.#t(ni.Month,s.month,ri.CronMonth.constraints,o),d=t.#t(ni.DayOfMonth,s.dayOfMonth,ri.CronDayOfMonth.constraints,o),{dayOfWeek:A,nthDayOfWeek:p}=t.#d(s.dayOfWeek),h=t.#t(ni.DayOfWeek,A,ri.CronDayOfWeek.constraints,o),f=new TAe.CronFieldCollection({second:new ri.CronSecond(a,{rawValue:s.second}),minute:new ri.CronMinute(c,{rawValue:s.minute}),hour:new ri.CronHour(l,{rawValue:s.hour}),dayOfMonth:new ri.CronDayOfMonth(d,{rawValue:s.dayOfMonth}),month:new ri.CronMonth(u,{rawValue:s.month}),dayOfWeek:new ri.CronDayOfWeek(h,{rawValue:s.dayOfWeek,nthDayOfWeek:p})});return new DAe.CronExpression(f,{...r,expression:e})}static#e(e,r){if(r&&!e.length)throw new Error("Invalid cron expression");e=e||"0 * * * * *";let n=e.trim().split(/\s+/);if(r&&n.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(n.length>6)throw new Error("Invalid cron expression, too many fields");let i=["*","*","*","*","*","0"];n.length<i.length&&n.unshift(...i.slice(n.length));let[o,s,a,c,l,u]=n;return{second:o,minute:s,hour:a,dayOfMonth:c,month:l,dayOfWeek:u}}static#t(e,r,n,i){if((e===ni.Month||e===ni.DayOfWeek)&&(r=r.replace(/[a-z]{3}/gi,o=>{o=o.toLowerCase();let s=WS[o]||JS[o];if(s===void 0)throw new Error(`Validation error, cannot resolve alias "${o}"`);return s.toString()})),!n.validChars.test(r))throw new Error(`Invalid characters, got value: ${r}`);return r=this.#n(r,n),r=this.#i(r,n,i),this.#o(e,r,n)}static#n(e,r){return e.replace(/[*?]/g,r.min+"-"+r.max)}static#i(e,r,n){let i=n();return e.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(o,s,a,c)=>{if(s&&a&&c){let l=parseInt(s,10),u=parseInt(a,10),d=parseInt(c,10);if(l>u)throw new Error(`Invalid range: ${l}-${u}, min > max`);if(d<=0)throw new Error(`Invalid step: ${d}, must be positive`);let A=Math.max(l,r.min),p=Math.floor(i*d),h=[];for(let f=Math.floor(A/d)*d+p;f<=u;f+=d)f>=A&&h.push(f);return h.join(",")}else if(s&&a){let l=parseInt(s,10),u=parseInt(a,10);if(l>u)throw new Error(`Invalid range: ${l}-${u}, min > max`);return String(Math.floor(i*(u-l+1))+l)}else if(c){let l=parseInt(c,10);if(l<=0)throw new Error(`Invalid step: ${l}, must be positive`);let u=Math.floor(i*l),d=[];for(let A=Math.floor(r.min/l)*l+u;A<=r.max;A+=l)A>=r.min&&d.push(A);return d.join(",")}else return String(Math.floor(i*(r.max-r.min+1)+r.min))})}static#o(e,r,n){let i=[];function o(a,c){if(Array.isArray(a))i.push(...a);else if(t.#A(c,a))i.push(a);else{let l=parseInt(a.toString(),10);if(!(l>=c.min&&l<=c.max))throw new Error(`Constraint error, got value ${a} expected range ${c.min}-${c.max}`);i.push(e===ni.DayOfWeek?l%7:a)}}return r.split(",").forEach(a=>{if(!(a.length>0))throw new Error("Invalid list value format");o(t.#r(e,a,n),n)}),i}static#r(e,r,n){let i=r.split("/");if(i.length>2)throw new Error(`Invalid repeat: ${r}`);return i.length===2?(isNaN(parseInt(i[0],10))||(i[0]=`${i[0]}-${n.max}`),t.#l(e,i[0],parseInt(i[1],10),n)):t.#l(e,r,1,n)}static#c(e,r,n){if(!(!isNaN(e)&&!isNaN(r)&&e>=n.min&&r<=n.max))throw new Error(`Constraint error, got range ${e}-${r} expected range ${n.min}-${n.max}`);if(e>r)throw new Error(`Invalid range: ${e}-${r}, min(${e}) > max(${r})`)}static#s(e){if(!(!isNaN(e)&&e>0))throw new Error(`Constraint error, cannot repeat at every ${e} time.`)}static#a(e,r,n,i){let o=[];e===ni.DayOfWeek&&n%7===0&&o.push(0);for(let s=r;s<=n;s+=i)o.indexOf(s)===-1&&o.push(s);return o}static#l(e,r,n,i){let o=r.split("-");if(o.length<=1)return isNaN(+r)?r:+r;let[s,a]=o.map(c=>parseInt(c,10));return this.#c(s,a,i),this.#s(n),this.#a(e,s,a,n)}static#d(e){let r=e.split("#");if(r.length<=1)return{dayOfWeek:r[0]};let n=+r[r.length-1],i=e.match(/([,-/])/);if(i!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${i?.[0]}\` special characters are incompatible`);if(!(r.length<=2&&!isNaN(n)&&n>=1&&n<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:r[0],nthDayOfWeek:n}}static#A(e,r){return e.chars.some(n=>r.toString().includes(n))}};ii.CronExpressionParser=ZS});var XM=y(Fo=>{"use strict";var RAe=Fo&&Fo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),NAe=Fo&&Fo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),OAe=Fo&&Fo.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&RAe(r,e,n[i]);return NAe(r,e),r}})();Object.defineProperty(Fo,"__esModule",{value:!0});Fo.CronFileParser=void 0;var xAe=mm(),KS=class t{static async parseFile(e){let{readFile:r}=await Promise.resolve().then(()=>OAe(require("fs/promises"))),n=await r(e,"utf8");return t.#e(n)}static parseFileSync(e){let{readFileSync:r}=require("fs"),n=r(e,"utf8");return t.#e(n)}static#e(e){let r=e.split(`
102
+ `),n={variables:{},expressions:[],errors:{}};for(let i of r){let o=i.trim();if(o.length===0||o.startsWith("#"))continue;let s=o.match(/^(.*)=(.*)$/);if(s){let[,a,c]=s;n.variables[a]=c.replace(/["']/g,"");continue}try{let a=t.#t(o);n.expressions.push(a.interval)}catch(a){n.errors[o]=a}}return n}static#t(e){let r=e.split(" ");return{interval:xAe.CronExpressionParser.parse(r.slice(0,5).join(" ")),command:r.slice(5,r.length)}}};Fo.CronFileParser=KS});var eP=y(hr=>{"use strict";var UAe=hr&&hr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),MAe=hr&&hr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&UAe(e,t,r)};Object.defineProperty(hr,"__esModule",{value:!0});hr.CronFileParser=hr.CronExpressionParser=hr.CronExpression=hr.CronFieldCollection=hr.CronDate=void 0;var PAe=mm(),LAe=dm();Object.defineProperty(hr,"CronDate",{enumerable:!0,get:function(){return LAe.CronDate}});var $Ae=HS();Object.defineProperty(hr,"CronFieldCollection",{enumerable:!0,get:function(){return $Ae.CronFieldCollection}});var FAe=GS();Object.defineProperty(hr,"CronExpression",{enumerable:!0,get:function(){return FAe.CronExpression}});var jAe=mm();Object.defineProperty(hr,"CronExpressionParser",{enumerable:!0,get:function(){return jAe.CronExpressionParser}});var zAe=XM();Object.defineProperty(hr,"CronFileParser",{enumerable:!0,get:function(){return zAe.CronFileParser}});MAe(hm(),hr);hr.default=PAe.CronExpressionParser});var Ti=y(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.Err=Kr.Valid=Kr.err=Kr.valid=void 0;var qAe=t=>new ym(t);Kr.valid=qAe;var HAe=t=>new Em(t);Kr.err=HAe;var ym=class{constructor(e){this.value=e}isValid(){return!0}isError(){return!this.isValid()}getValue(){return this.value}getError(){throw new Error("Tried to get error from a valid.")}map(e){return(0,Kr.valid)(e(this.value))}mapErr(e){return(0,Kr.valid)(this.value)}};Kr.Valid=ym;var Em=class{constructor(e){this.error=e}isError(){return!0}isValid(){return!this.isError()}getValue(){throw new Error("Tried to get success value from an error.")}getError(){return this.error}map(e){return(0,Kr.err)(this.error)}mapErr(e){return(0,Kr.err)(e(this.error))}};Kr.Err=Em});var Di=y(tP=>{"use strict";Object.defineProperty(tP,"__esModule",{value:!0})});var fa=y(XS=>{"use strict";Object.defineProperty(XS,"__esModule",{value:!0});jo();var Ue=Ti();Di();var GAe=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],YAe=["sun","mon","tue","wed","thu","fri","sat"],VAe=(t,e)=>e[t].lowerLimit===e.preset[t].minValue&&e[t].upperLimit===e.preset[t].maxValue,wA=(t,e,r)=>{if(e==="months"&&r.useAliases&&GAe.indexOf(t.toLowerCase())!==-1||e==="daysOfWeek"&&r.useAliases&&YAe.indexOf(t.toLowerCase())!==-1)return(0,Ue.valid)(!0);let n=Number(t);if(Number.isNaN(n))return(0,Ue.err)(`Element '${t}' of ${e} field is invalid.`);if(n%1!==0)return(0,Ue.err)(`Element '${t}' of ${e} field is not an integer.`);let{lowerLimit:i}=r[e],{upperLimit:o}=r[e];return i&&n<i?(0,Ue.err)(`Number '${n}' of ${e} field is smaller than lower limit '${i}'.`):o&&n>o?(0,Ue.err)(`Number '${n}' of ${e} field is bigger than upper limit '${o}'.`):(0,Ue.valid)(!0)},WAe=(t,e,r)=>{if(t==="*")return VAe(e,r)?(0,Ue.valid)(!0):(0,Ue.err)(`Field ${e} uses wildcard '*', but is limited to ${r[e].lowerLimit}-${r[e].upperLimit}.`);if(t==="")return(0,Ue.err)(`One of the elements is empty in ${e} field.`);if(e==="daysOfMonth"&&r.useLastDayOfMonth&&t==="L")return(0,Ue.valid)(!0);if(e==="daysOfWeek"&&r.useLastDayOfWeek&&t.endsWith("L")){let n=t.slice(0,-1);return n===""?(0,Ue.valid)(!0):wA(n,e,r)}if(e==="daysOfMonth"&&r.useNearestWeekday&&t.endsWith("W")){let n=t.slice(0,-1);return n===""?(0,Ue.err)("The 'W' must be preceded by a day."):r.useLastDayOfMonth&&n==="L"?(0,Ue.valid)(!0):wA(n,e,r)}if(e==="daysOfWeek"&&r.useNthWeekdayOfMonth&&t.indexOf("#")!==-1){let[n,i,...o]=t.split("#");if(o.length!==0)return(0,Ue.err)(`Unexpected number of '#' in ${t}, can only be used once.`);let s=Number(i);return!i||Number.isNaN(s)?(0,Ue.err)(`Unexpected value following the '#' symbol, a positive number was expected but found ${i}.`):s>5?(0,Ue.err)("Number of occurrence of the day of the week cannot be greater than 5."):wA(n,e,r)}return wA(t,e,r)},rP=(t,e,r,n)=>t==="*"?(0,Ue.err)(`'*' can't be part of a range in ${e} field.`):t===""?(0,Ue.err)(`One of the range elements is empty in ${e} field.`):r.useLastDayOfMonth&&e==="daysOfMonth"&&t==="L"&&n===0?(0,Ue.valid)(!0):wA(t,e,r),JAe=(t,e,r)=>{let n=t.split("-");if(n.length>2)return(0,Ue.err)(`List element '${t}' is not valid. (More than one '-').`);if(n.length===1)return WAe(n[0],e,r);if(n.length===2){let i=rP(n[0],e,r,0),o=rP(n[1],e,r,1);return i.isError()?i:o.isError()?o:Number(n[0])>Number(n[1])?(0,Ue.err)(`Lower range end '${n[0]}' is bigger than upper range end '${n[1]}' of ${e} field.`):(0,Ue.valid)(!0)}return(0,Ue.err)("Some other error in checkFirstStepElement (rangeArray less than 1)")},ZAe=(t,e,r)=>{let n=t.split("/");if(n.length>2)return(0,Ue.err)(`List element '${t}' is not valid. (More than one '/').`);if(!r.allowStepping)return(0,Ue.err)("Stepping ('/') is not allowed.");let i=JAe(n[0],e,r);if(i.isError())return i;if(n.length===2){let o=n[1];if(!o)return(0,Ue.err)(`Second step element '${o}' of '${t}' is not valid (doesnt exist).`);if(Number.isNaN(Number(o)))return(0,Ue.err)(`Second step element '${o}' of '${t}' is not valid (not a number).`);let s=Number(o);if(s===0)return(0,Ue.err)(`Second step element '${o}' of '${t}' cannot be zero.`);if(s<0)return(0,Ue.err)(`Second step element '${o}' of '${t}' cannot be negative.`);if(s%1!==0)return(0,Ue.err)(`Second step element '${o}' of '${t}' is not an integer.`);let{lowerLimit:a,upperLimit:c}=r[e];if(c&&s>c)return(0,Ue.err)(`Second step element '${o}' of '${t}' is bigger than the upper limit '${c}'.`);let l=n[0].split("-");if(l.length===2){let u=Number(l[0]),d=Number(l[1]);if(!Number.isNaN(u)&&!Number.isNaN(d)){if(s<=0)return(0,Ue.err)(`Step value '${o}' must be greater than 0.`);let A=d-u+1;if(s>=A)return(0,Ue.err)(`Step value '${o}' is too large for the range '${u}-${d}'.`)}}}return(0,Ue.valid)(!0)},KAe=(t,e,r)=>{if(!["seconds","minutes","hours","daysOfMonth","months","daysOfWeek","years"].includes(e))return(0,Ue.err)([`Cron field type '${e}' does not exist.`]);if(t==="?")return e==="daysOfMonth"||e==="daysOfWeek"?r.useBlankDay?(0,Ue.valid)(!0):(0,Ue.err)([`useBlankDay is not enabled, but is used in ${e} field.`]):(0,Ue.err)([`blank notation is not allowed in ${e} field.`]);let n=t.split(","),i=[];if(n.forEach(s=>{i.push(ZAe(s,e,r))}),i.every(s=>s.isValid()))return(0,Ue.valid)(!0);let o=[];return i.forEach(s=>{s.isError()&&o.push(s.getError())}),(0,Ue.err)(o)};XS.default=KAe});var nP=y(_A=>{"use strict";var XAe=_A&&_A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_A,"__esModule",{value:!0});jo();var epe=Ti(),tpe=XAe(fa());Di();var rpe=(t,e)=>{if(!t.seconds)return(0,epe.err)(["seconds field is undefined, but useSeconds options is enabled."]);let{seconds:r}=t;return(0,tpe.default)(r,"seconds",e)};_A.default=rpe});var iP=y(BA=>{"use strict";var npe=BA&&BA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BA,"__esModule",{value:!0});jo();var ipe=Ti(),ope=npe(fa());Di();var spe=(t,e)=>{if(!t.minutes)return(0,ipe.err)(["minutes field is undefined."]);let{minutes:r}=t;return(0,ope.default)(r,"minutes",e)};BA.default=spe});var oP=y(vA=>{"use strict";var ape=vA&&vA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vA,"__esModule",{value:!0});jo();var cpe=Ti(),lpe=ape(fa());Di();var upe=(t,e)=>{if(!t.hours)return(0,cpe.err)(["hours field is undefined."]);let{hours:r}=t;return(0,lpe.default)(r,"hours",e)};vA.default=upe});var sP=y(TA=>{"use strict";var dpe=TA&&TA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(TA,"__esModule",{value:!0});jo();var QA=Ti(),Ape=dpe(fa());Di();var ppe=(t,e)=>{if(!t.daysOfMonth)return(0,QA.err)(["daysOfMonth field is undefined."]);let{daysOfMonth:r}=t;return e.allowOnlyOneBlankDayField&&e.useBlankDay&&t.daysOfMonth==="?"&&t.daysOfWeek==="?"?(0,QA.err)(["Cannot use blank value in daysOfMonth and daysOfWeek field when allowOnlyOneBlankDayField option is enabled."]):e.mustHaveBlankDayField&&t.daysOfMonth!=="?"&&t.daysOfWeek!=="?"?(0,QA.err)(["Cannot specify both daysOfMonth and daysOfWeek field when mustHaveBlankDayField option is enabled."]):e.useLastDayOfMonth&&t.daysOfMonth.indexOf("L")!==-1&&t.daysOfMonth.match(/[,/]/)?(0,QA.err)(["Cannot specify last day of month with lists, or ranges (symbols ,/)."]):e.useNearestWeekday&&t.daysOfMonth.indexOf("W")!==-1&&t.daysOfMonth.match(/[,/-]/)?(0,QA.err)(["Cannot specify nearest weekday with lists, steps or ranges (symbols ,-/)."]):(0,Ape.default)(r,"daysOfMonth",e)};TA.default=ppe});var aP=y(DA=>{"use strict";var hpe=DA&&DA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(DA,"__esModule",{value:!0});jo();var fpe=Ti(),gpe=hpe(fa());Di();var mpe=(t,e)=>{if(!t.months)return(0,fpe.err)(["months field is undefined."]);let{months:r}=t;return(0,gpe.default)(r,"months",e)};DA.default=mpe});var cP=y(RA=>{"use strict";var ype=RA&&RA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(RA,"__esModule",{value:!0});jo();var kA=Ti(),Epe=ype(fa());Di();var Ipe=(t,e)=>{if(!t.daysOfWeek)return(0,kA.err)(["daysOfWeek field is undefined."]);let{daysOfWeek:r}=t;return e.allowOnlyOneBlankDayField&&t.daysOfMonth==="?"&&t.daysOfWeek==="?"?(0,kA.err)(["Cannot use blank value in daysOfMonth and daysOfWeek field when allowOnlyOneBlankDayField option is enabled."]):e.mustHaveBlankDayField&&t.daysOfMonth!=="?"&&t.daysOfWeek!=="?"?(0,kA.err)(["Cannot specify both daysOfMonth and daysOfWeek field when mustHaveBlankDayField option is enabled."]):e.useLastDayOfWeek&&t.daysOfWeek.indexOf("L")!==-1&&t.daysOfWeek.match(/[,/-]/)?(0,kA.err)(["Cannot specify last day of week with lists, steps or ranges (symbols ,-/)."]):e.useNthWeekdayOfMonth&&t.daysOfWeek.indexOf("#")!==-1&&t.daysOfWeek.match(/[,/-]/)?(0,kA.err)(["Cannot specify Nth weekday of month with lists, steps or ranges (symbols ,-/)."]):(0,Epe.default)(r,"daysOfWeek",e)};RA.default=Ipe});var lP=y(NA=>{"use strict";var Cpe=NA&&NA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(NA,"__esModule",{value:!0});jo();var bpe=Ti(),Spe=Cpe(fa());Di();var wpe=(t,e)=>{if(!t.years)return(0,bpe.err)(["years field is undefined, but useYears option is enabled."]);let{years:r}=t;return(0,Spe.default)(r,"years",e)};NA.default=wpe});var fP=y((S2e,hP)=>{"use strict";function bc(t){this._maxSize=t,this.clear()}bc.prototype.clear=function(){this._size=0,this._values=Object.create(null)};bc.prototype.get=function(t){return this._values[t]};bc.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var _pe=/[^.^\]^[]+|(?=\[\]|\.\.)/g,pP=/^\d+$/,Bpe=/^\d/,vpe=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Qpe=/^\s*(['"]?)(.*?)(\1)\s*$/,rw=512,uP=new bc(rw),dP=new bc(rw),AP=new bc(rw);hP.exports={Cache:bc,split:tw,normalizePath:ew,setter:function(t){var e=ew(t);return dP.get(t)||dP.set(t,function(n,i){for(var o=0,s=e.length,a=n;o<s-1;){var c=e[o];if(c==="__proto__"||c==="constructor"||c==="prototype")return n;a=a[e[o++]]}a[e[o]]=i})},getter:function(t,e){var r=ew(t);return AP.get(t)||AP.set(t,function(i){for(var o=0,s=r.length;o<s;)if(i!=null||!e)i=i[r[o++]];else return;return i})},join:function(t){return t.reduce(function(e,r){return e+(nw(r)||pP.test(r)?"["+r+"]":(e?".":"")+r)},"")},forEach:function(t,e,r){Tpe(Array.isArray(t)?t:tw(t),e,r)}};function ew(t){return uP.get(t)||uP.set(t,tw(t).map(function(e){return e.replace(Qpe,"$2")}))}function tw(t){return t.match(_pe)||[""]}function Tpe(t,e,r){var n=t.length,i,o,s,a;for(o=0;o<n;o++)i=t[o],i&&(Rpe(i)&&(i='"'+i+'"'),a=nw(i),s=!a&&/^\d+$/.test(i),e.call(r,i,a,s,o,t))}function nw(t){return typeof t=="string"&&t&&["'",'"'].indexOf(t.charAt(0))!==-1}function Dpe(t){return t.match(Bpe)&&!t.match(pP)}function kpe(t){return vpe.test(t)}function Rpe(t){return!nw(t)&&(Dpe(t)||kpe(t))}});var yP=y((w2e,mP)=>{"use strict";var Npe=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Im=t=>t.match(Npe)||[],Cm=t=>t[0].toUpperCase()+t.slice(1),iw=(t,e)=>Im(t).join(e).toLowerCase(),gP=t=>Im(t).reduce((e,r)=>`${e}${e?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),Ope=t=>Cm(gP(t)),xpe=t=>iw(t,"_"),Upe=t=>iw(t,"-"),Mpe=t=>Cm(iw(t," ")),Ppe=t=>Im(t).map(Cm).join(" ");mP.exports={words:Im,upperFirst:Cm,camelCase:gP,pascalCase:Ope,snakeCase:xpe,kebabCase:Upe,sentenceCase:Mpe,titleCase:Ppe}});var IP=y((_2e,ow)=>{"use strict";ow.exports=function(t){return EP(Lpe(t),t)};ow.exports.array=EP;function EP(t,e){var r=t.length,n=new Array(r),i={},o=r,s=$pe(e),a=Fpe(t);for(e.forEach(function(l){if(!a.has(l[0])||!a.has(l[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});o--;)i[o]||c(t[o],o,new Set);return n;function c(l,u,d){if(d.has(l)){var A;try{A=", node was:"+JSON.stringify(l)}catch{A=""}throw new Error("Cyclic dependency"+A)}if(!a.has(l))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(l));if(!i[u]){i[u]=!0;var p=s.get(l)||new Set;if(p=Array.from(p),u=p.length){d.add(l);do{var h=p[--u];c(h,a.get(h),d)}while(u);d.delete(l)}n[--r]=l}}}function Lpe(t){for(var e=new Set,r=0,n=t.length;r<n;r++){var i=t[r];e.add(i[0]),e.add(i[1])}return Array.from(e)}function $pe(t){for(var e=new Map,r=0,n=t.length;r<n;r++){var i=t[r];e.has(i[0])||e.set(i[0],new Set),e.has(i[1])||e.set(i[1],new Set),e.get(i[0]).add(i[1])}return e}function Fpe(t){for(var e=new Map,r=0,n=t.length;r<n;r++)e.set(t[r],r);return e}});var Aw={};_D(Aw,{ArraySchema:()=>$A,BooleanSchema:()=>UA,DateSchema:()=>cu,LazySchema:()=>Tm,MixedSchema:()=>xA,NumberSchema:()=>PA,ObjectSchema:()=>LA,Schema:()=>fr,StringSchema:()=>MA,TupleSchema:()=>FA,ValidationError:()=>cr,addMethod:()=>yhe,array:()=>zP,bool:()=>UP,boolean:()=>UP,date:()=>dw,defaultLocale:()=>RP,getIn:()=>lw,isSchema:()=>Sc,lazy:()=>ghe,mixed:()=>xP,number:()=>PP,object:()=>jP,printValue:()=>qo,reach:()=>Jpe,ref:()=>Wpe,setLocale:()=>mhe,string:()=>MP,tuple:()=>qP});function Ype(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function CP(t,e=!1){if(t==null||t===!0||t===!1)return""+t;let r=typeof t;if(r==="number")return Ype(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return Hpe.call(t).replace(Gpe,"Symbol($1)");let n=jpe.call(t).slice(8,-1);return n==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):n==="Error"||t instanceof Error?"["+zpe.call(t)+"]":n==="RegExp"?qpe.call(t):null}function qo(t,e){let r=CP(t,e);return r!==null?r:JSON.stringify(t,function(n,i){let o=CP(this[n],e);return o!==null?o:i},2)}function vP(t){return t==null?[]:[].concat(t)}function Wpe(t,e){return new Ho(t,e)}function su(t){function e({value:r,path:n="",options:i,originalValue:o,schema:s},a,c){let{name:l,test:u,params:d,message:A,skipAbsent:p}=t,{parent:h,context:f,abortEarly:E=s.spec.abortEarly,disableStackTrace:S=s.spec.disableStackTrace}=i,B={value:r,parent:h,context:f};function _(Ae={}){let Oe=NP(Object.assign({value:r,originalValue:o,label:s.spec.label,path:Ae.path||n,spec:s.spec,disableStackTrace:Ae.disableStackTrace||S},d,Ae.params),B),Ye=new cr(cr.formatError(Ae.message||A,Oe),r,Oe.path,Ae.type||l,Oe.disableStackTrace);return Ye.params=Oe,Ye}let v=E?a:c,T={path:n,parent:h,type:l,from:i.from,createError:_,resolve(Ae){return OP(Ae,B)},options:i,originalValue:o,schema:s},$=Ae=>{cr.isError(Ae)?v(Ae):Ae?c(null):v(_())},k=Ae=>{cr.isError(Ae)?v(Ae):a(Ae)};if(p&&ki(r))return $(!0);let P;try{var X;if(P=u.call(T,r,T),typeof((X=P)==null?void 0:X.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${T.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(P).then($,k)}}catch(Ae){k(Ae);return}$(P)}return e.OPTIONS=t,e}function NP(t,e){if(!t)return t;for(let r of Object.keys(t))t[r]=OP(t[r],e);return t}function OP(t,e){return Ho.isRef(t)?t.getValue(e.value,e.parent,e.context):t}function lw(t,e,r,n=r){let i,o,s;return e?((0,oi.forEach)(e,(a,c,l)=>{let u=c?a.slice(1,a.length-1):a;t=t.resolve({context:n,parent:i,value:r});let d=t.type==="tuple",A=l?parseInt(u,10):0;if(t.innerType||d){if(d&&!l)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&A>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${e}. because there is no value at that index. `);i=r,r=r&&r[A],t=d?t.spec.types[A]:t.innerType}if(!l){if(!t.fields||!t.fields[u])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${s} which is a type: "${t.type}")`);i=r,r=r&&r[u],t=t.fields[u]}o=u,s=c?"["+a+"]":"."+a}),{schema:t,parent:i,parentPath:o}):{parent:i,parentPath:e,schema:t}}function Jpe(t,e,r,n){return lw(t,e,r,n).schema}function au(t,e=new Map){if(Sc(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let r;if(t instanceof Date)r=new Date(t.getTime()),e.set(t,r);else if(t instanceof RegExp)r=new RegExp(t),e.set(t,r);else if(Array.isArray(t)){r=new Array(t.length),e.set(t,r);for(let n=0;n<t.length;n++)r[n]=au(t[n],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(let[n,i]of t.entries())r.set(n,au(i,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(let n of t)r.add(au(n,e))}else if(t instanceof Object){r={},e.set(t,r);for(let[n,i]of Object.entries(t))r[n]=au(i,e)}else throw Error(`Unable to clone ${t}`);return r}function Zpe(t){if(!(t!=null&&t.length))return;let e=[],r="",n=!1,i=!1;for(let o=0;o<t.length;o++){let s=t[o];if(s==="["&&!i){r&&(e.push(...r.split(".").filter(Boolean)),r=""),n=!0;continue}if(s==="]"&&!i){r&&(/^\d+$/.test(r)?e.push(r):e.push(r.replace(/^"|"$/g,"")),r=""),n=!1;continue}if(s==='"'){i=!i;continue}if(s==="."&&!n&&!i){r&&(e.push(r),r="");continue}r+=s}return r&&e.push(...r.split(".").filter(Boolean)),e}function Kpe(t,e){let r=e?`${e}.${t.path}`:t.path;return t.errors.map(n=>({message:n,path:Zpe(r)}))}function uw(t,e){var r;if(!((r=t.inner)!=null&&r.length)&&t.errors.length)return Kpe(t,e);let n=e?`${e}.${t.path}`:t.path;return t.inner.flatMap(i=>uw(i,n))}function xP(t){return new xA(t)}function UP(){return new UA}function the(t){let e=cw(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let r=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(r=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(r=0-r)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+r,e.second,e.millisecond)}function cw(t){var e,r;let n=ehe.exec(t);return n?{year:vs(n[1]),month:vs(n[2],1)-1,day:vs(n[3],1),hour:vs(n[4]),minute:vs(n[5]),second:vs(n[6]),millisecond:n[7]?vs(n[7].substring(0,3)):0,precision:(e=(r=n[7])==null?void 0:r.length)!=null?e:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:vs(n[10]),minuteOffset:vs(n[11])}:null}function vs(t,e=0){return Number(t)||e}function MP(){return new MA}function PP(){return new PA}function dw(){return new cu}function phe(t,e=[]){let r=[],n=new Set,i=new Set(e.map(([s,a])=>`${s}-${a}`));function o(s,a){let c=(0,oi.split)(s)[0];n.add(c),i.has(`${a}-${c}`)||r.push([a,c])}for(let s of Object.keys(t)){let a=t[s];n.add(s),Ho.isRef(a)&&a.isSibling?o(a.path,s):Sc(a)&&"deps"in a&&a.deps.forEach(c=>o(c,s))}return BP.default.array(Array.from(n),r).reverse()}function bP(t,e){let r=1/0;return t.some((n,i)=>{var o;if((o=e.path)!=null&&o.includes(n))return r=i,!0}),r}function $P(t){return(e,r)=>bP(t,e)-bP(t,r)}function _m(t){if("fields"in t){let e={};for(let[r,n]of Object.entries(t.fields))e[r]=_m(n);return t.setFields(e)}if(t.type==="array"){let e=t.optional();return e.innerType&&(e.innerType=_m(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(_m)}):"optional"in t?t.optional():t}function wP(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(n=>r.indexOf(n)===-1)}function jP(t){return new LA(t)}function zP(t){return new $A(t)}function qP(t){return new FA(t)}function ghe(t){return new Tm(t)}function _P(t){try{return t()}catch(e){if(cr.isError(e))return Promise.reject(e);throw e}}function mhe(t){Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(r=>{RP[e][r]=t[e][r]})})}function yhe(t,e,r){if(!t||!Sc(t.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof e!="string")throw new TypeError("A Method name must be provided");if(typeof r!="function")throw new TypeError("Method function must be provided");t.prototype[e]=r}var oi,OA,BP,jpe,zpe,qpe,Hpe,Gpe,QP,TP,DP,Vpe,Bm,cr,zo,Xr,ga,sw,aw,Sm,wm,kP,RP,Sc,vm,bm,Ho,ki,Qm,fr,Xpe,xA,UA,ehe,rhe,nhe,ihe,ohe,she,ahe,che,lhe,uhe,MA,dhe,PA,LP,Ahe,cu,FP,hhe,SP,fhe,LA,$A,FA,Tm,pw=ft(()=>{"use strict";oi=Qe(fP()),OA=Qe(yP()),BP=Qe(IP()),jpe=Object.prototype.toString,zpe=Error.prototype.toString,qpe=RegExp.prototype.toString,Hpe=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Gpe=/^Symbol\((.*)\)(.*)$/;Vpe=/\$\{\s*(\w+)\s*\}/g;QP=Symbol.toStringTag;Bm=class{constructor(e,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[QP]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],vP(e).forEach(o=>{if(cr.isError(o)){this.errors.push(...o.errors);let s=o.inner.length?o.inner:[o];this.inner.push(...s)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}};TP=Symbol.hasInstance;DP=Symbol.toStringTag;cr=class t extends Error{static formatError(e,r){let n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof e=="string"?e.replace(Vpe,(i,o)=>qo(r[o])):typeof e=="function"?e(r):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,r,n,i,o){let s=new Bm(e,r,n,i);if(o)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[DP]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,t)}static[TP](e){return Bm[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}},zo={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:r,originalValue:n})=>{let i=n!=null&&n!==r?` (cast from the value \`${qo(n,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${qo(r,!0)}\``+i:`${t} must match the configured type. The validated value was: \`${qo(r,!0)}\``+i}},Xr={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},ga={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},sw={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},aw={isValue:"${path} field must be ${value}"},Sm={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},wm={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},kP={notType:t=>{let{path:e,value:r,spec:n}=t,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${e} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${qo(r,!0)}\``;if(r.length>i)return`${e} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${qo(r,!0)}\``}return cr.formatError(zo.notType,t)}},RP=Object.assign(Object.create(null),{mixed:zo,string:Xr,number:ga,date:sw,object:Sm,array:wm,boolean:aw,tuple:kP}),Sc=t=>t&&t.__isYupSchema__,vm=class t{static fromOptions(e,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:o}=r,s=typeof n=="function"?n:(...a)=>a.every(c=>c===n);return new t(e,(a,c)=>{var l;let u=s(...a)?i:o;return(l=u?.(c))!=null?l:c})}constructor(e,r){this.fn=void 0,this.refs=e,this.refs=e,this.fn=r}resolve(e,r){let n=this.refs.map(o=>o.getValue(r?.value,r?.parent,r?.context)),i=this.fn(n,e,r);if(i===void 0||i===e)return e;if(!Sc(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}},bm={context:"$",value:"."};Ho=class{constructor(e,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===bm.context,this.isValue=this.key[0]===bm.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?bm.context:this.isValue?bm.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,oi.getter)(this.path,!0),this.map=r.map}getValue(e,r,n){let i=this.isContext?n:this.isValue?e:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(e,r){return this.getValue(e,r?.parent,r?.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}};Ho.prototype.__isYupRef=!0;ki=t=>t==null;Qm=class t extends Set{describe(){let e=[];for(let r of this.values())e.push(Ho.isRef(r)?r.describe():r);return e}resolveAll(e){let r=[];for(let n of this.values())r.push(e(n));return r}clone(){return new t(this.values())}merge(e,r){let n=this.clone();return e.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}};fr=class{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Qm,this._blacklist=new Qm,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(zo.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e?.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=au(Object.assign({},this.spec,e)),r}label(e){let r=this.clone();return r.spec.label=e,r}meta(...e){if(e.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},e[0]),r}withMutation(e){let r=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=r,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let r=this,n=e.clone(),i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=r._blacklist.merge(e._blacklist,e._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(o=>{e.tests.forEach(s=>{o.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,o)=>o.resolve(i,e),r),r=r.resolve(e)}return r}resolveOptions(e){var r,n,i,o;return Object.assign({},e,{from:e.from||[],strict:(r=e.strict)!=null?r:this.spec.strict,abortEarly:(n=e.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=e.recursive)!=null?i:this.spec.recursive,disableStackTrace:(o=e.disableStackTrace)!=null?o:this.spec.disableStackTrace})}cast(e,r={}){let n=this.resolve(Object.assign({},r,{value:e})),i=r.assert==="ignore-optionality",o=n._cast(e,r);if(r.assert!==!1&&!n.isType(o)){if(i&&ki(o))return o;let s=qo(e),a=qo(o);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
103
103
 
104
104
  attempted value: ${s}
105
- `+(a!==s?`result of cast: ${a}`:""))}return o}_cast(e,r){let n=e===void 0?e:this.transforms.reduce((i,o)=>o.call(this,i,e,this,r),e);return n===void 0&&(n=this.getDefault(r)),n}_validate(e,r={},n,i){let{path:o,originalValue:s=e,strict:a=this.spec.strict}=r,c=e;a||(c=this._cast(c,Object.assign({assert:!1},r)));let l=[];for(let u of Object.values(this.internalTests))u&&l.push(u);this.runTests({path:o,value:c,originalValue:s,options:r,tests:l},n,u=>{if(u.length)return i(u,c);this.runTests({path:o,value:c,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(e,r,n){let i=!1,{tests:o,value:s,originalValue:a,path:c,options:l}=e,u=f=>{i||(i=!0,r(f,s))},d=f=>{i||(i=!0,n(f,s))},A=o.length,p=[];if(!A)return d([]);let h={value:s,originalValue:a,path:c,options:l,schema:this};for(let f=0;f<o.length;f++){let E=o[f];E(h,u,function(B){B&&(Array.isArray(B)?p.push(...B):p.push(B)),--A<=0&&d(p)})}}asNestedTest({key:e,index:r,parent:n,parentPath:i,originalParent:o,options:s}){let a=e??r;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");let c=typeof a=="number",l=n[a],u=Object.assign({},s,{strict:!0,parent:n,value:l,originalValue:o[a],key:void 0,[c?"index":"key"]:a,path:c||a.includes(".")?`${i||""}[${c?a:`"${a}"`}]`:(i?`${i}.`:"")+e});return(d,A,p)=>this.resolve(u)._validate(l,u,A,p)}validate(e,r){var n;let i=this.resolve(Object.assign({},r,{value:e})),o=(n=r?.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((s,a)=>i._validate(e,r,(c,l)=>{cr.isError(c)&&(c.value=l),a(c)},(c,l)=>{c.length?a(new cr(c,l,void 0,void 0,o)):s(l)}))}validateSync(e,r){var n;let i=this.resolve(Object.assign({},r,{value:e})),o,s=(n=r?.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(e,Object.assign({},r,{sync:!0}),(a,c)=>{throw cr.isError(a)&&(a.value=c),a},(a,c)=>{if(a.length)throw new cr(a,e,void 0,void 0,s);o=c}),o}isValid(e,r){return this.validate(e,r).then(()=>!0,n=>{if(cr.isError(n))return!1;throw n})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(n){if(cr.isError(n))return!1;throw n}}_getDefault(e){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,e):au(r)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,r){let n=this.clone({nullable:e});return n.internalTests.nullable=su({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(e,r){let n=this.clone({optional:e});return n.internalTests.optionality=su({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(e=zo.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=zo.notNull){return this.nullability(!1,e)}required(e=zo.required){return this.clone().withMutation(r=>r.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let r=this.clone();return r.transforms.push(e),r}test(...e){let r;if(e.length===1?typeof e[0]=="function"?r={test:e[0]}:r=e[0]:e.length===2?r={name:e[0],test:e[1]}:r={name:e[0],message:e[1],test:e[2]},r.message===void 0&&(r.message=zo.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=su(r),o=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(o||s.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(e,r){!Array.isArray(e)&&typeof e!="string"&&(r=e,e=".");let n=this.clone(),i=vP(e).map(o=>new Ho(o));return i.forEach(o=>{o.isSibling&&n.deps.push(o.key)}),n.conditions.push(typeof r=="function"?new vm(i,r):vm.fromOptions(i,r)),n}typeError(e){let r=this.clone();return r.internalTests.typeError=su({message:e,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(e,r=zo.oneOf){let n=this.clone();return e.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=su({message:r,name:"oneOf",skipAbsent:!0,test(i){let o=this.schema._whitelist,s=o.resolveAll(this.resolve);return s.includes(i)?!0:this.createError({params:{values:Array.from(o).join(", "),resolved:s}})}}),n}notOneOf(e,r=zo.notOneOf){let n=this.clone();return e.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=su({message:r,name:"notOneOf",test(i){let o=this.schema._blacklist,s=o.resolveAll(this.resolve);return s.includes(i)?this.createError({params:{values:Array.from(o).join(", "),resolved:s}}):!0}}),n}strip(e=!0){let r=this.clone();return r.spec.strip=e,r}describe(e){let r=(e?this.resolve(e):this).clone(),{label:n,meta:i,optional:o,nullable:s}=r.spec;return{meta:i,label:n,optional:o,nullable:s,default:r.getDefault(e),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.filter((c,l,u)=>u.findIndex(d=>d.OPTIONS.name===c.OPTIONS.name)===l).map(c=>{let l=c.OPTIONS.params&&e?NP(Object.assign({},c.OPTIONS.params),e):c.OPTIONS.params;return{name:c.OPTIONS.name,params:l}})}}get"~standard"(){let e=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await e.validate(n,{abortEarly:!1})}}catch(i){if(i instanceof cr)return{issues:uw(i)};throw i}}}}};hr.prototype.__isYupSchema__=!0;for(let t of["validate","validateSync"])hr.prototype[`${t}At`]=function(e,r,n={}){let{parent:i,parentPath:o,schema:s}=lw(this,e,r,n.context);return s[t](i&&i[o],Object.assign({},n,{parent:i,path:e}))};for(let t of["equals","is"])hr.prototype[t]=hr.prototype.oneOf;for(let t of["not","nope"])hr.prototype[t]=hr.prototype.notOneOf;Xpe=()=>!0;xA=class extends hr{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Xpe},e))}};xP.prototype=xA.prototype;UA=class extends hr{constructor(){super({type:"boolean",check(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}}),this.withMutation(()=>{this.transform((e,r)=>{if(this.spec.coerce&&!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}isTrue(e=aw.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return ki(r)||r===!0}})}isFalse(e=aw.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return ki(r)||r===!1}})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}};UP.prototype=UA.prototype;ehe=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;rhe=/^[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])?)*$/,nhe=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,ihe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ohe="^\\d{4}-\\d{2}-\\d{2}",she="\\d{2}:\\d{2}:\\d{2}",ahe="(([+-]\\d{2}(:?\\d{2})?)|Z)",che=new RegExp(`${ohe}T${she}(\\.\\d+)?${ahe}$`),lhe=t=>ki(t)||t===t.trim(),uhe={}.toString();MA=class extends hr{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,r)=>{if(!this.spec.coerce||this.isType(e)||Array.isArray(e))return e;let n=e!=null&&e.toString?e.toString():e;return n===uhe?e:n})})}required(e){return super.required(e).withMutation(r=>r.test({message:e||zo.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(r=>r.OPTIONS.name!=="required"),e))}length(e,r=Xr.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(n){return n.length===this.resolve(e)}})}min(e,r=Xr.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n.length>=this.resolve(e)}})}max(e,r=Xr.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:e},skipAbsent:!0,test(n){return n.length<=this.resolve(e)}})}matches(e,r){let n=!1,i,o;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:o}=r:i=r),this.test({name:o||"matches",message:i||Xr.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&n||s.search(e)!==-1})}email(e=Xr.email){return this.matches(rhe,{name:"email",message:e,excludeEmptyString:!0})}url(e=Xr.url){return this.matches(nhe,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Xr.uuid){return this.matches(ihe,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let r="",n,i;return e&&(typeof e=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=e:r=e),this.matches(che,{name:"datetime",message:r||Xr.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Xr.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:o=>{if(!o||n)return!0;let s=cw(o);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||Xr.datetime_precision,params:{precision:i},skipAbsent:!0,test:o=>{if(!o||i==null)return!0;let s=cw(o);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Xr.trim){return this.transform(r=>r!=null?r.trim():r).test({message:e,name:"trim",test:lhe})}lowercase(e=Xr.lowercase){return this.transform(r=>ki(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ki(r)||r===r.toLowerCase()})}uppercase(e=Xr.uppercase){return this.transform(r=>ki(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ki(r)||r===r.toUpperCase()})}};MP.prototype=MA.prototype;dhe=t=>t!=+t;PA=class extends hr{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!dhe(e)}}),this.withMutation(()=>{this.transform((e,r)=>{if(!this.spec.coerce)return e;let n=e;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return this.isType(n)||n===null?n:parseFloat(n)})})}min(e,r=ga.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n>=this.resolve(e)}})}max(e,r=ga.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n<=this.resolve(e)}})}lessThan(e,r=ga.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(n){return n<this.resolve(e)}})}moreThan(e,r=ga.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(n){return n>this.resolve(e)}})}positive(e=ga.positive){return this.moreThan(0,e)}negative(e=ga.negative){return this.lessThan(0,e)}integer(e=ga.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(e=>ki(e)?e:e|0)}round(e){var r;let n=["ceil","floor","round","trunc"];if(e=((r=e)==null?void 0:r.toLowerCase())||"round",e==="trunc")return this.truncate();if(n.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>ki(i)?i:Math[e](i))}};PP.prototype=PA.prototype;LP=new Date(""),Ahe=t=>Object.prototype.toString.call(t)==="[object Date]";cu=class t extends hr{constructor(){super({type:"date",check(e){return Ahe(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,r)=>!this.spec.coerce||this.isType(e)||e===null?e:(e=the(e),isNaN(e)?t.INVALID_DATE:new Date(e)))})}prepareParam(e,r){let n;if(Ho.isRef(e))n=e;else{let i=this.cast(e);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(e,r=sw.min){let n=this.prepareParam(e,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(e,r=sw.max){let n=this.prepareParam(e,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}};cu.INVALID_DATE=LP;dw.prototype=cu.prototype;dw.INVALID_DATE=LP;FP=(t,e,r)=>{if(typeof t!="string")return t;let n=t;try{n=JSON.parse(t)}catch{}return r.isType(n)?n:t};hhe=(t,e)=>{let r=[...(0,oi.normalizePath)(e)];if(r.length===1)return r[0]in t;let n=r.pop(),i=(0,oi.getter)((0,oi.join)(r),!0)(t);return!!(i&&n in i)},SP=t=>Object.prototype.toString.call(t)==="[object Object]";fhe=$P([]);LA=class extends hr{constructor(e){super({type:"object",check(r){return SP(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=fhe,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,r={}){var n;let i=super._cast(e,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let o=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(d=>!this._nodes.includes(d))),c={},l=Object.assign({},r,{parent:c,__validating:r.__validating||!1}),u=!1;for(let d of a){let A=o[d],p=d in i,h=i[d];if(A){let f;l.path=(r.path?`${r.path}.`:"")+d,A=A.resolve({value:h,context:r.context,parent:c});let E=A instanceof hr?A.spec:void 0,S=E?.strict;if(E!=null&&E.strip){u=u||d in i;continue}f=!r.__validating||!S?A.cast(h,l):h,f!==void 0&&(c[d]=f)}else p&&!s&&(c[d]=h);(p!==d in c||c[d]!==h)&&(u=!0)}return u?c:i}_validate(e,r={},n,i){let{from:o=[],originalValue:s=e,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:s},...o],r.__validating=!0,r.originalValue=s,super._validate(e,r,n,(c,l)=>{if(!a||!SP(l)){i(c,l);return}s=s||l;let u=[];for(let d of this._nodes){let A=this.fields[d];!A||Ho.isRef(A)||u.push(A.asNestedTest({options:r,key:d,parent:l,parentPath:r.path,originalParent:s}))}this.runTests({tests:u,value:l,originalValue:s,options:r},n,d=>{i(d.sort(this._sortErrors).concat(c),l)})})}clone(e){let r=super.clone(e);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(e){let r=super.concat(e),n=r.fields;for(let[i,o]of Object.entries(this.fields)){let s=n[i];n[i]=s===void 0?o:s}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;let o=this.fields[n],s=e;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=o&&"getDefault"in o?o.getDefault(s):void 0}),r}setFields(e,r){let n=this.clone();return n.fields=e,n._nodes=phe(e,r),n._sortErrors=$P(Object.keys(e)),r&&(n._excludedEdges=r),n}shape(e,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,e),i)})}partial(){let e={};for(let[r,n]of Object.entries(this.fields))e[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return _m(this)}pick(e){let r={};for(let n of e)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>e.includes(n)&&e.includes(i)))}omit(e){let r=[];for(let n of Object.keys(this.fields))e.includes(n)||r.push(n);return this.pick(r)}from(e,r,n){let i=(0,oi.getter)(e,!0);return this.transform(o=>{if(!o)return o;let s=o;return hhe(o,e)&&(s=Object.assign({},o),n||delete s[e],s[r]=i(o)),s})}json(){return this.transform(FP)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Sm.exact,test(r){if(r==null)return!0;let n=wP(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,r=Sm.noUnknown){typeof e!="boolean"&&(r=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;let o=wP(this.schema,i);return!e||o.length===0||this.createError({params:{unknown:o.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,r=Sm.noUnknown){return this.noUnknown(!e,r)}transformKeys(e){return this.transform(r=>{if(!r)return r;let n={};for(let i of Object.keys(r))n[e(i)]=r[i];return n})}camelCase(){return this.transformKeys(OA.camelCase)}snakeCase(){return this.transformKeys(OA.snakeCase)}constantCase(){return this.transformKeys(e=>(0,OA.snakeCase)(e).toUpperCase())}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(let[o,s]of Object.entries(r.fields)){var i;let a=e;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[o]})),n.fields[o]=s.describe(a)}return n}};jP.prototype=LA.prototype;$A=class extends hr{constructor(e){super({type:"array",spec:{types:e},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=e}_cast(e,r){let n=super._cast(e,r);if(!this._typeCheck(n)||!this.innerType)return n;let i=!1,o=n.map((s,a)=>{let c=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${a}]`,parent:n,originalValue:s,value:s,index:a}));return c!==s&&(i=!0),c});return i?o:n}_validate(e,r={},n,i){var o;let s=this.innerType,a=(o=r.recursive)!=null?o:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(e,r,n,(c,l)=>{var u;if(!a||!s||!this._typeCheck(l)){i(c,l);return}let d=new Array(l.length);for(let p=0;p<l.length;p++){var A;d[p]=s.asNestedTest({options:r,index:p,parent:l,parentPath:r.path,originalParent:(A=r.originalValue)!=null?A:e})}this.runTests({value:l,tests:d,originalValue:(u=r.originalValue)!=null?u:e,options:r},n,p=>i(p.concat(c),l))})}clone(e){let r=super.clone(e);return r.innerType=this.innerType,r}json(){return this.transform(FP)}concat(e){let r=super.concat(e);return r.innerType=this.innerType,e.innerType&&(r.innerType=r.innerType?r.innerType.concat(e.innerType):e.innerType),r}of(e){let r=this.clone();if(!Sc(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+qo(e));return r.innerType=e,r.spec=Object.assign({},r.spec,{types:e}),r}length(e,r=wm.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(n){return n.length===this.resolve(e)}})}min(e,r){return r=r||wm.min,this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n.length>=this.resolve(e)}})}max(e,r){return r=r||wm.max,this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,r)=>this._typeCheck(e)?e:r==null?[]:[].concat(r))}compact(e){let r=e?(n,i,o)=>!e(n,i,o):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);if(r.innerType){var i;let o=e;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[0]})),n.innerType=r.innerType.describe(o)}return n}};zP.prototype=$A.prototype;FA=class extends hr{constructor(e){super({type:"tuple",spec:{types:e},check(r){let n=this.spec.types;return Array.isArray(r)&&r.length===n.length}}),this.withMutation(()=>{this.typeError(kP.notType)})}_cast(e,r){let{types:n}=this.spec,i=super._cast(e,r);if(!this._typeCheck(i))return i;let o=!1,s=n.map((a,c)=>{let l=a.cast(i[c],Object.assign({},r,{path:`${r.path||""}[${c}]`,parent:i,originalValue:i[c],value:i[c],index:c}));return l!==i[c]&&(o=!0),l});return o?s:i}_validate(e,r={},n,i){let o=this.spec.types;super._validate(e,r,n,(s,a)=>{var c;if(!this._typeCheck(a)){i(s,a);return}let l=[];for(let[d,A]of o.entries()){var u;l[d]=A.asNestedTest({options:r,index:d,parent:a,parentPath:r.path,originalParent:(u=r.originalValue)!=null?u:e})}this.runTests({value:a,tests:l,originalValue:(c=r.originalValue)!=null?c:e,options:r},n,d=>i(d.concat(s),a))})}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);return n.innerType=r.spec.types.map((i,o)=>{var s;let a=e;return(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[o]})),i.describe(a)}),n}};qP.prototype=FA.prototype;Tm=class t{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(r,n={})=>{let i=this.builder(r,n);if(!Sc(i))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(i=i.optional()),i.resolve(n)},this.builder=e,this.spec={meta:void 0,optional:!1}}clone(e){let r=new t(this.builder);return r.spec=Object.assign({},this.spec,e),r}optionality(e){return this.clone({optional:e})}optional(){return this.optionality(!0)}resolve(e){return this._resolve(e.value,e)}cast(e,r){return this._resolve(e,r).cast(e,r)}asNestedTest(e){let{key:r,index:n,parent:i,options:o}=e,s=i[n??r];return this._resolve(s,Object.assign({},o,{value:s,parent:i})).asNestedTest(e)}validate(e,r){return _P(()=>this._resolve(e,r).validate(e,r))}validateSync(e,r){return this._resolve(e,r).validateSync(e,r)}validateAt(e,r,n){return _P(()=>this._resolve(r,n).validateAt(e,r,n))}validateSyncAt(e,r,n){return this._resolve(r,n).validateSyncAt(e,r,n)}isValid(e,r){try{return this._resolve(e,r).isValid(e,r)}catch(n){if(cr.isError(n))return Promise.resolve(!1);throw n}}isValidSync(e,r){return this._resolve(e,r).isValidSync(e,r)}describe(e){return e?this.resolve(e).describe(e):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...e){if(e.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},e[0]),r}get"~standard"(){let e=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await e.validate(n,{abortEarly:!1})}}catch(i){if(cr.isError(i))return{issues:uw(i)};throw i}}}}}});var HP=y(hw=>{"use strict";Object.defineProperty(hw,"__esModule",{value:!0});hw.default=[{name:"npm-node-cron",preset:{presetId:"npm-node-cron",useSeconds:!0,useYears:!1,useAliases:!0,useBlankDay:!1,allowOnlyOneBlankDayField:!1,mustHaveBlankDayField:!1,useLastDayOfMonth:!1,useLastDayOfWeek:!1,useNearestWeekday:!1,useNthWeekdayOfMonth:!1,seconds:{minValue:0,maxValue:59},minutes:{minValue:0,maxValue:59},hours:{minValue:0,maxValue:23},daysOfMonth:{minValue:1,maxValue:31},months:{minValue:0,maxValue:11},daysOfWeek:{minValue:0,maxValue:6},years:{minValue:1970,maxValue:2099}}},{name:"aws-cloud-watch",preset:{presetId:"aws-cloud-watch",useSeconds:!1,useYears:!0,useAliases:!0,useBlankDay:!0,allowOnlyOneBlankDayField:!0,mustHaveBlankDayField:!0,useLastDayOfMonth:!0,useLastDayOfWeek:!0,useNearestWeekday:!0,useNthWeekdayOfMonth:!0,seconds:{minValue:0,maxValue:59},minutes:{minValue:0,maxValue:59},hours:{minValue:0,maxValue:23},daysOfMonth:{minValue:1,maxValue:31},months:{minValue:1,maxValue:12},daysOfWeek:{minValue:1,maxValue:7},years:{minValue:1970,maxValue:2199}}},{name:"npm-cron-schedule",preset:{presetId:"npm-cron-schedule",useSeconds:!0,useYears:!1,useAliases:!0,useBlankDay:!1,allowOnlyOneBlankDayField:!1,mustHaveBlankDayField:!1,useLastDayOfMonth:!1,useLastDayOfWeek:!1,useNearestWeekday:!1,useNthWeekdayOfMonth:!1,seconds:{minValue:0,maxValue:59},minutes:{minValue:0,maxValue:59},hours:{minValue:0,maxValue:23},daysOfMonth:{minValue:1,maxValue:31},months:{minValue:1,maxValue:12},daysOfWeek:{minValue:0,maxValue:7},years:{minValue:1970,maxValue:2099}}}]});var WP=y(lr=>{"use strict";var Ehe=lr&&lr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ihe=lr&&lr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Che=lr&&lr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ehe(e,t,r);return Ihe(e,t),e},bhe=lr&&lr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lr,"__esModule",{value:!0});lr.validateOptions=lr.registerOptionPreset=lr.getOptionPresets=lr.getOptionPreset=void 0;var J=Che((pw(),PC(Aw)));pw();var lu=Ti(),GP=bhe(HP());Di();var wc={default:{presetId:"default",useSeconds:!1,useYears:!1,useAliases:!1,useBlankDay:!1,allowOnlyOneBlankDayField:!1,allowStepping:!0,mustHaveBlankDayField:!1,useLastDayOfMonth:!1,useLastDayOfWeek:!1,useNearestWeekday:!1,useNthWeekdayOfMonth:!1,seconds:{minValue:0,maxValue:59},minutes:{minValue:0,maxValue:59},hours:{minValue:0,maxValue:23},daysOfMonth:{minValue:0,maxValue:31},months:{minValue:0,maxValue:12},daysOfWeek:{minValue:0,maxValue:7},years:{minValue:1970,maxValue:2099}}},VP=J.object({presetId:J.string().required(),useSeconds:J.boolean().required(),useYears:J.boolean().required(),useAliases:J.boolean(),useBlankDay:J.boolean().required(),allowOnlyOneBlankDayField:J.boolean().required(),allowStepping:J.boolean(),mustHaveBlankDayField:J.boolean(),useLastDayOfMonth:J.boolean(),useLastDayOfWeek:J.boolean(),useNearestWeekday:J.boolean(),useNthWeekdayOfMonth:J.boolean(),seconds:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required(),minutes:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required(),hours:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required(),daysOfMonth:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required(),months:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required(),daysOfWeek:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required(),years:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required()}).required(),She=t=>wc[t]?(0,lu.valid)(wc[t]):(0,lu.err)(`Option preset '${t}' not found.`);lr.getOptionPreset=She;var whe=()=>wc;lr.getOptionPresets=whe;var _he=(t,e)=>{wc[t]=VP.validateSync(e,{strict:!1,abortEarly:!1,stripUnknown:!0,recursive:!0})};lr.registerOptionPreset=_he;function Bhe(){for(let t=0;t<GP.default.length;t+=1){let{name:e,preset:r}=GP.default[t];(0,lr.registerOptionPreset)(e,r)}}Bhe();var YP=new Map;function vhe(t,e){var r;return t+((r=JSON.stringify(e))!==null&&r!==void 0?r:"")}function Qhe(t){return J.object({presetId:J.string().required(),preset:VP.required(),useSeconds:J.boolean().required(),useYears:J.boolean().required(),useAliases:J.boolean(),useBlankDay:J.boolean().required(),allowOnlyOneBlankDayField:J.boolean().required(),allowStepping:J.boolean(),mustHaveBlankDayField:J.boolean(),useLastDayOfMonth:J.boolean(),useLastDayOfWeek:J.boolean(),useNearestWeekday:J.boolean(),useNthWeekdayOfMonth:J.boolean(),seconds:J.object({lowerLimit:J.number().min(t.seconds.minValue).max(t.seconds.maxValue),upperLimit:J.number().min(t.seconds.minValue).max(t.seconds.maxValue)}).required(),minutes:J.object({lowerLimit:J.number().min(t.minutes.minValue).max(t.minutes.maxValue),upperLimit:J.number().min(t.minutes.minValue).max(t.minutes.maxValue)}).required(),hours:J.object({lowerLimit:J.number().min(t.hours.minValue).max(t.hours.maxValue),upperLimit:J.number().min(t.hours.minValue).max(t.hours.maxValue)}).required(),daysOfMonth:J.object({lowerLimit:J.number().min(t.daysOfMonth.minValue).max(t.daysOfMonth.maxValue),upperLimit:J.number().min(t.daysOfMonth.minValue).max(t.daysOfMonth.maxValue)}).required(),months:J.object({lowerLimit:J.number().min(t.months.minValue).max(t.months.maxValue),upperLimit:J.number().min(t.months.minValue).max(t.months.maxValue)}).required(),daysOfWeek:J.object({lowerLimit:J.number().min(t.daysOfWeek.minValue).max(t.daysOfWeek.maxValue),upperLimit:J.number().min(t.daysOfWeek.minValue).max(t.daysOfWeek.maxValue)}).required(),years:J.object({lowerLimit:J.number().min(t.years.minValue).max(t.years.maxValue),upperLimit:J.number().min(t.years.minValue).max(t.years.maxValue)}).required()}).required()}function The(t,e){var r,n,i,o,s,a,c,l,u,d,A,p,h,f,E,S,B,_,v,T,$;let k=Object.assign(Object.assign({presetId:t.presetId,preset:t},{useSeconds:t.useSeconds,useYears:t.useYears,useAliases:(r=t.useAliases)!==null&&r!==void 0?r:!1,useBlankDay:t.useBlankDay,allowOnlyOneBlankDayField:t.allowOnlyOneBlankDayField,allowStepping:(n=t.allowStepping)!==null&&n!==void 0?n:!0,mustHaveBlankDayField:(i=t.mustHaveBlankDayField)!==null&&i!==void 0?i:!1,useLastDayOfMonth:(o=t.useLastDayOfMonth)!==null&&o!==void 0?o:!1,useLastDayOfWeek:(s=t.useLastDayOfWeek)!==null&&s!==void 0?s:!1,useNearestWeekday:(a=t.useNearestWeekday)!==null&&a!==void 0?a:!1,useNthWeekdayOfMonth:(c=t.useNthWeekdayOfMonth)!==null&&c!==void 0?c:!1,seconds:{lowerLimit:(l=t.seconds.lowerLimit)!==null&&l!==void 0?l:t.seconds.minValue,upperLimit:(u=t.seconds.upperLimit)!==null&&u!==void 0?u:t.seconds.maxValue},minutes:{lowerLimit:(d=t.minutes.lowerLimit)!==null&&d!==void 0?d:t.minutes.minValue,upperLimit:(A=t.minutes.upperLimit)!==null&&A!==void 0?A:t.minutes.maxValue},hours:{lowerLimit:(p=t.hours.lowerLimit)!==null&&p!==void 0?p:t.hours.minValue,upperLimit:(h=t.hours.upperLimit)!==null&&h!==void 0?h:t.hours.maxValue},daysOfMonth:{lowerLimit:(f=t.daysOfMonth.lowerLimit)!==null&&f!==void 0?f:t.daysOfMonth.minValue,upperLimit:(E=t.daysOfMonth.upperLimit)!==null&&E!==void 0?E:t.daysOfMonth.maxValue},months:{lowerLimit:(S=t.months.lowerLimit)!==null&&S!==void 0?S:t.months.minValue,upperLimit:(B=t.months.upperLimit)!==null&&B!==void 0?B:t.months.maxValue},daysOfWeek:{lowerLimit:(_=t.daysOfWeek.lowerLimit)!==null&&_!==void 0?_:t.daysOfWeek.minValue,upperLimit:(v=t.daysOfWeek.upperLimit)!==null&&v!==void 0?v:t.daysOfWeek.maxValue},years:{lowerLimit:(T=t.years.lowerLimit)!==null&&T!==void 0?T:t.years.minValue,upperLimit:($=t.years.upperLimit)!==null&&$!==void 0?$:t.years.maxValue}}),e);return Qhe(t).validateSync(k,{strict:!1,abortEarly:!1,stripUnknown:!0,recursive:!0})}var Dhe=t=>{try{let e;if(t.preset)if(typeof t.preset=="string"){if(!wc[t.preset])return(0,lu.err)([`Option preset ${t.preset} does not exist.`]);e=wc[t.preset]}else e=t.preset;else e=wc.default;let r=vhe(e.presetId,t.override),n=YP.get(r);if(n)return(0,lu.valid)(n);let i=The(e,t.override);return YP.set(r,i),(0,lu.valid)(i)}catch(e){return(0,lu.err)(e.errors)}};lr.validateOptions=Dhe});var jo=y(jA=>{"use strict";var Bc=jA&&jA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jA,"__esModule",{value:!0});var _c=Ti(),khe=Bc(nP()),Rhe=Bc(iP()),Nhe=Bc(oP()),Ohe=Bc(sP()),xhe=Bc(aP()),Uhe=Bc(cP()),Mhe=Bc(lP()),Phe=WP();Di();var Lhe=(t,e)=>{let r=t.trim().split(" ");if(e.useSeconds&&e.useYears&&r.length!==7)return(0,_c.err)(`Expected 7 values, but got ${r.length}.`);if((e.useSeconds&&!e.useYears||e.useYears&&!e.useSeconds)&&r.length!==6)return(0,_c.err)(`Expected 6 values, but got ${r.length}.`);if(!e.useSeconds&&!e.useYears&&r.length!==5)return(0,_c.err)(`Expected 5 values, but got ${r.length}.`);let n={seconds:e.useSeconds?r[0]:void 0,minutes:r[e.useSeconds?1:0],hours:r[e.useSeconds?2:1],daysOfMonth:r[e.useSeconds?3:2],months:r[e.useSeconds?4:3],daysOfWeek:r[e.useSeconds?5:4],years:e.useYears?r[e.useSeconds?6:5]:void 0};return(0,_c.valid)(n)},$he=(t,e={})=>{let r=(0,Phe.validateOptions)(e);if(r.isError())return r;let n=r.getValue(),i=Lhe(t,n);if(i.isError())return(0,_c.err)([`${i.getError()} (Input cron: '${t}')`]);let o=i.getValue(),s=[];if(n.useSeconds&&s.push((0,khe.default)(o,n)),s.push((0,Rhe.default)(o,n)),s.push((0,Nhe.default)(o,n)),s.push((0,Ohe.default)(o,n)),s.push((0,xhe.default)(o,n)),s.push((0,Uhe.default)(o,n)),n.useYears&&s.push((0,Mhe.default)(o,n)),s.every(c=>c.isValid()))return(0,_c.valid)(o);let a=[];return s.forEach(c=>{c.isError()&&c.getError().forEach(l=>{a.push(l)})}),a.forEach((c,l)=>{a[l]=`${c} (Input cron: '${t}')`}),(0,_c.err)(a)};jA.default=$he});var uu=y(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.parseUTCDate=Dm;Qr.requireUTCDate=JP;Qr.toUTCISOString=ZP;Qr.toOptionalUTCISOString=Whe;Qr.utcNow=KP;Qr.utcNowISOString=Jhe;Qr.getUTCTimestampMs=XP;Qr.parsePersistedTimestamp=zA;Qr.getPersistedTimestampMs=Zhe;Qr.formatPersistedTimestamp=eL;Qr.formatCompactPersistedTimestamp=Khe;Qr.formatPersistedDate=tL;Qr.formatPersistedTime=Xhe;Qr.formatRelativePersistedTimestamp=efe;var Fhe=/(Z|[+-]\d{2}(?::?\d{2})?)$/i,jhe=/^\d{4}-\d{2}-\d{2}$/,zhe=/^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}/,qhe={year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"},Hhe={month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"},Ghe={year:"numeric",month:"short",day:"numeric"},Yhe={hour:"2-digit",minute:"2-digit"};function Vhe(t){let e=t.trim();return e&&(jhe.test(e)?`${e}T00:00:00.000Z`:Fhe.test(e)?e:zhe.test(e)?`${e.replace(" ","T")}Z`:e)}function Dm(t){if(t==null||t==="")return;let e=typeof t=="string"?Vhe(t):t instanceof Date||typeof t=="number"&&Number.isFinite(t)?t:void 0;if(e===void 0)return;let r=new Date(e);return Number.isNaN(r.getTime())?void 0:r}function JP(t,e="timestamp"){let r=Dm(t);if(!r)throw new Error(`Invalid ${e}`);return r}function ZP(t,e="timestamp"){return JP(t,e).toISOString()}function Whe(t,e="timestamp"){if(!(t==null||t===""))return ZP(t,e)}function KP(){return new Date}function Jhe(){return KP().toISOString()}function XP(t){let e=Dm(t);return e?e.getTime():Number.NEGATIVE_INFINITY}function zA(t){return Dm(t)}function Zhe(t){return XP(t)}function eL(t,e=qhe,r="-"){let n=zA(t);return n?n.toLocaleString(void 0,e):r}function Khe(t,e="-"){return eL(t,Hhe,e)}function tL(t,e="-"){let r=zA(t);return r?r.toLocaleDateString(void 0,Ghe):e}function Xhe(t,e="-"){let r=zA(t);return r?r.toLocaleTimeString(void 0,Yhe):e}function efe(t,e=""){let r=zA(t);if(!r)return e;let n=Date.now()-r.getTime(),i=Math.floor(n/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;let o=Math.floor(i/60);if(o<24)return`${o}h ago`;let s=Math.floor(o/24);return s<30?`${s}d ago`:tL(r,e)}});var nL=y(du=>{"use strict";var tfe=du&&du.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(du,"__esModule",{value:!0});du.calculateNextRun=ife;du.validateCronExpression=ofe;var rfe=eP(),nfe=tfe(jo()),rL=uu();function ife(t,e,r){let n=r||(0,rL.utcNow)(),o=rfe.CronExpressionParser.parse(t,{currentDate:n,tz:e}).next().toDate();return(0,rL.parseUTCDate)(o.toISOString())||o}function ofe(t){try{return(0,nfe.default)(t,{preset:"default",override:{useSeconds:!1,useYears:!1,useAliases:!1,allowStepping:!0,useLastDayOfMonth:!1,useLastDayOfWeek:!1,useNearestWeekday:!1}}).isValid()}catch{return!1}}});var qA=y(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.DEFAULT_TIMEZONE=void 0;vc.isValidTimezone=iL;vc.getRuntimeTimezone=sfe;vc.DEFAULT_TIMEZONE="UTC";function iL(t){try{return new Intl.DateTimeFormat("en-US",{timeZone:t}),!0}catch{return!1}}function sfe(){let t=Intl.DateTimeFormat().resolvedOptions().timeZone;return t&&iL(t)?t:vc.DEFAULT_TIMEZONE}});var sL=y(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});km.getModelContextLength=afe;km.getConfiguredModelContextLength=cfe;var oL=2e5;function afe(t){return oL}function cfe(){return oL}});var aL=y(fw=>{"use strict";Object.defineProperty(fw,"__esModule",{value:!0});fw.getModelOutputTokenLimit=ufe;var lfe={"claude-fable-5":128e3,"claude-mythos-5":128e3,"claude-opus-5":128e3,"claude-sonnet-5":128e3,"claude-opus-4-8":128e3,"claude-opus-4-7":128e3,"claude-opus-4-6":128e3,"claude-sonnet-4-6":64e3,"claude-haiku-4-5":64e3,"claude-opus-4-5":64e3,"claude-sonnet-4-5":64e3,"gpt-6.1-sol":128e3,"gpt-5":128e3,"gpt-4.1":32768,"gpt-4o":16384,"gemini-2.5-flash":65536,"gemini-2.5-pro":65536};function ufe(t){let e=t.model.toLowerCase();return Object.entries(lfe).find(([n])=>e.includes(n))?.[1]}});var si=y(U=>{"use strict";var dfe=U&&U.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Mm=U&&U.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&dfe(e,t,r)},Afe=U&&U.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(U,"__esModule",{value:!0});U.MAX_OBJECT_PREVIEW_KEYS=U.MAX_TRUNCATION_DEPTH=U.MAX_ARRAY_PREVIEW_ITEMS=U.MAX_STRING_PREVIEW_LENGTH=U.MAX_INLINE_RESULT_PREVIEW_BYTES=U.FULLY_MASKED_CREDENTIAL_VALUE=U.maskCredentialValue=U.isSensitiveCredentialKey=U.CREDENTIAL_KEY_VALIDATION_DESCRIPTION=U.CREDENTIAL_KEY_PATTERN=U.ALLOWED_FILE_EXTENSIONS=void 0;U.mapPlaybookToDraftConfig=ffe;U.mapPlaybookDraftToInput=gfe;U.inferProtocolFromUrl=pL;U.getSuiteCloudOperation=hL;U.isNetSuiteRestletUrl=fL;U.isSuiteCloudWrite=yfe;U.isAbortError=Efe;U.getToolInputSchemaSections=bfe;U.buildToolInputSchemaSections=wfe;U.flattenAndNamespaceCredentials=Dfe;U.flattenAndNamespaceSystemUrls=kfe;U.slugify=Rfe;U.generateUniqueId=Nfe;U.inferJsonSchema=Ofe;U.resolveOAuthCertAndKey=xfe;U.isArrowFunction=yL;U.assertValidArrowFunction=Ufe;U.normalizeCredentialKey=EL;U.isValidCredentialKey=IL;U.getCredentialKeyValidationError=CL;U.getInvalidCredentialKeyNames=Pfe;U.hasCredentialValue=bL;U.hasCredentialKeyValue=Ffe;U.getCredentialKeyMetadata=jfe;U.isFullyMaskedCredentialValue=SL;U.maskCredentialSetValues=zfe;U.restoreMaskedCredentialValues=qfe;U.isMaskedValue=Ew;U.mergeCredentials=Hfe;U.maskCredentials=wL;U.buildSensitiveCredentialMap=Gfe;U.redactKnownCredentialValues=Iw;U.estimateDataSize=Jfe;U.truncateValue=Om;U.sampleResultObject=_L;U.safeStringify=Cw;U.coerceDate=xm;U.normalizeToolCallDates=BL;U.normalizeMessageDates=bw;U.cloneMessagesWithDates=Zfe;U.applyAgentCompactionToMessages=Kfe;U.redactUrlCredentials=Xfe;U.getToolVisuals=Sw;U.getReplacedVisualIds=vL;U.getMessageVisuals=QL;U.getMessageContent=TL;U.getMessageToolCalls=ww;U.hasMessageText=kL;U.hasAssistantOutput=RL;U.isEmptyAssistantMessage=_w;U.isRenderableAgentMessage=tge;U.pruneEmptyAssistantMessages=rge;U.getMeaningfulMessages=nge;U.truncateForLLM=ige;U.truncateHeadTail=oge;U.getErrorMessage=sge;U.pickReferencedExecutionFiles=age;U.parseIconString=cge;U.serializeIcon=lge;U.normalizeToolDiff=NL;U.normalizeToolDiffs=uge;U.composeUrl=dge;U.truncateRunResult=hge;U.getToolSystemIds=fge;U.getCredentialPlaceholderKeysForSystem=OL;U.getUnscopedCallPlaceholderError=Ege;U.getToolCredentialPlaceholderKeys=Ige;U.formatLabel=Cge;var dL=mg(),pfe=$C(),mw=Dg(),AL=hn(),hfe=Afe((AU(),PC(dU)));Mm(nL(),U);Mm(qA(),U);Mm(sL(),U);Mm(aL(),U);function ffe(t){return{name:t.name,whenToRun:t.whenToRun,instructions:t.instructions}}function gfe(t){return{name:t.name,whenToRun:t.whenToRun,instructions:t.instructions}}function pL(t){return t.startsWith("postgres://")||t.startsWith("postgresql://")?"postgres":t.startsWith("mssql://")||t.startsWith("sqlserver://")?"mssql":t.startsWith("redis://")||t.startsWith("rediss://")?"redis":t.startsWith("mongodb://")||t.startsWith("mongodb+srv://")?"mongodb":t.startsWith("ftp://")||t.startsWith("ftps://")||t.startsWith("sftp://")?"sftp":t.startsWith("smb://")?"smb":t.startsWith("odbc://")?"odbc":t.startsWith("script://")?"script":t.startsWith("suitecloud://")?"suitecloud":"http"}var cL=new Set(["listObjects","importObjects","listFiles","importFiles","validate","preview"]);function hL(t){let e=t;if(typeof t=="string")try{e=JSON.parse(t)}catch{return}let r=e&&typeof e=="object"?e.operation:void 0;return typeof r=="string"?r:void 0}var mfe=new Set(["deploy","callRestlet","cleanupScripts"]);function gw(t){let e=typeof t=="string"?t:JSON.stringify(t??"");return e.includes("<<")||e.includes("{{")}var lL=/^https?:\/\/[^/?#]*\.restlets\.api\.netsuite\.com(?:[:/?#]|$)|\/app\/site\/hosting\/restlet\.nl/i;function fL(t){if(lL.test(t.trim()))return!0;let e;try{e=new URL(t.trim())}catch{return!1}let r=e.pathname;try{r=decodeURIComponent(r)}catch{}return lL.test(`${e.protocol}//${e.hostname.replace(/\.$/,"")}${r.replace(/\/{2,}/g,"/")}`)}function yfe({url:t,body:e}){if(typeof t!="string")return!1;if(fL(t))return!0;let r=hL(e);return pL(t)!=="suitecloud"?gw(t)&&r!==void 0&&(gw(r)||cL.has(r)||mfe.has(r)):gw(e)?!0:r===void 0||!cL.has(r)}function Efe(t){return t?typeof t=="string"?t.startsWith("AbortError:"):t instanceof DOMException?t.name==="AbortError":t instanceof Error?t.name==="AbortError"||t.message.startsWith("AbortError:"):!1:!1}U.ALLOWED_FILE_EXTENSIONS=[".json",".csv",".txt",".xml",".xlsx",".xls",".pdf",".docx",".pptx",".zip",".gz",".yaml",".yml",".py",".ts",".tsx",".js",".jsx",".java",".go",".rs",".rb",".php",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".scala",".sh",".bash",".sql",".html",".css",".scss",".md",".rst"];function Ife(t){if(!t)return null;if(typeof t=="string")try{return JSON.parse(t)}catch{return null}return t}function gL(t){return structuredClone(t)}function Cfe(t,e){if(!t||typeof t!="object")return t;let r=gL(t),n=r&&typeof r=="object"&&r.properties&&typeof r.properties=="object"?r.properties:void 0;if(!n)return r;let i=!1;for(let a of e)a in n&&(delete n[a],i=!0);if(!i)return r;if(Array.isArray(r.required)){let a=r.required.filter(c=>!e.includes(c));a.length>0?r.required=a:delete r.required}Object.keys(n).length===0&&delete r.properties;let o=r.properties&&typeof r.properties=="object"?Object.keys(r.properties):[],s=Array.isArray(r.allOf)&&r.allOf.length>0||Array.isArray(r.anyOf)&&r.anyOf.length>0||Array.isArray(r.oneOf)&&r.oneOf.length>0||!!r.patternProperties||!!r.additionalProperties;return o.length===0&&!s?null:r}function bfe(t){let e=Ife(t),r=e&&typeof e=="object"&&e.properties?e.properties:void 0,n=r&&typeof r=="object"?Object.keys(r):[],i=!!(r?.payload&&r?.credentials&&n.every(o=>["payload","credentials"].includes(o)));return e?i?{rawSchema:e,payloadSchema:r?.payload||null,filesSchema:null,credentialsSchema:r?.credentials||null,hasNestedSections:!0}:{rawSchema:e,payloadSchema:Cfe(e,["__files"]),filesSchema:r?.__files||null,credentialsSchema:null,hasNestedSections:!1}:{rawSchema:null,payloadSchema:null,filesSchema:null,credentialsSchema:null,hasNestedSections:!1}}function Sfe(t){return!!(t&&typeof t=="object"&&Array.isArray(t.required)&&t.required.length>0)}function wfe({payloadSchema:t,filesSchema:e}){if(!!!e)return t||void 0;let n=t&&typeof t=="object"?gL(t):{type:"object",properties:{}},i=n.properties&&typeof n.properties=="object"?{...n.properties}:{};i.__files=e,n.type=n.type||"object",n.properties=i;let o=Array.isArray(n.required)?n.required.filter(s=>s!=="__files"):[];return Sfe(e)&&o.push("__files"),o.length>0?n.required=Array.from(new Set(o)):delete n.required,n}var _fe=100,Bfe=50,Rm=15,uL=15,vfe=10,Qfe=5,HA=t=>t!=null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Date),Tfe=t=>{let e=[];for(let i=0;i<Math.min(Rm,t.length);i++)e.push(t[i]);let r=Math.max(Rm,t.length-uL);for(let i=r;i<t.length;i++)e.push(t[i]);let n=Bfe-e.length;if(n>0&&t.length>Rm+uL){let i=Rm,o=r,s=[];for(let a=i;a<Math.min(i+n,o);a++)s.push(t[a]);for(let a=i+n;a<o;a++){let c=Math.floor(Math.random()*(a-i+1));c<n&&(s[c]=t[a])}e.push(...s)}return e},Nm=(t,e=Qfe)=>e===0||!t||typeof t!="object"?t?.type||"unknown":t.type==="object"&&t.properties?`{${Object.keys(t.properties).sort().map(n=>`${n}:${Nm(t.properties[n],e-1)}`).join(",")}}`:t.type==="array"&&t.items?`[${Nm(t.items,e-1)}]`:t.oneOf?`oneOf(${t.oneOf.map(n=>Nm(n,e-1)).join("|")})`:t.type||"unknown";function yw(t){if(!t||t.length===0)return{type:"array",items:{}};let e=t.some(i=>HA(i)),r=t.length<=_fe?t:Tfe(t);if(e){let i=[],o=new Map;for(let s of r){if(!HA(s))continue;let a=(0,mw.toJsonSchema)(s,{arrays:{mode:"all"},objects:{additionalProperties:!0}}),c=Nm(a);if(!o.has(c)&&(o.set(c,a),i.push(a),i.length>=vfe))break}if(i.length>1)return{type:"array",items:{oneOf:i}};if(i.length===1)return{type:"array",items:i[0]}}let n=(0,mw.toJsonSchema)(r,{arrays:{mode:"all"},objects:{additionalProperties:!0}});return n?.type==="array"?n:{type:"array",items:n}}function mL(t,e){if(!e||typeof e!="object")return e;if(Array.isArray(t))return yw(t);if(HA(t)&&e.type==="object"&&e.properties){let r={...e,properties:{...e.properties}};for(let n of Object.keys(r.properties)){let i=r.properties[n],o=t?.[n];(Array.isArray(o)||HA(o))&&(r.properties[n]=mL(o,i))}return r}return e.type==="array"&&Array.isArray(t)?yw(t):e}function Dfe(t){return t.reduce((e,r)=>(Object.entries(r.credentials||{}).forEach(([n,i])=>{e[`${r.id}_${n}`]=i}),e),{})}function kfe(t){return t.reduce((e,r)=>(r.url&&(e[`${r.id}_url`]=r.url),e),{})}function Rfe(t){return t.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"system"}async function Nfe({baseId:t,exists:e}){if(!await e(t))return t;let r=1,n=t.match(/(.*)-(\d+)$/),i=t;for(n&&(i=n[1],r=parseInt(n[2],10)+1);;){let o=`${i}-${r}`;if(!await e(o))return o;r++}}function Ofe(t){if(!Array.isArray(t)){let e=(0,mw.toJsonSchema)(t,{arrays:{mode:"all"},objects:{additionalProperties:!0}});return mL(t,e)}return t.length===0?{type:"array",items:{}}:yw(t)}function xfe(t,e){let r=null,n=null;try{t&&e&&(r=JSON.parse(t),n=JSON.parse(e))}catch{return{cert:{content:void 0,filename:void 0},key:{content:void 0,filename:void 0}}}return{cert:r,key:n}}function yL(t){let e=(t||"").trim();return e?/^\s*(async\s+)?(\([^)]*\)|[a-zA-Z_$][a-zA-Z0-9_$]*)\s*=>/.test(e):!1}function Ufe(t){let e=(t||"").trim();if(!e)return`(sourceData) => {
105
+ `+(a!==s?`result of cast: ${a}`:""))}return o}_cast(e,r){let n=e===void 0?e:this.transforms.reduce((i,o)=>o.call(this,i,e,this,r),e);return n===void 0&&(n=this.getDefault(r)),n}_validate(e,r={},n,i){let{path:o,originalValue:s=e,strict:a=this.spec.strict}=r,c=e;a||(c=this._cast(c,Object.assign({assert:!1},r)));let l=[];for(let u of Object.values(this.internalTests))u&&l.push(u);this.runTests({path:o,value:c,originalValue:s,options:r,tests:l},n,u=>{if(u.length)return i(u,c);this.runTests({path:o,value:c,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(e,r,n){let i=!1,{tests:o,value:s,originalValue:a,path:c,options:l}=e,u=f=>{i||(i=!0,r(f,s))},d=f=>{i||(i=!0,n(f,s))},A=o.length,p=[];if(!A)return d([]);let h={value:s,originalValue:a,path:c,options:l,schema:this};for(let f=0;f<o.length;f++){let E=o[f];E(h,u,function(B){B&&(Array.isArray(B)?p.push(...B):p.push(B)),--A<=0&&d(p)})}}asNestedTest({key:e,index:r,parent:n,parentPath:i,originalParent:o,options:s}){let a=e??r;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");let c=typeof a=="number",l=n[a],u=Object.assign({},s,{strict:!0,parent:n,value:l,originalValue:o[a],key:void 0,[c?"index":"key"]:a,path:c||a.includes(".")?`${i||""}[${c?a:`"${a}"`}]`:(i?`${i}.`:"")+e});return(d,A,p)=>this.resolve(u)._validate(l,u,A,p)}validate(e,r){var n;let i=this.resolve(Object.assign({},r,{value:e})),o=(n=r?.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((s,a)=>i._validate(e,r,(c,l)=>{cr.isError(c)&&(c.value=l),a(c)},(c,l)=>{c.length?a(new cr(c,l,void 0,void 0,o)):s(l)}))}validateSync(e,r){var n;let i=this.resolve(Object.assign({},r,{value:e})),o,s=(n=r?.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(e,Object.assign({},r,{sync:!0}),(a,c)=>{throw cr.isError(a)&&(a.value=c),a},(a,c)=>{if(a.length)throw new cr(a,e,void 0,void 0,s);o=c}),o}isValid(e,r){return this.validate(e,r).then(()=>!0,n=>{if(cr.isError(n))return!1;throw n})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(n){if(cr.isError(n))return!1;throw n}}_getDefault(e){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,e):au(r)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,r){let n=this.clone({nullable:e});return n.internalTests.nullable=su({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(e,r){let n=this.clone({optional:e});return n.internalTests.optionality=su({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(e=zo.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=zo.notNull){return this.nullability(!1,e)}required(e=zo.required){return this.clone().withMutation(r=>r.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let r=this.clone();return r.transforms.push(e),r}test(...e){let r;if(e.length===1?typeof e[0]=="function"?r={test:e[0]}:r=e[0]:e.length===2?r={name:e[0],test:e[1]}:r={name:e[0],message:e[1],test:e[2]},r.message===void 0&&(r.message=zo.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=su(r),o=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(o||s.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(e,r){!Array.isArray(e)&&typeof e!="string"&&(r=e,e=".");let n=this.clone(),i=vP(e).map(o=>new Ho(o));return i.forEach(o=>{o.isSibling&&n.deps.push(o.key)}),n.conditions.push(typeof r=="function"?new vm(i,r):vm.fromOptions(i,r)),n}typeError(e){let r=this.clone();return r.internalTests.typeError=su({message:e,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(e,r=zo.oneOf){let n=this.clone();return e.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=su({message:r,name:"oneOf",skipAbsent:!0,test(i){let o=this.schema._whitelist,s=o.resolveAll(this.resolve);return s.includes(i)?!0:this.createError({params:{values:Array.from(o).join(", "),resolved:s}})}}),n}notOneOf(e,r=zo.notOneOf){let n=this.clone();return e.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=su({message:r,name:"notOneOf",test(i){let o=this.schema._blacklist,s=o.resolveAll(this.resolve);return s.includes(i)?this.createError({params:{values:Array.from(o).join(", "),resolved:s}}):!0}}),n}strip(e=!0){let r=this.clone();return r.spec.strip=e,r}describe(e){let r=(e?this.resolve(e):this).clone(),{label:n,meta:i,optional:o,nullable:s}=r.spec;return{meta:i,label:n,optional:o,nullable:s,default:r.getDefault(e),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.filter((c,l,u)=>u.findIndex(d=>d.OPTIONS.name===c.OPTIONS.name)===l).map(c=>{let l=c.OPTIONS.params&&e?NP(Object.assign({},c.OPTIONS.params),e):c.OPTIONS.params;return{name:c.OPTIONS.name,params:l}})}}get"~standard"(){let e=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await e.validate(n,{abortEarly:!1})}}catch(i){if(i instanceof cr)return{issues:uw(i)};throw i}}}}};fr.prototype.__isYupSchema__=!0;for(let t of["validate","validateSync"])fr.prototype[`${t}At`]=function(e,r,n={}){let{parent:i,parentPath:o,schema:s}=lw(this,e,r,n.context);return s[t](i&&i[o],Object.assign({},n,{parent:i,path:e}))};for(let t of["equals","is"])fr.prototype[t]=fr.prototype.oneOf;for(let t of["not","nope"])fr.prototype[t]=fr.prototype.notOneOf;Xpe=()=>!0;xA=class extends fr{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Xpe},e))}};xP.prototype=xA.prototype;UA=class extends fr{constructor(){super({type:"boolean",check(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}}),this.withMutation(()=>{this.transform((e,r)=>{if(this.spec.coerce&&!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}isTrue(e=aw.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return ki(r)||r===!0}})}isFalse(e=aw.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return ki(r)||r===!1}})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}};UP.prototype=UA.prototype;ehe=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;rhe=/^[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])?)*$/,nhe=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,ihe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ohe="^\\d{4}-\\d{2}-\\d{2}",she="\\d{2}:\\d{2}:\\d{2}",ahe="(([+-]\\d{2}(:?\\d{2})?)|Z)",che=new RegExp(`${ohe}T${she}(\\.\\d+)?${ahe}$`),lhe=t=>ki(t)||t===t.trim(),uhe={}.toString();MA=class extends fr{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,r)=>{if(!this.spec.coerce||this.isType(e)||Array.isArray(e))return e;let n=e!=null&&e.toString?e.toString():e;return n===uhe?e:n})})}required(e){return super.required(e).withMutation(r=>r.test({message:e||zo.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(r=>r.OPTIONS.name!=="required"),e))}length(e,r=Xr.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(n){return n.length===this.resolve(e)}})}min(e,r=Xr.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n.length>=this.resolve(e)}})}max(e,r=Xr.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:e},skipAbsent:!0,test(n){return n.length<=this.resolve(e)}})}matches(e,r){let n=!1,i,o;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:o}=r:i=r),this.test({name:o||"matches",message:i||Xr.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&n||s.search(e)!==-1})}email(e=Xr.email){return this.matches(rhe,{name:"email",message:e,excludeEmptyString:!0})}url(e=Xr.url){return this.matches(nhe,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Xr.uuid){return this.matches(ihe,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let r="",n,i;return e&&(typeof e=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=e:r=e),this.matches(che,{name:"datetime",message:r||Xr.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Xr.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:o=>{if(!o||n)return!0;let s=cw(o);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||Xr.datetime_precision,params:{precision:i},skipAbsent:!0,test:o=>{if(!o||i==null)return!0;let s=cw(o);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Xr.trim){return this.transform(r=>r!=null?r.trim():r).test({message:e,name:"trim",test:lhe})}lowercase(e=Xr.lowercase){return this.transform(r=>ki(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ki(r)||r===r.toLowerCase()})}uppercase(e=Xr.uppercase){return this.transform(r=>ki(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ki(r)||r===r.toUpperCase()})}};MP.prototype=MA.prototype;dhe=t=>t!=+t;PA=class extends fr{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!dhe(e)}}),this.withMutation(()=>{this.transform((e,r)=>{if(!this.spec.coerce)return e;let n=e;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return this.isType(n)||n===null?n:parseFloat(n)})})}min(e,r=ga.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n>=this.resolve(e)}})}max(e,r=ga.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n<=this.resolve(e)}})}lessThan(e,r=ga.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(n){return n<this.resolve(e)}})}moreThan(e,r=ga.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(n){return n>this.resolve(e)}})}positive(e=ga.positive){return this.moreThan(0,e)}negative(e=ga.negative){return this.lessThan(0,e)}integer(e=ga.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(e=>ki(e)?e:e|0)}round(e){var r;let n=["ceil","floor","round","trunc"];if(e=((r=e)==null?void 0:r.toLowerCase())||"round",e==="trunc")return this.truncate();if(n.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>ki(i)?i:Math[e](i))}};PP.prototype=PA.prototype;LP=new Date(""),Ahe=t=>Object.prototype.toString.call(t)==="[object Date]";cu=class t extends fr{constructor(){super({type:"date",check(e){return Ahe(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,r)=>!this.spec.coerce||this.isType(e)||e===null?e:(e=the(e),isNaN(e)?t.INVALID_DATE:new Date(e)))})}prepareParam(e,r){let n;if(Ho.isRef(e))n=e;else{let i=this.cast(e);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(e,r=sw.min){let n=this.prepareParam(e,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(e,r=sw.max){let n=this.prepareParam(e,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}};cu.INVALID_DATE=LP;dw.prototype=cu.prototype;dw.INVALID_DATE=LP;FP=(t,e,r)=>{if(typeof t!="string")return t;let n=t;try{n=JSON.parse(t)}catch{}return r.isType(n)?n:t};hhe=(t,e)=>{let r=[...(0,oi.normalizePath)(e)];if(r.length===1)return r[0]in t;let n=r.pop(),i=(0,oi.getter)((0,oi.join)(r),!0)(t);return!!(i&&n in i)},SP=t=>Object.prototype.toString.call(t)==="[object Object]";fhe=$P([]);LA=class extends fr{constructor(e){super({type:"object",check(r){return SP(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=fhe,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,r={}){var n;let i=super._cast(e,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let o=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(d=>!this._nodes.includes(d))),c={},l=Object.assign({},r,{parent:c,__validating:r.__validating||!1}),u=!1;for(let d of a){let A=o[d],p=d in i,h=i[d];if(A){let f;l.path=(r.path?`${r.path}.`:"")+d,A=A.resolve({value:h,context:r.context,parent:c});let E=A instanceof fr?A.spec:void 0,S=E?.strict;if(E!=null&&E.strip){u=u||d in i;continue}f=!r.__validating||!S?A.cast(h,l):h,f!==void 0&&(c[d]=f)}else p&&!s&&(c[d]=h);(p!==d in c||c[d]!==h)&&(u=!0)}return u?c:i}_validate(e,r={},n,i){let{from:o=[],originalValue:s=e,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:s},...o],r.__validating=!0,r.originalValue=s,super._validate(e,r,n,(c,l)=>{if(!a||!SP(l)){i(c,l);return}s=s||l;let u=[];for(let d of this._nodes){let A=this.fields[d];!A||Ho.isRef(A)||u.push(A.asNestedTest({options:r,key:d,parent:l,parentPath:r.path,originalParent:s}))}this.runTests({tests:u,value:l,originalValue:s,options:r},n,d=>{i(d.sort(this._sortErrors).concat(c),l)})})}clone(e){let r=super.clone(e);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(e){let r=super.concat(e),n=r.fields;for(let[i,o]of Object.entries(this.fields)){let s=n[i];n[i]=s===void 0?o:s}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;let o=this.fields[n],s=e;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=o&&"getDefault"in o?o.getDefault(s):void 0}),r}setFields(e,r){let n=this.clone();return n.fields=e,n._nodes=phe(e,r),n._sortErrors=$P(Object.keys(e)),r&&(n._excludedEdges=r),n}shape(e,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,e),i)})}partial(){let e={};for(let[r,n]of Object.entries(this.fields))e[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return _m(this)}pick(e){let r={};for(let n of e)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>e.includes(n)&&e.includes(i)))}omit(e){let r=[];for(let n of Object.keys(this.fields))e.includes(n)||r.push(n);return this.pick(r)}from(e,r,n){let i=(0,oi.getter)(e,!0);return this.transform(o=>{if(!o)return o;let s=o;return hhe(o,e)&&(s=Object.assign({},o),n||delete s[e],s[r]=i(o)),s})}json(){return this.transform(FP)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Sm.exact,test(r){if(r==null)return!0;let n=wP(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,r=Sm.noUnknown){typeof e!="boolean"&&(r=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;let o=wP(this.schema,i);return!e||o.length===0||this.createError({params:{unknown:o.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,r=Sm.noUnknown){return this.noUnknown(!e,r)}transformKeys(e){return this.transform(r=>{if(!r)return r;let n={};for(let i of Object.keys(r))n[e(i)]=r[i];return n})}camelCase(){return this.transformKeys(OA.camelCase)}snakeCase(){return this.transformKeys(OA.snakeCase)}constantCase(){return this.transformKeys(e=>(0,OA.snakeCase)(e).toUpperCase())}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(let[o,s]of Object.entries(r.fields)){var i;let a=e;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[o]})),n.fields[o]=s.describe(a)}return n}};jP.prototype=LA.prototype;$A=class extends fr{constructor(e){super({type:"array",spec:{types:e},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=e}_cast(e,r){let n=super._cast(e,r);if(!this._typeCheck(n)||!this.innerType)return n;let i=!1,o=n.map((s,a)=>{let c=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${a}]`,parent:n,originalValue:s,value:s,index:a}));return c!==s&&(i=!0),c});return i?o:n}_validate(e,r={},n,i){var o;let s=this.innerType,a=(o=r.recursive)!=null?o:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(e,r,n,(c,l)=>{var u;if(!a||!s||!this._typeCheck(l)){i(c,l);return}let d=new Array(l.length);for(let p=0;p<l.length;p++){var A;d[p]=s.asNestedTest({options:r,index:p,parent:l,parentPath:r.path,originalParent:(A=r.originalValue)!=null?A:e})}this.runTests({value:l,tests:d,originalValue:(u=r.originalValue)!=null?u:e,options:r},n,p=>i(p.concat(c),l))})}clone(e){let r=super.clone(e);return r.innerType=this.innerType,r}json(){return this.transform(FP)}concat(e){let r=super.concat(e);return r.innerType=this.innerType,e.innerType&&(r.innerType=r.innerType?r.innerType.concat(e.innerType):e.innerType),r}of(e){let r=this.clone();if(!Sc(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+qo(e));return r.innerType=e,r.spec=Object.assign({},r.spec,{types:e}),r}length(e,r=wm.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(n){return n.length===this.resolve(e)}})}min(e,r){return r=r||wm.min,this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n.length>=this.resolve(e)}})}max(e,r){return r=r||wm.max,this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,r)=>this._typeCheck(e)?e:r==null?[]:[].concat(r))}compact(e){let r=e?(n,i,o)=>!e(n,i,o):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);if(r.innerType){var i;let o=e;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[0]})),n.innerType=r.innerType.describe(o)}return n}};zP.prototype=$A.prototype;FA=class extends fr{constructor(e){super({type:"tuple",spec:{types:e},check(r){let n=this.spec.types;return Array.isArray(r)&&r.length===n.length}}),this.withMutation(()=>{this.typeError(kP.notType)})}_cast(e,r){let{types:n}=this.spec,i=super._cast(e,r);if(!this._typeCheck(i))return i;let o=!1,s=n.map((a,c)=>{let l=a.cast(i[c],Object.assign({},r,{path:`${r.path||""}[${c}]`,parent:i,originalValue:i[c],value:i[c],index:c}));return l!==i[c]&&(o=!0),l});return o?s:i}_validate(e,r={},n,i){let o=this.spec.types;super._validate(e,r,n,(s,a)=>{var c;if(!this._typeCheck(a)){i(s,a);return}let l=[];for(let[d,A]of o.entries()){var u;l[d]=A.asNestedTest({options:r,index:d,parent:a,parentPath:r.path,originalParent:(u=r.originalValue)!=null?u:e})}this.runTests({value:a,tests:l,originalValue:(c=r.originalValue)!=null?c:e,options:r},n,d=>i(d.concat(s),a))})}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);return n.innerType=r.spec.types.map((i,o)=>{var s;let a=e;return(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[o]})),i.describe(a)}),n}};qP.prototype=FA.prototype;Tm=class t{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(r,n={})=>{let i=this.builder(r,n);if(!Sc(i))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(i=i.optional()),i.resolve(n)},this.builder=e,this.spec={meta:void 0,optional:!1}}clone(e){let r=new t(this.builder);return r.spec=Object.assign({},this.spec,e),r}optionality(e){return this.clone({optional:e})}optional(){return this.optionality(!0)}resolve(e){return this._resolve(e.value,e)}cast(e,r){return this._resolve(e,r).cast(e,r)}asNestedTest(e){let{key:r,index:n,parent:i,options:o}=e,s=i[n??r];return this._resolve(s,Object.assign({},o,{value:s,parent:i})).asNestedTest(e)}validate(e,r){return _P(()=>this._resolve(e,r).validate(e,r))}validateSync(e,r){return this._resolve(e,r).validateSync(e,r)}validateAt(e,r,n){return _P(()=>this._resolve(r,n).validateAt(e,r,n))}validateSyncAt(e,r,n){return this._resolve(r,n).validateSyncAt(e,r,n)}isValid(e,r){try{return this._resolve(e,r).isValid(e,r)}catch(n){if(cr.isError(n))return Promise.resolve(!1);throw n}}isValidSync(e,r){return this._resolve(e,r).isValidSync(e,r)}describe(e){return e?this.resolve(e).describe(e):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...e){if(e.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},e[0]),r}get"~standard"(){let e=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await e.validate(n,{abortEarly:!1})}}catch(i){if(cr.isError(i))return{issues:uw(i)};throw i}}}}}});var HP=y(hw=>{"use strict";Object.defineProperty(hw,"__esModule",{value:!0});hw.default=[{name:"npm-node-cron",preset:{presetId:"npm-node-cron",useSeconds:!0,useYears:!1,useAliases:!0,useBlankDay:!1,allowOnlyOneBlankDayField:!1,mustHaveBlankDayField:!1,useLastDayOfMonth:!1,useLastDayOfWeek:!1,useNearestWeekday:!1,useNthWeekdayOfMonth:!1,seconds:{minValue:0,maxValue:59},minutes:{minValue:0,maxValue:59},hours:{minValue:0,maxValue:23},daysOfMonth:{minValue:1,maxValue:31},months:{minValue:0,maxValue:11},daysOfWeek:{minValue:0,maxValue:6},years:{minValue:1970,maxValue:2099}}},{name:"aws-cloud-watch",preset:{presetId:"aws-cloud-watch",useSeconds:!1,useYears:!0,useAliases:!0,useBlankDay:!0,allowOnlyOneBlankDayField:!0,mustHaveBlankDayField:!0,useLastDayOfMonth:!0,useLastDayOfWeek:!0,useNearestWeekday:!0,useNthWeekdayOfMonth:!0,seconds:{minValue:0,maxValue:59},minutes:{minValue:0,maxValue:59},hours:{minValue:0,maxValue:23},daysOfMonth:{minValue:1,maxValue:31},months:{minValue:1,maxValue:12},daysOfWeek:{minValue:1,maxValue:7},years:{minValue:1970,maxValue:2199}}},{name:"npm-cron-schedule",preset:{presetId:"npm-cron-schedule",useSeconds:!0,useYears:!1,useAliases:!0,useBlankDay:!1,allowOnlyOneBlankDayField:!1,mustHaveBlankDayField:!1,useLastDayOfMonth:!1,useLastDayOfWeek:!1,useNearestWeekday:!1,useNthWeekdayOfMonth:!1,seconds:{minValue:0,maxValue:59},minutes:{minValue:0,maxValue:59},hours:{minValue:0,maxValue:23},daysOfMonth:{minValue:1,maxValue:31},months:{minValue:1,maxValue:12},daysOfWeek:{minValue:0,maxValue:7},years:{minValue:1970,maxValue:2099}}}]});var WP=y(lr=>{"use strict";var Ehe=lr&&lr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ihe=lr&&lr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Che=lr&&lr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ehe(e,t,r);return Ihe(e,t),e},bhe=lr&&lr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lr,"__esModule",{value:!0});lr.validateOptions=lr.registerOptionPreset=lr.getOptionPresets=lr.getOptionPreset=void 0;var J=Che((pw(),PC(Aw)));pw();var lu=Ti(),GP=bhe(HP());Di();var wc={default:{presetId:"default",useSeconds:!1,useYears:!1,useAliases:!1,useBlankDay:!1,allowOnlyOneBlankDayField:!1,allowStepping:!0,mustHaveBlankDayField:!1,useLastDayOfMonth:!1,useLastDayOfWeek:!1,useNearestWeekday:!1,useNthWeekdayOfMonth:!1,seconds:{minValue:0,maxValue:59},minutes:{minValue:0,maxValue:59},hours:{minValue:0,maxValue:23},daysOfMonth:{minValue:0,maxValue:31},months:{minValue:0,maxValue:12},daysOfWeek:{minValue:0,maxValue:7},years:{minValue:1970,maxValue:2099}}},VP=J.object({presetId:J.string().required(),useSeconds:J.boolean().required(),useYears:J.boolean().required(),useAliases:J.boolean(),useBlankDay:J.boolean().required(),allowOnlyOneBlankDayField:J.boolean().required(),allowStepping:J.boolean(),mustHaveBlankDayField:J.boolean(),useLastDayOfMonth:J.boolean(),useLastDayOfWeek:J.boolean(),useNearestWeekday:J.boolean(),useNthWeekdayOfMonth:J.boolean(),seconds:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required(),minutes:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required(),hours:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required(),daysOfMonth:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required(),months:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required(),daysOfWeek:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required(),years:J.object({minValue:J.number().min(0).required(),maxValue:J.number().min(0).required(),lowerLimit:J.number().min(0),upperLimit:J.number().min(0)}).required()}).required(),She=t=>wc[t]?(0,lu.valid)(wc[t]):(0,lu.err)(`Option preset '${t}' not found.`);lr.getOptionPreset=She;var whe=()=>wc;lr.getOptionPresets=whe;var _he=(t,e)=>{wc[t]=VP.validateSync(e,{strict:!1,abortEarly:!1,stripUnknown:!0,recursive:!0})};lr.registerOptionPreset=_he;function Bhe(){for(let t=0;t<GP.default.length;t+=1){let{name:e,preset:r}=GP.default[t];(0,lr.registerOptionPreset)(e,r)}}Bhe();var YP=new Map;function vhe(t,e){var r;return t+((r=JSON.stringify(e))!==null&&r!==void 0?r:"")}function Qhe(t){return J.object({presetId:J.string().required(),preset:VP.required(),useSeconds:J.boolean().required(),useYears:J.boolean().required(),useAliases:J.boolean(),useBlankDay:J.boolean().required(),allowOnlyOneBlankDayField:J.boolean().required(),allowStepping:J.boolean(),mustHaveBlankDayField:J.boolean(),useLastDayOfMonth:J.boolean(),useLastDayOfWeek:J.boolean(),useNearestWeekday:J.boolean(),useNthWeekdayOfMonth:J.boolean(),seconds:J.object({lowerLimit:J.number().min(t.seconds.minValue).max(t.seconds.maxValue),upperLimit:J.number().min(t.seconds.minValue).max(t.seconds.maxValue)}).required(),minutes:J.object({lowerLimit:J.number().min(t.minutes.minValue).max(t.minutes.maxValue),upperLimit:J.number().min(t.minutes.minValue).max(t.minutes.maxValue)}).required(),hours:J.object({lowerLimit:J.number().min(t.hours.minValue).max(t.hours.maxValue),upperLimit:J.number().min(t.hours.minValue).max(t.hours.maxValue)}).required(),daysOfMonth:J.object({lowerLimit:J.number().min(t.daysOfMonth.minValue).max(t.daysOfMonth.maxValue),upperLimit:J.number().min(t.daysOfMonth.minValue).max(t.daysOfMonth.maxValue)}).required(),months:J.object({lowerLimit:J.number().min(t.months.minValue).max(t.months.maxValue),upperLimit:J.number().min(t.months.minValue).max(t.months.maxValue)}).required(),daysOfWeek:J.object({lowerLimit:J.number().min(t.daysOfWeek.minValue).max(t.daysOfWeek.maxValue),upperLimit:J.number().min(t.daysOfWeek.minValue).max(t.daysOfWeek.maxValue)}).required(),years:J.object({lowerLimit:J.number().min(t.years.minValue).max(t.years.maxValue),upperLimit:J.number().min(t.years.minValue).max(t.years.maxValue)}).required()}).required()}function The(t,e){var r,n,i,o,s,a,c,l,u,d,A,p,h,f,E,S,B,_,v,T,$;let k=Object.assign(Object.assign({presetId:t.presetId,preset:t},{useSeconds:t.useSeconds,useYears:t.useYears,useAliases:(r=t.useAliases)!==null&&r!==void 0?r:!1,useBlankDay:t.useBlankDay,allowOnlyOneBlankDayField:t.allowOnlyOneBlankDayField,allowStepping:(n=t.allowStepping)!==null&&n!==void 0?n:!0,mustHaveBlankDayField:(i=t.mustHaveBlankDayField)!==null&&i!==void 0?i:!1,useLastDayOfMonth:(o=t.useLastDayOfMonth)!==null&&o!==void 0?o:!1,useLastDayOfWeek:(s=t.useLastDayOfWeek)!==null&&s!==void 0?s:!1,useNearestWeekday:(a=t.useNearestWeekday)!==null&&a!==void 0?a:!1,useNthWeekdayOfMonth:(c=t.useNthWeekdayOfMonth)!==null&&c!==void 0?c:!1,seconds:{lowerLimit:(l=t.seconds.lowerLimit)!==null&&l!==void 0?l:t.seconds.minValue,upperLimit:(u=t.seconds.upperLimit)!==null&&u!==void 0?u:t.seconds.maxValue},minutes:{lowerLimit:(d=t.minutes.lowerLimit)!==null&&d!==void 0?d:t.minutes.minValue,upperLimit:(A=t.minutes.upperLimit)!==null&&A!==void 0?A:t.minutes.maxValue},hours:{lowerLimit:(p=t.hours.lowerLimit)!==null&&p!==void 0?p:t.hours.minValue,upperLimit:(h=t.hours.upperLimit)!==null&&h!==void 0?h:t.hours.maxValue},daysOfMonth:{lowerLimit:(f=t.daysOfMonth.lowerLimit)!==null&&f!==void 0?f:t.daysOfMonth.minValue,upperLimit:(E=t.daysOfMonth.upperLimit)!==null&&E!==void 0?E:t.daysOfMonth.maxValue},months:{lowerLimit:(S=t.months.lowerLimit)!==null&&S!==void 0?S:t.months.minValue,upperLimit:(B=t.months.upperLimit)!==null&&B!==void 0?B:t.months.maxValue},daysOfWeek:{lowerLimit:(_=t.daysOfWeek.lowerLimit)!==null&&_!==void 0?_:t.daysOfWeek.minValue,upperLimit:(v=t.daysOfWeek.upperLimit)!==null&&v!==void 0?v:t.daysOfWeek.maxValue},years:{lowerLimit:(T=t.years.lowerLimit)!==null&&T!==void 0?T:t.years.minValue,upperLimit:($=t.years.upperLimit)!==null&&$!==void 0?$:t.years.maxValue}}),e);return Qhe(t).validateSync(k,{strict:!1,abortEarly:!1,stripUnknown:!0,recursive:!0})}var Dhe=t=>{try{let e;if(t.preset)if(typeof t.preset=="string"){if(!wc[t.preset])return(0,lu.err)([`Option preset ${t.preset} does not exist.`]);e=wc[t.preset]}else e=t.preset;else e=wc.default;let r=vhe(e.presetId,t.override),n=YP.get(r);if(n)return(0,lu.valid)(n);let i=The(e,t.override);return YP.set(r,i),(0,lu.valid)(i)}catch(e){return(0,lu.err)(e.errors)}};lr.validateOptions=Dhe});var jo=y(jA=>{"use strict";var Bc=jA&&jA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jA,"__esModule",{value:!0});var _c=Ti(),khe=Bc(nP()),Rhe=Bc(iP()),Nhe=Bc(oP()),Ohe=Bc(sP()),xhe=Bc(aP()),Uhe=Bc(cP()),Mhe=Bc(lP()),Phe=WP();Di();var Lhe=(t,e)=>{let r=t.trim().split(" ");if(e.useSeconds&&e.useYears&&r.length!==7)return(0,_c.err)(`Expected 7 values, but got ${r.length}.`);if((e.useSeconds&&!e.useYears||e.useYears&&!e.useSeconds)&&r.length!==6)return(0,_c.err)(`Expected 6 values, but got ${r.length}.`);if(!e.useSeconds&&!e.useYears&&r.length!==5)return(0,_c.err)(`Expected 5 values, but got ${r.length}.`);let n={seconds:e.useSeconds?r[0]:void 0,minutes:r[e.useSeconds?1:0],hours:r[e.useSeconds?2:1],daysOfMonth:r[e.useSeconds?3:2],months:r[e.useSeconds?4:3],daysOfWeek:r[e.useSeconds?5:4],years:e.useYears?r[e.useSeconds?6:5]:void 0};return(0,_c.valid)(n)},$he=(t,e={})=>{let r=(0,Phe.validateOptions)(e);if(r.isError())return r;let n=r.getValue(),i=Lhe(t,n);if(i.isError())return(0,_c.err)([`${i.getError()} (Input cron: '${t}')`]);let o=i.getValue(),s=[];if(n.useSeconds&&s.push((0,khe.default)(o,n)),s.push((0,Rhe.default)(o,n)),s.push((0,Nhe.default)(o,n)),s.push((0,Ohe.default)(o,n)),s.push((0,xhe.default)(o,n)),s.push((0,Uhe.default)(o,n)),n.useYears&&s.push((0,Mhe.default)(o,n)),s.every(c=>c.isValid()))return(0,_c.valid)(o);let a=[];return s.forEach(c=>{c.isError()&&c.getError().forEach(l=>{a.push(l)})}),a.forEach((c,l)=>{a[l]=`${c} (Input cron: '${t}')`}),(0,_c.err)(a)};jA.default=$he});var uu=y(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.parseUTCDate=Dm;Qr.requireUTCDate=JP;Qr.toUTCISOString=ZP;Qr.toOptionalUTCISOString=Whe;Qr.utcNow=KP;Qr.utcNowISOString=Jhe;Qr.getUTCTimestampMs=XP;Qr.parsePersistedTimestamp=zA;Qr.getPersistedTimestampMs=Zhe;Qr.formatPersistedTimestamp=eL;Qr.formatCompactPersistedTimestamp=Khe;Qr.formatPersistedDate=tL;Qr.formatPersistedTime=Xhe;Qr.formatRelativePersistedTimestamp=efe;var Fhe=/(Z|[+-]\d{2}(?::?\d{2})?)$/i,jhe=/^\d{4}-\d{2}-\d{2}$/,zhe=/^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}/,qhe={year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"},Hhe={month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"},Ghe={year:"numeric",month:"short",day:"numeric"},Yhe={hour:"2-digit",minute:"2-digit"};function Vhe(t){let e=t.trim();return e&&(jhe.test(e)?`${e}T00:00:00.000Z`:Fhe.test(e)?e:zhe.test(e)?`${e.replace(" ","T")}Z`:e)}function Dm(t){if(t==null||t==="")return;let e=typeof t=="string"?Vhe(t):t instanceof Date||typeof t=="number"&&Number.isFinite(t)?t:void 0;if(e===void 0)return;let r=new Date(e);return Number.isNaN(r.getTime())?void 0:r}function JP(t,e="timestamp"){let r=Dm(t);if(!r)throw new Error(`Invalid ${e}`);return r}function ZP(t,e="timestamp"){return JP(t,e).toISOString()}function Whe(t,e="timestamp"){if(!(t==null||t===""))return ZP(t,e)}function KP(){return new Date}function Jhe(){return KP().toISOString()}function XP(t){let e=Dm(t);return e?e.getTime():Number.NEGATIVE_INFINITY}function zA(t){return Dm(t)}function Zhe(t){return XP(t)}function eL(t,e=qhe,r="-"){let n=zA(t);return n?n.toLocaleString(void 0,e):r}function Khe(t,e="-"){return eL(t,Hhe,e)}function tL(t,e="-"){let r=zA(t);return r?r.toLocaleDateString(void 0,Ghe):e}function Xhe(t,e="-"){let r=zA(t);return r?r.toLocaleTimeString(void 0,Yhe):e}function efe(t,e=""){let r=zA(t);if(!r)return e;let n=Date.now()-r.getTime(),i=Math.floor(n/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;let o=Math.floor(i/60);if(o<24)return`${o}h ago`;let s=Math.floor(o/24);return s<30?`${s}d ago`:tL(r,e)}});var nL=y(du=>{"use strict";var tfe=du&&du.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(du,"__esModule",{value:!0});du.calculateNextRun=ife;du.validateCronExpression=ofe;var rfe=eP(),nfe=tfe(jo()),rL=uu();function ife(t,e,r){let n=r||(0,rL.utcNow)(),o=rfe.CronExpressionParser.parse(t,{currentDate:n,tz:e}).next().toDate();return(0,rL.parseUTCDate)(o.toISOString())||o}function ofe(t){try{return(0,nfe.default)(t,{preset:"default",override:{useSeconds:!1,useYears:!1,useAliases:!1,allowStepping:!0,useLastDayOfMonth:!1,useLastDayOfWeek:!1,useNearestWeekday:!1}}).isValid()}catch{return!1}}});var qA=y(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.DEFAULT_TIMEZONE=void 0;vc.isValidTimezone=iL;vc.getRuntimeTimezone=sfe;vc.DEFAULT_TIMEZONE="UTC";function iL(t){try{return new Intl.DateTimeFormat("en-US",{timeZone:t}),!0}catch{return!1}}function sfe(){let t=Intl.DateTimeFormat().resolvedOptions().timeZone;return t&&iL(t)?t:vc.DEFAULT_TIMEZONE}});var sL=y(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});km.getModelContextLength=afe;km.getConfiguredModelContextLength=cfe;var oL=2e5;function afe(t){return oL}function cfe(){return oL}});var aL=y(fw=>{"use strict";Object.defineProperty(fw,"__esModule",{value:!0});fw.getModelOutputTokenLimit=ufe;var lfe={"claude-fable-5":128e3,"claude-mythos-5":128e3,"claude-opus-5":128e3,"claude-sonnet-5":128e3,"claude-opus-4-8":128e3,"claude-opus-4-7":128e3,"claude-opus-4-6":128e3,"claude-sonnet-4-6":64e3,"claude-haiku-4-5":64e3,"claude-opus-4-5":64e3,"claude-sonnet-4-5":64e3,"gpt-6.1-sol":128e3,"gpt-5":128e3,"gpt-4.1":32768,"gpt-4o":16384,"gemini-2.5-flash":65536,"gemini-2.5-pro":65536};function ufe(t){let e=t.model.toLowerCase();return Object.entries(lfe).find(([n])=>e.includes(n))?.[1]}});var si=y(U=>{"use strict";var dfe=U&&U.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Mm=U&&U.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&dfe(e,t,r)},Afe=U&&U.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(U,"__esModule",{value:!0});U.MAX_OBJECT_PREVIEW_KEYS=U.MAX_TRUNCATION_DEPTH=U.MAX_ARRAY_PREVIEW_ITEMS=U.MAX_STRING_PREVIEW_LENGTH=U.MAX_INLINE_RESULT_PREVIEW_BYTES=U.FULLY_MASKED_CREDENTIAL_VALUE=U.maskCredentialValue=U.isSensitiveCredentialKey=U.CREDENTIAL_KEY_VALIDATION_DESCRIPTION=U.CREDENTIAL_KEY_PATTERN=U.ALLOWED_FILE_EXTENSIONS=void 0;U.mapPlaybookToDraftConfig=ffe;U.mapPlaybookDraftToInput=gfe;U.inferProtocolFromUrl=pL;U.getSuiteCloudOperation=hL;U.isNetSuiteRestletUrl=fL;U.isSuiteCloudWrite=yfe;U.isAbortError=Efe;U.getToolInputSchemaSections=bfe;U.buildToolInputSchemaSections=wfe;U.flattenAndNamespaceCredentials=Dfe;U.flattenAndNamespaceSystemUrls=kfe;U.slugify=Rfe;U.generateUniqueId=Nfe;U.inferJsonSchema=Ofe;U.resolveOAuthCertAndKey=xfe;U.isArrowFunction=yL;U.assertValidArrowFunction=Ufe;U.normalizeCredentialKey=EL;U.isValidCredentialKey=IL;U.getCredentialKeyValidationError=CL;U.getInvalidCredentialKeyNames=Pfe;U.hasCredentialValue=bL;U.hasCredentialKeyValue=Ffe;U.getCredentialKeyMetadata=jfe;U.isFullyMaskedCredentialValue=SL;U.maskCredentialSetValues=zfe;U.restoreMaskedCredentialValues=qfe;U.isMaskedValue=Ew;U.mergeCredentials=Hfe;U.maskCredentials=wL;U.buildSensitiveCredentialMap=Gfe;U.redactKnownCredentialValues=Iw;U.estimateDataSize=Jfe;U.truncateValue=Om;U.sampleResultObject=_L;U.safeStringify=Cw;U.coerceDate=xm;U.normalizeToolCallDates=BL;U.normalizeMessageDates=bw;U.cloneMessagesWithDates=Zfe;U.applyAgentCompactionToMessages=Kfe;U.redactUrlCredentials=Xfe;U.getToolVisuals=Sw;U.getReplacedVisualIds=vL;U.getMessageVisuals=QL;U.getMessageContent=TL;U.getMessageToolCalls=ww;U.hasMessageText=kL;U.hasAssistantOutput=RL;U.isEmptyAssistantMessage=_w;U.isRenderableAgentMessage=tge;U.pruneEmptyAssistantMessages=rge;U.getMeaningfulMessages=nge;U.truncateForLLM=ige;U.truncateHeadTail=oge;U.getErrorMessage=sge;U.pickReferencedExecutionFiles=age;U.parseIconString=cge;U.serializeIcon=lge;U.normalizeToolDiff=NL;U.normalizeToolDiffs=uge;U.composeUrl=dge;U.truncateRunResult=hge;U.getToolSystemIds=fge;U.getCredentialPlaceholderKeysForSystem=OL;U.getUnscopedCallPlaceholderError=Ege;U.getToolCredentialPlaceholderKeys=Ige;U.formatLabel=Cge;var dL=mg(),pfe=$C(),mw=Dg(),AL=hn(),hfe=Afe((AU(),PC(dU)));Mm(nL(),U);Mm(qA(),U);Mm(sL(),U);Mm(aL(),U);function ffe(t){return{name:t.name,whenToRun:t.whenToRun,instructions:t.instructions}}function gfe(t){return{name:t.name,whenToRun:t.whenToRun,instructions:t.instructions}}function pL(t){return t.startsWith("postgres://")||t.startsWith("postgresql://")?"postgres":t.startsWith("mssql://")||t.startsWith("sqlserver://")?"mssql":t.startsWith("redis://")||t.startsWith("rediss://")?"redis":t.startsWith("mongodb://")||t.startsWith("mongodb+srv://")?"mongodb":t.startsWith("ftp://")||t.startsWith("ftps://")||t.startsWith("sftp://")?"sftp":t.startsWith("smb://")?"smb":t.startsWith("odbc://")?"odbc":t.startsWith("script://")?"script":t.startsWith("suitecloud://")?"suitecloud":"http"}var cL=new Set(["listObjects","importObjects","listFiles","importFiles","validate","preview"]);function hL(t){let e=t;if(typeof t=="string")try{e=JSON.parse(t)}catch{return}let r=e&&typeof e=="object"?e.operation:void 0;return typeof r=="string"?r:void 0}var mfe=new Set(["deploy","callRestlet","cleanupScripts"]);function gw(t){let e=typeof t=="string"?t:JSON.stringify(t??"");return e.includes("<<")||e.includes("{{")}var lL=/^https?:\/\/[^/?#]*\.restlets\.api\.netsuite\.com(?:[:/?#]|$)|\/app\/site\/hosting\/restlet\.nl/i;function fL(t){if(lL.test(t.trim()))return!0;let e;try{e=new URL(t.trim())}catch{return!1}let r=e.pathname;try{r=decodeURIComponent(r)}catch{}return lL.test(`${e.protocol}//${e.hostname.replace(/\.$/,"")}${r.replace(/\/{2,}/g,"/")}`)}function yfe({url:t,body:e}){if(typeof t!="string")return!1;if(fL(t))return!0;let r=hL(e);return pL(t)!=="suitecloud"?gw(t)&&r!==void 0&&(gw(r)||cL.has(r)||mfe.has(r)):gw(e)?!0:r===void 0||!cL.has(r)}function Efe(t){return t?typeof t=="string"?t.startsWith("AbortError:"):t instanceof DOMException?t.name==="AbortError":t instanceof Error?t.name==="AbortError"||t.message.startsWith("AbortError:"):!1:!1}U.ALLOWED_FILE_EXTENSIONS=[".json",".csv",".txt",".xml",".xlsx",".xls",".pdf",".docx",".pptx",".zip",".gz",".yaml",".yml",".py",".ts",".tsx",".js",".jsx",".java",".go",".rs",".rb",".php",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".scala",".sh",".bash",".sql",".html",".css",".scss",".md",".rst"];function Ife(t){if(!t)return null;if(typeof t=="string")try{return JSON.parse(t)}catch{return null}return t}function gL(t){return structuredClone(t)}function Cfe(t,e){if(!t||typeof t!="object")return t;let r=gL(t),n=r&&typeof r=="object"&&r.properties&&typeof r.properties=="object"?r.properties:void 0;if(!n)return r;let i=!1;for(let a of e)a in n&&(delete n[a],i=!0);if(!i)return r;if(Array.isArray(r.required)){let a=r.required.filter(c=>!e.includes(c));a.length>0?r.required=a:delete r.required}Object.keys(n).length===0&&delete r.properties;let o=r.properties&&typeof r.properties=="object"?Object.keys(r.properties):[],s=Array.isArray(r.allOf)&&r.allOf.length>0||Array.isArray(r.anyOf)&&r.anyOf.length>0||Array.isArray(r.oneOf)&&r.oneOf.length>0||!!r.patternProperties||!!r.additionalProperties;return o.length===0&&!s?null:r}function bfe(t){let e=Ife(t),r=e&&typeof e=="object"&&e.properties?e.properties:void 0,n=r&&typeof r=="object"?Object.keys(r):[],i=!!(r?.payload&&r?.credentials&&n.every(o=>["payload","credentials"].includes(o)));return e?i?{rawSchema:e,payloadSchema:r?.payload||null,filesSchema:null,credentialsSchema:r?.credentials||null,hasNestedSections:!0}:{rawSchema:e,payloadSchema:Cfe(e,["__files"]),filesSchema:r?.__files||null,credentialsSchema:null,hasNestedSections:!1}:{rawSchema:null,payloadSchema:null,filesSchema:null,credentialsSchema:null,hasNestedSections:!1}}function Sfe(t){return!!(t&&typeof t=="object"&&Array.isArray(t.required)&&t.required.length>0)}function wfe({payloadSchema:t,filesSchema:e}){if(!!!e)return t||void 0;let n=t&&typeof t=="object"?gL(t):{type:"object",properties:{}},i=n.properties&&typeof n.properties=="object"?{...n.properties}:{};i.__files=e,n.type=n.type||"object",n.properties=i;let o=Array.isArray(n.required)?n.required.filter(s=>s!=="__files"):[];return Sfe(e)&&o.push("__files"),o.length>0?n.required=Array.from(new Set(o)):delete n.required,n}var _fe=100,Bfe=50,Rm=15,uL=15,vfe=10,Qfe=5,HA=t=>t!=null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Date),Tfe=t=>{let e=[];for(let i=0;i<Math.min(Rm,t.length);i++)e.push(t[i]);let r=Math.max(Rm,t.length-uL);for(let i=r;i<t.length;i++)e.push(t[i]);let n=Bfe-e.length;if(n>0&&t.length>Rm+uL){let i=Rm,o=r,s=[];for(let a=i;a<Math.min(i+n,o);a++)s.push(t[a]);for(let a=i+n;a<o;a++){let c=Math.floor(Math.random()*(a-i+1));c<n&&(s[c]=t[a])}e.push(...s)}return e},Nm=(t,e=Qfe)=>e===0||!t||typeof t!="object"?t?.type||"unknown":t.type==="object"&&t.properties?`{${Object.keys(t.properties).sort().map(n=>`${n}:${Nm(t.properties[n],e-1)}`).join(",")}}`:t.type==="array"&&t.items?`[${Nm(t.items,e-1)}]`:t.oneOf?`oneOf(${t.oneOf.map(n=>Nm(n,e-1)).join("|")})`:t.type||"unknown";function yw(t){if(!t||t.length===0)return{type:"array",items:{}};let e=t.some(i=>HA(i)),r=t.length<=_fe?t:Tfe(t);if(e){let i=[],o=new Map;for(let s of r){if(!HA(s))continue;let a=(0,mw.toJsonSchema)(s,{arrays:{mode:"all"},objects:{additionalProperties:!0}}),c=Nm(a);if(!o.has(c)&&(o.set(c,a),i.push(a),i.length>=vfe))break}if(i.length>1)return{type:"array",items:{oneOf:i}};if(i.length===1)return{type:"array",items:i[0]}}let n=(0,mw.toJsonSchema)(r,{arrays:{mode:"all"},objects:{additionalProperties:!0}});return n?.type==="array"?n:{type:"array",items:n}}function mL(t,e){if(!e||typeof e!="object")return e;if(Array.isArray(t))return yw(t);if(HA(t)&&e.type==="object"&&e.properties){let r={...e,properties:{...e.properties}};for(let n of Object.keys(r.properties)){let i=r.properties[n],o=t?.[n];(Array.isArray(o)||HA(o))&&(r.properties[n]=mL(o,i))}return r}return e.type==="array"&&Array.isArray(t)?yw(t):e}function Dfe(t){return t.reduce((e,r)=>(Object.entries(r.credentials||{}).forEach(([n,i])=>{e[`${r.id}_${n}`]=i}),e),{})}function kfe(t){return t.reduce((e,r)=>(r.url&&(e[`${r.id}_url`]=r.url),e),{})}function Rfe(t){return t.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"system"}async function Nfe({baseId:t,exists:e}){if(!await e(t))return t;let r=1,n=t.match(/(.*)-(\d+)$/),i=t;for(n&&(i=n[1],r=parseInt(n[2],10)+1);;){let o=`${i}-${r}`;if(!await e(o))return o;r++}}function Ofe(t){if(!Array.isArray(t)){let e=(0,mw.toJsonSchema)(t,{arrays:{mode:"all"},objects:{additionalProperties:!0}});return mL(t,e)}return t.length===0?{type:"array",items:{}}:yw(t)}function xfe(t,e){let r=null,n=null;try{t&&e&&(r=JSON.parse(t),n=JSON.parse(e))}catch{return{cert:{content:void 0,filename:void 0},key:{content:void 0,filename:void 0}}}return{cert:r,key:n}}function yL(t){let e=(t||"").trim();return e?/^\s*(async\s+)?(\([^)]*\)|[a-zA-Z_$][a-zA-Z0-9_$]*)\s*=>/.test(e):!1}function Ufe(t){let e=(t||"").trim();if(!e)return`(sourceData) => {
106
106
  return {};
107
107
  }`;if(e==="$")return`(sourceData) => {
108
108
  return sourceData;
@@ -110,7 +110,7 @@ attempted value: ${s}
110
110
 
111
111
  `)}function ww(t){return(t.parts||[]).flatMap(e=>e.type==="tool"&&e.tool?[e.tool]:[])}function kL(t){return DL(t)!==""}function RL(t){return kL(t)?!0:ww(t).length>0}function _w(t){return t.role==="assistant"&&!t.isStreaming&&!RL(t)}function tge(t){return t.role==="system"||t.isHidden?!1:!_w(t)}function rge(t){return t.filter(e=>!_w(e))}function nge(t){return t.filter(e=>{let r=TL(e),n=ww(e).length>0;return(r||n)&&!(e.id==="1"&&!r)})}function ige(t,e=5e3,r=10){if(t==null)return"null";if(typeof t=="string")return t.length<=e?t:t.slice(0,e)+"... [truncated]";let n=Cw(t);if(n.length<=e)return n;let i=_L(t,r),o=Cw(i);return o.length<=e?o:o.slice(0,e)+"... [truncated]"}function oge(t,e){if(t.length<=e)return t;let r=Math.ceil(e/2),n=Math.floor(e/2),i=t.length-r-n;return`${t.slice(0,r)}
112
112
  ... [${i} characters omitted] ...
113
- ${t.slice(t.length-n)}`}function sge(t){return t instanceof Error?t.message:typeof t=="string"?t:typeof t=="object"&&t!==null&&"message"in t?String(t.message):String(t)}function age(t,e){if(!e||Object.keys(e).length===0)return{};let r=/file::([^,\s)}\]"']+)/g,n=typeof t=="string"?t:JSON.stringify(t||{}),i=[...new Set([...n.matchAll(r)].map(o=>{let s=o[1];return s.endsWith(".raw")?s=s.slice(0,-4):s.endsWith(".base64")?s=s.slice(0,-7):s.endsWith(".extracted")&&(s=s.slice(0,-10)),s}))];return Object.fromEntries(i.flatMap(o=>e[o]?[[o,e[o]]]:[]))}function cge(t){if(!t)return null;let e=t.indexOf(":");if(e===-1)return{source:"simpleicons",name:t};let r=t.substring(0,e),n=t.substring(e+1);return r!=="simpleicons"&&r!=="lucide"?{source:"simpleicons",name:t}:{source:r,name:n}}function lge(t){return t?typeof t=="string"?t.indexOf(":")!==-1?t:`simpleicons:${t}`:`${t.source}:${t.name}`:null}function NL(t){if(t.op==="remove"||t.value===void 0||typeof t.value!="string")return t;if(t.path==="/inputSchema"||t.path==="/outputSchema"||t.path.startsWith("/inputSchema/properties/")||t.path.startsWith("/outputSchema/properties/")||t.path.match(/^\/steps\/\d+\/config\/pagination$/)||t.path.match(/^\/steps\/\d+\/config\/headers$/)||t.path.match(/^\/steps\/\d+\/config\/queryParams$/))try{return{...t,value:JSON.parse(t.value)}}catch{return t}return t}function uge(t){return t.map(e=>NL(e))}function dge(t,e){t||(t=""),e||(e=""),/^(https?|postgres(ql)?|ftp(s)?|sftp|smb|file):\/\//i.test(t)||(t=`https://${t}`);let r=t.endsWith("/")?t.slice(0,-1):t,n=e.startsWith("/")?e.slice(1):e;return`${r}/${n}`}var Age=new Set(["data","stepResults","toolPayload","rawData","transformedData"]),pge=8e4;function hge(t,e=pge){if(t==null)return t;let r=t;if(typeof t=="string"){if(t.length<=e)return t;try{r=JSON.parse(t)}catch{return{_truncated:!0,_message:"String result too large to parse",_size:t.length}}}if(typeof r!="object")return r;let n=0,i=0,o=(s,a=0)=>{if(a>20||s===null||typeof s!="object")return s;if(Array.isArray(s))return s.map(l=>o(l,a+1));let c={};for(let[l,u]of Object.entries(s))if(Age.has(l)&&u!==null&&typeof u=="object"){let d=JSON.stringify(u);if(d.length>e){i+=d.length;try{let{jsonString:A,truncatedProps:p}=(0,hfe.default)(d,e);c[l]=JSON.parse(A),n+=p.length}catch{c[l]=u}}else c[l]=u}else c[l]=o(u,a+1);return c};try{if(JSON.stringify(r).length<=e)return r;let a=o(r);return n>0&&typeof a=="object"&&a!==null&&(a._note=`Result truncated: ${n} items omitted (original ${i} characters)`),a}catch{return{_truncated:!0,_message:"Result too large to display"}}}function fge(t){if(!t.steps)return[];let e=new Set;for(let r of t.steps)r.config&&(0,AL.isRequestConfig)(r.config)&&r.config.systemId&&e.add(r.config.systemId);return Array.from(e)}function Um(t,e,r=new WeakSet){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object")&&!r.has(t)){if(r.add(t),Array.isArray(t)){for(let n of t)Um(n,e,r);return}for(let n of Object.values(t))Um(n,e,r)}}function gge(t){let e=[];for(let r of t.matchAll(/<<([\s\S]*?)>>/g)){let n=r[1].trim();n&&e.push(n)}for(let r of t.matchAll(/{{\s*([^{}\s]+)\s*}}/g)){let n=r[1].trim();n&&e.push(n)}return e}function OL(t,e){let r=[];Um(t,r);let n=`${e}_`,i=new Set;for(let o of r)for(let s of gge(o)){if(!s.startsWith(n))continue;let a=s.slice(n.length);!a||a==="url"||!U.CREDENTIAL_KEY_PATTERN.test(a)||i.add(a)}return[...i]}var mge=/^\s*(async\s+)?(\([^)]*\)|[a-zA-Z_$][a-zA-Z0-9_$]*)\s*=>/,yge=new Set(["sg_auth_email","sg_auth_jwt"]);function Ege({config:t,systemId:e}){let r=[];Um(t,r);let n=e?`${e}_`:null,i=new Set;for(let l of r)for(let u of l.matchAll(/<<([\s\S]*?)>>/g)){let d=u[1].trim();d&&(n&&d.startsWith(n)||mge.test(d)||yge.has(d)||i.add(d))}if(i.size===0)return null;let o=[...i].map(l=>`<<${l}>>`).join(", "),s=`Unresolved placeholder${i.size===1?"":"s"} ${o}`;if(!n)return`${s}. Secret placeholders need systemId and the form <<systemId_secretName>>. Nothing was sent.`;let a=[...i].filter(l=>U.CREDENTIAL_KEY_PATTERN.test(l)).map(l=>`<<${n}${l}>>`),c=a.length>0?`Secret placeholders are namespaced by system: use ${a.join(", ")}.`:`Secret placeholders are namespaced by system as <<${n}secretName>>.`;return`${s}. ${c} Nothing was sent.`}function Ige(t){let e={};if(!t.steps)return e;for(let r of t.steps){if(!r.config||!(0,AL.isRequestConfig)(r.config)||!r.config.systemId)continue;let n=OL(r.config,r.config.systemId);if(n.length===0)continue;let i=new Set(e[r.config.systemId]||[]);for(let o of n)i.add(o);e[r.config.systemId]=[...i]}return e}function Cge(t){return t.replace(/([a-z])([A-Z])|([A-Z]{2,})([A-Z][a-z])/g,"$1$3 $2$4").replace(/[_-]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).replace(/\b(Id|Url|Api|Ui)\b/g,e=>e.toUpperCase())}});var LL=y(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.AGENT_CONTEXT_MEMORY_MESSAGE_ID_PREFIX=void 0;Pt.applyToolMutation=xL;Pt.mutateToolCallInMessages=Sge;Pt.buildStreamingAssistantMessage=UL;Pt.parseToolOutput=ML;Pt.parseAgentStreamEventLine=_ge;Pt.stopActiveTool=PL;Pt.appendContentToMessage=Bw;Pt.updateMessageWithData=hu;Pt.findAwaitingConfirmationToolCallIds=Bge;Pt.declineAwaitingConfirmationTools=vge;Pt.findAndResumeMessageWithTool=Qge;Pt.serializeMessageForPersistence=Dge;Pt.isTurnContextBlockMessage=vw;Pt.normalizeAgentSessionForkMessages=Rge;Pt.normalizeAgentSessionImportMessages=Nge;Pt.createAgentTranscriptState=Oge;Pt.applyAgentStreamChunk=xge;var bge=hn(),Lm=si();function xL(t,e){let r=e.frontendOutput!==void 0?e.frontendOutput:t.frontendOutput;return{...t,...e.input!==void 0?{input:e.input}:{},...e.result!==void 0?{result:e.result}:{},...e.status!==void 0?{status:e.status}:{},...e.startTime!==void 0?{startTime:e.startTime}:{},...e.endTime!==void 0?{endTime:e.endTime}:{},...e.error!==void 0?{error:e.error||void 0}:{},...r!==void 0?{frontendOutput:r}:{},...e.llmOutput!==void 0?{llmOutput:e.llmOutput}:{},...e.resultMetadata!==void 0?{resultMetadata:e.resultMetadata}:{},...e.confirmationState!==void 0?{confirmationState:e.confirmationState===null?void 0:e.confirmationState}:{},...e.confirmationData!==void 0?{confirmationData:e.confirmationData===null?void 0:e.confirmationData}:{}}}function Sge(t,e,r){return t.map(n=>{let i=!1,o=n.parts?.map(s=>s.type!=="tool"||!s.tool||s.tool.id!==e?s:(i=!0,{...s,tool:xL(s.tool,r)}));return i&&o?{...n,parts:o}:n})}function UL(t){return{id:t,content:"",role:"assistant",timestamp:new Date,parts:[{type:"content",content:"",id:"content-0"}],isStreaming:!0}}function wge(){return{status:"declined",endTime:new Date,confirmationState:"declined",confirmationData:{reason:"new_user_message",message:"Rejected: the user sent a new message instead of confirming this action. The proposed changes were NOT applied."}}}function ML(t){if(!t)return null;if(typeof t=="string")try{let e=JSON.parse(t);return e&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}return typeof t=="object"&&!Array.isArray(t)?t:null}function _ge(t){if(!t.startsWith("data: "))return null;try{let e=JSON.parse(t.slice(6));return e&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}}function PL(t){return t.status==="running"||t.status==="pending"||t.status==="awaiting_confirmation"?{...t,status:"stopped",endTime:new Date,confirmationState:void 0,confirmationData:void 0}:t}function Bw(t,e){if(!e)return t;let r=[...t.parts||[]],n=r[r.length-1];return n?.type==="content"?r[r.length-1]={...n,content:(n.content||"")+e}:r.push({type:"content",content:e,id:`content-${r.length}`}),{...t,parts:r,content:""}}function hu(t,e,r){if(t.id!==r.id)return t;switch(e.type){case"content":return Bw(t,e.content||"");case"tool_call_start":{let n=t.parts?.find(l=>l.type==="tool"&&l.tool?.id===e.toolCall.id)?.tool,i=e.toolCall.input??n?.input,o=e.executionMode==="confirm"?"awaiting_confirmation":i?"running":"pending",s={...n,id:e.toolCall.id,name:e.toolCall.name,input:i,status:o,startTime:n?.startTime||new Date,...n?.confirmationState!==void 0?{confirmationState:n.confirmationState}:{},...n?.confirmationData!==void 0?{confirmationData:n.confirmationData}:{}},a=[...t.parts||[]],c=a.findIndex(l=>l.type==="tool"&&l.tool?.id===e.toolCall.id);return c===-1?a.push({type:"tool",tool:s,id:`tool-${e.toolCall.id}`}):a[c]={...a[c],tool:s},{...t,parts:a,content:""}}case"tool_call_input":{let n=i=>i.id===e.toolCall.id&&e.toolCall.input!==void 0?{...i,input:e.toolCall.input}:i;return{...t,parts:t.parts?.map(i=>i.type==="tool"&&i.tool?{...i,tool:n(i.tool)}:i)}}case"run_command_effect":{let n=e.effect;if(n?.kind!=="visual"&&n?.kind!=="checklist"||typeof e.toolCallId!="string")return t;let i=o=>{if(o.id!==e.toolCallId)return o;let s=ML(o.frontendOutput)??{},a=(s.effects??[]).filter(c=>c.id!==n.id);return{...o,frontendOutput:{...s,effects:[...a,n]}}};return{...t,parts:t.parts?.map(o=>o.type==="tool"&&o.tool?{...o,tool:i(o.tool)}:o)}}case"tool_call_update":{let n=t.parts?.map(i=>i.type==="tool"&&i.tool?.id===e.toolCall.id?{...i,tool:{...i.tool,executionTraceId:e.toolCall.executionTraceId??i.tool.executionTraceId,status:i.tool.status==="pending"?"running":i.tool.status}}:i)||[];return{...t,parts:n}}case"tool_call_complete":{let n=t.parts?.find(h=>h.type==="tool"&&h.tool?.id===e.toolCall.id)?.tool,i=n?.status==="completed"||n?.status==="declined",o=e.toolCall.result!==void 0||e.toolCall.frontendOutput!==void 0||e.toolCall.status!==void 0||e.toolCall.confirmationState!==void 0||e.toolCall.confirmationData!==void 0;if(i&&!o)return t;let s=null;try{s=typeof e.toolCall.frontendOutput=="string"?JSON.parse(e.toolCall.frontendOutput):e.toolCall.frontendOutput}catch{}let a=s?.success===!1&&s?.error,c=e.toolCall.result?.outcome,l=c==="failure"?"error":c==="rejected"?"declined":c==="aborted"?"stopped":c==="success"?"completed":void 0,u=e.toolCall.status||l||"completed";a&&u==="completed"&&(u="error");let d=u==="awaiting_confirmation",A={...e.toolCall.input!==void 0?{input:e.toolCall.input}:{},...e.toolCall.result!==void 0?{result:e.toolCall.result}:{},status:u,frontendOutput:e.toolCall.frontendOutput,llmOutput:e.toolCall.llmOutput,resultMetadata:e.toolCall.resultMetadata,error:c==="failure"?e.toolCall.result.error.message:a?s.error:null,endTime:d?void 0:new Date,...e.toolCall.confirmationState!==void 0?{confirmationState:e.toolCall.confirmationState}:{},...e.toolCall.confirmationData!==void 0?{confirmationData:e.toolCall.confirmationData}:{}},p=t.parts?.map(h=>h.type==="tool"&&h.tool?.id===e.toolCall.id?{...h,tool:{...h.tool,...A}}:h)||[];return{...t,parts:p}}case"done":{if(!t.isStreaming)return t;let n=(t.parts||[]).map(i=>i.type==="tool"&&i.tool&&i.tool.status!=="awaiting_confirmation"?{...i,tool:PL(i.tool)}:i);return{...t,isStreaming:!1,parts:n,content:""}}default:return t}}function Bge(t){let e=new Set;for(let r of t)for(let n of(0,Lm.getMessageToolCalls)(r))n.status==="awaiting_confirmation"&&e.add(n.id);return[...e]}function vge(t){let e=wge();return t.map(r=>({...r,parts:r.parts?.map(n=>n.type==="tool"&&n.tool?.status==="awaiting_confirmation"?{...n,tool:{...n.tool,...e}}:n)}))}function Qge(t,e){let r=t.find(i=>i.parts?.some(o=>o.type==="tool"&&o.tool?.id===e));return r?{messages:t.map(i=>i.id===r.id?{...i,isStreaming:!0}:i),targetMessage:{...r,isStreaming:!0}}:{messages:t,targetMessage:null}}function Tge(t){return{id:t.id,name:t.name,status:t.status,input:t.input,result:t.result,frontendOutput:t.frontendOutput,llmOutput:t.llmOutput,resultMetadata:t.resultMetadata,error:t.error,startTime:t.startTime,endTime:t.endTime,confirmationState:t.confirmationState,confirmationData:t.confirmationData}}function Dge(t){let{isStreaming:e,tools:r,...n}=t;return JSON.parse((0,Lm.safeStringify)({...n,...t.parts?{parts:t.parts.map(i=>i.type==="tool"&&i.tool?{...i,tool:Tge(i.tool)}:i)}:{}},0))}Pt.AGENT_CONTEXT_MEMORY_MESSAGE_ID_PREFIX="context-memory-";var kge=["artifacts"];function vw(t){let e=t.contextType??"";return bge.TURN_CONTEXT_BLOCK_TYPES.includes(e)||kge.includes(e)}function Rge(t){return t.filter(e=>e.role!=="system"&&e.contextType!=="memory_notes"&&!vw(e)&&!e.id.startsWith(Pt.AGENT_CONTEXT_MEMORY_MESSAGE_ID_PREFIX)).map(e=>({...e,stale:void 0,isStreaming:void 0}))}function Nge(t){return t.filter(e=>!e.stale&&!e.isStreaming&&e.contextType!=="memory_notes"&&!vw(e)&&!!e.id)}function Oge(t=[],e=null){return{messages:t,assistantMessageId:e,outcome:"streaming"}}function Pm(t,e){return(0,Lm.getMessageToolCalls)(t).some(r=>r.id===e)}function pu(t,e){let r=t.assistantMessageId?t.messages.find(i=>i.id===t.assistantMessageId):void 0;if(r)return{state:t,target:r};let n=UL(t.assistantMessageId??e.createAssistantMessageId());return{state:{...t,messages:[...t.messages,n],assistantMessageId:n.id},target:n}}function xge(t,e,r){switch(e.type){case"system_message":{if(!e.systemMessage)return t;let n={id:e.systemMessage.id,role:"system",content:e.systemMessage.content,timestamp:new Date};return{...t,messages:[n,...t.messages]}}case"assistant_message_start":{if(!e.assistantMessageId)return t;let n=t.assistantMessageId?t.messages.find(o=>o.id===t.assistantMessageId):void 0;return t.messages.find(o=>o.id===e.assistantMessageId)?{...t,assistantMessageId:e.assistantMessageId,messages:t.messages.filter(o=>!n||n.id===e.assistantMessageId||o.id!==n.id).map(o=>o.id===e.assistantMessageId?{...o,isStreaming:!0}:o)}:n?{...t,assistantMessageId:e.assistantMessageId,messages:t.messages.map(o=>o.id===n.id?{...o,id:e.assistantMessageId,isStreaming:!0}:o)}:{...t,assistantMessageId:e.assistantMessageId}}case"context_message":{if(!e.contextMessage)return t;let n={id:e.contextMessage.id,role:"user",content:e.contextMessage.content,timestamp:new Date,...e.contextMessage.isHidden?{isHidden:!0}:{},...e.contextMessage.attachedFiles?.length?{attachedFiles:e.contextMessage.attachedFiles}:{}};return{...t,assistantMessageId:null,messages:[...t.messages.map(i=>i.id===t.assistantMessageId?{...i,isStreaming:!1}:i),n]}}case"context_usage":case"compaction_start":return t;case"compaction_complete":{if(!e.compaction)return t;let n=(0,Lm.applyAgentCompactionToMessages)(t.messages,e.compaction),i=e.compaction.memoryMessage?t.assistantMessageId:null;return!i||!n.some(o=>o.id===i)?{...t,messages:n}:{...t,assistantMessageId:null,messages:n.map(o=>o.id===i?{...o,isStreaming:!1}:o)}}case"content":{let n=pu(t,r);return{...n.state,messages:n.state.messages.map(i=>i.id===n.target.id?Bw(i,e.content||""):i)}}case"error":{let n=pu(t,r);return{...n.state,outcome:"failed",messages:n.state.messages.map(i=>i.id!==n.target.id?i:{...i,parts:[...i.parts||[],{type:"error",content:e.content,errorDetails:e.errorDetails,id:`error-${i.parts?.length??0}`}],isStreaming:!1})}}case"tool_call_start":case"tool_call_update":{if(!e.toolCall)return t;let n=e.type==="tool_call_start"?null:t.messages.find(o=>Pm(o,e.toolCall.id))??null,i=n?{state:t,target:n}:pu(t,r);return{...i.state,messages:i.state.messages.map(o=>hu(o,e,i.target))}}case"run_command_effect":{let n=e.toolCallId;if(!n)return t;let i=t.messages.find(o=>Pm(o,n));return i?{...t,messages:t.messages.map(o=>hu(o,e,i))}:t}case"tool_call_input":{if(!e.toolCall)return t;let n=t.messages.find(i=>Pm(i,e.toolCall.id));return n?{...t,messages:t.messages.map(i=>hu(i,e,n))}:t}case"tool_call_complete":{if(!e.toolCall)return t;let n=t.messages.find(o=>Pm(o,e.toolCall.id)),i=n?{state:t,target:n}:pu(t,r);return{...i.state,messages:i.state.messages.map(o=>hu(o,e,i.target))}}case"paused":{let n=pu(t,r);return{...n.state,outcome:"paused",messages:n.state.messages.map(i=>i.id===n.target.id?{...i,isStreaming:!1}:i)}}case"done":{let n=pu(t,r);return{...n.state,outcome:t.outcome==="failed"?"failed":"completed",messages:n.state.messages.map(i=>hu(i,e,n.target))}}default:return t}}});var $m=y(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.PROJECT_LABEL_COLOR_PATTERN=Lt.PROJECT_LABEL_COLORS=Lt.PROJECT_LIMITS=Lt.PROJECT_TASK_STATUSES=Lt.PROJECT_RESOURCE_TYPES=void 0;Lt.isProjectResourceType=Uge;Lt.nextProjectLabelColor=Mge;Lt.projectResourceKey=Pge;Lt.daysUntilTaskDue=FL;Lt.formatTaskDueDate=Lge;Lt.groupByContext=$ge;Lt.PROJECT_RESOURCE_TYPES=["file","tool"];function Uge(t){return Lt.PROJECT_RESOURCE_TYPES.includes(t)}Lt.PROJECT_TASK_STATUSES=["not_started","in_progress","waiting","done"];Lt.PROJECT_LIMITS={name:80,description:500,taskName:120,taskDescription:1e4,labelName:40,labels:50,taskLabels:10};Lt.PROJECT_LABEL_COLORS=["#6b7280","#ef4444","#f97316","#eab308","#22c55e","#14b8a6","#3b82f6","#6366f1","#a855f7","#ec4899"];Lt.PROJECT_LABEL_COLOR_PATTERN=/^#[0-9a-f]{6}$/;function Mge(t){let e=new Set(t.map(r=>r.color));return Lt.PROJECT_LABEL_COLORS.find(r=>!e.has(r))??Lt.PROJECT_LABEL_COLORS[t.length%Lt.PROJECT_LABEL_COLORS.length]}function Pge(t){return`${t.type}:${t.id}`}function $L(t){let e=new Intl.DateTimeFormat("en-CA",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date);return new Date(`${e}T00:00:00Z`)}function FL(t,e){let r=new Date(`${t}T00:00:00Z`);return Math.round((r.getTime()-$L(e).getTime())/864e5)}function Lge(t,e){let r=new Date(`${t}T00:00:00Z`),n=$L(e),i=FL(t,e);return i===0?"Due today":i===1?"Due tomorrow":i===-1?"Due yesterday":i<-1?`${-i} days overdue`:i<7?`Due ${r.toLocaleDateString(void 0,{weekday:"long",timeZone:"UTC"})}`:`Due ${r.toLocaleDateString(void 0,{day:"numeric",month:"short",timeZone:"UTC",...r.getUTCFullYear()===n.getUTCFullYear()?{}:{year:"numeric"}})}`}function $ge(t){let e=new Map;for(let r of t)e.set(r.context,[...e.get(r.context)??[],r]);return[...e].map(([r,n])=>({context:r,items:n})).sort((r,n)=>+!!r.context-+!!n.context)}});var Fm=y(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.RESOURCE_KINDS=bn.RESOURCE_DEFINITIONS=void 0;bn.isResourceKind=Fge;bn.getResourceDefinition=jge;bn.getResourceAppPath=zge;bn.RESOURCE_DEFINITIONS={tool:{label:"Tool",pluralLabel:"Tools",collectionKey:"tools",appPath:"/tools",hasDetailPage:!0,memberDefaultPermission:"editor",pickerDefaultPermission:"editor"},credential:{label:"Connection",pluralLabel:"Connections",collectionKey:"credentials",appPath:"/connections",hasDetailPage:!0,pickerDefaultPermission:"viewer"},playbook:{label:"Playbook",pluralLabel:"Playbooks",collectionKey:"playbooks",appPath:"/brain/playbooks",hasDetailPage:!0,pickerDefaultPermission:"editor"},file:{label:"File",pluralLabel:"Files",collectionKey:"files",appPath:"/brain/files",hasDetailPage:!0,pickerDefaultPermission:"viewer"},project:{label:"Project",pluralLabel:"Projects",collectionKey:"projects",appPath:"/brain/projects",hasDetailPage:!0,pickerDefaultPermission:"viewer"}};bn.RESOURCE_KINDS=Object.keys(bn.RESOURCE_DEFINITIONS);function Fge(t){return typeof t=="string"&&Object.prototype.hasOwnProperty.call(bn.RESOURCE_DEFINITIONS,t)}function jge(t){return bn.RESOURCE_DEFINITIONS[t]}function zge(t,e){let r=bn.RESOURCE_DEFINITIONS[t];return r.hasDetailPage?`${r.appPath}/${encodeURIComponent(e)}`:r.appPath}});var HL=y(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.SDK_ERROR_DETAILS_SCHEMA=Qc.SDK_OUTPUT_CONTRACTS=void 0;Qc.toSdkJsonSchema=Yge;var m=uc(),qge=$m(),Hge=Fm(),Gge=hn();function Yge({schema:t}){return m.z.toJSONSchema(t,{target:"draft-7",io:"output",unrepresentable:"any"})}var jL=m.z.looseObject({statusCode:m.z.number(),headers:m.z.record(m.z.string(),m.z.union([m.z.string(),m.z.array(m.z.string())])),omittedHeaderCount:m.z.number().optional()}),zL=m.z.looseObject({vfsPath:m.z.string(),storedBytes:m.z.number(),originalOutputBytes:m.z.number(),storageTruncated:m.z.boolean()}),qL=m.z.object({action:m.z.enum(["approve","reject","oauth_success","oauth_failure"]),source:m.z.enum(["user","automatic"])});function fr(t){return m.z.looseObject({toolCallId:m.z.string(),toolName:m.z.string(),outcome:m.z.literal("success"),confirmation:qL.optional(),data:t})}var Qw={http:jL.optional(),connection:m.z.looseObject({id:m.z.string(),name:m.z.string(),isOwner:m.z.boolean()}).optional().describe("The connection the call ran with."),auth:m.z.looseObject({applied:m.z.enum(["bearer","basic","explicit","none","unavailable"]),header:m.z.string().optional(),placeholders:m.z.array(m.z.string()),reason:m.z.string().optional()}).optional().describe("How authentication was sent: a default Bearer or Basic header, the request's own explicit placeholders, none, or unavailable with the reason. placeholders lists the connection's <<systemId_secretName>> strings."),secretPlaceholders:m.z.looseObject({keys:m.z.array(m.z.string()),resolved:m.z.boolean()}).optional()},Vge=m.z.discriminatedUnion("protocol",[m.z.looseObject({protocol:m.z.enum(["postgres","odbc"]),data:m.z.array(m.z.record(m.z.string(),m.z.unknown())).describe("Returned database rows."),...Qw}),m.z.looseObject({protocol:m.z.literal("mssql"),data:m.z.union([m.z.array(m.z.record(m.z.string(),m.z.unknown())),m.z.array(m.z.array(m.z.record(m.z.string(),m.z.unknown()))),m.z.looseObject({rowsAffected:m.z.array(m.z.number())})]).describe("One recordset, multiple recordsets, or affected row counts."),...Qw}),m.z.looseObject({protocol:m.z.enum(Gge.CONNECTION_PROTOCOLS.filter(t=>t!=="postgres"&&t!=="mssql"&&t!=="odbc")),data:m.z.unknown().describe("Complete protocol response payload. Preserve sibling fields, including files and metadata; do not unwrap a nested data field."),...Qw})]),Wge=m.z.union([m.z.looseObject({tools:m.z.array(m.z.unknown()).describe("All tools from every tools/list page, each with name and inputSchema.")}),m.z.looseObject({result:m.z.looseObject({content:m.z.array(m.z.unknown()).optional(),structuredContent:m.z.unknown().optional(),isError:m.z.boolean().optional()}).describe("The tools/call result with content blocks and optional structuredContent.")})]),Jge=m.z.looseObject({url:m.z.string().describe("The requested URL."),status:m.z.number(),statusText:m.z.string(),headers:m.z.record(m.z.string(),m.z.string()),body:m.z.string().describe("Response body bytes, base64-encoded."),systemId:m.z.string().optional().describe("The system whose connection authenticated the request."),connection:m.z.looseObject({id:m.z.string(),name:m.z.string(),isOwner:m.z.boolean()}).optional().describe("The connection the request ran with.")}),Zge=m.z.looseObject({stepId:m.z.string(),success:m.z.boolean(),data:m.z.unknown().optional(),error:m.z.string().nullable().optional(),http:jL.optional(),stepFileKeys:m.z.array(m.z.string()).optional()}),Kge=m.z.looseObject({toolId:m.z.string(),success:m.z.boolean(),run:m.z.looseObject({id:m.z.string()}).optional(),data:m.z.unknown().optional().describe("Tool output, determined by its output transform."),error:m.z.string().optional(),stepResults:m.z.array(Zge),fileArtifacts:m.z.array(m.z.looseObject({fileKey:m.z.string(),filename:m.z.string(),contentType:m.z.string(),size:m.z.number(),downloadUrl:m.z.string().optional()})).optional(),warnings:m.z.array(m.z.string()).optional(),inputSchema:m.z.unknown().optional(),resultMetadata:zL.optional()}),Xge=fr(m.z.looseObject({resource:m.z.looseObject({id:m.z.string(),name:m.z.string().optional(),path:m.z.string().optional(),version:m.z.union([m.z.number(),m.z.string()]).optional()}),created:m.z.boolean(),projectId:m.z.string().optional(),projectAttribution:m.z.looseObject({attached:m.z.boolean(),projectId:m.z.string(),projectName:m.z.string().optional(),resource:m.z.looseObject({type:m.z.enum(qge.PROJECT_RESOURCE_TYPES),id:m.z.string()}),error:m.z.string().optional()}).optional()}));Qc.SDK_OUTPUT_CONTRACTS={assignSessionToProject:{name:"SuperglueSessionProjectResult",schema:fr(m.z.object({sessionId:m.z.string(),projectId:m.z.string().nullable()})),description:"Returns the saved session ID and project ID, or null when unassigned. Throws SuperglueError on failure."},callSystem:{name:"SuperglueCallSystemResult",schema:Vge,description:"Returns the complete protocol payload in data, available HTTP metadata, the connection used, and how authentication was sent. Throws SuperglueError on failure; details contains the canonical result and unprojected execution output."},callMcp:{name:"SuperglueCallMcpResult",schema:Wge,description:"Returns { tools } when tool is omitted, or { result } from tools/call. Throws SuperglueError on HTTP, JSON-RPC, or result.isError failures; details.result.data contains statusCode, rpcError, or the failed result. On result.isError or invalid params, the error message ends with the called tool's input schema when it can be read; large schemas are shortened."},systemFetch:{name:"SuperglueSystemFetchResult",schema:Jge,description:"Returns the raw HTTP response: status, headers, and the base64 body. HTTP error statuses are returned, not thrown. Throws SuperglueError when the request cannot be authenticated or sent."},runTool:{name:"SuperglueRunToolResult",schema:Kge,description:"Returns successful tool output, step results, files, and available result reference. Throws SuperglueError on failure; details.result.data preserves this result shape with success: false, the error, and available run and step results. details.resultMetadata references the saved failed result when available."},writeResource:{name:"SuperglueWriteResult",schema:Xge,description:"Returns saved resource identity and path, creation status, and available project attribution. Throws SuperglueError on failure."},installBundle:{name:"SuperglueBundleInstallResult",schema:fr(m.z.looseObject({bundleId:m.z.string(),system:m.z.looseObject({id:m.z.string(),name:m.z.string(),requiredCredentialKeys:m.z.array(m.z.string()),hasUserCredentials:m.z.boolean()}),tools:m.z.array(m.z.looseObject({id:m.z.string(),name:m.z.string().optional()})),mcpServer:m.z.looseObject({id:m.z.string(),name:m.z.string()}).optional(),playbook:m.z.looseObject({id:m.z.string(),name:m.z.string()}).optional()})),description:"Returns the installed system ID, tool, MCP server, and playbook identities, the secret names the user must supply, and whether the user has a complete connection. Throws SuperglueError on failure."},stopBackgroundJob:{name:"SuperglueStopBackgroundJobResult",schema:fr(m.z.looseObject({job:m.z.looseObject({id:m.z.string(),status:m.z.string(),elapsedMs:m.z.number(),exitCode:m.z.number().optional()})})),description:"Returns the job's status, run time, and exit code after it ended, or status running when the stop is still in progress. Throws SuperglueError when the session has no such running job."},setToolState:{name:"SuperglueToolStateResult",schema:fr(m.z.looseObject({resource:m.z.looseObject({id:m.z.string()}),action:m.z.enum(["set","reset"])})),description:"Returns the saved tool identity and state action. Throws SuperglueError on failure."},shareResource:{name:"SuperglueShareResult",schema:fr(m.z.looseObject({resource:m.z.looseObject({kind:m.z.enum(Hge.RESOURCE_KINDS),id:m.z.string()})})),description:"Returns the shared resource identity. Throws SuperglueError on failure."},useChecklist:{name:"SuperglueChecklistResult",schema:fr(m.z.strictObject({visible:m.z.boolean(),done:m.z.number(),total:m.z.number()})),description:"Returns whether the session checklist is visible and its completed and total milestone counts. The progress panel updates immediately. Throws SuperglueError on failure."},showVisual:{name:"SuperglueShowVisualResult",schema:fr(m.z.looseObject({visualId:m.z.string(),check:m.z.looseObject({errors:m.z.array(m.z.string()),blockedRequests:m.z.array(m.z.string()),dataCalls:m.z.array(m.z.string()),contentHeight:m.z.number().optional(),timedOut:m.z.boolean()}).optional(),checkSkipped:m.z.string().optional(),screenshots:m.z.array(m.z.string()).optional()})),description:"Returns the visualId shown to the user. For a custom visual, check holds the test-browser result, and screenshots lists the labels of the screenshots attached to this command's result for you. Throws SuperglueError ETOOL when the visual fails its check; error.details.result.data.check then holds the errors."},notifyUser:{name:"SuperglueNotifyResult",schema:fr(m.z.looseObject({nextStepIds:m.z.array(m.z.string())})),description:"Returns the nextStepIds of the saved actions, in action order. Throws SuperglueError on failure."},writeOrgSettings:{name:"SuperglueOrgSettingsResult",schema:fr(m.z.looseObject({updated:m.z.array(m.z.enum(["name","preferences","notifications"])),notificationTest:m.z.looseObject({channel:m.z.enum(["slack","email"]),sent:m.z.boolean(),error:m.z.string().optional()}).optional()})),description:"Returns updated settings and any notification test result. Throws SuperglueError on failure."},writeDesignSystem:{name:"SuperglueDesignSystemResult",schema:fr(m.z.looseObject({updated:m.z.array(m.z.enum(["tokens","guidelines","logo"])),added:m.z.array(m.z.looseObject({id:m.z.string(),kind:m.z.enum(["logo","font","template","reference"]),name:m.z.string()})),changed:m.z.array(m.z.string()),removed:m.z.array(m.z.string())})),description:"Returns the changed design-system parts and file ids. Throws SuperglueError on failure."},importDesignSystemFromUrl:{name:"SuperglueDesignSystemImportResult",schema:fr(m.z.looseObject({url:m.z.string(),title:m.z.string().nullable(),tokens:m.z.looseObject({}),palette:m.z.array(m.z.looseObject({color:m.z.string(),weight:m.z.number()})),fonts:m.z.array(m.z.looseObject({family:m.z.string(),usage:m.z.array(m.z.string()),source:m.z.string()})),fontFiles:m.z.array(m.z.looseObject({file:m.z.string(),family:m.z.string().describe("CSS family name the website uses"),roles:m.z.array(m.z.string()),weight:m.z.string(),style:m.z.enum(["normal","italic"])})),logos:m.z.array(m.z.looseObject({file:m.z.string(),source:m.z.string(),width:m.z.number(),height:m.z.number(),light:m.z.boolean().describe("Light artwork meant for dark backgrounds")})),screenshot:m.z.string().nullable()})),description:"Returns a proposed design system from the website; font files, logos, and the screenshot are file:: session uploads. Throws SuperglueError on failure."},readQbm:{name:"SuperglueReadQbmResult",schema:fr(m.z.looseObject({folder:m.z.string(),objects:m.z.array(m.z.looseObject({type:m.z.string(),files:m.z.array(m.z.string()),records:m.z.number()})),rawTables:m.z.array(m.z.looseObject({table:m.z.string(),files:m.z.array(m.z.string()),rows:m.z.number()})),encryptedValues:m.z.array(m.z.looseObject({table:m.z.string(),column:m.z.string(),values:m.z.number()})),unmappedCodes:m.z.array(m.z.looseObject({field:m.z.string(),code:m.z.string(),records:m.z.number()})).optional(),attachments:m.z.looseObject({documents:m.z.number(),note:m.z.string()}).optional(),rejectedRows:m.z.array(m.z.looseObject({table:m.z.string(),rows:m.z.number()})).optional()})),description:"Returns the folder that holds the extracted files, record counts per object type and raw table, encrypted columns, codes the reader cannot decode, and expected attachments. The folder also holds coverage.json.raw with the same summary plus the mapped source tables. Throws SuperglueError on failure."},readDocument:{name:"SuperglueReadDocumentResult",schema:fr(m.z.looseObject({headings:m.z.array(m.z.looseObject({level:m.z.number(),text:m.z.string()})),markdown:m.z.string()})),description:"Returns every heading with its level and the Markdown of the document or of the requested section. Throws SuperglueError when the file is not a Word file or no heading matches the section."},readSlides:{name:"SuperglueReadSlidesResult",schema:fr(m.z.looseObject({slideCount:m.z.number(),slides:m.z.array(m.z.looseObject({number:m.z.number(),title:m.z.string(),hidden:m.z.boolean(),text:m.z.string(),notes:m.z.string(),tables:m.z.number(),charts:m.z.number(),images:m.z.number(),markdown:m.z.string()}))})),description:"Returns the slide count and the requested slides with title, text in reading order, speaker notes, table, chart, and image counts, and Markdown. Throws SuperglueError when the file is not a PowerPoint file or a slide does not exist."},readSheet:{name:"SuperglueReadSheetResult",schema:fr(m.z.looseObject({sheet:m.z.looseObject({name:m.z.string(),hidden:m.z.boolean(),range:m.z.string().nullable(),rows:m.z.number(),columns:m.z.number(),formulas:m.z.number(),mergedRanges:m.z.number(),charts:m.z.number(),images:m.z.number()}),range:m.z.string().nullable(),cells:m.z.array(m.z.looseObject({address:m.z.string(),value:m.z.union([m.z.string(),m.z.number(),m.z.boolean(),m.z.null()]),text:m.z.string(),formula:m.z.string().optional()}))})),description:"Returns the sheet summary and every non-empty cell in the range with address, stored value, displayed text, and formula. A formula without a stored result has value null. Throws SuperglueError when the sheet or range does not exist."},findInFile:{name:"SuperglueFindInFileResult",schema:fr(m.z.looseObject({matches:m.z.array(m.z.looseObject({location:m.z.string(),text:m.z.string()}))})),description:"Returns every match with its location and surrounding text; an empty list when nothing matches. Throws SuperglueError when the file is not a Word, PowerPoint, or Excel file."},renderPage:{name:"SuperglueRenderPageResult",schema:fr(m.z.looseObject({label:m.z.string(),screenshots:m.z.array(m.z.string())})),description:"Shows the rendered page to the model after the command and returns its label. Throws SuperglueError when the page, slide, or sheet does not exist."},previewFile:{name:"SuperglueFilePreviewResult",schema:m.z.looseObject({draftId:m.z.string(),bytes:m.z.number()}),description:"Returns the HTML draft identity and byte count. Throws SuperglueError on failure."}};var eme=m.z.looseObject({code:m.z.string(),path:m.z.array(m.z.union([m.z.string(),m.z.number(),m.z.symbol()])),message:m.z.string()});Qc.SDK_ERROR_DETAILS_SCHEMA=m.z.discriminatedUnion("kind",[m.z.looseObject({kind:m.z.literal("tool_result"),resultMetadata:zL.optional(),result:m.z.looseObject({toolCallId:m.z.string(),toolName:m.z.string(),outcome:m.z.enum(["success","failure","rejected","aborted"]),confirmation:qL.optional(),error:m.z.looseObject({message:m.z.string()}).optional(),data:m.z.unknown().optional()}),output:m.z.unknown().describe("Unprojected execution output, including the original error and any available response data or metadata.")}),m.z.looseObject({kind:m.z.enum(["input_validation","output_validation"]),toolName:m.z.string(),issues:m.z.array(eme),output:m.z.unknown().optional()})])});var n$=y(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.SERVER_OWNED_SESSION_RESOURCE_KINDS=Re.AgentRequestValidationError=Re.AGENT_TOOL_CONTINUATION_ACTION_BY_CONFIRMATION_STATE=Re.AGENT_TOOL_CONTINUATION_ACTIONS=Re.AGENT_IDENTIFIER_PATTERN=Re.AGENT_REQUEST_LIMITS=void 0;Re.validateAgentRequestPayload=KL;Re.validateResourceBinding=XL;Re.validateClientResourceBinding=e$;Re.validateAgentSessionIdentity=t$;Re.validateAgentSessionTarget=r$;Re.validateAgentRequestSubmission=ame;Re.isAgentMessagePayload=cme;Re.isAgentToolContinuationPayload=lme;var Qs=hn();Re.AGENT_REQUEST_LIMITS={messageContentChars:5e4,identifierChars:256,attachedFiles:20,toolContinuations:20,continuationInputChars:1e5,frontendDraftsChars:2e6,accessRulesContextChars:2e6,pendingMessagesPerSession:10};Re.AGENT_IDENTIFIER_PATTERN=/^[A-Za-z0-9._-]+$/;Re.AGENT_TOOL_CONTINUATION_ACTIONS=["approve","reject","oauth_success","oauth_failure"];Re.AGENT_TOOL_CONTINUATION_ACTION_BY_CONFIRMATION_STATE={[Qs.ConfirmationAction.CONFIRMED]:"approve",[Qs.ConfirmationAction.DECLINED]:"reject",[Qs.ConfirmationAction.OAUTH_SUCCESS]:"oauth_success",[Qs.ConfirmationAction.OAUTH_FAILURE]:"oauth_failure"};var jm=class extends Error{constructor(e){super(e),this.name="AgentRequestValidationError"}};Re.AgentRequestValidationError=jm;function lt(t){throw new jm(t)}function Go(t,e){return(!t||typeof t!="object"||Array.isArray(t))&&lt(`${e} must be an object`),t}function Tc(t,e){(typeof t!="string"||!t.trim())&&lt(`${e} must be a non-empty string`);let r=t.trim();return r.length>Re.AGENT_REQUEST_LIMITS.identifierChars&&lt(`${e} exceeds ${Re.AGENT_REQUEST_LIMITS.identifierChars} characters`),Re.AGENT_IDENTIFIER_PATTERN.test(r)||lt(`${e} may only contain letters, numbers, dots, underscores, and hyphens`),r}function tme(t,e){return typeof t!="boolean"&&lt(`${e} must be a boolean`),t}function Tw(t,e){try{return JSON.stringify(t).length}catch{return lt(`${e} must be JSON-serializable`)}}function rme(t,e){if(t!==void 0)return Array.isArray(t)||lt(`${e} must be an array`),t.length>Re.AGENT_REQUEST_LIMITS.attachedFiles&&lt(`${e} exceeds ${Re.AGENT_REQUEST_LIMITS.attachedFiles} entries`),t.map((r,n)=>{let i=Go(r,`${e}[${n}]`);return{...i,key:Tc(i.key,`${e}[${n}].key`)}})}function GL({value:t,label:e,requireHidden:r}){let n=Go(t,e),i=Tc(n.id,`${e}.id`);typeof n.content!="string"&&lt(`${e}.content must be a string`);let o=n.content;o.length>Re.AGENT_REQUEST_LIMITS.messageContentChars&&lt(`${e}.content exceeds ${Re.AGENT_REQUEST_LIMITS.messageContentChars} characters`);let s=tme(n.isHidden,`${e}.isHidden`);r&&!s&&lt(`${e}.isHidden must be true`);let a=rme(n.attachedFiles,`${e}.attachedFiles`);return!o.trim()&&!a?.length&&lt(`${e}.content may only be empty when an attachment is present`),{id:i,content:o,isHidden:s,...a?{attachedFiles:a}:{}}}function VL(t){if(t===void 0)return;let e=Go(t,"frontendDrafts");return Tw(e,"frontendDrafts")>Re.AGENT_REQUEST_LIMITS.frontendDraftsChars&&lt(`frontendDrafts exceeds ${Re.AGENT_REQUEST_LIMITS.frontendDraftsChars} characters`),e}function WL(t){if(t===void 0)return;let e=Go(t,"accessRulesContext");return Tw(e,"accessRulesContext")>Re.AGENT_REQUEST_LIMITS.accessRulesContextChars&&lt(`accessRulesContext exceeds ${Re.AGENT_REQUEST_LIMITS.accessRulesContextChars} characters`),e}function JL(t){if(t!==void 0)return(typeof t!="string"||!Qs.AGENT_APPROVAL_MODES.includes(t))&&lt(`request.approvalMode must be one of: ${Qs.AGENT_APPROVAL_MODES.join(", ")}`),t}function ZL(t,e){let r=Go(t,e),n=Tc(r.toolCallId,`${e}.toolCallId`);return(typeof r.action!="string"||!Re.AGENT_TOOL_CONTINUATION_ACTIONS.includes(r.action))&&lt(`${e}.action must be one of: ${Re.AGENT_TOOL_CONTINUATION_ACTIONS.join(", ")}`),r.input!==void 0&&Tw(r.input,`${e}.input`)>Re.AGENT_REQUEST_LIMITS.continuationInputChars&&lt(`${e}.input exceeds ${Re.AGENT_REQUEST_LIMITS.continuationInputChars} characters`),{toolCallId:n,action:r.action,...r.input!==void 0?{input:r.input}:{}}}function nme(t){if(t===void 0)return;(!Array.isArray(t)||t.length===0)&&lt("request.toolContinuations must be a non-empty array"),t.length>Re.AGENT_REQUEST_LIMITS.toolContinuations&&lt(`request.toolContinuations exceeds ${Re.AGENT_REQUEST_LIMITS.toolContinuations} entries`);let e=t.map((r,n)=>ZL(r,`request.toolContinuations[${n}]`));return new Set(e.map(({toolCallId:r})=>r)).size!==e.length&&lt("request.toolContinuations must not contain duplicate toolCallId values"),e}function YL(t,e){if(t===void 0)return;(typeof t!="string"||!t.trim())&&lt(`${e} must be a non-empty string`);let r=t.trim();return r.length>Re.AGENT_REQUEST_LIMITS.messageContentChars&&lt(`${e} exceeds ${Re.AGENT_REQUEST_LIMITS.messageContentChars} characters`),r}var ime=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ome(t){let e=GL({value:t.message,label:"request.message"}),r=YL(t.title,"request.title"),n=YL(t.titleInput,"request.titleInput"),i=t.hiddenSteeringMessage===void 0?void 0:GL({value:t.hiddenSteeringMessage,label:"request.hiddenSteeringMessage",requireHidden:!0});i&&i.id===e.id&&lt("request.hiddenSteeringMessage.id must differ from request.message.id");let o=nme(t.toolContinuations),s=JL(t.approvalMode),a=VL(t.frontendDrafts),c=WL(t.accessRulesContext);return t.nextStepId!==void 0&&(typeof t.nextStepId!="string"||!ime.test(t.nextStepId))&&lt("request.nextStepId must be a UUID"),{kind:"message",message:e,...t.nextStepId?{nextStepId:t.nextStepId}:{},...i?{hiddenSteeringMessage:i}:{},...r?{title:r}:{},...n?{titleInput:n}:{},...o?{toolContinuations:o}:{},...s?{approvalMode:s}:{},...a?{frontendDrafts:a}:{},...c?{accessRulesContext:c}:{}}}function sme(t){let e=ZL(t,"request"),r=JL(t.approvalMode),n=VL(t.frontendDrafts),i=WL(t.accessRulesContext);return{kind:"tool_continuation",...e,...r?{approvalMode:r}:{},...n?{frontendDrafts:n}:{},...i?{accessRulesContext:i}:{}}}function KL(t){let e=Go(t,"request");return e.kind==="message"?ome(e):e.kind==="tool_continuation"?sme(e):lt('request.kind must be "message" or "tool_continuation"')}function XL(t,e){let r=Go(t,e);return(typeof r.kind!="string"||!Qs.AGENT_SESSION_RESOURCE_KINDS.includes(r.kind))&&lt(`${e}.kind must be one of: ${Qs.AGENT_SESSION_RESOURCE_KINDS.join(", ")}`),{kind:r.kind,id:Tc(r.id,`${e}.id`)}}Re.SERVER_OWNED_SESSION_RESOURCE_KINDS=["briefing"];function e$(t,e){let r=XL(t,e);return Re.SERVER_OWNED_SESSION_RESOURCE_KINDS.includes(r.kind)&&lt(`${e}.kind "${r.kind}" is assigned by the server`),r}function t$(t,e="session.createIfMissing"){let r=Go(t,e),n=r.projectId===void 0?void 0:Tc(r.projectId,`${e}.projectId`),i=r.taskId===void 0?void 0:Tc(r.taskId,`${e}.taskId`);i&&!n&&lt(`${e}.taskId requires ${e}.projectId`);let o=Object.values(Qs.AgentType);(typeof r.agentId!="string"||!o.includes(r.agentId))&&lt(`${e}.agentId must be one of: ${o.join(", ")}`);let s=r.resourceBinding===void 0?void 0:e$(r.resourceBinding,`${e}.resourceBinding`);return{agentId:r.agentId,...n?{projectId:n}:{},...i?{taskId:i}:{},...s?{resourceBinding:s}:{}}}function r$(t){let e=Go(t,"session"),r=e.createIfMissing===void 0?void 0:t$(e.createIfMissing);return{id:Tc(e.id,"session.id"),...r?{createIfMissing:r}:{}}}function ame(t){let e=Go(t,"body");return{session:r$(e.session),request:KL(e.request)}}function cme(t){return t.kind==="message"}function lme(t){return t.kind==="tool_continuation"}});var o$=y(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.ARTIFACT_EXPORT_FORMATS=Fe.ARTIFACT_RESPONSE_RESERVED_FIELD_NAMES=Fe.ARTIFACT_RESPONSE_PATCH_DEBOUNCE_MS=Fe.MAX_SPREADSHEET_ARTIFACT_BYTES=Fe.MAX_HTML_ARTIFACT_IMAGE_BYTES=Fe.MAX_HTML_ARTIFACT_BYTES=Fe.MAX_SPREADSHEET_CELL_TEXT_LENGTH=Fe.MAX_SPREADSHEET_SHEET_NAME_LENGTH=Fe.MAX_SPREADSHEET_GRID_CELLS=Fe.MAX_SPREADSHEET_SHEETS=Fe.SPREADSHEET_CELL_TYPES=Fe.XLSX_CONTENT_TYPE=Fe.HTML_CONTENT_TYPE=void 0;Fe.brainFileDisplayTitle=ume;Fe.brainFileKind=dme;Fe.isValidSpreadsheetCell=hme;Fe.isArtifactExportFormat=fme;Fe.isArtifactExportFormatForKind=gme;var i$=uc();Fe.HTML_CONTENT_TYPE="text/html";Fe.XLSX_CONTENT_TYPE="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";function ume(t){return t.replace(/\.[a-z][a-z0-9]{0,7}$/i,"")||t}function dme({fileName:t,contentType:e}){let r=e?.split(";")[0].trim().toLowerCase(),n=t.toLowerCase().match(/\.([a-z0-9]+)$/)?.[1];return r===Fe.HTML_CONTENT_TYPE||n==="html"||n==="htm"?"html":r===Fe.XLSX_CONTENT_TYPE||n==="xlsx"?"spreadsheet":"file"}Fe.SPREADSHEET_CELL_TYPES=["text","integer","number","percent","currency","boolean","date","datetime"];Fe.MAX_SPREADSHEET_SHEETS=20;Fe.MAX_SPREADSHEET_GRID_CELLS=1e6;Fe.MAX_SPREADSHEET_SHEET_NAME_LENGTH=31;Fe.MAX_SPREADSHEET_CELL_TEXT_LENGTH=32767;var Ame=i$.z.iso.date(),pme=i$.z.iso.datetime({offset:!0});function hme(t,e){return t===null?!0:e==="text"?typeof t=="string"&&t.length<=Fe.MAX_SPREADSHEET_CELL_TEXT_LENGTH:e==="boolean"?typeof t=="boolean":["integer","number","percent","currency"].includes(e)?typeof t=="number"&&Number.isFinite(t)&&(e!=="integer"||Number.isInteger(t)):typeof t!="string"?!1:(e==="datetime"?pme:Ame).safeParse(t).success}Fe.MAX_HTML_ARTIFACT_BYTES=1024*1024;Fe.MAX_HTML_ARTIFACT_IMAGE_BYTES=12*1024*1024;Fe.MAX_SPREADSHEET_ARTIFACT_BYTES=10*1024*1024;Fe.ARTIFACT_RESPONSE_PATCH_DEBOUNCE_MS=300;Fe.ARTIFACT_RESPONSE_RESERVED_FIELD_NAMES=new Set(["__proto__","constructor","prototype"]);Fe.ARTIFACT_EXPORT_FORMATS=["pdf","docx","xlsx","pptx"];function fme(t){return Fe.ARTIFACT_EXPORT_FORMATS.some(e=>e===t)}function gme(t,e,r=!1){return t==="spreadsheet"?e==="xlsx":r?e==="pdf"||e==="pptx":e!=="pptx"}});var u$=y(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.API_KEY_ACTION_LABELS=it.API_KEY_SURFACE_LABELS=it.API_KEY_SCOPES=it.API_KEY_SURFACE_ACTIONS=it.API_KEY_ACTIONS=it.API_KEY_SURFACES=void 0;it.getApiKeySurface=a$;it.getApiKeyAction=c$;it.getApiKeySurfaceActions=Dw;it.parseApiKeyScopes=l$;it.validateApiKeyScopesInput=Ime;it.isApiKeyScopeAllowed=Cme;it.formatApiKeyScopes=bme;it.API_KEY_SURFACES=["api","mcp"];it.API_KEY_ACTIONS=["read","write","execute"];it.API_KEY_SURFACE_ACTIONS={api:it.API_KEY_ACTIONS,mcp:["execute"]};it.API_KEY_SCOPES=it.API_KEY_SURFACES.flatMap(t=>it.API_KEY_SURFACE_ACTIONS[t].map(e=>`${t}:${e}`));it.API_KEY_SURFACE_LABELS={api:"API & CLI",mcp:"MCP"};it.API_KEY_ACTION_LABELS={read:"Read",write:"Write",execute:"Execute"};var s$=new Set(it.API_KEY_SCOPES),mme={"/v1/tools":["read"],"/v1/tools/:toolId/run":["execute"],"/v1/authenticate":["write"],"/v1/memory-notes":["read","write"]},yme=new Set(["/v1/api-keys","/v1/api-keys/:id","/v1/api-keys/:id/reveal"]),Eme=new Set(["/v1/me"]);function a$(t){let e=t.split("?")[0];return e==="/mcp"||e.startsWith("/mcp/")?"mcp":"api"}function c$(t){return t==="read"?"read":t==="execute"?"execute":"write"}function Dw(t,e){return it.API_KEY_SURFACE_ACTIONS[e].filter(r=>(t||[]).includes(`${e}:${r}`))}function l$(t){if(!Array.isArray(t))return null;let e=[...new Set(t.filter(r=>s$.has(r)))];return e.length>0?e:null}function Ime(t){if(t==null)return{scopes:null};let e=`Valid scopes: ${it.API_KEY_SCOPES.join(", ")}. Use null for full access.`;if(!Array.isArray(t)||t.length===0)return{error:`scopes must be a non-empty array of API key scopes. ${e}`};let r=t.filter(n=>!s$.has(n));return r.length>0?{error:`Unknown API key scope(s): ${r.map(String).join(", ")}. ${e}`}:{scopes:l$(t)}}function Cme({scopes:t,path:e,type:r}){if(!t||t.length===0)return!0;let n=e.split("?")[0];if(yme.has(n))return!1;if(Eme.has(n))return!0;let i=c$(r),o=a$(n);return o==="api"&&mme[n]?.some(s=>s===r)&&Dw(t,"mcp").length>0?!0:t.includes(`${o}:${i}`)}function bme(t){return!t||t.length===0?"Full access":it.API_KEY_SURFACES.map(e=>({surface:e,actions:Dw(t,e)})).filter(e=>e.actions.length>0).map(e=>it.API_KEY_SURFACE_ACTIONS[e.surface].length===1?it.API_KEY_SURFACE_LABELS[e.surface]:`${it.API_KEY_SURFACE_LABELS[e.surface]} ${e.actions.join("/")}`).join(", ")}});var d$=y(kw=>{"use strict";Object.defineProperty(kw,"__esModule",{value:!0});kw.isValidEmail=Sme;function Sme(t){return/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)*\.[a-zA-Z]{1,}$/.test(t)}});var p$=y($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.GATEWAY_UNINSTALL_COMMANDS=$t.GATEWAY_API_KEY_NAME_PREFIX=$t.GATEWAY_TARGET_NAME_PATTERN=$t.GATEWAY_SETUP_GUIDE_URL=$t.GATEWAY_DOWNLOAD_BASE_URL=$t.GATEWAY_INSTALL_TOKEN_PREFIX=void 0;$t.getGatewayServerUrl=A$;$t.buildGatewayInstallToken=_me;$t.buildGatewayInstallCommand=Bme;$t.getGatewayApiKeyName=vme;$t.GATEWAY_INSTALL_TOKEN_PREFIX="sgi1.";$t.GATEWAY_DOWNLOAD_BASE_URL="https://downloads.superglue.cloud";$t.GATEWAY_SETUP_GUIDE_URL="https://superglue.ai/docs/guides/secure-gateway/";$t.GATEWAY_TARGET_NAME_PATTERN=/^[a-z0-9]([a-z0-9_-]{0,61}[a-z0-9])?$/;function A$(t){let e=new URL(t);return e.protocol=e.protocol==="http:"?"ws:":"wss:",e.pathname=`${e.pathname.replace(/\/+$/,"")}/ws/tunnels`,e.search="",e.hash="",e.toString()}function wme(t){let e=new TextEncoder().encode(t),r="";for(let n of e)r+=String.fromCharCode(n);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function _me(t){let e={v:1,serverUrl:A$(t.apiEndpoint),tunnelId:t.tunnelId,apiKey:t.apiKey,targets:t.targets,enableScriptRunner:t.enableScriptRunner};return $t.GATEWAY_INSTALL_TOKEN_PREFIX+wme(JSON.stringify(e))}function Bme(t,e){return t==="windows"?[`$install = { ${["$ErrorActionPreference = 'Stop'","[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor 3072","$ProgressPreference = 'SilentlyContinue'","$gateway = Join-Path $env:TEMP 'superglue-gateway.exe'","Remove-Item $gateway -Force -ErrorAction SilentlyContinue",`Invoke-WebRequest -UseBasicParsing '${$t.GATEWAY_DOWNLOAD_BASE_URL}/superglue-gateway-windows.exe' -OutFile $gateway`,`'${e}' | & $gateway install -`].join("; ")} }`,`if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { & $install } else { Start-Process powershell -Verb RunAs -ErrorAction Stop -ArgumentList "-NoExit -Command & {$install}"; 'Continue in the administrator PowerShell window.' }`].join("; "):["d=$(mktemp -d)",`u="${$t.GATEWAY_DOWNLOAD_BASE_URL}/superglue-gateway-linux-$(uname -m | sed 's/aarch64/arm64/')"`,'s=$([ "$(id -u)" -eq 0 ] || echo sudo)','{ if command -v curl >/dev/null; then curl -fsSL -o "$d/superglue-gateway" "$u"; else wget -qO "$d/superglue-gateway" "$u"; fi; }','$s install -m 0755 "$d/superglue-gateway" /usr/local/bin/superglue-gateway',`echo '${e}' | $s /usr/local/bin/superglue-gateway install -`].join(" && ")}$t.GATEWAY_API_KEY_NAME_PREFIX="Gateway: ";function vme(t){return $t.GATEWAY_API_KEY_NAME_PREFIX+t}$t.GATEWAY_UNINSTALL_COMMANDS={windows:'& "C:\\Program Files\\superglue Gateway\\superglue-gateway.exe" uninstall',linux:"sudo /usr/local/bin/superglue-gateway uninstall"}});var qm=y(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.OAUTH_TOKEN_CREDENTIAL_KEYS=_e.OAUTH_CONFIG_CREDENTIAL_KEYS=void 0;_e.hasMeaningfulValue=Ft;_e.stringValue=gr;_e.validateOAuthConnection=Pme;_e.formatOAuthConnectionDisabledReason=$me;_e.objectValue=Ds;_e.parseScopes=VA;_e.normalizeGrantType=WA;_e.normalizeOAuthClientMode=Ow;_e.normalizeSystemAuthentication=Pr;_e.resolveOAuthClientMode=jme;_e.flattenSystemAuthentication=y$;_e.maskedFlatSystemAuthentication=zme;_e.isMaskedSecretValue=E$;_e.pickAgentAuthInputFields=qme;_e.maskSystemAuthenticationForResponse=Hme;_e.restoreMaskedClientSecret=Gme;_e.mapAgentAuthInput=I$;_e.mergeAgentAuthInput=rye;_e.getAuthenticationConfigCredentialKeys=C$;_e.buildAuthenticationEditorModel=nye;_e.getCredentialRequirements=iye;_e.isCredentialRequirementSatisfied=b$;_e.hasUnsatisfiedCredentialRequirements=oye;_e.updateAuthenticationEditorField=sye;_e.validateOAuthAuthenticationConfigPlacement=S$;_e.authenticationToLegacyCredentials=w$;_e.isRuntimeCredentialMetadataKey=aye;_e.resolveCredentialAuthentication=cye;_e.buildRuntimeCredentialsFromAuthentication=lye;_e.resolveOAuthConfigFromAuthentication=uye;_e.toCredentialInputValue=xw;_e.getCredentialEntries=dye;_e.getCredentialInputValues=Aye;_e.getCredentialDisplayHiddenKeys=pye;_e.hasOAuthTokenCredentials=hye;_e.getOAuthExpiryText=fye;_e.hasRuntimeCredentialValues=gye;_e.validateCredentialObjectKeys=mye;_e.validateCredentialKeyList=yye;_e.mapOAuthMissingFieldsForAgent=Eye;_e.validateOAuthAuthenticationAndCredentialInputs=Iye;var Xt=si(),Qme=uu();_e.OAUTH_CONFIG_CREDENTIAL_KEYS=["auth_url","authUrl","token_url","tokenUrl","token_uri","scopes","scope","grant_type","grantType","oauthClientMode","client_id","clientId","client_secret","clientSecret","tokenAuthMethod","tokenContentType","usePKCE","extraHeaders","extraBodyParams"];var zm=["host","port","database","path","homeDirectory"],m$=["type","oauthClientMode","grantType","authUrl","tokenUrl","scopes","clientId","clientSecret","tokenAuthMethod","tokenContentType","usePKCE","extraHeaders","extraBodyParams","resource","protocol",...zm],Tme=new Set(m$),Dme="type, oauthClientMode, grantType, authUrl, tokenUrl, scopes, clientId, clientSecret, tokenAuthMethod, tokenContentType, usePKCE, extraHeaders, extraBodyParams, resource, protocol, host, port, database, path, homeDirectory",kme=["grantType","authUrl","tokenUrl","scopes","clientId","clientSecret"],Rme={grantType:["grantType","grant_type"],authUrl:["authUrl","auth_url"],tokenUrl:["tokenUrl","token_url","token_uri"],scopes:["scopes","scope"],clientId:["clientId","client_id"],clientSecret:["clientSecret","client_secret"]},YA=["tokenAuthMethod","tokenContentType","usePKCE","extraHeaders","extraBodyParams","resource"],Nme=new Set(kme);_e.OAUTH_TOKEN_CREDENTIAL_KEYS=["access_token","accessToken","refresh_token","refreshToken","expires_at","expiresAt","expires_in","expiresIn","expiry","token_type","tokenType"];var Ome=new Set(_e.OAUTH_TOKEN_CREDENTIAL_KEYS),xme=["access_token","refresh_token","api_key","bearer_token","token","client_id","client_secret","auth_url","token_url","scopes","grant_type","token_type","expires_at","expiry","expires_in","host","hostname","port","database","dbname","db","username","password"],h$=new Map(xme.map((t,e)=>[(0,Xt.normalizeCredentialKey)(t),e]));function Dc(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}function Rw({config:t,key:e,value:r}){let n={...t||{}};return Ft(r)?n[e]=r:delete n[e],Object.keys(n).length>0?n:void 0}function Ft(t){return(0,Xt.hasCredentialValue)(t)}function gr(t){if(Ft(t))return typeof t=="string"?t:String(t)}var Ume={"grant_type authorization_code or client_credentials":"authorization_code or client_credentials",client_id:"client ID",token_url:"token URL",auth_url:"authorization URL","client_secret or usePKCE":"client secret or PKCE","client_secret or oauth_cert + oauth_key":"client secret or OAuth certificate and key"};function Ts(...t){return t.find(e=>Ft(e))}function Mme(t){return t===!0||t==="true"}function Pme(t){let e=t||{},r=gr(Ts(e.grant_type,e.grantType)),n=r==="client_credentials"?"client_credentials":"authorization_code",i=r&&r!=="authorization_code"&&r!=="client_credentials",o=Ts(e.client_id,e.clientId),s=Ts(e.client_secret,e.clientSecret),a=Ts(e.auth_url,e.authUrl),c=Ts(e.token_url,e.tokenUrl,e.token_uri),l=Ts(e.oauth_cert,e.oauthCert),u=Ts(e.oauth_key,e.oauthKey),d=Ft(l)&&Ft(u)||e.hasServerSideCertificateCredentials===!0,A=e.hasServerSideClientSecret===!0,p=Ft(s)||A,h=Mme(Ts(e.usePKCE,e.usePkce)),f=[];return i&&f.push("grant_type authorization_code or client_credentials"),Ft(o)||f.push("client_id"),Ft(c)||f.push("token_url"),n==="client_credentials"?!p&&!d&&f.push("client_secret or oauth_cert + oauth_key"):(Ft(a)||f.push("auth_url"),!p&&!h&&f.push("client_secret or usePKCE")),{grantType:n,hasAccessToken:Ft(Ts(e.access_token,e.accessToken)),hasCertificateCredentials:d,isReadyToConnect:f.length===0,missingFields:f,usePKCE:h}}function Lme(t){return t.length<=1?t[0]||"":t.length===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[t.length-1]}`}function $me(t){if(!t||t.isReadyToConnect)return null;let e=t.missingFields.map(r=>Ume[r]||r);return`OAuth connection is disabled because ${Lme(e)} ${e.length===1?"is":"are"} missing.`}function Ds(t){if(!(!t||typeof t!="object"||Array.isArray(t)))return t}function Yo(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function VA(t){if(Array.isArray(t))return t.map(String).filter(Boolean);if(Ft(t)){if(typeof t=="string"){let e=t.trim().split(/[,\s]+/).map(r=>r.trim()).filter(Boolean);return e.length>0?e:void 0}return[String(t)]}}function WA(t){let e=gr(t);if(e==="authorization_code"||e==="client_credentials"||e==="password"||e==="service_account"||e==="custom")return e;if(e)return"custom"}function Ow(t){return t==="managed"||t==="dynamic"||t==="custom"?t:void 0}function Fme(t){let e=Object.entries(t).filter(([r])=>!Nme.has(r));return e.length>0?Object.fromEntries(e):void 0}function fu(t,e,r){for(let i of Rme[r])if(r==="scopes"&&Array.isArray(t[i])||Ft(t[i]))return t[i];let n=Ds(t.client);return r==="clientId"&&Ft(n?.id)?n.id:r==="clientSecret"&&Ft(n?.secret)?n.secret:e[r]}function Pr(t){if(!t)return;let e=t;if(e.type==="oauth2"){let r=Ds(e.config)||{},n=Fme(r)||{};return Dc({type:"oauth2",oauthClientMode:Ow(e.oauthClientMode),grantType:WA(fu(e,r,"grantType")),authUrl:gr(fu(e,r,"authUrl")),tokenUrl:gr(fu(e,r,"tokenUrl")),scopes:VA(fu(e,r,"scopes")),oauthAppId:gr(e.oauthAppId),clientId:gr(fu(e,r,"clientId")),clientSecret:gr(fu(e,r,"clientSecret")),config:Object.keys(n).length>0?n:void 0})}return e.type==="connection_string"?Dc({type:"connection_string",protocol:e.protocol,config:Ds(e.config??e.components)}):e.type==="api_key"||e.type==="basic_auth"||e.type==="none"?Dc({type:e.type,config:Ds(e.config)}):{type:"none"}}function jme({authentication:t,templateManaged:e,templateRegistrationUrl:r}){let n=Pr(t);return n?.type!=="oauth2"?"custom":n.oauthAppId?.startsWith("managed:")?"managed":n.oauthClientMode?n.oauthClientMode==="managed"&&!e?"custom":n.oauthClientMode:r?"dynamic":e&&!n.clientSecret?"managed":"custom"}function y$(t){let e=Pr(t);if(!e)return;let{config:r,scopes:n,oauthAppId:i,...o}=e,s={};return r&&typeof r=="object"&&Object.assign(s,r),Object.assign(s,o),Array.isArray(n)?s.scopes=n.join(" "):n!==void 0&&(s.scopes=n),s}function Nw(t,e=""){return t==null?t:Array.isArray(t)?t.map(r=>Nw(r)):typeof t=="object"?Object.fromEntries(Object.entries(t).map(([r,n])=>[r,Nw(n,r)])):e&&(0,Xt.isSensitiveCredentialKey)(e)?(0,Xt.maskCredentialValue)(e,t):t}function zme(t){let e=y$(t);if(e)return Nw(e)}function E$(t){return(0,Xt.isMaskedValue)(t)||(0,Xt.isFullyMaskedCredentialValue)(t)}function qme(t){let e=Ds(t);if(!e)return;let r={};for(let n of m$){if(!Yo(e,n))continue;let i=e[n];i!==void 0&&(r[n]=i)}return r}function Hme(t){return!t||t.type!=="oauth2"||!Ft(t.clientSecret)?t:{...t,clientSecret:Xt.FULLY_MASKED_CREDENTIAL_VALUE}}function Gme({incoming:t,existing:e}){if(!t||t.type!=="oauth2"||!E$(t.clientSecret))return t;let r=e?.type==="oauth2"?e.clientSecret:void 0;return{...t,clientSecret:r}}function Yme(t){if(t==="none"||t==="api_key"||t==="basic_auth"||t==="oauth2"||t==="connection_string")return t}function Vme(t){let e=zm.flatMap(r=>{if(!Yo(t,r))return[];let n=t[r];return Ft(n)?[[r,n]]:[]});return e.length>0?Object.fromEntries(e):void 0}function Wme(t){return zm.filter(e=>Yo(t,e))}function Jme(t){let e=zm.flatMap(r=>Yo(t,r)?[[r,t[r]]]:[]);return e.length>0?Object.fromEntries(e):void 0}function Zme(t){let e=new Set(["oauthClientMode","grantType","authUrl","tokenUrl","scopes","clientId","clientSecret",...YA]);return Object.keys(t).filter(r=>e.has(r))}function I$(t){if(t==null)return{};let e=Ds(t);if(!e)return{error:"auth must be an object."};let r=Yme(e.type);if(!r)return{error:"auth.type is required."};let n=Object.keys(e).filter(a=>!Tme.has(a));if(n.length>0)return{error:`Unknown auth field(s): ${n.join(", ")}. Accepted: ${Dme}.`};let i=Wme(e);if(r!=="connection_string"&&i.length>0)return{error:`Connection auth field(s) require auth.type 'connection_string': ${i.join(", ")}.`};let o=Zme(e);if(r!=="oauth2"&&o.length>0)return{error:`OAuth auth field(s) require auth.type 'oauth2': ${o.join(", ")}.`};if(r!=="oauth2"){let a=Vme(e);return{authentication:Dc({type:r,protocol:r==="connection_string"?e.protocol:void 0,config:a})}}let s={...Object.fromEntries(YA.flatMap(a=>{if(!Yo(e,a))return[];let c=e[a];return Ft(c)?[[a,c]]:[]}))};return{authentication:Dc({type:"oauth2",oauthClientMode:Ow(e.oauthClientMode),grantType:WA(e.grantType),authUrl:gr(e.authUrl),tokenUrl:gr(e.tokenUrl),scopes:VA(e.scopes),clientId:gr(e.clientId),clientSecret:gr(e.clientSecret),config:Object.keys(s).length>0?s:void 0})}}function kc(t){return t===""||t===null||t===void 0}function GA(t,e,r,n){if(Yo(e,r)){if(kc(e[r])){delete t[n];return}t[n]=gr(e[r])}}function Kme(t,e){if(Yo(e,"scopes")){if(kc(e.scopes)){delete t.scopes;return}t.scopes=VA(e.scopes)}}function Xme(t,e){if(Yo(e,"grantType")){if(kc(e.grantType)){delete t.grantType;return}t.grantType=WA(e.grantType)}}function eye(t,e,r){if(Yo(e,r)){if(kc(e[r])){delete t[r];return}t[r]=e[r]}}function tye(t,e){if(kc(e))return;let r=Ds(e);if(!r)return t;let n={...t||{}};for(let[i,o]of Object.entries(r))kc(o)?delete n[i]:n[i]=o;return Object.keys(n).length>0?n:void 0}function rye(t,e){let r=I$(e);if(r.error)return Pr(t)||{type:"none"};let n=r.authentication||{type:"none"},i=Ds(e)||{},o=Pr(t),s=o?.type===n.type;if(n.type!=="oauth2"){let d=Jme(i),A=s&&o?{...o}:{type:n.type};return n.type==="connection_string"&&Yo(i,"protocol")&&(kc(i.protocol)?delete A.protocol:A.protocol=i.protocol),d&&(A.config=tye(o?.config,d)),Pr(A)||{type:n.type}}let c={...s&&o?.type==="oauth2"?{...o,config:{...o.config||{}}}:{type:"oauth2",config:{}}};GA(c,i,"oauthClientMode","oauthClientMode"),Xme(c,i),GA(c,i,"authUrl","authUrl"),GA(c,i,"tokenUrl","tokenUrl"),Kme(c,i),GA(c,i,"clientId","clientId"),GA(c,i,"clientSecret","clientSecret");let u={...c.config||{}};for(let d of YA)eye(u,i,d);return c.config=Object.keys(u).length>0?u:void 0,Pr(c)||{type:"oauth2"}}function C$(t){let e=Pr(t);if(!e)return[];let r=new Set;for(let n of Object.keys(e.config||{}))r.add(n);return e.type==="oauth2"&&(e.grantType&&(r.add("grant_type"),r.add("grantType")),e.authUrl&&(r.add("auth_url"),r.add("authUrl")),e.tokenUrl&&(r.add("token_url"),r.add("tokenUrl"),r.add("token_uri")),e.scopes&&(r.add("scopes"),r.add("scope")),e.clientId&&(r.add("client_id"),r.add("clientId")),e.clientSecret&&(r.add("client_secret"),r.add("clientSecret"))),[...r]}function f$(t,e,r){if(r)for(let[n,i]of Object.entries(r))t.push({path:`${e}.${n}`,label:n,value:i})}function nye({authentication:t}){let e=Pr(t)||{type:"none"},r=[];if(e.type==="oauth2"){r.push({path:"oauth2.clientId",label:"clientId",value:e.clientId},{path:"oauth2.clientSecret",label:"clientSecret",value:e.clientSecret},{path:"oauth2.grantType",label:"grantType",value:e.grantType||"authorization_code"},{path:"oauth2.authUrl",label:"authUrl",value:e.authUrl},{path:"oauth2.tokenUrl",label:"tokenUrl",value:e.tokenUrl},{path:"oauth2.scopes",label:"scopes",value:e.scopes?.join(" ")});for(let n of YA)r.push({path:`oauth2.config.${n}`,label:n,value:e.config?.[n]});for(let[n,i]of Object.entries(e.config||{}))YA.includes(n)||r.push({path:`oauth2.config.${n}`,label:n,value:i})}else e.type==="connection_string"?(e.protocol&&r.push({path:"connection.protocol",label:"protocol",value:e.protocol}),f$(r,"connection.config",e.config)):f$(r,`${e.type}.config`,e.config);return{type:e.type,authentication:e,configFields:r,hiddenCredentialKeys:C$(e)}}function iye(t){let e=Pr(t);if(!e||e.type!=="connection_string")return[];let r={type:"field",field:{key:"username",aliases:["user"]}},n={type:"field",field:{key:"password"}};switch(e.protocol){case"sftp":return[r,{type:"oneOf",fields:[{key:"password"},{key:"privateKey"}]},{type:"field",field:{key:"passphrase"},optional:!0}];case"smb":return[r,n,{type:"field",field:{key:"domain"},optional:!0}];case"sqlserver":return[{type:"field",field:{key:"user",aliases:["username"]}},n];default:return[r,n]}}function g$(t,e){return(0,Xt.hasCredentialValue)(e[t.key])?!0:(t.aliases??[]).some(r=>(0,Xt.hasCredentialValue)(e[r]))}function b$(t,e){return t.optional?!0:t.type==="field"?g$(t.field,e):t.fields.some(r=>g$(r,e))}function oye(t,e){let r=e||{};return t.some(n=>!b$(n,r))}function sye({authentication:t,path:e,value:r}){let n=Pr(t)||{type:"none"};if(n.type==="oauth2"){if(e==="oauth2.grantType")return{...n,grantType:WA(r)};if(e==="oauth2.authUrl")return{...n,authUrl:gr(r)};if(e==="oauth2.tokenUrl")return{...n,tokenUrl:gr(r)};if(e==="oauth2.scopes")return{...n,scopes:VA(r)??[]};if(e==="oauth2.clientId")return{...n,clientId:gr(r)};if(e==="oauth2.clientSecret")return{...n,clientSecret:gr(r)};if(e.startsWith("oauth2.config.")){let o=e.slice(14);return{...n,config:Rw({config:n.config,key:o,value:r})}}}if(n.type==="connection_string"){if(e==="connection.protocol")return{...n,protocol:gr(r)};if(e.startsWith("connection.config.")){let o=e.slice(18);return{...n,config:Rw({config:n.config,key:o,value:r})}}}let i=`${n.type}.config.`;if(e.startsWith(i)){let o=e.slice(i.length);return{...n,config:Rw({config:n.config,key:o,value:r})}}return n}function S$({authentication:t,credentials:e}){if(Pr(t)?.type!=="oauth2"||!e||typeof e!="object"||Array.isArray(e))return null;let n=Object.keys(e).filter(i=>_e.OAUTH_CONFIG_CREDENTIAL_KEYS.includes(i));return n.length===0?null:`OAuth configuration keys belong in auth, not credentials: ${n.join(", ")}. Move OAuth client ID to auth.clientId, client secret to auth.clientSecret, auth URL to auth.authUrl, token URL to auth.tokenUrl, scopes to auth.scopes, grant type to auth.grantType, and token request settings to auth fields such as tokenAuthMethod/usePKCE/extraHeaders. Runtime OAuth access and refresh tokens are created by connect OAuth authorization.`}function w$(t){let e=Pr(t);return e?e.type==="oauth2"?Dc({...e.config||{},grant_type:e.grantType,auth_url:e.authUrl,token_url:e.tokenUrl,scopes:e.scopes?.join(" "),client_id:e.clientId,client_secret:e.clientSecret}):e.type==="connection_string"?e.config||{}:e.config||{}:{}}function aye(t){return Ome.has(t.trim())}function cye({credential:t,system:e}){return t?.authentication??e?.authentication??void 0}function lye({authentication:t,credentials:e}){let r=w$(t);return Pr(t)?.type==="oauth2"?{...e||{},...r}:{...r,...e||{}}}function uye({input:t,authentication:e,templateOAuth:r}){let n=Pr(e),i=n?.type==="oauth2"?n:void 0,o=i?.config||{},s=t||{},a=(...c)=>c.find(l=>l!=null);return Dc({grant_type:a(s.grantType,s.grant_type,i?.grantType,r?.grant_type)||"authorization_code",scopes:a(s.scopes,i?.scopes?.join(" "),r?.scopes),client_id:a(s.clientId,s.client_id,i?.clientId),client_secret:a(s.clientSecret,s.client_secret,i?.clientSecret),auth_url:a(s.authUrl,s.auth_url,i?.authUrl,r?.authUrl),token_url:a(s.tokenUrl,s.token_url,i?.tokenUrl,r?.tokenUrl),resource:a(s.resource,o.resource,r?.resource),tokenAuthMethod:a(s.tokenAuthMethod,o.tokenAuthMethod,r?.tokenAuthMethod),tokenContentType:a(s.tokenContentType,o.tokenContentType,r?.tokenContentType),usePKCE:a(s.usePKCE,o.usePKCE,r?.usePKCE),extraHeaders:a(s.extraHeaders,o.extraHeaders,r?.extraHeaders),extraBodyParams:a(s.extraBodyParams,o.extraBodyParams,r?.extraBodyParams)})}function xw(t){if(t==null)return"";if(typeof t=="string")return t;let e=JSON.stringify(t);return e===void 0?String(t):e}function dye(t,e={}){let r=new Set((e.hiddenKeys||[]).map(Xt.normalizeCredentialKey));return Object.entries(t).filter(([n])=>!r.has((0,Xt.normalizeCredentialKey)(n))).sort(([n],[i])=>{let o=h$.get((0,Xt.normalizeCredentialKey)(n))??Number.MAX_SAFE_INTEGER,s=h$.get((0,Xt.normalizeCredentialKey)(i))??Number.MAX_SAFE_INTEGER;if(o!==s)return o-s;let a=(0,Xt.isSensitiveCredentialKey)(n),c=(0,Xt.isSensitiveCredentialKey)(i);return a!==c?a?-1:1:n.localeCompare(i)}).map(([n,i])=>({key:n,value:xw(i),isReservedMasked:e.maskAll||(0,Xt.isSensitiveCredentialKey)(n)}))}function Aye(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e,xw(r)]))}function pye({hideOAuthFiles:t=!1,configKeys:e=[]}){return[...e,...t?["oauth_cert","oauth_key"]:[]]}function hye(t){return Ft(t.access_token)||Ft(t.refresh_token)}function fye(t){let e=t.expires_at??t.expiry;if(e){let n=(0,Qme.parseUTCDate)(e);if(n)return`Expires ${n.toLocaleString()}`}let r=t.expires_in;return Ft(r)?`Expires in ${r} seconds`:null}function gye(t){return!!(t&&typeof t=="object"&&!Array.isArray(t)&&Object.values(t).some(e=>Ft(e)))}function mye(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=(0,Xt.getInvalidCredentialKeyNames)(Object.keys(t));return e.length===0?null:`${Xt.CREDENTIAL_KEY_VALIDATION_DESCRIPTION} Invalid keys: ${e.join(", ")}`}function yye(t){let e=(0,Xt.getInvalidCredentialKeyNames)(t);return e.length===0?null:`${Xt.CREDENTIAL_KEY_VALIDATION_DESCRIPTION} Invalid keys: ${e.join(", ")}`}function Eye(t){let e={"grant_type authorization_code or client_credentials":"grantType authorization_code or client_credentials",client_id:"clientId",token_url:"tokenUrl",auth_url:"authUrl","client_secret or usePKCE":"clientSecret or usePKCE","client_secret or oauth_cert + oauth_key":"clientSecret or oauth_cert + oauth_key"};return t.map(r=>e[r]||r)}function Iye({authentication:t,credentials:e}){return S$({authentication:t,credentials:e})}});var q$=y(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.bundles=void 0;Vo.buildBundleAgentLaunch=Rye;Vo.getBundle=Nye;Vo.listBundles=Oye;var Cye="https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap",bye="<<(p) => { const value = p['sage_intacct_entity_id']; if (!value) return ''; const escaped = String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('\"', '&quot;').replaceAll(\"'\", '&apos;'); return `<locationid>${escaped}</locationid>`; }>>",_$="<<() => crypto.randomUUID()>>";function jt(t){return`<?xml version="1.0" encoding="UTF-8"?><request><control><senderid><<sage_intacct_sender_id>></senderid><password><<sage_intacct_sender_password>></password><controlid>${_$}</controlid><uniqueid>false</uniqueid><dtdversion>3.0</dtdversion></control><operation><authentication><login><userid><<sage_intacct_user_id>></userid><companyid><<sage_intacct_company_id>></companyid><password><<sage_intacct_user_password>></password>${bye}</login></authentication><content><function controlid="${_$}">${t}</function></content></operation></request>`}function ma({stepId:t,objectNameExpression:e,collectionName:r,mapExpression:n,includeTotalCount:i=!1}){let o=i?"Number(data && data.TOTALCOUNT ? data.TOTALCOUNT : rows.length)":"rows.length",s=n?`rows.map(${n})`:"rows";return`(sourceData) => { const response = sourceData.${t} && sourceData.${t}.data ? sourceData.${t}.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? \` Sage support ID: \${supportIds.join(', ')}.\` : ''; throw new Error(\`Sage Intacct request failed\${details.length ? \`: \${details.join('; ')}\` : '.'}\${suffix}\`); } const data = result ? result.DATA : undefined; const objectName = ${e}; const raw = data ? data[objectName] : undefined; const rows = (Array.isArray(raw) ? raw : (raw ? [raw] : [])).slice(0, (sourceData && sourceData.maxResults) ?? ${i?"1000":"200"}); return { total: ${o}, ${r}: ${s} }; }`}var ya=`const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;');`,B$="const toIntacctDate = (value) => { const match = String(value).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); if (!match) throw new Error('Dates must be in YYYY-MM-DD format.'); return match[2] + '/' + match[3] + '/' + match[1]; };",v$="const assertBalanced = (lines) => { const balance = lines.reduce((sum, line) => sum + (line.type === 'credit' ? -1 : 1) * Math.abs(Number(line.amount)), 0); if (Math.abs(balance) > 0.005) throw new Error('Journal lines must balance: debits minus credits is ' + balance.toFixed(2) + '.'); };",Q$=`const lineXml = (line) => { const amount = Number(line.amount); if (!Number.isFinite(amount) || amount <= 0) throw new Error('Every journal line needs a positive amount.'); const type = line.type === 'credit' ? -1 : line.type === 'debit' ? 1 : null; if (type === null) throw new Error("Every journal line needs type 'debit' or 'credit'."); if (!line.accountNo) throw new Error('Every journal line needs accountNo.'); let xml = '<GLENTRY><ACCOUNTNO>' + esc(line.accountNo) + '</ACCOUNTNO><TR_TYPE>' + type + '</TR_TYPE><TRX_AMOUNT>' + amount + '</TRX_AMOUNT>'; if (line.department) xml += '<DEPARTMENT>' + esc(line.department) + '</DEPARTMENT>'; if (line.location) xml += '<LOCATION>' + esc(line.location) + '</LOCATION>'; if (line.memo) xml += '<DESCRIPTION>' + esc(line.memo) + '</DESCRIPTION>'; return xml + '</GLENTRY>'; };`;function gu({stepId:t,objectName:e}){return`(sourceData) => { const response = sourceData.${t} && sourceData.${t}.data ? sourceData.${t}.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? \` Sage support ID: \${supportIds.join(', ')}.\` : ''; throw new Error(\`Sage Intacct request failed\${details.length ? \`: \${details.join('; ')}\` : '.'}\${suffix}\`); } const data = result ? result.DATA : undefined; const raw = data ? (data.${e} || data.${e.toLowerCase()}) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: record && record.RECORDNO ? Number(record.RECORDNO) : undefined, record }; }`}var XA="netsuite",Pw=100,KA=1e4,Zm=String.raw`<<(p) => { const url = String(p['netsuite_url'] || ''); if (!url || url.includes('{accountId}')) throw new Error('NetSuite is not connected yet: set the account ID so the system URL is https://<account>.suitetalk.api.netsuite.com/services/rest'); return url.replace(/\/+$/, ''); }>>`,Km={Authorization:"Bearer <<netsuite_access_token>>",Accept:"application/json"},Lw=String.raw`const has = (value) => value !== undefined && value !== null && value !== ''; const nsId = (value, name) => { const text = String(value ?? '').trim(); if (!/^-?\d+$/.test(text)) throw new Error(name + ' must be a NetSuite internal ID.'); return text; }; const nsDate = (value, name) => { const text = String(value ?? '').trim(); if (!/^\d{4}-\d{2}-\d{2}$/.test(text)) throw new Error(name + ' must be a date in YYYY-MM-DD format.'); return text; }; const ref = (value, name) => ({ id: nsId(value, name) });`,Sye=String.raw`const str = (value) => (value === undefined || value === null || value === '' ? null : String(value)); const num = (value) => (value === undefined || value === null || value === '' ? null : Number(value)); const bool = (value) => value === 'T' || value === true; const ids = (value) => (value === undefined || value === null || value === '' ? [] : String(value).split(',').map((part) => part.trim()).filter(Boolean)); const status = (value) => (value ? String(value).replace(/^[^:]*:\s*/, '') : null);`,T$=String.raw`const stripLinks = (value) => { if (Array.isArray(value)) return value.map(stripLinks); if (value && typeof value === 'object') { const result = {}; for (const [key, entry] of Object.entries(value)) { if (key !== 'links') result[key] = stripLinks(entry); } return result; } return value; };`,wye={type:"integer",minimum:1,maximum:KA,description:`Maximum number of records to return (max ${KA}). Defaults to ${Pw}. The result always reports the full match count in total, so use maxResults 1 to count. Prefer filters over large values: big results can exceed an AI client's tool output limit.`},_ye={type:"boolean",description:"Only return active records. Defaults to false (inactive records are included)."},Bye={type:"string",description:"Optional subsidiary internal ID to filter by."},vye={type:"string",description:"Optional earliest transaction date as YYYY-MM-DD."},Qye={type:"string",description:"Optional latest transaction date as YYYY-MM-DD."},Tye={type:"object",description:"Optional extra NetSuite REST field values merged into the record body as-is, e.g. custom fields like { custentity_region: 'EMEA' } or references like { terms: { id: '2' } }. Fields that this tool's own inputs set are rejected; use those inputs instead.",properties:{},additionalProperties:!0},JA=t=>({input:"activeOnly",kind:"flag",clause:`${t}.isinactive = 'F'`,schema:_ye}),ZA=t=>({input:"subsidiaryId",kind:"id",clause:`${t}.subsidiary = $`,schema:Bye}),Uw=[{input:"fromDate",kind:"date",clause:"t.trandate >= TO_DATE('$', 'YYYY-MM-DD')",schema:vye},{input:"toDate",kind:"date",clause:"t.trandate <= TO_DATE('$', 'YYYY-MM-DD')",schema:Qye}];function Dye(t){let e=`p[${JSON.stringify(t.input)}]`;if(t.kind==="flag")return`if (${e} === true || ${e} === 'true') where.push(${JSON.stringify(t.clause)});`;let[r,n]=t.clause.split("$");if(t.kind==="enum")return`if (has(${e})) { const allowed = ${JSON.stringify(t.values)}; if (!allowed.includes(String(${e}))) throw new Error(${JSON.stringify(`${t.input} must be one of: ${t.values.join(", ")}.`)}); where.push(${JSON.stringify(r)} + String(${e}) + ${JSON.stringify(n)}); }`;if(t.kind==="prefix")return`if (has(${e})) { const text = String(${e}).trim(); if (!/^[A-Za-z0-9._-]{1,40}$/.test(text)) throw new Error(${JSON.stringify(`${t.input} may only contain letters, digits, dots, underscores and hyphens.`)}); where.push(${JSON.stringify(r)} + text + ${JSON.stringify(n)}); }`;let i=t.kind==="id"?"nsId":"nsDate";return`if (has(${e})) where.push(${JSON.stringify(r)} + ${i}(${e}, ${JSON.stringify(t.input)}) + ${JSON.stringify(n)});`}function Ea({id:t,name:e,shortName:r,instruction:n,stepId:i,collection:o,select:s,baseWhere:a=[],orderBy:c,filters:l=[],properties:u={},required:d=[],mapRow:A}){let p=typeof s=="string"?JSON.stringify(s):s.js,h=`<<(p) => { ${Lw} const where = ${JSON.stringify(a)}; ${l.map(Dye).join(" ")} return JSON.stringify({ q: ${p} + (where.length ? ' WHERE ' + where.join(' AND ') : '') + ${JSON.stringify(` ORDER BY ${c}`)} }); }>>`;return{id:t,name:e,shortName:r,instruction:`${n} Rows are ordered by internal ID. If more than ${KA} rows match, narrow with the filters or page with the SuiteQL query tool (ORDER BY id, WHERE id > last id).`,inputSchema:{type:"object",properties:{...u,maxResults:wye,...Object.fromEntries(l.map(f=>[f.input,f.schema]))},...d.length>0?{required:d}:{},additionalProperties:!1},steps:[{id:i,instruction:"Run the SuiteQL query page by page.",config:{type:"request",systemId:XA,url:`${Zm}/query/v1/suiteql`,method:"POST",headers:{...Km,"Content-Type":"application/json",Prefer:"transient"},queryParams:{limit:"1000",offset:"<<offset>>"},body:h,pagination:{type:"offsetBased",pageSize:"1000",stopCondition:`(response, pageInfo, sourceData) => { if (sourceData && ["offset", "limit", "page"].some((key) => sourceData[key] !== undefined)) throw new Error("offset, limit and page are not inputs of this tool: use maxResults and the filters."); const page = response && response.data ? response.data : {}; const merged = pageInfo && pageInfo.mergedResult && Array.isArray(pageInfo.mergedResult.items) ? pageInfo.mergedResult.items.length : 0; const max = Math.min(Math.max(Math.floor(Number(sourceData && sourceData.maxResults)) || ${Pw}, 1), ${KA}); return page.hasMore !== true || merged >= max; }`}}}],outputTransform:`(sourceData) => { ${Sye} const raw = sourceData.${i} ? sourceData.${i}.data : undefined; const pages = Array.isArray(raw) ? raw : (raw ? [raw] : []); const items = pages.flatMap((page) => (page && Array.isArray(page.items) ? page.items : [])); const last = pages.length ? pages[pages.length - 1] : {}; const max = Math.min(Math.max(Math.floor(Number(sourceData.maxResults)) || ${Pw}, 1), ${KA}); const rows = items.slice(0, max).map(${A}).map((row) => Object.fromEntries(Object.entries(row).filter((entry) => entry[1] !== null))); const total = last && last.totalResults !== undefined ? Number(last.totalResults) : items.length; return { total, returned: rows.length, hasMore: total > rows.length, ${o}: rows }; }`}}function en({id:t,name:e,shortName:r,instruction:n,stepId:i,recordType:o,mode:s,properties:a,required:c,body:l,replaceSublist:u}){let d=[...new Set(Array.from(l.matchAll(/record\.([A-Za-z0-9_]+)\s*=/g)).map(p=>p[1]))],A=s==="create"?`/record/v1/${o}`:`/record/v1/${o}/<<(p) => { ${Lw} return nsId(p.internalId, 'internalId'); }>>`;return{id:t,name:e,shortName:r,instruction:n,inputSchema:{type:"object",properties:{...s==="update"?{internalId:{type:"string",description:`Internal ID of the ${o} to update.`}}:{},...a,fields:Tye},required:s==="update"?["internalId",...c]:c,additionalProperties:!1},steps:[{id:i,instruction:`${s==="create"?"Create":"Update"} the ${o} record.`,modify:!0,config:{type:"request",systemId:XA,url:`${Zm}${A}`,method:s==="create"?"POST":"PATCH",headers:{...Km,"Content-Type":"application/json","X-NetSuite-idempotency-key":"<<() => crypto.randomUUID()>>"},...u?{queryParams:{replace:`<<(p) => (Array.isArray(p[${JSON.stringify(u.input)}]) && p[${JSON.stringify(u.input)}].length > 0 ? ${JSON.stringify(u.sublist)} : undefined)>>`}}:{},body:`<<(p) => { ${Lw} const record = {}; ${l} if (p.fields && typeof p.fields === 'object' && !Array.isArray(p.fields)) { const managed = ${JSON.stringify(d)}; const reserved = Object.keys(p.fields).filter((key) => managed.includes(key)); if (reserved.length > 0) throw new Error('fields may not set ' + reserved.join(', ') + ': use this tool\\'s own inputs for them.'); Object.assign(record, p.fields); } if (Object.keys(record).length === 0) throw new Error('Provide at least one field to ${s}.'); return JSON.stringify(record); }>>`,captureHttpResponse:!0}}],outputTransform:s==="create"?`(sourceData) => { const step = sourceData.${i} || {}; const location = step.http && step.http.headers ? String(step.http.headers.location || '') : ''; const match = location.match(/\\/record\\/v1\\/[^/]+\\/([^/?#]+)/); if (!match) throw new Error('NetSuite did not return the location of the new ${o}.'); return { id: decodeURIComponent(match[1]), recordType: '${o}' }; }`:`(sourceData) => ({ id: String(sourceData.internalId).trim(), recordType: '${o}', updated: true })`}}var D$=String.raw`const lines = Array.isArray(p.lines) ? p.lines : []; let balance = 0; const items = lines.map((line, index) => { const amount = Number(line && line.amount); if (!Number.isFinite(amount) || amount <= 0) throw new Error('lines[' + index + '].amount must be a positive number.'); if (line.type !== 'debit' && line.type !== 'credit') throw new Error("lines[" + index + "].type must be 'debit' or 'credit'."); balance += line.type === 'debit' ? amount : -amount; const item = { account: ref(line.accountId, 'lines[' + index + '].accountId') }; item[line.type] = amount; if (has(line.memo)) item.memo = String(line.memo); if (has(line.departmentId)) item.department = ref(line.departmentId, 'lines[' + index + '].departmentId'); if (has(line.classId)) item.class = ref(line.classId, 'lines[' + index + '].classId'); if (has(line.locationId)) item.location = ref(line.locationId, 'lines[' + index + '].locationId'); if (has(line.entityId)) item.entity = ref(line.entityId, 'lines[' + index + '].entityId'); return item; }); if (lines.length > 0 && Math.abs(balance) > 0.005) throw new Error('Journal lines must balance: debits minus credits is ' + balance.toFixed(2) + '.'); if (items.length > 0) record.line = { items };`,k$=String.raw`if (has(p.subsidiaryId)) record.subsidiary = ref(p.subsidiaryId, 'subsidiaryId'); if (has(p.date)) record.tranDate = nsDate(p.date, 'date'); if (has(p.memo)) record.memo = String(p.memo); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.externalId)) record.externalId = String(p.externalId);`,R$={type:"object",properties:{accountId:{type:"string",description:"GL account internal ID."},type:{type:"string",enum:["debit","credit"]},amount:{type:"number",description:"Positive amount."},memo:{type:"string",description:"Optional line memo."},departmentId:{type:"string",description:"Optional department internal ID."},classId:{type:"string",description:"Optional class internal ID."},locationId:{type:"string",description:"Optional location internal ID."},entityId:{type:"string",description:"Optional customer, vendor or employee internal ID for the line."}},required:["accountId","type","amount"],additionalProperties:!1},N$=t=>({subsidiaryId:{type:"string",description:t==="create"?"Subsidiary internal ID. Required in OneWorld accounts.":"Optional new subsidiary internal ID."},date:{type:"string",description:t==="create"?"Transaction date as YYYY-MM-DD.":"Optional new transaction date as YYYY-MM-DD."},memo:{type:"string",description:"Journal entry memo."},currencyId:{type:"string",description:"Optional currency internal ID."},externalId:{type:"string",description:"Optional external ID."}}),Hm=String.raw`if (p.isPerson === true || p.isPerson === 'true') record.isPerson = true; if (p.isPerson === false || p.isPerson === 'false') record.isPerson = false; if (has(p.entityId)) record.entityId = String(p.entityId); if (has(p.companyName)) record.companyName = String(p.companyName); if (has(p.firstName)) record.firstName = String(p.firstName); if (has(p.lastName)) record.lastName = String(p.lastName); if (has(p.subsidiaryId)) record.subsidiary = ref(p.subsidiaryId, 'subsidiaryId'); if (has(p.email)) record.email = String(p.email); if (has(p.phone)) record.phone = String(p.phone); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.externalId)) record.externalId = String(p.externalId); if (p.isInactive === true || p.isInactive === 'true') record.isInactive = true; if (p.isInactive === false || p.isInactive === 'false') record.isInactive = false;`;function Gm(t){return{companyName:{type:"string",description:`Company name of the ${t}.`},isPerson:{type:"boolean",description:`True when the ${t} is an individual; then set firstName and lastName.`},firstName:{type:"string",description:"First name for an individual."},lastName:{type:"string",description:"Last name for an individual."},entityId:{type:"string",description:`${t==="customer"?"Customer":"Vendor"} ID. Omit when auto-numbering assigns it.`},subsidiaryId:{type:"string",description:"Primary subsidiary internal ID. Required on create in OneWorld accounts."},email:{type:"string",description:"Email address."},phone:{type:"string",description:"Phone number."},currencyId:{type:"string",description:"Primary currency internal ID."},externalId:{type:"string",description:"Optional external ID."}}}var Ym={isInactive:{type:"boolean",description:"Set true to inactivate, false to reactivate."}},Vm=String.raw`if (Array.isArray(p.subsidiaryIds) && p.subsidiaryIds.length > 0) record.subsidiary = { items: p.subsidiaryIds.map((value, index) => ref(value, 'subsidiaryIds[' + index + ']')) }; if (p.includeChildren === true || p.includeChildren === 'true') record.includeChildren = true; if (p.includeChildren === false || p.includeChildren === 'false') record.includeChildren = false;`,j$={subsidiaryIds:{type:"array",items:{type:"string"},description:"Subsidiary internal IDs the record is available in. On update the list replaces the current subsidiaries."},includeChildren:{type:"boolean",description:"Also make the record available to child subsidiaries."}},$w=["AcctPay","AcctRec","Bank","COGS","CredCard","DeferExpense","DeferRevenue","Equity","Expense","FixedAsset","Income","LongTermLiab","NonPosting","OthAsset","OthCurrAsset","OthCurrLiab","OthExpense","OthIncome","Stat","UnbilledRec"],O$=String.raw`if (has(p.acctNumber)) record.acctNumber = String(p.acctNumber); if (has(p.acctName)) record.acctName = String(p.acctName); if (has(p.acctType)) record.acctType = { id: String(p.acctType) }; if (has(p.parentId)) record.parent = ref(p.parentId, 'parentId'); if (has(p.description)) record.description = String(p.description); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.externalId)) record.externalId = String(p.externalId); if (p.isInactive === true || p.isInactive === 'true') record.isInactive = true; if (p.isInactive === false || p.isInactive === 'false') record.isInactive = false;`,x$={acctNumber:{type:"string",description:"Account number."},acctName:{type:"string",description:"Account name."},acctType:{type:"string",enum:$w,description:"NetSuite account type."},parentId:{type:"string",description:"Optional parent account internal ID."},description:{type:"string",description:"Optional description."},currencyId:{type:"string",description:"Optional currency internal ID (bank and credit card accounts)."},externalId:{type:"string",description:"Optional external ID."},...j$},U$=String.raw`if (has(p.name)) record.name = String(p.name); if (has(p.parentId)) record.parent = ref(p.parentId, 'parentId'); if (has(p.externalId)) record.externalId = String(p.externalId); if (p.isInactive === true || p.isInactive === 'true') record.isInactive = true; if (p.isInactive === false || p.isInactive === 'false') record.isInactive = false;`,M$={name:{type:"string",description:"Department name."},parentId:{type:"string",description:"Optional parent department internal ID."},externalId:{type:"string",description:"Optional external ID."},...j$},Wm=t=>String.raw`if (has(p.${t})) record.entity = ref(p.${t}, '${t}'); if (has(p.subsidiaryId)) record.subsidiary = ref(p.subsidiaryId, 'subsidiaryId'); if (has(p.date)) record.tranDate = nsDate(p.date, 'date'); if (has(p.dueDate)) record.dueDate = nsDate(p.dueDate, 'dueDate'); if (has(p.memo)) record.memo = String(p.memo); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.termsId)) record.terms = ref(p.termsId, 'termsId'); if (has(p.departmentId)) record.department = ref(p.departmentId, 'departmentId'); if (has(p.classId)) record.class = ref(p.classId, 'classId'); if (has(p.locationId)) record.location = ref(p.locationId, 'locationId'); if (has(p.externalId)) record.externalId = String(p.externalId);`,Jm=t=>({subsidiaryId:{type:"string",description:t==="create"?"Optional subsidiary internal ID; defaults to the entity's subsidiary.":"Optional new subsidiary internal ID."},date:{type:"string",description:t==="create"?"Transaction date as YYYY-MM-DD.":"Optional new transaction date as YYYY-MM-DD."},dueDate:{type:"string",description:"Optional due date as YYYY-MM-DD."},memo:{type:"string",description:"Optional memo."},currencyId:{type:"string",description:"Optional currency internal ID."},termsId:{type:"string",description:"Optional payment terms internal ID."},departmentId:{type:"string",description:"Optional header department internal ID."},classId:{type:"string",description:"Optional header class internal ID."},locationId:{type:"string",description:"Optional header location internal ID."},externalId:{type:"string",description:"Optional external ID."}}),z$=String.raw`if (has(line.departmentId)) item.department = ref(line.departmentId, 'lines[' + index + '].departmentId'); if (has(line.classId)) item.class = ref(line.classId, 'lines[' + index + '].classId'); if (has(line.locationId)) item.location = ref(line.locationId, 'lines[' + index + '].locationId');`,P$=String.raw`if (Array.isArray(p.lines) && p.lines.length > 0) record.item = { items: p.lines.map((line, index) => { const item = { item: ref(line && line.itemId, 'lines[' + index + '].itemId') }; if (has(line.quantity)) { const quantity = Number(line.quantity); if (!Number.isFinite(quantity)) throw new Error('lines[' + index + '].quantity must be a number.'); item.quantity = quantity; } if (has(line.rate)) { const rate = Number(line.rate); if (!Number.isFinite(rate)) throw new Error('lines[' + index + '].rate must be a number.'); item.rate = rate; } if (has(line.amount)) { const amount = Number(line.amount); if (!Number.isFinite(amount)) throw new Error('lines[' + index + '].amount must be a number.'); item.amount = amount; } if (has(line.description)) item.description = String(line.description); if (has(line.taxCodeId)) item.taxCode = ref(line.taxCodeId, 'lines[' + index + '].taxCodeId'); ${z$} return item; }) };`,L$={type:"object",properties:{itemId:{type:"string",description:"Item internal ID."},quantity:{type:"number",description:"Optional quantity. Defaults to 1."},rate:{type:"number",description:"Optional unit price; defaults to the item price."},amount:{type:"number",description:"Optional line amount."},description:{type:"string",description:"Optional line description."},taxCodeId:{type:"string",description:"Optional tax code internal ID."},departmentId:{type:"string",description:"Optional department internal ID."},classId:{type:"string",description:"Optional class internal ID. Some accounts ignore line classes on invoices; check the saved record."},locationId:{type:"string",description:"Optional location internal ID."}},required:["itemId"],additionalProperties:!1},$$=String.raw`if (Array.isArray(p.lines) && p.lines.length > 0) record.expense = { items: p.lines.map((line, index) => { const amount = Number(line && line.amount); if (!Number.isFinite(amount) || amount <= 0) throw new Error('lines[' + index + '].amount must be a positive number.'); const item = { account: ref(line.accountId, 'lines[' + index + '].accountId'), amount }; if (has(line.memo)) item.memo = String(line.memo); ${z$} return item; }) };`,F$={type:"object",properties:{accountId:{type:"string",description:"Expense account internal ID."},amount:{type:"number",description:"Positive amount."},memo:{type:"string",description:"Optional line memo."},departmentId:{type:"string",description:"Optional department internal ID."},classId:{type:"string",description:"Optional class internal ID."},locationId:{type:"string",description:"Optional location internal ID."}},required:["accountId","amount"],additionalProperties:!1},Rc="Re-running this tool creates another record; it is not idempotent.",kye=[Ea({id:"netsuite-list-accounts",name:"List NetSuite chart of accounts",shortName:"Chart of accounts",instruction:"Lists general ledger accounts (the chart of accounts) from NetSuite with number, name, type, parent and subsidiaries. Useful for validating an imported chart of accounts.",stepId:"queryAccounts",collection:"accounts",select:"SELECT a.id, a.acctnumber, a.accountsearchdisplaynamecopy AS name, a.fullname, a.accttype, a.parent, a.subsidiary, cur.symbol AS currency, a.description, a.issummary, a.isinactive FROM account a LEFT JOIN currency cur ON cur.id = a.currency",orderBy:"a.id",filters:[JA("a"),{input:"accountType",kind:"enum",values:$w,clause:"a.accttype = '$'",schema:{type:"string",enum:$w,description:"Only accounts of this NetSuite account type, e.g. Bank or Expense."}},{input:"numberPrefix",kind:"prefix",clause:"a.acctnumber LIKE '$%'",schema:{type:"string",description:"Only accounts whose number starts with this value, e.g. 1000 or 60."}}],mapRow:"(row) => ({ id: row.id, number: str(row.acctnumber), name: str(row.name), fullName: str(row.fullname), type: str(row.accttype), parentId: str(row.parent), subsidiaryIds: ids(row.subsidiary), currency: str(row.currency), description: str(row.description), isSummary: bool(row.issummary), isInactive: bool(row.isinactive) })"}),Ea({id:"netsuite-list-customers",name:"List NetSuite customers",shortName:"Customers",instruction:"Lists customer records from NetSuite with subsidiary, currency and open balance. Useful for verifying migrated AR master data.",stepId:"queryCustomers",collection:"customers",select:"SELECT c.id, c.entityid, c.companyname, c.isperson, c.firstname, c.lastname, c.email, c.phone, c.subsidiary, BUILTIN.DF(c.subsidiary) AS subsidiaryname, cur.symbol AS currency, c.balancesearch, c.overduebalancesearch, c.isinactive, TO_CHAR(c.datecreated, 'YYYY-MM-DD') AS datecreated, TO_CHAR(c.lastmodifieddate, 'YYYY-MM-DD') AS lastmodified FROM customer c LEFT JOIN currency cur ON cur.id = c.currency",orderBy:"c.id",filters:[JA("c"),ZA("c")],mapRow:"(row) => ({ id: row.id, entityId: str(row.entityid), companyName: str(row.companyname), isPerson: bool(row.isperson), firstName: str(row.firstname), lastName: str(row.lastname), email: str(row.email), phone: str(row.phone), subsidiaryId: str(row.subsidiary), subsidiary: str(row.subsidiaryname), currency: str(row.currency), balance: num(row.balancesearch), overdueBalance: num(row.overduebalancesearch), isInactive: bool(row.isinactive), createdOn: str(row.datecreated), modifiedOn: str(row.lastmodified) })"}),Ea({id:"netsuite-list-vendors",name:"List NetSuite vendors",shortName:"Vendors",instruction:"Lists vendor records from NetSuite with subsidiary, currency and balance. Useful for verifying migrated AP master data.",stepId:"queryVendors",collection:"vendors",select:"SELECT v.id, v.entityid, v.companyname, v.isperson, v.firstname, v.lastname, v.email, v.phone, v.subsidiary, BUILTIN.DF(v.subsidiary) AS subsidiaryname, cur.symbol AS currency, v.balance, v.isinactive, TO_CHAR(v.datecreated, 'YYYY-MM-DD') AS datecreated, TO_CHAR(v.lastmodifieddate, 'YYYY-MM-DD') AS lastmodified FROM vendor v LEFT JOIN currency cur ON cur.id = v.currency",orderBy:"v.id",filters:[JA("v"),ZA("v")],mapRow:"(row) => ({ id: row.id, entityId: str(row.entityid), companyName: str(row.companyname), isPerson: bool(row.isperson), firstName: str(row.firstname), lastName: str(row.lastname), email: str(row.email), phone: str(row.phone), subsidiaryId: str(row.subsidiary), subsidiary: str(row.subsidiaryname), currency: str(row.currency), balance: num(row.balance), isInactive: bool(row.isinactive), createdOn: str(row.datecreated), modifiedOn: str(row.lastmodified) })"}),Ea({id:"netsuite-list-journal-entries",name:"List NetSuite journal entries",shortName:"Journal entries",instruction:"Lists journal entry lines from NetSuite, one row per GL line and accounting book with journal, date, period, account, debit, credit and dimensions. Useful for verifying opening balances and postings at cutover.",stepId:"queryJournalLines",collection:"journalLines",select:"SELECT t.id AS journalid, t.tranid, TO_CHAR(t.trandate, 'YYYY-MM-DD') AS trandate, BUILTIN.DF(t.postingperiod) AS period, t.subsidiary, BUILTIN.DF(t.status) AS status, t.posting, t.memo AS journalmemo, cur.symbol AS currency, tl.id AS lineid, tal.accountingbook, tal.account, a.acctnumber, a.accountsearchdisplaynamecopy AS accountname, tal.debit, tal.credit, tl.memo, tl.department, tl.class, tl.location, tl.entity FROM transaction t JOIN transactionline tl ON tl.transaction = t.id JOIN transactionaccountingline tal ON tal.transaction = tl.transaction AND tal.transactionline = tl.id JOIN account a ON a.id = tal.account LEFT JOIN currency cur ON cur.id = t.currency",baseWhere:["t.type = 'Journal'"],orderBy:"t.id, tl.id, tal.accountingbook",filters:[...Uw,ZA("t")],mapRow:"(row) => ({ journalId: row.journalid, tranId: str(row.tranid), date: str(row.trandate), period: str(row.period), subsidiaryId: str(row.subsidiary), status: status(row.status), posting: bool(row.posting), journalMemo: str(row.journalmemo), currency: str(row.currency), line: num(row.lineid), accountingBookId: str(row.accountingbook), accountId: str(row.account), accountNumber: str(row.acctnumber), accountName: str(row.accountname), debit: num(row.debit), credit: num(row.credit), memo: str(row.memo), departmentId: str(row.department), classId: str(row.class), locationId: str(row.location), entityId: str(row.entity) })"}),Ea({id:"netsuite-list-invoices",name:"List NetSuite invoices",shortName:"Invoices",instruction:"Lists customer invoices from NetSuite with customer, dates, status, total and amount due. Useful for verifying migrated open AR at go-live.",stepId:"queryInvoices",collection:"invoices",select:"SELECT t.id, t.tranid, t.entity, BUILTIN.DF(t.entity) AS customername, TO_CHAR(t.trandate, 'YYYY-MM-DD') AS trandate, TO_CHAR(t.duedate, 'YYYY-MM-DD') AS duedate, BUILTIN.DF(t.status) AS status, cur.symbol AS currency, t.foreigntotal, t.foreignamountunpaid, t.subsidiary, t.memo FROM transaction t LEFT JOIN currency cur ON cur.id = t.currency",baseWhere:["t.type = 'CustInvc'"],orderBy:"t.id",filters:[...Uw,ZA("t"),{input:"openOnly",kind:"flag",clause:"t.status = 'A'",schema:{type:"boolean",description:"Only return open (unpaid) invoices."}}],mapRow:"(row) => ({ id: row.id, tranId: str(row.tranid), customerId: str(row.entity), customer: str(row.customername), date: str(row.trandate), dueDate: str(row.duedate), status: status(row.status), currency: str(row.currency), total: num(row.foreigntotal), amountDue: num(row.foreignamountunpaid), subsidiaryId: str(row.subsidiary), memo: str(row.memo) })"}),Ea({id:"netsuite-list-vendor-bills",name:"List NetSuite vendor bills",shortName:"Vendor bills",instruction:"Lists vendor bills from NetSuite with vendor, dates, status, approval status, total and amount due. Useful for verifying migrated open AP at go-live.",stepId:"queryBills",collection:"bills",select:"SELECT t.id, t.tranid, t.entity, BUILTIN.DF(t.entity) AS vendorname, TO_CHAR(t.trandate, 'YYYY-MM-DD') AS trandate, TO_CHAR(t.duedate, 'YYYY-MM-DD') AS duedate, BUILTIN.DF(t.status) AS status, BUILTIN.DF(t.approvalstatus) AS approvalstatus, cur.symbol AS currency, t.foreigntotal, t.foreignamountunpaid, t.subsidiary, t.memo FROM transaction t LEFT JOIN currency cur ON cur.id = t.currency",baseWhere:["t.type = 'VendBill'"],orderBy:"t.id",filters:[...Uw,ZA("t"),{input:"openOnly",kind:"flag",clause:"t.status = 'A'",schema:{type:"boolean",description:"Only return open bills (approved and not fully paid)."}}],mapRow:"(row) => ({ id: row.id, referenceNo: str(row.tranid), vendorId: str(row.entity), vendor: str(row.vendorname), date: str(row.trandate), dueDate: str(row.duedate), status: status(row.status), approvalStatus: str(row.approvalstatus), currency: str(row.currency), total: row.foreigntotal === undefined ? null : Math.abs(Number(row.foreigntotal)), amountDue: num(row.foreignamountunpaid), subsidiaryId: str(row.subsidiary), memo: str(row.memo) })"}),Ea({id:"netsuite-list-dimensions",name:"List NetSuite departments, classes or locations",shortName:"Departments, classes, locations",instruction:"Lists department, class or location records from NetSuite with hierarchy and subsidiaries. Useful for validating the dimension setup after an implementation and for finding the internal IDs the write tools need.",stepId:"queryDimensions",collection:"records",properties:{dimension:{type:"string",enum:["department","class","location"],description:"Which dimension to list."}},required:["dimension"],select:{js:String.raw`'SELECT d.id, d.name, d.fullname, d.parent, d.subsidiary, d.includechildren, d.isinactive FROM ' + (() => { const table = { department: 'department', class: 'classification', location: 'location' }[String(p.dimension || '')]; if (!table) throw new Error("dimension must be 'department', 'class' or 'location'."); return table; })() + ' d'`},orderBy:"d.id",filters:[JA("d")],mapRow:"(row) => ({ id: row.id, name: str(row.name), fullName: str(row.fullname), parentId: str(row.parent), subsidiaryIds: ids(row.subsidiary), includeChildren: bool(row.includechildren), isInactive: bool(row.isinactive) })"}),Ea({id:"netsuite-list-subsidiaries",name:"List NetSuite subsidiaries",shortName:"Subsidiaries",instruction:"Lists subsidiaries from NetSuite with hierarchy, country, base currency and elimination flag. Most create tools need a subsidiary ID from this list in OneWorld accounts.",stepId:"querySubsidiaries",collection:"subsidiaries",select:"SELECT s.id, s.name, s.fullname, s.parent, s.country, cur.symbol AS currency, s.iselimination, s.isinactive FROM subsidiary s LEFT JOIN currency cur ON cur.id = s.currency",orderBy:"s.id",filters:[JA("s")],mapRow:"(row) => ({ id: row.id, name: str(row.name), fullName: str(row.fullname), parentId: str(row.parent), country: str(row.country), currency: str(row.currency), isElimination: bool(row.iselimination), isInactive: bool(row.isinactive) })"}),{id:"netsuite-suiteql-query",name:"Run a NetSuite SuiteQL query",shortName:"SuiteQL query",instruction:"Runs a read-only SuiteQL SELECT query against NetSuite, for any record type, join or aggregate outside the prebuilt lists (for example items, employees, transaction lines or custom records). The workhorse tool for migration validation. Returns up to 1000 rows in one call with the total row count and hasMore; values are strings as NetSuite returns them.",inputSchema:{type:"object",properties:{query:{type:"string",description:`SuiteQL SELECT statement, e.g. "SELECT id, itemid, displayname FROM item WHERE isinactive = 'F' ORDER BY id". Dates come back in the user's date format; use TO_CHAR(field, 'YYYY-MM-DD') for ISO dates and BUILTIN.DF(field) for display names. For more than 1000 rows, page by key: ORDER BY id and add WHERE id > <last id>. Common columns: account (id, acctnumber, accountsearchdisplaynamecopy as the name, fullname, accttype, isinactive; there is no acctname column), customer (id, entityid, companyname, email, subsidiary, balancesearch, isinactive), vendor (id, entityid, companyname, email, subsidiary, balance, isinactive), transaction (id, tranid, type, trandate, entity, status, foreigntotal, foreignamountunpaid, subsidiary). Alias tables and qualify columns: FROM transaction t ... t.subsidiary works, an unqualified subsidiary fails.`},maxResults:{type:"integer",minimum:1,maximum:1e3,description:"Maximum number of rows to return (max 1000). Defaults to 100."}},required:["query"],additionalProperties:!1},steps:[{id:"runSuiteQl",instruction:"Run the SuiteQL query.",config:{type:"request",systemId:XA,url:`${Zm}/query/v1/suiteql`,method:"POST",headers:{...Km,"Content-Type":"application/json",Prefer:"transient"},queryParams:{limit:"<<(p) => Math.min(Math.max(Math.floor(Number(p.maxResults)) || 100, 2), 1000)>>",offset:"0"},body:String.raw`<<(p) => { const query = String(p.query || '').trim(); if (!/^(select|with)\b/i.test(query)) throw new Error('query must be a SuiteQL SELECT statement.'); return JSON.stringify({ q: query }); }>>`}}],outputTransform:`(sourceData) => { ${T$} const data = sourceData.runSuiteQl && sourceData.runSuiteQl.data ? sourceData.runSuiteQl.data : {}; const items = Array.isArray(data.items) ? data.items : []; const max = Math.min(Math.max(Math.floor(Number(sourceData.maxResults)) || 100, 1), 1000); const records = stripLinks(items.slice(0, max)); const total = data.totalResults !== undefined ? Number(data.totalResults) : items.length; return { total, returned: records.length, hasMore: total > records.length, records }; }`},{id:"netsuite-get-record",name:"Get a NetSuite record",shortName:"Get record",instruction:"Fetches one NetSuite record of any type by internal ID or external ID through the REST record API, including its sublists such as transaction lines. Useful for inspecting a record in full before or after a write.",inputSchema:{type:"object",properties:{recordType:{type:"string",description:'REST record type, e.g. "customer", "vendor", "invoice", "vendorbill", "journalentry", "account", "department" or a custom record like "customrecord_x".'},internalId:{type:"string",description:"Internal ID of the record."},externalId:{type:"string",description:"External ID of the record, used when internalId is not set."},expandSubResources:{type:"boolean",description:"Include sublists and subrecords inline. Defaults to true."}},required:["recordType"],additionalProperties:!1},steps:[{id:"getRecord",instruction:"Fetch the record from the REST record API.",config:{type:"request",systemId:XA,url:`${Zm}/record/v1/<<(p) => { const type = String(p.recordType || '').trim().toLowerCase(); if (!/^[a-z][a-z0-9_]*$/.test(type)) throw new Error('recordType must contain only letters, numbers and underscores.'); return type; }>>/<<(p) => { if (p.internalId !== undefined && p.internalId !== null && p.internalId !== '') { const id = String(p.internalId).trim(); if (!/^-?\\d+$/.test(id)) throw new Error('internalId must be a NetSuite internal ID.'); return id; } if (p.externalId !== undefined && p.externalId !== null && p.externalId !== '') return 'eid:' + encodeURIComponent(String(p.externalId)); throw new Error('Provide internalId or externalId.'); }>>`,method:"GET",headers:Km,queryParams:{expandSubResources:"<<(p) => (p.expandSubResources === false || p.expandSubResources === 'false' ? 'false' : 'true')>>"}}}],outputTransform:`(sourceData) => { ${T$} const record = sourceData.getRecord ? sourceData.getRecord.data : undefined; if (!record || typeof record !== 'object') throw new Error('NetSuite returned no record.'); return { record: stripLinks(record) }; }`},en({id:"netsuite-create-journal-entry",name:"Create NetSuite journal entry",shortName:"Create journal entry",instruction:`Creates a journal entry in NetSuite through the REST record API. Debit and credit lines must balance. Returns the new internal ID. ${Rc}`,stepId:"createJournalEntry",recordType:"journalentry",mode:"create",properties:{...N$("create"),lines:{type:"array",description:"Journal lines. Debit and credit totals must balance.",items:R$}},required:["date","lines"],body:`${k$} if (!Array.isArray(p.lines) || p.lines.length < 2) throw new Error('lines must contain at least two journal lines.'); ${D$}`}),en({id:"netsuite-update-journal-entry",name:"Update NetSuite journal entry",shortName:"Update journal entry",instruction:"Updates an existing NetSuite journal entry by internal ID. Only the provided fields change. When lines are provided they replace all existing lines and must balance. Entries in closed periods refuse updates.",stepId:"updateJournalEntry",recordType:"journalentry",mode:"update",properties:{...N$("update"),lines:{type:"array",description:"Optional replacement lines. When set, they replace every existing line and must balance.",items:R$}},required:[],body:`${k$} if (Array.isArray(p.lines) && p.lines.length < 2) throw new Error('lines must contain at least two journal lines; omit lines to keep the current ones.'); ${D$}`,replaceSublist:{input:"lines",sublist:"line"}}),en({id:"netsuite-create-vendor",name:"Create NetSuite vendor",shortName:"Create vendor",instruction:`Creates a vendor record in NetSuite. OneWorld accounts need a subsidiaryId. Omit entityId when auto-numbering assigns it. ${Rc}`,stepId:"createVendor",recordType:"vendor",mode:"create",properties:Gm("vendor"),required:[],body:`if (!has(p.companyName) && !((p.isPerson === true || p.isPerson === 'true') && has(p.lastName))) throw new Error('Provide companyName, or isPerson with lastName.'); ${Hm}`}),en({id:"netsuite-update-vendor",name:"Update NetSuite vendor",shortName:"Update vendor",instruction:"Updates an existing NetSuite vendor by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it.",stepId:"updateVendor",recordType:"vendor",mode:"update",properties:{...Gm("vendor"),...Ym},required:[],body:Hm}),en({id:"netsuite-create-customer",name:"Create NetSuite customer",shortName:"Create customer",instruction:`Creates a customer record in NetSuite. OneWorld accounts need a subsidiaryId. Omit entityId when auto-numbering assigns it. ${Rc}`,stepId:"createCustomer",recordType:"customer",mode:"create",properties:Gm("customer"),required:[],body:`if (!has(p.companyName) && !((p.isPerson === true || p.isPerson === 'true') && has(p.lastName))) throw new Error('Provide companyName, or isPerson with lastName.'); ${Hm}`}),en({id:"netsuite-update-customer",name:"Update NetSuite customer",shortName:"Update customer",instruction:"Updates an existing NetSuite customer by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it.",stepId:"updateCustomer",recordType:"customer",mode:"update",properties:{...Gm("customer"),...Ym},required:[],body:Hm}),en({id:"netsuite-create-account",name:"Create NetSuite GL account",shortName:"Create GL account",instruction:`Creates a general ledger account in NetSuite's chart of accounts. ${Rc}`,stepId:"createAccount",recordType:"account",mode:"create",properties:x$,required:["acctName","acctType"],body:`if (!has(p.acctName) || !has(p.acctType)) throw new Error('acctName and acctType are required.'); ${O$} ${Vm}`}),en({id:"netsuite-update-account",name:"Update NetSuite GL account",shortName:"Update GL account",instruction:"Updates an existing NetSuite GL account by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it. Accounts with transactions may refuse a type change.",stepId:"updateAccount",recordType:"account",mode:"update",properties:{...x$,...Ym},required:[],body:`${O$} ${Vm}`}),en({id:"netsuite-create-invoice",name:"Create NetSuite invoice",shortName:"Create invoice",instruction:`Creates a customer invoice in NetSuite with item lines. Item, tax and posting rules of the account apply. ${Rc}`,stepId:"createInvoice",recordType:"invoice",mode:"create",properties:{customerId:{type:"string",description:"Customer internal ID."},...Jm("create"),lines:{type:"array",description:"Item lines.",items:L$}},required:["customerId","lines"],body:`if (!Array.isArray(p.lines) || p.lines.length === 0) throw new Error('lines must contain at least one item line.'); ${Wm("customerId")} ${P$}`}),en({id:"netsuite-update-invoice",name:"Update NetSuite invoice",shortName:"Update invoice",instruction:"Updates an existing NetSuite invoice by internal ID. Only the provided fields change. When lines are provided they replace all existing item lines. Paid invoices and closed periods may refuse updates.",stepId:"updateInvoice",recordType:"invoice",mode:"update",properties:{customerId:{type:"string",description:"Optional new customer internal ID."},...Jm("update"),lines:{type:"array",description:"Optional replacement item lines; they replace every existing item line.",items:L$}},required:[],body:`if (Array.isArray(p.lines) && p.lines.length === 0) throw new Error('lines must contain at least one item line; omit lines to keep the current ones.'); ${Wm("customerId")} ${P$}`,replaceSublist:{input:"lines",sublist:"item"}}),en({id:"netsuite-create-vendor-bill",name:"Create NetSuite vendor bill",shortName:"Create vendor bill",instruction:`Creates a vendor bill in NetSuite with expense lines. Approval routing of the account applies. ${Rc}`,stepId:"createVendorBill",recordType:"vendorbill",mode:"create",properties:{vendorId:{type:"string",description:"Vendor internal ID."},referenceNo:{type:"string",description:"Optional vendor invoice reference number."},...Jm("create"),lines:{type:"array",description:"Expense lines.",items:F$}},required:["vendorId","lines"],body:`if (!Array.isArray(p.lines) || p.lines.length === 0) throw new Error('lines must contain at least one expense line.'); ${Wm("vendorId")} if (has(p.referenceNo)) record.tranId = String(p.referenceNo); ${$$}`}),en({id:"netsuite-update-vendor-bill",name:"Update NetSuite vendor bill",shortName:"Update vendor bill",instruction:"Updates an existing NetSuite vendor bill by internal ID. Only the provided fields change. When lines are provided they replace all existing expense lines. Paid bills and closed periods may refuse updates.",stepId:"updateVendorBill",recordType:"vendorbill",mode:"update",properties:{vendorId:{type:"string",description:"Optional new vendor internal ID."},referenceNo:{type:"string",description:"Optional vendor invoice reference number."},...Jm("update"),lines:{type:"array",description:"Optional replacement expense lines; they replace every existing expense line.",items:F$}},required:[],body:`if (Array.isArray(p.lines) && p.lines.length === 0) throw new Error('lines must contain at least one expense line; omit lines to keep the current ones.'); ${Wm("vendorId")} if (has(p.referenceNo)) record.tranId = String(p.referenceNo); ${$$}`,replaceSublist:{input:"lines",sublist:"expense"}}),en({id:"netsuite-create-department",name:"Create NetSuite department",shortName:"Create department",instruction:`Creates a department in NetSuite. Without subsidiaryIds NetSuite assigns the parent subsidiary. ${Rc}`,stepId:"createDepartment",recordType:"department",mode:"create",properties:M$,required:["name"],body:`if (!has(p.name)) throw new Error('name is required.'); ${U$} ${Vm}`}),en({id:"netsuite-update-department",name:"Update NetSuite department",shortName:"Update department",instruction:"Updates an existing NetSuite department by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it.",stepId:"updateDepartment",recordType:"department",mode:"update",properties:{...M$,...Ym},required:[],body:`${U$} ${Vm}`})],Mw={sap_s4hana:{bundleId:"sap_s4hana",templateId:"sap_s4hana",systemId:"sap_s4hana",displayName:"SAP S/4HANA",description:"Read business partners, sales orders, products and purchase orders from SAP.",systemUrl:Cye,credentialHint:"Works instantly with SAP's demo data. Add your own key later for your live system.",requiredCredentialKeys:["api_key"],demoCredentials:{api_key:"K8reTgiKCCaqvAPWC4cOjqqiLdLE8dqz"},mcpServer:{name:"sap",displayName:"SAP S/4HANA",description:"Business partners, sales orders, products and purchase orders from SAP."},installMcpServer:!0,agentLaunch:{userPrompt:"I just installed the SAP S/4HANA bundle. What can I do with it?",nextSteps:"Your first reply must be short: SAP is connected to free demo data and works right now, so offer to run one tool immediately as proof. No credential collection is needed to start. If they want their own data: their own free key comes from https://api.sap.com (SAP Business Accelerator Hub), collected and saved directly with a connect field, never via the Connections page; the system URL can then be switched to their own SAP host. Do not list the installed tools, do not add tips or explain SAP concepts unless asked."},tools:[{id:"sap-list-business-partners",name:"List SAP business partners",shortName:"Business partners",instruction:"Lists business partners (customers, suppliers, contacts) from SAP S/4HANA. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "BusinessPartnerCategory eq '2'" for organizations.`},maxResults:{type:"integer",description:"Maximum number of business partners to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchBusinessPartners",instruction:"Fetch business partners, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_BUSINESS_PARTNER/A_BusinessPartner",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"BusinessPartner,BusinessPartnerFullName,BusinessPartnerCategory,BusinessPartnerGrouping,CreationDate"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchBusinessPartners?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, businessPartners: rows.map((r) => ({ id: r.BusinessPartner, name: r.BusinessPartnerFullName, category: r.BusinessPartnerCategory, grouping: r.BusinessPartnerGrouping, createdOn: d(r.CreationDate) })) }; }"},{id:"sap-list-sales-orders",name:"List SAP sales orders",shortName:"Sales orders",instruction:"Lists sales orders from SAP S/4HANA with their net amount, currency and sold-to party. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "SalesOrderType eq 'OR'" or "TotalNetAmount gt 1000".`},maxResults:{type:"integer",description:"Maximum number of sales orders to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchSalesOrders",instruction:"Fetch sales orders, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_SALES_ORDER_SRV/A_SalesOrder",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"SalesOrder,SalesOrderType,SoldToParty,TotalNetAmount,TransactionCurrency,SalesOrderDate,OverallSDProcessStatus"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchSalesOrders?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, salesOrders: rows.map((r) => ({ id: r.SalesOrder, type: r.SalesOrderType, soldToParty: r.SoldToParty, netAmount: Number(r.TotalNetAmount), currency: r.TransactionCurrency, orderDate: d(r.SalesOrderDate), status: r.OverallSDProcessStatus })) }; }"},{id:"sap-list-products",name:"List SAP products",shortName:"Products",instruction:"Lists products (materials) from SAP S/4HANA with their type, group and base unit. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "ProductType eq 'FERT'" for finished goods.`},maxResults:{type:"integer",description:"Maximum number of products to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchProducts",instruction:"Fetch products, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_PRODUCT_SRV/A_Product",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$expand:"to_Description",$select:"Product,ProductType,ProductGroup,BaseUnit,GrossWeight,WeightUnit,CreationDate,to_Description/Language,to_Description/ProductDescription"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const nameOf = (r) => { const list = r.to_Description?.results ?? []; const hit = list.find((x) => x.Language === 'EN') ?? list[0]; return hit?.ProductDescription; }; const rows = (sourceData.fetchProducts?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, products: rows.map((r) => ({ id: r.Product, name: nameOf(r), type: r.ProductType, group: r.ProductGroup, baseUnit: r.BaseUnit, grossWeight: Number(r.GrossWeight), weightUnit: r.WeightUnit, createdOn: d(r.CreationDate) })) }; }"},{id:"sap-list-purchase-orders",name:"List SAP purchase orders",shortName:"Purchase orders",instruction:"Lists purchase orders from SAP S/4HANA with their supplier, currency and creation date. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "PurchaseOrderType eq 'NB'" for standard orders.`},maxResults:{type:"integer",description:"Maximum number of purchase orders to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchPurchaseOrders",instruction:"Fetch purchase orders, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrder",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"PurchaseOrder,PurchaseOrderType,Supplier,PurchaseOrderDate,DocumentCurrency,CreatedByUser"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchPurchaseOrders?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, purchaseOrders: rows.map((r) => ({ id: r.PurchaseOrder, type: r.PurchaseOrderType, supplier: r.Supplier, orderDate: d(r.PurchaseOrderDate), currency: r.DocumentCurrency, createdBy: r.CreatedByUser })) }; }"},{id:"sap-list-gl-accounts",name:"List SAP chart of accounts",shortName:"Chart of accounts",instruction:"Lists general ledger accounts (the chart of accounts) from SAP S/4HANA. Supports an optional OData $filter, e.g. by ChartOfAccounts.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "ChartOfAccounts eq 'YCOA'" or "GLAccountType eq 'X'".`},maxResults:{type:"integer",description:"Maximum number of accounts to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchGLAccounts",instruction:"Fetch GL accounts, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_GLACCOUNTINCHARTOFACCOUNTS_SRV/A_GLAccountInChartOfAccounts",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:`<<(p) => p.filter ? "ChartOfAccounts ne '' and (" + p.filter + ")" : "ChartOfAccounts ne ''">>`,$expand:"to_Text",$select:"GLAccount,ChartOfAccounts,GLAccountType,GLAccountGroup,IsBalanceSheetAccount,AccountIsBlockedForPosting,to_Text/Language,to_Text/GLAccountName"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const nameOf = (r) => { const list = r.to_Text?.results ?? []; const hit = list.find((x) => x.Language === 'EN') ?? list[0]; return hit?.GLAccountName; }; const rows = (sourceData.fetchGLAccounts?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, accounts: rows.map((r) => ({ account: r.GLAccount, name: nameOf(r), chartOfAccounts: r.ChartOfAccounts, type: r.GLAccountType, group: r.GLAccountGroup, isBalanceSheet: r.IsBalanceSheetAccount, blockedForPosting: r.AccountIsBlockedForPosting })) }; }"},{id:"sap-list-billing-documents",name:"List SAP billing documents",shortName:"Billing documents",instruction:"Lists billing documents (invoices, credit memos) from SAP S/4HANA with amount, currency and sold-to party. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "BillingDocumentType eq 'F2'" or "TotalNetAmount gt 1000".`},maxResults:{type:"integer",description:"Maximum number of billing documents to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchBillingDocuments",instruction:"Fetch billing documents, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_BILLING_DOCUMENT_SRV/A_BillingDocument",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"BillingDocument,BillingDocumentType,SoldToParty,TotalNetAmount,TransactionCurrency,BillingDocumentDate"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchBillingDocuments?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, billingDocuments: rows.map((r) => ({ id: r.BillingDocument, type: r.BillingDocumentType, soldToParty: r.SoldToParty, netAmount: Number(r.TotalNetAmount), currency: r.TransactionCurrency, date: d(r.BillingDocumentDate) })) }; }"},{id:"sap-list-journal-entry-items",name:"List SAP journal entry line items",shortName:"Journal entries",instruction:"Lists journal entry line items (accounting document items) from SAP S/4HANA with company code, GL account, amount and posting date. Filter by CompanyCode, FiscalYear or PostingDate to keep results focused. Useful for verifying opening balances at cutover.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "CompanyCode eq '1010' and FiscalYear eq '2026'".`},maxResults:{type:"integer",description:"Maximum number of line items to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchJournalItems",instruction:"Fetch accounting document line items, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_OPLACCTGDOCITEMCUBE_SRV/A_OperationalAcctgDocItemCube",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"AccountingDocument,CompanyCode,FiscalYear,GLAccount,AmountInCompanyCodeCurrency,PostingDate"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchJournalItems?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, journalItems: rows.map((r) => ({ document: r.AccountingDocument, companyCode: r.CompanyCode, fiscalYear: r.FiscalYear, account: r.GLAccount, amount: Number(r.AmountInCompanyCodeCurrency), postingDate: d(r.PostingDate) })) }; }"},{id:"sap-query-odata",name:"Query any SAP OData service",shortName:"Query any service",instruction:"Queries any SAP S/4HANA OData service and entity set (for example API_PRODUCT_SRV/A_ProductDescription or API_SALES_ORDER_SRV/A_SalesOrderItem) with optional $select and $filter. The workhorse tool for data checks beyond the prebuilt lists.",inputSchema:{type:"object",properties:{servicePath:{type:"string",description:'Service and entity set in SERVICE/EntitySet form, e.g. "API_SALES_ORDER_SRV/A_SalesOrderItem".'},select:{type:"string",description:"Comma-separated OData $select field list. Omit for all fields."},filter:{type:"string",description:"Optional OData $filter expression."},maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 100."}},required:["servicePath"],additionalProperties:!0},steps:[{id:"queryService",instruction:"Query the requested OData service and entity set.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/<<servicePath>>",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$select:"<<select>>",$filter:"<<filter>>",$top:"<<pageSize>>",$skip:"<<offset>>"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 100; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const rows = (sourceData.queryService?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 100); return { total: rows.length, records: rows.map((r) => { const { __metadata, ...rest } = r; return rest; }) }; }"}]},sage100:{bundleId:"sage100",templateId:"sage100",systemId:"sage100",displayName:"Sage 100",description:"Connect on-premises Sage 100 through the superglue Secure Gateway, with a guided setup playbook and a connection test against the Business Object Interface.",systemUrl:"script://runner/vbs32",credentialHint:"Your assistant first helps you connect a Secure Gateway on your Sage 100 server, then collects your Sage company and user details.",requiredCredentialKeys:["sage_home","sage_company","sage_user","sage_password"],mcpServer:{name:"sage-100",displayName:"Sage 100",description:"Sage 100 Business Object Interface access through the Secure Gateway."},installMcpServer:!1,playbook:{id:"sage100-native-integration",name:"Sage 100 Native Integration (BOI)",whenToRun:"Use when connecting a Sage 100 installation to superglue, testing that connection, or building tools that read or write Sage 100 data through the Business Object Interface.",inputs:"A Sage 100 installation on a Windows machine the user can access; a superglue API key for the gateway; the Sage company code, a Sage user with module access, and the path to the MAS90\\Home directory; the business outcome once connected.",instructions:"First check /org/tunnels for a connected gateway with a runner target. If none is connected, guide the user step by step: download the Windows gateway from https://downloads.superglue.cloud/superglue-gateway-windows.exe onto the machine where Sage 100 and Workstation Setup are installed (the gateway must run there, ProvideX.Script is a local 32-bit COM class), create a config.yaml next to it with a tunnel_id, the server_url ending in /ws/tunnels (wss://api.superglue.cloud/ws/tunnels for hosted superglue), an API key from the API Keys page, and the line enable_script_runner: true, then run the executable. That flag is required: it opts the gateway into running Sage scripts (it is code execution on their machine, so it is off by default), and it is what registers the built-in runner target. No targets section is needed. If a tunnel is connected but has no runner target, the gateway is either missing enable_script_runner: true or is an outdated build; have the user add the flag and restart, or download the current gateway from the same URL. When the tunnel with the runner target appears, attach it to the Sage 100 connection with tools.writeConnection (tunnel with that tunnelId) and keep the URL script://runner/vbs32. Collect sage_home (full path to the MAS90\\Home directory, for example C:\\Sage\\Sage100\\MAS90\\Home, not the MAS90 directory itself), sage_company, sage_user and sage_password through the secure credential form. Then run the Test Sage 100 connection tool once and interpret the result: retVal 0 failures carry the Sage reason in sLastErrorMsg (wrong credentials, missing role access, wrong company code); COM error 0x80040154 means the gateway is not running on a machine with Sage 100 Workstation Setup; a no-license message means all Sage user seats are in use. For new capabilities, build tools whose steps use the script protocol with VBScript in the body: log on with SY_Session, set module context before touching data (nSetDate with YYYYMMDD dates, nSetModule, nLookupTask, nSetProgram), use _svc service objects for reads and _bus business objects for writes, and always release the session with nCleanup and DropObject so the license seat frees up. For reads, set each key segment with nSetKeyValue then nFind for a single record, or browse with nMoveFirst and nMoveNext, and read each field with nGetValue passing a variable that receives the value. To write a document that has lines, such as a sales order, get the header _bus object, set the header fields, get its oLines object, call nAddLine, set the line fields, then call nWrite on the header to commit the header and its lines together. A write fails with a lock error if the record is open in the Sage desktop or held by another session, so report the lock message instead of retrying. Each running script briefly consumes a Sage user seat. Ask for explicit approval before any script that writes to Sage, and warn that records open in the Sage desktop UI cause lock errors.",completionCriteria:"The gateway is connected, the installed Sage 100 system has the tunnel attached and credentials saved, and the connection test returned company data from Sage 100. Any additional requested capability works end to end, with writes explicitly approved before they ran."},agentLaunch:{userPrompt:"I just installed the Sage 100 integration. Help me connect my Sage 100 server.",nextSteps:"Your first reply must be short: one line confirming the Sage 100 integration and setup playbook are installed, then start the connection flow. Check /org/tunnels for a connected gateway with a runner target first. If none exists, walk the user through it one step at a time: download https://downloads.superglue.cloud/superglue-gateway-windows.exe onto the Windows machine where Sage 100 is installed and Workstation Setup has run, create a config.yaml next to it with tunnel_id, server_url (wss://api.superglue.cloud/ws/tunnels for hosted superglue), an API key from the API Keys page, and the line enable_script_runner: true, then run it. That flag is required: it opts the gateway into running scripts on their machine (off by default because it is code execution) and is what registers the runner target. No targets are needed in the config. If a tunnel is connected but has no runner target, the gateway is missing enable_script_runner: true or is an outdated build: have the user add the flag and restart, or download the current one from the same URL. Wait for the user to confirm, then verify the tunnel appears and attach it to the Sage 100 connection with tools.writeConnection tunnel, keeping the URL script://runner/vbs32. Use connect with the connection id and fields to save sage_home (full path to the MAS90\\Home directory, for example C:\\Sage\\Sage100\\MAS90\\Home, not MAS90 itself), sage_company (for example ABC for the demo company), sage_user and sage_password. Never send the user to the Connections page. Then run the Test Sage 100 connection tool once. If it fails, explain the specific cause in plain language before retrying. Mention that each test briefly uses one Sage user license seat. Do not list tools or add tips unless asked."},tools:[{id:"sage100-test-connection",name:"Test Sage 100 connection",shortName:"Connection test",instruction:"Logs on to Sage 100 through the Secure Gateway, opens the configured company, and reads the first customer record to verify the Business Object Interface end to end. Briefly consumes one Sage user license seat.",steps:[{id:"testConnection",instruction:"Run a VBScript through the gateway script runner that logs on via SY_Session, sets A/R module context, and reads the first customer.",config:{type:"request",systemId:"sage100",url:"<<sage100_url>>",method:"POST",body:["Option Explicit","On Error Resume Next","Dim oScript, oSS, oCust, retVal, custNo, custName, today",'Set oScript = CreateObject("ProvideX.Script")','FailOnErr "CREATE", " (Sage 100 Workstation Setup has not registered ProvideX.Script on this machine; the gateway must run on a prepared Sage 100 machine)"','oScript.Init "<<sage100_sage_home>>"','FailOnErr "INIT", " (sage_home must be the full path to the MAS90\\Home directory, not MAS90 itself)"','Set oSS = oScript.NewObject("SY_Session")','FailOnErr "SESSION", ""','retVal = oSS.nSetUser("<<sage100_sage_user>>", "<<sage100_sage_password>>")','FailOnErr "LOGON", ""',"If retVal = 0 Then",' WScript.Echo "LOGON FAILED: " & oSS.sLastErrorMsg'," WScript.Quit 1","End If",'retVal = oSS.nSetCompany("<<sage100_sage_company>>")','FailOnErr "COMPANY", ""',"If retVal = 0 Then",' WScript.Echo "COMPANY FAILED: " & oSS.sLastErrorMsg'," oSS.nCleanup"," oSS.DropObject"," WScript.Quit 1","End If",'today = Year(Date) & Right("0" & Month(Date), 2) & Right("0" & Day(Date), 2)','retVal = oSS.nSetDate("A/R", today)','FailOnErr "DATE", ""','retVal = oSS.nSetModule("A/R")','FailOnErr "MODULE", ""','retVal = oSS.nSetProgram(oSS.nLookupTask("AR_Customer_ui"))','FailOnErr "TASK", ""',"If retVal = 0 Then",' WScript.Echo "TASK FAILED: " & oSS.sLastErrorMsg'," oSS.nCleanup"," oSS.DropObject"," WScript.Quit 1","End If",'Set oCust = oScript.NewObject("AR_Customer_svc", oSS)','FailOnErr "CUSTOMER OBJECT", ""',"retVal = oCust.nMoveFirst()",'FailOnErr "READ", ""',"If retVal = 0 Then",' WScript.Echo "READ FAILED: " & oCust.sLastErrorMsg',"Else",' custNo = "" : custName = ""',' retVal = oCust.nGetValue("CustomerNo$", custNo)',' retVal = oCust.nGetValue("CustomerName$", custName)',' FailOnErr "READ VALUE", " (ByRef value marshalling failed)"',' WScript.Echo "CONNECTED - company <<sage100_sage_company>>, first customer: " & custNo & " / " & custName',"End If","oCust.DropObject","oSS.nCleanup","oSS.DropObject","If retVal = 0 Then WScript.Quit 1","","Sub FailOnErr(stage, hint)"," If Err.Number <> 0 Then",' WScript.Echo stage & " FAILED: [0x" & Hex(Err.Number) & "] " & Err.Description & hint'," WScript.Quit 1"," End If","End Sub"].join(`
113
+ ${t.slice(t.length-n)}`}function sge(t){return t instanceof Error?t.message:typeof t=="string"?t:typeof t=="object"&&t!==null&&"message"in t?String(t.message):String(t)}function age(t,e){if(!e||Object.keys(e).length===0)return{};let r=/file::([^,\s)}\]"']+)/g,n=typeof t=="string"?t:JSON.stringify(t||{}),i=[...new Set([...n.matchAll(r)].map(o=>{let s=o[1];return s.endsWith(".raw")?s=s.slice(0,-4):s.endsWith(".base64")?s=s.slice(0,-7):s.endsWith(".extracted")&&(s=s.slice(0,-10)),s}))];return Object.fromEntries(i.flatMap(o=>e[o]?[[o,e[o]]]:[]))}function cge(t){if(!t)return null;let e=t.indexOf(":");if(e===-1)return{source:"simpleicons",name:t};let r=t.substring(0,e),n=t.substring(e+1);return r!=="simpleicons"&&r!=="lucide"?{source:"simpleicons",name:t}:{source:r,name:n}}function lge(t){return t?typeof t=="string"?t.indexOf(":")!==-1?t:`simpleicons:${t}`:`${t.source}:${t.name}`:null}function NL(t){if(t.op==="remove"||t.value===void 0||typeof t.value!="string")return t;if(t.path==="/inputSchema"||t.path==="/outputSchema"||t.path.startsWith("/inputSchema/properties/")||t.path.startsWith("/outputSchema/properties/")||t.path.match(/^\/steps\/\d+\/config\/pagination$/)||t.path.match(/^\/steps\/\d+\/config\/headers$/)||t.path.match(/^\/steps\/\d+\/config\/queryParams$/))try{return{...t,value:JSON.parse(t.value)}}catch{return t}return t}function uge(t){return t.map(e=>NL(e))}function dge(t,e){t||(t=""),e||(e=""),/^(https?|postgres(ql)?|ftp(s)?|sftp|smb|file):\/\//i.test(t)||(t=`https://${t}`);let r=t.endsWith("/")?t.slice(0,-1):t,n=e.startsWith("/")?e.slice(1):e;return`${r}/${n}`}var Age=new Set(["data","stepResults","toolPayload","rawData","transformedData"]),pge=8e4;function hge(t,e=pge){if(t==null)return t;let r=t;if(typeof t=="string"){if(t.length<=e)return t;try{r=JSON.parse(t)}catch{return{_truncated:!0,_message:"String result too large to parse",_size:t.length}}}if(typeof r!="object")return r;let n=0,i=0,o=(s,a=0)=>{if(a>20||s===null||typeof s!="object")return s;if(Array.isArray(s))return s.map(l=>o(l,a+1));let c={};for(let[l,u]of Object.entries(s))if(Age.has(l)&&u!==null&&typeof u=="object"){let d=JSON.stringify(u);if(d.length>e){i+=d.length;try{let{jsonString:A,truncatedProps:p}=(0,hfe.default)(d,e);c[l]=JSON.parse(A),n+=p.length}catch{c[l]=u}}else c[l]=u}else c[l]=o(u,a+1);return c};try{if(JSON.stringify(r).length<=e)return r;let a=o(r);return n>0&&typeof a=="object"&&a!==null&&(a._note=`Result truncated: ${n} items omitted (original ${i} characters)`),a}catch{return{_truncated:!0,_message:"Result too large to display"}}}function fge(t){if(!t.steps)return[];let e=new Set;for(let r of t.steps)r.config&&(0,AL.isRequestConfig)(r.config)&&r.config.systemId&&e.add(r.config.systemId);return Array.from(e)}function Um(t,e,r=new WeakSet){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object")&&!r.has(t)){if(r.add(t),Array.isArray(t)){for(let n of t)Um(n,e,r);return}for(let n of Object.values(t))Um(n,e,r)}}function gge(t){let e=[];for(let r of t.matchAll(/<<([\s\S]*?)>>/g)){let n=r[1].trim();n&&e.push(n)}for(let r of t.matchAll(/{{\s*([^{}\s]+)\s*}}/g)){let n=r[1].trim();n&&e.push(n)}return e}function OL(t,e){let r=[];Um(t,r);let n=`${e}_`,i=new Set;for(let o of r)for(let s of gge(o)){if(!s.startsWith(n))continue;let a=s.slice(n.length);!a||a==="url"||!U.CREDENTIAL_KEY_PATTERN.test(a)||i.add(a)}return[...i]}var mge=/^\s*(async\s+)?(\([^)]*\)|[a-zA-Z_$][a-zA-Z0-9_$]*)\s*=>/,yge=new Set(["sg_auth_email","sg_auth_jwt"]);function Ege({config:t,systemId:e}){let r=[];Um(t,r);let n=e?`${e}_`:null,i=new Set;for(let l of r)for(let u of l.matchAll(/<<([\s\S]*?)>>/g)){let d=u[1].trim();d&&(n&&d.startsWith(n)||mge.test(d)||yge.has(d)||i.add(d))}if(i.size===0)return null;let o=[...i].map(l=>`<<${l}>>`).join(", "),s=`Unresolved placeholder${i.size===1?"":"s"} ${o}`;if(!n)return`${s}. Secret placeholders need systemId and the form <<systemId_secretName>>. Nothing was sent.`;let a=[...i].filter(l=>U.CREDENTIAL_KEY_PATTERN.test(l)).map(l=>`<<${n}${l}>>`),c=a.length>0?`Secret placeholders are namespaced by system: use ${a.join(", ")}.`:`Secret placeholders are namespaced by system as <<${n}secretName>>.`;return`${s}. ${c} Nothing was sent.`}function Ige(t){let e={};if(!t.steps)return e;for(let r of t.steps){if(!r.config||!(0,AL.isRequestConfig)(r.config)||!r.config.systemId)continue;let n=OL(r.config,r.config.systemId);if(n.length===0)continue;let i=new Set(e[r.config.systemId]||[]);for(let o of n)i.add(o);e[r.config.systemId]=[...i]}return e}function Cge(t){return t.replace(/([a-z])([A-Z])|([A-Z]{2,})([A-Z][a-z])/g,"$1$3 $2$4").replace(/[_-]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).replace(/\b(Id|Url|Api|Ui)\b/g,e=>e.toUpperCase())}});var LL=y(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.AGENT_CONTEXT_MEMORY_MESSAGE_ID_PREFIX=void 0;Pt.applyToolMutation=xL;Pt.mutateToolCallInMessages=Sge;Pt.buildStreamingAssistantMessage=UL;Pt.parseToolOutput=ML;Pt.parseAgentStreamEventLine=_ge;Pt.stopActiveTool=PL;Pt.appendContentToMessage=Bw;Pt.updateMessageWithData=hu;Pt.findAwaitingConfirmationToolCallIds=Bge;Pt.declineAwaitingConfirmationTools=vge;Pt.findAndResumeMessageWithTool=Qge;Pt.serializeMessageForPersistence=Dge;Pt.isTurnContextBlockMessage=vw;Pt.normalizeAgentSessionForkMessages=Rge;Pt.normalizeAgentSessionImportMessages=Nge;Pt.createAgentTranscriptState=Oge;Pt.applyAgentStreamChunk=xge;var bge=hn(),Lm=si();function xL(t,e){let r=e.frontendOutput!==void 0?e.frontendOutput:t.frontendOutput;return{...t,...e.input!==void 0?{input:e.input}:{},...e.result!==void 0?{result:e.result}:{},...e.status!==void 0?{status:e.status}:{},...e.startTime!==void 0?{startTime:e.startTime}:{},...e.endTime!==void 0?{endTime:e.endTime}:{},...e.error!==void 0?{error:e.error||void 0}:{},...r!==void 0?{frontendOutput:r}:{},...e.llmOutput!==void 0?{llmOutput:e.llmOutput}:{},...e.resultMetadata!==void 0?{resultMetadata:e.resultMetadata}:{},...e.confirmationState!==void 0?{confirmationState:e.confirmationState===null?void 0:e.confirmationState}:{},...e.confirmationData!==void 0?{confirmationData:e.confirmationData===null?void 0:e.confirmationData}:{}}}function Sge(t,e,r){return t.map(n=>{let i=!1,o=n.parts?.map(s=>s.type!=="tool"||!s.tool||s.tool.id!==e?s:(i=!0,{...s,tool:xL(s.tool,r)}));return i&&o?{...n,parts:o}:n})}function UL(t){return{id:t,content:"",role:"assistant",timestamp:new Date,parts:[{type:"content",content:"",id:"content-0"}],isStreaming:!0}}function wge(){return{status:"declined",endTime:new Date,confirmationState:"declined",confirmationData:{reason:"new_user_message",message:"Rejected: the user sent a new message instead of confirming this action. The proposed changes were NOT applied."}}}function ML(t){if(!t)return null;if(typeof t=="string")try{let e=JSON.parse(t);return e&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}return typeof t=="object"&&!Array.isArray(t)?t:null}function _ge(t){if(!t.startsWith("data: "))return null;try{let e=JSON.parse(t.slice(6));return e&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}}function PL(t){return t.status==="running"||t.status==="pending"||t.status==="awaiting_confirmation"?{...t,status:"stopped",endTime:new Date,confirmationState:void 0,confirmationData:void 0}:t}function Bw(t,e){if(!e)return t;let r=[...t.parts||[]],n=r[r.length-1];return n?.type==="content"?r[r.length-1]={...n,content:(n.content||"")+e}:r.push({type:"content",content:e,id:`content-${r.length}`}),{...t,parts:r,content:""}}function hu(t,e,r){if(t.id!==r.id)return t;switch(e.type){case"content":return Bw(t,e.content||"");case"tool_call_start":{let n=t.parts?.find(l=>l.type==="tool"&&l.tool?.id===e.toolCall.id)?.tool,i=e.toolCall.input??n?.input,o=e.executionMode==="confirm"?"awaiting_confirmation":i?"running":"pending",s={...n,id:e.toolCall.id,name:e.toolCall.name,input:i,status:o,startTime:n?.startTime||new Date,...n?.confirmationState!==void 0?{confirmationState:n.confirmationState}:{},...n?.confirmationData!==void 0?{confirmationData:n.confirmationData}:{}},a=[...t.parts||[]],c=a.findIndex(l=>l.type==="tool"&&l.tool?.id===e.toolCall.id);return c===-1?a.push({type:"tool",tool:s,id:`tool-${e.toolCall.id}`}):a[c]={...a[c],tool:s},{...t,parts:a,content:""}}case"tool_call_input":{let n=i=>i.id===e.toolCall.id&&e.toolCall.input!==void 0?{...i,input:e.toolCall.input}:i;return{...t,parts:t.parts?.map(i=>i.type==="tool"&&i.tool?{...i,tool:n(i.tool)}:i)}}case"run_command_effect":{let n=e.effect;if(n?.kind!=="visual"&&n?.kind!=="checklist"||typeof e.toolCallId!="string")return t;let i=o=>{if(o.id!==e.toolCallId)return o;let s=ML(o.frontendOutput)??{},a=(s.effects??[]).filter(c=>c.id!==n.id);return{...o,frontendOutput:{...s,effects:[...a,n]}}};return{...t,parts:t.parts?.map(o=>o.type==="tool"&&o.tool?{...o,tool:i(o.tool)}:o)}}case"tool_call_update":{let n=t.parts?.map(i=>i.type==="tool"&&i.tool?.id===e.toolCall.id?{...i,tool:{...i.tool,executionTraceId:e.toolCall.executionTraceId??i.tool.executionTraceId,status:i.tool.status==="pending"?"running":i.tool.status}}:i)||[];return{...t,parts:n}}case"tool_call_complete":{let n=t.parts?.find(h=>h.type==="tool"&&h.tool?.id===e.toolCall.id)?.tool,i=n?.status==="completed"||n?.status==="declined",o=e.toolCall.result!==void 0||e.toolCall.frontendOutput!==void 0||e.toolCall.status!==void 0||e.toolCall.confirmationState!==void 0||e.toolCall.confirmationData!==void 0;if(i&&!o)return t;let s=null;try{s=typeof e.toolCall.frontendOutput=="string"?JSON.parse(e.toolCall.frontendOutput):e.toolCall.frontendOutput}catch{}let a=s?.success===!1&&s?.error,c=e.toolCall.result?.outcome,l=c==="failure"?"error":c==="rejected"?"declined":c==="aborted"?"stopped":c==="success"?"completed":void 0,u=e.toolCall.status||l||"completed";a&&u==="completed"&&(u="error");let d=u==="awaiting_confirmation",A={...e.toolCall.input!==void 0?{input:e.toolCall.input}:{},...e.toolCall.result!==void 0?{result:e.toolCall.result}:{},status:u,frontendOutput:e.toolCall.frontendOutput,llmOutput:e.toolCall.llmOutput,resultMetadata:e.toolCall.resultMetadata,error:c==="failure"?e.toolCall.result.error.message:a?s.error:null,endTime:d?void 0:new Date,...e.toolCall.confirmationState!==void 0?{confirmationState:e.toolCall.confirmationState}:{},...e.toolCall.confirmationData!==void 0?{confirmationData:e.toolCall.confirmationData}:{}},p=t.parts?.map(h=>h.type==="tool"&&h.tool?.id===e.toolCall.id?{...h,tool:{...h.tool,...A}}:h)||[];return{...t,parts:p}}case"done":{if(!t.isStreaming)return t;let n=(t.parts||[]).map(i=>i.type==="tool"&&i.tool&&i.tool.status!=="awaiting_confirmation"?{...i,tool:PL(i.tool)}:i);return{...t,isStreaming:!1,parts:n,content:""}}default:return t}}function Bge(t){let e=new Set;for(let r of t)for(let n of(0,Lm.getMessageToolCalls)(r))n.status==="awaiting_confirmation"&&e.add(n.id);return[...e]}function vge(t){let e=wge();return t.map(r=>({...r,parts:r.parts?.map(n=>n.type==="tool"&&n.tool?.status==="awaiting_confirmation"?{...n,tool:{...n.tool,...e}}:n)}))}function Qge(t,e){let r=t.find(i=>i.parts?.some(o=>o.type==="tool"&&o.tool?.id===e));return r?{messages:t.map(i=>i.id===r.id?{...i,isStreaming:!0}:i),targetMessage:{...r,isStreaming:!0}}:{messages:t,targetMessage:null}}function Tge(t){return{id:t.id,name:t.name,status:t.status,input:t.input,result:t.result,frontendOutput:t.frontendOutput,llmOutput:t.llmOutput,resultMetadata:t.resultMetadata,error:t.error,startTime:t.startTime,endTime:t.endTime,confirmationState:t.confirmationState,confirmationData:t.confirmationData}}function Dge(t){let{isStreaming:e,tools:r,...n}=t;return JSON.parse((0,Lm.safeStringify)({...n,...t.parts?{parts:t.parts.map(i=>i.type==="tool"&&i.tool?{...i,tool:Tge(i.tool)}:i)}:{}},0))}Pt.AGENT_CONTEXT_MEMORY_MESSAGE_ID_PREFIX="context-memory-";var kge=["artifacts"];function vw(t){let e=t.contextType??"";return bge.TURN_CONTEXT_BLOCK_TYPES.includes(e)||kge.includes(e)}function Rge(t){return t.filter(e=>e.role!=="system"&&e.contextType!=="memory_notes"&&!vw(e)&&!e.id.startsWith(Pt.AGENT_CONTEXT_MEMORY_MESSAGE_ID_PREFIX)).map(e=>({...e,stale:void 0,isStreaming:void 0}))}function Nge(t){return t.filter(e=>!e.stale&&!e.isStreaming&&e.contextType!=="memory_notes"&&!vw(e)&&!!e.id)}function Oge(t=[],e=null){return{messages:t,assistantMessageId:e,outcome:"streaming"}}function Pm(t,e){return(0,Lm.getMessageToolCalls)(t).some(r=>r.id===e)}function pu(t,e){let r=t.assistantMessageId?t.messages.find(i=>i.id===t.assistantMessageId):void 0;if(r)return{state:t,target:r};let n=UL(t.assistantMessageId??e.createAssistantMessageId());return{state:{...t,messages:[...t.messages,n],assistantMessageId:n.id},target:n}}function xge(t,e,r){switch(e.type){case"system_message":{if(!e.systemMessage)return t;let n={id:e.systemMessage.id,role:"system",content:e.systemMessage.content,timestamp:new Date};return{...t,messages:[n,...t.messages]}}case"assistant_message_start":{if(!e.assistantMessageId)return t;let n=t.assistantMessageId?t.messages.find(o=>o.id===t.assistantMessageId):void 0;return t.messages.find(o=>o.id===e.assistantMessageId)?{...t,assistantMessageId:e.assistantMessageId,messages:t.messages.filter(o=>!n||n.id===e.assistantMessageId||o.id!==n.id).map(o=>o.id===e.assistantMessageId?{...o,isStreaming:!0}:o)}:n?{...t,assistantMessageId:e.assistantMessageId,messages:t.messages.map(o=>o.id===n.id?{...o,id:e.assistantMessageId,isStreaming:!0}:o)}:{...t,assistantMessageId:e.assistantMessageId}}case"context_message":{if(!e.contextMessage)return t;let n={id:e.contextMessage.id,role:"user",content:e.contextMessage.content,timestamp:new Date,...e.contextMessage.isHidden?{isHidden:!0}:{},...e.contextMessage.attachedFiles?.length?{attachedFiles:e.contextMessage.attachedFiles}:{}};return{...t,assistantMessageId:null,messages:[...t.messages.map(i=>i.id===t.assistantMessageId?{...i,isStreaming:!1}:i),n]}}case"context_usage":case"compaction_start":return t;case"compaction_complete":{if(!e.compaction)return t;let n=(0,Lm.applyAgentCompactionToMessages)(t.messages,e.compaction),i=e.compaction.memoryMessage?t.assistantMessageId:null;return!i||!n.some(o=>o.id===i)?{...t,messages:n}:{...t,assistantMessageId:null,messages:n.map(o=>o.id===i?{...o,isStreaming:!1}:o)}}case"content":{let n=pu(t,r);return{...n.state,messages:n.state.messages.map(i=>i.id===n.target.id?Bw(i,e.content||""):i)}}case"error":{let n=pu(t,r);return{...n.state,outcome:"failed",messages:n.state.messages.map(i=>i.id!==n.target.id?i:{...i,parts:[...i.parts||[],{type:"error",content:e.content,errorDetails:e.errorDetails,id:`error-${i.parts?.length??0}`}],isStreaming:!1})}}case"tool_call_start":case"tool_call_update":{if(!e.toolCall)return t;let n=e.type==="tool_call_start"?null:t.messages.find(o=>Pm(o,e.toolCall.id))??null,i=n?{state:t,target:n}:pu(t,r);return{...i.state,messages:i.state.messages.map(o=>hu(o,e,i.target))}}case"run_command_effect":{let n=e.toolCallId;if(!n)return t;let i=t.messages.find(o=>Pm(o,n));return i?{...t,messages:t.messages.map(o=>hu(o,e,i))}:t}case"tool_call_input":{if(!e.toolCall)return t;let n=t.messages.find(i=>Pm(i,e.toolCall.id));return n?{...t,messages:t.messages.map(i=>hu(i,e,n))}:t}case"tool_call_complete":{if(!e.toolCall)return t;let n=t.messages.find(o=>Pm(o,e.toolCall.id)),i=n?{state:t,target:n}:pu(t,r);return{...i.state,messages:i.state.messages.map(o=>hu(o,e,i.target))}}case"paused":{let n=pu(t,r);return{...n.state,outcome:"paused",messages:n.state.messages.map(i=>i.id===n.target.id?{...i,isStreaming:!1}:i)}}case"done":{let n=pu(t,r);return{...n.state,outcome:t.outcome==="failed"?"failed":"completed",messages:n.state.messages.map(i=>hu(i,e,n.target))}}default:return t}}});var $m=y(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.PROJECT_LABEL_COLOR_PATTERN=Lt.PROJECT_LABEL_COLORS=Lt.PROJECT_LIMITS=Lt.PROJECT_TASK_STATUSES=Lt.PROJECT_RESOURCE_TYPES=void 0;Lt.isProjectResourceType=Uge;Lt.nextProjectLabelColor=Mge;Lt.projectResourceKey=Pge;Lt.daysUntilTaskDue=FL;Lt.formatTaskDueDate=Lge;Lt.groupByContext=$ge;Lt.PROJECT_RESOURCE_TYPES=["file","tool"];function Uge(t){return Lt.PROJECT_RESOURCE_TYPES.includes(t)}Lt.PROJECT_TASK_STATUSES=["not_started","in_progress","waiting","done"];Lt.PROJECT_LIMITS={name:80,description:500,taskName:120,taskDescription:1e4,labelName:40,labels:50,taskLabels:10};Lt.PROJECT_LABEL_COLORS=["#6b7280","#ef4444","#f97316","#eab308","#22c55e","#14b8a6","#3b82f6","#6366f1","#a855f7","#ec4899"];Lt.PROJECT_LABEL_COLOR_PATTERN=/^#[0-9a-f]{6}$/;function Mge(t){let e=new Set(t.map(r=>r.color));return Lt.PROJECT_LABEL_COLORS.find(r=>!e.has(r))??Lt.PROJECT_LABEL_COLORS[t.length%Lt.PROJECT_LABEL_COLORS.length]}function Pge(t){return`${t.type}:${t.id}`}function $L(t){let e=new Intl.DateTimeFormat("en-CA",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date);return new Date(`${e}T00:00:00Z`)}function FL(t,e){let r=new Date(`${t}T00:00:00Z`);return Math.round((r.getTime()-$L(e).getTime())/864e5)}function Lge(t,e){let r=new Date(`${t}T00:00:00Z`),n=$L(e),i=FL(t,e);return i===0?"Due today":i===1?"Due tomorrow":i===-1?"Due yesterday":i<-1?`${-i} days overdue`:i<7?`Due ${r.toLocaleDateString(void 0,{weekday:"long",timeZone:"UTC"})}`:`Due ${r.toLocaleDateString(void 0,{day:"numeric",month:"short",timeZone:"UTC",...r.getUTCFullYear()===n.getUTCFullYear()?{}:{year:"numeric"}})}`}function $ge(t){let e=new Map;for(let r of t)e.set(r.context,[...e.get(r.context)??[],r]);return[...e].map(([r,n])=>({context:r,items:n})).sort((r,n)=>+!!r.context-+!!n.context)}});var Fm=y(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.RESOURCE_KINDS=bn.RESOURCE_DEFINITIONS=void 0;bn.isResourceKind=Fge;bn.getResourceDefinition=jge;bn.getResourceAppPath=zge;bn.RESOURCE_DEFINITIONS={tool:{label:"Tool",pluralLabel:"Tools",collectionKey:"tools",appPath:"/tools",hasDetailPage:!0,memberDefaultPermission:"editor",pickerDefaultPermission:"editor"},credential:{label:"Connection",pluralLabel:"Connections",collectionKey:"credentials",appPath:"/connections",hasDetailPage:!0,pickerDefaultPermission:"viewer"},playbook:{label:"Playbook",pluralLabel:"Playbooks",collectionKey:"playbooks",appPath:"/brain/playbooks",hasDetailPage:!0,pickerDefaultPermission:"editor"},file:{label:"File",pluralLabel:"Files",collectionKey:"files",appPath:"/brain/files",hasDetailPage:!0,pickerDefaultPermission:"viewer"},project:{label:"Project",pluralLabel:"Projects",collectionKey:"projects",appPath:"/brain/projects",hasDetailPage:!0,pickerDefaultPermission:"viewer"}};bn.RESOURCE_KINDS=Object.keys(bn.RESOURCE_DEFINITIONS);function Fge(t){return typeof t=="string"&&Object.prototype.hasOwnProperty.call(bn.RESOURCE_DEFINITIONS,t)}function jge(t){return bn.RESOURCE_DEFINITIONS[t]}function zge(t,e){let r=bn.RESOURCE_DEFINITIONS[t];return r.hasDetailPage?`${r.appPath}/${encodeURIComponent(e)}`:r.appPath}});var HL=y(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.SDK_ERROR_DETAILS_SCHEMA=Qc.SDK_OUTPUT_CONTRACTS=void 0;Qc.toSdkJsonSchema=Yge;var m=uc(),qge=$m(),Hge=Fm(),Gge=hn();function Yge({schema:t}){return m.z.toJSONSchema(t,{target:"draft-7",io:"output",unrepresentable:"any"})}var jL=m.z.looseObject({statusCode:m.z.number(),headers:m.z.record(m.z.string(),m.z.union([m.z.string(),m.z.array(m.z.string())])),omittedHeaderCount:m.z.number().optional()}),zL=m.z.looseObject({vfsPath:m.z.string(),storedBytes:m.z.number(),originalOutputBytes:m.z.number(),storageTruncated:m.z.boolean()}),qL=m.z.object({action:m.z.enum(["approve","reject","oauth_success","oauth_failure"]),source:m.z.enum(["user","automatic"])});function ur(t){return m.z.looseObject({toolCallId:m.z.string(),toolName:m.z.string(),outcome:m.z.literal("success"),confirmation:qL.optional(),data:t})}var Qw={http:jL.optional(),connection:m.z.looseObject({id:m.z.string(),name:m.z.string(),isOwner:m.z.boolean()}).optional().describe("The connection the call ran with."),auth:m.z.looseObject({applied:m.z.enum(["bearer","basic","explicit","none","unavailable"]),header:m.z.string().optional(),placeholders:m.z.array(m.z.string()),reason:m.z.string().optional()}).optional().describe("How authentication was sent: a default Bearer or Basic header, the request's own explicit placeholders, none, or unavailable with the reason. placeholders lists the connection's <<systemId_secretName>> strings."),secretPlaceholders:m.z.looseObject({keys:m.z.array(m.z.string()),resolved:m.z.boolean()}).optional()},Vge=m.z.discriminatedUnion("protocol",[m.z.looseObject({protocol:m.z.enum(["postgres","odbc"]),data:m.z.array(m.z.record(m.z.string(),m.z.unknown())).describe("Returned database rows."),...Qw}),m.z.looseObject({protocol:m.z.literal("mssql"),data:m.z.union([m.z.array(m.z.record(m.z.string(),m.z.unknown())),m.z.array(m.z.array(m.z.record(m.z.string(),m.z.unknown()))),m.z.looseObject({rowsAffected:m.z.array(m.z.number())})]).describe("One recordset, multiple recordsets, or affected row counts."),...Qw}),m.z.looseObject({protocol:m.z.enum(Gge.CONNECTION_PROTOCOLS.filter(t=>t!=="postgres"&&t!=="mssql"&&t!=="odbc")),data:m.z.unknown().describe("Complete protocol response payload. Preserve sibling fields, including files and metadata; do not unwrap a nested data field."),...Qw})]),Wge=m.z.union([m.z.looseObject({tools:m.z.array(m.z.unknown()).describe("All tools from every tools/list page, each with name and inputSchema.")}),m.z.looseObject({result:m.z.looseObject({content:m.z.array(m.z.unknown()).optional(),structuredContent:m.z.unknown().optional(),isError:m.z.boolean().optional()}).describe("The tools/call result with content blocks and optional structuredContent.")})]),Jge=m.z.looseObject({url:m.z.string().describe("The requested URL."),status:m.z.number(),statusText:m.z.string(),headers:m.z.record(m.z.string(),m.z.string()),body:m.z.string().describe("Response body bytes, base64-encoded."),systemId:m.z.string().optional().describe("The system whose connection authenticated the request."),connection:m.z.looseObject({id:m.z.string(),name:m.z.string(),isOwner:m.z.boolean()}).optional().describe("The connection the request ran with.")}),Zge=m.z.looseObject({stepId:m.z.string(),success:m.z.boolean(),data:m.z.unknown().optional(),error:m.z.string().nullable().optional(),http:jL.optional(),stepFileKeys:m.z.array(m.z.string()).optional()}),Kge=m.z.looseObject({toolId:m.z.string(),success:m.z.boolean(),run:m.z.looseObject({id:m.z.string()}).optional(),data:m.z.unknown().optional().describe("Tool output, determined by its output transform."),error:m.z.string().optional(),stepResults:m.z.array(Zge),fileArtifacts:m.z.array(m.z.looseObject({fileKey:m.z.string(),filename:m.z.string(),contentType:m.z.string(),size:m.z.number(),downloadUrl:m.z.string().optional()})).optional(),warnings:m.z.array(m.z.string()).optional(),inputSchema:m.z.unknown().optional(),resultMetadata:zL.optional()}),Xge=ur(m.z.looseObject({resource:m.z.looseObject({id:m.z.string(),name:m.z.string().optional(),path:m.z.string().optional(),version:m.z.union([m.z.number(),m.z.string()]).optional()}),created:m.z.boolean(),projectId:m.z.string().optional(),projectAttribution:m.z.looseObject({attached:m.z.boolean(),projectId:m.z.string(),projectName:m.z.string().optional(),resource:m.z.looseObject({type:m.z.enum(qge.PROJECT_RESOURCE_TYPES),id:m.z.string()}),error:m.z.string().optional()}).optional()}));Qc.SDK_OUTPUT_CONTRACTS={assignSessionToProject:{name:"SuperglueSessionProjectResult",schema:ur(m.z.object({sessionId:m.z.string(),projectId:m.z.string().nullable()})),description:"Returns the saved session ID and project ID, or null when unassigned. Throws SuperglueError on failure."},callSystem:{name:"SuperglueCallSystemResult",schema:Vge,description:"Returns the complete protocol payload in data, available HTTP metadata, the connection used, and how authentication was sent. Throws SuperglueError on failure; details contains the canonical result and unprojected execution output."},callMcp:{name:"SuperglueCallMcpResult",schema:Wge,description:"Returns { tools } when tool is omitted, or { result } from tools/call. Throws SuperglueError on HTTP, JSON-RPC, or result.isError failures; details.result.data contains statusCode, rpcError, or the failed result. On result.isError or invalid params, the error message ends with the called tool's input schema when it can be read; large schemas are shortened."},systemFetch:{name:"SuperglueSystemFetchResult",schema:Jge,description:"Returns the raw HTTP response: status, headers, and the base64 body. HTTP error statuses are returned, not thrown. Throws SuperglueError when the request cannot be authenticated or sent."},runTool:{name:"SuperglueRunToolResult",schema:Kge,description:"Returns successful tool output, step results, files, and available result reference. Throws SuperglueError on failure; details.result.data preserves this result shape with success: false, the error, and available run and step results. details.resultMetadata references the saved failed result when available."},writeResource:{name:"SuperglueWriteResult",schema:Xge,description:"Returns saved resource identity and path, creation status, and available project attribution. Throws SuperglueError on failure."},installBundle:{name:"SuperglueBundleInstallResult",schema:ur(m.z.looseObject({bundleId:m.z.string(),system:m.z.looseObject({id:m.z.string(),name:m.z.string(),requiredCredentialKeys:m.z.array(m.z.string()),hasUserCredentials:m.z.boolean()}),tools:m.z.array(m.z.looseObject({id:m.z.string(),name:m.z.string().optional()})),mcpServer:m.z.looseObject({id:m.z.string(),name:m.z.string()}).optional(),playbook:m.z.looseObject({id:m.z.string(),name:m.z.string()}).optional()})),description:"Returns the installed system ID, tool, MCP server, and playbook identities, the secret names the user must supply, and whether the user has a complete connection. Throws SuperglueError on failure."},stopBackgroundJob:{name:"SuperglueStopBackgroundJobResult",schema:ur(m.z.looseObject({job:m.z.looseObject({id:m.z.string(),status:m.z.string(),elapsedMs:m.z.number(),exitCode:m.z.number().optional()})})),description:"Returns the job's status, run time, and exit code after it ended, or status running when the stop is still in progress. Throws SuperglueError when the session has no such running job."},setToolState:{name:"SuperglueToolStateResult",schema:ur(m.z.looseObject({resource:m.z.looseObject({id:m.z.string()}),action:m.z.enum(["set","reset"])})),description:"Returns the saved tool identity and state action. Throws SuperglueError on failure."},shareResource:{name:"SuperglueShareResult",schema:ur(m.z.looseObject({resource:m.z.looseObject({kind:m.z.enum(Hge.RESOURCE_KINDS),id:m.z.string()})})),description:"Returns the shared resource identity. Throws SuperglueError on failure."},useChecklist:{name:"SuperglueChecklistResult",schema:ur(m.z.strictObject({visible:m.z.boolean(),done:m.z.number(),total:m.z.number()})),description:"Returns whether the session checklist is visible and its completed and total milestone counts. The progress panel updates immediately. Throws SuperglueError on failure."},showVisual:{name:"SuperglueShowVisualResult",schema:ur(m.z.looseObject({visualId:m.z.string(),check:m.z.looseObject({errors:m.z.array(m.z.string()),blockedRequests:m.z.array(m.z.string()),dataCalls:m.z.array(m.z.string()),contentHeight:m.z.number().optional(),timedOut:m.z.boolean()}).optional(),checkSkipped:m.z.string().optional(),screenshots:m.z.array(m.z.string()).optional()})),description:"Returns the visualId shown to the user. For a custom visual, check holds the test-browser result, and screenshots lists the labels of the screenshots attached to this command's result for you. Throws SuperglueError ETOOL when the visual fails its check; error.details.result.data.check then holds the errors."},notifyUser:{name:"SuperglueNotifyResult",schema:ur(m.z.looseObject({nextStepIds:m.z.array(m.z.string())})),description:"Returns the nextStepIds of the saved actions, in action order. Throws SuperglueError on failure."},writeOrgSettings:{name:"SuperglueOrgSettingsResult",schema:ur(m.z.looseObject({updated:m.z.array(m.z.enum(["name","preferences","notifications"])),notificationTest:m.z.looseObject({channel:m.z.enum(["slack","email"]),sent:m.z.boolean(),error:m.z.string().optional()}).optional()})),description:"Returns updated settings and any notification test result. Throws SuperglueError on failure."},writeDesignSystem:{name:"SuperglueDesignSystemResult",schema:ur(m.z.looseObject({updated:m.z.array(m.z.enum(["tokens","guidelines","logo"])),added:m.z.array(m.z.looseObject({id:m.z.string(),kind:m.z.enum(["logo","font","template","reference"]),name:m.z.string()})),changed:m.z.array(m.z.string()),removed:m.z.array(m.z.string())})),description:"Returns the changed design-system parts and file ids. Throws SuperglueError on failure."},importDesignSystemFromUrl:{name:"SuperglueDesignSystemImportResult",schema:ur(m.z.looseObject({url:m.z.string(),title:m.z.string().nullable(),tokens:m.z.looseObject({}),palette:m.z.array(m.z.looseObject({color:m.z.string(),weight:m.z.number()})),fonts:m.z.array(m.z.looseObject({family:m.z.string(),usage:m.z.array(m.z.string()),source:m.z.string()})),fontFiles:m.z.array(m.z.looseObject({file:m.z.string(),family:m.z.string().describe("CSS family name the website uses"),roles:m.z.array(m.z.string()),weight:m.z.string(),style:m.z.enum(["normal","italic"])})),logos:m.z.array(m.z.looseObject({file:m.z.string(),source:m.z.string(),width:m.z.number(),height:m.z.number(),light:m.z.boolean().describe("Light artwork meant for dark backgrounds")})),screenshot:m.z.string().nullable()})),description:"Returns a proposed design system from the website; font files, logos, and the screenshot are file:: session uploads. Throws SuperglueError on failure."},browser:{name:"SuperglueBrowserResult",schema:ur(m.z.looseObject({url:m.z.string(),title:m.z.string(),snapshot:m.z.string().optional(),closed:m.z.boolean().optional(),newSession:m.z.boolean().optional(),tabs:m.z.array(m.z.looseObject({index:m.z.number(),url:m.z.string(),title:m.z.string(),active:m.z.boolean()})).optional(),dialog:m.z.looseObject({type:m.z.string(),message:m.z.string(),defaultValue:m.z.string().optional()}).optional(),fileChooser:m.z.looseObject({multiple:m.z.boolean()}).optional(),downloads:m.z.array(m.z.looseObject({filename:m.z.string(),bytes:m.z.number(),path:m.z.string().optional(),error:m.z.string().optional()})).optional()})),description:"Returns the page URL and title after the action, and for every action except screenshot and close the page snapshot: an accessibility tree in which each element has a [ref=...], such as e12 or f1e12, for the next click, type, select, or upload. tabs lists every open tab when more than one is open. dialog is set while a JavaScript alert, confirm, or prompt waits for an answer; the page is paused until the dialog action answers it, and no snapshot is returned. fileChooser is set when the page opened a file picker; answer it with upload without ref. downloads lists files the page downloaded since the last action, saved as Brain files in this chat's Files at path; read one with vfs.readBinary({ path }). A download over the upload size limit has error instead of path and is not saved. newSession is true when this call started a new browser session: the tabs of the last session are reopened at their saved URLs, but unsaved form input and page state are gone, and cookies and sign-ins are kept. screenshot attaches a JPEG of the viewport to this command's result for you. Typed secret values are replaced by their placeholder in every returned text. Throws SuperglueError when the action fails."},readQbm:{name:"SuperglueReadQbmResult",schema:ur(m.z.looseObject({folder:m.z.string(),objects:m.z.array(m.z.looseObject({type:m.z.string(),files:m.z.array(m.z.string()),records:m.z.number()})),rawTables:m.z.array(m.z.looseObject({table:m.z.string(),files:m.z.array(m.z.string()),rows:m.z.number()})),encryptedValues:m.z.array(m.z.looseObject({table:m.z.string(),column:m.z.string(),values:m.z.number()})),unmappedCodes:m.z.array(m.z.looseObject({field:m.z.string(),code:m.z.string(),records:m.z.number()})).optional(),attachments:m.z.looseObject({documents:m.z.number(),note:m.z.string()}).optional(),rejectedRows:m.z.array(m.z.looseObject({table:m.z.string(),rows:m.z.number()})).optional()})),description:"Returns the folder that holds the extracted files, record counts per object type and raw table, encrypted columns, codes the reader cannot decode, and expected attachments. The folder also holds coverage.json.raw with the same summary plus the mapped source tables. Throws SuperglueError on failure."},readDocument:{name:"SuperglueReadDocumentResult",schema:ur(m.z.looseObject({headings:m.z.array(m.z.looseObject({level:m.z.number(),text:m.z.string()})),markdown:m.z.string()})),description:"Returns every heading with its level and the Markdown of the document or of the requested section. Throws SuperglueError when the file is not a Word file or no heading matches the section."},readSlides:{name:"SuperglueReadSlidesResult",schema:ur(m.z.looseObject({slideCount:m.z.number(),slides:m.z.array(m.z.looseObject({number:m.z.number(),title:m.z.string(),hidden:m.z.boolean(),text:m.z.string(),notes:m.z.string(),tables:m.z.number(),charts:m.z.number(),images:m.z.number(),markdown:m.z.string()}))})),description:"Returns the slide count and the requested slides with title, text in reading order, speaker notes, table, chart, and image counts, and Markdown. Throws SuperglueError when the file is not a PowerPoint file or a slide does not exist."},readSheet:{name:"SuperglueReadSheetResult",schema:ur(m.z.looseObject({sheet:m.z.looseObject({name:m.z.string(),hidden:m.z.boolean(),range:m.z.string().nullable(),rows:m.z.number(),columns:m.z.number(),formulas:m.z.number(),mergedRanges:m.z.number(),charts:m.z.number(),images:m.z.number()}),range:m.z.string().nullable(),cells:m.z.array(m.z.looseObject({address:m.z.string(),value:m.z.union([m.z.string(),m.z.number(),m.z.boolean(),m.z.null()]),text:m.z.string(),formula:m.z.string().optional()}))})),description:"Returns the sheet summary and every non-empty cell in the range with address, stored value, displayed text, and formula. A formula without a stored result has value null. Throws SuperglueError when the sheet or range does not exist."},findInFile:{name:"SuperglueFindInFileResult",schema:ur(m.z.looseObject({matches:m.z.array(m.z.looseObject({location:m.z.string(),text:m.z.string()}))})),description:"Returns every match with its location and surrounding text; an empty list when nothing matches. Throws SuperglueError when the file is not a Word, PowerPoint, or Excel file."},renderPage:{name:"SuperglueRenderPageResult",schema:ur(m.z.looseObject({label:m.z.string(),screenshots:m.z.array(m.z.string())})),description:"Shows the rendered page to the model after the command and returns its label. Throws SuperglueError when the page, slide, or sheet does not exist."},previewFile:{name:"SuperglueFilePreviewResult",schema:m.z.looseObject({draftId:m.z.string(),bytes:m.z.number()}),description:"Returns the HTML draft identity and byte count. Throws SuperglueError on failure."}};var eme=m.z.looseObject({code:m.z.string(),path:m.z.array(m.z.union([m.z.string(),m.z.number(),m.z.symbol()])),message:m.z.string()});Qc.SDK_ERROR_DETAILS_SCHEMA=m.z.discriminatedUnion("kind",[m.z.looseObject({kind:m.z.literal("tool_result"),resultMetadata:zL.optional(),result:m.z.looseObject({toolCallId:m.z.string(),toolName:m.z.string(),outcome:m.z.enum(["success","failure","rejected","aborted"]),confirmation:qL.optional(),error:m.z.looseObject({message:m.z.string()}).optional(),data:m.z.unknown().optional()}),output:m.z.unknown().describe("Unprojected execution output, including the original error and any available response data or metadata.")}),m.z.looseObject({kind:m.z.enum(["input_validation","output_validation"]),toolName:m.z.string(),issues:m.z.array(eme),output:m.z.unknown().optional()})])});var n$=y(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.SERVER_OWNED_SESSION_RESOURCE_KINDS=Re.AgentRequestValidationError=Re.AGENT_TOOL_CONTINUATION_ACTION_BY_CONFIRMATION_STATE=Re.AGENT_TOOL_CONTINUATION_ACTIONS=Re.AGENT_IDENTIFIER_PATTERN=Re.AGENT_REQUEST_LIMITS=void 0;Re.validateAgentRequestPayload=KL;Re.validateResourceBinding=XL;Re.validateClientResourceBinding=e$;Re.validateAgentSessionIdentity=t$;Re.validateAgentSessionTarget=r$;Re.validateAgentRequestSubmission=ame;Re.isAgentMessagePayload=cme;Re.isAgentToolContinuationPayload=lme;var Qs=hn();Re.AGENT_REQUEST_LIMITS={messageContentChars:5e4,identifierChars:256,attachedFiles:20,toolContinuations:20,continuationInputChars:1e5,frontendDraftsChars:2e6,accessRulesContextChars:2e6,pendingMessagesPerSession:10};Re.AGENT_IDENTIFIER_PATTERN=/^[A-Za-z0-9._-]+$/;Re.AGENT_TOOL_CONTINUATION_ACTIONS=["approve","reject","oauth_success","oauth_failure"];Re.AGENT_TOOL_CONTINUATION_ACTION_BY_CONFIRMATION_STATE={[Qs.ConfirmationAction.CONFIRMED]:"approve",[Qs.ConfirmationAction.DECLINED]:"reject",[Qs.ConfirmationAction.OAUTH_SUCCESS]:"oauth_success",[Qs.ConfirmationAction.OAUTH_FAILURE]:"oauth_failure"};var jm=class extends Error{constructor(e){super(e),this.name="AgentRequestValidationError"}};Re.AgentRequestValidationError=jm;function lt(t){throw new jm(t)}function Go(t,e){return(!t||typeof t!="object"||Array.isArray(t))&&lt(`${e} must be an object`),t}function Tc(t,e){(typeof t!="string"||!t.trim())&&lt(`${e} must be a non-empty string`);let r=t.trim();return r.length>Re.AGENT_REQUEST_LIMITS.identifierChars&&lt(`${e} exceeds ${Re.AGENT_REQUEST_LIMITS.identifierChars} characters`),Re.AGENT_IDENTIFIER_PATTERN.test(r)||lt(`${e} may only contain letters, numbers, dots, underscores, and hyphens`),r}function tme(t,e){return typeof t!="boolean"&&lt(`${e} must be a boolean`),t}function Tw(t,e){try{return JSON.stringify(t).length}catch{return lt(`${e} must be JSON-serializable`)}}function rme(t,e){if(t!==void 0)return Array.isArray(t)||lt(`${e} must be an array`),t.length>Re.AGENT_REQUEST_LIMITS.attachedFiles&&lt(`${e} exceeds ${Re.AGENT_REQUEST_LIMITS.attachedFiles} entries`),t.map((r,n)=>{let i=Go(r,`${e}[${n}]`);return{...i,key:Tc(i.key,`${e}[${n}].key`)}})}function GL({value:t,label:e,requireHidden:r}){let n=Go(t,e),i=Tc(n.id,`${e}.id`);typeof n.content!="string"&&lt(`${e}.content must be a string`);let o=n.content;o.length>Re.AGENT_REQUEST_LIMITS.messageContentChars&&lt(`${e}.content exceeds ${Re.AGENT_REQUEST_LIMITS.messageContentChars} characters`);let s=tme(n.isHidden,`${e}.isHidden`);r&&!s&&lt(`${e}.isHidden must be true`);let a=rme(n.attachedFiles,`${e}.attachedFiles`);return!o.trim()&&!a?.length&&lt(`${e}.content may only be empty when an attachment is present`),{id:i,content:o,isHidden:s,...a?{attachedFiles:a}:{}}}function VL(t){if(t===void 0)return;let e=Go(t,"frontendDrafts");return Tw(e,"frontendDrafts")>Re.AGENT_REQUEST_LIMITS.frontendDraftsChars&&lt(`frontendDrafts exceeds ${Re.AGENT_REQUEST_LIMITS.frontendDraftsChars} characters`),e}function WL(t){if(t===void 0)return;let e=Go(t,"accessRulesContext");return Tw(e,"accessRulesContext")>Re.AGENT_REQUEST_LIMITS.accessRulesContextChars&&lt(`accessRulesContext exceeds ${Re.AGENT_REQUEST_LIMITS.accessRulesContextChars} characters`),e}function JL(t){if(t!==void 0)return(typeof t!="string"||!Qs.AGENT_APPROVAL_MODES.includes(t))&&lt(`request.approvalMode must be one of: ${Qs.AGENT_APPROVAL_MODES.join(", ")}`),t}function ZL(t,e){let r=Go(t,e),n=Tc(r.toolCallId,`${e}.toolCallId`);return(typeof r.action!="string"||!Re.AGENT_TOOL_CONTINUATION_ACTIONS.includes(r.action))&&lt(`${e}.action must be one of: ${Re.AGENT_TOOL_CONTINUATION_ACTIONS.join(", ")}`),r.input!==void 0&&Tw(r.input,`${e}.input`)>Re.AGENT_REQUEST_LIMITS.continuationInputChars&&lt(`${e}.input exceeds ${Re.AGENT_REQUEST_LIMITS.continuationInputChars} characters`),{toolCallId:n,action:r.action,...r.input!==void 0?{input:r.input}:{}}}function nme(t){if(t===void 0)return;(!Array.isArray(t)||t.length===0)&&lt("request.toolContinuations must be a non-empty array"),t.length>Re.AGENT_REQUEST_LIMITS.toolContinuations&&lt(`request.toolContinuations exceeds ${Re.AGENT_REQUEST_LIMITS.toolContinuations} entries`);let e=t.map((r,n)=>ZL(r,`request.toolContinuations[${n}]`));return new Set(e.map(({toolCallId:r})=>r)).size!==e.length&&lt("request.toolContinuations must not contain duplicate toolCallId values"),e}function YL(t,e){if(t===void 0)return;(typeof t!="string"||!t.trim())&&lt(`${e} must be a non-empty string`);let r=t.trim();return r.length>Re.AGENT_REQUEST_LIMITS.messageContentChars&&lt(`${e} exceeds ${Re.AGENT_REQUEST_LIMITS.messageContentChars} characters`),r}var ime=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ome(t){let e=GL({value:t.message,label:"request.message"}),r=YL(t.title,"request.title"),n=YL(t.titleInput,"request.titleInput"),i=t.hiddenSteeringMessage===void 0?void 0:GL({value:t.hiddenSteeringMessage,label:"request.hiddenSteeringMessage",requireHidden:!0});i&&i.id===e.id&&lt("request.hiddenSteeringMessage.id must differ from request.message.id");let o=nme(t.toolContinuations),s=JL(t.approvalMode),a=VL(t.frontendDrafts),c=WL(t.accessRulesContext);return t.nextStepId!==void 0&&(typeof t.nextStepId!="string"||!ime.test(t.nextStepId))&&lt("request.nextStepId must be a UUID"),{kind:"message",message:e,...t.nextStepId?{nextStepId:t.nextStepId}:{},...i?{hiddenSteeringMessage:i}:{},...r?{title:r}:{},...n?{titleInput:n}:{},...o?{toolContinuations:o}:{},...s?{approvalMode:s}:{},...a?{frontendDrafts:a}:{},...c?{accessRulesContext:c}:{}}}function sme(t){let e=ZL(t,"request"),r=JL(t.approvalMode),n=VL(t.frontendDrafts),i=WL(t.accessRulesContext);return{kind:"tool_continuation",...e,...r?{approvalMode:r}:{},...n?{frontendDrafts:n}:{},...i?{accessRulesContext:i}:{}}}function KL(t){let e=Go(t,"request");return e.kind==="message"?ome(e):e.kind==="tool_continuation"?sme(e):lt('request.kind must be "message" or "tool_continuation"')}function XL(t,e){let r=Go(t,e);return(typeof r.kind!="string"||!Qs.AGENT_SESSION_RESOURCE_KINDS.includes(r.kind))&&lt(`${e}.kind must be one of: ${Qs.AGENT_SESSION_RESOURCE_KINDS.join(", ")}`),{kind:r.kind,id:Tc(r.id,`${e}.id`)}}Re.SERVER_OWNED_SESSION_RESOURCE_KINDS=["briefing"];function e$(t,e){let r=XL(t,e);return Re.SERVER_OWNED_SESSION_RESOURCE_KINDS.includes(r.kind)&&lt(`${e}.kind "${r.kind}" is assigned by the server`),r}function t$(t,e="session.createIfMissing"){let r=Go(t,e),n=r.projectId===void 0?void 0:Tc(r.projectId,`${e}.projectId`),i=r.taskId===void 0?void 0:Tc(r.taskId,`${e}.taskId`);i&&!n&&lt(`${e}.taskId requires ${e}.projectId`);let o=Object.values(Qs.AgentType);(typeof r.agentId!="string"||!o.includes(r.agentId))&&lt(`${e}.agentId must be one of: ${o.join(", ")}`);let s=r.resourceBinding===void 0?void 0:e$(r.resourceBinding,`${e}.resourceBinding`);return{agentId:r.agentId,...n?{projectId:n}:{},...i?{taskId:i}:{},...s?{resourceBinding:s}:{}}}function r$(t){let e=Go(t,"session"),r=e.createIfMissing===void 0?void 0:t$(e.createIfMissing);return{id:Tc(e.id,"session.id"),...r?{createIfMissing:r}:{}}}function ame(t){let e=Go(t,"body");return{session:r$(e.session),request:KL(e.request)}}function cme(t){return t.kind==="message"}function lme(t){return t.kind==="tool_continuation"}});var o$=y(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.ARTIFACT_EXPORT_FORMATS=Fe.ARTIFACT_RESPONSE_RESERVED_FIELD_NAMES=Fe.ARTIFACT_RESPONSE_PATCH_DEBOUNCE_MS=Fe.MAX_SPREADSHEET_ARTIFACT_BYTES=Fe.MAX_HTML_ARTIFACT_IMAGE_BYTES=Fe.MAX_HTML_ARTIFACT_BYTES=Fe.MAX_SPREADSHEET_CELL_TEXT_LENGTH=Fe.MAX_SPREADSHEET_SHEET_NAME_LENGTH=Fe.MAX_SPREADSHEET_GRID_CELLS=Fe.MAX_SPREADSHEET_SHEETS=Fe.SPREADSHEET_CELL_TYPES=Fe.XLSX_CONTENT_TYPE=Fe.HTML_CONTENT_TYPE=void 0;Fe.brainFileDisplayTitle=ume;Fe.brainFileKind=dme;Fe.isValidSpreadsheetCell=hme;Fe.isArtifactExportFormat=fme;Fe.isArtifactExportFormatForKind=gme;var i$=uc();Fe.HTML_CONTENT_TYPE="text/html";Fe.XLSX_CONTENT_TYPE="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";function ume(t){return t.replace(/\.[a-z][a-z0-9]{0,7}$/i,"")||t}function dme({fileName:t,contentType:e}){let r=e?.split(";")[0].trim().toLowerCase(),n=t.toLowerCase().match(/\.([a-z0-9]+)$/)?.[1];return r===Fe.HTML_CONTENT_TYPE||n==="html"||n==="htm"?"html":r===Fe.XLSX_CONTENT_TYPE||n==="xlsx"?"spreadsheet":"file"}Fe.SPREADSHEET_CELL_TYPES=["text","integer","number","percent","currency","boolean","date","datetime"];Fe.MAX_SPREADSHEET_SHEETS=20;Fe.MAX_SPREADSHEET_GRID_CELLS=1e6;Fe.MAX_SPREADSHEET_SHEET_NAME_LENGTH=31;Fe.MAX_SPREADSHEET_CELL_TEXT_LENGTH=32767;var Ame=i$.z.iso.date(),pme=i$.z.iso.datetime({offset:!0});function hme(t,e){return t===null?!0:e==="text"?typeof t=="string"&&t.length<=Fe.MAX_SPREADSHEET_CELL_TEXT_LENGTH:e==="boolean"?typeof t=="boolean":["integer","number","percent","currency"].includes(e)?typeof t=="number"&&Number.isFinite(t)&&(e!=="integer"||Number.isInteger(t)):typeof t!="string"?!1:(e==="datetime"?pme:Ame).safeParse(t).success}Fe.MAX_HTML_ARTIFACT_BYTES=1024*1024;Fe.MAX_HTML_ARTIFACT_IMAGE_BYTES=12*1024*1024;Fe.MAX_SPREADSHEET_ARTIFACT_BYTES=10*1024*1024;Fe.ARTIFACT_RESPONSE_PATCH_DEBOUNCE_MS=300;Fe.ARTIFACT_RESPONSE_RESERVED_FIELD_NAMES=new Set(["__proto__","constructor","prototype"]);Fe.ARTIFACT_EXPORT_FORMATS=["pdf","docx","xlsx","pptx"];function fme(t){return Fe.ARTIFACT_EXPORT_FORMATS.some(e=>e===t)}function gme(t,e,r=!1){return t==="spreadsheet"?e==="xlsx":r?e==="pdf"||e==="pptx":e!=="pptx"}});var u$=y(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.API_KEY_ACTION_LABELS=it.API_KEY_SURFACE_LABELS=it.API_KEY_SCOPES=it.API_KEY_SURFACE_ACTIONS=it.API_KEY_ACTIONS=it.API_KEY_SURFACES=void 0;it.getApiKeySurface=a$;it.getApiKeyAction=c$;it.getApiKeySurfaceActions=Dw;it.parseApiKeyScopes=l$;it.validateApiKeyScopesInput=Ime;it.isApiKeyScopeAllowed=Cme;it.formatApiKeyScopes=bme;it.API_KEY_SURFACES=["api","mcp"];it.API_KEY_ACTIONS=["read","write","execute"];it.API_KEY_SURFACE_ACTIONS={api:it.API_KEY_ACTIONS,mcp:["execute"]};it.API_KEY_SCOPES=it.API_KEY_SURFACES.flatMap(t=>it.API_KEY_SURFACE_ACTIONS[t].map(e=>`${t}:${e}`));it.API_KEY_SURFACE_LABELS={api:"API & CLI",mcp:"MCP"};it.API_KEY_ACTION_LABELS={read:"Read",write:"Write",execute:"Execute"};var s$=new Set(it.API_KEY_SCOPES),mme={"/v1/tools":["read"],"/v1/tools/:toolId/run":["execute"],"/v1/authenticate":["write"],"/v1/memory-notes":["read","write"]},yme=new Set(["/v1/api-keys","/v1/api-keys/:id","/v1/api-keys/:id/reveal"]),Eme=new Set(["/v1/me"]);function a$(t){let e=t.split("?")[0];return e==="/mcp"||e.startsWith("/mcp/")?"mcp":"api"}function c$(t){return t==="read"?"read":t==="execute"?"execute":"write"}function Dw(t,e){return it.API_KEY_SURFACE_ACTIONS[e].filter(r=>(t||[]).includes(`${e}:${r}`))}function l$(t){if(!Array.isArray(t))return null;let e=[...new Set(t.filter(r=>s$.has(r)))];return e.length>0?e:null}function Ime(t){if(t==null)return{scopes:null};let e=`Valid scopes: ${it.API_KEY_SCOPES.join(", ")}. Use null for full access.`;if(!Array.isArray(t)||t.length===0)return{error:`scopes must be a non-empty array of API key scopes. ${e}`};let r=t.filter(n=>!s$.has(n));return r.length>0?{error:`Unknown API key scope(s): ${r.map(String).join(", ")}. ${e}`}:{scopes:l$(t)}}function Cme({scopes:t,path:e,type:r}){if(!t||t.length===0)return!0;let n=e.split("?")[0];if(yme.has(n))return!1;if(Eme.has(n))return!0;let i=c$(r),o=a$(n);return o==="api"&&mme[n]?.some(s=>s===r)&&Dw(t,"mcp").length>0?!0:t.includes(`${o}:${i}`)}function bme(t){return!t||t.length===0?"Full access":it.API_KEY_SURFACES.map(e=>({surface:e,actions:Dw(t,e)})).filter(e=>e.actions.length>0).map(e=>it.API_KEY_SURFACE_ACTIONS[e.surface].length===1?it.API_KEY_SURFACE_LABELS[e.surface]:`${it.API_KEY_SURFACE_LABELS[e.surface]} ${e.actions.join("/")}`).join(", ")}});var d$=y(kw=>{"use strict";Object.defineProperty(kw,"__esModule",{value:!0});kw.isValidEmail=Sme;function Sme(t){return/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)*\.[a-zA-Z]{1,}$/.test(t)}});var p$=y($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.GATEWAY_UNINSTALL_COMMANDS=$t.GATEWAY_API_KEY_NAME_PREFIX=$t.GATEWAY_TARGET_NAME_PATTERN=$t.GATEWAY_SETUP_GUIDE_URL=$t.GATEWAY_DOWNLOAD_BASE_URL=$t.GATEWAY_INSTALL_TOKEN_PREFIX=void 0;$t.getGatewayServerUrl=A$;$t.buildGatewayInstallToken=_me;$t.buildGatewayInstallCommand=Bme;$t.getGatewayApiKeyName=vme;$t.GATEWAY_INSTALL_TOKEN_PREFIX="sgi1.";$t.GATEWAY_DOWNLOAD_BASE_URL="https://downloads.superglue.cloud";$t.GATEWAY_SETUP_GUIDE_URL="https://superglue.ai/docs/guides/secure-gateway/";$t.GATEWAY_TARGET_NAME_PATTERN=/^[a-z0-9]([a-z0-9_-]{0,61}[a-z0-9])?$/;function A$(t){let e=new URL(t);return e.protocol=e.protocol==="http:"?"ws:":"wss:",e.pathname=`${e.pathname.replace(/\/+$/,"")}/ws/tunnels`,e.search="",e.hash="",e.toString()}function wme(t){let e=new TextEncoder().encode(t),r="";for(let n of e)r+=String.fromCharCode(n);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function _me(t){let e={v:1,serverUrl:A$(t.apiEndpoint),tunnelId:t.tunnelId,apiKey:t.apiKey,targets:t.targets,enableScriptRunner:t.enableScriptRunner};return $t.GATEWAY_INSTALL_TOKEN_PREFIX+wme(JSON.stringify(e))}function Bme(t,e){return t==="windows"?[`$install = { ${["$ErrorActionPreference = 'Stop'","[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor 3072","$ProgressPreference = 'SilentlyContinue'","$gateway = Join-Path $env:TEMP 'superglue-gateway.exe'","Remove-Item $gateway -Force -ErrorAction SilentlyContinue",`Invoke-WebRequest -UseBasicParsing '${$t.GATEWAY_DOWNLOAD_BASE_URL}/superglue-gateway-windows.exe' -OutFile $gateway`,`'${e}' | & $gateway install -`].join("; ")} }`,`if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { & $install } else { Start-Process powershell -Verb RunAs -ErrorAction Stop -ArgumentList "-NoExit -Command & {$install}"; 'Continue in the administrator PowerShell window.' }`].join("; "):["d=$(mktemp -d)",`u="${$t.GATEWAY_DOWNLOAD_BASE_URL}/superglue-gateway-linux-$(uname -m | sed 's/aarch64/arm64/')"`,'s=$([ "$(id -u)" -eq 0 ] || echo sudo)','{ if command -v curl >/dev/null; then curl -fsSL -o "$d/superglue-gateway" "$u"; else wget -qO "$d/superglue-gateway" "$u"; fi; }','$s install -m 0755 "$d/superglue-gateway" /usr/local/bin/superglue-gateway',`echo '${e}' | $s /usr/local/bin/superglue-gateway install -`].join(" && ")}$t.GATEWAY_API_KEY_NAME_PREFIX="Gateway: ";function vme(t){return $t.GATEWAY_API_KEY_NAME_PREFIX+t}$t.GATEWAY_UNINSTALL_COMMANDS={windows:'& "C:\\Program Files\\superglue Gateway\\superglue-gateway.exe" uninstall',linux:"sudo /usr/local/bin/superglue-gateway uninstall"}});var qm=y(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.OAUTH_TOKEN_CREDENTIAL_KEYS=_e.OAUTH_CONFIG_CREDENTIAL_KEYS=void 0;_e.hasMeaningfulValue=Ft;_e.stringValue=gr;_e.validateOAuthConnection=Pme;_e.formatOAuthConnectionDisabledReason=$me;_e.objectValue=Ds;_e.parseScopes=VA;_e.normalizeGrantType=WA;_e.normalizeOAuthClientMode=Ow;_e.normalizeSystemAuthentication=Pr;_e.resolveOAuthClientMode=jme;_e.flattenSystemAuthentication=y$;_e.maskedFlatSystemAuthentication=zme;_e.isMaskedSecretValue=E$;_e.pickAgentAuthInputFields=qme;_e.maskSystemAuthenticationForResponse=Hme;_e.restoreMaskedClientSecret=Gme;_e.mapAgentAuthInput=I$;_e.mergeAgentAuthInput=rye;_e.getAuthenticationConfigCredentialKeys=C$;_e.buildAuthenticationEditorModel=nye;_e.getCredentialRequirements=iye;_e.isCredentialRequirementSatisfied=b$;_e.hasUnsatisfiedCredentialRequirements=oye;_e.updateAuthenticationEditorField=sye;_e.validateOAuthAuthenticationConfigPlacement=S$;_e.authenticationToLegacyCredentials=w$;_e.isRuntimeCredentialMetadataKey=aye;_e.resolveCredentialAuthentication=cye;_e.buildRuntimeCredentialsFromAuthentication=lye;_e.resolveOAuthConfigFromAuthentication=uye;_e.toCredentialInputValue=xw;_e.getCredentialEntries=dye;_e.getCredentialInputValues=Aye;_e.getCredentialDisplayHiddenKeys=pye;_e.hasOAuthTokenCredentials=hye;_e.getOAuthExpiryText=fye;_e.hasRuntimeCredentialValues=gye;_e.validateCredentialObjectKeys=mye;_e.validateCredentialKeyList=yye;_e.mapOAuthMissingFieldsForAgent=Eye;_e.validateOAuthAuthenticationAndCredentialInputs=Iye;var Xt=si(),Qme=uu();_e.OAUTH_CONFIG_CREDENTIAL_KEYS=["auth_url","authUrl","token_url","tokenUrl","token_uri","scopes","scope","grant_type","grantType","oauthClientMode","client_id","clientId","client_secret","clientSecret","tokenAuthMethod","tokenContentType","usePKCE","extraHeaders","extraBodyParams"];var zm=["host","port","database","path","homeDirectory"],m$=["type","oauthClientMode","grantType","authUrl","tokenUrl","scopes","clientId","clientSecret","tokenAuthMethod","tokenContentType","usePKCE","extraHeaders","extraBodyParams","resource","protocol",...zm],Tme=new Set(m$),Dme="type, oauthClientMode, grantType, authUrl, tokenUrl, scopes, clientId, clientSecret, tokenAuthMethod, tokenContentType, usePKCE, extraHeaders, extraBodyParams, resource, protocol, host, port, database, path, homeDirectory",kme=["grantType","authUrl","tokenUrl","scopes","clientId","clientSecret"],Rme={grantType:["grantType","grant_type"],authUrl:["authUrl","auth_url"],tokenUrl:["tokenUrl","token_url","token_uri"],scopes:["scopes","scope"],clientId:["clientId","client_id"],clientSecret:["clientSecret","client_secret"]},YA=["tokenAuthMethod","tokenContentType","usePKCE","extraHeaders","extraBodyParams","resource"],Nme=new Set(kme);_e.OAUTH_TOKEN_CREDENTIAL_KEYS=["access_token","accessToken","refresh_token","refreshToken","expires_at","expiresAt","expires_in","expiresIn","expiry","token_type","tokenType"];var Ome=new Set(_e.OAUTH_TOKEN_CREDENTIAL_KEYS),xme=["access_token","refresh_token","api_key","bearer_token","token","client_id","client_secret","auth_url","token_url","scopes","grant_type","token_type","expires_at","expiry","expires_in","host","hostname","port","database","dbname","db","username","password"],h$=new Map(xme.map((t,e)=>[(0,Xt.normalizeCredentialKey)(t),e]));function Dc(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}function Rw({config:t,key:e,value:r}){let n={...t||{}};return Ft(r)?n[e]=r:delete n[e],Object.keys(n).length>0?n:void 0}function Ft(t){return(0,Xt.hasCredentialValue)(t)}function gr(t){if(Ft(t))return typeof t=="string"?t:String(t)}var Ume={"grant_type authorization_code or client_credentials":"authorization_code or client_credentials",client_id:"client ID",token_url:"token URL",auth_url:"authorization URL","client_secret or usePKCE":"client secret or PKCE","client_secret or oauth_cert + oauth_key":"client secret or OAuth certificate and key"};function Ts(...t){return t.find(e=>Ft(e))}function Mme(t){return t===!0||t==="true"}function Pme(t){let e=t||{},r=gr(Ts(e.grant_type,e.grantType)),n=r==="client_credentials"?"client_credentials":"authorization_code",i=r&&r!=="authorization_code"&&r!=="client_credentials",o=Ts(e.client_id,e.clientId),s=Ts(e.client_secret,e.clientSecret),a=Ts(e.auth_url,e.authUrl),c=Ts(e.token_url,e.tokenUrl,e.token_uri),l=Ts(e.oauth_cert,e.oauthCert),u=Ts(e.oauth_key,e.oauthKey),d=Ft(l)&&Ft(u)||e.hasServerSideCertificateCredentials===!0,A=e.hasServerSideClientSecret===!0,p=Ft(s)||A,h=Mme(Ts(e.usePKCE,e.usePkce)),f=[];return i&&f.push("grant_type authorization_code or client_credentials"),Ft(o)||f.push("client_id"),Ft(c)||f.push("token_url"),n==="client_credentials"?!p&&!d&&f.push("client_secret or oauth_cert + oauth_key"):(Ft(a)||f.push("auth_url"),!p&&!h&&f.push("client_secret or usePKCE")),{grantType:n,hasAccessToken:Ft(Ts(e.access_token,e.accessToken)),hasCertificateCredentials:d,isReadyToConnect:f.length===0,missingFields:f,usePKCE:h}}function Lme(t){return t.length<=1?t[0]||"":t.length===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[t.length-1]}`}function $me(t){if(!t||t.isReadyToConnect)return null;let e=t.missingFields.map(r=>Ume[r]||r);return`OAuth connection is disabled because ${Lme(e)} ${e.length===1?"is":"are"} missing.`}function Ds(t){if(!(!t||typeof t!="object"||Array.isArray(t)))return t}function Yo(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function VA(t){if(Array.isArray(t))return t.map(String).filter(Boolean);if(Ft(t)){if(typeof t=="string"){let e=t.trim().split(/[,\s]+/).map(r=>r.trim()).filter(Boolean);return e.length>0?e:void 0}return[String(t)]}}function WA(t){let e=gr(t);if(e==="authorization_code"||e==="client_credentials"||e==="password"||e==="service_account"||e==="custom")return e;if(e)return"custom"}function Ow(t){return t==="managed"||t==="dynamic"||t==="custom"?t:void 0}function Fme(t){let e=Object.entries(t).filter(([r])=>!Nme.has(r));return e.length>0?Object.fromEntries(e):void 0}function fu(t,e,r){for(let i of Rme[r])if(r==="scopes"&&Array.isArray(t[i])||Ft(t[i]))return t[i];let n=Ds(t.client);return r==="clientId"&&Ft(n?.id)?n.id:r==="clientSecret"&&Ft(n?.secret)?n.secret:e[r]}function Pr(t){if(!t)return;let e=t;if(e.type==="oauth2"){let r=Ds(e.config)||{},n=Fme(r)||{};return Dc({type:"oauth2",oauthClientMode:Ow(e.oauthClientMode),grantType:WA(fu(e,r,"grantType")),authUrl:gr(fu(e,r,"authUrl")),tokenUrl:gr(fu(e,r,"tokenUrl")),scopes:VA(fu(e,r,"scopes")),oauthAppId:gr(e.oauthAppId),clientId:gr(fu(e,r,"clientId")),clientSecret:gr(fu(e,r,"clientSecret")),config:Object.keys(n).length>0?n:void 0})}return e.type==="connection_string"?Dc({type:"connection_string",protocol:e.protocol,config:Ds(e.config??e.components)}):e.type==="api_key"||e.type==="basic_auth"||e.type==="none"?Dc({type:e.type,config:Ds(e.config)}):{type:"none"}}function jme({authentication:t,templateManaged:e,templateRegistrationUrl:r}){let n=Pr(t);return n?.type!=="oauth2"?"custom":n.oauthAppId?.startsWith("managed:")?"managed":n.oauthClientMode?n.oauthClientMode==="managed"&&!e?"custom":n.oauthClientMode:r?"dynamic":e&&!n.clientSecret?"managed":"custom"}function y$(t){let e=Pr(t);if(!e)return;let{config:r,scopes:n,oauthAppId:i,...o}=e,s={};return r&&typeof r=="object"&&Object.assign(s,r),Object.assign(s,o),Array.isArray(n)?s.scopes=n.join(" "):n!==void 0&&(s.scopes=n),s}function Nw(t,e=""){return t==null?t:Array.isArray(t)?t.map(r=>Nw(r)):typeof t=="object"?Object.fromEntries(Object.entries(t).map(([r,n])=>[r,Nw(n,r)])):e&&(0,Xt.isSensitiveCredentialKey)(e)?(0,Xt.maskCredentialValue)(e,t):t}function zme(t){let e=y$(t);if(e)return Nw(e)}function E$(t){return(0,Xt.isMaskedValue)(t)||(0,Xt.isFullyMaskedCredentialValue)(t)}function qme(t){let e=Ds(t);if(!e)return;let r={};for(let n of m$){if(!Yo(e,n))continue;let i=e[n];i!==void 0&&(r[n]=i)}return r}function Hme(t){return!t||t.type!=="oauth2"||!Ft(t.clientSecret)?t:{...t,clientSecret:Xt.FULLY_MASKED_CREDENTIAL_VALUE}}function Gme({incoming:t,existing:e}){if(!t||t.type!=="oauth2"||!E$(t.clientSecret))return t;let r=e?.type==="oauth2"?e.clientSecret:void 0;return{...t,clientSecret:r}}function Yme(t){if(t==="none"||t==="api_key"||t==="basic_auth"||t==="oauth2"||t==="connection_string")return t}function Vme(t){let e=zm.flatMap(r=>{if(!Yo(t,r))return[];let n=t[r];return Ft(n)?[[r,n]]:[]});return e.length>0?Object.fromEntries(e):void 0}function Wme(t){return zm.filter(e=>Yo(t,e))}function Jme(t){let e=zm.flatMap(r=>Yo(t,r)?[[r,t[r]]]:[]);return e.length>0?Object.fromEntries(e):void 0}function Zme(t){let e=new Set(["oauthClientMode","grantType","authUrl","tokenUrl","scopes","clientId","clientSecret",...YA]);return Object.keys(t).filter(r=>e.has(r))}function I$(t){if(t==null)return{};let e=Ds(t);if(!e)return{error:"auth must be an object."};let r=Yme(e.type);if(!r)return{error:"auth.type is required."};let n=Object.keys(e).filter(a=>!Tme.has(a));if(n.length>0)return{error:`Unknown auth field(s): ${n.join(", ")}. Accepted: ${Dme}.`};let i=Wme(e);if(r!=="connection_string"&&i.length>0)return{error:`Connection auth field(s) require auth.type 'connection_string': ${i.join(", ")}.`};let o=Zme(e);if(r!=="oauth2"&&o.length>0)return{error:`OAuth auth field(s) require auth.type 'oauth2': ${o.join(", ")}.`};if(r!=="oauth2"){let a=Vme(e);return{authentication:Dc({type:r,protocol:r==="connection_string"?e.protocol:void 0,config:a})}}let s={...Object.fromEntries(YA.flatMap(a=>{if(!Yo(e,a))return[];let c=e[a];return Ft(c)?[[a,c]]:[]}))};return{authentication:Dc({type:"oauth2",oauthClientMode:Ow(e.oauthClientMode),grantType:WA(e.grantType),authUrl:gr(e.authUrl),tokenUrl:gr(e.tokenUrl),scopes:VA(e.scopes),clientId:gr(e.clientId),clientSecret:gr(e.clientSecret),config:Object.keys(s).length>0?s:void 0})}}function kc(t){return t===""||t===null||t===void 0}function GA(t,e,r,n){if(Yo(e,r)){if(kc(e[r])){delete t[n];return}t[n]=gr(e[r])}}function Kme(t,e){if(Yo(e,"scopes")){if(kc(e.scopes)){delete t.scopes;return}t.scopes=VA(e.scopes)}}function Xme(t,e){if(Yo(e,"grantType")){if(kc(e.grantType)){delete t.grantType;return}t.grantType=WA(e.grantType)}}function eye(t,e,r){if(Yo(e,r)){if(kc(e[r])){delete t[r];return}t[r]=e[r]}}function tye(t,e){if(kc(e))return;let r=Ds(e);if(!r)return t;let n={...t||{}};for(let[i,o]of Object.entries(r))kc(o)?delete n[i]:n[i]=o;return Object.keys(n).length>0?n:void 0}function rye(t,e){let r=I$(e);if(r.error)return Pr(t)||{type:"none"};let n=r.authentication||{type:"none"},i=Ds(e)||{},o=Pr(t),s=o?.type===n.type;if(n.type!=="oauth2"){let d=Jme(i),A=s&&o?{...o}:{type:n.type};return n.type==="connection_string"&&Yo(i,"protocol")&&(kc(i.protocol)?delete A.protocol:A.protocol=i.protocol),d&&(A.config=tye(o?.config,d)),Pr(A)||{type:n.type}}let c={...s&&o?.type==="oauth2"?{...o,config:{...o.config||{}}}:{type:"oauth2",config:{}}};GA(c,i,"oauthClientMode","oauthClientMode"),Xme(c,i),GA(c,i,"authUrl","authUrl"),GA(c,i,"tokenUrl","tokenUrl"),Kme(c,i),GA(c,i,"clientId","clientId"),GA(c,i,"clientSecret","clientSecret");let u={...c.config||{}};for(let d of YA)eye(u,i,d);return c.config=Object.keys(u).length>0?u:void 0,Pr(c)||{type:"oauth2"}}function C$(t){let e=Pr(t);if(!e)return[];let r=new Set;for(let n of Object.keys(e.config||{}))r.add(n);return e.type==="oauth2"&&(e.grantType&&(r.add("grant_type"),r.add("grantType")),e.authUrl&&(r.add("auth_url"),r.add("authUrl")),e.tokenUrl&&(r.add("token_url"),r.add("tokenUrl"),r.add("token_uri")),e.scopes&&(r.add("scopes"),r.add("scope")),e.clientId&&(r.add("client_id"),r.add("clientId")),e.clientSecret&&(r.add("client_secret"),r.add("clientSecret"))),[...r]}function f$(t,e,r){if(r)for(let[n,i]of Object.entries(r))t.push({path:`${e}.${n}`,label:n,value:i})}function nye({authentication:t}){let e=Pr(t)||{type:"none"},r=[];if(e.type==="oauth2"){r.push({path:"oauth2.clientId",label:"clientId",value:e.clientId},{path:"oauth2.clientSecret",label:"clientSecret",value:e.clientSecret},{path:"oauth2.grantType",label:"grantType",value:e.grantType||"authorization_code"},{path:"oauth2.authUrl",label:"authUrl",value:e.authUrl},{path:"oauth2.tokenUrl",label:"tokenUrl",value:e.tokenUrl},{path:"oauth2.scopes",label:"scopes",value:e.scopes?.join(" ")});for(let n of YA)r.push({path:`oauth2.config.${n}`,label:n,value:e.config?.[n]});for(let[n,i]of Object.entries(e.config||{}))YA.includes(n)||r.push({path:`oauth2.config.${n}`,label:n,value:i})}else e.type==="connection_string"?(e.protocol&&r.push({path:"connection.protocol",label:"protocol",value:e.protocol}),f$(r,"connection.config",e.config)):f$(r,`${e.type}.config`,e.config);return{type:e.type,authentication:e,configFields:r,hiddenCredentialKeys:C$(e)}}function iye(t){let e=Pr(t);if(!e||e.type!=="connection_string")return[];let r={type:"field",field:{key:"username",aliases:["user"]}},n={type:"field",field:{key:"password"}};switch(e.protocol){case"sftp":return[r,{type:"oneOf",fields:[{key:"password"},{key:"privateKey"}]},{type:"field",field:{key:"passphrase"},optional:!0}];case"smb":return[r,n,{type:"field",field:{key:"domain"},optional:!0}];case"sqlserver":return[{type:"field",field:{key:"user",aliases:["username"]}},n];default:return[r,n]}}function g$(t,e){return(0,Xt.hasCredentialValue)(e[t.key])?!0:(t.aliases??[]).some(r=>(0,Xt.hasCredentialValue)(e[r]))}function b$(t,e){return t.optional?!0:t.type==="field"?g$(t.field,e):t.fields.some(r=>g$(r,e))}function oye(t,e){let r=e||{};return t.some(n=>!b$(n,r))}function sye({authentication:t,path:e,value:r}){let n=Pr(t)||{type:"none"};if(n.type==="oauth2"){if(e==="oauth2.grantType")return{...n,grantType:WA(r)};if(e==="oauth2.authUrl")return{...n,authUrl:gr(r)};if(e==="oauth2.tokenUrl")return{...n,tokenUrl:gr(r)};if(e==="oauth2.scopes")return{...n,scopes:VA(r)??[]};if(e==="oauth2.clientId")return{...n,clientId:gr(r)};if(e==="oauth2.clientSecret")return{...n,clientSecret:gr(r)};if(e.startsWith("oauth2.config.")){let o=e.slice(14);return{...n,config:Rw({config:n.config,key:o,value:r})}}}if(n.type==="connection_string"){if(e==="connection.protocol")return{...n,protocol:gr(r)};if(e.startsWith("connection.config.")){let o=e.slice(18);return{...n,config:Rw({config:n.config,key:o,value:r})}}}let i=`${n.type}.config.`;if(e.startsWith(i)){let o=e.slice(i.length);return{...n,config:Rw({config:n.config,key:o,value:r})}}return n}function S$({authentication:t,credentials:e}){if(Pr(t)?.type!=="oauth2"||!e||typeof e!="object"||Array.isArray(e))return null;let n=Object.keys(e).filter(i=>_e.OAUTH_CONFIG_CREDENTIAL_KEYS.includes(i));return n.length===0?null:`OAuth configuration keys belong in auth, not credentials: ${n.join(", ")}. Move OAuth client ID to auth.clientId, client secret to auth.clientSecret, auth URL to auth.authUrl, token URL to auth.tokenUrl, scopes to auth.scopes, grant type to auth.grantType, and token request settings to auth fields such as tokenAuthMethod/usePKCE/extraHeaders. Runtime OAuth access and refresh tokens are created by connect OAuth authorization.`}function w$(t){let e=Pr(t);return e?e.type==="oauth2"?Dc({...e.config||{},grant_type:e.grantType,auth_url:e.authUrl,token_url:e.tokenUrl,scopes:e.scopes?.join(" "),client_id:e.clientId,client_secret:e.clientSecret}):e.type==="connection_string"?e.config||{}:e.config||{}:{}}function aye(t){return Ome.has(t.trim())}function cye({credential:t,system:e}){return t?.authentication??e?.authentication??void 0}function lye({authentication:t,credentials:e}){let r=w$(t);return Pr(t)?.type==="oauth2"?{...e||{},...r}:{...r,...e||{}}}function uye({input:t,authentication:e,templateOAuth:r}){let n=Pr(e),i=n?.type==="oauth2"?n:void 0,o=i?.config||{},s=t||{},a=(...c)=>c.find(l=>l!=null);return Dc({grant_type:a(s.grantType,s.grant_type,i?.grantType,r?.grant_type)||"authorization_code",scopes:a(s.scopes,i?.scopes?.join(" "),r?.scopes),client_id:a(s.clientId,s.client_id,i?.clientId),client_secret:a(s.clientSecret,s.client_secret,i?.clientSecret),auth_url:a(s.authUrl,s.auth_url,i?.authUrl,r?.authUrl),token_url:a(s.tokenUrl,s.token_url,i?.tokenUrl,r?.tokenUrl),resource:a(s.resource,o.resource,r?.resource),tokenAuthMethod:a(s.tokenAuthMethod,o.tokenAuthMethod,r?.tokenAuthMethod),tokenContentType:a(s.tokenContentType,o.tokenContentType,r?.tokenContentType),usePKCE:a(s.usePKCE,o.usePKCE,r?.usePKCE),extraHeaders:a(s.extraHeaders,o.extraHeaders,r?.extraHeaders),extraBodyParams:a(s.extraBodyParams,o.extraBodyParams,r?.extraBodyParams)})}function xw(t){if(t==null)return"";if(typeof t=="string")return t;let e=JSON.stringify(t);return e===void 0?String(t):e}function dye(t,e={}){let r=new Set((e.hiddenKeys||[]).map(Xt.normalizeCredentialKey));return Object.entries(t).filter(([n])=>!r.has((0,Xt.normalizeCredentialKey)(n))).sort(([n],[i])=>{let o=h$.get((0,Xt.normalizeCredentialKey)(n))??Number.MAX_SAFE_INTEGER,s=h$.get((0,Xt.normalizeCredentialKey)(i))??Number.MAX_SAFE_INTEGER;if(o!==s)return o-s;let a=(0,Xt.isSensitiveCredentialKey)(n),c=(0,Xt.isSensitiveCredentialKey)(i);return a!==c?a?-1:1:n.localeCompare(i)}).map(([n,i])=>({key:n,value:xw(i),isReservedMasked:e.maskAll||(0,Xt.isSensitiveCredentialKey)(n)}))}function Aye(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e,xw(r)]))}function pye({hideOAuthFiles:t=!1,configKeys:e=[]}){return[...e,...t?["oauth_cert","oauth_key"]:[]]}function hye(t){return Ft(t.access_token)||Ft(t.refresh_token)}function fye(t){let e=t.expires_at??t.expiry;if(e){let n=(0,Qme.parseUTCDate)(e);if(n)return`Expires ${n.toLocaleString()}`}let r=t.expires_in;return Ft(r)?`Expires in ${r} seconds`:null}function gye(t){return!!(t&&typeof t=="object"&&!Array.isArray(t)&&Object.values(t).some(e=>Ft(e)))}function mye(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=(0,Xt.getInvalidCredentialKeyNames)(Object.keys(t));return e.length===0?null:`${Xt.CREDENTIAL_KEY_VALIDATION_DESCRIPTION} Invalid keys: ${e.join(", ")}`}function yye(t){let e=(0,Xt.getInvalidCredentialKeyNames)(t);return e.length===0?null:`${Xt.CREDENTIAL_KEY_VALIDATION_DESCRIPTION} Invalid keys: ${e.join(", ")}`}function Eye(t){let e={"grant_type authorization_code or client_credentials":"grantType authorization_code or client_credentials",client_id:"clientId",token_url:"tokenUrl",auth_url:"authUrl","client_secret or usePKCE":"clientSecret or usePKCE","client_secret or oauth_cert + oauth_key":"clientSecret or oauth_cert + oauth_key"};return t.map(r=>e[r]||r)}function Iye({authentication:t,credentials:e}){return S$({authentication:t,credentials:e})}});var q$=y(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.bundles=void 0;Vo.buildBundleAgentLaunch=Rye;Vo.getBundle=Nye;Vo.listBundles=Oye;var Cye="https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap",bye="<<(p) => { const value = p['sage_intacct_entity_id']; if (!value) return ''; const escaped = String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('\"', '&quot;').replaceAll(\"'\", '&apos;'); return `<locationid>${escaped}</locationid>`; }>>",_$="<<() => crypto.randomUUID()>>";function jt(t){return`<?xml version="1.0" encoding="UTF-8"?><request><control><senderid><<sage_intacct_sender_id>></senderid><password><<sage_intacct_sender_password>></password><controlid>${_$}</controlid><uniqueid>false</uniqueid><dtdversion>3.0</dtdversion></control><operation><authentication><login><userid><<sage_intacct_user_id>></userid><companyid><<sage_intacct_company_id>></companyid><password><<sage_intacct_user_password>></password>${bye}</login></authentication><content><function controlid="${_$}">${t}</function></content></operation></request>`}function ma({stepId:t,objectNameExpression:e,collectionName:r,mapExpression:n,includeTotalCount:i=!1}){let o=i?"Number(data && data.TOTALCOUNT ? data.TOTALCOUNT : rows.length)":"rows.length",s=n?`rows.map(${n})`:"rows";return`(sourceData) => { const response = sourceData.${t} && sourceData.${t}.data ? sourceData.${t}.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? \` Sage support ID: \${supportIds.join(', ')}.\` : ''; throw new Error(\`Sage Intacct request failed\${details.length ? \`: \${details.join('; ')}\` : '.'}\${suffix}\`); } const data = result ? result.DATA : undefined; const objectName = ${e}; const raw = data ? data[objectName] : undefined; const rows = (Array.isArray(raw) ? raw : (raw ? [raw] : [])).slice(0, (sourceData && sourceData.maxResults) ?? ${i?"1000":"200"}); return { total: ${o}, ${r}: ${s} }; }`}var ya=`const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;');`,B$="const toIntacctDate = (value) => { const match = String(value).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); if (!match) throw new Error('Dates must be in YYYY-MM-DD format.'); return match[2] + '/' + match[3] + '/' + match[1]; };",v$="const assertBalanced = (lines) => { const balance = lines.reduce((sum, line) => sum + (line.type === 'credit' ? -1 : 1) * Math.abs(Number(line.amount)), 0); if (Math.abs(balance) > 0.005) throw new Error('Journal lines must balance: debits minus credits is ' + balance.toFixed(2) + '.'); };",Q$=`const lineXml = (line) => { const amount = Number(line.amount); if (!Number.isFinite(amount) || amount <= 0) throw new Error('Every journal line needs a positive amount.'); const type = line.type === 'credit' ? -1 : line.type === 'debit' ? 1 : null; if (type === null) throw new Error("Every journal line needs type 'debit' or 'credit'."); if (!line.accountNo) throw new Error('Every journal line needs accountNo.'); let xml = '<GLENTRY><ACCOUNTNO>' + esc(line.accountNo) + '</ACCOUNTNO><TR_TYPE>' + type + '</TR_TYPE><TRX_AMOUNT>' + amount + '</TRX_AMOUNT>'; if (line.department) xml += '<DEPARTMENT>' + esc(line.department) + '</DEPARTMENT>'; if (line.location) xml += '<LOCATION>' + esc(line.location) + '</LOCATION>'; if (line.memo) xml += '<DESCRIPTION>' + esc(line.memo) + '</DESCRIPTION>'; return xml + '</GLENTRY>'; };`;function gu({stepId:t,objectName:e}){return`(sourceData) => { const response = sourceData.${t} && sourceData.${t}.data ? sourceData.${t}.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? \` Sage support ID: \${supportIds.join(', ')}.\` : ''; throw new Error(\`Sage Intacct request failed\${details.length ? \`: \${details.join('; ')}\` : '.'}\${suffix}\`); } const data = result ? result.DATA : undefined; const raw = data ? (data.${e} || data.${e.toLowerCase()}) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: record && record.RECORDNO ? Number(record.RECORDNO) : undefined, record }; }`}var XA="netsuite",Pw=100,KA=1e4,Zm=String.raw`<<(p) => { const url = String(p['netsuite_url'] || ''); if (!url || url.includes('{accountId}')) throw new Error('NetSuite is not connected yet: set the account ID so the system URL is https://<account>.suitetalk.api.netsuite.com/services/rest'); return url.replace(/\/+$/, ''); }>>`,Km={Authorization:"Bearer <<netsuite_access_token>>",Accept:"application/json"},Lw=String.raw`const has = (value) => value !== undefined && value !== null && value !== ''; const nsId = (value, name) => { const text = String(value ?? '').trim(); if (!/^-?\d+$/.test(text)) throw new Error(name + ' must be a NetSuite internal ID.'); return text; }; const nsDate = (value, name) => { const text = String(value ?? '').trim(); if (!/^\d{4}-\d{2}-\d{2}$/.test(text)) throw new Error(name + ' must be a date in YYYY-MM-DD format.'); return text; }; const ref = (value, name) => ({ id: nsId(value, name) });`,Sye=String.raw`const str = (value) => (value === undefined || value === null || value === '' ? null : String(value)); const num = (value) => (value === undefined || value === null || value === '' ? null : Number(value)); const bool = (value) => value === 'T' || value === true; const ids = (value) => (value === undefined || value === null || value === '' ? [] : String(value).split(',').map((part) => part.trim()).filter(Boolean)); const status = (value) => (value ? String(value).replace(/^[^:]*:\s*/, '') : null);`,T$=String.raw`const stripLinks = (value) => { if (Array.isArray(value)) return value.map(stripLinks); if (value && typeof value === 'object') { const result = {}; for (const [key, entry] of Object.entries(value)) { if (key !== 'links') result[key] = stripLinks(entry); } return result; } return value; };`,wye={type:"integer",minimum:1,maximum:KA,description:`Maximum number of records to return (max ${KA}). Defaults to ${Pw}. The result always reports the full match count in total, so use maxResults 1 to count. Prefer filters over large values: big results can exceed an AI client's tool output limit.`},_ye={type:"boolean",description:"Only return active records. Defaults to false (inactive records are included)."},Bye={type:"string",description:"Optional subsidiary internal ID to filter by."},vye={type:"string",description:"Optional earliest transaction date as YYYY-MM-DD."},Qye={type:"string",description:"Optional latest transaction date as YYYY-MM-DD."},Tye={type:"object",description:"Optional extra NetSuite REST field values merged into the record body as-is, e.g. custom fields like { custentity_region: 'EMEA' } or references like { terms: { id: '2' } }. Fields that this tool's own inputs set are rejected; use those inputs instead.",properties:{},additionalProperties:!0},JA=t=>({input:"activeOnly",kind:"flag",clause:`${t}.isinactive = 'F'`,schema:_ye}),ZA=t=>({input:"subsidiaryId",kind:"id",clause:`${t}.subsidiary = $`,schema:Bye}),Uw=[{input:"fromDate",kind:"date",clause:"t.trandate >= TO_DATE('$', 'YYYY-MM-DD')",schema:vye},{input:"toDate",kind:"date",clause:"t.trandate <= TO_DATE('$', 'YYYY-MM-DD')",schema:Qye}];function Dye(t){let e=`p[${JSON.stringify(t.input)}]`;if(t.kind==="flag")return`if (${e} === true || ${e} === 'true') where.push(${JSON.stringify(t.clause)});`;let[r,n]=t.clause.split("$");if(t.kind==="enum")return`if (has(${e})) { const allowed = ${JSON.stringify(t.values)}; if (!allowed.includes(String(${e}))) throw new Error(${JSON.stringify(`${t.input} must be one of: ${t.values.join(", ")}.`)}); where.push(${JSON.stringify(r)} + String(${e}) + ${JSON.stringify(n)}); }`;if(t.kind==="prefix")return`if (has(${e})) { const text = String(${e}).trim(); if (!/^[A-Za-z0-9._-]{1,40}$/.test(text)) throw new Error(${JSON.stringify(`${t.input} may only contain letters, digits, dots, underscores and hyphens.`)}); where.push(${JSON.stringify(r)} + text + ${JSON.stringify(n)}); }`;let i=t.kind==="id"?"nsId":"nsDate";return`if (has(${e})) where.push(${JSON.stringify(r)} + ${i}(${e}, ${JSON.stringify(t.input)}) + ${JSON.stringify(n)});`}function Ea({id:t,name:e,shortName:r,instruction:n,stepId:i,collection:o,select:s,baseWhere:a=[],orderBy:c,filters:l=[],properties:u={},required:d=[],mapRow:A}){let p=typeof s=="string"?JSON.stringify(s):s.js,h=`<<(p) => { ${Lw} const where = ${JSON.stringify(a)}; ${l.map(Dye).join(" ")} return JSON.stringify({ q: ${p} + (where.length ? ' WHERE ' + where.join(' AND ') : '') + ${JSON.stringify(` ORDER BY ${c}`)} }); }>>`;return{id:t,name:e,shortName:r,instruction:`${n} Rows are ordered by internal ID. If more than ${KA} rows match, narrow with the filters or page with the SuiteQL query tool (ORDER BY id, WHERE id > last id).`,inputSchema:{type:"object",properties:{...u,maxResults:wye,...Object.fromEntries(l.map(f=>[f.input,f.schema]))},...d.length>0?{required:d}:{},additionalProperties:!1},steps:[{id:i,instruction:"Run the SuiteQL query page by page.",config:{type:"request",systemId:XA,url:`${Zm}/query/v1/suiteql`,method:"POST",headers:{...Km,"Content-Type":"application/json",Prefer:"transient"},queryParams:{limit:"1000",offset:"<<offset>>"},body:h,pagination:{type:"offsetBased",pageSize:"1000",stopCondition:`(response, pageInfo, sourceData) => { if (sourceData && ["offset", "limit", "page"].some((key) => sourceData[key] !== undefined)) throw new Error("offset, limit and page are not inputs of this tool: use maxResults and the filters."); const page = response && response.data ? response.data : {}; const merged = pageInfo && pageInfo.mergedResult && Array.isArray(pageInfo.mergedResult.items) ? pageInfo.mergedResult.items.length : 0; const max = Math.min(Math.max(Math.floor(Number(sourceData && sourceData.maxResults)) || ${Pw}, 1), ${KA}); return page.hasMore !== true || merged >= max; }`}}}],outputTransform:`(sourceData) => { ${Sye} const raw = sourceData.${i} ? sourceData.${i}.data : undefined; const pages = Array.isArray(raw) ? raw : (raw ? [raw] : []); const items = pages.flatMap((page) => (page && Array.isArray(page.items) ? page.items : [])); const last = pages.length ? pages[pages.length - 1] : {}; const max = Math.min(Math.max(Math.floor(Number(sourceData.maxResults)) || ${Pw}, 1), ${KA}); const rows = items.slice(0, max).map(${A}).map((row) => Object.fromEntries(Object.entries(row).filter((entry) => entry[1] !== null))); const total = last && last.totalResults !== undefined ? Number(last.totalResults) : items.length; return { total, returned: rows.length, hasMore: total > rows.length, ${o}: rows }; }`}}function en({id:t,name:e,shortName:r,instruction:n,stepId:i,recordType:o,mode:s,properties:a,required:c,body:l,replaceSublist:u}){let d=[...new Set(Array.from(l.matchAll(/record\.([A-Za-z0-9_]+)\s*=/g)).map(p=>p[1]))],A=s==="create"?`/record/v1/${o}`:`/record/v1/${o}/<<(p) => { ${Lw} return nsId(p.internalId, 'internalId'); }>>`;return{id:t,name:e,shortName:r,instruction:n,inputSchema:{type:"object",properties:{...s==="update"?{internalId:{type:"string",description:`Internal ID of the ${o} to update.`}}:{},...a,fields:Tye},required:s==="update"?["internalId",...c]:c,additionalProperties:!1},steps:[{id:i,instruction:`${s==="create"?"Create":"Update"} the ${o} record.`,modify:!0,config:{type:"request",systemId:XA,url:`${Zm}${A}`,method:s==="create"?"POST":"PATCH",headers:{...Km,"Content-Type":"application/json","X-NetSuite-idempotency-key":"<<() => crypto.randomUUID()>>"},...u?{queryParams:{replace:`<<(p) => (Array.isArray(p[${JSON.stringify(u.input)}]) && p[${JSON.stringify(u.input)}].length > 0 ? ${JSON.stringify(u.sublist)} : undefined)>>`}}:{},body:`<<(p) => { ${Lw} const record = {}; ${l} if (p.fields && typeof p.fields === 'object' && !Array.isArray(p.fields)) { const managed = ${JSON.stringify(d)}; const reserved = Object.keys(p.fields).filter((key) => managed.includes(key)); if (reserved.length > 0) throw new Error('fields may not set ' + reserved.join(', ') + ': use this tool\\'s own inputs for them.'); Object.assign(record, p.fields); } if (Object.keys(record).length === 0) throw new Error('Provide at least one field to ${s}.'); return JSON.stringify(record); }>>`,captureHttpResponse:!0}}],outputTransform:s==="create"?`(sourceData) => { const step = sourceData.${i} || {}; const location = step.http && step.http.headers ? String(step.http.headers.location || '') : ''; const match = location.match(/\\/record\\/v1\\/[^/]+\\/([^/?#]+)/); if (!match) throw new Error('NetSuite did not return the location of the new ${o}.'); return { id: decodeURIComponent(match[1]), recordType: '${o}' }; }`:`(sourceData) => ({ id: String(sourceData.internalId).trim(), recordType: '${o}', updated: true })`}}var D$=String.raw`const lines = Array.isArray(p.lines) ? p.lines : []; let balance = 0; const items = lines.map((line, index) => { const amount = Number(line && line.amount); if (!Number.isFinite(amount) || amount <= 0) throw new Error('lines[' + index + '].amount must be a positive number.'); if (line.type !== 'debit' && line.type !== 'credit') throw new Error("lines[" + index + "].type must be 'debit' or 'credit'."); balance += line.type === 'debit' ? amount : -amount; const item = { account: ref(line.accountId, 'lines[' + index + '].accountId') }; item[line.type] = amount; if (has(line.memo)) item.memo = String(line.memo); if (has(line.departmentId)) item.department = ref(line.departmentId, 'lines[' + index + '].departmentId'); if (has(line.classId)) item.class = ref(line.classId, 'lines[' + index + '].classId'); if (has(line.locationId)) item.location = ref(line.locationId, 'lines[' + index + '].locationId'); if (has(line.entityId)) item.entity = ref(line.entityId, 'lines[' + index + '].entityId'); return item; }); if (lines.length > 0 && Math.abs(balance) > 0.005) throw new Error('Journal lines must balance: debits minus credits is ' + balance.toFixed(2) + '.'); if (items.length > 0) record.line = { items };`,k$=String.raw`if (has(p.subsidiaryId)) record.subsidiary = ref(p.subsidiaryId, 'subsidiaryId'); if (has(p.date)) record.tranDate = nsDate(p.date, 'date'); if (has(p.memo)) record.memo = String(p.memo); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.externalId)) record.externalId = String(p.externalId);`,R$={type:"object",properties:{accountId:{type:"string",description:"GL account internal ID."},type:{type:"string",enum:["debit","credit"]},amount:{type:"number",description:"Positive amount."},memo:{type:"string",description:"Optional line memo."},departmentId:{type:"string",description:"Optional department internal ID."},classId:{type:"string",description:"Optional class internal ID."},locationId:{type:"string",description:"Optional location internal ID."},entityId:{type:"string",description:"Optional customer, vendor or employee internal ID for the line."}},required:["accountId","type","amount"],additionalProperties:!1},N$=t=>({subsidiaryId:{type:"string",description:t==="create"?"Subsidiary internal ID. Required in OneWorld accounts.":"Optional new subsidiary internal ID."},date:{type:"string",description:t==="create"?"Transaction date as YYYY-MM-DD.":"Optional new transaction date as YYYY-MM-DD."},memo:{type:"string",description:"Journal entry memo."},currencyId:{type:"string",description:"Optional currency internal ID."},externalId:{type:"string",description:"Optional external ID."}}),Hm=String.raw`if (p.isPerson === true || p.isPerson === 'true') record.isPerson = true; if (p.isPerson === false || p.isPerson === 'false') record.isPerson = false; if (has(p.entityId)) record.entityId = String(p.entityId); if (has(p.companyName)) record.companyName = String(p.companyName); if (has(p.firstName)) record.firstName = String(p.firstName); if (has(p.lastName)) record.lastName = String(p.lastName); if (has(p.subsidiaryId)) record.subsidiary = ref(p.subsidiaryId, 'subsidiaryId'); if (has(p.email)) record.email = String(p.email); if (has(p.phone)) record.phone = String(p.phone); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.externalId)) record.externalId = String(p.externalId); if (p.isInactive === true || p.isInactive === 'true') record.isInactive = true; if (p.isInactive === false || p.isInactive === 'false') record.isInactive = false;`;function Gm(t){return{companyName:{type:"string",description:`Company name of the ${t}.`},isPerson:{type:"boolean",description:`True when the ${t} is an individual; then set firstName and lastName.`},firstName:{type:"string",description:"First name for an individual."},lastName:{type:"string",description:"Last name for an individual."},entityId:{type:"string",description:`${t==="customer"?"Customer":"Vendor"} ID. Omit when auto-numbering assigns it.`},subsidiaryId:{type:"string",description:"Primary subsidiary internal ID. Required on create in OneWorld accounts."},email:{type:"string",description:"Email address."},phone:{type:"string",description:"Phone number."},currencyId:{type:"string",description:"Primary currency internal ID."},externalId:{type:"string",description:"Optional external ID."}}}var Ym={isInactive:{type:"boolean",description:"Set true to inactivate, false to reactivate."}},Vm=String.raw`if (Array.isArray(p.subsidiaryIds) && p.subsidiaryIds.length > 0) record.subsidiary = { items: p.subsidiaryIds.map((value, index) => ref(value, 'subsidiaryIds[' + index + ']')) }; if (p.includeChildren === true || p.includeChildren === 'true') record.includeChildren = true; if (p.includeChildren === false || p.includeChildren === 'false') record.includeChildren = false;`,j$={subsidiaryIds:{type:"array",items:{type:"string"},description:"Subsidiary internal IDs the record is available in. On update the list replaces the current subsidiaries."},includeChildren:{type:"boolean",description:"Also make the record available to child subsidiaries."}},$w=["AcctPay","AcctRec","Bank","COGS","CredCard","DeferExpense","DeferRevenue","Equity","Expense","FixedAsset","Income","LongTermLiab","NonPosting","OthAsset","OthCurrAsset","OthCurrLiab","OthExpense","OthIncome","Stat","UnbilledRec"],O$=String.raw`if (has(p.acctNumber)) record.acctNumber = String(p.acctNumber); if (has(p.acctName)) record.acctName = String(p.acctName); if (has(p.acctType)) record.acctType = { id: String(p.acctType) }; if (has(p.parentId)) record.parent = ref(p.parentId, 'parentId'); if (has(p.description)) record.description = String(p.description); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.externalId)) record.externalId = String(p.externalId); if (p.isInactive === true || p.isInactive === 'true') record.isInactive = true; if (p.isInactive === false || p.isInactive === 'false') record.isInactive = false;`,x$={acctNumber:{type:"string",description:"Account number."},acctName:{type:"string",description:"Account name."},acctType:{type:"string",enum:$w,description:"NetSuite account type."},parentId:{type:"string",description:"Optional parent account internal ID."},description:{type:"string",description:"Optional description."},currencyId:{type:"string",description:"Optional currency internal ID (bank and credit card accounts)."},externalId:{type:"string",description:"Optional external ID."},...j$},U$=String.raw`if (has(p.name)) record.name = String(p.name); if (has(p.parentId)) record.parent = ref(p.parentId, 'parentId'); if (has(p.externalId)) record.externalId = String(p.externalId); if (p.isInactive === true || p.isInactive === 'true') record.isInactive = true; if (p.isInactive === false || p.isInactive === 'false') record.isInactive = false;`,M$={name:{type:"string",description:"Department name."},parentId:{type:"string",description:"Optional parent department internal ID."},externalId:{type:"string",description:"Optional external ID."},...j$},Wm=t=>String.raw`if (has(p.${t})) record.entity = ref(p.${t}, '${t}'); if (has(p.subsidiaryId)) record.subsidiary = ref(p.subsidiaryId, 'subsidiaryId'); if (has(p.date)) record.tranDate = nsDate(p.date, 'date'); if (has(p.dueDate)) record.dueDate = nsDate(p.dueDate, 'dueDate'); if (has(p.memo)) record.memo = String(p.memo); if (has(p.currencyId)) record.currency = ref(p.currencyId, 'currencyId'); if (has(p.termsId)) record.terms = ref(p.termsId, 'termsId'); if (has(p.departmentId)) record.department = ref(p.departmentId, 'departmentId'); if (has(p.classId)) record.class = ref(p.classId, 'classId'); if (has(p.locationId)) record.location = ref(p.locationId, 'locationId'); if (has(p.externalId)) record.externalId = String(p.externalId);`,Jm=t=>({subsidiaryId:{type:"string",description:t==="create"?"Optional subsidiary internal ID; defaults to the entity's subsidiary.":"Optional new subsidiary internal ID."},date:{type:"string",description:t==="create"?"Transaction date as YYYY-MM-DD.":"Optional new transaction date as YYYY-MM-DD."},dueDate:{type:"string",description:"Optional due date as YYYY-MM-DD."},memo:{type:"string",description:"Optional memo."},currencyId:{type:"string",description:"Optional currency internal ID."},termsId:{type:"string",description:"Optional payment terms internal ID."},departmentId:{type:"string",description:"Optional header department internal ID."},classId:{type:"string",description:"Optional header class internal ID."},locationId:{type:"string",description:"Optional header location internal ID."},externalId:{type:"string",description:"Optional external ID."}}),z$=String.raw`if (has(line.departmentId)) item.department = ref(line.departmentId, 'lines[' + index + '].departmentId'); if (has(line.classId)) item.class = ref(line.classId, 'lines[' + index + '].classId'); if (has(line.locationId)) item.location = ref(line.locationId, 'lines[' + index + '].locationId');`,P$=String.raw`if (Array.isArray(p.lines) && p.lines.length > 0) record.item = { items: p.lines.map((line, index) => { const item = { item: ref(line && line.itemId, 'lines[' + index + '].itemId') }; if (has(line.quantity)) { const quantity = Number(line.quantity); if (!Number.isFinite(quantity)) throw new Error('lines[' + index + '].quantity must be a number.'); item.quantity = quantity; } if (has(line.rate)) { const rate = Number(line.rate); if (!Number.isFinite(rate)) throw new Error('lines[' + index + '].rate must be a number.'); item.rate = rate; } if (has(line.amount)) { const amount = Number(line.amount); if (!Number.isFinite(amount)) throw new Error('lines[' + index + '].amount must be a number.'); item.amount = amount; } if (has(line.description)) item.description = String(line.description); if (has(line.taxCodeId)) item.taxCode = ref(line.taxCodeId, 'lines[' + index + '].taxCodeId'); ${z$} return item; }) };`,L$={type:"object",properties:{itemId:{type:"string",description:"Item internal ID."},quantity:{type:"number",description:"Optional quantity. Defaults to 1."},rate:{type:"number",description:"Optional unit price; defaults to the item price."},amount:{type:"number",description:"Optional line amount."},description:{type:"string",description:"Optional line description."},taxCodeId:{type:"string",description:"Optional tax code internal ID."},departmentId:{type:"string",description:"Optional department internal ID."},classId:{type:"string",description:"Optional class internal ID. Some accounts ignore line classes on invoices; check the saved record."},locationId:{type:"string",description:"Optional location internal ID."}},required:["itemId"],additionalProperties:!1},$$=String.raw`if (Array.isArray(p.lines) && p.lines.length > 0) record.expense = { items: p.lines.map((line, index) => { const amount = Number(line && line.amount); if (!Number.isFinite(amount) || amount <= 0) throw new Error('lines[' + index + '].amount must be a positive number.'); const item = { account: ref(line.accountId, 'lines[' + index + '].accountId'), amount }; if (has(line.memo)) item.memo = String(line.memo); ${z$} return item; }) };`,F$={type:"object",properties:{accountId:{type:"string",description:"Expense account internal ID."},amount:{type:"number",description:"Positive amount."},memo:{type:"string",description:"Optional line memo."},departmentId:{type:"string",description:"Optional department internal ID."},classId:{type:"string",description:"Optional class internal ID."},locationId:{type:"string",description:"Optional location internal ID."}},required:["accountId","amount"],additionalProperties:!1},Rc="Re-running this tool creates another record; it is not idempotent.",kye=[Ea({id:"netsuite-list-accounts",name:"List NetSuite chart of accounts",shortName:"Chart of accounts",instruction:"Lists general ledger accounts (the chart of accounts) from NetSuite with number, name, type, parent and subsidiaries. Useful for validating an imported chart of accounts.",stepId:"queryAccounts",collection:"accounts",select:"SELECT a.id, a.acctnumber, a.accountsearchdisplaynamecopy AS name, a.fullname, a.accttype, a.parent, a.subsidiary, cur.symbol AS currency, a.description, a.issummary, a.isinactive FROM account a LEFT JOIN currency cur ON cur.id = a.currency",orderBy:"a.id",filters:[JA("a"),{input:"accountType",kind:"enum",values:$w,clause:"a.accttype = '$'",schema:{type:"string",enum:$w,description:"Only accounts of this NetSuite account type, e.g. Bank or Expense."}},{input:"numberPrefix",kind:"prefix",clause:"a.acctnumber LIKE '$%'",schema:{type:"string",description:"Only accounts whose number starts with this value, e.g. 1000 or 60."}}],mapRow:"(row) => ({ id: row.id, number: str(row.acctnumber), name: str(row.name), fullName: str(row.fullname), type: str(row.accttype), parentId: str(row.parent), subsidiaryIds: ids(row.subsidiary), currency: str(row.currency), description: str(row.description), isSummary: bool(row.issummary), isInactive: bool(row.isinactive) })"}),Ea({id:"netsuite-list-customers",name:"List NetSuite customers",shortName:"Customers",instruction:"Lists customer records from NetSuite with subsidiary, currency and open balance. Useful for verifying migrated AR master data.",stepId:"queryCustomers",collection:"customers",select:"SELECT c.id, c.entityid, c.companyname, c.isperson, c.firstname, c.lastname, c.email, c.phone, c.subsidiary, BUILTIN.DF(c.subsidiary) AS subsidiaryname, cur.symbol AS currency, c.balancesearch, c.overduebalancesearch, c.isinactive, TO_CHAR(c.datecreated, 'YYYY-MM-DD') AS datecreated, TO_CHAR(c.lastmodifieddate, 'YYYY-MM-DD') AS lastmodified FROM customer c LEFT JOIN currency cur ON cur.id = c.currency",orderBy:"c.id",filters:[JA("c"),ZA("c")],mapRow:"(row) => ({ id: row.id, entityId: str(row.entityid), companyName: str(row.companyname), isPerson: bool(row.isperson), firstName: str(row.firstname), lastName: str(row.lastname), email: str(row.email), phone: str(row.phone), subsidiaryId: str(row.subsidiary), subsidiary: str(row.subsidiaryname), currency: str(row.currency), balance: num(row.balancesearch), overdueBalance: num(row.overduebalancesearch), isInactive: bool(row.isinactive), createdOn: str(row.datecreated), modifiedOn: str(row.lastmodified) })"}),Ea({id:"netsuite-list-vendors",name:"List NetSuite vendors",shortName:"Vendors",instruction:"Lists vendor records from NetSuite with subsidiary, currency and balance. Useful for verifying migrated AP master data.",stepId:"queryVendors",collection:"vendors",select:"SELECT v.id, v.entityid, v.companyname, v.isperson, v.firstname, v.lastname, v.email, v.phone, v.subsidiary, BUILTIN.DF(v.subsidiary) AS subsidiaryname, cur.symbol AS currency, v.balance, v.isinactive, TO_CHAR(v.datecreated, 'YYYY-MM-DD') AS datecreated, TO_CHAR(v.lastmodifieddate, 'YYYY-MM-DD') AS lastmodified FROM vendor v LEFT JOIN currency cur ON cur.id = v.currency",orderBy:"v.id",filters:[JA("v"),ZA("v")],mapRow:"(row) => ({ id: row.id, entityId: str(row.entityid), companyName: str(row.companyname), isPerson: bool(row.isperson), firstName: str(row.firstname), lastName: str(row.lastname), email: str(row.email), phone: str(row.phone), subsidiaryId: str(row.subsidiary), subsidiary: str(row.subsidiaryname), currency: str(row.currency), balance: num(row.balance), isInactive: bool(row.isinactive), createdOn: str(row.datecreated), modifiedOn: str(row.lastmodified) })"}),Ea({id:"netsuite-list-journal-entries",name:"List NetSuite journal entries",shortName:"Journal entries",instruction:"Lists journal entry lines from NetSuite, one row per GL line and accounting book with journal, date, period, account, debit, credit and dimensions. Useful for verifying opening balances and postings at cutover.",stepId:"queryJournalLines",collection:"journalLines",select:"SELECT t.id AS journalid, t.tranid, TO_CHAR(t.trandate, 'YYYY-MM-DD') AS trandate, BUILTIN.DF(t.postingperiod) AS period, t.subsidiary, BUILTIN.DF(t.status) AS status, t.posting, t.memo AS journalmemo, cur.symbol AS currency, tl.id AS lineid, tal.accountingbook, tal.account, a.acctnumber, a.accountsearchdisplaynamecopy AS accountname, tal.debit, tal.credit, tl.memo, tl.department, tl.class, tl.location, tl.entity FROM transaction t JOIN transactionline tl ON tl.transaction = t.id JOIN transactionaccountingline tal ON tal.transaction = tl.transaction AND tal.transactionline = tl.id JOIN account a ON a.id = tal.account LEFT JOIN currency cur ON cur.id = t.currency",baseWhere:["t.type = 'Journal'"],orderBy:"t.id, tl.id, tal.accountingbook",filters:[...Uw,ZA("t")],mapRow:"(row) => ({ journalId: row.journalid, tranId: str(row.tranid), date: str(row.trandate), period: str(row.period), subsidiaryId: str(row.subsidiary), status: status(row.status), posting: bool(row.posting), journalMemo: str(row.journalmemo), currency: str(row.currency), line: num(row.lineid), accountingBookId: str(row.accountingbook), accountId: str(row.account), accountNumber: str(row.acctnumber), accountName: str(row.accountname), debit: num(row.debit), credit: num(row.credit), memo: str(row.memo), departmentId: str(row.department), classId: str(row.class), locationId: str(row.location), entityId: str(row.entity) })"}),Ea({id:"netsuite-list-invoices",name:"List NetSuite invoices",shortName:"Invoices",instruction:"Lists customer invoices from NetSuite with customer, dates, status, total and amount due. Useful for verifying migrated open AR at go-live.",stepId:"queryInvoices",collection:"invoices",select:"SELECT t.id, t.tranid, t.entity, BUILTIN.DF(t.entity) AS customername, TO_CHAR(t.trandate, 'YYYY-MM-DD') AS trandate, TO_CHAR(t.duedate, 'YYYY-MM-DD') AS duedate, BUILTIN.DF(t.status) AS status, cur.symbol AS currency, t.foreigntotal, t.foreignamountunpaid, t.subsidiary, t.memo FROM transaction t LEFT JOIN currency cur ON cur.id = t.currency",baseWhere:["t.type = 'CustInvc'"],orderBy:"t.id",filters:[...Uw,ZA("t"),{input:"openOnly",kind:"flag",clause:"t.status = 'A'",schema:{type:"boolean",description:"Only return open (unpaid) invoices."}}],mapRow:"(row) => ({ id: row.id, tranId: str(row.tranid), customerId: str(row.entity), customer: str(row.customername), date: str(row.trandate), dueDate: str(row.duedate), status: status(row.status), currency: str(row.currency), total: num(row.foreigntotal), amountDue: num(row.foreignamountunpaid), subsidiaryId: str(row.subsidiary), memo: str(row.memo) })"}),Ea({id:"netsuite-list-vendor-bills",name:"List NetSuite vendor bills",shortName:"Vendor bills",instruction:"Lists vendor bills from NetSuite with vendor, dates, status, approval status, total and amount due. Useful for verifying migrated open AP at go-live.",stepId:"queryBills",collection:"bills",select:"SELECT t.id, t.tranid, t.entity, BUILTIN.DF(t.entity) AS vendorname, TO_CHAR(t.trandate, 'YYYY-MM-DD') AS trandate, TO_CHAR(t.duedate, 'YYYY-MM-DD') AS duedate, BUILTIN.DF(t.status) AS status, BUILTIN.DF(t.approvalstatus) AS approvalstatus, cur.symbol AS currency, t.foreigntotal, t.foreignamountunpaid, t.subsidiary, t.memo FROM transaction t LEFT JOIN currency cur ON cur.id = t.currency",baseWhere:["t.type = 'VendBill'"],orderBy:"t.id",filters:[...Uw,ZA("t"),{input:"openOnly",kind:"flag",clause:"t.status = 'A'",schema:{type:"boolean",description:"Only return open bills (approved and not fully paid)."}}],mapRow:"(row) => ({ id: row.id, referenceNo: str(row.tranid), vendorId: str(row.entity), vendor: str(row.vendorname), date: str(row.trandate), dueDate: str(row.duedate), status: status(row.status), approvalStatus: str(row.approvalstatus), currency: str(row.currency), total: row.foreigntotal === undefined ? null : Math.abs(Number(row.foreigntotal)), amountDue: num(row.foreignamountunpaid), subsidiaryId: str(row.subsidiary), memo: str(row.memo) })"}),Ea({id:"netsuite-list-dimensions",name:"List NetSuite departments, classes or locations",shortName:"Departments, classes, locations",instruction:"Lists department, class or location records from NetSuite with hierarchy and subsidiaries. Useful for validating the dimension setup after an implementation and for finding the internal IDs the write tools need.",stepId:"queryDimensions",collection:"records",properties:{dimension:{type:"string",enum:["department","class","location"],description:"Which dimension to list."}},required:["dimension"],select:{js:String.raw`'SELECT d.id, d.name, d.fullname, d.parent, d.subsidiary, d.includechildren, d.isinactive FROM ' + (() => { const table = { department: 'department', class: 'classification', location: 'location' }[String(p.dimension || '')]; if (!table) throw new Error("dimension must be 'department', 'class' or 'location'."); return table; })() + ' d'`},orderBy:"d.id",filters:[JA("d")],mapRow:"(row) => ({ id: row.id, name: str(row.name), fullName: str(row.fullname), parentId: str(row.parent), subsidiaryIds: ids(row.subsidiary), includeChildren: bool(row.includechildren), isInactive: bool(row.isinactive) })"}),Ea({id:"netsuite-list-subsidiaries",name:"List NetSuite subsidiaries",shortName:"Subsidiaries",instruction:"Lists subsidiaries from NetSuite with hierarchy, country, base currency and elimination flag. Most create tools need a subsidiary ID from this list in OneWorld accounts.",stepId:"querySubsidiaries",collection:"subsidiaries",select:"SELECT s.id, s.name, s.fullname, s.parent, s.country, cur.symbol AS currency, s.iselimination, s.isinactive FROM subsidiary s LEFT JOIN currency cur ON cur.id = s.currency",orderBy:"s.id",filters:[JA("s")],mapRow:"(row) => ({ id: row.id, name: str(row.name), fullName: str(row.fullname), parentId: str(row.parent), country: str(row.country), currency: str(row.currency), isElimination: bool(row.iselimination), isInactive: bool(row.isinactive) })"}),{id:"netsuite-suiteql-query",name:"Run a NetSuite SuiteQL query",shortName:"SuiteQL query",instruction:"Runs a read-only SuiteQL SELECT query against NetSuite, for any record type, join or aggregate outside the prebuilt lists (for example items, employees, transaction lines or custom records). The workhorse tool for migration validation. Returns up to 1000 rows in one call with the total row count and hasMore; values are strings as NetSuite returns them.",inputSchema:{type:"object",properties:{query:{type:"string",description:`SuiteQL SELECT statement, e.g. "SELECT id, itemid, displayname FROM item WHERE isinactive = 'F' ORDER BY id". Dates come back in the user's date format; use TO_CHAR(field, 'YYYY-MM-DD') for ISO dates and BUILTIN.DF(field) for display names. For more than 1000 rows, page by key: ORDER BY id and add WHERE id > <last id>. Common columns: account (id, acctnumber, accountsearchdisplaynamecopy as the name, fullname, accttype, isinactive; there is no acctname column), customer (id, entityid, companyname, email, subsidiary, balancesearch, isinactive), vendor (id, entityid, companyname, email, subsidiary, balance, isinactive), transaction (id, tranid, type, trandate, entity, status, foreigntotal, foreignamountunpaid, subsidiary). Alias tables and qualify columns: FROM transaction t ... t.subsidiary works, an unqualified subsidiary fails.`},maxResults:{type:"integer",minimum:1,maximum:1e3,description:"Maximum number of rows to return (max 1000). Defaults to 100."}},required:["query"],additionalProperties:!1},steps:[{id:"runSuiteQl",instruction:"Run the SuiteQL query.",config:{type:"request",systemId:XA,url:`${Zm}/query/v1/suiteql`,method:"POST",headers:{...Km,"Content-Type":"application/json",Prefer:"transient"},queryParams:{limit:"<<(p) => Math.min(Math.max(Math.floor(Number(p.maxResults)) || 100, 2), 1000)>>",offset:"0"},body:String.raw`<<(p) => { const query = String(p.query || '').trim(); if (!/^(select|with)\b/i.test(query)) throw new Error('query must be a SuiteQL SELECT statement.'); return JSON.stringify({ q: query }); }>>`}}],outputTransform:`(sourceData) => { ${T$} const data = sourceData.runSuiteQl && sourceData.runSuiteQl.data ? sourceData.runSuiteQl.data : {}; const items = Array.isArray(data.items) ? data.items : []; const max = Math.min(Math.max(Math.floor(Number(sourceData.maxResults)) || 100, 1), 1000); const records = stripLinks(items.slice(0, max)); const total = data.totalResults !== undefined ? Number(data.totalResults) : items.length; return { total, returned: records.length, hasMore: total > records.length, records }; }`},{id:"netsuite-get-record",name:"Get a NetSuite record",shortName:"Get record",instruction:"Fetches one NetSuite record of any type by internal ID or external ID through the REST record API, including its sublists such as transaction lines. Useful for inspecting a record in full before or after a write.",inputSchema:{type:"object",properties:{recordType:{type:"string",description:'REST record type, e.g. "customer", "vendor", "invoice", "vendorbill", "journalentry", "account", "department" or a custom record like "customrecord_x".'},internalId:{type:"string",description:"Internal ID of the record."},externalId:{type:"string",description:"External ID of the record, used when internalId is not set."},expandSubResources:{type:"boolean",description:"Include sublists and subrecords inline. Defaults to true."}},required:["recordType"],additionalProperties:!1},steps:[{id:"getRecord",instruction:"Fetch the record from the REST record API.",config:{type:"request",systemId:XA,url:`${Zm}/record/v1/<<(p) => { const type = String(p.recordType || '').trim().toLowerCase(); if (!/^[a-z][a-z0-9_]*$/.test(type)) throw new Error('recordType must contain only letters, numbers and underscores.'); return type; }>>/<<(p) => { if (p.internalId !== undefined && p.internalId !== null && p.internalId !== '') { const id = String(p.internalId).trim(); if (!/^-?\\d+$/.test(id)) throw new Error('internalId must be a NetSuite internal ID.'); return id; } if (p.externalId !== undefined && p.externalId !== null && p.externalId !== '') return 'eid:' + encodeURIComponent(String(p.externalId)); throw new Error('Provide internalId or externalId.'); }>>`,method:"GET",headers:Km,queryParams:{expandSubResources:"<<(p) => (p.expandSubResources === false || p.expandSubResources === 'false' ? 'false' : 'true')>>"}}}],outputTransform:`(sourceData) => { ${T$} const record = sourceData.getRecord ? sourceData.getRecord.data : undefined; if (!record || typeof record !== 'object') throw new Error('NetSuite returned no record.'); return { record: stripLinks(record) }; }`},en({id:"netsuite-create-journal-entry",name:"Create NetSuite journal entry",shortName:"Create journal entry",instruction:`Creates a journal entry in NetSuite through the REST record API. Debit and credit lines must balance. Returns the new internal ID. ${Rc}`,stepId:"createJournalEntry",recordType:"journalentry",mode:"create",properties:{...N$("create"),lines:{type:"array",description:"Journal lines. Debit and credit totals must balance.",items:R$}},required:["date","lines"],body:`${k$} if (!Array.isArray(p.lines) || p.lines.length < 2) throw new Error('lines must contain at least two journal lines.'); ${D$}`}),en({id:"netsuite-update-journal-entry",name:"Update NetSuite journal entry",shortName:"Update journal entry",instruction:"Updates an existing NetSuite journal entry by internal ID. Only the provided fields change. When lines are provided they replace all existing lines and must balance. Entries in closed periods refuse updates.",stepId:"updateJournalEntry",recordType:"journalentry",mode:"update",properties:{...N$("update"),lines:{type:"array",description:"Optional replacement lines. When set, they replace every existing line and must balance.",items:R$}},required:[],body:`${k$} if (Array.isArray(p.lines) && p.lines.length < 2) throw new Error('lines must contain at least two journal lines; omit lines to keep the current ones.'); ${D$}`,replaceSublist:{input:"lines",sublist:"line"}}),en({id:"netsuite-create-vendor",name:"Create NetSuite vendor",shortName:"Create vendor",instruction:`Creates a vendor record in NetSuite. OneWorld accounts need a subsidiaryId. Omit entityId when auto-numbering assigns it. ${Rc}`,stepId:"createVendor",recordType:"vendor",mode:"create",properties:Gm("vendor"),required:[],body:`if (!has(p.companyName) && !((p.isPerson === true || p.isPerson === 'true') && has(p.lastName))) throw new Error('Provide companyName, or isPerson with lastName.'); ${Hm}`}),en({id:"netsuite-update-vendor",name:"Update NetSuite vendor",shortName:"Update vendor",instruction:"Updates an existing NetSuite vendor by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it.",stepId:"updateVendor",recordType:"vendor",mode:"update",properties:{...Gm("vendor"),...Ym},required:[],body:Hm}),en({id:"netsuite-create-customer",name:"Create NetSuite customer",shortName:"Create customer",instruction:`Creates a customer record in NetSuite. OneWorld accounts need a subsidiaryId. Omit entityId when auto-numbering assigns it. ${Rc}`,stepId:"createCustomer",recordType:"customer",mode:"create",properties:Gm("customer"),required:[],body:`if (!has(p.companyName) && !((p.isPerson === true || p.isPerson === 'true') && has(p.lastName))) throw new Error('Provide companyName, or isPerson with lastName.'); ${Hm}`}),en({id:"netsuite-update-customer",name:"Update NetSuite customer",shortName:"Update customer",instruction:"Updates an existing NetSuite customer by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it.",stepId:"updateCustomer",recordType:"customer",mode:"update",properties:{...Gm("customer"),...Ym},required:[],body:Hm}),en({id:"netsuite-create-account",name:"Create NetSuite GL account",shortName:"Create GL account",instruction:`Creates a general ledger account in NetSuite's chart of accounts. ${Rc}`,stepId:"createAccount",recordType:"account",mode:"create",properties:x$,required:["acctName","acctType"],body:`if (!has(p.acctName) || !has(p.acctType)) throw new Error('acctName and acctType are required.'); ${O$} ${Vm}`}),en({id:"netsuite-update-account",name:"Update NetSuite GL account",shortName:"Update GL account",instruction:"Updates an existing NetSuite GL account by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it. Accounts with transactions may refuse a type change.",stepId:"updateAccount",recordType:"account",mode:"update",properties:{...x$,...Ym},required:[],body:`${O$} ${Vm}`}),en({id:"netsuite-create-invoice",name:"Create NetSuite invoice",shortName:"Create invoice",instruction:`Creates a customer invoice in NetSuite with item lines. Item, tax and posting rules of the account apply. ${Rc}`,stepId:"createInvoice",recordType:"invoice",mode:"create",properties:{customerId:{type:"string",description:"Customer internal ID."},...Jm("create"),lines:{type:"array",description:"Item lines.",items:L$}},required:["customerId","lines"],body:`if (!Array.isArray(p.lines) || p.lines.length === 0) throw new Error('lines must contain at least one item line.'); ${Wm("customerId")} ${P$}`}),en({id:"netsuite-update-invoice",name:"Update NetSuite invoice",shortName:"Update invoice",instruction:"Updates an existing NetSuite invoice by internal ID. Only the provided fields change. When lines are provided they replace all existing item lines. Paid invoices and closed periods may refuse updates.",stepId:"updateInvoice",recordType:"invoice",mode:"update",properties:{customerId:{type:"string",description:"Optional new customer internal ID."},...Jm("update"),lines:{type:"array",description:"Optional replacement item lines; they replace every existing item line.",items:L$}},required:[],body:`if (Array.isArray(p.lines) && p.lines.length === 0) throw new Error('lines must contain at least one item line; omit lines to keep the current ones.'); ${Wm("customerId")} ${P$}`,replaceSublist:{input:"lines",sublist:"item"}}),en({id:"netsuite-create-vendor-bill",name:"Create NetSuite vendor bill",shortName:"Create vendor bill",instruction:`Creates a vendor bill in NetSuite with expense lines. Approval routing of the account applies. ${Rc}`,stepId:"createVendorBill",recordType:"vendorbill",mode:"create",properties:{vendorId:{type:"string",description:"Vendor internal ID."},referenceNo:{type:"string",description:"Optional vendor invoice reference number."},...Jm("create"),lines:{type:"array",description:"Expense lines.",items:F$}},required:["vendorId","lines"],body:`if (!Array.isArray(p.lines) || p.lines.length === 0) throw new Error('lines must contain at least one expense line.'); ${Wm("vendorId")} if (has(p.referenceNo)) record.tranId = String(p.referenceNo); ${$$}`}),en({id:"netsuite-update-vendor-bill",name:"Update NetSuite vendor bill",shortName:"Update vendor bill",instruction:"Updates an existing NetSuite vendor bill by internal ID. Only the provided fields change. When lines are provided they replace all existing expense lines. Paid bills and closed periods may refuse updates.",stepId:"updateVendorBill",recordType:"vendorbill",mode:"update",properties:{vendorId:{type:"string",description:"Optional new vendor internal ID."},referenceNo:{type:"string",description:"Optional vendor invoice reference number."},...Jm("update"),lines:{type:"array",description:"Optional replacement expense lines; they replace every existing expense line.",items:F$}},required:[],body:`if (Array.isArray(p.lines) && p.lines.length === 0) throw new Error('lines must contain at least one expense line; omit lines to keep the current ones.'); ${Wm("vendorId")} if (has(p.referenceNo)) record.tranId = String(p.referenceNo); ${$$}`,replaceSublist:{input:"lines",sublist:"expense"}}),en({id:"netsuite-create-department",name:"Create NetSuite department",shortName:"Create department",instruction:`Creates a department in NetSuite. Without subsidiaryIds NetSuite assigns the parent subsidiary. ${Rc}`,stepId:"createDepartment",recordType:"department",mode:"create",properties:M$,required:["name"],body:`if (!has(p.name)) throw new Error('name is required.'); ${U$} ${Vm}`}),en({id:"netsuite-update-department",name:"Update NetSuite department",shortName:"Update department",instruction:"Updates an existing NetSuite department by internal ID. Only the provided fields change; set isInactive to inactivate or reactivate it.",stepId:"updateDepartment",recordType:"department",mode:"update",properties:{...M$,...Ym},required:[],body:`${U$} ${Vm}`})],Mw={sap_s4hana:{bundleId:"sap_s4hana",templateId:"sap_s4hana",systemId:"sap_s4hana",displayName:"SAP S/4HANA",description:"Read business partners, sales orders, products and purchase orders from SAP.",systemUrl:Cye,credentialHint:"Works instantly with SAP's demo data. Add your own key later for your live system.",requiredCredentialKeys:["api_key"],demoCredentials:{api_key:"K8reTgiKCCaqvAPWC4cOjqqiLdLE8dqz"},mcpServer:{name:"sap",displayName:"SAP S/4HANA",description:"Business partners, sales orders, products and purchase orders from SAP."},installMcpServer:!0,agentLaunch:{userPrompt:"I just installed the SAP S/4HANA bundle. What can I do with it?",nextSteps:"Your first reply must be short: SAP is connected to free demo data and works right now, so offer to run one tool immediately as proof. No credential collection is needed to start. If they want their own data: their own free key comes from https://api.sap.com (SAP Business Accelerator Hub), collected and saved directly with a connect field, never via the Connections page; the system URL can then be switched to their own SAP host. Do not list the installed tools, do not add tips or explain SAP concepts unless asked."},tools:[{id:"sap-list-business-partners",name:"List SAP business partners",shortName:"Business partners",instruction:"Lists business partners (customers, suppliers, contacts) from SAP S/4HANA. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "BusinessPartnerCategory eq '2'" for organizations.`},maxResults:{type:"integer",description:"Maximum number of business partners to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchBusinessPartners",instruction:"Fetch business partners, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_BUSINESS_PARTNER/A_BusinessPartner",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"BusinessPartner,BusinessPartnerFullName,BusinessPartnerCategory,BusinessPartnerGrouping,CreationDate"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchBusinessPartners?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, businessPartners: rows.map((r) => ({ id: r.BusinessPartner, name: r.BusinessPartnerFullName, category: r.BusinessPartnerCategory, grouping: r.BusinessPartnerGrouping, createdOn: d(r.CreationDate) })) }; }"},{id:"sap-list-sales-orders",name:"List SAP sales orders",shortName:"Sales orders",instruction:"Lists sales orders from SAP S/4HANA with their net amount, currency and sold-to party. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "SalesOrderType eq 'OR'" or "TotalNetAmount gt 1000".`},maxResults:{type:"integer",description:"Maximum number of sales orders to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchSalesOrders",instruction:"Fetch sales orders, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_SALES_ORDER_SRV/A_SalesOrder",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"SalesOrder,SalesOrderType,SoldToParty,TotalNetAmount,TransactionCurrency,SalesOrderDate,OverallSDProcessStatus"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchSalesOrders?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, salesOrders: rows.map((r) => ({ id: r.SalesOrder, type: r.SalesOrderType, soldToParty: r.SoldToParty, netAmount: Number(r.TotalNetAmount), currency: r.TransactionCurrency, orderDate: d(r.SalesOrderDate), status: r.OverallSDProcessStatus })) }; }"},{id:"sap-list-products",name:"List SAP products",shortName:"Products",instruction:"Lists products (materials) from SAP S/4HANA with their type, group and base unit. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "ProductType eq 'FERT'" for finished goods.`},maxResults:{type:"integer",description:"Maximum number of products to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchProducts",instruction:"Fetch products, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_PRODUCT_SRV/A_Product",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$expand:"to_Description",$select:"Product,ProductType,ProductGroup,BaseUnit,GrossWeight,WeightUnit,CreationDate,to_Description/Language,to_Description/ProductDescription"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const nameOf = (r) => { const list = r.to_Description?.results ?? []; const hit = list.find((x) => x.Language === 'EN') ?? list[0]; return hit?.ProductDescription; }; const rows = (sourceData.fetchProducts?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, products: rows.map((r) => ({ id: r.Product, name: nameOf(r), type: r.ProductType, group: r.ProductGroup, baseUnit: r.BaseUnit, grossWeight: Number(r.GrossWeight), weightUnit: r.WeightUnit, createdOn: d(r.CreationDate) })) }; }"},{id:"sap-list-purchase-orders",name:"List SAP purchase orders",shortName:"Purchase orders",instruction:"Lists purchase orders from SAP S/4HANA with their supplier, currency and creation date. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "PurchaseOrderType eq 'NB'" for standard orders.`},maxResults:{type:"integer",description:"Maximum number of purchase orders to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchPurchaseOrders",instruction:"Fetch purchase orders, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrder",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"PurchaseOrder,PurchaseOrderType,Supplier,PurchaseOrderDate,DocumentCurrency,CreatedByUser"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchPurchaseOrders?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, purchaseOrders: rows.map((r) => ({ id: r.PurchaseOrder, type: r.PurchaseOrderType, supplier: r.Supplier, orderDate: d(r.PurchaseOrderDate), currency: r.DocumentCurrency, createdBy: r.CreatedByUser })) }; }"},{id:"sap-list-gl-accounts",name:"List SAP chart of accounts",shortName:"Chart of accounts",instruction:"Lists general ledger accounts (the chart of accounts) from SAP S/4HANA. Supports an optional OData $filter, e.g. by ChartOfAccounts.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "ChartOfAccounts eq 'YCOA'" or "GLAccountType eq 'X'".`},maxResults:{type:"integer",description:"Maximum number of accounts to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchGLAccounts",instruction:"Fetch GL accounts, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_GLACCOUNTINCHARTOFACCOUNTS_SRV/A_GLAccountInChartOfAccounts",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:`<<(p) => p.filter ? "ChartOfAccounts ne '' and (" + p.filter + ")" : "ChartOfAccounts ne ''">>`,$expand:"to_Text",$select:"GLAccount,ChartOfAccounts,GLAccountType,GLAccountGroup,IsBalanceSheetAccount,AccountIsBlockedForPosting,to_Text/Language,to_Text/GLAccountName"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const nameOf = (r) => { const list = r.to_Text?.results ?? []; const hit = list.find((x) => x.Language === 'EN') ?? list[0]; return hit?.GLAccountName; }; const rows = (sourceData.fetchGLAccounts?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, accounts: rows.map((r) => ({ account: r.GLAccount, name: nameOf(r), chartOfAccounts: r.ChartOfAccounts, type: r.GLAccountType, group: r.GLAccountGroup, isBalanceSheet: r.IsBalanceSheetAccount, blockedForPosting: r.AccountIsBlockedForPosting })) }; }"},{id:"sap-list-billing-documents",name:"List SAP billing documents",shortName:"Billing documents",instruction:"Lists billing documents (invoices, credit memos) from SAP S/4HANA with amount, currency and sold-to party. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "BillingDocumentType eq 'F2'" or "TotalNetAmount gt 1000".`},maxResults:{type:"integer",description:"Maximum number of billing documents to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchBillingDocuments",instruction:"Fetch billing documents, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_BILLING_DOCUMENT_SRV/A_BillingDocument",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"BillingDocument,BillingDocumentType,SoldToParty,TotalNetAmount,TransactionCurrency,BillingDocumentDate"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchBillingDocuments?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, billingDocuments: rows.map((r) => ({ id: r.BillingDocument, type: r.BillingDocumentType, soldToParty: r.SoldToParty, netAmount: Number(r.TotalNetAmount), currency: r.TransactionCurrency, date: d(r.BillingDocumentDate) })) }; }"},{id:"sap-list-journal-entry-items",name:"List SAP journal entry line items",shortName:"Journal entries",instruction:"Lists journal entry line items (accounting document items) from SAP S/4HANA with company code, GL account, amount and posting date. Filter by CompanyCode, FiscalYear or PostingDate to keep results focused. Useful for verifying opening balances at cutover.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "CompanyCode eq '1010' and FiscalYear eq '2026'".`},maxResults:{type:"integer",description:"Maximum number of line items to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"fetchJournalItems",instruction:"Fetch accounting document line items, paging through results with $skip.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/API_OPLACCTGDOCITEMCUBE_SRV/A_OperationalAcctgDocItemCube",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$top:"<<pageSize>>",$skip:"<<offset>>",$filter:"<<filter>>",$select:"AccountingDocument,CompanyCode,FiscalYear,GLAccount,AmountInCompanyCodeCurrency,PostingDate"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const d = (v) => { if (typeof v !== 'string' || !v.startsWith('/Date(')) return v; const n = parseInt(v.slice(6), 10); return Number.isFinite(n) ? new Date(n).toISOString().slice(0, 10) : v; }; const rows = (sourceData.fetchJournalItems?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 200); return { total: rows.length, journalItems: rows.map((r) => ({ document: r.AccountingDocument, companyCode: r.CompanyCode, fiscalYear: r.FiscalYear, account: r.GLAccount, amount: Number(r.AmountInCompanyCodeCurrency), postingDate: d(r.PostingDate) })) }; }"},{id:"sap-query-odata",name:"Query any SAP OData service",shortName:"Query any service",instruction:"Queries any SAP S/4HANA OData service and entity set (for example API_PRODUCT_SRV/A_ProductDescription or API_SALES_ORDER_SRV/A_SalesOrderItem) with optional $select and $filter. The workhorse tool for data checks beyond the prebuilt lists.",inputSchema:{type:"object",properties:{servicePath:{type:"string",description:'Service and entity set in SERVICE/EntitySet form, e.g. "API_SALES_ORDER_SRV/A_SalesOrderItem".'},select:{type:"string",description:"Comma-separated OData $select field list. Omit for all fields."},filter:{type:"string",description:"Optional OData $filter expression."},maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 100."}},required:["servicePath"],additionalProperties:!0},steps:[{id:"queryService",instruction:"Query the requested OData service and entity set.",config:{type:"request",systemId:"sap_s4hana",url:"<<sap_s4hana_url>>/<<servicePath>>",method:"GET",headers:{APIKey:"<<sap_s4hana_api_key>>",Accept:"application/json"},queryParams:{$format:"json",$select:"<<select>>",$filter:"<<filter>>",$top:"<<pageSize>>",$skip:"<<offset>>"},pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const rows = response?.data?.d?.results ?? []; const fetched = pageInfo?.mergedResult?.d?.results?.length ?? 0; const max = sourceData?.maxResults ?? 100; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:"(sourceData) => { const rows = (sourceData.queryService?.data?.d?.results ?? []).slice(0, sourceData.maxResults ?? 100); return { total: rows.length, records: rows.map((r) => { const { __metadata, ...rest } = r; return rest; }) }; }"}]},sage100:{bundleId:"sage100",templateId:"sage100",systemId:"sage100",displayName:"Sage 100",description:"Connect on-premises Sage 100 through the superglue Secure Gateway, with a guided setup playbook and a connection test against the Business Object Interface.",systemUrl:"script://runner/vbs32",credentialHint:"Your assistant first helps you connect a Secure Gateway on your Sage 100 server, then collects your Sage company and user details.",requiredCredentialKeys:["sage_home","sage_company","sage_user","sage_password"],mcpServer:{name:"sage-100",displayName:"Sage 100",description:"Sage 100 Business Object Interface access through the Secure Gateway."},installMcpServer:!1,playbook:{id:"sage100-native-integration",name:"Sage 100 Native Integration (BOI)",whenToRun:"Use when connecting a Sage 100 installation to superglue, testing that connection, or building tools that read or write Sage 100 data through the Business Object Interface.",inputs:"A Sage 100 installation on a Windows machine the user can access; a superglue API key for the gateway; the Sage company code, a Sage user with module access, and the path to the MAS90\\Home directory; the business outcome once connected.",instructions:"First check /org/tunnels for a connected gateway with a runner target. If none is connected, guide the user step by step: download the Windows gateway from https://downloads.superglue.cloud/superglue-gateway-windows.exe onto the machine where Sage 100 and Workstation Setup are installed (the gateway must run there, ProvideX.Script is a local 32-bit COM class), create a config.yaml next to it with a tunnel_id, the server_url ending in /ws/tunnels (wss://api.superglue.cloud/ws/tunnels for hosted superglue), an API key from the API Keys page, and the line enable_script_runner: true, then run the executable. That flag is required: it opts the gateway into running Sage scripts (it is code execution on their machine, so it is off by default), and it is what registers the built-in runner target. No targets section is needed. If a tunnel is connected but has no runner target, the gateway is either missing enable_script_runner: true or is an outdated build; have the user add the flag and restart, or download the current gateway from the same URL. When the tunnel with the runner target appears, attach it to the Sage 100 connection with tools.writeConnection (tunnel with that tunnelId) and keep the URL script://runner/vbs32. Collect sage_home (full path to the MAS90\\Home directory, for example C:\\Sage\\Sage100\\MAS90\\Home, not the MAS90 directory itself), sage_company, sage_user and sage_password through the secure credential form. Then run the Test Sage 100 connection tool once and interpret the result: retVal 0 failures carry the Sage reason in sLastErrorMsg (wrong credentials, missing role access, wrong company code); COM error 0x80040154 means the gateway is not running on a machine with Sage 100 Workstation Setup; a no-license message means all Sage user seats are in use. For new capabilities, build tools whose steps use the script protocol with VBScript in the body: log on with SY_Session, set module context before touching data (nSetDate with YYYYMMDD dates, nSetModule, nLookupTask, nSetProgram), use _svc service objects for reads and _bus business objects for writes, and always release the session with nCleanup and DropObject so the license seat frees up. For reads, set each key segment with nSetKeyValue then nFind for a single record, or browse with nMoveFirst and nMoveNext, and read each field with nGetValue passing a variable that receives the value. To write a document that has lines, such as a sales order, get the header _bus object, set the header fields, get its oLines object, call nAddLine, set the line fields, then call nWrite on the header to commit the header and its lines together. A write fails with a lock error if the record is open in the Sage desktop or held by another session, so report the lock message instead of retrying. Each running script briefly consumes a Sage user seat. Ask for explicit approval before any script that writes to Sage, and warn that records open in the Sage desktop UI cause lock errors.",completionCriteria:"The gateway is connected, the installed Sage 100 system has the tunnel attached and credentials saved, and the connection test returned company data from Sage 100. Any additional requested capability works end to end, with writes explicitly approved before they ran."},agentLaunch:{userPrompt:"I just installed the Sage 100 integration. Help me connect my Sage 100 server.",nextSteps:"Your first reply must be short: one line confirming the Sage 100 integration and setup playbook are installed, then start the connection flow. Check /org/tunnels for a connected gateway with a runner target first. If none exists, walk the user through it one step at a time: download https://downloads.superglue.cloud/superglue-gateway-windows.exe onto the Windows machine where Sage 100 is installed and Workstation Setup has run, create a config.yaml next to it with tunnel_id, server_url (wss://api.superglue.cloud/ws/tunnels for hosted superglue), an API key from the API Keys page, and the line enable_script_runner: true, then run it. That flag is required: it opts the gateway into running scripts on their machine (off by default because it is code execution) and is what registers the runner target. No targets are needed in the config. If a tunnel is connected but has no runner target, the gateway is missing enable_script_runner: true or is an outdated build: have the user add the flag and restart, or download the current one from the same URL. Wait for the user to confirm, then verify the tunnel appears and attach it to the Sage 100 connection with tools.writeConnection tunnel, keeping the URL script://runner/vbs32. Use connect with the connection id and fields to save sage_home (full path to the MAS90\\Home directory, for example C:\\Sage\\Sage100\\MAS90\\Home, not MAS90 itself), sage_company (for example ABC for the demo company), sage_user and sage_password. Never send the user to the Connections page. Then run the Test Sage 100 connection tool once. If it fails, explain the specific cause in plain language before retrying. Mention that each test briefly uses one Sage user license seat. Do not list tools or add tips unless asked."},tools:[{id:"sage100-test-connection",name:"Test Sage 100 connection",shortName:"Connection test",instruction:"Logs on to Sage 100 through the Secure Gateway, opens the configured company, and reads the first customer record to verify the Business Object Interface end to end. Briefly consumes one Sage user license seat.",steps:[{id:"testConnection",instruction:"Run a VBScript through the gateway script runner that logs on via SY_Session, sets A/R module context, and reads the first customer.",config:{type:"request",systemId:"sage100",url:"<<sage100_url>>",method:"POST",body:["Option Explicit","On Error Resume Next","Dim oScript, oSS, oCust, retVal, custNo, custName, today",'Set oScript = CreateObject("ProvideX.Script")','FailOnErr "CREATE", " (Sage 100 Workstation Setup has not registered ProvideX.Script on this machine; the gateway must run on a prepared Sage 100 machine)"','oScript.Init "<<sage100_sage_home>>"','FailOnErr "INIT", " (sage_home must be the full path to the MAS90\\Home directory, not MAS90 itself)"','Set oSS = oScript.NewObject("SY_Session")','FailOnErr "SESSION", ""','retVal = oSS.nSetUser("<<sage100_sage_user>>", "<<sage100_sage_password>>")','FailOnErr "LOGON", ""',"If retVal = 0 Then",' WScript.Echo "LOGON FAILED: " & oSS.sLastErrorMsg'," WScript.Quit 1","End If",'retVal = oSS.nSetCompany("<<sage100_sage_company>>")','FailOnErr "COMPANY", ""',"If retVal = 0 Then",' WScript.Echo "COMPANY FAILED: " & oSS.sLastErrorMsg'," oSS.nCleanup"," oSS.DropObject"," WScript.Quit 1","End If",'today = Year(Date) & Right("0" & Month(Date), 2) & Right("0" & Day(Date), 2)','retVal = oSS.nSetDate("A/R", today)','FailOnErr "DATE", ""','retVal = oSS.nSetModule("A/R")','FailOnErr "MODULE", ""','retVal = oSS.nSetProgram(oSS.nLookupTask("AR_Customer_ui"))','FailOnErr "TASK", ""',"If retVal = 0 Then",' WScript.Echo "TASK FAILED: " & oSS.sLastErrorMsg'," oSS.nCleanup"," oSS.DropObject"," WScript.Quit 1","End If",'Set oCust = oScript.NewObject("AR_Customer_svc", oSS)','FailOnErr "CUSTOMER OBJECT", ""',"retVal = oCust.nMoveFirst()",'FailOnErr "READ", ""',"If retVal = 0 Then",' WScript.Echo "READ FAILED: " & oCust.sLastErrorMsg',"Else",' custNo = "" : custName = ""',' retVal = oCust.nGetValue("CustomerNo$", custNo)',' retVal = oCust.nGetValue("CustomerName$", custName)',' FailOnErr "READ VALUE", " (ByRef value marshalling failed)"',' WScript.Echo "CONNECTED - company <<sage100_sage_company>>, first customer: " & custNo & " / " & custName',"End If","oCust.DropObject","oSS.nCleanup","oSS.DropObject","If retVal = 0 Then WScript.Quit 1","","Sub FailOnErr(stage, hint)"," If Err.Number <> 0 Then",' WScript.Echo stage & " FAILED: [0x" & Hex(Err.Number) & "] " & Err.Description & hint'," WScript.Quit 1"," End If","End Sub"].join(`
114
114
  `)}}]}]},sage_intacct:{bundleId:"sage_intacct",templateId:"sage_intacct",systemId:"sage_intacct",displayName:"Sage Intacct",description:"Install a Sage Intacct system, eight read/query tools, fourteen write tools and a native integration playbook.",systemUrl:"https://api.intacct.com/ia/xml/xmlgw.phtml",credentialHint:"Works instantly with a Sage Intacct demo company. Enter your company ID and API user credentials to use your own company. Web Services sender credentials are preconfigured.",requiredCredentialKeys:["sender_id","sender_password","user_id","user_password","company_id"],demoCredentials:{company_id:"IndexCommerceMPP-DEV",user_id:"superglue",user_password:"Linux123___"},mcpServer:{name:"sage-intacct",displayName:"Sage Intacct",description:"Chart of accounts, customers, vendors, journal entries and ad-hoc object queries from Sage Intacct, plus create and update tools for GL accounts, journal entries, invoices, bills, departments, vendors and customers."},installMcpServer:!1,playbook:{id:"sage-intacct-native-integration",name:"Sage Intacct Native Integration",whenToRun:"Use when connecting, validating, querying or extending a Sage Intacct integration through XML Web Services.",inputs:"A configured Sage Intacct system; the object or business process to work with; optional Location/Entity ID for multi-entity companies; validation criteria and desired output.",instructions:"Use the installed read-only tools for chart of accounts, customers, vendors, journal entries, invoices, bills and departments. Use Query any Sage Intacct object for supported objects outside the named library. Use the installed create and update tools for GL accounts, journal entries, invoices, bills, departments, vendors and customers only after the user explicitly confirms the exact records to write; the create tools are not idempotent and re-running them duplicates records. Apply the configured Location/Entity ID when present. Verify every XML Web Services response at control, authentication and function-result level, and preserve Sage support IDs in failures. For other objects or operations, inspect Sage object documentation, create separate least-privilege tools, validate them in a development company and require explicit user confirmation before modifying Sage data.",completionCriteria:"The requested Sage data, write result or validation result is returned; entity scope is correct; Sage XML failures are surfaced as failures with support IDs; no Sage data is modified unless the user explicitly requested and confirmed the write."},agentLaunch:{userPrompt:"I just installed the Sage Intacct integration. What can I do with it?",nextSteps:"Your first reply must be short: one line confirming the Sage Intacct integration and native integration playbook are installed, then collect credentials. The Web Services sender credentials are already configured. Use connect with this system's connection id and fields to save user_id, user_password and company_id, plus optional entity_id when the user wants to target one entity in a multi-entity company. Never send the user to the Connections page. The user id and password are an API user login in the company; company id is the Intacct company id. Once saved, offer one read-only test run. Do not list the installed tools or add tips unless asked. The query tool accepts other supported Intacct object names, and additional read or write tools can be built beyond the default library. The installed create and update tools modify Sage data; run them only after the user confirms the exact records to write."},tools:[{id:"sage-intacct-list-accounts",name:"List Sage Intacct chart of accounts",shortName:"Chart of accounts",instruction:"Lists general ledger accounts (the chart of accounts) from Sage Intacct via the XML Web Services API. Useful for validating an imported chart of accounts after a migration.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryAccounts",instruction:"Query GLACCOUNT records via readByQuery-style paging.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt("<query><object>GLACCOUNT</object><select><field>RECORDNO</field><field>ACCOUNTNO</field><field>TITLE</field><field>ACCOUNTTYPE</field><field>NORMALBALANCE</field><field>STATUS</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.GLACCOUNT : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.GLACCOUNT : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ma({stepId:"queryAccounts",objectNameExpression:"'GLACCOUNT'",collectionName:"accounts",mapExpression:"(record) => ({ recordNo: record.RECORDNO, account: record.ACCOUNTNO, name: record.TITLE, type: record.ACCOUNTTYPE, normalBalance: record.NORMALBALANCE, status: record.STATUS })"})},{id:"sage-intacct-list-customers",name:"List Sage Intacct customers",shortName:"Customers",instruction:"Lists customer master records from Sage Intacct accounts receivable. Useful for verifying migrated AR master data.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryCustomers",instruction:"Query CUSTOMER records.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt("<query><object>CUSTOMER</object><select><field>RECORDNO</field><field>CUSTOMERID</field><field>NAME</field><field>STATUS</field><field>WHENCREATED</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.CUSTOMER : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.CUSTOMER : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ma({stepId:"queryCustomers",objectNameExpression:"'CUSTOMER'",collectionName:"customers",mapExpression:"(record) => ({ recordNo: record.RECORDNO, customerId: record.CUSTOMERID, name: record.NAME, status: record.STATUS, createdOn: record.WHENCREATED })"})},{id:"sage-intacct-list-vendors",name:"List Sage Intacct vendors",shortName:"Vendors",instruction:"Lists vendor master records from Sage Intacct accounts payable. Useful for verifying migrated AP master data.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryVendors",instruction:"Query VENDOR records.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt("<query><object>VENDOR</object><select><field>RECORDNO</field><field>VENDORID</field><field>NAME</field><field>STATUS</field><field>WHENCREATED</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.VENDOR : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.VENDOR : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ma({stepId:"queryVendors",objectNameExpression:"'VENDOR'",collectionName:"vendors",mapExpression:"(record) => ({ recordNo: record.RECORDNO, vendorId: record.VENDORID, name: record.NAME, status: record.STATUS, createdOn: record.WHENCREATED })"})},{id:"sage-intacct-list-journal-entries",name:"List Sage Intacct journal entries",shortName:"Journal entries",instruction:"Lists general ledger entries from Sage Intacct with account, type and amount. Useful for verifying opening balances and postings at cutover.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryJournalEntries",instruction:"Query GLENTRY records.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt("<query><object>GLENTRY</object><select><field>RECORDNO</field><field>BATCHNO</field><field>ACCOUNTNO</field><field>TR_TYPE</field><field>AMOUNT</field><field>ENTRY_DATE</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.GLENTRY : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.GLENTRY : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ma({stepId:"queryJournalEntries",objectNameExpression:"'GLENTRY'",collectionName:"journalEntries",mapExpression:"(record) => ({ recordNo: record.RECORDNO, batch: record.BATCHNO, account: record.ACCOUNTNO, type: record.TR_TYPE, amount: Number(record.AMOUNT), date: record.ENTRY_DATE })"})},{id:"sage-intacct-list-invoices",name:"List Sage Intacct invoices",shortName:"Invoices",instruction:"Lists accounts receivable invoices from Sage Intacct. Useful for verifying migrated open AR at go-live.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryInvoices",instruction:"Query ARINVOICE records.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt("<query><object>ARINVOICE</object><select><field>RECORDNO</field><field>RECORDID</field><field>CUSTOMERID</field><field>TOTALDUE</field><field>WHENCREATED</field><field>STATE</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.ARINVOICE : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.ARINVOICE : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ma({stepId:"queryInvoices",objectNameExpression:"'ARINVOICE'",collectionName:"invoices",mapExpression:"(record) => ({ recordNo: record.RECORDNO, invoiceId: record.RECORDID, customerId: record.CUSTOMERID, totalDue: Number(record.TOTALDUE), createdOn: record.WHENCREATED, state: record.STATE })"})},{id:"sage-intacct-list-bills",name:"List Sage Intacct bills",shortName:"Bills",instruction:"Lists accounts payable bills from Sage Intacct. Useful for verifying migrated open AP at go-live.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryBills",instruction:"Query APBILL records.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt("<query><object>APBILL</object><select><field>RECORDNO</field><field>RECORDID</field><field>VENDORID</field><field>TOTALDUE</field><field>WHENCREATED</field><field>STATE</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.APBILL : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.APBILL : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ma({stepId:"queryBills",objectNameExpression:"'APBILL'",collectionName:"bills",mapExpression:"(record) => ({ recordNo: record.RECORDNO, billId: record.RECORDID, vendorId: record.VENDORID, totalDue: Number(record.TOTALDUE), createdOn: record.WHENCREATED, state: record.STATE })"})},{id:"sage-intacct-list-departments",name:"List Sage Intacct departments",shortName:"Departments",instruction:"Lists department dimensions from Sage Intacct. Useful for validating the dimension setup after an implementation.",inputSchema:{type:"object",properties:{maxResults:{type:"integer",description:"Maximum number of records to return. Defaults to 200."}},additionalProperties:!0},steps:[{id:"queryDepartments",instruction:"Query DEPARTMENT records.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt("<query><object>DEPARTMENT</object><select><field>RECORDNO</field><field>DEPARTMENTID</field><field>TITLE</field><field>STATUS</field></select><pagesize><<pageSize>></pagesize><offset><<offset>></offset></query>"),pagination:{type:"offsetBased",pageSize:"100",stopCondition:"(response, pageInfo, sourceData) => { const dig = (o) => o && o.RESPONSE && o.RESPONSE.OPERATION && o.RESPONSE.OPERATION.RESULT ? o.RESPONSE.OPERATION.RESULT.DATA : undefined; const cur = dig(response && response.data); const cr = cur ? cur.DEPARTMENT : undefined; const rows = Array.isArray(cr) ? cr : (cr ? [cr] : []); const mr = dig(pageInfo && pageInfo.mergedResult); const mraw = mr ? mr.DEPARTMENT : undefined; const fetched = Array.isArray(mraw) ? mraw.length : (mraw ? 1 : 0); const max = (sourceData && sourceData.maxResults) ?? 200; return rows.length === 0 || fetched >= max; }"}}}],outputTransform:ma({stepId:"queryDepartments",objectNameExpression:"'DEPARTMENT'",collectionName:"departments",mapExpression:"(record) => ({ recordNo: record.RECORDNO, departmentId: record.DEPARTMENTID, name: record.TITLE, status: record.STATUS })"})},{id:"sage-intacct-query-object",name:"Query any Sage Intacct object",shortName:"Query any object",instruction:"Queries any Sage Intacct object by name (for example GLACCOUNT, PROJECT, GLENTRY, ARINVOICE) using the XML Web Services readByQuery, with an optional Intacct query filter. The workhorse tool for migration validation beyond the prebuilt lists. Returns up to 1000 records in one call.",inputSchema:{type:"object",properties:{object:{type:"string",description:'Intacct object name, e.g. "GLACCOUNT", "PROJECT", "GLENTRY", "ARINVOICE".'},query:{type:"string",description:`Optional Intacct query filter, e.g. "STATUS = 'active'". Leave empty to return all records.`},maxResults:{type:"integer",description:"Maximum number of records to return (max 1000). Defaults to 100."}},required:["object"],additionalProperties:!0},steps:[{id:"queryObject",instruction:"Run readByQuery for the requested object.",config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt("<readByQuery><object><<(p) => { const value = String(p.object || '').toUpperCase(); if (!/^[A-Z][A-Z0-9_]*$/.test(value)) throw new Error('Sage Intacct object must contain only letters, numbers, and underscores.'); return value; }>></object><fields>*</fields><query><<(p) => String(p.query || '').replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;')>></query><pagesize><<(p) => Math.min(Math.max(Number(p.maxResults) || 100, 1), 1000)>></pagesize></readByQuery>")}}],outputTransform:ma({stepId:"queryObject",objectNameExpression:"(sourceData && sourceData.object ? String(sourceData.object) : '').toUpperCase()",collectionName:"records",includeTotalCount:!0})},{id:"sage-intacct-create-journal-entry",name:"Create Sage Intacct journal entry",shortName:"Create journal entry",instruction:"Creates a journal entry (GLBATCH with GLENTRY lines) in Sage Intacct via the XML Web Services API. Debits and credits must balance. Re-running this tool creates another journal entry; it is not idempotent.",inputSchema:{type:"object",properties:{journal:{type:"string",description:'Journal symbol, e.g. "GJ". Defaults to GJ.'},date:{type:"string",description:"Posting date as YYYY-MM-DD."},title:{type:"string",description:"Journal entry description."},lines:{type:"array",description:"Journal lines. Debit and credit totals must balance.",items:{type:"object",properties:{accountNo:{type:"string",description:"GL account number."},type:{type:"string",enum:["debit","credit"]},amount:{type:"number",description:"Positive amount."},department:{type:"string",description:"Optional department ID."},location:{type:"string",description:"Optional location ID."},memo:{type:"string",description:"Optional line description."}},required:["accountNo","type","amount"],additionalProperties:!0}}},required:["date","title","lines"],additionalProperties:!0},steps:[{id:"createJournalEntry",instruction:"Create the GLBATCH record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt(`<create><GLBATCH><JOURNAL><<(sourceData) => { ${ya} return esc(sourceData.journal || 'GJ'); }>></JOURNAL><BATCH_DATE><<(sourceData) => { ${B$} return toIntacctDate(sourceData.date); }>></BATCH_DATE><BATCH_TITLE><<(sourceData) => { ${ya} return esc(sourceData.title); }>></BATCH_TITLE><ENTRIES><<(sourceData) => { ${ya} ${Q$} ${v$} const lines = Array.isArray(sourceData.lines) ? sourceData.lines : []; if (lines.length === 0) throw new Error('lines must contain at least one journal line.'); assertBalanced(lines); return lines.map(lineXml).join(''); }>></ENTRIES></GLBATCH></create>`)}}],outputTransform:gu({stepId:"createJournalEntry",objectName:"GLBATCH"})},{id:"sage-intacct-update-journal-entry",name:"Update Sage Intacct journal entry",shortName:"Update journal entry",instruction:"Updates an existing journal entry (GLBATCH) in Sage Intacct by record number. Posted or locked entries may refuse updates. When lines are provided they replace all existing lines of the entry.",inputSchema:{type:"object",properties:{recordNo:{type:"integer",description:"RECORDNO of the journal entry to update."},journal:{type:"string",description:"Optional new journal symbol."},date:{type:"string",description:"Optional new posting date as YYYY-MM-DD."},title:{type:"string",description:"Optional new description."},lines:{type:"array",description:"Optional replacement lines. When set, they replace every existing line and must balance.",items:{type:"object",properties:{accountNo:{type:"string",description:"GL account number."},type:{type:"string",enum:["debit","credit"]},amount:{type:"number",description:"Positive amount."},department:{type:"string",description:"Optional department ID."},location:{type:"string",description:"Optional location ID."},memo:{type:"string",description:"Optional line description."}},required:["accountNo","type","amount"],additionalProperties:!0}}},required:["recordNo"],additionalProperties:!0},steps:[{id:"updateJournalEntry",instruction:"Update the GLBATCH record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt(`<update><GLBATCH><RECORDNO><<(sourceData) => { const recordNo = Number(sourceData.recordNo); if (!Number.isInteger(recordNo) || recordNo <= 0) throw new Error('recordNo must be a positive integer.'); return recordNo; }>></RECORDNO><<(sourceData) => { ${ya} ${B$} ${Q$} ${v$} let xml = ''; if (sourceData.journal) xml += '<JOURNAL>' + esc(sourceData.journal) + '</JOURNAL>'; if (sourceData.date) xml += '<BATCH_DATE>' + toIntacctDate(sourceData.date) + '</BATCH_DATE>'; if (sourceData.title) xml += '<BATCH_TITLE>' + esc(sourceData.title) + '</BATCH_TITLE>'; if (Array.isArray(sourceData.lines) && sourceData.lines.length > 0) { assertBalanced(sourceData.lines); xml += '<ENTRIES>' + sourceData.lines.map(lineXml).join('') + '</ENTRIES>'; } if (!xml) throw new Error('Provide at least one field to update.'); return xml; }>></GLBATCH></update>`)}}],outputTransform:gu({stepId:"updateJournalEntry",objectName:"GLBATCH"})},{id:"sage-intacct-create-vendor",name:"Create Sage Intacct vendor",shortName:"Create vendor",instruction:"Creates a vendor master record in Sage Intacct via the XML Web Services API. Omit vendorId when the company uses vendor auto-numbering. Re-running this tool creates another vendor; it is not idempotent.",inputSchema:{type:"object",properties:{vendorId:{type:"string",description:"Vendor ID. Omit when auto-numbering assigns it."},name:{type:"string",description:"Vendor name."},taxId:{type:"string",description:"Optional tax ID."}},required:["name"],additionalProperties:!0},steps:[{id:"createVendor",instruction:"Create the VENDOR record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt(`<create><VENDOR><<(sourceData) => { ${ya} if (!sourceData.name) throw new Error('name is required.'); let xml = ''; if (sourceData.vendorId) xml += '<VENDORID>' + esc(sourceData.vendorId) + '</VENDORID>'; xml += '<NAME>' + esc(sourceData.name) + '</NAME>'; if (sourceData.taxId) xml += '<TAXID>' + esc(sourceData.taxId) + '</TAXID>'; return xml; }>></VENDOR></create>`)}}],outputTransform:gu({stepId:"createVendor",objectName:"VENDOR"})},{id:"sage-intacct-update-vendor",name:"Update Sage Intacct vendor",shortName:"Update vendor",instruction:"Updates an existing vendor master record in Sage Intacct by record number. Only the provided fields change.",inputSchema:{type:"object",properties:{recordNo:{type:"integer",description:"RECORDNO of the vendor to update."},name:{type:"string",description:"Optional new vendor name."},status:{type:"string",enum:["active","inactive"]},taxId:{type:"string",description:"Optional new tax ID."}},required:["recordNo"],additionalProperties:!0},steps:[{id:"updateVendor",instruction:"Update the VENDOR record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt(`<update><VENDOR><RECORDNO><<(sourceData) => { const recordNo = Number(sourceData.recordNo); if (!Number.isInteger(recordNo) || recordNo <= 0) throw new Error('recordNo must be a positive integer.'); return recordNo; }>></RECORDNO><<(sourceData) => { ${ya} let xml = ''; if (sourceData.name) xml += '<NAME>' + esc(sourceData.name) + '</NAME>'; if (sourceData.status) xml += '<STATUS>' + esc(sourceData.status) + '</STATUS>'; if (sourceData.taxId) xml += '<TAXID>' + esc(sourceData.taxId) + '</TAXID>'; if (!xml) throw new Error('Provide at least one field to update.'); return xml; }>></VENDOR></update>`)}}],outputTransform:gu({stepId:"updateVendor",objectName:"VENDOR"})},{id:"sage-intacct-create-customer",name:"Create Sage Intacct customer",shortName:"Create customer",instruction:"Creates a customer master record in Sage Intacct via the XML Web Services API. Omit customerId when the company uses customer auto-numbering. Re-running this tool creates another customer; it is not idempotent.",inputSchema:{type:"object",properties:{customerId:{type:"string",description:"Customer ID. Omit when auto-numbering assigns it."},name:{type:"string",description:"Customer name."},taxId:{type:"string",description:"Optional tax ID."}},required:["name"],additionalProperties:!0},steps:[{id:"createCustomer",instruction:"Create the CUSTOMER record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt(`<create><CUSTOMER><<(sourceData) => { ${ya} if (!sourceData.name) throw new Error('name is required.'); let xml = ''; if (sourceData.customerId) xml += '<CUSTOMERID>' + esc(sourceData.customerId) + '</CUSTOMERID>'; xml += '<NAME>' + esc(sourceData.name) + '</NAME>'; if (sourceData.taxId) xml += '<TAXID>' + esc(sourceData.taxId) + '</TAXID>'; return xml; }>></CUSTOMER></create>`)}}],outputTransform:gu({stepId:"createCustomer",objectName:"CUSTOMER"})},{id:"sage-intacct-update-customer",name:"Update Sage Intacct customer",shortName:"Update customer",instruction:"Updates an existing customer master record in Sage Intacct by record number. Only the provided fields change.",inputSchema:{type:"object",properties:{recordNo:{type:"integer",description:"RECORDNO of the customer to update."},name:{type:"string",description:"Optional new customer name."},status:{type:"string",enum:["active","inactive"]},taxId:{type:"string",description:"Optional new tax ID."}},required:["recordNo"],additionalProperties:!0},steps:[{id:"updateCustomer",instruction:"Update the CUSTOMER record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt(`<update><CUSTOMER><RECORDNO><<(sourceData) => { const recordNo = Number(sourceData.recordNo); if (!Number.isInteger(recordNo) || recordNo <= 0) throw new Error('recordNo must be a positive integer.'); return recordNo; }>></RECORDNO><<(sourceData) => { ${ya} let xml = ''; if (sourceData.name) xml += '<NAME>' + esc(sourceData.name) + '</NAME>'; if (sourceData.status) xml += '<STATUS>' + esc(sourceData.status) + '</STATUS>'; if (sourceData.taxId) xml += '<TAXID>' + esc(sourceData.taxId) + '</TAXID>'; if (!xml) throw new Error('Provide at least one field to update.'); return xml; }>></CUSTOMER></update>`)}}],outputTransform:gu({stepId:"updateCustomer",objectName:"CUSTOMER"})},{id:"sage-intacct-create-account",name:"Create Sage Intacct GL account",shortName:"Create GL account",instruction:"Creates a general ledger account in Sage Intacct via the XML Web Services API. Re-running this tool creates another account; it is not idempotent.",inputSchema:{type:"object",required:["accountNo","title","normalBalance","accountType"],properties:{title:{type:"string"},accountNo:{type:"string"},accountType:{type:"string",enum:["balancesheet","incomestatement"]},normalBalance:{type:"string",enum:["debit","credit"]},closingType:{type:"string",enum:["non-closing account","closing account"],description:"Period-end closing type. Defaults to non-closing account."},closingAccountNo:{type:"string",description:"Account to close into. Sage requires it when closingType is closing account."}}},steps:[{id:"createAccount",instruction:"Create the GLACCOUNT record via the Sage Intacct XML API.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt(`<create><GLACCOUNT><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); if (!sourceData.accountNo) throw new Error('accountNo is required.'); if (!sourceData.title) throw new Error('title is required.'); let xml = '<ACCOUNTNO>' + esc(sourceData.accountNo) + '</ACCOUNTNO>'; xml += '<TITLE>' + esc(sourceData.title) + '</TITLE>'; xml += '<NORMALBALANCE>' + esc(sourceData.normalBalance || 'debit') + '</NORMALBALANCE>'; xml += '<ACCOUNTTYPE>' + esc(sourceData.accountType || 'balancesheet') + '</ACCOUNTTYPE>'; xml += '<CLOSINGTYPE>' + esc(sourceData.closingType || 'non-closing account') + '</CLOSINGTYPE>'; if (sourceData.closingAccountNo) xml += '<CLOSINGACCOUNTNO>' + esc(sourceData.closingAccountNo) + '</CLOSINGACCOUNTNO>'; return xml; }>></GLACCOUNT></create>`)}}],outputTransform:"(sourceData) => { const response = sourceData.createAccount && sourceData.createAccount.data ? sourceData.createAccount.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.GLACCOUNT || data.glaccount) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: record && record.RECORDNO ? Number(record.RECORDNO) : undefined, record }; }"},{id:"sage-intacct-update-account",name:"Update Sage Intacct GL account",shortName:"Update GL account",instruction:"Updates an existing general ledger account in Sage Intacct by account number. Only the provided fields change.",inputSchema:{type:"object",required:["accountNo"],properties:{title:{type:"string"},accountNo:{type:"string"},accountType:{type:"string",enum:["balancesheet","incomestatement"]},normalBalance:{type:"string",enum:["debit","credit"]},status:{type:"string",enum:["active","inactive"]}}},steps:[{id:"updateAccount",instruction:"Update the GLACCOUNT record by account number.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt(`<update><GLACCOUNT><ACCOUNTNO><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); if (!sourceData.accountNo) throw new Error('accountNo is required.'); return esc(sourceData.accountNo); }>></ACCOUNTNO><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); let xml = ''; if (sourceData.title) xml += '<TITLE>' + esc(sourceData.title) + '</TITLE>'; if (sourceData.normalBalance) xml += '<NORMALBALANCE>' + esc(sourceData.normalBalance) + '</NORMALBALANCE>'; if (sourceData.accountType) xml += '<ACCOUNTTYPE>' + esc(sourceData.accountType) + '</ACCOUNTTYPE>'; if (sourceData.status) xml += '<STATUS>' + esc(sourceData.status) + '</STATUS>'; if (!xml) throw new Error('Provide at least one field to update.'); return xml; }>></GLACCOUNT></update>`)}}],outputTransform:"(sourceData) => { const response = sourceData.updateAccount && sourceData.updateAccount.data ? sourceData.updateAccount.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.GLACCOUNT || data.glaccount) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { accountNo: sourceData.accountNo, record }; }"},{id:"sage-intacct-create-invoice",name:"Create Sage Intacct AR invoice",shortName:"Create invoice",instruction:"Creates an AR invoice in Sage Intacct via the XML Web Services API. Requires a customer ID, transaction date, and at least one line item with a GL account and amount. Re-running creates another invoice; it is not idempotent.",inputSchema:{type:"object",required:["customerId","dateCreated","dateDue","lines"],properties:{lines:{type:"array",items:{type:"object",required:["glAccountNo","amount"],properties:{memo:{type:"string"},amount:{type:"number"},glAccountNo:{type:"string"},departmentId:{type:"string"},locationId:{type:"string"},vendorId:{type:"string"},customerId:{type:"string"},projectId:{type:"string"}}}},dateDue:{type:"string"},customerId:{type:"string"},dateCreated:{type:"string"},datePosted:{type:"string"},termName:{type:"string"},description:{type:"string"}}},steps:[{id:"createInvoice",instruction:"Create the ARINVOICE record with line items.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt("<create><ARINVOICE><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('\"', '&quot;').replaceAll(\"'\", '&apos;'); if (!sourceData.customerId) throw new Error('customerId is required.'); if (!sourceData.dateCreated) throw new Error('dateCreated is required (YYYY-MM-DD).'); const lines = Array.isArray(sourceData.lines) ? sourceData.lines : []; if (lines.length === 0) throw new Error('lines must contain at least one invoice line.'); const match = String(sourceData.dateCreated).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); const dateXml = match ? `<WHENCREATED><YEAR>${match[1]}</YEAR><MONTH>${match[2]}</MONTH><DAY>${match[3]}</DAY></WHENCREATED>` : `<WHENCREATED>${esc(sourceData.dateCreated)}</WHENCREATED>`; let xml = '<CUSTOMERID>' + esc(sourceData.customerId) + '</CUSTOMERID>'; xml += dateXml; if (sourceData.datePosted) { const mp = String(sourceData.datePosted).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); if (mp) xml += `<WHENPOSTED><YEAR>${mp[1]}</YEAR><MONTH>${mp[2]}</MONTH><DAY>${mp[3]}</DAY></WHENPOSTED>`; } if (sourceData.dateDue) { const md = String(sourceData.dateDue).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); if (md) xml += `<WHENDUE><YEAR>${md[1]}</YEAR><MONTH>${md[2]}</MONTH><DAY>${md[3]}</DAY></WHENDUE>`; } else if (sourceData.termName) { xml += '<TERMNAME>' + esc(sourceData.termName) + '</TERMNAME>'; } if (sourceData.description) xml += '<DESCRIPTION>' + esc(sourceData.description) + '</DESCRIPTION>'; xml += '<ARINVOICEITEMS>'; lines.forEach((line) => { if (!line.glAccountNo) throw new Error('Each line requires glAccountNo.'); if (line.amount == null) throw new Error('Each line requires amount.'); xml += '<ARINVOICEITEM>'; xml += '<ACCOUNTNO>' + esc(line.glAccountNo) + '</ACCOUNTNO>'; xml += '<AMOUNT>' + Number(line.amount) + '</AMOUNT>'; if (line.memo) xml += '<MEMO>' + esc(line.memo) + '</MEMO>'; if (line.departmentId) xml += '<DEPARTMENTID>' + esc(line.departmentId) + '</DEPARTMENTID>'; if (line.locationId) xml += '<LOCATIONID>' + esc(line.locationId) + '</LOCATIONID>'; if (line.vendorId) xml += '<VENDORID>' + esc(line.vendorId) + '</VENDORID>'; if (line.customerId) xml += '<CUSTOMERID>' + esc(line.customerId) + '</CUSTOMERID>'; if (line.projectId) xml += '<PROJECTID>' + esc(line.projectId) + '</PROJECTID>'; xml += '</ARINVOICEITEM>'; }); xml += '</ARINVOICEITEMS>'; return xml; }>></ARINVOICE></create>")}}],outputTransform:"(sourceData) => { const response = sourceData.createInvoice && sourceData.createInvoice.data ? sourceData.createInvoice.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.ARINVOICE || data.arinvoice) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: record && record.RECORDNO ? Number(record.RECORDNO) : undefined, record }; }"},{id:"sage-intacct-update-invoice",name:"Update Sage Intacct AR invoice",shortName:"Update invoice",instruction:"Updates an existing AR invoice in Sage Intacct by record number. Only the provided fields change. Line items can be added or updated by line number.",inputSchema:{type:"object",required:["recordNo"],properties:{recordNo:{type:"integer"},description:{type:"string"},customerId:{type:"string"},dateCreated:{type:"string"},dateDue:{type:"string"},termName:{type:"string"},lines:{type:"array",items:{type:"object",properties:{lineNo:{type:"integer"},memo:{type:"string"},amount:{type:"number"},glAccountNo:{type:"string"},departmentId:{type:"string"},locationId:{type:"string"},vendorId:{type:"string"},customerId:{type:"string"},projectId:{type:"string"}}}}}},steps:[{id:"updateInvoice",instruction:"Update the ARINVOICE record by RECORDNO.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt("<update><ARINVOICE><RECORDNO><<(sourceData) => { const recordNo = Number(sourceData.recordNo); if (!Number.isInteger(recordNo) || recordNo <= 0) throw new Error('recordNo must be a positive integer.'); return recordNo; }>></RECORDNO><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('\"', '&quot;').replaceAll(\"'\", '&apos;'); let xml = ''; if (sourceData.customerId) xml += '<CUSTOMERID>' + esc(sourceData.customerId) + '</CUSTOMERID>'; if (sourceData.dateCreated) { const match = String(sourceData.dateCreated).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); if (match) xml += `<WHENCREATED><YEAR>${match[1]}</YEAR><MONTH>${match[2]}</MONTH><DAY>${match[3]}</DAY></WHENCREATED>`; } if (sourceData.dateDue) { const md = String(sourceData.dateDue).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); if (md) xml += `<WHENDUE><YEAR>${md[1]}</YEAR><MONTH>${md[2]}</MONTH><DAY>${md[3]}</DAY></WHENDUE>`; } if (sourceData.termName) xml += '<TERMNAME>' + esc(sourceData.termName) + '</TERMNAME>'; if (sourceData.description) xml += '<DESCRIPTION>' + esc(sourceData.description) + '</DESCRIPTION>'; const lines = Array.isArray(sourceData.lines) ? sourceData.lines : []; if (lines.length > 0) { xml += '<ARINVOICEITEMS>'; lines.forEach((line) => { xml += '<ARINVOICEITEM>'; if (line.lineNo) xml += '<LINE_NO>' + Number(line.lineNo) + '</LINE_NO>'; if (line.glAccountNo) xml += '<ACCOUNTNO>' + esc(line.glAccountNo) + '</ACCOUNTNO>'; if (line.amount != null) xml += '<AMOUNT>' + Number(line.amount) + '</AMOUNT>'; if (line.memo) xml += '<MEMO>' + esc(line.memo) + '</MEMO>'; if (line.departmentId) xml += '<DEPARTMENTID>' + esc(line.departmentId) + '</DEPARTMENTID>'; if (line.locationId) xml += '<LOCATIONID>' + esc(line.locationId) + '</LOCATIONID>'; if (line.vendorId) xml += '<VENDORID>' + esc(line.vendorId) + '</VENDORID>'; if (line.customerId) xml += '<CUSTOMERID>' + esc(line.customerId) + '</CUSTOMERID>'; if (line.projectId) xml += '<PROJECTID>' + esc(line.projectId) + '</PROJECTID>'; xml += '</ARINVOICEITEM>'; }); xml += '</ARINVOICEITEMS>'; } if (!xml && lines.length === 0) throw new Error('Provide at least one field to update.'); return xml; }>></ARINVOICE></update>")}}],outputTransform:"(sourceData) => { const response = sourceData.updateInvoice && sourceData.updateInvoice.data ? sourceData.updateInvoice.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.ARINVOICE || data.arinvoice) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: sourceData.recordNo, record }; }"},{id:"sage-intacct-create-bill",name:"Create Sage Intacct AP bill",shortName:"Create bill",instruction:"Creates an AP bill in Sage Intacct via the XML Web Services API. Requires a vendor ID, transaction date, and at least one line item with a GL account and amount. Re-running creates another bill; it is not idempotent.",inputSchema:{type:"object",required:["lines","dateDue","vendorId","dateCreated"],properties:{lines:{type:"array",items:{type:"object",required:["glAccountNo","amount"],properties:{memo:{type:"string"},amount:{type:"number"},glAccountNo:{type:"string"},departmentId:{type:"string"},locationId:{type:"string"},vendorId:{type:"string"},customerId:{type:"string"},projectId:{type:"string"}}}},dateDue:{type:"string"},vendorId:{type:"string"},dateCreated:{type:"string"},datePosted:{type:"string"},termName:{type:"string"},description:{type:"string"}}},steps:[{id:"createBill",instruction:"Create the APBILL record with line items.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt(`<create><APBILL><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); if (!sourceData.vendorId) throw new Error('vendorId is required.'); if (!sourceData.dateCreated) throw new Error('dateCreated is required (YYYY-MM-DD).'); const lines = Array.isArray(sourceData.lines) ? sourceData.lines : []; if (lines.length === 0) throw new Error('lines must contain at least one bill line.'); const match = String(sourceData.dateCreated).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); const dateStr = match ? match[2] + '/' + match[3] + '/' + match[1] : sourceData.dateCreated; let xml = '<VENDORID>' + esc(sourceData.vendorId) + '</VENDORID>'; xml += '<WHENCREATED>' + esc(dateStr) + '</WHENCREATED>'; if (sourceData.datePosted) { const mp = String(sourceData.datePosted).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); xml += '<WHENPOSTED>' + esc(mp ? mp[2] + '/' + mp[3] + '/' + mp[1] : sourceData.datePosted) + '</WHENPOSTED>'; } if (sourceData.dateDue) { const md = String(sourceData.dateDue).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); xml += '<WHENDUE>' + esc(md ? md[2] + '/' + md[3] + '/' + md[1] : sourceData.dateDue) + '</WHENDUE>'; } else if (sourceData.termName) { xml += '<TERMNAME>' + esc(sourceData.termName) + '</TERMNAME>'; } if (sourceData.description) xml += '<DESCRIPTION>' + esc(sourceData.description) + '</DESCRIPTION>'; xml += '<APBILLITEMS>'; lines.forEach((line) => { if (!line.glAccountNo) throw new Error('Each line requires glAccountNo.'); if (line.amount == null) throw new Error('Each line requires amount.'); xml += '<APBILLITEM>'; xml += '<ACCOUNTNO>' + esc(line.glAccountNo) + '</ACCOUNTNO>'; xml += '<AMOUNT>' + Number(line.amount) + '</AMOUNT>'; if (line.memo) xml += '<MEMO>' + esc(line.memo) + '</MEMO>'; if (line.departmentId) xml += '<DEPARTMENTID>' + esc(line.departmentId) + '</DEPARTMENTID>'; if (line.locationId) xml += '<LOCATIONID>' + esc(line.locationId) + '</LOCATIONID>'; if (line.vendorId) xml += '<VENDORID>' + esc(line.vendorId) + '</VENDORID>'; if (line.customerId) xml += '<CUSTOMERID>' + esc(line.customerId) + '</CUSTOMERID>'; if (line.projectId) xml += '<PROJECTID>' + esc(line.projectId) + '</PROJECTID>'; xml += '</APBILLITEM>'; }); xml += '</APBILLITEMS>'; return xml; }>></APBILL></create>`)}}],outputTransform:"(sourceData) => { const response = sourceData.createBill && sourceData.createBill.data ? sourceData.createBill.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.APBILL || data.apbill) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: record && record.RECORDNO ? Number(record.RECORDNO) : undefined, record }; }"},{id:"sage-intacct-update-bill",name:"Update Sage Intacct AP bill",shortName:"Update bill",instruction:"Updates an existing AP bill in Sage Intacct by record number. Only the provided fields change. Line items can be added or updated by line number.",inputSchema:{type:"object",required:["recordNo"],properties:{recordNo:{type:"integer"},description:{type:"string"},vendorId:{type:"string"},dateCreated:{type:"string"},dateDue:{type:"string"},termName:{type:"string"},lines:{type:"array",items:{type:"object",properties:{lineNo:{type:"integer"},memo:{type:"string"},amount:{type:"number"},glAccountNo:{type:"string"},departmentId:{type:"string"},locationId:{type:"string"},vendorId:{type:"string"},customerId:{type:"string"},projectId:{type:"string"}}}}}},steps:[{id:"updateBill",instruction:"Update the APBILL record by RECORDNO.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt(`<update><APBILL><RECORDNO><<(sourceData) => { const recordNo = Number(sourceData.recordNo); if (!Number.isInteger(recordNo) || recordNo <= 0) throw new Error('recordNo must be a positive integer.'); return recordNo; }>></RECORDNO><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); let xml = ''; if (sourceData.vendorId) xml += '<VENDORID>' + esc(sourceData.vendorId) + '</VENDORID>'; if (sourceData.dateCreated) { const match = String(sourceData.dateCreated).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); xml += '<WHENCREATED>' + esc(match ? match[2] + '/' + match[3] + '/' + match[1] : sourceData.dateCreated) + '</WHENCREATED>'; } if (sourceData.dateDue) { const md = String(sourceData.dateDue).match(/^(\\d{4})-(\\d{2})-(\\d{2})/); xml += '<WHENDUE>' + esc(md ? md[2] + '/' + md[3] + '/' + md[1] : sourceData.dateDue) + '</WHENDUE>'; } if (sourceData.termName) xml += '<TERMNAME>' + esc(sourceData.termName) + '</TERMNAME>'; if (sourceData.description) xml += '<DESCRIPTION>' + esc(sourceData.description) + '</DESCRIPTION>'; const lines = Array.isArray(sourceData.lines) ? sourceData.lines : []; if (lines.length > 0) { xml += '<APBILLITEMS>'; lines.forEach((line) => { xml += '<APBILLITEM>'; if (line.lineNo) xml += '<LINE_NO>' + Number(line.lineNo) + '</LINE_NO>'; if (line.glAccountNo) xml += '<ACCOUNTNO>' + esc(line.glAccountNo) + '</ACCOUNTNO>'; if (line.amount != null) xml += '<AMOUNT>' + Number(line.amount) + '</AMOUNT>'; if (line.memo) xml += '<MEMO>' + esc(line.memo) + '</MEMO>'; if (line.departmentId) xml += '<DEPARTMENTID>' + esc(line.departmentId) + '</DEPARTMENTID>'; if (line.locationId) xml += '<LOCATIONID>' + esc(line.locationId) + '</LOCATIONID>'; if (line.vendorId) xml += '<VENDORID>' + esc(line.vendorId) + '</VENDORID>'; if (line.customerId) xml += '<CUSTOMERID>' + esc(line.customerId) + '</CUSTOMERID>'; if (line.projectId) xml += '<PROJECTID>' + esc(line.projectId) + '</PROJECTID>'; xml += '</APBILLITEM>'; }); xml += '</APBILLITEMS>'; } if (!xml && lines.length === 0) throw new Error('Provide at least one field to update.'); return xml; }>></APBILL></update>`)}}],outputTransform:"(sourceData) => { const response = sourceData.updateBill && sourceData.updateBill.data ? sourceData.updateBill.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.APBILL || data.apbill) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: sourceData.recordNo, record }; }"},{id:"sage-intacct-create-department",name:"Create Sage Intacct department",shortName:"Create department",instruction:"Creates a department in Sage Intacct via the XML Web Services API. Requires a department ID and title. Re-running creates another department; it is not idempotent.",inputSchema:{type:"object",required:["departmentId","title"],properties:{title:{type:"string"},departmentId:{type:"string"}}},steps:[{id:"createDepartment",instruction:"Create the DEPARTMENT record.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt(`<create><DEPARTMENT><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); if (!sourceData.departmentId) throw new Error('departmentId is required.'); if (!sourceData.title) throw new Error('title is required.'); let xml = '<DEPARTMENTID>' + esc(sourceData.departmentId) + '</DEPARTMENTID>'; xml += '<TITLE>' + esc(sourceData.title) + '</TITLE>'; if (sourceData.parentId) xml += '<PARENTID>' + esc(sourceData.parentId) + '</PARENTID>'; if (sourceData.status) xml += '<STATUS>' + esc(sourceData.status) + '</STATUS>'; return xml; }>></DEPARTMENT></create>`)}}],outputTransform:"(sourceData) => { const response = sourceData.createDepartment && sourceData.createDepartment.data ? sourceData.createDepartment.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.DEPARTMENT || data.department) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: record && record.RECORDNO ? Number(record.RECORDNO) : undefined, record }; }"},{id:"sage-intacct-update-department",name:"Update Sage Intacct department",shortName:"Update department",instruction:"Updates an existing department in Sage Intacct by record number. Only the provided fields change.",inputSchema:{type:"object",required:["recordNo"],properties:{title:{type:"string"},recordNo:{type:"integer"},parentId:{type:"string"},status:{type:"string",enum:["active","inactive"]}}},steps:[{id:"updateDepartment",instruction:"Update the DEPARTMENT record by RECORDNO.",modify:!0,config:{type:"request",systemId:"sage_intacct",url:"<<sage_intacct_url>>",method:"POST",headers:{"Content-Type":"application/xml",Accept:"application/xml"},body:jt(`<update><DEPARTMENT><RECORDNO><<(sourceData) => { const recordNo = Number(sourceData.recordNo); if (!Number.isInteger(recordNo) || recordNo <= 0) throw new Error('recordNo must be a positive integer.'); return recordNo; }>></RECORDNO><<(sourceData) => { const esc = (value) => String(value).replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&apos;'); let xml = ''; if (sourceData.title) xml += '<TITLE>' + esc(sourceData.title) + '</TITLE>'; if (sourceData.parentId) xml += '<PARENTID>' + esc(sourceData.parentId) + '</PARENTID>'; if (sourceData.status) xml += '<STATUS>' + esc(sourceData.status) + '</STATUS>'; if (!xml) throw new Error('Provide at least one field to update.'); return xml; }>></DEPARTMENT></update>`)}}],outputTransform:"(sourceData) => { const response = sourceData.updateDepartment && sourceData.updateDepartment.data ? sourceData.updateDepartment.data.RESPONSE : undefined; const control = response ? response.CONTROL : undefined; const operation = response ? response.OPERATION : undefined; const authentication = operation ? operation.AUTHENTICATION : undefined; const result = operation ? operation.RESULT : undefined; const statuses = [control && control.STATUS, authentication && authentication.STATUS, result && result.STATUS].filter(Boolean).map((value) => String(value).toLowerCase()); if (statuses.includes('failure')) { const message = (result && result.ERRORMESSAGE) || (authentication && authentication.ERR ? authentication.ERR.ERRORMESSAGE : undefined) || (control && control.ERR ? control.ERR.ERRORMESSAGE : undefined); const rawErrors = message ? message.ERROR : undefined; const errors = Array.isArray(rawErrors) ? rawErrors : (rawErrors ? [rawErrors] : []); const details = errors.map((error) => [error.ERRORNO, error.DESCRIPTION2 || error.DESCRIPTION, error.CORRECTION].filter(Boolean).join(' - ')).filter(Boolean); const supportIds = errors.map((error) => error.SUPPORTID).filter(Boolean); const suffix = supportIds.length ? ` Sage support ID: ${supportIds.join(', ')}.` : ''; throw new Error(`Sage Intacct request failed${details.length ? `: ${details.join('; ')}` : '.'}${suffix}`); } const data = result ? result.DATA : undefined; const raw = data ? (data.DEPARTMENT || data.department) : undefined; const record = Array.isArray(raw) ? raw[0] : raw; return { recordNo: sourceData.recordNo, record }; }"}]},dynamics365_sales:{bundleId:"dynamics365_sales",templateId:"dynamics365_sales",systemId:"dynamics365_sales",displayName:"Dynamics 365 Sales",description:"Read accounts, contacts and the sales pipeline from Dynamics 365 Sales.",systemUrl:"https://<<api_host>>/api/data/v9.2",credentialHint:"Set api_host to your environment host, then connect with Microsoft OAuth. Your assistant walks you through it.",requiredCredentialKeys:["api_host","access_token"],mcpServer:{name:"dynamics-sales",displayName:"Dynamics 365 Sales",description:"Accounts, contacts, opportunity pipeline and ad-hoc Dataverse queries from Dynamics 365 Sales."},installMcpServer:!0,agentLaunch:{userPrompt:"I just installed the Dynamics 365 Sales bundle. What can I do with it?",nextSteps:'Your first reply must be short: one line confirming the Dynamics MCP server is installed, then ask for their environment host in chat (like contoso.crm.dynamics.com \u2014 it is not a secret, so never collect it through a secure form; form values are redacted and you cannot read them back). When they reply, save it with tools.writeConnection passing secrets: { api_host: "<their host>" } directly, without asking for secure inputs. Then start Microsoft OAuth with connect and substitute the same host into the scopes yourself \u2014 set auth.scopes to "https://<host>/user_impersonation offline_access", never the <<api_host>> placeholder, which Microsoft rejects. OAuth fills access_token automatically; never send the user to the Connections page and never suggest the az CLI. Once connected, the MCP server is ready; offer one test run. Do not list the installed tools, do not add tips unless asked. If asked later: OAuth refresh is automatic, the query tool accepts any Dataverse entity set, and record totals above 5000 are reported as capped by Dataverse rather than exact.'},tools:[{id:"dynamics-list-accounts",name:"List Dynamics 365 accounts",shortName:"Accounts",instruction:"Lists account records from Dynamics 365 with name, account number and creation date. Supports an optional OData $filter. Useful for validating migrated accounts.",inputSchema:{type:"object",properties:{filter:{type:"string",description:`Optional OData $filter expression, e.g. "createdon gt 2026-01-01T00:00:00Z" or "contains(name,'GmbH')".`},maxResults:{type:"integer",description:"Maximum number of accounts to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchAccounts",instruction:"Fetch accounts from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/accounts",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"name,accountnumber,telephone1,websiteurl,createdon,modifiedon",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchAccounts?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, accounts: rows.map((r) => ({ id: r.accountid, name: r.name, accountNumber: r.accountnumber, phone: r.telephone1, website: r.websiteurl, createdOn: r.createdon, modifiedOn: r.modifiedon })) }; }'},{id:"dynamics-list-contacts",name:"List Dynamics 365 contacts",shortName:"Contacts",instruction:"Lists contact records from Dynamics 365 with name, email and creation date. Supports an optional OData $filter. Useful for validating migrated contacts.",inputSchema:{type:"object",properties:{filter:{type:"string",description:'Optional OData $filter expression, e.g. "emailaddress1 eq null" to find contacts missing an email.'},maxResults:{type:"integer",description:"Maximum number of contacts to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchContacts",instruction:"Fetch contacts from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/contacts",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"fullname,emailaddress1,telephone1,jobtitle,createdon,modifiedon",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchContacts?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, contacts: rows.map((r) => ({ id: r.contactid, name: r.fullname, email: r.emailaddress1, phone: r.telephone1, jobTitle: r.jobtitle, createdOn: r.createdon, modifiedOn: r.modifiedon })) }; }'},{id:"dynamics-open-opportunities",name:"List Dynamics 365 open opportunities",shortName:"Open opportunities",instruction:"Lists open opportunities from Dynamics 365 with estimated value and close date. Supports an optional additional OData $filter. Useful for pipeline verification during UAT.",inputSchema:{type:"object",properties:{filter:{type:"string",description:'Optional additional OData $filter combined with the open-state filter, e.g. "estimatedvalue gt 10000".'},maxResults:{type:"integer",description:"Maximum number of opportunities to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchOpportunities",instruction:"Fetch open opportunities from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/opportunities",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"name,estimatedvalue,estimatedclosedate,createdon,statecode,_parentaccountid_value",$filter:'<<(p) => p.filter ? "statecode eq 0 and (" + p.filter + ")" : "statecode eq 0">>',$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchOpportunities?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, opportunities: rows.map((r) => ({ id: r.opportunityid, name: r.name, estimatedValue: r.estimatedvalue, estimatedCloseDate: r.estimatedclosedate, accountId: r._parentaccountid_value, createdOn: r.createdon })) }; }'},{id:"dynamics-list-leads",name:"List Dynamics 365 leads",shortName:"Leads",instruction:"Lists lead records from Dynamics 365 with subject, name and company. Supports an optional OData $filter. Useful for validating migrated leads.",inputSchema:{type:"object",properties:{filter:{type:"string",description:'Optional OData $filter expression, e.g. "statecode eq 0" for open leads.'},maxResults:{type:"integer",description:"Maximum number of records to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchLeads",instruction:"Fetch leads from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/leads",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"subject,fullname,companyname,statecode,createdon,modifiedon",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchLeads?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, records: rows.map((r) => ({ id: r.leadid, subject: r.subject, name: r.fullname, company: r.companyname, state: r.statecode, createdOn: r.createdon, modifiedOn: r.modifiedon })) }; }'},{id:"dynamics-list-cases",name:"List Dynamics 365 cases",shortName:"Cases",instruction:"Lists case (incident) records from Dynamics 365 with title, ticket number and status. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:'Optional OData $filter expression, e.g. "statecode eq 0" for active cases.'},maxResults:{type:"integer",description:"Maximum number of records to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchCases",instruction:"Fetch incidents from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/incidents",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"title,ticketnumber,statecode,createdon,_customerid_value",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchCases?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, records: rows.map((r) => ({ id: r.incidentid, title: r.title, ticketNumber: r.ticketnumber, state: r.statecode, customerId: r._customerid_value, createdOn: r.createdon })) }; }'},{id:"dynamics-list-users",name:"List Dynamics 365 users",shortName:"Users",instruction:"Lists system users from Dynamics 365 with name, email and disabled state. Useful for owner-mapping checks during migrations.",inputSchema:{type:"object",properties:{filter:{type:"string",description:'Optional OData $filter expression, e.g. "isdisabled eq false" for active users.'},maxResults:{type:"integer",description:"Maximum number of records to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchUsers",instruction:"Fetch systemusers from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/systemusers",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"fullname,internalemailaddress,isdisabled,createdon",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchUsers?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, records: rows.map((r) => ({ id: r.systemuserid, name: r.fullname, email: r.internalemailaddress, disabled: r.isdisabled, createdOn: r.createdon })) }; }'},{id:"dynamics-list-products",name:"List Dynamics 365 products",shortName:"Products",instruction:"Lists product catalog records from Dynamics 365 with name, number and state. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{filter:{type:"string",description:'Optional OData $filter expression, e.g. "statecode eq 0" for active products.'},maxResults:{type:"integer",description:"Maximum number of records to return in one call. Defaults to 100."}},additionalProperties:!0},steps:[{id:"fetchProducts",instruction:"Fetch products from the Dataverse Web API.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/products",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"name,productnumber,statecode,createdon",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchProducts?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, records: rows.map((r) => ({ id: r.productid, name: r.name, number: r.productnumber, state: r.statecode, createdOn: r.createdon })) }; }'},{id:"dynamics-query-dataverse",name:"Query any Dynamics 365 entity",shortName:"Query any entity",instruction:'Queries any Dataverse entity set. Required input: entitySet \u2014 the plural entity set name, e.g. "leads", "systemusers", "incidents". Optional inputs: select (OData $select field list), filter (OData $filter expression), maxResults (record cap, default 100). The workhorse tool for CRM migration validation and data quality checks beyond the prebuilt lists.',inputSchema:{type:"object",properties:{entitySet:{type:"string",description:'Dataverse entity set name (plural), e.g. "leads", "systemusers", "incidents".'},select:{type:"string",description:'Comma-separated OData $select field list, e.g. "subject,createdon". Omit for all fields.'},filter:{type:"string",description:"Optional OData $filter expression."},maxResults:{type:"integer",description:"Maximum number of records to return in one call. Defaults to 100."}},required:["entitySet"],additionalProperties:!0},steps:[{id:"queryEntity",instruction:"Query the requested Dataverse entity set.",config:{type:"request",systemId:"dynamics365_sales",url:"https://<<dynamics365_sales_api_host>>/api/data/v9.2/<<entitySet>>",method:"GET",headers:{Authorization:"Bearer <<dynamics365_sales_access_token>>",Accept:"application/json","OData-MaxVersion":"4.0","OData-Version":"4.0","If-None-Match":"null"},queryParams:{$select:"<<select>>",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.queryEntity?.data ?? {}; const rows = data.value ?? []; const capped = data["@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded"] === true; return { total: capped ? null : (data["@odata.count"] ?? rows.length), totalCapped: capped, returned: rows.length, records: rows }; }'}]},dynamics365_business_central:{bundleId:"dynamics365_business_central",templateId:"dynamics365_business_central",systemId:"dynamics365_business_central",displayName:"Dynamics 365 Business Central",description:"Read companies, customers, vendors and the chart of accounts from Business Central.",systemUrl:"https://api.businesscentral.dynamics.com/v2.0/<<environment>>/api/v2.0",credentialHint:"Connect your Business Central environment. Your assistant walks you through it.",requiredCredentialKeys:["environment","access_token"],oauthSignIn:!0,mcpServer:{name:"business-central",displayName:"Dynamics 365 Business Central",description:"Companies, customers, vendors, chart of accounts and ad-hoc entity queries from Business Central."},installMcpServer:!0,agentLaunch:{userPrompt:"I just installed the Dynamics 365 Business Central bundle. What can I do with it?",nextSteps:"Your first reply must be short: one line confirming the Business Central MCP server is installed, then collect the credentials. Use connect with this system's connection id and fields to save environment (their BC environment name, usually production or sandbox) and access_token; never send the user to the Connections page. Fastest token: az account get-access-token --resource https://api.businesscentral.dynamics.com. Once saved, the MCP server is ready; run the companies tool as the test, because its result contains the company id every other tool needs. Do not list the installed tools, do not add tips unless asked. If asked later: tokens expire after about an hour, so a 401 means refresh access_token; the query tool accepts any Business Central entity set like items or salesInvoices."},tools:[{id:"business-central-list-companies",name:"List Business Central companies",shortName:"Companies",instruction:"Lists the companies in the Business Central environment. Run this first: every other Business Central tool needs a companyId from this list.",inputSchema:{type:"object",properties:{},additionalProperties:!0},steps:[{id:"fetchCompanies",instruction:"Fetch the companies in this environment.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"}}}],outputTransform:"(sourceData) => { const rows = sourceData.fetchCompanies?.data?.value ?? []; return { total: rows.length, companies: rows.map((r) => ({ companyId: r.id, name: r.name, displayName: r.displayName })) }; }"},{id:"business-central-list-customers",name:"List Business Central customers",shortName:"Customers",instruction:"Lists customer master records from a Business Central company. Requires a companyId from the companies tool. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},filter:{type:"string",description:`Optional OData $filter expression, e.g. "blocked ne ''" or "contains(displayName,'GmbH')".`},maxResults:{type:"integer",description:"Maximum number of customers to return in one call. Defaults to 100."}},required:["companyId"],additionalProperties:!0},steps:[{id:"fetchCustomers",instruction:"Fetch customers for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/customers",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"id,number,displayName,email,phoneNumber,blocked,lastModifiedDateTime",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchCustomers?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, customers: rows.map((r) => ({ id: r.id, number: r.number, name: r.displayName, email: r.email, phone: r.phoneNumber, blocked: r.blocked, lastModified: r.lastModifiedDateTime })) }; }'},{id:"business-central-list-vendors",name:"List Business Central vendors",shortName:"Vendors",instruction:"Lists vendor master records from a Business Central company. Requires a companyId from the companies tool. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},filter:{type:"string",description:"Optional OData $filter expression."},maxResults:{type:"integer",description:"Maximum number of vendors to return in one call. Defaults to 100."}},required:["companyId"],additionalProperties:!0},steps:[{id:"fetchVendors",instruction:"Fetch vendors for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/vendors",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"id,number,displayName,email,phoneNumber,blocked,lastModifiedDateTime",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchVendors?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, vendors: rows.map((r) => ({ id: r.id, number: r.number, name: r.displayName, email: r.email, phone: r.phoneNumber, blocked: r.blocked, lastModified: r.lastModifiedDateTime })) }; }'},{id:"business-central-list-accounts",name:"List Business Central chart of accounts",shortName:"Chart of accounts",instruction:"Lists general ledger accounts (the chart of accounts) from a Business Central company. Requires a companyId from the companies tool. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},filter:{type:"string",description:`Optional OData $filter expression, e.g. "category eq 'Assets'".`},maxResults:{type:"integer",description:"Maximum number of accounts to return in one call. Defaults to 200."}},required:["companyId"],additionalProperties:!0},steps:[{id:"fetchAccounts",instruction:"Fetch general ledger accounts for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/accounts",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"id,number,displayName,category,subCategory,blocked,accountType",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 200>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchAccounts?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, accounts: rows.map((r) => ({ id: r.id, number: r.number, name: r.displayName, category: r.category, subCategory: r.subCategory, type: r.accountType, blocked: r.blocked })) }; }'},{id:"business-central-list-items",name:"List Business Central items",shortName:"Items",instruction:"Lists item (product) master records from a Business Central company. Requires a companyId from the companies tool. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},filter:{type:"string",description:`Optional OData $filter expression, e.g. "type eq 'Inventory'".`},maxResults:{type:"integer",description:"Maximum number of items to return in one call. Defaults to 100."}},required:["companyId"],additionalProperties:!0},steps:[{id:"fetchItems",instruction:"Fetch items for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/items",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"id,number,displayName,type,unitPrice,inventory,blocked,lastModifiedDateTime",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchItems?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, items: rows.map((r) => ({ id: r.id, number: r.number, name: r.displayName, type: r.type, unitPrice: r.unitPrice, inventory: r.inventory, blocked: r.blocked })) }; }'},{id:"business-central-list-sales-invoices",name:"List Business Central sales invoices",shortName:"Sales invoices",instruction:"Lists sales invoices from a Business Central company with customer, total and status. Requires a companyId from the companies tool. Supports an optional OData $filter.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},filter:{type:"string",description:`Optional OData $filter expression, e.g. "status eq 'Open'".`},maxResults:{type:"integer",description:"Maximum number of invoices to return in one call. Defaults to 100."}},required:["companyId"],additionalProperties:!0},steps:[{id:"fetchSalesInvoices",instruction:"Fetch sales invoices for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/salesInvoices",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"id,number,customerName,invoiceDate,totalAmountIncludingTax,currencyCode,status",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchSalesInvoices?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, invoices: rows.map((r) => ({ id: r.id, number: r.number, customer: r.customerName, date: r.invoiceDate, total: r.totalAmountIncludingTax, currency: r.currencyCode, status: r.status })) }; }'},{id:"business-central-list-gl-entries",name:"List Business Central general ledger entries",shortName:"GL entries",instruction:"Lists general ledger entries from a Business Central company with account, amounts and posting date. Requires a companyId from the companies tool. Filter by postingDate to verify opening balances at cutover.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},filter:{type:"string",description:'Optional OData $filter expression, e.g. "postingDate ge 2026-01-01".'},maxResults:{type:"integer",description:"Maximum number of entries to return in one call. Defaults to 200."}},required:["companyId"],additionalProperties:!0},steps:[{id:"fetchGLEntries",instruction:"Fetch general ledger entries for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/generalLedgerEntries",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"id,entryNumber,postingDate,documentNumber,accountNumber,description,debitAmount,creditAmount",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 200>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.fetchGLEntries?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, entries: rows.map((r) => ({ entryNumber: r.entryNumber, postingDate: r.postingDate, document: r.documentNumber, account: r.accountNumber, description: r.description, debit: r.debitAmount, credit: r.creditAmount })) }; }'},{id:"business-central-query-entity",name:"Query any Business Central entity",shortName:"Query any entity",instruction:"Queries any Business Central entity set by name (for example items, salesInvoices, generalLedgerEntries) within a company, with optional OData $select and $filter. The workhorse tool for migration validation beyond the prebuilt lists.",inputSchema:{type:"object",properties:{companyId:{type:"string",description:"Company id (GUID) from the companies tool."},entitySet:{type:"string",description:'Business Central entity set name, e.g. "items", "salesInvoices", "generalLedgerEntries".'},select:{type:"string",description:"Comma-separated OData $select field list. Omit for all fields."},filter:{type:"string",description:"Optional OData $filter expression."},maxResults:{type:"integer",description:"Maximum number of records to return in one call. Defaults to 100."}},required:["companyId","entitySet"],additionalProperties:!0},steps:[{id:"queryEntity",instruction:"Query the requested entity set for the given company.",config:{type:"request",systemId:"dynamics365_business_central",url:"https://api.businesscentral.dynamics.com/v2.0/<<dynamics365_business_central_environment>>/api/v2.0/companies(<<companyId>>)/<<entitySet>>",method:"GET",headers:{Authorization:"Bearer <<dynamics365_business_central_access_token>>",Accept:"application/json","Data-Access-Intent":"ReadOnly"},queryParams:{$select:"<<select>>",$filter:"<<filter>>",$top:"<<(p) => p.maxResults ?? 100>>",$count:"true"}}}],outputTransform:'(sourceData) => { const data = sourceData.queryEntity?.data ?? {}; const rows = data.value ?? []; return { total: data["@odata.count"] ?? rows.length, records: rows }; }'}]},netsuite:{bundleId:"netsuite",templateId:"netsuite",systemId:XA,displayName:"NetSuite",description:"Install a NetSuite system, ten read/query tools, fourteen write tools and a native integration playbook.",systemUrl:"https://{accountId}.suitetalk.api.netsuite.com/services/rest",credentialHint:"Connects through your own NetSuite integration record with OAuth 2.0. Your assistant asks for the account ID and the integration record's client ID and secret, then opens the NetSuite sign-in.",requiredCredentialKeys:["access_token"],oauthSignIn:!0,mcpServer:{name:"netsuite",displayName:"NetSuite",description:"Chart of accounts, customers, vendors, journal entries, invoices, vendor bills, subsidiaries and dimensions from NetSuite, SuiteQL queries and record lookups, plus create and update tools for journal entries, vendors, customers, GL accounts, invoices, vendor bills and departments."},installMcpServer:!1,playbook:{id:"netsuite-native-integration",name:"NetSuite Native Integration",whenToRun:"Use when connecting, validating, querying or extending a NetSuite integration through REST Web Services and SuiteQL.",inputs:"A NetSuite connection with an OAuth sign-in; the record type or business process to work with; subsidiary scope for OneWorld accounts; validation criteria and desired output.",instructions:"Use the installed read-only tools for the chart of accounts, customers, vendors, journal entry lines, invoices, vendor bills, departments, subsidiaries, classes and locations. Use the SuiteQL query tool for any other record type, join or aggregate, and the get-record tool to inspect one record in full. Use the installed create and update tools for journal entries, vendors, customers, GL accounts, invoices, vendor bills and departments only after the user explicitly confirms the exact records to write; the create tools are not idempotent and re-running them duplicates records. Reference other records by internal ID from the list tools, and pass a subsidiary on OneWorld accounts. Surface NetSuite error details (o:errorDetails) as failures. For other record types or operations, inspect the account's metadata catalog, create separate least-privilege tools, validate them in a sandbox account and require explicit user confirmation before modifying NetSuite data.",completionCriteria:"The requested NetSuite data, write result or validation result is returned; subsidiary scope is correct; NetSuite errors are surfaced as failures with their details; no NetSuite data is modified unless the user explicitly requested and confirmed the write."},agentLaunch:{userPrompt:"I just installed the NetSuite integration. What can I do with it?",nextSteps:`Your first reply must be short: one line confirming the NetSuite integration and native integration playbook are installed. If the user already has a NetSuite connection with an OAuth sign-in under this system id, offer one read-only test run and stop. Otherwise connect it in this order. 1) Ask in chat for the NetSuite account ID (Setup > Company > Company Information, like 1234567 or 1234567_SB1 for a sandbox; it is not a secret). 2) Build the host from it in lowercase with "_" replaced by "-" (1234567_SB1 becomes 1234567-sb1). 3) Call connect with this system id, the user's existing NetSuite connection id if one exists, url https://<host>.suitetalk.api.netsuite.com/services/rest, and auth type oauth2 with oauthClientMode custom, authUrl https://<host>.app.netsuite.com/app/login/oauth2/authorize.nl and tokenUrl https://<host>.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token. Confirm no {accountId} remains in url, authUrl, or tokenUrl before calling it. If /org/oauth-apps/ lists an app for this NetSuite account, pass its oauthAppId; otherwise the card collects the client ID and client secret of their NetSuite integration record and then runs the OAuth sign-in. If they have no integration record yet, explain before calling connect: Setup > Integration > Manage Integrations > New, enable Authorization Code Grant with the REST Web Services and RESTlets scopes, set the redirect URI to the superglue OAuth callback URL exactly, and copy the client ID and secret shown once after saving; the NetSuite role needs REST Web Services and Log in using OAuth 2.0 Access Tokens permissions. Once connected, the integration is ready; offer one read-only test run. Do not list the installed tools or add tips unless asked. If asked later: the sign-in lasts seven days and a 401 means signing in again through connect with the connection id; the SuiteQL tool reads any record type; the installed create and update tools modify NetSuite data, so run them only after the user confirms the exact records to write.`},tools:kye}};Vo.bundles={...Mw,sage_intacct_mcp:{...Mw.sage_intacct,bundleId:"sage_intacct_mcp",description:"Install the Sage Intacct integration and an OAuth-protected MCP server for its read/query and write tools.",installMcpServer:!0},netsuite_mcp:{...Mw.netsuite,bundleId:"netsuite_mcp",description:"Install the NetSuite integration and an OAuth-protected MCP server for its read/query and write tools.",installMcpServer:!0}};function Rye({bundle:t,install:e}){let r=e.tools.map(s=>` - ${s.id}${s.name?` (${s.name})`:""}`).join(`
115
115
  `),n=e.system.requiredCredentialKeys.join(", "),i=e.mcpServer?[` - MCP server: ${e.mcpServer.name} (id: ${e.mcpServer.id})`,"","Silently load the connections and tool-deployment skills before replying. Do not narrate the skill loads.","","The MCP server card is already visible in this conversation with the server URL, its tools, and the client export options for Claude, Cursor, Langdock and curl. Do not describe or reproduce client setup in prose; point at the card."]:["","Silently load the connections skill before replying. Do not narrate the skill load."],o=[`The user just installed the "${t.displayName}" ${e.mcpServer?"MCP server and integration":"integration"} from the superglue website. Everything below already exists. Do not create, rebuild or duplicate any of it.`,"","Installed:",` - System ID: ${e.system.id} (${e.system.name}) at ${t.systemUrl}`," - Tools:",r,e.playbook?` - Playbook: ${e.playbook.name} (id: ${e.playbook.id})`:void 0,...i,"",e.system.hasUserCredentials?t.demoCredentials?"The connection is preloaded with shared demo secrets, so every tool works right now without any setup.":"The user already has a connection with every required secret.":`The user has no connection with every required secret yet, so no tool will run until the user adds the missing values. Required secret names: ${n}. ${t.credentialHint}`,t.agentLaunch.nextSteps,"","The user already saw this inventory on the install screen. Do not repeat it back to them."];return{userPrompt:t.agentLaunch.userPrompt,hiddenStarterMessage:o.filter(s=>s!==void 0).join(`
116
116
  `)}}function Nye(t){return typeof t!="string"||!Object.prototype.hasOwnProperty.call(Vo.bundles,t)?null:Vo.bundles[t]}function Oye(){return Object.values(Vo.bundles)}});var W$=y(ry=>{"use strict";Object.defineProperty(ry,"__esModule",{value:!0});ry.chatVisualArtifactTitle=V$;ry.chatVisualToArtifactHtml=qye;var Sn=mg(),H$=120,xye={stats:"Key numbers",chart:"Chart",flow:"Flow",steps:"Steps",table:"Table",mapping:"Field mapping",migration:"Migration status",reconcile:"Reconciliation",timeline:"Timeline",cards:"Overview",diagram:"Diagram",image:"Images",callout:"Note",custom:"Visual",lesson:"Lesson"},Uye={success:"sg-success",failed:"sg-error",warning:"sg-warning",running:"sg-info"},Mye={positive:"sg-success",negative:"sg-error",warning:"sg-warning",neutral:""},Pye={info:"",success:"sg-success",warning:"sg-warning",error:"sg-error"},Lye=["main{max-width:960px;margin:0 auto;padding:32px 24px}","h1{margin:0 0 6px}","h2{margin:28px 0 10px}",".sg-visual-caption{margin:0 0 24px}",".sg-visual-body{overflow-wrap:break-word}",".sg-visual-body pre{white-space:pre-wrap;background:var(--sg-surface);border:1px solid var(--sg-line);border-radius:var(--sg-radius);padding:12px 14px}",".sg-card h3{margin:0 0 4px;font-size:1rem}",".sg-card p{margin:4px 0 0}"].join("");function ge(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Xm(t){return ge(t).replace(/`([^`]+)`/g,"<code>$1</code>").replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/(^|[^*\w])\*([^*\s][^*]*)\*/g,"$1<em>$2</em>").replace(/\[([^\]]+)\]\((https:\/\/[^\s)]+)\)/g,'<a href="$2">$1</a>')}function ty(t){return t.trim().split(/\n\s*\n/).map(e=>{let r=e.split(`
@@ -2221,8 +2221,8 @@ ${s}`;return}if(LI(e,i,r$e)){n$e(e,o)&&(r.retry=e.toString("utf8",o));return}if(
2221
2221
  `);t.stack=r?`${r}
2222
2222
  ${o}`:i.stack}ae.exports.fetch=function(e,r=void 0){return U$e(e,r).catch(n=>{throw EJ?SJ(n,EJ):n&&typeof n=="object"&&Error.captureStackTrace(n,ae.exports.fetch),n})};ae.exports.Headers=El().Headers;ae.exports.Response=Ch().Response;ae.exports.Request=ud().Request;ae.exports.FormData=cE().FormData;var{setGlobalOrigin:M$e,getGlobalOrigin:P$e}=uB();ae.exports.setGlobalOrigin=M$e;ae.exports.getGlobalOrigin=P$e;var{CacheStorage:L$e}=aW(),{kConstruct:$$e}=ut();ae.exports.caches=new L$e($$e);var{deleteCookie:F$e,getCookies:j$e,getSetCookies:z$e,setCookie:q$e,parseCookie:H$e}=EW();ae.exports.deleteCookie=F$e;ae.exports.getCookies=j$e;ae.exports.getSetCookies=z$e;ae.exports.setCookie=q$e;ae.exports.parseCookie=H$e;var{parseMIMEType:G$e,serializeAMimeType:Y$e}=Ai();ae.exports.parseMIMEType=G$e;ae.exports.serializeAMimeType=Y$e;var{CloseEvent:V$e,ErrorEvent:W$e,MessageEvent:J$e}=vI(),{WebSocket:Z$e,ping:K$e}=KW();ae.exports.WebSocket=Z$e;ae.exports.CloseEvent=V$e;ae.exports.ErrorEvent=W$e;ae.exports.MessageEvent=J$e;ae.exports.ping=K$e;ae.exports.WebSocketStream=sJ().WebSocketStream;ae.exports.WebSocketError=qT().WebSocketError;ae.exports.request=Nh(bd.request);ae.exports.stream=Nh(bd.stream);ae.exports.pipeline=Nh(bd.pipeline);ae.exports.connect=Nh(bd.connect);ae.exports.upgrade=Nh(bd.upgrade);ae.exports.MockClient=w$e;ae.exports.MockCallHistory=_$e;ae.exports.MockCallHistoryLog=B$e;ae.exports.MockPool=Q$e;ae.exports.MockAgent=v$e;ae.exports.SnapshotAgent=T$e;ae.exports.mockErrors=D$e;var{EventSource:X$e}=yJ();ae.exports.EventSource=X$e;function eFe(){globalThis.fetch=ae.exports.fetch,globalThis.Headers=ae.exports.Headers,globalThis.Response=ae.exports.Response,globalThis.Request=ae.exports.Request,globalThis.FormData=ae.exports.FormData,globalThis.WebSocket=ae.exports.WebSocket,globalThis.CloseEvent=ae.exports.CloseEvent,globalThis.ErrorEvent=ae.exports.ErrorEvent,globalThis.MessageEvent=ae.exports.MessageEvent,globalThis.EventSource=ae.exports.EventSource}ae.exports.install=eFe});var BJ=y(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.SuperglueClient=wd.SuperglueHttpError=void 0;var Sd=hn(),un=qw(),tFe=s_(),rFe=Mj(),nFe=si(),Ks=uu(),iFe=qA(),xh=14400*1e3,Oh;if(typeof globalThis.process<"u"&&globalThis.process.versions?.node)try{let{Agent:t}=wJ();Oh=new t({headersTimeout:xh,bodyTimeout:xh})}catch{}function _J(t){if(t?.aborted)throw t.reason??new DOMException("Aborted","AbortError")}var jI=class extends Error{constructor(e,r,n,i){super(e),this.status=r,this.code=n,this.details=i,this.name="SuperglueHttpError"}};wd.SuperglueHttpError=jI;var JT=class{constructor({apiKey:e,apiEndpoint:r,onInfrastructureError:n,refreshToken:i,sseTokenProvider:o,tokenProvider:s}){if(!e&&!s)throw new Error("SuperglueClient requires either apiKey or tokenProvider");this.tokenProvider=s??(async()=>e),this.apiEndpoint=r??"https://api.superglue.cloud",this.sseManager=new tFe.SSELogSubscriptionManager(this.apiEndpoint,o??this.tokenProvider,i),this.onInfrastructureError=n,this.refreshToken=i}async getApiKey(){return this.tokenProvider()}async fetchWithAuthRetry(e,r){let n=await this.getApiKey(),i=await e(n);if(i.status!==401||!this.refreshToken)return i;_J(r);let o=await this.refreshToken();return _J(r),!o||o===n?i:(i.body?.cancel(),e(o))}isInfrastructureError(e){return(0,nFe.isAbortError)(e)?!1:!!(e instanceof TypeError&&e.message.toLowerCase().includes("fetch")||e instanceof Error&&e.name==="TimeoutError")}async restRequest(e,r,n,i,o){let a=await(await this.restResponse({method:e,path:r,body:n,extraHeaders:i,requestInit:o})).text();if(a)return JSON.parse(a)}async restData(...e){return(await this.restRequest(...e)).data}async restResponse({method:e,path:r,body:n,extraHeaders:i,requestInit:o}){let s=`${this.apiEndpoint.replace(/\/$/,"")}${r}`,a=n!=null,c=typeof FormData<"u"&&n instanceof FormData,l=u=>{let d={Authorization:`Bearer ${u}`,...i};return a&&!c&&e!=="GET"&&(d["Content-Type"]="application/json"),fetch(s,{...o,method:e,headers:d,body:a?c?n:JSON.stringify(n):void 0,signal:o?.signal??AbortSignal.timeout(xh),...Oh?{dispatcher:Oh}:{}})};return this.sendAuthorized(l,o?.signal)}async sendAuthorized(e,r){let n;try{n=await this.fetchWithAuthRetry(e,r)}catch(i){throw this.isInfrastructureError(i)&&this.onInfrastructureError?.(),i}if(!n.ok)throw await this.buildHttpError(n);return n}async uploadFiles(e,r){if(typeof r?.process!="boolean")throw new Error("process must be a boolean");if(e.length===0)return[];let n=e.map(u=>({...u,contentLength:u.contentLength??this.getUploadContentLength(u.content)})),o=(await this.restRequest("POST","/v1/files/uploads",{process:r.process,...r.allowUnprocessed?{allowUnprocessed:!0}:{},files:n.map(({fileName:u,contentType:d,contentLength:A})=>({fileName:u,contentLength:A,...d?{contentType:d}:{}}))})).data.files;if(o.length!==n.length)throw await Promise.all(o.map(u=>this.deleteFileUpload(u.id).catch(()=>{}))),new Error("Upload response did not match the selected files");let s=await Promise.allSettled(o.map(async(u,d)=>{let A=n[d],p=await fetch(u.uploadUrl,{method:"PUT",body:A.content,headers:{...u.uploadHeaders,...A.contentType?{"Content-Type":A.contentType}:{}},signal:AbortSignal.timeout(Math.min(xh,u.expiresIn*1e3))});if(!p.ok)throw new Error(`Upload failed for ${A.fileName}: ${p.status} ${p.statusText}`);return u.id})),a=s.flatMap(u=>u.status==="fulfilled"?[u.value]:[]),c=new Map;if(a.length>0)try{let u=await this.restRequest("POST","/v1/files/uploads/complete",{fileIds:a});c=new Map(u.data.files.map(d=>[d.id,d]))}catch(u){c=new Map(a.map(d=>[d,{id:d,fileName:n[o.findIndex(A=>A.id===d)]?.fileName||d,contentLength:n[o.findIndex(A=>A.id===d)]?.contentLength||0,status:"failed",error:u instanceof Error?u.message:String(u)}]))}let l=o.map((u,d)=>{let A=s[d],p=n[d];return A.status==="rejected"?{id:u.id,fileName:p.fileName,contentLength:p.contentLength,status:"failed",error:A.reason instanceof Error?A.reason.message:String(A.reason)}:c.get(u.id)||{id:u.id,fileName:p.fileName,contentLength:p.contentLength,status:"failed",error:"Upload completion returned no result"}});return await Promise.all(l.filter(u=>u.status==="failed").map(u=>this.deleteFileUpload(u.id).catch(()=>{}))),l}async deleteFileUpload(e){await this.restRequest("DELETE",`/v1/files/uploads/${encodeURIComponent(e)}`)}getUploadContentLength(e){return typeof e=="string"?new TextEncoder().encode(e).byteLength:e instanceof Uint8Array?e.byteLength:e.size}async buildHttpError(e){e.status>=500&&this.onInfrastructureError?.();let r=await e.text(),n=`HTTP ${e.status}: ${r}`,i,o;try{let s=JSON.parse(r);s&&typeof s=="object"&&!Array.isArray(s)&&(o=s),typeof s?.code=="string"&&(i=s.code);let a=s.error;typeof a=="string"?n=a:a&&typeof a=="object"&&(n=a.message||JSON.stringify(a))}catch{}return new jI(n,e.status,i,o)}async streamRequest(e,r,n){let i=e.includes("?")?"&":"?",o=`${this.apiEndpoint.replace(/\/$/,"")}${e}${i}stream=true`,s=l=>fetch(o,{method:"POST",headers:{Authorization:`Bearer ${l}`,Accept:"text/event-stream","Content-Type":"application/json"},body:JSON.stringify(r),signal:n??AbortSignal.timeout(xh),...Oh?{dispatcher:Oh}:{}}),a;try{a=await this.fetchWithAuthRetry(s,n)}catch(l){throw this.isInfrastructureError(l)&&this.onInfrastructureError?.(),l}if(!a.ok)throw await this.buildHttpError(a);if(!(a.headers.get("content-type")||"").includes("text/event-stream")){let l=await a.text();return l?JSON.parse(l):void 0}try{return await(0,rFe.consumeEventStreamResult)(a)}catch(l){throw this.isInfrastructureError(l)&&this.onInfrastructureError?.(),l}}async subscribeToLogsSSE(e={}){return this.sseManager.subscribeToLogs(e)}async disconnect(){await this.sseManager.disconnect()}async listMemoryNotes(e={}){let r=new URLSearchParams;e.scope&&r.set("scope",e.scope),e.query&&r.set("query",e.query);let n=r.toString();return this.restData("GET",`/v1/memory-notes${n?`?${n}`:""}`)}async createMemoryNote(e){return this.restData("POST","/v1/memory-notes",e)}async updateMemoryNote(e,r){return this.restData("PATCH",`/v1/memory-notes/${encodeURIComponent(e)}`,r)}async deleteMemoryNote(e){await this.restRequest("DELETE",`/v1/memory-notes/${encodeURIComponent(e)}`)}async clearMemoryNotes(e){return(await this.restRequest("DELETE",`/v1/memory-notes?scope=${e}`)).data.deleted}async getMe(){return this.restRequest("GET","/v1/me")}async completeOnboarding(){return this.restRequest("POST","/v1/me/onboarding/complete")}async runTool(e){let r=await this.restRequest("POST",`/v1/tools/${encodeURIComponent(e.toolId)}/run`,{inputs:e.payload,files:e.files,credentials:e.credentials,includeStepResultData:e.includeStepResultData,options:e.options,runId:e.runId,stateFixture:e.stateFixture},void 0,e.signal?{signal:e.signal}:void 0);return{success:r.status==="success",data:r.data,error:r.error,tool:r.tool,stepResults:r.stepResults?.map(n=>({...n}))||[],...r.fileArtifacts&&r.fileArtifacts.length>0?{fileArtifacts:r.fileArtifacts}:{},...r.metadata?.warnings?.length?{warnings:r.metadata.warnings}:{}}}async runToolConfig(e){let r=e.createRun?"/v1/tools/run?createRun=true":"/v1/tools/run",n=await this.restRequest("POST",r,{tool:e.tool,payload:e.payload,files:e.files,credentials:e.credentials,includeStepResultData:e.includeStepResultData,options:e.options,runId:e.runId,stateFixture:e.stateFixture,executionKind:e.executionKind,parentToolId:e.parentToolId,draftId:e.draftId},e.traceId?{"X-Trace-Id":e.traceId}:void 0,e.signal?{signal:e.signal}:void 0);return{success:n.status?n.status==="success":n.success??!1,data:n.data,error:n.error,tool:n.tool||e.tool,stepResults:n.stepResults?.map(o=>({...o}))||[],...n.fileArtifacts&&n.fileArtifacts.length>0?{fileArtifacts:n.fileArtifacts}:{},...n.metadata?.warnings?.length?{warnings:n.metadata.warnings}:{}}}async abortToolExecution(e){return{success:!0,runId:(await this.restRequest("POST",`/v1/runs/${encodeURIComponent(e)}/cancel`)).runId}}async executeStep({step:e,payload:r,files:n,previousResults:i,credentials:o,credentialsList:s,options:a,runId:c,systemIds:l,connectionId:u,systemAuth:d,createRun:A,parentToolId:p,stepIndex:h,stepId:f,signal:E,stream:S}){let B={step:e,payload:r,files:n,previousResults:i,credentials:o,credentialsList:s,options:a,runId:c,systemIds:l,connectionId:u,systemAuth:d,createRun:A,parentToolId:p,stepIndex:h,stepId:f};return S?this.streamRequest("/v1/tools/step/run",B,E):this.restRequest("POST","/v1/tools/step/run",B,void 0,E?{signal:E}:void 0)}async abortStep(e){return this.restRequest("POST","/v1/tools/step/abort",{runId:e})}async executeTransformOnly({outputTransform:e,outputSchema:r,inputSchema:n,payload:i,files:o,stepResults:s,options:a,runId:c,createRun:l,parentToolId:u,stepId:d,signal:A,stream:p}){let h={outputTransform:e,outputSchema:r,inputSchema:n,payload:i,files:o,stepResults:s,options:a,runId:c,createRun:l,parentToolId:u,stepId:d};return p?this.streamRequest("/v1/tools/transform/run",h,A):this.restRequest("POST","/v1/tools/transform/run",h,void 0,A?{signal:A}:void 0)}async createRun({toolId:e,toolConfig:r,toolResult:n,stepResults:i,toolPayload:o,status:s,error:a,startedAt:c,completedAt:l,executionKind:u,parentToolId:d,draftId:A}){return this.restRequest("POST","/v1/runs",{toolId:e,toolConfig:r,toolResult:n,stepResults:i,toolPayload:o,status:s,error:a,startedAt:(0,Ks.toUTCISOString)(c,"run.startedAt"),completedAt:(0,Ks.toUTCISOString)(l,"run.completedAt"),executionKind:u,parentToolId:d,draftId:A})}async checkRunLimit(){return this.restData("POST","/v1/runs/check-limit")}async extract({file:e,envelope:r}){if(!e)throw new Error("File must be provided for extract.");let n=new FormData;n.append("file",e);let i=r?"/v1/extract?envelope=true":"/v1/extract";return this.restRequest("POST",i,n)}mapOpenAPIRunToRun(e){let r={running:Sd.RunStatus.RUNNING,success:Sd.RunStatus.SUCCESS,failed:Sd.RunStatus.FAILED,aborted:Sd.RunStatus.ABORTED};return{runId:e.runId??e.id,toolId:e.toolId,tool:e.tool,systemIds:e.systemIds,status:r[e.status]??Sd.RunStatus.FAILED,toolPayload:e.toolPayload,data:e.data,toolResult:e.data,error:e.error,stepResults:e.stepResults,options:e.options,requestSource:e.requestSource,traceId:e.traceId,resultStorageUri:e.resultStorageUri,userId:e.userId,userEmail:e.userEmail,userName:e.userName,metadata:{...e.metadata,executionKind:e.metadata?.executionKind??Sd.RunExecutionKind.FULL},fileArtifacts:e.fileArtifacts}}mapOpenAPIScheduleToToolSchedule(e){return{...e,lastRunAt:e.lastRunAt?(0,Ks.requireUTCDate)(e.lastRunAt,"schedule.lastRunAt"):void 0,nextRunAt:(0,Ks.requireUTCDate)(e.nextRunAt,"schedule.nextRunAt"),createdAt:(0,Ks.requireUTCDate)(e.createdAt,"schedule.createdAt"),updatedAt:(0,Ks.requireUTCDate)(e.updatedAt,"schedule.updatedAt")}}async listRuns(e={}){let r=(0,un.createSearchListQueryParams)(e);e.toolId!==void 0&&r.set("toolId",e.toolId),e.searchUserIds?.length&&r.set("searchUserIds",e.searchUserIds.join(",")),e.includeTotal!==void 0&&r.set("includeTotal",String(e.includeTotal)),e.startedAfter!==void 0&&r.set("startedAfter",e.startedAfter instanceof Date?(0,Ks.toUTCISOString)(e.startedAfter,"run.startedAfter"):e.startedAfter),e.statuses!==void 0?r.set("status",e.statuses.join(",")):e.status!==void 0&&r.set("status",e.status),e.requestSources!==void 0&&r.set("requestSources",e.requestSources.join(",")),e.executionKinds!==void 0&&r.set("executionKinds",e.executionKinds.join(",")),e.userId!==void 0&&r.set("userId",e.userId),e.systemId!==void 0&&r.set("systemId",e.systemId),e.systemIds!==void 0&&r.set("systemIds",e.systemIds.join(","));let n=r.size>0?`?${r.toString()}`:"",i=await this.restRequest("GET",`/v1/runs${n}`,void 0,void 0,{signal:e.signal});return{data:i.data.map(o=>this.mapOpenAPIRunToRun(o)),total:i.total,page:i.page,limit:i.limit,hasMore:i.hasMore}}async getActivityCounts(e){let r=new URLSearchParams;e?.from&&r.set("from",e.from instanceof Date?(0,Ks.toUTCISOString)(e.from,"activity.from"):e.from),e?.to&&r.set("to",e.to instanceof Date?(0,Ks.toUTCISOString)(e.to,"activity.to"):e.to);let n=r.toString();return(await this.restRequest("GET",`/v1/activity/counts${n?`?${n}`:""}`,void 0,void 0,{signal:e?.signal})).counts}async getRun(e){try{let r=await this.restRequest("GET",`/v1/runs/${encodeURIComponent(e)}`);return this.mapOpenAPIRunToRun(r)}catch(r){if(r.message?.includes("404")||r.message?.includes("not found"))return null;throw r}}async getTool(e){try{return await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}`)}catch(r){if(r.message?.includes("404")||r.message?.includes("not found")||r.message?.includes("403")||r.message?.includes("not allowed"))return null;throw r}}async getToolState(e){return(await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}/state`)).state}async setToolState(e,r){await this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}/state`,{state:r})}async deleteToolState(e){return(await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}/state`)).deletedKeys}async archiveTool(e,r=!0){return this.updateTool(e,{archived:r})}async bulkArchiveTools(e,r=!0){return this.restRequest("POST","/v1/tools/bulk/archive",{ids:e,archived:r})}async bulkDeleteTools(e){return this.restRequest("POST","/v1/tools/bulk/delete",{ids:e})}async listTools(e={}){let r=(0,un.createListQueryParams)(e);e.includeArchived!==void 0&&r.set("includeArchived",String(e.includeArchived));let n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/tools${n}`)}async listAllTools(e={}){return(0,un.listAllPages)((r,n)=>this.listTools({...e,page:r,limit:n}))}async createTool(e,r){return this.restRequest("POST","/v1/tools",{...r,id:e})}async updateTool(e,r){return this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}`,r)}async deleteTool(e){try{return await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}`),!0}catch(r){if(r.message?.includes("404"))return!1;throw r}}async renameTool(e,r){return this.restRequest("POST",`/v1/tools/${encodeURIComponent(e)}/rename`,{newId:r})}async getWorkflow(e){return this.getTool(e)}async archiveWorkflow(e,r=!0){return this.upsertWorkflow(e,{archived:r})}async createWorkflow(e,r){return this.createTool(e,r)}async updateWorkflow(e,r){return this.updateTool(e,r)}async upsertWorkflow(e,r){return await this.getTool(e)?this.updateTool(e,r):this.createTool(e,r)}async deleteWorkflow(e){return this.deleteTool(e)}async renameWorkflow(e,r){return this.renameTool(e,r)}async listProjectSummaries(e={}){let r=(0,un.createSearchListQueryParams)(e);return r.set("includeResources","false"),e.includeArchived!==void 0&&r.set("includeArchived",String(e.includeArchived)),this.restRequest("GET",`/v1/projects?${r.toString()}`)}async listAllProjectSummaries({includeArchived:e}={}){return(0,un.listAllPages)((r,n)=>this.listProjectSummaries({page:r,limit:n,...e!==void 0?{includeArchived:e}:{}}))}async listAllProjectTasks(e){return(0,un.listAllPages)((r,n)=>this.restRequest("GET",`/v1/projects/${encodeURIComponent(e)}/tasks?page=${r}&limit=${n}`))}async saveProjectTask({projectId:e,taskId:r,input:n}){let i=`/v1/projects/${encodeURIComponent(e)}/tasks${r?`/${encodeURIComponent(r)}`:""}`;return this.restData(r?"PATCH":"POST",i,n)}async listAllProjectLabels(e){return(0,un.listAllPages)((r,n)=>this.restRequest("GET",`/v1/projects/${encodeURIComponent(e)}/labels?page=${r}&limit=${n}`))}async saveProjectLabel({projectId:e,labelId:r,input:n}){let i=`/v1/projects/${encodeURIComponent(e)}/labels${r?`/${encodeURIComponent(r)}`:""}`;return this.restData(r?"PATCH":"POST",i,n)}async deleteProjectLabel({projectId:e,labelId:r}){await this.restRequest("DELETE",`/v1/projects/${encodeURIComponent(e)}/labels/${encodeURIComponent(r)}`)}async listSchedules(e={}){let r=(0,un.createListQueryParams)(e),n=r.size>0?`?${r.toString()}`:"",i=e.toolId?`/v1/tools/${encodeURIComponent(e.toolId)}/schedules${n}`:`/v1/schedules${n}`,o=await this.restRequest("GET",i);return{...o,data:o.data.map(s=>this.mapOpenAPIScheduleToToolSchedule(s))}}async listAllSchedules(e={}){return(0,un.listAllPages)((r,n)=>this.listSchedules({...e,page:r,limit:n}))}async getToolSchedule(e,r){try{let n=await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(r)}`);return this.mapOpenAPIScheduleToToolSchedule(n)}catch(n){if(n.message?.includes("404")||n.message?.includes("not found"))return null;throw n}}async createToolSchedule(e,r){let n=await this.restRequest("POST",`/v1/tools/${encodeURIComponent(e)}/schedules`,{...r,timezone:r.timezone||(0,iFe.getRuntimeTimezone)()});return this.mapOpenAPIScheduleToToolSchedule(n)}async updateToolSchedule(e,r,n){let i=await this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(r)}`,n);return this.mapOpenAPIScheduleToToolSchedule(i)}async deleteToolSchedule(e,r){return await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(r)}`),!0}async bulkSetSchedulesEnabled(e,r){return this.restRequest("POST","/v1/schedules/bulk/enable",{ids:e,enabled:r})}async bulkDeleteSchedules(e){return this.restRequest("POST","/v1/schedules/bulk/delete",{ids:e})}async listConnections(e={}){let r=(0,un.createListQueryParams)(e);e.systemId!==void 0&&r.set("systemId",e.systemId);let n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/connections${n}`)}async listAllConnections(e={}){return(0,un.listAllPages)((r,n)=>this.listConnections({...e,page:r,limit:n}))}async createOAuthApp(e){return this.restData("POST","/v1/oauth-apps",e)}async updateOAuthApp(e,r){return this.restData("PUT",`/v1/oauth-apps/${encodeURIComponent(e)}`,r)}async deleteOAuthApp(e){await this.restRequest("DELETE",`/v1/oauth-apps/${encodeURIComponent(e)}`)}async listOAuthApps({systemId:e}={}){return(0,un.listAllPages)(async(r,n)=>{let i=new URLSearchParams({page:String(r),limit:String(n),...e?{systemId:e}:{}});return this.restRequest("GET",`/v1/oauth-apps?${i}`)})}async getConnectionSetup(e){return this.restData("GET",`/v1/connections/setup/${encodeURIComponent(e)}`)}async createConnection(e){return this.restData("POST","/v1/connections",e)}async replaceConnection(e,r){return this.restData("PUT",`/v1/connections/${encodeURIComponent(e)}`,{credentials:r})}async updateConnection(e,r){return this.restData("PATCH",`/v1/connections/${encodeURIComponent(e)}`,r)}async deleteConnection(e){await this.restRequest("DELETE",`/v1/connections/${encodeURIComponent(e)}`)}async setDefaultConnection(e){await this.restRequest("POST",`/v1/connections/${encodeURIComponent(e)}/default`)}async listSystems(e={}){let r=(0,un.createListQueryParams)(e),n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/systems${n}`)}async listAllSystems(e={}){return(0,un.listAllPages)((r,n)=>this.listSystems({...e,page:r,limit:n}))}async createOAuthExchange(e){return(await this.restRequest("POST","/v1/oauth/exchanges",e)).data}async completeOAuthExchange(e,r){return(await this.restRequest("POST",`/v1/oauth/exchanges/${encodeURIComponent(e)}/complete`,r)).data}async describeOAuthProviderPage(e){return(await this.restRequest("POST",`/v1/oauth/exchanges/${encodeURIComponent(e)}/provider-page`)).data}async generateCredentialsLink(e){try{return{success:!0,credentialsUrl:(await this.restRequest("POST","/v1/authenticate",e||{})).data.credentialsUrl}}catch(r){return{success:!1,error:r.message}}}};wd.SuperglueClient=JT});var QJ=y(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.UnquotedKeyStrategy=Nt.TripleQuoteStrategy=Nt.TrailingCommaStrategy=Nt.SingleQuoteStrategy=Nt.PythonLiteralStrategy=Nt.CommentStrategy=Nt.ResilientJsonParser=Nt.RepairStrategy=void 0;Nt.parseJsonResilient=oFe;Nt.parseJSON=sFe;Nt.isValidJson=aFe;Nt.prettyPrintJson=cFe;Nt.minifyJson=lFe;var $i=class{validate(e){try{return JSON.parse(e),!0}catch{return!1}}};Nt.RepairStrategy=$i;var zI=class extends $i{constructor(){super(...arguments),this.name="TripleQuoteRepair",this.description="Converts triple-quoted strings to proper JSON, parsing nested JSON content"}canApply(e){return/"""/.test(e)}apply(e){return e.replace(/"""([\s\S]*?)"""/g,(r,n)=>{let i=n.trim();if(i.startsWith("{")&&i.endsWith("}")||i.startsWith("[")&&i.endsWith("]"))try{let s=JSON.parse(i);return JSON.stringify(s)}catch{return`"${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`}return`"${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`})}};Nt.TripleQuoteStrategy=zI;var qI=class extends $i{constructor(){super(...arguments),this.name="PythonLiteralRepair",this.description="Converts Python literals to JavaScript equivalents"}canApply(e){return/\b(None|True|False)\b/.test(e)}apply(e){return e.replace(/\bNone\b/g,"null").replace(/\bTrue\b/g,"true").replace(/\bFalse\b/g,"false")}};Nt.PythonLiteralStrategy=qI;var HI=class extends $i{constructor(){super(...arguments),this.name="TrailingCommaRepair",this.description="Removes trailing commas from objects and arrays"}canApply(e){return/,\s*[}\]]/.test(e)}apply(e){return e.replace(/,(\s*[}\]])/g,"$1")}};Nt.TrailingCommaStrategy=HI;var GI=class extends $i{constructor(){super(...arguments),this.name="SingleQuoteRepair",this.description="Converts single quotes to double quotes"}canApply(e){return/[{,]\s*'[^']*'\s*:/.test(e)||/:\s*'[^']*'/.test(e)}apply(e){let r=e.replace(/([{,]\s*)'([^']+)'(\s*:)/g,'$1"$2"$3');return r=r.replace(/(:\s*)'([^']+)'(\s*[,}])/g,'$1"$2"$3'),r}};Nt.SingleQuoteStrategy=GI;var YI=class extends $i{constructor(){super(...arguments),this.name="UnquotedKeyRepair",this.description="Adds quotes to unquoted object keys"}canApply(e){return/[{,]\s*[a-zA-Z_$][a-zA-Z0-9_$]*\s*:/.test(e)}apply(e){return e.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)(\s*:)/g,'$1"$2"$3')}};Nt.UnquotedKeyStrategy=YI;var VI=class extends $i{constructor(){super(...arguments),this.name="CommentRemoval",this.description="Removes JavaScript-style comments"}canApply(e){return/\/\/.*$|\/\*[\s\S]*?\*\//m.test(e)}apply(e){let r=e.replace(/\/\/.*$/gm,"");return r=r.replace(/\/\*[\s\S]*?\*\//g,""),r}};Nt.CommentStrategy=VI;var ZT=class extends $i{constructor(){super(...arguments),this.name="UnescapedControlCharactersRepair",this.description="Escapes unescaped control characters (newlines, tabs, etc.) in JSON strings"}canApply(e){try{return JSON.parse(e),!1}catch(r){let n=r.message||"";return n.includes("control character")||n.includes("Bad control")||n.includes("Unexpected token")&&/[\n\r\t]/.test(e)}}apply(e){let r="",n=!1,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=o>0?e[o-1]:"";if(i){r+=s,i=!1;continue}if(s==="\\"&&n){r+=s,i=!0;continue}if(s==='"'&&a!=="\\"){n=!n,r+=s;continue}if(n)switch(s){case`
2223
2223
  `:r+="\\n";break;case"\r":r+="\\r";break;case" ":r+="\\t";break;case"\b":r+="\\b";break;case"\f":r+="\\f";break;default:let c=s.charCodeAt(0);c<32?r+="\\u"+("0000"+c.toString(16)).slice(-4):r+=s}else r+=s}return r}},KT=class extends $i{constructor(){super(...arguments),this.name="TrailingCharactersRepair",this.description="Removes trailing characters after valid JSON structure"}canApply(e){let r=e.trim();if(!r.startsWith("{")&&!r.startsWith("["))return!1;let n=0,i=0,o=!1,s=!1;for(let a=0;a<r.length;a++){let c=r[a];if(o)s?s=!1:c==="\\"?s=!0:c==='"'&&(o=!1);else if(c==='"')o=!0;else if(c==="{")n++;else if(c==="}"){if(n--,n===0&&i===0&&a>0&&a<r.length-1)return!0}else if(c==="[")i++;else if(c==="]"&&(i--,i===0&&n===0&&a>0&&a<r.length-1))return!0}return!1}apply(e){let r=e.trim(),n=0,i=0,o=!1,s=!1,a=-1;for(let c=0;c<r.length;c++){let l=r[c];if(o)s?s=!1:l==="\\"?s=!0:l==='"'&&(o=!1);else if(l==='"')o=!0;else if(l==="{")n++;else if(l==="}"){if(n--,n===0&&i===0&&c>0){a=c;break}}else if(l==="[")i++;else if(l==="]"&&(i--,i===0&&n===0&&c>0)){a=c;break}}return a>0&&a<r.length-1?r.substring(0,a+1):e}},_d=class{constructor(e={}){this.strategies=[],this.repairLog=[],this.options={attemptRepair:!0,maxDepth:10,preserveStringsOnFailure:!1,logRepairs:!1,...e},this.initializeDefaultStrategies(),e.customStrategies&&this.strategies.push(...e.customStrategies)}initializeDefaultStrategies(){this.strategies=[new zI,new GI,new ZT,new KT,new qI,new HI,new YI,new VI]}parse(e){let r=Date.now();this.repairLog=[];let n=e instanceof Buffer?e.toString("utf8"):String(e);try{return{success:!0,data:JSON.parse(n),metadata:{parseTime:Date.now()-r,strategiesApplied:[]}}}catch(s){if(!this.options.attemptRepair)return{success:!1,error:`JSON parse error: ${s}`,metadata:{parseTime:Date.now()-r}}}let i=n,o=[];for(let s of this.strategies)if(s.canApply(i)){let a=i;if(i=s.apply(i),a!==i){o.push(s.name),this.repairLog.push(s.description),this.options.logRepairs&&console.log(`Applied ${s.name}: ${s.description}`);try{return{success:!0,data:JSON.parse(i),repairs:this.repairLog,metadata:{parseTime:Date.now()-r,strategiesApplied:o}}}catch{}}}try{return{success:!0,data:JSON.parse(i),repairs:this.repairLog,metadata:{parseTime:Date.now()-r,strategiesApplied:o}}}catch(s){let a=this.aggressiveFallback(i);return a.success?{...a,repairs:[...this.repairLog,"Applied aggressive fallback"],metadata:{parseTime:Date.now()-r,strategiesApplied:[...o,"AggressiveFallback"]}}:{success:!1,error:`Failed to parse JSON after applying ${o.length} strategies: ${s}`,repairs:this.repairLog,metadata:{parseTime:Date.now()-r,strategiesApplied:o}}}}aggressiveFallback(e){try{let r=e.indexOf("{"),n=e.indexOf("[");if(r===-1&&n===-1)return{success:!1,error:"No JSON-like structure found"};let i=r===-1?n:n===-1?r:Math.min(r,n),o=e.substring(i);for(let a of this.strategies)a.canApply(o)&&(o=a.apply(o));return{success:!0,data:JSON.parse(o)}}catch(r){return{success:!1,error:`Aggressive fallback failed: ${r}`}}}addStrategy(e){this.strategies.push(e)}removeStrategy(e){this.strategies=this.strategies.filter(r=>r.name!==e)}getStrategies(){return this.strategies.map(e=>e.name)}};Nt.ResilientJsonParser=_d;var vJ=new _d;function oFe(t,e){return(e?new _d(e):vJ).parse(t)}function sFe(t){let e=vJ.parse(t);if(e.success)return e.repairs&&e.repairs.length>0&&console.log("JSON parsed with repairs:",e.repairs),e.data;throw new Error(`Failed to parse JSON: ${e.error}`)}function aFe(t){try{return JSON.parse(t),!0}catch{return!1}}function cFe(t,e=2){return JSON.stringify(t,null,e)}function lFe(t){let r=new _d().parse(t);if(r.success)return JSON.stringify(r.data);throw new Error("Cannot minify invalid JSON")}});var DJ=y(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.MANAGED_OAUTH_APP_PREFIX=void 0;Sr.projectOAuthAppAuthentication=AFe;Sr.withoutOAuthAppOwnedFields=pFe;Sr.hasOAuthClientChanged=hFe;Sr.isDynamicOAuthConfiguration=fFe;Sr.isReusableOAuthAppForTemplate=gFe;Sr.getManagedOAuthTemplateId=TJ;Sr.getOAuthAppSharedConfiguration=mFe;Sr.copyOAuthAppConfiguration=yFe;Sr.encryptConnectionAuthentication=EFe;Sr.decryptConnectionAuthentication=IFe;Sr.isManagedOAuthEndpointAllowed=CFe;var uFe=n_(),dFe=si();function AFe(t){let{clientSecret:e,config:r,...n}=t,{extraHeaders:i,extraBodyParams:o,...s}=r??{};return{...n,...r?{config:s}:{}}}function pFe(t){if(!t.oauthAppId)return t;let{clientId:e,clientSecret:r,tokenUrl:n,...i}=t;return TJ(t)&&n?{...i,tokenUrl:n}:i}function hFe(t,e){return t.type!=="oauth2"?!1:e.type!=="oauth2"?!0:t.oauthAppId||e.oauthAppId?t.oauthAppId!==e.oauthAppId:t.clientId!==e.clientId}Sr.MANAGED_OAUTH_APP_PREFIX="managed:";function fFe({authentication:t,template:e}){return t.oauthClientMode==="dynamic"||!!e?.oauth?.registrationUrl&&!t.clientSecret}function gFe({app:t,template:e}){return!e?.oauth?.registrationUrl||!!t.clientSecretHash}function TJ(t){if(t?.type==="oauth2")return t.oauthAppId?.startsWith(Sr.MANAGED_OAUTH_APP_PREFIX)?t.oauthAppId.slice(Sr.MANAGED_OAUTH_APP_PREFIX.length):void 0}function mFe(t){let{grantType:e,scopes:r,oauthAppId:n,...i}=t;return i}function yFe({appAuthentication:t,authentication:e}){if(e?.type!=="oauth2")return{...t};let r=Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0));return{...t,...r,config:{...t.config,...e.config}}}function EFe({authentication:t,encrypt:e}){if(t.type!=="oauth2")return t;let r={...t,config:{...t.config}};t.clientSecret!==void 0&&(r.clientSecret=e({value:t.clientSecret}).value);for(let n of["extraHeaders","extraBodyParams"]){let i=t.config?.[n];i!==void 0&&(r.config[n]=e({value:(0,dFe.safeStringify)(i)}).value)}return r}function IFe({authentication:t,decrypt:e}){if(t.type!=="oauth2")return t;let r={...t,config:{...t.config}};t.clientSecret!==void 0&&(r.clientSecret=e({value:t.clientSecret}).value);for(let n of["extraHeaders","extraBodyParams"]){let i=t.config?.[n];typeof i=="string"&&(r.config[n]=JSON.parse(e({value:i}).value))}return r}function CFe({templateId:t,endpoint:e,url:r}){let n=uFe.systems[t]?.oauth,i=n?.[e];if(!n?.managed||!i)return!1;try{let o=new URL(r),s=new URL(i);return o.protocol!=="https:"||o.port||o.username||o.password||o.hash||o.pathname!==s.pathname?!1:o.hostname===s.hostname||(n.managedEndpointHosts??[]).some(a=>a.startsWith("*.")?o.hostname.endsWith(a.slice(1)):o.hostname===a)}catch{return!1}}});var RJ=y(kJ=>{"use strict";Object.defineProperty(kJ,"__esModule",{value:!0})});var Hr=y(Z=>{"use strict";var bFe=Z&&Z.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ue=Z&&Z.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bFe(e,t,r)};Object.defineProperty(Z,"__esModule",{value:!0});Z.SSELogSubscriptionManager=Z.SuperglueHttpError=Z.SuperglueClient=void 0;ue($C(),Z);ue(LL(),Z);ue(HL(),Z);ue(n$(),Z);ue(o$(),Z);ue(u$(),Z);ue(d$(),Z);ue(p$(),Z);ue(qm(),Z);ue(q$(),Z);ue(mg(),Z);ue(W$(),Z);ue(J$(),Z);ue(Z$(),Z);ue(K$(),Z);ue(X$(),Z);ue(qw(),Z);ue(tF(),Z);ue(iF(),Z);ue(yu(),Z);ue(dF(),Z);ue(Hw(),Z);ue(s1(),Z);ue(I0(),Z);ue(w0(),Z);ue(c1(),Z);ue(l1(),Z);ue(d1(),Z);ue(Dg(),Z);ue(p1(),Z);ue(h1(),Z);ue(g1(),Z);ue(m1(),Z);ue(I1(),Z);ue(U1(),Z);ue(x0(),Z);ue(yy(),Z);ue(O0(),Z);ue(F1(),Z);ue(z1(),Z);ue(z0(),Z);ue(Z1(),Z);ue($m(),Z);ue(sj(),Z);ue(cj(),Z);ue(Fm(),Z);ue(D0(),Z);ue(hj(),Z);ue(fj(),Z);ue(n_(),Z);ue(Bj(),Z);ue(vj(),Z);ue(Qj(),Z);ue(Rj(),Z);ue(Oj(),Z);ue(hn(),Z);ue(si(),Z);ue(xj(),Z);ue(Uj(),Z);ue(Sy(),Z);ue(uu(),Z);ue(qA(),Z);var NJ=BJ();Object.defineProperty(Z,"SuperglueClient",{enumerable:!0,get:function(){return NJ.SuperglueClient}});Object.defineProperty(Z,"SuperglueHttpError",{enumerable:!0,get:function(){return NJ.SuperglueHttpError}});var SFe=s_();Object.defineProperty(Z,"SSELogSubscriptionManager",{enumerable:!0,get:function(){return SFe.SSELogSubscriptionManager}});ue(QJ(),Z);ue(DJ(),Z);ue(RJ(),Z)});var RC=require("commander");var dn=Qe(require("fs")),UJ=Qe(require("os")),Xs=Qe(require("path")),Uh=Qe(Hr()),OJ=new Set(["runner","builder","admin"]),xJ={output:{mode:"stdout",directory:".superglue/output"},preset:"admin"};function ea(t){let e=Xs.join(process.cwd(),".superglue"),r=UJ.homedir();if(!r)return e;let n=Xs.join(r,".superglue");return t===!0?e:t===!1?n:dn.existsSync(Xs.join(e,"config.json"))?e:n}function XT(t){return Xs.join(ea(t),"config.json")}function WI(t){let e=XT(t);if(!dn.existsSync(e))return{};try{return JSON.parse(dn.readFileSync(e,"utf-8"))}catch{return{}}}function Bd(t){let e=WI(),r=t.apiKey||(0,Uh.readProcessEnvironmentValue)("SUPERGLUE_API_KEY")||e.apiKey||"",n=t.endpoint||(0,Uh.readProcessEnvironmentValue)("SUPERGLUE_API_ENDPOINT")||e.endpoint||"https://api.superglue.cloud",i=(0,Uh.readProcessEnvironmentValue)("SUPERGLUE_WEB_ENDPOINT")||e.webEndpoint||n.replace(/:3002\b/,":3001").replace(/api\.superglue/,"app.superglue"),o=(0,Uh.readProcessEnvironmentValue)("SUPERGLUE_CLI_PRESET"),s=o&&OJ.has(o)?o:e.preset&&OJ.has(e.preset)?e.preset:"admin";return{...xJ,...e,apiKey:r,endpoint:n,webEndpoint:i,preset:s,output:{...xJ.output,...e.output}}}function JI(t,e){let r=ea(e);dn.existsSync(r)||dn.mkdirSync(r,{recursive:!0}),dn.writeFileSync(Xs.join(r,"config.json"),JSON.stringify(t,null,2)+`
2224
- `,{mode:384})}function ZI(t,e){let r=Xs.join(ea(e),"drafts");if(dn.existsSync(r)||dn.mkdirSync(r,{recursive:!0}),t.output.mode==="stdout+file"){let n=Xs.resolve(t.output.directory);dn.existsSync(n)||dn.mkdirSync(n,{recursive:!0})}}var sD=Qe(Hr());var eD=Qe(require("readline"));var LJ=require("child_process"),$J=require("util");var MJ={name:"@superglue/cli",version:"1.1.238",bin:{sg:"./dist/cli.js"},files:[".claude-plugin/","dist/","skills/","LICENSE"],dependencies:{commander:"15.0.0-0","fast-json-patch":"3.1.1"},devDependencies:{"@superglue/shared":"file:../shared","@types/node":"25.5.0",tsup:"8.5.1",typescript:"5.8.3"},scripts:{build:"tsup && (cp -r skills dist/ 2>/dev/null || true)",dev:"tsup --watch","type-check":"tsc --noEmit",prepublishOnly:"npm run build"},publishConfig:{access:"public"}};var _Fe=(0,$J.promisify)(LJ.exec),Gr=MJ.version;function PJ(t){let e=t.match(/^(\d+)(?:-(.+))?$/);return e?{numeric:parseInt(e[1],10),prerelease:e[2]||null}:{numeric:0,prerelease:t}}function XI(t,e){let r=t.split("."),n=e.split("."),i=Math.max(r.length,n.length);for(let o=0;o<i;o++){let s=PJ(r[o]||"0"),a=PJ(n[o]||"0");if(s.numeric<a.numeric)return-1;if(s.numeric>a.numeric||s.prerelease===null&&a.prerelease!==null)return 1;if(s.prerelease!==null&&a.prerelease===null)return-1;if(s.prerelease!==null&&a.prerelease!==null){if(s.prerelease<a.prerelease)return-1;if(s.prerelease>a.prerelease)return 1}}return 0}async function eC(){try{let t=await fetch("https://registry.npmjs.org/@superglue/cli/latest",{signal:AbortSignal.timeout(5e3)});return t.ok&&(await t.json()).version||null}catch{return null}}var KI=null;function FJ(){Ie()&&(KI=eC())}async function jJ(){if(!(!Ie()||!KI)){try{let t=new Promise(r=>{setTimeout(()=>r(null),2e3).unref()}),e=await Promise.race([KI,t]);e&&XI(Gr,e)<0&&(console.error(""),console.error(`${C.cyan}${C.bold} Update available: ${Gr} \u2192 ${e}${C.reset}`),console.error(`${C.cyan} Run ${C.bold}sg update${C.reset}${C.cyan} to upgrade${C.reset}`),console.error(""))}catch{}KI=null}}async function zJ(){let t=await eC();if(!t)return{success:!1,message:"Could not fetch latest version from npm"};if(XI(Gr,t)>=0)return{success:!0,message:`Already on latest version (${Gr})`};try{return await _Fe("npm install -g @superglue/cli@latest"),{success:!0,message:`Updated from ${Gr} to ${t}`}}catch(e){return{success:!1,message:`Update failed: ${e.message}. Try manually: npm install -g @superglue/cli@latest`}}}var Ie=()=>process.argv.includes("--table")&&process.stdout.isTTY,Ci=()=>process.argv.includes("--full"),C={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m"};function qJ(t,e){let r=e||t;return`\x1B]8;;${t}\x07${C.underline}${C.cyan}${r}${C.reset}\x1B]8;;\x07`}function HJ(){if(!Ie())return;let t=C.reset,e=C.dim,r="\x1B[47;30m",n=[" #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@- "," =@@@- @@@@ "," @@@ @@% "," -@@ @@@@= @@@ @@@ @@@@@#@ @@@@@@@ @@@@@@@ @@@@@@ @@@ @@@ @@@ @@@@@@* %@@ "," @@ @@@ *@ @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @% @@@ @@@ @@@ @@* @@# "," #@@ @@@# @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @@@ @@@ @@@ @@* @@ "," @@- @@@@= @@@ @@@ @@@@@@@ @@@@@@ @@@@@@@ @@@ @@% @@@ @@@ @@@ @@@@@. @@."," #@% .@@@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* @@ "," @@ @ @@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* *@@ "," -@@ @@@@= @@@@@@ @@@ @@@@@@@ @@@ -@@ @@@@@@ @@@@@@% @@@@@@. @@@@@@* #@@ "," :@@* @@@ "," %@@@ =@@@. "," :@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@% "];console.log(""),n.forEach(i=>{let o=i.search(/\S/),s=i.length-[...i].reverse().join("").search(/\S/)-1;if(o===-1)return console.log(" "+i);let a=i.slice(0,o),c=i.slice(o,s+1).split("").map(u=>u===" "?" ":"\u2588").join(""),l=i.slice(s+1);console.log(` ${a}${r}${c}${t}${l}`)}),console.log(` ${e} CLI v${Gr}${t}`),console.log("")}function or(t){if(!Ie())return{stop:()=>{},update:()=>{},log:()=>{}};let e=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],r=0,n=t,i=()=>process.stdout.write("\r\x1B[2K"),o=()=>{process.stdout.write(`\r ${C.cyan}${e[r++%e.length]}${C.reset} ${n}`)},s=setInterval(o,80);return{update:a=>{n=a},log:a=>{i(),console.log(` ${C.dim}\u2502${C.reset} ${a}`),o()},stop:a=>{clearInterval(s),i(),a&&console.log(` ${a}`)}}}function de(t){Ie()?tC(t):console.log(JSON.stringify(t,null,2))}function Pe(t,e){Ie()?(console.log(` ${C.green}\u2713${C.reset} ${t}`),e&&tC(e,4)):console.log(JSON.stringify({success:!0,message:t,...e&&typeof e=="object"?e:{data:e}}))}function D(t,e){Ie()?(console.error(` ${C.red}\u2717${C.reset} ${t}`),e&&tC(e,4)):console.error(JSON.stringify({success:!1,error:t,details:e}))}function Ln(t){Ie()&&console.log(` ${C.dim}${t}${C.reset}`)}function Ql(t){Ie()&&(console.log(`
2225
- ${C.bold}${C.cyan}${t}${C.reset}`),console.log(` ${C.dim}${"\u2500".repeat(t.length)}${C.reset}`))}function ur(t,e,r){if(!Ie()){console.log(JSON.stringify({success:!0,total:r?.total??t.length,items:t}));return}if(t.length===0){console.log(`
2224
+ `,{mode:384})}function ZI(t,e){let r=Xs.join(ea(e),"drafts");if(dn.existsSync(r)||dn.mkdirSync(r,{recursive:!0}),t.output.mode==="stdout+file"){let n=Xs.resolve(t.output.directory);dn.existsSync(n)||dn.mkdirSync(n,{recursive:!0})}}var sD=Qe(Hr());var eD=Qe(require("readline"));var LJ=require("child_process"),$J=require("util");var MJ={name:"@superglue/cli",version:"1.1.239",bin:{sg:"./dist/cli.js"},files:[".claude-plugin/","dist/","skills/","LICENSE"],dependencies:{commander:"15.0.0-0","fast-json-patch":"3.1.1"},devDependencies:{"@superglue/shared":"file:../shared","@types/node":"25.5.0",tsup:"8.5.1",typescript:"5.8.3"},scripts:{build:"tsup && (cp -r skills dist/ 2>/dev/null || true)",dev:"tsup --watch","type-check":"tsc --noEmit",prepublishOnly:"npm run build"},publishConfig:{access:"public"}};var _Fe=(0,$J.promisify)(LJ.exec),Gr=MJ.version;function PJ(t){let e=t.match(/^(\d+)(?:-(.+))?$/);return e?{numeric:parseInt(e[1],10),prerelease:e[2]||null}:{numeric:0,prerelease:t}}function XI(t,e){let r=t.split("."),n=e.split("."),i=Math.max(r.length,n.length);for(let o=0;o<i;o++){let s=PJ(r[o]||"0"),a=PJ(n[o]||"0");if(s.numeric<a.numeric)return-1;if(s.numeric>a.numeric||s.prerelease===null&&a.prerelease!==null)return 1;if(s.prerelease!==null&&a.prerelease===null)return-1;if(s.prerelease!==null&&a.prerelease!==null){if(s.prerelease<a.prerelease)return-1;if(s.prerelease>a.prerelease)return 1}}return 0}async function eC(){try{let t=await fetch("https://registry.npmjs.org/@superglue/cli/latest",{signal:AbortSignal.timeout(5e3)});return t.ok&&(await t.json()).version||null}catch{return null}}var KI=null;function FJ(){Ie()&&(KI=eC())}async function jJ(){if(!(!Ie()||!KI)){try{let t=new Promise(r=>{setTimeout(()=>r(null),2e3).unref()}),e=await Promise.race([KI,t]);e&&XI(Gr,e)<0&&(console.error(""),console.error(`${C.cyan}${C.bold} Update available: ${Gr} \u2192 ${e}${C.reset}`),console.error(`${C.cyan} Run ${C.bold}sg update${C.reset}${C.cyan} to upgrade${C.reset}`),console.error(""))}catch{}KI=null}}async function zJ(){let t=await eC();if(!t)return{success:!1,message:"Could not fetch latest version from npm"};if(XI(Gr,t)>=0)return{success:!0,message:`Already on latest version (${Gr})`};try{return await _Fe("npm install -g @superglue/cli@latest"),{success:!0,message:`Updated from ${Gr} to ${t}`}}catch(e){return{success:!1,message:`Update failed: ${e.message}. Try manually: npm install -g @superglue/cli@latest`}}}var Ie=()=>process.argv.includes("--table")&&process.stdout.isTTY,Ci=()=>process.argv.includes("--full"),C={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m"};function qJ(t,e){let r=e||t;return`\x1B]8;;${t}\x07${C.underline}${C.cyan}${r}${C.reset}\x1B]8;;\x07`}function HJ(){if(!Ie())return;let t=C.reset,e=C.dim,r="\x1B[47;30m",n=[" #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@- "," =@@@- @@@@ "," @@@ @@% "," -@@ @@@@= @@@ @@@ @@@@@#@ @@@@@@@ @@@@@@@ @@@@@@ @@@ @@@ @@@ @@@@@@* %@@ "," @@ @@@ *@ @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @% @@@ @@@ @@@ @@* @@# "," #@@ @@@# @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @@@ @@@ @@@ @@* @@ "," @@- @@@@= @@@ @@@ @@@@@@@ @@@@@@ @@@@@@@ @@@ @@% @@@ @@@ @@@ @@@@@. @@."," #@% .@@@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* @@ "," @@ @ @@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* *@@ "," -@@ @@@@= @@@@@@ @@@ @@@@@@@ @@@ -@@ @@@@@@ @@@@@@% @@@@@@. @@@@@@* #@@ "," :@@* @@@ "," %@@@ =@@@. "," :@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@% "];console.log(""),n.forEach(i=>{let o=i.search(/\S/),s=i.length-[...i].reverse().join("").search(/\S/)-1;if(o===-1)return console.log(" "+i);let a=i.slice(0,o),c=i.slice(o,s+1).split("").map(u=>u===" "?" ":"\u2588").join(""),l=i.slice(s+1);console.log(` ${a}${r}${c}${t}${l}`)}),console.log(` ${e} CLI v${Gr}${t}`),console.log("")}function or(t){if(!Ie())return{stop:()=>{},update:()=>{},log:()=>{}};let e=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],r=0,n=t,i=()=>process.stdout.write("\r\x1B[2K"),o=()=>{process.stdout.write(`\r ${C.cyan}${e[r++%e.length]}${C.reset} ${n}`)},s=setInterval(o,80);return{update:a=>{n=a},log:a=>{i(),console.log(` ${C.dim}\u2502${C.reset} ${a}`),o()},stop:a=>{clearInterval(s),i(),a&&console.log(` ${a}`)}}}function de(t){Ie()?tC(t):console.log(JSON.stringify(t,null,2))}function Pe(t,e){Ie()?(console.log(` ${C.green}\u2713${C.reset} ${t}`),e&&tC(e,4)):console.log(JSON.stringify({success:!0,message:t,...e&&typeof e=="object"?e:{data:e}}))}function D(t,e){Ie()?(console.error(` ${C.red}\u2717${C.reset} ${t}`),e&&tC(e,4)):console.error(JSON.stringify({success:!1,error:t,details:e}))}function Ln(t){Ie()&&console.log(` ${C.dim}${t}${C.reset}`)}function Ql(t){Ie()&&(console.log(`
2225
+ ${C.bold}${C.cyan}${t}${C.reset}`),console.log(` ${C.dim}${"\u2500".repeat(t.length)}${C.reset}`))}function dr(t,e,r){if(!Ie()){console.log(JSON.stringify({success:!0,total:r?.total??t.length,items:t}));return}if(t.length===0){console.log(`
2226
2226
  ${C.dim}0 results${C.reset}
2227
2227
  `);return}let n=e||Object.keys(t[0]),i=Ci()?1/0:60,o=n.map(u=>Math.min(i,Math.max(u.length,...t.map(d=>String(d[u]??"").replace(/[\n\r]+/g," ").trim().length))));console.log("");let s=n.map((u,d)=>`${C.bold}${C.cyan}${u.toUpperCase().padEnd(o[d])}${C.reset}`).join(" ");console.log(` ${s}`);let a=o.map(u=>`${C.dim}${"\u2500".repeat(u)}${C.reset}`).join(`${C.dim}\u2500\u2500${C.reset}`);console.log(` ${a}`);for(let u of t){let d=n.map((A,p)=>{let h=String(u[A]??"").replace(/[\n\r]+/g," ").trim();if(h.length>i){let E=`\u2026 (${h.length})`;h=h.slice(0,Math.max(0,i-E.length))+`${C.dim}${E}${C.reset}`}return A==="status"?`${{success:C.green,running:C.yellow,failed:C.red,aborted:C.red,error:C.red,pending:C.dim}[h.toLowerCase()]||""}${h.padEnd(o[p])}${C.reset}`:h.padEnd(o[p])}).join(" ");console.log(` ${d}`)}let c=r?.total??t.length,l=c===t.length?`${t.length} result${t.length===1?"":"s"}`:`${t.length} of ${c} result${c===1?"":"s"}`;console.log(`
2228
2228
  ${C.dim}${l}${C.reset}
@@ -2265,7 +2265,7 @@ Provide --draft or --tool. Editing a saved tool creates a new draft.
2265
2265
  Returns: { success, draftId, draftPath, diffs }
2266
2266
 
2267
2267
  Run 'sg skill' for common patch patterns and the build\u2192run\u2192edit\u2192save workflow.
2268
- `).action(async r=>{!r.draft&&!r.tool&&(D("Provide --draft or --tool"),process.exit(1)),r.patches||(D("--patches is required"),process.exit(1));let n;try{let u=mC.existsSync(r.patches)?mC.readFileSync(r.patches,"utf-8"):r.patches;n=JSON.parse(u),Array.isArray(n)||(n=[n])}catch(u){D(`Invalid patches: ${u.message}`),process.exit(1)}let i,o;if(r.tool)try{let{client:u}=e(),d=await u.getWorkflow(r.tool);d||(D(`Tool not found: ${r.tool}`),process.exit(1)),i=d,o=`fix-${r.tool}-${Date.now()}`}catch(u){D(u.message),process.exit(1)}else{let u=Dd(r.draft);u||(D(`Draft not found: ${r.draft}`),process.exit(1)),i=u.config,o=r.draft}let s;try{let u=JSON.parse(JSON.stringify(i)),d=fZ.applyPatch(u,n,!0,!0);s=(0,hZ.normalizeToolSchemas)(d.newDocument||u)}catch(u){D(`Patch failed: ${u.message}`),process.exit(1)}let a=n.map(u=>({op:u.op,path:u.path,..."value"in u?{value:u.value}:{},..."from"in u&&u.from?{from:u.from}:{}}));Ie()&&(Ql("Proposed Changes"),console.log(GJ(a)),console.log(""));let c={draftId:o,config:{...s,instruction:s.instruction??i.instruction,updatedAt:new Date().toISOString()},systemIds:s.systemIds||[],instruction:s.instruction??"",createdAt:new Date().toISOString()};dC(c);let l=ta(o);Ie()?(Pe(`Draft updated: ${C.bold}${o}${C.reset}`),console.log(` ${C.dim}draft file:${C.reset} ${l}`),console.log("")):de({success:!0,draftId:o,draftPath:l,diffs:a})})}function mZ(t,e){t.command("save").description("Persist a draft tool to the database").requiredOption("--draft <id>","Draft ID to save").option("--id <customId>","Custom ID for the saved tool").action(async r=>{let{config:n,client:i}=e(),o=Dd(r.draft);o||(D(`Draft not found: ${r.draft}`),process.exit(1));let s=r.id||o.config.id,a=ta(r.draft),c=or(`Saving tool ${C.bold}${s}${C.reset}...`);try{let l=await i.upsertWorkflow(s,{...o.config,id:s});lZ(r.draft),c.stop();let u=n.endpoint;Ie()?(Pe(`Tool saved: ${C.bold}${l.id}${C.reset}`),console.log(` ${C.dim}webhook:${C.reset} ${u}/v1/hooks/${l.id}`),console.log(` ${C.dim}draft ${r.draft} deleted:${C.reset} ${a}`),console.log("")):de({success:!0,toolId:l.id,deletedDraftPath:a,webhookUrl:`${u}/v1/hooks/${l.id}?token=YOUR_API_KEY`})}catch(l){c.stop(),D(l.message),process.exit(1)}})}var yZ=Qe(Hr());async function yC({fetchPage:t,limit:e,offset:r}){let n=Math.floor(r/e)+1,i=r%e,o=await t(n,e),s=o.data.slice(i);if(s.length<e&&r+s.length<o.total){let a=await t(n+1,e);s.push(...a.data.slice(0,e-s.length))}return{items:s,total:o.total,hasMore:r+s.length<o.total}}function EZ(t,e){t.command("list").description("List all tools").option("--limit <n>","Max results","25").option("--offset <n>","Skip first N results","0").action(async r=>{let{client:n}=e();try{let i=Math.min(Math.max(parseInt(r.limit,10)||25,1),yZ.LIST_MAX_LIMIT),o=Math.max(parseInt(r.offset,10)||0,0),{items:s,total:a,hasMore:c}=await yC({limit:i,offset:o,fetchPage:(d,A)=>n.listTools({limit:A,page:d})}),l=Ci(),u=s.map(d=>({id:d.id,instruction:l?d.instruction||"":(d.instruction||"").slice(0,60),steps:d.steps?.length||0}));Ie()?ur(u,["id","instruction","steps"],{total:a}):de({success:!0,total:a,hasMore:c,items:u})}catch(i){D(i.message),process.exit(1)}}),t.command("find [query]").description("Find tools by query or exact ID").option("--id <exactId>","Exact tool ID lookup").option("--fields <fields>","Comma-separated top-level fields to return (requires --id), e.g. instruction,inputSchema").action(async(r,n)=>{let{client:i}=e();try{if(n.fields&&!n.id&&(D("--fields requires --id (field selection only applies to exact-ID lookups)"),process.exit(1)),n.id){let l=await i.getWorkflow(n.id);if(l||(D(`Tool not found: ${n.id}`),process.exit(1)),n.fields){let u=n.fields.split(",").map(h=>h.trim()).filter(Boolean),d=Object.keys(l),A=u.filter(h=>!d.includes(h)),p=Object.fromEntries(u.filter(h=>d.includes(h)).map(h=>[h,l[h]]));de({success:!0,tool:p,...A.length?{unknownFields:A,availableFields:d}:{}});return}de({success:!0,tool:l});return}let o=(r||"").trim()||"*",s=await i.listAllTools(),a=o==="*"?s:(()=>{let l=o.toLowerCase().split(/\s+/).filter(A=>A.length>0),d=s.map(A=>{let p=[A.id,A.name,A.instruction].filter(Boolean).join(" ").toLowerCase();return{tool:A,score:l.filter(h=>p.includes(h)).length}}).filter(A=>A.score>0);return d.sort((A,p)=>p.score-A.score),d.map(A=>A.tool)})(),c=Ci();de({success:!0,total:a.length,items:a.map(l=>({id:l.id,instruction:c?l.instruction||"":(l.instruction||"").slice(0,80),steps:l.steps?.length||0}))})}catch(o){D(o.message),process.exit(1)}})}var IZ=Qe(require("fs"));function GFe(t){!t.state&&!t.stateFile&&(D("Provide --state <json> or --state-file <path>"),process.exit(1)),t.state&&t.stateFile&&(D("Only one of --state or --state-file can be used"),process.exit(1));let e;try{e=JSON.parse(t.stateFile?IZ.readFileSync(t.stateFile,"utf-8"):t.state)}catch(r){D(`Invalid state JSON: ${r.message}`),process.exit(1)}return(e===null||typeof e!="object"||Array.isArray(e))&&(D("State must be a plain JSON object"),process.exit(1)),e}function CZ(t,e){let r=t.command("state").description("Inspect, set, or reset a saved tool's persistent state");r.command("get <toolId>").description("Show the tool's current persistent state").action(async n=>{let{client:i}=e();try{let o=await i.getToolState(n);de({success:!0,toolId:n,state:o})}catch(o){D(o.message),process.exit(1)}}),r.command("set <toolId>").description("Replace the tool's persistent state (full replace)").option("--state <json>","Replacement state JSON object").option("--state-file <path>","Replacement state JSON file").addHelpText("after",`
2268
+ `).action(async r=>{!r.draft&&!r.tool&&(D("Provide --draft or --tool"),process.exit(1)),r.patches||(D("--patches is required"),process.exit(1));let n;try{let u=mC.existsSync(r.patches)?mC.readFileSync(r.patches,"utf-8"):r.patches;n=JSON.parse(u),Array.isArray(n)||(n=[n])}catch(u){D(`Invalid patches: ${u.message}`),process.exit(1)}let i,o;if(r.tool)try{let{client:u}=e(),d=await u.getWorkflow(r.tool);d||(D(`Tool not found: ${r.tool}`),process.exit(1)),i=d,o=`fix-${r.tool}-${Date.now()}`}catch(u){D(u.message),process.exit(1)}else{let u=Dd(r.draft);u||(D(`Draft not found: ${r.draft}`),process.exit(1)),i=u.config,o=r.draft}let s;try{let u=JSON.parse(JSON.stringify(i)),d=fZ.applyPatch(u,n,!0,!0);s=(0,hZ.normalizeToolSchemas)(d.newDocument||u)}catch(u){D(`Patch failed: ${u.message}`),process.exit(1)}let a=n.map(u=>({op:u.op,path:u.path,..."value"in u?{value:u.value}:{},..."from"in u&&u.from?{from:u.from}:{}}));Ie()&&(Ql("Proposed Changes"),console.log(GJ(a)),console.log(""));let c={draftId:o,config:{...s,instruction:s.instruction??i.instruction,updatedAt:new Date().toISOString()},systemIds:s.systemIds||[],instruction:s.instruction??"",createdAt:new Date().toISOString()};dC(c);let l=ta(o);Ie()?(Pe(`Draft updated: ${C.bold}${o}${C.reset}`),console.log(` ${C.dim}draft file:${C.reset} ${l}`),console.log("")):de({success:!0,draftId:o,draftPath:l,diffs:a})})}function mZ(t,e){t.command("save").description("Persist a draft tool to the database").requiredOption("--draft <id>","Draft ID to save").option("--id <customId>","Custom ID for the saved tool").action(async r=>{let{config:n,client:i}=e(),o=Dd(r.draft);o||(D(`Draft not found: ${r.draft}`),process.exit(1));let s=r.id||o.config.id,a=ta(r.draft),c=or(`Saving tool ${C.bold}${s}${C.reset}...`);try{let l=await i.upsertWorkflow(s,{...o.config,id:s});lZ(r.draft),c.stop();let u=n.endpoint;Ie()?(Pe(`Tool saved: ${C.bold}${l.id}${C.reset}`),console.log(` ${C.dim}webhook:${C.reset} ${u}/v1/hooks/${l.id}`),console.log(` ${C.dim}draft ${r.draft} deleted:${C.reset} ${a}`),console.log("")):de({success:!0,toolId:l.id,deletedDraftPath:a,webhookUrl:`${u}/v1/hooks/${l.id}?token=YOUR_API_KEY`})}catch(l){c.stop(),D(l.message),process.exit(1)}})}var yZ=Qe(Hr());async function yC({fetchPage:t,limit:e,offset:r}){let n=Math.floor(r/e)+1,i=r%e,o=await t(n,e),s=o.data.slice(i);if(s.length<e&&r+s.length<o.total){let a=await t(n+1,e);s.push(...a.data.slice(0,e-s.length))}return{items:s,total:o.total,hasMore:r+s.length<o.total}}function EZ(t,e){t.command("list").description("List all tools").option("--limit <n>","Max results","25").option("--offset <n>","Skip first N results","0").action(async r=>{let{client:n}=e();try{let i=Math.min(Math.max(parseInt(r.limit,10)||25,1),yZ.LIST_MAX_LIMIT),o=Math.max(parseInt(r.offset,10)||0,0),{items:s,total:a,hasMore:c}=await yC({limit:i,offset:o,fetchPage:(d,A)=>n.listTools({limit:A,page:d})}),l=Ci(),u=s.map(d=>({id:d.id,instruction:l?d.instruction||"":(d.instruction||"").slice(0,60),steps:d.steps?.length||0}));Ie()?dr(u,["id","instruction","steps"],{total:a}):de({success:!0,total:a,hasMore:c,items:u})}catch(i){D(i.message),process.exit(1)}}),t.command("find [query]").description("Find tools by query or exact ID").option("--id <exactId>","Exact tool ID lookup").option("--fields <fields>","Comma-separated top-level fields to return (requires --id), e.g. instruction,inputSchema").action(async(r,n)=>{let{client:i}=e();try{if(n.fields&&!n.id&&(D("--fields requires --id (field selection only applies to exact-ID lookups)"),process.exit(1)),n.id){let l=await i.getWorkflow(n.id);if(l||(D(`Tool not found: ${n.id}`),process.exit(1)),n.fields){let u=n.fields.split(",").map(h=>h.trim()).filter(Boolean),d=Object.keys(l),A=u.filter(h=>!d.includes(h)),p=Object.fromEntries(u.filter(h=>d.includes(h)).map(h=>[h,l[h]]));de({success:!0,tool:p,...A.length?{unknownFields:A,availableFields:d}:{}});return}de({success:!0,tool:l});return}let o=(r||"").trim()||"*",s=await i.listAllTools(),a=o==="*"?s:(()=>{let l=o.toLowerCase().split(/\s+/).filter(A=>A.length>0),d=s.map(A=>{let p=[A.id,A.name,A.instruction].filter(Boolean).join(" ").toLowerCase();return{tool:A,score:l.filter(h=>p.includes(h)).length}}).filter(A=>A.score>0);return d.sort((A,p)=>p.score-A.score),d.map(A=>A.tool)})(),c=Ci();de({success:!0,total:a.length,items:a.map(l=>({id:l.id,instruction:c?l.instruction||"":(l.instruction||"").slice(0,80),steps:l.steps?.length||0}))})}catch(o){D(o.message),process.exit(1)}})}var IZ=Qe(require("fs"));function GFe(t){!t.state&&!t.stateFile&&(D("Provide --state <json> or --state-file <path>"),process.exit(1)),t.state&&t.stateFile&&(D("Only one of --state or --state-file can be used"),process.exit(1));let e;try{e=JSON.parse(t.stateFile?IZ.readFileSync(t.stateFile,"utf-8"):t.state)}catch(r){D(`Invalid state JSON: ${r.message}`),process.exit(1)}return(e===null||typeof e!="object"||Array.isArray(e))&&(D("State must be a plain JSON object"),process.exit(1)),e}function CZ(t,e){let r=t.command("state").description("Inspect, set, or reset a saved tool's persistent state");r.command("get <toolId>").description("Show the tool's current persistent state").action(async n=>{let{client:i}=e();try{let o=await i.getToolState(n);de({success:!0,toolId:n,state:o})}catch(o){D(o.message),process.exit(1)}}),r.command("set <toolId>").description("Replace the tool's persistent state (full replace)").option("--state <json>","Replacement state JSON object").option("--state-file <path>","Replacement state JSON file").addHelpText("after",`
2269
2269
  Replaces all keys, subject to the same key and size limits as run-time state writes.
2270
2270
  State is stored unencrypted; never put credential values in it.
2271
2271
  `).action(async(n,i)=>{let{client:o}=e(),s=GFe(i);try{await o.setToolState(n,s),de({success:!0,toolId:n,keyCount:Object.keys(s).length})}catch(a){D(a.message),process.exit(1)}}),r.command("reset <toolId>").description("Delete all persistent state keys so the next run cold-starts").action(async n=>{let{client:i}=e();try{let o=await i.deleteToolState(n);de({success:!0,toolId:n,deletedKeys:o})}catch(o){D(o.message),process.exit(1)}})}function EC(t,e,r,n,i){bi(n,r)?i():t.command(e,{hidden:!0}).allowUnknownOption().allowExcessArguments(!0).action(()=>{D(Si(r,n)),process.exit(1)})}function bZ(t,e,r){let n=t.command("tool").description("Manage superglue tools").addHelpText("after",`
@@ -2286,7 +2286,7 @@ Quick Reference:
2286
2286
  sg tool state reset <toolId> Delete persistent state
2287
2287
 
2288
2288
  Output: JSON by default. Use --table for human-readable, --full to disable truncation.
2289
- `);EC(n,"build","tool.build",r,()=>dZ(n,e)),pZ(n,e,r),EC(n,"edit","tool.edit",r,()=>gZ(n,e)),EC(n,"save","tool.save",r,()=>mZ(n,e)),EC(n,"state","tool.state",r,()=>CZ(n,e)),EZ(n,e)}var CC=Qe(Hr());var Mh=Qe(Hr());function SZ(t){if(!t.createdAt)return Number.POSITIVE_INFINITY;let e=new Date(t.createdAt).getTime();return Number.isNaN(e)?Number.POSITIVE_INFINITY:e}function YFe(t){let e=t.filter(r=>r.isOwner);return e.find(r=>r.isDefault)||e.sort((r,n)=>SZ(r)-SZ(n))[0]}async function fs(t,e,r){let n=await t.listAllConnections({systemId:e});if(!r)return YFe(n);let i=n.find(o=>o.id===r);if(!i)throw new Error(`Connection '${r}' is not accessible under '${e}'`);return i}async function wZ({client:t,systemId:e,credentials:r,url:n,authentication:i,tunnel:o,usageInstructions:s,oauthAppId:a,connectionId:c}){let l=await fs(t,e,c);if(!l){if(Object.keys(r??{}).length===0&&n===void 0&&i===void 0&&o===void 0&&s===void 0&&a===void 0)return null;if(!i&&!a)throw new Error(`No connection exists for '${e}' yet. Pass --authentication (for example '{"type":"api_key"}' or '{"type":"none"}') to create one.`);if(a!==void 0&&i&&i.type!=="oauth2")throw new Error("oauthAppId requires OAuth authentication");return t.createConnection({systemId:e,credentials:r,url:n||void 0,authentication:i??{type:"oauth2"},tunnel:o,...s?{usageInstructions:s}:{},...a?{oauthAppId:a}:{}})}if(a!==void 0&&(i??l.authentication).type!=="oauth2")throw new Error("oauthAppId requires OAuth authentication");let u=r===void 0?l:await t.replaceConnection(l.id,r);return n===void 0&&i===void 0&&o===void 0&&s===void 0&&a===void 0?u:t.updateConnection(l.id,{...n===void 0?{}:{url:n||null},...i===void 0?{}:{authentication:i},...o===void 0?{}:{tunnel:o},...s===void 0?{}:{usageInstructions:s||null},...a===void 0?{}:{oauthAppId:a}})}async function _Z(t,e,r){let n=await fs(t,e,r);return n?t.replaceConnection(n.id,{}):null}function dD(t){return{id:t.id,name:t.name,templateName:t.templateName||"",connections:t.connectionCount}}async function VFe(t,e){let[r,n]=await Promise.all([fs(t,e.id),t.listOAuthApps({systemId:e.id})]),i=(0,Mh.findTemplateForSystem)({id:e.id,url:r?.url});return{system:{...dD(e),...r?.url?{url:r.url}:{},authType:r?.authentication?.type||"none",credentialKeys:(r?.credentialKeys||[]).map(o=>({...o,placeholder:`<<${e.id}_${o.key}>>`})),urlPlaceholder:`<<${e.id}_url>>`},template:i?.template||null,oauthApps:n}}function BZ(t,e){t.command("oauth-apps").description("List reusable organization and superglue OAuth apps").option("--system-id <id>","Filter by connection namespace").option("--limit <n>","Max results","25").option("--offset <n>","Skip first N results","0").action(async r=>{try{let{client:n}=e(),i=await n.listOAuthApps({systemId:r.systemId}),o=Math.min(Math.max(parseInt(r.limit,10)||25,1),Mh.LIST_MAX_LIMIT),s=Math.max(parseInt(r.offset,10)||0,0),a=i.slice(s,s+o);Ie()?ur(a.map(c=>({id:c.id,name:c.name,systemId:c.systemId,source:c.source,clientSecretHash:c.clientSecretHash??""})),["id","name","systemId","source","clientSecretHash"]):de({oauthApps:a,total:i.length,hasMore:s+a.length<i.length})}catch(n){D(n.message),process.exit(1)}}),t.command("list").description("List the system ids your org uses").option("--limit <n>","Max results","25").option("--offset <n>","Skip first N results","0").action(async r=>{let{client:n}=e();try{let i=Math.min(Math.max(parseInt(r.limit,10)||25,1),Mh.LIST_MAX_LIMIT),o=Math.max(parseInt(r.offset,10)||0,0),{items:s,total:a,hasMore:c}=await yC({limit:i,offset:o,fetchPage:(u,d)=>n.listSystems({limit:d,page:u})}),l=s.map(dD);Ie()?ur(l,["id","name","templateName","connections","knowledgeDocs"],{total:a}):de({success:!0,total:a,hasMore:c,items:l})}catch(i){D(i.message),process.exit(1)}}),t.command("find [query]").description("Find systems by query or exact ID").option("--id <exactId>","Exact system ID lookup").action(async(r,n)=>{let{client:i}=e();try{let o=await i.listAllSystems();if(n.id){let l=o.find(u=>u.id===n.id);l||(D(`System not found: ${n.id}`),process.exit(1)),de({success:!0,...await VFe(i,l)});return}let s=(r||"*").trim(),a=s.toLowerCase().split(/\s+/),c=s==="*"?o:o.filter(l=>{let u=[l.id,l.name,l.templateName].filter(Boolean).join(" ").toLowerCase();return a.some(d=>u.includes(d))});de({success:!0,total:c.length,systems:c.map(dD)})}catch(o){D(o.message),process.exit(1)}})}var IC=Qe(Hr());function WFe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&"currentItem"in t&&"data"in t&&typeof t.success=="boolean"}function vZ(t,e){t.command("call").description("Call a system (API, database, file server)").option("--url <url>","Absolute URL, or <<systemId_url>> followed by the path").option("--system-id <id>","System ID; selects your connection and adds its auth header").option("--connection-id <id>","Connection override; implies its system ID when --system-id is omitted").option("--auth <mode>","auto (default) adds the auth header; none sends no default header","auto").option("--method <method>","HTTP method","GET").option("--headers <json>","HTTP headers JSON").option("--body <string>","Request body").option("--timeout <ms>","Per-request timeout in milliseconds (minimum 1000)").option("--continue-on-error","Return failed response envelope instead of exiting non-zero").option("--file <key=path...>","File references",(r,n)=>(n.push(r),n),[]).addHelpText("after",`
2289
+ `);EC(n,"build","tool.build",r,()=>dZ(n,e)),pZ(n,e,r),EC(n,"edit","tool.edit",r,()=>gZ(n,e)),EC(n,"save","tool.save",r,()=>mZ(n,e)),EC(n,"state","tool.state",r,()=>CZ(n,e)),EZ(n,e)}var CC=Qe(Hr());var Mh=Qe(Hr());function SZ(t){if(!t.createdAt)return Number.POSITIVE_INFINITY;let e=new Date(t.createdAt).getTime();return Number.isNaN(e)?Number.POSITIVE_INFINITY:e}function YFe(t){let e=t.filter(r=>r.isOwner);return e.find(r=>r.isDefault)||e.sort((r,n)=>SZ(r)-SZ(n))[0]}async function fs(t,e,r){let n=await t.listAllConnections({systemId:e});if(!r)return YFe(n);let i=n.find(o=>o.id===r);if(!i)throw new Error(`Connection '${r}' is not accessible under '${e}'`);return i}async function wZ({client:t,systemId:e,credentials:r,url:n,authentication:i,tunnel:o,usageInstructions:s,oauthAppId:a,connectionId:c}){let l=await fs(t,e,c);if(!l){if(Object.keys(r??{}).length===0&&n===void 0&&i===void 0&&o===void 0&&s===void 0&&a===void 0)return null;if(!i&&!a)throw new Error(`No connection exists for '${e}' yet. Pass --authentication (for example '{"type":"api_key"}' or '{"type":"none"}') to create one.`);if(a!==void 0&&i&&i.type!=="oauth2")throw new Error("oauthAppId requires OAuth authentication");return t.createConnection({systemId:e,credentials:r,url:n||void 0,authentication:i??{type:"oauth2"},tunnel:o,...s?{usageInstructions:s}:{},...a?{oauthAppId:a}:{}})}if(a!==void 0&&(i??l.authentication).type!=="oauth2")throw new Error("oauthAppId requires OAuth authentication");let u=r===void 0?l:await t.replaceConnection(l.id,r);return n===void 0&&i===void 0&&o===void 0&&s===void 0&&a===void 0?u:t.updateConnection(l.id,{...n===void 0?{}:{url:n||null},...i===void 0?{}:{authentication:i},...o===void 0?{}:{tunnel:o},...s===void 0?{}:{usageInstructions:s||null},...a===void 0?{}:{oauthAppId:a}})}async function _Z(t,e,r){let n=await fs(t,e,r);return n?t.replaceConnection(n.id,{}):null}function dD(t){return{id:t.id,name:t.name,templateName:t.templateName||"",connections:t.connectionCount}}async function VFe(t,e){let[r,n]=await Promise.all([fs(t,e.id),t.listOAuthApps({systemId:e.id})]),i=(0,Mh.findTemplateForSystem)({id:e.id,url:r?.url});return{system:{...dD(e),...r?.url?{url:r.url}:{},authType:r?.authentication?.type||"none",credentialKeys:(r?.credentialKeys||[]).map(o=>({...o,placeholder:`<<${e.id}_${o.key}>>`})),urlPlaceholder:`<<${e.id}_url>>`},template:i?.template||null,oauthApps:n}}function BZ(t,e){t.command("oauth-apps").description("List reusable organization and superglue OAuth apps").option("--system-id <id>","Filter by connection namespace").option("--limit <n>","Max results","25").option("--offset <n>","Skip first N results","0").action(async r=>{try{let{client:n}=e(),i=await n.listOAuthApps({systemId:r.systemId}),o=Math.min(Math.max(parseInt(r.limit,10)||25,1),Mh.LIST_MAX_LIMIT),s=Math.max(parseInt(r.offset,10)||0,0),a=i.slice(s,s+o);Ie()?dr(a.map(c=>({id:c.id,name:c.name,systemId:c.systemId,source:c.source,clientSecretHash:c.clientSecretHash??""})),["id","name","systemId","source","clientSecretHash"]):de({oauthApps:a,total:i.length,hasMore:s+a.length<i.length})}catch(n){D(n.message),process.exit(1)}}),t.command("list").description("List the system ids your org uses").option("--limit <n>","Max results","25").option("--offset <n>","Skip first N results","0").action(async r=>{let{client:n}=e();try{let i=Math.min(Math.max(parseInt(r.limit,10)||25,1),Mh.LIST_MAX_LIMIT),o=Math.max(parseInt(r.offset,10)||0,0),{items:s,total:a,hasMore:c}=await yC({limit:i,offset:o,fetchPage:(u,d)=>n.listSystems({limit:d,page:u})}),l=s.map(dD);Ie()?dr(l,["id","name","templateName","connections","knowledgeDocs"],{total:a}):de({success:!0,total:a,hasMore:c,items:l})}catch(i){D(i.message),process.exit(1)}}),t.command("find [query]").description("Find systems by query or exact ID").option("--id <exactId>","Exact system ID lookup").action(async(r,n)=>{let{client:i}=e();try{let o=await i.listAllSystems();if(n.id){let l=o.find(u=>u.id===n.id);l||(D(`System not found: ${n.id}`),process.exit(1)),de({success:!0,...await VFe(i,l)});return}let s=(r||"*").trim(),a=s.toLowerCase().split(/\s+/),c=s==="*"?o:o.filter(l=>{let u=[l.id,l.name,l.templateName].filter(Boolean).join(" ").toLowerCase();return a.some(d=>u.includes(d))});de({success:!0,total:c.length,systems:c.map(dD)})}catch(o){D(o.message),process.exit(1)}})}var IC=Qe(Hr());function WFe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&"currentItem"in t&&"data"in t&&typeof t.success=="boolean"}function vZ(t,e){t.command("call").description("Call a system (API, database, file server)").option("--url <url>","Absolute URL, or <<systemId_url>> followed by the path").option("--system-id <id>","System ID; selects your connection and adds its auth header").option("--connection-id <id>","Connection override; implies its system ID when --system-id is omitted").option("--auth <mode>","auto (default) adds the auth header; none sends no default header","auto").option("--method <method>","HTTP method","GET").option("--headers <json>","HTTP headers JSON").option("--body <string>","Request body").option("--timeout <ms>","Per-request timeout in milliseconds (minimum 1000)").option("--continue-on-error","Return failed response envelope instead of exiting non-zero").option("--file <key=path...>","File references",(r,n)=>(n.push(r),n),[]).addHelpText("after",`
2290
2290
  ${C.bold}Authentication:${C.reset}
2291
2291
  With --system-id or --connection-id the server picks your connection (your starred one, otherwise
2292
2292
  the accessible one you have held longest, owned or shared), refreshes OAuth tokens, and adds the
@@ -2340,7 +2340,7 @@ Without --connection-id, these commands target your default owned connection for
2340
2340
  system ID, or your oldest owned one. --connection-id targets any connection you can
2341
2341
  access under that system ID. Saving a connection under a new system ID makes that
2342
2342
  namespace discoverable.
2343
- `);r.command("list").description("List the connections you can access under a system ID").requiredOption("--system-id <id>","System ID").action(async n=>{let{client:i}=e(),o=Od(n.systemId);try{let a=(await i.listAllConnections({systemId:o})).map(c=>({connectionId:c.id,connectionName:c.name,isOwner:c.isOwner,isDefault:c.isDefault,permission:c.permission,authType:c.authentication?.type||"none",...c.url?{url:c.url}:{},credentialKeys:c.credentialKeys}));Ie()?ur(a,["connectionId","connectionName","isOwner","isDefault","permission","authType"],{total:a.length}):de({success:!0,systemId:o,total:a.length,hasMore:!1,items:a})}catch(s){D(s.message),process.exit(1)}}),r.command("get").description("Get your connection for a system ID").requiredOption("--system-id <id>","System ID").option("--connection-id <id>","Connection ID within --system-id").action(async n=>{let{client:i}=e(),o=Od(n.systemId);try{let s=await fs(i,o,n.connectionId);de({success:!0,data:AD({systemId:o,set:s})})}catch(s){D(s.message),process.exit(1)}}),r.command("set").description("Create or update your connection for a system ID").requiredOption("--system-id <id>","System ID").option("--connection-id <id>","Connection ID within --system-id").option("--credentials <json>","Replace stored secrets, including OAuth tokens, with this JSON object; omit to preserve them.").option("--url <url>","Base url of the connection, resolved by <<systemId_url>>. Pass an empty string to clear.").option("--authentication <json>",'Auth config JSON, e.g. {"type":"api_key"} or {"type":"oauth2","clientId":"...","tokenUrl":"..."}. Required when creating a connection; {"type":"none"} for unauthenticated systems.').option("--tunnel-id <id>","Secure Gateway tunnel id for private systems. Pass an empty string to remove the binding.").option("--usage-instructions <text>","Guidance for using this connection; replaces the stored text. Pass an empty string to clear.").option("--oauth-app-id <id>","Link an OAuth app from sg system oauth-apps; empty string detaches. Existing tokens stay unchanged.").action(async n=>{let{client:i}=e(),o=Od(n.systemId),s,a;try{s=n.credentials===void 0?void 0:QZ(n.credentials,"--credentials"),n.authentication!==void 0&&(a=QZ(n.authentication,"--authentication"))}catch(u){D(`Invalid JSON option: ${u.message}`),process.exit(1)}let c=n.tunnelId===void 0?void 0:n.tunnelId?{tunnelId:n.tunnelId}:null,l=or(`Saving connection for ${C.bold}${o}${C.reset}...`);try{let u=await wZ({client:i,systemId:o,credentials:s,url:n.url,authentication:a,tunnel:c,usageInstructions:n.usageInstructions,oauthAppId:n.oauthAppId,connectionId:n.connectionId});l.stop(),Ie()?Pe(`Connection saved for ${C.bold}${o}${C.reset}`,{keys:JFe(u?.credentialKeys||[])||"(none)"}):de({success:!0,data:AD({systemId:o,set:u})})}catch(u){l.stop(),D(u.message),process.exit(1)}}),r.command("clear").description("Remove runtime secrets (keys, passwords, tokens) from your connection for a system ID; OAuth client configuration stays").requiredOption("--system-id <id>","System ID").option("--connection-id <id>","Connection ID within --system-id").action(async n=>{let{client:i}=e(),o=Od(n.systemId),s=or(`Clearing connection secrets for ${C.bold}${o}${C.reset}...`);try{let a=await _Z(i,o,n.connectionId);s.stop(),Ie()?Pe(`Connection secrets cleared for ${C.bold}${o}${C.reset}`):de({success:!0,data:AD({systemId:o,set:a})})}catch(a){s.stop(),D(a.message),process.exit(1)}})}var wr=Qe(Hr());async function ZFe({client:t,systemId:e,connectionId:r}){try{let n=await fs(t,e,r);return{hasToken:(0,wr.hasCredentialKeyValue)(n?.credentialKeys,"access_token"),updatedAt:n?.updatedAt?.toString()}}catch{return{hasToken:!1}}}async function KFe({client:t,systemId:e,connectionId:r,baseline:n,timeoutMs:i=3e5,intervalMs:o=2e3}){let s=Date.now();for(;Date.now()-s<i;){await new Promise(a=>setTimeout(a,o));try{let a=await fs(t,e,r);if(!(0,wr.hasCredentialKeyValue)(a?.credentialKeys,"access_token"))continue;if(!n.hasToken||a?.updatedAt?.toString()!==n.updatedAt)return!0}catch{}}return!1}function XFe(t,e){let r=(0,wr.findTemplateForSystem)(t),n=r?.template?.oauth,i=(0,wr.resolveOAuthConfigFromAuthentication)({input:e,authentication:t.authentication,templateOAuth:n}),o=(0,wr.stringValue)(i.client_secret);return{templateMatch:r,clientId:(0,wr.stringValue)(i.client_id),clientSecret:(0,wr.isMaskedSecretValue)(o)?void 0:o,authUrl:(0,wr.stringValue)(i.auth_url),tokenUrl:(0,wr.stringValue)(i.token_url),grantType:(0,wr.stringValue)(i.grant_type)||"authorization_code",scopes:typeof i.scopes=="string"?i.scopes:void 0,tokenConfig:(0,wr.getOAuthTokenExchangeConfig)(t)}}function DZ(t,e){t.command("oauth").description("Authenticate a system via OAuth; tokens land in your connection").requiredOption("--system-id <id>","System ID").option("--connection-id <id>","Connection ID within --system-id; defaults to your own").option("--scopes <scopes>","Replace default OAuth scopes; use an empty string for none").option("--auth-url <url>","OAuth authorization URL").option("--token-url <url>","OAuth token URL").option("--grant-type <type>","Grant type").action(async r=>{let{config:n,client:i}=e(),o=Od(r.systemId),s,a;try{let T=await fs(i,o,r.connectionId);a=T?.id,s={id:o,name:o,url:T?.url??"",credentials:{},authentication:T?.authentication,tags:[]}}catch(T){D(T.message),process.exit(1)}let{templateMatch:c,clientId:l,clientSecret:u,authUrl:d,tokenUrl:A,grantType:p,scopes:h,tokenConfig:f}=XFe(s,r);if(!l&&!c?.template.oauth?.managed&&(D(`Missing OAuth clientId. Add it to system authentication:
2343
+ `);r.command("list").description("List the connections you can access under a system ID").requiredOption("--system-id <id>","System ID").action(async n=>{let{client:i}=e(),o=Od(n.systemId);try{let a=(await i.listAllConnections({systemId:o})).map(c=>({connectionId:c.id,connectionName:c.name,isOwner:c.isOwner,isDefault:c.isDefault,permission:c.permission,authType:c.authentication?.type||"none",...c.url?{url:c.url}:{},credentialKeys:c.credentialKeys}));Ie()?dr(a,["connectionId","connectionName","isOwner","isDefault","permission","authType"],{total:a.length}):de({success:!0,systemId:o,total:a.length,hasMore:!1,items:a})}catch(s){D(s.message),process.exit(1)}}),r.command("get").description("Get your connection for a system ID").requiredOption("--system-id <id>","System ID").option("--connection-id <id>","Connection ID within --system-id").action(async n=>{let{client:i}=e(),o=Od(n.systemId);try{let s=await fs(i,o,n.connectionId);de({success:!0,data:AD({systemId:o,set:s})})}catch(s){D(s.message),process.exit(1)}}),r.command("set").description("Create or update your connection for a system ID").requiredOption("--system-id <id>","System ID").option("--connection-id <id>","Connection ID within --system-id").option("--credentials <json>","Replace stored secrets, including OAuth tokens, with this JSON object; omit to preserve them.").option("--url <url>","Base url of the connection, resolved by <<systemId_url>>. Pass an empty string to clear.").option("--authentication <json>",'Auth config JSON, e.g. {"type":"api_key"} or {"type":"oauth2","clientId":"...","tokenUrl":"..."}. Required when creating a connection; {"type":"none"} for unauthenticated systems.').option("--tunnel-id <id>","Secure Gateway tunnel id for private systems. Pass an empty string to remove the binding.").option("--usage-instructions <text>","Guidance for using this connection; replaces the stored text. Pass an empty string to clear.").option("--oauth-app-id <id>","Link an OAuth app from sg system oauth-apps; empty string detaches. Existing tokens stay unchanged.").action(async n=>{let{client:i}=e(),o=Od(n.systemId),s,a;try{s=n.credentials===void 0?void 0:QZ(n.credentials,"--credentials"),n.authentication!==void 0&&(a=QZ(n.authentication,"--authentication"))}catch(u){D(`Invalid JSON option: ${u.message}`),process.exit(1)}let c=n.tunnelId===void 0?void 0:n.tunnelId?{tunnelId:n.tunnelId}:null,l=or(`Saving connection for ${C.bold}${o}${C.reset}...`);try{let u=await wZ({client:i,systemId:o,credentials:s,url:n.url,authentication:a,tunnel:c,usageInstructions:n.usageInstructions,oauthAppId:n.oauthAppId,connectionId:n.connectionId});l.stop(),Ie()?Pe(`Connection saved for ${C.bold}${o}${C.reset}`,{keys:JFe(u?.credentialKeys||[])||"(none)"}):de({success:!0,data:AD({systemId:o,set:u})})}catch(u){l.stop(),D(u.message),process.exit(1)}}),r.command("clear").description("Remove runtime secrets (keys, passwords, tokens) from your connection for a system ID; OAuth client configuration stays").requiredOption("--system-id <id>","System ID").option("--connection-id <id>","Connection ID within --system-id").action(async n=>{let{client:i}=e(),o=Od(n.systemId),s=or(`Clearing connection secrets for ${C.bold}${o}${C.reset}...`);try{let a=await _Z(i,o,n.connectionId);s.stop(),Ie()?Pe(`Connection secrets cleared for ${C.bold}${o}${C.reset}`):de({success:!0,data:AD({systemId:o,set:a})})}catch(a){s.stop(),D(a.message),process.exit(1)}})}var wr=Qe(Hr());async function ZFe({client:t,systemId:e,connectionId:r}){try{let n=await fs(t,e,r);return{hasToken:(0,wr.hasCredentialKeyValue)(n?.credentialKeys,"access_token"),updatedAt:n?.updatedAt?.toString()}}catch{return{hasToken:!1}}}async function KFe({client:t,systemId:e,connectionId:r,baseline:n,timeoutMs:i=3e5,intervalMs:o=2e3}){let s=Date.now();for(;Date.now()-s<i;){await new Promise(a=>setTimeout(a,o));try{let a=await fs(t,e,r);if(!(0,wr.hasCredentialKeyValue)(a?.credentialKeys,"access_token"))continue;if(!n.hasToken||a?.updatedAt?.toString()!==n.updatedAt)return!0}catch{}}return!1}function XFe(t,e){let r=(0,wr.findTemplateForSystem)(t),n=r?.template?.oauth,i=(0,wr.resolveOAuthConfigFromAuthentication)({input:e,authentication:t.authentication,templateOAuth:n}),o=(0,wr.stringValue)(i.client_secret);return{templateMatch:r,clientId:(0,wr.stringValue)(i.client_id),clientSecret:(0,wr.isMaskedSecretValue)(o)?void 0:o,authUrl:(0,wr.stringValue)(i.auth_url),tokenUrl:(0,wr.stringValue)(i.token_url),grantType:(0,wr.stringValue)(i.grant_type)||"authorization_code",scopes:typeof i.scopes=="string"?i.scopes:void 0,tokenConfig:(0,wr.getOAuthTokenExchangeConfig)(t)}}function DZ(t,e){t.command("oauth").description("Authenticate a system via OAuth; tokens land in your connection").requiredOption("--system-id <id>","System ID").option("--connection-id <id>","Connection ID within --system-id; defaults to your own").option("--scopes <scopes>","Replace default OAuth scopes; use an empty string for none").option("--auth-url <url>","OAuth authorization URL").option("--token-url <url>","OAuth token URL").option("--grant-type <type>","Grant type").action(async r=>{let{config:n,client:i}=e(),o=Od(r.systemId),s,a;try{let T=await fs(i,o,r.connectionId);a=T?.id,s={id:o,name:o,url:T?.url??"",credentials:{},authentication:T?.authentication,tags:[]}}catch(T){D(T.message),process.exit(1)}let{templateMatch:c,clientId:l,clientSecret:u,authUrl:d,tokenUrl:A,grantType:p,scopes:h,tokenConfig:f}=XFe(s,r);if(!l&&!c?.template.oauth?.managed&&(D(`Missing OAuth clientId. Add it to system authentication:
2344
2344
 
2345
2345
  sg system connection set --system-id ${o} --credentials '{}' --authentication '{"type":"oauth2","clientId":"YOUR_CLIENT_ID","clientSecret":"YOUR_CLIENT_SECRET"}'`),process.exit(1)),A||(D(`Missing tokenUrl. Provide --token-url or add it to authentication:
2346
2346
 
@@ -2388,7 +2388,7 @@ Examples:
2388
2388
  sg mcp edit --id <serverId> --add-tool get_customer
2389
2389
  sg mcp edit --id <serverId> --tools get_customer,create_invoice
2390
2390
  sg mcp edit --id <serverId> --auth-mode creator_api_key
2391
- `).action(async r=>{let{config:n}=e();try{let i=await n1e(n,r);Object.keys(i).length===0&&(D("Provide at least one field to update"),process.exit(1));let o=await UZ(n,r.id,i),s=await ic(n),a=ra(n,o,s);Ie()?Pe(`MCP server updated: ${C.bold}${a.name}${C.reset}`,{id:a.id,endpoint:a.connection.endpoint,authMode:a.authMode,tools:a.toolIds.length}):de({success:!0,server:a,clientConfig:kl(a)})}catch(i){D(nc(i)),process.exit(1)}})}function i1e(t,e){let r=[t.id,t.name,t.displayName,t.description,...t.toolIds||[]].filter(Boolean).join(" ").toLowerCase();return e.some(n=>r.includes(n))}function FZ(t,e){t.command("find [query]").description("Find MCP servers by query, name, or exact ID").option("--id <exactId>","Exact MCP server ID lookup").option("--name <serverName>","Exact MCP server name lookup").action(async(r,n)=>{let{config:i}=e();try{let o=await ic(i);if(n.id){let l=await bC(i,n.id);l||(D(`MCP server not found: ${n.id}`),process.exit(1));let u=ra(i,l,o);de({success:!0,server:u,clientConfig:kl(u)});return}let s=await OZ(i),c=(()=>{if(n.name)return s.filter(d=>d.name===n.name);let l=(r||"*").trim();if(l==="*")return s;let u=l.toLowerCase().split(/\s+/).filter(Boolean);return s.filter(d=>i1e(d,u))})().map(l=>ra(i,l,o));de({success:!0,total:c.length,servers:c.length===1?c.map(l=>({...l,clientConfig:kl(l)})):c.map(wC)})}catch(o){D(nc(o)),process.exit(1)}})}function jZ(t,e){t.command("list").description("List named MCP servers").option("--limit <n>","Max results","25").option("--offset <n>","Skip first N results","0").action(async r=>{let{config:n}=e();try{let i=Math.min(Math.max(parseInt(r.limit,10)||25,1),100),o=Math.max(parseInt(r.offset,10)||0,0),[s,a]=await Promise.all([fD(n,{limit:i,offset:o}),ic(n)]),c=s.data.map(l=>wC(ra(n,l,a)));Ie()?ur(c,["id","name","authMode","toolCount","endpoint"],{total:s.total}):de({success:!0,total:s.total,hasMore:s.hasMore,items:c})}catch(i){D(nc(i)),process.exit(1)}})}function zZ(t,e,r,n,i){bi(n,r)?i():t.command(e,{hidden:!0}).allowUnknownOption().allowExcessArguments(!0).action(()=>{D(Si(r,n)),process.exit(1)})}function qZ(t,e,r){let n=t.command("mcp").description("Manage named MCP servers").addHelpText("after",`
2391
+ `).action(async r=>{let{config:n}=e();try{let i=await n1e(n,r);Object.keys(i).length===0&&(D("Provide at least one field to update"),process.exit(1));let o=await UZ(n,r.id,i),s=await ic(n),a=ra(n,o,s);Ie()?Pe(`MCP server updated: ${C.bold}${a.name}${C.reset}`,{id:a.id,endpoint:a.connection.endpoint,authMode:a.authMode,tools:a.toolIds.length}):de({success:!0,server:a,clientConfig:kl(a)})}catch(i){D(nc(i)),process.exit(1)}})}function i1e(t,e){let r=[t.id,t.name,t.displayName,t.description,...t.toolIds||[]].filter(Boolean).join(" ").toLowerCase();return e.some(n=>r.includes(n))}function FZ(t,e){t.command("find [query]").description("Find MCP servers by query, name, or exact ID").option("--id <exactId>","Exact MCP server ID lookup").option("--name <serverName>","Exact MCP server name lookup").action(async(r,n)=>{let{config:i}=e();try{let o=await ic(i);if(n.id){let l=await bC(i,n.id);l||(D(`MCP server not found: ${n.id}`),process.exit(1));let u=ra(i,l,o);de({success:!0,server:u,clientConfig:kl(u)});return}let s=await OZ(i),c=(()=>{if(n.name)return s.filter(d=>d.name===n.name);let l=(r||"*").trim();if(l==="*")return s;let u=l.toLowerCase().split(/\s+/).filter(Boolean);return s.filter(d=>i1e(d,u))})().map(l=>ra(i,l,o));de({success:!0,total:c.length,servers:c.length===1?c.map(l=>({...l,clientConfig:kl(l)})):c.map(wC)})}catch(o){D(nc(o)),process.exit(1)}})}function jZ(t,e){t.command("list").description("List named MCP servers").option("--limit <n>","Max results","25").option("--offset <n>","Skip first N results","0").action(async r=>{let{config:n}=e();try{let i=Math.min(Math.max(parseInt(r.limit,10)||25,1),100),o=Math.max(parseInt(r.offset,10)||0,0),[s,a]=await Promise.all([fD(n,{limit:i,offset:o}),ic(n)]),c=s.data.map(l=>wC(ra(n,l,a)));Ie()?dr(c,["id","name","authMode","toolCount","endpoint"],{total:s.total}):de({success:!0,total:s.total,hasMore:s.hasMore,items:c})}catch(i){D(nc(i)),process.exit(1)}})}function zZ(t,e,r,n,i){bi(n,r)?i():t.command(e,{hidden:!0}).allowUnknownOption().allowExcessArguments(!0).action(()=>{D(Si(r,n)),process.exit(1)})}function qZ(t,e,r){let n=t.command("mcp").description("Manage named MCP servers").addHelpText("after",`
2392
2392
  Quick Reference:
2393
2393
  sg mcp list List named MCP servers
2394
2394
  sg mcp find --id <id> Get full MCP server config and client setup
@@ -2408,7 +2408,7 @@ Auth modes:
2408
2408
  creator_api_key Headless/private clients authenticate with an API key assigned to the creator.
2409
2409
 
2410
2410
  Output: JSON by default. Use --table for human-readable, --full to disable truncation.
2411
- `);if(bi(r,"mcp.find"))jZ(n,e),FZ(n,e);else for(let i of["list","find"])n.command(i,{hidden:!0}).allowUnknownOption().allowExcessArguments(!0).action(()=>{D(Si("mcp.find",r)),process.exit(1)});zZ(n,"create","mcp.create",r,()=>PZ(n,e)),zZ(n,"edit","mcp.edit",r,()=>$Z(n,e))}function HZ(t,e){t.command("list").description("List recent runs").option("--tool <id>","Filter by tool ID").option("--status <statuses>","Comma-separated statuses").option("--source <sources>","Comma-separated request sources").option("--user <userId>","Filter by user ID").option("--system-id <id>","Filter by system ID").option("--limit <n>","Max results","10").option("--offset <n>","Skip first N results","0").action(async r=>{let{client:n}=e();try{let i=Math.min(Math.max(parseInt(r.limit,10)||10,1),50),o=Math.max(parseInt(r.offset,10)||0,0),s=Math.ceil((o+1)/i),a=r.source?.split(",").filter(Boolean),c=await n.listRuns({toolId:r.tool,limit:i,page:s,status:r.status,requestSources:a,userId:r.user,systemId:r.systemId});Ie()?(c.total>0&&Ln(`${c.total} total runs${r.tool?` for ${C.bold}${r.tool}${C.reset}`:""}`),ur(c.data.map(l=>({runId:(l.runId||"").slice(0,12),toolId:l.toolId||"",status:l.status||"",source:l.requestSource||""})),["runId","toolId","status","source"],{total:c.total})):de({success:!0,total:c.total,items:c.data.map(l=>({runId:l.runId,toolId:l.toolId,status:l.status,requestSource:l.requestSource,error:l.error}))})}catch(i){D(i.message),process.exit(1)}})}function gD(t){if(t==null)return t;let e;try{e=typeof t=="string"?t:JSON.stringify(t)}catch{e=String(t)}return e.length<=500?t:{_truncated:!0,_size:e.length,_preview:e.slice(0,500)}}function GZ(t,e){t.command("get <runId>").description("Get details of a specific run").option("--fetch-results","Include complete run data (alias for --full)").action(async(r,n)=>{let{client:i}=e();try{let o=await i.getRun(r);o||(D(`Run not found: ${r}`),process.exit(1));let s=Ci()||n.fetchResults===!0,a=o.fileArtifacts;de({success:!0,run:{runId:o.runId,toolId:o.toolId,status:o.status,error:o.error,...o.metadata?.warnings?.length?{warnings:o.metadata.warnings}:{},toolPayload:s?o.toolPayload:gD(o.toolPayload),data:s?o.data:gD(o.data),requestSource:o.requestSource,...o.stepResults?{stepResults:s?o.stepResults:gD(o.stepResults)}:{},...a&&a.length>0?{fileArtifacts:a.map(c=>({fileKey:c.fileKey,filename:c.filename,contentType:c.contentType,size:c.size}))}:{}}}),a&&a.length>0&&Ln(`${a.length} file(s) available \u2014 download with: sg run download ${r}`)}catch(o){D(o.message),process.exit(1)}})}var oc=Qe(require("fs")),na=Qe(require("path"));function o1e(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function YZ(t,e){t.command("download <runId> [fileKey]").description("Download file artifacts from a run").option("--output-dir <path>","Target directory",".").action(async(r,n,i)=>{let{client:o}=e();try{let s=await o.getRun(r);s||(D(`Run not found: ${r}`),process.exit(1));let a=s.fileArtifacts||[];a.length===0&&(D(`No file artifacts for run ${r}`),process.exit(1));let c=n?a.filter(u=>u.fileKey===n):a;c.length===0&&(D(`File artifact not found: ${n}`),Ln(`Available file artifacts: ${a.map(u=>u.fileKey).join(", ")}`),process.exit(1));let l=na.resolve(i.outputDir);oc.existsSync(l)||oc.mkdirSync(l,{recursive:!0});for(let u of c){let d=u.downloadUrl;if(!d){D(`No download URL for ${u.fileKey} \u2014 file storage may not be configured`);continue}let A=or(`Downloading ${u.filename}...`);try{let p=await fetch(d);if(!p.ok){A.stop(),D(`Download failed for ${u.filename}: HTTP ${p.status}`);continue}let h=Buffer.from(await p.arrayBuffer()),f=na.basename(u.filename),E=!f||f==="."||f===".."?"download":f,S=na.join(l,E);if(oc.existsSync(S)){let B=na.extname(E),_=E.slice(0,E.length-B.length),v=1;for(;oc.existsSync(S);)S=na.join(l,`${_}_${v}${B}`),v++}oc.writeFileSync(S,h),A.stop(),Pe(`Downloaded ${u.filename} (${o1e(h.length)}) \u2192 ${S}`)}catch(p){A.stop(),D(`Download failed for ${u.filename}: ${p.message}`)}}}catch(s){D(s.message),process.exit(1)}})}function VZ(t,e,r){let n=t.command("run").description("View tool execution runs").addHelpText("after",`
2411
+ `);if(bi(r,"mcp.find"))jZ(n,e),FZ(n,e);else for(let i of["list","find"])n.command(i,{hidden:!0}).allowUnknownOption().allowExcessArguments(!0).action(()=>{D(Si("mcp.find",r)),process.exit(1)});zZ(n,"create","mcp.create",r,()=>PZ(n,e)),zZ(n,"edit","mcp.edit",r,()=>$Z(n,e))}function HZ(t,e){t.command("list").description("List recent runs").option("--tool <id>","Filter by tool ID").option("--status <statuses>","Comma-separated statuses").option("--source <sources>","Comma-separated request sources").option("--user <userId>","Filter by user ID").option("--system-id <id>","Filter by system ID").option("--limit <n>","Max results","10").option("--offset <n>","Skip first N results","0").action(async r=>{let{client:n}=e();try{let i=Math.min(Math.max(parseInt(r.limit,10)||10,1),50),o=Math.max(parseInt(r.offset,10)||0,0),s=Math.ceil((o+1)/i),a=r.source?.split(",").filter(Boolean),c=await n.listRuns({toolId:r.tool,limit:i,page:s,status:r.status,requestSources:a,userId:r.user,systemId:r.systemId});Ie()?(c.total>0&&Ln(`${c.total} total runs${r.tool?` for ${C.bold}${r.tool}${C.reset}`:""}`),dr(c.data.map(l=>({runId:(l.runId||"").slice(0,12),toolId:l.toolId||"",status:l.status||"",source:l.requestSource||""})),["runId","toolId","status","source"],{total:c.total})):de({success:!0,total:c.total,items:c.data.map(l=>({runId:l.runId,toolId:l.toolId,status:l.status,requestSource:l.requestSource,error:l.error}))})}catch(i){D(i.message),process.exit(1)}})}function gD(t){if(t==null)return t;let e;try{e=typeof t=="string"?t:JSON.stringify(t)}catch{e=String(t)}return e.length<=500?t:{_truncated:!0,_size:e.length,_preview:e.slice(0,500)}}function GZ(t,e){t.command("get <runId>").description("Get details of a specific run").option("--fetch-results","Include complete run data (alias for --full)").action(async(r,n)=>{let{client:i}=e();try{let o=await i.getRun(r);o||(D(`Run not found: ${r}`),process.exit(1));let s=Ci()||n.fetchResults===!0,a=o.fileArtifacts;de({success:!0,run:{runId:o.runId,toolId:o.toolId,status:o.status,error:o.error,...o.metadata?.warnings?.length?{warnings:o.metadata.warnings}:{},toolPayload:s?o.toolPayload:gD(o.toolPayload),data:s?o.data:gD(o.data),requestSource:o.requestSource,...o.stepResults?{stepResults:s?o.stepResults:gD(o.stepResults)}:{},...a&&a.length>0?{fileArtifacts:a.map(c=>({fileKey:c.fileKey,filename:c.filename,contentType:c.contentType,size:c.size}))}:{}}}),a&&a.length>0&&Ln(`${a.length} file(s) available \u2014 download with: sg run download ${r}`)}catch(o){D(o.message),process.exit(1)}})}var oc=Qe(require("fs")),na=Qe(require("path"));function o1e(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function YZ(t,e){t.command("download <runId> [fileKey]").description("Download file artifacts from a run").option("--output-dir <path>","Target directory",".").action(async(r,n,i)=>{let{client:o}=e();try{let s=await o.getRun(r);s||(D(`Run not found: ${r}`),process.exit(1));let a=s.fileArtifacts||[];a.length===0&&(D(`No file artifacts for run ${r}`),process.exit(1));let c=n?a.filter(u=>u.fileKey===n):a;c.length===0&&(D(`File artifact not found: ${n}`),Ln(`Available file artifacts: ${a.map(u=>u.fileKey).join(", ")}`),process.exit(1));let l=na.resolve(i.outputDir);oc.existsSync(l)||oc.mkdirSync(l,{recursive:!0});for(let u of c){let d=u.downloadUrl;if(!d){D(`No download URL for ${u.fileKey} \u2014 file storage may not be configured`);continue}let A=or(`Downloading ${u.filename}...`);try{let p=await fetch(d);if(!p.ok){A.stop(),D(`Download failed for ${u.filename}: HTTP ${p.status}`);continue}let h=Buffer.from(await p.arrayBuffer()),f=na.basename(u.filename),E=!f||f==="."||f===".."?"download":f,S=na.join(l,E);if(oc.existsSync(S)){let B=na.extname(E),_=E.slice(0,E.length-B.length),v=1;for(;oc.existsSync(S);)S=na.join(l,`${_}_${v}${B}`),v++}oc.writeFileSync(S,h),A.stop(),Pe(`Downloaded ${u.filename} (${o1e(h.length)}) \u2192 ${S}`)}catch(p){A.stop(),D(`Download failed for ${u.filename}: ${p.message}`)}}}catch(s){D(s.message),process.exit(1)}})}function VZ(t,e,r){let n=t.command("run").description("View tool execution runs").addHelpText("after",`
2412
2412
  Quick Reference:
2413
2413
  sg run list List recent runs (default 10)
2414
2414
  sg run list --tool <id> --status failed Filter by tool and/or status
@@ -2430,7 +2430,7 @@ Examples:
2430
2430
  sg schedule edit --tool daily_report --id <scheduleId> --disabled
2431
2431
  sg schedule edit --tool daily_report --id <scheduleId> --cron "0 8 * * *" --timezone UTC
2432
2432
  sg schedule edit --tool import_orders --id <scheduleId> --clear-webhook --retries 2
2433
- `).action(async r=>{let{client:n}=e();try{if(r.enabled&&r.disabled)throw new Error("Use either --enabled or --disabled, not both");let i={};r.cron!==void 0&&(i.cronExpression=r.cron),r.timezone!==void 0&&(i.timezone=r.timezone),r.enabled&&(i.enabled=!0),r.disabled&&(i.enabled=!1);let o=vC({inline:r.payload,file:r.payloadFile,label:"payload"});if(o!==void 0&&(i.payload=o),mD(r)){let a=r.options===void 0&&r.optionsFile===void 0&&!r.clearOptions,c=a?await n.getToolSchedule(r.tool,r.id):null;if(a&&!c)throw new Error(`Schedule not found: ${r.id}`);i.options=QC(r,c?.options)}if(Object.keys(i).length===0)throw new Error("Provide at least one field to update");let s=await n.updateToolSchedule(r.tool,r.id,i);Ie()?Pe(`Schedule updated: ${C.bold}${s.id}${C.reset}`,{toolId:s.toolId,status:s.enabled?"active":"inactive",nextRunAt:s.nextRunAt.toISOString()}):de({success:!0,schedule:Ud(s,!0)})}catch(i){D(Md(i)),process.exit(1)}})}function XZ({value:t,defaultValue:e,min:r,max:n}){let i=parseInt(t??"",10),o=Number.isNaN(i)?e:i,s=Math.max(o,r);return n===void 0?s:Math.min(s,n)}function e6(t,e){t.command("list").description("List tool schedules").option("--tool <id>","Filter by tool ID").option("--status <status>","Filter by status: active, inactive, or all","all").option("--limit <n>","Max results","25").option("--offset <n>","Skip first N results","0").action(async r=>{let{client:n}=e();try{let i=XZ({value:r.limit,defaultValue:25,min:1,max:100}),o=XZ({value:r.offset,defaultValue:0,min:0}),s=["active","inactive"].includes(r.status)?r.status:"all",a=await n.listAllSchedules({toolId:r.tool}),c=a.filter(p=>s==="active"?p.enabled:s==="inactive"?!p.enabled:!0),l=c.slice(o,o+i),u=JZ(a),d=l.map(p=>Ud(p,Ci())),A=o+l.length<c.length;Ie()?ur(d,["id","toolId","status","cronExpression","timezone","nextRunAt"],{total:c.length}):de({success:!0,total:c.length,hasMore:A,statusCounts:u,items:d})}catch(i){D(Md(i)),process.exit(1)}})}function yD(t,e,r,n,i){bi(n,r)?i():t.command(e,{hidden:!0}).allowUnknownOption().allowExcessArguments(!0).action(()=>{D(Si(r,n)),process.exit(1)})}function t6(t,e,r){let n=t.command("schedule").description("Manage saved tool schedules").addHelpText("after",`
2433
+ `).action(async r=>{let{client:n}=e();try{if(r.enabled&&r.disabled)throw new Error("Use either --enabled or --disabled, not both");let i={};r.cron!==void 0&&(i.cronExpression=r.cron),r.timezone!==void 0&&(i.timezone=r.timezone),r.enabled&&(i.enabled=!0),r.disabled&&(i.enabled=!1);let o=vC({inline:r.payload,file:r.payloadFile,label:"payload"});if(o!==void 0&&(i.payload=o),mD(r)){let a=r.options===void 0&&r.optionsFile===void 0&&!r.clearOptions,c=a?await n.getToolSchedule(r.tool,r.id):null;if(a&&!c)throw new Error(`Schedule not found: ${r.id}`);i.options=QC(r,c?.options)}if(Object.keys(i).length===0)throw new Error("Provide at least one field to update");let s=await n.updateToolSchedule(r.tool,r.id,i);Ie()?Pe(`Schedule updated: ${C.bold}${s.id}${C.reset}`,{toolId:s.toolId,status:s.enabled?"active":"inactive",nextRunAt:s.nextRunAt.toISOString()}):de({success:!0,schedule:Ud(s,!0)})}catch(i){D(Md(i)),process.exit(1)}})}function XZ({value:t,defaultValue:e,min:r,max:n}){let i=parseInt(t??"",10),o=Number.isNaN(i)?e:i,s=Math.max(o,r);return n===void 0?s:Math.min(s,n)}function e6(t,e){t.command("list").description("List tool schedules").option("--tool <id>","Filter by tool ID").option("--status <status>","Filter by status: active, inactive, or all","all").option("--limit <n>","Max results","25").option("--offset <n>","Skip first N results","0").action(async r=>{let{client:n}=e();try{let i=XZ({value:r.limit,defaultValue:25,min:1,max:100}),o=XZ({value:r.offset,defaultValue:0,min:0}),s=["active","inactive"].includes(r.status)?r.status:"all",a=await n.listAllSchedules({toolId:r.tool}),c=a.filter(p=>s==="active"?p.enabled:s==="inactive"?!p.enabled:!0),l=c.slice(o,o+i),u=JZ(a),d=l.map(p=>Ud(p,Ci())),A=o+l.length<c.length;Ie()?dr(d,["id","toolId","status","cronExpression","timezone","nextRunAt"],{total:c.length}):de({success:!0,total:c.length,hasMore:A,statusCounts:u,items:d})}catch(i){D(Md(i)),process.exit(1)}})}function yD(t,e,r,n,i){bi(n,r)?i():t.command(e,{hidden:!0}).allowUnknownOption().allowExcessArguments(!0).action(()=>{D(Si(r,n)),process.exit(1)})}function t6(t,e,r){let n=t.command("schedule").description("Manage saved tool schedules").addHelpText("after",`
2434
2434
  Quick Reference:
2435
2435
  sg schedule list List schedules (default 25)
2436
2436
  sg schedule list --tool <id> List schedules for a saved tool
@@ -2442,11 +2442,11 @@ Examples:
2442
2442
  sg schedule edit --tool daily_report --id <scheduleId> --disabled
2443
2443
 
2444
2444
  Output: JSON by default. Use --table for human-readable, --full to include payload/options in lists.
2445
- `);yD(n,"list","schedule.list",r,()=>e6(n,e)),yD(n,"create","schedule.create",r,()=>ZZ(n,e)),yD(n,"edit","schedule.edit",r,()=>KZ(n,e))}var r6=Qe(require("fs")),ED=Qe(Hr());function Fn(t){let e=t instanceof Error?t.message:String(t);return e.includes("Authentication failed")||e.includes("No token provided")?["Authentication failed.","Run `sg login`. For headless/API-key auth, set SUPERGLUE_API_KEY and SUPERGLUE_API_ENDPOINT, or pass --api-key and --endpoint."].join(" "):e.toLowerCase().includes("fetch failed")?["Could not reach the configured superglue API endpoint.","Set SUPERGLUE_API_ENDPOINT or pass --endpoint, then run `sg login` or provide an org-scoped API key for headless auth."].join(" "):e}function a1e(t,e){if(!/^\d+$/.test(t))throw new Error(`--${e} must be a non-negative integer`);return Number(t)}function ID(t){if(!ED.PROJECT_TASK_STATUSES.includes(t))throw new Error(`--status must be one of ${ED.PROJECT_TASK_STATUSES.join(", ")}`);return t}function CD(t,e){let r=t.split(",").map(n=>n.trim()).filter(Boolean);if(!r.length)throw new Error(`--${e} needs at least one label ID`);return r}function TC(t){return t.option("--status <status>","not_started, in_progress, waiting, or done").option("--position <n>","0-based index in the status column; 0 is the top, values past the end place the task last").option("--description <text>","Task description; an empty string clears it").option("--description-file <path>","Read the task description from a file").option("--due-date <date>","Due date as YYYY-MM-DD").option("--assignee <userId>","Organization member user ID").option("--labels <ids>","Comma-separated project label IDs; replaces the task's labels (see sg project label list)")}function DC(t){if(t.description!==void 0&&t.descriptionFile!==void 0)throw new Error("Use either --description or --description-file, not both");let e={};return t.name!==void 0&&(e.name=t.name),t.status!==void 0&&(e.status=ID(t.status)),t.position!==void 0&&(e.position=a1e(t.position,"position")),t.description!==void 0&&(e.description=t.description),t.descriptionFile!==void 0&&(e.description=r6.readFileSync(t.descriptionFile,"utf-8")),t.dueDate!==void 0&&(e.dueDate=t.dueDate),t.assignee!==void 0&&(e.assigneeUserId=t.assignee),t.labels!==void 0&&(e.labelIds=CD(t.labels,"labels")),e}function Pd(t,e=Ci()){return{id:t.id,name:t.name,status:t.status,position:t.position,dueDate:t.dueDate,assigneeUserId:t.assigneeUserId,labelIds:t.labelIds,...e?{description:t.description,createdAt:t.createdAt,updatedAt:t.updatedAt}:{descriptionChars:t.description.length}}}function kC(t){return{id:t.id,name:t.name,color:t.color}}function n6(t,e){t.command("list").description("List a project's labels, sorted by name").requiredOption("--project <id>","Project ID").action(async r=>{let{client:n}=e();try{let i=(await n.listAllProjectLabels(r.project)).map(kC);Ie()?ur(i,["id","name","color"],{total:i.length}):de({success:!0,total:i.length,hasMore:!1,items:i})}catch(i){D(Fn(i)),process.exit(1)}})}function i6(t,e){t.command("create").description("Create a project label; the ID derives from the name").requiredOption("--project <id>","Project ID").requiredOption("--name <name>","Label name, 1-40 characters, unique in the project").option("--color <hex>","Color as #rrggbb; omitted picks the next palette color").addHelpText("after",`
2445
+ `);yD(n,"list","schedule.list",r,()=>e6(n,e)),yD(n,"create","schedule.create",r,()=>ZZ(n,e)),yD(n,"edit","schedule.edit",r,()=>KZ(n,e))}var r6=Qe(require("fs")),ED=Qe(Hr());function Fn(t){let e=t instanceof Error?t.message:String(t);return e.includes("Authentication failed")||e.includes("No token provided")?["Authentication failed.","Run `sg login`. For headless/API-key auth, set SUPERGLUE_API_KEY and SUPERGLUE_API_ENDPOINT, or pass --api-key and --endpoint."].join(" "):e.toLowerCase().includes("fetch failed")?["Could not reach the configured superglue API endpoint.","Set SUPERGLUE_API_ENDPOINT or pass --endpoint, then run `sg login` or provide an org-scoped API key for headless auth."].join(" "):e}function a1e(t,e){if(!/^\d+$/.test(t))throw new Error(`--${e} must be a non-negative integer`);return Number(t)}function ID(t){if(!ED.PROJECT_TASK_STATUSES.includes(t))throw new Error(`--status must be one of ${ED.PROJECT_TASK_STATUSES.join(", ")}`);return t}function CD(t,e){let r=t.split(",").map(n=>n.trim()).filter(Boolean);if(!r.length)throw new Error(`--${e} needs at least one label ID`);return r}function TC(t){return t.option("--status <status>","not_started, in_progress, waiting, or done").option("--position <n>","0-based index in the status column; 0 is the top, values past the end place the task last").option("--description <text>","Task description; an empty string clears it").option("--description-file <path>","Read the task description from a file").option("--due-date <date>","Due date as YYYY-MM-DD").option("--assignee <userId>","Organization member user ID").option("--labels <ids>","Comma-separated project label IDs; replaces the task's labels (see sg project label list)")}function DC(t){if(t.description!==void 0&&t.descriptionFile!==void 0)throw new Error("Use either --description or --description-file, not both");let e={};return t.name!==void 0&&(e.name=t.name),t.status!==void 0&&(e.status=ID(t.status)),t.position!==void 0&&(e.position=a1e(t.position,"position")),t.description!==void 0&&(e.description=t.description),t.descriptionFile!==void 0&&(e.description=r6.readFileSync(t.descriptionFile,"utf-8")),t.dueDate!==void 0&&(e.dueDate=t.dueDate),t.assignee!==void 0&&(e.assigneeUserId=t.assignee),t.labels!==void 0&&(e.labelIds=CD(t.labels,"labels")),e}function Pd(t,e=Ci()){return{id:t.id,name:t.name,status:t.status,position:t.position,dueDate:t.dueDate,assigneeUserId:t.assigneeUserId,labelIds:t.labelIds,...e?{description:t.description,createdAt:t.createdAt,updatedAt:t.updatedAt}:{descriptionChars:t.description.length}}}function kC(t){return{id:t.id,name:t.name,color:t.color}}function n6(t,e){t.command("list").description("List a project's labels, sorted by name").requiredOption("--project <id>","Project ID").action(async r=>{let{client:n}=e();try{let i=(await n.listAllProjectLabels(r.project)).map(kC);Ie()?dr(i,["id","name","color"],{total:i.length}):de({success:!0,total:i.length,hasMore:!1,items:i})}catch(i){D(Fn(i)),process.exit(1)}})}function i6(t,e){t.command("create").description("Create a project label; the ID derives from the name").requiredOption("--project <id>","Project ID").requiredOption("--name <name>","Label name, 1-40 characters, unique in the project").option("--color <hex>","Color as #rrggbb; omitted picks the next palette color").addHelpText("after",`
2446
2446
  Examples:
2447
2447
  sg project label create --project crm-migration --name Bug --color "#ef4444"
2448
2448
  sg project task edit --project crm-migration --id fix-login --labels bug
2449
- `).action(async r=>{let{client:n}=e();try{let i=await n.saveProjectLabel({projectId:r.project,input:{name:r.name,...r.color!==void 0?{color:r.color}:{}}});Ie()?Pe(`Label created: ${C.bold}${i.id}${C.reset}`,{color:i.color}):de({success:!0,label:kC(i)})}catch(i){D(Fn(i)),process.exit(1)}})}function o6(t,e){t.command("edit").description("Rename or recolor a project label; the ID and task assignments stay unchanged").requiredOption("--project <id>","Project ID").requiredOption("--id <labelId>","Label ID").option("--name <name>","New label name").option("--color <hex>","New color as #rrggbb").action(async r=>{let{client:n}=e();try{let i={};if(r.name!==void 0&&(i.name=r.name),r.color!==void 0&&(i.color=r.color),Object.keys(i).length===0)throw new Error("Provide --name or --color");let o=await n.saveProjectLabel({projectId:r.project,labelId:r.id,input:i});Ie()?Pe(`Label updated: ${C.bold}${o.id}${C.reset}`,{name:o.name,color:o.color}):de({success:!0,label:kC(o)})}catch(i){D(Fn(i)),process.exit(1)}})}function s6(t,e){t.command("delete").description("Delete a project label and remove it from every task").requiredOption("--project <id>","Project ID").requiredOption("--id <labelId>","Label ID").action(async r=>{let{client:n}=e();try{await n.deleteProjectLabel({projectId:r.project,labelId:r.id}),Ie()?Pe(`Label deleted: ${C.bold}${r.id}${C.reset}`):de({success:!0,deleted:{id:r.id}})}catch(i){D(Fn(i)),process.exit(1)}})}function a6(t,e){t.command("list").description("List projects").option("--include-archived","Include archived projects").option("--limit <n>","Max results","25").option("--offset <n>","Skip first N results","0").action(async r=>{let{client:n}=e();try{let i=Math.min(Math.max(parseInt(r.limit,10)||25,1),100),o=Math.max(parseInt(r.offset,10)||0,0),s=await n.listAllProjectSummaries({includeArchived:!!r.includeArchived}),a=s.slice(o,o+i).map(c=>({id:c.id,name:c.name,...c.description?{description:c.description}:{},archived:c.archived,isPinned:c.isPinned,updatedAt:c.updatedAt}));Ie()?ur(a,["id","name","archived","updatedAt"],{total:s.length}):de({success:!0,total:s.length,hasMore:o+a.length<s.length,items:a})}catch(i){D(Fn(i)),process.exit(1)}})}function c6(t,e){TC(t.command("create").description("Create a project task; without --position it goes to the end of its column").requiredOption("--project <id>","Project ID").requiredOption("--name <name>","Task name, 1-120 characters")).addHelpText("after",`
2449
+ `).action(async r=>{let{client:n}=e();try{let i=await n.saveProjectLabel({projectId:r.project,input:{name:r.name,...r.color!==void 0?{color:r.color}:{}}});Ie()?Pe(`Label created: ${C.bold}${i.id}${C.reset}`,{color:i.color}):de({success:!0,label:kC(i)})}catch(i){D(Fn(i)),process.exit(1)}})}function o6(t,e){t.command("edit").description("Rename or recolor a project label; the ID and task assignments stay unchanged").requiredOption("--project <id>","Project ID").requiredOption("--id <labelId>","Label ID").option("--name <name>","New label name").option("--color <hex>","New color as #rrggbb").action(async r=>{let{client:n}=e();try{let i={};if(r.name!==void 0&&(i.name=r.name),r.color!==void 0&&(i.color=r.color),Object.keys(i).length===0)throw new Error("Provide --name or --color");let o=await n.saveProjectLabel({projectId:r.project,labelId:r.id,input:i});Ie()?Pe(`Label updated: ${C.bold}${o.id}${C.reset}`,{name:o.name,color:o.color}):de({success:!0,label:kC(o)})}catch(i){D(Fn(i)),process.exit(1)}})}function s6(t,e){t.command("delete").description("Delete a project label and remove it from every task").requiredOption("--project <id>","Project ID").requiredOption("--id <labelId>","Label ID").action(async r=>{let{client:n}=e();try{await n.deleteProjectLabel({projectId:r.project,labelId:r.id}),Ie()?Pe(`Label deleted: ${C.bold}${r.id}${C.reset}`):de({success:!0,deleted:{id:r.id}})}catch(i){D(Fn(i)),process.exit(1)}})}function a6(t,e){t.command("list").description("List projects").option("--include-archived","Include archived projects").option("--limit <n>","Max results","25").option("--offset <n>","Skip first N results","0").action(async r=>{let{client:n}=e();try{let i=Math.min(Math.max(parseInt(r.limit,10)||25,1),100),o=Math.max(parseInt(r.offset,10)||0,0),s=await n.listAllProjectSummaries({includeArchived:!!r.includeArchived}),a=s.slice(o,o+i).map(c=>({id:c.id,name:c.name,...c.description?{description:c.description}:{},archived:c.archived,isPinned:c.isPinned,updatedAt:c.updatedAt}));Ie()?dr(a,["id","name","archived","updatedAt"],{total:s.length}):de({success:!0,total:s.length,hasMore:o+a.length<s.length,items:a})}catch(i){D(Fn(i)),process.exit(1)}})}function c6(t,e){TC(t.command("create").description("Create a project task; without --position it goes to the end of its column").requiredOption("--project <id>","Project ID").requiredOption("--name <name>","Task name, 1-120 characters")).addHelpText("after",`
2450
2450
  Examples:
2451
2451
  sg project task create --project crm-migration --name "Map customer fields"
2452
2452
  sg project task create --project crm-migration --name "Fix blockers" --position 0
@@ -2462,7 +2462,7 @@ Examples:
2462
2462
  sg project task edit --project crm-migration --id map-customer-fields --labels blocked,backend
2463
2463
  `).action(async r=>{let{client:n}=e();try{if(r.dueDate!==void 0&&r.clearDueDate)throw new Error("Use either --due-date or --clear-due-date, not both");if(r.assignee!==void 0&&r.unassign)throw new Error("Use either --assignee or --unassign, not both");if(r.labels!==void 0&&r.clearLabels)throw new Error("Use either --labels or --clear-labels, not both");if(r.labels!==void 0&&!r.labels.replace(/[\s,]/g,""))throw new Error("--labels needs at least one label ID; use --clear-labels to remove all labels");let i=DC(r);if(r.clearDueDate&&(i.dueDate=null),r.unassign&&(i.assigneeUserId=null),r.clearLabels&&(i.labelIds=[]),Object.keys(i).length===0)throw new Error("Provide at least one field to update");let o=await n.saveProjectTask({projectId:r.project,taskId:r.id,input:i});Ie()?Pe(`Task updated: ${C.bold}${o.id}${C.reset}`,{status:o.status,position:o.position}):de({success:!0,task:Pd(o,!0)})}catch(i){D(Fn(i)),process.exit(1)}})}var u6=Qe(Hr());function d6(t,e){t.command("list").description("List a project's tasks in board order: by status column, then position").requiredOption("--project <id>","Project ID").option("--status <status>","Filter by status: not_started, in_progress, waiting, or done").option("--label <ids>","Filter by comma-separated label IDs; matches tasks with any of them").option("--limit <n>","Max results","100").option("--offset <n>","Skip first N results","0").addHelpText("after",`
2464
2464
  Default output omits descriptions and attachments; --full includes them.
2465
- `).action(async r=>{let{client:n}=e();try{let i=r.status===void 0?void 0:ID(r.status),o=Math.min(Math.max(parseInt(r.limit,10)||100,1),1e3),s=Math.max(parseInt(r.offset,10)||0,0),a=r.label===void 0?void 0:new Set(CD(r.label,"label")),c=await n.listAllProjectTasks(r.project),l=c.filter(A=>(!i||A.status===i)&&(!a||A.labelIds.some(p=>a.has(p)))),u=l.slice(s,s+o).map(A=>Pd(A)),d=Object.fromEntries(u6.PROJECT_TASK_STATUSES.map(A=>[A,c.filter(p=>p.status===A).length]));Ie()?ur(u,["id","name","status","position","dueDate","assigneeUserId","labelIds"],{total:l.length}):de({success:!0,total:l.length,hasMore:s+u.length<l.length,statusCounts:d,items:u})}catch(i){D(Fn(i)),process.exit(1)}})}function sc(t,e,r,n,i){bi(n,r)?i():t.command(e,{hidden:!0}).allowUnknownOption().allowExcessArguments(!0).action(()=>{D(Si(r,n)),process.exit(1)})}function A6(t,e,r){let n=t.command("project").description("List projects and manage their tasks and labels").addHelpText("after",`
2465
+ `).action(async r=>{let{client:n}=e();try{let i=r.status===void 0?void 0:ID(r.status),o=Math.min(Math.max(parseInt(r.limit,10)||100,1),1e3),s=Math.max(parseInt(r.offset,10)||0,0),a=r.label===void 0?void 0:new Set(CD(r.label,"label")),c=await n.listAllProjectTasks(r.project),l=c.filter(A=>(!i||A.status===i)&&(!a||A.labelIds.some(p=>a.has(p)))),u=l.slice(s,s+o).map(A=>Pd(A)),d=Object.fromEntries(u6.PROJECT_TASK_STATUSES.map(A=>[A,c.filter(p=>p.status===A).length]));Ie()?dr(u,["id","name","status","position","dueDate","assigneeUserId","labelIds"],{total:l.length}):de({success:!0,total:l.length,hasMore:s+u.length<l.length,statusCounts:d,items:u})}catch(i){D(Fn(i)),process.exit(1)}})}function sc(t,e,r,n,i){bi(n,r)?i():t.command(e,{hidden:!0}).allowUnknownOption().allowExcessArguments(!0).action(()=>{D(Si(r,n)),process.exit(1)})}function A6(t,e,r){let n=t.command("project").description("List projects and manage their tasks and labels").addHelpText("after",`
2466
2466
  Quick Reference:
2467
2467
  sg project list List projects (default 25)
2468
2468
  sg project task list --project <id> List tasks in board order