@valbuild/ui 0.84.0 → 0.84.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/valbuild-ui.cjs.js +1 -1
- package/dist/valbuild-ui.esm.js +1 -1
- package/package.json +3 -3
- package/server/.tmp/assets/{index-CeABcREg.js → index-Cf3eTsl7.js} +1 -1
- package/server/.tmp/index.html +1 -1
- package/server/dist/valbuild-ui-server.cjs.js +2 -2
- package/server/dist/valbuild-ui-server.esm.js +2 -2
package/dist/valbuild-ui.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _="/spa/index.css",A="/app",V="val-app",P="val-overlay",s=!1,t="0.84.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _="/spa/index.css",A="/app",V="val-app",P="val-overlay",s=!1,t="0.84.1";exports.IS_DEV=s;exports.VAL_APP_ID=V;exports.VAL_APP_PATH=A;exports.VAL_CSS_PATH=_;exports.VAL_OVERLAY_ID=P;exports.VERSION=t;
|
package/dist/valbuild-ui.esm.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valbuild/ui",
|
|
3
|
-
"version": "0.84.
|
|
3
|
+
"version": "0.84.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"typecheck": "tsc --noEmit",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"@types/express": "^4.17.17",
|
|
61
61
|
"@types/react": "^18.2.38",
|
|
62
62
|
"@types/react-resizable": "^3.0.5",
|
|
63
|
-
"@valbuild/core": "~0.84.
|
|
64
|
-
"@valbuild/shared": "~0.84.
|
|
63
|
+
"@valbuild/core": "~0.84.1",
|
|
64
|
+
"@valbuild/shared": "~0.84.1",
|
|
65
65
|
"autoprefixer": "^10.4.13",
|
|
66
66
|
"class-variance-authority": "^0.7.0",
|
|
67
67
|
"classnames": "^2.3.2",
|
|
@@ -40,7 +40,7 @@ Error generating stack: `+i.message+`
|
|
|
40
40
|
*/var Qz=g,e$=Symbol.for("react.element"),t$=Symbol.for("react.fragment"),n$=Object.prototype.hasOwnProperty,r$=Qz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o$={key:!0,ref:!0,__self:!0,__source:!0};function bO(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)n$.call(t,r)&&!o$.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:e$,type:e,key:i,ref:s,props:o,_owner:r$.current}}Vv.Fragment=t$;Vv.jsx=bO;Vv.jsxs=bO;xO.exports=Vv;var d=xO.exports;function kb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function G1(e,t){if(e){if(typeof e=="string")return kb(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kb(e,t):void 0}}function gi(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=G1(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
41
41
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return s=l.done,l},e:function(l){a=!0,i=l},f:function(){try{s||n.return==null||n.return()}finally{if(a)throw i}}}}function q1(e){return e.length>0}var qh=Object.freeze({kind:"ok",value:void 0});function _n(e){return e===void 0?qh:{kind:"ok",value:e}}function Hn(e){return{kind:"err",error:e}}function Bu(e){return e===qh||e.kind==="ok"}function Uv(e){return e!==qh&&e.kind==="err"}function wO(e){var t=[],n=[],r=gi(e),o;try{for(r.s();!(o=r.n()).done;){var i=o.value;Bu(i)?t.push(i.value):n.push(i.error)}}catch(s){r.e(s)}finally{r.f()}return q1(n)?Hn(n):_n(t)}function i$(e){return wO(e)}function s$(e){var t=[],n=gi(e),r;try{for(n.s();!(r=n.n()).done;){var o=r.value;Uv(o)&&t.push(o.error)}}catch(i){n.e(i)}finally{n.f()}return q1(t)?Hn(t):qh}function Y1(e,t){return function(n){for(var r=_n(t),o=0;o<n.length&&Bu(r);++o)r=e(r.value,n[o],o);return r}}function lo(e){return function(t){return Bu(t)?_n(e(t.value)):t}}function Pl(e){return function(t){return Bu(t)?e(t.value):t}}function a$(e){return function(t){return Uv(t)?Hn(e(t.error)):t}}function l$(e,t){return function(n){return e(n)?_n(n):Hn(t(n))}}var Wv=function(t,n){return function(r){return Bu(r)?t(r.value)?r:Hn(n(r.value)):r}},c$=Object.freeze({__proto__:null,voidOk:qh,ok:_n,err:Hn,isOk:Bu,isErr:Uv,allT:wO,all:i$,allV:s$,flatMapReduce:Y1,map:lo,flatMap:Pl,mapErr:a$,fromPredicate:l$,filterOrElse:Wv});function u$(e){if(Array.isArray(e))return e}function d$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}function f$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
42
42
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jn(e,t){return u$(e)||d$(e,t)||G1(e,t)||f$()}function h$(e){if(Array.isArray(e))return kb(e)}function p$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function m$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
43
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function me(e){return h$(e)||p$(e)||G1(e)||m$()}function ie(e){"@babel/helpers - typeof";return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(e)}function g$(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SO(e){var t=g$(e,"string");return typeof t=="symbol"?t:t+""}function B(e,t,n){return(t=SO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zC(Object(n),!0).forEach(function(r){B(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SO(r.key),r)}}function An(e,t,n){return t&&v$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yg(e){return yg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yg(e)}function kO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kO=function(){return!!e})()}function y$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x$(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y$(e)}function Zr(e,t,n){return t=yg(t),x$(e,kO()?Reflect.construct(t,[],yg(e).constructor):t.apply(e,n))}function Eb(e,t){return Eb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Eb(e,t)}function Qr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eb(e,t)}var eo=function(){function e(){Rn(this,e)}return An(e,[{key:"executeCustomValidateFunctions",value:function(n,r,o){var i=[],s=gi(r),a;try{for(s.s();!(a=s.n()).done;){var l=a.value;try{var c=l(n,o);c&&i.push({message:c,value:n})}catch(u){i.push({message:"Error in custom validate function: ".concat(u instanceof Error?u.message:String(u)),value:n,schemaError:!0})}}}catch(u){s.e(u)}finally{s.f()}return i}},{key:"appendValidationError",value:function(n,r,o,i,s){return n?(n[r]?n[r].push({message:o,value:i,schemaError:s}):n[r]=[{message:o,value:i,schemaError:s}],n):B({},r,[{message:o,value:i,schemaError:s}])}}])}(),EO=Symbol("GetSchema"),CO=Symbol("Path"),b$=Symbol("GetSource");function $C(e){return e[EO]}var De="_type",bt="_ref",Cb="_tag";function w$(e){return ie(e)==="object"&&e!==null&&De in e&&e[De]==="file"&&bt in e&&typeof e[bt]=="string"}var S$=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];return Rn(this,t),r=Zr(this,t),r.options=n,r.opt=o,r.isRemote=i,r.customValidateFunctions=s,r}return Qr(t,e),An(t,[{key:"remote",value:function(){return new t(this.options,this.opt,!0)}},{key:"validate",value:function(r){return new t(this.options,this.opt,this.isRemote,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});if(this.opt&&o==null)return i.length>0?B({},r,i):!1;if(o==null)return B({},r,[].concat(me(i),[{message:"Non-optional file was null or undefined.",value:o}]));if(typeof o[bt]!="string")return B({},r,[].concat(me(i),[{message:"File did not have a file reference string. Got: ".concat(ie(o[bt])),value:o}]));if(this.isRemote&&o[De]!=="remote")return B({},r,[].concat(me(i),[{message:"Expected a remote file, but got a local file.",value:o,fixes:["file:upload-remote"]}]));if(this.isRemote&&o[De]==="remote")return B({},r,[].concat(me(i),[{message:"Remote file was not checked.",value:o,fixes:["file:check-remote"]}]));if(!this.isRemote&&o[De]==="remote")return B({},r,[].concat(me(i),[{message:"Expected locale file, but found remote.",value:o,fixes:["file:download-remote"]}]));if(o[De]!=="file")return B({},r,[].concat(me(i),[{message:"File did not have the valid file extension type. Got: ".concat(o[De]),value:o,fixes:["file:change-extension","file:check-metadata"]}]));var s=this.options||{},a=s.accept,l=o.metadata||{},c=l.mimeType;if(a&&c&&!c.includes("/"))return B({},r,[].concat(me(i),[{message:"Invalid mime type format. Got: ".concat(c),value:o,fixes:["file:change-extension","file:check-metadata"]}]));if(a&&c&&c.includes("/")){var u=a.split(",").map(function(p){return p.trim()}),f=u.some(function(p){if(p==="*/*")return!0;if(p.endsWith("/*")){var m=p.slice(0,-2);return c.startsWith(m)}return p===c});if(!f)return B({},r,[].concat(me(i),[{message:"Mime type mismatch. Found '".concat(c,"' but schema accepts '").concat(a,"'"),value:o,fixes:["file:change-extension","file:check-metadata"]}]))}var h=Y.filenameToMimeType(o[bt]);return h?h!==c?B({},r,[].concat(me(i),[{message:"Mime type and file extension not matching. Mime type is '".concat(c,"' but file extension is '").concat(h,"'"),value:o,fixes:["file:change-extension","file:check-metadata"]}])):o.metadata?B({},r,[].concat(me(i),[{message:"Found metadata, but it could not be validated. File metadata must be an object with the mimeType.",value:o,fixes:["file:check-metadata"]}])):B({},r,[].concat(me(i),[{message:"Missing File metadata.",value:o,fixes:["file:add-metadata"]}])):B({},r,[].concat(me(i),[{message:"Could not determine mime type from file extension. Got: ".concat(o[bt]),value:o,fixes:["file:change-extension","file:check-metadata"]}]))}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'object', got 'null'",typeError:!0}])}:ie(o)!=="object"?{success:!1,errors:B({},r,[{message:"Expected object, got '".concat(ie(o),"'"),typeError:!0}])}:bt in o?De in o&&o[De]==="file"?{success:!0,data:o}:{success:!1,errors:B({},r,[{message:"Value of this schema must use: 'c.file' (error type: missing_file_extension)",typeError:!0}])}:{success:!1,errors:B({},r,[{message:"Value of this schema must use: 'c.file' (error type: missing_ref_prop)",typeError:!0}])}}},{key:"nullable",value:function(){return new t(this.options,!0)}},{key:"executeSerialize",value:function(){var r;return{type:"file",options:this.options,opt:this.opt,remote:this.isRemote,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),k$=function(t){return new S$(t)};function E$(e){return e[bt].startsWith("/public")?e.patch_id?{url:"/api/val/files"+e[bt]+"?patch_id=".concat(e.patch_id),metadata:e.metadata}:{url:e[bt].slice(7),metadata:e.metadata}:{url:e[bt]+(e.patch_id?"?patch_id=".concat(e.patch_id):""),metadata:e.metadata}}function C$(e){return ie(e)==="object"&&e!==null&&e!==void 0&&CO in e&&"val"in e}function NO(e){return e[CO]}function fu(e,t){if(ie(t)==="symbol")throw Error("Cannot create val path of array item with symbol prop: ".concat(t.toString()));if(e)return e.includes(Y.ModuleFilePathSep)?"".concat(e,".").concat(JSON.stringify(t)):"".concat(e).concat(Y.ModuleFilePathSep).concat(JSON.stringify(t))}function Or(e,t){if(ie(t)==="symbol")throw Error("Cannot create val path of array item with symbol prop: ".concat(t.toString()));if(!e)throw Error("Cannot create val path of array item of empty or missing path: ".concat(e,". Item: ").concat(t));return e.includes(Y.ModuleFilePathSep)?"".concat(e,".").concat(JSON.stringify(t)):"".concat(e).concat(Y.ModuleFilePathSep).concat(JSON.stringify(t))}var N$=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];return Rn(this,t),r=Zr(this,t),r.options=n,r.opt=o,r.isRaw=i,r.customValidateFunctions=s,r}return Qr(t,e),An(t,[{key:"min",value:function(r){return this.minLength(r)}},{key:"minLength",value:function(r){return new t(xt(xt({},this.options),{},{minLength:r}),this.opt,this.isRaw)}},{key:"max",value:function(r){return this.maxLength(r)}},{key:"maxLength",value:function(r){return new t(xt(xt({},this.options),{},{maxLength:r}),this.opt,this.isRaw)}},{key:"regexp",value:function(r,o){return new t(xt(xt({},this.options),{},{regexp:r,regExpMessage:o}),this.opt,this.isRaw)}},{key:"validate",value:function(r){return new t(this.options,this.opt,this.isRaw,this.customValidateFunctions.concat(r))}},{key:"executeValidate",value:function(r,o){var i,s,a,l=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});return this.opt&&o==null?l.length>0?B({},r,l):!1:typeof o!="string"?B({},r,[{message:"Expected 'string', got '".concat(ie(o),"'"),value:o}]):((i=this.options)!==null&&i!==void 0&&i.maxLength&&o.length>this.options.maxLength&&l.push({message:"Expected string to be at most ".concat(this.options.maxLength," characters long, got ").concat(o.length),value:o}),(s=this.options)!==null&&s!==void 0&&s.minLength&&o.length<this.options.minLength&&l.push({message:"Expected string to be at least ".concat(this.options.minLength," characters long, got ").concat(o.length),value:o}),(a=this.options)!==null&&a!==void 0&&a.regexp&&!this.options.regexp.test(o)&&l.push({message:this.options.regExpMessage||"Expected string to match reg exp: ".concat(this.options.regexp.toString(),", got '").concat(o,"'"),value:o}),l.length>0?B({},r,l):!1)}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:typeof o=="string"?{success:!0,data:o}:{success:!1,errors:B({},r,[{message:"Expected 'string', got '".concat(ie(o),"'"),typeError:!0}])}}},{key:"nullable",value:function(){return new t(this.options,!0,this.isRaw)}},{key:"raw",value:function(){return new t(this.options,this.opt,!0)}},{key:"executeSerialize",value:function(){var r,o,i,s,a;return{type:"string",options:{maxLength:(r=this.options)===null||r===void 0?void 0:r.maxLength,minLength:(o=this.options)===null||o===void 0?void 0:o.minLength,regexp:((i=this.options)===null||i===void 0?void 0:i.regexp)&&{message:this.options.regExpMessage,source:this.options.regexp.source,flags:this.options.regexp.flags},customValidate:this.customValidateFunctions&&((s=this.customValidateFunctions)===null||s===void 0?void 0:s.length)>0},opt:this.opt,raw:this.isRaw,customValidate:this.customValidateFunctions&&((a=this.customValidateFunctions)===null||a===void 0?void 0:a.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),PO=function(t){return new N$(t)},_l=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Rn(this,t),r=Zr(this,t),r.items=n,r.opt=o,r.customValidateFunctions=i,r}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.items,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=!1,s=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});if(this.opt&&o==null)return s.length>0?B({},r,s):!1;if(o===null)return B({},r,[{message:"Expected 'object', got 'null'"}]);if(ie(o)!=="object")return B({},r,[{message:"Expected 'object', got '".concat(ie(o),"'")}]);if(Array.isArray(o))return B({},r,[{message:"Expected 'object', got 'array'"}]);var a=gi(s),l;try{for(a.s();!(l=a.n()).done;){var c=l.value;i=this.appendValidationError(i,r,c.message,o,c.schemaError)}}catch(x){a.e(x)}finally{a.f()}for(var u=0,f=Object.entries(this.items);u<f.length;u++){var h=jn(f[u],2),p=h[0],m=h[1],v=fu(r,p);if(!v)i=this.appendValidationError(i,r,"Internal error: could not create path at ".concat(!r&&typeof r=="string"?"<empty string>":r," at key ").concat(p),o);else{var b=m.executeValidate(v,o[p]);b&&i?i=xt(xt({},b),i):b&&(i=b)}}return i}},{key:"executeAssert",value:function(r,o){if(this.opt&&o===null)return{success:!0,data:o};if(o===null)return{success:!1,errors:B({},r,[{message:"Expected 'object', got 'null'",typeError:!0}])};if(ie(o)!=="object")return{success:!1,errors:B({},r,[{message:"Expected 'object', got '".concat(ie(o),"'"),typeError:!0}])};if(Array.isArray(o))return{success:!1,errors:B({},r,[{message:"Expected 'object', got 'array'",typeError:!0}])};for(var i=[],s=0,a=Object.keys(this.items);s<a.length;s++){var l=a[s],c=fu(r,l);c?l in o||i.push({message:"Expected key '".concat(l,"' not found in object"),typeError:!0}):i.push({message:"Internal error: could not create path at ".concat(!r&&typeof r=="string"?"<empty string>":r," at key ").concat(l),internalError:!0})}return i.length>0?{success:!1,errors:B({},r,i)}:{success:!0,data:o}}},{key:"nullable",value:function(){return new t(this.items,!0)}},{key:"executeSerialize",value:function(){var r;return{type:"object",items:Object.fromEntries(Object.entries(this.items).map(function(o){var i=jn(o,2),s=i[0],a=i[1];return[s,a.executeSerialize()]})),opt:this.opt,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(r,o){var i={};if(o===null)return i;for(var s in this.items){var a=o[s];if(a!=null){var l=Or(r,s),c=this.items[s].executeRender(l,a);for(var u in c){var f=u;i[f]=c[f]}}}return i}}])}(eo),_O=function(t){return new _l(t)};_O({get test(){return PO()}});var Hv=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Rn(this,t),r=Zr(this,t),B(r,"renderInput",null),r.item=n,r.opt=o,r.customValidateFunctions=i,r}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.item,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this.executeAssert(r,o);if(!i.success)return i.errors;if(i.data===null)return!1;for(var s={},a=0,l=Object.entries(i.data);a<l.length;a++){var c=jn(l[a],2),u=c[0],f=c[1],h=Or(r,Number(u)),p=this.item.executeValidate(h,f);p&&(s=xt(xt({},p),s))}return Object.keys(s).length===0?!1:s}},{key:"executeAssert",value:function(r,o){return o===null&&this.opt?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'array', got 'null'",typeError:!0}])}:ie(o)!=="object"?{success:!1,errors:B({},r,[{message:"Expected 'object', got '".concat(ie(o),"'"),typeError:!0}])}:Array.isArray(o)?{success:!0,data:o}:{success:!1,errors:B({},r,[{message:"Expected object of type 'array'",typeError:!0}])}}},{key:"nullable",value:function(){return new t(this.item,!0)}},{key:"executeSerialize",value:function(){var r;return{type:"array",item:this.item.executeSerialize(),opt:this.opt,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(r,o){var i={};if(o===null)return i;for(var s=0;s<o.length;s++){var a=s,l=o[a];if(l!=null){var c=Or(r,a),u=this.item.executeRender(c,l);for(var f in u){var h=f;i[h]=u[h]}}}if(this.renderInput){var p=this.renderInput,m=p.select,v=p.layout;v!=="list"&&(i[r]={status:"error",message:"Unknown layout type: "+v});try{i[r]={status:"success",data:{layout:"list",parent:"array",items:o.map(function(b){var x=m({val:b}),w=x.title,S=x.subtitle,C=x.image;return{title:w,subtitle:S,image:C}})}}}catch(b){i[r]={status:"error",message:b instanceof Error?b.message:"Unknown error"}}}return i}},{key:"render",value:function(r){return this.renderInput=r,this}}])}(eo),P$=function(t){return new Hv(t)},Xa=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Rn(this,t),r=Zr(this,t),r.value=n,r.opt=o,r.customValidateFunctions=i,r}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.value,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});return this.opt&&o==null?i.length>0?B({},r,i):!1:typeof o!="string"?B({},r,[].concat(me(i),[{message:"Expected 'string', got '".concat(ie(o),"'"),value:o}])):o!==this.value?B({},r,[].concat(me(i),[{message:"Expected literal '".concat(this.value,"', got '").concat(o,"'"),value:o}])):i.length>0?B({},r,i):!1}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'string', got 'null'",typeError:!0}])}:typeof o=="string"&&o===this.value?{success:!0,data:o}:{success:!1,errors:B({},r,[{message:"Expected literal '".concat(this.value,"', got '").concat(o,"'"),typeError:!0}])}}},{key:"nullable",value:function(){return new t(this.value,!0)}},{key:"executeSerialize",value:function(){var r;return{type:"literal",value:this.value,opt:this.opt,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),_$=function(t){return new Xa(t)},jO=function(e){function t(n,r){var o,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];return Rn(this,t),o=Zr(this,t),o.key=n,o.items=r,o.opt=i,o.customValidateFunctions=s,o}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.key,this.items,this.opt,this.customValidateFunctions.concat(r))}},{key:"executeValidate",value:function(r,o){var i=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r}),s=o;if(this.opt&&s===null)return i.length>0?B({},r,i):!1;if(!this.key)return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Missing required first argument in union",schemaError:!0}]));var a=this.key;if(!Array.isArray(this.items))return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"A union schema must take more than 1 schema arguments",schemaError:!0}]));if(typeof a=="string"){if(this.items.some(function(O){return!(O instanceof _l)}))return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Key is a string, so all schema items must be objects",schemaError:!0}]));var l=this.items,c=l.map(function(O){return O.executeSerialize()}),u=c.filter(function(O){return O.type!=="object"||O.items[a].type!=="literal"});if(u.length>0)return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"All schema items must be objects with a key: ".concat(a," that is a literal schema. Found: ").concat(JSON.stringify(u,null,2)),schemaError:!0}]));var f=c,h=f.filter(function(O){return O.items[a].opt});if(h.length>1)return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Schema cannot have an optional keys: ".concat(a),schemaError:!0}]));if(ie(s)!=="object")return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Expected an object",typeError:!0}]));var p=s;if(p[a]===void 0)return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Missing required key: ".concat(a),typeError:!0}]));var m=[],v=gi(f),b;try{for(v.s();!(b=v.n()).done;){var x=b.value,w=x.items[a];if(w.type==="literal")if(!m.includes(w.value))m.push(w.value);else return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Found duplicate key in schema: ".concat(w.value),schemaError:!0}]))}}catch(O){v.e(O)}finally{v.f()}var S=l.find(function(O){return!O.items[a].executeValidate(r,p[a])});if(!S){var C=fu(r,a);if(!C)throw new Error("Internal error: could not create path at ".concat(!r&&typeof r=="string"?"<empty string>":r," at key ").concat(a));return B({},C,[{message:'Invalid key: "'.concat(a,'". Value was: "').concat(p[a],'". Valid values: ').concat(f.map(function(O){var A=O.items[a];if(A.type==="literal"&&A.value)return'"'.concat(A.value,'"');throw new Error("Expected literal schema, got ".concat(JSON.stringify(A,null,2)))}).join(", "))}])}var N=S.executeValidate(r,p);if(N)return N}else if(a instanceof Xa){if(this.items.some(function(O){return!(O instanceof Xa)}))return B({},r,[{message:"Key is a literal schema, so all schema items must be literals",typeError:!0}]);var P=[a].concat(me(this.items));if(typeof s=="string"){var _=P.some(function(O){return!O.executeValidate(r,s)});if(!_)return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Union must match one of the following: ".concat(P.map(function(O){return'"'.concat(O.value,'"')}).join(", "))}]))}}else return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Expected a string or literal"}]));return i.length>0?B({},r,i):!1}},{key:"executeAssert",value:function(r,o){if(this.opt&&o===null)return{success:!0,data:o};if(o===null)return{success:!1,errors:B({},r,[{message:"Expected 'object', got 'null'",typeError:!0}])};if(!this.key)return{success:!1,errors:B({},r,[{message:"Missing required first argument in union schema",schemaError:!0}])};if(!Array.isArray(this.items))return{success:!1,errors:B({},r,[{message:"The schema of this value is wrong. Schema is neither a union of literals nor a tagged union (of objects)",schemaError:!0}])};if(this.key instanceof Xa){var i,s=!1,a={},l=gi((i=[this.key]).concat.apply(i,me(this.items))),c;try{for(l.s();!(c=l.n()).done;){var u=c.value;if(!(u instanceof Xa))return{success:!1,errors:B({},r,[{message:"Schema of value is a union of string, so all schema items must be literals",schemaError:!0}])};if(typeof o!="string"){a[r]=[{message:"Expected 'string', got '".concat(ie(o),"'"),typeError:!0}];continue}var f=u.executeAssert(r,o);if(f.success){s=!0;break}else for(var h=0,p=Object.entries(f.errors);h<p.length;h++){var m,v=jn(p[h],2),b=v[0],x=v[1];a[b]||(a[b]=[]),(m=a[b]).push.apply(m,me(x))}}}catch(H){l.e(H)}finally{l.f()}return s?{success:!0,data:o}:{success:!1,errors:a}}else if(typeof this.key=="string"){var w=!1,S={},C=gi(this.items),N;try{for(C.s();!(N=C.n()).done;){var P=N.value,_=P.executeAssert(r,o);if(_.success){w=!0;break}else for(var O=0,A=Object.entries(_.errors);O<A.length;O++){var L,W=jn(A[O],2),$=W[0],K=W[1];S[$]||(S[$]=[]),(L=S[$]).push.apply(L,me(K))}}}catch(H){C.e(H)}finally{C.f()}return w?{success:!0,data:o}:{success:!1,errors:S}}else return{success:!1,errors:B({},r,[{message:"The schema of this value is wrong. Schema is neither a union of literals nor a tagged union (of objects)",schemaError:!0}])}}},{key:"nullable",value:function(){return new t(this.key,this.items,!0)}},{key:"executeSerialize",value:function(){var r;if(typeof this.key=="string"){var o;return{type:"union",key:this.key,items:this.items.map(function(i){return i.executeSerialize()}),opt:this.opt,customValidate:this.customValidateFunctions&&((o=this.customValidateFunctions)===null||o===void 0?void 0:o.length)>0}}return{type:"union",key:this.key.executeSerialize(),items:this.items.map(function(i){return i.executeSerialize()}),opt:this.opt,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(r,o){var i={};if(o===null||this.key instanceof Xa)return i;var s=this.key;if(typeof s=="string"){var a=this.items.find(function(f){if(f instanceof _l){var h=f.items[s];if(h instanceof Xa)return ie(o)==="object"&&s in o&&h.value===o[s]}return!1});if(a){var l=a.executeRender(r,o);for(var c in l){var u=c;i[u]=l[u]}return i}i[r]={status:"error",message:"Could not find a matching (object) schema for the union key: ".concat(s)}}return i[r]={status:"error",message:"The schema of this value is wrong. Expected a object union schema, but union key is not a string. Got: '".concat(JSON.stringify(s,null,2),"'")},i}}])}(eo),j$=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new jO(t,r)},J1=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];return Rn(this,t),r=Zr(this,t),r.options=n,r.opt=o,r.isRemote=i,r.customValidateFunctions=s,r}return Qr(t,e),An(t,[{key:"remote",value:function(){return new t(this.options,this.opt,!0)}},{key:"validate",value:function(r){return new t(this.options,this.opt,this.isRemote,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});if(this.opt&&o==null)return i.length>0?B({},r,i):!1;if(o==null)return B({},r,[].concat(me(i),[{message:"Non-optional image was null or undefined.",value:o}]));if(this.isRemote&&o[De]!=="remote")return B({},r,[].concat(me(i),[{message:"Expected a remote image, but got a local image.",value:o,fixes:["image:upload-remote"]}]));if(this.isRemote&&o[De]==="remote")return B({},r,[].concat(me(i),[{message:"Remote image was not checked.",value:o,fixes:["image:check-remote"]}]));if(!this.isRemote&&o[De]==="remote")return B({},r,[].concat(me(i),[{message:"Expected locale image, but found remote.",value:o,fixes:["image:download-remote"]}]));if(typeof o[bt]!="string")return B({},r,[].concat(me(i),[{message:"Image did not have a file reference string. Got: ".concat(ie(o[bt])),value:o}]));if(o[De]!=="file")return B({},r,[].concat(me(i),[{message:"Image did not have the valid file extension type. Got: ".concat(o[De]),value:o,fixes:["image:change-extension","image:check-metadata"]}]));var s=this.options||{},a=s.accept,l=o.metadata||{},c=l.mimeType;if(a&&c&&!c.includes("/"))return B({},r,[].concat(me(i),[{message:"Invalid mime type format. Got: '".concat(c,"'"),value:o,fixes:["image:check-metadata"]}]));if(a&&c&&c.includes("/")){var u=a.split(",").map(function(p){return p.trim()}),f=u.some(function(p){if(p==="*/*")return!0;if(p.endsWith("/*")){var m=p.slice(0,-2);return c.startsWith(m)}return p===c});if(!f)return B({},r,[].concat(me(i),[{message:"Mime type mismatch. Found '".concat(c,"' but schema accepts '").concat(a,"'"),value:o,fixes:["image:check-metadata"]}]))}var h=Y.filenameToMimeType(o[bt]);return h?h&&c&&h!==c?B({},r,[].concat(me(i),[{message:"Mime type and file extension not matching. Mime type is '".concat(c,"' but file extension is '").concat(h,"'"),value:o,fixes:["image:check-metadata"]}])):o.metadata?o.metadata.hotspot&&(ie(o.metadata.hotspot)!=="object"||typeof o.metadata.hotspot.x!="number"||typeof o.metadata.hotspot.y!="number")?B({},r,[].concat(me(i),[{message:"Hotspot must be an object with x and y as numbers.",value:o}])):B({},r,[].concat(me(i),[{message:"Found metadata, but it could not be validated. Image metadata must be an object with the required props: width (positive number), height (positive number) and the mime type.",value:o,fixes:["image:check-metadata"]}])):B({},r,[].concat(me(i),[{message:"Could not validate Image metadata.",value:o,fixes:["image:add-metadata"]}])):B({},r,[].concat(me(i),[{message:"Could not determine mime type from file extension. Got: ".concat(o[bt]),value:o,fixes:["image:check-metadata"]}]))}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'object', got 'null'",typeError:!0}])}:ie(o)!=="object"?{success:!1,errors:B({},r,[{message:"Expected 'object', got '".concat(ie(o),"'"),typeError:!0}])}:bt in o?De in o&&o[De]==="file"?{success:!0,data:o}:{success:!1,errors:B({},r,[{message:"Value of this schema must use: 'c.image' (error type: missing_file_extension)",typeError:!0}])}:{success:!1,errors:B({},r,[{message:"Value of this schema must use: 'c.image' (error type: missing_ref_prop)",typeError:!0}])}}},{key:"nullable",value:function(){return new t(this.options,!0,this.isRemote)}},{key:"executeSerialize",value:function(){var r;return{type:"image",options:this.options,opt:this.opt,remote:this.isRemote,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),T$=function(t){return new J1(t)},Kv=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Rn(this,t),r=Zr(this,t),r.options=n,r.opt=o,r.customValidateFunctions=i,r}return Qr(t,e),An(t,[{key:"maxLength",value:function(r){return new t(xt(xt({},this.options),{},{maxLength:r}),this.opt)}},{key:"minLength",value:function(r){return new t(xt(xt({},this.options),{},{minLength:r}),this.opt)}},{key:"validate",value:function(r){return new t(this.options,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r}),s=this.executeAssert(r,o);if(!s.success)return i.length>0?B({},r,i):s.errors;var a=s.data;if(a===null&&this.opt)return i.length>0?B({},r,i):!1;if(a===null)return B({},r,[].concat(me(i),[{message:"Expected 'array', got 'null'",typeError:!0}]));var l={},c=this.internalValidate(r,a,l);return c?i.length>0?xt(B({},r,i),c):c:Object.keys(l).length>0?i.length>0?xt(B({},r,i),l):l:i.length>0?B({},r,i):!1}},{key:"internalValidate",value:function(r,o,i){var s=this,a=0,l=function(m,v,b){var x=function(M,F,X){b[M]||(b[M]=[]),b[M].push({message:F,typeError:X})},w=gi(v),S;try{for(w.s();!(S=w.n()).done;){var C,N,P,_,O,A,L,W,$,K,H,V=S.value,I=Or(m,v.indexOf(V));if(typeof V=="string"){a+=V.length;continue}if(ie(V)!=="object")return B({},I,[{message:"Expected nodes of type 'object' or 'string', got '".concat(ie(V),"'"),typeError:!0}]);if(V===null)return B({},I,[{message:"Expected nodes of type 'object' or 'string', got 'null'",typeError:!0}]);if(!("tag"in V))return B({},I,[{message:"Expected node to either have 'tag' or be of type 'string'",typeError:!0}]);if(typeof V.tag!="string")return B({},I,[{message:"Expected 'string', got '".concat(ie(V.tag),"'"),typeError:!0}]);if(V.tag==="h1"&&!((C=s.options.block)!==null&&C!==void 0&&C.h1)&&x(I,"'h' block is not valid",!1),V.tag==="h2"&&!((N=s.options.block)!==null&&N!==void 0&&N.h2)&&x(I,"'h2' block is not valid",!1),V.tag==="h3"&&!((P=s.options.block)!==null&&P!==void 0&&P.h3)&&x(I,"'h3' block is not valid",!1),V.tag==="h4"&&!((_=s.options.block)!==null&&_!==void 0&&_.h4)&&x(I,"'h4' block is not valid",!1),V.tag==="h5"&&!((O=s.options.block)!==null&&O!==void 0&&O.h5)&&x(I,"'h5' block is not valid",!1),V.tag==="h6"&&!((A=s.options.block)!==null&&A!==void 0&&A.h6)&&x(I,"'h6' block is not valid",!1),V.tag==="ol"&&!((L=s.options.block)!==null&&L!==void 0&&L.ol)&&x(I,"'ol' block is not valid",!1),V.tag==="ul"&&!((W=s.options.block)!==null&&W!==void 0&&W.ul)&&x(I,"'ul' block is not valid",!1),V.tag==="li"&&!(($=s.options.block)!==null&&$!==void 0&&$.ul)&&!((K=s.options.block)!==null&&K!==void 0&&K.ol)&&x(I,"'li' tag is invalid since neither 'ul' nor 'ol' block is not valid",!1),V.tag==="a"&&!((H=s.options.inline)!==null&&H!==void 0&&H.a)&&x(I,"'a' inline is not valid",!1),V.tag==="img"){var R,j;if(!((R=s.options.inline)!==null&&R!==void 0&&R.img))x(I,"'img' inline is not valid",!1);else if((j=s.options.inline)!==null&&j!==void 0&&j.img){var D,z;if(!("src"in V))return B({},I,[{message:"Expected 'src' in 'img'",typeError:!0}]);var U=Or(I,"src"),G=ie((D=s.options.inline)===null||D===void 0?void 0:D.img)==="object"?(z=s.options.inline)===null||z===void 0?void 0:z.img.executeValidate(U,V.src):new J1({},!1,!1).executeValidate(U,V.src);if(G)for(var _e in G){var ke,Ve=_e;b[Ve]||(b[Ve]=[]),(ke=b[Ve]).push.apply(ke,me(G[Ve]))}}}if("styles"in V&&V.tag!=="span")return B({},I,[{message:"Cannot have styles on '".concat(V.tag,"'. This is only allowed on 'span'"),typeError:!0}]);if("styles"in V){if(!Array.isArray(V.styles))return B({},I,[{message:"Expected 'array', got '".concat(ie(V.styles),"'"),typeError:!0}]);for(var Z=Or(I,"styles"),J=0;J<V.styles.length;J++){var ce,Ne,he,Le=V.styles[J],Pe=Or(Z,J);if(typeof Le!="string")return B({},Pe,[{message:"Expected 'string', got '".concat(ie(Le),"'"),typeError:!0}]);Le==="bold"&&!((ce=s.options.style)!==null&&ce!==void 0&&ce.bold)&&x(Pe,"Style 'bold' is not valid",!1),Le==="italic"&&!((Ne=s.options.style)!==null&&Ne!==void 0&&Ne.italic)&&x(Pe,"Style 'italic' is not valid",!1),Le==="lineThrough"&&!((he=s.options.style)!==null&&he!==void 0&&he.lineThrough)&&x(Pe,"Style 'lineThrough' is not valid",!1)}}if("children"in V){if(!Array.isArray(V.children))return B({},I,[{message:"Expected 'array', got '".concat(ie(V.children),"'"),typeError:!0}]);for(var Je=V.children,gt=0;gt<Je.length;gt++){var Kt=Je[gt];if(ie(Kt)==="object"){var T=Or(I,"children"),k=l(T,[Kt],b);if(k)return k}else if(typeof Kt=="string"){a+=Kt.length;continue}else return B({},I,[{message:"Expected 'object' or 'string', got '".concat(ie(Kt),"'"),typeError:!0}])}}}}catch(E){w.e(E)}finally{w.f()}return!1},c=l(r,o,i),u=[];if(this.options.maxLength&&a>this.options.maxLength&&u.push({message:"Maximum length of ".concat(this.options.maxLength," exceeded (current length: ").concat(a,")"),typeError:!1}),this.options.minLength&&a<this.options.minLength&&u.push({message:"Minimum length of ".concat(this.options.minLength," not met (current length: ").concat(a,")"),typeError:!1}),c){if(u.length>0){var f;c[r]||(c[r]=[]),(f=c[r]).push.apply(f,u)}return c}if(Object.keys(i).length>0){if(u.length>0){var h;i[r]||(i[r]=[]),(h=i[r]).push.apply(h,u)}return i}return u.length>0?B({},r,u):!1}},{key:"executeAssert",value:function(r,o){if(this.opt&&o===null)return{success:!0,data:o};if(o===null&&!this.opt)return{success:!1,errors:B({},r,[{message:"Expected 'array', got 'null'",typeError:!0}])};if(!Array.isArray(o))return{success:!1,errors:B({},r,[{message:"Expected 'array', got '".concat(ie(o),"'"),typeError:!0}])};for(var i={},s=0;s<o.length;s++)this.recursiveAssert(Or(r,s),o[s],i);return Object.keys(i).length>0?{success:!1,errors:i}:{success:!0,data:o}}},{key:"recursiveAssert",value:function(r,o,i){if(ie(o)!=="object"){i[r]||(i[r]=[]),i[r].push({message:"Expected 'object', got '".concat(ie(o),"'"),typeError:!0});return}if(Array.isArray(o)){i[r]||(i[r]=[]),i[r].push({message:"Expected 'object', got 'array'",typeError:!0});return}if(o===null){i[r]||(i[r]=[]),i[r].push({message:"Expected 'object', got 'null'",typeError:!0});return}if("tag"in o&&typeof o.tag!="string"){i[r]||(i[r]=[]),i[r].push({message:"Expected 'string', got '".concat(ie(o.tag),"'"),typeError:!0});return}if("children"in o)if(Array.isArray(o.children))for(var s=0;s<o.children.length;s++){var a=o.children[s],l=Or(Or(r,"children"),s);if(ie(a)==="object")this.recursiveAssert(l,a,i);else{if(typeof a=="string")continue;i[l]||(i[l]=[]),i[l].push({message:"Expected 'object' or 'string', got '".concat(ie(a),"'"),typeError:!0})}}else{i[r]||(i[r]=[]),i[r].push({message:"Expected 'array', got '".concat(ie(o.children),"'"),typeError:!0});return}if("styles"in o)if(!Array.isArray(o.styles))i[r]||(i[r]=[]),i[r].push({message:"Expected 'array', got '".concat(ie(o.styles),"'"),typeError:!0});else for(var c=0;c<o.styles.length;c++){var u=o.styles[c];if(typeof u!="string"){var f=Or(r,c);i[f]||(i[f]=[]),i[f].push({message:"Expected 'string', got '".concat(ie(u),"'"),typeError:!0})}}}},{key:"nullable",value:function(){return new t(this.options,!0)}},{key:"executeSerialize",value:function(){var r,o={maxLength:this.options.maxLength,minLength:this.options.minLength,style:this.options.style,block:this.options.block,inline:this.options.inline&&{a:this.options.inline.a,img:this.options.inline.img&&ie(this.options.inline.img)==="object"?this.options.inline.img.executeSerialize():this.options.inline.img}};return{type:"richtext",opt:this.opt,options:o,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),O$=function(t){return new Kv(t??{})},Yh=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Rn(this,t),r=Zr(this,t),B(r,"renderInput",null),r.item=n,r.opt=o,r.customValidateFunctions=i,r.currentRouter=s,r}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.item,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this,s=!1,a=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});if(this.opt&&o==null)return a.length>0?B({},r,a):!1;if(o===null)return B({},r,[].concat(me(a),[{message:"Expected 'object', got 'null'"}]));if(ie(o)!=="object")return B({},r,[].concat(me(a),[{message:"Expected 'object', got '".concat(ie(o),"'")}]));if(Array.isArray(o))return B({},r,[].concat(me(a),[{message:"Expected 'object', got 'array'"}]));var l=this.getRouterValidations(r,o);if(l)return l;var c=gi(a),u;try{for(c.s();!(u=c.n()).done;){var f=u.value;s=this.appendValidationError(s,r,f.message,o,f.schemaError)}}catch(h){c.e(h)}finally{c.f()}return Object.entries(o).forEach(function(h){var p=jn(h,2),m=p[0],v=p[1],b=fu(r,m);if(!b)s=i.appendValidationError(s,r,"Internal error: could not create path at ".concat(!r&&typeof r=="string"?"<empty string>":r," at key ").concat(v),o);else{var x=i.item.executeValidate(b,v);x&&s?s=xt(xt({},x),s):x&&(s=x)}}),s}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:ie(o)!=="object"?{success:!1,errors:B({},r,[{message:"Expected 'object', got '".concat(ie(o),"'"),typeError:!0}])}:Array.isArray(o)?{success:!1,errors:B({},r,[{message:"Expected 'object', got 'array'",typeError:!0}])}:{success:!0,data:o}}},{key:"nullable",value:function(){return new t(this.item,!0)}},{key:"router",value:function(r){return new t(this.item,this.opt,this.customValidateFunctions,r)}},{key:"getRouterValidations",value:function(r,o){if(!this.currentRouter||o===null)return!1;var i=X1(r),s=jn(i,2),a=s[0],l=s[1];if(l)return B({},r,[{message:"This field was configured as a router, but it is not defined at the root of the module",schemaError:!0}]);var c=this.currentRouter.validate(a,Object.keys(o));return c.length>0?Object.fromEntries(c.map(function(u){if(!u.error.urlPath)return[r,[{message:"Router validation error: ".concat(u.error.message," has no url path"),schemaError:!0}]];var f=fu(r,u.error.urlPath);return f?[f,[{message:u.error.message}]]:[r,[{message:"Could not create path for router validation error",schemaError:!0}]]})):!1}},{key:"executeSerialize",value:function(){var r,o;return{type:"record",item:this.item.executeSerialize(),opt:this.opt,router:(r=this.currentRouter)===null||r===void 0?void 0:r.getRouterId(),customValidate:this.customValidateFunctions&&((o=this.customValidateFunctions)===null||o===void 0?void 0:o.length)>0}}},{key:"executeRender",value:function(r,o){var i={};if(o===null)return i;for(var s in o){var a=o[s];if(a!=null){var l=Or(r,s),c=this.item.executeRender(l,a);for(var u in c){var f=u;i[f]=c[f]}}}if(this.renderInput){var h=this.renderInput,p=h.select,m=h.layout;m!=="list"&&(i[r]={status:"error",message:"Unknown layout type: "+m});try{i[r]={status:"success",data:{layout:"list",parent:"record",items:Object.entries(o).map(function(v){var b=jn(v,2),x=b[0],w=b[1],S=p({key:x,val:w}),C=S.title,N=S.subtitle,P=S.image;return[x,{title:C,subtitle:N,image:P}]})}}}catch(v){i[r]={status:"error",message:v instanceof Error?v.message:"Unknown error"}}}return i}},{key:"render",value:function(r){return this.renderInput=r,this}}])}(eo),M$=function(t){return new Yh(t)};function R$(e){var t=e[b$],n=t;return n}function X1(e){var t=e.indexOf(ba);return t===-1?[e,""]:[e.slice(0,t),e.slice(t+ba.length)]}function TO(e,t){return t===""?e:"".concat(e).concat(ba).concat(t)}function OO(e){return e instanceof _l||ie(e)==="object"&&"type"in e&&e.type==="object"}function MO(e){return e instanceof Yh||ie(e)==="object"&&"type"in e&&e.type==="record"}function RO(e){return e instanceof Hv||ie(e)==="object"&&"type"in e&&e.type==="array"}function AO(e){return e instanceof jO||ie(e)==="object"&&"type"in e&&e.type==="union"}function IO(e){return e instanceof Kv||ie(e)==="object"&&"type"in e&&e.type==="richtext"}function DO(e){return e instanceof J1||ie(e)==="object"&&"type"in e&&e.type==="image"}function A$(e,t,n){for(var r=Xf(e),o=me(r),i=n,s=t,a=function(){var u=r.shift();if(u===void 0)throw Error("Unexpected undefined part");if(RO(i)){var f;if(Number.isNaN(Number(u)))throw Error("Invalid path: array schema ".concat(JSON.stringify(i)," must have a number as path, but got ").concat(u,". Path: ").concat(e));if(ie(s)!=="object"&&!Array.isArray(s))throw Error("Schema type error: expected source to be type of array, but got ".concat(ie(s)));s=s[u],i=i instanceof Hv?(f=i)===null||f===void 0?void 0:f.item:i.item}else if(MO(i)){var h;if(typeof u!="string")throw Error("Invalid path: record schema ".concat(i," must have path: ").concat(u," as string"));if(ie(s)!=="object"&&!Array.isArray(s))throw Error("Schema type error: expected source to be type of record, but got ".concat(ie(s)));if(!s[u])throw Error("Invalid path: record source did not have key ".concat(u," from path: ").concat(e));s=s[u],i=i instanceof Yh?(h=i)===null||h===void 0?void 0:h.item:i.item}else if(OO(i)){if(ie(s)!=="object")throw Error("Schema type error: expected source to be type of object, but got ".concat(ie(s)));if(s!==null&&s[u]===void 0)throw Error("Invalid path: object source did not have key ".concat(u," from path: ").concat(e));s=s===null?s:s[u],i=(i instanceof _l,i.items[u])}else{if(DO(i))return{v:{path:o.slice(0,o.length-r.length-1).map(function(w){return JSON.stringify(w)}).join("."),schema:i,source:s}};if(AO(i)){var p=i.key;if(typeof p!="string")return{v:{path:o.map(function(w){return Number.isNaN(Number(w))?JSON.stringify(w):w}).join("."),schema:i,source:s}};var m=s[p];if(!m)throw Error("Invalid path: union source ".concat(i," did not have required key ").concat(p," in path: ").concat(e));var v=i.items.find(function(w){var S;return(w==null||(S=w.items)===null||S===void 0||(S=S[p])===null||S===void 0?void 0:S.value)===m});if(!v)throw Error("Invalid path: union schema ".concat(i," did not have a child object with ").concat(p," of value ").concat(m," in path: ").concat(e));i=v.items[u],s=s[u]}else if(IO(i)){if("src"in s&&"tag"in s&&s.tag==="img"&&r.length===0){var b,x;i=i instanceof Kv&&(b=i.options)!==null&&b!==void 0&&(b=b.inline)!==null&&b!==void 0&&b.img&&typeof((x=i.options)===null||x===void 0||(x=x.inline)===null||x===void 0?void 0:x.img)!="boolean"?i.options.inline.img:i}s=s[u]}else throw Error("Invalid path: ".concat(u," resolved to an unexpected schema ").concat(JSON.stringify(i)))}},l;r.length>0;)if(l=a(),l)return l.v;if(r.length>0)throw Error("Invalid path: ".concat(r.join(".")," is not a valid path"));return{path:o.map(function(c){return Number.isNaN(Number(c))?JSON.stringify(c):c}).join("."),schema:i,source:s}}function I$(e,t,n){for(var r=Xf(e),o=me(r),i=n,s=t,a=function(){var u=r.shift();if(u===void 0)return{v:{status:"error",message:"Unexpected undefined part"}};if(RO(i)){var f;if(Number.isNaN(Number(u)))return{v:{status:"error",message:"Invalid path: array schema ".concat(JSON.stringify(i)," must have a number as path, but got ").concat(u,". Path: ").concat(e)}};if(s===void 0)return{v:{status:"source-undefined",path:o.slice(0,o.length-r.length-1).map(function(w){return JSON.stringify(w)}).join(".")}};if(ie(s)!=="object"&&!Array.isArray(s))return{v:{status:"error",message:"Schema type error: expected source to be type of array, but got ".concat(ie(s))}};s=s[u],i=i instanceof Hv?(f=i)===null||f===void 0?void 0:f.item:i.item}else if(MO(i)){var h;if(typeof u!="string")return{v:{status:"error",message:"Invalid path: record schema ".concat(i," must have path: ").concat(u," as string")}};if(s===void 0)return{v:{status:"source-undefined",path:o.slice(0,o.length-r.length-1).map(function(w){return JSON.stringify(w)}).join(".")}};if(ie(s)!=="object"&&!Array.isArray(s))return{v:{status:"error",message:"Schema type error: expected source to be type of record, but got ".concat(ie(s))}};if(!s[u])return{v:{status:"error",message:"Invalid path: record source did not have key ".concat(u," from path: ").concat(e)}};s=s[u],i=i instanceof Yh?(h=i)===null||h===void 0?void 0:h.item:i.item}else if(OO(i)){if(s===void 0)return{v:{status:"source-undefined",path:o.slice(0,o.length-r.length-1).map(function(w){return JSON.stringify(w)}).join(".")}};if(ie(s)!=="object")return{v:{status:"error",message:"Schema type error: expected source to be type of object, but got ".concat(ie(s))}};if(s!==null&&s[u]===void 0)return{v:{status:"error",message:"Invalid path: object source did not have key ".concat(u," from path: ").concat(e)}};s=s===null?s:s[u],i=(i instanceof _l,i.items[u])}else{if(DO(i))return{v:{status:"ok",path:o.slice(0,o.length-r.length-1).map(function(w){return JSON.stringify(w)}).join("."),schema:i,source:s}};if(AO(i)){var p=i.key;if(typeof p!="string")return{v:{status:"ok",path:o.map(function(w){return Number.isNaN(Number(w))?JSON.stringify(w):w}).join("."),schema:i,source:s}};var m=s[p];if(!m)return{v:{status:"error",message:"Invalid path: union source ".concat(i," did not have required key ").concat(p," in path: ").concat(e)}};var v=i.items.find(function(w){var S;return(w==null||(S=w.items)===null||S===void 0||(S=S[p])===null||S===void 0?void 0:S.value)===m});if(!v)return{v:{status:"error",message:"Invalid path: union schema ".concat(i," did not have a child object with ").concat(p," of value ").concat(m," in path: ").concat(e)}};i=v.items[u],s=s[u]}else if(IO(i)){if("src"in s&&"tag"in s&&s.tag==="img"&&r.length===0){var b,x;i=i instanceof Kv&&(b=i.options)!==null&&b!==void 0&&(b=b.inline)!==null&&b!==void 0&&b.img&&typeof((x=i.options)===null||x===void 0||(x=x.inline)===null||x===void 0?void 0:x.img)!="boolean"?i.options.inline.img:i}s=s[u]}else return{v:{status:"error",message:"Invalid path: ".concat(u," resolved to an unexpected schema ").concat(JSON.stringify(i))}}}},l;r.length>0;)if(l=a(),l)return l.v;return r.length>0?{status:"error",message:"Invalid path: ".concat(r.join(".")," is not a valid path")}:{status:"ok",path:o.map(function(c){return Number.isNaN(Number(c))?JSON.stringify(c):c}).join("."),schema:i,source:s}}function D$(e){var t=e.split("/").slice(1);return t}function Xf(e){for(var t=[],n=0;n<e.length;){var r="";if(e[n]==='"'){for(n++;n<e.length&&e[n]!=='"';)e[n]==="\\"&&e[n+1]==='"'?(r+='"',n++):r+=e[n],n++;if(e[n]!=='"'){var o;throw new Error("Invalid input (".concat(JSON.stringify(e),"): Missing closing double quote: ").concat((o=e[n])!==null&&o!==void 0?o:"at end of string"," (char: ").concat(n,"; length: ").concat(e.length,")"))}}else for(;n<e.length&&e[n]!==".";)r+=e[n],n++;r!==""&&t.push(r),n++}return t}function L$(e){return e.split(",")}function F$(e){var t=X1(e),n=jn(t,2),r=n[0],o=n[1],i=Xf(o).slice(0,-1);return i.length>0?TO(r,LO(i)):r}function LO(e){return e.map(function(t){return Number.isInteger(Number(t))?t:JSON.stringify(t)}).join(".")}var z$=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Rn(this,t),r=Zr(this,t),r.options=n,r.opt=o,r.customValidateFunctions=i,r}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.options,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i,s,a=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});return this.opt&&o==null?a.length>0?B({},r,a):!1:typeof o!="number"?B({},r,[].concat(me(a),[{message:"Expected 'number', got '".concat(ie(o),"'"),value:o}])):(i=this.options)!==null&&i!==void 0&&i.max&&o>this.options.max?B({},r,[].concat(me(a),[{message:"Expected 'number' less than ".concat(this.options.max),value:o}])):(s=this.options)!==null&&s!==void 0&&s.min&&o<this.options.min?B({},r,[].concat(me(a),[{message:"Expected 'number' greater than ".concat(this.options.min),value:o}])):a.length>0?B({},r,a):!1}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'number', got 'null'",typeError:!0}])}:typeof o=="number"?{success:!0,data:o}:{success:!1,errors:B({},r,[{message:"Expected 'number', got '".concat(ie(o),"'"),typeError:!0}])}}},{key:"nullable",value:function(){return new t(this.options,!0)}},{key:"max",value:function(r){return new t(xt(xt({},this.options),{},{max:r}),this.opt)}},{key:"min",value:function(r){return new t(xt(xt({},this.options),{},{min:r}),this.opt)}},{key:"executeSerialize",value:function(){var r;return{type:"number",options:this.options,opt:this.opt,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),$$=function(t){return new z$(t)},B$=function(e){function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Rn(this,t),n=Zr(this,t),n.opt=r,n.customValidateFunctions=o,n}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){return this.opt&&o==null?!1:typeof o!="boolean"?B({},r,[{message:"Expected 'boolean', got '".concat(ie(o),"'"),value:o}]):!1}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'boolean', got 'null'",typeError:!0}])}:typeof o!="boolean"?{success:!1,errors:B({},r,[{message:"Expected 'boolean', got '".concat(ie(o),"'"),typeError:!0}])}:{success:!0,data:o}}},{key:"nullable",value:function(){return new t(!0)}},{key:"executeSerialize",value:function(){var r;return{type:"boolean",opt:this.opt,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),V$=function(){return new B$},U$=function(e){function t(n,r){var o,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];return Rn(this,t),o=Zr(this,t),o.schema=n,o.sourcePath=r,o.opt=i,o.customValidateFunctions=s,o}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.schema,this.sourcePath,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});if(this.opt&&o==null)return i.length>0?B({},r,i):!1;if(!this.schema)return B({},r,[].concat(me(i),[{message:"Schema not found for module. keyOf must be used with a Val Module"}]));var s=this.schema;if(!(s.type==="object"||s.type==="record"))return B({},r,[].concat(me(i),[{message:"Schema in keyOf must be an 'object' or 'record'. Found '".concat(s.type||"unknown","'")}]));if(s.opt&&o==null)return!1;if(s.type==="record"&&typeof o!="string")return B({},r,[].concat(me(i),[{message:"Type of value in keyof (record) must be 'string'"}]));if(s.type==="object"){var a=s.keys;if(!a.includes(o))return B({},r,[].concat(me(i),[{message:"Value of keyOf (object) must be: ".concat(a.join(", "),". Found: ").concat(o)}]))}return s.type==="record"?typeof o!="string"?B({},r,[].concat(me(i),[{message:"Value of keyOf (record) must be 'string'. Found: ".concat(ie(o))}])):B({},r,[].concat(me(i),[{fixes:["keyof:check-keys"],message:"Did not validate keyOf (record). This error (keyof:check-keys) should typically be processed by Val internally. Seeing this error most likely means you have a Val version mismatch.",value:{key:o,sourcePath:this.sourcePath}}])):i.length>0?B({},r,i):!1}},{key:"executeAssert",value:function(r,o){if(this.opt&&o===null)return{success:!0,data:o};if(o===null)return{success:!1,errors:B({},r,[{message:"Expected 'string', got 'null'",typeError:!0}])};var i=this.schema;if(!i)return{success:!1,errors:B({},r,[{message:"Neither key nor schema was found. keyOf is missing an argument.",typeError:!0}])};var s=i;if(!(s.type==="object"||s.type==="record"))return{success:!1,errors:B({},r,[{message:"Schema of first argument must be either: 'array', 'object' or 'record'. Found '".concat(s.type||"unknown","'"),typeError:!0}])};if(s.type==="record"&&typeof o!="string")return{success:!1,errors:B({},r,[{message:"Value of keyOf (record) must be 'string', got '".concat(ie(o),"'"),typeError:!0}])};if(s.type==="object"){var a=s.keys;if(!a.includes(o))return{success:!1,errors:B({},r,[{message:"Value of keyOf (object) must be: ".concat(a.join(", "),". Found: ").concat(o),typeError:!0}])}}return{success:!0,data:o}}},{key:"nullable",value:function(){return new t(this.schema,this.sourcePath,!0)}},{key:"executeSerialize",value:function(){var r,o=this.sourcePath;if(!o)throw new Error("Cannot serialize keyOf schema with empty selector. TIP: keyOf must be used with a Val Module of record schema.");var i=this.schema;if(!i)throw new Error("Cannot serialize keyOf schema with empty selector.");var s;switch(i.type){case"record":s="string";break;case"object":s=i.keys;break;default:throw new Error("Cannot serialize keyOf schema with selector of type '".concat(i.type||"unknown","'"))}return{type:"keyOf",path:o,schema:i,opt:this.opt,values:s,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),W$=function(t){var n=t==null?void 0:t[EO],r=void 0;if(n instanceof _l){var o=[];try{o=Object.keys((n==null?void 0:n.items)||{})}catch{}r={type:"object",keys:o,opt:n==null?void 0:n.opt}}else n instanceof Yh&&(r={type:"record",opt:n==null?void 0:n.opt});return new U$(r,NO(t))},H$=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Rn(this,t),r=Zr(this,t),r.options=n,r.opt=o,r.customValidateFunctions=i,r}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.options,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i,s,a,l;if(this.opt&&o==null)return!1;if(typeof o!="string")return B({},r,[{message:"Expected 'string', got '".concat(ie(o),"'"),value:o}]);if((i=this.options)!==null&&i!==void 0&&i.from&&(s=this.options)!==null&&s!==void 0&&s.to){if(this.options.from>this.options.to)return B({},r,[{message:"From date ".concat(this.options.from," is after to date ").concat(this.options.to),value:o,typeError:!0}]);if(o<this.options.from||o>this.options.to)return B({},r,[{message:"Date is not between ".concat(this.options.from," and ").concat(this.options.to),value:o}])}else if((a=this.options)!==null&&a!==void 0&&a.from){if(o<this.options.from)return B({},r,[{message:"Date is before the minimum date ".concat(this.options.from),value:o}])}else if((l=this.options)!==null&&l!==void 0&&l.to&&o>this.options.to)return B({},r,[{message:"Date is after the maximum date ".concat(this.options.to),value:o}]);return!1}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'string', got 'null'",typeError:!0}])}:typeof o!="string"?{success:!1,errors:B({},r,[{message:"Expected 'string', got '".concat(ie(o),"'"),typeError:!0}])}:{success:!0,data:o}}},{key:"from",value:function(r){return new t(xt(xt({},this.options),{},{from:r}),this.opt)}},{key:"to",value:function(r){return new t(xt(xt({},this.options),{},{to:r}),this.opt)}},{key:"nullable",value:function(){return new t(this.options,!0)}},{key:"executeSerialize",value:function(){var r;return{type:"date",opt:this.opt,options:this.options,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),K$=function(t){return new H$(t)};function G$(){return{string:PO,boolean:V$,array:P$,object:_O,number:$$,union:j$,richtext:O$,image:T$,literal:_$,keyOf:W$,record:M$,file:k$,date:K$}}function q$(e,t){var n=t.publicProjectId,r=t.coreVersion,o=t.validationHash,i=t.fileHash,s=t.filePath,a=t.bucket;return"".concat(e,"/file/p/").concat(n,"/b/").concat(a,"/v/").concat(r,"/h/").concat(o,"/f/").concat(i,"/p/").concat(s)}var Y$=/^(https?:\/\/[^/]+)\/file\/p\/([^/]+)\/b\/([^/]+)\/v\/([^/]+)\/h\/([^/]+)\/f\/([^/]+)\/p\/(.+)$/;function FO(e){var t=e.match(Y$);return t?t[7].indexOf("public/val/")!==0?{status:"error",error:"Invalid remote ref: "+e}:{status:"success",remoteHost:t[1],projectId:t[2],bucket:t[3],version:t[4],validationHash:t[5],fileHash:t[6],filePath:t[7]}:{status:"error",error:"Invalid remote ref: "+e}}var BC="https://remote.val.build";function J$(e){if(e!=null&&e.patch_id){var t=FO(e[bt]);if(t.status==="success")return{url:"/api/val/files/"+t.filePath+"?patch_id=".concat(e.patch_id,"&remote=true&ref=").concat(encodeURIComponent(e[bt])),metadata:e.metadata};console.warn("Internal Val error: failed to split remote ref: ".concat(e[bt],". The data format is different than what is expected. Check Val versions for mismatches."),t.error)}return{url:e[bt],metadata:e.metadata}}var Hr=An(function e(t){Rn(this,e),this.message=t}),X$=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],vt=function(e){return e[e.inputBytes=64]="inputBytes",e[e.inputWords=16]="inputWords",e[e.highIndex=14]="highIndex",e[e.lowIndex=15]="lowIndex",e[e.workWords=64]="workWords",e[e.allocBytes=80]="allocBytes",e[e.allocWords=20]="allocWords",e[e.allocTotal=8e3]="allocTotal",e}(vt||{});function Z$(e){return new Q$}var Q$=function(){function e(){Rn(this,e),B(this,"A",1779033703),B(this,"B",-1150833019),B(this,"C",1013904242),B(this,"D",-1521486534),B(this,"E",1359893119),B(this,"F",-1694144372),B(this,"G",528734635),B(this,"H",1541459225),B(this,"_size",0),B(this,"_sp",0),(!qp||wd>=vt.allocTotal)&&(qp=new ArrayBuffer(vt.allocTotal),wd=0),this._byte=new Uint8Array(qp,wd,vt.allocBytes),this._word=new Int32Array(qp,wd,vt.allocWords),wd+=vt.allocBytes}return An(e,[{key:"update",value:function(n){if(typeof n=="string")return this._utf8(n);if(n==null)throw new TypeError("Invalid type: "+ie(n));var r=n.byteOffset,o=n.byteLength,i=o/vt.inputBytes|0,s=0;if(i&&!(r&3)&&!(this._size%vt.inputBytes)){for(var a=new Int32Array(n.buffer,r,i*vt.inputWords);i--;)this._int32(a,s>>2),s+=vt.inputBytes;this._size+=s}var l=n.BYTES_PER_ELEMENT;if(l!==1&&n.buffer){var c=new Uint8Array(n.buffer,r+s,o-s);return this._uint8(c)}return s===o?this:this._uint8(n,s)}},{key:"_uint8",value:function(n,r){var o=this._byte,i=this._word,s=n.length;for(r=r|0;r<s;){for(var a=this._size%vt.inputBytes,l=a;r<s&&l<vt.inputBytes;)o[l++]=n[r++];l>=vt.inputBytes&&this._int32(i),this._size+=l-a}return this}},{key:"_utf8",value:function(n){for(var r=this._byte,o=this._word,i=n.length,s=this._sp,a=0;a<i;){for(var l=this._size%vt.inputBytes,c=l;a<i&&c<vt.inputBytes;){var u=n.charCodeAt(a++)|0;u<128?r[c++]=u:u<2048?(r[c++]=192|u>>>6,r[c++]=128|u&63):u<55296||u>57343?(r[c++]=224|u>>>12,r[c++]=128|u>>>6&63,r[c++]=128|u&63):s?(u=((s&1023)<<10)+(u&1023)+65536,r[c++]=240|u>>>18,r[c++]=128|u>>>12&63,r[c++]=128|u>>>6&63,r[c++]=128|u&63,s=0):s=u}c>=vt.inputBytes&&(this._int32(o),o[0]=o[vt.inputWords]),this._size+=c-l}return this._sp=s,this}},{key:"_int32",value:function(n,r){var o=this.A,i=this.B,s=this.C,a=this.D,l=this.E,c=this.F,u=this.G,f=this.H,h=0;for(r=r|0;h<vt.inputWords;)qa[h++]=_o(n[r++]);for(h=vt.inputWords;h<vt.workWords;h++)qa[h]=a6(qa[h-2])+qa[h-7]+s6(qa[h-15])+qa[h-16]|0;for(h=0;h<vt.workWords;h++){var p=f+i6(l)+n6(l,c,u)+X$[h]+qa[h]|0,m=o6(o)+r6(o,i,s)|0;f=u,u=c,c=l,l=a+p|0,a=s,s=i,i=o,o=p+m|0}this.A=o+this.A|0,this.B=i+this.B|0,this.C=s+this.C|0,this.D=a+this.D|0,this.E=l+this.E|0,this.F=c+this.F|0,this.G=u+this.G|0,this.H=f+this.H|0}},{key:"digest",value:function(n){var r=this._byte,o=this._word,i=this._size%vt.inputBytes|0;for(r[i++]=128;i&3;)r[i++]=0;if(i>>=2,i>vt.highIndex){for(;i<vt.inputWords;)o[i++]=0;i=0,this._int32(o)}for(;i<vt.inputWords;)o[i++]=0;var s=this._size*8,a=(s&4294967295)>>>0,l=(s-a)/4294967296;return l&&(o[vt.highIndex]=_o(l)),a&&(o[vt.lowIndex]=_o(a)),this._int32(o),n==="hex"?this._hex():this._bin()}},{key:"_hex",value:function(){var n=this.A,r=this.B,o=this.C,i=this.D,s=this.E,a=this.F,l=this.G,c=this.H;return Es(n)+Es(r)+Es(o)+Es(i)+Es(s)+Es(a)+Es(l)+Es(c)}},{key:"_bin",value:function(){var n=this.A,r=this.B,o=this.C,i=this.D,s=this.E,a=this.F,l=this.G,c=this.H,u=this._byte,f=this._word;return f[0]=_o(n),f[1]=_o(r),f[2]=_o(o),f[3]=_o(i),f[4]=_o(s),f[5]=_o(a),f[6]=_o(l),f[7]=_o(c),u.slice(0,32)}}])}(),qa=new Int32Array(vt.workWords),qp,wd=0,Es=function(t){return(t+4294967296).toString(16).substr(-8)},e6=function(t){return t<<24&4278190080|t<<8&16711680|t>>8&65280|t>>24&255},t6=function(t){return t},_o=l6()?t6:e6,n6=function(t,n,r){return r^t&(n^r)},r6=function(t,n,r){return t&n|r&(t|n)},o6=function(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)},i6=function(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)},s6=function(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3},a6=function(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10};function l6(){var e=new Uint8Array(new Uint16Array([65279]).buffer);return e[0]===254}var Z1=function(t){return Z$().update(t).digest("hex")},Q1={x3d:"application/vnd.hzn-3d-crossword","3gp":"video/3gpp","3g2":"video/3gpp2",mseq:"application/vnd.mseq",pwn:"application/vnd.3m.post-it-notes",plb:"application/vnd.3gpp.pic-bw-large",psb:"application/vnd.3gpp.pic-bw-small",pvb:"application/vnd.3gpp.pic-bw-var",tcap:"application/vnd.3gpp2.tcap","7z":"application/x-7z-compressed",abw:"application/x-abiword",ace:"application/x-ace-compressed",acc:"application/vnd.americandynamics.acc",acu:"application/vnd.acucobol",atc:"application/vnd.acucorp",adp:"audio/adpcm",aab:"application/x-authorware-bin",aam:"application/x-authorware-map",aas:"application/x-authorware-seg",air:"application/vnd.adobe.air-application-installer-package+zip",swf:"application/x-shockwave-flash",fxp:"application/vnd.adobe.fxp",pdf:"application/pdf",ppd:"application/vnd.cups-ppd",dir:"application/x-director",xdp:"application/vnd.adobe.xdp+xml",xfdf:"application/vnd.adobe.xfdf",aac:"audio/x-aac",ahead:"application/vnd.ahead.space",azf:"application/vnd.airzip.filesecure.azf",azs:"application/vnd.airzip.filesecure.azs",azw:"application/vnd.amazon.ebook",ami:"application/vnd.amiga.ami","N/A":"application/andrew-inset",apk:"application/vnd.android.package-archive",cii:"application/vnd.anser-web-certificate-issue-initiation",fti:"application/vnd.anser-web-funds-transfer-initiation",atx:"application/vnd.antix.game-component",dmg:"application/x-apple-diskimage",mpkg:"application/vnd.apple.installer+xml",aw:"application/applixware",mp3:"audio/mpeg",les:"application/vnd.hhe.lesson-player",swi:"application/vnd.aristanetworks.swi",s:"text/x-asm",atomcat:"application/atomcat+xml",atomsvc:"application/atomsvc+xml",atom:"application/atom+xml",ac:"application/pkix-attr-cert",aif:"audio/x-aiff",avi:"video/x-msvideo",aep:"application/vnd.audiograph",dxf:"image/vnd.dxf",dwf:"model/vnd.dwf",par:"text/plain-bas",bcpio:"application/x-bcpio",bin:"application/octet-stream",bmp:"image/bmp",torrent:"application/x-bittorrent",cod:"application/vnd.rim.cod",mpm:"application/vnd.blueice.multipass",bmi:"application/vnd.bmi",sh:"application/x-sh",btif:"image/prs.btif",rep:"application/vnd.businessobjects",bz:"application/x-bzip",bz2:"application/x-bzip2",csh:"application/x-csh",c:"text/x-c",cdxml:"application/vnd.chemdraw+xml",css:"text/css",cdx:"chemical/x-cdx",cml:"chemical/x-cml",csml:"chemical/x-csml",cdbcmsg:"application/vnd.contact.cmsg",cla:"application/vnd.claymore",c4g:"application/vnd.clonk.c4group",sub:"image/vnd.dvb.subtitle",cdmia:"application/cdmi-capability",cdmic:"application/cdmi-container",cdmid:"application/cdmi-domain",cdmio:"application/cdmi-object",cdmiq:"application/cdmi-queue",c11amc:"application/vnd.cluetrust.cartomobile-config",c11amz:"application/vnd.cluetrust.cartomobile-config-pkg",ras:"image/x-cmu-raster",dae:"model/vnd.collada+xml",csv:"text/csv",cpt:"application/mac-compactpro",wmlc:"application/vnd.wap.wmlc",cgm:"image/cgm",ice:"x-conference/x-cooltalk",cmx:"image/x-cmx",xar:"application/vnd.xara",cmc:"application/vnd.cosmocaller",cpio:"application/x-cpio",clkx:"application/vnd.crick.clicker",clkk:"application/vnd.crick.clicker.keyboard",clkp:"application/vnd.crick.clicker.palette",clkt:"application/vnd.crick.clicker.template",clkw:"application/vnd.crick.clicker.wordbank",wbs:"application/vnd.criticaltools.wbs+xml",cryptonote:"application/vnd.rig.cryptonote",cif:"chemical/x-cif",cmdf:"chemical/x-cmdf",cu:"application/cu-seeme",cww:"application/prs.cww",curl:"text/vnd.curl",dcurl:"text/vnd.curl.dcurl",mcurl:"text/vnd.curl.mcurl",scurl:"text/vnd.curl.scurl",car:"application/vnd.curl.car",pcurl:"application/vnd.curl.pcurl",cmp:"application/vnd.yellowriver-custom-menu",dssc:"application/dssc+der",xdssc:"application/dssc+xml",deb:"application/x-debian-package",uva:"audio/vnd.dece.audio",uvi:"image/vnd.dece.graphic",uvh:"video/vnd.dece.hd",uvm:"video/vnd.dece.mobile",uvu:"video/vnd.uvvu.mp4",uvp:"video/vnd.dece.pd",uvs:"video/vnd.dece.sd",uvv:"video/vnd.dece.video",dvi:"application/x-dvi",seed:"application/vnd.fdsn.seed",dtb:"application/x-dtbook+xml",res:"application/x-dtbresource+xml",ait:"application/vnd.dvb.ait",svc:"application/vnd.dvb.service",eol:"audio/vnd.digital-winds",djvu:"image/vnd.djvu",dtd:"application/xml-dtd",mlp:"application/vnd.dolby.mlp",wad:"application/x-doom",dpg:"application/vnd.dpgraph",dra:"audio/vnd.dra",dfac:"application/vnd.dreamfactory",dts:"audio/vnd.dts",dtshd:"audio/vnd.dts.hd",dwg:"image/vnd.dwg",geo:"application/vnd.dynageo",es:"application/ecmascript",mag:"application/vnd.ecowin.chart",mmr:"image/vnd.fujixerox.edmics-mmr",rlc:"image/vnd.fujixerox.edmics-rlc",exi:"application/exi",mgz:"application/vnd.proteus.magazine",epub:"application/epub+zip",eml:"message/rfc822",nml:"application/vnd.enliven",xpr:"application/vnd.is-xpr",xif:"image/vnd.xiff",xfdl:"application/vnd.xfdl",emma:"application/emma+xml",ez2:"application/vnd.ezpix-album",ez3:"application/vnd.ezpix-package",fst:"image/vnd.fst",fvt:"video/vnd.fvt",fbs:"image/vnd.fastbidsheet",fe_launch:"application/vnd.denovo.fcselayout-link",f4v:"video/x-f4v",flv:"video/x-flv",fpx:"image/vnd.fpx",npx:"image/vnd.net-fpx",flx:"text/vnd.fmi.flexstor",fli:"video/x-fli",ftc:"application/vnd.fluxtime.clip",fdf:"application/vnd.fdf",f:"text/x-fortran",mif:"application/vnd.mif",fm:"application/vnd.framemaker",fh:"image/x-freehand",fsc:"application/vnd.fsc.weblaunch",fnc:"application/vnd.frogans.fnc",ltf:"application/vnd.frogans.ltf",ddd:"application/vnd.fujixerox.ddd",xdw:"application/vnd.fujixerox.docuworks",xbd:"application/vnd.fujixerox.docuworks.binder",oas:"application/vnd.fujitsu.oasys",oa2:"application/vnd.fujitsu.oasys2",oa3:"application/vnd.fujitsu.oasys3",fg5:"application/vnd.fujitsu.oasysgp",bh2:"application/vnd.fujitsu.oasysprs",spl:"application/x-futuresplash",fzs:"application/vnd.fuzzysheet",g3:"image/g3fax",gmx:"application/vnd.gmx",gtw:"model/vnd.gtw",txd:"application/vnd.genomatix.tuxedo",ggb:"application/vnd.geogebra.file",ggt:"application/vnd.geogebra.tool",gdl:"model/vnd.gdl",gex:"application/vnd.geometry-explorer",gxt:"application/vnd.geonext",g2w:"application/vnd.geoplan",g3w:"application/vnd.geospace",gsf:"application/x-font-ghostscript",bdf:"application/x-font-bdf",gtar:"application/x-gtar",texinfo:"application/x-texinfo",gnumeric:"application/x-gnumeric",kml:"application/vnd.google-earth.kml+xml",kmz:"application/vnd.google-earth.kmz",gqf:"application/vnd.grafeq",gif:"image/gif",gv:"text/vnd.graphviz",gac:"application/vnd.groove-account",ghf:"application/vnd.groove-help",gim:"application/vnd.groove-identity-message",grv:"application/vnd.groove-injector",gtm:"application/vnd.groove-tool-message",tpl:"application/vnd.groove-tool-template",vcg:"application/vnd.groove-vcard",h261:"video/h261",h263:"video/h263",h264:"video/h264",hpid:"application/vnd.hp-hpid",hps:"application/vnd.hp-hps",hdf:"application/x-hdf",rip:"audio/vnd.rip",hbci:"application/vnd.hbci",jlt:"application/vnd.hp-jlyt",pcl:"application/vnd.hp-pcl",hpgl:"application/vnd.hp-hpgl",hvs:"application/vnd.yamaha.hv-script",hvd:"application/vnd.yamaha.hv-dic",hvp:"application/vnd.yamaha.hv-voice","sfd-hdstx":"application/vnd.hydrostatix.sof-data",stk:"application/hyperstudio",hal:"application/vnd.hal+xml",html:"text/html",irm:"application/vnd.ibm.rights-management",sc:"application/vnd.ibm.secure-container",ics:"text/calendar",icc:"application/vnd.iccprofile",ico:"image/x-icon",igl:"application/vnd.igloader",ief:"image/ief",ivp:"application/vnd.immervision-ivp",ivu:"application/vnd.immervision-ivu",rif:"application/reginfo+xml","3dml":"text/vnd.in3d.3dml",spot:"text/vnd.in3d.spot",igs:"model/iges",i2g:"application/vnd.intergeo",cdy:"application/vnd.cinderella",xpw:"application/vnd.intercon.formnet",fcs:"application/vnd.isac.fcs",ipfix:"application/ipfix",cer:"application/pkix-cert",pki:"application/pkixcmp",crl:"application/pkix-crl",pkipath:"application/pkix-pkipath",igm:"application/vnd.insors.igm",rcprofile:"application/vnd.ipunplugged.rcprofile",irp:"application/vnd.irepository.package+xml",jad:"text/vnd.sun.j2me.app-descriptor",jar:"application/java-archive",class:"application/java-vm",jnlp:"application/x-java-jnlp-file",ser:"application/java-serialized-object",java:"text/x-java-source,java",js:"application/javascript",json:"application/json",joda:"application/vnd.joost.joda-archive",jpm:"video/jpm",jpeg:"image/jpeg",jpg:"image/jpeg",pjpeg:"image/pjpeg",jpgv:"video/jpeg",ktz:"application/vnd.kahootz",mmd:"application/vnd.chipnuts.karaoke-mmd",karbon:"application/vnd.kde.karbon",chrt:"application/vnd.kde.kchart",kfo:"application/vnd.kde.kformula",flw:"application/vnd.kde.kivio",kon:"application/vnd.kde.kontour",kpr:"application/vnd.kde.kpresenter",ksp:"application/vnd.kde.kspread",kwd:"application/vnd.kde.kword",htke:"application/vnd.kenameaapp",kia:"application/vnd.kidspiration",kne:"application/vnd.kinar",sse:"application/vnd.kodak-descriptor",lasxml:"application/vnd.las.las+xml",latex:"application/x-latex",lbd:"application/vnd.llamagraphics.life-balance.desktop",lbe:"application/vnd.llamagraphics.life-balance.exchange+xml",jam:"application/vnd.jam",123:"application/vnd.lotus-1-2-3",apr:"application/vnd.lotus-approach",pre:"application/vnd.lotus-freelance",nsf:"application/vnd.lotus-notes",org:"application/vnd.lotus-organizer",scm:"application/vnd.lotus-screencam",lwp:"application/vnd.lotus-wordpro",lvp:"audio/vnd.lucent.voice",m3u:"audio/x-mpegurl",m4v:"video/x-m4v",hqx:"application/mac-binhex40",portpkg:"application/vnd.macports.portpkg",mgp:"application/vnd.osgeo.mapguide.package",mrc:"application/marc",mrcx:"application/marcxml+xml",mxf:"application/mxf",nbp:"application/vnd.wolfram.player",ma:"application/mathematica",mathml:"application/mathml+xml",mbox:"application/mbox",mc1:"application/vnd.medcalcdata",mscml:"application/mediaservercontrol+xml",cdkey:"application/vnd.mediastation.cdkey",mwf:"application/vnd.mfer",mfm:"application/vnd.mfmp",msh:"model/mesh",mads:"application/mads+xml",mets:"application/mets+xml",mods:"application/mods+xml",meta4:"application/metalink4+xml",mcd:"application/vnd.mcd",flo:"application/vnd.micrografx.flo",igx:"application/vnd.micrografx.igx",es3:"application/vnd.eszigno3+xml",mdb:"application/x-msaccess",asf:"video/x-ms-asf",exe:"application/x-msdownload",cil:"application/vnd.ms-artgalry",cab:"application/vnd.ms-cab-compressed",ims:"application/vnd.ms-ims",application:"application/x-ms-application",clp:"application/x-msclip",mdi:"image/vnd.ms-modi",eot:"application/vnd.ms-fontobject",xls:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xltm:"application/vnd.ms-excel.template.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",chm:"application/vnd.ms-htmlhelp",crd:"application/x-mscardfile",lrm:"application/vnd.ms-lrm",mvb:"application/x-msmediaview",mny:"application/x-msmoney",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",sldx:"application/vnd.openxmlformats-officedocument.presentationml.slide",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",potx:"application/vnd.openxmlformats-officedocument.presentationml.template",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",obd:"application/x-msbinder",thmx:"application/vnd.ms-officetheme",onetoc:"application/onenote",pya:"audio/vnd.ms-playready.media.pya",pyv:"video/vnd.ms-playready.media.pyv",ppt:"application/vnd.ms-powerpoint",ppam:"application/vnd.ms-powerpoint.addin.macroenabled.12",sldm:"application/vnd.ms-powerpoint.slide.macroenabled.12",pptm:"application/vnd.ms-powerpoint.presentation.macroenabled.12",ppsm:"application/vnd.ms-powerpoint.slideshow.macroenabled.12",potm:"application/vnd.ms-powerpoint.template.macroenabled.12",mpp:"application/vnd.ms-project",pub:"application/x-mspublisher",scd:"application/x-msschedule",xap:"application/x-silverlight-app",stl:"application/vnd.ms-pki.stl",cat:"application/vnd.ms-pki.seccat",vsd:"application/vnd.visio",vsdx:"application/vnd.visio2013",wm:"video/x-ms-wm",wma:"audio/x-ms-wma",wax:"audio/x-ms-wax",wmx:"video/x-ms-wmx",wmd:"application/x-ms-wmd",wpl:"application/vnd.ms-wpl",wmz:"application/x-ms-wmz",wmv:"video/x-ms-wmv",wvx:"video/x-ms-wvx",wmf:"application/x-msmetafile",trm:"application/x-msterminal",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",dotm:"application/vnd.ms-word.template.macroenabled.12",wri:"application/x-mswrite",wps:"application/vnd.ms-works",xbap:"application/x-ms-xbap",xps:"application/vnd.ms-xpsdocument",mid:"audio/midi",mpy:"application/vnd.ibm.minipay",afp:"application/vnd.ibm.modcap",rms:"application/vnd.jcp.javame.midlet-rms",tmo:"application/vnd.tmobile-livetv",prc:"application/x-mobipocket-ebook",mbk:"application/vnd.mobius.mbk",dis:"application/vnd.mobius.dis",plc:"application/vnd.mobius.plc",mqy:"application/vnd.mobius.mqy",msl:"application/vnd.mobius.msl",txf:"application/vnd.mobius.txf",daf:"application/vnd.mobius.daf",fly:"text/vnd.fly",mpc:"application/vnd.mophun.certificate",mpn:"application/vnd.mophun.application",mj2:"video/mj2",mpga:"audio/mpeg",mxu:"video/vnd.mpegurl",mpeg:"video/mpeg",m21:"application/mp21",mp4a:"audio/mp4",mp4:"video/mp4",m3u8:"application/vnd.apple.mpegurl",mus:"application/vnd.musician",msty:"application/vnd.muvee.style",mxml:"application/xv+xml",ngdat:"application/vnd.nokia.n-gage.data","n-gage":"application/vnd.nokia.n-gage.symbian.install",ncx:"application/x-dtbncx+xml",nc:"application/x-netcdf",nlu:"application/vnd.neurolanguage.nlu",dna:"application/vnd.dna",nnd:"application/vnd.noblenet-directory",nns:"application/vnd.noblenet-sealer",nnw:"application/vnd.noblenet-web",rpst:"application/vnd.nokia.radio-preset",rpss:"application/vnd.nokia.radio-presets",n3:"text/n3",edm:"application/vnd.novadigm.edm",edx:"application/vnd.novadigm.edx",ext:"application/vnd.novadigm.ext",gph:"application/vnd.flographit",ecelp4800:"audio/vnd.nuera.ecelp4800",ecelp7470:"audio/vnd.nuera.ecelp7470",ecelp9600:"audio/vnd.nuera.ecelp9600",oda:"application/oda",ogx:"application/ogg",oga:"audio/ogg",ogv:"video/ogg",dd2:"application/vnd.oma.dd2+xml",oth:"application/vnd.oasis.opendocument.text-web",opf:"application/oebps-package+xml",qbo:"application/vnd.intu.qbo",oxt:"application/vnd.openofficeorg.extension",osf:"application/vnd.yamaha.openscoreformat",weba:"audio/webm",webm:"video/webm",odc:"application/vnd.oasis.opendocument.chart",otc:"application/vnd.oasis.opendocument.chart-template",odb:"application/vnd.oasis.opendocument.database",odf:"application/vnd.oasis.opendocument.formula",odft:"application/vnd.oasis.opendocument.formula-template",odg:"application/vnd.oasis.opendocument.graphics",otg:"application/vnd.oasis.opendocument.graphics-template",odi:"application/vnd.oasis.opendocument.image",oti:"application/vnd.oasis.opendocument.image-template",odp:"application/vnd.oasis.opendocument.presentation",otp:"application/vnd.oasis.opendocument.presentation-template",ods:"application/vnd.oasis.opendocument.spreadsheet",ots:"application/vnd.oasis.opendocument.spreadsheet-template",odt:"application/vnd.oasis.opendocument.text",odm:"application/vnd.oasis.opendocument.text-master",ott:"application/vnd.oasis.opendocument.text-template",ktx:"image/ktx",sxc:"application/vnd.sun.xml.calc",stc:"application/vnd.sun.xml.calc.template",sxd:"application/vnd.sun.xml.draw",std:"application/vnd.sun.xml.draw.template",sxi:"application/vnd.sun.xml.impress",sti:"application/vnd.sun.xml.impress.template",sxm:"application/vnd.sun.xml.math",sxw:"application/vnd.sun.xml.writer",sxg:"application/vnd.sun.xml.writer.global",stw:"application/vnd.sun.xml.writer.template",otf:"application/x-font-otf",osfpvg:"application/vnd.yamaha.openscoreformat.osfpvg+xml",dp:"application/vnd.osgi.dp",pdb:"application/vnd.palm",p:"text/x-pascal",paw:"application/vnd.pawaafile",pclxl:"application/vnd.hp-pclxl",efif:"application/vnd.picsel",pcx:"image/x-pcx",psd:"image/vnd.adobe.photoshop",prf:"application/pics-rules",pic:"image/x-pict",chat:"application/x-chat",p10:"application/pkcs10",p12:"application/x-pkcs12",p7m:"application/pkcs7-mime",p7s:"application/pkcs7-signature",p7r:"application/x-pkcs7-certreqresp",p7b:"application/x-pkcs7-certificates",p8:"application/pkcs8",plf:"application/vnd.pocketlearn",pnm:"image/x-portable-anymap",pbm:"image/x-portable-bitmap",pcf:"application/x-font-pcf",pfr:"application/font-tdpfr",pgn:"application/x-chess-pgn",pgm:"image/x-portable-graymap",png:"image/png",ppm:"image/x-portable-pixmap",pskcxml:"application/pskc+xml",pml:"application/vnd.ctc-posml",ai:"application/postscript",pfa:"application/x-font-type1",pbd:"application/vnd.powerbuilder6",pgp:"application/pgp-signature",box:"application/vnd.previewsystems.box",ptid:"application/vnd.pvi.ptid1",pls:"application/pls+xml",str:"application/vnd.pg.format",ei6:"application/vnd.pg.osasli",dsc:"text/prs.lines.tag",psf:"application/x-font-linux-psf",qps:"application/vnd.publishare-delta-tree",wg:"application/vnd.pmi.widget",qxd:"application/vnd.quark.quarkxpress",esf:"application/vnd.epson.esf",msf:"application/vnd.epson.msf",ssf:"application/vnd.epson.ssf",qam:"application/vnd.epson.quickanime",qfx:"application/vnd.intu.qfx",mov:"video/quicktime",rar:"application/x-rar-compressed",ram:"audio/x-pn-realaudio",rmp:"audio/x-pn-realaudio-plugin",rsd:"application/rsd+xml",rm:"application/vnd.rn-realmedia",bed:"application/vnd.realvnc.bed",mxl:"application/vnd.recordare.musicxml",musicxml:"application/vnd.recordare.musicxml+xml",rnc:"application/relax-ng-compact-syntax",rdz:"application/vnd.data-vision.rdz",rdf:"application/rdf+xml",rp9:"application/vnd.cloanto.rp9",jisp:"application/vnd.jisp",rtf:"application/rtf",rtx:"text/richtext",link66:"application/vnd.route66.link66+xml",rss:"application/rss+xml",shf:"application/shf+xml",st:"application/vnd.sailingtracker.track",svg:"image/svg+xml",sus:"application/vnd.sus-calendar",sru:"application/sru+xml",setpay:"application/set-payment-initiation",setreg:"application/set-registration-initiation",sema:"application/vnd.sema",semd:"application/vnd.semd",semf:"application/vnd.semf",see:"application/vnd.seemail",snf:"application/x-font-snf",spq:"application/scvp-vp-request",spp:"application/scvp-vp-response",scq:"application/scvp-cv-request",scs:"application/scvp-cv-response",sdp:"application/sdp",etx:"text/x-setext",movie:"video/x-sgi-movie",ifm:"application/vnd.shana.informed.formdata",itp:"application/vnd.shana.informed.formtemplate",iif:"application/vnd.shana.informed.interchange",ipk:"application/vnd.shana.informed.package",tfi:"application/thraud+xml",shar:"application/x-shar",rgb:"image/x-rgb",slt:"application/vnd.epson.salt",aso:"application/vnd.accpac.simply.aso",imp:"application/vnd.accpac.simply.imp",twd:"application/vnd.simtech-mindmapper",csp:"application/vnd.commonspace",saf:"application/vnd.yamaha.smaf-audio",mmf:"application/vnd.smaf",spf:"application/vnd.yamaha.smaf-phrase",teacher:"application/vnd.smart.teacher",svd:"application/vnd.svd",rq:"application/sparql-query",srx:"application/sparql-results+xml",gram:"application/srgs",grxml:"application/srgs+xml",ssml:"application/ssml+xml",skp:"application/vnd.koan",sgml:"text/sgml",sdc:"application/vnd.stardivision.calc",sda:"application/vnd.stardivision.draw",sdd:"application/vnd.stardivision.impress",smf:"application/vnd.stardivision.math",sdw:"application/vnd.stardivision.writer",sgl:"application/vnd.stardivision.writer-global",sm:"application/vnd.stepmania.stepchart",sit:"application/x-stuffit",sitx:"application/x-stuffitx",sdkm:"application/vnd.solent.sdkm+xml",xo:"application/vnd.olpc-sugar",au:"audio/basic",wqd:"application/vnd.wqd",sis:"application/vnd.symbian.install",smi:"application/smil+xml",xsm:"application/vnd.syncml+xml",bdm:"application/vnd.syncml.dm+wbxml",xdm:"application/vnd.syncml.dm+xml",sv4cpio:"application/x-sv4cpio",sv4crc:"application/x-sv4crc",sbml:"application/sbml+xml",tsv:"text/tab-separated-values",tiff:"image/tiff",tao:"application/vnd.tao.intent-module-archive",tar:"application/x-tar",tcl:"application/x-tcl",tex:"application/x-tex",tfm:"application/x-tex-tfm",tei:"application/tei+xml",txt:"text/plain",dxp:"application/vnd.spotfire.dxp",sfs:"application/vnd.spotfire.sfs",tsd:"application/timestamped-data",tpt:"application/vnd.trid.tpt",mxs:"application/vnd.triscape.mxs",t:"text/troff",tra:"application/vnd.trueapp",ttf:"application/x-font-ttf",ttl:"text/turtle",umj:"application/vnd.umajin",uoml:"application/vnd.uoml+xml",unityweb:"application/vnd.unity",ufd:"application/vnd.ufdl",uri:"text/uri-list",utz:"application/vnd.uiq.theme",ustar:"application/x-ustar",uu:"text/x-uuencode",vcs:"text/x-vcalendar",vcf:"text/x-vcard",vcd:"application/x-cdlink",vsf:"application/vnd.vsf",wrl:"model/vrml",vcx:"application/vnd.vcx",mts:"model/vnd.mts",vtu:"model/vnd.vtu",vis:"application/vnd.visionary",viv:"video/vnd.vivo",ccxml:"application/ccxml+xml,",vxml:"application/voicexml+xml",src:"application/x-wais-source",wbxml:"application/vnd.wap.wbxml",wbmp:"image/vnd.wap.wbmp",wav:"audio/x-wav",davmount:"application/davmount+xml",woff:"application/x-font-woff",wspolicy:"application/wspolicy+xml",webp:"image/webp",wtb:"application/vnd.webturbo",wgt:"application/widget",hlp:"application/winhlp",wml:"text/vnd.wap.wml",wmls:"text/vnd.wap.wmlscript",wmlsc:"application/vnd.wap.wmlscriptc",wpd:"application/vnd.wordperfect",stf:"application/vnd.wt.stf",wsdl:"application/wsdl+xml",xbm:"image/x-xbitmap",xpm:"image/x-xpixmap",xwd:"image/x-xwindowdump",der:"application/x-x509-ca-cert",fig:"application/x-xfig",xhtml:"application/xhtml+xml",xml:"application/xml",xdf:"application/xcap-diff+xml",xenc:"application/xenc+xml",xer:"application/patch-ops-error+xml",rl:"application/resource-lists+xml",rs:"application/rls-services+xml",rld:"application/resource-lists-diff+xml",xslt:"application/xslt+xml",xop:"application/xop+xml",xpi:"application/x-xpinstall",xspf:"application/xspf+xml",xul:"application/vnd.mozilla.xul+xml",xyz:"chemical/x-xyz",yaml:"text/yaml",yang:"application/yang",yin:"application/yin+xml",zir:"application/vnd.zul",zip:"application/zip",zmm:"application/vnd.handheld-entertainment+xml",zaz:"application/vnd.zzazz.deck+xml"},zO=Object.fromEntries(Object.entries(Q1).map(function(e){var t=jn(e,2),n=t[0],r=t[1];return[r,n]})),c6=/^data:(.*?);base64,/;function u6(e){var t=c6.exec(e);if(t&&t[1])return t[1]}function d6(e){var t=zO[e];return t||e.split("/")[1]}function f6(e){var t=e.split(".").pop(),n=t&&Q1[t];if(n)return n}function $O(e,t,n,r,o){var i="".concat((r==null?void 0:r.width)||"").concat((r==null?void 0:r.height)||"").concat(r==null?void 0:r.mimeType),s={type:t.type,opt:t.opt,options:xt({},t.options)};return e+JSON.stringify(s)+n+i+o}function h6(e,t,n,r,o,i){return Z1(i.encode($O(e,t,n,r,o))).slice(0,4)}function BO(e){return e.slice(0,12)}function p6(e){return BO(Z1(new Uint8Array(e)))}function m6(e,t){var n=e.startsWith("/")?e.slice(1).split("/"):e.split("/");if(t.length===0)return{isValid:n.length===0||n.length===1&&n[0]==="",expectedPath:"/"};for(var r=0,o=0,i=!1,s=-1,a=0;a<t.length;a++){var l=t[a];l.startsWith("[[")&&l.endsWith("]]")?(i=!0,s=a,o=1/0):l.startsWith("[...")&&l.endsWith("]")?(i=!0,s=a,r++,o=1/0):l.startsWith("[[")&&l.endsWith("]")?o++:(l.startsWith("[")&&l.endsWith("]"),r++,o++)}if(n.length<r||!i&&n.length>o){var c=t.map(function(m){return m.startsWith("[[")&&m.endsWith("]]")?"[optional:".concat(m.slice(2,-2),"]"):m.startsWith("[...")&&m.endsWith("]")?"[...".concat(m.slice(4,-1),"]"):m.startsWith("[[")&&m.endsWith("]")?"[optional:".concat(m.slice(2,-1),"]"):m.startsWith("[")&&m.endsWith("]")?"[".concat(m.slice(1,-1),"]"):m}).join("/");return{isValid:!1,expectedPath:"/".concat(c)}}for(var u=i?s:t.length,f=0;f<u;f++){var h=t[f],p=n[f];if(h.startsWith("[[")&&h.endsWith("]]")){if(p!==""&&p!==void 0&&p==="")return{isValid:!1,expectedPath:"/".concat(t.join("/"))}}else if(h.startsWith("[")&&h.endsWith("]")){if(p===""||p===void 0)return{isValid:!1,expectedPath:"/".concat(t.join("/"))}}else if(h!==p)return{isValid:!1,expectedPath:"/".concat(t.join("/"))}}return{isValid:!0}}var g6={getRouterId:function(){return"next-app-router"},validate:function(t,n){var r=v6(t),o=[],i=gi(n),s;try{for(i.s();!(s=i.n()).done;){var a=s.value,l=m6(a,r);l.isValid||o.push({error:{message:'URL path "'.concat(a,'" does not match the route pattern for "').concat(t,'"'),urlPath:a,expectedPath:l.expectedPath||null}})}}catch(c){i.e(c)}finally{i.f()}return o}};function v6(e){if(!e||typeof e!="string")return[];for(var t=[/\/app\/(.+)\/page\.val\.ts$/,/\/src\/app\/(.+)\/page\.val\.ts$/,/\/app\/(.+)\/page\.tsx?$/,/\/src\/app\/(.+)\/page\.tsx?$/],n=0,r=t;n<r.length;n++){var o=r[n],i=e.match(o);if(i){var s=i[1];return s.split("/").flatMap(function(a){if(a.startsWith("(")&&a.endsWith(")")&&!a.includes("."))return[];var l=a.match(/^(\([.]+\)(\(.+\))?)(.*)$/);if(l){var c=l[3]||l[4];return c?[c]:[]}return[a]})}}return[]}var ba="?p=",VO="https://content.val.build",Nb="https://app.val.build",Y={VERSION:{core:function(){try{return require("../package.json").version}catch{return null}}()},convertFileSource:E$,convertRemoteSource:J$,getSchema:$C,getValPath:NO,getSource:R$,resolvePath:A$,safeResolvePath:I$,splitModuleFilePathAndModulePath:X1,joinModuleFilePathAndModulePath:TO,nextAppRouter:g6,remote:{createRemoteRef:q$,getValidationBasis:$O,getValidationHash:h6,getFileHash:p6,hashToRemoteFileHash:BO,splitRemoteRef:FO},validate:function(t,n,r){var o;return t&&((o=$C(t))===null||o===void 0?void 0:o.executeValidate(n,r))},isVal:C$,isFile:w$,createValPathOfItem:fu,getSHA256Hash:Z1,initSchema:G$,getMimeType:u6,mimeTypeToFileExt:d6,filenameToMimeType:f6,EXT_TO_MIME_TYPES:Q1,MIME_TYPES_TO_EXT:zO,ModuleFilePathSep:ba,notFileOp:function(t){return t.op!=="file"},isFileOp:function(t){return t.op==="file"&&typeof t.filePath=="string"},createPatchJSONPath:function(t){return"/".concat(t.split(".").map(function(n){return n&&y6(n)}).join("/"))},createPatchPath:function(t){return Xf(t)},splitModulePath:Xf,splitModuleFilePath:D$,splitJoinedSourcePaths:L$,parentOfSourcePath:F$,patchPathToModulePath:LO,VAL_ENABLE_COOKIE_NAME:"val_enable",VAL_STATE_COOKIE:"val_state",VAL_SESSION_COOKIE:"val_session",createFilename:function(t,n,r,o){var i,s;if(!r||!t)return n;var a=o.slice(0,5),l=(i=Y.getMimeType(t))!==null&&i!==void 0?i:"unknown",c=(s=Y.mimeTypeToFileExt(l))!==null&&s!==void 0?s:"unknown";if(n){var u=n.split(".").slice(0,-1).join(".")||n,f=u.lastIndexOf("_"),h=u.slice(f+1,u.length);h===a&&(u=u.slice(0,f));var p=encodeURIComponent(u).replace(/%[0-9A-Fa-f]{2}/g,"").toLowerCase();return"".concat(p,"_").concat(a,".").concat(c)}return"".concat(o,".").concat(c)}};function y6(e){try{return JSON.parse(e)}catch{return e}}var Gv={},qv={};qv.byteLength=w6;qv.toByteArray=k6;qv.fromByteArray=N6;var fi=[],ro=[],x6=typeof Uint8Array<"u"?Uint8Array:Array,Nx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var ac=0,b6=Nx.length;ac<b6;++ac)fi[ac]=Nx[ac],ro[Nx.charCodeAt(ac)]=ac;ro[45]=62;ro[95]=63;function UO(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function w6(e){var t=UO(e),n=t[0],r=t[1];return(n+r)*3/4-r}function S6(e,t,n){return(t+n)*3/4-n}function k6(e){var t,n=UO(e),r=n[0],o=n[1],i=new x6(S6(e,r,o)),s=0,a=o>0?r-4:r,l;for(l=0;l<a;l+=4)t=ro[e.charCodeAt(l)]<<18|ro[e.charCodeAt(l+1)]<<12|ro[e.charCodeAt(l+2)]<<6|ro[e.charCodeAt(l+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return o===2&&(t=ro[e.charCodeAt(l)]<<2|ro[e.charCodeAt(l+1)]>>4,i[s++]=t&255),o===1&&(t=ro[e.charCodeAt(l)]<<10|ro[e.charCodeAt(l+1)]<<4|ro[e.charCodeAt(l+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function E6(e){return fi[e>>18&63]+fi[e>>12&63]+fi[e>>6&63]+fi[e&63]}function C6(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),o.push(E6(r));return o.join("")}function N6(e){for(var t,n=e.length,r=n%3,o=[],i=16383,s=0,a=n-r;s<a;s+=i)o.push(C6(e,s,s+i>a?a:s+i));return r===1?(t=e[n-1],o.push(fi[t>>2]+fi[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],o.push(fi[t>>10]+fi[t>>4&63]+fi[t<<2&63]+"=")),o.join("")}var eS={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */eS.read=function(e,t,n,r,o){var i,s,a=o*8-r-1,l=(1<<a)-1,c=l>>1,u=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-u)-1,p>>=-u,u+=a;u>0;i=i*256+e[t+f],f+=h,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=r;u>0;s=s*256+e[t+f],f+=h,u-=8);if(i===0)i=1-c;else{if(i===l)return s?NaN:(p?-1:1)*(1/0);s=s+Math.pow(2,r),i=i-c}return(p?-1:1)*s*Math.pow(2,i-r)};eS.write=function(e,t,n,r,o,i){var s,a,l,c=i*8-o-1,u=(1<<c)-1,f=u>>1,h=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,m=r?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(s++,l/=2),s+f>=u?(a=0,s=u):s+f>=1?(a=(t*l-1)*Math.pow(2,o),s=s+f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=a&255,p+=m,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[n+p]=s&255,p+=m,s/=256,c-=8);e[n+p-m]|=v*128};/*!
|
|
43
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function me(e){return h$(e)||p$(e)||G1(e)||m$()}function ie(e){"@babel/helpers - typeof";return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(e)}function g$(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SO(e){var t=g$(e,"string");return typeof t=="symbol"?t:t+""}function B(e,t,n){return(t=SO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zC(Object(n),!0).forEach(function(r){B(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SO(r.key),r)}}function An(e,t,n){return t&&v$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yg(e){return yg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yg(e)}function kO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kO=function(){return!!e})()}function y$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x$(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y$(e)}function Zr(e,t,n){return t=yg(t),x$(e,kO()?Reflect.construct(t,[],yg(e).constructor):t.apply(e,n))}function Eb(e,t){return Eb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Eb(e,t)}function Qr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eb(e,t)}var eo=function(){function e(){Rn(this,e)}return An(e,[{key:"executeCustomValidateFunctions",value:function(n,r,o){var i=[],s=gi(r),a;try{for(s.s();!(a=s.n()).done;){var l=a.value;try{var c=l(n,o);c&&i.push({message:c,value:n})}catch(u){i.push({message:"Error in custom validate function: ".concat(u instanceof Error?u.message:String(u)),value:n,schemaError:!0})}}}catch(u){s.e(u)}finally{s.f()}return i}},{key:"appendValidationError",value:function(n,r,o,i,s){return n?(n[r]?n[r].push({message:o,value:i,schemaError:s}):n[r]=[{message:o,value:i,schemaError:s}],n):B({},r,[{message:o,value:i,schemaError:s}])}}])}(),EO=Symbol("GetSchema"),CO=Symbol("Path"),b$=Symbol("GetSource");function $C(e){return e[EO]}var De="_type",bt="_ref",Cb="_tag";function w$(e){return ie(e)==="object"&&e!==null&&De in e&&e[De]==="file"&&bt in e&&typeof e[bt]=="string"}var S$=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];return Rn(this,t),r=Zr(this,t),r.options=n,r.opt=o,r.isRemote=i,r.customValidateFunctions=s,r}return Qr(t,e),An(t,[{key:"remote",value:function(){return new t(this.options,this.opt,!0)}},{key:"validate",value:function(r){return new t(this.options,this.opt,this.isRemote,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});if(this.opt&&o==null)return i.length>0?B({},r,i):!1;if(o==null)return B({},r,[].concat(me(i),[{message:"Non-optional file was null or undefined.",value:o}]));if(typeof o[bt]!="string")return B({},r,[].concat(me(i),[{message:"File did not have a file reference string. Got: ".concat(ie(o[bt])),value:o}]));if(this.isRemote&&o[De]!=="remote")return B({},r,[].concat(me(i),[{message:"Expected a remote file, but got a local file.",value:o,fixes:["file:upload-remote"]}]));if(this.isRemote&&o[De]==="remote")return B({},r,[].concat(me(i),[{message:"Remote file was not checked.",value:o,fixes:["file:check-remote"]}]));if(!this.isRemote&&o[De]==="remote")return B({},r,[].concat(me(i),[{message:"Expected locale file, but found remote.",value:o,fixes:["file:download-remote"]}]));if(o[De]!=="file")return B({},r,[].concat(me(i),[{message:"File did not have the valid file extension type. Got: ".concat(o[De]),value:o,fixes:["file:change-extension","file:check-metadata"]}]));var s=this.options||{},a=s.accept,l=o.metadata||{},c=l.mimeType;if(a&&c&&!c.includes("/"))return B({},r,[].concat(me(i),[{message:"Invalid mime type format. Got: ".concat(c),value:o,fixes:["file:change-extension","file:check-metadata"]}]));if(a&&c&&c.includes("/")){var u=a.split(",").map(function(p){return p.trim()}),f=u.some(function(p){if(p==="*/*")return!0;if(p.endsWith("/*")){var m=p.slice(0,-2);return c.startsWith(m)}return p===c});if(!f)return B({},r,[].concat(me(i),[{message:"Mime type mismatch. Found '".concat(c,"' but schema accepts '").concat(a,"'"),value:o,fixes:["file:change-extension","file:check-metadata"]}]))}var h=Y.filenameToMimeType(o[bt]);return h?h!==c?B({},r,[].concat(me(i),[{message:"Mime type and file extension not matching. Mime type is '".concat(c,"' but file extension is '").concat(h,"'"),value:o,fixes:["file:change-extension","file:check-metadata"]}])):o.metadata?B({},r,[].concat(me(i),[{message:"Found metadata, but it could not be validated. File metadata must be an object with the mimeType.",value:o,fixes:["file:check-metadata"]}])):B({},r,[].concat(me(i),[{message:"Missing File metadata.",value:o,fixes:["file:add-metadata"]}])):B({},r,[].concat(me(i),[{message:"Could not determine mime type from file extension. Got: ".concat(o[bt]),value:o,fixes:["file:change-extension","file:check-metadata"]}]))}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'object', got 'null'",typeError:!0}])}:ie(o)!=="object"?{success:!1,errors:B({},r,[{message:"Expected object, got '".concat(ie(o),"'"),typeError:!0}])}:bt in o?De in o&&o[De]==="file"?{success:!0,data:o}:{success:!1,errors:B({},r,[{message:"Value of this schema must use: 'c.file' (error type: missing_file_extension)",typeError:!0}])}:{success:!1,errors:B({},r,[{message:"Value of this schema must use: 'c.file' (error type: missing_ref_prop)",typeError:!0}])}}},{key:"nullable",value:function(){return new t(this.options,!0)}},{key:"executeSerialize",value:function(){var r;return{type:"file",options:this.options,opt:this.opt,remote:this.isRemote,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),k$=function(t){return new S$(t)};function E$(e){return e[bt].startsWith("/public")?e.patch_id?{url:"/api/val/files"+e[bt]+"?patch_id=".concat(e.patch_id),metadata:e.metadata}:{url:e[bt].slice(7),metadata:e.metadata}:{url:e[bt]+(e.patch_id?"?patch_id=".concat(e.patch_id):""),metadata:e.metadata}}function C$(e){return ie(e)==="object"&&e!==null&&e!==void 0&&CO in e&&"val"in e}function NO(e){return e[CO]}function fu(e,t){if(ie(t)==="symbol")throw Error("Cannot create val path of array item with symbol prop: ".concat(t.toString()));if(e)return e.includes(Y.ModuleFilePathSep)?"".concat(e,".").concat(JSON.stringify(t)):"".concat(e).concat(Y.ModuleFilePathSep).concat(JSON.stringify(t))}function Or(e,t){if(ie(t)==="symbol")throw Error("Cannot create val path of array item with symbol prop: ".concat(t.toString()));if(!e)throw Error("Cannot create val path of array item of empty or missing path: ".concat(e,". Item: ").concat(t));return e.includes(Y.ModuleFilePathSep)?"".concat(e,".").concat(JSON.stringify(t)):"".concat(e).concat(Y.ModuleFilePathSep).concat(JSON.stringify(t))}var N$=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];return Rn(this,t),r=Zr(this,t),r.options=n,r.opt=o,r.isRaw=i,r.customValidateFunctions=s,r}return Qr(t,e),An(t,[{key:"min",value:function(r){return this.minLength(r)}},{key:"minLength",value:function(r){return new t(xt(xt({},this.options),{},{minLength:r}),this.opt,this.isRaw)}},{key:"max",value:function(r){return this.maxLength(r)}},{key:"maxLength",value:function(r){return new t(xt(xt({},this.options),{},{maxLength:r}),this.opt,this.isRaw)}},{key:"regexp",value:function(r,o){return new t(xt(xt({},this.options),{},{regexp:r,regExpMessage:o}),this.opt,this.isRaw)}},{key:"validate",value:function(r){return new t(this.options,this.opt,this.isRaw,this.customValidateFunctions.concat(r))}},{key:"executeValidate",value:function(r,o){var i,s,a,l=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});return this.opt&&o==null?l.length>0?B({},r,l):!1:typeof o!="string"?B({},r,[{message:"Expected 'string', got '".concat(ie(o),"'"),value:o}]):((i=this.options)!==null&&i!==void 0&&i.maxLength&&o.length>this.options.maxLength&&l.push({message:"Expected string to be at most ".concat(this.options.maxLength," characters long, got ").concat(o.length),value:o}),(s=this.options)!==null&&s!==void 0&&s.minLength&&o.length<this.options.minLength&&l.push({message:"Expected string to be at least ".concat(this.options.minLength," characters long, got ").concat(o.length),value:o}),(a=this.options)!==null&&a!==void 0&&a.regexp&&!this.options.regexp.test(o)&&l.push({message:this.options.regExpMessage||"Expected string to match reg exp: ".concat(this.options.regexp.toString(),", got '").concat(o,"'"),value:o}),l.length>0?B({},r,l):!1)}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:typeof o=="string"?{success:!0,data:o}:{success:!1,errors:B({},r,[{message:"Expected 'string', got '".concat(ie(o),"'"),typeError:!0}])}}},{key:"nullable",value:function(){return new t(this.options,!0,this.isRaw)}},{key:"raw",value:function(){return new t(this.options,this.opt,!0)}},{key:"executeSerialize",value:function(){var r,o,i,s,a;return{type:"string",options:{maxLength:(r=this.options)===null||r===void 0?void 0:r.maxLength,minLength:(o=this.options)===null||o===void 0?void 0:o.minLength,regexp:((i=this.options)===null||i===void 0?void 0:i.regexp)&&{message:this.options.regExpMessage,source:this.options.regexp.source,flags:this.options.regexp.flags},customValidate:this.customValidateFunctions&&((s=this.customValidateFunctions)===null||s===void 0?void 0:s.length)>0},opt:this.opt,raw:this.isRaw,customValidate:this.customValidateFunctions&&((a=this.customValidateFunctions)===null||a===void 0?void 0:a.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),PO=function(t){return new N$(t)},_l=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Rn(this,t),r=Zr(this,t),r.items=n,r.opt=o,r.customValidateFunctions=i,r}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.items,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=!1,s=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});if(this.opt&&o==null)return s.length>0?B({},r,s):!1;if(o===null)return B({},r,[{message:"Expected 'object', got 'null'"}]);if(ie(o)!=="object")return B({},r,[{message:"Expected 'object', got '".concat(ie(o),"'")}]);if(Array.isArray(o))return B({},r,[{message:"Expected 'object', got 'array'"}]);var a=gi(s),l;try{for(a.s();!(l=a.n()).done;){var c=l.value;i=this.appendValidationError(i,r,c.message,o,c.schemaError)}}catch(x){a.e(x)}finally{a.f()}for(var u=0,f=Object.entries(this.items);u<f.length;u++){var h=jn(f[u],2),p=h[0],m=h[1],v=fu(r,p);if(!v)i=this.appendValidationError(i,r,"Internal error: could not create path at ".concat(!r&&typeof r=="string"?"<empty string>":r," at key ").concat(p),o);else{var b=m.executeValidate(v,o[p]);b&&i?i=xt(xt({},b),i):b&&(i=b)}}return i}},{key:"executeAssert",value:function(r,o){if(this.opt&&o===null)return{success:!0,data:o};if(o===null)return{success:!1,errors:B({},r,[{message:"Expected 'object', got 'null'",typeError:!0}])};if(ie(o)!=="object")return{success:!1,errors:B({},r,[{message:"Expected 'object', got '".concat(ie(o),"'"),typeError:!0}])};if(Array.isArray(o))return{success:!1,errors:B({},r,[{message:"Expected 'object', got 'array'",typeError:!0}])};for(var i=[],s=0,a=Object.keys(this.items);s<a.length;s++){var l=a[s],c=fu(r,l);c?l in o||i.push({message:"Expected key '".concat(l,"' not found in object"),typeError:!0}):i.push({message:"Internal error: could not create path at ".concat(!r&&typeof r=="string"?"<empty string>":r," at key ").concat(l),internalError:!0})}return i.length>0?{success:!1,errors:B({},r,i)}:{success:!0,data:o}}},{key:"nullable",value:function(){return new t(this.items,!0)}},{key:"executeSerialize",value:function(){var r;return{type:"object",items:Object.fromEntries(Object.entries(this.items).map(function(o){var i=jn(o,2),s=i[0],a=i[1];return[s,a.executeSerialize()]})),opt:this.opt,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(r,o){var i={};if(o===null)return i;for(var s in this.items){var a=o[s];if(a!=null){var l=Or(r,s),c=this.items[s].executeRender(l,a);for(var u in c){var f=u;i[f]=c[f]}}}return i}}])}(eo),_O=function(t){return new _l(t)};_O({get test(){return PO()}});var Hv=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Rn(this,t),r=Zr(this,t),B(r,"renderInput",null),r.item=n,r.opt=o,r.customValidateFunctions=i,r}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.item,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this.executeAssert(r,o);if(!i.success)return i.errors;if(i.data===null)return!1;for(var s={},a=0,l=Object.entries(i.data);a<l.length;a++){var c=jn(l[a],2),u=c[0],f=c[1],h=Or(r,Number(u)),p=this.item.executeValidate(h,f);p&&(s=xt(xt({},p),s))}return Object.keys(s).length===0?!1:s}},{key:"executeAssert",value:function(r,o){return o===null&&this.opt?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'array', got 'null'",typeError:!0}])}:ie(o)!=="object"?{success:!1,errors:B({},r,[{message:"Expected 'object', got '".concat(ie(o),"'"),typeError:!0}])}:Array.isArray(o)?{success:!0,data:o}:{success:!1,errors:B({},r,[{message:"Expected object of type 'array'",typeError:!0}])}}},{key:"nullable",value:function(){return new t(this.item,!0)}},{key:"executeSerialize",value:function(){var r;return{type:"array",item:this.item.executeSerialize(),opt:this.opt,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(r,o){var i={};if(o===null)return i;for(var s=0;s<o.length;s++){var a=s,l=o[a];if(l!=null){var c=Or(r,a),u=this.item.executeRender(c,l);for(var f in u){var h=f;i[h]=u[h]}}}if(this.renderInput){var p=this.renderInput,m=p.select,v=p.layout;v!=="list"&&(i[r]={status:"error",message:"Unknown layout type: "+v});try{i[r]={status:"success",data:{layout:"list",parent:"array",items:o.map(function(b){var x=m({val:b}),w=x.title,S=x.subtitle,C=x.image;return{title:w,subtitle:S,image:C}})}}}catch(b){i[r]={status:"error",message:b instanceof Error?b.message:"Unknown error"}}}return i}},{key:"render",value:function(r){return this.renderInput=r,this}}])}(eo),P$=function(t){return new Hv(t)},Xa=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Rn(this,t),r=Zr(this,t),r.value=n,r.opt=o,r.customValidateFunctions=i,r}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.value,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});return this.opt&&o==null?i.length>0?B({},r,i):!1:typeof o!="string"?B({},r,[].concat(me(i),[{message:"Expected 'string', got '".concat(ie(o),"'"),value:o}])):o!==this.value?B({},r,[].concat(me(i),[{message:"Expected literal '".concat(this.value,"', got '").concat(o,"'"),value:o}])):i.length>0?B({},r,i):!1}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'string', got 'null'",typeError:!0}])}:typeof o=="string"&&o===this.value?{success:!0,data:o}:{success:!1,errors:B({},r,[{message:"Expected literal '".concat(this.value,"', got '").concat(o,"'"),typeError:!0}])}}},{key:"nullable",value:function(){return new t(this.value,!0)}},{key:"executeSerialize",value:function(){var r;return{type:"literal",value:this.value,opt:this.opt,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),_$=function(t){return new Xa(t)},jO=function(e){function t(n,r){var o,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];return Rn(this,t),o=Zr(this,t),o.key=n,o.items=r,o.opt=i,o.customValidateFunctions=s,o}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.key,this.items,this.opt,this.customValidateFunctions.concat(r))}},{key:"executeValidate",value:function(r,o){var i=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r}),s=o;if(this.opt&&s===null)return i.length>0?B({},r,i):!1;if(!this.key)return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Missing required first argument in union",schemaError:!0}]));var a=this.key;if(!Array.isArray(this.items))return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"A union schema must take more than 1 schema arguments",schemaError:!0}]));if(typeof a=="string"){if(this.items.some(function(O){return!(O instanceof _l)}))return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Key is a string, so all schema items must be objects",schemaError:!0}]));var l=this.items,c=l.map(function(O){return O.executeSerialize()}),u=c.filter(function(O){return O.type!=="object"||O.items[a].type!=="literal"});if(u.length>0)return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"All schema items must be objects with a key: ".concat(a," that is a literal schema. Found: ").concat(JSON.stringify(u,null,2)),schemaError:!0}]));var f=c,h=f.filter(function(O){return O.items[a].opt});if(h.length>1)return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Schema cannot have an optional keys: ".concat(a),schemaError:!0}]));if(ie(s)!=="object")return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Expected an object",typeError:!0}]));var p=s;if(p[a]===void 0)return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Missing required key: ".concat(a),typeError:!0}]));var m=[],v=gi(f),b;try{for(v.s();!(b=v.n()).done;){var x=b.value,w=x.items[a];if(w.type==="literal")if(!m.includes(w.value))m.push(w.value);else return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Found duplicate key in schema: ".concat(w.value),schemaError:!0}]))}}catch(O){v.e(O)}finally{v.f()}var S=l.find(function(O){return!O.items[a].executeValidate(r,p[a])});if(!S){var C=fu(r,a);if(!C)throw new Error("Internal error: could not create path at ".concat(!r&&typeof r=="string"?"<empty string>":r," at key ").concat(a));return B({},C,[{message:'Invalid key: "'.concat(a,'". Value was: "').concat(p[a],'". Valid values: ').concat(f.map(function(O){var A=O.items[a];if(A.type==="literal"&&A.value)return'"'.concat(A.value,'"');throw new Error("Expected literal schema, got ".concat(JSON.stringify(A,null,2)))}).join(", "))}])}var N=S.executeValidate(r,p);if(N)return N}else if(a instanceof Xa){if(this.items.some(function(O){return!(O instanceof Xa)}))return B({},r,[{message:"Key is a literal schema, so all schema items must be literals",typeError:!0}]);var P=[a].concat(me(this.items));if(typeof s=="string"){var _=P.some(function(O){return!O.executeValidate(r,s)});if(!_)return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Union must match one of the following: ".concat(P.map(function(O){return'"'.concat(O.value,'"')}).join(", "))}]))}}else return i.length>0?B({},r,i):B({},r,[].concat(me(i),[{message:"Expected a string or literal"}]));return i.length>0?B({},r,i):!1}},{key:"executeAssert",value:function(r,o){if(this.opt&&o===null)return{success:!0,data:o};if(o===null)return{success:!1,errors:B({},r,[{message:"Expected 'object', got 'null'",typeError:!0}])};if(!this.key)return{success:!1,errors:B({},r,[{message:"Missing required first argument in union schema",schemaError:!0}])};if(!Array.isArray(this.items))return{success:!1,errors:B({},r,[{message:"The schema of this value is wrong. Schema is neither a union of literals nor a tagged union (of objects)",schemaError:!0}])};if(this.key instanceof Xa){var i,s=!1,a={},l=gi((i=[this.key]).concat.apply(i,me(this.items))),c;try{for(l.s();!(c=l.n()).done;){var u=c.value;if(!(u instanceof Xa))return{success:!1,errors:B({},r,[{message:"Schema of value is a union of string, so all schema items must be literals",schemaError:!0}])};if(typeof o!="string"){a[r]=[{message:"Expected 'string', got '".concat(ie(o),"'"),typeError:!0}];continue}var f=u.executeAssert(r,o);if(f.success){s=!0;break}else for(var h=0,p=Object.entries(f.errors);h<p.length;h++){var m,v=jn(p[h],2),b=v[0],x=v[1];a[b]||(a[b]=[]),(m=a[b]).push.apply(m,me(x))}}}catch(H){l.e(H)}finally{l.f()}return s?{success:!0,data:o}:{success:!1,errors:a}}else if(typeof this.key=="string"){var w=!1,S={},C=gi(this.items),N;try{for(C.s();!(N=C.n()).done;){var P=N.value,_=P.executeAssert(r,o);if(_.success){w=!0;break}else for(var O=0,A=Object.entries(_.errors);O<A.length;O++){var L,W=jn(A[O],2),$=W[0],K=W[1];S[$]||(S[$]=[]),(L=S[$]).push.apply(L,me(K))}}}catch(H){C.e(H)}finally{C.f()}return w?{success:!0,data:o}:{success:!1,errors:S}}else return{success:!1,errors:B({},r,[{message:"The schema of this value is wrong. Schema is neither a union of literals nor a tagged union (of objects)",schemaError:!0}])}}},{key:"nullable",value:function(){return new t(this.key,this.items,!0)}},{key:"executeSerialize",value:function(){var r;if(typeof this.key=="string"){var o;return{type:"union",key:this.key,items:this.items.map(function(i){return i.executeSerialize()}),opt:this.opt,customValidate:this.customValidateFunctions&&((o=this.customValidateFunctions)===null||o===void 0?void 0:o.length)>0}}return{type:"union",key:this.key.executeSerialize(),items:this.items.map(function(i){return i.executeSerialize()}),opt:this.opt,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(r,o){var i={};if(o===null||this.key instanceof Xa)return i;var s=this.key;if(typeof s=="string"){var a=this.items.find(function(f){if(f instanceof _l){var h=f.items[s];if(h instanceof Xa)return ie(o)==="object"&&s in o&&h.value===o[s]}return!1});if(a){var l=a.executeRender(r,o);for(var c in l){var u=c;i[u]=l[u]}return i}i[r]={status:"error",message:"Could not find a matching (object) schema for the union key: ".concat(s)}}return i[r]={status:"error",message:"The schema of this value is wrong. Expected a object union schema, but union key is not a string. Got: '".concat(JSON.stringify(s,null,2),"'")},i}}])}(eo),j$=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new jO(t,r)},J1=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];return Rn(this,t),r=Zr(this,t),r.options=n,r.opt=o,r.isRemote=i,r.customValidateFunctions=s,r}return Qr(t,e),An(t,[{key:"remote",value:function(){return new t(this.options,this.opt,!0)}},{key:"validate",value:function(r){return new t(this.options,this.opt,this.isRemote,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});if(this.opt&&o==null)return i.length>0?B({},r,i):!1;if(o==null)return B({},r,[].concat(me(i),[{message:"Non-optional image was null or undefined.",value:o}]));if(this.isRemote&&o[De]!=="remote")return B({},r,[].concat(me(i),[{message:"Expected a remote image, but got a local image.",value:o,fixes:["image:upload-remote"]}]));if(this.isRemote&&o[De]==="remote")return B({},r,[].concat(me(i),[{message:"Remote image was not checked.",value:o,fixes:["image:check-remote"]}]));if(!this.isRemote&&o[De]==="remote")return B({},r,[].concat(me(i),[{message:"Expected locale image, but found remote.",value:o,fixes:["image:download-remote"]}]));if(typeof o[bt]!="string")return B({},r,[].concat(me(i),[{message:"Image did not have a file reference string. Got: ".concat(ie(o[bt])),value:o}]));if(o[De]!=="file")return B({},r,[].concat(me(i),[{message:"Image did not have the valid file extension type. Got: ".concat(o[De]),value:o,fixes:["image:change-extension","image:check-metadata"]}]));var s=this.options||{},a=s.accept,l=o.metadata||{},c=l.mimeType;if(a&&c&&!c.includes("/"))return B({},r,[].concat(me(i),[{message:"Invalid mime type format. Got: '".concat(c,"'"),value:o,fixes:["image:check-metadata"]}]));if(a&&c&&c.includes("/")){var u=a.split(",").map(function(p){return p.trim()}),f=u.some(function(p){if(p==="*/*")return!0;if(p.endsWith("/*")){var m=p.slice(0,-2);return c.startsWith(m)}return p===c});if(!f)return B({},r,[].concat(me(i),[{message:"Mime type mismatch. Found '".concat(c,"' but schema accepts '").concat(a,"'"),value:o,fixes:["image:check-metadata"]}]))}var h=Y.filenameToMimeType(o[bt]);return h?h&&c&&h!==c?B({},r,[].concat(me(i),[{message:"Mime type and file extension not matching. Mime type is '".concat(c,"' but file extension is '").concat(h,"'"),value:o,fixes:["image:check-metadata"]}])):o.metadata?o.metadata.hotspot&&(ie(o.metadata.hotspot)!=="object"||typeof o.metadata.hotspot.x!="number"||typeof o.metadata.hotspot.y!="number")?B({},r,[].concat(me(i),[{message:"Hotspot must be an object with x and y as numbers.",value:o}])):B({},r,[].concat(me(i),[{message:"Found metadata, but it could not be validated. Image metadata must be an object with the required props: width (positive number), height (positive number) and the mime type.",value:o,fixes:["image:check-metadata"]}])):B({},r,[].concat(me(i),[{message:"Could not validate Image metadata.",value:o,fixes:["image:add-metadata"]}])):B({},r,[].concat(me(i),[{message:"Could not determine mime type from file extension. Got: ".concat(o[bt]),value:o,fixes:["image:check-metadata"]}]))}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'object', got 'null'",typeError:!0}])}:ie(o)!=="object"?{success:!1,errors:B({},r,[{message:"Expected 'object', got '".concat(ie(o),"'"),typeError:!0}])}:bt in o?De in o&&o[De]==="file"?{success:!0,data:o}:{success:!1,errors:B({},r,[{message:"Value of this schema must use: 'c.image' (error type: missing_file_extension)",typeError:!0}])}:{success:!1,errors:B({},r,[{message:"Value of this schema must use: 'c.image' (error type: missing_ref_prop)",typeError:!0}])}}},{key:"nullable",value:function(){return new t(this.options,!0,this.isRemote)}},{key:"executeSerialize",value:function(){var r;return{type:"image",options:this.options,opt:this.opt,remote:this.isRemote,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),T$=function(t){return new J1(t)},Kv=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Rn(this,t),r=Zr(this,t),r.options=n,r.opt=o,r.customValidateFunctions=i,r}return Qr(t,e),An(t,[{key:"maxLength",value:function(r){return new t(xt(xt({},this.options),{},{maxLength:r}),this.opt)}},{key:"minLength",value:function(r){return new t(xt(xt({},this.options),{},{minLength:r}),this.opt)}},{key:"validate",value:function(r){return new t(this.options,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r}),s=this.executeAssert(r,o);if(!s.success)return i.length>0?B({},r,i):s.errors;var a=s.data;if(a===null&&this.opt)return i.length>0?B({},r,i):!1;if(a===null)return B({},r,[].concat(me(i),[{message:"Expected 'array', got 'null'",typeError:!0}]));var l={},c=this.internalValidate(r,a,l);return c?i.length>0?xt(B({},r,i),c):c:Object.keys(l).length>0?i.length>0?xt(B({},r,i),l):l:i.length>0?B({},r,i):!1}},{key:"internalValidate",value:function(r,o,i){var s=this,a=0,l=function(m,v,b){var x=function(M,F,X){b[M]||(b[M]=[]),b[M].push({message:F,typeError:X})},w=gi(v),S;try{for(w.s();!(S=w.n()).done;){var C,N,P,_,O,A,L,W,$,K,H,V=S.value,I=Or(m,v.indexOf(V));if(typeof V=="string"){a+=V.length;continue}if(ie(V)!=="object")return B({},I,[{message:"Expected nodes of type 'object' or 'string', got '".concat(ie(V),"'"),typeError:!0}]);if(V===null)return B({},I,[{message:"Expected nodes of type 'object' or 'string', got 'null'",typeError:!0}]);if(!("tag"in V))return B({},I,[{message:"Expected node to either have 'tag' or be of type 'string'",typeError:!0}]);if(typeof V.tag!="string")return B({},I,[{message:"Expected 'string', got '".concat(ie(V.tag),"'"),typeError:!0}]);if(V.tag==="h1"&&!((C=s.options.block)!==null&&C!==void 0&&C.h1)&&x(I,"'h' block is not valid",!1),V.tag==="h2"&&!((N=s.options.block)!==null&&N!==void 0&&N.h2)&&x(I,"'h2' block is not valid",!1),V.tag==="h3"&&!((P=s.options.block)!==null&&P!==void 0&&P.h3)&&x(I,"'h3' block is not valid",!1),V.tag==="h4"&&!((_=s.options.block)!==null&&_!==void 0&&_.h4)&&x(I,"'h4' block is not valid",!1),V.tag==="h5"&&!((O=s.options.block)!==null&&O!==void 0&&O.h5)&&x(I,"'h5' block is not valid",!1),V.tag==="h6"&&!((A=s.options.block)!==null&&A!==void 0&&A.h6)&&x(I,"'h6' block is not valid",!1),V.tag==="ol"&&!((L=s.options.block)!==null&&L!==void 0&&L.ol)&&x(I,"'ol' block is not valid",!1),V.tag==="ul"&&!((W=s.options.block)!==null&&W!==void 0&&W.ul)&&x(I,"'ul' block is not valid",!1),V.tag==="li"&&!(($=s.options.block)!==null&&$!==void 0&&$.ul)&&!((K=s.options.block)!==null&&K!==void 0&&K.ol)&&x(I,"'li' tag is invalid since neither 'ul' nor 'ol' block is not valid",!1),V.tag==="a"&&!((H=s.options.inline)!==null&&H!==void 0&&H.a)&&x(I,"'a' inline is not valid",!1),V.tag==="img"){var R,j;if(!((R=s.options.inline)!==null&&R!==void 0&&R.img))x(I,"'img' inline is not valid",!1);else if((j=s.options.inline)!==null&&j!==void 0&&j.img){var D,z;if(!("src"in V))return B({},I,[{message:"Expected 'src' in 'img'",typeError:!0}]);var U=Or(I,"src"),G=ie((D=s.options.inline)===null||D===void 0?void 0:D.img)==="object"?(z=s.options.inline)===null||z===void 0?void 0:z.img.executeValidate(U,V.src):new J1({},!1,!1).executeValidate(U,V.src);if(G)for(var _e in G){var ke,Ve=_e;b[Ve]||(b[Ve]=[]),(ke=b[Ve]).push.apply(ke,me(G[Ve]))}}}if("styles"in V&&V.tag!=="span")return B({},I,[{message:"Cannot have styles on '".concat(V.tag,"'. This is only allowed on 'span'"),typeError:!0}]);if("styles"in V){if(!Array.isArray(V.styles))return B({},I,[{message:"Expected 'array', got '".concat(ie(V.styles),"'"),typeError:!0}]);for(var Z=Or(I,"styles"),J=0;J<V.styles.length;J++){var ce,Ne,he,Le=V.styles[J],Pe=Or(Z,J);if(typeof Le!="string")return B({},Pe,[{message:"Expected 'string', got '".concat(ie(Le),"'"),typeError:!0}]);Le==="bold"&&!((ce=s.options.style)!==null&&ce!==void 0&&ce.bold)&&x(Pe,"Style 'bold' is not valid",!1),Le==="italic"&&!((Ne=s.options.style)!==null&&Ne!==void 0&&Ne.italic)&&x(Pe,"Style 'italic' is not valid",!1),Le==="lineThrough"&&!((he=s.options.style)!==null&&he!==void 0&&he.lineThrough)&&x(Pe,"Style 'lineThrough' is not valid",!1)}}if("children"in V){if(!Array.isArray(V.children))return B({},I,[{message:"Expected 'array', got '".concat(ie(V.children),"'"),typeError:!0}]);for(var Je=V.children,gt=0;gt<Je.length;gt++){var Kt=Je[gt];if(ie(Kt)==="object"){var T=Or(I,"children"),k=l(T,[Kt],b);if(k)return k}else if(typeof Kt=="string"){a+=Kt.length;continue}else return B({},I,[{message:"Expected 'object' or 'string', got '".concat(ie(Kt),"'"),typeError:!0}])}}}}catch(E){w.e(E)}finally{w.f()}return!1},c=l(r,o,i),u=[];if(this.options.maxLength&&a>this.options.maxLength&&u.push({message:"Maximum length of ".concat(this.options.maxLength," exceeded (current length: ").concat(a,")"),typeError:!1}),this.options.minLength&&a<this.options.minLength&&u.push({message:"Minimum length of ".concat(this.options.minLength," not met (current length: ").concat(a,")"),typeError:!1}),c){if(u.length>0){var f;c[r]||(c[r]=[]),(f=c[r]).push.apply(f,u)}return c}if(Object.keys(i).length>0){if(u.length>0){var h;i[r]||(i[r]=[]),(h=i[r]).push.apply(h,u)}return i}return u.length>0?B({},r,u):!1}},{key:"executeAssert",value:function(r,o){if(this.opt&&o===null)return{success:!0,data:o};if(o===null&&!this.opt)return{success:!1,errors:B({},r,[{message:"Expected 'array', got 'null'",typeError:!0}])};if(!Array.isArray(o))return{success:!1,errors:B({},r,[{message:"Expected 'array', got '".concat(ie(o),"'"),typeError:!0}])};for(var i={},s=0;s<o.length;s++)this.recursiveAssert(Or(r,s),o[s],i);return Object.keys(i).length>0?{success:!1,errors:i}:{success:!0,data:o}}},{key:"recursiveAssert",value:function(r,o,i){if(ie(o)!=="object"){i[r]||(i[r]=[]),i[r].push({message:"Expected 'object', got '".concat(ie(o),"'"),typeError:!0});return}if(Array.isArray(o)){i[r]||(i[r]=[]),i[r].push({message:"Expected 'object', got 'array'",typeError:!0});return}if(o===null){i[r]||(i[r]=[]),i[r].push({message:"Expected 'object', got 'null'",typeError:!0});return}if("tag"in o&&typeof o.tag!="string"){i[r]||(i[r]=[]),i[r].push({message:"Expected 'string', got '".concat(ie(o.tag),"'"),typeError:!0});return}if("children"in o)if(Array.isArray(o.children))for(var s=0;s<o.children.length;s++){var a=o.children[s],l=Or(Or(r,"children"),s);if(ie(a)==="object")this.recursiveAssert(l,a,i);else{if(typeof a=="string")continue;i[l]||(i[l]=[]),i[l].push({message:"Expected 'object' or 'string', got '".concat(ie(a),"'"),typeError:!0})}}else{i[r]||(i[r]=[]),i[r].push({message:"Expected 'array', got '".concat(ie(o.children),"'"),typeError:!0});return}if("styles"in o)if(!Array.isArray(o.styles))i[r]||(i[r]=[]),i[r].push({message:"Expected 'array', got '".concat(ie(o.styles),"'"),typeError:!0});else for(var c=0;c<o.styles.length;c++){var u=o.styles[c];if(typeof u!="string"){var f=Or(r,c);i[f]||(i[f]=[]),i[f].push({message:"Expected 'string', got '".concat(ie(u),"'"),typeError:!0})}}}},{key:"nullable",value:function(){return new t(this.options,!0)}},{key:"executeSerialize",value:function(){var r,o={maxLength:this.options.maxLength,minLength:this.options.minLength,style:this.options.style,block:this.options.block,inline:this.options.inline&&{a:this.options.inline.a,img:this.options.inline.img&&ie(this.options.inline.img)==="object"?this.options.inline.img.executeSerialize():this.options.inline.img}};return{type:"richtext",opt:this.opt,options:o,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),O$=function(t){return new Kv(t??{})},Yh=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Rn(this,t),r=Zr(this,t),B(r,"renderInput",null),r.item=n,r.opt=o,r.customValidateFunctions=i,r.currentRouter=s,r}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.item,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this,s=!1,a=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});if(this.opt&&o==null)return a.length>0?B({},r,a):!1;if(o===null)return B({},r,[].concat(me(a),[{message:"Expected 'object', got 'null'"}]));if(ie(o)!=="object")return B({},r,[].concat(me(a),[{message:"Expected 'object', got '".concat(ie(o),"'")}]));if(Array.isArray(o))return B({},r,[].concat(me(a),[{message:"Expected 'object', got 'array'"}]));var l=this.getRouterValidations(r,o);if(l)return l;var c=gi(a),u;try{for(c.s();!(u=c.n()).done;){var f=u.value;s=this.appendValidationError(s,r,f.message,o,f.schemaError)}}catch(h){c.e(h)}finally{c.f()}return Object.entries(o).forEach(function(h){var p=jn(h,2),m=p[0],v=p[1],b=fu(r,m);if(!b)s=i.appendValidationError(s,r,"Internal error: could not create path at ".concat(!r&&typeof r=="string"?"<empty string>":r," at key ").concat(v),o);else{var x=i.item.executeValidate(b,v);x&&s?s=xt(xt({},x),s):x&&(s=x)}}),s}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:ie(o)!=="object"?{success:!1,errors:B({},r,[{message:"Expected 'object', got '".concat(ie(o),"'"),typeError:!0}])}:Array.isArray(o)?{success:!1,errors:B({},r,[{message:"Expected 'object', got 'array'",typeError:!0}])}:{success:!0,data:o}}},{key:"nullable",value:function(){return new t(this.item,!0)}},{key:"router",value:function(r){return new t(this.item,this.opt,this.customValidateFunctions,r)}},{key:"getRouterValidations",value:function(r,o){if(!this.currentRouter||o===null)return!1;var i=X1(r),s=jn(i,2),a=s[0],l=s[1];if(l)return B({},r,[{message:"This field was configured as a router, but it is not defined at the root of the module",schemaError:!0}]);var c=this.currentRouter.validate(a,Object.keys(o));return c.length>0?Object.fromEntries(c.map(function(u){if(!u.error.urlPath)return[r,[{message:"Router validation error: ".concat(u.error.message," has no url path"),schemaError:!0}]];var f=fu(r,u.error.urlPath);return f?[f,[{message:u.error.message}]]:[r,[{message:"Could not create path for router validation error",schemaError:!0}]]})):!1}},{key:"executeSerialize",value:function(){var r,o;return{type:"record",item:this.item.executeSerialize(),opt:this.opt,router:(r=this.currentRouter)===null||r===void 0?void 0:r.getRouterId(),customValidate:this.customValidateFunctions&&((o=this.customValidateFunctions)===null||o===void 0?void 0:o.length)>0}}},{key:"executeRender",value:function(r,o){var i={};if(o===null)return i;for(var s in o){var a=o[s];if(a!=null){var l=Or(r,s),c=this.item.executeRender(l,a);for(var u in c){var f=u;i[f]=c[f]}}}if(this.renderInput){var h=this.renderInput,p=h.select,m=h.layout;m!=="list"&&(i[r]={status:"error",message:"Unknown layout type: "+m});try{i[r]={status:"success",data:{layout:"list",parent:"record",items:Object.entries(o).map(function(v){var b=jn(v,2),x=b[0],w=b[1],S=p({key:x,val:w}),C=S.title,N=S.subtitle,P=S.image;return[x,{title:C,subtitle:N,image:P}]})}}}catch(v){i[r]={status:"error",message:v instanceof Error?v.message:"Unknown error"}}}return i}},{key:"render",value:function(r){return this.renderInput=r,this}}])}(eo),M$=function(t){return new Yh(t)};function R$(e){var t=e[b$],n=t;return n}function X1(e){var t=e.indexOf(ba);return t===-1?[e,""]:[e.slice(0,t),e.slice(t+ba.length)]}function TO(e,t){return t===""?e:"".concat(e).concat(ba).concat(t)}function OO(e){return e instanceof _l||ie(e)==="object"&&"type"in e&&e.type==="object"}function MO(e){return e instanceof Yh||ie(e)==="object"&&"type"in e&&e.type==="record"}function RO(e){return e instanceof Hv||ie(e)==="object"&&"type"in e&&e.type==="array"}function AO(e){return e instanceof jO||ie(e)==="object"&&"type"in e&&e.type==="union"}function IO(e){return e instanceof Kv||ie(e)==="object"&&"type"in e&&e.type==="richtext"}function DO(e){return e instanceof J1||ie(e)==="object"&&"type"in e&&e.type==="image"}function A$(e,t,n){for(var r=Xf(e),o=me(r),i=n,s=t,a=function(){var u=r.shift();if(u===void 0)throw Error("Unexpected undefined part");if(RO(i)){var f;if(Number.isNaN(Number(u)))throw Error("Invalid path: array schema ".concat(JSON.stringify(i)," must have a number as path, but got ").concat(u,". Path: ").concat(e));if(ie(s)!=="object"&&!Array.isArray(s))throw Error("Schema type error: expected source to be type of array, but got ".concat(ie(s)));s=s[u],i=i instanceof Hv?(f=i)===null||f===void 0?void 0:f.item:i.item}else if(MO(i)){var h;if(typeof u!="string")throw Error("Invalid path: record schema ".concat(i," must have path: ").concat(u," as string"));if(ie(s)!=="object"&&!Array.isArray(s))throw Error("Schema type error: expected source to be type of record, but got ".concat(ie(s)));if(!s[u])throw Error("Invalid path: record source did not have key ".concat(u," from path: ").concat(e));s=s[u],i=i instanceof Yh?(h=i)===null||h===void 0?void 0:h.item:i.item}else if(OO(i)){if(ie(s)!=="object")throw Error("Schema type error: expected source to be type of object, but got ".concat(ie(s)));if(s!==null&&s[u]===void 0)throw Error("Invalid path: object source did not have key ".concat(u," from path: ").concat(e));s=s===null?s:s[u],i=(i instanceof _l,i.items[u])}else{if(DO(i))return{v:{path:o.slice(0,o.length-r.length-1).map(function(w){return JSON.stringify(w)}).join("."),schema:i,source:s}};if(AO(i)){var p=i.key;if(typeof p!="string")return{v:{path:o.map(function(w){return Number.isNaN(Number(w))?JSON.stringify(w):w}).join("."),schema:i,source:s}};var m=s[p];if(!m)throw Error("Invalid path: union source ".concat(i," did not have required key ").concat(p," in path: ").concat(e));var v=i.items.find(function(w){var S;return(w==null||(S=w.items)===null||S===void 0||(S=S[p])===null||S===void 0?void 0:S.value)===m});if(!v)throw Error("Invalid path: union schema ".concat(i," did not have a child object with ").concat(p," of value ").concat(m," in path: ").concat(e));i=v.items[u],s=s[u]}else if(IO(i)){if("src"in s&&"tag"in s&&s.tag==="img"&&r.length===0){var b,x;i=i instanceof Kv&&(b=i.options)!==null&&b!==void 0&&(b=b.inline)!==null&&b!==void 0&&b.img&&typeof((x=i.options)===null||x===void 0||(x=x.inline)===null||x===void 0?void 0:x.img)!="boolean"?i.options.inline.img:i}s=s[u]}else throw Error("Invalid path: ".concat(u," resolved to an unexpected schema ").concat(JSON.stringify(i)))}},l;r.length>0;)if(l=a(),l)return l.v;if(r.length>0)throw Error("Invalid path: ".concat(r.join(".")," is not a valid path"));return{path:o.map(function(c){return Number.isNaN(Number(c))?JSON.stringify(c):c}).join("."),schema:i,source:s}}function I$(e,t,n){for(var r=Xf(e),o=me(r),i=n,s=t,a=function(){var u=r.shift();if(u===void 0)return{v:{status:"error",message:"Unexpected undefined part"}};if(RO(i)){var f;if(Number.isNaN(Number(u)))return{v:{status:"error",message:"Invalid path: array schema ".concat(JSON.stringify(i)," must have a number as path, but got ").concat(u,". Path: ").concat(e)}};if(s===void 0)return{v:{status:"source-undefined",path:o.slice(0,o.length-r.length-1).map(function(w){return JSON.stringify(w)}).join(".")}};if(ie(s)!=="object"&&!Array.isArray(s))return{v:{status:"error",message:"Schema type error: expected source to be type of array, but got ".concat(ie(s))}};s=s[u],i=i instanceof Hv?(f=i)===null||f===void 0?void 0:f.item:i.item}else if(MO(i)){var h;if(typeof u!="string")return{v:{status:"error",message:"Invalid path: record schema ".concat(i," must have path: ").concat(u," as string")}};if(s===void 0)return{v:{status:"source-undefined",path:o.slice(0,o.length-r.length-1).map(function(w){return JSON.stringify(w)}).join(".")}};if(ie(s)!=="object"&&!Array.isArray(s))return{v:{status:"error",message:"Schema type error: expected source to be type of record, but got ".concat(ie(s))}};if(!s[u])return{v:{status:"error",message:"Invalid path: record source did not have key ".concat(u," from path: ").concat(e)}};s=s[u],i=i instanceof Yh?(h=i)===null||h===void 0?void 0:h.item:i.item}else if(OO(i)){if(s===void 0)return{v:{status:"source-undefined",path:o.slice(0,o.length-r.length-1).map(function(w){return JSON.stringify(w)}).join(".")}};if(ie(s)!=="object")return{v:{status:"error",message:"Schema type error: expected source to be type of object, but got ".concat(ie(s))}};if(s!==null&&s[u]===void 0)return{v:{status:"error",message:"Invalid path: object source did not have key ".concat(u," from path: ").concat(e)}};s=s===null?s:s[u],i=(i instanceof _l,i.items[u])}else{if(DO(i))return{v:{status:"ok",path:o.slice(0,o.length-r.length-1).map(function(w){return JSON.stringify(w)}).join("."),schema:i,source:s}};if(AO(i)){var p=i.key;if(typeof p!="string")return{v:{status:"ok",path:o.map(function(w){return Number.isNaN(Number(w))?JSON.stringify(w):w}).join("."),schema:i,source:s}};var m=s[p];if(!m)return{v:{status:"error",message:"Invalid path: union source ".concat(i," did not have required key ").concat(p," in path: ").concat(e)}};var v=i.items.find(function(w){var S;return(w==null||(S=w.items)===null||S===void 0||(S=S[p])===null||S===void 0?void 0:S.value)===m});if(!v)return{v:{status:"error",message:"Invalid path: union schema ".concat(i," did not have a child object with ").concat(p," of value ").concat(m," in path: ").concat(e)}};i=v.items[u],s=s[u]}else if(IO(i)){if("src"in s&&"tag"in s&&s.tag==="img"&&r.length===0){var b,x;i=i instanceof Kv&&(b=i.options)!==null&&b!==void 0&&(b=b.inline)!==null&&b!==void 0&&b.img&&typeof((x=i.options)===null||x===void 0||(x=x.inline)===null||x===void 0?void 0:x.img)!="boolean"?i.options.inline.img:i}s=s[u]}else return{v:{status:"error",message:"Invalid path: ".concat(u," resolved to an unexpected schema ").concat(JSON.stringify(i))}}}},l;r.length>0;)if(l=a(),l)return l.v;return r.length>0?{status:"error",message:"Invalid path: ".concat(r.join(".")," is not a valid path")}:{status:"ok",path:o.map(function(c){return Number.isNaN(Number(c))?JSON.stringify(c):c}).join("."),schema:i,source:s}}function D$(e){var t=e.split("/").slice(1);return t}function Xf(e){for(var t=[],n=0;n<e.length;){var r="";if(e[n]==='"'){for(n++;n<e.length&&e[n]!=='"';)e[n]==="\\"&&e[n+1]==='"'?(r+='"',n++):r+=e[n],n++;if(e[n]!=='"'){var o;throw new Error("Invalid input (".concat(JSON.stringify(e),"): Missing closing double quote: ").concat((o=e[n])!==null&&o!==void 0?o:"at end of string"," (char: ").concat(n,"; length: ").concat(e.length,")"))}}else for(;n<e.length&&e[n]!==".";)r+=e[n],n++;r!==""&&t.push(r),n++}return t}function L$(e){return e.split(",")}function F$(e){var t=X1(e),n=jn(t,2),r=n[0],o=n[1],i=Xf(o).slice(0,-1);return i.length>0?TO(r,LO(i)):r}function LO(e){return e.map(function(t){return Number.isInteger(Number(t))?t:JSON.stringify(t)}).join(".")}var z$=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Rn(this,t),r=Zr(this,t),r.options=n,r.opt=o,r.customValidateFunctions=i,r}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.options,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i,s,a=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});return this.opt&&o==null?a.length>0?B({},r,a):!1:typeof o!="number"?B({},r,[].concat(me(a),[{message:"Expected 'number', got '".concat(ie(o),"'"),value:o}])):(i=this.options)!==null&&i!==void 0&&i.max&&o>this.options.max?B({},r,[].concat(me(a),[{message:"Expected 'number' less than ".concat(this.options.max),value:o}])):(s=this.options)!==null&&s!==void 0&&s.min&&o<this.options.min?B({},r,[].concat(me(a),[{message:"Expected 'number' greater than ".concat(this.options.min),value:o}])):a.length>0?B({},r,a):!1}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'number', got 'null'",typeError:!0}])}:typeof o=="number"?{success:!0,data:o}:{success:!1,errors:B({},r,[{message:"Expected 'number', got '".concat(ie(o),"'"),typeError:!0}])}}},{key:"nullable",value:function(){return new t(this.options,!0)}},{key:"max",value:function(r){return new t(xt(xt({},this.options),{},{max:r}),this.opt)}},{key:"min",value:function(r){return new t(xt(xt({},this.options),{},{min:r}),this.opt)}},{key:"executeSerialize",value:function(){var r;return{type:"number",options:this.options,opt:this.opt,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),$$=function(t){return new z$(t)},B$=function(e){function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Rn(this,t),n=Zr(this,t),n.opt=r,n.customValidateFunctions=o,n}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){return this.opt&&o==null?!1:typeof o!="boolean"?B({},r,[{message:"Expected 'boolean', got '".concat(ie(o),"'"),value:o}]):!1}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'boolean', got 'null'",typeError:!0}])}:typeof o!="boolean"?{success:!1,errors:B({},r,[{message:"Expected 'boolean', got '".concat(ie(o),"'"),typeError:!0}])}:{success:!0,data:o}}},{key:"nullable",value:function(){return new t(!0)}},{key:"executeSerialize",value:function(){var r;return{type:"boolean",opt:this.opt,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),V$=function(){return new B$},U$=function(e){function t(n,r){var o,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];return Rn(this,t),o=Zr(this,t),o.schema=n,o.sourcePath=r,o.opt=i,o.customValidateFunctions=s,o}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.schema,this.sourcePath,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i=this.executeCustomValidateFunctions(o,this.customValidateFunctions,{path:r});if(this.opt&&o==null)return i.length>0?B({},r,i):!1;if(!this.schema)return B({},r,[].concat(me(i),[{message:"Schema not found for module. keyOf must be used with a Val Module"}]));var s=this.schema;if(!(s.type==="object"||s.type==="record"))return B({},r,[].concat(me(i),[{message:"Schema in keyOf must be an 'object' or 'record'. Found '".concat(s.type||"unknown","'")}]));if(s.opt&&o==null)return!1;if(s.type==="record"&&typeof o!="string")return B({},r,[].concat(me(i),[{message:"Type of value in keyof (record) must be 'string'"}]));if(s.type==="object"){var a=s.keys;if(!a.includes(o))return B({},r,[].concat(me(i),[{message:"Value of keyOf (object) must be: ".concat(a.join(", "),". Found: ").concat(o)}]))}return s.type==="record"?typeof o!="string"?B({},r,[].concat(me(i),[{message:"Value of keyOf (record) must be 'string'. Found: ".concat(ie(o))}])):B({},r,[].concat(me(i),[{fixes:["keyof:check-keys"],message:"Did not validate keyOf (record). This error (keyof:check-keys) should typically be processed by Val internally. Seeing this error most likely means you have a Val version mismatch.",value:{key:o,sourcePath:this.sourcePath}}])):i.length>0?B({},r,i):!1}},{key:"executeAssert",value:function(r,o){if(this.opt&&o===null)return{success:!0,data:o};if(o===null)return{success:!1,errors:B({},r,[{message:"Expected 'string', got 'null'",typeError:!0}])};var i=this.schema;if(!i)return{success:!1,errors:B({},r,[{message:"Neither key nor schema was found. keyOf is missing an argument.",typeError:!0}])};var s=i;if(!(s.type==="object"||s.type==="record"))return{success:!1,errors:B({},r,[{message:"Schema of first argument must be either: 'array', 'object' or 'record'. Found '".concat(s.type||"unknown","'"),typeError:!0}])};if(s.type==="record"&&typeof o!="string")return{success:!1,errors:B({},r,[{message:"Value of keyOf (record) must be 'string', got '".concat(ie(o),"'"),typeError:!0}])};if(s.type==="object"){var a=s.keys;if(!a.includes(o))return{success:!1,errors:B({},r,[{message:"Value of keyOf (object) must be: ".concat(a.join(", "),". Found: ").concat(o),typeError:!0}])}}return{success:!0,data:o}}},{key:"nullable",value:function(){return new t(this.schema,this.sourcePath,!0)}},{key:"executeSerialize",value:function(){var r,o=this.sourcePath;if(!o)throw new Error("Cannot serialize keyOf schema with empty selector. TIP: keyOf must be used with a Val Module of record schema.");var i=this.schema;if(!i)throw new Error("Cannot serialize keyOf schema with empty selector.");var s;switch(i.type){case"record":s="string";break;case"object":s=i.keys;break;default:throw new Error("Cannot serialize keyOf schema with selector of type '".concat(i.type||"unknown","'"))}return{type:"keyOf",path:o,schema:i,opt:this.opt,values:s,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),W$=function(t){var n=t==null?void 0:t[EO],r=void 0;if(n instanceof _l){var o=[];try{o=Object.keys((n==null?void 0:n.items)||{})}catch{}r={type:"object",keys:o,opt:n==null?void 0:n.opt}}else n instanceof Yh&&(r={type:"record",opt:n==null?void 0:n.opt});return new U$(r,NO(t))},H$=function(e){function t(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Rn(this,t),r=Zr(this,t),r.options=n,r.opt=o,r.customValidateFunctions=i,r}return Qr(t,e),An(t,[{key:"validate",value:function(r){return new t(this.options,this.opt,[].concat(me(this.customValidateFunctions),[r]))}},{key:"executeValidate",value:function(r,o){var i,s,a,l;if(this.opt&&o==null)return!1;if(typeof o!="string")return B({},r,[{message:"Expected 'string', got '".concat(ie(o),"'"),value:o}]);if((i=this.options)!==null&&i!==void 0&&i.from&&(s=this.options)!==null&&s!==void 0&&s.to){if(this.options.from>this.options.to)return B({},r,[{message:"From date ".concat(this.options.from," is after to date ").concat(this.options.to),value:o,typeError:!0}]);if(o<this.options.from||o>this.options.to)return B({},r,[{message:"Date is not between ".concat(this.options.from," and ").concat(this.options.to),value:o}])}else if((a=this.options)!==null&&a!==void 0&&a.from){if(o<this.options.from)return B({},r,[{message:"Date is before the minimum date ".concat(this.options.from),value:o}])}else if((l=this.options)!==null&&l!==void 0&&l.to&&o>this.options.to)return B({},r,[{message:"Date is after the maximum date ".concat(this.options.to),value:o}]);return!1}},{key:"executeAssert",value:function(r,o){return this.opt&&o===null?{success:!0,data:o}:o===null?{success:!1,errors:B({},r,[{message:"Expected 'string', got 'null'",typeError:!0}])}:typeof o!="string"?{success:!1,errors:B({},r,[{message:"Expected 'string', got '".concat(ie(o),"'"),typeError:!0}])}:{success:!0,data:o}}},{key:"from",value:function(r){return new t(xt(xt({},this.options),{},{from:r}),this.opt)}},{key:"to",value:function(r){return new t(xt(xt({},this.options),{},{to:r}),this.opt)}},{key:"nullable",value:function(){return new t(this.options,!0)}},{key:"executeSerialize",value:function(){var r;return{type:"date",opt:this.opt,options:this.options,customValidate:this.customValidateFunctions&&((r=this.customValidateFunctions)===null||r===void 0?void 0:r.length)>0}}},{key:"executeRender",value:function(){return{}}}])}(eo),K$=function(t){return new H$(t)};function G$(){return{string:PO,boolean:V$,array:P$,object:_O,number:$$,union:j$,richtext:O$,image:T$,literal:_$,keyOf:W$,record:M$,file:k$,date:K$}}function q$(e,t){var n=t.publicProjectId,r=t.coreVersion,o=t.validationHash,i=t.fileHash,s=t.filePath,a=t.bucket;return"".concat(e,"/file/p/").concat(n,"/b/").concat(a,"/v/").concat(r,"/h/").concat(o,"/f/").concat(i,"/p/").concat(s)}var Y$=/^(https?:\/\/[^/]+)\/file\/p\/([^/]+)\/b\/([^/]+)\/v\/([^/]+)\/h\/([^/]+)\/f\/([^/]+)\/p\/(.+)$/;function FO(e){var t=e.match(Y$);return t?t[7].indexOf("public/val/")!==0?{status:"error",error:"Invalid remote ref: "+e}:{status:"success",remoteHost:t[1],projectId:t[2],bucket:t[3],version:t[4],validationHash:t[5],fileHash:t[6],filePath:t[7]}:{status:"error",error:"Invalid remote ref: "+e}}var BC="https://remote.val.build";function J$(e){if(e!=null&&e.patch_id){var t=FO(e[bt]);if(t.status==="success")return{url:"/api/val/files/"+t.filePath+"?patch_id=".concat(e.patch_id,"&remote=true&ref=").concat(encodeURIComponent(e[bt])),metadata:e.metadata};console.warn("Internal Val error: failed to split remote ref: ".concat(e[bt],". The data format is different than what is expected. Check Val versions for mismatches."),t.error)}return{url:e[bt],metadata:e.metadata}}var Hr=An(function e(t){Rn(this,e),this.message=t}),X$=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],vt=function(e){return e[e.inputBytes=64]="inputBytes",e[e.inputWords=16]="inputWords",e[e.highIndex=14]="highIndex",e[e.lowIndex=15]="lowIndex",e[e.workWords=64]="workWords",e[e.allocBytes=80]="allocBytes",e[e.allocWords=20]="allocWords",e[e.allocTotal=8e3]="allocTotal",e}(vt||{});function Z$(e){return new Q$}var Q$=function(){function e(){Rn(this,e),B(this,"A",1779033703),B(this,"B",-1150833019),B(this,"C",1013904242),B(this,"D",-1521486534),B(this,"E",1359893119),B(this,"F",-1694144372),B(this,"G",528734635),B(this,"H",1541459225),B(this,"_size",0),B(this,"_sp",0),(!qp||wd>=vt.allocTotal)&&(qp=new ArrayBuffer(vt.allocTotal),wd=0),this._byte=new Uint8Array(qp,wd,vt.allocBytes),this._word=new Int32Array(qp,wd,vt.allocWords),wd+=vt.allocBytes}return An(e,[{key:"update",value:function(n){if(typeof n=="string")return this._utf8(n);if(n==null)throw new TypeError("Invalid type: "+ie(n));var r=n.byteOffset,o=n.byteLength,i=o/vt.inputBytes|0,s=0;if(i&&!(r&3)&&!(this._size%vt.inputBytes)){for(var a=new Int32Array(n.buffer,r,i*vt.inputWords);i--;)this._int32(a,s>>2),s+=vt.inputBytes;this._size+=s}var l=n.BYTES_PER_ELEMENT;if(l!==1&&n.buffer){var c=new Uint8Array(n.buffer,r+s,o-s);return this._uint8(c)}return s===o?this:this._uint8(n,s)}},{key:"_uint8",value:function(n,r){var o=this._byte,i=this._word,s=n.length;for(r=r|0;r<s;){for(var a=this._size%vt.inputBytes,l=a;r<s&&l<vt.inputBytes;)o[l++]=n[r++];l>=vt.inputBytes&&this._int32(i),this._size+=l-a}return this}},{key:"_utf8",value:function(n){for(var r=this._byte,o=this._word,i=n.length,s=this._sp,a=0;a<i;){for(var l=this._size%vt.inputBytes,c=l;a<i&&c<vt.inputBytes;){var u=n.charCodeAt(a++)|0;u<128?r[c++]=u:u<2048?(r[c++]=192|u>>>6,r[c++]=128|u&63):u<55296||u>57343?(r[c++]=224|u>>>12,r[c++]=128|u>>>6&63,r[c++]=128|u&63):s?(u=((s&1023)<<10)+(u&1023)+65536,r[c++]=240|u>>>18,r[c++]=128|u>>>12&63,r[c++]=128|u>>>6&63,r[c++]=128|u&63,s=0):s=u}c>=vt.inputBytes&&(this._int32(o),o[0]=o[vt.inputWords]),this._size+=c-l}return this._sp=s,this}},{key:"_int32",value:function(n,r){var o=this.A,i=this.B,s=this.C,a=this.D,l=this.E,c=this.F,u=this.G,f=this.H,h=0;for(r=r|0;h<vt.inputWords;)qa[h++]=_o(n[r++]);for(h=vt.inputWords;h<vt.workWords;h++)qa[h]=a6(qa[h-2])+qa[h-7]+s6(qa[h-15])+qa[h-16]|0;for(h=0;h<vt.workWords;h++){var p=f+i6(l)+n6(l,c,u)+X$[h]+qa[h]|0,m=o6(o)+r6(o,i,s)|0;f=u,u=c,c=l,l=a+p|0,a=s,s=i,i=o,o=p+m|0}this.A=o+this.A|0,this.B=i+this.B|0,this.C=s+this.C|0,this.D=a+this.D|0,this.E=l+this.E|0,this.F=c+this.F|0,this.G=u+this.G|0,this.H=f+this.H|0}},{key:"digest",value:function(n){var r=this._byte,o=this._word,i=this._size%vt.inputBytes|0;for(r[i++]=128;i&3;)r[i++]=0;if(i>>=2,i>vt.highIndex){for(;i<vt.inputWords;)o[i++]=0;i=0,this._int32(o)}for(;i<vt.inputWords;)o[i++]=0;var s=this._size*8,a=(s&4294967295)>>>0,l=(s-a)/4294967296;return l&&(o[vt.highIndex]=_o(l)),a&&(o[vt.lowIndex]=_o(a)),this._int32(o),n==="hex"?this._hex():this._bin()}},{key:"_hex",value:function(){var n=this.A,r=this.B,o=this.C,i=this.D,s=this.E,a=this.F,l=this.G,c=this.H;return Es(n)+Es(r)+Es(o)+Es(i)+Es(s)+Es(a)+Es(l)+Es(c)}},{key:"_bin",value:function(){var n=this.A,r=this.B,o=this.C,i=this.D,s=this.E,a=this.F,l=this.G,c=this.H,u=this._byte,f=this._word;return f[0]=_o(n),f[1]=_o(r),f[2]=_o(o),f[3]=_o(i),f[4]=_o(s),f[5]=_o(a),f[6]=_o(l),f[7]=_o(c),u.slice(0,32)}}])}(),qa=new Int32Array(vt.workWords),qp,wd=0,Es=function(t){return(t+4294967296).toString(16).substr(-8)},e6=function(t){return t<<24&4278190080|t<<8&16711680|t>>8&65280|t>>24&255},t6=function(t){return t},_o=l6()?t6:e6,n6=function(t,n,r){return r^t&(n^r)},r6=function(t,n,r){return t&n|r&(t|n)},o6=function(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)},i6=function(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)},s6=function(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3},a6=function(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10};function l6(){var e=new Uint8Array(new Uint16Array([65279]).buffer);return e[0]===254}var Z1=function(t){return Z$().update(t).digest("hex")},Q1={x3d:"application/vnd.hzn-3d-crossword","3gp":"video/3gpp","3g2":"video/3gpp2",mseq:"application/vnd.mseq",pwn:"application/vnd.3m.post-it-notes",plb:"application/vnd.3gpp.pic-bw-large",psb:"application/vnd.3gpp.pic-bw-small",pvb:"application/vnd.3gpp.pic-bw-var",tcap:"application/vnd.3gpp2.tcap","7z":"application/x-7z-compressed",abw:"application/x-abiword",ace:"application/x-ace-compressed",acc:"application/vnd.americandynamics.acc",acu:"application/vnd.acucobol",atc:"application/vnd.acucorp",adp:"audio/adpcm",aab:"application/x-authorware-bin",aam:"application/x-authorware-map",aas:"application/x-authorware-seg",air:"application/vnd.adobe.air-application-installer-package+zip",avif:"image/avif",swf:"application/x-shockwave-flash",fxp:"application/vnd.adobe.fxp",pdf:"application/pdf",ppd:"application/vnd.cups-ppd",dir:"application/x-director",xdp:"application/vnd.adobe.xdp+xml",xfdf:"application/vnd.adobe.xfdf",aac:"audio/x-aac",ahead:"application/vnd.ahead.space",azf:"application/vnd.airzip.filesecure.azf",azs:"application/vnd.airzip.filesecure.azs",azw:"application/vnd.amazon.ebook",ami:"application/vnd.amiga.ami","N/A":"application/andrew-inset",apk:"application/vnd.android.package-archive",cii:"application/vnd.anser-web-certificate-issue-initiation",fti:"application/vnd.anser-web-funds-transfer-initiation",atx:"application/vnd.antix.game-component",dmg:"application/x-apple-diskimage",mpkg:"application/vnd.apple.installer+xml",aw:"application/applixware",mp3:"audio/mpeg",les:"application/vnd.hhe.lesson-player",swi:"application/vnd.aristanetworks.swi",s:"text/x-asm",atomcat:"application/atomcat+xml",atomsvc:"application/atomsvc+xml",atom:"application/atom+xml",ac:"application/pkix-attr-cert",aif:"audio/x-aiff",avi:"video/x-msvideo",aep:"application/vnd.audiograph",dxf:"image/vnd.dxf",dwf:"model/vnd.dwf",par:"text/plain-bas",bcpio:"application/x-bcpio",bin:"application/octet-stream",bmp:"image/bmp",torrent:"application/x-bittorrent",cod:"application/vnd.rim.cod",mpm:"application/vnd.blueice.multipass",bmi:"application/vnd.bmi",sh:"application/x-sh",btif:"image/prs.btif",rep:"application/vnd.businessobjects",bz:"application/x-bzip",bz2:"application/x-bzip2",csh:"application/x-csh",c:"text/x-c",cdxml:"application/vnd.chemdraw+xml",css:"text/css",cdx:"chemical/x-cdx",cml:"chemical/x-cml",csml:"chemical/x-csml",cdbcmsg:"application/vnd.contact.cmsg",cla:"application/vnd.claymore",c4g:"application/vnd.clonk.c4group",sub:"image/vnd.dvb.subtitle",cdmia:"application/cdmi-capability",cdmic:"application/cdmi-container",cdmid:"application/cdmi-domain",cdmio:"application/cdmi-object",cdmiq:"application/cdmi-queue",c11amc:"application/vnd.cluetrust.cartomobile-config",c11amz:"application/vnd.cluetrust.cartomobile-config-pkg",ras:"image/x-cmu-raster",dae:"model/vnd.collada+xml",csv:"text/csv",cpt:"application/mac-compactpro",wmlc:"application/vnd.wap.wmlc",cgm:"image/cgm",ice:"x-conference/x-cooltalk",cmx:"image/x-cmx",xar:"application/vnd.xara",cmc:"application/vnd.cosmocaller",cpio:"application/x-cpio",clkx:"application/vnd.crick.clicker",clkk:"application/vnd.crick.clicker.keyboard",clkp:"application/vnd.crick.clicker.palette",clkt:"application/vnd.crick.clicker.template",clkw:"application/vnd.crick.clicker.wordbank",wbs:"application/vnd.criticaltools.wbs+xml",cryptonote:"application/vnd.rig.cryptonote",cif:"chemical/x-cif",cmdf:"chemical/x-cmdf",cu:"application/cu-seeme",cww:"application/prs.cww",curl:"text/vnd.curl",dcurl:"text/vnd.curl.dcurl",mcurl:"text/vnd.curl.mcurl",scurl:"text/vnd.curl.scurl",car:"application/vnd.curl.car",pcurl:"application/vnd.curl.pcurl",cmp:"application/vnd.yellowriver-custom-menu",dssc:"application/dssc+der",xdssc:"application/dssc+xml",deb:"application/x-debian-package",uva:"audio/vnd.dece.audio",uvi:"image/vnd.dece.graphic",uvh:"video/vnd.dece.hd",uvm:"video/vnd.dece.mobile",uvu:"video/vnd.uvvu.mp4",uvp:"video/vnd.dece.pd",uvs:"video/vnd.dece.sd",uvv:"video/vnd.dece.video",dvi:"application/x-dvi",seed:"application/vnd.fdsn.seed",dtb:"application/x-dtbook+xml",res:"application/x-dtbresource+xml",ait:"application/vnd.dvb.ait",svc:"application/vnd.dvb.service",eol:"audio/vnd.digital-winds",djvu:"image/vnd.djvu",dtd:"application/xml-dtd",mlp:"application/vnd.dolby.mlp",wad:"application/x-doom",dpg:"application/vnd.dpgraph",dra:"audio/vnd.dra",dfac:"application/vnd.dreamfactory",dts:"audio/vnd.dts",dtshd:"audio/vnd.dts.hd",dwg:"image/vnd.dwg",geo:"application/vnd.dynageo",es:"application/ecmascript",mag:"application/vnd.ecowin.chart",mmr:"image/vnd.fujixerox.edmics-mmr",rlc:"image/vnd.fujixerox.edmics-rlc",exi:"application/exi",mgz:"application/vnd.proteus.magazine",epub:"application/epub+zip",eml:"message/rfc822",nml:"application/vnd.enliven",xpr:"application/vnd.is-xpr",xif:"image/vnd.xiff",xfdl:"application/vnd.xfdl",emma:"application/emma+xml",ez2:"application/vnd.ezpix-album",ez3:"application/vnd.ezpix-package",fst:"image/vnd.fst",fvt:"video/vnd.fvt",fbs:"image/vnd.fastbidsheet",fe_launch:"application/vnd.denovo.fcselayout-link",f4v:"video/x-f4v",flv:"video/x-flv",fpx:"image/vnd.fpx",npx:"image/vnd.net-fpx",flx:"text/vnd.fmi.flexstor",fli:"video/x-fli",ftc:"application/vnd.fluxtime.clip",fdf:"application/vnd.fdf",f:"text/x-fortran",mif:"application/vnd.mif",fm:"application/vnd.framemaker",fh:"image/x-freehand",fsc:"application/vnd.fsc.weblaunch",fnc:"application/vnd.frogans.fnc",ltf:"application/vnd.frogans.ltf",ddd:"application/vnd.fujixerox.ddd",xdw:"application/vnd.fujixerox.docuworks",xbd:"application/vnd.fujixerox.docuworks.binder",oas:"application/vnd.fujitsu.oasys",oa2:"application/vnd.fujitsu.oasys2",oa3:"application/vnd.fujitsu.oasys3",fg5:"application/vnd.fujitsu.oasysgp",bh2:"application/vnd.fujitsu.oasysprs",spl:"application/x-futuresplash",fzs:"application/vnd.fuzzysheet",g3:"image/g3fax",gmx:"application/vnd.gmx",gtw:"model/vnd.gtw",txd:"application/vnd.genomatix.tuxedo",ggb:"application/vnd.geogebra.file",ggt:"application/vnd.geogebra.tool",gdl:"model/vnd.gdl",gex:"application/vnd.geometry-explorer",gxt:"application/vnd.geonext",g2w:"application/vnd.geoplan",g3w:"application/vnd.geospace",gsf:"application/x-font-ghostscript",bdf:"application/x-font-bdf",gtar:"application/x-gtar",texinfo:"application/x-texinfo",gnumeric:"application/x-gnumeric",kml:"application/vnd.google-earth.kml+xml",kmz:"application/vnd.google-earth.kmz",gqf:"application/vnd.grafeq",gif:"image/gif",gv:"text/vnd.graphviz",gac:"application/vnd.groove-account",ghf:"application/vnd.groove-help",gim:"application/vnd.groove-identity-message",grv:"application/vnd.groove-injector",gtm:"application/vnd.groove-tool-message",tpl:"application/vnd.groove-tool-template",vcg:"application/vnd.groove-vcard",h261:"video/h261",h263:"video/h263",h264:"video/h264",hpid:"application/vnd.hp-hpid",hps:"application/vnd.hp-hps",hdf:"application/x-hdf",rip:"audio/vnd.rip",hbci:"application/vnd.hbci",jlt:"application/vnd.hp-jlyt",pcl:"application/vnd.hp-pcl",hpgl:"application/vnd.hp-hpgl",hvs:"application/vnd.yamaha.hv-script",hvd:"application/vnd.yamaha.hv-dic",hvp:"application/vnd.yamaha.hv-voice","sfd-hdstx":"application/vnd.hydrostatix.sof-data",stk:"application/hyperstudio",hal:"application/vnd.hal+xml",html:"text/html",irm:"application/vnd.ibm.rights-management",sc:"application/vnd.ibm.secure-container",ics:"text/calendar",icc:"application/vnd.iccprofile",ico:"image/x-icon",igl:"application/vnd.igloader",ief:"image/ief",ivp:"application/vnd.immervision-ivp",ivu:"application/vnd.immervision-ivu",rif:"application/reginfo+xml","3dml":"text/vnd.in3d.3dml",spot:"text/vnd.in3d.spot",igs:"model/iges",i2g:"application/vnd.intergeo",cdy:"application/vnd.cinderella",xpw:"application/vnd.intercon.formnet",fcs:"application/vnd.isac.fcs",ipfix:"application/ipfix",cer:"application/pkix-cert",pki:"application/pkixcmp",crl:"application/pkix-crl",pkipath:"application/pkix-pkipath",igm:"application/vnd.insors.igm",rcprofile:"application/vnd.ipunplugged.rcprofile",irp:"application/vnd.irepository.package+xml",jad:"text/vnd.sun.j2me.app-descriptor",jar:"application/java-archive",class:"application/java-vm",jnlp:"application/x-java-jnlp-file",ser:"application/java-serialized-object",java:"text/x-java-source,java",js:"application/javascript",json:"application/json",joda:"application/vnd.joost.joda-archive",jpm:"video/jpm",jpeg:"image/jpeg",jpg:"image/jpeg",pjpeg:"image/pjpeg",jpgv:"video/jpeg",ktz:"application/vnd.kahootz",mmd:"application/vnd.chipnuts.karaoke-mmd",karbon:"application/vnd.kde.karbon",chrt:"application/vnd.kde.kchart",kfo:"application/vnd.kde.kformula",flw:"application/vnd.kde.kivio",kon:"application/vnd.kde.kontour",kpr:"application/vnd.kde.kpresenter",ksp:"application/vnd.kde.kspread",kwd:"application/vnd.kde.kword",htke:"application/vnd.kenameaapp",kia:"application/vnd.kidspiration",kne:"application/vnd.kinar",sse:"application/vnd.kodak-descriptor",lasxml:"application/vnd.las.las+xml",latex:"application/x-latex",lbd:"application/vnd.llamagraphics.life-balance.desktop",lbe:"application/vnd.llamagraphics.life-balance.exchange+xml",jam:"application/vnd.jam",123:"application/vnd.lotus-1-2-3",apr:"application/vnd.lotus-approach",pre:"application/vnd.lotus-freelance",nsf:"application/vnd.lotus-notes",org:"application/vnd.lotus-organizer",scm:"application/vnd.lotus-screencam",lwp:"application/vnd.lotus-wordpro",lvp:"audio/vnd.lucent.voice",m3u:"audio/x-mpegurl",m4v:"video/x-m4v",hqx:"application/mac-binhex40",portpkg:"application/vnd.macports.portpkg",mgp:"application/vnd.osgeo.mapguide.package",mrc:"application/marc",mrcx:"application/marcxml+xml",mxf:"application/mxf",nbp:"application/vnd.wolfram.player",ma:"application/mathematica",mathml:"application/mathml+xml",mbox:"application/mbox",mc1:"application/vnd.medcalcdata",mscml:"application/mediaservercontrol+xml",cdkey:"application/vnd.mediastation.cdkey",mwf:"application/vnd.mfer",mfm:"application/vnd.mfmp",msh:"model/mesh",mads:"application/mads+xml",mets:"application/mets+xml",mods:"application/mods+xml",meta4:"application/metalink4+xml",mcd:"application/vnd.mcd",flo:"application/vnd.micrografx.flo",igx:"application/vnd.micrografx.igx",es3:"application/vnd.eszigno3+xml",mdb:"application/x-msaccess",asf:"video/x-ms-asf",exe:"application/x-msdownload",cil:"application/vnd.ms-artgalry",cab:"application/vnd.ms-cab-compressed",ims:"application/vnd.ms-ims",application:"application/x-ms-application",clp:"application/x-msclip",mdi:"image/vnd.ms-modi",eot:"application/vnd.ms-fontobject",xls:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xltm:"application/vnd.ms-excel.template.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",chm:"application/vnd.ms-htmlhelp",crd:"application/x-mscardfile",lrm:"application/vnd.ms-lrm",mvb:"application/x-msmediaview",mny:"application/x-msmoney",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",sldx:"application/vnd.openxmlformats-officedocument.presentationml.slide",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",potx:"application/vnd.openxmlformats-officedocument.presentationml.template",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",obd:"application/x-msbinder",thmx:"application/vnd.ms-officetheme",onetoc:"application/onenote",pya:"audio/vnd.ms-playready.media.pya",pyv:"video/vnd.ms-playready.media.pyv",ppt:"application/vnd.ms-powerpoint",ppam:"application/vnd.ms-powerpoint.addin.macroenabled.12",sldm:"application/vnd.ms-powerpoint.slide.macroenabled.12",pptm:"application/vnd.ms-powerpoint.presentation.macroenabled.12",ppsm:"application/vnd.ms-powerpoint.slideshow.macroenabled.12",potm:"application/vnd.ms-powerpoint.template.macroenabled.12",mpp:"application/vnd.ms-project",pub:"application/x-mspublisher",scd:"application/x-msschedule",xap:"application/x-silverlight-app",stl:"application/vnd.ms-pki.stl",cat:"application/vnd.ms-pki.seccat",vsd:"application/vnd.visio",vsdx:"application/vnd.visio2013",wm:"video/x-ms-wm",wma:"audio/x-ms-wma",wax:"audio/x-ms-wax",wmx:"video/x-ms-wmx",wmd:"application/x-ms-wmd",wpl:"application/vnd.ms-wpl",wmz:"application/x-ms-wmz",wmv:"video/x-ms-wmv",wvx:"video/x-ms-wvx",wmf:"application/x-msmetafile",trm:"application/x-msterminal",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",dotm:"application/vnd.ms-word.template.macroenabled.12",wri:"application/x-mswrite",wps:"application/vnd.ms-works",xbap:"application/x-ms-xbap",xps:"application/vnd.ms-xpsdocument",mid:"audio/midi",mpy:"application/vnd.ibm.minipay",afp:"application/vnd.ibm.modcap",rms:"application/vnd.jcp.javame.midlet-rms",tmo:"application/vnd.tmobile-livetv",prc:"application/x-mobipocket-ebook",mbk:"application/vnd.mobius.mbk",dis:"application/vnd.mobius.dis",plc:"application/vnd.mobius.plc",mqy:"application/vnd.mobius.mqy",msl:"application/vnd.mobius.msl",txf:"application/vnd.mobius.txf",daf:"application/vnd.mobius.daf",fly:"text/vnd.fly",mpc:"application/vnd.mophun.certificate",mpn:"application/vnd.mophun.application",mj2:"video/mj2",mpga:"audio/mpeg",mxu:"video/vnd.mpegurl",mpeg:"video/mpeg",m21:"application/mp21",mp4a:"audio/mp4",mp4:"video/mp4",m3u8:"application/vnd.apple.mpegurl",mus:"application/vnd.musician",msty:"application/vnd.muvee.style",mxml:"application/xv+xml",ngdat:"application/vnd.nokia.n-gage.data","n-gage":"application/vnd.nokia.n-gage.symbian.install",ncx:"application/x-dtbncx+xml",nc:"application/x-netcdf",nlu:"application/vnd.neurolanguage.nlu",dna:"application/vnd.dna",nnd:"application/vnd.noblenet-directory",nns:"application/vnd.noblenet-sealer",nnw:"application/vnd.noblenet-web",rpst:"application/vnd.nokia.radio-preset",rpss:"application/vnd.nokia.radio-presets",n3:"text/n3",edm:"application/vnd.novadigm.edm",edx:"application/vnd.novadigm.edx",ext:"application/vnd.novadigm.ext",gph:"application/vnd.flographit",ecelp4800:"audio/vnd.nuera.ecelp4800",ecelp7470:"audio/vnd.nuera.ecelp7470",ecelp9600:"audio/vnd.nuera.ecelp9600",oda:"application/oda",ogx:"application/ogg",oga:"audio/ogg",ogv:"video/ogg",dd2:"application/vnd.oma.dd2+xml",oth:"application/vnd.oasis.opendocument.text-web",opf:"application/oebps-package+xml",qbo:"application/vnd.intu.qbo",oxt:"application/vnd.openofficeorg.extension",osf:"application/vnd.yamaha.openscoreformat",weba:"audio/webm",webm:"video/webm",odc:"application/vnd.oasis.opendocument.chart",otc:"application/vnd.oasis.opendocument.chart-template",odb:"application/vnd.oasis.opendocument.database",odf:"application/vnd.oasis.opendocument.formula",odft:"application/vnd.oasis.opendocument.formula-template",odg:"application/vnd.oasis.opendocument.graphics",otg:"application/vnd.oasis.opendocument.graphics-template",odi:"application/vnd.oasis.opendocument.image",oti:"application/vnd.oasis.opendocument.image-template",odp:"application/vnd.oasis.opendocument.presentation",otp:"application/vnd.oasis.opendocument.presentation-template",ods:"application/vnd.oasis.opendocument.spreadsheet",ots:"application/vnd.oasis.opendocument.spreadsheet-template",odt:"application/vnd.oasis.opendocument.text",odm:"application/vnd.oasis.opendocument.text-master",ott:"application/vnd.oasis.opendocument.text-template",ktx:"image/ktx",sxc:"application/vnd.sun.xml.calc",stc:"application/vnd.sun.xml.calc.template",sxd:"application/vnd.sun.xml.draw",std:"application/vnd.sun.xml.draw.template",sxi:"application/vnd.sun.xml.impress",sti:"application/vnd.sun.xml.impress.template",sxm:"application/vnd.sun.xml.math",sxw:"application/vnd.sun.xml.writer",sxg:"application/vnd.sun.xml.writer.global",stw:"application/vnd.sun.xml.writer.template",otf:"application/x-font-otf",osfpvg:"application/vnd.yamaha.openscoreformat.osfpvg+xml",dp:"application/vnd.osgi.dp",pdb:"application/vnd.palm",p:"text/x-pascal",paw:"application/vnd.pawaafile",pclxl:"application/vnd.hp-pclxl",efif:"application/vnd.picsel",pcx:"image/x-pcx",psd:"image/vnd.adobe.photoshop",prf:"application/pics-rules",pic:"image/x-pict",chat:"application/x-chat",p10:"application/pkcs10",p12:"application/x-pkcs12",p7m:"application/pkcs7-mime",p7s:"application/pkcs7-signature",p7r:"application/x-pkcs7-certreqresp",p7b:"application/x-pkcs7-certificates",p8:"application/pkcs8",plf:"application/vnd.pocketlearn",pnm:"image/x-portable-anymap",pbm:"image/x-portable-bitmap",pcf:"application/x-font-pcf",pfr:"application/font-tdpfr",pgn:"application/x-chess-pgn",pgm:"image/x-portable-graymap",png:"image/png",ppm:"image/x-portable-pixmap",pskcxml:"application/pskc+xml",pml:"application/vnd.ctc-posml",ai:"application/postscript",pfa:"application/x-font-type1",pbd:"application/vnd.powerbuilder6",pgp:"application/pgp-signature",box:"application/vnd.previewsystems.box",ptid:"application/vnd.pvi.ptid1",pls:"application/pls+xml",str:"application/vnd.pg.format",ei6:"application/vnd.pg.osasli",dsc:"text/prs.lines.tag",psf:"application/x-font-linux-psf",qps:"application/vnd.publishare-delta-tree",wg:"application/vnd.pmi.widget",qxd:"application/vnd.quark.quarkxpress",esf:"application/vnd.epson.esf",msf:"application/vnd.epson.msf",ssf:"application/vnd.epson.ssf",qam:"application/vnd.epson.quickanime",qfx:"application/vnd.intu.qfx",mov:"video/quicktime",rar:"application/x-rar-compressed",ram:"audio/x-pn-realaudio",rmp:"audio/x-pn-realaudio-plugin",rsd:"application/rsd+xml",rm:"application/vnd.rn-realmedia",bed:"application/vnd.realvnc.bed",mxl:"application/vnd.recordare.musicxml",musicxml:"application/vnd.recordare.musicxml+xml",rnc:"application/relax-ng-compact-syntax",rdz:"application/vnd.data-vision.rdz",rdf:"application/rdf+xml",rp9:"application/vnd.cloanto.rp9",jisp:"application/vnd.jisp",rtf:"application/rtf",rtx:"text/richtext",link66:"application/vnd.route66.link66+xml",rss:"application/rss+xml",shf:"application/shf+xml",st:"application/vnd.sailingtracker.track",svg:"image/svg+xml",sus:"application/vnd.sus-calendar",sru:"application/sru+xml",setpay:"application/set-payment-initiation",setreg:"application/set-registration-initiation",sema:"application/vnd.sema",semd:"application/vnd.semd",semf:"application/vnd.semf",see:"application/vnd.seemail",snf:"application/x-font-snf",spq:"application/scvp-vp-request",spp:"application/scvp-vp-response",scq:"application/scvp-cv-request",scs:"application/scvp-cv-response",sdp:"application/sdp",etx:"text/x-setext",movie:"video/x-sgi-movie",ifm:"application/vnd.shana.informed.formdata",itp:"application/vnd.shana.informed.formtemplate",iif:"application/vnd.shana.informed.interchange",ipk:"application/vnd.shana.informed.package",tfi:"application/thraud+xml",shar:"application/x-shar",rgb:"image/x-rgb",slt:"application/vnd.epson.salt",aso:"application/vnd.accpac.simply.aso",imp:"application/vnd.accpac.simply.imp",twd:"application/vnd.simtech-mindmapper",csp:"application/vnd.commonspace",saf:"application/vnd.yamaha.smaf-audio",mmf:"application/vnd.smaf",spf:"application/vnd.yamaha.smaf-phrase",teacher:"application/vnd.smart.teacher",svd:"application/vnd.svd",rq:"application/sparql-query",srx:"application/sparql-results+xml",gram:"application/srgs",grxml:"application/srgs+xml",ssml:"application/ssml+xml",skp:"application/vnd.koan",sgml:"text/sgml",sdc:"application/vnd.stardivision.calc",sda:"application/vnd.stardivision.draw",sdd:"application/vnd.stardivision.impress",smf:"application/vnd.stardivision.math",sdw:"application/vnd.stardivision.writer",sgl:"application/vnd.stardivision.writer-global",sm:"application/vnd.stepmania.stepchart",sit:"application/x-stuffit",sitx:"application/x-stuffitx",sdkm:"application/vnd.solent.sdkm+xml",xo:"application/vnd.olpc-sugar",au:"audio/basic",wqd:"application/vnd.wqd",sis:"application/vnd.symbian.install",smi:"application/smil+xml",xsm:"application/vnd.syncml+xml",bdm:"application/vnd.syncml.dm+wbxml",xdm:"application/vnd.syncml.dm+xml",sv4cpio:"application/x-sv4cpio",sv4crc:"application/x-sv4crc",sbml:"application/sbml+xml",tsv:"text/tab-separated-values",tiff:"image/tiff",tao:"application/vnd.tao.intent-module-archive",tar:"application/x-tar",tcl:"application/x-tcl",tex:"application/x-tex",tfm:"application/x-tex-tfm",tei:"application/tei+xml",txt:"text/plain",dxp:"application/vnd.spotfire.dxp",sfs:"application/vnd.spotfire.sfs",tsd:"application/timestamped-data",tpt:"application/vnd.trid.tpt",mxs:"application/vnd.triscape.mxs",t:"text/troff",tra:"application/vnd.trueapp",ttf:"application/x-font-ttf",ttl:"text/turtle",umj:"application/vnd.umajin",uoml:"application/vnd.uoml+xml",unityweb:"application/vnd.unity",ufd:"application/vnd.ufdl",uri:"text/uri-list",utz:"application/vnd.uiq.theme",ustar:"application/x-ustar",uu:"text/x-uuencode",vcs:"text/x-vcalendar",vcf:"text/x-vcard",vcd:"application/x-cdlink",vsf:"application/vnd.vsf",wrl:"model/vrml",vcx:"application/vnd.vcx",mts:"model/vnd.mts",vtu:"model/vnd.vtu",vis:"application/vnd.visionary",viv:"video/vnd.vivo",ccxml:"application/ccxml+xml,",vxml:"application/voicexml+xml",src:"application/x-wais-source",wbxml:"application/vnd.wap.wbxml",wbmp:"image/vnd.wap.wbmp",wav:"audio/x-wav",davmount:"application/davmount+xml",woff:"application/x-font-woff",wspolicy:"application/wspolicy+xml",webp:"image/webp",wtb:"application/vnd.webturbo",wgt:"application/widget",hlp:"application/winhlp",wml:"text/vnd.wap.wml",wmls:"text/vnd.wap.wmlscript",wmlsc:"application/vnd.wap.wmlscriptc",wpd:"application/vnd.wordperfect",stf:"application/vnd.wt.stf",wsdl:"application/wsdl+xml",xbm:"image/x-xbitmap",xpm:"image/x-xpixmap",xwd:"image/x-xwindowdump",der:"application/x-x509-ca-cert",fig:"application/x-xfig",xhtml:"application/xhtml+xml",xml:"application/xml",xdf:"application/xcap-diff+xml",xenc:"application/xenc+xml",xer:"application/patch-ops-error+xml",rl:"application/resource-lists+xml",rs:"application/rls-services+xml",rld:"application/resource-lists-diff+xml",xslt:"application/xslt+xml",xop:"application/xop+xml",xpi:"application/x-xpinstall",xspf:"application/xspf+xml",xul:"application/vnd.mozilla.xul+xml",xyz:"chemical/x-xyz",yaml:"text/yaml",yang:"application/yang",yin:"application/yin+xml",zir:"application/vnd.zul",zip:"application/zip",zmm:"application/vnd.handheld-entertainment+xml",zaz:"application/vnd.zzazz.deck+xml"},zO=Object.fromEntries(Object.entries(Q1).map(function(e){var t=jn(e,2),n=t[0],r=t[1];return[r,n]})),c6=/^data:(.*?);base64,/;function u6(e){var t=c6.exec(e);if(t&&t[1])return t[1]}function d6(e){var t=zO[e];return t||e.split("/")[1]}function f6(e){var t=e.split(".").pop(),n=t&&Q1[t];if(n)return n}function $O(e,t,n,r,o){var i="".concat((r==null?void 0:r.width)||"").concat((r==null?void 0:r.height)||"").concat(r==null?void 0:r.mimeType),s={type:t.type,opt:t.opt,options:xt({},t.options)};return e+JSON.stringify(s)+n+i+o}function h6(e,t,n,r,o,i){return Z1(i.encode($O(e,t,n,r,o))).slice(0,4)}function BO(e){return e.slice(0,12)}function p6(e){return BO(Z1(new Uint8Array(e)))}function m6(e,t){var n=e.startsWith("/")?e.slice(1).split("/"):e.split("/");if(t.length===0)return{isValid:n.length===0||n.length===1&&n[0]==="",expectedPath:"/"};for(var r=0,o=0,i=!1,s=-1,a=0;a<t.length;a++){var l=t[a];l.startsWith("[[")&&l.endsWith("]]")?(i=!0,s=a,o=1/0):l.startsWith("[...")&&l.endsWith("]")?(i=!0,s=a,r++,o=1/0):l.startsWith("[[")&&l.endsWith("]")?o++:(l.startsWith("[")&&l.endsWith("]"),r++,o++)}if(n.length<r||!i&&n.length>o){var c=t.map(function(m){return m.startsWith("[[")&&m.endsWith("]]")?"[optional:".concat(m.slice(2,-2),"]"):m.startsWith("[...")&&m.endsWith("]")?"[...".concat(m.slice(4,-1),"]"):m.startsWith("[[")&&m.endsWith("]")?"[optional:".concat(m.slice(2,-1),"]"):m.startsWith("[")&&m.endsWith("]")?"[".concat(m.slice(1,-1),"]"):m}).join("/");return{isValid:!1,expectedPath:"/".concat(c)}}for(var u=i?s:t.length,f=0;f<u;f++){var h=t[f],p=n[f];if(h.startsWith("[[")&&h.endsWith("]]")){if(p!==""&&p!==void 0&&p==="")return{isValid:!1,expectedPath:"/".concat(t.join("/"))}}else if(h.startsWith("[")&&h.endsWith("]")){if(p===""||p===void 0)return{isValid:!1,expectedPath:"/".concat(t.join("/"))}}else if(h!==p)return{isValid:!1,expectedPath:"/".concat(t.join("/"))}}return{isValid:!0}}var g6={getRouterId:function(){return"next-app-router"},validate:function(t,n){var r=v6(t),o=[],i=gi(n),s;try{for(i.s();!(s=i.n()).done;){var a=s.value,l=m6(a,r);l.isValid||o.push({error:{message:'URL path "'.concat(a,'" does not match the route pattern for "').concat(t,'"'),urlPath:a,expectedPath:l.expectedPath||null}})}}catch(c){i.e(c)}finally{i.f()}return o}};function v6(e){if(!e||typeof e!="string")return[];for(var t=[/\/app\/(.+)\/page\.val\.ts$/,/\/src\/app\/(.+)\/page\.val\.ts$/,/\/app\/(.+)\/page\.tsx?$/,/\/src\/app\/(.+)\/page\.tsx?$/],n=0,r=t;n<r.length;n++){var o=r[n],i=e.match(o);if(i){var s=i[1];return s.split("/").flatMap(function(a){if(a.startsWith("(")&&a.endsWith(")")&&!a.includes("."))return[];var l=a.match(/^(\([.]+\)(\(.+\))?)(.*)$/);if(l){var c=l[3]||l[4];return c?[c]:[]}return[a]})}}return[]}var ba="?p=",VO="https://content.val.build",Nb="https://app.val.build",Y={VERSION:{core:function(){try{return require("../package.json").version}catch{return null}}()},convertFileSource:E$,convertRemoteSource:J$,getSchema:$C,getValPath:NO,getSource:R$,resolvePath:A$,safeResolvePath:I$,splitModuleFilePathAndModulePath:X1,joinModuleFilePathAndModulePath:TO,nextAppRouter:g6,remote:{createRemoteRef:q$,getValidationBasis:$O,getValidationHash:h6,getFileHash:p6,hashToRemoteFileHash:BO,splitRemoteRef:FO},validate:function(t,n,r){var o;return t&&((o=$C(t))===null||o===void 0?void 0:o.executeValidate(n,r))},isVal:C$,isFile:w$,createValPathOfItem:fu,getSHA256Hash:Z1,initSchema:G$,getMimeType:u6,mimeTypeToFileExt:d6,filenameToMimeType:f6,EXT_TO_MIME_TYPES:Q1,MIME_TYPES_TO_EXT:zO,ModuleFilePathSep:ba,notFileOp:function(t){return t.op!=="file"},isFileOp:function(t){return t.op==="file"&&typeof t.filePath=="string"},createPatchJSONPath:function(t){return"/".concat(t.split(".").map(function(n){return n&&y6(n)}).join("/"))},createPatchPath:function(t){return Xf(t)},splitModulePath:Xf,splitModuleFilePath:D$,splitJoinedSourcePaths:L$,parentOfSourcePath:F$,patchPathToModulePath:LO,VAL_ENABLE_COOKIE_NAME:"val_enable",VAL_STATE_COOKIE:"val_state",VAL_SESSION_COOKIE:"val_session",createFilename:function(t,n,r,o){var i,s;if(!r||!t)return n;var a=o.slice(0,5),l=(i=Y.getMimeType(t))!==null&&i!==void 0?i:"unknown",c=(s=Y.mimeTypeToFileExt(l))!==null&&s!==void 0?s:"unknown";if(n){var u=n.split(".").slice(0,-1).join(".")||n,f=u.lastIndexOf("_"),h=u.slice(f+1,u.length);h===a&&(u=u.slice(0,f));var p=encodeURIComponent(u).replace(/%[0-9A-Fa-f]{2}/g,"").toLowerCase();return"".concat(p,"_").concat(a,".").concat(c)}return"".concat(o,".").concat(c)}};function y6(e){try{return JSON.parse(e)}catch{return e}}var Gv={},qv={};qv.byteLength=w6;qv.toByteArray=k6;qv.fromByteArray=N6;var fi=[],ro=[],x6=typeof Uint8Array<"u"?Uint8Array:Array,Nx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var ac=0,b6=Nx.length;ac<b6;++ac)fi[ac]=Nx[ac],ro[Nx.charCodeAt(ac)]=ac;ro[45]=62;ro[95]=63;function UO(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function w6(e){var t=UO(e),n=t[0],r=t[1];return(n+r)*3/4-r}function S6(e,t,n){return(t+n)*3/4-n}function k6(e){var t,n=UO(e),r=n[0],o=n[1],i=new x6(S6(e,r,o)),s=0,a=o>0?r-4:r,l;for(l=0;l<a;l+=4)t=ro[e.charCodeAt(l)]<<18|ro[e.charCodeAt(l+1)]<<12|ro[e.charCodeAt(l+2)]<<6|ro[e.charCodeAt(l+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return o===2&&(t=ro[e.charCodeAt(l)]<<2|ro[e.charCodeAt(l+1)]>>4,i[s++]=t&255),o===1&&(t=ro[e.charCodeAt(l)]<<10|ro[e.charCodeAt(l+1)]<<4|ro[e.charCodeAt(l+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function E6(e){return fi[e>>18&63]+fi[e>>12&63]+fi[e>>6&63]+fi[e&63]}function C6(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),o.push(E6(r));return o.join("")}function N6(e){for(var t,n=e.length,r=n%3,o=[],i=16383,s=0,a=n-r;s<a;s+=i)o.push(C6(e,s,s+i>a?a:s+i));return r===1?(t=e[n-1],o.push(fi[t>>2]+fi[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],o.push(fi[t>>10]+fi[t>>4&63]+fi[t<<2&63]+"=")),o.join("")}var eS={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */eS.read=function(e,t,n,r,o){var i,s,a=o*8-r-1,l=(1<<a)-1,c=l>>1,u=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-u)-1,p>>=-u,u+=a;u>0;i=i*256+e[t+f],f+=h,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=r;u>0;s=s*256+e[t+f],f+=h,u-=8);if(i===0)i=1-c;else{if(i===l)return s?NaN:(p?-1:1)*(1/0);s=s+Math.pow(2,r),i=i-c}return(p?-1:1)*s*Math.pow(2,i-r)};eS.write=function(e,t,n,r,o,i){var s,a,l,c=i*8-o-1,u=(1<<c)-1,f=u>>1,h=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,m=r?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(s++,l/=2),s+f>=u?(a=0,s=u):s+f>=1?(a=(t*l-1)*Math.pow(2,o),s=s+f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=a&255,p+=m,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[n+p]=s&255,p+=m,s/=256,c-=8);e[n+p-m]|=v*128};/*!
|
|
44
44
|
* The buffer module from node.js, for the browser.
|
|
45
45
|
*
|
|
46
46
|
* @author Feross Aboukhadijeh <https://feross.org>
|
package/server/.tmp/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Val</title>
|
|
7
|
-
<script type="module" crossorigin src="/api/val/static/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/api/val/static/assets/index-Cf3eTsl7.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/api/val/static/assets/index-CArkK09G.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|