@akad/design-system 0.1.0-beta.1 → 0.1.0-beta.10
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/css/aon-theme.css +1 -1
- package/css/bees-theme.css +1 -1
- package/css/bmc-theme.css +1 -1
- package/css/default-theme.css +1 -1
- package/css/linker-theme.css +1 -1
- package/css/oggi-theme.css +1 -1
- package/css/streetgo-theme.css +1 -1
- package/package.json +10 -10
- package/react/components/atoms/Button/Button.config.d.ts +1 -0
- package/react/components/atoms/Card/Card.config.d.ts +10 -0
- package/react/components/atoms/Card/Card.d.ts +5 -1
- package/react/components/atoms/Checkbox/Checkbox.config.d.ts +6 -1
- package/react/components/atoms/Checkbox/Checkbox.d.ts +2 -1
- package/react/components/atoms/Icon/Icon.config.d.ts +5 -0
- package/react/components/atoms/Input/mask.d.ts +12 -0
- package/react/components/atoms/Loading/Loading.config.d.ts +10 -0
- package/react/components/atoms/Loading/Loading.d.ts +5 -1
- package/react/components/atoms/Select/Select.config.d.ts +10 -0
- package/react/components/atoms/Select/Select.d.ts +2 -6
- package/react/components/molecules/EditableSelect/EditableSelect.config.d.ts +26 -14
- package/react/components/molecules/EditableSelect/EditableSelect.d.ts +7 -23
- package/react/components/molecules/EditableSelect/EditableSelect.stories.d.ts +4 -0
- package/react/helpers/utils.d.ts +23 -0
- package/react/helpers/validator.d.ts +2 -0
- package/react/helpers/validator.test.d.ts +1 -0
- package/react/hooks/useStepper.d.ts +1 -1
- package/react/react-lib.js +6053 -5938
- package/react/react-lib.umd.cjs +11 -11
package/react/react-lib.umd.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(se,I){typeof exports=="object"&&typeof module<"u"?I(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],I):(se=typeof globalThis<"u"?globalThis:se||self,I(se["react-lib"]={},se.jsxRuntime,se.React))})(this,function(se,I,j){"use strict";var Uo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Es(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ks={exports:{}},Vr={exports:{}},ye={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var
|
|
8
|
+
*/var na;function Ho(){if(na)return ye;na=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,s=r?Symbol.for("react.fragment"):60107,n=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,o=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,c=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,w=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,S=r?Symbol.for("react.lazy"):60116,E=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,g=r?Symbol.for("react.responder"):60118,T=r?Symbol.for("react.scope"):60119;function C(_){if(typeof _=="object"&&_!==null){var q=_.$$typeof;switch(q){case e:switch(_=_.type,_){case l:case c:case s:case a:case n:case f:return _;default:switch(_=_&&_.$$typeof,_){case o:case d:case S:case y:case i:return _;default:return q}}case t:return q}}}function O(_){return C(_)===c}return ye.AsyncMode=l,ye.ConcurrentMode=c,ye.ContextConsumer=o,ye.ContextProvider=i,ye.Element=e,ye.ForwardRef=d,ye.Fragment=s,ye.Lazy=S,ye.Memo=y,ye.Portal=t,ye.Profiler=a,ye.StrictMode=n,ye.Suspense=f,ye.isAsyncMode=function(_){return O(_)||C(_)===l},ye.isConcurrentMode=O,ye.isContextConsumer=function(_){return C(_)===o},ye.isContextProvider=function(_){return C(_)===i},ye.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},ye.isForwardRef=function(_){return C(_)===d},ye.isFragment=function(_){return C(_)===s},ye.isLazy=function(_){return C(_)===S},ye.isMemo=function(_){return C(_)===y},ye.isPortal=function(_){return C(_)===t},ye.isProfiler=function(_){return C(_)===a},ye.isStrictMode=function(_){return C(_)===n},ye.isSuspense=function(_){return C(_)===f},ye.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===s||_===c||_===a||_===n||_===f||_===w||typeof _=="object"&&_!==null&&(_.$$typeof===S||_.$$typeof===y||_.$$typeof===i||_.$$typeof===o||_.$$typeof===d||_.$$typeof===b||_.$$typeof===g||_.$$typeof===T||_.$$typeof===E)},ye.typeOf=C,ye}var ve={};/** @license React v16.13.1
|
|
9
9
|
* react-is.development.js
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var
|
|
15
|
+
*/var aa;function Ko(){return aa||(aa=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,s=r?Symbol.for("react.fragment"):60107,n=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,o=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,c=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,w=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,S=r?Symbol.for("react.lazy"):60116,E=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,g=r?Symbol.for("react.responder"):60118,T=r?Symbol.for("react.scope"):60119;function C(k){return typeof k=="string"||typeof k=="function"||k===s||k===c||k===a||k===n||k===f||k===w||typeof k=="object"&&k!==null&&(k.$$typeof===S||k.$$typeof===y||k.$$typeof===i||k.$$typeof===o||k.$$typeof===d||k.$$typeof===b||k.$$typeof===g||k.$$typeof===T||k.$$typeof===E)}function O(k){if(typeof k=="object"&&k!==null){var R=k.$$typeof;switch(R){case e:var K=k.type;switch(K){case l:case c:case s:case a:case n:case f:return K;default:var Q=K&&K.$$typeof;switch(Q){case o:case d:case S:case y:case i:return Q;default:return R}}case t:return R}}}var _=l,q=c,z=o,J=i,W=e,ae=d,G=s,Y=S,ee=y,X=t,fe=a,he=n,ge=f,De=!1;function Ne(k){return De||(De=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(k)||O(k)===l}function F(k){return O(k)===c}function v(k){return O(k)===o}function x(k){return O(k)===i}function P(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function u(k){return O(k)===d}function p(k){return O(k)===s}function $(k){return O(k)===S}function M(k){return O(k)===y}function L(k){return O(k)===t}function U(k){return O(k)===a}function H(k){return O(k)===n}function D(k){return O(k)===f}ve.AsyncMode=_,ve.ConcurrentMode=q,ve.ContextConsumer=z,ve.ContextProvider=J,ve.Element=W,ve.ForwardRef=ae,ve.Fragment=G,ve.Lazy=Y,ve.Memo=ee,ve.Portal=X,ve.Profiler=fe,ve.StrictMode=he,ve.Suspense=ge,ve.isAsyncMode=Ne,ve.isConcurrentMode=F,ve.isContextConsumer=v,ve.isContextProvider=x,ve.isElement=P,ve.isForwardRef=u,ve.isFragment=p,ve.isLazy=$,ve.isMemo=M,ve.isPortal=L,ve.isProfiler=U,ve.isStrictMode=H,ve.isSuspense=D,ve.isValidElementType=C,ve.typeOf=O}()),ve}var ia;function oa(){return ia||(ia=1,process.env.NODE_ENV==="production"?Vr.exports=Ho():Vr.exports=Ko()),Vr.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var z=te(P,R,u,d,v+"."+R,r);if(z)return z}return null}return _(g)}function Y(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(Y);if(A===null||o(A))return!0;var g=p(A);if(g){var F=g.call(A),T;if(g!==A.entries){for(;!(T=F.next()).done;)if(!Y(T.value))return!1}else for(;!(T=F.next()).done;){var u=T.value;if(u&&!Y(u[1]))return!1}}else return!1;return!0;default:return!1}}function me(A,g){return A==="symbol"?!0:g?g["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&g instanceof Symbol:!1}function ge(A){var g=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":me(g,A)?"symbol":g}function _e(A){if(typeof A>"u"||A===null)return""+A;var g=ge(A);if(g==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return g}function Ie(A){var g=_e(A);switch(g){case"array":case"object":return"an "+g;case"boolean":case"date":case"regexp":return"a "+g;default:return g}}function xe(A){return!A.constructor||!A.constructor.name?O:A.constructor.name}return E.checkPropTypes=n,E.resetWarningCache=n.resetWarningCache,E.PropTypes=E,E},Vs}var Bs,Da;function Cu(){if(Da)return Bs;Da=1;var t=Ms();function e(){}function r(){}return r.resetWarningCache=e,Bs=function(){function s(i,o,l,c,f,p){if(p!==t){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}}s.isRequired=s;function n(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:n,element:s,elementType:s,instanceOf:n,node:s,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},Bs}if(process.env.NODE_ENV!=="production"){var Tu=Ea(),Ou=!0;Ns.exports=wu()(Tu.isElement,Ou)}else Ns.exports=Cu()();var Au=Ns.exports;const h=Is(Au),Ia={Primary:"primary",Secondary:"secondary",Info:"info",Success:"success",Danger:"danger",Warning:"warning",Neutral:"neutral"},Na={Solid:"solid",Outline:"outline",Text:"text"},Pa={Large:"lg",Medium:"md",Small:"sm"},Fa={Right:"right",Left:"left"},be={name:"Button",class:"ds-button",props:{color:{type:String,default:Ia.Primary,options:Object.values(Ia)},variant:{type:String,default:Na.Solid,options:Object.values(Na)},size:{type:String,default:Pa.Medium,options:Object.values(Pa)},elevation:{type:Number,options:[1,2,3,4]},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},iconFill:{type:Boolean,default:!0},iconPosition:{type:String,default:Fa.Right,options:Object.values(Fa)},id:{type:String,default:""},testId:{type:String},fullSize:{type:Boolean,default:!1}}},Ma={Primary:"primary",PrimaryLightest:"primary-lightest",PrimaryLighter:"primary-lighter",PrimaryLight:"primary-light",PrimaryDark:"primary-dark",PrimaryDarker:"primary-darker",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",Secondary:"secondary",SecondaryLightest:"secondary-lightest",SecondaryLighter:"secondary-lighter",SecondaryLight:"secondary-light",SecondaryDark:"secondary-dark",SecondaryDarker:"secondary-darker",Success:"success",SuccessLighter:"success-lighter",SuccessLight:"success-light",SuccessDark:"success-dark",Warning:"warning",WarningLighter:"warning-lighter",WarningLight:"warning-light",WarningDark:"warning-dark",Danger:"danger",DangerLighter:"danger-lighter",DangerLight:"danger-light",DangerDark:"danger-dark",Info:"info",InfoLighter:"info-lighter",InfoLight:"info-light",InfoDark:"info-dark"},ja={Outlined:"outlined",Rounded:"rounded",Sharp:"sharp"},xa={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl",Huge:"huge"},Va={Bold:"bold",Semibold:"semibold",Medium:"medium",Regular:"regular",Light:"light",Extralight:"extralight"},Ze={name:"Icon",class:"ds-icon",props:{color:{type:String,default:Ma.Neutral90,options:Object.values(Ma)},image:{type:String,default:"settings"},variation:{type:String,default:ja.Outlined,options:Object.values(ja)},size:{type:String,default:xa.MD,options:Object.values(xa)},fontVariationSettings:{type:Object,default:{fill:0,grad:0,weight:500,opticalSize:48}},fill:{type:Boolean,default:!1},weight:{type:String,default:Va.Semibold,options:Object.values(Va)},onClick:{type:Function,default:()=>({})}}};var Ba=(t=>(t[t.bold=700]="bold",t[t.semibold=600]="semibold",t[t.medium=500]="medium",t[t.regular=400]="regular",t[t.light=300]="light",t[t.extralight=200]="extralight",t))(Ba||{});const Ee=({image:t=Ze.props.image.default,color:e=Ze.props.color.default,className:r,size:s=Ze.props.size.default,fill:n=Ze.props.fill.default,weight:a=Ze.props.weight.default,testId:i="ds-icon-test",onClick:o=Ze.props.onClick.default})=>{const l="material-symbols-rounded",c=e&&Ze.props.color.options.find(p=>p===e)&&`${Ze.class}__color--${e}`,f=j.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${Ba[a]}, 'opsz' 48`}),[a,n]);return w.jsx("i",{className:[`${Ze.class}--${s}`,Ze.class,l,c,r&&r].filter(p=>p).join(" "),"data-testid":i,onClick:o,style:f,translate:"no",children:t})};Ee.propTypes={color:h.oneOf(Ze.props.color.options),image:h.string,fontVariationSettings:h.object,size:h.oneOf(Ze.props.size.options),fill:h.bool,weight:h.oneOf(Ze.props.weight.options),onClick:h.func},Ee.displayName="DsIcon";const Sr=({children:t,className:e,onClick:r,size:s=be.props.size.default,disabled:n=be.props.disabled.default,icon:a=be.props.icon.default,id:i=be.props.id.default,testId:o=i||"ds-button-test",elevation:l,variant:c=be.props.variant.default,color:f=be.props.color.default,iconFill:p=be.props.iconFill.default,iconPosition:O=be.props.iconPosition.default,fullSize:E=be.props.fullSize.default})=>{const $=s&&be.props.size.options.find(B=>B===s)?`${be.class}--${s}`:`${be.class}__${be.props.size.default}`,k=n&&`${be.class}--disabled`,_=`${be.class}__${f}--${c}`,y=l&&`${be.class}--elevation-${l}`,I=a&&`${be.class}--with-icon`,N=E?`${be.class}--full-size`:"",D=O==="right"?`${be.class}__icon`:`${be.class}__icon--left`,b=O==="right"?`${be.class}__text`:`${be.class}__text--reversed`;return w.jsx("button",{className:[be.class,N,k,I,$,_,y,I,e&&e].filter(B=>B).join(" "),"data-testid":o,id:i,onClick:n?()=>{}:r,children:w.jsxs("span",{className:["ds-button__text",b].join(" "),children:[t,a&&w.jsx(Ee,{className:["ds-button__icon",D].join(" "),fill:p,image:a,size:s})]})})};Sr.propTypes={color:h.oneOf(be.props.color.options),variant:h.oneOf(be.props.variant.options),size:h.oneOf(be.props.size.options),disabled:h.bool,icon:h.string,iconFill:h.bool,iconPosition:h.oneOf(be.props.iconPosition.options),testId:h.string,id:h.string,fullSize:h.bool},Sr.displayName="DsButton";const Du={name:"Caption",class:"ds-caption"},Ls=({children:t,className:e,testId:r="ds-caption-test"})=>w.jsx("p",{className:[Du.class,e&&e].filter(s=>s).join(" "),"data-testid":r,children:t});Ls.propTypes={children:h.node.isRequired,className:h.string,testId:h.string},Ls.displayName="DsCaption";const Gr={None:"",PrimaryDarker:"primary-darker",PrimaryDark:"primary-dark",Primary:"primary",PrimaryLight:"primary-light",PrimaryLighter:"primary-lighter",PrimaryLightest:"primary-lightest",SecondaryDarker:"secondary-darker",SecondaryDark:"secondary-dark",Secondary:"secondary",SecondaryLight:"secondary-light",SecondaryLighter:"secondary-lighter",SecondaryLightest:"secondary-lightest",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",SuccessDark:"success-dark",Success:"success",SuccessLight:"success-light",SuccessLighter:"success-lighter",WarningDark:"warning-dark",Warning:"warning",WarningLight:"warning-light",WarningLighter:"warning-lighter",DangerDark:"danger-dark",Danger:"danger",DangerLight:"danger-light",DangerLighter:"danger-lighter",InfoDark:"info-dark",Info:"info",InfoLight:"info-light",InfoLighter:"info-lighter"},mt={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:Gr.None,options:Object.values(Gr)},borderColor:{type:String,default:Gr.None,options:Object.values(Gr)},elevation:{type:Number,default:0,options:[0,1,2,3,4]}}},Rs=({children:t,className:e,elevation:r=mt.props.elevation.default,backgroundColor:s=mt.props.backgroundColor.default,borderColor:n=mt.props.borderColor.default})=>{const a=r&&`${mt.class}--elevation-${r}`,i=n&&`${mt.class}--border-${n}`,o=s&&`${mt.class}--${s}`;return w.jsx("div",{className:[mt.class,e,a,i,o].filter(l=>l).join(" "),children:t})};Rs.propTypes={backgroundColor:h.oneOf(mt.props.backgroundColor.options),borderColor:h.oneOf(mt.props.borderColor.options),elevation:h.oneOf(mt.props.elevation.options)},Rs.displayName="DsCard";const Qe={name:"Checkbox",class:"ds-checkbox",props:{name:{type:String,required:!0},testId:{type:String,default:""},label:{type:String,default:""},description:{type:String,default:""},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},zs=j.forwardRef(({id:t,className:e,name:r,testId:s=r||"ds-checkbox-test",label:n=Qe.props.label.default,description:a=Qe.props.description.default,checked:i=Qe.props.checked.default,disabled:o=Qe.props.checked.default,onChangeHandler:l},c)=>{const f=i||!1,[p,O]=j.useState(f),E={image:p?"check_box":"check_box_outline_blank",class:p?`${Qe.class}__icon--checked`:`${Qe.class}__icon--unchecked`},$=o&&`${Qe.class}--disabled`,k=_=>{o||(O(y=>!y),l&&l(_))};return w.jsxs("label",{className:[Qe.class,$,e&&e].join(" "),htmlFor:t||r,children:[w.jsx("input",{checked:p,className:`${Qe.class}__input`,"data-testid":s,id:t||r,name:r,onChange:k,ref:c,type:"checkbox"}),w.jsx(Ee,{className:`${Qe.class}__icon ${E.class}`,"data-testid":`${s}-icon`,fill:!0,image:E.image,size:"xxl"}),(a||n)&&w.jsxs("div",{className:`${Qe.class}__label`,children:[n&&w.jsx("label",{className:`${Qe.class}__label-title`,htmlFor:t||r,children:n}),a&&w.jsx("label",{className:`${Qe.class}__label-description`,htmlFor:t||r,children:a})]})]})});zs.propTypes={label:h.oneOfType([h.string,h.node]),name:h.string.isRequired,className:h.string,testId:h.string,description:h.oneOfType([h.string,h.node]),checked:h.bool,disabled:h.bool},zs.displayName="DsCheckbox";const La={Heading1:"heading-1",Heading2:"heading-2",Heading3:"heading-3",Heading4:"heading-4",Heading5:"heading-5",Heading6:"heading-6"},Er={name:"Heading",class:"ds-heading",props:{type:{type:String,default:La.Heading1,options:Object.values(La)}}},qs=({children:t,testId:e="ds-heading-test",type:r=Er.props.type.default,className:s})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},a=Er.props.type.options.find(l=>l===r)&&`${Er.class}--${r}`,o=n[r];return w.jsx(o,{className:[Er.class,a,s&&s].filter(l=>l).join(" "),"data-testid":e,children:t})};qs.propTypes={className:h.string,testId:h.string,type:h.oneOf(Er.props.type.options)},qs.displayName="DsHeading";const Ra={None:"",Dashed:"dashed",Dotted:"dotted"},za={None:"",Small:"small",Large:"large"},Ut={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:Ra.None,options:Object.values(Ra)},size:{type:String,default:za.None,options:Object.values(za)}}};function qa(t,e,r){const s=r.props[t];return s.options&&s.options.some(n=>n===e)?`${r.class}--${e}`:""}const Us=({size:t=Ut.props.size.default,borderStyle:e=Ut.props.borderStyle.default})=>{const r=qa("size",t,Ut),s=qa("borderStyle",e,Ut);return w.jsx("hr",{className:`${Ut.class} ${r} ${s}`.trim()})};Us.propTypes={size:h.oneOf(Ut.props.size.options),borderStyle:h.oneOf(Ut.props.borderStyle.options)},Us.displayName="DsHR";function jt(t){return typeof t=="string"||t instanceof String}function Ua(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function Ha(t,e){return Array.isArray(e)?Ha(t,(r,s)=>e.includes(s)):Object.entries(t).reduce((r,s)=>{let[n,a]=s;return e(a,n)&&(r[n]=a),r},{})}const J={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Iu(t){switch(t){case J.LEFT:return J.FORCE_LEFT;case J.RIGHT:return J.FORCE_RIGHT;default:return t}}function Hs(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Wr(t,e){if(e===t)return!0;const r=Array.isArray(e),s=Array.isArray(t);let n;if(r&&s){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!Wr(e[n],t[n]))return!1;return!0}if(r!=s)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const a=e instanceof Date,i=t instanceof Date;if(a&&i)return e.getTime()==t.getTime();if(a!=i)return!1;const o=e instanceof RegExp,l=t instanceof RegExp;if(o&&l)return e.toString()==t.toString();if(o!=l)return!1;const c=Object.keys(e);for(n=0;n<c.length;n++)if(!Object.prototype.hasOwnProperty.call(t,c[n]))return!1;for(n=0;n<c.length;n++)if(!Wr(t[c[n]],e[c[n]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Nu{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?J.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?J.RIGHT:J.LEFT}}function se(t,e){return new se.InputMask(t,e)}function Ka(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?se.MaskedRegExp:jt(t)?se.MaskedPattern:t===Date?se.MaskedDate:t===Number?se.MaskedNumber:Array.isArray(t)||t===Array?se.MaskedDynamic:se.Masked&&t.prototype instanceof se.Masked?t:se.Masked&&t instanceof se.Masked?t.constructor:t instanceof Function?se.MaskedFunction:(console.warn("Mask not found for mask",t),se.Masked)}function kr(t){if(!t)throw new Error("Options in not defined");if(se.Masked){if(t.prototype instanceof se.Masked)return{mask:t};const{mask:e=void 0,...r}=t instanceof se.Masked?{mask:t}:Ua(t)&&t.mask instanceof se.Masked?t:{};if(e){const s=e.mask;return{...Ha(e,(n,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...r}}}return Ua(t)?{...t}:{mask:t}}function Tt(t){if(se.Masked&&t instanceof se.Masked)return t;const e=kr(t),r=Ka(e.mask);if(!r)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===r&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new r(e)}se.createMask=Tt;class Ks{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,r){if(!(e==null||r==null||e===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(e,r)}catch{}}get isActive(){return!1}}se.MaskElement=Ks;const Ga=90,Pu=89;class Yr extends Ks{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,r,s;return(e=(r=(s=this.input).getRootNode)==null?void 0:r.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Ga&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Pu&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Ga&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}se.HTMLMaskElement=Yr;class Fu extends Yr{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,r){this.input.setSelectionRange(e,r)}get value(){return this.input.value}set value(e){this.input.value=e}}se.HTMLMaskElement=Yr;class Wa extends Yr{get _unsafeSelectionStart(){const e=this.rootElement,r=e.getSelection&&e.getSelection(),s=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||s==null||s<n?s:n}get _unsafeSelectionEnd(){const e=this.rootElement,r=e.getSelection&&e.getSelection(),s=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||s==null||s>n?s:n}_unsafeSelect(e,r){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,r);const n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}se.HTMLContenteditableMaskElement=Wa;class Xr{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Xr.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Xr.MAX_LENGTH=100;class Mu{constructor(e,r){this.el=e instanceof Ks?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Wa(e):new Fu(e),this.masked=Tt(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Xr,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this._onChange()}maskEquals(e){var r;return e==null||((r=this.masked)==null?void 0:r.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof se.Masked)&&this.masked.constructor===Ka(e)){this.masked.updateOptions({mask:e});return}const r=e instanceof se.Masked?e:Tt({mask:e});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,r){const s=this._listeners[e];s&&s.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const r=this.masked.unmaskedValue,s=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==r||this.value!==s||this._rawInputValue!==n;this._unmaskedValue=r,this._value=s,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:r,...s}=e,n=!this.maskEquals(r),a=this.masked.optionsIsChanged(s);n&&(this.mask=r),a&&this.masked.updateOptions(s),(n||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,J.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,r){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(r),this}off(e,r){if(!this._listeners[e])return this;if(!r)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(r);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const r=new Nu({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?r.removeDirection:J.NONE;let i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==J.NONE&&(i=this.masked.nearestInputPos(i,J.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}se.InputMask=Mu;class le{static normalize(e){return Array.isArray(e)?e:[e,new le]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}se.ChangeDetails=le;class gt{constructor(e,r,s){e===void 0&&(e=""),r===void 0&&(r=0),this.value=e,this.from=r,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class qe{constructor(e){this._value="",this._update({...qe.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,r){r===void 0&&(r={input:!0}),this.reset(),this.append(e,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,r){return e}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-e)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(e,r)}extractTail(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),new gt(this.extractInput(e,r),e)}appendTail(e){return jt(e)&&(e=new gt(String(e))),e.appendTo(this)}_appendCharRaw(e,r){return e?(this._value+=e,new le({inserted:e,rawInserted:e})):new le}_appendChar(e,r,s){r===void 0&&(r={});const n=this.state;let a;if([e,a]=this.doPrepareChar(e,r),e&&(a=a.aggregate(this._appendCharRaw(e,r)),!a.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let o=this.pad(r);const l=this._appendCharRaw(e,r);o=o.aggregate(l),l.rawInserted||o.equals(a)?a=o:this.state=i}if(a.inserted){let i,o=this.doValidate(r)!==!1;if(o&&s!=null){const l=this.state;if(this.overwrite===!0){i=s.state;for(let f=0;f<a.rawInserted.length;++f)s.unshift(this.displayValue.length-a.tailShift)}let c=this.appendTail(s);if(o=c.rawInserted.length===s.toString().length,!(o&&c.inserted)&&this.overwrite==="shift"){this.state=l,i=s.state;for(let f=0;f<a.rawInserted.length;++f)s.shift();c=this.appendTail(s),o=c.rawInserted.length===s.toString().length}o&&c.inserted&&(this.state=l)}o||(a=new le,this.state=n,s&&i&&(s.state=i))}return a}_appendPlaceholder(){return new le}_appendEager(){return new le}append(e,r,s){if(!jt(e))throw new Error("value should be string");const n=jt(s)?new gt(String(s)):s;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,r);for(let i=0;i<e.length;++i){const o=this._appendChar(e[i],r,n);if(!o.rawInserted&&!this.doSkipInvalid(e[i],r,n))break;a.aggregate(o)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&e&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(r),new le}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const r=this.rawInputValue,s=this.value,n=e();return this.rawInputValue=r,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const r=this.state,s=e(this);return this.state=r,delete this._isolated,s}doSkipInvalid(e,r,s){return!!this.skipInvalid}doPrepare(e,r){return r===void 0&&(r={}),le.normalize(this.prepare?this.prepare(e,this,r):e)}doPrepareChar(e,r){return r===void 0&&(r={}),le.normalize(this.prepareChar?this.prepareChar(e,this,r):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,r,s,n,a){s===void 0&&(s=""),n===void 0&&(n=J.NONE),a===void 0&&(a={input:!0});const i=e+r,o=this.extractTail(i),l=this.eager===!0||this.eager==="remove";let c;l&&(n=Iu(n),c=this.extractInput(0,i,{raw:!0}));let f=e;const p=new le;if(n!==J.NONE&&(f=this.nearestInputPos(e,r>1&&e!==0&&!l?J.NONE:n),p.tailShift=f-e),p.aggregate(this.remove(f)),l&&n!==J.NONE&&c===this.rawInputValue)if(n===J.FORCE_LEFT){let O;for(;c===this.rawInputValue&&(O=this.displayValue.length);)p.aggregate(new le({tailShift:-1})).aggregate(this.remove(O-1))}else n===J.FORCE_RIGHT&&o.unshift();return p.aggregate(this.append(s,a,o))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Wr(this,e)}typedValueEquals(e){const r=this.typedValue;return e===r||qe.EMPTY_VALUES.includes(e)&&qe.EMPTY_VALUES.includes(r)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new le}}qe.DEFAULTS={skipInvalid:!0},qe.EMPTY_VALUES=[void 0,null,""],se.Masked=qe;class Ht{constructor(e,r){e===void 0&&(e=[]),r===void 0&&(r=0),this.chunks=e,this.from=r}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=jt(e)?new gt(String(e)):e;const r=this.chunks[this.chunks.length-1],s=r&&(r.stop===e.stop||e.stop==null)&&e.from===r.from+r.toString().length;if(e instanceof gt)s?r.extend(e.toString()):this.chunks.push(e);else if(e instanceof Ht){if(e.stop==null){let n;for(;e.chunks.length&&e.chunks[0].stop==null;)n=e.chunks.shift(),n.from+=e.from,this.extend(n)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof se.MaskedPattern))return new gt(this.toString()).appendTo(e);const r=new le;for(let s=0;s<this.chunks.length;++s){const n=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),i=n.stop;let o;if(i!=null&&(!a||a.index<=i)&&((n instanceof Ht||e._stops.indexOf(i)>=0)&&r.aggregate(e._appendPlaceholder(i)),o=n instanceof Ht&&e._blocks[i]),o){const l=o.appendTail(n);r.aggregate(l);const c=n.toString().slice(l.rawInserted.length);c&&r.aggregate(e.append(c,{tail:!0}))}else r.aggregate(e.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:r,...s}=e;Object.assign(this,s),this.chunks=r.map(n=>{const a="chunks"in n?new Ht:new gt;return a.state=n,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const r=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const n=this.chunks[s],a=n.unshift(r);if(n.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const r=this.chunks[e],s=r.shift();if(r.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class ju{constructor(e,r){this.masked=e,this._log=[];const{offset:s,index:n}=e._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,J.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,J.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,J.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,J.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,J.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,J.NONE),!0})}}class Ya{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(r),this._value||(this._isRawInput=!1),new le}nearestInputPos(e,r){r===void 0&&(r=J.NONE);const s=0,n=this._value.length;switch(r){case J.LEFT:case J.FORCE_LEFT:return s;case J.NONE:case J.RIGHT:case J.FORCE_RIGHT:default:return n}}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),this._isRawInput?r-e:0}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,r){if(r===void 0&&(r={}),this.isFilled)return new le;const s=this.eager===!0||this.eager==="append",a=this.char===e&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!s)&&!r.tail,i=new le({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(r.raw||r.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new le;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new gt("")}appendTail(e){return jt(e)&&(e=new gt(String(e))),e.appendTo(this)}append(e,r,s){const n=this._appendChar(e[0],r);return s!=null&&(n.tailShift+=this.appendTail(s).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class Jr{constructor(e){const{parent:r,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:o,...l}=e;this.masked=Tt(l),Object.assign(this,{parent:r,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:o})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),e===0&&r>=1?(this.isFilled=!1,this.masked.remove(e,r)):new le}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,r){if(r===void 0&&(r={}),this.isFilled)return new le;const s=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new le,this.masked.state=s),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,r,s){return this.masked.append(e,this.currentMaskFlags(r),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new le:(this.isFilled=!0,new le({inserted:this.placeholderChar}))}_appendEager(){return new le}extractTail(e,r){return this.masked.extractTail(e,r)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),this.masked.extractInput(e,r,s)}nearestInputPos(e,r){r===void 0&&(r=J.NONE);const s=0,n=this.value.length,a=Math.min(Math.max(e,s),n);switch(r){case J.LEFT:case J.FORCE_LEFT:return this.isComplete?a:s;case J.RIGHT:case J.FORCE_RIGHT:return this.isComplete?a:n;case J.NONE:default:return a}}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),this.value.slice(e,r).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var r;return{...e,_beforeTailState:(e==null||(r=e._beforeTailState)==null?void 0:r.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new le}}Jr.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class xu extends qe{updateOptions(e){super.updateOptions(e)}_update(e){const r=e.mask;r&&(e.validate=s=>s.search(r)>=0),super._update(e)}}se.MaskedRegExp=xu;class Ue extends qe{constructor(e){super({...Ue.DEFAULTS,...e,definitions:Object.assign({},Jr.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const r=this.mask;if(!r||!e)return;let s=!1,n=!1;for(let a=0;a<r.length;++a){if(this.blocks){const c=r.slice(a),f=Object.keys(this.blocks).filter(O=>c.indexOf(O)===0);f.sort((O,E)=>E.length-O.length);const p=f[0];if(p){const{expose:O,repeat:E,...$}=kr(this.blocks[p]),k={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...$,repeat:E,parent:this},_=E!=null?new se.RepeatBlock(k):Tt(k);_&&(this._blocks.push(_),O&&(this.exposeBlock=_),this._maskedBlocks[p]||(this._maskedBlocks[p]=[]),this._maskedBlocks[p].push(this._blocks.length-1)),a+=p.length-1;continue}}let i=r[a],o=i in e;if(i===Ue.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){s=!s;continue}if(i==="["||i==="]"){n=!n;continue}if(i===Ue.ESCAPE_CHAR){if(++a,i=r[a],!i)break;o=!1}const l=o?new Jr({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...kr(e[i]),parent:this}):new Ya({char:i,eager:this.eager,isUnmasking:s});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:r,...s}=e;this._blocks.forEach((n,a)=>n.state=r[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,r)=>e+=r.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(r),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,r)=>e+=r.value,"")}set value(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(r),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(r),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,r)=>e+=r.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const r=new le;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return r;this._blocks[s].isFilled&&++s;for(let n=s;n<this._blocks.length;++n){const a=this._blocks[n]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(e,r){r===void 0&&(r={});const s=this._mapPosToBlock(this.displayValue.length),n=new le;if(!s)return n;for(let i=s.index,o;o=this._blocks[i];++i){var a;const l=o._appendChar(e,{...r,_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]});if(n.aggregate(l),l.consumed)break}return n}extractTail(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=new Ht;return e===r||this._forEachBlocksInRange(e,r,(n,a,i,o)=>{const l=n.extractTail(i,o);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof Ht&&(l.blockIndex=a),s.extend(l)}),s}extractInput(e,r,s){if(e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),s===void 0&&(s={}),e===r)return"";let n="";return this._forEachBlocksInRange(e,r,(a,i,o,l)=>{n+=a.extractInput(o,l,s)}),n}_findStopBefore(e){let r;for(let s=0;s<this._stops.length;++s){const n=this._stops[s];if(n<=e)r=n;else break}return r}_appendPlaceholder(e){const r=new le;if(this.lazy&&e==null)return r;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return r;const n=s.index,a=e??this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||e!=null){var o;r.aggregate(i._appendPlaceholder((o=i._blocks)==null?void 0:o.length))}}),r}_mapPosToBlock(e){let r="";for(let s=0;s<this._blocks.length;++s){const n=this._blocks[s],a=r.length;if(r+=n.displayValue,e<=r.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((r,s)=>r+=s.displayValue.length,0)}_forEachBlocksInRange(e,r,s){r===void 0&&(r=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const a=this._mapPosToBlock(r),i=a&&n.index===a.index,o=n.offset,l=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(s(this._blocks[n.index],n.index,o,l),a&&!i){for(let c=n.index+1;c<a.index;++c)s(this._blocks[c],c,0,this._blocks[c].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=super.remove(e,r);return this._forEachBlocksInRange(e,r,(n,a,i,o)=>{s.aggregate(n.remove(i,o))}),s}nearestInputPos(e,r){if(r===void 0&&(r=J.NONE),!this._blocks.length)return 0;const s=new ju(this,e);if(r===J.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(r===J.LEFT||r===J.FORCE_LEFT){if(r===J.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),r===J.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:r===J.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return r===J.RIGHT||r===J.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:r===J.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,J.LEFT))):e}totalInputPositions(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,r,(n,a,i,o)=>{s+=n.totalInputPositions(i,o)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const r=this._maskedBlocks[e];return r?r.map(s=>this._blocks[s]):[]}pad(e){const r=new le;return this._forEachBlocksInRange(0,this.displayValue.length,s=>r.aggregate(s.pad(e))),r}}Ue.DEFAULTS={...qe.DEFAULTS,lazy:!0,placeholderChar:"_"},Ue.STOP_CHAR="`",Ue.ESCAPE_CHAR="\\",Ue.InputDefinition=Jr,Ue.FixedDefinition=Ya,se.MaskedPattern=Ue;class Zr extends Ue{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:r=this.to||0,from:s=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix,...i}=e;this.to=r,this.from=s,this.maxLength=Math.max(String(r).length,n),this.autofix=a;const o=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<l.length&&l[c]===o[c];)++c;i.mask=l.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let r="",s="";const[,n,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(n.length)+a,s="9".repeat(n.length)+a),r=r.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[r,s]}doPrepareChar(e,r){r===void 0&&(r={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),r),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,r);const s=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(s[this.value.length],r):Number(a)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],r).aggregate(this._appendCharRaw(e,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(e,r)}doValidate(e){const r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;const[n,a]=this.boundaries(r);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const r=new le;if(this.value.length===this.maxLength)return r;const s=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)r.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return r}}se.MaskedRange=Zr;class Ot extends Ue{static extractPatternOptions(e){const{mask:r,pattern:s,...n}=e;return{...n,mask:jt(r)?r:s}}constructor(e){super(Ot.extractPatternOptions({...Ot.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:r,pattern:s,blocks:n,...a}={...Ot.DEFAULTS,...e},i=Object.assign({},Ot.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,n),super._update({...a,mask:jt(r)?r:s,blocks:i})}doValidate(e){const r=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Ot.extractPatternOptions(e))}}Ot.GET_DEFAULT_BLOCKS=()=>({d:{mask:Zr,from:1,to:31,maxLength:2},m:{mask:Zr,from:1,to:12,maxLength:2},Y:{mask:Zr,from:1900,to:9999}}),Ot.DEFAULTS={...Ue.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const r=String(t.getDate()).padStart(2,"0"),s=String(t.getMonth()+1).padStart(2,"0"),n=t.getFullYear();return[r,s,n].join(".")},parse:(t,e)=>{const[r,s,n]=t.split(".").map(Number);return new Date(n,s-1,r)}},se.MaskedDate=Ot;class Qr extends qe{constructor(e){super({...Qr.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(r=>{const{expose:s,...n}=kr(r),a=Tt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,r){r===void 0&&(r={});const s=this._applyDispatch(e,r);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(r))),s}_applyDispatch(e,r,s){e===void 0&&(e=""),r===void 0&&(r={}),s===void 0&&(s="");const n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,i=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,o=a.slice(i.length),l=this.currentMask,c=new le,f=l==null?void 0:l.state;return this.currentMask=this.doDispatch(e,{...r},s),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),c.tailShift=this.currentMask.value.length-n.length),o&&(c.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)):f&&(this.currentMask.state=f)),c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const r=new le;return e&&r.aggregate(this._applyDispatch("",{},e)),r.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var r,s;return{...e,_beforeTailState:((r=e._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,r,s){return r===void 0&&(r={}),s===void 0&&(s=""),this.dispatch(e,this,r,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,r){r===void 0&&(r={});let[s,n]=super.doPrepare(e,r);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(r)),n=n.aggregate(a)}return[s,n]}doPrepareChar(e,r){r===void 0&&(r={});let[s,n]=super.doPrepareChar(e,r);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(r)),n=n.aggregate(a)}return[s,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(e);this.currentMask&&(this.currentMask.typedValue=e,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,r){const s=new le;return this.currentMask&&s.aggregate(this.currentMask.remove(e,r)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:r,currentMaskRef:s,currentMask:n,...a}=e;r&&this.compiledMasks.forEach((i,o)=>i.state=r[o]),s!=null&&(this.currentMask=s,this.currentMask.state=n),super.state=a}extractInput(e,r,s){return this.currentMask?this.currentMask.extractInput(e,r,s):""}extractTail(e,r){return this.currentMask?this.currentMask.extractTail(e,r):super.extractTail(e,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,r){return this.currentMask?this.currentMask.nearestInputPos(e,r):super.nearestInputPos(e,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((r,s)=>{if(!e[s])return;const{mask:n,...a}=e[s];return Wr(r,a)&&r.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(e))}}Qr.DEFAULTS={...qe.DEFAULTS,dispatch:(t,e,r,s)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,a=e.compiledMasks.map((i,o)=>{const l=e.currentMask===i,c=l?i.displayValue.length:i.nearestInputPos(i.displayValue.length,J.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):l||i.remove(c),i.append(t,e.currentMaskFlags(r)),i.appendTail(s),{index:o,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(c,i.nearestInputPos(i.displayValue.length,J.FORCE_LEFT)))}});return a.sort((i,o)=>o.weight-i.weight||o.totalInputPositions-i.totalInputPositions),e.compiledMasks[a[0].index]}},se.MaskedDynamic=Qr;class es extends Ue{constructor(e){super({...es.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:r,...s}=e;if(r){const n=r.map(o=>o.length),a=Math.min(...n),i=Math.max(...n)-a;s.mask="*".repeat(a),i&&(s.mask+="["+"*".repeat(i)+"]"),this.enum=r}super._update(s)}_appendCharRaw(e,r){r===void 0&&(r={});const s=Math.min(this.nearestInputPos(0,J.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,o)=>{const l=n[0][o];o>=this.value.length||l===i.value||(i.reset(),i._appendChar(l,r))});const a=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new le({skip:!this.isComplete})}extractTail(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),new gt("",e)}remove(e,r){if(e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),e===r)return new le;const s=Math.min(super.nearestInputPos(0,J.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(o=>this.matchValue(o,this.value.slice(s,n),s)).length>1);--n);const a=super.remove(n,r);return a.tailShift+=n-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}es.DEFAULTS={...Ue.DEFAULTS,matchValue:(t,e,r)=>t.indexOf(e,r)===r},se.MaskedEnum=es;class Vu extends qe{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}se.MaskedFunction=Vu;var Xa;class et extends qe{constructor(e){super({...et.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",s=(this.scale?"("+Hs(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+r+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Hs).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Hs(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const r=e.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(e,r){r===void 0&&(r={});const[s,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),r);return e&&!s&&(n.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&n.aggregate(this._appendChar("-")),[s,n]}_separatorsCount(e,r){r===void 0&&(r=!1);let s=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++s,r&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),[e,r]=this._adjustRangeWithSeparators(e,r),this._removeThousandsSeparators(super.extractInput(e,r,s))}_appendCharRaw(e,r){r===void 0&&(r={});const s=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const i=this.number;let o=!isNaN(i),l=!1;if(o){let O;this.min!=null&&this.min<0&&this.number<this.min&&(O=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(O=this.max),O!=null&&(this.autofix?(this._value=this.format(O,this).replace(et.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!r.tail)):o=!1),o&&(o=!!this._value.match(this._numberRegExp))}let c;o?c=new le({inserted:this._value.slice(a.length),rawInserted:l?"":e,skip:l}):(this._value=a,c=new le),this._value=this._insertThousandsSeparators(this._value);const f=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,p=this._separatorsCountFromSlice(f);return c.tailShift+=(p-n)*this.thousandsSeparator.length,c}_findSeparatorAround(e){if(this.thousandsSeparator){const r=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,r);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,r){const s=this._findSeparatorAround(e);s>=0&&(e=s);const n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[e,r]}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),[e,r]=this._adjustRangeWithSeparators(e,r);const s=this.value.slice(0,e),n=this.value.slice(r),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+n));const i=this._separatorsCountFromSlice(s);return new le({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(e,r){if(!this.thousandsSeparator)return e;switch(r){case J.NONE:case J.LEFT:case J.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const n=s+this.thousandsSeparator.length;if(e<n||this.value.length<=n||r===J.FORCE_LEFT)return s}break}case J.RIGHT:case J.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let r=e;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==e&&(this.unmaskedValue=this.format(r,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const r=this._removeThousandsSeparators(e).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(s,n,a,i)=>n+i),e.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const r=e.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(e,r,s){r===void 0&&(r={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===et.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,r,s)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,et.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(et.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||et.EMPTY_VALUES.includes(e)&&et.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Xa=et,et.UNMASKED_RADIX=".",et.EMPTY_VALUES=[...qe.EMPTY_VALUES,0],et.DEFAULTS={...qe.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Xa.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},se.MaskedNumber=et;const Gs={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Ja(t,e,r){e===void 0&&(e=Gs.MASKED),r===void 0&&(r=Gs.MASKED);const s=Tt(t);return n=>s.runIsolated(a=>(a[e]=n,a[r]))}function Bu(t,e,r,s){return Ja(e,r,s)(t)}se.PIPE_TYPE=Gs,se.createPipe=Ja,se.pipe=Bu;class Lu extends Ue{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var r,s,n;const{repeat:a,...i}=kr(e);this._blockOpts=Object.assign({},this._blockOpts,i);const o=Tt(this._blockOpts);this.repeat=(r=(s=a??o.repeat)!=null?s:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:o},eager:o.eager,overwrite:o.overwrite,skipInvalid:o.skipInvalid,lazy:o.lazy,placeholderChar:o.placeholderChar,displayChar:o.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Tt(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,r){r===void 0&&(r={});const s=new le;for(let l=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),c,f;c=(i=this._blocks[l])!=null?i:f=!f&&this._allocateBlock(l);++l){var n,a,i,o;const p=c._appendChar(e,{...r,_beforeTailState:(o=r._beforeTailState)==null||(o=o._blocks)==null?void 0:o[l]});if(p.skip&&f){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(p),p.consumed)break}return s}_trimEmptyTail(e,r){var s,n;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let i;r!=null&&(i=(n=this._mapPosToBlock(r))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let o=0;for(let l=i;a<=l&&!this._blocks[l].unmaskedValue;--l,++o);o&&(this._blocks.splice(i-o+1,o),this.mask=this.mask.slice(o))}reset(){super.reset(),this._trimEmptyTail()}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=super.remove(e,r);return this._trimEmptyTail(e,r),s}totalInputPositions(e,r){return e===void 0&&(e=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,r)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}se.RepeatBlock=Lu;try{globalThis.IMask=se}catch{}const Za={mask:h.oneOfType([h.array,h.func,h.string,h.instanceOf(RegExp),h.oneOf([Date,Number,se.Masked]),h.instanceOf(se.Masked)]),value:h.any,unmask:h.oneOfType([h.bool,h.oneOf(["typed"])]),prepare:h.func,prepareChar:h.func,validate:h.func,commit:h.func,overwrite:h.oneOfType([h.bool,h.oneOf(["shift"])]),eager:h.oneOfType([h.bool,h.oneOf(["append","remove"])]),skipInvalid:h.bool,onAccept:h.func,onComplete:h.func,placeholderChar:h.string,displayChar:h.string,lazy:h.bool,definitions:h.object,blocks:h.object,enum:h.arrayOf(h.string),maxLength:h.number,from:h.number,to:h.number,pattern:h.string,format:h.func,parse:h.func,autofix:h.oneOfType([h.bool,h.oneOf(["pad"])]),radix:h.string,thousandsSeparator:h.string,mapToRadix:h.arrayOf(h.string),scale:h.number,normalizeZeros:h.bool,padFractionalZeros:h.bool,min:h.oneOfType([h.number,h.instanceOf(Date)]),max:h.oneOfType([h.number,h.instanceOf(Date)]),dispatch:h.func,inputRef:h.oneOfType([h.func,h.shape({current:h.object})])},Qa=Object.keys(Za).filter(t=>t!=="value"),Ru=["value","unmask","onAccept","onComplete","inputRef"],zu=Qa.filter(t=>Ru.indexOf(t)<0);function qu(t){var e;const r=(e=class extends j.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,i=this._extractMaskOptionsFromProps(a);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(i);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var o;(o=this.element)!=null&&o.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=se(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...i}=a;return Object.keys(i).filter(o=>zu.indexOf(o)<0).forEach(o=>{delete i[o]}),i}_extractNonMaskProps(a){const{...i}=a;return Qa.forEach(o=>{o!=="maxLength"&&delete i[o]}),"defaultValue"in i||(i.defaultValue=a.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return j.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),s=t.displayName||t.name||"Component";return r.displayName="IMask("+s+")",r.propTypes=Za,j.forwardRef((n,a)=>j.createElement(r,{...n,ref:a}))}const Uu=qu(t=>{let{inputRef:e,...r}=t;return j.createElement("input",{...r,ref:e})}),Hu=(t,e)=>j.createElement(Uu,{...t,ref:e});j.forwardRef(Hu);function Ku(t,e){let{onAccept:r,onComplete:s,ref:n=j.useRef(null),defaultValue:a,defaultUnmaskedValue:i,defaultTypedValue:o}=e===void 0?{}:e;const l=j.useRef(null),[c,f]=j.useState({}),[p,O]=j.useState(""),[E,$]=j.useState(""),[k,_]=j.useState(),y=j.useCallback(()=>{var b;(b=l.current)==null||b.destroy(),l.current=null},[]),I=j.useCallback(()=>{const b=l.current;b&&(f({value:b.value,unmaskedValue:b.unmaskedValue,typedValue:b.typedValue}),_(b.typedValue),$(b.unmaskedValue),O(b.value))},[]),N=j.useCallback(b=>{const B=l.current;B&&(I(),r==null||r(B.value,B,b))},[r]),D=j.useCallback(b=>l.current&&(s==null?void 0:s(l.current.value,l.current,b)),[s]);return j.useEffect(()=>{const{value:b,...B}=c,W=l.current;!W||p===void 0||(b!==p&&(W.value=p,W.value!==p&&N()),f(B))},[p]),j.useEffect(()=>{const{unmaskedValue:b,...B}=c,W=l.current;!W||E===void 0||(b!==E&&(W.unmaskedValue=E,W.unmaskedValue!==E&&N()),f(B))},[E]),j.useEffect(()=>{const{typedValue:b,...B}=c,W=l.current;!W||k===void 0||(b!==k&&(W.typedValue=k,W.masked.typedValueEquals(k)||N()),f(B))},[k]),j.useEffect(()=>{const b=n.current;if(!b||!(t!=null&&t.mask))return y();const B=l.current;B?B==null||B.updateOptions(t):b&&t!=null&&t.mask&&(l.current=se(b,t),I(),a!==void 0&&O(a),i!==void 0&&$(i),o!==void 0&&_(o))},[t,y,N]),j.useEffect(()=>{if(!l.current)return;const b=l.current;return b.on("accept",N),b.on("complete",D),()=>{b.off("accept",N),b.off("complete",D)}},[N,D]),j.useEffect(()=>y,[y]),{ref:n,maskRef:l,value:p,setValue:O,unmaskedValue:E,setUnmaskedValue:$,typedValue:k,setTypedValue:_}}const ei={Text:"text",Password:"password",Email:"email",Date:"date",Number:"number"},ti={Small:"small",Medium:"medium",Large:"large"},ri={Default:"",Error:"error",Success:"success"},si={Center:"center",End:"end",Initial:"initial"},ni={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Oe={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:""},type:{type:String,default:ei.Text,options:Object.values(ei)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:ti.Medium,options:Object.values(ti)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:ri.Default,options:Object.values(ri)},feedback:{type:String,default:""},hasFeedback:{type:Boolean,default:!0},noMargin:{type:Boolean,default:!1},icon:{type:String,default:""},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:si.Center,options:Object.values(si)},tooltipPosition:{type:String,default:ni.Top,options:Object.values(ni)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},ai={currency:{mask:"currency",blocks:{currency:{mask:"R$ num",lazy:!1,blocks:{num:{mask:Number,scale:2,thousandsSeparator:".",padFractionalZeros:!0,normalizeZeros:!1,radix:",",mapToRadix:["."]}}}}},document:{mask:[{mask:"000.000.000-00",startsWith:/[0-9]/,maxLength:14},{mask:"00.000.000/0000-00",startsWith:/[0-9]/,maxLength:18}]}},ii={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},oi={Center:"center",End:"end",Initial:"initial"},At={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:ii.Top,options:Object.values(ii)},placement:{type:String,default:oi.Center,options:Object.values(oi)},text:{type:String,default:""}}},Kt=({children:t,position:e=At.props.position.default,placement:r=At.props.placement.default,text:s=At.props.text.default,className:n})=>{const a=j.useRef(null),i=j.useRef(null),[o,l]=j.useState(!1),c=e&&At.props.position.options.find(b=>b===e)&&`${At.class}--${e}`,f=r&&At.props.placement.options.find(b=>b===r)&&`${At.class}--${r}`,[p,O]=j.useState(0),[E,$]=j.useState(0),[k,_]=j.useState(0),[y,I]=j.useState(0);let N;switch(j.useEffect(()=>{var b,B,W,U;i.current&&(_((b=i==null?void 0:i.current)==null?void 0:b.offsetHeight),I((B=i==null?void 0:i.current)==null?void 0:B.offsetWidth)),a.current&&(O((W=a==null?void 0:a.current)==null?void 0:W.offsetHeight),$((U=a==null?void 0:a.current)==null?void 0:U.offsetWidth))},[a,o]),j.useEffect(()=>(document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}),[]),e){case"top":r==="initial"?N={bottom:p+9,left:E<30?-E/1.5:-E*.01}:r==="end"?N={bottom:p+9,right:E<30?-E/1.5:-E*.01}:N={bottom:p+9,left:-y/2+E/2};break;case"bottom":r==="initial"?N={top:p+9,left:E<30?-E/1.5:-E*.01}:r==="end"?N={top:p+9,right:E<30?-E/1.5:-E*.01}:N={top:p+9,left:-y/2+E/2};break;case"left":r==="initial"?N={right:E+9,top:p<30?-p/1.5:-p*.01}:r==="end"?N={right:E+9,bottom:p<30?-p/1.5:-p*.01}:N={right:E+9,top:-k/2+p/2};break;case"right":r==="initial"?N={left:E+9,top:p<30?-p/1.5:-p*.01}:r==="end"?N={left:E+9,bottom:p<30?-p/1.5:-p*.01}:N={left:E+9,top:-k/2+p/2};break}const D=({target:b})=>{a.current&&a.current.contains(b)||l(!1)};return w.jsxs("span",{className:[At.class,n].join(" "),onClick:()=>l(!o),ref:a,children:[t,o&&w.jsx("span",{className:[c,f].filter(b=>b).join(" "),children:w.jsx("span",{className:`${At.class}__wrapper`,ref:i,style:N,children:s})})]})};Kt.propTypes={position:h.string,placement:h.string,text:h.oneOfType([h.string,h.node])},Kt.displayName="DsTooltip";const ir=j.forwardRef(({name:t,testId:e=t||"ds-input-test",type:r=Oe.props.type.default,animated:s=Oe.props.animated.default,size:n=Oe.props.size.default,label:a,placeholder:i,value:o,min:l,max:c,tooltip:f=Oe.props.tooltip.default,tooltipPosition:p=Oe.props.tooltipPosition.default,tooltipPlacement:O=Oe.props.tooltipPlacement.default,icon:E=Oe.props.icon.default,status:$=Oe.props.status.default,feedback:k,hasFeedback:_=Oe.props.hasFeedback.default,noMargin:y=Oe.props.noMargin.default,disabled:I=Oe.props.disabled.default,className:N,mask:D,onChangeHandler:b=Oe.props.onChangeHandler.default,onBlurHandler:B,onKeyDownHandler:W,onFocusHandler:U},H)=>{const[ie,q]=j.useState(!1),[G,re]=j.useState(Math.random()),[Y,me]=j.useState(!1),[ge,_e]=j.useState(!1),Ie=!!b&&!!D,xe=(ue,$t,rt)=>{if(T(ue),Ie&&rt){const zt={...rt,target:{...rt.target,name:t,value:$t.unmaskedValue,type:"text"}};b(zt)}},A=j.useMemo(()=>typeof D=="object"?{lazy:!0,...D}:ai[D]?{...ai[D],min:l,max:c,lazy:!0}:{mask:D||"",min:l,max:c,lazy:!0},[D]),{ref:g,setTypedValue:F,setValue:T}=Ku(A,{onAccept:xe}),u=ue=>{b&&!Ie&&b(ue)},d=ue=>{W&&W(ue)},v=ue=>{q(!1),B&&B(ue)},P=ue=>{q(!0),U&&U(ue)},V=()=>{_e(ue=>!ue)},L=j.useMemo(()=>ge&&r==="password"?"text":r,[ge,r]),R=()=>{const ue=[`${Oe.class}`];return n&&ue.push(`${Oe.class}--${n}`),s&&ue.push(`${Oe.class}--animated`),y&&ue.push(`${Oe.class}--no-margin`),E&&ue.push(`${Oe.class}--with-icon`),$&&ue.push(`${Oe.class}--${$}`),N&&ue.push(N),ue.join(" ")},te=j.useMemo(()=>{const ue=[`${Oe.class}__label`];return(ie||o)&&ue.push(`${Oe.class}__label--active`),ue.join(" ")},[o,ie]),z=()=>!s&&i?i:"",pe=()=>$&&$==="error"?"info":"check_circle",We=()=>{D&&o&&(F(o),T(o))},tt=()=>{F(""),T("")};return j.useEffect(()=>We(),[]),j.useEffect(()=>{const ue=o==null;if(ue&&D)return me(!0),tt();o&&D&&Y&&(me(!1),T(String(o))),ue&&re(Math.random())},[o]),w.jsxs("div",{className:R(),ref:H,children:[_&&w.jsx("div",{className:"ds-input__feedback",children:k&&w.jsxs(w.Fragment,{children:[w.jsx(Ee,{image:pe()}),k]})}),w.jsx("input",{className:"ds-input__input","data-testid":e,defaultValue:o||"",disabled:I,id:t,max:c,min:l,name:t,onBlur:v,onChange:u,onFocus:P,onInput:u,onKeyDown:d,placeholder:z(),ref:g,type:L}),w.jsxs("label",{className:te,htmlFor:t,children:[a,f&&w.jsx(Kt,{className:"ds-input__tooltip",placement:O,position:p,text:f,children:w.jsx(Ee,{className:"ds-input__icon",image:"info"})})]}),E&&w.jsx(Ee,{className:"ds-input__icon",image:E}),r==="password"&&w.jsx(Ee,{className:"ds-input__password-icon",image:ge?"visibility_off":"visibility",onClick:V,size:"xl"})]},G)});ir.propTypes={name:h.string,testId:h.string,type:h.oneOf(Oe.props.type.options),animated:h.bool,size:h.oneOf(Oe.props.size.options),label:h.string,placeholder:h.string,value:h.oneOfType([h.string]),min:h.string,max:h.string,tooltip:h.string,tooltipPosition:h.string,tooltipPlacement:h.string,icon:h.string,status:h.oneOf(Oe.props.status.options),feedback:h.string,hasFeedback:h.bool,noMargin:h.bool,disabled:h.bool,mask:h.oneOfType([h.string,h.object]),onChangeHandler:h.func,onFocusHandler:h.func},ir.displayName="DsInput";const ui={Small:"small",Medium:"medium",Large:"large"},li={None:"",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00"},st={name:"Loading",class:"ds-loading",props:{size:{type:String,default:ui.Medium,options:Object.values(ui)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:li.Neutral10,options:Object.values(li)}}},Ws=({className:t,size:e=st.props.size.default,opacity:r=st.props.opacity.default,fullscreen:s=st.props.fullscreen.default,backgroundColor:n=st.props.backgroundColor.default})=>{const a=!s&&`${st.class}--absolute`,i=e&&`${st.class}__dots--${e}`,o=n&&st.props.backgroundColor.options.find(c=>c===n)&&`${st.class}__background--${n}`,l=r&&`${st.class}__background--opacity`;return w.jsxs("div",{className:[st.class,t,a].filter(c=>c).join(" "),children:[w.jsx("div",{className:[`${st.class}__background`,o,l].filter(c=>c).join(" ")}),w.jsx("div",{className:["ds-loading__dots",i].filter(c=>c).join(" "),role:"status"})]})};Ws.propTypes={size:h.oneOf(st.props.size.options),opacity:h.bool,fullscreen:h.bool,backgroundColor:h.string},Ws.displayName="DsLoading";const Dt={name:"Option",class:"ds-option",props:{id:{type:String,default:""},name:{type:String,default:""},testId:{type:String,default:""},label:{type:String,default:""},value:{type:String,default:""},disabled:{type:Boolean,default:!1},detail:{type:String,default:""},checked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Ys=({id:t,label:e,detail:r,name:s,testId:n=s||"ds-option-test",disabled:a=Dt.props.disabled.default,value:i,checked:o=Dt.props.checked.default,onChangeHandler:l=Dt.props.onChangeHandler.default})=>{const[c]=j.useState(Math.random()),f=()=>{const p=[Dt.class];return a&&p.push(`${Dt.class}--disabled`),p.join(" ")};return w.jsxs("div",{className:f(),children:[w.jsx("input",{checked:o,"data-testid":n,disabled:a,id:t||String(c),name:s,onChange:l,type:"radio",value:i}),w.jsx(Ee,{className:`${Dt.class}__icon`,image:o?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),w.jsxs("div",{className:`${Dt.class}__text-container`,children:[e&&w.jsx("label",{className:`${Dt.class}__label`,htmlFor:t||String(c),children:e}),r&&w.jsx("label",{className:`${Dt.class}__detail`,htmlFor:t||String(c),children:r})]})]})};Ys.propTypes={id:h.string,name:h.string,testId:h.string,label:h.oneOfType([h.string,h.node]),value:h.oneOfType([h.string,h.number]),detail:h.string,disabled:h.bool,checked:h.bool,onChangeHandler:h.func},Ys.displayName="DsOption";const ci={Default:"",Large:"large",Small:"small"},ts={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:ci.Default,options:Object.values(ci)}}},It=({children:t,className:e,testId:r="ds-paragraph-test",type:s=ts.props.type.default})=>{const n=s&&`${ts.class}--${s}`;return w.jsx("p",{className:[ts.class,n,e&&e].filter(a=>a).join(" "),"data-testid":r,children:t})};It.propTypes={className:h.string,testId:h.string,type:h.oneOf(ts.props.type.options)},It.displayName="DsParagraph";const di={Success:"success",SuccessDark:"success-dark",Warning:"warning",Danger:"danger"},fi={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:di.Success,options:Object.values(di)}}},Xs={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},Le=({children:t,flex:e=Xs.props.flex.default,className:r=Xs.props.className.default})=>{const s=()=>[Xs.class,r].join(" "),n=()=>({flex:e});return w.jsx("div",{className:s(),style:n(),children:t})};Le.propTypes={className:h.string,flex:h.string},Le.displayName="DsFlexElement";const pi={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceAround:"space-around",SpaceBetween:"space-between"},hi={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center"},mi={Row:"row",Column:"column",RowReverse:"row-reverse",ColumnReverse:"column-reverse"},gi={NoWrap:"nowrap",Wrap:"wrap",WrapReverse:"wrap-reverse"},Gu={Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl"},Gt={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:pi.Stretch,required:!0,options:Object.values(pi)},alignItems:{type:String,default:hi.Stretch,required:!0,options:Object.values(hi)},flexDirection:{type:String,default:mi.Row,required:!0,options:Object.values(mi)},flexWrap:{type:String,default:gi.Wrap,required:!1,options:Object.values(gi)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(Gu)}}},Nt=({children:t,className:e,justifyContent:r=Gt.props.justifyContent.default,alignItems:s=Gt.props.alignItems.default,flexDirection:n=Gt.props.flexDirection.default,flexWrap:a=Gt.props.flexWrap.default,width:i=Gt.props.width.default,height:o,gap:l})=>{const c=()=>{const p=[Gt.class,e];return l&&p.push(`${Gt.class}--gap-${l}`),p.join(" ")},f=()=>({display:"flex",justifyContent:r,alignItems:s,flexDirection:n,flexWrap:a,width:i,height:o,gap:l});return w.jsx("div",{className:c(),style:f(),children:t})};Nt.propTypes={className:h.string,justifyContent:h.string,alignItems:h.string,flexDirection:h.string,flexWrap:h.string,width:h.string,height:h.string,gap:h.string},Nt.displayName="DsFlexLayout";const rs={None:"none",Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm"},wr={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:rs.None,options:Object.values(rs)},horizontal:{type:String,default:rs.None,options:Object.values(rs)}}},lt=({vertical:t=wr.props.vertical.default,horizontal:e=wr.props.horizontal.default})=>{const r=t&&`ds-spacer__vertical--${t}`,s=e&&`ds-spacer__horizontal--${e}`;return w.jsx("div",{className:[wr.class,r,s].filter(n=>n).join(" "),"data-testid":"spacer"})};lt.propTypes={vertical:h.oneOf(wr.props.vertical.options),horizontal:h.oneOf(wr.props.horizontal.options)},lt.displayName="DsSpacer";const Js=({label:t,progress:e=fi.props.progress.default,color:r=fi.props.color.default})=>{const s=j.useMemo(()=>e>100?100:e,[e]),n=j.useMemo(()=>`ds-progress__progress--${r}`,[r]),a=j.useMemo(()=>r==="success-dark"?"color__success--dark":r==="warning"?"color__warning--dark":`color__${r}--default`,[r]);return w.jsx("div",{className:"ds-progress",children:w.jsxs(Nt,{flexDirection:"column",children:[w.jsx(Le,{children:w.jsx("div",{className:"ds-progress__container",children:w.jsx("div",{className:`ds-progress__progress ${n}`,style:{width:`${s||0}%`}})})}),w.jsx(Le,{children:w.jsxs(Nt,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[w.jsx(lt,{vertical:"quark"}),w.jsx(It,{className:a,children:t})]})})]})})};Js.propTypes={label:h.string,progress:h.number,color:h.string};const yi={Small:"sm",Medium:"md",Large:"lg"},vi={Default:"",Error:"error",Success:"success"},_i={Center:"center",End:"end",Initial:"initial"},bi={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Ae={name:"Select",class:"ds-select",props:{label:{type:String,default:""},className:{type:String,default:""},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},name:{type:String,default:""},testId:{type:String,default:""},placeholder:{type:String},onChange:{type:Function,default:()=>{}},value:{type:[Boolean,String,Number,void 0]},size:{type:String,options:Object.values(yi),default:yi.Medium},status:{type:String,default:vi.Default,options:Object.values(vi)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:_i.Initial,options:Object.values(_i)},tooltipPosition:{type:String,default:bi.Top,options:Object.values(bi)},feedback:{type:String,default:""}}},Zs=j.forwardRef(({label:t,className:e,disabled:r=Ae.props.disabled.default,animated:s=Ae.props.animated.default,multiple:n=Ae.props.multiple.default,name:a,testId:i=a||"ds-select-test",options:o,value:l,placeholder:c,onChange:f,onChangeHandler:p,size:O=Ae.props.size.default,status:E=Ae.props.status.default,tooltip:$,tooltipPosition:k=Ae.props.tooltipPosition.default,tooltipPlacement:_=Ae.props.tooltipPlacement.default,feedback:y,...I},N)=>{const[D,b]=j.useState(!1),B=H=>{b(!1),f&&f(H,H.target.value),p&&p(H,H.target.value)},W=()=>{const H=[Ae.class,"select-placeholder"];return H.push(`${Ae.class}--${O}`),E&&H.push(`${Ae.class}--${E}`),D&&H.push(`${Ae.class}--active`),r&&H.push(`${Ae.class}--disabled`),e&&H.push(e),H.join(" ")},U=j.useMemo(()=>{const H=[`${Ae.class}__label`];return!s&&H.push(`${Ae.class}__label--not-animated`),l&&H.push(`${Ae.class}__label--has-value`),s&&!l&&!$&&H.push(`${Ae.class}__label--hidden`),H.join(" ")},[l]);return w.jsxs("div",{className:W(),children:[w.jsxs("label",{className:U,htmlFor:a,children:[t,$&&w.jsx(Kt,{className:`${Ae.class}__tooltip`,placement:_,position:k,text:$,children:w.jsx(Ee,{className:`${Ae.class}__icon`,image:"info"})})]}),w.jsxs("select",{"data-testid":i,disabled:r,id:a,multiple:n,name:a,onChange:H=>B(H),value:l||"",...I,onBlur:()=>b(!1),onFocus:()=>b(!0),ref:N,required:!0,children:[(c||s)&&w.jsx("option",{disabled:!0,value:"",children:c??t}),o==null?void 0:o.map((H,ie)=>{var q;return H.options?w.jsx("optgroup",{label:H.label,children:(q=H.options)==null?void 0:q.map((G,re)=>w.jsx("option",{className:`${Ae.class}__option-select`,value:G.value,children:G.label||G.value},re))},ie):w.jsx("option",{className:`${Ae.class}__option-select`,value:H.value,children:H.label||H.value},ie)})]}),y&&w.jsxs("div",{className:"ds-select__feedback-container",children:[w.jsx(Ee,{className:"ds-select__icon",image:E==="success"?"check_circle":"info"}),w.jsx("span",{className:"ds-select__feedback",children:y})]})]})});Zs.propTypes={label:h.string.isRequired,className:h.string,disabled:h.bool,animated:h.bool,multiple:h.bool,name:h.string,testId:h.string,options:h.array,placeholder:h.string,onChange:h.func,onChangeHandler:h.func,value:h.oneOfType([h.string,h.number]),size:h.oneOf(Ae.props.size.options),status:h.oneOf(Ae.props.status.options),tooltip:h.string,tooltipPosition:h.string,tooltipPlacement:h.string,feedback:h.string},Zs.displayName="DsSelect";const $i={Large:"large",Small:"small"},Qs={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:$i.Large,options:Object.values($i)}}},Si=({children:t,className:e,testId:r="ds-subtitle-test",type:s})=>{const n=Qs.props.type.options.find(a=>a===s)&&`${Qs.class}--${s}`;return w.jsx("p",{className:[Qs.class,n,e&&e].filter(a=>a).join(" "),"data-testid":r,children:t})};Si.displayName="DsSubtitle";const Ei={Small:"small",Medium:"medium",Large:"large"},ki={Text:"text"},wi={None:"",Error:"error",Success:"success"},Ci={None:"none",Both:"both",Horizontal:"horizontal",Vertical:"vertical",Block:"block",Inline:"inline"},Ve={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:""},type:{type:String,default:ki.Text,options:Object.values(ki)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:Ei.Medium,options:Object.values(Ei)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},minLength:{type:Number,default:void 0},maxLength:{type:Number,default:void 0},rows:{type:Number,default:1},status:{type:String,default:wi.None,options:Object.values(wi)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:Ci.None,options:Object.values(Ci)},onChangeHandler:{type:Function,default:()=>{}}}},en=j.forwardRef(({name:t,testId:e=t||"ds-textarea-test",animated:r=Ve.props.animated.default,size:s=Ve.props.size.default,label:n,placeholder:a,value:i,minLength:o,maxLength:l,tooltip:c,icon:f,status:p=Ve.props.status.default,feedback:O,disabled:E=Ve.props.disabled.default,className:$,resize:k=Ve.props.resize.default,onChangeHandler:_=Ve.props.onChangeHandler.default,onBlurHandler:y,onKeyDownHandler:I,onFocusHandler:N,rows:D=Ve.props.rows.default,description:b},B)=>{const[W,U]=j.useState(!1),[H,ie]=j.useState(0),[q,G]=j.useState(Math.random());j.useEffect(()=>{i==null&&G(Math.random())},[i]);const re=g=>{ie(g.target.value.length),_&&_(g)},Y=g=>{I&&I(g)},me=g=>{U(!1),y&&y(g)},ge=g=>{U(!0),N&&N(g)},_e=()=>{const g=[`${Ve.class}`];return s&&g.push(`${Ve.class}--${s}`),r&&g.push(`${Ve.class}--animated`),c&&g.push(`${Ve.class}--with-icon`),p&&g.push(`${Ve.class}--${p}`),$&&g.push($),g.join(" ")},Ie=j.useMemo(()=>{const g=[`${Ve.class}__label`];return(W||i)&&g.push(`${Ve.class}__label--active`),g.join(" ")},[i,W]),xe=()=>!r&&a?a:"",A=()=>p&&p==="error"?"info":"check_circle";return w.jsxs("div",{className:_e(),children:[b&&w.jsx("span",{className:"ds-textarea__description",children:b}),O&&w.jsxs("div",{className:"ds-textarea__feedback",children:[w.jsx(Ee,{image:A()}),O]}),w.jsx("textarea",{className:"ds-textarea__textarea","data-testid":e,defaultValue:i||"",disabled:E,id:t,maxLength:l,minLength:o,name:t,onBlur:me,onChange:re,onFocus:ge,onInput:re,onKeyDown:Y,placeholder:xe(),ref:B,rows:D,style:{resize:k||"none"}}),w.jsx("label",{className:Ie,htmlFor:t,children:n}),l&&w.jsxs("span",{className:"ds-textarea__count",children:[H,"/",l]}),c&&w.jsx(Kt,{className:"ds-textarea__tooltip",placement:"end",text:c,children:w.jsx(Ee,{className:"ds-textarea__icon",image:f})})]},q)});en.propTypes={name:h.string,testId:h.string,type:h.oneOf(Ve.props.type.options),animated:h.bool,size:h.oneOf(Ve.props.size.options),label:h.string,placeholder:h.string,value:h.oneOfType([h.string]),tooltip:h.string,icon:h.string,status:h.oneOf(Ve.props.status.options),feedback:h.string,minLength:h.number,maxLength:h.number,rows:h.number,disabled:h.bool,onChangeHandler:h.func,onFocusHandler:h.func,resize:h.oneOf(Ve.props.resize.options).isRequired,description:h.string},en.displayName="DsTextArea";const tn={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1}}},ss=({children:t,fluid:e=tn.props.fluid.default,className:r,style:s})=>{const n=e?`${tn.class}--fluid`:tn.class;return w.jsx("div",{className:[n,r].filter(a=>a).join(" "),style:s,children:t})};ss.propTypes={children:h.node,fluid:h.bool,className:h.string,style:h.object},ss.displayName="DsContainer";function Ti(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function Wu(){const[t,e]=j.useState(Ti());return j.useEffect(()=>{function r(){e(Ti())}return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),t}const Oi=({children:t,grid:e})=>{const{row:r,col:s,mobileRow:n,mobileCol:a}=e,{width:i}=Wu(),[o,l]=j.useState(""),[c,f]=j.useState("");return j.useEffect(()=>{i<=768?(l(n||r),f(a||s)):(l(r),f(s))},[i]),w.jsx("div",{style:{gridRow:o,gridColumn:c},children:t})};Oi.displayName="DsGridElement";const Ai={Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},ns={Start:"start",End:"end",Center:"center",Stretch:"stretch",SpaceAround:"space-around",SpaceBetween:"space-between",SpaceEvenly:"space-evenly"},Be={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:Ai.Small,options:Object.values(Ai)},vGap:{type:Boolean,default:!0},hGap:{type:Boolean,default:!0},width:{type:String,default:""},height:{type:String,default:""},horizontalAlign:{type:String,default:ns.Start,options:Object.values(ns)},verticalAlign:{type:String,default:ns.Start,options:Object.values(ns)}}};function Di(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function Yu(){const[t,e]=j.useState(Di());return j.useEffect(()=>{function r(){e(Di())}return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),t}const as=({children:t,rows:e,gap:r,vGap:s,hGap:n,horizontalAlign:a,verticalAlign:i,width:o,height:l})=>{const c=s&&`${Be.class}__v-gap--${r}`,f=n&&`${Be.class}__h-gap--${r}`,p=a&&Be.props.horizontalAlign.options.find(N=>N===a)?`${Be.class}--h-${a}`:null,O=i&&Be.props.verticalAlign.options.find(N=>N===i)?`${Be.class}--v-${i}`:null,{width:E}=Yu(),[$,k]=j.useState("");j.useEffect(()=>{E<=768?k("6"):k("12")},[E]);const _=N=>/^[+-]?\d+$/.test(N),y=()=>e.split(",").map(D=>(D=D.trim(),D==="0"||D==="*"||D==="auto"?"auto":_(D)?D+"fr":D)).join(" "),I=()=>`repeat(${$.split(",").map(D=>(D=D.trim(),D==="0"||D==="*"||D==="auto"?"auto":(_(D),D))).join(" ")}, minmax(0, 1fr))`;return w.jsx("div",{className:[Be.class,p,O,c,f].filter(N=>N).join(" "),style:{width:o,height:l,gridTemplateColumns:I(),gridTemplateRows:y()},children:t})};as.propTypes={children:h.oneOfType([h.arrayOf(h.node),h.node,h.func]),rows:h.string,gap:h.oneOf(Be.props.gap.options),vGap:h.bool,hGap:h.bool,width:h.string,height:h.string,horizontalAlign:h.oneOf(Be.props.horizontalAlign.options),verticalAlign:h.oneOf(Be.props.verticalAlign.options)},as.defaultProps={rows:Be.props.rows.default,gap:Be.props.gap.default,vGap:Be.props.vGap.default,hGap:Be.props.hGap.default,width:Be.props.width.default,height:Be.props.height.default,horizontalAlign:Be.props.horizontalAlign.default,verticalAlign:Be.props.verticalAlign.default},as.displayName="DsGridLayout";const or={None:"none",Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},nt={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:or.ExtraSmall,options:Object.values(or)},top:{type:String,options:Object.values(or)},right:{type:String,options:Object.values(or)},bottom:{type:String,options:Object.values(or)},left:{type:String,options:Object.values(or)}}},Wt=({children:t,space:e=nt.props.space.default,top:r,right:s,bottom:n,left:a})=>{const i=r&&`${nt.class}__top--${r}`,o=s&&`${nt.class}__right--${s}`,l=n&&`${nt.class}__bottom--${n}`,c=a&&`${nt.class}__left--${a}`,f=e&&`${nt.class}--${e}`;return w.jsx("div",{className:[nt.class,i,o,l,c,f].filter(p=>p).join(" "),children:t})};Wt.propTypes={space:h.oneOf(nt.props.space.options||[]),top:h.oneOf(nt.props.top.options||[]),right:h.oneOf(nt.props.right.options||[]),bottom:h.oneOf(nt.props.bottom.options||[]),left:h.oneOf(nt.props.left.options||[])},Wt.displayName="DsWrapper";const rn={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},ur={name:"AccordionItem",class:"ds-accordion-item",props:{title:{type:String,default:""},content:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1}}},sn=({title:t,content:e,className:r,onToggle:s,active:n=ur.props.active.default,disabled:a=ur.props.disabled.default})=>{const i=n&&`${ur.class}--active`;return w.jsxs("li",{className:[ur.class,i,r&&r].filter(o=>o).join(" "),children:[w.jsxs("button",{className:`${ur.class}__button`,disabled:a,onClick:s,children:[t,w.jsx(Ee,{className:`${ur.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),n&&w.jsx("div",{className:"ds-accordion-item__content",children:e})]})};sn.propTypes={active:h.bool,title:h.oneOfType([h.element,h.string]),content:h.oneOfType([h.element,h.string]),className:h.string,disabled:h.bool},sn.displayName="DsAccordionItem";const nn=({items:t=rn.props.items.default,activeItem:e=rn.props.activeItem.default,onClick:r})=>{const[s,n]=j.useState(-1);j.useEffect(()=>{t.map((i,o)=>{i.active&&n(o)})},[t]),j.useEffect(()=>{e!=null&&n(e)},[e]);const a=i=>{if(s===i)return r&&r(-1),n(-1);n(i),r&&r(i)};return w.jsx("ul",{className:rn.class,children:t.map((i,o)=>w.jsx(sn,{active:s===o,content:i.content,disabled:i.disabled,onToggle:()=>{a(o)},title:i.title},o))})};nn.propTypes={items:h.array,activeItem:h.number},nn.displayName="DsAccordion";const Ii=({title:t,activeTags:e,handleTagClose:r})=>w.jsx("div",{className:"active-tags",children:e.length>0&&w.jsxs(w.Fragment,{children:[w.jsx(It,{className:"active-tags--title",children:t}),w.jsx("div",{className:"active-tags-list",children:e.map((s,n)=>w.jsx(Kt,{text:`Filtro ${s.text} aplicado`,children:w.jsxs("div",{className:"active-tag","data-testid":`active-tag-${n}`,children:[w.jsxs(Nt,{alignItems:"center",gap:"nano",children:[w.jsx(Le,{children:w.jsx(Ee,{className:"tag-icon","data-testid":`icon-${s.icon}-${n}`,fill:!0,image:s.icon})}),w.jsx(Le,{children:w.jsx(It,{className:"tag-text",type:"small",children:s.text})})]}),!s.hiddenClose&&w.jsx(Ee,{"data-testid":`icon-close-${n}`,image:"close",onClick:()=>r(n)})]},n)},`ds-tooltip-key-${n}`))})]})});Ii.displayName="DsActiveTags";const Me={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},noOptionsMessage:{type:String,default:"Nenhum resultado encontrado"},status:{type:String,default:""},options:{type:Array,default:[]},icon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},description:{type:String,default:""},checked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>{}},onBlurHandler:{type:Function,default:()=>{}},onFocusHandler:{type:Function,default:()=>{}},onSelectHandler:{type:Function,default:()=>{}},getOptionLabel:{type:Function,default:t=>t.name||""}}},an=({label:t=Me.props.label.default,name:e=Me.props.name.default,value:r=Me.props.value.default,options:s=Me.props.options.default,getOptionLabel:n=Me.props.getOptionLabel.default,onChangeHandler:a=Me.props.onChangeHandler.default,onSelectHandler:i=Me.props.onSelectHandler.default,icon:o=Me.props.icon.default,noOptionsMessage:l=Me.props.noOptionsMessage.default,disabled:c=Me.props.disabled.default,status:f=Me.props.status.default,onBlurHandler:p=Me.props.onBlurHandler.default,onFocusHandler:O=Me.props.onFocusHandler.default})=>{const[E,$]=j.useState(r),[k,_]=j.useState(!1),[y,I]=j.useState(r),N=B=>{$(B.currentTarget.value),a(B),B.currentTarget.value?_(!0):_(!1)},D=B=>{$(n(B)),i(B),I(Math.random().toString()),_(!1)};j.useEffect(()=>{p()},[E,p]);const b=()=>s.length>0?s.map((B,W)=>w.jsx("option",{className:`${Me.class}__list--option`,"data-testid":B.label?`${B.label}`:"",onClick:()=>!c&&D(B),value:W,children:n(B)},W)):w.jsx("option",{className:`${Me.class}__list--option not-found`,children:l},"no_option");return w.jsxs("div",{className:`${Me.class}__container`,children:[w.jsx(ir,{className:`${Me.class}__input`,disabled:c,label:t,name:e,onBlurHandler:p,onChangeHandler:N,onFocusHandler:O,status:f,value:E},y),o&&w.jsx(Ee,{className:`${Me.class}__icon`,image:o,size:"lg"}),k&&w.jsx("div",{className:`${Me.class}__list--container`,children:b()})]})};an.propTypes={label:h.string,name:h.string,value:h.string,options:h.arrayOf(h.object),getOptionLabel:h.func,onChangeHandler:h.func,onSelectHandler:h.func,icon:h.string,noOptionsMessage:h.string,disabled:h.bool,status:h.string,onBlurHandler:h.func,onFocusHandler:h.func},an.displayName="DsEditableSelect";const Cr={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},Xu=({length:t,current:e=Cr.props.current.default})=>{const[r,s]=j.useState(e),n=i=>i<r?`${Cr.class}__step--older`:i===r?`${Cr.class}__step--active`:"";j.useEffect(()=>{s(e)},[e]);const a=[];for(let i=0;i<t;i++)a.push(w.jsx("div",{className:`${Cr.class}__step ${n(i)}`,"data-testid":`indicator-step-${i}`},i));return w.jsx("div",{className:Cr.class,children:a})},Ju={name:"DsInlineEditable",class:"ds-inline-editable",props:{name:{type:String,required:!0},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},prefix:{type:String,default:""},suffix:{type:String,default:""},onChangeHandler:{type:Function,default:()=>{}}}},on=({name:t,value:e,prefix:r,sufix:s,min:n,max:a,onChangeHandler:i})=>{const o=j.useRef(null),[l,c]=j.useState(!1),[f,p]=j.useState("");j.useEffect(()=>{p(e??"")},[e]);const O=_=>{_.key==="Enter"&&E(_)};function E(_){c(!1),i&&(n&&parseInt(n)>=parseInt(f===""?n:f)?(_.currentTarget.value=n,p(n)):a&&parseInt(a)<parseInt(f)?(_.currentTarget.value=a,p(a)):_.currentTarget.value=f,i(_))}const $=_=>{p(_.currentTarget.value)},k=async()=>{var _;await c(!0),(_=o.current)==null||_.focus()};return w.jsx("div",{className:Ju.class,children:l?w.jsx("input",{className:"ds-input__input",max:a,min:n,name:t,onBlur:E,onChange:$,onKeyDown:O,ref:o,type:"number",value:f}):w.jsx("div",{onClick:k,children:w.jsxs(Nt,{alignItems:"center",gap:"nano",children:[w.jsx(Le,{children:w.jsx(It,{children:w.jsxs("b",{children:[r,e,s]})})}),w.jsx(Le,{children:w.jsx(Ee,{image:"edit_square"})})]})})})};on.propTypes={value:h.string},on.displayName="DsInlineEditable";const Zu=[1,2,3,4],Ni={Squared:"squared",Rounded:"rounded"},at={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:Zu},variant:{type:String,default:Ni.Rounded,options:Object.values(Ni)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},un=({className:t,title:e,content:r,cancelBtnText:s=at.props.cancelBtnText.default,confirmBtnText:n=at.props.confirmBtnText.default,variant:a=at.props.variant.default,elevation:i,isModalOpen:o=at.props.isModalOpen.default,onClose:l,onCancel:c,onConfirm:f,...p})=>{const O=a&&at.props.variant.options.find(_=>_===a)?`${at.class}--${a}`:`${at.class}--${at.props.variant.default}`,E=i&&`${at.class}--elevation-${i}`,$=f||c,k=j.useCallback(_=>{_.keyCode===27&&l()},[l]);return j.useEffect(()=>{if(window)return $||window.addEventListener("keyup",k),()=>{window.removeEventListener("keyup",k)}},[$,k]),o?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"ds-modal-overlay",...p,onClick:()=>$?()=>{}:l()}),w.jsxs("div",{className:[at.class,O,E,t&&t].filter(_=>_).join(" "),"data-testid":"modal",children:[!$&&w.jsx("button",{className:"ds-modal__closeBtn","data-testid":"modal-close-button",onClick:l,children:w.jsx(Ee,{image:"close",size:"lg"})}),w.jsxs("div",{className:"ds-modal__content",children:[w.jsx("div",{className:"ds-modal__content__title",children:e}),e&&w.jsx(lt,{vertical:"xxxs"}),w.jsx("div",{className:"ds-modal__content__content",children:r})]}),$&&w.jsx(lt,{vertical:"sm"}),!$&&w.jsx(lt,{vertical:"xxs"}),w.jsxs("div",{className:"ds-modal__cta",children:[c&&w.jsx(Sr,{onClick:()=>{l(),c()},children:s}),f&&w.jsx(Sr,{onClick:()=>{l(),f()},children:n})]})]})]}):null};un.propTypes={firstButtonText:h.string,confirmBtnText:h.string,cancelBtnText:h.string,variant:h.oneOf(at.props.variant.options),elevation:h.oneOf(at.props.elevation.options),isModalOpen:h.bool,title:h.node,content:h.node},un.displayName="DsModal";const Pi={Success:"success",Danger:"danger",Warning:"warning",Info:"info"},Fi={Rounded:"rounded",Squared:"squared"},He={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:Pi.Info,options:Object.values(Pi)},id:{type:String},autoClose:{type:Boolean,default:!1},autoCloseTimer:{type:Number,default:4e3},dismissible:{type:Boolean,default:!1},elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:Fi.Rounded,options:Object.values(Fi)},progressBar:{type:Boolean,default:!0}}},Qu={success:"check",danger:"error",warning:"warning",info:"info"},is=({className:t,type:e=He.props.type.default,variant:r=He.props.variant.default,id:s,children:n,message:a,autoClose:i=He.props.autoClose.default,autoCloseTimer:o=He.props.autoCloseTimer.default,dismissible:l=He.props.dismissible.default,elevation:c,progressBar:f=He.props.progressBar.default,handleClose:p})=>{const[O,E]=j.useState(o),[$,k]=j.useState(!1),[_,y]=j.useState(!0),I=[He.class,e&&`${He.class}--${e}`,r&&`${He.class}--${r}`,c&&`${He.class}--elevation-${c}`,t&&t].join(" ");j.useEffect(()=>{!i&&!l&&y(!0);let B;return!$&&i&&(B=setInterval(()=>{E(W=>(W===0&&y(!1),W-100))},100)),()=>{clearInterval(B)}},[$,i,o,_]);const N=()=>{k(!0)},D=()=>{k(!1)},b=B=>{y(!1),p&&p(B)};return _?w.jsxs("div",{className:I,id:s,onMouseEnter:N,onMouseLeave:D,children:[w.jsx(Wt,{bottom:"nano",top:"nano",children:w.jsxs(Nt,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[w.jsx(Le,{children:w.jsx(Ee,{color:e,fill:!0,image:Qu[e]})}),w.jsx(Le,{flex:"1",children:w.jsx(Wt,{left:"none",right:"none",space:"nano",children:n??a})}),w.jsx(Le,{children:l?w.jsx("div",{className:`${He.class}__button`,onClick:B=>b(B),children:w.jsx(Wt,{children:w.jsx(Ee,{image:"close"})})}):w.jsx(lt,{horizontal:"quark"})})]})}),f&&i&&w.jsx("div",{className:`${He.class}__progress-bar ${He.class}__progress-bar--${e}`,style:{width:`${O/o*100}%`}})]}):null};is.propTypes={type:h.oneOf(He.props.type.options),id:h.string,variant:h.oneOf(He.props.variant.options),message:h.node,autoClose:h.bool,autoCloseTimer:h.number,dismissible:h.bool,elevation:h.oneOf(He.props.elevation.options),progressBar:h.bool,handleClose:h.func},is.displayName="DsNotification";const ln={name:"DsPasswordConfirmation",class:"ds-password-confirmation",props:{onChange:{type:Function,default:()=>{}},validationList:{type:Array,default:[{title:"Um número",rule:t=>/\d/.test(t)},{title:"Uma letra maiúscula",rule:t=>/[A-Z]/.test(t)},{title:"Um caractere especial. Ex: @#!?",rule:t=>/[!@#$%^&*()+\-=_[\]{};':"\\|,.<>/?]/.test(t)},{title:"Mínimo 8 caracteres",rule:t=>t.length>=8}]},instructionLabel:{type:String,default:"A senha deverá conter:"}}},cn=({onChange:t=ln.props.onChange.default,validationList:e=ln.props.validationList.default,instructionLabel:r=ln.props.instructionLabel.default})=>{const[s,n]=j.useState(""),[a,i]=j.useState(""),[o,l]=j.useState([]),[c,f]=j.useState({score:0,color:"danger",label:"Fraca"}),[p,O]=j.useState(!1),E=D=>{const b=e.map(B=>B==null?void 0:B.rule(D));return l(b),b},$=D=>{var W,U,H,ie;n((W=D.currentTarget)==null?void 0:W.value);const b=E((U=D.currentTarget)==null?void 0:U.value),B=I(b);t&&t({password:(H=D.currentTarget)==null?void 0:H.value,confirmationPassword:a,isEqual:a===((ie=D.currentTarget)==null?void 0:ie.value),feedback:B})},k=D=>{var W,U,H;i((W=D.currentTarget)==null?void 0:W.value);const b=E(s),B=I(b);t&&t({password:s,confirmationPassword:(U=D.currentTarget)==null?void 0:U.value,isEqual:s===((H=D.currentTarget)==null?void 0:H.value),feedback:B})},_=j.useMemo(()=>s!==a&&p?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[s,a,p]),y=D=>{const b={score:D,color:"danger",label:"Fraco"};return D>30&&D<=75&&(b.color="warning",b.label="Médio"),D>=75&&D<100&&(b.color="success",b.label="Boa"),D===100&&(b.color="success-dark",b.label="Forte"),b},I=D=>{const b=D.reduce((H,ie)=>{let q=H;return ie?(q++,q):H},0),B=D==null?void 0:D.length,W=b*100/B||0,U=y(W);return f(U),U},N=()=>w.jsx("ul",{children:e.map((D,b)=>{const B=o[b]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return w.jsxs("li",{className:B,children:[o[b]?w.jsx(Ee,{color:"success-dark",image:"check"}):null,w.jsx(lt,{horizontal:"quark"}),w.jsx(It,{children:D.title})]},b+D.title)})});return w.jsxs(Nt,{className:"ds-password-confirmation",flexDirection:"column",children:[w.jsx(Le,{children:w.jsx(ir,{label:"Senha",name:"password",onChangeHandler:$,type:"password",value:s})}),w.jsx(Le,{children:w.jsx(Js,{color:c==null?void 0:c.color,label:c==null?void 0:c.label,progress:c==null?void 0:c.score})}),w.jsx(Le,{children:w.jsx(It,{children:r})}),w.jsx(Le,{children:N()}),w.jsx(lt,{vertical:"xxxs"}),w.jsx(Le,{children:w.jsx(ir,{feedback:_.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>O(!0),onChangeHandler:k,onFocusHandler:()=>O(!0),status:_.status,type:"password",value:a})})]})};cn.propTypes={onChange:h.func,validationList:h.array.isRequired,instructionLabel:h.string},cn.displayName="DsPasswordConfirmation";const ct={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},Mi=({steps:t,selectedStep:e=ct.props.selectedStep.default,onChange:r})=>{const[s,n]=j.useState(e),a=(i,o)=>{const l=[`${ct.class}__button`];return o!==i&&l.push(`${ct.class}__button--round`),t[i]&&t[i].disabled&&l.push(`${ct.class}__button--disabled`),l.join(" ")};return j.useEffect(()=>{n(e)},[e]),j.useEffect(()=>{r(s)},[s]),w.jsxs("div",{className:ct.class,children:[w.jsxs("span",{className:`${ct.class}__step-counter`,children:["Etapa ",s+1," de ",t==null?void 0:t.length]}),w.jsx("div",{className:`${ct.class}__step`,children:t.map((i,o)=>w.jsx("div",{className:`${ct.class}__content`,children:w.jsx("button",{className:a(o,s),disabled:i.disabled,onClick:()=>n(o),children:w.jsxs("span",{className:`${ct.class}__text`,children:[s===o?w.jsx(Wt,{bottom:"none",left:"nano",right:"nano",top:"none",children:w.jsx(Ee,{className:`${ct.class}__icon`,fill:!0,image:i.icon})}):w.jsx(Ee,{className:`${ct.class}__icon`,fill:!0,image:i.icon}),s===o&&i.label]})})},o))})]})};Mi.displayName="DsStepper";const yt={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},ji=({item:t,columns:e})=>w.jsx("tr",{className:`${yt.class}__row`,children:e.map((r,s)=>{const n=r.align&&`${yt.class}__cell--align-${r.align}`;return w.jsx("td",{children:w.jsx("div",{className:[`${yt.class}__cell`,n,r.className].filter(a=>a).join(" "),children:t&&t[`${r.name}`]})},s)})});ji.displayName="DsTableRow";const xi=({columns:t,data:e,className:r})=>w.jsx("div",{className:`${yt.class}__wrapper`,children:w.jsxs("table",{className:[`${yt.class}`,r].filter(s=>s).join(" "),children:[w.jsx("thead",{className:`${yt.class}__head`,children:w.jsx("tr",{className:`${yt.class}__row`,children:t&&t.map((s,n)=>w.jsx("th",{style:{width:s.size},children:w.jsx("div",{className:[`${yt.class}__cell`,s.align&&`${yt.class}__cell--align-${s.align}`].filter(a=>a).join(" "),children:s.label})},n))})}),w.jsx("tbody",{className:`${yt.class}__body`,children:e&&e.map((s,n)=>w.jsx(ji,{columns:t,item:s},n))})]})});xi.displayName="DsTable";const Vi={None:"",Primary:"primary",Secondary:"secondary",Neutral:"neutral",Success:"success",Warning:"warning",Danger:"danger",Info:"info"},xt={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:Vi.Primary,options:Object.values(Vi)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},el=({active:t,className:e,color:r,disabled:s,name:n,index:a,title:i,onClick:o})=>{const l=[`${xt.class}__tab`,`${xt.class}__tab-color--${r}`,t&&`${xt.class}__tab--active`,s&&`${xt.class}__tab--disabled`,e&&e].join(" "),c=f=>{o&&!s&&o(f)};return w.jsx("div",{className:l,id:n,onClick:()=>c(a),children:i})},tl=({tabs:t,color:e,selectedTab:r=xt.props.selectedTab.default,className:s,onChange:n})=>{const[a,i]=j.useState(r),o=l=>{i(l),n&&n(l)};return j.useEffect(()=>i(r),[r]),w.jsxs("div",{className:[xt.class,s&&s].join(" "),children:[w.jsx("div",{className:`${xt.class}__header`,children:t.map((l,c)=>j.createElement(el,{...l,active:a===c,color:e,index:c,key:c,onClick:()=>o(c)}))}),w.jsx("div",{className:`${xt.class}__content`,children:t[a].content})]})};function Bi({library:t,children:e,theme:r}){return w.jsx("div",{"data-library":t,"data-theme":r,children:w.jsx("div",{className:"ds-theme",children:e})})}Bi.propTypes={library:h.string,children:h.node.isRequired,theme:h.string};const Li={TopLeft:"top-left",TopCenter:"top-center",TopRight:"top-right",BottomLeft:"bottom-left",BottomCenter:"bottom-center",BottomRight:"bottom-right"},Yt={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:Li.TopRight,options:Object.values(Li)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},dn=({className:t=Yt.props.className.default,position:e=Yt.props.position.default,fluid:r=Yt.props.fluid.default,notifications:s,removeNotification:n})=>{const a=[Yt.class,e?`${Yt.class}--${e}`:"",r?`${Yt.class}--fluid`:"",t&&t].join(" "),i=o=>{n&&n(o)};return w.jsx("div",{className:a,children:s.map(o=>{const l=o.autoClose??!0,c=o.autoCloseTimer??4e3,f=o.dismissible??!0,p=o.elevation??2,O=o.progressBar??!0;return w.jsx(is,{autoClose:l,autoCloseTimer:c,dismissible:f,elevation:p,handleClose:()=>i(o.id),id:o.id,message:o.message,progressBar:O,type:o.type},o.id)})})};dn.propTypes={position:h.oneOf(Yt.props.position.options),fluid:h.bool,notifications:h.array,removeNotification:h.func},dn.displayName="DsNotificationList";const os={name:"TwoColumns",class:"ds-two-columns",props:{}},fn=({header:t,main:e,sidebar:r,breadcrumb:s})=>w.jsxs(ss,{children:[w.jsxs("div",{className:"ds-grid",children:[w.jsx("div",{className:"ds-grid__row",children:w.jsx("div",{className:"ds-grid__col ds-grid__col-12",children:s})}),w.jsxs("div",{className:`${os.class}__content ds-grid__row`,children:[w.jsx("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${os.class}__header`,children:t}),w.jsx("div",{className:`${os.class}__main`,children:e})]})}),w.jsx("div",{className:`${os.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:r})]})]}),w.jsx(lt,{vertical:"sm"})]});fn.propTypes={breadcrumb:h.node,header:h.node,main:h.node,sidebar:h.node},fn.displayName="DsTwoColumns";const Ri=(t,e)=>{var r;return(r=t==null?void 0:t.errors)==null?void 0:r.reduce((s,n)=>(n.keyword==="errorMessage"||(s={...s,...rl(n,e)}),s),{})},rl=(t,e)=>{const{keyword:r,params:s}=t,n=sl(t==null?void 0:t.instancePath);let a="",i=e?e+"."+n:n;if(r.match(/min/)||r.match(/max/))return a=`Tamanho ${r.match(/min/)?"mínimo":"máximo"} de ${s==null?void 0:s.limit}`,i=pn(i),{[i]:{status:!1,message:a}};switch(r){case"required":a="Campo obrigatório",i=pn(i),i=i+"."+(s==null?void 0:s.missingProperty),i.split("")[0]==="."&&(i=i.replace(".",""));break;case"pattern":a="Insira o valor no formato correto";break;case"format":a=`Formato de ${s==null?void 0:s.format} invalido`;break;default:a="Preencha o dado corretamente";break}return i=pn(i),{[i]:{status:!1,message:a}}},sl=t=>{let e="";return t.split("")[0]==="/"&&(e=t.replace("/","")),e.replace(/\//g,".")},pn=t=>{const e=t.split("");return e[e.length-1]==="."?(e.pop(),e.join("")):t},zi=(t,e,r)=>{const s=e.pop(),n=e.reduce((a,i)=>(i in a||(a[i]={}),a[i]),t);s&&(n[s]=r)},qi=t=>{try{return{isObj:!0,parsedObj:JSON.parse(t)}}catch{return{isObj:!1,parsedObj:void 0}}},nl=t=>{const e=/^[0-9]+$/.test(t);if(t==="true"||t==="false")return JSON.parse(t);if(e)return Number(t);const{isObj:r,parsedObj:s}=qi(t);return r&&s?s:t},hn=(t,e)=>{var n;if(!t)return null;if(t.$id===e)return t;const r=a=>{if(a)for(const i of Object.values(a)){const o=hn(i,e);if(o)return o}return null};return r(t.properties)||r(t.definitions)||r((n=t.schemas)==null?void 0:n.definitions)||hn(t.items,e)||null},mn=(t,e)=>{var s;const r=(e==null?void 0:e.definitions)||((s=e==null?void 0:e.schemas)==null?void 0:s.definitions);if(!r)return console.error('No definitions found within the schema root or inside the "schemas" key.'),null;for(const n of Object.values(r)){const a=hn(n,t);if(a)return a}return null},Ui=t=>{const e=t.format;return e!=="email"&&e!=="password"?"text":e};var gn={exports:{}},Hi={},dt={},lr={},Tr={},ce={},Or={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(I){if(super(),!t.IDENTIFIER.test(I))throw new Error("CodeGen: name must be a valid identifier");this.str=I}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class s extends e{constructor(I){super(),this._items=typeof I=="string"?[I]:I}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const I=this._items[0];return I===""||I==='""'}get str(){var I;return(I=this._str)!==null&&I!==void 0?I:this._str=this._items.reduce((N,D)=>`${N}${D}`,"")}get names(){var I;return(I=this._names)!==null&&I!==void 0?I:this._names=this._items.reduce((N,D)=>(D instanceof r&&(N[D.str]=(N[D.str]||0)+1),N),{})}}t._Code=s,t.nil=new s("");function n(y,...I){const N=[y[0]];let D=0;for(;D<I.length;)o(N,I[D]),N.push(y[++D]);return new s(N)}t._=n;const a=new s("+");function i(y,...I){const N=[E(y[0])];let D=0;for(;D<I.length;)N.push(a),o(N,I[D]),N.push(a,E(y[++D]));return l(N),new s(N)}t.str=i;function o(y,I){I instanceof s?y.push(...I._items):I instanceof r?y.push(I):y.push(p(I))}t.addCodeArg=o;function l(y){let I=1;for(;I<y.length-1;){if(y[I]===a){const N=c(y[I-1],y[I+1]);if(N!==void 0){y.splice(I-1,3,N);continue}y[I++]="+"}I++}}function c(y,I){if(I==='""')return y;if(y==='""')return I;if(typeof y=="string")return I instanceof r||y[y.length-1]!=='"'?void 0:typeof I!="string"?`${y.slice(0,-1)}${I}"`:I[0]==='"'?y.slice(0,-1)+I.slice(1):void 0;if(typeof I=="string"&&I[0]==='"'&&!(y instanceof r))return`"${y}${I.slice(1)}`}function f(y,I){return I.emptyStr()?y:y.emptyStr()?I:i`${y}${I}`}t.strConcat=f;function p(y){return typeof y=="number"||typeof y=="boolean"||y===null?y:E(Array.isArray(y)?y.join(","):y)}function O(y){return new s(E(y))}t.stringify=O;function E(y){return JSON.stringify(y).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=E;function $(y){return typeof y=="string"&&t.IDENTIFIER.test(y)?new s(`.${y}`):n`[${y}]`}t.getProperty=$;function k(y){if(typeof y=="string"&&t.IDENTIFIER.test(y))return new s(`${y}`);throw new Error(`CodeGen: invalid export name: ${y}, use explicit $id name mapping`)}t.getEsmExportName=k;function _(y){return new s(y.toString())}t.regexpCode=_})(Or);var yn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Or;class r extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var s;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(s||(t.UsedValueState=s={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class n{constructor({prefixes:c,parent:f}={}){this._names={},this._prefixes=c,this._parent=f}toName(c){return c instanceof e.Name?c:this.name(c)}name(c){return new e.Name(this._newName(c))}_newName(c){const f=this._names[c]||this._nameGroup(c);return`${c}${f.index++}`}_nameGroup(c){var f,p;if(!((p=(f=this._parent)===null||f===void 0?void 0:f._prefixes)===null||p===void 0)&&p.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}t.Scope=n;class a extends e.Name{constructor(c,f){super(f),this.prefix=c}setValue(c,{property:f,itemIndex:p}){this.value=c,this.scopePath=(0,e._)`.${new e.Name(f)}[${p}]`}}t.ValueScopeName=a;const i=(0,e._)`\n`;class o extends n{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?i:e.nil}}get(){return this._scope}name(c){return new a(c,this._newName(c))}value(c,f){var p;if(f.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const O=this.toName(c),{prefix:E}=O,$=(p=f.key)!==null&&p!==void 0?p:f.ref;let k=this._values[E];if(k){const I=k.get($);if(I)return I}else k=this._values[E]=new Map;k.set($,O);const _=this._scope[E]||(this._scope[E]=[]),y=_.length;return _[y]=f.ref,O.setValue(f,{property:E,itemIndex:y}),O}getValue(c,f){const p=this._values[c];if(p)return p.get(f)}scopeRefs(c,f=this._values){return this._reduceValues(f,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,e._)`${c}${p.scopePath}`})}scopeCode(c=this._values,f,p){return this._reduceValues(c,O=>{if(O.value===void 0)throw new Error(`CodeGen: name "${O}" has no value`);return O.value.code},f,p)}_reduceValues(c,f,p={},O){let E=e.nil;for(const $ in c){const k=c[$];if(!k)continue;const _=p[$]=p[$]||new Map;k.forEach(y=>{if(_.has(y))return;_.set(y,s.Started);let I=f(y);if(I){const N=this.opts.es5?t.varKinds.var:t.varKinds.const;E=(0,e._)`${E}${N} ${y} = ${I};${this.opts._n}`}else if(I=O==null?void 0:O(y))E=(0,e._)`${E}${I}${this.opts._n}`;else throw new r(y);_.set(y,s.Completed)})}return E}}t.ValueScope=o})(yn),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Or,r=yn;var s=Or;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var n=yn;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class a{optimizeNodes(){return this}optimizeNames(u,d){return this}}class i extends a{constructor(u,d,v){super(),this.varKind=u,this.name=d,this.rhs=v}render({es5:u,_n:d}){const v=u?r.varKinds.var:this.varKind,P=this.rhs===void 0?"":` = ${this.rhs}`;return`${v} ${this.name}${P};`+d}optimizeNames(u,d){if(u[this.name.str])return this.rhs&&(this.rhs=Y(this.rhs,u,d)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class o extends a{constructor(u,d,v){super(),this.lhs=u,this.rhs=d,this.sideEffects=v}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,d){if(!(this.lhs instanceof e.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=Y(this.rhs,u,d),this}get names(){const u=this.lhs instanceof e.Name?{}:{...this.lhs.names};return re(u,this.rhs)}}class l extends o{constructor(u,d,v,P){super(u,v,P),this.op=d}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}}class c extends a{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}}class f extends a{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}}class p extends a{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}}class O extends a{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,d){return this.code=Y(this.code,u,d),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class E extends a{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((d,v)=>d+v.render(u),"")}optimizeNodes(){const{nodes:u}=this;let d=u.length;for(;d--;){const v=u[d].optimizeNodes();Array.isArray(v)?u.splice(d,1,...v):v?u[d]=v:u.splice(d,1)}return u.length>0?this:void 0}optimizeNames(u,d){const{nodes:v}=this;let P=v.length;for(;P--;){const V=v[P];V.optimizeNames(u,d)||(me(u,V.names),v.splice(P,1))}return v.length>0?this:void 0}get names(){return this.nodes.reduce((u,d)=>G(u,d.names),{})}}class $ extends E{render(u){return"{"+u._n+super.render(u)+"}"+u._n}}class k extends E{}class _ extends ${}_.kind="else";class y extends ${constructor(u,d){super(d),this.condition=u}render(u){let d=`if(${this.condition})`+super.render(u);return this.else&&(d+="else "+this.else.render(u)),d}optimizeNodes(){super.optimizeNodes();const u=this.condition;if(u===!0)return this.nodes;let d=this.else;if(d){const v=d.optimizeNodes();d=this.else=Array.isArray(v)?new _(v):v}if(d)return u===!1?d instanceof y?d:d.nodes:this.nodes.length?this:new y(ge(u),d instanceof y?[d]:d.nodes);if(!(u===!1||!this.nodes.length))return this}optimizeNames(u,d){var v;if(this.else=(v=this.else)===null||v===void 0?void 0:v.optimizeNames(u,d),!!(super.optimizeNames(u,d)||this.else))return this.condition=Y(this.condition,u,d),this}get names(){const u=super.names;return re(u,this.condition),this.else&&G(u,this.else.names),u}}y.kind="if";class I extends ${}I.kind="for";class N extends I{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,d){if(super.optimizeNames(u,d))return this.iteration=Y(this.iteration,u,d),this}get names(){return G(super.names,this.iteration.names)}}class D extends I{constructor(u,d,v,P){super(),this.varKind=u,this.name=d,this.from=v,this.to=P}render(u){const d=u.es5?r.varKinds.var:this.varKind,{name:v,from:P,to:V}=this;return`for(${d} ${v}=${P}; ${v}<${V}; ${v}++)`+super.render(u)}get names(){const u=re(super.names,this.from);return re(u,this.to)}}class b extends I{constructor(u,d,v,P){super(),this.loop=u,this.varKind=d,this.name=v,this.iterable=P}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,d){if(super.optimizeNames(u,d))return this.iterable=Y(this.iterable,u,d),this}get names(){return G(super.names,this.iterable.names)}}class B extends ${constructor(u,d,v){super(),this.name=u,this.args=d,this.async=v}render(u){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(u)}}B.kind="func";class W extends E{render(u){return"return "+super.render(u)}}W.kind="return";class U extends ${render(u){let d="try"+super.render(u);return this.catch&&(d+=this.catch.render(u)),this.finally&&(d+=this.finally.render(u)),d}optimizeNodes(){var u,d;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(d=this.finally)===null||d===void 0||d.optimizeNodes(),this}optimizeNames(u,d){var v,P;return super.optimizeNames(u,d),(v=this.catch)===null||v===void 0||v.optimizeNames(u,d),(P=this.finally)===null||P===void 0||P.optimizeNames(u,d),this}get names(){const u=super.names;return this.catch&&G(u,this.catch.names),this.finally&&G(u,this.finally.names),u}}class H extends ${constructor(u){super(),this.error=u}render(u){return`catch(${this.error})`+super.render(u)}}H.kind="catch";class ie extends ${render(u){return"finally"+super.render(u)}}ie.kind="finally";class q{constructor(u,d={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...d,_n:d.lines?`
|
|
21
|
-
`:""},this._extScope=u,this._scope=new r.Scope({parent:u}),this._nodes=[new k]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,d){const v=this._extScope.value(u,d);return(this._values[v.prefix]||(this._values[v.prefix]=new Set)).add(v),v}getScopeValue(u,d){return this._extScope.getValue(u,d)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,d,v,P){const V=this._scope.toName(d);return v!==void 0&&P&&(this._constants[V.str]=v),this._leafNode(new i(u,V,v)),V}const(u,d,v){return this._def(r.varKinds.const,u,d,v)}let(u,d,v){return this._def(r.varKinds.let,u,d,v)}var(u,d,v){return this._def(r.varKinds.var,u,d,v)}assign(u,d,v){return this._leafNode(new o(u,d,v))}add(u,d){return this._leafNode(new l(u,t.operators.ADD,d))}code(u){return typeof u=="function"?u():u!==e.nil&&this._leafNode(new O(u)),this}object(...u){const d=["{"];for(const[v,P]of u)d.length>1&&d.push(","),d.push(v),(v!==P||this.opts.es5)&&(d.push(":"),(0,e.addCodeArg)(d,P));return d.push("}"),new e._Code(d)}if(u,d,v){if(this._blockNode(new y(u)),d&&v)this.code(d).else().code(v).endIf();else if(d)this.code(d).endIf();else if(v)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(u){return this._elseNode(new y(u))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(y,_)}_for(u,d){return this._blockNode(u),d&&this.code(d).endFor(),this}for(u,d){return this._for(new N(u),d)}forRange(u,d,v,P,V=this.opts.es5?r.varKinds.var:r.varKinds.let){const L=this._scope.toName(u);return this._for(new D(V,L,d,v),()=>P(L))}forOf(u,d,v,P=r.varKinds.const){const V=this._scope.toName(u);if(this.opts.es5){const L=d instanceof e.Name?d:this.var("_arr",d);return this.forRange("_i",0,(0,e._)`${L}.length`,R=>{this.var(V,(0,e._)`${L}[${R}]`),v(V)})}return this._for(new b("of",P,V,d),()=>v(V))}forIn(u,d,v,P=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,e._)`Object.keys(${d})`,v);const V=this._scope.toName(u);return this._for(new b("in",P,V,d),()=>v(V))}endFor(){return this._endBlockNode(I)}label(u){return this._leafNode(new c(u))}break(u){return this._leafNode(new f(u))}return(u){const d=new W;if(this._blockNode(d),this.code(u),d.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(W)}try(u,d,v){if(!d&&!v)throw new Error('CodeGen: "try" without "catch" and "finally"');const P=new U;if(this._blockNode(P),this.code(u),d){const V=this.name("e");this._currNode=P.catch=new H(V),d(V)}return v&&(this._currNode=P.finally=new ie,this.code(v)),this._endBlockNode(H,ie)}throw(u){return this._leafNode(new p(u))}block(u,d){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(d),this}endBlock(u){const d=this._blockStarts.pop();if(d===void 0)throw new Error("CodeGen: not in self-balancing block");const v=this._nodes.length-d;if(v<0||u!==void 0&&v!==u)throw new Error(`CodeGen: wrong number of nodes: ${v} vs ${u} expected`);return this._nodes.length=d,this}func(u,d=e.nil,v,P){return this._blockNode(new B(u,d,v)),P&&this.code(P).endFunc(),this}endFunc(){return this._endBlockNode(B)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,d){const v=this._currNode;if(v instanceof u||d&&v instanceof d)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${d?`${u.kind}/${d.kind}`:u.kind}"`)}_elseNode(u){const d=this._currNode;if(!(d instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=d.else=u,this}get _root(){return this._nodes[0]}get _currNode(){const u=this._nodes;return u[u.length-1]}set _currNode(u){const d=this._nodes;d[d.length-1]=u}}t.CodeGen=q;function G(T,u){for(const d in u)T[d]=(T[d]||0)+(u[d]||0);return T}function re(T,u){return u instanceof e._CodeOrName?G(T,u.names):T}function Y(T,u,d){if(T instanceof e.Name)return v(T);if(!P(T))return T;return new e._Code(T._items.reduce((V,L)=>(L instanceof e.Name&&(L=v(L)),L instanceof e._Code?V.push(...L._items):V.push(L),V),[]));function v(V){const L=d[V.str];return L===void 0||u[V.str]!==1?V:(delete u[V.str],L)}function P(V){return V instanceof e._Code&&V._items.some(L=>L instanceof e.Name&&u[L.str]===1&&d[L.str]!==void 0)}}function me(T,u){for(const d in u)T[d]=(T[d]||0)-(u[d]||0)}function ge(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,e._)`!${F(T)}`}t.not=ge;const _e=g(t.operators.AND);function Ie(...T){return T.reduce(_e)}t.and=Ie;const xe=g(t.operators.OR);function A(...T){return T.reduce(xe)}t.or=A;function g(T){return(u,d)=>u===e.nil?d:d===e.nil?u:(0,e._)`${F(u)} ${T} ${F(d)}`}function F(T){return T instanceof e.Name?T:(0,e._)`(${T})`}}(ce);var K={};Object.defineProperty(K,"__esModule",{value:!0}),K.checkStrictMode=K.getErrorPath=K.Type=K.useFunc=K.setEvaluated=K.evaluatedPropsToName=K.mergeEvaluated=K.eachItem=K.unescapeJsonPointer=K.escapeJsonPointer=K.escapeFragment=K.unescapeFragment=K.schemaRefOrVal=K.schemaHasRulesButRef=K.schemaHasRules=K.checkUnknownRules=K.alwaysValidSchema=K.toHash=void 0;const $e=ce,al=Or;function il(t){const e={};for(const r of t)e[r]=!0;return e}K.toHash=il;function ol(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Ki(t,e),!Gi(e,t.self.RULES.all))}K.alwaysValidSchema=ol;function Ki(t,e=t.schema){const{opts:r,self:s}=t;if(!r.strictSchema||typeof e=="boolean")return;const n=s.RULES.keywords;for(const a in e)n[a]||Zi(t,`unknown keyword: "${a}"`)}K.checkUnknownRules=Ki;function Gi(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(e[r])return!0;return!1}K.schemaHasRules=Gi;function ul(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}K.schemaHasRulesButRef=ul;function ll({topSchemaRef:t,schemaPath:e},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,$e._)`${r}`}return(0,$e._)`${t}${e}${(0,$e.getProperty)(s)}`}K.schemaRefOrVal=ll;function cl(t){return Wi(decodeURIComponent(t))}K.unescapeFragment=cl;function dl(t){return encodeURIComponent(vn(t))}K.escapeFragment=dl;function vn(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}K.escapeJsonPointer=vn;function Wi(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}K.unescapeJsonPointer=Wi;function fl(t,e){if(Array.isArray(t))for(const r of t)e(r);else e(t)}K.eachItem=fl;function Yi({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:s}){return(n,a,i,o)=>{const l=i===void 0?a:i instanceof $e.Name?(a instanceof $e.Name?t(n,a,i):e(n,a,i),i):a instanceof $e.Name?(e(n,i,a),a):r(a,i);return o===$e.Name&&!(l instanceof $e.Name)?s(n,l):l}}K.mergeEvaluated={props:Yi({mergeNames:(t,e,r)=>t.if((0,$e._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,$e._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,$e._)`${r} || {}`).code((0,$e._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,$e._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,$e._)`${r} || {}`),_n(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Xi}),items:Yi({mergeNames:(t,e,r)=>t.if((0,$e._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,$e._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,$e._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,$e._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Xi(t,e){if(e===!0)return t.var("props",!0);const r=t.var("props",(0,$e._)`{}`);return e!==void 0&&_n(t,r,e),r}K.evaluatedPropsToName=Xi;function _n(t,e,r){Object.keys(r).forEach(s=>t.assign((0,$e._)`${e}${(0,$e.getProperty)(s)}`,!0))}K.setEvaluated=_n;const Ji={};function pl(t,e){return t.scopeValue("func",{ref:e,code:Ji[e.code]||(Ji[e.code]=new al._Code(e.code))})}K.useFunc=pl;var bn;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(bn||(K.Type=bn={}));function hl(t,e,r){if(t instanceof $e.Name){const s=e===bn.Num;return r?s?(0,$e._)`"[" + ${t} + "]"`:(0,$e._)`"['" + ${t} + "']"`:s?(0,$e._)`"/" + ${t}`:(0,$e._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,$e.getProperty)(t).toString():"/"+vn(t)}K.getErrorPath=hl;function Zi(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}K.checkStrictMode=Zi;var vt={};Object.defineProperty(vt,"__esModule",{value:!0});const Ke=ce,ml={data:new Ke.Name("data"),valCxt:new Ke.Name("valCxt"),instancePath:new Ke.Name("instancePath"),parentData:new Ke.Name("parentData"),parentDataProperty:new Ke.Name("parentDataProperty"),rootData:new Ke.Name("rootData"),dynamicAnchors:new Ke.Name("dynamicAnchors"),vErrors:new Ke.Name("vErrors"),errors:new Ke.Name("errors"),this:new Ke.Name("this"),self:new Ke.Name("self"),scope:new Ke.Name("scope"),json:new Ke.Name("json"),jsonPos:new Ke.Name("jsonPos"),jsonLen:new Ke.Name("jsonLen"),jsonPart:new Ke.Name("jsonPart")};vt.default=ml,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=ce,r=K,s=vt;t.keywordError={message:({keyword:_})=>(0,e.str)`must pass "${_}" keyword validation`},t.keyword$DataError={message:({keyword:_,schemaType:y})=>y?(0,e.str)`"${_}" keyword must be ${y} ($data)`:(0,e.str)`"${_}" keyword is invalid ($data)`};function n(_,y=t.keywordError,I,N){const{it:D}=_,{gen:b,compositeRule:B,allErrors:W}=D,U=p(_,y,I);N??(B||W)?l(b,U):c(D,(0,e._)`[${U}]`)}t.reportError=n;function a(_,y=t.keywordError,I){const{it:N}=_,{gen:D,compositeRule:b,allErrors:B}=N,W=p(_,y,I);l(D,W),b||B||c(N,s.default.vErrors)}t.reportExtraError=a;function i(_,y){_.assign(s.default.errors,y),_.if((0,e._)`${s.default.vErrors} !== null`,()=>_.if(y,()=>_.assign((0,e._)`${s.default.vErrors}.length`,y),()=>_.assign(s.default.vErrors,null)))}t.resetErrorsCount=i;function o({gen:_,keyword:y,schemaValue:I,data:N,errsCount:D,it:b}){if(D===void 0)throw new Error("ajv implementation error");const B=_.name("err");_.forRange("i",D,s.default.errors,W=>{_.const(B,(0,e._)`${s.default.vErrors}[${W}]`),_.if((0,e._)`${B}.instancePath === undefined`,()=>_.assign((0,e._)`${B}.instancePath`,(0,e.strConcat)(s.default.instancePath,b.errorPath))),_.assign((0,e._)`${B}.schemaPath`,(0,e.str)`${b.errSchemaPath}/${y}`),b.opts.verbose&&(_.assign((0,e._)`${B}.schema`,I),_.assign((0,e._)`${B}.data`,N))})}t.extendErrors=o;function l(_,y){const I=_.const("err",y);_.if((0,e._)`${s.default.vErrors} === null`,()=>_.assign(s.default.vErrors,(0,e._)`[${I}]`),(0,e._)`${s.default.vErrors}.push(${I})`),_.code((0,e._)`${s.default.errors}++`)}function c(_,y){const{gen:I,validateName:N,schemaEnv:D}=_;D.$async?I.throw((0,e._)`new ${_.ValidationError}(${y})`):(I.assign((0,e._)`${N}.errors`,y),I.return(!1))}const f={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function p(_,y,I){const{createErrors:N}=_.it;return N===!1?(0,e._)`{}`:O(_,y,I)}function O(_,y,I={}){const{gen:N,it:D}=_,b=[E(D,I),$(_,I)];return k(_,y,b),N.object(...b)}function E({errorPath:_},{instancePath:y}){const I=y?(0,e.str)`${_}${(0,r.getErrorPath)(y,r.Type.Str)}`:_;return[s.default.instancePath,(0,e.strConcat)(s.default.instancePath,I)]}function $({keyword:_,it:{errSchemaPath:y}},{schemaPath:I,parentSchema:N}){let D=N?y:(0,e.str)`${y}/${_}`;return I&&(D=(0,e.str)`${D}${(0,r.getErrorPath)(I,r.Type.Str)}`),[f.schemaPath,D]}function k(_,{params:y,message:I},N){const{keyword:D,data:b,schemaValue:B,it:W}=_,{opts:U,propertyName:H,topSchemaRef:ie,schemaPath:q}=W;N.push([f.keyword,D],[f.params,typeof y=="function"?y(_):y||(0,e._)`{}`]),U.messages&&N.push([f.message,typeof I=="function"?I(_):I]),U.verbose&&N.push([f.schema,B],[f.parentSchema,(0,e._)`${ie}${q}`],[s.default.data,b]),H&&N.push([f.propertyName,H])}}(Tr),Object.defineProperty(lr,"__esModule",{value:!0}),lr.boolOrEmptySchema=lr.topBoolOrEmptySchema=void 0;const gl=Tr,yl=ce,vl=vt,_l={message:"boolean schema is false"};function bl(t){const{gen:e,schema:r,validateName:s}=t;r===!1?Qi(t,!1):typeof r=="object"&&r.$async===!0?e.return(vl.default.data):(e.assign((0,yl._)`${s}.errors`,null),e.return(!0))}lr.topBoolOrEmptySchema=bl;function $l(t,e){const{gen:r,schema:s}=t;s===!1?(r.var(e,!1),Qi(t)):r.var(e,!0)}lr.boolOrEmptySchema=$l;function Qi(t,e){const{gen:r,data:s}=t,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,gl.reportError)(n,_l,void 0,e)}var je={},Xt={};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.getRules=Xt.isJSONType=void 0;const Sl=["string","number","integer","boolean","null","object","array"],El=new Set(Sl);function kl(t){return typeof t=="string"&&El.has(t)}Xt.isJSONType=kl;function wl(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Xt.getRules=wl;var Pt={};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.shouldUseRule=Pt.shouldUseGroup=Pt.schemaHasRulesForType=void 0;function Cl({schema:t,self:e},r){const s=e.RULES.types[r];return s&&s!==!0&&eo(t,s)}Pt.schemaHasRulesForType=Cl;function eo(t,e){return e.rules.some(r=>to(t,r))}Pt.shouldUseGroup=eo;function to(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(s=>t[s]!==void 0))}Pt.shouldUseRule=to,Object.defineProperty(je,"__esModule",{value:!0}),je.reportTypeError=je.checkDataTypes=je.checkDataType=je.coerceAndCheckDataType=je.getJSONTypes=je.getSchemaTypes=je.DataType=void 0;const Tl=Xt,Ol=Pt,Al=Tr,oe=ce,ro=K;var cr;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(cr||(je.DataType=cr={}));function Dl(t){const e=so(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}je.getSchemaTypes=Dl;function so(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(Tl.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}je.getJSONTypes=so;function Il(t,e){const{gen:r,data:s,opts:n}=t,a=Nl(e,n.coerceTypes),i=e.length>0&&!(a.length===0&&e.length===1&&(0,Ol.schemaHasRulesForType)(t,e[0]));if(i){const o=Sn(e,s,n.strictNumbers,cr.Wrong);r.if(o,()=>{a.length?Pl(t,e,a):En(t)})}return i}je.coerceAndCheckDataType=Il;const no=new Set(["string","number","integer","boolean","null"]);function Nl(t,e){return e?t.filter(r=>no.has(r)||e==="array"&&r==="array"):[]}function Pl(t,e,r){const{gen:s,data:n,opts:a}=t,i=s.let("dataType",(0,oe._)`typeof ${n}`),o=s.let("coerced",(0,oe._)`undefined`);a.coerceTypes==="array"&&s.if((0,oe._)`${i} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,oe._)`${n}[0]`).assign(i,(0,oe._)`typeof ${n}`).if(Sn(e,n,a.strictNumbers),()=>s.assign(o,n))),s.if((0,oe._)`${o} !== undefined`);for(const c of r)(no.has(c)||c==="array"&&a.coerceTypes==="array")&&l(c);s.else(),En(t),s.endIf(),s.if((0,oe._)`${o} !== undefined`,()=>{s.assign(n,o),Fl(t,o)});function l(c){switch(c){case"string":s.elseIf((0,oe._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,oe._)`"" + ${n}`).elseIf((0,oe._)`${n} === null`).assign(o,(0,oe._)`""`);return;case"number":s.elseIf((0,oe._)`${i} == "boolean" || ${n} === null
|
|
22
|
-
|| (${i} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,
|
|
23
|
-
|| (${i} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,
|
|
24
|
-
|| ${i} === "boolean" || ${n} === null`).assign(o,(0,oe._)`[${n}]`)}}}function Fl({gen:t,parentData:e,parentDataProperty:r},s){t.if((0,oe._)`${e} !== undefined`,()=>t.assign((0,oe._)`${e}[${r}]`,s))}function $n(t,e,r,s=cr.Correct){const n=s===cr.Correct?oe.operators.EQ:oe.operators.NEQ;let a;switch(t){case"null":return(0,oe._)`${e} ${n} null`;case"array":a=(0,oe._)`Array.isArray(${e})`;break;case"object":a=(0,oe._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=i((0,oe._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=i();break;default:return(0,oe._)`typeof ${e} ${n} ${t}`}return s===cr.Correct?a:(0,oe.not)(a);function i(o=oe.nil){return(0,oe.and)((0,oe._)`typeof ${e} == "number"`,o,r?(0,oe._)`isFinite(${e})`:oe.nil)}}je.checkDataType=$n;function Sn(t,e,r,s){if(t.length===1)return $n(t[0],e,r,s);let n;const a=(0,ro.toHash)(t);if(a.array&&a.object){const i=(0,oe._)`typeof ${e} != "object"`;n=a.null?i:(0,oe._)`!${e} || ${i}`,delete a.null,delete a.array,delete a.object}else n=oe.nil;a.number&&delete a.integer;for(const i in a)n=(0,oe.and)(n,$n(i,e,r,s));return n}je.checkDataTypes=Sn;const Ml={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,oe._)`{type: ${t}}`:(0,oe._)`{type: ${e}}`};function En(t){const e=jl(t);(0,Al.reportError)(e,Ml)}je.reportTypeError=En;function jl(t){const{gen:e,data:r,schema:s}=t,n=(0,ro.schemaRefOrVal)(t,s,"type");return{gen:e,keyword:"type",data:r,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:t}}var us={};Object.defineProperty(us,"__esModule",{value:!0}),us.assignDefaults=void 0;const dr=ce,xl=K;function Vl(t,e){const{properties:r,items:s}=t.schema;if(e==="object"&&r)for(const n in r)ao(t,n,r[n].default);else e==="array"&&Array.isArray(s)&&s.forEach((n,a)=>ao(t,a,n.default))}us.assignDefaults=Vl;function ao(t,e,r){const{gen:s,compositeRule:n,data:a,opts:i}=t;if(r===void 0)return;const o=(0,dr._)`${a}${(0,dr.getProperty)(e)}`;if(n){(0,xl.checkStrictMode)(t,`default is ignored for: ${o}`);return}let l=(0,dr._)`${o} === undefined`;i.useDefaults==="empty"&&(l=(0,dr._)`${l} || ${o} === null || ${o} === ""`),s.if(l,(0,dr._)`${o} = ${(0,dr.stringify)(r)}`)}var _t={},de={};Object.defineProperty(de,"__esModule",{value:!0}),de.validateUnion=de.validateArray=de.usePattern=de.callValidateCode=de.schemaProperties=de.allSchemaProperties=de.noPropertyInData=de.propertyInData=de.isOwnProperty=de.hasPropFunc=de.reportMissingProp=de.checkMissingProp=de.checkReportMissingProp=void 0;const ke=ce,kn=K,Vt=vt,Bl=K;function Ll(t,e){const{gen:r,data:s,it:n}=t;r.if(Cn(r,s,e,n.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ke._)`${e}`},!0),t.error()})}de.checkReportMissingProp=Ll;function Rl({gen:t,data:e,it:{opts:r}},s,n){return(0,ke.or)(...s.map(a=>(0,ke.and)(Cn(t,e,a,r.ownProperties),(0,ke._)`${n} = ${a}`)))}de.checkMissingProp=Rl;function zl(t,e){t.setParams({missingProperty:e},!0),t.error()}de.reportMissingProp=zl;function io(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ke._)`Object.prototype.hasOwnProperty`})}de.hasPropFunc=io;function wn(t,e,r){return(0,ke._)`${io(t)}.call(${e}, ${r})`}de.isOwnProperty=wn;function ql(t,e,r,s){const n=(0,ke._)`${e}${(0,ke.getProperty)(r)} !== undefined`;return s?(0,ke._)`${n} && ${wn(t,e,r)}`:n}de.propertyInData=ql;function Cn(t,e,r,s){const n=(0,ke._)`${e}${(0,ke.getProperty)(r)} === undefined`;return s?(0,ke.or)(n,(0,ke.not)(wn(t,e,r))):n}de.noPropertyInData=Cn;function oo(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}de.allSchemaProperties=oo;function Ul(t,e){return oo(e).filter(r=>!(0,kn.alwaysValidSchema)(t,e[r]))}de.schemaProperties=Ul;function Hl({schemaCode:t,data:e,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:a},it:i},o,l,c){const f=c?(0,ke._)`${t}, ${e}, ${s}${n}`:e,p=[[Vt.default.instancePath,(0,ke.strConcat)(Vt.default.instancePath,a)],[Vt.default.parentData,i.parentData],[Vt.default.parentDataProperty,i.parentDataProperty],[Vt.default.rootData,Vt.default.rootData]];i.opts.dynamicRef&&p.push([Vt.default.dynamicAnchors,Vt.default.dynamicAnchors]);const O=(0,ke._)`${f}, ${r.object(...p)}`;return l!==ke.nil?(0,ke._)`${o}.call(${l}, ${O})`:(0,ke._)`${o}(${O})`}de.callValidateCode=Hl;const Kl=(0,ke._)`new RegExp`;function Gl({gen:t,it:{opts:e}},r){const s=e.unicodeRegExp?"u":"",{regExp:n}=e.code,a=n(r,s);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,ke._)`${n.code==="new RegExp"?Kl:(0,Bl.useFunc)(t,n)}(${r}, ${s})`})}de.usePattern=Gl;function Wl(t){const{gen:e,data:r,keyword:s,it:n}=t,a=e.name("valid");if(n.allErrors){const o=e.let("valid",!0);return i(()=>e.assign(o,!1)),o}return e.var(a,!0),i(()=>e.break()),a;function i(o){const l=e.const("len",(0,ke._)`${r}.length`);e.forRange("i",0,l,c=>{t.subschema({keyword:s,dataProp:c,dataPropType:kn.Type.Num},a),e.if((0,ke.not)(a),o)})}}de.validateArray=Wl;function Yl(t){const{gen:e,schema:r,keyword:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,kn.alwaysValidSchema)(n,l))&&!n.opts.unevaluated)return;const i=e.let("valid",!1),o=e.name("_valid");e.block(()=>r.forEach((l,c)=>{const f=t.subschema({keyword:s,schemaProp:c,compositeRule:!0},o);e.assign(i,(0,ke._)`${i} || ${o}`),t.mergeValidEvaluated(f,o)||e.if((0,ke.not)(i))})),t.result(i,()=>t.reset(),()=>t.error(!0))}de.validateUnion=Yl,Object.defineProperty(_t,"__esModule",{value:!0}),_t.validateKeywordUsage=_t.validSchemaType=_t.funcKeywordCode=_t.macroKeywordCode=void 0;const Ge=ce,Jt=vt,Xl=de,Jl=Tr;function Zl(t,e){const{gen:r,keyword:s,schema:n,parentSchema:a,it:i}=t,o=e.macro.call(i.self,n,a,i),l=lo(r,s,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);const c=r.name("valid");t.subschema({schema:o,schemaPath:Ge.nil,errSchemaPath:`${i.errSchemaPath}/${s}`,topSchemaRef:l,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}_t.macroKeywordCode=Zl;function Ql(t,e){var r;const{gen:s,keyword:n,schema:a,parentSchema:i,$data:o,it:l}=t;tc(l,e);const c=!o&&e.compile?e.compile.call(l.self,a,i,l):e.validate,f=lo(s,n,c),p=s.let("valid");t.block$data(p,O),t.ok((r=e.valid)!==null&&r!==void 0?r:p);function O(){if(e.errors===!1)k(),e.modifying&&uo(t),_(()=>t.error());else{const y=e.async?E():$();e.modifying&&uo(t),_(()=>ec(t,y))}}function E(){const y=s.let("ruleErrs",null);return s.try(()=>k((0,Ge._)`await `),I=>s.assign(p,!1).if((0,Ge._)`${I} instanceof ${l.ValidationError}`,()=>s.assign(y,(0,Ge._)`${I}.errors`),()=>s.throw(I))),y}function $(){const y=(0,Ge._)`${f}.errors`;return s.assign(y,null),k(Ge.nil),y}function k(y=e.async?(0,Ge._)`await `:Ge.nil){const I=l.opts.passContext?Jt.default.this:Jt.default.self,N=!("compile"in e&&!o||e.schema===!1);s.assign(p,(0,Ge._)`${y}${(0,Xl.callValidateCode)(t,f,I,N)}`,e.modifying)}function _(y){var I;s.if((0,Ge.not)((I=e.valid)!==null&&I!==void 0?I:p),y)}}_t.funcKeywordCode=Ql;function uo(t){const{gen:e,data:r,it:s}=t;e.if(s.parentData,()=>e.assign(r,(0,Ge._)`${s.parentData}[${s.parentDataProperty}]`))}function ec(t,e){const{gen:r}=t;r.if((0,Ge._)`Array.isArray(${e})`,()=>{r.assign(Jt.default.vErrors,(0,Ge._)`${Jt.default.vErrors} === null ? ${e} : ${Jt.default.vErrors}.concat(${e})`).assign(Jt.default.errors,(0,Ge._)`${Jt.default.vErrors}.length`),(0,Jl.extendErrors)(t)},()=>t.error())}function tc({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function lo(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ge.stringify)(r)})}function rc(t,e,r=!1){return!e.length||e.some(s=>s==="array"?Array.isArray(t):s==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==s||r&&typeof t>"u")}_t.validSchemaType=rc;function sc({schema:t,opts:e,self:r,errSchemaPath:s},n,a){if(Array.isArray(n.keyword)?!n.keyword.includes(a):n.keyword!==a)throw new Error("ajv implementation error");const i=n.dependencies;if(i!=null&&i.some(o=>!Object.prototype.hasOwnProperty.call(t,o)))throw new Error(`parent schema must have dependencies of ${a}: ${i.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[a])){const l=`keyword "${a}" value is invalid at path "${s}": `+r.errorsText(n.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}_t.validateKeywordUsage=sc;var Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.extendSubschemaMode=Bt.extendSubschemaData=Bt.getSubschema=void 0;const bt=ce,co=K;function nc(t,{keyword:e,schemaProp:r,schema:s,schemaPath:n,errSchemaPath:a,topSchemaRef:i}){if(e!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const o=t.schema[e];return r===void 0?{schema:o,schemaPath:(0,bt._)`${t.schemaPath}${(0,bt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:o[r],schemaPath:(0,bt._)`${t.schemaPath}${(0,bt.getProperty)(e)}${(0,bt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,co.escapeFragment)(r)}`}}if(s!==void 0){if(n===void 0||a===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:n,topSchemaRef:i,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}Bt.getSubschema=nc;function ac(t,e,{dataProp:r,dataPropType:s,data:n,dataTypes:a,propertyName:i}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:o}=e;if(r!==void 0){const{errorPath:c,dataPathArr:f,opts:p}=e,O=o.let("data",(0,bt._)`${e.data}${(0,bt.getProperty)(r)}`,!0);l(O),t.errorPath=(0,bt.str)`${c}${(0,co.getErrorPath)(r,s,p.jsPropertySyntax)}`,t.parentDataProperty=(0,bt._)`${r}`,t.dataPathArr=[...f,t.parentDataProperty]}if(n!==void 0){const c=n instanceof bt.Name?n:o.let("data",n,!0);l(c),i!==void 0&&(t.propertyName=i)}a&&(t.dataTypes=a);function l(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}Bt.extendSubschemaData=ac;function ic(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:s,createErrors:n,allErrors:a}){s!==void 0&&(t.compositeRule=s),n!==void 0&&(t.createErrors=n),a!==void 0&&(t.allErrors=a),t.jtdDiscriminator=e,t.jtdMetadata=r}Bt.extendSubschemaMode=ic;var Re={},fo=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var s,n,a;if(Array.isArray(e)){if(s=e.length,s!=r.length)return!1;for(n=s;n--!==0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),s=a.length,s!==Object.keys(r).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=s;n--!==0;){var i=a[n];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r},po={exports:{}},Lt=po.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var s=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};ls(e,s,n,t,"",t)};Lt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Lt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Lt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Lt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ls(t,e,r,s,n,a,i,o,l,c){if(s&&typeof s=="object"&&!Array.isArray(s)){e(s,n,a,i,o,l,c);for(var f in s){var p=s[f];if(Array.isArray(p)){if(f in Lt.arrayKeywords)for(var O=0;O<p.length;O++)ls(t,e,r,p[O],n+"/"+f+"/"+O,a,n,f,s,O)}else if(f in Lt.propsKeywords){if(p&&typeof p=="object")for(var E in p)ls(t,e,r,p[E],n+"/"+f+"/"+oc(E),a,n,f,s,E)}else(f in Lt.keywords||t.allKeys&&!(f in Lt.skipKeywords))&&ls(t,e,r,p,n+"/"+f,a,n,f,s)}r(s,n,a,i,o,l,c)}}function oc(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}var uc=po.exports;Object.defineProperty(Re,"__esModule",{value:!0}),Re.getSchemaRefs=Re.resolveUrl=Re.normalizeId=Re._getFullPath=Re.getFullPath=Re.inlineRef=void 0;const lc=K,cc=fo,dc=uc,fc=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function pc(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Tn(t):e?ho(t)<=e:!1}Re.inlineRef=pc;const hc=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Tn(t){for(const e in t){if(hc.has(e))return!0;const r=t[e];if(Array.isArray(r)&&r.some(Tn)||typeof r=="object"&&Tn(r))return!0}return!1}function ho(t){let e=0;for(const r in t){if(r==="$ref")return 1/0;if(e++,!fc.has(r)&&(typeof t[r]=="object"&&(0,lc.eachItem)(t[r],s=>e+=ho(s)),e===1/0))return 1/0}return e}function mo(t,e="",r){r!==!1&&(e=fr(e));const s=t.parse(e);return go(t,s)}Re.getFullPath=mo;function go(t,e){return t.serialize(e).split("#")[0]+"#"}Re._getFullPath=go;const mc=/#\/?$/;function fr(t){return t?t.replace(mc,""):""}Re.normalizeId=fr;function gc(t,e,r){return r=fr(r),t.resolve(e,r)}Re.resolveUrl=gc;const yc=/^[a-z_][-a-z0-9._]*$/i;function vc(t,e){if(typeof t=="boolean")return{};const{schemaId:r,uriResolver:s}=this.opts,n=fr(t[r]||e),a={"":n},i=mo(s,n,!1),o={},l=new Set;return dc(t,{allKeys:!0},(p,O,E,$)=>{if($===void 0)return;const k=i+O;let _=a[$];typeof p[r]=="string"&&(_=y.call(this,p[r])),I.call(this,p.$anchor),I.call(this,p.$dynamicAnchor),a[O]=_;function y(N){const D=this.opts.uriResolver.resolve;if(N=fr(_?D(_,N):N),l.has(N))throw f(N);l.add(N);let b=this.refs[N];return typeof b=="string"&&(b=this.refs[b]),typeof b=="object"?c(p,b.schema,N):N!==fr(k)&&(N[0]==="#"?(c(p,o[N],N),o[N]=p):this.refs[N]=k),N}function I(N){if(typeof N=="string"){if(!yc.test(N))throw new Error(`invalid anchor "${N}"`);y.call(this,`#${N}`)}}}),o;function c(p,O,E){if(O!==void 0&&!cc(p,O))throw f(E)}function f(p){return new Error(`reference "${p}" resolves to more than one schema`)}}Re.getSchemaRefs=vc,Object.defineProperty(dt,"__esModule",{value:!0}),dt.getData=dt.KeywordCxt=dt.validateFunctionCode=void 0;const yo=lr,vo=je,On=Pt,cs=je,_c=us,Ar=_t,An=Bt,X=ce,ne=vt,bc=Re,Ft=K,Dr=Tr;function $c(t){if(So(t)&&(Eo(t),$o(t))){kc(t);return}_o(t,()=>(0,yo.topBoolOrEmptySchema)(t))}dt.validateFunctionCode=$c;function _o({gen:t,validateName:e,schema:r,schemaEnv:s,opts:n},a){n.code.es5?t.func(e,(0,X._)`${ne.default.data}, ${ne.default.valCxt}`,s.$async,()=>{t.code((0,X._)`"use strict"; ${bo(r,n)}`),Ec(t,n),t.code(a)}):t.func(e,(0,X._)`${ne.default.data}, ${Sc(n)}`,s.$async,()=>t.code(bo(r,n)).code(a))}function Sc(t){return(0,X._)`{${ne.default.instancePath}="", ${ne.default.parentData}, ${ne.default.parentDataProperty}, ${ne.default.rootData}=${ne.default.data}${t.dynamicRef?(0,X._)`, ${ne.default.dynamicAnchors}={}`:X.nil}}={}`}function Ec(t,e){t.if(ne.default.valCxt,()=>{t.var(ne.default.instancePath,(0,X._)`${ne.default.valCxt}.${ne.default.instancePath}`),t.var(ne.default.parentData,(0,X._)`${ne.default.valCxt}.${ne.default.parentData}`),t.var(ne.default.parentDataProperty,(0,X._)`${ne.default.valCxt}.${ne.default.parentDataProperty}`),t.var(ne.default.rootData,(0,X._)`${ne.default.valCxt}.${ne.default.rootData}`),e.dynamicRef&&t.var(ne.default.dynamicAnchors,(0,X._)`${ne.default.valCxt}.${ne.default.dynamicAnchors}`)},()=>{t.var(ne.default.instancePath,(0,X._)`""`),t.var(ne.default.parentData,(0,X._)`undefined`),t.var(ne.default.parentDataProperty,(0,X._)`undefined`),t.var(ne.default.rootData,ne.default.data),e.dynamicRef&&t.var(ne.default.dynamicAnchors,(0,X._)`{}`)})}function kc(t){const{schema:e,opts:r,gen:s}=t;_o(t,()=>{r.$comment&&e.$comment&&wo(t),Ac(t),s.let(ne.default.vErrors,null),s.let(ne.default.errors,0),r.unevaluated&&wc(t),ko(t),Nc(t)})}function wc(t){const{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,X._)`${r}.evaluated`),e.if((0,X._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,X._)`${t.evaluated}.props`,(0,X._)`undefined`)),e.if((0,X._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,X._)`${t.evaluated}.items`,(0,X._)`undefined`))}function bo(t,e){const r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,X._)`/*# sourceURL=${r} */`:X.nil}function Cc(t,e){if(So(t)&&(Eo(t),$o(t))){Tc(t,e);return}(0,yo.boolOrEmptySchema)(t,e)}function $o({schema:t,self:e}){if(typeof t=="boolean")return!t;for(const r in t)if(e.RULES.all[r])return!0;return!1}function So(t){return typeof t.schema!="boolean"}function Tc(t,e){const{schema:r,gen:s,opts:n}=t;n.$comment&&r.$comment&&wo(t),Dc(t),Ic(t);const a=s.const("_errs",ne.default.errors);ko(t,a),s.var(e,(0,X._)`${a} === ${ne.default.errors}`)}function Eo(t){(0,Ft.checkUnknownRules)(t),Oc(t)}function ko(t,e){if(t.opts.jtd)return Co(t,[],!1,e);const r=(0,vo.getSchemaTypes)(t.schema),s=(0,vo.coerceAndCheckDataType)(t,r);Co(t,r,!s,e)}function Oc(t){const{schema:e,errSchemaPath:r,opts:s,self:n}=t;e.$ref&&s.ignoreKeywordsWithRef&&(0,Ft.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Ac(t){const{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ft.checkStrictMode)(t,"default is ignored in the schema root")}function Dc(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,bc.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Ic(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function wo({gen:t,schemaEnv:e,schema:r,errSchemaPath:s,opts:n}){const a=r.$comment;if(n.$comment===!0)t.code((0,X._)`${ne.default.self}.logger.log(${a})`);else if(typeof n.$comment=="function"){const i=(0,X.str)`${s}/$comment`,o=t.scopeValue("root",{ref:e.root});t.code((0,X._)`${ne.default.self}.opts.$comment(${a}, ${i}, ${o}.schema)`)}}function Nc(t){const{gen:e,schemaEnv:r,validateName:s,ValidationError:n,opts:a}=t;r.$async?e.if((0,X._)`${ne.default.errors} === 0`,()=>e.return(ne.default.data),()=>e.throw((0,X._)`new ${n}(${ne.default.vErrors})`)):(e.assign((0,X._)`${s}.errors`,ne.default.vErrors),a.unevaluated&&Pc(t),e.return((0,X._)`${ne.default.errors} === 0`))}function Pc({gen:t,evaluated:e,props:r,items:s}){r instanceof X.Name&&t.assign((0,X._)`${e}.props`,r),s instanceof X.Name&&t.assign((0,X._)`${e}.items`,s)}function Co(t,e,r,s){const{gen:n,schema:a,data:i,allErrors:o,opts:l,self:c}=t,{RULES:f}=c;if(a.$ref&&(l.ignoreKeywordsWithRef||!(0,Ft.schemaHasRulesButRef)(a,f))){n.block(()=>Do(t,"$ref",f.all.$ref.definition));return}l.jtd||Fc(t,e),n.block(()=>{for(const O of f.rules)p(O);p(f.post)});function p(O){(0,On.shouldUseGroup)(a,O)&&(O.type?(n.if((0,cs.checkDataType)(O.type,i,l.strictNumbers)),To(t,O),e.length===1&&e[0]===O.type&&r&&(n.else(),(0,cs.reportTypeError)(t)),n.endIf()):To(t,O),o||n.if((0,X._)`${ne.default.errors} === ${s||0}`))}}function To(t,e){const{gen:r,schema:s,opts:{useDefaults:n}}=t;n&&(0,_c.assignDefaults)(t,e.type),r.block(()=>{for(const a of e.rules)(0,On.shouldUseRule)(s,a)&&Do(t,a.keyword,a.definition,e.type)})}function Fc(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Mc(t,e),t.opts.allowUnionTypes||jc(t,e),xc(t,t.dataTypes))}function Mc(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Oo(t.dataTypes,r)||Dn(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Bc(t,e)}}function jc(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Dn(t,"use allowUnionTypes to allow union type keyword")}function xc(t,e){const r=t.self.RULES.all;for(const s in r){const n=r[s];if(typeof n=="object"&&(0,On.shouldUseRule)(t.schema,n)){const{type:a}=n.definition;a.length&&!a.some(i=>Vc(e,i))&&Dn(t,`missing type "${a.join(",")}" for keyword "${s}"`)}}}function Vc(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Oo(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Bc(t,e){const r=[];for(const s of t.dataTypes)Oo(e,s)?r.push(s):e.includes("integer")&&s==="number"&&r.push("integer");t.dataTypes=r}function Dn(t,e){const r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Ft.checkStrictMode)(t,e,t.opts.strictTypes)}class Ao{constructor(e,r,s){if((0,Ar.validateKeywordUsage)(e,r,s),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=s,this.data=e.data,this.schema=e.schema[s],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ft.schemaRefOrVal)(e,this.schema,s,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Io(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Ar.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${s} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",ne.default.errors))}result(e,r,s){this.failResult((0,X.not)(e),r,s)}failResult(e,r,s){this.gen.if(e),s?s():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,X.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:r}=this;this.fail((0,X._)`${r} !== undefined && (${(0,X.or)(this.invalid$data(),e)})`)}error(e,r,s){if(r){this.setParams(r),this._error(e,s),this.setParams({});return}this._error(e,s)}_error(e,r){(e?Dr.reportExtraError:Dr.reportError)(this,this.def.error,r)}$dataError(){(0,Dr.reportError)(this,this.def.$dataError||Dr.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Dr.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,s=X.nil){this.gen.block(()=>{this.check$data(e,s),r()})}check$data(e=X.nil,r=X.nil){if(!this.$data)return;const{gen:s,schemaCode:n,schemaType:a,def:i}=this;s.if((0,X.or)((0,X._)`${n} === undefined`,r)),e!==X.nil&&s.assign(e,!0),(a.length||i.validateSchema)&&(s.elseIf(this.invalid$data()),this.$dataError(),e!==X.nil&&s.assign(e,!1)),s.else()}invalid$data(){const{gen:e,schemaCode:r,schemaType:s,def:n,it:a}=this;return(0,X.or)(i(),o());function i(){if(s.length){if(!(r instanceof X.Name))throw new Error("ajv implementation error");const l=Array.isArray(s)?s:[s];return(0,X._)`${(0,cs.checkDataTypes)(l,r,a.opts.strictNumbers,cs.DataType.Wrong)}`}return X.nil}function o(){if(n.validateSchema){const l=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,X._)`!${l}(${r})`}return X.nil}}subschema(e,r){const s=(0,An.getSubschema)(this.it,e);(0,An.extendSubschemaData)(s,this.it,e),(0,An.extendSubschemaMode)(s,e);const n={...this.it,...s,items:void 0,props:void 0};return Cc(n,r),n}mergeEvaluated(e,r){const{it:s,gen:n}=this;s.opts.unevaluated&&(s.props!==!0&&e.props!==void 0&&(s.props=Ft.mergeEvaluated.props(n,e.props,s.props,r)),s.items!==!0&&e.items!==void 0&&(s.items=Ft.mergeEvaluated.items(n,e.items,s.items,r)))}mergeValidEvaluated(e,r){const{it:s,gen:n}=this;if(s.opts.unevaluated&&(s.props!==!0||s.items!==!0))return n.if(r,()=>this.mergeEvaluated(e,X.Name)),!0}}dt.KeywordCxt=Ao;function Do(t,e,r,s){const n=new Ao(t,r,e);"code"in r?r.code(n,s):n.$data&&r.validate?(0,Ar.funcKeywordCode)(n,r):"macro"in r?(0,Ar.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Ar.funcKeywordCode)(n,r)}const Lc=/^\/(?:[^~]|~0|~1)*$/,Rc=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Io(t,{dataLevel:e,dataNames:r,dataPathArr:s}){let n,a;if(t==="")return ne.default.rootData;if(t[0]==="/"){if(!Lc.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,a=ne.default.rootData}else{const c=Rc.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);const f=+c[1];if(n=c[2],n==="#"){if(f>=e)throw new Error(l("property/index",f));return s[e-f]}if(f>e)throw new Error(l("data",f));if(a=r[e-f],!n)return a}let i=a;const o=n.split("/");for(const c of o)c&&(a=(0,X._)`${a}${(0,X.getProperty)((0,Ft.unescapeJsonPointer)(c))}`,i=(0,X._)`${i} && ${a}`);return i;function l(c,f){return`Cannot access ${c} ${f} levels up, current level is ${e}`}}dt.getData=Io;var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});class zc extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}Ir.default=zc;var Nr={};Object.defineProperty(Nr,"__esModule",{value:!0});const In=Re;class qc extends Error{constructor(e,r,s,n){super(n||`can't resolve reference ${s} from id ${r}`),this.missingRef=(0,In.resolveUrl)(e,r,s),this.missingSchema=(0,In.normalizeId)((0,In.getFullPath)(e,this.missingRef))}}Nr.default=qc;var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.resolveSchema=Ye.getCompilingSchema=Ye.resolveRef=Ye.compileSchema=Ye.SchemaEnv=void 0;const ft=ce,Uc=Ir,Zt=vt,pt=Re,No=K,Hc=dt;class ds{constructor(e){var r;this.refs={},this.dynamicAnchors={};let s;typeof e.schema=="object"&&(s=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,pt.normalizeId)(s==null?void 0:s[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=s==null?void 0:s.$async,this.refs={}}}Ye.SchemaEnv=ds;function Nn(t){const e=Po.call(this,t);if(e)return e;const r=(0,pt.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:a}=this.opts,i=new ft.CodeGen(this.scope,{es5:s,lines:n,ownProperties:a});let o;t.$async&&(o=i.scopeValue("Error",{ref:Uc.default,code:(0,ft._)`require("ajv/dist/runtime/validation_error").default`}));const l=i.scopeName("validate");t.validateName=l;const c={gen:i,allErrors:this.opts.allErrors,data:Zt.default.data,parentData:Zt.default.parentData,parentDataProperty:Zt.default.parentDataProperty,dataNames:[Zt.default.data],dataPathArr:[ft.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,ft.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:o,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:ft.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ft._)`""`,opts:this.opts,self:this};let f;try{this._compilations.add(t),(0,Hc.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);const p=i.toString();f=`${i.scopeRefs(Zt.default.scope)}return ${p}`,this.opts.code.process&&(f=this.opts.code.process(f,t));const E=new Function(`${Zt.default.self}`,`${Zt.default.scope}`,f)(this,this.scope.get());if(this.scope.value(l,{ref:E}),E.errors=null,E.schema=t.schema,E.schemaEnv=t,t.$async&&(E.$async=!0),this.opts.code.source===!0&&(E.source={validateName:l,validateCode:p,scopeValues:i._values}),this.opts.unevaluated){const{props:$,items:k}=c;E.evaluated={props:$ instanceof ft.Name?void 0:$,items:k instanceof ft.Name?void 0:k,dynamicProps:$ instanceof ft.Name,dynamicItems:k instanceof ft.Name},E.source&&(E.source.evaluated=(0,ft.stringify)(E.evaluated))}return t.validate=E,t}catch(p){throw delete t.validate,delete t.validateName,f&&this.logger.error("Error compiling schema, function code:",f),p}finally{this._compilations.delete(t)}}Ye.compileSchema=Nn;function Kc(t,e,r){var s;r=(0,pt.resolveUrl)(this.opts.uriResolver,e,r);const n=t.refs[r];if(n)return n;let a=Yc.call(this,t,r);if(a===void 0){const i=(s=t.localRefs)===null||s===void 0?void 0:s[r],{schemaId:o}=this.opts;i&&(a=new ds({schema:i,schemaId:o,root:t,baseId:e}))}if(a!==void 0)return t.refs[r]=Gc.call(this,a)}Ye.resolveRef=Kc;function Gc(t){return(0,pt.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Nn.call(this,t)}function Po(t){for(const e of this._compilations)if(Wc(e,t))return e}Ye.getCompilingSchema=Po;function Wc(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Yc(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||fs.call(this,t,e)}function fs(t,e){const r=this.opts.uriResolver.parse(e),s=(0,pt._getFullPath)(this.opts.uriResolver,r);let n=(0,pt.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&s===n)return Pn.call(this,r,t);const a=(0,pt.normalizeId)(s),i=this.refs[a]||this.schemas[a];if(typeof i=="string"){const o=fs.call(this,t,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:Pn.call(this,r,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||Nn.call(this,i),a===(0,pt.normalizeId)(e)){const{schema:o}=i,{schemaId:l}=this.opts,c=o[l];return c&&(n=(0,pt.resolveUrl)(this.opts.uriResolver,n,c)),new ds({schema:o,schemaId:l,root:t,baseId:n})}return Pn.call(this,r,i)}}Ye.resolveSchema=fs;const Xc=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Pn(t,{baseId:e,schema:r,root:s}){var n;if(((n=t.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(const o of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const l=r[(0,No.unescapeFragment)(o)];if(l===void 0)return;r=l;const c=typeof r=="object"&&r[this.opts.schemaId];!Xc.has(o)&&c&&(e=(0,pt.resolveUrl)(this.opts.uriResolver,e,c))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,No.schemaHasRulesButRef)(r,this.RULES)){const o=(0,pt.resolveUrl)(this.opts.uriResolver,e,r.$ref);a=fs.call(this,s,o)}const{schemaId:i}=this.opts;if(a=a||new ds({schema:r,schemaId:i,root:s,baseId:e}),a.schema!==a.root.schema)return a}const Jc={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Fn={},Mn={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(t,e){(function(r,s){s(e)})(bu,function(r){function s(){for(var S=arguments.length,m=Array(S),C=0;C<S;C++)m[C]=arguments[C];if(m.length>1){m[0]=m[0].slice(0,-1);for(var x=m.length-1,M=1;M<x;++M)m[M]=m[M].slice(1,-1);return m[x]=m[x].slice(1),m.join("")}else return m[0]}function n(S){return"(?:"+S+")"}function a(S){return S===void 0?"undefined":S===null?"null":Object.prototype.toString.call(S).split(" ").pop().split("]").shift().toLowerCase()}function i(S){return S.toUpperCase()}function o(S){return S!=null?S instanceof Array?S:typeof S.length!="number"||S.split||S.setInterval||S.call?[S]:Array.prototype.slice.call(S):[]}function l(S,m){var C=S;if(m)for(var x in m)C[x]=m[x];return C}function c(S){var m="[A-Za-z]",C="[0-9]",x=s(C,"[A-Fa-f]"),M=n(n("%[EFef]"+x+"%"+x+x+"%"+x+x)+"|"+n("%[89A-Fa-f]"+x+"%"+x+x)+"|"+n("%"+x+x)),Z="[\\:\\/\\?\\#\\[\\]\\@]",Q="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",he=s(Z,Q),we=S?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ne=S?"[\\uE000-\\uF8FF]":"[]",fe=s(m,C,"[\\-\\.\\_\\~]",we);n(m+s(m,C,"[\\+\\-\\.]")+"*"),n(n(M+"|"+s(fe,Q,"[\\:]"))+"*");var Se=n(n("25[0-5]")+"|"+n("2[0-4]"+C)+"|"+n("1"+C+C)+"|"+n("0?[1-9]"+C)+"|0?0?"+C),Pe=n(Se+"\\."+Se+"\\."+Se+"\\."+Se),ae=n(x+"{1,4}"),Ce=n(n(ae+"\\:"+ae)+"|"+Pe),Fe=n(n(ae+"\\:")+"{6}"+Ce),Te=n("\\:\\:"+n(ae+"\\:")+"{5}"+Ce),qt=n(n(ae)+"?\\:\\:"+n(ae+"\\:")+"{4}"+Ce),kt=n(n(n(ae+"\\:")+"{0,1}"+ae)+"?\\:\\:"+n(ae+"\\:")+"{3}"+Ce),wt=n(n(n(ae+"\\:")+"{0,2}"+ae)+"?\\:\\:"+n(ae+"\\:")+"{2}"+Ce),$r=n(n(n(ae+"\\:")+"{0,3}"+ae)+"?\\:\\:"+ae+"\\:"+Ce),nr=n(n(n(ae+"\\:")+"{0,4}"+ae)+"?\\:\\:"+Ce),ut=n(n(n(ae+"\\:")+"{0,5}"+ae)+"?\\:\\:"+ae),Ct=n(n(n(ae+"\\:")+"{0,6}"+ae)+"?\\:\\:"),ar=n([Fe,Te,qt,kt,wt,$r,nr,ut,Ct].join("|")),Mt=n(n(fe+"|"+M)+"+");n("[vV]"+x+"+\\."+s(fe,Q,"[\\:]")+"+"),n(n(M+"|"+s(fe,Q))+"*");var Ur=n(M+"|"+s(fe,Q,"[\\:\\@]"));return n(n(M+"|"+s(fe,Q,"[\\@]"))+"+"),n(n(Ur+"|"+s("[\\/\\?]",Ne))+"*"),{NOT_SCHEME:new RegExp(s("[^]",m,C,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(s("[^\\%\\:]",fe,Q),"g"),NOT_HOST:new RegExp(s("[^\\%\\[\\]\\:]",fe,Q),"g"),NOT_PATH:new RegExp(s("[^\\%\\/\\:\\@]",fe,Q),"g"),NOT_PATH_NOSCHEME:new RegExp(s("[^\\%\\/\\@]",fe,Q),"g"),NOT_QUERY:new RegExp(s("[^\\%]",fe,Q,"[\\:\\@\\/\\?]",Ne),"g"),NOT_FRAGMENT:new RegExp(s("[^\\%]",fe,Q,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(s("[^]",fe,Q),"g"),UNRESERVED:new RegExp(fe,"g"),OTHER_CHARS:new RegExp(s("[^\\%]",fe,he),"g"),PCT_ENCODED:new RegExp(M,"g"),IPV4ADDRESS:new RegExp("^("+Pe+")$"),IPV6ADDRESS:new RegExp("^\\[?("+ar+")"+n(n("\\%25|\\%(?!"+x+"{2})")+"("+Mt+")")+"?\\]?$")}}var f=c(!1),p=c(!0),O=function(){function S(m,C){var x=[],M=!0,Z=!1,Q=void 0;try{for(var he=m[Symbol.iterator](),we;!(M=(we=he.next()).done)&&(x.push(we.value),!(C&&x.length===C));M=!0);}catch(Ne){Z=!0,Q=Ne}finally{try{!M&&he.return&&he.return()}finally{if(Z)throw Q}}return x}return function(m,C){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return S(m,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),E=function(S){if(Array.isArray(S)){for(var m=0,C=Array(S.length);m<S.length;m++)C[m]=S[m];return C}else return Array.from(S)},$=2147483647,k=36,_=1,y=26,I=38,N=700,D=72,b=128,B="-",W=/^xn--/,U=/[^\0-\x7E]/,H=/[\x2E\u3002\uFF0E\uFF61]/g,ie={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},q=k-_,G=Math.floor,re=String.fromCharCode;function Y(S){throw new RangeError(ie[S])}function me(S,m){for(var C=[],x=S.length;x--;)C[x]=m(S[x]);return C}function ge(S,m){var C=S.split("@"),x="";C.length>1&&(x=C[0]+"@",S=C[1]),S=S.replace(H,".");var M=S.split("."),Z=me(M,m).join(".");return x+Z}function _e(S){for(var m=[],C=0,x=S.length;C<x;){var M=S.charCodeAt(C++);if(M>=55296&&M<=56319&&C<x){var Z=S.charCodeAt(C++);(Z&64512)==56320?m.push(((M&1023)<<10)+(Z&1023)+65536):(m.push(M),C--)}else m.push(M)}return m}var Ie=function(m){return String.fromCodePoint.apply(String,E(m))},xe=function(m){return m-48<10?m-22:m-65<26?m-65:m-97<26?m-97:k},A=function(m,C){return m+22+75*(m<26)-((C!=0)<<5)},g=function(m,C,x){var M=0;for(m=x?G(m/N):m>>1,m+=G(m/C);m>q*y>>1;M+=k)m=G(m/q);return G(M+(q+1)*m/(m+I))},F=function(m){var C=[],x=m.length,M=0,Z=b,Q=D,he=m.lastIndexOf(B);he<0&&(he=0);for(var we=0;we<he;++we)m.charCodeAt(we)>=128&&Y("not-basic"),C.push(m.charCodeAt(we));for(var Ne=he>0?he+1:0;Ne<x;){for(var fe=M,Se=1,Pe=k;;Pe+=k){Ne>=x&&Y("invalid-input");var ae=xe(m.charCodeAt(Ne++));(ae>=k||ae>G(($-M)/Se))&&Y("overflow"),M+=ae*Se;var Ce=Pe<=Q?_:Pe>=Q+y?y:Pe-Q;if(ae<Ce)break;var Fe=k-Ce;Se>G($/Fe)&&Y("overflow"),Se*=Fe}var Te=C.length+1;Q=g(M-fe,Te,fe==0),G(M/Te)>$-Z&&Y("overflow"),Z+=G(M/Te),M%=Te,C.splice(M++,0,Z)}return String.fromCodePoint.apply(String,C)},T=function(m){var C=[];m=_e(m);var x=m.length,M=b,Z=0,Q=D,he=!0,we=!1,Ne=void 0;try{for(var fe=m[Symbol.iterator](),Se;!(he=(Se=fe.next()).done);he=!0){var Pe=Se.value;Pe<128&&C.push(re(Pe))}}catch(Hr){we=!0,Ne=Hr}finally{try{!he&&fe.return&&fe.return()}finally{if(we)throw Ne}}var ae=C.length,Ce=ae;for(ae&&C.push(B);Ce<x;){var Fe=$,Te=!0,qt=!1,kt=void 0;try{for(var wt=m[Symbol.iterator](),$r;!(Te=($r=wt.next()).done);Te=!0){var nr=$r.value;nr>=M&&nr<Fe&&(Fe=nr)}}catch(Hr){qt=!0,kt=Hr}finally{try{!Te&&wt.return&&wt.return()}finally{if(qt)throw kt}}var ut=Ce+1;Fe-M>G(($-Z)/ut)&&Y("overflow"),Z+=(Fe-M)*ut,M=Fe;var Ct=!0,ar=!1,Mt=void 0;try{for(var Ur=m[Symbol.iterator](),gu;!(Ct=(gu=Ur.next()).done);Ct=!0){var yu=gu.value;if(yu<M&&++Z>$&&Y("overflow"),yu==M){for(var Os=Z,As=k;;As+=k){var Ds=As<=Q?_:As>=Q+y?y:As-Q;if(Os<Ds)break;var vu=Os-Ds,_u=k-Ds;C.push(re(A(Ds+vu%_u,0))),Os=G(vu/_u)}C.push(re(A(Os,0))),Q=g(Z,ut,Ce==ae),Z=0,++Ce}}}catch(Hr){ar=!0,Mt=Hr}finally{try{!Ct&&Ur.return&&Ur.return()}finally{if(ar)throw Mt}}++Z,++M}return C.join("")},u=function(m){return ge(m,function(C){return W.test(C)?F(C.slice(4).toLowerCase()):C})},d=function(m){return ge(m,function(C){return U.test(C)?"xn--"+T(C):C})},v={version:"2.1.0",ucs2:{decode:_e,encode:Ie},decode:F,encode:T,toASCII:d,toUnicode:u},P={};function V(S){var m=S.charCodeAt(0),C=void 0;return m<16?C="%0"+m.toString(16).toUpperCase():m<128?C="%"+m.toString(16).toUpperCase():m<2048?C="%"+(m>>6|192).toString(16).toUpperCase()+"%"+(m&63|128).toString(16).toUpperCase():C="%"+(m>>12|224).toString(16).toUpperCase()+"%"+(m>>6&63|128).toString(16).toUpperCase()+"%"+(m&63|128).toString(16).toUpperCase(),C}function L(S){for(var m="",C=0,x=S.length;C<x;){var M=parseInt(S.substr(C+1,2),16);if(M<128)m+=String.fromCharCode(M),C+=3;else if(M>=194&&M<224){if(x-C>=6){var Z=parseInt(S.substr(C+4,2),16);m+=String.fromCharCode((M&31)<<6|Z&63)}else m+=S.substr(C,6);C+=6}else if(M>=224){if(x-C>=9){var Q=parseInt(S.substr(C+4,2),16),he=parseInt(S.substr(C+7,2),16);m+=String.fromCharCode((M&15)<<12|(Q&63)<<6|he&63)}else m+=S.substr(C,9);C+=9}else m+=S.substr(C,3),C+=3}return m}function R(S,m){function C(x){var M=L(x);return M.match(m.UNRESERVED)?M:x}return S.scheme&&(S.scheme=String(S.scheme).replace(m.PCT_ENCODED,C).toLowerCase().replace(m.NOT_SCHEME,"")),S.userinfo!==void 0&&(S.userinfo=String(S.userinfo).replace(m.PCT_ENCODED,C).replace(m.NOT_USERINFO,V).replace(m.PCT_ENCODED,i)),S.host!==void 0&&(S.host=String(S.host).replace(m.PCT_ENCODED,C).toLowerCase().replace(m.NOT_HOST,V).replace(m.PCT_ENCODED,i)),S.path!==void 0&&(S.path=String(S.path).replace(m.PCT_ENCODED,C).replace(S.scheme?m.NOT_PATH:m.NOT_PATH_NOSCHEME,V).replace(m.PCT_ENCODED,i)),S.query!==void 0&&(S.query=String(S.query).replace(m.PCT_ENCODED,C).replace(m.NOT_QUERY,V).replace(m.PCT_ENCODED,i)),S.fragment!==void 0&&(S.fragment=String(S.fragment).replace(m.PCT_ENCODED,C).replace(m.NOT_FRAGMENT,V).replace(m.PCT_ENCODED,i)),S}function te(S){return S.replace(/^0*(.*)/,"$1")||"0"}function z(S,m){var C=S.match(m.IPV4ADDRESS)||[],x=O(C,2),M=x[1];return M?M.split(".").map(te).join("."):S}function pe(S,m){var C=S.match(m.IPV6ADDRESS)||[],x=O(C,3),M=x[1],Z=x[2];if(M){for(var Q=M.toLowerCase().split("::").reverse(),he=O(Q,2),we=he[0],Ne=he[1],fe=Ne?Ne.split(":").map(te):[],Se=we.split(":").map(te),Pe=m.IPV4ADDRESS.test(Se[Se.length-1]),ae=Pe?7:8,Ce=Se.length-ae,Fe=Array(ae),Te=0;Te<ae;++Te)Fe[Te]=fe[Te]||Se[Ce+Te]||"";Pe&&(Fe[ae-1]=z(Fe[ae-1],m));var qt=Fe.reduce(function(ut,Ct,ar){if(!Ct||Ct==="0"){var Mt=ut[ut.length-1];Mt&&Mt.index+Mt.length===ar?Mt.length++:ut.push({index:ar,length:1})}return ut},[]),kt=qt.sort(function(ut,Ct){return Ct.length-ut.length})[0],wt=void 0;if(kt&&kt.length>1){var $r=Fe.slice(0,kt.index),nr=Fe.slice(kt.index+kt.length);wt=$r.join(":")+"::"+nr.join(":")}else wt=Fe.join(":");return Z&&(wt+="%"+Z),wt}else return S}var We=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,tt="".match(/(){0}/)[1]===void 0;function ue(S){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C={},x=m.iri!==!1?p:f;m.reference==="suffix"&&(S=(m.scheme?m.scheme+":":"")+"//"+S);var M=S.match(We);if(M){tt?(C.scheme=M[1],C.userinfo=M[3],C.host=M[4],C.port=parseInt(M[5],10),C.path=M[6]||"",C.query=M[7],C.fragment=M[8],isNaN(C.port)&&(C.port=M[5])):(C.scheme=M[1]||void 0,C.userinfo=S.indexOf("@")!==-1?M[3]:void 0,C.host=S.indexOf("//")!==-1?M[4]:void 0,C.port=parseInt(M[5],10),C.path=M[6]||"",C.query=S.indexOf("?")!==-1?M[7]:void 0,C.fragment=S.indexOf("#")!==-1?M[8]:void 0,isNaN(C.port)&&(C.port=S.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?M[4]:void 0)),C.host&&(C.host=pe(z(C.host,x),x)),C.scheme===void 0&&C.userinfo===void 0&&C.host===void 0&&C.port===void 0&&!C.path&&C.query===void 0?C.reference="same-document":C.scheme===void 0?C.reference="relative":C.fragment===void 0?C.reference="absolute":C.reference="uri",m.reference&&m.reference!=="suffix"&&m.reference!==C.reference&&(C.error=C.error||"URI is not a "+m.reference+" reference.");var Z=P[(m.scheme||C.scheme||"").toLowerCase()];if(!m.unicodeSupport&&(!Z||!Z.unicodeSupport)){if(C.host&&(m.domainHost||Z&&Z.domainHost))try{C.host=v.toASCII(C.host.replace(x.PCT_ENCODED,L).toLowerCase())}catch(Q){C.error=C.error||"Host's domain name can not be converted to ASCII via punycode: "+Q}R(C,f)}else R(C,x);Z&&Z.parse&&Z.parse(C,m)}else C.error=C.error||"URI can not be parsed.";return C}function $t(S,m){var C=m.iri!==!1?p:f,x=[];return S.userinfo!==void 0&&(x.push(S.userinfo),x.push("@")),S.host!==void 0&&x.push(pe(z(String(S.host),C),C).replace(C.IPV6ADDRESS,function(M,Z,Q){return"["+Z+(Q?"%25"+Q:"")+"]"})),(typeof S.port=="number"||typeof S.port=="string")&&(x.push(":"),x.push(String(S.port))),x.length?x.join(""):void 0}var rt=/^\.\.?\//,zt=/^\/\.(\/|$)/,vr=/^\/\.\.(\/|$)/,Lr=/^\/?(?:.|\n)*?(?=\/|$)/;function St(S){for(var m=[];S.length;)if(S.match(rt))S=S.replace(rt,"");else if(S.match(zt))S=S.replace(zt,"/");else if(S.match(vr))S=S.replace(vr,"/"),m.pop();else if(S==="."||S==="..")S="";else{var C=S.match(Lr);if(C){var x=C[0];S=S.slice(x.length),m.push(x)}else throw new Error("Unexpected dot segment condition")}return m.join("")}function Je(S){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=m.iri?p:f,x=[],M=P[(m.scheme||S.scheme||"").toLowerCase()];if(M&&M.serialize&&M.serialize(S,m),S.host&&!C.IPV6ADDRESS.test(S.host)){if(m.domainHost||M&&M.domainHost)try{S.host=m.iri?v.toUnicode(S.host):v.toASCII(S.host.replace(C.PCT_ENCODED,L).toLowerCase())}catch(he){S.error=S.error||"Host's domain name can not be converted to "+(m.iri?"Unicode":"ASCII")+" via punycode: "+he}}R(S,C),m.reference!=="suffix"&&S.scheme&&(x.push(S.scheme),x.push(":"));var Z=$t(S,m);if(Z!==void 0&&(m.reference!=="suffix"&&x.push("//"),x.push(Z),S.path&&S.path.charAt(0)!=="/"&&x.push("/")),S.path!==void 0){var Q=S.path;!m.absolutePath&&(!M||!M.absolutePath)&&(Q=St(Q)),Z===void 0&&(Q=Q.replace(/^\/\//,"/%2F")),x.push(Q)}return S.query!==void 0&&(x.push("?"),x.push(S.query)),S.fragment!==void 0&&(x.push("#"),x.push(S.fragment)),x.join("")}function _r(S,m){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=arguments[3],M={};return x||(S=ue(Je(S,C),C),m=ue(Je(m,C),C)),C=C||{},!C.tolerant&&m.scheme?(M.scheme=m.scheme,M.userinfo=m.userinfo,M.host=m.host,M.port=m.port,M.path=St(m.path||""),M.query=m.query):(m.userinfo!==void 0||m.host!==void 0||m.port!==void 0?(M.userinfo=m.userinfo,M.host=m.host,M.port=m.port,M.path=St(m.path||""),M.query=m.query):(m.path?(m.path.charAt(0)==="/"?M.path=St(m.path):((S.userinfo!==void 0||S.host!==void 0||S.port!==void 0)&&!S.path?M.path="/"+m.path:S.path?M.path=S.path.slice(0,S.path.lastIndexOf("/")+1)+m.path:M.path=m.path,M.path=St(M.path)),M.query=m.query):(M.path=S.path,m.query!==void 0?M.query=m.query:M.query=S.query),M.userinfo=S.userinfo,M.host=S.host,M.port=S.port),M.scheme=S.scheme),M.fragment=m.fragment,M}function Rr(S,m,C){var x=l({scheme:"null"},C);return Je(_r(ue(S,x),ue(m,x),x,!0),x)}function rr(S,m){return typeof S=="string"?S=Je(ue(S,m),m):a(S)==="object"&&(S=ue(Je(S,m),m)),S}function zr(S,m,C){return typeof S=="string"?S=Je(ue(S,C),C):a(S)==="object"&&(S=Je(S,C)),typeof m=="string"?m=Je(ue(m,C),C):a(m)==="object"&&(m=Je(m,C)),S===m}function Ts(S,m){return S&&S.toString().replace(!m||!m.iri?f.ESCAPE:p.ESCAPE,V)}function ot(S,m){return S&&S.toString().replace(!m||!m.iri?f.PCT_ENCODED:p.PCT_ENCODED,L)}var sr={scheme:"http",domainHost:!0,parse:function(m,C){return m.host||(m.error=m.error||"HTTP URIs must have a host."),m},serialize:function(m,C){var x=String(m.scheme).toLowerCase()==="https";return(m.port===(x?443:80)||m.port==="")&&(m.port=void 0),m.path||(m.path="/"),m}},uu={scheme:"https",domainHost:sr.domainHost,parse:sr.parse,serialize:sr.serialize};function lu(S){return typeof S.secure=="boolean"?S.secure:String(S.scheme).toLowerCase()==="wss"}var qr={scheme:"ws",domainHost:!0,parse:function(m,C){var x=m;return x.secure=lu(x),x.resourceName=(x.path||"/")+(x.query?"?"+x.query:""),x.path=void 0,x.query=void 0,x},serialize:function(m,C){if((m.port===(lu(m)?443:80)||m.port==="")&&(m.port=void 0),typeof m.secure=="boolean"&&(m.scheme=m.secure?"wss":"ws",m.secure=void 0),m.resourceName){var x=m.resourceName.split("?"),M=O(x,2),Z=M[0],Q=M[1];m.path=Z&&Z!=="/"?Z:void 0,m.query=Q,m.resourceName=void 0}return m.fragment=void 0,m}},cu={scheme:"wss",domainHost:qr.domainHost,parse:qr.parse,serialize:qr.serialize},Wf={},du="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Et="[0-9A-Fa-f]",Yf=n(n("%[EFef]"+Et+"%"+Et+Et+"%"+Et+Et)+"|"+n("%[89A-Fa-f]"+Et+"%"+Et+Et)+"|"+n("%"+Et+Et)),Xf="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Jf="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Zf=s(Jf,'[\\"\\\\]'),Qf="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",ep=new RegExp(du,"g"),br=new RegExp(Yf,"g"),tp=new RegExp(s("[^]",Xf,"[\\.]",'[\\"]',Zf),"g"),fu=new RegExp(s("[^]",du,Qf),"g"),rp=fu;function _a(S){var m=L(S);return m.match(ep)?m:S}var pu={scheme:"mailto",parse:function(m,C){var x=m,M=x.to=x.path?x.path.split(","):[];if(x.path=void 0,x.query){for(var Z=!1,Q={},he=x.query.split("&"),we=0,Ne=he.length;we<Ne;++we){var fe=he[we].split("=");switch(fe[0]){case"to":for(var Se=fe[1].split(","),Pe=0,ae=Se.length;Pe<ae;++Pe)M.push(Se[Pe]);break;case"subject":x.subject=ot(fe[1],C);break;case"body":x.body=ot(fe[1],C);break;default:Z=!0,Q[ot(fe[0],C)]=ot(fe[1],C);break}}Z&&(x.headers=Q)}x.query=void 0;for(var Ce=0,Fe=M.length;Ce<Fe;++Ce){var Te=M[Ce].split("@");if(Te[0]=ot(Te[0]),C.unicodeSupport)Te[1]=ot(Te[1],C).toLowerCase();else try{Te[1]=v.toASCII(ot(Te[1],C).toLowerCase())}catch(qt){x.error=x.error||"Email address's domain name can not be converted to ASCII via punycode: "+qt}M[Ce]=Te.join("@")}return x},serialize:function(m,C){var x=m,M=o(m.to);if(M){for(var Z=0,Q=M.length;Z<Q;++Z){var he=String(M[Z]),we=he.lastIndexOf("@"),Ne=he.slice(0,we).replace(br,_a).replace(br,i).replace(tp,V),fe=he.slice(we+1);try{fe=C.iri?v.toUnicode(fe):v.toASCII(ot(fe,C).toLowerCase())}catch(Ce){x.error=x.error||"Email address's domain name can not be converted to "+(C.iri?"Unicode":"ASCII")+" via punycode: "+Ce}M[Z]=Ne+"@"+fe}x.path=M.join(",")}var Se=m.headers=m.headers||{};m.subject&&(Se.subject=m.subject),m.body&&(Se.body=m.body);var Pe=[];for(var ae in Se)Se[ae]!==Wf[ae]&&Pe.push(ae.replace(br,_a).replace(br,i).replace(fu,V)+"="+Se[ae].replace(br,_a).replace(br,i).replace(rp,V));return Pe.length&&(x.query=Pe.join("&")),x}},sp=/^([^\:]+)\:(.*)/,hu={scheme:"urn",parse:function(m,C){var x=m.path&&m.path.match(sp),M=m;if(x){var Z=C.scheme||M.scheme||"urn",Q=x[1].toLowerCase(),he=x[2],we=Z+":"+(C.nid||Q),Ne=P[we];M.nid=Q,M.nss=he,M.path=void 0,Ne&&(M=Ne.parse(M,C))}else M.error=M.error||"URN can not be parsed.";return M},serialize:function(m,C){var x=C.scheme||m.scheme||"urn",M=m.nid,Z=x+":"+(C.nid||M),Q=P[Z];Q&&(m=Q.serialize(m,C));var he=m,we=m.nss;return he.path=(M||C.nid)+":"+we,he}},np=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,mu={scheme:"urn:uuid",parse:function(m,C){var x=m;return x.uuid=x.nss,x.nss=void 0,!C.tolerant&&(!x.uuid||!x.uuid.match(np))&&(x.error=x.error||"UUID is not valid."),x},serialize:function(m,C){var x=m;return x.nss=(m.uuid||"").toLowerCase(),x}};P[sr.scheme]=sr,P[uu.scheme]=uu,P[qr.scheme]=qr,P[cu.scheme]=cu,P[pu.scheme]=pu,P[hu.scheme]=hu,P[mu.scheme]=mu,r.SCHEMES=P,r.pctEncChar=V,r.pctDecChars=L,r.parse=ue,r.removeDotSegments=St,r.serialize=Je,r.resolveComponents=_r,r.resolve=Rr,r.normalize=rr,r.equal=zr,r.escapeComponent=Ts,r.unescapeComponent=ot,Object.defineProperty(r,"__esModule",{value:!0})})})(Mn,Mn.exports);var Zc=Mn.exports;Object.defineProperty(Fn,"__esModule",{value:!0});const Fo=Zc;Fo.code='require("ajv/dist/runtime/uri").default',Fn.default=Fo,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=dt;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=ce;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const s=Ir,n=Nr,a=Xt,i=Ye,o=ce,l=Re,c=je,f=K,p=Jc,O=Fn,E=(A,g)=>new RegExp(A,g);E.code="new RegExp";const $=["removeAdditional","useDefaults","coerceTypes"],k=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},I=200;function N(A){var g,F,T,u,d,v,P,V,L,R,te,z,pe,We,tt,ue,$t,rt,zt,vr,Lr,St,Je,_r,Rr;const rr=A.strict,zr=(g=A.code)===null||g===void 0?void 0:g.optimize,Ts=zr===!0||zr===void 0?1:zr||0,ot=(T=(F=A.code)===null||F===void 0?void 0:F.regExp)!==null&&T!==void 0?T:E,sr=(u=A.uriResolver)!==null&&u!==void 0?u:O.default;return{strictSchema:(v=(d=A.strictSchema)!==null&&d!==void 0?d:rr)!==null&&v!==void 0?v:!0,strictNumbers:(V=(P=A.strictNumbers)!==null&&P!==void 0?P:rr)!==null&&V!==void 0?V:!0,strictTypes:(R=(L=A.strictTypes)!==null&&L!==void 0?L:rr)!==null&&R!==void 0?R:"log",strictTuples:(z=(te=A.strictTuples)!==null&&te!==void 0?te:rr)!==null&&z!==void 0?z:"log",strictRequired:(We=(pe=A.strictRequired)!==null&&pe!==void 0?pe:rr)!==null&&We!==void 0?We:!1,code:A.code?{...A.code,optimize:Ts,regExp:ot}:{optimize:Ts,regExp:ot},loopRequired:(tt=A.loopRequired)!==null&&tt!==void 0?tt:I,loopEnum:(ue=A.loopEnum)!==null&&ue!==void 0?ue:I,meta:($t=A.meta)!==null&&$t!==void 0?$t:!0,messages:(rt=A.messages)!==null&&rt!==void 0?rt:!0,inlineRefs:(zt=A.inlineRefs)!==null&&zt!==void 0?zt:!0,schemaId:(vr=A.schemaId)!==null&&vr!==void 0?vr:"$id",addUsedSchema:(Lr=A.addUsedSchema)!==null&&Lr!==void 0?Lr:!0,validateSchema:(St=A.validateSchema)!==null&&St!==void 0?St:!0,validateFormats:(Je=A.validateFormats)!==null&&Je!==void 0?Je:!0,unicodeRegExp:(_r=A.unicodeRegExp)!==null&&_r!==void 0?_r:!0,int32range:(Rr=A.int32range)!==null&&Rr!==void 0?Rr:!0,uriResolver:sr}}class D{constructor(g={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,g=this.opts={...g,...N(g)};const{es5:F,lines:T}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:k,es5:F,lines:T}),this.logger=G(g.logger);const u=g.validateFormats;g.validateFormats=!1,this.RULES=(0,a.getRules)(),b.call(this,_,g,"NOT SUPPORTED"),b.call(this,y,g,"DEPRECATED","warn"),this._metaOpts=ie.call(this),g.formats&&U.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),g.keywords&&H.call(this,g.keywords),typeof g.meta=="object"&&this.addMetaSchema(g.meta),W.call(this),g.validateFormats=u}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:g,meta:F,schemaId:T}=this.opts;let u=p;T==="id"&&(u={...p},u.id=u.$id,delete u.$id),F&&g&&this.addMetaSchema(u,u[T],!1)}defaultMeta(){const{meta:g,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof g=="object"?g[F]||g:void 0}validate(g,F){let T;if(typeof g=="string"){if(T=this.getSchema(g),!T)throw new Error(`no schema with key or ref "${g}"`)}else T=this.compile(g);const u=T(F);return"$async"in T||(this.errors=T.errors),u}compile(g,F){const T=this._addSchema(g,F);return T.validate||this._compileSchemaEnv(T)}compileAsync(g,F){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return u.call(this,g,F);async function u(R,te){await d.call(this,R.$schema);const z=this._addSchema(R,te);return z.validate||v.call(this,z)}async function d(R){R&&!this.getSchema(R)&&await u.call(this,{$ref:R},!0)}async function v(R){try{return this._compileSchemaEnv(R)}catch(te){if(!(te instanceof n.default))throw te;return P.call(this,te),await V.call(this,te.missingSchema),v.call(this,R)}}function P({missingSchema:R,missingRef:te}){if(this.refs[R])throw new Error(`AnySchema ${R} is loaded but ${te} cannot be resolved`)}async function V(R){const te=await L.call(this,R);this.refs[R]||await d.call(this,te.$schema),this.refs[R]||this.addSchema(te,R,F)}async function L(R){const te=this._loading[R];if(te)return te;try{return await(this._loading[R]=T(R))}finally{delete this._loading[R]}}}addSchema(g,F,T,u=this.opts.validateSchema){if(Array.isArray(g)){for(const v of g)this.addSchema(v,void 0,T,u);return this}let d;if(typeof g=="object"){const{schemaId:v}=this.opts;if(d=g[v],d!==void 0&&typeof d!="string")throw new Error(`schema ${v} must be string`)}return F=(0,l.normalizeId)(F||d),this._checkUnique(F),this.schemas[F]=this._addSchema(g,T,F,u,!0),this}addMetaSchema(g,F,T=this.opts.validateSchema){return this.addSchema(g,F,!0,T),this}validateSchema(g,F){if(typeof g=="boolean")return!0;let T;if(T=g.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const u=this.validate(T,g);if(!u&&F){const d="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(d);else throw new Error(d)}return u}getSchema(g){let F;for(;typeof(F=B.call(this,g))=="string";)g=F;if(F===void 0){const{schemaId:T}=this.opts,u=new i.SchemaEnv({schema:{},schemaId:T});if(F=i.resolveSchema.call(this,u,g),!F)return;this.refs[g]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(g){if(g instanceof RegExp)return this._removeAllSchemas(this.schemas,g),this._removeAllSchemas(this.refs,g),this;switch(typeof g){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const F=B.call(this,g);return typeof F=="object"&&this._cache.delete(F.schema),delete this.schemas[g],delete this.refs[g],this}case"object":{const F=g;this._cache.delete(F);let T=g[this.opts.schemaId];return T&&(T=(0,l.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(g){for(const F of g)this.addKeyword(F);return this}addKeyword(g,F){let T;if(typeof g=="string")T=g,typeof F=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=T);else if(typeof g=="object"&&F===void 0){if(F=g,T=F.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Y.call(this,T,F),!F)return(0,f.eachItem)(T,d=>me.call(this,d)),this;_e.call(this,F);const u={...F,type:(0,c.getJSONTypes)(F.type),schemaType:(0,c.getJSONTypes)(F.schemaType)};return(0,f.eachItem)(T,u.type.length===0?d=>me.call(this,d,u):d=>u.type.forEach(v=>me.call(this,d,u,v))),this}getKeyword(g){const F=this.RULES.all[g];return typeof F=="object"?F.definition:!!F}removeKeyword(g){const{RULES:F}=this;delete F.keywords[g],delete F.all[g];for(const T of F.rules){const u=T.rules.findIndex(d=>d.keyword===g);u>=0&&T.rules.splice(u,1)}return this}addFormat(g,F){return typeof F=="string"&&(F=new RegExp(F)),this.formats[g]=F,this}errorsText(g=this.errors,{separator:F=", ",dataVar:T="data"}={}){return!g||g.length===0?"No errors":g.map(u=>`${T}${u.instancePath} ${u.message}`).reduce((u,d)=>u+F+d)}$dataMetaSchema(g,F){const T=this.RULES.all;g=JSON.parse(JSON.stringify(g));for(const u of F){const d=u.split("/").slice(1);let v=g;for(const P of d)v=v[P];for(const P in T){const V=T[P];if(typeof V!="object")continue;const{$data:L}=V.definition,R=v[P];L&&R&&(v[P]=xe(R))}}return g}_removeAllSchemas(g,F){for(const T in g){const u=g[T];(!F||F.test(T))&&(typeof u=="string"?delete g[T]:u&&!u.meta&&(this._cache.delete(u.schema),delete g[T]))}}_addSchema(g,F,T,u=this.opts.validateSchema,d=this.opts.addUsedSchema){let v;const{schemaId:P}=this.opts;if(typeof g=="object")v=g[P];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof g!="boolean")throw new Error("schema must be object or boolean")}let V=this._cache.get(g);if(V!==void 0)return V;T=(0,l.normalizeId)(v||T);const L=l.getSchemaRefs.call(this,g,T);return V=new i.SchemaEnv({schema:g,schemaId:P,meta:F,baseId:T,localRefs:L}),this._cache.set(V.schema,V),d&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=V),u&&this.validateSchema(g,!0),V}_checkUnique(g){if(this.schemas[g]||this.refs[g])throw new Error(`schema with key or id "${g}" already exists`)}_compileSchemaEnv(g){if(g.meta?this._compileMetaSchema(g):i.compileSchema.call(this,g),!g.validate)throw new Error("ajv implementation error");return g.validate}_compileMetaSchema(g){const F=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,g)}finally{this.opts=F}}}D.ValidationError=s.default,D.MissingRefError=n.default,t.default=D;function b(A,g,F,T="error"){for(const u in A){const d=u;d in g&&this.logger[T](`${F}: option ${u}. ${A[d]}`)}}function B(A){return A=(0,l.normalizeId)(A),this.schemas[A]||this.refs[A]}function W(){const A=this.opts.schemas;if(A)if(Array.isArray(A))this.addSchema(A);else for(const g in A)this.addSchema(A[g],g)}function U(){for(const A in this.opts.formats){const g=this.opts.formats[A];g&&this.addFormat(A,g)}}function H(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const g in A){const F=A[g];F.keyword||(F.keyword=g),this.addKeyword(F)}}function ie(){const A={...this.opts};for(const g of $)delete A[g];return A}const q={log(){},warn(){},error(){}};function G(A){if(A===!1)return q;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw new Error("logger must implement log, warn and error methods")}const re=/^[a-z_$][a-z0-9_$:-]*$/i;function Y(A,g){const{RULES:F}=this;if((0,f.eachItem)(A,T=>{if(F.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!re.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!g&&g.$data&&!("code"in g||"validate"in g))throw new Error('$data keyword must have "code" or "validate" function')}function me(A,g,F){var T;const u=g==null?void 0:g.post;if(F&&u)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:d}=this;let v=u?d.post:d.rules.find(({type:V})=>V===F);if(v||(v={type:F,rules:[]},d.rules.push(v)),d.keywords[A]=!0,!g)return;const P={keyword:A,definition:{...g,type:(0,c.getJSONTypes)(g.type),schemaType:(0,c.getJSONTypes)(g.schemaType)}};g.before?ge.call(this,v,P,g.before):v.rules.push(P),d.all[A]=P,(T=g.implements)===null||T===void 0||T.forEach(V=>this.addKeyword(V))}function ge(A,g,F){const T=A.rules.findIndex(u=>u.keyword===F);T>=0?A.rules.splice(T,0,g):(A.rules.push(g),this.logger.warn(`rule ${F} is not defined`))}function _e(A){let{metaSchema:g}=A;g!==void 0&&(A.$data&&this.opts.$data&&(g=xe(g)),A.validateSchema=this.compile(g,!0))}const Ie={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function xe(A){return{anyOf:[A,Ie]}}}(Hi);var jn={},xn={},Vn={};Object.defineProperty(Vn,"__esModule",{value:!0});const Qc={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Vn.default=Qc;var Qt={};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.callRef=Qt.getValidate=void 0;const ed=Nr,Mo=de,Xe=ce,pr=vt,jo=Ye,ps=K,td={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:r,it:s}=t,{baseId:n,schemaEnv:a,validateName:i,opts:o,self:l}=s,{root:c}=a;if((r==="#"||r==="#/")&&n===c.baseId)return p();const f=jo.resolveRef.call(l,c,n,r);if(f===void 0)throw new ed.default(s.opts.uriResolver,n,r);if(f instanceof jo.SchemaEnv)return O(f);return E(f);function p(){if(a===c)return hs(t,i,a,a.$async);const $=e.scopeValue("root",{ref:c});return hs(t,(0,Xe._)`${$}.validate`,c,c.$async)}function O($){const k=xo(t,$);hs(t,k,$,$.$async)}function E($){const k=e.scopeValue("schema",o.code.source===!0?{ref:$,code:(0,Xe.stringify)($)}:{ref:$}),_=e.name("valid"),y=t.subschema({schema:$,dataTypes:[],schemaPath:Xe.nil,topSchemaRef:k,errSchemaPath:r},_);t.mergeEvaluated(y),t.ok(_)}}};function xo(t,e){const{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Xe._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Qt.getValidate=xo;function hs(t,e,r,s){const{gen:n,it:a}=t,{allErrors:i,schemaEnv:o,opts:l}=a,c=l.passContext?pr.default.this:Xe.nil;s?f():p();function f(){if(!o.$async)throw new Error("async schema referenced by sync schema");const $=n.let("valid");n.try(()=>{n.code((0,Xe._)`await ${(0,Mo.callValidateCode)(t,e,c)}`),E(e),i||n.assign($,!0)},k=>{n.if((0,Xe._)`!(${k} instanceof ${a.ValidationError})`,()=>n.throw(k)),O(k),i||n.assign($,!1)}),t.ok($)}function p(){t.result((0,Mo.callValidateCode)(t,e,c),()=>E(e),()=>O(e))}function O($){const k=(0,Xe._)`${$}.errors`;n.assign(pr.default.vErrors,(0,Xe._)`${pr.default.vErrors} === null ? ${k} : ${pr.default.vErrors}.concat(${k})`),n.assign(pr.default.errors,(0,Xe._)`${pr.default.vErrors}.length`)}function E($){var k;if(!a.opts.unevaluated)return;const _=(k=r==null?void 0:r.validate)===null||k===void 0?void 0:k.evaluated;if(a.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(a.props=ps.mergeEvaluated.props(n,_.props,a.props));else{const y=n.var("props",(0,Xe._)`${$}.evaluated.props`);a.props=ps.mergeEvaluated.props(n,y,a.props,Xe.Name)}if(a.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(a.items=ps.mergeEvaluated.items(n,_.items,a.items));else{const y=n.var("items",(0,Xe._)`${$}.evaluated.items`);a.items=ps.mergeEvaluated.items(n,y,a.items,Xe.Name)}}}Qt.callRef=hs,Qt.default=td,Object.defineProperty(xn,"__esModule",{value:!0});const rd=Vn,sd=Qt,nd=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",rd.default,sd.default];xn.default=nd;var Bn={},Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});const ms=ce,Rt=ms.operators,gs={maximum:{okStr:"<=",ok:Rt.LTE,fail:Rt.GT},minimum:{okStr:">=",ok:Rt.GTE,fail:Rt.LT},exclusiveMaximum:{okStr:"<",ok:Rt.LT,fail:Rt.GTE},exclusiveMinimum:{okStr:">",ok:Rt.GT,fail:Rt.LTE}},ad={message:({keyword:t,schemaCode:e})=>(0,ms.str)`must be ${gs[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,ms._)`{comparison: ${gs[t].okStr}, limit: ${e}}`},id={keyword:Object.keys(gs),type:"number",schemaType:"number",$data:!0,error:ad,code(t){const{keyword:e,data:r,schemaCode:s}=t;t.fail$data((0,ms._)`${r} ${gs[e].fail} ${s} || isNaN(${r})`)}};Ln.default=id;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});const Pr=ce,od={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>(0,Pr.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Pr._)`{multipleOf: ${t}}`},code(t){const{gen:e,data:r,schemaCode:s,it:n}=t,a=n.opts.multipleOfPrecision,i=e.let("res"),o=a?(0,Pr._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${a}`:(0,Pr._)`${i} !== parseInt(${i})`;t.fail$data((0,Pr._)`(${s} === 0 || (${i} = ${r}/${s}, ${o}))`)}};Rn.default=od;var zn={},qn={};Object.defineProperty(qn,"__esModule",{value:!0});function Vo(t){const e=t.length;let r=0,s=0,n;for(;s<e;)r++,n=t.charCodeAt(s++),n>=55296&&n<=56319&&s<e&&(n=t.charCodeAt(s),(n&64512)===56320&&s++);return r}qn.default=Vo,Vo.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(zn,"__esModule",{value:!0});const er=ce,ud=K,ld=qn,cd={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const r=t==="maxLength"?"more":"fewer";return(0,er.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,er._)`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:s,it:n}=t,a=e==="maxLength"?er.operators.GT:er.operators.LT,i=n.opts.unicode===!1?(0,er._)`${r}.length`:(0,er._)`${(0,ud.useFunc)(t.gen,ld.default)}(${r})`;t.fail$data((0,er._)`${i} ${a} ${s}`)}};zn.default=cd;var Un={};Object.defineProperty(Un,"__esModule",{value:!0});const dd=de,ys=ce,fd={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,ys.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,ys._)`{pattern: ${t}}`},code(t){const{data:e,$data:r,schema:s,schemaCode:n,it:a}=t,i=a.opts.unicodeRegExp?"u":"",o=r?(0,ys._)`(new RegExp(${n}, ${i}))`:(0,dd.usePattern)(t,s);t.fail$data((0,ys._)`!${o}.test(${e})`)}};Un.default=fd;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});const Fr=ce,pd={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const r=t==="maxProperties"?"more":"fewer";return(0,Fr.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Fr._)`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:s}=t,n=e==="maxProperties"?Fr.operators.GT:Fr.operators.LT;t.fail$data((0,Fr._)`Object.keys(${r}).length ${n} ${s}`)}};Hn.default=pd;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const Mr=de,jr=ce,hd=K,md={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>(0,jr.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,jr._)`{missingProperty: ${t}}`},code(t){const{gen:e,schema:r,schemaCode:s,data:n,$data:a,it:i}=t,{opts:o}=i;if(!a&&r.length===0)return;const l=r.length>=o.loopRequired;if(i.allErrors?c():f(),o.strictRequired){const E=t.parentSchema.properties,{definedProperties:$}=t.it;for(const k of r)if((E==null?void 0:E[k])===void 0&&!$.has(k)){const _=i.schemaEnv.baseId+i.errSchemaPath,y=`required property "${k}" is not defined at "${_}" (strictRequired)`;(0,hd.checkStrictMode)(i,y,i.opts.strictRequired)}}function c(){if(l||a)t.block$data(jr.nil,p);else for(const E of r)(0,Mr.checkReportMissingProp)(t,E)}function f(){const E=e.let("missing");if(l||a){const $=e.let("valid",!0);t.block$data($,()=>O(E,$)),t.ok($)}else e.if((0,Mr.checkMissingProp)(t,r,E)),(0,Mr.reportMissingProp)(t,E),e.else()}function p(){e.forOf("prop",s,E=>{t.setParams({missingProperty:E}),e.if((0,Mr.noPropertyInData)(e,n,E,o.ownProperties),()=>t.error())})}function O(E,$){t.setParams({missingProperty:E}),e.forOf(E,s,()=>{e.assign($,(0,Mr.propertyInData)(e,n,E,o.ownProperties)),e.if((0,jr.not)($),()=>{t.error(),e.break()})},jr.nil)}}};Kn.default=md;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});const xr=ce,gd={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const r=t==="maxItems"?"more":"fewer";return(0,xr.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,xr._)`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:s}=t,n=e==="maxItems"?xr.operators.GT:xr.operators.LT;t.fail$data((0,xr._)`${r}.length ${n} ${s}`)}};Gn.default=gd;var Wn={},Vr={};Object.defineProperty(Vr,"__esModule",{value:!0});const Bo=fo;Bo.code='require("ajv/dist/runtime/equal").default',Vr.default=Bo,Object.defineProperty(Wn,"__esModule",{value:!0});const Yn=je,ze=ce,yd=K,vd=Vr,_d={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:t,j:e}})=>(0,ze.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,ze._)`{i: ${t}, j: ${e}}`},code(t){const{gen:e,data:r,$data:s,schema:n,parentSchema:a,schemaCode:i,it:o}=t;if(!s&&!n)return;const l=e.let("valid"),c=a.items?(0,Yn.getSchemaTypes)(a.items):[];t.block$data(l,f,(0,ze._)`${i} === false`),t.ok(l);function f(){const $=e.let("i",(0,ze._)`${r}.length`),k=e.let("j");t.setParams({i:$,j:k}),e.assign(l,!0),e.if((0,ze._)`${$} > 1`,()=>(p()?O:E)($,k))}function p(){return c.length>0&&!c.some($=>$==="object"||$==="array")}function O($,k){const _=e.name("item"),y=(0,Yn.checkDataTypes)(c,_,o.opts.strictNumbers,Yn.DataType.Wrong),I=e.const("indices",(0,ze._)`{}`);e.for((0,ze._)`;${$}--;`,()=>{e.let(_,(0,ze._)`${r}[${$}]`),e.if(y,(0,ze._)`continue`),c.length>1&&e.if((0,ze._)`typeof ${_} == "string"`,(0,ze._)`${_} += "_"`),e.if((0,ze._)`typeof ${I}[${_}] == "number"`,()=>{e.assign(k,(0,ze._)`${I}[${_}]`),t.error(),e.assign(l,!1).break()}).code((0,ze._)`${I}[${_}] = ${$}`)})}function E($,k){const _=(0,yd.useFunc)(e,vd.default),y=e.name("outer");e.label(y).for((0,ze._)`;${$}--;`,()=>e.for((0,ze._)`${k} = ${$}; ${k}--;`,()=>e.if((0,ze._)`${_}(${r}[${$}], ${r}[${k}])`,()=>{t.error(),e.assign(l,!1).break(y)})))}}};Wn.default=_d;var Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});const Jn=ce,bd=K,$d=Vr,Sd={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>(0,Jn._)`{allowedValue: ${t}}`},code(t){const{gen:e,data:r,$data:s,schemaCode:n,schema:a}=t;s||a&&typeof a=="object"?t.fail$data((0,Jn._)`!${(0,bd.useFunc)(e,$d.default)}(${r}, ${n})`):t.fail((0,Jn._)`${a} !== ${r}`)}};Xn.default=Sd;var Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});const Br=ce,Ed=K,kd=Vr,wd={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Br._)`{allowedValues: ${t}}`},code(t){const{gen:e,data:r,$data:s,schema:n,schemaCode:a,it:i}=t;if(!s&&n.length===0)throw new Error("enum must have non-empty array");const o=n.length>=i.opts.loopEnum;let l;const c=()=>l??(l=(0,Ed.useFunc)(e,kd.default));let f;if(o||s)f=e.let("valid"),t.block$data(f,p);else{if(!Array.isArray(n))throw new Error("ajv implementation error");const E=e.const("vSchema",a);f=(0,Br.or)(...n.map(($,k)=>O(E,k)))}t.pass(f);function p(){e.assign(f,!1),e.forOf("v",a,E=>e.if((0,Br._)`${c()}(${r}, ${E})`,()=>e.assign(f,!0).break()))}function O(E,$){const k=n[$];return typeof k=="object"&&k!==null?(0,Br._)`${c()}(${r}, ${E}[${$}])`:(0,Br._)`${r} === ${k}`}}};Zn.default=wd,Object.defineProperty(Bn,"__esModule",{value:!0});const Cd=Ln,Td=Rn,Od=zn,Ad=Un,Dd=Hn,Id=Kn,Nd=Gn,Pd=Wn,Fd=Xn,Md=Zn,jd=[Cd.default,Td.default,Od.default,Ad.default,Dd.default,Id.default,Nd.default,Pd.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Fd.default,Md.default];Bn.default=jd;var Qn={},hr={};Object.defineProperty(hr,"__esModule",{value:!0}),hr.validateAdditionalItems=void 0;const tr=ce,ea=K,xd={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>(0,tr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,tr._)`{limit: ${t}}`},code(t){const{parentSchema:e,it:r}=t,{items:s}=e;if(!Array.isArray(s)){(0,ea.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Lo(t,s)}};function Lo(t,e){const{gen:r,schema:s,data:n,keyword:a,it:i}=t;i.items=!0;const o=r.const("len",(0,tr._)`${n}.length`);if(s===!1)t.setParams({len:e.length}),t.pass((0,tr._)`${o} <= ${e.length}`);else if(typeof s=="object"&&!(0,ea.alwaysValidSchema)(i,s)){const c=r.var("valid",(0,tr._)`${o} <= ${e.length}`);r.if((0,tr.not)(c),()=>l(c)),t.ok(c)}function l(c){r.forRange("i",e.length,o,f=>{t.subschema({keyword:a,dataProp:f,dataPropType:ea.Type.Num},c),i.allErrors||r.if((0,tr.not)(c),()=>r.break())})}}hr.validateAdditionalItems=Lo,hr.default=xd;var ta={},mr={};Object.defineProperty(mr,"__esModule",{value:!0}),mr.validateTuple=void 0;const Ro=ce,vs=K,Vd=de,Bd={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:r}=t;if(Array.isArray(e))return zo(t,"additionalItems",e);r.items=!0,!(0,vs.alwaysValidSchema)(r,e)&&t.ok((0,Vd.validateArray)(t))}};function zo(t,e,r=t.schema){const{gen:s,parentSchema:n,data:a,keyword:i,it:o}=t;f(n),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=vs.mergeEvaluated.items(s,r.length,o.items));const l=s.name("valid"),c=s.const("len",(0,Ro._)`${a}.length`);r.forEach((p,O)=>{(0,vs.alwaysValidSchema)(o,p)||(s.if((0,Ro._)`${c} > ${O}`,()=>t.subschema({keyword:i,schemaProp:O,dataProp:O},l)),t.ok(l))});function f(p){const{opts:O,errSchemaPath:E}=o,$=r.length,k=$===p.minItems&&($===p.maxItems||p[e]===!1);if(O.strictTuples&&!k){const _=`"${i}" is ${$}-tuple, but minItems or maxItems/${e} are not specified or different at path "${E}"`;(0,vs.checkStrictMode)(o,_,O.strictTuples)}}}mr.validateTuple=zo,mr.default=Bd,Object.defineProperty(ta,"__esModule",{value:!0});const Ld=mr,Rd={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Ld.validateTuple)(t,"items")};ta.default=Rd;var ra={};Object.defineProperty(ra,"__esModule",{value:!0});const qo=ce,zd=K,qd=de,Ud=hr,Hd={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>(0,qo.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,qo._)`{limit: ${t}}`},code(t){const{schema:e,parentSchema:r,it:s}=t,{prefixItems:n}=r;s.items=!0,!(0,zd.alwaysValidSchema)(s,e)&&(n?(0,Ud.validateAdditionalItems)(t,n):t.ok((0,qd.validateArray)(t)))}};ra.default=Hd;var sa={};Object.defineProperty(sa,"__esModule",{value:!0});const it=ce,_s=K,Kd={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:e}})=>e===void 0?(0,it.str)`must contain at least ${t} valid item(s)`:(0,it.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,it._)`{minContains: ${t}}`:(0,it._)`{minContains: ${t}, maxContains: ${e}}`},code(t){const{gen:e,schema:r,parentSchema:s,data:n,it:a}=t;let i,o;const{minContains:l,maxContains:c}=s;a.opts.next?(i=l===void 0?1:l,o=c):i=1;const f=e.const("len",(0,it._)`${n}.length`);if(t.setParams({min:i,max:o}),o===void 0&&i===0){(0,_s.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,_s.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,_s.alwaysValidSchema)(a,r)){let k=(0,it._)`${f} >= ${i}`;o!==void 0&&(k=(0,it._)`${k} && ${f} <= ${o}`),t.pass(k);return}a.items=!0;const p=e.name("valid");o===void 0&&i===1?E(p,()=>e.if(p,()=>e.break())):i===0?(e.let(p,!0),o!==void 0&&e.if((0,it._)`${n}.length > 0`,O)):(e.let(p,!1),O()),t.result(p,()=>t.reset());function O(){const k=e.name("_valid"),_=e.let("count",0);E(k,()=>e.if(k,()=>$(_)))}function E(k,_){e.forRange("i",0,f,y=>{t.subschema({keyword:"contains",dataProp:y,dataPropType:_s.Type.Num,compositeRule:!0},k),_()})}function $(k){e.code((0,it._)`${k}++`),o===void 0?e.if((0,it._)`${k} >= ${i}`,()=>e.assign(p,!0).break()):(e.if((0,it._)`${k} > ${o}`,()=>e.assign(p,!1).break()),i===1?e.assign(p,!0):e.if((0,it._)`${k} >= ${i}`,()=>e.assign(p,!0)))}}};sa.default=Kd;var Uo={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=ce,r=K,s=de;t.error={message:({params:{property:l,depsCount:c,deps:f}})=>{const p=c===1?"property":"properties";return(0,e.str)`must have ${p} ${f} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:f,missingProperty:p}})=>(0,e._)`{property: ${l},
|
|
25
|
-
missingProperty: ${
|
|
19
|
+
*/var ws,la;function Go(){if(la)return ws;la=1;var r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function s(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function n(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},o=0;o<10;o++)i["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ws=n()?Object.assign:function(a,i){for(var o,l=s(a),c,d=1;d<arguments.length;d++){o=Object(arguments[d]);for(var f in o)e.call(o,f)&&(l[f]=o[f]);if(r){c=r(o);for(var w=0;w<c.length;w++)t.call(o,c[w])&&(l[c[w]]=o[c[w]])}}return l},ws}var Cs,ua;function Ts(){if(ua)return Cs;ua=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Cs=r,Cs}var Os,ca;function da(){return ca||(ca=1,Os=Function.call.bind(Object.prototype.hasOwnProperty)),Os}var As,fa;function Wo(){if(fa)return As;fa=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=Ts(),t={},s=da();r=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function n(a,i,o,l,c){if(process.env.NODE_ENV!=="production"){for(var d in a)if(s(a,d)){var f;try{if(typeof a[d]!="function"){var w=Error((l||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}f=a[d](i,d,l,o,null,e)}catch(S){f=S}if(f&&!(f instanceof Error)&&r((l||"React class")+": type specification of "+o+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in t)){t[f.message]=!0;var y=c?c():"";r("Failed "+o+" type: "+f.message+(y??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},As=n,As}var Ds,pa;function Yo(){if(pa)return Ds;pa=1;var r=oa(),e=Go(),t=Ts(),s=da(),n=Wo(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return Ds=function(o,l){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(F){var v=F&&(c&&F[c]||F[d]);if(typeof v=="function")return v}var w="<<anonymous>>",y={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:T(),arrayOf:C,element:O(),elementType:_(),instanceOf:q,node:ae(),objectOf:J,oneOf:z,oneOfType:W,shape:Y,exact:ee};function S(F,v){return F===v?F!==0||1/F===1/v:F!==F&&v!==v}function E(F,v){this.message=F,this.data=v&&typeof v=="object"?v:{},this.stack=""}E.prototype=Error.prototype;function b(F){if(process.env.NODE_ENV!=="production")var v={},x=0;function P(p,$,M,L,U,H,D){if(L=L||w,H=H||M,D!==t){if(l){var k=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw k.name="Invariant Violation",k}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var R=L+":"+M;!v[R]&&x<3&&(a("You are manually calling a React.PropTypes validation function for the `"+H+"` prop on `"+L+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),v[R]=!0,x++)}}return $[M]==null?p?$[M]===null?new E("The "+U+" `"+H+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new E("The "+U+" `"+H+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:F($,M,L,U,H)}var u=P.bind(null,!1);return u.isRequired=P.bind(null,!0),u}function g(F){function v(x,P,u,p,$,M){var L=x[P],U=he(L);if(U!==F){var H=ge(L);return new E("Invalid "+p+" `"+$+"` of type "+("`"+H+"` supplied to `"+u+"`, expected ")+("`"+F+"`."),{expectedType:F})}return null}return b(v)}function T(){return b(i)}function C(F){function v(x,P,u,p,$){if(typeof F!="function")return new E("Property `"+$+"` of component `"+u+"` has invalid PropType notation inside arrayOf.");var M=x[P];if(!Array.isArray(M)){var L=he(M);return new E("Invalid "+p+" `"+$+"` of type "+("`"+L+"` supplied to `"+u+"`, expected an array."))}for(var U=0;U<M.length;U++){var H=F(M,U,u,p,$+"["+U+"]",t);if(H instanceof Error)return H}return null}return b(v)}function O(){function F(v,x,P,u,p){var $=v[x];if(!o($)){var M=he($);return new E("Invalid "+u+" `"+p+"` of type "+("`"+M+"` supplied to `"+P+"`, expected a single ReactElement."))}return null}return b(F)}function _(){function F(v,x,P,u,p){var $=v[x];if(!r.isValidElementType($)){var M=he($);return new E("Invalid "+u+" `"+p+"` of type "+("`"+M+"` supplied to `"+P+"`, expected a single ReactElement type."))}return null}return b(F)}function q(F){function v(x,P,u,p,$){if(!(x[P]instanceof F)){var M=F.name||w,L=Ne(x[P]);return new E("Invalid "+p+" `"+$+"` of type "+("`"+L+"` supplied to `"+u+"`, expected ")+("instance of `"+M+"`."))}return null}return b(v)}function z(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function v(x,P,u,p,$){for(var M=x[P],L=0;L<F.length;L++)if(S(M,F[L]))return null;var U=JSON.stringify(F,function(D,k){var R=ge(k);return R==="symbol"?String(k):k});return new E("Invalid "+p+" `"+$+"` of value `"+String(M)+"` "+("supplied to `"+u+"`, expected one of "+U+"."))}return b(v)}function J(F){function v(x,P,u,p,$){if(typeof F!="function")return new E("Property `"+$+"` of component `"+u+"` has invalid PropType notation inside objectOf.");var M=x[P],L=he(M);if(L!=="object")return new E("Invalid "+p+" `"+$+"` of type "+("`"+L+"` supplied to `"+u+"`, expected an object."));for(var U in M)if(s(M,U)){var H=F(M,U,u,p,$+"."+U,t);if(H instanceof Error)return H}return null}return b(v)}function W(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var v=0;v<F.length;v++){var x=F[v];if(typeof x!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+De(x)+" at index "+v+"."),i}function P(u,p,$,M,L){for(var U=[],H=0;H<F.length;H++){var D=F[H],k=D(u,p,$,M,L,t);if(k==null)return null;k.data&&s(k.data,"expectedType")&&U.push(k.data.expectedType)}var R=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new E("Invalid "+M+" `"+L+"` supplied to "+("`"+$+"`"+R+"."))}return b(P)}function ae(){function F(v,x,P,u,p){return X(v[x])?null:new E("Invalid "+u+" `"+p+"` supplied to "+("`"+P+"`, expected a ReactNode."))}return b(F)}function G(F,v,x,P,u){return new E((F||"React class")+": "+v+" type `"+x+"."+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+u+"`.")}function Y(F){function v(x,P,u,p,$){var M=x[P],L=he(M);if(L!=="object")return new E("Invalid "+p+" `"+$+"` of type `"+L+"` "+("supplied to `"+u+"`, expected `object`."));for(var U in F){var H=F[U];if(typeof H!="function")return G(u,p,$,U,ge(H));var D=H(M,U,u,p,$+"."+U,t);if(D)return D}return null}return b(v)}function ee(F){function v(x,P,u,p,$){var M=x[P],L=he(M);if(L!=="object")return new E("Invalid "+p+" `"+$+"` of type `"+L+"` "+("supplied to `"+u+"`, expected `object`."));var U=e({},x[P],F);for(var H in U){var D=F[H];if(s(F,H)&&typeof D!="function")return G(u,p,$,H,ge(D));if(!D)return new E("Invalid "+p+" `"+$+"` key `"+H+"` supplied to `"+u+"`.\nBad object: "+JSON.stringify(x[P],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(F),null," "));var k=D(M,H,u,p,$+"."+H,t);if(k)return k}return null}return b(v)}function X(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every(X);if(F===null||o(F))return!0;var v=f(F);if(v){var x=v.call(F),P;if(v!==F.entries){for(;!(P=x.next()).done;)if(!X(P.value))return!1}else for(;!(P=x.next()).done;){var u=P.value;if(u&&!X(u[1]))return!1}}else return!1;return!0;default:return!1}}function fe(F,v){return F==="symbol"?!0:v?v["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&v instanceof Symbol:!1}function he(F){var v=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":fe(v,F)?"symbol":v}function ge(F){if(typeof F>"u"||F===null)return""+F;var v=he(F);if(v==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return v}function De(F){var v=ge(F);switch(v){case"array":case"object":return"an "+v;case"boolean":case"date":case"regexp":return"a "+v;default:return v}}function Ne(F){return!F.constructor||!F.constructor.name?w:F.constructor.name}return y.checkPropTypes=n,y.resetWarningCache=n.resetWarningCache,y.PropTypes=y,y},Ds}var Is,ha;function Xo(){if(ha)return Is;ha=1;var r=Ts();function e(){}function t(){}return t.resetWarningCache=e,Is=function(){function s(i,o,l,c,d,f){if(f!==r){var w=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw w.name="Invariant Violation",w}}s.isRequired=s;function n(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:n,element:s,elementType:s,instanceOf:n,node:s,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},Is}if(process.env.NODE_ENV!=="production"){var Jo=oa(),Zo=!0;ks.exports=Yo()(Jo.isElement,Zo)}else ks.exports=Xo()();var Qo=ks.exports;const h=Es(Qo),ma={Primary:"primary",Secondary:"secondary",Info:"info",Success:"success",Danger:"danger",Warning:"warning",Neutral:"neutral"},ga={Solid:"solid",Outline:"outline",Text:"text"},ya={Large:"lg",Medium:"md",Small:"sm"},va={Right:"right",Left:"left"},be={name:"Button",class:"ds-button",props:{color:{type:String,default:ma.Primary,options:Object.values(ma)},variant:{type:String,default:ga.Solid,options:Object.values(ga)},size:{type:String,default:ya.Medium,options:Object.values(ya)},elevation:{type:Number,options:[1,2,3,4]},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},iconFill:{type:Boolean,default:!0},iconPosition:{type:String,default:va.Right,options:Object.values(va)},id:{type:String,default:""},testId:{type:String,default:"ds-button-test"},fullSize:{type:Boolean,default:!1}}},_a={Primary:"primary",PrimaryLightest:"primary-lightest",PrimaryLighter:"primary-lighter",PrimaryLight:"primary-light",PrimaryDark:"primary-dark",PrimaryDarker:"primary-darker",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",Secondary:"secondary",SecondaryLightest:"secondary-lightest",SecondaryLighter:"secondary-lighter",SecondaryLight:"secondary-light",SecondaryDark:"secondary-dark",SecondaryDarker:"secondary-darker",Success:"success",SuccessLighter:"success-lighter",SuccessLight:"success-light",SuccessDark:"success-dark",Warning:"warning",WarningLighter:"warning-lighter",WarningLight:"warning-light",WarningDark:"warning-dark",Danger:"danger",DangerLighter:"danger-lighter",DangerLight:"danger-light",DangerDark:"danger-dark",Info:"info",InfoLighter:"info-lighter",InfoLight:"info-light",InfoDark:"info-dark"},ba={Outlined:"outlined",Rounded:"rounded",Sharp:"sharp"},$a={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl",Huge:"huge"},Sa={Bold:"bold",Semibold:"semibold",Medium:"medium",Regular:"regular",Light:"light",Extralight:"extralight"},Ze={name:"Icon",class:"ds-icon",props:{color:{type:String,default:_a.Neutral90,options:Object.values(_a)},image:{type:String,default:"settings"},variation:{type:String,default:ba.Outlined,options:Object.values(ba)},size:{type:String,default:$a.MD,options:Object.values($a)},fontVariationSettings:{type:Object,default:{fill:0,grad:0,weight:500,opticalSize:48}},fill:{type:Boolean,default:!1},testId:{type:String,default:"ds-icon-test"},weight:{type:String,default:Sa.Semibold,options:Object.values(Sa)},onClick:{type:Function,default:()=>({})}}};var Ea=(r=>(r[r.bold=700]="bold",r[r.semibold=600]="semibold",r[r.medium=500]="medium",r[r.regular=400]="regular",r[r.light=300]="light",r[r.extralight=200]="extralight",r))(Ea||{});const ke=({image:r=Ze.props.image.default,color:e=Ze.props.color.default,className:t,size:s=Ze.props.size.default,fill:n=Ze.props.fill.default,weight:a=Ze.props.weight.default,testId:i=Ze.props.testId.default,onClick:o=Ze.props.onClick.default})=>{const l="material-symbols-rounded",c=e&&Ze.props.color.options.find(f=>f===e)&&`${Ze.class}__color--${e}`,d=j.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${Ea[a]}, 'opsz' 48`}),[a,n]);return I.jsx("i",{className:[`${Ze.class}--${s}`,Ze.class,l,c,t&&t].filter(f=>f).join(" "),"data-testid":i,onClick:o,style:d,translate:"no",children:r})};ke.propTypes={color:h.oneOf(Ze.props.color.options),image:h.string,fontVariationSettings:h.object,size:h.oneOf(Ze.props.size.options),fill:h.bool,weight:h.oneOf(Ze.props.weight.options),onClick:h.func},ke.displayName="DsIcon";const mr=({children:r,className:e,onClick:t,size:s=be.props.size.default,disabled:n=be.props.disabled.default,icon:a=be.props.icon.default,id:i=be.props.id.default,testId:o=be.props.testId.default,elevation:l,variant:c=be.props.variant.default,color:d=be.props.color.default,iconFill:f=be.props.iconFill.default,iconPosition:w=be.props.iconPosition.default,fullSize:y=be.props.fullSize.default})=>{const S=s&&be.props.size.options.find(q=>q===s)?`${be.class}--${s}`:`${be.class}__${be.props.size.default}`,E=n&&`${be.class}--disabled`,b=`${be.class}__${d}--${c}`,g=l&&`${be.class}--elevation-${l}`,T=a&&`${be.class}--with-icon`,C=y?`${be.class}--full-size`:"",O=w==="right"?`${be.class}__icon`:`${be.class}__icon--left`,_=w==="right"?`${be.class}__text`:`${be.class}__text--reversed`;return I.jsx("button",{className:[be.class,C,E,T,S,b,g,T,e&&e].filter(q=>q).join(" "),"data-testid":o,disabled:n,id:i,onClick:n?void 0:t,children:I.jsxs("span",{className:["ds-button__text",_].join(" "),children:[r,a&&I.jsx(ke,{className:["ds-button__icon",O].join(" "),fill:f,image:a,size:s})]})})};mr.propTypes={color:h.oneOf(be.props.color.options),variant:h.oneOf(be.props.variant.options),size:h.oneOf(be.props.size.options),disabled:h.bool,icon:h.string,iconFill:h.bool,iconPosition:h.oneOf(be.props.iconPosition.options),testId:h.string,id:h.string,fullSize:h.bool},mr.displayName="DsButton";const el={name:"Caption",class:"ds-caption"},Ns=({children:r,className:e,testId:t="ds-caption-test"})=>I.jsx("p",{className:[el.class,e&&e].filter(s=>s).join(" "),"data-testid":t,children:r});Ns.propTypes={children:h.node.isRequired,className:h.string,testId:h.string},Ns.displayName="DsCaption";const Br={None:"",PrimaryDarker:"primary-darker",PrimaryDark:"primary-dark",Primary:"primary",PrimaryLight:"primary-light",PrimaryLighter:"primary-lighter",PrimaryLightest:"primary-lightest",SecondaryDarker:"secondary-darker",SecondaryDark:"secondary-dark",Secondary:"secondary",SecondaryLight:"secondary-light",SecondaryLighter:"secondary-lighter",SecondaryLightest:"secondary-lightest",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",SuccessDark:"success-dark",Success:"success",SuccessLight:"success-light",SuccessLighter:"success-lighter",WarningDark:"warning-dark",Warning:"warning",WarningLight:"warning-light",WarningLighter:"warning-lighter",DangerDark:"danger-dark",Danger:"danger",DangerLight:"danger-light",DangerLighter:"danger-lighter",InfoDark:"info-dark",Info:"info",InfoLight:"info-light",InfoLighter:"info-lighter"},ct={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:Br.None,options:Object.values(Br)},borderColor:{type:String,default:Br.None,options:Object.values(Br)},elevation:{type:Number,default:0,options:[0,1,2,3,4]},id:{type:String,default:""},testId:{type:String,default:"ds-card"}}},Ps=({id:r,testId:e=ct.props.testId.default,children:t,className:s,elevation:n=ct.props.elevation.default,backgroundColor:a=ct.props.backgroundColor.default,borderColor:i=ct.props.borderColor.default})=>{const o=n&&`${ct.class}--elevation-${n}`,l=i&&`${ct.class}--border-${i}`,c=a&&`${ct.class}--${a}`;return I.jsx("div",{className:[ct.class,s,o,l,c].filter(d=>d).join(" "),"data-testid":e,id:r,children:t})};Ps.propTypes={id:h.string,testId:h.string,backgroundColor:h.oneOf(ct.props.backgroundColor.options),borderColor:h.oneOf(ct.props.borderColor.options),elevation:h.oneOf(ct.props.elevation.options)},Ps.displayName="DsCard";const Qe={name:"Checkbox",class:"ds-checkbox",props:{name:{type:String,required:!1},testId:{type:String,default:""},label:{type:String,default:""},description:{type:String,default:""},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},changeByChecked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Fs=j.forwardRef(({id:r,className:e,name:t,testId:s=t||"ds-checkbox-test",label:n=Qe.props.label.default,description:a=Qe.props.description.default,checked:i=Qe.props.checked.default,disabled:o=Qe.props.checked.default,changeByChecked:l=Qe.props.changeByChecked.default,onChangeHandler:c},d)=>{const f=l||!1,w=i||!1,[y,S]=j.useState(w),E={image:y?"check_box":"check_box_outline_blank",class:y?`${Qe.class}__icon--checked`:`${Qe.class}__icon--unchecked`},b=o&&`${Qe.class}--disabled`,g=T=>{o||(S(C=>!C),c&&c(T))};return j.useEffect(()=>{f&&S(i)},[i,f]),I.jsxs("label",{className:[Qe.class,b,e&&e].join(" "),htmlFor:r||t,children:[I.jsx("input",{checked:y,className:`${Qe.class}__input`,"data-testid":s,id:r||t,name:t,onChange:g,ref:d,type:"checkbox"}),I.jsx(ke,{className:`${Qe.class}__icon ${E.class}`,"data-testid":`${s}-icon`,fill:!0,image:E.image,size:"xxl"}),(a||n)&&I.jsxs("div",{className:`${Qe.class}__label`,children:[n&&I.jsx("label",{className:`${Qe.class}__label-title`,htmlFor:r||t,children:n}),a&&I.jsx("label",{className:`${Qe.class}__label-description`,htmlFor:r||t,children:a})]})]})});Fs.propTypes={label:h.oneOfType([h.string,h.node]),name:h.string,className:h.string,testId:h.string,description:h.oneOfType([h.string,h.node]),checked:h.bool,disabled:h.bool},Fs.displayName="DsCheckbox";const ka={Heading1:"heading-1",Heading2:"heading-2",Heading3:"heading-3",Heading4:"heading-4",Heading5:"heading-5",Heading6:"heading-6"},gr={name:"Heading",class:"ds-heading",props:{type:{type:String,default:ka.Heading1,options:Object.values(ka)}}},Ms=({children:r,testId:e="ds-heading-test",type:t=gr.props.type.default,className:s})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},a=gr.props.type.options.find(l=>l===t)&&`${gr.class}--${t}`,o=n[t];return I.jsx(o,{className:[gr.class,a,s&&s].filter(l=>l).join(" "),"data-testid":e,children:r})};Ms.propTypes={className:h.string,testId:h.string,type:h.oneOf(gr.props.type.options)},Ms.displayName="DsHeading";const wa={None:"",Dashed:"dashed",Dotted:"dotted"},Ca={None:"",Small:"small",Large:"large"},Lt={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:wa.None,options:Object.values(wa)},size:{type:String,default:Ca.None,options:Object.values(Ca)}}};function Ta(r,e,t){const s=t.props[r];return s.options&&s.options.some(n=>n===e)?`${t.class}--${e}`:""}const js=({size:r=Lt.props.size.default,borderStyle:e=Lt.props.borderStyle.default})=>{const t=Ta("size",r,Lt),s=Ta("borderStyle",e,Lt);return I.jsx("hr",{className:`${Lt.class} ${t} ${s}`.trim()})};js.propTypes={size:h.oneOf(Lt.props.size.options),borderStyle:h.oneOf(Lt.props.borderStyle.options)},js.displayName="DsHR";function Mt(r){return typeof r=="string"||r instanceof String}function Oa(r){var e;return typeof r=="object"&&r!=null&&(r==null||(e=r.constructor)==null?void 0:e.name)==="Object"}function Aa(r,e){return Array.isArray(e)?Aa(r,(t,s)=>e.includes(s)):Object.entries(r).reduce((t,s)=>{let[n,a]=s;return e(a,n)&&(t[n]=a),t},{})}const te={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function tl(r){switch(r){case te.LEFT:return te.FORCE_LEFT;case te.RIGHT:return te.FORCE_RIGHT;default:return r}}function xs(r){return r.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Lr(r,e){if(e===r)return!0;const t=Array.isArray(e),s=Array.isArray(r);let n;if(t&&s){if(e.length!=r.length)return!1;for(n=0;n<e.length;n++)if(!Lr(e[n],r[n]))return!1;return!0}if(t!=s)return!1;if(e&&r&&typeof e=="object"&&typeof r=="object"){const a=e instanceof Date,i=r instanceof Date;if(a&&i)return e.getTime()==r.getTime();if(a!=i)return!1;const o=e instanceof RegExp,l=r instanceof RegExp;if(o&&l)return e.toString()==r.toString();if(o!=l)return!1;const c=Object.keys(e);for(n=0;n<c.length;n++)if(!Object.prototype.hasOwnProperty.call(r,c[n]))return!1;for(n=0;n<c.length;n++)if(!Lr(r[c[n]],e[c[n]]))return!1;return!0}else if(e&&r&&typeof e=="function"&&typeof r=="function")return e.toString()===r.toString();return!1}class rl{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?te.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?te.RIGHT:te.LEFT}}function oe(r,e){return new oe.InputMask(r,e)}function Da(r){if(r==null)throw new Error("mask property should be defined");return r instanceof RegExp?oe.MaskedRegExp:Mt(r)?oe.MaskedPattern:r===Date?oe.MaskedDate:r===Number?oe.MaskedNumber:Array.isArray(r)||r===Array?oe.MaskedDynamic:oe.Masked&&r.prototype instanceof oe.Masked?r:oe.Masked&&r instanceof oe.Masked?r.constructor:r instanceof Function?oe.MaskedFunction:(console.warn("Mask not found for mask",r),oe.Masked)}function yr(r){if(!r)throw new Error("Options in not defined");if(oe.Masked){if(r.prototype instanceof oe.Masked)return{mask:r};const{mask:e=void 0,...t}=r instanceof oe.Masked?{mask:r}:Oa(r)&&r.mask instanceof oe.Masked?r:{};if(e){const s=e.mask;return{...Aa(e,(n,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return Oa(r)?{...r}:{mask:r}}function wt(r){if(oe.Masked&&r instanceof oe.Masked)return r;const e=yr(r),t=Da(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}oe.createMask=wt;class Vs{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}oe.MaskElement=Vs;const Ia=90,sl=89;class Rr extends Vs{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return(e=(t=(s=this.input).getRootNode)==null?void 0:t.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Ia&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===sl&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Ia&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}oe.HTMLMaskElement=Rr;class nl extends Rr{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}oe.HTMLMaskElement=Rr;class Na extends Rr{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,n=t&&t.focusOffset;return n==null||s==null||s<n?s:n}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,n=t&&t.focusOffset;return n==null||s==null||s>n?s:n}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}oe.HTMLContenteditableMaskElement=Na;class zr{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>zr.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}zr.MAX_LENGTH=100;class al{constructor(e,t){this.el=e instanceof Vs?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Na(e):new nl(e),this.masked=wt(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new zr,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof oe.Masked)&&this.masked.constructor===Da(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof oe.Masked?e:wt({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach(n=>n(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==n;this._unmaskedValue=t,this._value=s,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,n=!this.maskEquals(t),a=this.masked.optionsIsChanged(s);n&&(this.mask=t),a&&this.masked.updateOptions(s),(n||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,te.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new rl({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,n=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?t.removeDirection:te.NONE;let i=this.masked.nearestInputPos(t.startChangePos+n,a);a!==te.NONE&&(i=this.masked.nearestInputPos(i,te.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}oe.InputMask=al;class ce{static normalize(e){return Array.isArray(e)?e:[e,new ce]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}oe.ChangeDetails=ce;class vt{constructor(e,t,s){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class We{constructor(e){this._value="",this._update({...We.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new vt(this.extractInput(e,t),e)}appendTail(e){return Mt(e)&&(e=new vt(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new ce({inserted:e,rawInserted:e})):new ce}_appendChar(e,t,s){t===void 0&&(t={});const n=this.state;let a;if([e,a]=this.doPrepareChar(e,t),e&&(a=a.aggregate(this._appendCharRaw(e,t)),!a.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let o=this.pad(t);const l=this._appendCharRaw(e,t);o=o.aggregate(l),l.rawInserted||o.equals(a)?a=o:this.state=i}if(a.inserted){let i,o=this.doValidate(t)!==!1;if(o&&s!=null){const l=this.state;if(this.overwrite===!0){i=s.state;for(let d=0;d<a.rawInserted.length;++d)s.unshift(this.displayValue.length-a.tailShift)}let c=this.appendTail(s);if(o=c.rawInserted.length===s.toString().length,!(o&&c.inserted)&&this.overwrite==="shift"){this.state=l,i=s.state;for(let d=0;d<a.rawInserted.length;++d)s.shift();c=this.appendTail(s),o=c.rawInserted.length===s.toString().length}o&&c.inserted&&(this.state=l)}o||(a=new ce,this.state=n,s&&i&&(s.state=i))}return a}_appendPlaceholder(){return new ce}_appendEager(){return new ce}append(e,t,s){if(!Mt(e))throw new Error("value should be string");const n=Mt(s)?new vt(String(s)):s;t!=null&&t.tail&&(t._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,t);for(let i=0;i<e.length;++i){const o=this._appendChar(e[i],t,n);if(!o.rawInserted&&!this.doSkipInvalid(e[i],t,n))break;a.aggregate(o)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new ce}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,n=e();return this.rawInputValue=t,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),ce.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),ce.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,s,n,a){s===void 0&&(s=""),n===void 0&&(n=te.NONE),a===void 0&&(a={input:!0});const i=e+t,o=this.extractTail(i),l=this.eager===!0||this.eager==="remove";let c;l&&(n=tl(n),c=this.extractInput(0,i,{raw:!0}));let d=e;const f=new ce;if(n!==te.NONE&&(d=this.nearestInputPos(e,t>1&&e!==0&&!l?te.NONE:n),f.tailShift=d-e),f.aggregate(this.remove(d)),l&&n!==te.NONE&&c===this.rawInputValue)if(n===te.FORCE_LEFT){let w;for(;c===this.rawInputValue&&(w=this.displayValue.length);)f.aggregate(new ce({tailShift:-1})).aggregate(this.remove(w-1))}else n===te.FORCE_RIGHT&&o.unshift();return f.aggregate(this.append(s,a,o))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Lr(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||We.EMPTY_VALUES.includes(e)&&We.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new ce}}We.DEFAULTS={skipInvalid:!0},We.EMPTY_VALUES=[void 0,null,""],oe.Masked=We;class Rt{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Mt(e)?new vt(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof vt)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof Rt){if(e.stop==null){let n;for(;e.chunks.length&&e.chunks[0].stop==null;)n=e.chunks.shift(),n.from+=e.from,this.extend(n)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof oe.MaskedPattern))return new vt(this.toString()).appendTo(e);const t=new ce;for(let s=0;s<this.chunks.length;++s){const n=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),i=n.stop;let o;if(i!=null&&(!a||a.index<=i)&&((n instanceof Rt||e._stops.indexOf(i)>=0)&&t.aggregate(e._appendPlaceholder(i)),o=n instanceof Rt&&e._blocks[i]),o){const l=o.appendTail(n);t.aggregate(l);const c=n.toString().slice(l.rawInserted.length);c&&t.aggregate(e.append(c,{tail:!0}))}else t.aggregate(e.append(n.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map(n=>{const a="chunks"in n?new Rt:new vt;return a.state=n,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const n=this.chunks[s],a=n.unshift(t);if(n.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class il{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:n}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,te.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,te.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,te.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,te.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,te.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,te.NONE),!0})}}class Pa{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new ce}nearestInputPos(e,t){t===void 0&&(t=te.NONE);const s=0,n=this._value.length;switch(t){case te.LEFT:case te.FORCE_LEFT:return s;case te.NONE:case te.RIGHT:case te.FORCE_RIGHT:default:return n}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new ce;const s=this.eager===!0||this.eager==="append",a=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,i=new ce({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(t.raw||t.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new ce;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new vt("")}appendTail(e){return Mt(e)&&(e=new vt(String(e))),e.appendTo(this)}append(e,t,s){const n=this._appendChar(e[0],t);return s!=null&&(n.tailShift+=this.appendTail(s).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class qr{constructor(e){const{parent:t,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:o,...l}=e;this.masked=wt(l),Object.assign(this,{parent:t,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:o})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new ce}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new ce;const s=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(t));return n.inserted&&this.doValidate(t)===!1&&(n=new ce,this.masked.state=s),!n.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ce:(this.isFilled=!0,new ce({inserted:this.placeholderChar}))}_appendEager(){return new ce}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){t===void 0&&(t=te.NONE);const s=0,n=this.value.length,a=Math.min(Math.max(e,s),n);switch(t){case te.LEFT:case te.FORCE_LEFT:return this.isComplete?a:s;case te.RIGHT:case te.FORCE_RIGHT:return this.isComplete?a:n;case te.NONE:default:return a}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new ce}}qr.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class ol extends We{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}}oe.MaskedRegExp=ol;class Ye extends We{constructor(e){super({...Ye.DEFAULTS,...e,definitions:Object.assign({},qr.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,n=!1;for(let a=0;a<t.length;++a){if(this.blocks){const c=t.slice(a),d=Object.keys(this.blocks).filter(w=>c.indexOf(w)===0);d.sort((w,y)=>y.length-w.length);const f=d[0];if(f){const{expose:w,repeat:y,...S}=yr(this.blocks[f]),E={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...S,repeat:y,parent:this},b=y!=null?new oe.RepeatBlock(E):wt(E);b&&(this._blocks.push(b),w&&(this.exposeBlock=b),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),a+=f.length-1;continue}}let i=t[a],o=i in e;if(i===Ye.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){s=!s;continue}if(i==="["||i==="]"){n=!n;continue}if(i===Ye.ESCAPE_CHAR){if(++a,i=t[a],!i)break;o=!1}const l=o?new qr({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...yr(e[i]),parent:this}):new Pa({char:i,eager:this.eager,isUnmasking:s});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...s}=e;this._blocks.forEach((n,a)=>n.state=t[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new ce;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return t;this._blocks[s].isFilled&&++s;for(let n=s;n<this._blocks.length;++n){const a=this._blocks[n]._appendEager();if(!a.inserted)break;t.aggregate(a)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._mapPosToBlock(this.displayValue.length),n=new ce;if(!s)return n;for(let i=s.index,o;o=this._blocks[i];++i){var a;const l=o._appendChar(e,{...t,_beforeTailState:(a=t._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]});if(n.aggregate(l),l.consumed)break}return n}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new Rt;return e===t||this._forEachBlocksInRange(e,t,(n,a,i,o)=>{const l=n.extractTail(i,o);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof Rt&&(l.blockIndex=a),s.extend(l)}),s}extractInput(e,t,s){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),s===void 0&&(s={}),e===t)return"";let n="";return this._forEachBlocksInRange(e,t,(a,i,o,l)=>{n+=a.extractInput(o,l,s)}),n}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const n=this._stops[s];if(n<=e)t=n;else break}return t}_appendPlaceholder(e){const t=new ce;if(this.lazy&&e==null)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const n=s.index,a=e??this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||e!=null){var o;t.aggregate(i._appendPlaceholder((o=i._blocks)==null?void 0:o.length))}}),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const n=this._blocks[s],a=t.length;if(t+=n.displayValue,e<=t.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,s)=>t+=s.displayValue.length,0)}_forEachBlocksInRange(e,t,s){t===void 0&&(t=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const a=this._mapPosToBlock(t),i=a&&n.index===a.index,o=n.offset,l=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(s(this._blocks[n.index],n.index,o,l),a&&!i){for(let c=n.index+1;c<a.index;++c)s(this._blocks[c],c,0,this._blocks[c].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,(n,a,i,o)=>{s.aggregate(n.remove(i,o))}),s}nearestInputPos(e,t){if(t===void 0&&(t=te.NONE),!this._blocks.length)return 0;const s=new il(this,e);if(t===te.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===te.LEFT||t===te.FORCE_LEFT){if(t===te.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===te.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:t===te.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===te.RIGHT||t===te.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===te.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,te.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,(n,a,i,o)=>{s+=n.totalInputPositions(i,o)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(s=>this._blocks[s]):[]}pad(e){const t=new ce;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}}Ye.DEFAULTS={...We.DEFAULTS,lazy:!0,placeholderChar:"_"},Ye.STOP_CHAR="`",Ye.ESCAPE_CHAR="\\",Ye.InputDefinition=qr,Ye.FixedDefinition=Pa,oe.MaskedPattern=Ye;class Ur extends Ye{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix,...i}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,n),this.autofix=a;const o=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<l.length&&l[c]===o[c];)++c;i.mask=l.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",s="";const[,n,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(t="0".repeat(n.length)+a,s="9".repeat(n.length)+a),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){t===void 0&&(t={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(s[this.value.length],t):Number(a)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(n[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[n,a]=this.boundaries(t);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const t=new ce;if(this.value.length===this.maxLength)return t;const s=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return t}}oe.MaskedRange=Ur;class Ct extends Ye{static extractPatternOptions(e){const{mask:t,pattern:s,...n}=e;return{...n,mask:Mt(t)?t:s}}constructor(e){super(Ct.extractPatternOptions({...Ct.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:n,...a}={...Ct.DEFAULTS,...e},i=Object.assign({},Ct.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,n),super._update({...a,mask:Mt(t)?t:s,blocks:i})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Ct.extractPatternOptions(e))}}Ct.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ur,from:1,to:31,maxLength:2},m:{mask:Ur,from:1,to:12,maxLength:2},Y:{mask:Ur,from:1900,to:9999}}),Ct.DEFAULTS={...Ye.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(r,e)=>{if(!r)return"";const t=String(r.getDate()).padStart(2,"0"),s=String(r.getMonth()+1).padStart(2,"0"),n=r.getFullYear();return[t,s,n].join(".")},parse:(r,e)=>{const[t,s,n]=r.split(".").map(Number);return new Date(n,s-1,t)}},oe.MaskedDate=Ct;class Hr extends We{constructor(e){super({...Hr.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:s,...n}=yr(t),a=wt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){e===void 0&&(e=""),t===void 0&&(t={}),s===void 0&&(s="");const n=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,a=this.rawInputValue,i=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:a,o=a.slice(i.length),l=this.currentMask,c=new ce,d=l==null?void 0:l.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),c.tailShift=this.currentMask.value.length-n.length),o&&(c.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new ce;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return t===void 0&&(t={}),s===void 0&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[s,n]=super.doPrepare(e,t);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(t)),n=n.aggregate(a)}return[s,n]}doPrepareChar(e,t){t===void 0&&(t={});let[s,n]=super.doPrepareChar(e,t);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(t)),n=n.aggregate(a)}return[s,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const s=new ce;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:n,...a}=e;t&&this.compiledMasks.forEach((i,o)=>i.state=t[o]),s!=null&&(this.currentMask=s,this.currentMask.state=n),super.state=a}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,s)=>{if(!e[s])return;const{mask:n,...a}=e[s];return Lr(t,a)&&t.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}Hr.DEFAULTS={...We.DEFAULTS,dispatch:(r,e,t,s)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,a=e.compiledMasks.map((i,o)=>{const l=e.currentMask===i,c=l?i.displayValue.length:i.nearestInputPos(i.displayValue.length,te.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):l||i.remove(c),i.append(r,e.currentMaskFlags(t)),i.appendTail(s),{index:o,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(c,i.nearestInputPos(i.displayValue.length,te.FORCE_LEFT)))}});return a.sort((i,o)=>o.weight-i.weight||o.totalInputPositions-i.totalInputPositions),e.compiledMasks[a[0].index]}},oe.MaskedDynamic=Hr;class Kr extends Ye{constructor(e){super({...Kr.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const n=t.map(o=>o.length),a=Math.min(...n),i=Math.max(...n)-a;s.mask="*".repeat(a),i&&(s.mask+="["+"*".repeat(i)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){t===void 0&&(t={});const s=Math.min(this.nearestInputPos(0,te.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,o)=>{const l=n[0][o];o>=this.value.length||l===i.value||(i.reset(),i._appendChar(l,t))});const a=super._appendCharRaw(n[0][this.value.length],t);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new ce({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new vt("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new ce;const s=Math.min(super.nearestInputPos(0,te.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(o=>this.matchValue(o,this.value.slice(s,n),s)).length>1);--n);const a=super.remove(n,t);return a.tailShift+=n-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}Kr.DEFAULTS={...Ye.DEFAULTS,matchValue:(r,e,t)=>r.indexOf(e,t)===t},oe.MaskedEnum=Kr;class ll extends We{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}oe.MaskedFunction=ll;var Fa;class rt extends We{constructor(e){super({...rt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+xs(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(xs).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(xs(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[s,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(n.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&n.aggregate(this._appendChar("-")),[s,n]}_separatorsCount(e,t){t===void 0&&(t=!1);let s=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){t===void 0&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const i=this.number;let o=!isNaN(i),l=!1;if(o){let w;this.min!=null&&this.min<0&&this.number<this.min&&(w=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(w=this.max),w!=null&&(this.autofix?(this._value=this.format(w,this).replace(rt.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!t.tail)):o=!1),o&&(o=!!this._value.match(this._numberRegExp))}let c;o?c=new ce({inserted:this._value.slice(a.length),rawInserted:l?"":e,skip:l}):(this._value=a,c=new ce),this._value=this._insertThousandsSeparators(this._value);const d=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,f=this._separatorsCountFromSlice(d);return c.tailShift+=(f-n)*this.thousandsSeparator.length,c}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const n=this._findSeparatorAround(t);return n>=0&&(t=n+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),n=this.value.slice(t),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+n));const i=this._separatorsCountFromSlice(s);return new ce({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case te.NONE:case te.LEFT:case te.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const n=s+this.thousandsSeparator.length;if(e<n||this.value.length<=n||t===te.FORCE_LEFT)return s}break}case te.RIGHT:case te.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(s,n,a,i)=>n+i),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){t===void 0&&(t={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===rt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,rt.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(rt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||rt.EMPTY_VALUES.includes(e)&&rt.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Fa=rt,rt.UNMASKED_RADIX=".",rt.EMPTY_VALUES=[...We.EMPTY_VALUES,0],rt.DEFAULTS={...We.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Fa.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:r=>r.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},oe.MaskedNumber=rt;const Bs={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Ma(r,e,t){e===void 0&&(e=Bs.MASKED),t===void 0&&(t=Bs.MASKED);const s=wt(r);return n=>s.runIsolated(a=>(a[e]=n,a[t]))}function ul(r,e,t,s){return Ma(e,t,s)(r)}oe.PIPE_TYPE=Bs,oe.createPipe=Ma,oe.pipe=ul;class cl extends Ye{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,n;const{repeat:a,...i}=yr(e);this._blockOpts=Object.assign({},this._blockOpts,i);const o=wt(this._blockOpts);this.repeat=(t=(s=a??o.repeat)!=null?s:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:o},eager:o.eager,overwrite:o.overwrite,skipInvalid:o.skipInvalid,lazy:o.lazy,placeholderChar:o.placeholderChar,displayChar:o.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(wt(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new ce;for(let l=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),c,d;c=(i=this._blocks[l])!=null?i:d=!d&&this._allocateBlock(l);++l){var n,a,i,o;const f=c._appendChar(e,{...t,_beforeTailState:(o=t._beforeTailState)==null||(o=o._blocks)==null?void 0:o[l]});if(f.skip&&d){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(f),f.consumed)break}return s}_trimEmptyTail(e,t){var s,n;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let i;t!=null&&(i=(n=this._mapPosToBlock(t))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let o=0;for(let l=i;a<=l&&!this._blocks[l].unmaskedValue;--l,++o);o&&(this._blocks.splice(i-o+1,o),this.mask=this.mask.slice(o))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}oe.RepeatBlock=cl;try{globalThis.IMask=oe}catch{}const ja={mask:h.oneOfType([h.array,h.func,h.string,h.instanceOf(RegExp),h.oneOf([Date,Number,oe.Masked]),h.instanceOf(oe.Masked)]),value:h.any,unmask:h.oneOfType([h.bool,h.oneOf(["typed"])]),prepare:h.func,prepareChar:h.func,validate:h.func,commit:h.func,overwrite:h.oneOfType([h.bool,h.oneOf(["shift"])]),eager:h.oneOfType([h.bool,h.oneOf(["append","remove"])]),skipInvalid:h.bool,onAccept:h.func,onComplete:h.func,placeholderChar:h.string,displayChar:h.string,lazy:h.bool,definitions:h.object,blocks:h.object,enum:h.arrayOf(h.string),maxLength:h.number,from:h.number,to:h.number,pattern:h.string,format:h.func,parse:h.func,autofix:h.oneOfType([h.bool,h.oneOf(["pad"])]),radix:h.string,thousandsSeparator:h.string,mapToRadix:h.arrayOf(h.string),scale:h.number,normalizeZeros:h.bool,padFractionalZeros:h.bool,min:h.oneOfType([h.number,h.instanceOf(Date)]),max:h.oneOfType([h.number,h.instanceOf(Date)]),dispatch:h.func,inputRef:h.oneOfType([h.func,h.shape({current:h.object})])},xa=Object.keys(ja).filter(r=>r!=="value"),dl=["value","unmask","onAccept","onComplete","inputRef"],fl=xa.filter(r=>dl.indexOf(r)<0);function pl(r){var e;const t=(e=class extends j.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,i=this._extractMaskOptionsFromProps(a);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(i);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var o;(o=this.element)!=null&&o.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=oe(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...i}=a;return Object.keys(i).filter(o=>fl.indexOf(o)<0).forEach(o=>{delete i[o]}),i}_extractNonMaskProps(a){const{...i}=a;return xa.forEach(o=>{o!=="maxLength"&&delete i[o]}),"defaultValue"in i||(i.defaultValue=a.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return j.createElement(r,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),s=r.displayName||r.name||"Component";return t.displayName="IMask("+s+")",t.propTypes=ja,j.forwardRef((n,a)=>j.createElement(t,{...n,ref:a}))}const hl=pl(r=>{let{inputRef:e,...t}=r;return j.createElement("input",{...t,ref:e})}),ml=(r,e)=>j.createElement(hl,{...r,ref:e});j.forwardRef(ml);function gl(r,e){let{onAccept:t,onComplete:s,ref:n=j.useRef(null),defaultValue:a,defaultUnmaskedValue:i,defaultTypedValue:o}=e===void 0?{}:e;const l=j.useRef(null),[c,d]=j.useState({}),[f,w]=j.useState(""),[y,S]=j.useState(""),[E,b]=j.useState(),g=j.useCallback(()=>{var _;(_=l.current)==null||_.destroy(),l.current=null},[]),T=j.useCallback(()=>{const _=l.current;_&&(d({value:_.value,unmaskedValue:_.unmaskedValue,typedValue:_.typedValue}),b(_.typedValue),S(_.unmaskedValue),w(_.value))},[]),C=j.useCallback(_=>{const q=l.current;q&&(T(),t==null||t(q.value,q,_))},[t]),O=j.useCallback(_=>l.current&&(s==null?void 0:s(l.current.value,l.current,_)),[s]);return j.useEffect(()=>{const{value:_,...q}=c,z=l.current;!z||f===void 0||(_!==f&&(z.value=f,z.value!==f&&C()),d(q))},[f]),j.useEffect(()=>{const{unmaskedValue:_,...q}=c,z=l.current;!z||y===void 0||(_!==y&&(z.unmaskedValue=y,z.unmaskedValue!==y&&C()),d(q))},[y]),j.useEffect(()=>{const{typedValue:_,...q}=c,z=l.current;!z||E===void 0||(_!==E&&(z.typedValue=E,z.masked.typedValueEquals(E)||C()),d(q))},[E]),j.useEffect(()=>{const _=n.current;if(!_||!(r!=null&&r.mask))return g();const q=l.current;q?q==null||q.updateOptions(r):_&&r!=null&&r.mask&&(l.current=oe(_,r),T(),a!==void 0&&w(a),i!==void 0&&S(i),o!==void 0&&b(o))},[r,g,C]),j.useEffect(()=>{if(!l.current)return;const _=l.current;return _.on("accept",C),_.on("complete",O),()=>{_.off("accept",C),_.off("complete",O)}},[C,O]),j.useEffect(()=>g,[g]),{ref:n,maskRef:l,value:f,setValue:w,unmaskedValue:y,setUnmaskedValue:S,typedValue:E,setTypedValue:b}}const Va={Text:"text",Password:"password",Email:"email",Date:"date",Number:"number"},Ba={Small:"small",Medium:"medium",Large:"large"},La={Default:"",Error:"error",Success:"success"},Ra={Center:"center",End:"end",Initial:"initial"},za={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Oe={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:""},type:{type:String,default:Va.Text,options:Object.values(Va)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:Ba.Medium,options:Object.values(Ba)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:La.Default,options:Object.values(La)},feedback:{type:String,default:""},hasFeedback:{type:Boolean,default:!0},noMargin:{type:Boolean,default:!1},icon:{type:String,default:""},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:Ra.Center,options:Object.values(Ra)},tooltipPosition:{type:String,default:za.Top,options:Object.values(za)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},qa={currency:{mask:"currency",blocks:{currency:{mask:"R$ num",lazy:!1,blocks:{num:{mask:Number,scale:2,thousandsSeparator:".",padFractionalZeros:!0,normalizeZeros:!1,radix:",",mapToRadix:[",","."]}}}}},document:{mask:[{mask:"000.000.000-00",startsWith:/[0-9]/,maxLength:14},{mask:"00.000.000/0000-00",startsWith:/[0-9]/,maxLength:18}]},"phone-br":{mask:[{mask:"(00) 0000-0000"},{mask:"(00) 00000-0000"}],dispatch:(r,e)=>(e.value+r).replace(/\D/g,"").length<=10?e.compiledMasks[0]:e.compiledMasks[1]}},Ua={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Ha={Center:"center",End:"end",Initial:"initial"},Tt={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:Ua.Top,options:Object.values(Ua)},placement:{type:String,default:Ha.Center,options:Object.values(Ha)},text:{type:String,default:""}}},zt=({children:r,position:e=Tt.props.position.default,placement:t=Tt.props.placement.default,text:s=Tt.props.text.default,className:n})=>{const a=j.useRef(null),i=j.useRef(null),[o,l]=j.useState(!1),c=e&&Tt.props.position.options.find(_=>_===e)&&`${Tt.class}--${e}`,d=t&&Tt.props.placement.options.find(_=>_===t)&&`${Tt.class}--${t}`,[f,w]=j.useState(0),[y,S]=j.useState(0),[E,b]=j.useState(0),[g,T]=j.useState(0);let C;switch(j.useEffect(()=>{var _,q,z,J;i.current&&(b((_=i==null?void 0:i.current)==null?void 0:_.offsetHeight),T((q=i==null?void 0:i.current)==null?void 0:q.offsetWidth)),a.current&&(w((z=a==null?void 0:a.current)==null?void 0:z.offsetHeight),S((J=a==null?void 0:a.current)==null?void 0:J.offsetWidth))},[a,o]),j.useEffect(()=>(document.addEventListener("mousedown",O),()=>{document.removeEventListener("mousedown",O)}),[]),e){case"top":t==="initial"?C={bottom:f+9,left:y<30?-y/1.5:-y*.01}:t==="end"?C={bottom:f+9,right:y<30?-y/1.5:-y*.01}:C={bottom:f+9,left:-g/2+y/2};break;case"bottom":t==="initial"?C={top:f+9,left:y<30?-y/1.5:-y*.01}:t==="end"?C={top:f+9,right:y<30?-y/1.5:-y*.01}:C={top:f+9,left:-g/2+y/2};break;case"left":t==="initial"?C={right:y+9,top:f<30?-f/1.5:-f*.01}:t==="end"?C={right:y+9,bottom:f<30?-f/1.5:-f*.01}:C={right:y+9,top:-E/2+f/2};break;case"right":t==="initial"?C={left:y+9,top:f<30?-f/1.5:-f*.01}:t==="end"?C={left:y+9,bottom:f<30?-f/1.5:-f*.01}:C={left:y+9,top:-E/2+f/2};break}const O=({target:_})=>{a.current&&a.current.contains(_)||l(!1)};return I.jsxs("span",{className:[Tt.class,n].join(" "),"data-testid":"tooltip",onClick:()=>l(!o),ref:a,children:[r,o&&I.jsx("span",{className:[c,d].filter(_=>_).join(" "),children:I.jsx("span",{className:`${Tt.class}__wrapper`,"data-testid":"tooltip-wrapper",ref:i,style:C,children:s})})]})};zt.propTypes={position:h.string,placement:h.string,text:h.oneOfType([h.string,h.node])},zt.displayName="DsTooltip";const rr=j.forwardRef(({name:r,testId:e=r||"ds-input-test",type:t=Oe.props.type.default,animated:s=Oe.props.animated.default,size:n=Oe.props.size.default,label:a,placeholder:i,value:o,min:l,max:c,tooltip:d=Oe.props.tooltip.default,tooltipPosition:f=Oe.props.tooltipPosition.default,tooltipPlacement:w=Oe.props.tooltipPlacement.default,icon:y=Oe.props.icon.default,status:S=Oe.props.status.default,feedback:E,hasFeedback:b=Oe.props.hasFeedback.default,noMargin:g=Oe.props.noMargin.default,disabled:T=Oe.props.disabled.default,className:C,mask:O,onChangeHandler:_=Oe.props.onChangeHandler.default,onBlurHandler:q,onKeyDownHandler:z,onFocusHandler:J},W)=>{const[ae,G]=j.useState(!1),[Y,ee]=j.useState(!1),X=!!_&&!!O,fe=(U,H,D)=>{if(X&&D){const k={...D,target:{...D.target,name:r,maskedValue:U,value:H.unmaskedValue,type:"text"}};_(k)}},he=j.useMemo(()=>typeof O=="object"?{lazy:!0,...O}:qa[O]?{...qa[O],min:l,max:c,lazy:!0}:{mask:O||"",min:l,max:c,lazy:!0},[O]),{ref:ge,setUnmaskedValue:De}=gl(he,{onAccept:fe}),Ne=U=>{_&&!X&&_(U)},F=U=>{z&&z(U)},v=U=>{G(!1),q&&q(U)},x=U=>{G(!0),J&&J(U)},P=()=>{ee(U=>!U)},u=j.useMemo(()=>Y&&t==="password"?"text":t,[Y,t]),p=()=>{const U=[`${Oe.class}`];return n&&U.push(`${Oe.class}--${n}`),s&&U.push(`${Oe.class}--animated`),g&&U.push(`${Oe.class}--no-margin`),y&&U.push(`${Oe.class}--with-icon`),S&&U.push(`${Oe.class}--${S}`),C&&U.push(C),U.join(" ")},$=j.useMemo(()=>{const U=[`${Oe.class}__label`];return(ae||o)&&U.push(`${Oe.class}__label--active`),U.join(" ")},[o,ae]),M=()=>!s&&i?i:"",L=()=>S&&S==="error"?"info":"check_circle";return j.useEffect(()=>{O&&De(o||"")},[o,O,De]),I.jsxs("div",{className:p(),ref:W,children:[b&&I.jsx("div",{className:"ds-input__feedback",children:E&&I.jsxs(I.Fragment,{children:[I.jsx(ke,{image:L()}),E]})}),I.jsx("input",{className:"ds-input__input","data-testid":e,disabled:T,id:r,max:c,min:l,name:r,onBlur:v,onChange:Ne,onFocus:x,onInput:Ne,onKeyDown:F,placeholder:M(),ref:ge,type:u,...!O&&{value:o||""}}),I.jsxs("label",{className:$,htmlFor:r,children:[a,d&&I.jsx(zt,{className:"ds-input__tooltip",placement:w,position:f,text:d,children:I.jsx(ke,{className:"ds-input__icon",image:"info"})})]}),y&&I.jsx(ke,{className:"ds-input__icon",image:y}),t==="password"&&I.jsx(ke,{className:"ds-input__password-icon",image:Y?"visibility_off":"visibility",onClick:P,size:"xl"})]})});rr.propTypes={name:h.string,testId:h.string,type:h.oneOf(Oe.props.type.options),animated:h.bool,size:h.oneOf(Oe.props.size.options),label:h.string,placeholder:h.string,value:h.oneOfType([h.string]),min:h.string,max:h.string,tooltip:h.string,tooltipPosition:h.string,tooltipPlacement:h.string,icon:h.string,status:h.oneOf(Oe.props.status.options),feedback:h.string,hasFeedback:h.bool,noMargin:h.bool,disabled:h.bool,mask:h.oneOfType([h.string,h.object]),onChangeHandler:h.func,onFocusHandler:h.func},rr.displayName="DsInput";const Ka={Small:"small",Medium:"medium",Large:"large"},Ga={None:"",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00"},st={name:"Loading",class:"ds-loading",props:{size:{type:String,default:Ka.Medium,options:Object.values(Ka)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:Ga.Neutral10,options:Object.values(Ga)},id:{type:String,default:""},testId:{type:String,default:"ds-loading"}}},Gr=({id:r,testId:e=st.props.testId.default,className:t,size:s=st.props.size.default,opacity:n=st.props.opacity.default,fullscreen:a=st.props.fullscreen.default,backgroundColor:i=st.props.backgroundColor.default})=>{const o=!a&&`${st.class}--absolute`,l=s&&`${st.class}__dots--${s}`,c=i&&st.props.backgroundColor.options.find(f=>f===i)&&`${st.class}__background--${i}`,d=n&&`${st.class}__background--opacity`;return I.jsxs("div",{className:[st.class,t,o].filter(f=>f).join(" "),"data-testid":e,id:r,children:[I.jsx("div",{className:[`${st.class}__background`,c,d].filter(f=>f).join(" ")}),I.jsx("div",{className:["ds-loading__dots",l].filter(f=>f).join(" "),role:"status"})]})};Gr.propTypes={id:h.string,testId:h.string,size:h.oneOf(st.props.size.options),opacity:h.bool,fullscreen:h.bool,backgroundColor:h.string},Gr.displayName="DsLoading";const Ot={name:"Option",class:"ds-option",props:{id:{type:String,default:""},name:{type:String,default:""},testId:{type:String,default:""},label:{type:String,default:""},value:{type:String,default:""},disabled:{type:Boolean,default:!1},detail:{type:String,default:""},checked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Ls=({id:r,label:e,detail:t,name:s,testId:n=s||"ds-option-test",disabled:a=Ot.props.disabled.default,value:i,checked:o=Ot.props.checked.default,onChangeHandler:l=Ot.props.onChangeHandler.default})=>{const[c]=j.useState(Math.random()),d=()=>{const f=[Ot.class];return a&&f.push(`${Ot.class}--disabled`),f.join(" ")};return I.jsxs("div",{className:d(),children:[I.jsx("input",{checked:o,"data-testid":n,disabled:a,id:r||String(c),name:s,onChange:l,type:"radio",value:i}),I.jsx(ke,{className:`${Ot.class}__icon`,image:o?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),I.jsxs("div",{className:`${Ot.class}__text-container`,children:[e&&I.jsx("label",{className:`${Ot.class}__label`,htmlFor:r||String(c),children:e}),t&&I.jsx("label",{className:`${Ot.class}__detail`,htmlFor:r||String(c),children:t})]})]})};Ls.propTypes={id:h.string,name:h.string,testId:h.string,label:h.oneOfType([h.string,h.node]),value:h.oneOfType([h.string,h.number]),detail:h.string,disabled:h.bool,checked:h.bool,onChangeHandler:h.func},Ls.displayName="DsOption";const Wa={Default:"",Large:"large",Small:"small"},Wr={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:Wa.Default,options:Object.values(Wa)}}},At=({children:r,className:e,testId:t="ds-paragraph-test",type:s=Wr.props.type.default})=>{const n=s&&`${Wr.class}--${s}`;return I.jsx("p",{className:[Wr.class,n,e&&e].filter(a=>a).join(" "),"data-testid":t,children:r})};At.propTypes={className:h.string,testId:h.string,type:h.oneOf(Wr.props.type.options)},At.displayName="DsParagraph";const Ya={Success:"success",SuccessDark:"success-dark",Warning:"warning",Danger:"danger"},Xa={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:Ya.Success,options:Object.values(Ya)}}},Rs={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},ze=({children:r,flex:e=Rs.props.flex.default,className:t=Rs.props.className.default})=>{const s=()=>[Rs.class,t].join(" "),n=()=>({flex:e});return I.jsx("div",{className:s(),style:n(),children:r})};ze.propTypes={className:h.string,flex:h.string},ze.displayName="DsFlexElement";const Ja={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceAround:"space-around",SpaceBetween:"space-between"},Za={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center"},Qa={Row:"row",Column:"column",RowReverse:"row-reverse",ColumnReverse:"column-reverse"},ei={NoWrap:"nowrap",Wrap:"wrap",WrapReverse:"wrap-reverse"},yl={Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl"},qt={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:Ja.Stretch,required:!0,options:Object.values(Ja)},alignItems:{type:String,default:Za.Stretch,required:!0,options:Object.values(Za)},flexDirection:{type:String,default:Qa.Row,required:!0,options:Object.values(Qa)},flexWrap:{type:String,default:ei.Wrap,required:!1,options:Object.values(ei)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(yl)}}},Dt=({children:r,className:e,justifyContent:t=qt.props.justifyContent.default,alignItems:s=qt.props.alignItems.default,flexDirection:n=qt.props.flexDirection.default,flexWrap:a=qt.props.flexWrap.default,width:i=qt.props.width.default,height:o,gap:l})=>{const c=()=>{const f=[qt.class,e];return l&&f.push(`${qt.class}--gap-${l}`),f.join(" ")},d=()=>({display:"flex",justifyContent:t,alignItems:s,flexDirection:n,flexWrap:a,width:i,height:o,gap:l});return I.jsx("div",{className:c(),style:d(),children:r})};Dt.propTypes={className:h.string,justifyContent:h.string,alignItems:h.string,flexDirection:h.string,flexWrap:h.string,width:h.string,height:h.string,gap:h.string},Dt.displayName="DsFlexLayout";const Yr={None:"none",Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm"},vr={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:Yr.None,options:Object.values(Yr)},horizontal:{type:String,default:Yr.None,options:Object.values(Yr)}}},dt=({vertical:r=vr.props.vertical.default,horizontal:e=vr.props.horizontal.default})=>{const t=r&&`ds-spacer__vertical--${r}`,s=e&&`ds-spacer__horizontal--${e}`;return I.jsx("div",{className:[vr.class,t,s].filter(n=>n).join(" "),"data-testid":"spacer"})};dt.propTypes={vertical:h.oneOf(vr.props.vertical.options),horizontal:h.oneOf(vr.props.horizontal.options)},dt.displayName="DsSpacer";const zs=({label:r,progress:e=Xa.props.progress.default,color:t=Xa.props.color.default})=>{const s=j.useMemo(()=>e>100?100:e,[e]),n=j.useMemo(()=>`ds-progress__progress--${t}`,[t]),a=j.useMemo(()=>t==="success-dark"?"color__success--dark":t==="warning"?"color__warning--dark":`color__${t}--default`,[t]);return I.jsx("div",{className:"ds-progress",children:I.jsxs(Dt,{flexDirection:"column",children:[I.jsx(ze,{children:I.jsx("div",{className:"ds-progress__container",children:I.jsx("div",{className:`ds-progress__progress ${n}`,style:{width:`${s||0}%`}})})}),I.jsx(ze,{children:I.jsxs(Dt,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[I.jsx(dt,{vertical:"quark"}),I.jsx(At,{className:a,children:r})]})})]})})};zs.propTypes={label:h.string,progress:h.number,color:h.string};const ti={Small:"sm",Medium:"md",Large:"lg"},ri={Default:"",Error:"error",Success:"success"},si={Center:"center",End:"end",Initial:"initial"},ni={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Ae={name:"Select",class:"ds-select",props:{label:{type:String,default:""},className:{type:String,default:""},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},name:{type:String,default:""},testId:{type:String,default:"ds-select-test"},placeholder:{type:String},onChange:{type:Function,default:()=>{}},value:{type:[Boolean,String,Number,void 0]},size:{type:String,options:Object.values(ti),default:ti.Medium},status:{type:String,default:ri.Default,options:Object.values(ri)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:si.Initial,options:Object.values(si)},tooltipPosition:{type:String,default:ni.Top,options:Object.values(ni)},feedback:{type:String,default:""},options:[]}},qs=j.forwardRef(({label:r,className:e,disabled:t=Ae.props.disabled.default,animated:s=Ae.props.animated.default,multiple:n=Ae.props.multiple.default,testId:a=Ae.props.testId.default,name:i,options:o,value:l,placeholder:c,onChange:d,onChangeHandler:f,size:w=Ae.props.size.default,status:y=Ae.props.status.default,tooltip:S,tooltipPosition:E=Ae.props.tooltipPosition.default,tooltipPlacement:b=Ae.props.tooltipPlacement.default,feedback:g,...T},C)=>{const[O,_]=j.useState(!1),q=W=>{_(!1),d&&d(W,W.target.value),f&&f(W,W.target.value)},z=()=>{const W=[Ae.class,"select-placeholder"];return W.push(`${Ae.class}--${w}`),y&&W.push(`${Ae.class}--${y}`),O&&W.push(`${Ae.class}--active`),t&&W.push(`${Ae.class}--disabled`),e&&W.push(e),W.join(" ")},J=j.useMemo(()=>{const W=[`${Ae.class}__label`];return!s&&W.push(`${Ae.class}__label--not-animated`),l&&W.push(`${Ae.class}__label--has-value`),s&&!l&&!S&&W.push(`${Ae.class}__label--hidden`),W.join(" ")},[l]);return I.jsxs("div",{className:z(),"data-testid":"select-component",children:[I.jsxs("label",{className:J,"data-testid":"label-id",htmlFor:i,children:[r,S&&I.jsx(zt,{className:`${Ae.class}__tooltip`,placement:b,position:E,text:S,children:I.jsx(ke,{className:`${Ae.class}__icon`,image:"info"})})]}),I.jsxs("select",{"data-testid":a,disabled:t,id:i,multiple:n,name:i,onChange:W=>q(W),value:l||"",...T,onBlur:()=>_(!1),onFocus:()=>_(!0),ref:C,required:!0,children:[(c||s)&&I.jsx("option",{disabled:!0,value:"",children:c??r}),o==null?void 0:o.map((W,ae)=>{var G;return"options"in W?I.jsx("optgroup",{label:W.label,children:(G=W.options)==null?void 0:G.map((Y,ee)=>I.jsx("option",{className:`${Ae.class}__option-select`,value:Y.value,children:Y.label||Y.value},ee))},ae):I.jsx("option",{className:`${Ae.class}__option-select`,value:W.value,children:W.label||W.value},ae)})]}),g&&I.jsxs("div",{className:"ds-select__feedback-container",children:[I.jsx(ke,{className:"ds-select__icon",image:y==="success"?"check_circle":"info"}),I.jsx("span",{className:"ds-select__feedback",children:g})]})]})});qs.propTypes={label:h.string.isRequired,className:h.string,disabled:h.bool,animated:h.bool,multiple:h.bool,name:h.string,testId:h.string,options:h.array.isRequired,placeholder:h.string,onChange:h.func,onChangeHandler:h.func,value:h.oneOfType([h.string,h.number]),size:h.oneOf(Ae.props.size.options),status:h.oneOf(Ae.props.status.options),tooltip:h.string,tooltipPosition:h.string,tooltipPlacement:h.string,feedback:h.string},qs.displayName="DsSelect";const ai={Large:"large",Small:"small"},Us={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:ai.Large,options:Object.values(ai)}}},ii=({children:r,className:e,testId:t="ds-subtitle-test",type:s})=>{const n=Us.props.type.options.find(a=>a===s)&&`${Us.class}--${s}`;return I.jsx("p",{className:[Us.class,n,e&&e].filter(a=>a).join(" "),"data-testid":t,children:r})};ii.displayName="DsSubtitle";const oi={Small:"small",Medium:"medium",Large:"large"},li={Text:"text"},ui={None:"",Error:"error",Success:"success"},ci={None:"none",Both:"both",Horizontal:"horizontal",Vertical:"vertical",Block:"block",Inline:"inline"},Le={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:""},type:{type:String,default:li.Text,options:Object.values(li)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:oi.Medium,options:Object.values(oi)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},minLength:{type:Number,default:void 0},maxLength:{type:Number,default:void 0},rows:{type:Number,default:1},status:{type:String,default:ui.None,options:Object.values(ui)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:ci.None,options:Object.values(ci)},onChangeHandler:{type:Function,default:()=>{}}}},Hs=j.forwardRef(({name:r,testId:e=r||"ds-textarea-test",animated:t=Le.props.animated.default,size:s=Le.props.size.default,label:n,placeholder:a,value:i,minLength:o,maxLength:l,tooltip:c,icon:d,status:f=Le.props.status.default,feedback:w,disabled:y=Le.props.disabled.default,className:S,resize:E=Le.props.resize.default,onChangeHandler:b=Le.props.onChangeHandler.default,onBlurHandler:g,onKeyDownHandler:T,onFocusHandler:C,rows:O=Le.props.rows.default,description:_},q)=>{const[z,J]=j.useState(!1),[W,ae]=j.useState(0),[G,Y]=j.useState(Math.random());j.useEffect(()=>{i==null&&Y(Math.random())},[i]);const ee=v=>{ae(v.target.value.length),b&&b(v)},X=v=>{T&&T(v)},fe=v=>{J(!1),g&&g(v)},he=v=>{J(!0),C&&C(v)},ge=()=>{const v=[`${Le.class}`];return s&&v.push(`${Le.class}--${s}`),t&&v.push(`${Le.class}--animated`),c&&v.push(`${Le.class}--with-icon`),f&&v.push(`${Le.class}--${f}`),S&&v.push(S),v.join(" ")},De=j.useMemo(()=>{const v=[`${Le.class}__label`];return(z||i)&&v.push(`${Le.class}__label--active`),v.join(" ")},[i,z]),Ne=()=>!t&&a?a:"",F=()=>f&&f==="error"?"info":"check_circle";return I.jsxs("div",{className:ge(),children:[_&&I.jsx("span",{className:"ds-textarea__description",children:_}),w&&I.jsxs("div",{className:"ds-textarea__feedback",children:[I.jsx(ke,{image:F()}),w]}),I.jsx("textarea",{className:"ds-textarea__textarea","data-testid":e,defaultValue:i||"",disabled:y,id:r,maxLength:l,minLength:o,name:r,onBlur:fe,onChange:ee,onFocus:he,onInput:ee,onKeyDown:X,placeholder:Ne(),ref:q,rows:O,style:{resize:E||"none"}}),I.jsx("label",{className:De,htmlFor:r,children:n}),l&&I.jsxs("span",{className:"ds-textarea__count",children:[W,"/",l]}),c&&I.jsx(zt,{className:"ds-textarea__tooltip",placement:"end",text:c,children:I.jsx(ke,{className:"ds-textarea__icon",image:d})})]},G)});Hs.propTypes={name:h.string,testId:h.string,type:h.oneOf(Le.props.type.options),animated:h.bool,size:h.oneOf(Le.props.size.options),label:h.string,placeholder:h.string,value:h.oneOfType([h.string]),tooltip:h.string,icon:h.string,status:h.oneOf(Le.props.status.options),feedback:h.string,minLength:h.number,maxLength:h.number,rows:h.number,disabled:h.bool,onChangeHandler:h.func,onFocusHandler:h.func,resize:h.oneOf(Le.props.resize.options).isRequired,description:h.string},Hs.displayName="DsTextArea";const Ks={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1}}},Xr=({children:r,fluid:e=Ks.props.fluid.default,className:t,style:s})=>{const n=e?`${Ks.class}--fluid`:Ks.class;return I.jsx("div",{className:[n,t].filter(a=>a).join(" "),style:s,children:r})};Xr.propTypes={children:h.node,fluid:h.bool,className:h.string,style:h.object},Xr.displayName="DsContainer";function di(){const{innerWidth:r,innerHeight:e}=window;return{width:r,height:e}}function vl(){const[r,e]=j.useState(di());return j.useEffect(()=>{function t(){e(di())}return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),r}const fi=({children:r,grid:e})=>{const{row:t,col:s,mobileRow:n,mobileCol:a}=e,{width:i}=vl(),[o,l]=j.useState(""),[c,d]=j.useState("");return j.useEffect(()=>{i<=768?(l(n||t),d(a||s)):(l(t),d(s))},[i]),I.jsx("div",{style:{gridRow:o,gridColumn:c},children:r})};fi.displayName="DsGridElement";const pi={Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},Jr={Start:"start",End:"end",Center:"center",Stretch:"stretch",SpaceAround:"space-around",SpaceBetween:"space-between",SpaceEvenly:"space-evenly"},Re={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:pi.Small,options:Object.values(pi)},vGap:{type:Boolean,default:!0},hGap:{type:Boolean,default:!0},width:{type:String,default:""},height:{type:String,default:""},horizontalAlign:{type:String,default:Jr.Start,options:Object.values(Jr)},verticalAlign:{type:String,default:Jr.Start,options:Object.values(Jr)}}};function hi(){const{innerWidth:r,innerHeight:e}=window;return{width:r,height:e}}function _l(){const[r,e]=j.useState(hi());return j.useEffect(()=>{function t(){e(hi())}return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),r}const Zr=({children:r,rows:e,gap:t,vGap:s,hGap:n,horizontalAlign:a,verticalAlign:i,width:o,height:l})=>{const c=s&&`${Re.class}__v-gap--${t}`,d=n&&`${Re.class}__h-gap--${t}`,f=a&&Re.props.horizontalAlign.options.find(C=>C===a)?`${Re.class}--h-${a}`:null,w=i&&Re.props.verticalAlign.options.find(C=>C===i)?`${Re.class}--v-${i}`:null,{width:y}=_l(),[S,E]=j.useState("");j.useEffect(()=>{y<=768?E("6"):E("12")},[y]);const b=C=>/^[+-]?\d+$/.test(C),g=()=>e.split(",").map(O=>(O=O.trim(),O==="0"||O==="*"||O==="auto"?"auto":b(O)?O+"fr":O)).join(" "),T=()=>`repeat(${S.split(",").map(O=>(O=O.trim(),O==="0"||O==="*"||O==="auto"?"auto":(b(O),O))).join(" ")}, minmax(0, 1fr))`;return I.jsx("div",{className:[Re.class,f,w,c,d].filter(C=>C).join(" "),style:{width:o,height:l,gridTemplateColumns:T(),gridTemplateRows:g()},children:r})};Zr.propTypes={children:h.oneOfType([h.arrayOf(h.node),h.node,h.func]),rows:h.string,gap:h.oneOf(Re.props.gap.options),vGap:h.bool,hGap:h.bool,width:h.string,height:h.string,horizontalAlign:h.oneOf(Re.props.horizontalAlign.options),verticalAlign:h.oneOf(Re.props.verticalAlign.options)},Zr.defaultProps={rows:Re.props.rows.default,gap:Re.props.gap.default,vGap:Re.props.vGap.default,hGap:Re.props.hGap.default,width:Re.props.width.default,height:Re.props.height.default,horizontalAlign:Re.props.horizontalAlign.default,verticalAlign:Re.props.verticalAlign.default},Zr.displayName="DsGridLayout";const sr={None:"none",Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},at={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:sr.ExtraSmall,options:Object.values(sr)},top:{type:String,options:Object.values(sr)},right:{type:String,options:Object.values(sr)},bottom:{type:String,options:Object.values(sr)},left:{type:String,options:Object.values(sr)}}},Ut=({children:r,space:e=at.props.space.default,top:t,right:s,bottom:n,left:a})=>{const i=t&&`${at.class}__top--${t}`,o=s&&`${at.class}__right--${s}`,l=n&&`${at.class}__bottom--${n}`,c=a&&`${at.class}__left--${a}`,d=e&&`${at.class}--${e}`;return I.jsx("div",{className:[at.class,i,o,l,c,d].filter(f=>f).join(" "),children:r})};Ut.propTypes={space:h.oneOf(at.props.space.options||[]),top:h.oneOf(at.props.top.options||[]),right:h.oneOf(at.props.right.options||[]),bottom:h.oneOf(at.props.bottom.options||[]),left:h.oneOf(at.props.left.options||[])},Ut.displayName="DsWrapper";const Gs={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},nr={name:"AccordionItem",class:"ds-accordion-item",props:{title:{type:String,default:""},content:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1}}},Ws=({title:r,content:e,className:t,onToggle:s,active:n=nr.props.active.default,disabled:a=nr.props.disabled.default})=>{const i=n&&`${nr.class}--active`;return I.jsxs("li",{className:[nr.class,i,t&&t].filter(o=>o).join(" "),children:[I.jsxs("button",{className:`${nr.class}__button`,disabled:a,onClick:s,children:[r,I.jsx(ke,{className:`${nr.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),n&&I.jsx("div",{className:"ds-accordion-item__content",children:e})]})};Ws.propTypes={active:h.bool,title:h.oneOfType([h.element,h.string]),content:h.oneOfType([h.element,h.string]),className:h.string,disabled:h.bool},Ws.displayName="DsAccordionItem";const Ys=({items:r=Gs.props.items.default,activeItem:e=Gs.props.activeItem.default,onClick:t})=>{const[s,n]=j.useState(-1);j.useEffect(()=>{r.map((i,o)=>{i.active&&n(o)})},[r]),j.useEffect(()=>{e!=null&&n(e)},[e]);const a=i=>{if(s===i)return t&&t(-1),n(-1);n(i),t&&t(i)};return I.jsx("ul",{className:Gs.class,children:r.map((i,o)=>I.jsx(Ws,{active:s===o,content:i.content,disabled:i.disabled,onToggle:()=>{a(o)},title:i.title},o))})};Ys.propTypes={items:h.array,activeItem:h.number},Ys.displayName="DsAccordion";const mi=({title:r,activeTags:e,handleTagClose:t})=>I.jsx("div",{className:"active-tags",children:e.length>0&&I.jsxs(I.Fragment,{children:[I.jsx(At,{className:"active-tags__title",children:r}),I.jsx("div",{className:"active-tags__list","data-testid":"list",children:e.map((s,n)=>I.jsx(zt,{text:`Filtro ${s.text} aplicado`,children:I.jsxs("div",{className:`active-tags__item ${s.hiddenClose&&"active-tags__item--no-close"}`,"data-testid":`active-tag-${n}`,children:[I.jsxs(Dt,{alignItems:"center",gap:"nano",children:[I.jsx(ze,{children:I.jsx(ke,{className:"active-tags__icon",color:s.hiddenClose?"neutral-00":"neutral-90",fill:!0,image:s.icon,testId:`icon-${n}`})}),I.jsx(ze,{children:I.jsx(At,{type:"small",children:s.text})})]}),!s.hiddenClose&&I.jsx(ke,{image:"close",onClick:()=>t(n),testId:`icon-close-${n}`})]},n)},`ds-tooltip-key-${n}`))})]})});mi.displayName="DsActiveTags";const gi={Small:"small",Medium:"medium",Large:"large"},Se={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},animated:{type:Boolean,default:!0},placeholder:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},noOptionsMessage:{type:String,default:"Nenhum resultado encontrado"},size:{type:String,default:gi.Medium,options:Object.values(gi)},status:{type:String,default:""},options:{type:Array,default:[]},icon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},loading:{type:Boolean},onChangeHandler:{type:Function,default:()=>{}},onBlurHandler:{type:Function,default:()=>{}},onFocusHandler:{type:Function,default:()=>{}},onSelectHandler:{type:Function,default:()=>{}}}},yi=({label:r=Se.props.label.default,name:e=Se.props.name.default,value:t=Se.props.value.default,options:s=Se.props.options.default,size:n=Se.props.size.default,onChangeHandler:a=Se.props.onChangeHandler.default,onSelectHandler:i=Se.props.onSelectHandler.default,icon:o=Se.props.icon.default,noOptionsMessage:l=Se.props.noOptionsMessage.default,disabled:c=Se.props.disabled.default,status:d=Se.props.status.default,onBlurHandler:f=Se.props.onBlurHandler.default,onFocusHandler:w=Se.props.onFocusHandler.default,animated:y=Se.props.animated.default,placeholder:S=Se.props.placeholder.default,loading:E})=>{const[b,g]=j.useState(!1),[T,C]=j.useState(t),O=z=>{a(z),(E==null&&z.currentTarget.value.length||!E&&z.currentTarget.value.length>2)&&g(!0)},_=z=>{i(z),f(),C(Math.random().toString()),g(!1)};j.useEffect(()=>{t.length===0&&g(!1)},[t]);const q=()=>s.length>0?s.map((z,J)=>I.jsx("option",{className:`${Se.class}__option ${Se.class}__option--${n}`,"data-testid":`Option ${z.id||z.label}`,onClick:()=>!c&&_(z),value:J,children:z.label},J)):I.jsx("option",{className:`${Se.class}__option ${Se.class}__option--not-found`,children:l},"no_option");return I.jsxs("div",{className:`${Se.class}__container`,children:[I.jsx(rr,{animated:y,className:`${Se.class}__input`,disabled:c,label:r,name:e,onBlurHandler:f,onChangeHandler:O,onFocusHandler:w,placeholder:S,size:n,status:d,value:t},T),(o||E)&&(E?I.jsx("div",{className:`${Se.class}__loading ${Se.class}__loading--${n}`,style:{width:"18px"},children:I.jsx(Gr,{fullscreen:!1})}):o&&I.jsx(ke,{className:`${Se.class}__icon ${Se.class}__icon--${n}`,image:o})),b&&I.jsx("div",{className:`${Se.class}__list`,"data-testid":"list",children:q()})]})};yi.displayName="DsEditableSelect";const _r={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},bl=({length:r,current:e=_r.props.current.default})=>{const[t,s]=j.useState(e),n=i=>i<t?`${_r.class}__step--older`:i===t?`${_r.class}__step--active`:"";j.useEffect(()=>{s(e)},[e]);const a=[];for(let i=0;i<r;i++)a.push(I.jsx("div",{className:`${_r.class}__step ${n(i)}`,"data-testid":`indicator-step-${i}`},i));return I.jsx("div",{className:_r.class,children:a})},$l={name:"DsInlineEditable",class:"ds-inline-editable",props:{name:{type:String,required:!0},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},prefix:{type:String,default:""},suffix:{type:String,default:""},onChangeHandler:{type:Function,default:()=>{}}}},Xs=({name:r,value:e,prefix:t,sufix:s,min:n,max:a,onChangeHandler:i})=>{const o=j.useRef(null),[l,c]=j.useState(!1),[d,f]=j.useState("");j.useEffect(()=>{f(e??"")},[e]);const w=b=>{b.key==="Enter"&&y(b)};function y(b){c(!1),i&&(n&&parseInt(n)>=parseInt(d===""?n:d)?(b.currentTarget.value=n,f(n)):a&&parseInt(a)<parseInt(d)?(b.currentTarget.value=a,f(a)):b.currentTarget.value=d,i(b))}const S=b=>{f(b.currentTarget.value)},E=async()=>{var b;await c(!0),(b=o.current)==null||b.focus()};return I.jsx("div",{className:$l.class,children:l?I.jsx("input",{className:"ds-input__input","data-testid":"input",max:a,min:n,name:r,onBlur:y,onChange:S,onKeyDown:w,ref:o,type:"number",value:d}):I.jsx("div",{"data-testid":"inline-editible-div-click",onClick:E,children:I.jsxs(Dt,{alignItems:"center",gap:"nano",children:[I.jsx(ze,{children:I.jsx(At,{children:I.jsxs("b",{children:[t,e,s]})})}),I.jsx(ze,{children:I.jsx(ke,{image:"edit_square"})})]})})})};Xs.propTypes={value:h.string},Xs.displayName="DsInlineEditable";const Sl=[1,2,3,4],vi={Squared:"squared",Rounded:"rounded"},it={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:Sl},variant:{type:String,default:vi.Rounded,options:Object.values(vi)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},Js=({className:r,title:e,content:t,cancelBtnText:s=it.props.cancelBtnText.default,confirmBtnText:n=it.props.confirmBtnText.default,variant:a=it.props.variant.default,elevation:i,isModalOpen:o=it.props.isModalOpen.default,onClose:l,onCancel:c,onConfirm:d,...f})=>{const w=a&&it.props.variant.options.find(b=>b===a)?`${it.class}--${a}`:`${it.class}--${it.props.variant.default}`,y=i&&`${it.class}--elevation-${i}`,S=d||c,E=j.useCallback(b=>{b.keyCode===27&&l()},[l]);return j.useEffect(()=>{if(window)return S||window.addEventListener("keyup",E),()=>{window.removeEventListener("keyup",E)}},[S,E]),o?I.jsxs(I.Fragment,{children:[I.jsx("div",{className:"ds-modal-overlay",...f,onClick:()=>S?()=>{}:l()}),I.jsxs("div",{className:[it.class,w,y,r&&r].filter(b=>b).join(" "),"data-testid":"modal",children:[!S&&I.jsx("button",{className:"ds-modal__closeBtn","data-testid":"modal-close-button",onClick:l,children:I.jsx(ke,{image:"close",size:"lg"})}),I.jsxs("div",{className:"ds-modal__content",children:[I.jsx("div",{className:"ds-modal__content__title",children:e}),e&&I.jsx(dt,{vertical:"xxxs"}),I.jsx("div",{className:"ds-modal__content__content",children:t})]}),S&&I.jsx(dt,{vertical:"sm"}),!S&&I.jsx(dt,{vertical:"xxs"}),I.jsxs("div",{className:"ds-modal__cta",children:[c&&I.jsx(mr,{onClick:()=>{l(),c()},children:s}),d&&I.jsx(mr,{onClick:()=>{l(),d()},children:n})]})]})]}):null};Js.propTypes={firstButtonText:h.string,confirmBtnText:h.string,cancelBtnText:h.string,variant:h.oneOf(it.props.variant.options),elevation:h.oneOf(it.props.elevation.options),isModalOpen:h.bool,title:h.node,content:h.node},Js.displayName="DsModal";const _i={Success:"success",Danger:"danger",Warning:"warning",Info:"info"},bi={Rounded:"rounded",Squared:"squared"},Xe={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:_i.Info,options:Object.values(_i)},id:{type:String},autoClose:{type:Boolean,default:!1},autoCloseTimer:{type:Number,default:4e3},dismissible:{type:Boolean,default:!1},elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:bi.Rounded,options:Object.values(bi)},progressBar:{type:Boolean,default:!0}}},El={success:"check",danger:"error",warning:"warning",info:"info"},Qr=({className:r,type:e=Xe.props.type.default,variant:t=Xe.props.variant.default,id:s,children:n,message:a,autoClose:i=Xe.props.autoClose.default,autoCloseTimer:o=Xe.props.autoCloseTimer.default,dismissible:l=Xe.props.dismissible.default,elevation:c,progressBar:d=Xe.props.progressBar.default,handleClose:f})=>{const[w,y]=j.useState(o),[S,E]=j.useState(!1),[b,g]=j.useState(!0),T=[Xe.class,e&&`${Xe.class}--${e}`,t&&`${Xe.class}--${t}`,c&&`${Xe.class}--elevation-${c}`,r&&r].join(" ");j.useEffect(()=>{!i&&!l&&g(!0);let q;return!S&&i&&(q=setInterval(()=>{y(z=>(z===0&&g(!1),z-100))},100)),()=>{clearInterval(q)}},[S,i,o,b]);const C=()=>{E(!0)},O=()=>{E(!1)},_=q=>{g(!1),f&&f(q)};return b?I.jsxs("div",{className:T,id:s,onMouseEnter:C,onMouseLeave:O,children:[I.jsx(Ut,{bottom:"nano",top:"nano",children:I.jsxs(Dt,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[I.jsx(ze,{children:I.jsx(ke,{color:e,fill:!0,image:El[e]})}),I.jsx(ze,{flex:"1",children:I.jsx(Ut,{left:"none",right:"none",space:"nano",children:n??a})}),I.jsx(ze,{children:l?I.jsx("div",{className:`${Xe.class}__button`,onClick:q=>_(q),children:I.jsx(Ut,{children:I.jsx(ke,{image:"close"})})}):I.jsx(dt,{horizontal:"quark"})})]})}),d&&i&&I.jsx("div",{className:`${Xe.class}__progress-bar ${Xe.class}__progress-bar--${e}`,style:{width:`${w/o*100}%`}})]}):null};Qr.propTypes={type:h.oneOf(Xe.props.type.options),id:h.string,variant:h.oneOf(Xe.props.variant.options),message:h.node,autoClose:h.bool,autoCloseTimer:h.number,dismissible:h.bool,elevation:h.oneOf(Xe.props.elevation.options),progressBar:h.bool,handleClose:h.func},Qr.displayName="DsNotification";const Zs={name:"DsPasswordConfirmation",class:"ds-password-confirmation",props:{onChange:{type:Function,default:()=>{}},validationList:{type:Array,default:[{title:"Um número",rule:r=>/\d/.test(r)},{title:"Uma letra maiúscula",rule:r=>/[A-Z]/.test(r)},{title:"Um caractere especial. Ex: @#!?",rule:r=>/[!@#$%^&*()+\-=_[\]{};':"\\|,.<>/?]/.test(r)},{title:"Mínimo 8 caracteres",rule:r=>r.length>=8}]},instructionLabel:{type:String,default:"A senha deverá conter:"}}},Qs=({onChange:r=Zs.props.onChange.default,validationList:e=Zs.props.validationList.default,instructionLabel:t=Zs.props.instructionLabel.default})=>{const[s,n]=j.useState(""),[a,i]=j.useState(""),[o,l]=j.useState([]),[c,d]=j.useState({score:0,color:"danger",label:"Fraca"}),[f,w]=j.useState(!1),y=O=>{const _=e.map(q=>q==null?void 0:q.rule(O));return l(_),_},S=O=>{var z,J,W,ae;n((z=O.currentTarget)==null?void 0:z.value);const _=y((J=O.currentTarget)==null?void 0:J.value),q=T(_);r&&r({password:(W=O.currentTarget)==null?void 0:W.value,confirmationPassword:a,isEqual:a===((ae=O.currentTarget)==null?void 0:ae.value),feedback:q})},E=O=>{var z,J,W;i((z=O.currentTarget)==null?void 0:z.value);const _=y(s),q=T(_);r&&r({password:s,confirmationPassword:(J=O.currentTarget)==null?void 0:J.value,isEqual:s===((W=O.currentTarget)==null?void 0:W.value),feedback:q})},b=j.useMemo(()=>s!==a&&f?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[s,a,f]),g=O=>{const _={score:O,color:"danger",label:"Fraco"};return O>30&&O<=75&&(_.color="warning",_.label="Médio"),O>=75&&O<100&&(_.color="success",_.label="Boa"),O===100&&(_.color="success-dark",_.label="Forte"),_},T=O=>{const _=O.reduce((W,ae)=>{let G=W;return ae?(G++,G):W},0),q=O==null?void 0:O.length,z=_*100/q||0,J=g(z);return d(J),J},C=()=>I.jsx("ul",{children:e.map((O,_)=>{const q=o[_]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return I.jsxs("li",{className:q,children:[o[_]?I.jsx(ke,{color:"success-dark",image:"check"}):null,I.jsx(dt,{horizontal:"quark"}),I.jsx(At,{children:O.title})]},_+O.title)})});return I.jsxs(Dt,{className:"ds-password-confirmation",flexDirection:"column",children:[I.jsx(ze,{children:I.jsx(rr,{label:"Senha",name:"password",onChangeHandler:S,type:"password",value:s})}),I.jsx(ze,{children:I.jsx(zs,{color:c==null?void 0:c.color,label:c==null?void 0:c.label,progress:c==null?void 0:c.score})}),I.jsx(ze,{children:I.jsx(At,{children:t})}),I.jsx(ze,{children:C()}),I.jsx(dt,{vertical:"xxxs"}),I.jsx(ze,{children:I.jsx(rr,{feedback:b.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>w(!0),onChangeHandler:E,onFocusHandler:()=>w(!0),status:b.status,type:"password",value:a})})]})};Qs.propTypes={onChange:h.func,validationList:h.array.isRequired,instructionLabel:h.string},Qs.displayName="DsPasswordConfirmation";const ft={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},$i=({steps:r,selectedStep:e=ft.props.selectedStep.default,onChange:t})=>{const[s,n]=j.useState(e),a=(i,o)=>{const l=[`${ft.class}__button`];return o!==i&&l.push(`${ft.class}__button--round`),r[i]&&r[i].disabled&&l.push(`${ft.class}__button--disabled`),l.join(" ")};return j.useEffect(()=>{n(e)},[e]),j.useEffect(()=>{t(s)},[s]),I.jsxs("div",{className:ft.class,children:[I.jsxs("span",{className:`${ft.class}__step-counter`,children:["Etapa ",s+1," de ",r==null?void 0:r.length]}),I.jsx("div",{className:`${ft.class}__step`,children:r.map((i,o)=>I.jsx("div",{className:`${ft.class}__content`,children:I.jsx("button",{className:a(o,s),disabled:i.disabled,onClick:()=>n(o),children:I.jsxs("span",{className:`${ft.class}__text`,children:[s===o?I.jsx(Ut,{bottom:"none",left:"nano",right:"nano",top:"none",children:I.jsx(ke,{className:`${ft.class}__icon`,fill:!0,image:i.icon})}):I.jsx(ke,{className:`${ft.class}__icon`,fill:!0,image:i.icon}),s===o&&i.label]})})},o))})]})};$i.displayName="DsStepper";const _t={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},Si=({item:r,columns:e})=>I.jsx("tr",{className:`${_t.class}__row`,children:e.map((t,s)=>{const n=t.align&&`${_t.class}__cell--align-${t.align}`;return I.jsx("td",{children:I.jsx("div",{className:[`${_t.class}__cell`,n,t.className].filter(a=>a).join(" "),children:r&&r[`${t.name}`]})},s)})});Si.displayName="DsTableRow";const Ei=({columns:r,data:e,className:t})=>I.jsx("div",{className:`${_t.class}__wrapper`,children:I.jsxs("table",{className:[`${_t.class}`,t].filter(s=>s).join(" "),children:[I.jsx("thead",{className:`${_t.class}__head`,children:I.jsx("tr",{className:`${_t.class}__row`,children:r&&r.map((s,n)=>I.jsx("th",{style:{width:s.size},children:I.jsx("div",{className:[`${_t.class}__cell`,s.align&&`${_t.class}__cell--align-${s.align}`].filter(a=>a).join(" "),children:s.label})},n))})}),I.jsx("tbody",{className:`${_t.class}__body`,children:e&&e.map((s,n)=>I.jsx(Si,{columns:r,item:s},n))})]})});Ei.displayName="DsTable";const ki={None:"",Primary:"primary",Secondary:"secondary",Neutral:"neutral",Success:"success",Warning:"warning",Danger:"danger",Info:"info"},jt={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:ki.Primary,options:Object.values(ki)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},kl=({active:r,className:e,color:t,disabled:s,name:n,index:a,title:i,onClick:o})=>{const l=[`${jt.class}__tab`,`${jt.class}__tab-color--${t}`,r&&`${jt.class}__tab--active`,s&&`${jt.class}__tab--disabled`,e&&e].join(" "),c=d=>{o&&!s&&o(d)};return I.jsx("div",{className:l,id:n,onClick:()=>c(a),children:i})},wl=({tabs:r,color:e,selectedTab:t=jt.props.selectedTab.default,className:s,onChange:n})=>{const[a,i]=j.useState(t),o=l=>{i(l),n&&n(l)};return j.useEffect(()=>i(t),[t]),I.jsxs("div",{className:[jt.class,s&&s].join(" "),children:[I.jsx("div",{className:`${jt.class}__header`,children:r.map((l,c)=>j.createElement(kl,{...l,active:a===c,color:e,index:c,key:c,onClick:()=>o(c)}))}),I.jsx("div",{className:`${jt.class}__content`,children:r[a].content})]})};function wi({library:r,children:e,theme:t}){return I.jsx("div",{"data-library":r,"data-theme":t,children:I.jsx("div",{className:"ds-theme",children:e})})}wi.propTypes={library:h.string,children:h.node.isRequired,theme:h.string};const Ci={TopLeft:"top-left",TopCenter:"top-center",TopRight:"top-right",BottomLeft:"bottom-left",BottomCenter:"bottom-center",BottomRight:"bottom-right"},Ht={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:Ci.TopRight,options:Object.values(Ci)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},en=({className:r=Ht.props.className.default,position:e=Ht.props.position.default,fluid:t=Ht.props.fluid.default,notifications:s,removeNotification:n})=>{const a=[Ht.class,e?`${Ht.class}--${e}`:"",t?`${Ht.class}--fluid`:"",r&&r].join(" "),i=o=>{n&&n(o)};return I.jsx("div",{className:a,children:s.map(o=>{const l=o.autoClose??!0,c=o.autoCloseTimer??4e3,d=o.dismissible??!0,f=o.elevation??2,w=o.progressBar??!0;return I.jsx(Qr,{autoClose:l,autoCloseTimer:c,dismissible:d,elevation:f,handleClose:()=>i(o.id),id:o.id,message:o.message,progressBar:w,type:o.type},o.id)})})};en.propTypes={position:h.oneOf(Ht.props.position.options),fluid:h.bool,notifications:h.array,removeNotification:h.func},en.displayName="DsNotificationList";const es={name:"TwoColumns",class:"ds-two-columns",props:{}},tn=({header:r,main:e,sidebar:t,breadcrumb:s})=>I.jsxs(Xr,{children:[I.jsxs("div",{className:"ds-grid",children:[I.jsx("div",{className:"ds-grid__row",children:I.jsx("div",{className:"ds-grid__col ds-grid__col-12",children:s})}),I.jsxs("div",{className:`${es.class}__content ds-grid__row`,children:[I.jsx("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:I.jsxs(I.Fragment,{children:[I.jsx("div",{className:`${es.class}__header`,children:r}),I.jsx("div",{className:`${es.class}__main`,children:e})]})}),I.jsx("div",{className:`${es.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:t})]})]}),I.jsx(dt,{vertical:"sm"})]});tn.propTypes={breadcrumb:h.node,header:h.node,main:h.node,sidebar:h.node},tn.displayName="DsTwoColumns";const Ti=(r,e)=>{var t;return(t=r==null?void 0:r.errors)==null?void 0:t.reduce((s,n)=>(n.keyword==="errorMessage"||(s={...s,...Cl(n,e)}),s),{})},Cl=(r,e)=>{const{keyword:t,params:s}=r,n=Tl(r==null?void 0:r.instancePath);let a="",i=e?e+"."+n:n;if(t.match(/min/)||t.match(/max/))return a=`Tamanho ${t.match(/min/)?"mínimo":"máximo"} de ${s==null?void 0:s.limit}`,i=rn(i),{[i]:{status:!1,message:a}};switch(t){case"required":a="Campo obrigatório",i=rn(i),i=i+"."+(s==null?void 0:s.missingProperty),i.split("")[0]==="."&&(i=i.replace(".",""));break;case"pattern":a="Insira o valor no formato correto";break;case"format":a=`Formato de ${s==null?void 0:s.format} invalido`;break;default:a="Preencha o dado corretamente";break}return i=rn(i),{[i]:{status:!1,message:a}}},Tl=r=>{let e="";return r.split("")[0]==="/"&&(e=r.replace("/","")),e.replace(/\//g,".")},rn=r=>{const e=r.split("");return e[e.length-1]==="."?(e.pop(),e.join("")):r},Oi=(r,e,t)=>{const s=e.pop(),n=e.reduce((a,i)=>(i in a||(a[i]={}),a[i]),r);s&&(n[s]=t)},Ai=r=>{try{return{isObj:!0,parsedObj:JSON.parse(r)}}catch{return{isObj:!1,parsedObj:void 0}}},Ol=r=>{const e=/^[0-9]+$/.test(r);if(r==="true"||r==="false")return JSON.parse(r);if(e)return Number(r);const{isObj:t,parsedObj:s}=Ai(r);return t&&s?s:r},sn=(r,e)=>{var n;if(!r)return null;if(r.$id===e)return r;const t=a=>{if(a)for(const i of Object.values(a)){const o=sn(i,e);if(o)return o}return null};return t(r.properties)||t(r.definitions)||t((n=r.schemas)==null?void 0:n.definitions)||sn(r.items,e)||null},nn=(r,e)=>{var s;const t=(e==null?void 0:e.definitions)||((s=e==null?void 0:e.schemas)==null?void 0:s.definitions);if(!t)return console.error('No definitions found within the schema root or inside the "schemas" key.'),null;for(const n of Object.values(t)){const a=sn(n,r);if(a)return a}return null},Di=r=>{const e=r.format;return e!=="email"&&e!=="password"?"text":e};function br(r,e,t=new WeakSet){if(typeof r!="object"&&typeof e!="object")return Object.is(r,e);if(r===null&&e===null)return!0;if(typeof r!=typeof e)return!1;if(r===e||t.has(r)&&t.has(e))return!0;if(t.add(r),t.add(e),Array.isArray(r)&&Array.isArray(e)){if(r.length!==e.length)return!1;for(let s=0;s<r.length;s++)if(!br(r[s],e[s],t))return!1;return!0}if(Array.isArray(r)||Array.isArray(e)||Object.keys(r).length!==Object.keys(e).length)return!1;for(const[s,n]of Object.entries(r))if(!Object.prototype.hasOwnProperty.call(e,s)||!br(n,e[s],t))return!1;return!0}var an={exports:{}},Ii={},It={},Kt={},$r={},de={},Sr={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.regexpCode=r.getEsmExportName=r.getProperty=r.safeStringify=r.stringify=r.strConcat=r.addCodeArg=r.str=r._=r.nil=r._Code=r.Name=r.IDENTIFIER=r._CodeOrName=void 0;class e{}r._CodeOrName=e,r.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class t extends e{constructor(T){if(super(),!r.IDENTIFIER.test(T))throw new Error("CodeGen: name must be a valid identifier");this.str=T}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}r.Name=t;class s extends e{constructor(T){super(),this._items=typeof T=="string"?[T]:T}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const T=this._items[0];return T===""||T==='""'}get str(){var T;return(T=this._str)!==null&&T!==void 0?T:this._str=this._items.reduce((C,O)=>`${C}${O}`,"")}get names(){var T;return(T=this._names)!==null&&T!==void 0?T:this._names=this._items.reduce((C,O)=>(O instanceof t&&(C[O.str]=(C[O.str]||0)+1),C),{})}}r._Code=s,r.nil=new s("");function n(g,...T){const C=[g[0]];let O=0;for(;O<T.length;)o(C,T[O]),C.push(g[++O]);return new s(C)}r._=n;const a=new s("+");function i(g,...T){const C=[y(g[0])];let O=0;for(;O<T.length;)C.push(a),o(C,T[O]),C.push(a,y(g[++O]));return l(C),new s(C)}r.str=i;function o(g,T){T instanceof s?g.push(...T._items):T instanceof t?g.push(T):g.push(f(T))}r.addCodeArg=o;function l(g){let T=1;for(;T<g.length-1;){if(g[T]===a){const C=c(g[T-1],g[T+1]);if(C!==void 0){g.splice(T-1,3,C);continue}g[T++]="+"}T++}}function c(g,T){if(T==='""')return g;if(g==='""')return T;if(typeof g=="string")return T instanceof t||g[g.length-1]!=='"'?void 0:typeof T!="string"?`${g.slice(0,-1)}${T}"`:T[0]==='"'?g.slice(0,-1)+T.slice(1):void 0;if(typeof T=="string"&&T[0]==='"'&&!(g instanceof t))return`"${g}${T.slice(1)}`}function d(g,T){return T.emptyStr()?g:g.emptyStr()?T:i`${g}${T}`}r.strConcat=d;function f(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:y(Array.isArray(g)?g.join(","):g)}function w(g){return new s(y(g))}r.stringify=w;function y(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}r.safeStringify=y;function S(g){return typeof g=="string"&&r.IDENTIFIER.test(g)?new s(`.${g}`):n`[${g}]`}r.getProperty=S;function E(g){if(typeof g=="string"&&r.IDENTIFIER.test(g))return new s(`${g}`);throw new Error(`CodeGen: invalid export name: ${g}, use explicit $id name mapping`)}r.getEsmExportName=E;function b(g){return new s(g.toString())}r.regexpCode=b})(Sr);var on={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ValueScope=r.ValueScopeName=r.Scope=r.varKinds=r.UsedValueState=void 0;const e=Sr;class t extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var s;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(s||(r.UsedValueState=s={})),r.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class n{constructor({prefixes:c,parent:d}={}){this._names={},this._prefixes=c,this._parent=d}toName(c){return c instanceof e.Name?c:this.name(c)}name(c){return new e.Name(this._newName(c))}_newName(c){const d=this._names[c]||this._nameGroup(c);return`${c}${d.index++}`}_nameGroup(c){var d,f;if(!((f=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||f===void 0)&&f.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}r.Scope=n;class a extends e.Name{constructor(c,d){super(d),this.prefix=c}setValue(c,{property:d,itemIndex:f}){this.value=c,this.scopePath=(0,e._)`.${new e.Name(d)}[${f}]`}}r.ValueScopeName=a;const i=(0,e._)`\n`;class o extends n{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?i:e.nil}}get(){return this._scope}name(c){return new a(c,this._newName(c))}value(c,d){var f;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(c),{prefix:y}=w,S=(f=d.key)!==null&&f!==void 0?f:d.ref;let E=this._values[y];if(E){const T=E.get(S);if(T)return T}else E=this._values[y]=new Map;E.set(S,w);const b=this._scope[y]||(this._scope[y]=[]),g=b.length;return b[g]=d.ref,w.setValue(d,{property:y,itemIndex:g}),w}getValue(c,d){const f=this._values[c];if(f)return f.get(d)}scopeRefs(c,d=this._values){return this._reduceValues(d,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,e._)`${c}${f.scopePath}`})}scopeCode(c=this._values,d,f){return this._reduceValues(c,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},d,f)}_reduceValues(c,d,f={},w){let y=e.nil;for(const S in c){const E=c[S];if(!E)continue;const b=f[S]=f[S]||new Map;E.forEach(g=>{if(b.has(g))return;b.set(g,s.Started);let T=d(g);if(T){const C=this.opts.es5?r.varKinds.var:r.varKinds.const;y=(0,e._)`${y}${C} ${g} = ${T};${this.opts._n}`}else if(T=w==null?void 0:w(g))y=(0,e._)`${y}${T}${this.opts._n}`;else throw new t(g);b.set(g,s.Completed)})}return y}}r.ValueScope=o})(on),function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.or=r.and=r.not=r.CodeGen=r.operators=r.varKinds=r.ValueScopeName=r.ValueScope=r.Scope=r.Name=r.regexpCode=r.stringify=r.getProperty=r.nil=r.strConcat=r.str=r._=void 0;const e=Sr,t=on;var s=Sr;Object.defineProperty(r,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(r,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(r,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(r,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return s.Name}});var n=on;Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(r,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(r,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(r,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),r.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class a{optimizeNodes(){return this}optimizeNames(u,p){return this}}class i extends a{constructor(u,p,$){super(),this.varKind=u,this.name=p,this.rhs=$}render({es5:u,_n:p}){const $=u?t.varKinds.var:this.varKind,M=this.rhs===void 0?"":` = ${this.rhs}`;return`${$} ${this.name}${M};`+p}optimizeNames(u,p){if(u[this.name.str])return this.rhs&&(this.rhs=X(this.rhs,u,p)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class o extends a{constructor(u,p,$){super(),this.lhs=u,this.rhs=p,this.sideEffects=$}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,p){if(!(this.lhs instanceof e.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=X(this.rhs,u,p),this}get names(){const u=this.lhs instanceof e.Name?{}:{...this.lhs.names};return ee(u,this.rhs)}}class l extends o{constructor(u,p,$,M){super(u,$,M),this.op=p}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}}class c extends a{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}}class d extends a{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}}class f extends a{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}}class w extends a{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,p){return this.code=X(this.code,u,p),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class y extends a{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((p,$)=>p+$.render(u),"")}optimizeNodes(){const{nodes:u}=this;let p=u.length;for(;p--;){const $=u[p].optimizeNodes();Array.isArray($)?u.splice(p,1,...$):$?u[p]=$:u.splice(p,1)}return u.length>0?this:void 0}optimizeNames(u,p){const{nodes:$}=this;let M=$.length;for(;M--;){const L=$[M];L.optimizeNames(u,p)||(fe(u,L.names),$.splice(M,1))}return $.length>0?this:void 0}get names(){return this.nodes.reduce((u,p)=>Y(u,p.names),{})}}class S extends y{render(u){return"{"+u._n+super.render(u)+"}"+u._n}}class E extends y{}class b extends S{}b.kind="else";class g extends S{constructor(u,p){super(p),this.condition=u}render(u){let p=`if(${this.condition})`+super.render(u);return this.else&&(p+="else "+this.else.render(u)),p}optimizeNodes(){super.optimizeNodes();const u=this.condition;if(u===!0)return this.nodes;let p=this.else;if(p){const $=p.optimizeNodes();p=this.else=Array.isArray($)?new b($):$}if(p)return u===!1?p instanceof g?p:p.nodes:this.nodes.length?this:new g(he(u),p instanceof g?[p]:p.nodes);if(!(u===!1||!this.nodes.length))return this}optimizeNames(u,p){var $;if(this.else=($=this.else)===null||$===void 0?void 0:$.optimizeNames(u,p),!!(super.optimizeNames(u,p)||this.else))return this.condition=X(this.condition,u,p),this}get names(){const u=super.names;return ee(u,this.condition),this.else&&Y(u,this.else.names),u}}g.kind="if";class T extends S{}T.kind="for";class C extends T{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,p){if(super.optimizeNames(u,p))return this.iteration=X(this.iteration,u,p),this}get names(){return Y(super.names,this.iteration.names)}}class O extends T{constructor(u,p,$,M){super(),this.varKind=u,this.name=p,this.from=$,this.to=M}render(u){const p=u.es5?t.varKinds.var:this.varKind,{name:$,from:M,to:L}=this;return`for(${p} ${$}=${M}; ${$}<${L}; ${$}++)`+super.render(u)}get names(){const u=ee(super.names,this.from);return ee(u,this.to)}}class _ extends T{constructor(u,p,$,M){super(),this.loop=u,this.varKind=p,this.name=$,this.iterable=M}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,p){if(super.optimizeNames(u,p))return this.iterable=X(this.iterable,u,p),this}get names(){return Y(super.names,this.iterable.names)}}class q extends S{constructor(u,p,$){super(),this.name=u,this.args=p,this.async=$}render(u){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(u)}}q.kind="func";class z extends y{render(u){return"return "+super.render(u)}}z.kind="return";class J extends S{render(u){let p="try"+super.render(u);return this.catch&&(p+=this.catch.render(u)),this.finally&&(p+=this.finally.render(u)),p}optimizeNodes(){var u,p;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(p=this.finally)===null||p===void 0||p.optimizeNodes(),this}optimizeNames(u,p){var $,M;return super.optimizeNames(u,p),($=this.catch)===null||$===void 0||$.optimizeNames(u,p),(M=this.finally)===null||M===void 0||M.optimizeNames(u,p),this}get names(){const u=super.names;return this.catch&&Y(u,this.catch.names),this.finally&&Y(u,this.finally.names),u}}class W extends S{constructor(u){super(),this.error=u}render(u){return`catch(${this.error})`+super.render(u)}}W.kind="catch";class ae extends S{render(u){return"finally"+super.render(u)}}ae.kind="finally";class G{constructor(u,p={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...p,_n:p.lines?`
|
|
21
|
+
`:""},this._extScope=u,this._scope=new t.Scope({parent:u}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,p){const $=this._extScope.value(u,p);return(this._values[$.prefix]||(this._values[$.prefix]=new Set)).add($),$}getScopeValue(u,p){return this._extScope.getValue(u,p)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,p,$,M){const L=this._scope.toName(p);return $!==void 0&&M&&(this._constants[L.str]=$),this._leafNode(new i(u,L,$)),L}const(u,p,$){return this._def(t.varKinds.const,u,p,$)}let(u,p,$){return this._def(t.varKinds.let,u,p,$)}var(u,p,$){return this._def(t.varKinds.var,u,p,$)}assign(u,p,$){return this._leafNode(new o(u,p,$))}add(u,p){return this._leafNode(new l(u,r.operators.ADD,p))}code(u){return typeof u=="function"?u():u!==e.nil&&this._leafNode(new w(u)),this}object(...u){const p=["{"];for(const[$,M]of u)p.length>1&&p.push(","),p.push($),($!==M||this.opts.es5)&&(p.push(":"),(0,e.addCodeArg)(p,M));return p.push("}"),new e._Code(p)}if(u,p,$){if(this._blockNode(new g(u)),p&&$)this.code(p).else().code($).endIf();else if(p)this.code(p).endIf();else if($)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(u){return this._elseNode(new g(u))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(g,b)}_for(u,p){return this._blockNode(u),p&&this.code(p).endFor(),this}for(u,p){return this._for(new C(u),p)}forRange(u,p,$,M,L=this.opts.es5?t.varKinds.var:t.varKinds.let){const U=this._scope.toName(u);return this._for(new O(L,U,p,$),()=>M(U))}forOf(u,p,$,M=t.varKinds.const){const L=this._scope.toName(u);if(this.opts.es5){const U=p instanceof e.Name?p:this.var("_arr",p);return this.forRange("_i",0,(0,e._)`${U}.length`,H=>{this.var(L,(0,e._)`${U}[${H}]`),$(L)})}return this._for(new _("of",M,L,p),()=>$(L))}forIn(u,p,$,M=this.opts.es5?t.varKinds.var:t.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,e._)`Object.keys(${p})`,$);const L=this._scope.toName(u);return this._for(new _("in",M,L,p),()=>$(L))}endFor(){return this._endBlockNode(T)}label(u){return this._leafNode(new c(u))}break(u){return this._leafNode(new d(u))}return(u){const p=new z;if(this._blockNode(p),this.code(u),p.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(z)}try(u,p,$){if(!p&&!$)throw new Error('CodeGen: "try" without "catch" and "finally"');const M=new J;if(this._blockNode(M),this.code(u),p){const L=this.name("e");this._currNode=M.catch=new W(L),p(L)}return $&&(this._currNode=M.finally=new ae,this.code($)),this._endBlockNode(W,ae)}throw(u){return this._leafNode(new f(u))}block(u,p){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(p),this}endBlock(u){const p=this._blockStarts.pop();if(p===void 0)throw new Error("CodeGen: not in self-balancing block");const $=this._nodes.length-p;if($<0||u!==void 0&&$!==u)throw new Error(`CodeGen: wrong number of nodes: ${$} vs ${u} expected`);return this._nodes.length=p,this}func(u,p=e.nil,$,M){return this._blockNode(new q(u,p,$)),M&&this.code(M).endFunc(),this}endFunc(){return this._endBlockNode(q)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,p){const $=this._currNode;if($ instanceof u||p&&$ instanceof p)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${p?`${u.kind}/${p.kind}`:u.kind}"`)}_elseNode(u){const p=this._currNode;if(!(p instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=p.else=u,this}get _root(){return this._nodes[0]}get _currNode(){const u=this._nodes;return u[u.length-1]}set _currNode(u){const p=this._nodes;p[p.length-1]=u}}r.CodeGen=G;function Y(P,u){for(const p in u)P[p]=(P[p]||0)+(u[p]||0);return P}function ee(P,u){return u instanceof e._CodeOrName?Y(P,u.names):P}function X(P,u,p){if(P instanceof e.Name)return $(P);if(!M(P))return P;return new e._Code(P._items.reduce((L,U)=>(U instanceof e.Name&&(U=$(U)),U instanceof e._Code?L.push(...U._items):L.push(U),L),[]));function $(L){const U=p[L.str];return U===void 0||u[L.str]!==1?L:(delete u[L.str],U)}function M(L){return L instanceof e._Code&&L._items.some(U=>U instanceof e.Name&&u[U.str]===1&&p[U.str]!==void 0)}}function fe(P,u){for(const p in u)P[p]=(P[p]||0)-(u[p]||0)}function he(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,e._)`!${x(P)}`}r.not=he;const ge=v(r.operators.AND);function De(...P){return P.reduce(ge)}r.and=De;const Ne=v(r.operators.OR);function F(...P){return P.reduce(Ne)}r.or=F;function v(P){return(u,p)=>u===e.nil?p:p===e.nil?u:(0,e._)`${x(u)} ${P} ${x(p)}`}function x(P){return P instanceof e.Name?P:(0,e._)`(${P})`}}(de);var Z={};Object.defineProperty(Z,"__esModule",{value:!0}),Z.checkStrictMode=Z.getErrorPath=Z.Type=Z.useFunc=Z.setEvaluated=Z.evaluatedPropsToName=Z.mergeEvaluated=Z.eachItem=Z.unescapeJsonPointer=Z.escapeJsonPointer=Z.escapeFragment=Z.unescapeFragment=Z.schemaRefOrVal=Z.schemaHasRulesButRef=Z.schemaHasRules=Z.checkUnknownRules=Z.alwaysValidSchema=Z.toHash=void 0;const $e=de,Al=Sr;function Dl(r){const e={};for(const t of r)e[t]=!0;return e}Z.toHash=Dl;function Il(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Ni(r,e),!Pi(e,r.self.RULES.all))}Z.alwaysValidSchema=Il;function Ni(r,e=r.schema){const{opts:t,self:s}=r;if(!t.strictSchema||typeof e=="boolean")return;const n=s.RULES.keywords;for(const a in e)n[a]||Vi(r,`unknown keyword: "${a}"`)}Z.checkUnknownRules=Ni;function Pi(r,e){if(typeof r=="boolean")return!r;for(const t in r)if(e[t])return!0;return!1}Z.schemaHasRules=Pi;function Nl(r,e){if(typeof r=="boolean")return!r;for(const t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}Z.schemaHasRulesButRef=Nl;function Pl({topSchemaRef:r,schemaPath:e},t,s,n){if(!n){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,$e._)`${t}`}return(0,$e._)`${r}${e}${(0,$e.getProperty)(s)}`}Z.schemaRefOrVal=Pl;function Fl(r){return Fi(decodeURIComponent(r))}Z.unescapeFragment=Fl;function Ml(r){return encodeURIComponent(ln(r))}Z.escapeFragment=Ml;function ln(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}Z.escapeJsonPointer=ln;function Fi(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}Z.unescapeJsonPointer=Fi;function jl(r,e){if(Array.isArray(r))for(const t of r)e(t);else e(r)}Z.eachItem=jl;function Mi({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:s}){return(n,a,i,o)=>{const l=i===void 0?a:i instanceof $e.Name?(a instanceof $e.Name?r(n,a,i):e(n,a,i),i):a instanceof $e.Name?(e(n,i,a),a):t(a,i);return o===$e.Name&&!(l instanceof $e.Name)?s(n,l):l}}Z.mergeEvaluated={props:Mi({mergeNames:(r,e,t)=>r.if((0,$e._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,$e._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,$e._)`${t} || {}`).code((0,$e._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,$e._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,$e._)`${t} || {}`),un(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:{...r,...e},resultToName:ji}),items:Mi({mergeNames:(r,e,t)=>r.if((0,$e._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,$e._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,$e._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,$e._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function ji(r,e){if(e===!0)return r.var("props",!0);const t=r.var("props",(0,$e._)`{}`);return e!==void 0&&un(r,t,e),t}Z.evaluatedPropsToName=ji;function un(r,e,t){Object.keys(t).forEach(s=>r.assign((0,$e._)`${e}${(0,$e.getProperty)(s)}`,!0))}Z.setEvaluated=un;const xi={};function xl(r,e){return r.scopeValue("func",{ref:e,code:xi[e.code]||(xi[e.code]=new Al._Code(e.code))})}Z.useFunc=xl;var cn;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(cn||(Z.Type=cn={}));function Vl(r,e,t){if(r instanceof $e.Name){const s=e===cn.Num;return t?s?(0,$e._)`"[" + ${r} + "]"`:(0,$e._)`"['" + ${r} + "']"`:s?(0,$e._)`"/" + ${r}`:(0,$e._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,$e.getProperty)(r).toString():"/"+ln(r)}Z.getErrorPath=Vl;function Vi(r,e,t=r.opts.strictSchema){if(t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}Z.checkStrictMode=Vi;var bt={};Object.defineProperty(bt,"__esModule",{value:!0});const Je=de,Bl={data:new Je.Name("data"),valCxt:new Je.Name("valCxt"),instancePath:new Je.Name("instancePath"),parentData:new Je.Name("parentData"),parentDataProperty:new Je.Name("parentDataProperty"),rootData:new Je.Name("rootData"),dynamicAnchors:new Je.Name("dynamicAnchors"),vErrors:new Je.Name("vErrors"),errors:new Je.Name("errors"),this:new Je.Name("this"),self:new Je.Name("self"),scope:new Je.Name("scope"),json:new Je.Name("json"),jsonPos:new Je.Name("jsonPos"),jsonLen:new Je.Name("jsonLen"),jsonPart:new Je.Name("jsonPart")};bt.default=Bl,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.extendErrors=r.resetErrorsCount=r.reportExtraError=r.reportError=r.keyword$DataError=r.keywordError=void 0;const e=de,t=Z,s=bt;r.keywordError={message:({keyword:b})=>(0,e.str)`must pass "${b}" keyword validation`},r.keyword$DataError={message:({keyword:b,schemaType:g})=>g?(0,e.str)`"${b}" keyword must be ${g} ($data)`:(0,e.str)`"${b}" keyword is invalid ($data)`};function n(b,g=r.keywordError,T,C){const{it:O}=b,{gen:_,compositeRule:q,allErrors:z}=O,J=f(b,g,T);C??(q||z)?l(_,J):c(O,(0,e._)`[${J}]`)}r.reportError=n;function a(b,g=r.keywordError,T){const{it:C}=b,{gen:O,compositeRule:_,allErrors:q}=C,z=f(b,g,T);l(O,z),_||q||c(C,s.default.vErrors)}r.reportExtraError=a;function i(b,g){b.assign(s.default.errors,g),b.if((0,e._)`${s.default.vErrors} !== null`,()=>b.if(g,()=>b.assign((0,e._)`${s.default.vErrors}.length`,g),()=>b.assign(s.default.vErrors,null)))}r.resetErrorsCount=i;function o({gen:b,keyword:g,schemaValue:T,data:C,errsCount:O,it:_}){if(O===void 0)throw new Error("ajv implementation error");const q=b.name("err");b.forRange("i",O,s.default.errors,z=>{b.const(q,(0,e._)`${s.default.vErrors}[${z}]`),b.if((0,e._)`${q}.instancePath === undefined`,()=>b.assign((0,e._)`${q}.instancePath`,(0,e.strConcat)(s.default.instancePath,_.errorPath))),b.assign((0,e._)`${q}.schemaPath`,(0,e.str)`${_.errSchemaPath}/${g}`),_.opts.verbose&&(b.assign((0,e._)`${q}.schema`,T),b.assign((0,e._)`${q}.data`,C))})}r.extendErrors=o;function l(b,g){const T=b.const("err",g);b.if((0,e._)`${s.default.vErrors} === null`,()=>b.assign(s.default.vErrors,(0,e._)`[${T}]`),(0,e._)`${s.default.vErrors}.push(${T})`),b.code((0,e._)`${s.default.errors}++`)}function c(b,g){const{gen:T,validateName:C,schemaEnv:O}=b;O.$async?T.throw((0,e._)`new ${b.ValidationError}(${g})`):(T.assign((0,e._)`${C}.errors`,g),T.return(!1))}const d={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function f(b,g,T){const{createErrors:C}=b.it;return C===!1?(0,e._)`{}`:w(b,g,T)}function w(b,g,T={}){const{gen:C,it:O}=b,_=[y(O,T),S(b,T)];return E(b,g,_),C.object(..._)}function y({errorPath:b},{instancePath:g}){const T=g?(0,e.str)`${b}${(0,t.getErrorPath)(g,t.Type.Str)}`:b;return[s.default.instancePath,(0,e.strConcat)(s.default.instancePath,T)]}function S({keyword:b,it:{errSchemaPath:g}},{schemaPath:T,parentSchema:C}){let O=C?g:(0,e.str)`${g}/${b}`;return T&&(O=(0,e.str)`${O}${(0,t.getErrorPath)(T,t.Type.Str)}`),[d.schemaPath,O]}function E(b,{params:g,message:T},C){const{keyword:O,data:_,schemaValue:q,it:z}=b,{opts:J,propertyName:W,topSchemaRef:ae,schemaPath:G}=z;C.push([d.keyword,O],[d.params,typeof g=="function"?g(b):g||(0,e._)`{}`]),J.messages&&C.push([d.message,typeof T=="function"?T(b):T]),J.verbose&&C.push([d.schema,q],[d.parentSchema,(0,e._)`${ae}${G}`],[s.default.data,_]),W&&C.push([d.propertyName,W])}}($r);var Bi;function Ll(){if(Bi)return Kt;Bi=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.boolOrEmptySchema=Kt.topBoolOrEmptySchema=void 0;const r=$r,e=de,t=bt,s={message:"boolean schema is false"};function n(o){const{gen:l,schema:c,validateName:d}=o;c===!1?i(o,!1):typeof c=="object"&&c.$async===!0?l.return(t.default.data):(l.assign((0,e._)`${d}.errors`,null),l.return(!0))}Kt.topBoolOrEmptySchema=n;function a(o,l){const{gen:c,schema:d}=o;d===!1?(c.var(l,!1),i(o)):c.var(l,!0)}Kt.boolOrEmptySchema=a;function i(o,l){const{gen:c,data:d}=o,f={gen:c,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,r.reportError)(f,s,void 0,l)}return Kt}var Ve={},Gt={};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.getRules=Gt.isJSONType=void 0;const Rl=["string","number","integer","boolean","null","object","array"],zl=new Set(Rl);function ql(r){return typeof r=="string"&&zl.has(r)}Gt.isJSONType=ql;function Ul(){const r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}Gt.getRules=Ul;var Nt={};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.shouldUseRule=Nt.shouldUseGroup=Nt.schemaHasRulesForType=void 0;function Hl({schema:r,self:e},t){const s=e.RULES.types[t];return s&&s!==!0&&Li(r,s)}Nt.schemaHasRulesForType=Hl;function Li(r,e){return e.rules.some(t=>Ri(r,t))}Nt.shouldUseGroup=Li;function Ri(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(s=>r[s]!==void 0))}Nt.shouldUseRule=Ri,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.reportTypeError=Ve.checkDataTypes=Ve.checkDataType=Ve.coerceAndCheckDataType=Ve.getJSONTypes=Ve.getSchemaTypes=Ve.DataType=void 0;const Kl=Gt,Gl=Nt,Wl=$r,ue=de,zi=Z;var ar;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(ar||(Ve.DataType=ar={}));function Yl(r){const e=qi(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}Ve.getSchemaTypes=Yl;function qi(r){const e=Array.isArray(r)?r:r?[r]:[];if(e.every(Kl.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ve.getJSONTypes=qi;function Xl(r,e){const{gen:t,data:s,opts:n}=r,a=Jl(e,n.coerceTypes),i=e.length>0&&!(a.length===0&&e.length===1&&(0,Gl.schemaHasRulesForType)(r,e[0]));if(i){const o=fn(e,s,n.strictNumbers,ar.Wrong);t.if(o,()=>{a.length?Zl(r,e,a):pn(r)})}return i}Ve.coerceAndCheckDataType=Xl;const Ui=new Set(["string","number","integer","boolean","null"]);function Jl(r,e){return e?r.filter(t=>Ui.has(t)||e==="array"&&t==="array"):[]}function Zl(r,e,t){const{gen:s,data:n,opts:a}=r,i=s.let("dataType",(0,ue._)`typeof ${n}`),o=s.let("coerced",(0,ue._)`undefined`);a.coerceTypes==="array"&&s.if((0,ue._)`${i} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,ue._)`${n}[0]`).assign(i,(0,ue._)`typeof ${n}`).if(fn(e,n,a.strictNumbers),()=>s.assign(o,n))),s.if((0,ue._)`${o} !== undefined`);for(const c of t)(Ui.has(c)||c==="array"&&a.coerceTypes==="array")&&l(c);s.else(),pn(r),s.endIf(),s.if((0,ue._)`${o} !== undefined`,()=>{s.assign(n,o),Ql(r,o)});function l(c){switch(c){case"string":s.elseIf((0,ue._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,ue._)`"" + ${n}`).elseIf((0,ue._)`${n} === null`).assign(o,(0,ue._)`""`);return;case"number":s.elseIf((0,ue._)`${i} == "boolean" || ${n} === null
|
|
22
|
+
|| (${i} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,ue._)`+${n}`);return;case"integer":s.elseIf((0,ue._)`${i} === "boolean" || ${n} === null
|
|
23
|
+
|| (${i} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,ue._)`+${n}`);return;case"boolean":s.elseIf((0,ue._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(o,!1).elseIf((0,ue._)`${n} === "true" || ${n} === 1`).assign(o,!0);return;case"null":s.elseIf((0,ue._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(o,null);return;case"array":s.elseIf((0,ue._)`${i} === "string" || ${i} === "number"
|
|
24
|
+
|| ${i} === "boolean" || ${n} === null`).assign(o,(0,ue._)`[${n}]`)}}}function Ql({gen:r,parentData:e,parentDataProperty:t},s){r.if((0,ue._)`${e} !== undefined`,()=>r.assign((0,ue._)`${e}[${t}]`,s))}function dn(r,e,t,s=ar.Correct){const n=s===ar.Correct?ue.operators.EQ:ue.operators.NEQ;let a;switch(r){case"null":return(0,ue._)`${e} ${n} null`;case"array":a=(0,ue._)`Array.isArray(${e})`;break;case"object":a=(0,ue._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=i((0,ue._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=i();break;default:return(0,ue._)`typeof ${e} ${n} ${r}`}return s===ar.Correct?a:(0,ue.not)(a);function i(o=ue.nil){return(0,ue.and)((0,ue._)`typeof ${e} == "number"`,o,t?(0,ue._)`isFinite(${e})`:ue.nil)}}Ve.checkDataType=dn;function fn(r,e,t,s){if(r.length===1)return dn(r[0],e,t,s);let n;const a=(0,zi.toHash)(r);if(a.array&&a.object){const i=(0,ue._)`typeof ${e} != "object"`;n=a.null?i:(0,ue._)`!${e} || ${i}`,delete a.null,delete a.array,delete a.object}else n=ue.nil;a.number&&delete a.integer;for(const i in a)n=(0,ue.and)(n,dn(i,e,t,s));return n}Ve.checkDataTypes=fn;const eu={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,ue._)`{type: ${r}}`:(0,ue._)`{type: ${e}}`};function pn(r){const e=tu(r);(0,Wl.reportError)(e,eu)}Ve.reportTypeError=pn;function tu(r){const{gen:e,data:t,schema:s}=r,n=(0,zi.schemaRefOrVal)(r,s,"type");return{gen:e,keyword:"type",data:t,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:r}}var Er={},Hi;function ru(){if(Hi)return Er;Hi=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.assignDefaults=void 0;const r=de,e=Z;function t(n,a){const{properties:i,items:o}=n.schema;if(a==="object"&&i)for(const l in i)s(n,l,i[l].default);else a==="array"&&Array.isArray(o)&&o.forEach((l,c)=>s(n,c,l.default))}Er.assignDefaults=t;function s(n,a,i){const{gen:o,compositeRule:l,data:c,opts:d}=n;if(i===void 0)return;const f=(0,r._)`${c}${(0,r.getProperty)(a)}`;if(l){(0,e.checkStrictMode)(n,`default is ignored for: ${f}`);return}let w=(0,r._)`${f} === undefined`;d.useDefaults==="empty"&&(w=(0,r._)`${w} || ${f} === null || ${f} === ""`),o.if(w,(0,r._)`${f} = ${(0,r.stringify)(i)}`)}return Er}var pt={},_e={},Ki;function ht(){if(Ki)return _e;Ki=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.validateUnion=_e.validateArray=_e.usePattern=_e.callValidateCode=_e.schemaProperties=_e.allSchemaProperties=_e.noPropertyInData=_e.propertyInData=_e.isOwnProperty=_e.hasPropFunc=_e.reportMissingProp=_e.checkMissingProp=_e.checkReportMissingProp=void 0;const r=de,e=Z,t=bt,s=Z;function n(T,C){const{gen:O,data:_,it:q}=T;O.if(d(O,_,C,q.opts.ownProperties),()=>{T.setParams({missingProperty:(0,r._)`${C}`},!0),T.error()})}_e.checkReportMissingProp=n;function a({gen:T,data:C,it:{opts:O}},_,q){return(0,r.or)(..._.map(z=>(0,r.and)(d(T,C,z,O.ownProperties),(0,r._)`${q} = ${z}`)))}_e.checkMissingProp=a;function i(T,C){T.setParams({missingProperty:C},!0),T.error()}_e.reportMissingProp=i;function o(T){return T.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,r._)`Object.prototype.hasOwnProperty`})}_e.hasPropFunc=o;function l(T,C,O){return(0,r._)`${o(T)}.call(${C}, ${O})`}_e.isOwnProperty=l;function c(T,C,O,_){const q=(0,r._)`${C}${(0,r.getProperty)(O)} !== undefined`;return _?(0,r._)`${q} && ${l(T,C,O)}`:q}_e.propertyInData=c;function d(T,C,O,_){const q=(0,r._)`${C}${(0,r.getProperty)(O)} === undefined`;return _?(0,r.or)(q,(0,r.not)(l(T,C,O))):q}_e.noPropertyInData=d;function f(T){return T?Object.keys(T).filter(C=>C!=="__proto__"):[]}_e.allSchemaProperties=f;function w(T,C){return f(C).filter(O=>!(0,e.alwaysValidSchema)(T,C[O]))}_e.schemaProperties=w;function y({schemaCode:T,data:C,it:{gen:O,topSchemaRef:_,schemaPath:q,errorPath:z},it:J},W,ae,G){const Y=G?(0,r._)`${T}, ${C}, ${_}${q}`:C,ee=[[t.default.instancePath,(0,r.strConcat)(t.default.instancePath,z)],[t.default.parentData,J.parentData],[t.default.parentDataProperty,J.parentDataProperty],[t.default.rootData,t.default.rootData]];J.opts.dynamicRef&&ee.push([t.default.dynamicAnchors,t.default.dynamicAnchors]);const X=(0,r._)`${Y}, ${O.object(...ee)}`;return ae!==r.nil?(0,r._)`${W}.call(${ae}, ${X})`:(0,r._)`${W}(${X})`}_e.callValidateCode=y;const S=(0,r._)`new RegExp`;function E({gen:T,it:{opts:C}},O){const _=C.unicodeRegExp?"u":"",{regExp:q}=C.code,z=q(O,_);return T.scopeValue("pattern",{key:z.toString(),ref:z,code:(0,r._)`${q.code==="new RegExp"?S:(0,s.useFunc)(T,q)}(${O}, ${_})`})}_e.usePattern=E;function b(T){const{gen:C,data:O,keyword:_,it:q}=T,z=C.name("valid");if(q.allErrors){const W=C.let("valid",!0);return J(()=>C.assign(W,!1)),W}return C.var(z,!0),J(()=>C.break()),z;function J(W){const ae=C.const("len",(0,r._)`${O}.length`);C.forRange("i",0,ae,G=>{T.subschema({keyword:_,dataProp:G,dataPropType:e.Type.Num},z),C.if((0,r.not)(z),W)})}}_e.validateArray=b;function g(T){const{gen:C,schema:O,keyword:_,it:q}=T;if(!Array.isArray(O))throw new Error("ajv implementation error");if(O.some(ae=>(0,e.alwaysValidSchema)(q,ae))&&!q.opts.unevaluated)return;const J=C.let("valid",!1),W=C.name("_valid");C.block(()=>O.forEach((ae,G)=>{const Y=T.subschema({keyword:_,schemaProp:G,compositeRule:!0},W);C.assign(J,(0,r._)`${J} || ${W}`),T.mergeValidEvaluated(Y,W)||C.if((0,r.not)(J))})),T.result(J,()=>T.reset(),()=>T.error(!0))}return _e.validateUnion=g,_e}var Gi;function su(){if(Gi)return pt;Gi=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.validateKeywordUsage=pt.validSchemaType=pt.funcKeywordCode=pt.macroKeywordCode=void 0;const r=de,e=bt,t=ht(),s=$r;function n(w,y){const{gen:S,keyword:E,schema:b,parentSchema:g,it:T}=w,C=y.macro.call(T.self,b,g,T),O=c(S,E,C);T.opts.validateSchema!==!1&&T.self.validateSchema(C,!0);const _=S.name("valid");w.subschema({schema:C,schemaPath:r.nil,errSchemaPath:`${T.errSchemaPath}/${E}`,topSchemaRef:O,compositeRule:!0},_),w.pass(_,()=>w.error(!0))}pt.macroKeywordCode=n;function a(w,y){var S;const{gen:E,keyword:b,schema:g,parentSchema:T,$data:C,it:O}=w;l(O,y);const _=!C&&y.compile?y.compile.call(O.self,g,T,O):y.validate,q=c(E,b,_),z=E.let("valid");w.block$data(z,J),w.ok((S=y.valid)!==null&&S!==void 0?S:z);function J(){if(y.errors===!1)G(),y.modifying&&i(w),Y(()=>w.error());else{const ee=y.async?W():ae();y.modifying&&i(w),Y(()=>o(w,ee))}}function W(){const ee=E.let("ruleErrs",null);return E.try(()=>G((0,r._)`await `),X=>E.assign(z,!1).if((0,r._)`${X} instanceof ${O.ValidationError}`,()=>E.assign(ee,(0,r._)`${X}.errors`),()=>E.throw(X))),ee}function ae(){const ee=(0,r._)`${q}.errors`;return E.assign(ee,null),G(r.nil),ee}function G(ee=y.async?(0,r._)`await `:r.nil){const X=O.opts.passContext?e.default.this:e.default.self,fe=!("compile"in y&&!C||y.schema===!1);E.assign(z,(0,r._)`${ee}${(0,t.callValidateCode)(w,q,X,fe)}`,y.modifying)}function Y(ee){var X;E.if((0,r.not)((X=y.valid)!==null&&X!==void 0?X:z),ee)}}pt.funcKeywordCode=a;function i(w){const{gen:y,data:S,it:E}=w;y.if(E.parentData,()=>y.assign(S,(0,r._)`${E.parentData}[${E.parentDataProperty}]`))}function o(w,y){const{gen:S}=w;S.if((0,r._)`Array.isArray(${y})`,()=>{S.assign(e.default.vErrors,(0,r._)`${e.default.vErrors} === null ? ${y} : ${e.default.vErrors}.concat(${y})`).assign(e.default.errors,(0,r._)`${e.default.vErrors}.length`),(0,s.extendErrors)(w)},()=>w.error())}function l({schemaEnv:w},y){if(y.async&&!w.$async)throw new Error("async keyword in sync schema")}function c(w,y,S){if(S===void 0)throw new Error(`keyword "${y}" failed to compile`);return w.scopeValue("keyword",typeof S=="function"?{ref:S}:{ref:S,code:(0,r.stringify)(S)})}function d(w,y,S=!1){return!y.length||y.some(E=>E==="array"?Array.isArray(w):E==="object"?w&&typeof w=="object"&&!Array.isArray(w):typeof w==E||S&&typeof w>"u")}pt.validSchemaType=d;function f({schema:w,opts:y,self:S,errSchemaPath:E},b,g){if(Array.isArray(b.keyword)?!b.keyword.includes(g):b.keyword!==g)throw new Error("ajv implementation error");const T=b.dependencies;if(T!=null&&T.some(C=>!Object.prototype.hasOwnProperty.call(w,C)))throw new Error(`parent schema must have dependencies of ${g}: ${T.join(",")}`);if(b.validateSchema&&!b.validateSchema(w[g])){const O=`keyword "${g}" value is invalid at path "${E}": `+S.errorsText(b.validateSchema.errors);if(y.validateSchema==="log")S.logger.error(O);else throw new Error(O)}}return pt.validateKeywordUsage=f,pt}var Pt={},Wi;function nu(){if(Wi)return Pt;Wi=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.extendSubschemaMode=Pt.extendSubschemaData=Pt.getSubschema=void 0;const r=de,e=Z;function t(a,{keyword:i,schemaProp:o,schema:l,schemaPath:c,errSchemaPath:d,topSchemaRef:f}){if(i!==void 0&&l!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(i!==void 0){const w=a.schema[i];return o===void 0?{schema:w,schemaPath:(0,r._)`${a.schemaPath}${(0,r.getProperty)(i)}`,errSchemaPath:`${a.errSchemaPath}/${i}`}:{schema:w[o],schemaPath:(0,r._)`${a.schemaPath}${(0,r.getProperty)(i)}${(0,r.getProperty)(o)}`,errSchemaPath:`${a.errSchemaPath}/${i}/${(0,e.escapeFragment)(o)}`}}if(l!==void 0){if(c===void 0||d===void 0||f===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:l,schemaPath:c,topSchemaRef:f,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}Pt.getSubschema=t;function s(a,i,{dataProp:o,dataPropType:l,data:c,dataTypes:d,propertyName:f}){if(c!==void 0&&o!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:w}=i;if(o!==void 0){const{errorPath:S,dataPathArr:E,opts:b}=i,g=w.let("data",(0,r._)`${i.data}${(0,r.getProperty)(o)}`,!0);y(g),a.errorPath=(0,r.str)`${S}${(0,e.getErrorPath)(o,l,b.jsPropertySyntax)}`,a.parentDataProperty=(0,r._)`${o}`,a.dataPathArr=[...E,a.parentDataProperty]}if(c!==void 0){const S=c instanceof r.Name?c:w.let("data",c,!0);y(S),f!==void 0&&(a.propertyName=f)}d&&(a.dataTypes=d);function y(S){a.data=S,a.dataLevel=i.dataLevel+1,a.dataTypes=[],i.definedProperties=new Set,a.parentData=i.data,a.dataNames=[...i.dataNames,S]}}Pt.extendSubschemaData=s;function n(a,{jtdDiscriminator:i,jtdMetadata:o,compositeRule:l,createErrors:c,allErrors:d}){l!==void 0&&(a.compositeRule=l),c!==void 0&&(a.createErrors=c),d!==void 0&&(a.allErrors=d),a.jtdDiscriminator=i,a.jtdMetadata=o}return Pt.extendSubschemaMode=n,Pt}var qe={},Yi=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var s,n,a;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(n=s;n--!==0;)if(!r(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(a=Object.keys(e),s=a.length,s!==Object.keys(t).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=s;n--!==0;){var i=a[n];if(!r(e[i],t[i]))return!1}return!0}return e!==e&&t!==t},Xi={exports:{}},xt=Xi.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var s=typeof t=="function"?t:t.pre||function(){},n=t.post||function(){};ts(e,s,n,r,"",r)};xt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},xt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},xt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},xt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ts(r,e,t,s,n,a,i,o,l,c){if(s&&typeof s=="object"&&!Array.isArray(s)){e(s,n,a,i,o,l,c);for(var d in s){var f=s[d];if(Array.isArray(f)){if(d in xt.arrayKeywords)for(var w=0;w<f.length;w++)ts(r,e,t,f[w],n+"/"+d+"/"+w,a,n,d,s,w)}else if(d in xt.propsKeywords){if(f&&typeof f=="object")for(var y in f)ts(r,e,t,f[y],n+"/"+d+"/"+au(y),a,n,d,s,y)}else(d in xt.keywords||r.allKeys&&!(d in xt.skipKeywords))&&ts(r,e,t,f,n+"/"+d,a,n,d,s)}t(s,n,a,i,o,l,c)}}function au(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}var iu=Xi.exports;Object.defineProperty(qe,"__esModule",{value:!0}),qe.getSchemaRefs=qe.resolveUrl=qe.normalizeId=qe._getFullPath=qe.getFullPath=qe.inlineRef=void 0;const ou=Z,lu=Yi,uu=iu,cu=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function du(r,e=!0){return typeof r=="boolean"?!0:e===!0?!hn(r):e?Ji(r)<=e:!1}qe.inlineRef=du;const fu=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hn(r){for(const e in r){if(fu.has(e))return!0;const t=r[e];if(Array.isArray(t)&&t.some(hn)||typeof t=="object"&&hn(t))return!0}return!1}function Ji(r){let e=0;for(const t in r){if(t==="$ref")return 1/0;if(e++,!cu.has(t)&&(typeof r[t]=="object"&&(0,ou.eachItem)(r[t],s=>e+=Ji(s)),e===1/0))return 1/0}return e}function Zi(r,e="",t){t!==!1&&(e=ir(e));const s=r.parse(e);return Qi(r,s)}qe.getFullPath=Zi;function Qi(r,e){return r.serialize(e).split("#")[0]+"#"}qe._getFullPath=Qi;const pu=/#\/?$/;function ir(r){return r?r.replace(pu,""):""}qe.normalizeId=ir;function hu(r,e,t){return t=ir(t),r.resolve(e,t)}qe.resolveUrl=hu;const mu=/^[a-z_][-a-z0-9._]*$/i;function gu(r,e){if(typeof r=="boolean")return{};const{schemaId:t,uriResolver:s}=this.opts,n=ir(r[t]||e),a={"":n},i=Zi(s,n,!1),o={},l=new Set;return uu(r,{allKeys:!0},(f,w,y,S)=>{if(S===void 0)return;const E=i+w;let b=a[S];typeof f[t]=="string"&&(b=g.call(this,f[t])),T.call(this,f.$anchor),T.call(this,f.$dynamicAnchor),a[w]=b;function g(C){const O=this.opts.uriResolver.resolve;if(C=ir(b?O(b,C):C),l.has(C))throw d(C);l.add(C);let _=this.refs[C];return typeof _=="string"&&(_=this.refs[_]),typeof _=="object"?c(f,_.schema,C):C!==ir(E)&&(C[0]==="#"?(c(f,o[C],C),o[C]=f):this.refs[C]=E),C}function T(C){if(typeof C=="string"){if(!mu.test(C))throw new Error(`invalid anchor "${C}"`);g.call(this,`#${C}`)}}}),o;function c(f,w,y){if(w!==void 0&&!lu(f,w))throw d(y)}function d(f){return new Error(`reference "${f}" resolves to more than one schema`)}}qe.getSchemaRefs=gu;var eo;function rs(){if(eo)return It;eo=1,Object.defineProperty(It,"__esModule",{value:!0}),It.getData=It.KeywordCxt=It.validateFunctionCode=void 0;const r=Ll(),e=Ve,t=Nt,s=Ve,n=ru(),a=su(),i=nu(),o=de,l=bt,c=qe,d=Z,f=$r;function w(D){if(_(D)&&(z(D),O(D))){b(D);return}y(D,()=>(0,r.topBoolOrEmptySchema)(D))}It.validateFunctionCode=w;function y({gen:D,validateName:k,schema:R,schemaEnv:K,opts:Q},ie){Q.code.es5?D.func(k,(0,o._)`${l.default.data}, ${l.default.valCxt}`,K.$async,()=>{D.code((0,o._)`"use strict"; ${T(R,Q)}`),E(D,Q),D.code(ie)}):D.func(k,(0,o._)`${l.default.data}, ${S(Q)}`,K.$async,()=>D.code(T(R,Q)).code(ie))}function S(D){return(0,o._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${D.dynamicRef?(0,o._)`, ${l.default.dynamicAnchors}={}`:o.nil}}={}`}function E(D,k){D.if(l.default.valCxt,()=>{D.var(l.default.instancePath,(0,o._)`${l.default.valCxt}.${l.default.instancePath}`),D.var(l.default.parentData,(0,o._)`${l.default.valCxt}.${l.default.parentData}`),D.var(l.default.parentDataProperty,(0,o._)`${l.default.valCxt}.${l.default.parentDataProperty}`),D.var(l.default.rootData,(0,o._)`${l.default.valCxt}.${l.default.rootData}`),k.dynamicRef&&D.var(l.default.dynamicAnchors,(0,o._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{D.var(l.default.instancePath,(0,o._)`""`),D.var(l.default.parentData,(0,o._)`undefined`),D.var(l.default.parentDataProperty,(0,o._)`undefined`),D.var(l.default.rootData,l.default.data),k.dynamicRef&&D.var(l.default.dynamicAnchors,(0,o._)`{}`)})}function b(D){const{schema:k,opts:R,gen:K}=D;y(D,()=>{R.$comment&&k.$comment&&ee(D),ae(D),K.let(l.default.vErrors,null),K.let(l.default.errors,0),R.unevaluated&&g(D),J(D),X(D)})}function g(D){const{gen:k,validateName:R}=D;D.evaluated=k.const("evaluated",(0,o._)`${R}.evaluated`),k.if((0,o._)`${D.evaluated}.dynamicProps`,()=>k.assign((0,o._)`${D.evaluated}.props`,(0,o._)`undefined`)),k.if((0,o._)`${D.evaluated}.dynamicItems`,()=>k.assign((0,o._)`${D.evaluated}.items`,(0,o._)`undefined`))}function T(D,k){const R=typeof D=="object"&&D[k.schemaId];return R&&(k.code.source||k.code.process)?(0,o._)`/*# sourceURL=${R} */`:o.nil}function C(D,k){if(_(D)&&(z(D),O(D))){q(D,k);return}(0,r.boolOrEmptySchema)(D,k)}function O({schema:D,self:k}){if(typeof D=="boolean")return!D;for(const R in D)if(k.RULES.all[R])return!0;return!1}function _(D){return typeof D.schema!="boolean"}function q(D,k){const{schema:R,gen:K,opts:Q}=D;Q.$comment&&R.$comment&&ee(D),G(D),Y(D);const ie=K.const("_errs",l.default.errors);J(D,ie),K.var(k,(0,o._)`${ie} === ${l.default.errors}`)}function z(D){(0,d.checkUnknownRules)(D),W(D)}function J(D,k){if(D.opts.jtd)return he(D,[],!1,k);const R=(0,e.getSchemaTypes)(D.schema),K=(0,e.coerceAndCheckDataType)(D,R);he(D,R,!K,k)}function W(D){const{schema:k,errSchemaPath:R,opts:K,self:Q}=D;k.$ref&&K.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(k,Q.RULES)&&Q.logger.warn(`$ref: keywords ignored in schema at path "${R}"`)}function ae(D){const{schema:k,opts:R}=D;k.default!==void 0&&R.useDefaults&&R.strictSchema&&(0,d.checkStrictMode)(D,"default is ignored in the schema root")}function G(D){const k=D.schema[D.opts.schemaId];k&&(D.baseId=(0,c.resolveUrl)(D.opts.uriResolver,D.baseId,k))}function Y(D){if(D.schema.$async&&!D.schemaEnv.$async)throw new Error("async schema in sync schema")}function ee({gen:D,schemaEnv:k,schema:R,errSchemaPath:K,opts:Q}){const ie=R.$comment;if(Q.$comment===!0)D.code((0,o._)`${l.default.self}.logger.log(${ie})`);else if(typeof Q.$comment=="function"){const Fe=(0,o.str)`${K}/$comment`,He=D.scopeValue("root",{ref:k.root});D.code((0,o._)`${l.default.self}.opts.$comment(${ie}, ${Fe}, ${He}.schema)`)}}function X(D){const{gen:k,schemaEnv:R,validateName:K,ValidationError:Q,opts:ie}=D;R.$async?k.if((0,o._)`${l.default.errors} === 0`,()=>k.return(l.default.data),()=>k.throw((0,o._)`new ${Q}(${l.default.vErrors})`)):(k.assign((0,o._)`${K}.errors`,l.default.vErrors),ie.unevaluated&&fe(D),k.return((0,o._)`${l.default.errors} === 0`))}function fe({gen:D,evaluated:k,props:R,items:K}){R instanceof o.Name&&D.assign((0,o._)`${k}.props`,R),K instanceof o.Name&&D.assign((0,o._)`${k}.items`,K)}function he(D,k,R,K){const{gen:Q,schema:ie,data:Fe,allErrors:He,opts:Ke,self:Ge}=D,{RULES:Be}=Ge;if(ie.$ref&&(Ke.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(ie,Be))){Q.block(()=>M(D,"$ref",Be.all.$ref.definition));return}Ke.jtd||De(D,k),Q.block(()=>{for(const Ie of Be.rules)nt(Ie);nt(Be.post)});function nt(Ie){(0,t.shouldUseGroup)(ie,Ie)&&(Ie.type?(Q.if((0,s.checkDataType)(Ie.type,Fe,Ke.strictNumbers)),ge(D,Ie),k.length===1&&k[0]===Ie.type&&R&&(Q.else(),(0,s.reportTypeError)(D)),Q.endIf()):ge(D,Ie),He||Q.if((0,o._)`${l.default.errors} === ${K||0}`))}}function ge(D,k){const{gen:R,schema:K,opts:{useDefaults:Q}}=D;Q&&(0,n.assignDefaults)(D,k.type),R.block(()=>{for(const ie of k.rules)(0,t.shouldUseRule)(K,ie)&&M(D,ie.keyword,ie.definition,k.type)})}function De(D,k){D.schemaEnv.meta||!D.opts.strictTypes||(Ne(D,k),D.opts.allowUnionTypes||F(D,k),v(D,D.dataTypes))}function Ne(D,k){if(k.length){if(!D.dataTypes.length){D.dataTypes=k;return}k.forEach(R=>{P(D.dataTypes,R)||p(D,`type "${R}" not allowed by context "${D.dataTypes.join(",")}"`)}),u(D,k)}}function F(D,k){k.length>1&&!(k.length===2&&k.includes("null"))&&p(D,"use allowUnionTypes to allow union type keyword")}function v(D,k){const R=D.self.RULES.all;for(const K in R){const Q=R[K];if(typeof Q=="object"&&(0,t.shouldUseRule)(D.schema,Q)){const{type:ie}=Q.definition;ie.length&&!ie.some(Fe=>x(k,Fe))&&p(D,`missing type "${ie.join(",")}" for keyword "${K}"`)}}}function x(D,k){return D.includes(k)||k==="number"&&D.includes("integer")}function P(D,k){return D.includes(k)||k==="integer"&&D.includes("number")}function u(D,k){const R=[];for(const K of D.dataTypes)P(k,K)?R.push(K):k.includes("integer")&&K==="number"&&R.push("integer");D.dataTypes=R}function p(D,k){const R=D.schemaEnv.baseId+D.errSchemaPath;k+=` at "${R}" (strictTypes)`,(0,d.checkStrictMode)(D,k,D.opts.strictTypes)}class ${constructor(k,R,K){if((0,a.validateKeywordUsage)(k,R,K),this.gen=k.gen,this.allErrors=k.allErrors,this.keyword=K,this.data=k.data,this.schema=k.schema[K],this.$data=R.$data&&k.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(k,this.schema,K,this.$data),this.schemaType=R.schemaType,this.parentSchema=k.schema,this.params={},this.it=k,this.def=R,this.$data)this.schemaCode=k.gen.const("vSchema",H(this.$data,k));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,R.schemaType,R.allowUndefined))throw new Error(`${K} value must be ${JSON.stringify(R.schemaType)}`);("code"in R?R.trackErrors:R.errors!==!1)&&(this.errsCount=k.gen.const("_errs",l.default.errors))}result(k,R,K){this.failResult((0,o.not)(k),R,K)}failResult(k,R,K){this.gen.if(k),K?K():this.error(),R?(this.gen.else(),R(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(k,R){this.failResult((0,o.not)(k),void 0,R)}fail(k){if(k===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(k),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(k){if(!this.$data)return this.fail(k);const{schemaCode:R}=this;this.fail((0,o._)`${R} !== undefined && (${(0,o.or)(this.invalid$data(),k)})`)}error(k,R,K){if(R){this.setParams(R),this._error(k,K),this.setParams({});return}this._error(k,K)}_error(k,R){(k?f.reportExtraError:f.reportError)(this,this.def.error,R)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(k){this.allErrors||this.gen.if(k)}setParams(k,R){R?Object.assign(this.params,k):this.params=k}block$data(k,R,K=o.nil){this.gen.block(()=>{this.check$data(k,K),R()})}check$data(k=o.nil,R=o.nil){if(!this.$data)return;const{gen:K,schemaCode:Q,schemaType:ie,def:Fe}=this;K.if((0,o.or)((0,o._)`${Q} === undefined`,R)),k!==o.nil&&K.assign(k,!0),(ie.length||Fe.validateSchema)&&(K.elseIf(this.invalid$data()),this.$dataError(),k!==o.nil&&K.assign(k,!1)),K.else()}invalid$data(){const{gen:k,schemaCode:R,schemaType:K,def:Q,it:ie}=this;return(0,o.or)(Fe(),He());function Fe(){if(K.length){if(!(R instanceof o.Name))throw new Error("ajv implementation error");const Ke=Array.isArray(K)?K:[K];return(0,o._)`${(0,s.checkDataTypes)(Ke,R,ie.opts.strictNumbers,s.DataType.Wrong)}`}return o.nil}function He(){if(Q.validateSchema){const Ke=k.scopeValue("validate$data",{ref:Q.validateSchema});return(0,o._)`!${Ke}(${R})`}return o.nil}}subschema(k,R){const K=(0,i.getSubschema)(this.it,k);(0,i.extendSubschemaData)(K,this.it,k),(0,i.extendSubschemaMode)(K,k);const Q={...this.it,...K,items:void 0,props:void 0};return C(Q,R),Q}mergeEvaluated(k,R){const{it:K,gen:Q}=this;K.opts.unevaluated&&(K.props!==!0&&k.props!==void 0&&(K.props=d.mergeEvaluated.props(Q,k.props,K.props,R)),K.items!==!0&&k.items!==void 0&&(K.items=d.mergeEvaluated.items(Q,k.items,K.items,R)))}mergeValidEvaluated(k,R){const{it:K,gen:Q}=this;if(K.opts.unevaluated&&(K.props!==!0||K.items!==!0))return Q.if(R,()=>this.mergeEvaluated(k,o.Name)),!0}}It.KeywordCxt=$;function M(D,k,R,K){const Q=new $(D,R,k);"code"in R?R.code(Q,K):Q.$data&&R.validate?(0,a.funcKeywordCode)(Q,R):"macro"in R?(0,a.macroKeywordCode)(Q,R):(R.compile||R.validate)&&(0,a.funcKeywordCode)(Q,R)}const L=/^\/(?:[^~]|~0|~1)*$/,U=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function H(D,{dataLevel:k,dataNames:R,dataPathArr:K}){let Q,ie;if(D==="")return l.default.rootData;if(D[0]==="/"){if(!L.test(D))throw new Error(`Invalid JSON-pointer: ${D}`);Q=D,ie=l.default.rootData}else{const Ge=U.exec(D);if(!Ge)throw new Error(`Invalid JSON-pointer: ${D}`);const Be=+Ge[1];if(Q=Ge[2],Q==="#"){if(Be>=k)throw new Error(Ke("property/index",Be));return K[k-Be]}if(Be>k)throw new Error(Ke("data",Be));if(ie=R[k-Be],!Q)return ie}let Fe=ie;const He=Q.split("/");for(const Ge of He)Ge&&(ie=(0,o._)`${ie}${(0,o.getProperty)((0,d.unescapeJsonPointer)(Ge))}`,Fe=(0,o._)`${Fe} && ${ie}`);return Fe;function Ke(Ge,Be){return`Cannot access ${Ge} ${Be} levels up, current level is ${k}`}}return It.getData=H,It}var kr={};Object.defineProperty(kr,"__esModule",{value:!0});class yu extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}kr.default=yu;var wr={};Object.defineProperty(wr,"__esModule",{value:!0});const mn=qe;class vu extends Error{constructor(e,t,s,n){super(n||`can't resolve reference ${s} from id ${t}`),this.missingRef=(0,mn.resolveUrl)(e,t,s),this.missingSchema=(0,mn.normalizeId)((0,mn.getFullPath)(e,this.missingRef))}}wr.default=vu;var et={};Object.defineProperty(et,"__esModule",{value:!0}),et.resolveSchema=et.getCompilingSchema=et.resolveRef=et.compileSchema=et.SchemaEnv=void 0;const mt=de,_u=kr,Wt=bt,gt=qe,to=Z,bu=rs();class ss{constructor(e){var t;this.refs={},this.dynamicAnchors={};let s;typeof e.schema=="object"&&(s=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,gt.normalizeId)(s==null?void 0:s[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=s==null?void 0:s.$async,this.refs={}}}et.SchemaEnv=ss;function gn(r){const e=ro.call(this,r);if(e)return e;const t=(0,gt.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:a}=this.opts,i=new mt.CodeGen(this.scope,{es5:s,lines:n,ownProperties:a});let o;r.$async&&(o=i.scopeValue("Error",{ref:_u.default,code:(0,mt._)`require("ajv/dist/runtime/validation_error").default`}));const l=i.scopeName("validate");r.validateName=l;const c={gen:i,allErrors:this.opts.allErrors,data:Wt.default.data,parentData:Wt.default.parentData,parentDataProperty:Wt.default.parentDataProperty,dataNames:[Wt.default.data],dataPathArr:[mt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,mt.stringify)(r.schema)}:{ref:r.schema}),validateName:l,ValidationError:o,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:mt.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,mt._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(r),(0,bu.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);const f=i.toString();d=`${i.scopeRefs(Wt.default.scope)}return ${f}`,this.opts.code.process&&(d=this.opts.code.process(d,r));const y=new Function(`${Wt.default.self}`,`${Wt.default.scope}`,d)(this,this.scope.get());if(this.scope.value(l,{ref:y}),y.errors=null,y.schema=r.schema,y.schemaEnv=r,r.$async&&(y.$async=!0),this.opts.code.source===!0&&(y.source={validateName:l,validateCode:f,scopeValues:i._values}),this.opts.unevaluated){const{props:S,items:E}=c;y.evaluated={props:S instanceof mt.Name?void 0:S,items:E instanceof mt.Name?void 0:E,dynamicProps:S instanceof mt.Name,dynamicItems:E instanceof mt.Name},y.source&&(y.source.evaluated=(0,mt.stringify)(y.evaluated))}return r.validate=y,r}catch(f){throw delete r.validate,delete r.validateName,d&&this.logger.error("Error compiling schema, function code:",d),f}finally{this._compilations.delete(r)}}et.compileSchema=gn;function $u(r,e,t){var s;t=(0,gt.resolveUrl)(this.opts.uriResolver,e,t);const n=r.refs[t];if(n)return n;let a=ku.call(this,r,t);if(a===void 0){const i=(s=r.localRefs)===null||s===void 0?void 0:s[t],{schemaId:o}=this.opts;i&&(a=new ss({schema:i,schemaId:o,root:r,baseId:e}))}if(a!==void 0)return r.refs[t]=Su.call(this,a)}et.resolveRef=$u;function Su(r){return(0,gt.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:gn.call(this,r)}function ro(r){for(const e of this._compilations)if(Eu(e,r))return e}et.getCompilingSchema=ro;function Eu(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function ku(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||ns.call(this,r,e)}function ns(r,e){const t=this.opts.uriResolver.parse(e),s=(0,gt._getFullPath)(this.opts.uriResolver,t);let n=(0,gt.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&s===n)return yn.call(this,t,r);const a=(0,gt.normalizeId)(s),i=this.refs[a]||this.schemas[a];if(typeof i=="string"){const o=ns.call(this,r,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:yn.call(this,t,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||gn.call(this,i),a===(0,gt.normalizeId)(e)){const{schema:o}=i,{schemaId:l}=this.opts,c=o[l];return c&&(n=(0,gt.resolveUrl)(this.opts.uriResolver,n,c)),new ss({schema:o,schemaId:l,root:r,baseId:n})}return yn.call(this,t,i)}}et.resolveSchema=ns;const wu=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function yn(r,{baseId:e,schema:t,root:s}){var n;if(((n=r.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(const o of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;const l=t[(0,to.unescapeFragment)(o)];if(l===void 0)return;t=l;const c=typeof t=="object"&&t[this.opts.schemaId];!wu.has(o)&&c&&(e=(0,gt.resolveUrl)(this.opts.uriResolver,e,c))}let a;if(typeof t!="boolean"&&t.$ref&&!(0,to.schemaHasRulesButRef)(t,this.RULES)){const o=(0,gt.resolveUrl)(this.opts.uriResolver,e,t.$ref);a=ns.call(this,s,o)}const{schemaId:i}=this.opts;if(a=a||new ss({schema:t,schemaId:i,root:s,baseId:e}),a.schema!==a.root.schema)return a}const Cu={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var vn={},_n={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(r,e){(function(t,s){s(e)})(Uo,function(t){function s(){for(var A=arguments.length,m=Array(A),N=0;N<A;N++)m[N]=arguments[N];if(m.length>1){m[0]=m[0].slice(0,-1);for(var B=m.length-1,V=1;V<B;++V)m[V]=m[V].slice(1,-1);return m[B]=m[B].slice(1),m.join("")}else return m[0]}function n(A){return"(?:"+A+")"}function a(A){return A===void 0?"undefined":A===null?"null":Object.prototype.toString.call(A).split(" ").pop().split("]").shift().toLowerCase()}function i(A){return A.toUpperCase()}function o(A){return A!=null?A instanceof Array?A:typeof A.length!="number"||A.split||A.setInterval||A.call?[A]:Array.prototype.slice.call(A):[]}function l(A,m){var N=A;if(m)for(var B in m)N[B]=m[B];return N}function c(A){var m="[A-Za-z]",N="[0-9]",B=s(N,"[A-Fa-f]"),V=n(n("%[EFef]"+B+"%"+B+B+"%"+B+B)+"|"+n("%[89A-Fa-f]"+B+"%"+B+B)+"|"+n("%"+B+B)),re="[\\:\\/\\?\\#\\[\\]\\@]",ne="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",me=s(re,ne),we=A?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Me=A?"[\\uE000-\\uF8FF]":"[]",pe=s(m,N,"[\\-\\.\\_\\~]",we);n(m+s(m,N,"[\\+\\-\\.]")+"*"),n(n(V+"|"+s(pe,ne,"[\\:]"))+"*");var Ee=n(n("25[0-5]")+"|"+n("2[0-4]"+N)+"|"+n("1"+N+N)+"|"+n("0?[1-9]"+N)+"|0?0?"+N),je=n(Ee+"\\."+Ee+"\\."+Ee+"\\."+Ee),le=n(B+"{1,4}"),Ce=n(n(le+"\\:"+le)+"|"+je),xe=n(n(le+"\\:")+"{6}"+Ce),Te=n("\\:\\:"+n(le+"\\:")+"{5}"+Ce),Bt=n(n(le)+"?\\:\\:"+n(le+"\\:")+"{4}"+Ce),St=n(n(n(le+"\\:")+"{0,1}"+le)+"?\\:\\:"+n(le+"\\:")+"{3}"+Ce),Et=n(n(n(le+"\\:")+"{0,2}"+le)+"?\\:\\:"+n(le+"\\:")+"{2}"+Ce),hr=n(n(n(le+"\\:")+"{0,3}"+le)+"?\\:\\:"+le+"\\:"+Ce),er=n(n(n(le+"\\:")+"{0,4}"+le)+"?\\:\\:"+Ce),ut=n(n(n(le+"\\:")+"{0,5}"+le)+"?\\:\\:"+le),kt=n(n(n(le+"\\:")+"{0,6}"+le)+"?\\:\\:"),tr=n([xe,Te,Bt,St,Et,hr,er,ut,kt].join("|")),Ft=n(n(pe+"|"+V)+"+");n("[vV]"+B+"+\\."+s(pe,ne,"[\\:]")+"+"),n(n(V+"|"+s(pe,ne))+"*");var jr=n(V+"|"+s(pe,ne,"[\\:\\@]"));return n(n(V+"|"+s(pe,ne,"[\\@]"))+"+"),n(n(jr+"|"+s("[\\/\\?]",Me))+"*"),{NOT_SCHEME:new RegExp(s("[^]",m,N,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(s("[^\\%\\:]",pe,ne),"g"),NOT_HOST:new RegExp(s("[^\\%\\[\\]\\:]",pe,ne),"g"),NOT_PATH:new RegExp(s("[^\\%\\/\\:\\@]",pe,ne),"g"),NOT_PATH_NOSCHEME:new RegExp(s("[^\\%\\/\\@]",pe,ne),"g"),NOT_QUERY:new RegExp(s("[^\\%]",pe,ne,"[\\:\\@\\/\\?]",Me),"g"),NOT_FRAGMENT:new RegExp(s("[^\\%]",pe,ne,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(s("[^]",pe,ne),"g"),UNRESERVED:new RegExp(pe,"g"),OTHER_CHARS:new RegExp(s("[^\\%]",pe,me),"g"),PCT_ENCODED:new RegExp(V,"g"),IPV4ADDRESS:new RegExp("^("+je+")$"),IPV6ADDRESS:new RegExp("^\\[?("+tr+")"+n(n("\\%25|\\%(?!"+B+"{2})")+"("+Ft+")")+"?\\]?$")}}var d=c(!1),f=c(!0),w=function(){function A(m,N){var B=[],V=!0,re=!1,ne=void 0;try{for(var me=m[Symbol.iterator](),we;!(V=(we=me.next()).done)&&(B.push(we.value),!(N&&B.length===N));V=!0);}catch(Me){re=!0,ne=Me}finally{try{!V&&me.return&&me.return()}finally{if(re)throw ne}}return B}return function(m,N){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return A(m,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function(A){if(Array.isArray(A)){for(var m=0,N=Array(A.length);m<A.length;m++)N[m]=A[m];return N}else return Array.from(A)},S=2147483647,E=36,b=1,g=26,T=38,C=700,O=72,_=128,q="-",z=/^xn--/,J=/[^\0-\x7E]/,W=/[\x2E\u3002\uFF0E\uFF61]/g,ae={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},G=E-b,Y=Math.floor,ee=String.fromCharCode;function X(A){throw new RangeError(ae[A])}function fe(A,m){for(var N=[],B=A.length;B--;)N[B]=m(A[B]);return N}function he(A,m){var N=A.split("@"),B="";N.length>1&&(B=N[0]+"@",A=N[1]),A=A.replace(W,".");var V=A.split("."),re=fe(V,m).join(".");return B+re}function ge(A){for(var m=[],N=0,B=A.length;N<B;){var V=A.charCodeAt(N++);if(V>=55296&&V<=56319&&N<B){var re=A.charCodeAt(N++);(re&64512)==56320?m.push(((V&1023)<<10)+(re&1023)+65536):(m.push(V),N--)}else m.push(V)}return m}var De=function(m){return String.fromCodePoint.apply(String,y(m))},Ne=function(m){return m-48<10?m-22:m-65<26?m-65:m-97<26?m-97:E},F=function(m,N){return m+22+75*(m<26)-((N!=0)<<5)},v=function(m,N,B){var V=0;for(m=B?Y(m/C):m>>1,m+=Y(m/N);m>G*g>>1;V+=E)m=Y(m/G);return Y(V+(G+1)*m/(m+T))},x=function(m){var N=[],B=m.length,V=0,re=_,ne=O,me=m.lastIndexOf(q);me<0&&(me=0);for(var we=0;we<me;++we)m.charCodeAt(we)>=128&&X("not-basic"),N.push(m.charCodeAt(we));for(var Me=me>0?me+1:0;Me<B;){for(var pe=V,Ee=1,je=E;;je+=E){Me>=B&&X("invalid-input");var le=Ne(m.charCodeAt(Me++));(le>=E||le>Y((S-V)/Ee))&&X("overflow"),V+=le*Ee;var Ce=je<=ne?b:je>=ne+g?g:je-ne;if(le<Ce)break;var xe=E-Ce;Ee>Y(S/xe)&&X("overflow"),Ee*=xe}var Te=N.length+1;ne=v(V-pe,Te,pe==0),Y(V/Te)>S-re&&X("overflow"),re+=Y(V/Te),V%=Te,N.splice(V++,0,re)}return String.fromCodePoint.apply(String,N)},P=function(m){var N=[];m=ge(m);var B=m.length,V=_,re=0,ne=O,me=!0,we=!1,Me=void 0;try{for(var pe=m[Symbol.iterator](),Ee;!(me=(Ee=pe.next()).done);me=!0){var je=Ee.value;je<128&&N.push(ee(je))}}catch(xr){we=!0,Me=xr}finally{try{!me&&pe.return&&pe.return()}finally{if(we)throw Me}}var le=N.length,Ce=le;for(le&&N.push(q);Ce<B;){var xe=S,Te=!0,Bt=!1,St=void 0;try{for(var Et=m[Symbol.iterator](),hr;!(Te=(hr=Et.next()).done);Te=!0){var er=hr.value;er>=V&&er<xe&&(xe=er)}}catch(xr){Bt=!0,St=xr}finally{try{!Te&&Et.return&&Et.return()}finally{if(Bt)throw St}}var ut=Ce+1;xe-V>Y((S-re)/ut)&&X("overflow"),re+=(xe-V)*ut,V=xe;var kt=!0,tr=!1,Ft=void 0;try{for(var jr=m[Symbol.iterator](),Lo;!(kt=(Lo=jr.next()).done);kt=!0){var Ro=Lo.value;if(Ro<V&&++re>S&&X("overflow"),Ro==V){for(var bs=re,$s=E;;$s+=E){var Ss=$s<=ne?b:$s>=ne+g?g:$s-ne;if(bs<Ss)break;var zo=bs-Ss,qo=E-Ss;N.push(ee(F(Ss+zo%qo,0))),bs=Y(zo/qo)}N.push(ee(F(bs,0))),ne=v(re,ut,Ce==le),re=0,++Ce}}}catch(xr){tr=!0,Ft=xr}finally{try{!kt&&jr.return&&jr.return()}finally{if(tr)throw Ft}}++re,++V}return N.join("")},u=function(m){return he(m,function(N){return z.test(N)?x(N.slice(4).toLowerCase()):N})},p=function(m){return he(m,function(N){return J.test(N)?"xn--"+P(N):N})},$={version:"2.1.0",ucs2:{decode:ge,encode:De},decode:x,encode:P,toASCII:p,toUnicode:u},M={};function L(A){var m=A.charCodeAt(0),N=void 0;return m<16?N="%0"+m.toString(16).toUpperCase():m<128?N="%"+m.toString(16).toUpperCase():m<2048?N="%"+(m>>6|192).toString(16).toUpperCase()+"%"+(m&63|128).toString(16).toUpperCase():N="%"+(m>>12|224).toString(16).toUpperCase()+"%"+(m>>6&63|128).toString(16).toUpperCase()+"%"+(m&63|128).toString(16).toUpperCase(),N}function U(A){for(var m="",N=0,B=A.length;N<B;){var V=parseInt(A.substr(N+1,2),16);if(V<128)m+=String.fromCharCode(V),N+=3;else if(V>=194&&V<224){if(B-N>=6){var re=parseInt(A.substr(N+4,2),16);m+=String.fromCharCode((V&31)<<6|re&63)}else m+=A.substr(N,6);N+=6}else if(V>=224){if(B-N>=9){var ne=parseInt(A.substr(N+4,2),16),me=parseInt(A.substr(N+7,2),16);m+=String.fromCharCode((V&15)<<12|(ne&63)<<6|me&63)}else m+=A.substr(N,9);N+=9}else m+=A.substr(N,3),N+=3}return m}function H(A,m){function N(B){var V=U(B);return V.match(m.UNRESERVED)?V:B}return A.scheme&&(A.scheme=String(A.scheme).replace(m.PCT_ENCODED,N).toLowerCase().replace(m.NOT_SCHEME,"")),A.userinfo!==void 0&&(A.userinfo=String(A.userinfo).replace(m.PCT_ENCODED,N).replace(m.NOT_USERINFO,L).replace(m.PCT_ENCODED,i)),A.host!==void 0&&(A.host=String(A.host).replace(m.PCT_ENCODED,N).toLowerCase().replace(m.NOT_HOST,L).replace(m.PCT_ENCODED,i)),A.path!==void 0&&(A.path=String(A.path).replace(m.PCT_ENCODED,N).replace(A.scheme?m.NOT_PATH:m.NOT_PATH_NOSCHEME,L).replace(m.PCT_ENCODED,i)),A.query!==void 0&&(A.query=String(A.query).replace(m.PCT_ENCODED,N).replace(m.NOT_QUERY,L).replace(m.PCT_ENCODED,i)),A.fragment!==void 0&&(A.fragment=String(A.fragment).replace(m.PCT_ENCODED,N).replace(m.NOT_FRAGMENT,L).replace(m.PCT_ENCODED,i)),A}function D(A){return A.replace(/^0*(.*)/,"$1")||"0"}function k(A,m){var N=A.match(m.IPV4ADDRESS)||[],B=w(N,2),V=B[1];return V?V.split(".").map(D).join("."):A}function R(A,m){var N=A.match(m.IPV6ADDRESS)||[],B=w(N,3),V=B[1],re=B[2];if(V){for(var ne=V.toLowerCase().split("::").reverse(),me=w(ne,2),we=me[0],Me=me[1],pe=Me?Me.split(":").map(D):[],Ee=we.split(":").map(D),je=m.IPV4ADDRESS.test(Ee[Ee.length-1]),le=je?7:8,Ce=Ee.length-le,xe=Array(le),Te=0;Te<le;++Te)xe[Te]=pe[Te]||Ee[Ce+Te]||"";je&&(xe[le-1]=k(xe[le-1],m));var Bt=xe.reduce(function(ut,kt,tr){if(!kt||kt==="0"){var Ft=ut[ut.length-1];Ft&&Ft.index+Ft.length===tr?Ft.length++:ut.push({index:tr,length:1})}return ut},[]),St=Bt.sort(function(ut,kt){return kt.length-ut.length})[0],Et=void 0;if(St&&St.length>1){var hr=xe.slice(0,St.index),er=xe.slice(St.index+St.length);Et=hr.join(":")+"::"+er.join(":")}else Et=xe.join(":");return re&&(Et+="%"+re),Et}else return A}var K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Q="".match(/(){0}/)[1]===void 0;function ie(A){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N={},B=m.iri!==!1?f:d;m.reference==="suffix"&&(A=(m.scheme?m.scheme+":":"")+"//"+A);var V=A.match(K);if(V){Q?(N.scheme=V[1],N.userinfo=V[3],N.host=V[4],N.port=parseInt(V[5],10),N.path=V[6]||"",N.query=V[7],N.fragment=V[8],isNaN(N.port)&&(N.port=V[5])):(N.scheme=V[1]||void 0,N.userinfo=A.indexOf("@")!==-1?V[3]:void 0,N.host=A.indexOf("//")!==-1?V[4]:void 0,N.port=parseInt(V[5],10),N.path=V[6]||"",N.query=A.indexOf("?")!==-1?V[7]:void 0,N.fragment=A.indexOf("#")!==-1?V[8]:void 0,isNaN(N.port)&&(N.port=A.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?V[4]:void 0)),N.host&&(N.host=R(k(N.host,B),B)),N.scheme===void 0&&N.userinfo===void 0&&N.host===void 0&&N.port===void 0&&!N.path&&N.query===void 0?N.reference="same-document":N.scheme===void 0?N.reference="relative":N.fragment===void 0?N.reference="absolute":N.reference="uri",m.reference&&m.reference!=="suffix"&&m.reference!==N.reference&&(N.error=N.error||"URI is not a "+m.reference+" reference.");var re=M[(m.scheme||N.scheme||"").toLowerCase()];if(!m.unicodeSupport&&(!re||!re.unicodeSupport)){if(N.host&&(m.domainHost||re&&re.domainHost))try{N.host=$.toASCII(N.host.replace(B.PCT_ENCODED,U).toLowerCase())}catch(ne){N.error=N.error||"Host's domain name can not be converted to ASCII via punycode: "+ne}H(N,d)}else H(N,B);re&&re.parse&&re.parse(N,m)}else N.error=N.error||"URI can not be parsed.";return N}function Fe(A,m){var N=m.iri!==!1?f:d,B=[];return A.userinfo!==void 0&&(B.push(A.userinfo),B.push("@")),A.host!==void 0&&B.push(R(k(String(A.host),N),N).replace(N.IPV6ADDRESS,function(V,re,ne){return"["+re+(ne?"%25"+ne:"")+"]"})),(typeof A.port=="number"||typeof A.port=="string")&&(B.push(":"),B.push(String(A.port))),B.length?B.join(""):void 0}var He=/^\.\.?\//,Ke=/^\/\.(\/|$)/,Ge=/^\/\.\.(\/|$)/,Be=/^\/?(?:.|\n)*?(?=\/|$)/;function nt(A){for(var m=[];A.length;)if(A.match(He))A=A.replace(He,"");else if(A.match(Ke))A=A.replace(Ke,"/");else if(A.match(Ge))A=A.replace(Ge,"/"),m.pop();else if(A==="."||A==="..")A="";else{var N=A.match(Be);if(N){var B=N[0];A=A.slice(B.length),m.push(B)}else throw new Error("Unexpected dot segment condition")}return m.join("")}function Ie(A){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=m.iri?f:d,B=[],V=M[(m.scheme||A.scheme||"").toLowerCase()];if(V&&V.serialize&&V.serialize(A,m),A.host&&!N.IPV6ADDRESS.test(A.host)){if(m.domainHost||V&&V.domainHost)try{A.host=m.iri?$.toUnicode(A.host):$.toASCII(A.host.replace(N.PCT_ENCODED,U).toLowerCase())}catch(me){A.error=A.error||"Host's domain name can not be converted to "+(m.iri?"Unicode":"ASCII")+" via punycode: "+me}}H(A,N),m.reference!=="suffix"&&A.scheme&&(B.push(A.scheme),B.push(":"));var re=Fe(A,m);if(re!==void 0&&(m.reference!=="suffix"&&B.push("//"),B.push(re),A.path&&A.path.charAt(0)!=="/"&&B.push("/")),A.path!==void 0){var ne=A.path;!m.absolutePath&&(!V||!V.absolutePath)&&(ne=nt(ne)),re===void 0&&(ne=ne.replace(/^\/\//,"/%2F")),B.push(ne)}return A.query!==void 0&&(B.push("?"),B.push(A.query)),A.fragment!==void 0&&(B.push("#"),B.push(A.fragment)),B.join("")}function fr(A,m){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},B=arguments[3],V={};return B||(A=ie(Ie(A,N),N),m=ie(Ie(m,N),N)),N=N||{},!N.tolerant&&m.scheme?(V.scheme=m.scheme,V.userinfo=m.userinfo,V.host=m.host,V.port=m.port,V.path=nt(m.path||""),V.query=m.query):(m.userinfo!==void 0||m.host!==void 0||m.port!==void 0?(V.userinfo=m.userinfo,V.host=m.host,V.port=m.port,V.path=nt(m.path||""),V.query=m.query):(m.path?(m.path.charAt(0)==="/"?V.path=nt(m.path):((A.userinfo!==void 0||A.host!==void 0||A.port!==void 0)&&!A.path?V.path="/"+m.path:A.path?V.path=A.path.slice(0,A.path.lastIndexOf("/")+1)+m.path:V.path=m.path,V.path=nt(V.path)),V.query=m.query):(V.path=A.path,m.query!==void 0?V.query=m.query:V.query=A.query),V.userinfo=A.userinfo,V.host=A.host,V.port=A.port),V.scheme=A.scheme),V.fragment=m.fragment,V}function Pr(A,m,N){var B=l({scheme:"null"},N);return Ie(fr(ie(A,B),ie(m,B),B,!0),B)}function Zt(A,m){return typeof A=="string"?A=Ie(ie(A,m),m):a(A)==="object"&&(A=ie(Ie(A,m),m)),A}function Fr(A,m,N){return typeof A=="string"?A=Ie(ie(A,N),N):a(A)==="object"&&(A=Ie(A,N)),typeof m=="string"?m=Ie(ie(m,N),N):a(m)==="object"&&(m=Ie(m,N)),A===m}function _s(A,m){return A&&A.toString().replace(!m||!m.iri?d.ESCAPE:f.ESCAPE,L)}function lt(A,m){return A&&A.toString().replace(!m||!m.iri?d.PCT_ENCODED:f.PCT_ENCODED,U)}var Qt={scheme:"http",domainHost:!0,parse:function(m,N){return m.host||(m.error=m.error||"HTTP URIs must have a host."),m},serialize:function(m,N){var B=String(m.scheme).toLowerCase()==="https";return(m.port===(B?443:80)||m.port==="")&&(m.port=void 0),m.path||(m.path="/"),m}},No={scheme:"https",domainHost:Qt.domainHost,parse:Qt.parse,serialize:Qt.serialize};function Po(A){return typeof A.secure=="boolean"?A.secure:String(A.scheme).toLowerCase()==="wss"}var Mr={scheme:"ws",domainHost:!0,parse:function(m,N){var B=m;return B.secure=Po(B),B.resourceName=(B.path||"/")+(B.query?"?"+B.query:""),B.path=void 0,B.query=void 0,B},serialize:function(m,N){if((m.port===(Po(m)?443:80)||m.port==="")&&(m.port=void 0),typeof m.secure=="boolean"&&(m.scheme=m.secure?"wss":"ws",m.secure=void 0),m.resourceName){var B=m.resourceName.split("?"),V=w(B,2),re=V[0],ne=V[1];m.path=re&&re!=="/"?re:void 0,m.query=ne,m.resourceName=void 0}return m.fragment=void 0,m}},Fo={scheme:"wss",domainHost:Mr.domainHost,parse:Mr.parse,serialize:Mr.serialize},Ed={},Mo="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",$t="[0-9A-Fa-f]",kd=n(n("%[EFef]"+$t+"%"+$t+$t+"%"+$t+$t)+"|"+n("%[89A-Fa-f]"+$t+"%"+$t+$t)+"|"+n("%"+$t+$t)),wd="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Cd="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Td=s(Cd,'[\\"\\\\]'),Od="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ad=new RegExp(Mo,"g"),pr=new RegExp(kd,"g"),Dd=new RegExp(s("[^]",wd,"[\\.]",'[\\"]',Td),"g"),jo=new RegExp(s("[^]",Mo,Od),"g"),Id=jo;function sa(A){var m=U(A);return m.match(Ad)?m:A}var xo={scheme:"mailto",parse:function(m,N){var B=m,V=B.to=B.path?B.path.split(","):[];if(B.path=void 0,B.query){for(var re=!1,ne={},me=B.query.split("&"),we=0,Me=me.length;we<Me;++we){var pe=me[we].split("=");switch(pe[0]){case"to":for(var Ee=pe[1].split(","),je=0,le=Ee.length;je<le;++je)V.push(Ee[je]);break;case"subject":B.subject=lt(pe[1],N);break;case"body":B.body=lt(pe[1],N);break;default:re=!0,ne[lt(pe[0],N)]=lt(pe[1],N);break}}re&&(B.headers=ne)}B.query=void 0;for(var Ce=0,xe=V.length;Ce<xe;++Ce){var Te=V[Ce].split("@");if(Te[0]=lt(Te[0]),N.unicodeSupport)Te[1]=lt(Te[1],N).toLowerCase();else try{Te[1]=$.toASCII(lt(Te[1],N).toLowerCase())}catch(Bt){B.error=B.error||"Email address's domain name can not be converted to ASCII via punycode: "+Bt}V[Ce]=Te.join("@")}return B},serialize:function(m,N){var B=m,V=o(m.to);if(V){for(var re=0,ne=V.length;re<ne;++re){var me=String(V[re]),we=me.lastIndexOf("@"),Me=me.slice(0,we).replace(pr,sa).replace(pr,i).replace(Dd,L),pe=me.slice(we+1);try{pe=N.iri?$.toUnicode(pe):$.toASCII(lt(pe,N).toLowerCase())}catch(Ce){B.error=B.error||"Email address's domain name can not be converted to "+(N.iri?"Unicode":"ASCII")+" via punycode: "+Ce}V[re]=Me+"@"+pe}B.path=V.join(",")}var Ee=m.headers=m.headers||{};m.subject&&(Ee.subject=m.subject),m.body&&(Ee.body=m.body);var je=[];for(var le in Ee)Ee[le]!==Ed[le]&&je.push(le.replace(pr,sa).replace(pr,i).replace(jo,L)+"="+Ee[le].replace(pr,sa).replace(pr,i).replace(Id,L));return je.length&&(B.query=je.join("&")),B}},Nd=/^([^\:]+)\:(.*)/,Vo={scheme:"urn",parse:function(m,N){var B=m.path&&m.path.match(Nd),V=m;if(B){var re=N.scheme||V.scheme||"urn",ne=B[1].toLowerCase(),me=B[2],we=re+":"+(N.nid||ne),Me=M[we];V.nid=ne,V.nss=me,V.path=void 0,Me&&(V=Me.parse(V,N))}else V.error=V.error||"URN can not be parsed.";return V},serialize:function(m,N){var B=N.scheme||m.scheme||"urn",V=m.nid,re=B+":"+(N.nid||V),ne=M[re];ne&&(m=ne.serialize(m,N));var me=m,we=m.nss;return me.path=(V||N.nid)+":"+we,me}},Pd=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Bo={scheme:"urn:uuid",parse:function(m,N){var B=m;return B.uuid=B.nss,B.nss=void 0,!N.tolerant&&(!B.uuid||!B.uuid.match(Pd))&&(B.error=B.error||"UUID is not valid."),B},serialize:function(m,N){var B=m;return B.nss=(m.uuid||"").toLowerCase(),B}};M[Qt.scheme]=Qt,M[No.scheme]=No,M[Mr.scheme]=Mr,M[Fo.scheme]=Fo,M[xo.scheme]=xo,M[Vo.scheme]=Vo,M[Bo.scheme]=Bo,t.SCHEMES=M,t.pctEncChar=L,t.pctDecChars=U,t.parse=ie,t.removeDotSegments=nt,t.serialize=Ie,t.resolveComponents=fr,t.resolve=Pr,t.normalize=Zt,t.equal=Fr,t.escapeComponent=_s,t.unescapeComponent=lt,Object.defineProperty(t,"__esModule",{value:!0})})})(_n,_n.exports);var Tu=_n.exports;Object.defineProperty(vn,"__esModule",{value:!0});const so=Tu;so.code='require("ajv/dist/runtime/uri").default',vn.default=so,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;var e=rs();Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var t=de;Object.defineProperty(r,"_",{enumerable:!0,get:function(){return t._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return t.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return t.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return t.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return t.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return t.CodeGen}});const s=kr,n=wr,a=Gt,i=et,o=de,l=qe,c=Ve,d=Z,f=Cu,w=vn,y=(F,v)=>new RegExp(F,v);y.code="new RegExp";const S=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},T=200;function C(F){var v,x,P,u,p,$,M,L,U,H,D,k,R,K,Q,ie,Fe,He,Ke,Ge,Be,nt,Ie,fr,Pr;const Zt=F.strict,Fr=(v=F.code)===null||v===void 0?void 0:v.optimize,_s=Fr===!0||Fr===void 0?1:Fr||0,lt=(P=(x=F.code)===null||x===void 0?void 0:x.regExp)!==null&&P!==void 0?P:y,Qt=(u=F.uriResolver)!==null&&u!==void 0?u:w.default;return{strictSchema:($=(p=F.strictSchema)!==null&&p!==void 0?p:Zt)!==null&&$!==void 0?$:!0,strictNumbers:(L=(M=F.strictNumbers)!==null&&M!==void 0?M:Zt)!==null&&L!==void 0?L:!0,strictTypes:(H=(U=F.strictTypes)!==null&&U!==void 0?U:Zt)!==null&&H!==void 0?H:"log",strictTuples:(k=(D=F.strictTuples)!==null&&D!==void 0?D:Zt)!==null&&k!==void 0?k:"log",strictRequired:(K=(R=F.strictRequired)!==null&&R!==void 0?R:Zt)!==null&&K!==void 0?K:!1,code:F.code?{...F.code,optimize:_s,regExp:lt}:{optimize:_s,regExp:lt},loopRequired:(Q=F.loopRequired)!==null&&Q!==void 0?Q:T,loopEnum:(ie=F.loopEnum)!==null&&ie!==void 0?ie:T,meta:(Fe=F.meta)!==null&&Fe!==void 0?Fe:!0,messages:(He=F.messages)!==null&&He!==void 0?He:!0,inlineRefs:(Ke=F.inlineRefs)!==null&&Ke!==void 0?Ke:!0,schemaId:(Ge=F.schemaId)!==null&&Ge!==void 0?Ge:"$id",addUsedSchema:(Be=F.addUsedSchema)!==null&&Be!==void 0?Be:!0,validateSchema:(nt=F.validateSchema)!==null&&nt!==void 0?nt:!0,validateFormats:(Ie=F.validateFormats)!==null&&Ie!==void 0?Ie:!0,unicodeRegExp:(fr=F.unicodeRegExp)!==null&&fr!==void 0?fr:!0,int32range:(Pr=F.int32range)!==null&&Pr!==void 0?Pr:!0,uriResolver:Qt}}class O{constructor(v={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,v=this.opts={...v,...C(v)};const{es5:x,lines:P}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:E,es5:x,lines:P}),this.logger=Y(v.logger);const u=v.validateFormats;v.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,b,v,"NOT SUPPORTED"),_.call(this,g,v,"DEPRECATED","warn"),this._metaOpts=ae.call(this),v.formats&&J.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),v.keywords&&W.call(this,v.keywords),typeof v.meta=="object"&&this.addMetaSchema(v.meta),z.call(this),v.validateFormats=u}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:v,meta:x,schemaId:P}=this.opts;let u=f;P==="id"&&(u={...f},u.id=u.$id,delete u.$id),x&&v&&this.addMetaSchema(u,u[P],!1)}defaultMeta(){const{meta:v,schemaId:x}=this.opts;return this.opts.defaultMeta=typeof v=="object"?v[x]||v:void 0}validate(v,x){let P;if(typeof v=="string"){if(P=this.getSchema(v),!P)throw new Error(`no schema with key or ref "${v}"`)}else P=this.compile(v);const u=P(x);return"$async"in P||(this.errors=P.errors),u}compile(v,x){const P=this._addSchema(v,x);return P.validate||this._compileSchemaEnv(P)}compileAsync(v,x){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return u.call(this,v,x);async function u(H,D){await p.call(this,H.$schema);const k=this._addSchema(H,D);return k.validate||$.call(this,k)}async function p(H){H&&!this.getSchema(H)&&await u.call(this,{$ref:H},!0)}async function $(H){try{return this._compileSchemaEnv(H)}catch(D){if(!(D instanceof n.default))throw D;return M.call(this,D),await L.call(this,D.missingSchema),$.call(this,H)}}function M({missingSchema:H,missingRef:D}){if(this.refs[H])throw new Error(`AnySchema ${H} is loaded but ${D} cannot be resolved`)}async function L(H){const D=await U.call(this,H);this.refs[H]||await p.call(this,D.$schema),this.refs[H]||this.addSchema(D,H,x)}async function U(H){const D=this._loading[H];if(D)return D;try{return await(this._loading[H]=P(H))}finally{delete this._loading[H]}}}addSchema(v,x,P,u=this.opts.validateSchema){if(Array.isArray(v)){for(const $ of v)this.addSchema($,void 0,P,u);return this}let p;if(typeof v=="object"){const{schemaId:$}=this.opts;if(p=v[$],p!==void 0&&typeof p!="string")throw new Error(`schema ${$} must be string`)}return x=(0,l.normalizeId)(x||p),this._checkUnique(x),this.schemas[x]=this._addSchema(v,P,x,u,!0),this}addMetaSchema(v,x,P=this.opts.validateSchema){return this.addSchema(v,x,!0,P),this}validateSchema(v,x){if(typeof v=="boolean")return!0;let P;if(P=v.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const u=this.validate(P,v);if(!u&&x){const p="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(p);else throw new Error(p)}return u}getSchema(v){let x;for(;typeof(x=q.call(this,v))=="string";)v=x;if(x===void 0){const{schemaId:P}=this.opts,u=new i.SchemaEnv({schema:{},schemaId:P});if(x=i.resolveSchema.call(this,u,v),!x)return;this.refs[v]=x}return x.validate||this._compileSchemaEnv(x)}removeSchema(v){if(v instanceof RegExp)return this._removeAllSchemas(this.schemas,v),this._removeAllSchemas(this.refs,v),this;switch(typeof v){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const x=q.call(this,v);return typeof x=="object"&&this._cache.delete(x.schema),delete this.schemas[v],delete this.refs[v],this}case"object":{const x=v;this._cache.delete(x);let P=v[this.opts.schemaId];return P&&(P=(0,l.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(v){for(const x of v)this.addKeyword(x);return this}addKeyword(v,x){let P;if(typeof v=="string")P=v,typeof x=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),x.keyword=P);else if(typeof v=="object"&&x===void 0){if(x=v,P=x.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(X.call(this,P,x),!x)return(0,d.eachItem)(P,p=>fe.call(this,p)),this;ge.call(this,x);const u={...x,type:(0,c.getJSONTypes)(x.type),schemaType:(0,c.getJSONTypes)(x.schemaType)};return(0,d.eachItem)(P,u.type.length===0?p=>fe.call(this,p,u):p=>u.type.forEach($=>fe.call(this,p,u,$))),this}getKeyword(v){const x=this.RULES.all[v];return typeof x=="object"?x.definition:!!x}removeKeyword(v){const{RULES:x}=this;delete x.keywords[v],delete x.all[v];for(const P of x.rules){const u=P.rules.findIndex(p=>p.keyword===v);u>=0&&P.rules.splice(u,1)}return this}addFormat(v,x){return typeof x=="string"&&(x=new RegExp(x)),this.formats[v]=x,this}errorsText(v=this.errors,{separator:x=", ",dataVar:P="data"}={}){return!v||v.length===0?"No errors":v.map(u=>`${P}${u.instancePath} ${u.message}`).reduce((u,p)=>u+x+p)}$dataMetaSchema(v,x){const P=this.RULES.all;v=JSON.parse(JSON.stringify(v));for(const u of x){const p=u.split("/").slice(1);let $=v;for(const M of p)$=$[M];for(const M in P){const L=P[M];if(typeof L!="object")continue;const{$data:U}=L.definition,H=$[M];U&&H&&($[M]=Ne(H))}}return v}_removeAllSchemas(v,x){for(const P in v){const u=v[P];(!x||x.test(P))&&(typeof u=="string"?delete v[P]:u&&!u.meta&&(this._cache.delete(u.schema),delete v[P]))}}_addSchema(v,x,P,u=this.opts.validateSchema,p=this.opts.addUsedSchema){let $;const{schemaId:M}=this.opts;if(typeof v=="object")$=v[M];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof v!="boolean")throw new Error("schema must be object or boolean")}let L=this._cache.get(v);if(L!==void 0)return L;P=(0,l.normalizeId)($||P);const U=l.getSchemaRefs.call(this,v,P);return L=new i.SchemaEnv({schema:v,schemaId:M,meta:x,baseId:P,localRefs:U}),this._cache.set(L.schema,L),p&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=L),u&&this.validateSchema(v,!0),L}_checkUnique(v){if(this.schemas[v]||this.refs[v])throw new Error(`schema with key or id "${v}" already exists`)}_compileSchemaEnv(v){if(v.meta?this._compileMetaSchema(v):i.compileSchema.call(this,v),!v.validate)throw new Error("ajv implementation error");return v.validate}_compileMetaSchema(v){const x=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,v)}finally{this.opts=x}}}O.ValidationError=s.default,O.MissingRefError=n.default,r.default=O;function _(F,v,x,P="error"){for(const u in F){const p=u;p in v&&this.logger[P](`${x}: option ${u}. ${F[p]}`)}}function q(F){return F=(0,l.normalizeId)(F),this.schemas[F]||this.refs[F]}function z(){const F=this.opts.schemas;if(F)if(Array.isArray(F))this.addSchema(F);else for(const v in F)this.addSchema(F[v],v)}function J(){for(const F in this.opts.formats){const v=this.opts.formats[F];v&&this.addFormat(F,v)}}function W(F){if(Array.isArray(F)){this.addVocabulary(F);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const v in F){const x=F[v];x.keyword||(x.keyword=v),this.addKeyword(x)}}function ae(){const F={...this.opts};for(const v of S)delete F[v];return F}const G={log(){},warn(){},error(){}};function Y(F){if(F===!1)return G;if(F===void 0)return console;if(F.log&&F.warn&&F.error)return F;throw new Error("logger must implement log, warn and error methods")}const ee=/^[a-z_$][a-z0-9_$:-]*$/i;function X(F,v){const{RULES:x}=this;if((0,d.eachItem)(F,P=>{if(x.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!ee.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!v&&v.$data&&!("code"in v||"validate"in v))throw new Error('$data keyword must have "code" or "validate" function')}function fe(F,v,x){var P;const u=v==null?void 0:v.post;if(x&&u)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:p}=this;let $=u?p.post:p.rules.find(({type:L})=>L===x);if($||($={type:x,rules:[]},p.rules.push($)),p.keywords[F]=!0,!v)return;const M={keyword:F,definition:{...v,type:(0,c.getJSONTypes)(v.type),schemaType:(0,c.getJSONTypes)(v.schemaType)}};v.before?he.call(this,$,M,v.before):$.rules.push(M),p.all[F]=M,(P=v.implements)===null||P===void 0||P.forEach(L=>this.addKeyword(L))}function he(F,v,x){const P=F.rules.findIndex(u=>u.keyword===x);P>=0?F.rules.splice(P,0,v):(F.rules.push(v),this.logger.warn(`rule ${x} is not defined`))}function ge(F){let{metaSchema:v}=F;v!==void 0&&(F.$data&&this.opts.$data&&(v=Ne(v)),F.validateSchema=this.compile(v,!0))}const De={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ne(F){return{anyOf:[F,De]}}}(Ii);var bn={},$n={},Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});const Ou={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Sn.default=Ou;var Yt={};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.callRef=Yt.getValidate=void 0;const Au=wr,no=ht(),tt=de,or=bt,ao=et,as=Z,Du={keyword:"$ref",schemaType:"string",code(r){const{gen:e,schema:t,it:s}=r,{baseId:n,schemaEnv:a,validateName:i,opts:o,self:l}=s,{root:c}=a;if((t==="#"||t==="#/")&&n===c.baseId)return f();const d=ao.resolveRef.call(l,c,n,t);if(d===void 0)throw new Au.default(s.opts.uriResolver,n,t);if(d instanceof ao.SchemaEnv)return w(d);return y(d);function f(){if(a===c)return is(r,i,a,a.$async);const S=e.scopeValue("root",{ref:c});return is(r,(0,tt._)`${S}.validate`,c,c.$async)}function w(S){const E=io(r,S);is(r,E,S,S.$async)}function y(S){const E=e.scopeValue("schema",o.code.source===!0?{ref:S,code:(0,tt.stringify)(S)}:{ref:S}),b=e.name("valid"),g=r.subschema({schema:S,dataTypes:[],schemaPath:tt.nil,topSchemaRef:E,errSchemaPath:t},b);r.mergeEvaluated(g),r.ok(b)}}};function io(r,e){const{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,tt._)`${t.scopeValue("wrapper",{ref:e})}.validate`}Yt.getValidate=io;function is(r,e,t,s){const{gen:n,it:a}=r,{allErrors:i,schemaEnv:o,opts:l}=a,c=l.passContext?or.default.this:tt.nil;s?d():f();function d(){if(!o.$async)throw new Error("async schema referenced by sync schema");const S=n.let("valid");n.try(()=>{n.code((0,tt._)`await ${(0,no.callValidateCode)(r,e,c)}`),y(e),i||n.assign(S,!0)},E=>{n.if((0,tt._)`!(${E} instanceof ${a.ValidationError})`,()=>n.throw(E)),w(E),i||n.assign(S,!1)}),r.ok(S)}function f(){r.result((0,no.callValidateCode)(r,e,c),()=>y(e),()=>w(e))}function w(S){const E=(0,tt._)`${S}.errors`;n.assign(or.default.vErrors,(0,tt._)`${or.default.vErrors} === null ? ${E} : ${or.default.vErrors}.concat(${E})`),n.assign(or.default.errors,(0,tt._)`${or.default.vErrors}.length`)}function y(S){var E;if(!a.opts.unevaluated)return;const b=(E=t==null?void 0:t.validate)===null||E===void 0?void 0:E.evaluated;if(a.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(a.props=as.mergeEvaluated.props(n,b.props,a.props));else{const g=n.var("props",(0,tt._)`${S}.evaluated.props`);a.props=as.mergeEvaluated.props(n,g,a.props,tt.Name)}if(a.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(a.items=as.mergeEvaluated.items(n,b.items,a.items));else{const g=n.var("items",(0,tt._)`${S}.evaluated.items`);a.items=as.mergeEvaluated.items(n,g,a.items,tt.Name)}}}Yt.callRef=is,Yt.default=Du,Object.defineProperty($n,"__esModule",{value:!0});const Iu=Sn,Nu=Yt,Pu=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Iu.default,Nu.default];$n.default=Pu;var En={},kn={};Object.defineProperty(kn,"__esModule",{value:!0});const os=de,Vt=os.operators,ls={maximum:{okStr:"<=",ok:Vt.LTE,fail:Vt.GT},minimum:{okStr:">=",ok:Vt.GTE,fail:Vt.LT},exclusiveMaximum:{okStr:"<",ok:Vt.LT,fail:Vt.GTE},exclusiveMinimum:{okStr:">",ok:Vt.GT,fail:Vt.LTE}},Fu={message:({keyword:r,schemaCode:e})=>(0,os.str)`must be ${ls[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,os._)`{comparison: ${ls[r].okStr}, limit: ${e}}`},Mu={keyword:Object.keys(ls),type:"number",schemaType:"number",$data:!0,error:Fu,code(r){const{keyword:e,data:t,schemaCode:s}=r;r.fail$data((0,os._)`${t} ${ls[e].fail} ${s} || isNaN(${t})`)}};kn.default=Mu;var wn={};Object.defineProperty(wn,"__esModule",{value:!0});const Cr=de,ju={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,Cr.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,Cr._)`{multipleOf: ${r}}`},code(r){const{gen:e,data:t,schemaCode:s,it:n}=r,a=n.opts.multipleOfPrecision,i=e.let("res"),o=a?(0,Cr._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${a}`:(0,Cr._)`${i} !== parseInt(${i})`;r.fail$data((0,Cr._)`(${s} === 0 || (${i} = ${t}/${s}, ${o}))`)}};wn.default=ju;var Cn={},Tn={};Object.defineProperty(Tn,"__esModule",{value:!0});function oo(r){const e=r.length;let t=0,s=0,n;for(;s<e;)t++,n=r.charCodeAt(s++),n>=55296&&n<=56319&&s<e&&(n=r.charCodeAt(s),(n&64512)===56320&&s++);return t}Tn.default=oo,oo.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(Cn,"__esModule",{value:!0});const Xt=de,xu=Z,Vu=Tn,Bu={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:e}){const t=r==="maxLength"?"more":"fewer";return(0,Xt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Xt._)`{limit: ${r}}`},code(r){const{keyword:e,data:t,schemaCode:s,it:n}=r,a=e==="maxLength"?Xt.operators.GT:Xt.operators.LT,i=n.opts.unicode===!1?(0,Xt._)`${t}.length`:(0,Xt._)`${(0,xu.useFunc)(r.gen,Vu.default)}(${t})`;r.fail$data((0,Xt._)`${i} ${a} ${s}`)}};Cn.default=Bu;var On={};Object.defineProperty(On,"__esModule",{value:!0});const Lu=ht(),us=de,Ru={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,us.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,us._)`{pattern: ${r}}`},code(r){const{data:e,$data:t,schema:s,schemaCode:n,it:a}=r,i=a.opts.unicodeRegExp?"u":"",o=t?(0,us._)`(new RegExp(${n}, ${i}))`:(0,Lu.usePattern)(r,s);r.fail$data((0,us._)`!${o}.test(${e})`)}};On.default=Ru;var An={};Object.defineProperty(An,"__esModule",{value:!0});const Tr=de,zu={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:e}){const t=r==="maxProperties"?"more":"fewer";return(0,Tr.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,Tr._)`{limit: ${r}}`},code(r){const{keyword:e,data:t,schemaCode:s}=r,n=e==="maxProperties"?Tr.operators.GT:Tr.operators.LT;r.fail$data((0,Tr._)`Object.keys(${t}).length ${n} ${s}`)}};An.default=zu;var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0});const Or=ht(),Ar=de,qu=Z,Uu={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:r}})=>(0,Ar.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,Ar._)`{missingProperty: ${r}}`},code(r){const{gen:e,schema:t,schemaCode:s,data:n,$data:a,it:i}=r,{opts:o}=i;if(!a&&t.length===0)return;const l=t.length>=o.loopRequired;if(i.allErrors?c():d(),o.strictRequired){const y=r.parentSchema.properties,{definedProperties:S}=r.it;for(const E of t)if((y==null?void 0:y[E])===void 0&&!S.has(E)){const b=i.schemaEnv.baseId+i.errSchemaPath,g=`required property "${E}" is not defined at "${b}" (strictRequired)`;(0,qu.checkStrictMode)(i,g,i.opts.strictRequired)}}function c(){if(l||a)r.block$data(Ar.nil,f);else for(const y of t)(0,Or.checkReportMissingProp)(r,y)}function d(){const y=e.let("missing");if(l||a){const S=e.let("valid",!0);r.block$data(S,()=>w(y,S)),r.ok(S)}else e.if((0,Or.checkMissingProp)(r,t,y)),(0,Or.reportMissingProp)(r,y),e.else()}function f(){e.forOf("prop",s,y=>{r.setParams({missingProperty:y}),e.if((0,Or.noPropertyInData)(e,n,y,o.ownProperties),()=>r.error())})}function w(y,S){r.setParams({missingProperty:y}),e.forOf(y,s,()=>{e.assign(S,(0,Or.propertyInData)(e,n,y,o.ownProperties)),e.if((0,Ar.not)(S),()=>{r.error(),e.break()})},Ar.nil)}}};Dn.default=Uu;var In={};Object.defineProperty(In,"__esModule",{value:!0});const Dr=de,Hu={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:e}){const t=r==="maxItems"?"more":"fewer";return(0,Dr.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,Dr._)`{limit: ${r}}`},code(r){const{keyword:e,data:t,schemaCode:s}=r,n=e==="maxItems"?Dr.operators.GT:Dr.operators.LT;r.fail$data((0,Dr._)`${t}.length ${n} ${s}`)}};In.default=Hu;var Nn={},Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});const lo=Yi;lo.code='require("ajv/dist/runtime/equal").default',Ir.default=lo,Object.defineProperty(Nn,"__esModule",{value:!0});const Pn=Ve,Ue=de,Ku=Z,Gu=Ir,Wu={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:r,j:e}})=>(0,Ue.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,Ue._)`{i: ${r}, j: ${e}}`},code(r){const{gen:e,data:t,$data:s,schema:n,parentSchema:a,schemaCode:i,it:o}=r;if(!s&&!n)return;const l=e.let("valid"),c=a.items?(0,Pn.getSchemaTypes)(a.items):[];r.block$data(l,d,(0,Ue._)`${i} === false`),r.ok(l);function d(){const S=e.let("i",(0,Ue._)`${t}.length`),E=e.let("j");r.setParams({i:S,j:E}),e.assign(l,!0),e.if((0,Ue._)`${S} > 1`,()=>(f()?w:y)(S,E))}function f(){return c.length>0&&!c.some(S=>S==="object"||S==="array")}function w(S,E){const b=e.name("item"),g=(0,Pn.checkDataTypes)(c,b,o.opts.strictNumbers,Pn.DataType.Wrong),T=e.const("indices",(0,Ue._)`{}`);e.for((0,Ue._)`;${S}--;`,()=>{e.let(b,(0,Ue._)`${t}[${S}]`),e.if(g,(0,Ue._)`continue`),c.length>1&&e.if((0,Ue._)`typeof ${b} == "string"`,(0,Ue._)`${b} += "_"`),e.if((0,Ue._)`typeof ${T}[${b}] == "number"`,()=>{e.assign(E,(0,Ue._)`${T}[${b}]`),r.error(),e.assign(l,!1).break()}).code((0,Ue._)`${T}[${b}] = ${S}`)})}function y(S,E){const b=(0,Ku.useFunc)(e,Gu.default),g=e.name("outer");e.label(g).for((0,Ue._)`;${S}--;`,()=>e.for((0,Ue._)`${E} = ${S}; ${E}--;`,()=>e.if((0,Ue._)`${b}(${t}[${S}], ${t}[${E}])`,()=>{r.error(),e.assign(l,!1).break(g)})))}}};Nn.default=Wu;var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});const Mn=de,Yu=Z,Xu=Ir,Ju={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:r})=>(0,Mn._)`{allowedValue: ${r}}`},code(r){const{gen:e,data:t,$data:s,schemaCode:n,schema:a}=r;s||a&&typeof a=="object"?r.fail$data((0,Mn._)`!${(0,Yu.useFunc)(e,Xu.default)}(${t}, ${n})`):r.fail((0,Mn._)`${a} !== ${t}`)}};Fn.default=Ju;var jn={};Object.defineProperty(jn,"__esModule",{value:!0});const Nr=de,Zu=Z,Qu=Ir,ec={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,Nr._)`{allowedValues: ${r}}`},code(r){const{gen:e,data:t,$data:s,schema:n,schemaCode:a,it:i}=r;if(!s&&n.length===0)throw new Error("enum must have non-empty array");const o=n.length>=i.opts.loopEnum;let l;const c=()=>l??(l=(0,Zu.useFunc)(e,Qu.default));let d;if(o||s)d=e.let("valid"),r.block$data(d,f);else{if(!Array.isArray(n))throw new Error("ajv implementation error");const y=e.const("vSchema",a);d=(0,Nr.or)(...n.map((S,E)=>w(y,E)))}r.pass(d);function f(){e.assign(d,!1),e.forOf("v",a,y=>e.if((0,Nr._)`${c()}(${t}, ${y})`,()=>e.assign(d,!0).break()))}function w(y,S){const E=n[S];return typeof E=="object"&&E!==null?(0,Nr._)`${c()}(${t}, ${y}[${S}])`:(0,Nr._)`${t} === ${E}`}}};jn.default=ec,Object.defineProperty(En,"__esModule",{value:!0});const tc=kn,rc=wn,sc=Cn,nc=On,ac=An,ic=Dn,oc=In,lc=Nn,uc=Fn,cc=jn,dc=[tc.default,rc.default,sc.default,nc.default,ac.default,ic.default,oc.default,lc.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},uc.default,cc.default];En.default=dc;var xn={},lr={};Object.defineProperty(lr,"__esModule",{value:!0}),lr.validateAdditionalItems=void 0;const Jt=de,Vn=Z,fc={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:r}})=>(0,Jt.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Jt._)`{limit: ${r}}`},code(r){const{parentSchema:e,it:t}=r,{items:s}=e;if(!Array.isArray(s)){(0,Vn.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}uo(r,s)}};function uo(r,e){const{gen:t,schema:s,data:n,keyword:a,it:i}=r;i.items=!0;const o=t.const("len",(0,Jt._)`${n}.length`);if(s===!1)r.setParams({len:e.length}),r.pass((0,Jt._)`${o} <= ${e.length}`);else if(typeof s=="object"&&!(0,Vn.alwaysValidSchema)(i,s)){const c=t.var("valid",(0,Jt._)`${o} <= ${e.length}`);t.if((0,Jt.not)(c),()=>l(c)),r.ok(c)}function l(c){t.forRange("i",e.length,o,d=>{r.subschema({keyword:a,dataProp:d,dataPropType:Vn.Type.Num},c),i.allErrors||t.if((0,Jt.not)(c),()=>t.break())})}}lr.validateAdditionalItems=uo,lr.default=fc;var Bn={},ur={};Object.defineProperty(ur,"__esModule",{value:!0}),ur.validateTuple=void 0;const co=de,cs=Z,pc=ht(),hc={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){const{schema:e,it:t}=r;if(Array.isArray(e))return fo(r,"additionalItems",e);t.items=!0,!(0,cs.alwaysValidSchema)(t,e)&&r.ok((0,pc.validateArray)(r))}};function fo(r,e,t=r.schema){const{gen:s,parentSchema:n,data:a,keyword:i,it:o}=r;d(n),o.opts.unevaluated&&t.length&&o.items!==!0&&(o.items=cs.mergeEvaluated.items(s,t.length,o.items));const l=s.name("valid"),c=s.const("len",(0,co._)`${a}.length`);t.forEach((f,w)=>{(0,cs.alwaysValidSchema)(o,f)||(s.if((0,co._)`${c} > ${w}`,()=>r.subschema({keyword:i,schemaProp:w,dataProp:w},l)),r.ok(l))});function d(f){const{opts:w,errSchemaPath:y}=o,S=t.length,E=S===f.minItems&&(S===f.maxItems||f[e]===!1);if(w.strictTuples&&!E){const b=`"${i}" is ${S}-tuple, but minItems or maxItems/${e} are not specified or different at path "${y}"`;(0,cs.checkStrictMode)(o,b,w.strictTuples)}}}ur.validateTuple=fo,ur.default=hc,Object.defineProperty(Bn,"__esModule",{value:!0});const mc=ur,gc={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,mc.validateTuple)(r,"items")};Bn.default=gc;var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});const po=de,yc=Z,vc=ht(),_c=lr,bc={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:r}})=>(0,po.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,po._)`{limit: ${r}}`},code(r){const{schema:e,parentSchema:t,it:s}=r,{prefixItems:n}=t;s.items=!0,!(0,yc.alwaysValidSchema)(s,e)&&(n?(0,_c.validateAdditionalItems)(r,n):r.ok((0,vc.validateArray)(r)))}};Ln.default=bc;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});const ot=de,ds=Z,$c={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:r,max:e}})=>e===void 0?(0,ot.str)`must contain at least ${r} valid item(s)`:(0,ot.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,ot._)`{minContains: ${r}}`:(0,ot._)`{minContains: ${r}, maxContains: ${e}}`},code(r){const{gen:e,schema:t,parentSchema:s,data:n,it:a}=r;let i,o;const{minContains:l,maxContains:c}=s;a.opts.next?(i=l===void 0?1:l,o=c):i=1;const d=e.const("len",(0,ot._)`${n}.length`);if(r.setParams({min:i,max:o}),o===void 0&&i===0){(0,ds.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,ds.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,ds.alwaysValidSchema)(a,t)){let E=(0,ot._)`${d} >= ${i}`;o!==void 0&&(E=(0,ot._)`${E} && ${d} <= ${o}`),r.pass(E);return}a.items=!0;const f=e.name("valid");o===void 0&&i===1?y(f,()=>e.if(f,()=>e.break())):i===0?(e.let(f,!0),o!==void 0&&e.if((0,ot._)`${n}.length > 0`,w)):(e.let(f,!1),w()),r.result(f,()=>r.reset());function w(){const E=e.name("_valid"),b=e.let("count",0);y(E,()=>e.if(E,()=>S(b)))}function y(E,b){e.forRange("i",0,d,g=>{r.subschema({keyword:"contains",dataProp:g,dataPropType:ds.Type.Num,compositeRule:!0},E),b()})}function S(E){e.code((0,ot._)`${E}++`),o===void 0?e.if((0,ot._)`${E} >= ${i}`,()=>e.assign(f,!0).break()):(e.if((0,ot._)`${E} > ${o}`,()=>e.assign(f,!1).break()),i===1?e.assign(f,!0):e.if((0,ot._)`${E} >= ${i}`,()=>e.assign(f,!0)))}}};Rn.default=$c;var ho={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.validateSchemaDeps=r.validatePropertyDeps=r.error=void 0;const e=de,t=Z,s=ht();r.error={message:({params:{property:l,depsCount:c,deps:d}})=>{const f=c===1?"property":"properties";return(0,e.str)`must have ${f} ${d} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:d,missingProperty:f}})=>(0,e._)`{property: ${l},
|
|
25
|
+
missingProperty: ${f},
|
|
26
26
|
depsCount: ${c},
|
|
27
|
-
deps: ${f}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(l){const[c,f]=a(l);i(l,c),o(l,f)}};function a({schema:l}){const c={},f={};for(const p in l){if(p==="__proto__")continue;const O=Array.isArray(l[p])?c:f;O[p]=l[p]}return[c,f]}function i(l,c=l.schema){const{gen:f,data:p,it:O}=l;if(Object.keys(c).length===0)return;const E=f.let("missing");for(const $ in c){const k=c[$];if(k.length===0)continue;const _=(0,s.propertyInData)(f,p,$,O.opts.ownProperties);l.setParams({property:$,depsCount:k.length,deps:k.join(", ")}),O.allErrors?f.if(_,()=>{for(const y of k)(0,s.checkReportMissingProp)(l,y)}):(f.if((0,e._)`${_} && (${(0,s.checkMissingProp)(l,k,E)})`),(0,s.reportMissingProp)(l,E),f.else())}}t.validatePropertyDeps=i;function o(l,c=l.schema){const{gen:f,data:p,keyword:O,it:E}=l,$=f.name("valid");for(const k in c)(0,r.alwaysValidSchema)(E,c[k])||(f.if((0,s.propertyInData)(f,p,k,E.opts.ownProperties),()=>{const _=l.subschema({keyword:O,schemaProp:k},$);l.mergeValidEvaluated(_,$)},()=>f.var($,!0)),l.ok($))}t.validateSchemaDeps=o,t.default=n})(Uo);var na={};Object.defineProperty(na,"__esModule",{value:!0});const Ho=ce,Gd=K,Wd={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>(0,Ho._)`{propertyName: ${t.propertyName}}`},code(t){const{gen:e,schema:r,data:s,it:n}=t;if((0,Gd.alwaysValidSchema)(n,r))return;const a=e.name("valid");e.forIn("key",s,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),e.if((0,Ho.not)(a),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(a)}};na.default=Wd;var bs={};Object.defineProperty(bs,"__esModule",{value:!0});const $s=de,ht=ce,Yd=vt,Ss=K,Xd={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>(0,ht._)`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:e,schema:r,parentSchema:s,data:n,errsCount:a,it:i}=t;if(!a)throw new Error("ajv implementation error");const{allErrors:o,opts:l}=i;if(i.props=!0,l.removeAdditional!=="all"&&(0,Ss.alwaysValidSchema)(i,r))return;const c=(0,$s.allSchemaProperties)(s.properties),f=(0,$s.allSchemaProperties)(s.patternProperties);p(),t.ok((0,ht._)`${a} === ${Yd.default.errors}`);function p(){e.forIn("key",n,_=>{!c.length&&!f.length?$(_):e.if(O(_),()=>$(_))})}function O(_){let y;if(c.length>8){const I=(0,Ss.schemaRefOrVal)(i,s.properties,"properties");y=(0,$s.isOwnProperty)(e,I,_)}else c.length?y=(0,ht.or)(...c.map(I=>(0,ht._)`${_} === ${I}`)):y=ht.nil;return f.length&&(y=(0,ht.or)(y,...f.map(I=>(0,ht._)`${(0,$s.usePattern)(t,I)}.test(${_})`))),(0,ht.not)(y)}function E(_){e.code((0,ht._)`delete ${n}[${_}]`)}function $(_){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){E(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),o||e.break();return}if(typeof r=="object"&&!(0,Ss.alwaysValidSchema)(i,r)){const y=e.name("valid");l.removeAdditional==="failing"?(k(_,y,!1),e.if((0,ht.not)(y),()=>{t.reset(),E(_)})):(k(_,y),o||e.if((0,ht.not)(y),()=>e.break()))}}function k(_,y,I){const N={keyword:"additionalProperties",dataProp:_,dataPropType:Ss.Type.Str};I===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(N,y)}}};bs.default=Xd;var aa={};Object.defineProperty(aa,"__esModule",{value:!0});const Jd=dt,Ko=de,ia=K,Go=bs,Zd={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,parentSchema:s,data:n,it:a}=t;a.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Go.default.code(new Jd.KeywordCxt(a,Go.default,"additionalProperties"));const i=(0,Ko.allSchemaProperties)(r);for(const p of i)a.definedProperties.add(p);a.opts.unevaluated&&i.length&&a.props!==!0&&(a.props=ia.mergeEvaluated.props(e,(0,ia.toHash)(i),a.props));const o=i.filter(p=>!(0,ia.alwaysValidSchema)(a,r[p]));if(o.length===0)return;const l=e.name("valid");for(const p of o)c(p)?f(p):(e.if((0,Ko.propertyInData)(e,n,p,a.opts.ownProperties)),f(p),a.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(l);function c(p){return a.opts.useDefaults&&!a.compositeRule&&r[p].default!==void 0}function f(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},l)}}};aa.default=Zd;var oa={};Object.defineProperty(oa,"__esModule",{value:!0});const Wo=de,Es=ce,Yo=K,Xo=K,Qd={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,data:s,parentSchema:n,it:a}=t,{opts:i}=a,o=(0,Wo.allSchemaProperties)(r),l=o.filter(k=>(0,Yo.alwaysValidSchema)(a,r[k]));if(o.length===0||l.length===o.length&&(!a.opts.unevaluated||a.props===!0))return;const c=i.strictSchema&&!i.allowMatchingProperties&&n.properties,f=e.name("valid");a.props!==!0&&!(a.props instanceof Es.Name)&&(a.props=(0,Xo.evaluatedPropsToName)(e,a.props));const{props:p}=a;O();function O(){for(const k of o)c&&E(k),a.allErrors?$(k):(e.var(f,!0),$(k),e.if(f))}function E(k){for(const _ in c)new RegExp(k).test(_)&&(0,Yo.checkStrictMode)(a,`property ${_} matches pattern ${k} (use allowMatchingProperties)`)}function $(k){e.forIn("key",s,_=>{e.if((0,Es._)`${(0,Wo.usePattern)(t,k)}.test(${_})`,()=>{const y=l.includes(k);y||t.subschema({keyword:"patternProperties",schemaProp:k,dataProp:_,dataPropType:Xo.Type.Str},f),a.opts.unevaluated&&p!==!0?e.assign((0,Es._)`${p}[${_}]`,!0):!y&&!a.allErrors&&e.if((0,Es.not)(f),()=>e.break())})})}}};oa.default=Qd;var ua={};Object.defineProperty(ua,"__esModule",{value:!0});const ef=K,tf={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:r,it:s}=t;if((0,ef.alwaysValidSchema)(s,r)){t.fail();return}const n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};ua.default=tf;var la={};Object.defineProperty(la,"__esModule",{value:!0});const rf={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:de.validateUnion,error:{message:"must match a schema in anyOf"}};la.default=rf;var ca={};Object.defineProperty(ca,"__esModule",{value:!0});const ks=ce,sf=K,nf={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>(0,ks._)`{passingSchemas: ${t.passing}}`},code(t){const{gen:e,schema:r,parentSchema:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;const a=r,i=e.let("valid",!1),o=e.let("passing",null),l=e.name("_valid");t.setParams({passing:o}),e.block(c),t.result(i,()=>t.reset(),()=>t.error(!0));function c(){a.forEach((f,p)=>{let O;(0,sf.alwaysValidSchema)(n,f)?e.var(l,!0):O=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},l),p>0&&e.if((0,ks._)`${l} && ${i}`).assign(i,!1).assign(o,(0,ks._)`[${o}, ${p}]`).else(),e.if(l,()=>{e.assign(i,!0),e.assign(o,p),O&&t.mergeEvaluated(O,ks.Name)})})}}};ca.default=nf;var da={};Object.defineProperty(da,"__esModule",{value:!0});const af=K,of={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:r,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");const n=e.name("valid");r.forEach((a,i)=>{if((0,af.alwaysValidSchema)(s,a))return;const o=t.subschema({keyword:"allOf",schemaProp:i},n);t.ok(n),t.mergeEvaluated(o)})}};da.default=of;var fa={};Object.defineProperty(fa,"__esModule",{value:!0});const ws=ce,Jo=K,uf={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>(0,ws.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,ws._)`{failingKeyword: ${t.ifClause}}`},code(t){const{gen:e,parentSchema:r,it:s}=t;r.then===void 0&&r.else===void 0&&(0,Jo.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const n=Zo(s,"then"),a=Zo(s,"else");if(!n&&!a)return;const i=e.let("valid",!0),o=e.name("_valid");if(l(),t.reset(),n&&a){const f=e.let("ifClause");t.setParams({ifClause:f}),e.if(o,c("then",f),c("else",f))}else n?e.if(o,c("then")):e.if((0,ws.not)(o),c("else"));t.pass(i,()=>t.error(!0));function l(){const f=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);t.mergeEvaluated(f)}function c(f,p){return()=>{const O=t.subschema({keyword:f},o);e.assign(i,o),t.mergeValidEvaluated(O,i),p?e.assign(p,(0,ws._)`${f}`):t.setParams({ifClause:f})}}}};function Zo(t,e){const r=t.schema[e];return r!==void 0&&!(0,Jo.alwaysValidSchema)(t,r)}fa.default=uf;var pa={};Object.defineProperty(pa,"__esModule",{value:!0});const lf=K,cf={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,lf.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};pa.default=cf,Object.defineProperty(Qn,"__esModule",{value:!0});const df=hr,ff=ta,pf=mr,hf=ra,mf=sa,gf=Uo,yf=na,vf=bs,_f=aa,bf=oa,$f=ua,Sf=la,Ef=ca,kf=da,wf=fa,Cf=pa;function Tf(t=!1){const e=[$f.default,Sf.default,Ef.default,kf.default,wf.default,Cf.default,yf.default,vf.default,gf.default,_f.default,bf.default];return t?e.push(ff.default,hf.default):e.push(df.default,pf.default),e.push(mf.default),e}Qn.default=Tf;var ha={},ma={};Object.defineProperty(ma,"__esModule",{value:!0});const De=ce,Of={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,De.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,De._)`{format: ${t}}`},code(t,e){const{gen:r,data:s,$data:n,schema:a,schemaCode:i,it:o}=t,{opts:l,errSchemaPath:c,schemaEnv:f,self:p}=o;if(!l.validateFormats)return;n?O():E();function O(){const $=r.scopeValue("formats",{ref:p.formats,code:l.code.formats}),k=r.const("fDef",(0,De._)`${$}[${i}]`),_=r.let("fType"),y=r.let("format");r.if((0,De._)`typeof ${k} == "object" && !(${k} instanceof RegExp)`,()=>r.assign(_,(0,De._)`${k}.type || "string"`).assign(y,(0,De._)`${k}.validate`),()=>r.assign(_,(0,De._)`"string"`).assign(y,k)),t.fail$data((0,De.or)(I(),N()));function I(){return l.strictSchema===!1?De.nil:(0,De._)`${i} && !${y}`}function N(){const D=f.$async?(0,De._)`(${k}.async ? await ${y}(${s}) : ${y}(${s}))`:(0,De._)`${y}(${s})`,b=(0,De._)`(typeof ${y} == "function" ? ${D} : ${y}.test(${s}))`;return(0,De._)`${y} && ${y} !== true && ${_} === ${e} && !${b}`}}function E(){const $=p.formats[a];if(!$){I();return}if($===!0)return;const[k,_,y]=N($);k===e&&t.pass(D());function I(){if(l.strictSchema===!1){p.logger.warn(b());return}throw new Error(b());function b(){return`unknown format "${a}" ignored in schema at path "${c}"`}}function N(b){const B=b instanceof RegExp?(0,De.regexpCode)(b):l.code.formats?(0,De._)`${l.code.formats}${(0,De.getProperty)(a)}`:void 0,W=r.scopeValue("formats",{key:a,ref:b,code:B});return typeof b=="object"&&!(b instanceof RegExp)?[b.type||"string",b.validate,(0,De._)`${W}.validate`]:["string",b,W]}function D(){if(typeof $=="object"&&!($ instanceof RegExp)&&$.async){if(!f.$async)throw new Error("async format in sync schema");return(0,De._)`await ${y}(${s})`}return typeof _=="function"?(0,De._)`${y}(${s})`:(0,De._)`${y}.test(${s})`}}}};ma.default=Of,Object.defineProperty(ha,"__esModule",{value:!0});const Af=[ma.default];ha.default=Af;var gr={};Object.defineProperty(gr,"__esModule",{value:!0}),gr.contentVocabulary=gr.metadataVocabulary=void 0,gr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],gr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(jn,"__esModule",{value:!0});const Df=xn,If=Bn,Nf=Qn,Pf=ha,Qo=gr,Ff=[Df.default,If.default,(0,Nf.default)(),Pf.default,Qo.metadataVocabulary,Qo.contentVocabulary];jn.default=Ff;var ga={},Cs={};Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.DiscrError=void 0;var eu;(function(t){t.Tag="tag",t.Mapping="mapping"})(eu||(Cs.DiscrError=eu={})),Object.defineProperty(ga,"__esModule",{value:!0});const yr=ce,ya=Cs,tu=Ye,Mf=K,jf={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:e}})=>t===ya.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,yr._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},code(t){const{gen:e,data:r,schema:s,parentSchema:n,it:a}=t,{oneOf:i}=n;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=s.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");const l=e.let("valid",!1),c=e.const("tag",(0,yr._)`${r}${(0,yr.getProperty)(o)}`);e.if((0,yr._)`typeof ${c} == "string"`,()=>f(),()=>t.error(!1,{discrError:ya.DiscrError.Tag,tag:c,tagName:o})),t.ok(l);function f(){const E=O();e.if(!1);for(const $ in E)e.elseIf((0,yr._)`${c} === ${$}`),e.assign(l,p(E[$]));e.else(),t.error(!1,{discrError:ya.DiscrError.Mapping,tag:c,tagName:o}),e.endIf()}function p(E){const $=e.name("valid"),k=t.subschema({keyword:"oneOf",schemaProp:E},$);return t.mergeEvaluated(k,yr.Name),$}function O(){var E;const $={},k=y(n);let _=!0;for(let D=0;D<i.length;D++){let b=i[D];b!=null&&b.$ref&&!(0,Mf.schemaHasRulesButRef)(b,a.self.RULES)&&(b=tu.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,b==null?void 0:b.$ref),b instanceof tu.SchemaEnv&&(b=b.schema));const B=(E=b==null?void 0:b.properties)===null||E===void 0?void 0:E[o];if(typeof B!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);_=_&&(k||y(b)),I(B,D)}if(!_)throw new Error(`discriminator: "${o}" must be required`);return $;function y({required:D}){return Array.isArray(D)&&D.includes(o)}function I(D,b){if(D.const)N(D.const,b);else if(D.enum)for(const B of D.enum)N(B,b);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function N(D,b){if(typeof D!="string"||D in $)throw new Error(`discriminator: "${o}" values must be unique strings`);$[D]=b}}}};ga.default=jf;const xf={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=Hi,s=jn,n=ga,a=xf,i=["/properties"],o="http://json-schema.org/draft-07/schema";class l extends r.default{_addVocabularies(){super._addVocabularies(),s.default.forEach($=>this.addVocabulary($)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const $=this.opts.$data?this.$dataMetaSchema(a,i):a;this.addMetaSchema($,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.Ajv=l,t.exports=e=l,t.exports.Ajv=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var c=dt;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var f=ce;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var p=Ir;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var O=Nr;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return O.default}})})(gn,gn.exports);var ru=gn.exports;const Vf=Is(ru);var va={exports:{}},su={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(q,G){return{validate:q,compare:G}}t.fullFormats={date:e(a,i),time:e(l(!0),c),"date-time":e(O(!0),E),"iso-time":e(l(),f),"iso-date-time":e(O(),$),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:y,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:ie,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:N,int32:{type:"number",validate:B},int64:{type:"number",validate:W},float:{type:"number",validate:U},double:{type:"number",validate:U},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,E),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,$),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(q){return q%4===0&&(q%100!==0||q%400===0)}const s=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(q){const G=s.exec(q);if(!G)return!1;const re=+G[1],Y=+G[2],me=+G[3];return Y>=1&&Y<=12&&me>=1&&me<=(Y===2&&r(re)?29:n[Y])}function i(q,G){if(q&&G)return q>G?1:q<G?-1:0}const o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function l(q){return function(re){const Y=o.exec(re);if(!Y)return!1;const me=+Y[1],ge=+Y[2],_e=+Y[3],Ie=Y[4],xe=Y[5]==="-"?-1:1,A=+(Y[6]||0),g=+(Y[7]||0);if(A>23||g>59||q&&!Ie)return!1;if(me<=23&&ge<=59&&_e<60)return!0;const F=ge-g*xe,T=me-A*xe-(F<0?1:0);return(T===23||T===-1)&&(F===59||F===-1)&&_e<61}}function c(q,G){if(!(q&&G))return;const re=new Date("2020-01-01T"+q).valueOf(),Y=new Date("2020-01-01T"+G).valueOf();if(re&&Y)return re-Y}function f(q,G){if(!(q&&G))return;const re=o.exec(q),Y=o.exec(G);if(re&&Y)return q=re[1]+re[2]+re[3],G=Y[1]+Y[2]+Y[3],q>G?1:q<G?-1:0}const p=/t|\s/i;function O(q){const G=l(q);return function(Y){const me=Y.split(p);return me.length===2&&a(me[0])&&G(me[1])}}function E(q,G){if(!(q&&G))return;const re=new Date(q).valueOf(),Y=new Date(G).valueOf();if(re&&Y)return re-Y}function $(q,G){if(!(q&&G))return;const[re,Y]=q.split(p),[me,ge]=G.split(p),_e=i(re,me);if(_e!==void 0)return _e||c(Y,ge)}const k=/\/|:/,_=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function y(q){return k.test(q)&&_.test(q)}const I=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function N(q){return I.lastIndex=0,I.test(q)}const D=-(2**31),b=2**31-1;function B(q){return Number.isInteger(q)&&q<=b&&q>=D}function W(q){return Number.isInteger(q)}function U(){return!0}const H=/[^\\]\\Z/;function ie(q){if(H.test(q))return!1;try{return new RegExp(q),!0}catch{return!1}}})(su);var nu={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=ru,r=ce,s=r.operators,n={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:o,schemaCode:l})=>(0,r.str)`should be ${n[o].okStr} ${l}`,params:({keyword:o,schemaCode:l})=>(0,r._)`{comparison: ${n[o].okStr}, limit: ${l}}`};t.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:a,code(o){const{gen:l,data:c,schemaCode:f,keyword:p,it:O}=o,{opts:E,self:$}=O;if(!E.validateFormats)return;const k=new e.KeywordCxt(O,$.RULES.all.format.definition,"format");k.$data?_():y();function _(){const N=l.scopeValue("formats",{ref:$.formats,code:E.code.formats}),D=l.const("fmt",(0,r._)`${N}[${k.schemaCode}]`);o.fail$data((0,r.or)((0,r._)`typeof ${D} != "object"`,(0,r._)`${D} instanceof RegExp`,(0,r._)`typeof ${D}.compare != "function"`,I(D)))}function y(){const N=k.schema,D=$.formats[N];if(!D||D===!0)return;if(typeof D!="object"||D instanceof RegExp||typeof D.compare!="function")throw new Error(`"${p}": format "${N}" does not define "compare" function`);const b=l.scopeValue("formats",{key:N,ref:D,code:E.code.formats?(0,r._)`${E.code.formats}${(0,r.getProperty)(N)}`:void 0});o.fail$data(I(b))}function I(N){return(0,r._)`${N}.compare(${c}, ${f}) ${n[p].fail} 0`}},dependencies:["format"]};const i=o=>(o.addKeyword(t.formatLimitDefinition),o);t.default=i})(nu),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=su,s=nu,n=ce,a=new n.Name("fullFormats"),i=new n.Name("fastFormats"),o=(c,f={keywords:!0})=>{if(Array.isArray(f))return l(c,f,r.fullFormats,a),c;const[p,O]=f.mode==="fast"?[r.fastFormats,i]:[r.fullFormats,a],E=f.formats||r.formatNames;return l(c,E,p,O),f.keywords&&(0,s.default)(c),c};o.get=(c,f="full")=>{const O=(f==="fast"?r.fastFormats:r.fullFormats)[c];if(!O)throw new Error(`Unknown format "${c}"`);return O};function l(c,f,p,O){var E,$;(E=($=c.opts.code).formats)!==null&&E!==void 0||($.formats=(0,n._)`require("ajv-formats/dist/formats").${O}`);for(const k of f)c.addFormat(k,p[k])}t.exports=e=o,Object.defineProperty(e,"__esModule",{value:!0}),e.default=o}(va,va.exports);var Bf=va.exports;const Lf=Is(Bf),au={"zip-code":{type:"string",validate:"/^[0-9]{5}[0-9]{3}$/"},cnpj:{type:"string",validate:ou},email:{type:"string",validate:zf},"phone-br":{type:"string",validate:"/^[0-9]{11}$/"},cpf:{type:"string",validate:iu},"cpf-cnpj":{type:"string",validate:qf}},Rf=()=>{const t=new Vf({allErrors:!0,strict:!1,useDefaults:"empty"});return Lf(t),Object.keys(au).forEach(e=>t.addFormat(e,au[e])),t};function zf(t){return!!t.replace(/[^\w@.-]+/g,"").match(/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/)}function qf(t){return t=t.replace(/[^\d]+/g,""),t.length==11?iu(t):t.length==14?ou(t):!1}function iu(t){const e=t.replace(/[^\d]+/g,"");if(e.length!==11||e.match(/(\d)\1{10}/))return!1;const r=e.split("").map(n=>+n),s=n=>r.slice(0,n-12).reduce((a,i,o)=>a+i*(n-o),0)*10%11%10;return String(s(10))===t[9]&&String(s(11))===t[10]}function ou(t){const e=t.replace(/[^\d]+/g,"");if(e.length!==14||/^(\d)\1+$/.test(e))return!1;let r=e.length-2,s=e.substring(0,r);const n=e.substring(r);let a=0,i=r-7;for(let l=r;l>=1;l--)a+=Number(s.charAt(r-l))*i--,i<2&&(i=9);let o=a%11<2?0:11-a%11;if(String(o)!=n.charAt(0))return!1;r=r+1,s=t.substring(0,r),a=0,i=r-7;for(let l=r;l>=1;l--)a+=Number(s.charAt(r-l))*i--,i<2&&(i=9);return o=a%11<2?0:11-a%11,String(o)==n.charAt(1)}const Uf=({formSchema:t,initialValue:e={}})=>{const[r,s]=j.useState({}),[n,a]=j.useState({status:void 0,fields:{}}),[i,o]=j.useState({}),[l,c]=j.useState({}),[f,p]=j.useState([]),[O,E]=j.useState({}),[$,k]=j.useState(void 0);j.useEffect(()=>{k(Rf()),I()},[]),j.useEffect(()=>{if(!($!=null&&$.getSchema(t==null?void 0:t.$id))){$==null||$.compile(t);return}$.removeSchema(t==null?void 0:t.$id),$.compile(t)},[$,t]);const _=j.useCallback(u=>{const d=f.includes(String(u));return e!=null&&e[u]?l[u]!==(e==null?void 0:e[u])||d:l[u]!==void 0||d},[f,l,e]),y=j.useMemo(()=>Object.keys(n.fields).map(d=>{var v,P;return(P=(v=n.fields)==null?void 0:v[d])==null?void 0:P.touched}).some(d=>d),[n]),I=j.useCallback(()=>{Object.keys(e||[]).forEach(u=>{c(d=>({...d,[u]:e[u]}))})},[e]),N=j.useCallback(u=>{var P,V,L,R;const d=((P=u==null?void 0:u.target)==null?void 0:P.type)==="checkbox"?(V=u==null?void 0:u.target)==null?void 0:V.checked:(L=u==null?void 0:u.target)==null?void 0:L.value,v=mn((R=u==null?void 0:u.target)==null?void 0:R.name,t);return(v==null?void 0:v.type)==="number"?Number(d):(v==null?void 0:v.type)==="boolean"?JSON.parse(String(d)):(v==null?void 0:v.type)==="string"?String(d):d},[t]),D=j.useCallback(()=>{const u={};return Object.keys(l).forEach(d=>{const v=String(d).split(".");zi(u,v,l[d])}),{...u,toJson:()=>JSON.stringify(u)}},[l]),b=j.useCallback(()=>{if(!$)return{result:null,errors:void 0};const{...u}=D(),d=$.compile(t),v=d(u),P=Ri(d);return{result:v,errors:P}},[$,D,t]),B=j.useCallback((u,d)=>{if(!$)return{result:null,errors:void 0};const v=$.getSchema(u);if(!v)return{result:null};const P=v(d);if(!(v!=null&&v.errors))return{status:P,errors:{}};const V=Ri(v,u);return{status:P,errors:V}},[$]),W=j.useCallback(u=>{const d={[u.target.name]:u},v={...n};v==null||delete v.fields[u.target.name],a(v),s(L=>({...L,...d}));const P=N(u),V={[u.target.name]:P};c(L=>({...L,...V}))},[n,N]),U=j.useCallback((u,d)=>{const v={[u]:d};o(P=>({...P,...v}))},[]),H=j.useCallback((u,d)=>{const v={[u]:d};c(P=>({...P,...v}))},[]),ie=j.useCallback(({touched:u})=>{const{errors:d}=b(),v=Object.keys(l).reduce((V,L)=>({...V,[L]:{status:!0}}),{}),P={status:!d,fields:{...v,...d}};return Object.keys(P==null?void 0:P.fields).forEach(V=>{if(u!=null)return P.fields[V].touched=u;P.fields[V].touched=!0}),a(P),P},[l,b]),q=j.useCallback(u=>Object.keys(l).filter(d=>d.split(".").includes(u)||d===u).reduce((d,v)=>({...d,[v]:{status:!0}}),{}),[l]),G=j.useCallback((u,d)=>{Object.keys(n.fields).forEach(V=>{new RegExp(`(\\.|^)${d}(\\.|$)`).test(V)&&delete n.fields[V]});const v={...n.fields,...u.fields},P=Object.keys(v).map(V=>v[V].status).every(V=>V);a(V=>({status:P,fields:{...V.fields,...u.fields}}))},[n.fields]),re=j.useCallback((u,d,v={})=>{const{touched:P}=v,V=B(u,d),L=q(u);if(V.status===null)return console.warn(`Cannot find schemaID: ${u}`),V;const R={status:!!V.status,fields:{...L,...V.errors}};return Object.keys(R.fields).forEach(te=>{if(P!=null)return R.fields[te].touched=P;R.fields[te].touched=_(te)}),G(R,u),R},[B,_,G,q]),Y=j.useCallback(u=>{p(d=>[...d,u])},[]),me=j.useCallback(u=>{var d,v,P,V,L;return(d=n==null?void 0:n.fields[u])!=null&&d.touched&&((v=n==null?void 0:n.fields[u])!=null&&v.status)?{status:"",message:""}:(P=n==null?void 0:n.fields[u])!=null&&P.touched&&!((V=n==null?void 0:n.fields[u])!=null&&V.status)?{status:"error",message:(L=n==null?void 0:n.fields[u])==null?void 0:L.message}:{status:"",message:""}},[n==null?void 0:n.fields]),ge=j.useCallback(u=>{const{status:d}=me(u);return d},[me]),_e=j.useCallback(u=>{const{message:d}=me(u);return d},[me]),Ie=j.useCallback(u=>mn(u,t),[t]),xe=j.useCallback(()=>{s({}),o({}),a({status:void 0,fields:{}}),c({})},[]),A=j.useCallback((u,d)=>({...u,onBlurHandler:()=>re(d,l[d]),onChangeHandler:W,onFocusHandler:()=>Y(d)}),[l,Y,W,re]),g=j.useCallback(u=>{if(!u)return;const d=u.value?u:u.querySelectorAll("input,select,textarea")[0]||u;O[d==null?void 0:d.name]||E(v=>({...v,[d.name]:d}))},[O]),F=j.useCallback(u=>{var We,tt;const d=["text","email","password","radio","number"],v=Ie(u);if(v===null)return console.error(`Cannot find schemaID: ${u}`),{};const P=v["x-label"]||"",V=v["x-placeholder"]||"",L=v["x-tooltip"]||"",R=O[u],te=((We=R==null?void 0:R.tagName)==null?void 0:We.toLowerCase())||"",z=((tt=R==null?void 0:R.type)==null?void 0:tt.toLowerCase())||"",pe={name:u,feedback:_e(u),...P&&{label:P},...V&&{placeholder:V},...L&&{tooltip:L},status:ge(u),value:l[u],ref:g,animated:!1};if(te==="input"&&z==="checkbox")return pe.checked=l[u],A(pe,u);if(te==="input"&&(v==null?void 0:v.format)==="date")return pe.type="date",pe.value=String(l[u]||""),v!=null&&v.formatMinimum&&(pe.min=v==null?void 0:v.formatMinimum),v!=null&&v.formatMaximum&&(pe.max=v==null?void 0:v.formatMaximum),A(pe,u);if(te==="input"&&d.includes(z)||te==="textarea")return pe.type=Ui(v),pe.value=String(l[u]||""),A(pe,u);if(te==="select"){const ue=v["x-options"]||[];return pe.value=l[u],pe.onChangeHandler=$t=>{const rt=N($t);H(u,rt),re(u,rt,{touched:!0})},pe.options=ue,pe}return pe},[g,O,l,Ie,_e,ge,N,H,re,A]),T=j.useCallback(u=>{const d={...l},v={...n},P=new RegExp(`(\\.|^)${u}(\\.|$)`);Object.keys(l).forEach(V=>{P.test(V)&&(delete v.fields[V],delete d[V])}),a(v),c(d)},[l,n]);return{getFormSchema:t,getFormEvent:r,setFormData:s,getFormData:l,getInputValidateStatus:ge,getInputValidateMessage:_e,getInputSchema:Ie,isFormDirty:y,handleFocused:Y,handleFormInput:W,handleFormFlagFields:U,handleCustomValue:H,clearFormDataKey:T,getFormValidated:n,getFormFlagFields:i,validateForm:ie,validateFormSchema:re,parseFormToObject:D,clearFormData:xe,register:F,ajv:$}};function Hf(t){const e=n=>typeof window<"u"?window.matchMedia(n).matches:!1,[r,s]=j.useState(e(t));return j.useEffect(()=>{const n=window.matchMedia(t);function a(){s(e(t))}return a(),n.addListener?n.addListener(a):n.addEventListener("change",a),()=>{n.removeListener?n.removeListener(a):n.removeEventListener("change",a)}},[t]),r}const Kf=()=>{const[t,e]=j.useState([]);function r(n){const a={...n,id:Date.now().toString()};e([...t,a])}function s(n){e(t.filter(a=>a.id!==n))}return{notifications:t,setNotifications:e,addNotification:r,removeNotification:s}},Gf=(t=[],e=0)=>{const[r,s]=j.useState(e),[n,a]=j.useState(t),i=j.useMemo(()=>n.length-1,[n]),o=j.useMemo(()=>r+1<=i&&!n[r+1].disabled,[r,i,n]),l=j.useMemo(()=>r-1>=0&&!n[r-1].disabled,[r,n]),c=j.useCallback(()=>{o&&s(U=>U+1)},[o]),f=j.useCallback(()=>{l&&s(U=>U-1)},[l]);function p(U){U!==n&&a(U)}function O(U){const H=I(U);H!==r&&s(H)}function E(U){const H=I(U);return{index:H,...b(H)}}function $(){return{index:r,...b(r)}}function k(U){return r===I(U)}function _(U){return n.map((ie,q)=>(ie.disabled=q>I(U),ie))}function y(U){const H=Array.isArray(U)?U.map(q=>I(q)):[I(U)];return n.map((q,G)=>(q.disabled=!!H.includes(G),q))}function I(U){return typeof U=="object"?N(U):typeof U=="string"?D(U):U}function N(U){return n.findIndex(ie=>W(ie,U))}function D(U){return n.findIndex(ie=>ie.name===U)}function b(U){return n[U]}function B(){return r===i}function W(U,H){const ie=Object.keys(U),q=Object.keys(H);return ie.length!=q.length?!1:!ie.some(re=>U[re]!==H[re])}return[{getSteps:n,getStep:E,getStepSelected:$(),getStepIndexByName:D,setSteps:p,setStepSelected:O,goToNextStep:c,goToPrevStep:f,canGoToNextStep:o,canGoToPrevStep:l,isStep:k,isLastStep:B(),disableSteps:y,disableStepsAfter:_}]};ee.DsAccordion=nn,ee.DsActiveTags=Ii,ee.DsButton=Sr,ee.DsCaption=Ls,ee.DsCard=Rs,ee.DsCheckbox=zs,ee.DsContainer=ss,ee.DsEditableSelect=an,ee.DsFlexElement=Le,ee.DsFlexLayout=Nt,ee.DsGridElement=Oi,ee.DsGridLayout=as,ee.DsHR=Us,ee.DsHeading=qs,ee.DsIcon=Ee,ee.DsIndicator=Xu,ee.DsInlineEditable=on,ee.DsInput=ir,ee.DsLoading=Ws,ee.DsModal=un,ee.DsNotification=is,ee.DsNotificationList=dn,ee.DsOption=Ys,ee.DsParagraph=It,ee.DsPasswordConfirmation=cn,ee.DsProgress=Js,ee.DsSelect=Zs,ee.DsSpacer=lt,ee.DsStepper=Mi,ee.DsSubtitle=Si,ee.DsTable=xi,ee.DsTabs=tl,ee.DsTextArea=en,ee.DsTooltip=Kt,ee.DsTwoColumns=fn,ee.DsWrapper=Wt,ee.ThemeProvider=Bi,ee.customAssign=zi,ee.getInputTypeByFormat=Ui,ee.getSchemaProperties=mn,ee.isValidObject=qi,ee.parseOptionValue=nl,ee.useForm=Uf,ee.useMediaQuery=Hf,ee.useNotification=Kf,ee.useStepper=Gf,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
|
|
27
|
+
deps: ${d}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:r.error,code(l){const[c,d]=a(l);i(l,c),o(l,d)}};function a({schema:l}){const c={},d={};for(const f in l){if(f==="__proto__")continue;const w=Array.isArray(l[f])?c:d;w[f]=l[f]}return[c,d]}function i(l,c=l.schema){const{gen:d,data:f,it:w}=l;if(Object.keys(c).length===0)return;const y=d.let("missing");for(const S in c){const E=c[S];if(E.length===0)continue;const b=(0,s.propertyInData)(d,f,S,w.opts.ownProperties);l.setParams({property:S,depsCount:E.length,deps:E.join(", ")}),w.allErrors?d.if(b,()=>{for(const g of E)(0,s.checkReportMissingProp)(l,g)}):(d.if((0,e._)`${b} && (${(0,s.checkMissingProp)(l,E,y)})`),(0,s.reportMissingProp)(l,y),d.else())}}r.validatePropertyDeps=i;function o(l,c=l.schema){const{gen:d,data:f,keyword:w,it:y}=l,S=d.name("valid");for(const E in c)(0,t.alwaysValidSchema)(y,c[E])||(d.if((0,s.propertyInData)(d,f,E,y.opts.ownProperties),()=>{const b=l.subschema({keyword:w,schemaProp:E},S);l.mergeValidEvaluated(b,S)},()=>d.var(S,!0)),l.ok(S))}r.validateSchemaDeps=o,r.default=n})(ho);var zn={};Object.defineProperty(zn,"__esModule",{value:!0});const mo=de,Sc=Z,Ec={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:r})=>(0,mo._)`{propertyName: ${r.propertyName}}`},code(r){const{gen:e,schema:t,data:s,it:n}=r;if((0,Sc.alwaysValidSchema)(n,t))return;const a=e.name("valid");e.forIn("key",s,i=>{r.setParams({propertyName:i}),r.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),e.if((0,mo.not)(a),()=>{r.error(!0),n.allErrors||e.break()})}),r.ok(a)}};zn.default=Ec;var fs={};Object.defineProperty(fs,"__esModule",{value:!0});const ps=ht(),yt=de,kc=bt,hs=Z,wc={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:r})=>(0,yt._)`{additionalProperty: ${r.additionalProperty}}`},code(r){const{gen:e,schema:t,parentSchema:s,data:n,errsCount:a,it:i}=r;if(!a)throw new Error("ajv implementation error");const{allErrors:o,opts:l}=i;if(i.props=!0,l.removeAdditional!=="all"&&(0,hs.alwaysValidSchema)(i,t))return;const c=(0,ps.allSchemaProperties)(s.properties),d=(0,ps.allSchemaProperties)(s.patternProperties);f(),r.ok((0,yt._)`${a} === ${kc.default.errors}`);function f(){e.forIn("key",n,b=>{!c.length&&!d.length?S(b):e.if(w(b),()=>S(b))})}function w(b){let g;if(c.length>8){const T=(0,hs.schemaRefOrVal)(i,s.properties,"properties");g=(0,ps.isOwnProperty)(e,T,b)}else c.length?g=(0,yt.or)(...c.map(T=>(0,yt._)`${b} === ${T}`)):g=yt.nil;return d.length&&(g=(0,yt.or)(g,...d.map(T=>(0,yt._)`${(0,ps.usePattern)(r,T)}.test(${b})`))),(0,yt.not)(g)}function y(b){e.code((0,yt._)`delete ${n}[${b}]`)}function S(b){if(l.removeAdditional==="all"||l.removeAdditional&&t===!1){y(b);return}if(t===!1){r.setParams({additionalProperty:b}),r.error(),o||e.break();return}if(typeof t=="object"&&!(0,hs.alwaysValidSchema)(i,t)){const g=e.name("valid");l.removeAdditional==="failing"?(E(b,g,!1),e.if((0,yt.not)(g),()=>{r.reset(),y(b)})):(E(b,g),o||e.if((0,yt.not)(g),()=>e.break()))}}function E(b,g,T){const C={keyword:"additionalProperties",dataProp:b,dataPropType:hs.Type.Str};T===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(C,g)}}};fs.default=wc;var qn={};Object.defineProperty(qn,"__esModule",{value:!0});const Cc=rs(),go=ht(),Un=Z,yo=fs,Tc={keyword:"properties",type:"object",schemaType:"object",code(r){const{gen:e,schema:t,parentSchema:s,data:n,it:a}=r;a.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&yo.default.code(new Cc.KeywordCxt(a,yo.default,"additionalProperties"));const i=(0,go.allSchemaProperties)(t);for(const f of i)a.definedProperties.add(f);a.opts.unevaluated&&i.length&&a.props!==!0&&(a.props=Un.mergeEvaluated.props(e,(0,Un.toHash)(i),a.props));const o=i.filter(f=>!(0,Un.alwaysValidSchema)(a,t[f]));if(o.length===0)return;const l=e.name("valid");for(const f of o)c(f)?d(f):(e.if((0,go.propertyInData)(e,n,f,a.opts.ownProperties)),d(f),a.allErrors||e.else().var(l,!0),e.endIf()),r.it.definedProperties.add(f),r.ok(l);function c(f){return a.opts.useDefaults&&!a.compositeRule&&t[f].default!==void 0}function d(f){r.subschema({keyword:"properties",schemaProp:f,dataProp:f},l)}}};qn.default=Tc;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});const vo=ht(),ms=de,_o=Z,bo=Z,Oc={keyword:"patternProperties",type:"object",schemaType:"object",code(r){const{gen:e,schema:t,data:s,parentSchema:n,it:a}=r,{opts:i}=a,o=(0,vo.allSchemaProperties)(t),l=o.filter(E=>(0,_o.alwaysValidSchema)(a,t[E]));if(o.length===0||l.length===o.length&&(!a.opts.unevaluated||a.props===!0))return;const c=i.strictSchema&&!i.allowMatchingProperties&&n.properties,d=e.name("valid");a.props!==!0&&!(a.props instanceof ms.Name)&&(a.props=(0,bo.evaluatedPropsToName)(e,a.props));const{props:f}=a;w();function w(){for(const E of o)c&&y(E),a.allErrors?S(E):(e.var(d,!0),S(E),e.if(d))}function y(E){for(const b in c)new RegExp(E).test(b)&&(0,_o.checkStrictMode)(a,`property ${b} matches pattern ${E} (use allowMatchingProperties)`)}function S(E){e.forIn("key",s,b=>{e.if((0,ms._)`${(0,vo.usePattern)(r,E)}.test(${b})`,()=>{const g=l.includes(E);g||r.subschema({keyword:"patternProperties",schemaProp:E,dataProp:b,dataPropType:bo.Type.Str},d),a.opts.unevaluated&&f!==!0?e.assign((0,ms._)`${f}[${b}]`,!0):!g&&!a.allErrors&&e.if((0,ms.not)(d),()=>e.break())})})}}};Hn.default=Oc;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const Ac=Z,Dc={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:e,schema:t,it:s}=r;if((0,Ac.alwaysValidSchema)(s,t)){r.fail();return}const n=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),r.failResult(n,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};Kn.default=Dc;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});const Ic={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ht().validateUnion,error:{message:"must match a schema in anyOf"}};Gn.default=Ic;var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});const gs=de,Nc=Z,Pc={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:r})=>(0,gs._)`{passingSchemas: ${r.passing}}`},code(r){const{gen:e,schema:t,parentSchema:s,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;const a=t,i=e.let("valid",!1),o=e.let("passing",null),l=e.name("_valid");r.setParams({passing:o}),e.block(c),r.result(i,()=>r.reset(),()=>r.error(!0));function c(){a.forEach((d,f)=>{let w;(0,Nc.alwaysValidSchema)(n,d)?e.var(l,!0):w=r.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},l),f>0&&e.if((0,gs._)`${l} && ${i}`).assign(i,!1).assign(o,(0,gs._)`[${o}, ${f}]`).else(),e.if(l,()=>{e.assign(i,!0),e.assign(o,f),w&&r.mergeEvaluated(w,gs.Name)})})}}};Wn.default=Pc;var Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});const Fc=Z,Mc={keyword:"allOf",schemaType:"array",code(r){const{gen:e,schema:t,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");const n=e.name("valid");t.forEach((a,i)=>{if((0,Fc.alwaysValidSchema)(s,a))return;const o=r.subschema({keyword:"allOf",schemaProp:i},n);r.ok(n),r.mergeEvaluated(o)})}};Yn.default=Mc;var Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});const ys=de,$o=Z,jc={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:r})=>(0,ys.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,ys._)`{failingKeyword: ${r.ifClause}}`},code(r){const{gen:e,parentSchema:t,it:s}=r;t.then===void 0&&t.else===void 0&&(0,$o.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const n=So(s,"then"),a=So(s,"else");if(!n&&!a)return;const i=e.let("valid",!0),o=e.name("_valid");if(l(),r.reset(),n&&a){const d=e.let("ifClause");r.setParams({ifClause:d}),e.if(o,c("then",d),c("else",d))}else n?e.if(o,c("then")):e.if((0,ys.not)(o),c("else"));r.pass(i,()=>r.error(!0));function l(){const d=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);r.mergeEvaluated(d)}function c(d,f){return()=>{const w=r.subschema({keyword:d},o);e.assign(i,o),r.mergeValidEvaluated(w,i),f?e.assign(f,(0,ys._)`${d}`):r.setParams({ifClause:d})}}}};function So(r,e){const t=r.schema[e];return t!==void 0&&!(0,$o.alwaysValidSchema)(r,t)}Xn.default=jc;var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0});const xc=Z,Vc={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,xc.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};Jn.default=Vc,Object.defineProperty(xn,"__esModule",{value:!0});const Bc=lr,Lc=Bn,Rc=ur,zc=Ln,qc=Rn,Uc=ho,Hc=zn,Kc=fs,Gc=qn,Wc=Hn,Yc=Kn,Xc=Gn,Jc=Wn,Zc=Yn,Qc=Xn,ed=Jn;function td(r=!1){const e=[Yc.default,Xc.default,Jc.default,Zc.default,Qc.default,ed.default,Hc.default,Kc.default,Uc.default,Gc.default,Wc.default];return r?e.push(Lc.default,zc.default):e.push(Bc.default,Rc.default),e.push(qc.default),e}xn.default=td;var Zn={},Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});const Pe=de,rd={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,Pe.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,Pe._)`{format: ${r}}`},code(r,e){const{gen:t,data:s,$data:n,schema:a,schemaCode:i,it:o}=r,{opts:l,errSchemaPath:c,schemaEnv:d,self:f}=o;if(!l.validateFormats)return;n?w():y();function w(){const S=t.scopeValue("formats",{ref:f.formats,code:l.code.formats}),E=t.const("fDef",(0,Pe._)`${S}[${i}]`),b=t.let("fType"),g=t.let("format");t.if((0,Pe._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>t.assign(b,(0,Pe._)`${E}.type || "string"`).assign(g,(0,Pe._)`${E}.validate`),()=>t.assign(b,(0,Pe._)`"string"`).assign(g,E)),r.fail$data((0,Pe.or)(T(),C()));function T(){return l.strictSchema===!1?Pe.nil:(0,Pe._)`${i} && !${g}`}function C(){const O=d.$async?(0,Pe._)`(${E}.async ? await ${g}(${s}) : ${g}(${s}))`:(0,Pe._)`${g}(${s})`,_=(0,Pe._)`(typeof ${g} == "function" ? ${O} : ${g}.test(${s}))`;return(0,Pe._)`${g} && ${g} !== true && ${b} === ${e} && !${_}`}}function y(){const S=f.formats[a];if(!S){T();return}if(S===!0)return;const[E,b,g]=C(S);E===e&&r.pass(O());function T(){if(l.strictSchema===!1){f.logger.warn(_());return}throw new Error(_());function _(){return`unknown format "${a}" ignored in schema at path "${c}"`}}function C(_){const q=_ instanceof RegExp?(0,Pe.regexpCode)(_):l.code.formats?(0,Pe._)`${l.code.formats}${(0,Pe.getProperty)(a)}`:void 0,z=t.scopeValue("formats",{key:a,ref:_,code:q});return typeof _=="object"&&!(_ instanceof RegExp)?[_.type||"string",_.validate,(0,Pe._)`${z}.validate`]:["string",_,z]}function O(){if(typeof S=="object"&&!(S instanceof RegExp)&&S.async){if(!d.$async)throw new Error("async format in sync schema");return(0,Pe._)`await ${g}(${s})`}return typeof b=="function"?(0,Pe._)`${g}(${s})`:(0,Pe._)`${g}.test(${s})`}}}};Qn.default=rd,Object.defineProperty(Zn,"__esModule",{value:!0});const sd=[Qn.default];Zn.default=sd;var cr={};Object.defineProperty(cr,"__esModule",{value:!0}),cr.contentVocabulary=cr.metadataVocabulary=void 0,cr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],cr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(bn,"__esModule",{value:!0});const nd=$n,ad=En,id=xn,od=Zn,Eo=cr,ld=[nd.default,ad.default,(0,id.default)(),od.default,Eo.metadataVocabulary,Eo.contentVocabulary];bn.default=ld;var ea={},vs={};Object.defineProperty(vs,"__esModule",{value:!0}),vs.DiscrError=void 0;var ko;(function(r){r.Tag="tag",r.Mapping="mapping"})(ko||(vs.DiscrError=ko={})),Object.defineProperty(ea,"__esModule",{value:!0});const dr=de,ta=vs,wo=et,ud=Z,cd={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:r,tagName:e}})=>r===ta.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,dr._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},code(r){const{gen:e,data:t,schema:s,parentSchema:n,it:a}=r,{oneOf:i}=n;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=s.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");const l=e.let("valid",!1),c=e.const("tag",(0,dr._)`${t}${(0,dr.getProperty)(o)}`);e.if((0,dr._)`typeof ${c} == "string"`,()=>d(),()=>r.error(!1,{discrError:ta.DiscrError.Tag,tag:c,tagName:o})),r.ok(l);function d(){const y=w();e.if(!1);for(const S in y)e.elseIf((0,dr._)`${c} === ${S}`),e.assign(l,f(y[S]));e.else(),r.error(!1,{discrError:ta.DiscrError.Mapping,tag:c,tagName:o}),e.endIf()}function f(y){const S=e.name("valid"),E=r.subschema({keyword:"oneOf",schemaProp:y},S);return r.mergeEvaluated(E,dr.Name),S}function w(){var y;const S={},E=g(n);let b=!0;for(let O=0;O<i.length;O++){let _=i[O];_!=null&&_.$ref&&!(0,ud.schemaHasRulesButRef)(_,a.self.RULES)&&(_=wo.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,_==null?void 0:_.$ref),_ instanceof wo.SchemaEnv&&(_=_.schema));const q=(y=_==null?void 0:_.properties)===null||y===void 0?void 0:y[o];if(typeof q!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);b=b&&(E||g(_)),T(q,O)}if(!b)throw new Error(`discriminator: "${o}" must be required`);return S;function g({required:O}){return Array.isArray(O)&&O.includes(o)}function T(O,_){if(O.const)C(O.const,_);else if(O.enum)for(const q of O.enum)C(q,_);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function C(O,_){if(typeof O!="string"||O in S)throw new Error(`discriminator: "${o}" values must be unique strings`);S[O]=_}}}};ea.default=cd;const dd={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};(function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const t=Ii,s=bn,n=ea,a=dd,i=["/properties"],o="http://json-schema.org/draft-07/schema";class l extends t.default{_addVocabularies(){super._addVocabularies(),s.default.forEach(S=>this.addVocabulary(S)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const S=this.opts.$data?this.$dataMetaSchema(a,i):a;this.addMetaSchema(S,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.Ajv=l,r.exports=e=l,r.exports.Ajv=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var c=rs();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=de;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var f=kr;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var w=wr;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return w.default}})})(an,an.exports);var Co=an.exports;const fd=Es(Co);var ra={exports:{}},To={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.formatNames=r.fastFormats=r.fullFormats=void 0;function e(G,Y){return{validate:G,compare:Y}}r.fullFormats={date:e(a,i),time:e(l(!0),c),"date-time":e(w(!0),y),"iso-time":e(l(),d),"iso-date-time":e(w(),S),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:g,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:ae,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:C,int32:{type:"number",validate:q},int64:{type:"number",validate:z},float:{type:"number",validate:J},double:{type:"number",validate:J},password:!0,binary:!0},r.fastFormats={...r.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,y),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,S),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},r.formatNames=Object.keys(r.fullFormats);function t(G){return G%4===0&&(G%100!==0||G%400===0)}const s=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(G){const Y=s.exec(G);if(!Y)return!1;const ee=+Y[1],X=+Y[2],fe=+Y[3];return X>=1&&X<=12&&fe>=1&&fe<=(X===2&&t(ee)?29:n[X])}function i(G,Y){if(G&&Y)return G>Y?1:G<Y?-1:0}const o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function l(G){return function(ee){const X=o.exec(ee);if(!X)return!1;const fe=+X[1],he=+X[2],ge=+X[3],De=X[4],Ne=X[5]==="-"?-1:1,F=+(X[6]||0),v=+(X[7]||0);if(F>23||v>59||G&&!De)return!1;if(fe<=23&&he<=59&&ge<60)return!0;const x=he-v*Ne,P=fe-F*Ne-(x<0?1:0);return(P===23||P===-1)&&(x===59||x===-1)&&ge<61}}function c(G,Y){if(!(G&&Y))return;const ee=new Date("2020-01-01T"+G).valueOf(),X=new Date("2020-01-01T"+Y).valueOf();if(ee&&X)return ee-X}function d(G,Y){if(!(G&&Y))return;const ee=o.exec(G),X=o.exec(Y);if(ee&&X)return G=ee[1]+ee[2]+ee[3],Y=X[1]+X[2]+X[3],G>Y?1:G<Y?-1:0}const f=/t|\s/i;function w(G){const Y=l(G);return function(X){const fe=X.split(f);return fe.length===2&&a(fe[0])&&Y(fe[1])}}function y(G,Y){if(!(G&&Y))return;const ee=new Date(G).valueOf(),X=new Date(Y).valueOf();if(ee&&X)return ee-X}function S(G,Y){if(!(G&&Y))return;const[ee,X]=G.split(f),[fe,he]=Y.split(f),ge=i(ee,fe);if(ge!==void 0)return ge||c(X,he)}const E=/\/|:/,b=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function g(G){return E.test(G)&&b.test(G)}const T=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function C(G){return T.lastIndex=0,T.test(G)}const O=-(2**31),_=2**31-1;function q(G){return Number.isInteger(G)&&G<=_&&G>=O}function z(G){return Number.isInteger(G)}function J(){return!0}const W=/[^\\]\\Z/;function ae(G){if(W.test(G))return!1;try{return new RegExp(G),!0}catch{return!1}}})(To);var Oo={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.formatLimitDefinition=void 0;const e=Co,t=de,s=t.operators,n={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:o,schemaCode:l})=>(0,t.str)`should be ${n[o].okStr} ${l}`,params:({keyword:o,schemaCode:l})=>(0,t._)`{comparison: ${n[o].okStr}, limit: ${l}}`};r.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:a,code(o){const{gen:l,data:c,schemaCode:d,keyword:f,it:w}=o,{opts:y,self:S}=w;if(!y.validateFormats)return;const E=new e.KeywordCxt(w,S.RULES.all.format.definition,"format");E.$data?b():g();function b(){const C=l.scopeValue("formats",{ref:S.formats,code:y.code.formats}),O=l.const("fmt",(0,t._)`${C}[${E.schemaCode}]`);o.fail$data((0,t.or)((0,t._)`typeof ${O} != "object"`,(0,t._)`${O} instanceof RegExp`,(0,t._)`typeof ${O}.compare != "function"`,T(O)))}function g(){const C=E.schema,O=S.formats[C];if(!O||O===!0)return;if(typeof O!="object"||O instanceof RegExp||typeof O.compare!="function")throw new Error(`"${f}": format "${C}" does not define "compare" function`);const _=l.scopeValue("formats",{key:C,ref:O,code:y.code.formats?(0,t._)`${y.code.formats}${(0,t.getProperty)(C)}`:void 0});o.fail$data(T(_))}function T(C){return(0,t._)`${C}.compare(${c}, ${d}) ${n[f].fail} 0`}},dependencies:["format"]};const i=o=>(o.addKeyword(r.formatLimitDefinition),o);r.default=i})(Oo),function(r,e){Object.defineProperty(e,"__esModule",{value:!0});const t=To,s=Oo,n=de,a=new n.Name("fullFormats"),i=new n.Name("fastFormats"),o=(c,d={keywords:!0})=>{if(Array.isArray(d))return l(c,d,t.fullFormats,a),c;const[f,w]=d.mode==="fast"?[t.fastFormats,i]:[t.fullFormats,a],y=d.formats||t.formatNames;return l(c,y,f,w),d.keywords&&(0,s.default)(c),c};o.get=(c,d="full")=>{const w=(d==="fast"?t.fastFormats:t.fullFormats)[c];if(!w)throw new Error(`Unknown format "${c}"`);return w};function l(c,d,f,w){var y,S;(y=(S=c.opts.code).formats)!==null&&y!==void 0||(S.formats=(0,n._)`require("ajv-formats/dist/formats").${w}`);for(const E of d)c.addFormat(E,f[E])}r.exports=e=o,Object.defineProperty(e,"__esModule",{value:!0}),e.default=o}(ra,ra.exports);var pd=ra.exports;const hd=Es(pd),Ao={"zip-code":{type:"string",validate:"/^[0-9]{5}[0-9]{3}$/"},cnpj:{type:"string",validate:Io},email:{type:"string",validate:gd},"phone-br":{type:"string",validate:vd},cpf:{type:"string",validate:Do},"cpf-cnpj":{type:"string",validate:yd}},md=()=>{const r=new fd({allErrors:!0,strict:!1,useDefaults:"empty"});return hd(r),Object.keys(Ao).forEach(e=>r.addFormat(e,Ao[e])),r};function gd(r){if(r.length>254)return!1;const[e,t]=r.split("@");return!e||!t||e.length>64||e.startsWith(".")||e.endsWith(".")||e.includes("..")||!/^[a-zA-Z0-9!#$%&'+-/=?^_{|}~.]+$/.test(e)?!1:/^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/.test(t)}function yd(r){return r=r.replace(/[^\d]+/g,""),r.length==11?Do(r):r.length==14?Io(r):!1}function Do(r){const e=r.replace(/[^\d]+/g,"");if(e.length!==11||e.match(/(\d)\1{10}/))return!1;const t=e.split("").map(n=>+n),s=n=>t.slice(0,n-12).reduce((a,i,o)=>a+i*(n-o),0)*10%11%10;return String(s(10))===r[9]&&String(s(11))===r[10]}function Io(r){const e=r.replace(/[^\d]+/g,"");if(e.length!==14||/^(\d)\1+$/.test(e))return!1;let t=e.length-2,s=e.substring(0,t);const n=e.substring(t);let a=0,i=t-7;for(let l=t;l>=1;l--)a+=Number(s.charAt(t-l))*i--,i<2&&(i=9);let o=a%11<2?0:11-a%11;if(String(o)!=n.charAt(0))return!1;t=t+1,s=r.substring(0,t),a=0,i=t-7;for(let l=t;l>=1;l--)a+=Number(s.charAt(t-l))*i--,i<2&&(i=9);return o=a%11<2?0:11-a%11,String(o)==n.charAt(1)}function vd(r){if(!r)return!1;const e=r.replace(/\D/g,""),t=e.slice(0,2),s=e.slice(2),n=/^[1-9]\d$/.test(t),i=!/^(\d)\1*$/.test(s)&&(s.startsWith("9")&&s.length===9||!s.startsWith("9")&&s.length===8&&/^[23457]/.test(s));return n&&i}const _d=({formSchema:r,initialValue:e={}})=>{const[t,s]=j.useState({}),[n,a]=j.useState({status:void 0,fields:{}}),[i,o]=j.useState({}),[l,c]=j.useState({}),[d,f]=j.useState([]),[w,y]=j.useState({}),[S,E]=j.useState(void 0);j.useEffect(()=>{T()},[]),j.useEffect(()=>{const u=md();u.compile(r),E(u)},[r]);const b=j.useCallback(u=>{const p=d.includes(String(u));return e!=null&&e[u]?l[u]!==(e==null?void 0:e[u])||p:l[u]!==void 0||p},[d,l,e]),g=j.useMemo(()=>Object.keys(n.fields).map(p=>{var $,M;return(M=($=n.fields)==null?void 0:$[p])==null?void 0:M.touched}).some(p=>p),[n]),T=j.useCallback(()=>{Object.keys(e||[]).forEach(u=>{c(p=>({...p,[u]:e[u]}))})},[e]),C=j.useCallback(u=>{var M,L,U,H;const p=((M=u==null?void 0:u.target)==null?void 0:M.type)==="checkbox"?(L=u==null?void 0:u.target)==null?void 0:L.checked:(U=u==null?void 0:u.target)==null?void 0:U.value,$=nn((H=u==null?void 0:u.target)==null?void 0:H.name,r);return($==null?void 0:$.type)==="number"?Number(p):($==null?void 0:$.type)==="boolean"?JSON.parse(String(p)):($==null?void 0:$.type)==="string"?String(p):p},[r]),O=j.useCallback(()=>{const u={};return Object.keys(l).forEach(p=>{const $=String(p).split(".");Oi(u,$,l[p])}),{...u,toJson:()=>JSON.stringify(u)}},[l]),_=j.useCallback(()=>{if(!S)return{result:null,errors:void 0};const{...u}=O(),p=S.compile(r),$=p(u),M=Ti(p);return{result:$,errors:M}},[S,O,r]),q=j.useCallback((u,p)=>{if(!S)return{result:null,errors:void 0};const $=S.getSchema(u);if(!$)return{result:null};const M=$(p);if(!($!=null&&$.errors))return{status:M,errors:{}};const L=Ti($,u);return{status:M,errors:L}},[S]),z=j.useCallback(u=>{const p={[u.target.name]:u},$={...n};$==null||delete $.fields[u.target.name],a($),s(U=>({...U,...p}));const M=C(u),L={[u.target.name]:M};c(U=>({...U,...L}))},[n,C]),J=j.useCallback((u,p)=>{const $={[u]:p};o(M=>({...M,...$}))},[]),W=j.useCallback((u,p)=>{const $={[u]:p};c(M=>({...M,...$}))},[]),ae=j.useCallback(({touched:u})=>{const{errors:p}=_(),$=Object.keys(l).reduce((L,U)=>({...L,[U]:{status:!0}}),{}),M={status:!p,fields:{...$,...p}};return Object.keys(M==null?void 0:M.fields).forEach(L=>{if(u!=null)return M.fields[L].touched=u;M.fields[L].touched=!0}),a(M),M},[l,_]),G=j.useCallback(u=>Object.keys(l).filter(p=>p.split(".").includes(u)||p===u).reduce((p,$)=>({...p,[$]:{status:!0}}),{}),[l]),Y=j.useCallback((u,p)=>{Object.keys(n.fields).forEach(L=>{new RegExp(`(\\.|^)${p}(\\.|$)`).test(L)&&delete n.fields[L]});const $={...n.fields,...u.fields},M=Object.keys($).map(L=>$[L].status).every(L=>L);a(L=>({status:M,fields:{...L.fields,...u.fields}}))},[n.fields]),ee=j.useCallback((u,p,$={})=>{const{touched:M}=$,L=q(u,p),U=G(u);if(L.status===null)return console.warn(`Cannot find schemaID: ${u}`),L;const H={status:!!L.status,fields:{...U,...L.errors}};return Object.keys(H.fields).forEach(D=>{if(M!=null)return H.fields[D].touched=M;H.fields[D].touched=b(D)}),Y(H,u),H},[q,b,Y,G]),X=j.useCallback(u=>{f(p=>[...p,u])},[]),fe=j.useCallback(u=>{var p,$,M,L,U;return(p=n==null?void 0:n.fields[u])!=null&&p.touched&&(($=n==null?void 0:n.fields[u])!=null&&$.status)?{status:"",message:""}:(M=n==null?void 0:n.fields[u])!=null&&M.touched&&!((L=n==null?void 0:n.fields[u])!=null&&L.status)?{status:"error",message:(U=n==null?void 0:n.fields[u])==null?void 0:U.message}:{status:"",message:""}},[n==null?void 0:n.fields]),he=j.useCallback(u=>{const{status:p}=fe(u);return p},[fe]),ge=j.useCallback(u=>{const{message:p}=fe(u);return p},[fe]),De=j.useCallback(u=>nn(u,r),[r]),Ne=j.useCallback(()=>{s({}),o({}),a({status:void 0,fields:{}}),c({})},[]),F=j.useCallback((u,p)=>({...u,onBlurHandler:()=>ee(p,l[p]),onChangeHandler:z,onFocusHandler:()=>X(p)}),[l,X,z,ee]),v=j.useCallback(u=>{if(!u)return;const p=u.value?u:u.querySelectorAll("input,select,textarea")[0]||u;w[p==null?void 0:p.name]||y($=>({...$,[p.name]:p}))},[w]),x=j.useCallback(u=>{var K,Q;const p=["text","email","password","radio","number"],$=De(u);if($===null)return console.error(`Cannot find schemaID: ${u}`),{};const M=$["x-label"]||"",L=$["x-placeholder"]||"",U=$["x-tooltip"]||"",H=w[u],D=((K=H==null?void 0:H.tagName)==null?void 0:K.toLowerCase())||"",k=((Q=H==null?void 0:H.type)==null?void 0:Q.toLowerCase())||"",R={name:u,feedback:ge(u),...M&&{label:M},...L&&{placeholder:L},...U&&{tooltip:U},status:he(u),value:l[u],ref:v,animated:!1};if(D==="input"&&k==="checkbox")return R.checked=l[u],F(R,u);if(D==="input"&&($==null?void 0:$.format)==="date")return R.type="date",R.value=String(l[u]||""),$!=null&&$.formatMinimum&&(R.min=$==null?void 0:$.formatMinimum),$!=null&&$.formatMaximum&&(R.max=$==null?void 0:$.formatMaximum),F(R,u);if(D==="input"&&p.includes(k)||D==="textarea")return R.type=Di($),R.value=String(l[u]||""),F(R,u);if(D==="select"){const ie=$["x-options"]||[];return R.value=l[u],R.onChangeHandler=Fe=>{const He=C(Fe);W(u,He),ee(u,He,{touched:!0})},R.options=ie,R}return R},[v,w,l,De,ge,he,C,W,ee,F]),P=j.useCallback(u=>{const p=(M,L)=>{const U={...M};return Object.keys(U).forEach(H=>{L.test(H)&&delete U[H]}),U},$=new RegExp(`(\\.|^)${u}(\\.|$)`);c(M=>p(M,$)),a(M=>({...M,fields:p(M.fields,$)}))},[]);return{getFormSchema:r,getFormEvent:t,setFormData:s,getFormData:l,getInputValidateStatus:he,getInputValidateMessage:ge,getInputSchema:De,isFormDirty:g,handleFocused:X,handleFormInput:z,handleFormFlagFields:J,handleCustomValue:W,clearFormDataKey:P,getFormValidated:n,getFormFlagFields:i,validateForm:ae,validateFormSchema:ee,parseFormToObject:O,clearFormData:Ne,register:x,ajv:S}};function bd(r){const e=n=>typeof window<"u"?window.matchMedia(n).matches:!1,[t,s]=j.useState(e(r));return j.useEffect(()=>{const n=window.matchMedia(r);function a(){s(e(r))}return a(),n.addListener?n.addListener(a):n.addEventListener("change",a),()=>{n.removeListener?n.removeListener(a):n.removeEventListener("change",a)}},[r]),t}const $d=()=>{const[r,e]=j.useState([]);function t(n){const a={...n,id:Date.now().toString()};e([...r,a])}function s(n){e(r.filter(a=>a.id!==n))}return{notifications:r,setNotifications:e,addNotification:t,removeNotification:s}},Sd=(r=[],e=0)=>{const[t,s]=j.useState(e),[n,a]=j.useState(r),i=j.useMemo(()=>n.length-1,[n]),o=j.useMemo(()=>t+1<=i&&!n[t+1].disabled,[t,i,n]),l=j.useMemo(()=>t-1>=0&&!n[t-1].disabled,[t,n]),c=j.useCallback(()=>{o&&s(z=>z+1)},[o]),d=j.useCallback(()=>{l&&s(z=>z-1)},[l]);function f(z){br(z,n)||a(z)}const w=j.useCallback(z=>n[z],[n]),y=j.useMemo(()=>({index:t,...w(t)}),[t,w]),S=j.useMemo(()=>t===i,[t,i]),E=j.useCallback(z=>n.findIndex(W=>br(W,z)),[n]),b=j.useCallback(z=>n.findIndex(W=>W.name===z),[n]),g=j.useCallback(z=>typeof z=="object"?E(z):typeof z=="string"?b(z):z,[E,b]),T=j.useCallback(z=>{const J=g(z);J!==t&&s(J)},[g,t]),C=j.useCallback(z=>{const J=g(z);return{index:J,...w(J)}},[g,w]),O=j.useCallback(z=>t===g(z),[t,g]),_=j.useCallback(z=>{const W=[...n].map((ae,G)=>(ae.disabled=G>g(z),ae));a(W)},[n,g]);function q(z){const J=[...n],W=Array.isArray(z)?z.map(ae=>g(ae)):[g(z)];return J.map((ae,G)=>(ae.disabled=!!W.includes(G),ae))}return[{getSteps:n,getStep:C,getStepSelected:y,getStepIndexByName:b,setSteps:f,setStepSelected:T,goToNextStep:c,goToPrevStep:d,canGoToNextStep:o,canGoToPrevStep:l,isStep:O,isLastStep:S,disableSteps:q,disableStepsAfter:_}]};se.DsAccordion=Ys,se.DsActiveTags=mi,se.DsButton=mr,se.DsCaption=Ns,se.DsCard=Ps,se.DsCheckbox=Fs,se.DsContainer=Xr,se.DsEditableSelect=yi,se.DsFlexElement=ze,se.DsFlexLayout=Dt,se.DsGridElement=fi,se.DsGridLayout=Zr,se.DsHR=js,se.DsHeading=Ms,se.DsIcon=ke,se.DsIndicator=bl,se.DsInlineEditable=Xs,se.DsInput=rr,se.DsLoading=Gr,se.DsModal=Js,se.DsNotification=Qr,se.DsNotificationList=en,se.DsOption=Ls,se.DsParagraph=At,se.DsPasswordConfirmation=Qs,se.DsProgress=zs,se.DsSelect=qs,se.DsSpacer=dt,se.DsStepper=$i,se.DsSubtitle=ii,se.DsTable=Ei,se.DsTabs=wl,se.DsTextArea=Hs,se.DsTooltip=zt,se.DsTwoColumns=tn,se.DsWrapper=Ut,se.ThemeProvider=wi,se.customAssign=Oi,se.getInputTypeByFormat=Di,se.getSchemaProperties=nn,se.isEqual=br,se.isValidObject=Ai,se.parseOptionValue=Ol,se.useForm=_d,se.useMediaQuery=bd,se.useNotification=$d,se.useStepper=Sd,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
|