@applica-software-guru/react-admin 1.5.344 → 1.5.345

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.
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteWithConfirmButton.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-buttons/DeleteWithConfirmButton.tsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,OAAO,EAAE,QAAQ,EAAsF,MAAM,SAAS,CAAC;AAEvH,OAAO,EAAW,4BAA4B,IAAI,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAC3G,OAAO,EAAO,OAAO,EAAwB,MAAM,eAAe,CAAC;AAInE,KAAK,4BAA4B,CAAC,UAAU,SAAS,QAAQ,GAAG,QAAQ,IACtE,8BAA8B,CAAC,UAAU,CAAC,GAAG;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEJ,iBAAS,uBAAuB,CAAC,UAAU,SAAS,QAAQ,GAAG,GAAG,EAChE,KAAK,EAAE,4BAA4B,CAAC,UAAU,CAAC,GAC9C,GAAG,CAAC,OAAO,CA6Jb;kBA/JQ,uBAAuB;;;;;;;;;;;;;;;;;AAiLhC,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"DeleteWithConfirmButton.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-buttons/DeleteWithConfirmButton.tsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,OAAO,EAAE,QAAQ,EAAsF,MAAM,SAAS,CAAC;AAEvH,OAAO,EAAW,4BAA4B,IAAI,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAC3G,OAAO,EAAO,OAAO,EAAwB,MAAM,eAAe,CAAC;AAInE,KAAK,4BAA4B,CAAC,UAAU,SAAS,QAAQ,GAAG,QAAQ,IACtE,8BAA8B,CAAC,UAAU,CAAC,GAAG;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEJ,iBAAS,uBAAuB,CAAC,UAAU,SAAS,QAAQ,GAAG,GAAG,EAChE,KAAK,EAAE,4BAA4B,CAAC,UAAU,CAAC,GAC9C,GAAG,CAAC,OAAO,CAoKb;kBAtKQ,uBAAuB;;;;;;;;;;;;;;;;;AAwLhC,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -221,7 +221,7 @@ function print() { __p += __j.call(arguments, '') }
221
221
  }`;var Ge=eb(function(){return at(B,Te+"return "+he).apply(n,q)});if(Ge.source=he,Lp(Ge))throw Ge;return Ge}function l9(a){return ut(a).toLowerCase()}function c9(a){return ut(a).toUpperCase()}function u9(a,c,v){if(a=ut(a),a&&(v||c===n))return c1(a);if(!a||!(c=qn(c)))return a;var S=jr(a),j=jr(c),B=u1(S,j),q=d1(S,j)+1;return Vo(S,B,q).join("")}function d9(a,c,v){if(a=ut(a),a&&(v||c===n))return a.slice(0,p1(a)+1);if(!a||!(c=qn(c)))return a;var S=jr(a),j=d1(S,jr(c))+1;return Vo(S,0,j).join("")}function f9(a,c,v){if(a=ut(a),a&&(v||c===n))return a.replace(Tt,"");if(!a||!(c=qn(c)))return a;var S=jr(a),j=u1(S,jr(c));return Vo(S,j).join("")}function p9(a,c){var v=M,S=_;if(_t(c)){var j="separator"in c?c.separator:j;v="length"in c?He(c.length):v,S="omission"in c?qn(c.omission):S}a=ut(a);var B=a.length;if(hs(a)){var q=jr(a);B=q.length}if(v>=B)return a;var Z=v-gs(S);if(Z<1)return S;var oe=q?Vo(q,0,Z).join(""):a.slice(0,Z);if(j===n)return oe+S;if(q&&(Z+=oe.length-Z),Np(j)){if(a.slice(Z).search(j)){var ue,fe=oe;for(j.global||(j=tp(j.source,ut(gc.exec(j))+"g")),j.lastIndex=0;ue=j.exec(fe);)var he=ue.index;oe=oe.slice(0,he===n?Z:he)}}else if(a.indexOf(qn(j),Z)!=Z){var we=oe.lastIndexOf(j);we>-1&&(oe=oe.slice(0,we))}return oe+S}function h9(a){return a=ut(a),a&&as.test(a)?a.replace(ss,z8):a}var g9=ws(function(a,c,v){return a+(v?" ":"")+c.toUpperCase()}),Wp=ty("toUpperCase");function Jy(a,c,v){return a=ut(a),c=v?n:c,c===n?L8(a)?G8(a):P8(a):a.match(c)||[]}var eb=Ye(function(a,c){try{return Hn(a,n,c)}catch(v){return Lp(v)?v:new Ne(v)}}),m9=co(function(a,c){return lr(c,function(v){v=Wr(v),ao(a,v,Dp(a[v],a))}),a});function v9(a){var c=a==null?0:a.length,v=ke();return a=c?jt(a,function(S){if(typeof S[1]!="function")throw new cr(s);return[v(S[0]),S[1]]}):[],Ye(function(S){for(var j=-1;++j<c;){var B=a[j];if(Hn(B[0],this,S))return Hn(B[1],this,S)}})}function y9(a){return zI(dr(a,g))}function zp(a){return function(){return a}}function b9(a,c){return a==null||a!==a?c:a}var x9=ry(),C9=ry(!0);function Mn(a){return a}function Up(a){return M1(typeof a=="function"?a:dr(a,g))}function w9(a){return F1(dr(a,g))}function S9(a,c){return D1(a,dr(c,g))}var A9=Ye(function(a,c){return function(v){return Va(v,a,c)}}),E9=Ye(function(a,c){return function(v){return Va(a,v,c)}});function Hp(a,c,v){var S=nn(c),j=Lc(c,S);v==null&&!(_t(c)&&(j.length||!S.length))&&(v=c,c=a,a=this,j=Lc(c,nn(c)));var B=!(_t(v)&&"chain"in v)||!!v.chain,q=fo(a);return lr(j,function(Z){var oe=c[Z];a[Z]=oe,q&&(a.prototype[Z]=function(){var ue=this.__chain__;if(B||ue){var fe=a(this.__wrapped__),he=fe.__actions__=jn(this.__actions__);return he.push({func:oe,args:arguments,thisArg:a}),fe.__chain__=ue,fe}return oe.apply(a,Fo([this.value()],arguments))})}),a}function T9(){return on._===this&&(on._=Q8),this}function Gp(){}function I9(a){return a=He(a),Ye(function(c){return B1(c,a)})}var O9=Sp(jt),P9=Sp(o1),j9=Sp(Yf);function tb(a){return jp(a)?Kf(Wr(a)):sO(a)}function R9(a){return function(c){return a==null?n:wi(a,c)}}var k9=iy(),M9=iy(!0);function qp(){return[]}function Yp(){return!1}function _9(){return{}}function F9(){return""}function D9(){return!0}function B9(a,c){if(a=He(a),a<1||a>z)return[];var v=$,S=hn(a,$);c=ke(c),a-=$;for(var j=Qf(S,c);++v<a;)c(v);return j}function L9(a){return We(a)?jt(a,Wr):Yn(a)?[a]:jn(Cy(ut(a)))}function N9(a){var c=++X8;return ut(a)+c}var $9=Uc(function(a,c){return a+c},0),V9=Ap("ceil"),W9=Uc(function(a,c){return a/c},1),z9=Ap("floor");function U9(a){return a&&a.length?Bc(a,Mn,cp):n}function H9(a,c){return a&&a.length?Bc(a,ke(c,2),cp):n}function G9(a){return a1(a,Mn)}function q9(a,c){return a1(a,ke(c,2))}function Y9(a){return a&&a.length?Bc(a,Mn,pp):n}function K9(a,c){return a&&a.length?Bc(a,ke(c,2),pp):n}var X9=Uc(function(a,c){return a*c},1),Z9=Ap("round"),Q9=Uc(function(a,c){return a-c},0);function J9(a){return a&&a.length?Zf(a,Mn):0}function eR(a,c){return a&&a.length?Zf(a,ke(c,2)):0}return F.after=w7,F.ary=ky,F.assign=cj,F.assignIn=Gy,F.assignInWith=ru,F.assignWith=uj,F.at=dj,F.before=My,F.bind=Dp,F.bindAll=m9,F.bindKey=_y,F.castArray=_7,F.chain=Py,F.chunk=zO,F.compact=UO,F.concat=HO,F.cond=v9,F.conforms=y9,F.constant=zp,F.countBy=JP,F.create=fj,F.curry=Fy,F.curryRight=Dy,F.debounce=By,F.defaults=pj,F.defaultsDeep=hj,F.defer=S7,F.delay=A7,F.difference=GO,F.differenceBy=qO,F.differenceWith=YO,F.drop=KO,F.dropRight=XO,F.dropRightWhile=ZO,F.dropWhile=QO,F.fill=JO,F.filter=t7,F.flatMap=o7,F.flatMapDeep=i7,F.flatMapDepth=s7,F.flatten=Ey,F.flattenDeep=eP,F.flattenDepth=tP,F.flip=E7,F.flow=x9,F.flowRight=C9,F.fromPairs=nP,F.functions=Cj,F.functionsIn=wj,F.groupBy=a7,F.initial=oP,F.intersection=iP,F.intersectionBy=sP,F.intersectionWith=aP,F.invert=Aj,F.invertBy=Ej,F.invokeMap=c7,F.iteratee=Up,F.keyBy=u7,F.keys=nn,F.keysIn=kn,F.map=Zc,F.mapKeys=Ij,F.mapValues=Oj,F.matches=w9,F.matchesProperty=S9,F.memoize=Jc,F.merge=Pj,F.mergeWith=qy,F.method=A9,F.methodOf=E9,F.mixin=Hp,F.negate=eu,F.nthArg=I9,F.omit=jj,F.omitBy=Rj,F.once=T7,F.orderBy=d7,F.over=O9,F.overArgs=I7,F.overEvery=P9,F.overSome=j9,F.partial=Bp,F.partialRight=Ly,F.partition=f7,F.pick=kj,F.pickBy=Yy,F.property=tb,F.propertyOf=R9,F.pull=dP,F.pullAll=Iy,F.pullAllBy=fP,F.pullAllWith=pP,F.pullAt=hP,F.range=k9,F.rangeRight=M9,F.rearg=O7,F.reject=g7,F.remove=gP,F.rest=P7,F.reverse=_p,F.sampleSize=v7,F.set=_j,F.setWith=Fj,F.shuffle=y7,F.slice=mP,F.sortBy=C7,F.sortedUniq=SP,F.sortedUniqBy=AP,F.split=o9,F.spread=j7,F.tail=EP,F.take=TP,F.takeRight=IP,F.takeRightWhile=OP,F.takeWhile=PP,F.tap=UP,F.throttle=R7,F.thru=Xc,F.toArray=zy,F.toPairs=Ky,F.toPairsIn=Xy,F.toPath=L9,F.toPlainObject=Hy,F.transform=Dj,F.unary=k7,F.union=jP,F.unionBy=RP,F.unionWith=kP,F.uniq=MP,F.uniqBy=_P,F.uniqWith=FP,F.unset=Bj,F.unzip=Fp,F.unzipWith=Oy,F.update=Lj,F.updateWith=Nj,F.values=Es,F.valuesIn=$j,F.without=DP,F.words=Jy,F.wrap=M7,F.xor=BP,F.xorBy=LP,F.xorWith=NP,F.zip=$P,F.zipObject=VP,F.zipObjectDeep=WP,F.zipWith=zP,F.entries=Ky,F.entriesIn=Xy,F.extend=Gy,F.extendWith=ru,Hp(F,F),F.add=$9,F.attempt=eb,F.camelCase=Uj,F.capitalize=Zy,F.ceil=V9,F.clamp=Vj,F.clone=F7,F.cloneDeep=B7,F.cloneDeepWith=L7,F.cloneWith=D7,F.conformsTo=N7,F.deburr=Qy,F.defaultTo=b9,F.divide=W9,F.endsWith=Hj,F.eq=kr,F.escape=Gj,F.escapeRegExp=qj,F.every=e7,F.find=n7,F.findIndex=Sy,F.findKey=gj,F.findLast=r7,F.findLastIndex=Ay,F.findLastKey=mj,F.floor=z9,F.forEach=jy,F.forEachRight=Ry,F.forIn=vj,F.forInRight=yj,F.forOwn=bj,F.forOwnRight=xj,F.get=$p,F.gt=$7,F.gte=V7,F.has=Sj,F.hasIn=Vp,F.head=Ty,F.identity=Mn,F.includes=l7,F.indexOf=rP,F.inRange=Wj,F.invoke=Tj,F.isArguments=Ei,F.isArray=We,F.isArrayBuffer=W7,F.isArrayLike=Rn,F.isArrayLikeObject=Wt,F.isBoolean=z7,F.isBuffer=Wo,F.isDate=U7,F.isElement=H7,F.isEmpty=G7,F.isEqual=q7,F.isEqualWith=Y7,F.isError=Lp,F.isFinite=K7,F.isFunction=fo,F.isInteger=Ny,F.isLength=tu,F.isMap=$y,F.isMatch=X7,F.isMatchWith=Z7,F.isNaN=Q7,F.isNative=J7,F.isNil=tj,F.isNull=ej,F.isNumber=Vy,F.isObject=_t,F.isObjectLike=Bt,F.isPlainObject=qa,F.isRegExp=Np,F.isSafeInteger=nj,F.isSet=Wy,F.isString=nu,F.isSymbol=Yn,F.isTypedArray=As,F.isUndefined=rj,F.isWeakMap=oj,F.isWeakSet=ij,F.join=lP,F.kebabCase=Yj,F.last=pr,F.lastIndexOf=cP,F.lowerCase=Kj,F.lowerFirst=Xj,F.lt=sj,F.lte=aj,F.max=U9,F.maxBy=H9,F.mean=G9,F.meanBy=q9,F.min=Y9,F.minBy=K9,F.stubArray=qp,F.stubFalse=Yp,F.stubObject=_9,F.stubString=F9,F.stubTrue=D9,F.multiply=X9,F.nth=uP,F.noConflict=T9,F.noop=Gp,F.now=Qc,F.pad=Zj,F.padEnd=Qj,F.padStart=Jj,F.parseInt=e9,F.random=zj,F.reduce=p7,F.reduceRight=h7,F.repeat=t9,F.replace=n9,F.result=Mj,F.round=Z9,F.runInContext=te,F.sample=m7,F.size=b7,F.snakeCase=r9,F.some=x7,F.sortedIndex=vP,F.sortedIndexBy=yP,F.sortedIndexOf=bP,F.sortedLastIndex=xP,F.sortedLastIndexBy=CP,F.sortedLastIndexOf=wP,F.startCase=i9,F.startsWith=s9,F.subtract=Q9,F.sum=J9,F.sumBy=eR,F.template=a9,F.times=B9,F.toFinite=po,F.toInteger=He,F.toLength=Uy,F.toLower=l9,F.toNumber=hr,F.toSafeInteger=lj,F.toString=ut,F.toUpper=c9,F.trim=u9,F.trimEnd=d9,F.trimStart=f9,F.truncate=p9,F.unescape=h9,F.uniqueId=N9,F.upperCase=g9,F.upperFirst=Wp,F.each=jy,F.eachRight=Ry,F.first=Ty,Hp(F,function(){var a={};return $r(F,function(c,v){yt.call(F.prototype,v)||(a[v]=c)}),a}(),{chain:!1}),F.VERSION=r,lr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){F[a].placeholder=F}),lr(["drop","take"],function(a,c){Ze.prototype[a]=function(v){v=v===n?1:tn(He(v),0);var S=this.__filtered__&&!c?new Ze(this):this.clone();return S.__filtered__?S.__takeCount__=hn(v,S.__takeCount__):S.__views__.push({size:hn(v,$),type:a+(S.__dir__<0?"Right":"")}),S},Ze.prototype[a+"Right"]=function(v){return this.reverse()[a](v).reverse()}}),lr(["filter","map","takeWhile"],function(a,c){var v=c+1,S=v==G||v==V;Ze.prototype[a]=function(j){var B=this.clone();return B.__iteratees__.push({iteratee:ke(j,3),type:v}),B.__filtered__=B.__filtered__||S,B}}),lr(["head","last"],function(a,c){var v="take"+(c?"Right":"");Ze.prototype[a]=function(){return this[v](1).value()[0]}}),lr(["initial","tail"],function(a,c){var v="drop"+(c?"":"Right");Ze.prototype[a]=function(){return this.__filtered__?new Ze(this):this[v](1)}}),Ze.prototype.compact=function(){return this.filter(Mn)},Ze.prototype.find=function(a){return this.filter(a).head()},Ze.prototype.findLast=function(a){return this.reverse().find(a)},Ze.prototype.invokeMap=Ye(function(a,c){return typeof a=="function"?new Ze(this):this.map(function(v){return Va(v,a,c)})}),Ze.prototype.reject=function(a){return this.filter(eu(ke(a)))},Ze.prototype.slice=function(a,c){a=He(a);var v=this;return v.__filtered__&&(a>0||c<0)?new Ze(v):(a<0?v=v.takeRight(-a):a&&(v=v.drop(a)),c!==n&&(c=He(c),v=c<0?v.dropRight(-c):v.take(c-a)),v)},Ze.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Ze.prototype.toArray=function(){return this.take($)},$r(Ze.prototype,function(a,c){var v=/^(?:filter|find|map|reject)|While$/.test(c),S=/^(?:head|last)$/.test(c),j=F[S?"take"+(c=="last"?"Right":""):c],B=S||/^find/.test(c);j&&(F.prototype[c]=function(){var q=this.__wrapped__,Z=S?[1]:arguments,oe=q instanceof Ze,ue=Z[0],fe=oe||We(q),he=function(Xe){var Je=j.apply(F,Fo([Xe],Z));return S&&we?Je[0]:Je};fe&&v&&typeof ue=="function"&&ue.length!=1&&(oe=fe=!1);var we=this.__chain__,Te=!!this.__actions__.length,Me=B&&!we,Ge=oe&&!Te;if(!B&&fe){q=Ge?q:new Ze(this);var _e=a.apply(q,Z);return _e.__actions__.push({func:Xc,args:[he],thisArg:n}),new ur(_e,we)}return Me&&Ge?a.apply(this,Z):(_e=this.thru(he),Me?S?_e.value()[0]:_e.value():_e)})}),lr(["pop","push","shift","sort","splice","unshift"],function(a){var c=wc[a],v=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",S=/^(?:pop|shift)$/.test(a);F.prototype[a]=function(){var j=arguments;if(S&&!this.__chain__){var B=this.value();return c.apply(We(B)?B:[],j)}return this[v](function(q){return c.apply(We(q)?q:[],j)})}}),$r(Ze.prototype,function(a,c){var v=F[c];if(v){var S=v.name+"";yt.call(bs,S)||(bs[S]=[]),bs[S].push({name:c,func:v})}}),bs[zc(n,A).name]=[{name:"wrapper",func:n}],Ze.prototype.clone=hI,Ze.prototype.reverse=gI,Ze.prototype.value=mI,F.prototype.at=HP,F.prototype.chain=GP,F.prototype.commit=qP,F.prototype.next=YP,F.prototype.plant=XP,F.prototype.reverse=ZP,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=QP,F.prototype.first=F.prototype.head,_a&&(F.prototype[_a]=KP),F},ms=q8();vi?((vi.exports=ms)._=ms,Uf._=ms):on._=ms}).call(On)})(Ed,Ed.exports);var Qe=Ed.exports;const ie=Br(Qe),nne=["e-","entities/"];function rne(e){let t=e;return nne.forEach(n=>{t=t!=null&&t.startsWith(n)?t==null?void 0:t.substring(n.length):t}),t}function one(e,t){var n,r;return((n=t.options)==null?void 0:n.group)===e.id||!((r=t.options)!=null&&r.group)&&e.id==="admin"}function ine(e,t){const n=rne(e.name);return(t==null?void 0:t.includes(`${n}:list`))||(t==null?void 0:t.includes(`${n}:find`))}function Og(e,t){let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=Og(o.children,t),n))return n}return n}function J5(e,t,n){let r=e.find(o=>["group","collapse"].indexOf(o.type)!==-1&&one(o,t));if(!r)for(let o=0;o<e.length;o++){const i=e[o];if(i.children&&(r=J5(i.children,t),r))return r}return r}function eA(e,t){let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=eA(o.children,t),n))return n}return n}function tA(e){return e?e.type==="item"?!0:(e.children&&(e.children=e.children.filter(tA)),e.children&&e.children.length>0):!1}function nA(e){return e.children&&e.children.forEach(t=>{t.parent=e,nA(t)}),e}function sne(e,t,n,r,o){function i(g){return g.title=r(g.title,{_:g.title}),g.children&&g.children.forEach(h=>i(h)),g}const s=Object.keys(t);function l(g,h){return g.children&&(g.children=g.children.filter(m=>{if(m.resource===!1){const y=m.roles||[];return!!(y.length===0||y.some(x=>o.includes(x)))}return m.type==="item"?h.includes(m.id):(l(m,h),m.children&&m.children.length>0)})),g}const u=ie.cloneDeep(e).map(g=>({children:[],...g,type:g.type||"group"})).map(i).map(g=>l(g,s)),d=Object.values(t).map(g=>{var h;return((h=g.options)==null?void 0:h.group)||"admin"}).filter((g,h,m)=>m.indexOf(g)===h).filter(g=>g!==void 0&&eA(e,g)===null).map(g=>({id:g,title:r(`ra.menu.group.${g}`),type:"group",icon:ze.AntDesignOutlined,children:[]})),f=[...u,...d];return Object.values(t).forEach(g=>{var I,w,T,O;const h=J5(f,g),m=(I=h==null?void 0:h.children)==null?void 0:I.find(R=>R.id===g.name),y=(w=h==null?void 0:h.children)==null?void 0:w.some(R=>R.id===g.name),x=(m==null?void 0:m.roles)||((T=g.options)==null?void 0:T.roles)||[],C=!x||x.length===0||x.some(R=>o.includes(R));if(!ine(g,n)||g.list||!C){y&&h&&h.children&&((O=h==null?void 0:h.children)==null?void 0:O.length)>0&&(h.children=h.children.filter(R=>R.id!==g.name));return}h&&(h.children||(h.children=[]))}),f.filter(tA).map(nA)}function rl(){throw new Error("Not implemented")}const rA={openItem:[],openComponent:"buttons",selectedID:null,drawerOpen:!1,error:null,menu:[],activeItem:rl,openDrawer:rl,activeID:rl,hasError:rl,setMenu:rl},oA=P.createContext(rA);function iA({menu:e,children:t}){const[n,r]=P.useState({...rA,menu:e});function o(d){r(f=>({...f,menu:d}))}function i(d){r(f=>({...f,openItem:d}))}function s(d){r(f=>({...f,selectedID:d}))}function l(d){r(f=>({...f,drawerOpen:d}))}function u(d){r(f=>({...f,error:d}))}return P.useEffect(()=>{o(e)},[e]),p.jsx(oA.Provider,{value:{...n,setMenu:o,activeItem:i,openDrawer:l,activeID:s,hasError:u},children:t})}function Af(){return P.useContext(oA)}function G0(){const e=re.useResourceDefinitions(),{isLoading:t,data:n}=re.useGetIdentity(),r=!!n&&!!n.id,{permissions:o}=re.usePermissions(r),{menu:i}=Af(),s=re.useTranslate(),l=P.useMemo(()=>{if(t||!n)return null;const f=((n==null?void 0:n.roles)||[]).map(h=>h.id);return sne(i,e,o,s,f)},[t,n,e,o,s,i]),u=P.useMemo(()=>t,[t]);function d(f){if(l)return Og(l,f)}return{menu:l,isLoading:u,getItem:d,findInMenu:u?()=>{}:Og}}function sA(){const e=re.useTranslate(),{isLoading:t,menu:n,findInMenu:r}=G0(),{pathname:o}=Hi.useLocation();return P.useMemo(()=>{var h;const i=o.split("/").filter(m=>m),s=ie.cloneDeep(n);let l=o,u=r(s,o);if((!u||u.type==="collapse"||u.type==="group")&&(u=r(s,i[i.length-1]),l=u?u.id:l),!u||u.type==="collapse"||u.type==="group")for(let m=i.length;m>=0;m--){const y=i.slice(0,m).join("/");if(u=r(s,y),u){l=u.id;break}}const d=(h=u==null?void 0:u.url)==null?void 0:h.split("/"),f=(d==null?void 0:d.length)||0;if(i.length>=f){const m=i[i.length-1];if(u){const y=m==="create"||o===u.url?"create":"edit",x=`resources.${l}.breadcrumbs.${y}`,C={id:`${l}-${y}`,type:"item",title:e(x,{_:e(x,{_:x})}),url:o,breadcrumbs:!0,parent:u};u.type="collapse",u.breadcrumbs=!0,u.children=u.children||[],u.children.push(C),u=C}}let g=[];if(u){let m={...u,last:!0};for(;m;)g.push(m),m=m.parent;g=g.reverse()}return{isLoading:t,navigation:{items:s},breadcrumbs:g}},[t,o,n,r,e])}function Dl(){return Af()}function Lr(e,t,n){const r=ie.chain((e==null?void 0:e.sx)??{}).cloneDeepWith(s=>ie.isFunction(s)?s:void 0).value();n!=null&&n.defaults?ie.defaultsDeep(r,t):ie.merge(r,t);const[o,i]=P.useState(r);return P.useEffect(()=>{ie.isEqual(o,r)||i(r)},[o,r]),o}function ane(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}function Ji(e){this._maxSize=e,this.clear()}Ji.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Ji.prototype.get=function(e){return this._values[e]};Ji.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var lne=/[^.^\]^[]+|(?=\[\]|\.\.)/g,aA=/^\d+$/,cne=/^\d/,une=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,dne=/^\s*(['"]?)(.*?)(\1)\s*$/,q0=512,uC=new Ji(q0),dC=new Ji(q0),fC=new Ji(q0),zi={Cache:Ji,split:Pg,normalizePath:Ph,setter:function(e){var t=Ph(e);return dC.get(e)||dC.set(e,function(r,o){for(var i=0,s=t.length,l=r;i<s-1;){var u=t[i];if(u==="__proto__"||u==="constructor"||u==="prototype")return r;l=l[t[i++]]}l[t[i]]=o})},getter:function(e,t){var n=Ph(e);return fC.get(e)||fC.set(e,function(o){for(var i=0,s=n.length;i<s;)if(o!=null||!t)o=o[n[i++]];else return;return o})},join:function(e){return e.reduce(function(t,n){return t+(Y0(n)||aA.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){fne(Array.isArray(e)?e:Pg(e),t,n)}};function Ph(e){return uC.get(e)||uC.set(e,Pg(e).map(function(t){return t.replace(dne,"$2")}))}function Pg(e){return e.match(lne)||[""]}function fne(e,t,n){var r=e.length,o,i,s,l;for(i=0;i<r;i++)o=e[i],o&&(gne(o)&&(o='"'+o+'"'),l=Y0(o),s=!l&&/^\d+$/.test(o),t.call(n,o,l,s,i,e))}function Y0(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function pne(e){return e.match(cne)&&!e.match(aA)}function hne(e){return une.test(e)}function gne(e){return!Y0(e)&&(pne(e)||hne(e))}const mne=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Ef=e=>e.match(mne)||[],Tf=e=>e[0].toUpperCase()+e.slice(1),K0=(e,t)=>Ef(e).join(t).toLowerCase(),lA=e=>Ef(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),vne=e=>Tf(lA(e)),yne=e=>K0(e,"_"),bne=e=>K0(e,"-"),xne=e=>Tf(K0(e," ")),Cne=e=>Ef(e).map(Tf).join(" ");var jh={words:Ef,upperFirst:Tf,camelCase:lA,pascalCase:vne,snakeCase:yne,kebabCase:bne,sentenceCase:xne,titleCase:Cne},X0={exports:{}};X0.exports=function(e){return cA(wne(e),e)};X0.exports.array=cA;function cA(e,t){var n=e.length,r=new Array(n),o={},i=n,s=Sne(t),l=Ane(e);for(t.forEach(function(d){if(!l.has(d[0])||!l.has(d[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||u(e[i],i,new Set);return r;function u(d,f,g){if(g.has(d)){var h;try{h=", node was:"+JSON.stringify(d)}catch{h=""}throw new Error("Cyclic dependency"+h)}if(!l.has(d))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(d));if(!o[f]){o[f]=!0;var m=s.get(d)||new Set;if(m=Array.from(m),f=m.length){g.add(d);do{var y=m[--f];u(y,l.get(y),g)}while(f);g.delete(d)}r[--n]=d}}}function wne(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var o=e[n];t.add(o[0]),t.add(o[1])}return Array.from(t)}function Sne(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var o=e[n];t.has(o[0])||t.set(o[0],new Set),t.has(o[1])||t.set(o[1],new Set),t.get(o[0]).add(o[1])}return t}function Ane(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var Ene=X0.exports;const Tne=Br(Ene),Ine=Object.prototype.toString,One=Error.prototype.toString,Pne=RegExp.prototype.toString,jne=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Rne=/^Symbol\((.*)\)(.*)$/;function kne(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function pC(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return kne(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return jne.call(e).replace(Rne,"Symbol($1)");const r=Ine.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+One.call(e)+"]":r==="RegExp"?Pne.call(e):null}function ri(e,t){let n=pC(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let i=pC(this[r],t);return i!==null?i:o},2)}function uA(e){return e==null?[]:[].concat(e)}let dA,fA,pA,Mne=/\$\{\s*(\w+)\s*\}/g;dA=Symbol.toStringTag;class hC{constructor(t,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[dA]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],uA(t).forEach(i=>{if(Bn.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}fA=Symbol.hasInstance;pA=Symbol.toStringTag;class Bn extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(Mne,(o,i)=>ri(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,i){const s=new hC(t,n,r,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[pA]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Bn)}static[fA](t){return hC[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Ur={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${ri(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ri(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${ri(n,!0)}\``+o}},Dn={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Ko={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},jg={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},_ne={isValue:"${path} field must be ${value}"},$u={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Fne={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Dne={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${ri(n,!0)}\``;if(n.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${ri(n,!0)}\``}return Bn.formatError(Ur.notType,e)}};Object.assign(Object.create(null),{mixed:Ur,string:Dn,number:Ko,date:jg,object:$u,array:Fne,boolean:_ne,tuple:Dne});const Z0=e=>e&&e.__isYupSchema__;class Td{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,s=typeof r=="function"?r:(...l)=>l.every(u=>u===r);return new Td(t,(l,u)=>{var d;let f=s(...l)?o:i;return(d=f==null?void 0:f(u))!=null?d:u})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,t,n);if(o===void 0||o===t)return t;if(!Z0(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const Su={context:"$",value:"."};class es{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Su.context,this.isValue=this.key[0]===Su.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Su.context:this.isValue?Su.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&zi.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let o=this.isContext?r:this.isValue?t:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}es.prototype.__isYupRef=!0;const wo=e=>e==null;function ks(e){function t({value:n,path:r="",options:o,originalValue:i,schema:s},l,u){const{name:d,test:f,params:g,message:h,skipAbsent:m}=e;let{parent:y,context:x,abortEarly:C=s.spec.abortEarly,disableStackTrace:A=s.spec.disableStackTrace}=o;function I(_){return es.isRef(_)?_.getValue(n,y,x):_}function w(_={}){const U=Object.assign({value:n,originalValue:i,label:s.spec.label,path:_.path||r,spec:s.spec,disableStackTrace:_.disableStackTrace||A},g,_.params);for(const G of Object.keys(U))U[G]=I(U[G]);const H=new Bn(Bn.formatError(_.message||h,U),n,U.path,_.type||d,U.disableStackTrace);return H.params=U,H}const T=C?l:u;let O={path:r,parent:y,type:d,from:o.from,createError:w,resolve:I,options:o,originalValue:i,schema:s};const R=_=>{Bn.isError(_)?T(_):_?u(null):T(w())},k=_=>{Bn.isError(_)?T(_):l(_)};if(m&&wo(n))return R(!0);let N;try{var M;if(N=f.call(O,n,O),typeof((M=N)==null?void 0:M.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${O.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(N).then(R,k)}}catch(_){k(_);return}R(N)}return t.OPTIONS=e,t}function Bne(e,t,n,r=n){let o,i,s;return t?(zi.forEach(t,(l,u,d)=>{let f=u?l.slice(1,l.length-1):l;e=e.resolve({context:r,parent:o,value:n});let g=e.type==="tuple",h=d?parseInt(f,10):0;if(e.innerType||g){if(g&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(n&&h>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[h],e=g?e.spec.types[h]:e.innerType}if(!d){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);o=n,n=n&&n[f],e=e.fields[f]}i=f,s=u?"["+l+"]":"."+l}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class Id extends Set{describe(){const t=[];for(const n of this.values())t.push(es.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Id(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Ys(e,t=new Map){if(Z0(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Ys(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,o]of e.entries())n.set(r,Ys(o,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Ys(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,o]of Object.entries(e))n[r]=Ys(o,t)}else throw Error(`Unable to clone ${e}`);return n}class Tr{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Id,this._blacklist=new Id,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ur.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Ys(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(s=>{i.test(s.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(o&&wo(i))return i;let s=ri(t),l=ri(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
222
222
 
223
223
  attempted value: ${s}
224
- `+(l!==s?`result of cast: ${l}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:s=t,strict:l=this.spec.strict}=n,u=t;l||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let f of Object.values(this.internalTests))f&&d.push(f);this.runTests({path:i,value:u,originalValue:s,options:n,tests:d},r,f=>{if(f.length)return o(f,u);this.runTests({path:i,value:u,originalValue:s,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:s,originalValue:l,path:u,options:d}=t,f=x=>{o||(o=!0,n(x,s))},g=x=>{o||(o=!0,r(x,s))},h=i.length,m=[];if(!h)return g([]);let y={value:s,originalValue:l,path:u,options:d,schema:this};for(let x=0;x<i.length;x++){const C=i[x];C(y,f,function(I){I&&(Array.isArray(I)?m.push(...I):m.push(I)),--h<=0&&g(m)})}}asNestedTest({key:t,index:n,parent:r,parentPath:o,originalParent:i,options:s}){const l=t??n;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof l=="number";let d=r[l];const f=Object.assign({},s,{strict:!0,parent:r,value:d,originalValue:i[l],key:void 0,[u?"index":"key"]:l,path:u||l.includes(".")?`${o||""}[${u?l:`"${l}"`}]`:(o?`${o}.`:"")+t});return(g,h,m)=>this.resolve(f)._validate(d,f,h,m)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((s,l)=>o._validate(t,n,(u,d)=>{Bn.isError(u)&&(u.value=d),l(u)},(u,d)=>{u.length?l(new Bn(u,d,void 0,void 0,i)):s(d)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,s=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(l,u)=>{throw Bn.isError(l)&&(l.value=u),l},(l,u)=>{if(l.length)throw new Bn(l,t,void 0,void 0,s);i=u}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Bn.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Bn.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Ys(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=ks({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=ks({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Ur.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Ur.notNull){return this.nullability(!1,t)}required(t=Ur.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Ur.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=ks(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(s=>!(s.OPTIONS.name===n.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=uA(t).map(i=>new es(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new Td(o,n):Td.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=ks({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Ur.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=ks({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),r}notOneOf(t,n=Ur.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=ks({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:s}=n.spec;return{meta:o,label:r,optional:i,nullable:s,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,f)=>f.findIndex(g=>g.name===u.name)===d)}}}Tr.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Tr.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:s}=Bne(this,t,n,r.context);return s[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])Tr.prototype[e]=Tr.prototype.oneOf;for(const e of["not","nope"])Tr.prototype[e]=Tr.prototype.notOneOf;const Lne=()=>!0;function hA(e){return new gA(e)}class gA extends Tr{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Lne},t))}}hA.prototype=gA.prototype;const Nne=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function $ne(e){const t=Rg(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function Rg(e){var t,n;const r=Nne.exec(e);return r?{year:vo(r[1]),month:vo(r[2],1)-1,day:vo(r[3],1),hour:vo(r[4]),minute:vo(r[5]),second:vo(r[6]),millisecond:r[7]?vo(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:vo(r[10]),minuteOffset:vo(r[11])}:null}function vo(e,t=0){return Number(e)||t}let Vne=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Wne=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,zne=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Une="^\\d{4}-\\d{2}-\\d{2}",Hne="\\d{2}:\\d{2}:\\d{2}",Gne="(([+-]\\d{2}(:?\\d{2})?)|Z)",qne=new RegExp(`${Une}T${Hne}(\\.\\d+)?${Gne}$`),Yne=e=>wo(e)||e===e.trim(),Kne={}.toString();function So(){return new mA}class mA extends Tr{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Kne?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Ur.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Dn.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Dn.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Dn.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||Dn.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&r||s.search(t)!==-1})}email(t=Dn.email){return this.matches(Vne,{name:"email",message:t,excludeEmptyString:!0})}url(t=Dn.url){return this.matches(Wne,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Dn.uuid){return this.matches(zne,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(qne,{name:"datetime",message:n||Dn.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Dn.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const s=Rg(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:n||Dn.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=Rg(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Dn.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Yne})}lowercase(t=Dn.lowercase){return this.transform(n=>wo(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>wo(n)||n===n.toLowerCase()})}uppercase(t=Dn.uppercase){return this.transform(n=>wo(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>wo(n)||n===n.toUpperCase()})}}So.prototype=mA.prototype;let Xne=e=>e!=+e;function vA(){return new yA}class yA extends Tr{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Xne(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=Ko.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=Ko.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=Ko.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=Ko.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=Ko.positive){return this.moreThan(0,t)}negative(t=Ko.negative){return this.lessThan(0,t)}integer(t=Ko.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>wo(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>wo(o)?o:Math[t](o))}}vA.prototype=yA.prototype;let Zne=new Date(""),Qne=e=>Object.prototype.toString.call(e)==="[object Date]";class If extends Tr{constructor(){super({type:"date",check(t){return Qne(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=$ne(t),isNaN(t)?If.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(es.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=jg.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=jg.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}If.INVALID_DATE=Zne;If.prototype;function Jne(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([s,l])=>`${s}-${l}`));function i(s,l){let u=zi.split(s)[0];r.add(u),o.has(`${l}-${u}`)||n.push([l,u])}for(const s of Object.keys(e)){let l=e[s];r.add(s),es.isRef(l)&&l.isSibling?i(l.path,s):Z0(l)&&"deps"in l&&l.deps.forEach(u=>i(u,s))}return Tne.array(Array.from(r),n).reverse()}function gC(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function bA(e){return(t,n)=>gC(e,t)-gC(e,n)}const ere=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function Vu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Vu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Vu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Vu)}):"optional"in e?e.optional():e}const tre=(e,t)=>{const n=[...zi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=zi.getter(zi.join(n),!0)(e);return!!(o&&r in o)};let mC=e=>Object.prototype.toString.call(e)==="[object Object]";function vC(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const nre=bA([]);function Q0(e){return new xA(e)}class xA extends Tr{constructor(t){super({type:"object",check(n){return mC(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=nre,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,s=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(o).filter(g=>!this._nodes.includes(g))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),f=!1;for(const g of l){let h=i[g],m=g in o;if(h){let y,x=o[g];d.path=(n.path?`${n.path}.`:"")+g,h=h.resolve({value:x,context:n.context,parent:u});let C=h instanceof Tr?h.spec:void 0,A=C==null?void 0:C.strict;if(C!=null&&C.strip){f=f||g in o;continue}y=!n.__validating||!A?h.cast(o[g],d):o[g],y!==void 0&&(u[g]=y)}else m&&!s&&(u[g]=o[g]);(m!==g in u||u[g]!==o[g])&&(f=!0)}return f?u:o}_validate(t,n={},r,o){let{from:i=[],originalValue:s=t,recursive:l=this.spec.recursive}=n;n.from=[{schema:this,value:s},...i],n.__validating=!0,n.originalValue=s,super._validate(t,n,r,(u,d)=>{if(!l||!mC(d)){o(u,d);return}s=s||d;let f=[];for(let g of this._nodes){let h=this.fields[g];!h||es.isRef(h)||f.push(h.asNestedTest({options:n,key:g,parent:d,parentPath:n.path,originalParent:s}))}this.runTests({tests:f,value:d,originalValue:s,options:n},r,g=>{o(g.sort(this._sortErrors).concat(u),d)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const s=r[o];r[o]=s===void 0?i:s}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(s):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=Jne(t,n),r._sortErrors=bA(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return Vu(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=zi.getter(t,!0);return this.transform(i=>{if(!i)return i;let s=i;return tre(i,t)&&(s=Object.assign({},i),r||delete s[t],s[n]=o(i)),s})}json(){return this.transform(ere)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||$u.exact,test(n){if(n==null)return!0;const r=vC(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=$u.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=vC(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=$u.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(jh.camelCase)}snakeCase(){return this.transformKeys(jh.snakeCase)}constantCase(){return this.transformKeys(t=>jh.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,s]of Object.entries(n.fields)){var o;let l=t;(o=l)!=null&&o.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),r.fields[i]=s.describe(l)}return r}}Q0.prototype=xA.prototype;const yC=hA().test("function","Invalid function",e=>ie.isFunction(e));var Zo,Ni,al;class CA{constructor(){go(this,Ni);go(this,Zo,[])}get(t){if(So().required().validateSync(t),Ka(this,Ni,al).call(this)){const n=localStorage.getItem(t);return ie.isNil(n)?null:JSON.parse(n)}else return null}set(t,n){return So().required().validateSync(t),Ka(this,Ni,al).call(this)?(localStorage.setItem(t,JSON.stringify(n)),n):null}watch(t,n){So().required().validateSync(t),yC.validateSync(n),Ka(this,Ni,al).call(this)&&(_n(this,Zo).push({key:t,callback:n}),window.addEventListener("storage",r=>{r.storageArea===localStorage&&r.key===t&&n(this.get(t))}))}unwatch(t,n){So().required().validateSync(t),yC.optional().default(ie.identity).validateSync(n),Ka(this,Ni,al).call(this)&&(n!==void 0?zo(this,Zo,ie.reject(_n(this,Zo),r=>r.key===t&&r.callback===n)):zo(this,Zo,ie.reject(_n(this,Zo),r=>r.key===t)))}}Zo=new WeakMap,Ni=new WeakSet,al=function(){return typeof window<"u"};function Od(e={},t=[],n={}){const{isEmpty:r=ie.isEmpty}=n;return!ie.some(t,o=>r((e??{})[o.locale]))}function wA(e={},t=[],n={}){const{isEmpty:r=ie.isEmpty}=n;return ie.some(t,o=>!r((e??{})[o.locale]))}function J0(e,t,n){if(!ie.isPlainObject(e)||t===void 0)return;const r=ie.isPlainObject(n)?n:{},o=!!((r==null?void 0:r.fallback)??!0);let i=e[String(t)];if(i===void 0&&o){const s=ie.isArray(r.fallbackLocales)&&!ie.isEmpty(r.fallbackLocales)?r.fallbackLocales:["en"];i=ie.chain(s).map(l=>e[String(l)]).reject(ie.isUndefined).first().value(),i===void 0&&(i=ie.chain(e).values().first().value())}return i}function Of(e=[],t){const n=ie.isArray(e)?e:[e],r=ie.filter(n,o=>P.isValidElement(o));ie.each(r,o=>{var i;t(o),Of(((i=o==null?void 0:o.props)==null?void 0:i.children)??[],t)})}var SA={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(On,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",l="minute",u="hour",d="day",f="week",g="month",h="quarter",m="year",y="date",x="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(G){var Y=["th","st","nd","rd"],V=G%100;return"["+G+(Y[(V-20)%10]||Y[V]||Y[0])+"]"}},w=function(G,Y,V){var X=String(G);return!X||X.length>=Y?G:""+Array(Y+1-X.length).join(V)+G},T={s:w,z:function(G){var Y=-G.utcOffset(),V=Math.abs(Y),X=Math.floor(V/60),z=V%60;return(Y<=0?"+":"-")+w(X,2,"0")+":"+w(z,2,"0")},m:function G(Y,V){if(Y.date()<V.date())return-G(V,Y);var X=12*(V.year()-Y.year())+(V.month()-Y.month()),z=Y.clone().add(X,g),se=V-z<0,K=Y.clone().add(X+(se?-1:1),g);return+(-(X+(V-z)/(se?z-K:K-z))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return{M:g,y:m,w:f,d,D:y,h:u,m:l,s,ms:i,Q:h}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},O="en",R={};R[O]=I;var k="$isDayjsObject",D=function(G){return G instanceof U||!(!G||!G[k])},N=function G(Y,V,X){var z;if(!Y)return O;if(typeof Y=="string"){var se=Y.toLowerCase();R[se]&&(z=se),V&&(R[se]=V,z=se);var K=Y.split("-");if(!z&&K.length>1)return G(K[0])}else{var $=Y.name;R[$]=Y,z=$}return!X&&z&&(O=z),z||!X&&O},M=function(G,Y){if(D(G))return G.clone();var V=typeof Y=="object"?Y:{};return V.date=G,V.args=arguments,new U(V)},_=T;_.l=N,_.i=D,_.w=function(G,Y){return M(G,{locale:Y.$L,utc:Y.$u,x:Y.$x,$offset:Y.$offset})};var U=function(){function G(V){this.$L=N(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[k]=!0}var Y=G.prototype;return Y.parse=function(V){this.$d=function(X){var z=X.date,se=X.utc;if(z===null)return new Date(NaN);if(_.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var K=z.match(C);if(K){var $=K[2]-1||0,ee=(K[7]||"0").substring(0,3);return se?new Date(Date.UTC(K[1],$,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ee)):new Date(K[1],$,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ee)}}return new Date(z)}(V),this.init()},Y.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},Y.$utils=function(){return _},Y.isValid=function(){return this.$d.toString()!==x},Y.isSame=function(V,X){var z=M(V);return this.startOf(X)<=z&&z<=this.endOf(X)},Y.isAfter=function(V,X){return M(V)<this.startOf(X)},Y.isBefore=function(V,X){return this.endOf(X)<M(V)},Y.$g=function(V,X,z){return _.u(V)?this[X]:this.set(z,V)},Y.unix=function(){return Math.floor(this.valueOf()/1e3)},Y.valueOf=function(){return this.$d.getTime()},Y.startOf=function(V,X){var z=this,se=!!_.u(X)||X,K=_.p(V),$=function(be,xe){var Ee=_.w(z.$u?Date.UTC(z.$y,xe,be):new Date(z.$y,xe,be),z);return se?Ee:Ee.endOf(d)},ee=function(be,xe){return _.w(z.toDate()[be].apply(z.toDate("s"),(se?[0,0,0,0]:[23,59,59,999]).slice(xe)),z)},ne=this.$W,Q=this.$M,de=this.$D,pe="set"+(this.$u?"UTC":"");switch(K){case m:return se?$(1,0):$(31,11);case g:return se?$(1,Q):$(0,Q+1);case f:var ye=this.$locale().weekStart||0,ce=(ne<ye?ne+7:ne)-ye;return $(se?de-ce:de+(6-ce),Q);case d:case y:return ee(pe+"Hours",0);case u:return ee(pe+"Minutes",1);case l:return ee(pe+"Seconds",2);case s:return ee(pe+"Milliseconds",3);default:return this.clone()}},Y.endOf=function(V){return this.startOf(V,!1)},Y.$set=function(V,X){var z,se=_.p(V),K="set"+(this.$u?"UTC":""),$=(z={},z[d]=K+"Date",z[y]=K+"Date",z[g]=K+"Month",z[m]=K+"FullYear",z[u]=K+"Hours",z[l]=K+"Minutes",z[s]=K+"Seconds",z[i]=K+"Milliseconds",z)[se],ee=se===d?this.$D+(X-this.$W):X;if(se===g||se===m){var ne=this.clone().set(y,1);ne.$d[$](ee),ne.init(),this.$d=ne.set(y,Math.min(this.$D,ne.daysInMonth())).$d}else $&&this.$d[$](ee);return this.init(),this},Y.set=function(V,X){return this.clone().$set(V,X)},Y.get=function(V){return this[_.p(V)]()},Y.add=function(V,X){var z,se=this;V=Number(V);var K=_.p(X),$=function(Q){var de=M(se);return _.w(de.date(de.date()+Math.round(Q*V)),se)};if(K===g)return this.set(g,this.$M+V);if(K===m)return this.set(m,this.$y+V);if(K===d)return $(1);if(K===f)return $(7);var ee=(z={},z[l]=r,z[u]=o,z[s]=n,z)[K]||1,ne=this.$d.getTime()+V*ee;return _.w(ne,this)},Y.subtract=function(V,X){return this.add(-1*V,X)},Y.format=function(V){var X=this,z=this.$locale();if(!this.isValid())return z.invalidDate||x;var se=V||"YYYY-MM-DDTHH:mm:ssZ",K=_.z(this),$=this.$H,ee=this.$m,ne=this.$M,Q=z.weekdays,de=z.months,pe=z.meridiem,ye=function(xe,Ee,me,Re){return xe&&(xe[Ee]||xe(X,se))||me[Ee].slice(0,Re)},ce=function(xe){return _.s($%12||12,xe,"0")},be=pe||function(xe,Ee,me){var Re=xe<12?"AM":"PM";return me?Re.toLowerCase():Re};return se.replace(A,function(xe,Ee){return Ee||function(me){switch(me){case"YY":return String(X.$y).slice(-2);case"YYYY":return _.s(X.$y,4,"0");case"M":return ne+1;case"MM":return _.s(ne+1,2,"0");case"MMM":return ye(z.monthsShort,ne,de,3);case"MMMM":return ye(de,ne);case"D":return X.$D;case"DD":return _.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return ye(z.weekdaysMin,X.$W,Q,2);case"ddd":return ye(z.weekdaysShort,X.$W,Q,3);case"dddd":return Q[X.$W];case"H":return String($);case"HH":return _.s($,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return be($,ee,!0);case"A":return be($,ee,!1);case"m":return String(ee);case"mm":return _.s(ee,2,"0");case"s":return String(X.$s);case"ss":return _.s(X.$s,2,"0");case"SSS":return _.s(X.$ms,3,"0");case"Z":return K}return null}(xe)||K.replace(":","")})},Y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Y.diff=function(V,X,z){var se,K=this,$=_.p(X),ee=M(V),ne=(ee.utcOffset()-this.utcOffset())*r,Q=this-ee,de=function(){return _.m(K,ee)};switch($){case m:se=de()/12;break;case g:se=de();break;case h:se=de()/3;break;case f:se=(Q-ne)/6048e5;break;case d:se=(Q-ne)/864e5;break;case u:se=Q/o;break;case l:se=Q/r;break;case s:se=Q/n;break;default:se=Q}return z?se:_.a(se)},Y.daysInMonth=function(){return this.endOf(g).$D},Y.$locale=function(){return R[this.$L]},Y.locale=function(V,X){if(!V)return this.$L;var z=this.clone(),se=N(V,X,!0);return se&&(z.$L=se),z},Y.clone=function(){return _.w(this.$d,this)},Y.toDate=function(){return new Date(this.valueOf())},Y.toJSON=function(){return this.isValid()?this.toISOString():null},Y.toISOString=function(){return this.$d.toISOString()},Y.toString=function(){return this.$d.toUTCString()},G}(),H=U.prototype;return M.prototype=H,[["$ms",i],["$s",s],["$m",l],["$H",u],["$W",d],["$M",g],["$y",m],["$D",y]].forEach(function(G){H[G[1]]=function(Y){return this.$g(Y,G[0],G[1])}}),M.extend=function(G,Y){return G.$i||(G(Y,U,M),G.$i=!0),M},M.locale=N,M.isDayjs=D,M.unix=function(G){return M(1e3*G)},M.en=R[O],M.Ls=R,M.p={},M})})(SA);var AA=SA.exports;const Dr=Br(AA);function EA(e){const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Dr().hour(n).minute(r)}const ll=new CA;function rre(e,t,n){return function(r){const o=ie.isFunction(r)?r(t):r;return ll.set(e,o),n(o),o}}function ev(e,t){var u;So().required().validateSync(e);const[n,r]=P.useState(ll.get(e)??t),o=P.useRef(t),i=ie.isEqual(o.current,t)?o.current:t,s=P.useRef(),l=s.current;return P.useEffect(()=>{r(ll.get(e)??i)},[e,i,r]),P.useEffect(()=>{function d(f){r(f)}return ll.watch(e,d),()=>{ll.unwatch(e,d)}},[e,r]),(e!==(l==null?void 0:l.key)||!ie.isEqual(n,l==null?void 0:l.value))&&(s.current={key:e,value:n,setter:rre(e,n,r)}),[n,((u=s.current)==null?void 0:u.setter)??ie.noop]}function TA(e){const[t]=re.useLocaleState();return e!==void 0?String(e):t}function ore(e,t){const n=TA(t==null?void 0:t.locale);return J0(e,n,t)}function ire(e){const t=TA(e==null?void 0:e.locale);return P.useCallback(r=>J0(r,t,e),[t,e])}function IA(e){if(!ie.isPlainObject(e))throw new Error("[useMemoizedObject]: param must be a plain JS object");const[t,n]=P.useState(e);return P.useEffect(()=>{ie.isEqual(e,t)||n(e)},[e,t]),t}function wa(){const[e,t]=P.useState(null),n=!!e,r=P.useCallback(s=>t((s==null?void 0:s.currentTarget)??null),[t]),o=P.useCallback(()=>t(null),[t]),i=P.useCallback(s=>{n?o():r(s)},[n,r,o]);return{anchorEl:e,open:n,handleClick:r,handleClose:o,handleToggle:i}}function sre(e,t){const[n,r]=P.useState({width:1,height:1}),o=e.current;return P.useEffect(()=>{function i(){var d;let l=0,u=0;switch(t){case"client":l=(o==null?void 0:o.clientWidth)??0,u=(o==null?void 0:o.clientHeight)??0;break;case"offset":l=(o==null?void 0:o.offsetWidth)??0,u=(o==null?void 0:o.offsetHeight)??0;break;case"scroll":l=(o==null?void 0:o.scrollWidth)??0,u=(o==null?void 0:o.scrollHeight)??0;break;case"bounding":default:{const f=((d=e.current)==null?void 0:d.getBoundingClientRect())??{width:0,height:0};l=f.width,u=f.height;break}}r({width:l,height:u})}const s=new ResizeObserver(i);return ie.isEmpty(e==null?void 0:e.current)||(s.observe(e==null?void 0:e.current),i()),()=>{s.disconnect()}},[o,t,e]),n}function tv(e){const t=W.useRecordContext(),n=W.useTranslate(),r=W.useResourceContext(),o=t!=null&&t.id?"edit":"create";return P.useMemo(()=>{if(e===!1)return;const s=`resources.${r}.title`;return e||n(`resources.${r}.title.${o}`,{_:n(s,{_:s}),...t})},[o,t,r,n,e])}function OA(){const{mode:e}=Pn(),t=window.matchMedia("(prefers-color-scheme: dark)"),[n,r]=P.useState(()=>e==="auto"?t.matches?"dark":"light":e),o=P.useRef(n);return P.useEffect(()=>{function i(){const l=t.matches?"dark":"light";l!==o.current&&(r(l),o.current=l)}i();const s=t;return s.addEventListener("change",i),()=>{s.removeEventListener("change",i)}},[t]),n}function zr(){throw new Error("Method must be implemented")}const PA={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2,setFontFamily:zr,setMenuOrientation:zr,setMiniDrawer:zr,setContainer:zr,setMode:zr,setPresetColor:zr,setThemeDirection:zr,setAppDefaultPath:zr,setDrawerWidth:zr,setHorizontalMaxItems:zr,isVerticalLayout:e=>!1,isHorizontalLayout:e=>!1};function are(e){return e==="vertical"}function lre(e){return e==="horizontal"}const nv=P.createContext(PA);function kg({initialConfig:e,children:t}){const[n,r]=ev("theme-config",{...PA,...e});function o(y){r(x=>({...x,fontFamily:y}))}function i(y){r(x=>({...x,menuOrientation:y}))}function s(y){r(x=>({...x,miniDrawer:y}))}function l(y){r(x=>({...x,container:y}))}function u(y){r(x=>({...x,mode:y}))}function d(y){r(x=>({...x,presetColor:y}))}function f(y){r(x=>({...x,themeDirection:y}))}function g(y){r(x=>({...x,appDefaultPath:y}))}function h(y){r(x=>({...x,drawerWidth:y}))}function m(y){r(x=>({...x,horizontalMaxItems:y}))}return p.jsx(nv.Provider,{value:{...n,setFontFamily:o,setMenuOrientation:i,setMiniDrawer:s,setContainer:l,setMode:u,setPresetColor:d,setThemeDirection:f,setAppDefaultPath:g,setDrawerWidth:h,setHorizontalMaxItems:m,isVerticalLayout:are,isHorizontalLayout:lre},children:t})}function rv(){return P.useContext(nv)}function Pn(){return rv()}const cre=nc(W.Toolbar,{slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end",position:"initial !important","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}}));function fi(e){return p.jsx(cre,{...e})}function jA({children:e,spacing:t,defaultValues:n,...r}){const{spacing:o}=Pn();return p.jsx(dre,{defaultValues:n,spacing:t||o,children:p.jsx(E.Grid,{container:!0,...r,spacing:t||o,children:e})})}function ure({children:e,content:t=!0,title:n,subheader:r=null,secondary:o=null,toolbar:i=!1,lg:s=12,md:l=12,sm:u=12,xs:d=12,...f}){const g=W.useTranslate(),h=W.useResourceContext(),{cardTitle:m,cardSubheader:y}=P.useMemo(()=>{const x=n||`resources.${h}.title`;return{cardTitle:g(x,{_:x}),cardSubheader:r!==null?g(r,{_:r}):null}},[h,r,n,g]);return p.jsx(E.Grid,{item:!0,...f,lg:s,md:l,sm:u,xs:d,children:p.jsx(Ln,{content:t,title:m,subheader:y,secondary:o,divider:!0,children:p.jsxs(p.Fragment,{children:[e,i===!0?p.jsx(fi,{children:p.jsx(W.SaveButton,{})}):i]})})})}const dre=ge(W.Form,{slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*1.25),padding:0,minHeight:"unset"},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingRight:"0 !important",paddingLeft:"0 !important",paddingBottom:"0 !important"}}));jA.Section=ure;function RA(e){const{confirmTitle:t,confirmContent:n,confirmColor:r="primary",dialogSx:o,icon:i=gre,label:s="ra.action.delete",mutationMode:l="pessimistic",mutationOptions:u={},onClick:d,onSuccess:f,onError:g,...h}=e,{meta:m,...y}=u,{selectedIds:x,onUnselectItems:C}=re.useListContext(e),[A,I]=re.useSafeSetState(!1),w=re.useNotify(),T=re.useResourceContext(e),O=re.useRefresh(),R=re.useTranslate(),k=Et(),[D,{isLoading:N}]=re.useDeleteMany(T,{ids:x,meta:m},{onSuccess:()=>{O(),w("ra.notification.deleted",{type:"info",messageArgs:{smart_count:x.length},undoable:l==="undoable"}),C(),I(!1),f&&ie.isFunction(f)&&f()},onError:H=>{w(typeof H=="string"?H:H.message||"ra.notification.http_error",{type:"error",messageArgs:{_:typeof H=="string"?H:H&&H.message?H.message:void 0}}),I(!1),g&&ie.isFunction(g)&&g()},mutationMode:l,...y});function M(H){I(!0),H.stopPropagation()}function _(){I(!1)}function U(H){D(),typeof d=="function"&&d(H)}return p.jsxs(p.Fragment,{children:[p.jsx(hre,{onClick:M,label:s,...fre(h),children:i}),p.jsx(W.Confirm,{isOpen:A,loading:N,sx:o||{"& .MuiPaper-root":{p:2},"& .MuiDialogActions-root":{display:"flex",justifyContent:"space-between",width:"100%","& .RaConfirm-confirmPrimary":{backgroundColor:k.palette.primary.main,color:k.palette.primary.contrastText,ml:2,"&:hover":{backgroundColor:k.palette.primary.dark}},"& .MuiButtonBase-root":{width:"50%",border:`1px solid ${k.palette.action.disabled}`},"& .MuiButton-icon":{display:"none"}}},title:t?typeof t=="string"?R(t):t:p.jsx(E.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:p.jsx(E.Box,{sx:{color:"primary.main",fontSize:"28px",borderRadius:"50%",backgroundColor:"primary.lighter",width:"56px",height:"56px",display:"flex",alignItems:"center",justifyContent:"center"},children:p.jsx(ze.DeleteFilled,{})})}),content:n||p.jsx(E.Typography,{maxWidth:"300px",variant:"h4",align:"center",children:R("ra.message.bulk_delete_content",{_:"ra.message.bulk_delete_content",smart_count:x.length,name:R(`resources.${T}.forcedCaseName`,{smart_count:x.length,_:Qo.humanize(R(`resources.${T}.name`,{smart_count:x.length,_:Qo.inflect(T,x.length)}),!0)})})}),confirmColor:r,translateOptions:{smart_count:x.length,name:R(`resources.${T}.forcedCaseName`,{smart_count:x.length,_:Qo.humanize(R(`resources.${T}.name`,{smart_count:x.length,_:Qo.inflect(T,x.length)}),!0)})},onConfirm:U,onClose:_})]})}function fre({classes:e,filterValues:t,label:n,selectedIds:r,...o}){return o}const pre="RaBulkDeleteWithConfirmButton",hre=ge(W.Button,{name:pre,overridesResolver:e=>e.root})(({theme:e})=>({color:e.palette.error.main,"&:hover":{backgroundColor:nt(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}})),gre=p.jsx(T0,{});RA.propTypes={confirmTitle:b.node,confirmContent:b.node,confirmColor:b.string,dialogSx:b.object,icon:b.element,label:b.string,mutationMode:b.oneOf(["pessimistic","optimistic","undoable"]),resource:b.string,selectedIds:b.arrayOf(b.any),onSuccess:b.func,onError:b.func};const mre="RaButton";function vre(e){if(e==null)return;if(typeof e=="string")return{to:e};const{redirect:t,replace:n,state:r,...o}=e;return{to:o,redirect:t,replace:n,state:r}}const yre=ge(E.Button,{name:mre,overridesResolver:(e,t)=>t.root})({"&.MuiButton-sizeSmall":{lineHeight:1.5}});function ts(e){const{disableIconOnly:t=!1,label:n,children:r,className:o,color:i,size:s,disabled:l,alignIcon:u,to:d,...f}=e,g=W.useTranslate(),h=vre(d);if(t){const m=n?g(n,{_:n}):void 0;return p.jsx(yre,{className:o,color:i,size:s,"aria-label":m,disabled:l,startIcon:u==="left"&&r?r:void 0,endIcon:u==="right"&&r?r:void 0,...h,...f,children:m})}return p.jsx(W.Button,{...e})}function kA(e){const{className:t,icon:n=bre,label:r="ra.action.create",resource:o,scrollToTop:i=!0,variant:s,to:l,state:u={},disableFloatingButton:d=!1,...f}=e,g=re.useResourceContext(e),h=re.useCreatePath(),m=re.useTranslate(),y=E.useMediaQuery(A=>A.breakpoints.down("md")),x=f5({},xre.get(String(i)),u),C=Are(l);return!d&&y?p.jsx(Cre,{component:gt.Link,to:h({resource:g,type:"create"}),state:x,color:"primary",className:$e(jd.floating,t),"aria-label":r?m(r):"ra.action.create",...f,...C,children:n}):p.jsx(wre,{component:gt.Link,to:h({resource:g,type:"create"}),state:x,className:$e(jd.root,t),label:r,variant:s,...f,...C,children:n})}const bre=p.jsx(d0,{}),xre=new Map([["true",{_scrollToTop:!0}],["false",{}]]);kA.propTypes={resource:b.string,className:b.string,icon:b.element,label:b.string};const Pd="RaCreateButton",jd={root:`${Pd}-root`,floating:`${Pd}-floating`},Cre=ge(E.Fab,{name:Pd,overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${jd.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),wre=ge(ts,{name:Pd,overridesResolver:(e,t)=>t.root})({});function Sre(e,t){return e.resource===t.resource&&e.label===t.label&&e.translate===t.translate&&e.disabled===t.disabled&&_l(e.to,t.to)&&_l(e.state,t.state)}const MA=L.memo(kA,Sre);function Are(e){if(e==null)return;if(typeof e=="string")return{to:e};const{redirect:t,replace:n,state:r,...o}=e;return{to:o,redirect:t,replace:n,state:r}}function ov(e,t){const n=t.id;if(!e)return[t];const r=e.findIndex(o=>o.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]}function Ere(e,t){return e&&e.data?{data:ov(e.data,t),total:e.total+1}:e}function Tre(e,t){return e&&e.length>0?ov(e,t):e}function Ire(e,t){return e&&e.data?{...e,data:ov(e.data,t),total:e.total+1}:e}function Ore(e){const{disableFloatingButton:t,label:n="ra.action.create",startIcon:r=p.jsx(ze.PlusCircleOutlined,{}),...o}=e,i=P.useCallback(s=>{var l;s.preventDefault(),(l=e==null?void 0:e.onClick)==null||l.call(e)},[e]);return t?p.jsx(ts,{...o,onClick:i,label:n,children:r}):p.jsx(yZ,{...e,onClick:i,label:n,children:r})}function Pre(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=un.useFormContext(),o=re.useTranslate(),i=P.useCallback(s=>{s.preventDefault(),s.stopPropagation(),r(l=>t(l,n))()},[r,t,n]);return p.jsx(E.Button,{onClick:i,color:"primary",variant:"contained",size:"medium",children:o("ra.action.save")})}function jre(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,onSubmit:i,mutationOptions:s,scroll:l="body",...u}=e,d=Vi.useQueryClient(),f=re.useResourceContext(),g=re.useTranslate(),h=P.Children.only(t),[m,y]=P.useState(!1),x=re.useNotify(),C=P.useCallback(()=>y(!0),[]),A=P.useCallback(()=>y(!1),[]),I=P.useCallback((w,T,O)=>{var D,N;const k=Date.now();d.setQueryData([f,"getOne",{id:w.id}],w),d.setQueriesData([f,"getList"],M=>Ire(M,w),{updatedAt:k}),d.setQueriesData([f,"getMany"],M=>Tre(M,w),{updatedAt:k}),d.setQueriesData([f,"getManyReference"],M=>Ere(M,w),{updatedAt:k}),A(),x("ra.notification.created",{messageArgs:{smart_count:1}}),(N=(D=e==null?void 0:e.mutationOptions)==null?void 0:D.onSuccess)==null||N.call(D,w,T,O)},[A,x,e.mutationOptions,d,f]);return p.jsxs(p.Fragment,{children:[p.jsx(Ore,{...u,onClick:C}),p.jsx(E.Dialog,{open:m,scroll:l,onClose:A,maxWidth:n,fullWidth:r,fullScreen:o,children:p.jsx(E.DialogContent,{sx:{m:0,p:0},children:p.jsx(re.CreateBase,{...e,mutationOptions:{...s,onSuccess:I},children:P.isValidElement(h)?P.cloneElement(h,{...h.props,modal:!0,toolbar:p.jsxs(fi,{children:[p.jsx(E.Button,{variant:"text",size:"medium",onClick:A,children:g("ra.action.cancel")}),i?p.jsx(Pre,{onSubmit:i,closeDialog:A}):p.jsx(W0,{type:"button"})]})}):null})})})]})}function ns(e){const{className:t,confirmTitle:n,confirmContent:r,confirmColor:o="primary",color:i="error",dialogSx:s,icon:l=p.jsx(T0,{}),label:u="ra.action.delete",mutationMode:d="pessimistic",mutationOptions:f,onClick:g,redirect:h="list",translateOptions:m={},onConfirm:y,...x}=e,C=re.useTranslate(),A=re.useRecordContext(e),I=re.useResourceContext(e),w=E.useTheme(),{open:T,isLoading:O,handleDialogOpen:R,handleDialogClose:k,handleDelete:D}=re.useDeleteWithConfirmController({record:A,redirect:h,mutationMode:d,onClick:g,mutationOptions:f,resource:I}),N=P.useCallback(M=>{y?y():D(M)},[D,y]);return p.jsxs(p.Fragment,{children:[p.jsx(ts,{onClick:R,label:u,className:$e("ra-delete-button",t),color:i,...x,children:l},"button"),p.jsx(T5,{isOpen:T,loading:O,sx:s||{"& .MuiPaper-root":{p:2},"& .MuiDialogActions-root":{display:"flex",justifyContent:"space-between",width:"100%","& .RaConfirm-confirmPrimary":{backgroundColor:w.palette.primary.main,color:w.palette.primary.contrastText,ml:2,"&:hover":{backgroundColor:w.palette.primary.dark}},"& .MuiButtonBase-root":{width:"50%",border:`1px solid ${w.palette.action.disabled}`},"& .MuiButton-icon":{display:"none"}}},title:n?typeof n=="string"?C(n):n:p.jsx(E.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:p.jsx(E.Box,{sx:{color:"primary.main",fontSize:"28px",borderRadius:"50%",backgroundColor:"primary.lighter",width:"56px",height:"56px",display:"flex",alignItems:"center",justifyContent:"center"},children:p.jsx(ze.DeleteFilled,{})})}),content:p.jsx(E.Typography,{maxWidth:"300px",variant:"h4",align:"center",children:r||C("ra.message.delete_content",{_:"ra.message.delete_content",name:C(`resources.${I}.forcedCaseName`,{smart_count:1,_:Qo.humanize(C(`resources.${I}.name`,{smart_count:1,_:Qo.singularize(I)}),!0)}),id:A==null?void 0:A.id})}),confirmColor:o,translateOptions:{name:C(`resources.${I}.forcedCaseName`,{smart_count:1,_:Qo.humanize(C(`resources.${I}.name`,{smart_count:1,_:Qo.singularize(I)}),!0)}),id:A==null?void 0:A.id,...m},onConfirm:N,onClose:k})]})}ns.propTypes={basePath:b.string,className:b.string,confirmColor:b.string,confirmContent:b.oneOfType([b.string,b.element]),confirmTitle:b.oneOfType([b.string,b.element]),icon:b.element,label:b.string,mutationMode:b.oneOf(["pessimistic","optimistic","undoable"]),onClick:b.func,record:b.any,redirect:b.oneOfType([b.string,b.bool,b.func]),resource:b.string,translateOptions:b.object};function Rre(e){const t=P.useCallback(n=>{var r;n.preventDefault(),n.stopPropagation(),(r=e==null?void 0:e.onClick)==null||r.call(e)},[e]);return p.jsx(F5,{...e,onClick:t})}function kre(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=un.useFormContext(),o=P.useCallback(i=>{i.preventDefault(),i.stopPropagation(),r(s=>t(s,n))()},[r,t,n]);return p.jsx(ts,{disableIconOnly:!0,onClick:o,color:"primary",variant:"contained",size:"medium",label:"ra.action.save"})}function Mre(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,mutationOptions:i,onSubmit:s,scroll:l="body",...u}=e,d=re.useNotify(),[f,g]=P.useState(!1),h=P.Children.only(t),m=P.useCallback(()=>g(!0),[]),y=P.useCallback(()=>g(!1),[]),x=P.useCallback((A,I,w)=>{var T,O;y(),d("ra.notification.updated",{messageArgs:{smart_count:1},undoable:(e==null?void 0:e.mutationMode)==="undoable"}),(O=(T=e==null?void 0:e.mutationOptions)==null?void 0:T.onSuccess)==null||O.call(T,A,I,w)},[y,d,e.mutationOptions,e.mutationMode]),C=re.useRecordContext();return p.jsxs(p.Fragment,{children:[p.jsx(Rre,{...u,onClick:m}),p.jsx(E.Dialog,{open:f,scroll:l,onClose:y,fullWidth:r,maxWidth:n,fullScreen:o,keepMounted:!1,children:p.jsx(E.DialogContent,{sx:{m:0,p:0},children:p.jsx(re.EditBase,{...e,id:C.id,mutationMode:"pessimistic",mutationOptions:{...i,onSuccess:x},children:P.isValidElement(h)?P.cloneElement(h,{...h.props,modal:!0,toolbar:p.jsxs(fi,{children:[p.jsx(ts,{disableIconOnly:!0,variant:"text",size:"medium",onClick:y,label:"ra.action.cancel"}),s?p.jsx(kre,{onSubmit:s,closeDialog:y}):p.jsx(W0,{type:"button"})]})}):null})})})]})}var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_re={exports:{}},bC={exports:{}},xC;function rt(){return xC||(xC=1,function(e,t){(function(n,r){e.exports=r()})(et,function(){var n=n||function(r,o){var i=Object.create||function(){function C(){}return function(A){var I;return C.prototype=A,I=new C,C.prototype=null,I}}(),s={},l=s.lib={},u=l.Base=function(){return{extend:function(C){var A=i(this);return C&&A.mixIn(C),(!A.hasOwnProperty("init")||this.init===A.init)&&(A.init=function(){A.$super.init.apply(this,arguments)}),A.init.prototype=A,A.$super=this,A},create:function(){var C=this.extend();return C.init.apply(C,arguments),C},init:function(){},mixIn:function(C){for(var A in C)C.hasOwnProperty(A)&&(this[A]=C[A]);C.hasOwnProperty("toString")&&(this.toString=C.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),d=l.WordArray=u.extend({init:function(C,A){C=this.words=C||[],A!=o?this.sigBytes=A:this.sigBytes=C.length*4},toString:function(C){return(C||g).stringify(this)},concat:function(C){var A=this.words,I=C.words,w=this.sigBytes,T=C.sigBytes;if(this.clamp(),w%4)for(var O=0;O<T;O++){var R=I[O>>>2]>>>24-O%4*8&255;A[w+O>>>2]|=R<<24-(w+O)%4*8}else for(var O=0;O<T;O+=4)A[w+O>>>2]=I[O>>>2];return this.sigBytes+=T,this},clamp:function(){var C=this.words,A=this.sigBytes;C[A>>>2]&=4294967295<<32-A%4*8,C.length=r.ceil(A/4)},clone:function(){var C=u.clone.call(this);return C.words=this.words.slice(0),C},random:function(C){for(var A=[],I=function(k){var k=k,D=987654321,N=4294967295;return function(){D=36969*(D&65535)+(D>>16)&N,k=18e3*(k&65535)+(k>>16)&N;var M=(D<<16)+k&N;return M/=4294967296,M+=.5,M*(r.random()>.5?1:-1)}},w=0,T;w<C;w+=4){var O=I((T||r.random())*4294967296);T=O()*987654071,A.push(O()*4294967296|0)}return new d.init(A,C)}}),f=s.enc={},g=f.Hex={stringify:function(C){for(var A=C.words,I=C.sigBytes,w=[],T=0;T<I;T++){var O=A[T>>>2]>>>24-T%4*8&255;w.push((O>>>4).toString(16)),w.push((O&15).toString(16))}return w.join("")},parse:function(C){for(var A=C.length,I=[],w=0;w<A;w+=2)I[w>>>3]|=parseInt(C.substr(w,2),16)<<24-w%8*4;return new d.init(I,A/2)}},h=f.Latin1={stringify:function(C){for(var A=C.words,I=C.sigBytes,w=[],T=0;T<I;T++){var O=A[T>>>2]>>>24-T%4*8&255;w.push(String.fromCharCode(O))}return w.join("")},parse:function(C){for(var A=C.length,I=[],w=0;w<A;w++)I[w>>>2]|=(C.charCodeAt(w)&255)<<24-w%4*8;return new d.init(I,A)}},m=f.Utf8={stringify:function(C){try{return decodeURIComponent(escape(h.stringify(C)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(C){return h.parse(unescape(encodeURIComponent(C)))}},y=l.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(C){typeof C=="string"&&(C=m.parse(C)),this._data.concat(C),this._nDataBytes+=C.sigBytes},_process:function(C){var A=this._data,I=A.words,w=A.sigBytes,T=this.blockSize,O=T*4,R=w/O;C?R=r.ceil(R):R=r.max((R|0)-this._minBufferSize,0);var k=R*T,D=r.min(k*4,w);if(k){for(var N=0;N<k;N+=T)this._doProcessBlock(I,N);var M=I.splice(0,k);A.sigBytes-=D}return new d.init(M,D)},clone:function(){var C=u.clone.call(this);return C._data=this._data.clone(),C},_minBufferSize:0});l.Hasher=y.extend({cfg:u.extend(),init:function(C){this.cfg=this.cfg.extend(C),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(C){return this._append(C),this._process(),this},finalize:function(C){C&&this._append(C);var A=this._doFinalize();return A},blockSize:16,_createHelper:function(C){return function(A,I){return new C.init(I).finalize(A)}},_createHmacHelper:function(C){return function(A,I){return new x.HMAC.init(C,I).finalize(A)}}});var x=s.algo={};return s}(Math);return n})}(bC)),bC.exports}var CC={exports:{}},wC;function Pf(){return wC||(wC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(r){var o=n,i=o.lib,s=i.Base,l=i.WordArray,u=o.x64={};u.Word=s.extend({init:function(d,f){this.high=d,this.low=f}}),u.WordArray=s.extend({init:function(d,f){d=this.words=d||[],f!=r?this.sigBytes=f:this.sigBytes=d.length*8},toX32:function(){for(var d=this.words,f=d.length,g=[],h=0;h<f;h++){var m=d[h];g.push(m.high),g.push(m.low)}return l.create(g,this.sigBytes)},clone:function(){for(var d=s.clone.call(this),f=d.words=this.words.slice(0),g=f.length,h=0;h<g;h++)f[h]=f[h].clone();return d}})}(),n})}(CC)),CC.exports}var SC={exports:{}},AC;function Fre(){return AC||(AC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,o=r.lib,i=o.WordArray,s=i.init,l=i.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray<"u"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var d=u.byteLength,f=[],g=0;g<d;g++)f[g>>>2]|=u[g]<<24-g%4*8;s.call(this,f,d)}else s.apply(this,arguments)};l.prototype=i}}(),n.lib.WordArray})}(SC)),SC.exports}var EC={exports:{}},TC;function Dre(){return TC||(TC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(){var r=n,o=r.lib,i=o.WordArray,s=r.enc;s.Utf16=s.Utf16BE={stringify:function(u){for(var d=u.words,f=u.sigBytes,g=[],h=0;h<f;h+=2){var m=d[h>>>2]>>>16-h%4*8&65535;g.push(String.fromCharCode(m))}return g.join("")},parse:function(u){for(var d=u.length,f=[],g=0;g<d;g++)f[g>>>1]|=u.charCodeAt(g)<<16-g%2*16;return i.create(f,d*2)}},s.Utf16LE={stringify:function(u){for(var d=u.words,f=u.sigBytes,g=[],h=0;h<f;h+=2){var m=l(d[h>>>2]>>>16-h%4*8&65535);g.push(String.fromCharCode(m))}return g.join("")},parse:function(u){for(var d=u.length,f=[],g=0;g<d;g++)f[g>>>1]|=l(u.charCodeAt(g)<<16-g%2*16);return i.create(f,d*2)}};function l(u){return u<<8&4278255360|u>>>8&16711935}}(),n.enc.Utf16})}(EC)),EC.exports}var IC={exports:{}},OC;function Sa(){return OC||(OC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(){var r=n,o=r.lib,i=o.WordArray,s=r.enc;s.Base64={stringify:function(u){var d=u.words,f=u.sigBytes,g=this._map;u.clamp();for(var h=[],m=0;m<f;m+=3)for(var y=d[m>>>2]>>>24-m%4*8&255,x=d[m+1>>>2]>>>24-(m+1)%4*8&255,C=d[m+2>>>2]>>>24-(m+2)%4*8&255,A=y<<16|x<<8|C,I=0;I<4&&m+I*.75<f;I++)h.push(g.charAt(A>>>6*(3-I)&63));var w=g.charAt(64);if(w)for(;h.length%4;)h.push(w);return h.join("")},parse:function(u){var d=u.length,f=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var h=0;h<f.length;h++)g[f.charCodeAt(h)]=h}var m=f.charAt(64);if(m){var y=u.indexOf(m);y!==-1&&(d=y)}return l(u,d,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(u,d,f){for(var g=[],h=0,m=0;m<d;m++)if(m%4){var y=f[u.charCodeAt(m-1)]<<m%4*2,x=f[u.charCodeAt(m)]>>>6-m%4*2;g[h>>>2]|=(y|x)<<24-h%4*8,h++}return i.create(g,h)}}(),n.enc.Base64})}(IC)),IC.exports}var PC={exports:{}},jC;function Aa(){return jC||(jC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(r){var o=n,i=o.lib,s=i.WordArray,l=i.Hasher,u=o.algo,d=[];(function(){for(var x=0;x<64;x++)d[x]=r.abs(r.sin(x+1))*4294967296|0})();var f=u.MD5=l.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(x,C){for(var A=0;A<16;A++){var I=C+A,w=x[I];x[I]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var T=this._hash.words,O=x[C+0],R=x[C+1],k=x[C+2],D=x[C+3],N=x[C+4],M=x[C+5],_=x[C+6],U=x[C+7],H=x[C+8],G=x[C+9],Y=x[C+10],V=x[C+11],X=x[C+12],z=x[C+13],se=x[C+14],K=x[C+15],$=T[0],ee=T[1],ne=T[2],Q=T[3];$=g($,ee,ne,Q,O,7,d[0]),Q=g(Q,$,ee,ne,R,12,d[1]),ne=g(ne,Q,$,ee,k,17,d[2]),ee=g(ee,ne,Q,$,D,22,d[3]),$=g($,ee,ne,Q,N,7,d[4]),Q=g(Q,$,ee,ne,M,12,d[5]),ne=g(ne,Q,$,ee,_,17,d[6]),ee=g(ee,ne,Q,$,U,22,d[7]),$=g($,ee,ne,Q,H,7,d[8]),Q=g(Q,$,ee,ne,G,12,d[9]),ne=g(ne,Q,$,ee,Y,17,d[10]),ee=g(ee,ne,Q,$,V,22,d[11]),$=g($,ee,ne,Q,X,7,d[12]),Q=g(Q,$,ee,ne,z,12,d[13]),ne=g(ne,Q,$,ee,se,17,d[14]),ee=g(ee,ne,Q,$,K,22,d[15]),$=h($,ee,ne,Q,R,5,d[16]),Q=h(Q,$,ee,ne,_,9,d[17]),ne=h(ne,Q,$,ee,V,14,d[18]),ee=h(ee,ne,Q,$,O,20,d[19]),$=h($,ee,ne,Q,M,5,d[20]),Q=h(Q,$,ee,ne,Y,9,d[21]),ne=h(ne,Q,$,ee,K,14,d[22]),ee=h(ee,ne,Q,$,N,20,d[23]),$=h($,ee,ne,Q,G,5,d[24]),Q=h(Q,$,ee,ne,se,9,d[25]),ne=h(ne,Q,$,ee,D,14,d[26]),ee=h(ee,ne,Q,$,H,20,d[27]),$=h($,ee,ne,Q,z,5,d[28]),Q=h(Q,$,ee,ne,k,9,d[29]),ne=h(ne,Q,$,ee,U,14,d[30]),ee=h(ee,ne,Q,$,X,20,d[31]),$=m($,ee,ne,Q,M,4,d[32]),Q=m(Q,$,ee,ne,H,11,d[33]),ne=m(ne,Q,$,ee,V,16,d[34]),ee=m(ee,ne,Q,$,se,23,d[35]),$=m($,ee,ne,Q,R,4,d[36]),Q=m(Q,$,ee,ne,N,11,d[37]),ne=m(ne,Q,$,ee,U,16,d[38]),ee=m(ee,ne,Q,$,Y,23,d[39]),$=m($,ee,ne,Q,z,4,d[40]),Q=m(Q,$,ee,ne,O,11,d[41]),ne=m(ne,Q,$,ee,D,16,d[42]),ee=m(ee,ne,Q,$,_,23,d[43]),$=m($,ee,ne,Q,G,4,d[44]),Q=m(Q,$,ee,ne,X,11,d[45]),ne=m(ne,Q,$,ee,K,16,d[46]),ee=m(ee,ne,Q,$,k,23,d[47]),$=y($,ee,ne,Q,O,6,d[48]),Q=y(Q,$,ee,ne,U,10,d[49]),ne=y(ne,Q,$,ee,se,15,d[50]),ee=y(ee,ne,Q,$,M,21,d[51]),$=y($,ee,ne,Q,X,6,d[52]),Q=y(Q,$,ee,ne,D,10,d[53]),ne=y(ne,Q,$,ee,Y,15,d[54]),ee=y(ee,ne,Q,$,R,21,d[55]),$=y($,ee,ne,Q,H,6,d[56]),Q=y(Q,$,ee,ne,K,10,d[57]),ne=y(ne,Q,$,ee,_,15,d[58]),ee=y(ee,ne,Q,$,z,21,d[59]),$=y($,ee,ne,Q,N,6,d[60]),Q=y(Q,$,ee,ne,V,10,d[61]),ne=y(ne,Q,$,ee,k,15,d[62]),ee=y(ee,ne,Q,$,G,21,d[63]),T[0]=T[0]+$|0,T[1]=T[1]+ee|0,T[2]=T[2]+ne|0,T[3]=T[3]+Q|0},_doFinalize:function(){var x=this._data,C=x.words,A=this._nDataBytes*8,I=x.sigBytes*8;C[I>>>5]|=128<<24-I%32;var w=r.floor(A/4294967296),T=A;C[(I+64>>>9<<4)+15]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,C[(I+64>>>9<<4)+14]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,x.sigBytes=(C.length+1)*4,this._process();for(var O=this._hash,R=O.words,k=0;k<4;k++){var D=R[k];R[k]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return O},clone:function(){var x=l.clone.call(this);return x._hash=this._hash.clone(),x}});function g(x,C,A,I,w,T,O){var R=x+(C&A|~C&I)+w+O;return(R<<T|R>>>32-T)+C}function h(x,C,A,I,w,T,O){var R=x+(C&I|A&~I)+w+O;return(R<<T|R>>>32-T)+C}function m(x,C,A,I,w,T,O){var R=x+(C^A^I)+w+O;return(R<<T|R>>>32-T)+C}function y(x,C,A,I,w,T,O){var R=x+(A^(C|~I))+w+O;return(R<<T|R>>>32-T)+C}o.MD5=l._createHelper(f),o.HmacMD5=l._createHmacHelper(f)}(Math),n.MD5})}(PC)),PC.exports}var RC={exports:{}},kC;function iv(){return kC||(kC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(){var r=n,o=r.lib,i=o.WordArray,s=o.Hasher,l=r.algo,u=[],d=l.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(f,g){for(var h=this._hash.words,m=h[0],y=h[1],x=h[2],C=h[3],A=h[4],I=0;I<80;I++){if(I<16)u[I]=f[g+I]|0;else{var w=u[I-3]^u[I-8]^u[I-14]^u[I-16];u[I]=w<<1|w>>>31}var T=(m<<5|m>>>27)+A+u[I];I<20?T+=(y&x|~y&C)+1518500249:I<40?T+=(y^x^C)+1859775393:I<60?T+=(y&x|y&C|x&C)-1894007588:T+=(y^x^C)-899497514,A=C,C=x,x=y<<30|y>>>2,y=m,m=T}h[0]=h[0]+m|0,h[1]=h[1]+y|0,h[2]=h[2]+x|0,h[3]=h[3]+C|0,h[4]=h[4]+A|0},_doFinalize:function(){var f=this._data,g=f.words,h=this._nDataBytes*8,m=f.sigBytes*8;return g[m>>>5]|=128<<24-m%32,g[(m+64>>>9<<4)+14]=Math.floor(h/4294967296),g[(m+64>>>9<<4)+15]=h,f.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var f=s.clone.call(this);return f._hash=this._hash.clone(),f}});r.SHA1=s._createHelper(d),r.HmacSHA1=s._createHmacHelper(d)}(),n.SHA1})}(RC)),RC.exports}var MC={exports:{}},_C;function _A(){return _C||(_C=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(r){var o=n,i=o.lib,s=i.WordArray,l=i.Hasher,u=o.algo,d=[],f=[];(function(){function m(A){for(var I=r.sqrt(A),w=2;w<=I;w++)if(!(A%w))return!1;return!0}function y(A){return(A-(A|0))*4294967296|0}for(var x=2,C=0;C<64;)m(x)&&(C<8&&(d[C]=y(r.pow(x,1/2))),f[C]=y(r.pow(x,1/3)),C++),x++})();var g=[],h=u.SHA256=l.extend({_doReset:function(){this._hash=new s.init(d.slice(0))},_doProcessBlock:function(m,y){for(var x=this._hash.words,C=x[0],A=x[1],I=x[2],w=x[3],T=x[4],O=x[5],R=x[6],k=x[7],D=0;D<64;D++){if(D<16)g[D]=m[y+D]|0;else{var N=g[D-15],M=(N<<25|N>>>7)^(N<<14|N>>>18)^N>>>3,_=g[D-2],U=(_<<15|_>>>17)^(_<<13|_>>>19)^_>>>10;g[D]=M+g[D-7]+U+g[D-16]}var H=T&O^~T&R,G=C&A^C&I^A&I,Y=(C<<30|C>>>2)^(C<<19|C>>>13)^(C<<10|C>>>22),V=(T<<26|T>>>6)^(T<<21|T>>>11)^(T<<7|T>>>25),X=k+V+H+f[D]+g[D],z=Y+G;k=R,R=O,O=T,T=w+X|0,w=I,I=A,A=C,C=X+z|0}x[0]=x[0]+C|0,x[1]=x[1]+A|0,x[2]=x[2]+I|0,x[3]=x[3]+w|0,x[4]=x[4]+T|0,x[5]=x[5]+O|0,x[6]=x[6]+R|0,x[7]=x[7]+k|0},_doFinalize:function(){var m=this._data,y=m.words,x=this._nDataBytes*8,C=m.sigBytes*8;return y[C>>>5]|=128<<24-C%32,y[(C+64>>>9<<4)+14]=r.floor(x/4294967296),y[(C+64>>>9<<4)+15]=x,m.sigBytes=y.length*4,this._process(),this._hash},clone:function(){var m=l.clone.call(this);return m._hash=this._hash.clone(),m}});o.SHA256=l._createHelper(h),o.HmacSHA256=l._createHmacHelper(h)}(Math),n.SHA256})}(MC)),MC.exports}var FC={exports:{}},DC;function Bre(){return DC||(DC=1,function(e,t){(function(n,r,o){e.exports=r(rt(),_A())})(et,function(n){return function(){var r=n,o=r.lib,i=o.WordArray,s=r.algo,l=s.SHA256,u=s.SHA224=l.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var d=l._doFinalize.call(this);return d.sigBytes-=4,d}});r.SHA224=l._createHelper(u),r.HmacSHA224=l._createHmacHelper(u)}(),n.SHA224})}(FC)),FC.exports}var BC={exports:{}},LC;function FA(){return LC||(LC=1,function(e,t){(function(n,r,o){e.exports=r(rt(),Pf())})(et,function(n){return function(){var r=n,o=r.lib,i=o.Hasher,s=r.x64,l=s.Word,u=s.WordArray,d=r.algo;function f(){return l.create.apply(l,arguments)}var g=[f(1116352408,3609767458),f(1899447441,602891725),f(3049323471,3964484399),f(3921009573,2173295548),f(961987163,4081628472),f(1508970993,3053834265),f(2453635748,2937671579),f(2870763221,3664609560),f(3624381080,2734883394),f(310598401,1164996542),f(607225278,1323610764),f(1426881987,3590304994),f(1925078388,4068182383),f(2162078206,991336113),f(2614888103,633803317),f(3248222580,3479774868),f(3835390401,2666613458),f(4022224774,944711139),f(264347078,2341262773),f(604807628,2007800933),f(770255983,1495990901),f(1249150122,1856431235),f(1555081692,3175218132),f(1996064986,2198950837),f(2554220882,3999719339),f(2821834349,766784016),f(2952996808,2566594879),f(3210313671,3203337956),f(3336571891,1034457026),f(3584528711,2466948901),f(113926993,3758326383),f(338241895,168717936),f(666307205,1188179964),f(773529912,1546045734),f(1294757372,1522805485),f(1396182291,2643833823),f(1695183700,2343527390),f(1986661051,1014477480),f(2177026350,1206759142),f(2456956037,344077627),f(2730485921,1290863460),f(2820302411,3158454273),f(3259730800,3505952657),f(3345764771,106217008),f(3516065817,3606008344),f(3600352804,1432725776),f(4094571909,1467031594),f(275423344,851169720),f(430227734,3100823752),f(506948616,1363258195),f(659060556,3750685593),f(883997877,3785050280),f(958139571,3318307427),f(1322822218,3812723403),f(1537002063,2003034995),f(1747873779,3602036899),f(1955562222,1575990012),f(2024104815,1125592928),f(2227730452,2716904306),f(2361852424,442776044),f(2428436474,593698344),f(2756734187,3733110249),f(3204031479,2999351573),f(3329325298,3815920427),f(3391569614,3928383900),f(3515267271,566280711),f(3940187606,3454069534),f(4118630271,4000239992),f(116418474,1914138554),f(174292421,2731055270),f(289380356,3203993006),f(460393269,320620315),f(685471733,587496836),f(852142971,1086792851),f(1017036298,365543100),f(1126000580,2618297676),f(1288033470,3409855158),f(1501505948,4234509866),f(1607167915,987167468),f(1816402316,1246189591)],h=[];(function(){for(var y=0;y<80;y++)h[y]=f()})();var m=d.SHA512=i.extend({_doReset:function(){this._hash=new u.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(y,x){for(var C=this._hash.words,A=C[0],I=C[1],w=C[2],T=C[3],O=C[4],R=C[5],k=C[6],D=C[7],N=A.high,M=A.low,_=I.high,U=I.low,H=w.high,G=w.low,Y=T.high,V=T.low,X=O.high,z=O.low,se=R.high,K=R.low,$=k.high,ee=k.low,ne=D.high,Q=D.low,de=N,pe=M,ye=_,ce=U,be=H,xe=G,Ee=Y,me=V,Re=X,ve=z,qe=se,Dt=K,bt=$,st=ee,rn=ne,mt=Q,Ke=0;Ke<80;Ke++){var Mt=h[Ke];if(Ke<16)var tt=Mt.high=y[x+Ke*2]|0,ot=Mt.low=y[x+Ke*2+1]|0;else{var wt=h[Ke-15],Pe=wt.high,je=wt.low,Ie=(Pe>>>1|je<<31)^(Pe>>>8|je<<24)^Pe>>>7,Ce=(je>>>1|Pe<<31)^(je>>>8|Pe<<24)^(je>>>7|Pe<<25),vt=h[Ke-2],xt=vt.high,Fe=vt.low,Oe=(xt>>>19|Fe<<13)^(xt<<3|Fe>>>29)^xt>>>6,qt=(Fe>>>19|xt<<13)^(Fe<<3|xt>>>29)^(Fe>>>6|xt<<26),wn=h[Ke-7],Un=wn.high,oo=wn.low,gi=h[Ke-16],Oa=gi.high,is=gi.low,ot=Ce+oo,tt=Ie+Un+(ot>>>0<Ce>>>0?1:0),ot=ot+qt,tt=tt+Oe+(ot>>>0<qt>>>0?1:0),ot=ot+is,tt=tt+Oa+(ot>>>0<is>>>0?1:0);Mt.high=tt,Mt.low=ot}var ss=Re&qe^~Re&bt,ko=ve&Dt^~ve&st,as=de&ye^de&be^ye&be,ls=pe&ce^pe&xe^ce&xe,cs=(de>>>28|pe<<4)^(de<<30|pe>>>2)^(de<<25|pe>>>7),us=(pe>>>28|de<<4)^(pe<<30|de>>>2)^(pe<<25|de>>>7),ds=(Re>>>14|ve<<18)^(Re>>>18|ve<<14)^(Re<<23|ve>>>9),Pa=(ve>>>14|Re<<18)^(ve>>>18|Re<<14)^(ve<<23|Re>>>9),Mo=g[Ke],ja=Mo.high,sr=Mo.low,Jt=mt+Pa,Tt=rn+ds+(Jt>>>0<mt>>>0?1:0),Jt=Jt+ko,Tt=Tt+ss+(Jt>>>0<ko>>>0?1:0),Jt=Jt+sr,Tt=Tt+ja+(Jt>>>0<sr>>>0?1:0),Jt=Jt+ot,Tt=Tt+tt+(Jt>>>0<ot>>>0?1:0),Nr=us+ls,Ra=cs+as+(Nr>>>0<us>>>0?1:0);rn=bt,mt=st,bt=qe,st=Dt,qe=Re,Dt=ve,ve=me+Jt|0,Re=Ee+Tt+(ve>>>0<me>>>0?1:0)|0,Ee=be,me=xe,be=ye,xe=ce,ye=de,ce=pe,pe=Jt+Nr|0,de=Tt+Ra+(pe>>>0<Jt>>>0?1:0)|0}M=A.low=M+pe,A.high=N+de+(M>>>0<pe>>>0?1:0),U=I.low=U+ce,I.high=_+ye+(U>>>0<ce>>>0?1:0),G=w.low=G+xe,w.high=H+be+(G>>>0<xe>>>0?1:0),V=T.low=V+me,T.high=Y+Ee+(V>>>0<me>>>0?1:0),z=O.low=z+ve,O.high=X+Re+(z>>>0<ve>>>0?1:0),K=R.low=K+Dt,R.high=se+qe+(K>>>0<Dt>>>0?1:0),ee=k.low=ee+st,k.high=$+bt+(ee>>>0<st>>>0?1:0),Q=D.low=Q+mt,D.high=ne+rn+(Q>>>0<mt>>>0?1:0)},_doFinalize:function(){var y=this._data,x=y.words,C=this._nDataBytes*8,A=y.sigBytes*8;x[A>>>5]|=128<<24-A%32,x[(A+128>>>10<<5)+30]=Math.floor(C/4294967296),x[(A+128>>>10<<5)+31]=C,y.sigBytes=x.length*4,this._process();var I=this._hash.toX32();return I},clone:function(){var y=i.clone.call(this);return y._hash=this._hash.clone(),y},blockSize:1024/32});r.SHA512=i._createHelper(m),r.HmacSHA512=i._createHmacHelper(m)}(),n.SHA512})}(BC)),BC.exports}var NC={exports:{}},$C;function Lre(){return $C||($C=1,function(e,t){(function(n,r,o){e.exports=r(rt(),Pf(),FA())})(et,function(n){return function(){var r=n,o=r.x64,i=o.Word,s=o.WordArray,l=r.algo,u=l.SHA512,d=l.SHA384=u.extend({_doReset:function(){this._hash=new s.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var f=u._doFinalize.call(this);return f.sigBytes-=16,f}});r.SHA384=u._createHelper(d),r.HmacSHA384=u._createHmacHelper(d)}(),n.SHA384})}(NC)),NC.exports}var VC={exports:{}},WC;function Nre(){return WC||(WC=1,function(e,t){(function(n,r,o){e.exports=r(rt(),Pf())})(et,function(n){return function(r){var o=n,i=o.lib,s=i.WordArray,l=i.Hasher,u=o.x64,d=u.Word,f=o.algo,g=[],h=[],m=[];(function(){for(var C=1,A=0,I=0;I<24;I++){g[C+5*A]=(I+1)*(I+2)/2%64;var w=A%5,T=(2*C+3*A)%5;C=w,A=T}for(var C=0;C<5;C++)for(var A=0;A<5;A++)h[C+5*A]=A+(2*C+3*A)%5*5;for(var O=1,R=0;R<24;R++){for(var k=0,D=0,N=0;N<7;N++){if(O&1){var M=(1<<N)-1;M<32?D^=1<<M:k^=1<<M-32}O&128?O=O<<1^113:O<<=1}m[R]=d.create(k,D)}})();var y=[];(function(){for(var C=0;C<25;C++)y[C]=d.create()})();var x=f.SHA3=l.extend({cfg:l.cfg.extend({outputLength:512}),_doReset:function(){for(var C=this._state=[],A=0;A<25;A++)C[A]=new d.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(C,A){for(var I=this._state,w=this.blockSize/2,T=0;T<w;T++){var O=C[A+2*T],R=C[A+2*T+1];O=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,R=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360;var k=I[T];k.high^=R,k.low^=O}for(var D=0;D<24;D++){for(var N=0;N<5;N++){for(var M=0,_=0,U=0;U<5;U++){var k=I[N+5*U];M^=k.high,_^=k.low}var H=y[N];H.high=M,H.low=_}for(var N=0;N<5;N++)for(var G=y[(N+4)%5],Y=y[(N+1)%5],V=Y.high,X=Y.low,M=G.high^(V<<1|X>>>31),_=G.low^(X<<1|V>>>31),U=0;U<5;U++){var k=I[N+5*U];k.high^=M,k.low^=_}for(var z=1;z<25;z++){var k=I[z],se=k.high,K=k.low,$=g[z];if($<32)var M=se<<$|K>>>32-$,_=K<<$|se>>>32-$;else var M=K<<$-32|se>>>64-$,_=se<<$-32|K>>>64-$;var ee=y[h[z]];ee.high=M,ee.low=_}var ne=y[0],Q=I[0];ne.high=Q.high,ne.low=Q.low;for(var N=0;N<5;N++)for(var U=0;U<5;U++){var z=N+5*U,k=I[z],de=y[z],pe=y[(N+1)%5+5*U],ye=y[(N+2)%5+5*U];k.high=de.high^~pe.high&ye.high,k.low=de.low^~pe.low&ye.low}var k=I[0],ce=m[D];k.high^=ce.high,k.low^=ce.low}},_doFinalize:function(){var C=this._data,A=C.words;this._nDataBytes*8;var I=C.sigBytes*8,w=this.blockSize*32;A[I>>>5]|=1<<24-I%32,A[(r.ceil((I+1)/w)*w>>>5)-1]|=128,C.sigBytes=A.length*4,this._process();for(var T=this._state,O=this.cfg.outputLength/8,R=O/8,k=[],D=0;D<R;D++){var N=T[D],M=N.high,_=N.low;M=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,k.push(_),k.push(M)}return new s.init(k,O)},clone:function(){for(var C=l.clone.call(this),A=C._state=this._state.slice(0),I=0;I<25;I++)A[I]=A[I].clone();return C}});o.SHA3=l._createHelper(x),o.HmacSHA3=l._createHmacHelper(x)}(Math),n.SHA3})}(VC)),VC.exports}var zC={exports:{}},UC;function $re(){return UC||(UC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){/** @preserve
224
+ `+(l!==s?`result of cast: ${l}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:s=t,strict:l=this.spec.strict}=n,u=t;l||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let f of Object.values(this.internalTests))f&&d.push(f);this.runTests({path:i,value:u,originalValue:s,options:n,tests:d},r,f=>{if(f.length)return o(f,u);this.runTests({path:i,value:u,originalValue:s,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:s,originalValue:l,path:u,options:d}=t,f=x=>{o||(o=!0,n(x,s))},g=x=>{o||(o=!0,r(x,s))},h=i.length,m=[];if(!h)return g([]);let y={value:s,originalValue:l,path:u,options:d,schema:this};for(let x=0;x<i.length;x++){const C=i[x];C(y,f,function(I){I&&(Array.isArray(I)?m.push(...I):m.push(I)),--h<=0&&g(m)})}}asNestedTest({key:t,index:n,parent:r,parentPath:o,originalParent:i,options:s}){const l=t??n;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof l=="number";let d=r[l];const f=Object.assign({},s,{strict:!0,parent:r,value:d,originalValue:i[l],key:void 0,[u?"index":"key"]:l,path:u||l.includes(".")?`${o||""}[${u?l:`"${l}"`}]`:(o?`${o}.`:"")+t});return(g,h,m)=>this.resolve(f)._validate(d,f,h,m)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((s,l)=>o._validate(t,n,(u,d)=>{Bn.isError(u)&&(u.value=d),l(u)},(u,d)=>{u.length?l(new Bn(u,d,void 0,void 0,i)):s(d)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,s=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(l,u)=>{throw Bn.isError(l)&&(l.value=u),l},(l,u)=>{if(l.length)throw new Bn(l,t,void 0,void 0,s);i=u}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Bn.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Bn.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Ys(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=ks({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=ks({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Ur.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Ur.notNull){return this.nullability(!1,t)}required(t=Ur.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Ur.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=ks(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(s=>!(s.OPTIONS.name===n.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=uA(t).map(i=>new es(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new Td(o,n):Td.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=ks({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Ur.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=ks({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),r}notOneOf(t,n=Ur.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=ks({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:s}=n.spec;return{meta:o,label:r,optional:i,nullable:s,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,f)=>f.findIndex(g=>g.name===u.name)===d)}}}Tr.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Tr.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:s}=Bne(this,t,n,r.context);return s[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])Tr.prototype[e]=Tr.prototype.oneOf;for(const e of["not","nope"])Tr.prototype[e]=Tr.prototype.notOneOf;const Lne=()=>!0;function hA(e){return new gA(e)}class gA extends Tr{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Lne},t))}}hA.prototype=gA.prototype;const Nne=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function $ne(e){const t=Rg(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function Rg(e){var t,n;const r=Nne.exec(e);return r?{year:vo(r[1]),month:vo(r[2],1)-1,day:vo(r[3],1),hour:vo(r[4]),minute:vo(r[5]),second:vo(r[6]),millisecond:r[7]?vo(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:vo(r[10]),minuteOffset:vo(r[11])}:null}function vo(e,t=0){return Number(e)||t}let Vne=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Wne=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,zne=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Une="^\\d{4}-\\d{2}-\\d{2}",Hne="\\d{2}:\\d{2}:\\d{2}",Gne="(([+-]\\d{2}(:?\\d{2})?)|Z)",qne=new RegExp(`${Une}T${Hne}(\\.\\d+)?${Gne}$`),Yne=e=>wo(e)||e===e.trim(),Kne={}.toString();function So(){return new mA}class mA extends Tr{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Kne?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Ur.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Dn.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Dn.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Dn.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||Dn.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&r||s.search(t)!==-1})}email(t=Dn.email){return this.matches(Vne,{name:"email",message:t,excludeEmptyString:!0})}url(t=Dn.url){return this.matches(Wne,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Dn.uuid){return this.matches(zne,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(qne,{name:"datetime",message:n||Dn.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Dn.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const s=Rg(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:n||Dn.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=Rg(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Dn.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Yne})}lowercase(t=Dn.lowercase){return this.transform(n=>wo(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>wo(n)||n===n.toLowerCase()})}uppercase(t=Dn.uppercase){return this.transform(n=>wo(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>wo(n)||n===n.toUpperCase()})}}So.prototype=mA.prototype;let Xne=e=>e!=+e;function vA(){return new yA}class yA extends Tr{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Xne(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=Ko.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=Ko.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=Ko.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=Ko.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=Ko.positive){return this.moreThan(0,t)}negative(t=Ko.negative){return this.lessThan(0,t)}integer(t=Ko.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>wo(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>wo(o)?o:Math[t](o))}}vA.prototype=yA.prototype;let Zne=new Date(""),Qne=e=>Object.prototype.toString.call(e)==="[object Date]";class If extends Tr{constructor(){super({type:"date",check(t){return Qne(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=$ne(t),isNaN(t)?If.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(es.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=jg.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=jg.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}If.INVALID_DATE=Zne;If.prototype;function Jne(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([s,l])=>`${s}-${l}`));function i(s,l){let u=zi.split(s)[0];r.add(u),o.has(`${l}-${u}`)||n.push([l,u])}for(const s of Object.keys(e)){let l=e[s];r.add(s),es.isRef(l)&&l.isSibling?i(l.path,s):Z0(l)&&"deps"in l&&l.deps.forEach(u=>i(u,s))}return Tne.array(Array.from(r),n).reverse()}function gC(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function bA(e){return(t,n)=>gC(e,t)-gC(e,n)}const ere=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function Vu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Vu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Vu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Vu)}):"optional"in e?e.optional():e}const tre=(e,t)=>{const n=[...zi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=zi.getter(zi.join(n),!0)(e);return!!(o&&r in o)};let mC=e=>Object.prototype.toString.call(e)==="[object Object]";function vC(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const nre=bA([]);function Q0(e){return new xA(e)}class xA extends Tr{constructor(t){super({type:"object",check(n){return mC(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=nre,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,s=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(o).filter(g=>!this._nodes.includes(g))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),f=!1;for(const g of l){let h=i[g],m=g in o;if(h){let y,x=o[g];d.path=(n.path?`${n.path}.`:"")+g,h=h.resolve({value:x,context:n.context,parent:u});let C=h instanceof Tr?h.spec:void 0,A=C==null?void 0:C.strict;if(C!=null&&C.strip){f=f||g in o;continue}y=!n.__validating||!A?h.cast(o[g],d):o[g],y!==void 0&&(u[g]=y)}else m&&!s&&(u[g]=o[g]);(m!==g in u||u[g]!==o[g])&&(f=!0)}return f?u:o}_validate(t,n={},r,o){let{from:i=[],originalValue:s=t,recursive:l=this.spec.recursive}=n;n.from=[{schema:this,value:s},...i],n.__validating=!0,n.originalValue=s,super._validate(t,n,r,(u,d)=>{if(!l||!mC(d)){o(u,d);return}s=s||d;let f=[];for(let g of this._nodes){let h=this.fields[g];!h||es.isRef(h)||f.push(h.asNestedTest({options:n,key:g,parent:d,parentPath:n.path,originalParent:s}))}this.runTests({tests:f,value:d,originalValue:s,options:n},r,g=>{o(g.sort(this._sortErrors).concat(u),d)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const s=r[o];r[o]=s===void 0?i:s}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(s):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=Jne(t,n),r._sortErrors=bA(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return Vu(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=zi.getter(t,!0);return this.transform(i=>{if(!i)return i;let s=i;return tre(i,t)&&(s=Object.assign({},i),r||delete s[t],s[n]=o(i)),s})}json(){return this.transform(ere)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||$u.exact,test(n){if(n==null)return!0;const r=vC(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=$u.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=vC(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=$u.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(jh.camelCase)}snakeCase(){return this.transformKeys(jh.snakeCase)}constantCase(){return this.transformKeys(t=>jh.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,s]of Object.entries(n.fields)){var o;let l=t;(o=l)!=null&&o.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),r.fields[i]=s.describe(l)}return r}}Q0.prototype=xA.prototype;const yC=hA().test("function","Invalid function",e=>ie.isFunction(e));var Zo,Ni,al;class CA{constructor(){go(this,Ni);go(this,Zo,[])}get(t){if(So().required().validateSync(t),Ka(this,Ni,al).call(this)){const n=localStorage.getItem(t);return ie.isNil(n)?null:JSON.parse(n)}else return null}set(t,n){return So().required().validateSync(t),Ka(this,Ni,al).call(this)?(localStorage.setItem(t,JSON.stringify(n)),n):null}watch(t,n){So().required().validateSync(t),yC.validateSync(n),Ka(this,Ni,al).call(this)&&(_n(this,Zo).push({key:t,callback:n}),window.addEventListener("storage",r=>{r.storageArea===localStorage&&r.key===t&&n(this.get(t))}))}unwatch(t,n){So().required().validateSync(t),yC.optional().default(ie.identity).validateSync(n),Ka(this,Ni,al).call(this)&&(n!==void 0?zo(this,Zo,ie.reject(_n(this,Zo),r=>r.key===t&&r.callback===n)):zo(this,Zo,ie.reject(_n(this,Zo),r=>r.key===t)))}}Zo=new WeakMap,Ni=new WeakSet,al=function(){return typeof window<"u"};function Od(e={},t=[],n={}){const{isEmpty:r=ie.isEmpty}=n;return!ie.some(t,o=>r((e??{})[o.locale]))}function wA(e={},t=[],n={}){const{isEmpty:r=ie.isEmpty}=n;return ie.some(t,o=>!r((e??{})[o.locale]))}function J0(e,t,n){if(!ie.isPlainObject(e)||t===void 0)return;const r=ie.isPlainObject(n)?n:{},o=!!((r==null?void 0:r.fallback)??!0);let i=e[String(t)];if(i===void 0&&o){const s=ie.isArray(r.fallbackLocales)&&!ie.isEmpty(r.fallbackLocales)?r.fallbackLocales:["en"];i=ie.chain(s).map(l=>e[String(l)]).reject(ie.isUndefined).first().value(),i===void 0&&(i=ie.chain(e).values().first().value())}return i}function Of(e=[],t){const n=ie.isArray(e)?e:[e],r=ie.filter(n,o=>P.isValidElement(o));ie.each(r,o=>{var i;t(o),Of(((i=o==null?void 0:o.props)==null?void 0:i.children)??[],t)})}var SA={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(On,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",l="minute",u="hour",d="day",f="week",g="month",h="quarter",m="year",y="date",x="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(G){var Y=["th","st","nd","rd"],V=G%100;return"["+G+(Y[(V-20)%10]||Y[V]||Y[0])+"]"}},w=function(G,Y,V){var X=String(G);return!X||X.length>=Y?G:""+Array(Y+1-X.length).join(V)+G},T={s:w,z:function(G){var Y=-G.utcOffset(),V=Math.abs(Y),X=Math.floor(V/60),z=V%60;return(Y<=0?"+":"-")+w(X,2,"0")+":"+w(z,2,"0")},m:function G(Y,V){if(Y.date()<V.date())return-G(V,Y);var X=12*(V.year()-Y.year())+(V.month()-Y.month()),z=Y.clone().add(X,g),se=V-z<0,K=Y.clone().add(X+(se?-1:1),g);return+(-(X+(V-z)/(se?z-K:K-z))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return{M:g,y:m,w:f,d,D:y,h:u,m:l,s,ms:i,Q:h}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},O="en",R={};R[O]=I;var k="$isDayjsObject",D=function(G){return G instanceof U||!(!G||!G[k])},N=function G(Y,V,X){var z;if(!Y)return O;if(typeof Y=="string"){var se=Y.toLowerCase();R[se]&&(z=se),V&&(R[se]=V,z=se);var K=Y.split("-");if(!z&&K.length>1)return G(K[0])}else{var $=Y.name;R[$]=Y,z=$}return!X&&z&&(O=z),z||!X&&O},M=function(G,Y){if(D(G))return G.clone();var V=typeof Y=="object"?Y:{};return V.date=G,V.args=arguments,new U(V)},_=T;_.l=N,_.i=D,_.w=function(G,Y){return M(G,{locale:Y.$L,utc:Y.$u,x:Y.$x,$offset:Y.$offset})};var U=function(){function G(V){this.$L=N(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[k]=!0}var Y=G.prototype;return Y.parse=function(V){this.$d=function(X){var z=X.date,se=X.utc;if(z===null)return new Date(NaN);if(_.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var K=z.match(C);if(K){var $=K[2]-1||0,ee=(K[7]||"0").substring(0,3);return se?new Date(Date.UTC(K[1],$,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ee)):new Date(K[1],$,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ee)}}return new Date(z)}(V),this.init()},Y.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},Y.$utils=function(){return _},Y.isValid=function(){return this.$d.toString()!==x},Y.isSame=function(V,X){var z=M(V);return this.startOf(X)<=z&&z<=this.endOf(X)},Y.isAfter=function(V,X){return M(V)<this.startOf(X)},Y.isBefore=function(V,X){return this.endOf(X)<M(V)},Y.$g=function(V,X,z){return _.u(V)?this[X]:this.set(z,V)},Y.unix=function(){return Math.floor(this.valueOf()/1e3)},Y.valueOf=function(){return this.$d.getTime()},Y.startOf=function(V,X){var z=this,se=!!_.u(X)||X,K=_.p(V),$=function(be,xe){var Ee=_.w(z.$u?Date.UTC(z.$y,xe,be):new Date(z.$y,xe,be),z);return se?Ee:Ee.endOf(d)},ee=function(be,xe){return _.w(z.toDate()[be].apply(z.toDate("s"),(se?[0,0,0,0]:[23,59,59,999]).slice(xe)),z)},ne=this.$W,Q=this.$M,de=this.$D,pe="set"+(this.$u?"UTC":"");switch(K){case m:return se?$(1,0):$(31,11);case g:return se?$(1,Q):$(0,Q+1);case f:var ye=this.$locale().weekStart||0,ce=(ne<ye?ne+7:ne)-ye;return $(se?de-ce:de+(6-ce),Q);case d:case y:return ee(pe+"Hours",0);case u:return ee(pe+"Minutes",1);case l:return ee(pe+"Seconds",2);case s:return ee(pe+"Milliseconds",3);default:return this.clone()}},Y.endOf=function(V){return this.startOf(V,!1)},Y.$set=function(V,X){var z,se=_.p(V),K="set"+(this.$u?"UTC":""),$=(z={},z[d]=K+"Date",z[y]=K+"Date",z[g]=K+"Month",z[m]=K+"FullYear",z[u]=K+"Hours",z[l]=K+"Minutes",z[s]=K+"Seconds",z[i]=K+"Milliseconds",z)[se],ee=se===d?this.$D+(X-this.$W):X;if(se===g||se===m){var ne=this.clone().set(y,1);ne.$d[$](ee),ne.init(),this.$d=ne.set(y,Math.min(this.$D,ne.daysInMonth())).$d}else $&&this.$d[$](ee);return this.init(),this},Y.set=function(V,X){return this.clone().$set(V,X)},Y.get=function(V){return this[_.p(V)]()},Y.add=function(V,X){var z,se=this;V=Number(V);var K=_.p(X),$=function(Q){var de=M(se);return _.w(de.date(de.date()+Math.round(Q*V)),se)};if(K===g)return this.set(g,this.$M+V);if(K===m)return this.set(m,this.$y+V);if(K===d)return $(1);if(K===f)return $(7);var ee=(z={},z[l]=r,z[u]=o,z[s]=n,z)[K]||1,ne=this.$d.getTime()+V*ee;return _.w(ne,this)},Y.subtract=function(V,X){return this.add(-1*V,X)},Y.format=function(V){var X=this,z=this.$locale();if(!this.isValid())return z.invalidDate||x;var se=V||"YYYY-MM-DDTHH:mm:ssZ",K=_.z(this),$=this.$H,ee=this.$m,ne=this.$M,Q=z.weekdays,de=z.months,pe=z.meridiem,ye=function(xe,Ee,me,Re){return xe&&(xe[Ee]||xe(X,se))||me[Ee].slice(0,Re)},ce=function(xe){return _.s($%12||12,xe,"0")},be=pe||function(xe,Ee,me){var Re=xe<12?"AM":"PM";return me?Re.toLowerCase():Re};return se.replace(A,function(xe,Ee){return Ee||function(me){switch(me){case"YY":return String(X.$y).slice(-2);case"YYYY":return _.s(X.$y,4,"0");case"M":return ne+1;case"MM":return _.s(ne+1,2,"0");case"MMM":return ye(z.monthsShort,ne,de,3);case"MMMM":return ye(de,ne);case"D":return X.$D;case"DD":return _.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return ye(z.weekdaysMin,X.$W,Q,2);case"ddd":return ye(z.weekdaysShort,X.$W,Q,3);case"dddd":return Q[X.$W];case"H":return String($);case"HH":return _.s($,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return be($,ee,!0);case"A":return be($,ee,!1);case"m":return String(ee);case"mm":return _.s(ee,2,"0");case"s":return String(X.$s);case"ss":return _.s(X.$s,2,"0");case"SSS":return _.s(X.$ms,3,"0");case"Z":return K}return null}(xe)||K.replace(":","")})},Y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Y.diff=function(V,X,z){var se,K=this,$=_.p(X),ee=M(V),ne=(ee.utcOffset()-this.utcOffset())*r,Q=this-ee,de=function(){return _.m(K,ee)};switch($){case m:se=de()/12;break;case g:se=de();break;case h:se=de()/3;break;case f:se=(Q-ne)/6048e5;break;case d:se=(Q-ne)/864e5;break;case u:se=Q/o;break;case l:se=Q/r;break;case s:se=Q/n;break;default:se=Q}return z?se:_.a(se)},Y.daysInMonth=function(){return this.endOf(g).$D},Y.$locale=function(){return R[this.$L]},Y.locale=function(V,X){if(!V)return this.$L;var z=this.clone(),se=N(V,X,!0);return se&&(z.$L=se),z},Y.clone=function(){return _.w(this.$d,this)},Y.toDate=function(){return new Date(this.valueOf())},Y.toJSON=function(){return this.isValid()?this.toISOString():null},Y.toISOString=function(){return this.$d.toISOString()},Y.toString=function(){return this.$d.toUTCString()},G}(),H=U.prototype;return M.prototype=H,[["$ms",i],["$s",s],["$m",l],["$H",u],["$W",d],["$M",g],["$y",m],["$D",y]].forEach(function(G){H[G[1]]=function(Y){return this.$g(Y,G[0],G[1])}}),M.extend=function(G,Y){return G.$i||(G(Y,U,M),G.$i=!0),M},M.locale=N,M.isDayjs=D,M.unix=function(G){return M(1e3*G)},M.en=R[O],M.Ls=R,M.p={},M})})(SA);var AA=SA.exports;const Dr=Br(AA);function EA(e){const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Dr().hour(n).minute(r)}const ll=new CA;function rre(e,t,n){return function(r){const o=ie.isFunction(r)?r(t):r;return ll.set(e,o),n(o),o}}function ev(e,t){var u;So().required().validateSync(e);const[n,r]=P.useState(ll.get(e)??t),o=P.useRef(t),i=ie.isEqual(o.current,t)?o.current:t,s=P.useRef(),l=s.current;return P.useEffect(()=>{r(ll.get(e)??i)},[e,i,r]),P.useEffect(()=>{function d(f){r(f)}return ll.watch(e,d),()=>{ll.unwatch(e,d)}},[e,r]),(e!==(l==null?void 0:l.key)||!ie.isEqual(n,l==null?void 0:l.value))&&(s.current={key:e,value:n,setter:rre(e,n,r)}),[n,((u=s.current)==null?void 0:u.setter)??ie.noop]}function TA(e){const[t]=re.useLocaleState();return e!==void 0?String(e):t}function ore(e,t){const n=TA(t==null?void 0:t.locale);return J0(e,n,t)}function ire(e){const t=TA(e==null?void 0:e.locale);return P.useCallback(r=>J0(r,t,e),[t,e])}function IA(e){if(!ie.isPlainObject(e))throw new Error("[useMemoizedObject]: param must be a plain JS object");const[t,n]=P.useState(e);return P.useEffect(()=>{ie.isEqual(e,t)||n(e)},[e,t]),t}function wa(){const[e,t]=P.useState(null),n=!!e,r=P.useCallback(s=>t((s==null?void 0:s.currentTarget)??null),[t]),o=P.useCallback(()=>t(null),[t]),i=P.useCallback(s=>{n?o():r(s)},[n,r,o]);return{anchorEl:e,open:n,handleClick:r,handleClose:o,handleToggle:i}}function sre(e,t){const[n,r]=P.useState({width:1,height:1}),o=e.current;return P.useEffect(()=>{function i(){var d;let l=0,u=0;switch(t){case"client":l=(o==null?void 0:o.clientWidth)??0,u=(o==null?void 0:o.clientHeight)??0;break;case"offset":l=(o==null?void 0:o.offsetWidth)??0,u=(o==null?void 0:o.offsetHeight)??0;break;case"scroll":l=(o==null?void 0:o.scrollWidth)??0,u=(o==null?void 0:o.scrollHeight)??0;break;case"bounding":default:{const f=((d=e.current)==null?void 0:d.getBoundingClientRect())??{width:0,height:0};l=f.width,u=f.height;break}}r({width:l,height:u})}const s=new ResizeObserver(i);return ie.isEmpty(e==null?void 0:e.current)||(s.observe(e==null?void 0:e.current),i()),()=>{s.disconnect()}},[o,t,e]),n}function tv(e){const t=W.useRecordContext(),n=W.useTranslate(),r=W.useResourceContext(),o=t!=null&&t.id?"edit":"create";return P.useMemo(()=>{if(e===!1)return;const s=`resources.${r}.title`;return e||n(`resources.${r}.title.${o}`,{_:n(s,{_:s}),...t})},[o,t,r,n,e])}function OA(){const{mode:e}=Pn(),t=window.matchMedia("(prefers-color-scheme: dark)"),[n,r]=P.useState(()=>e==="auto"?t.matches?"dark":"light":e),o=P.useRef(n);return P.useEffect(()=>{function i(){const l=t.matches?"dark":"light";l!==o.current&&(r(l),o.current=l)}i();const s=t;return s.addEventListener("change",i),()=>{s.removeEventListener("change",i)}},[t]),n}function zr(){throw new Error("Method must be implemented")}const PA={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2,setFontFamily:zr,setMenuOrientation:zr,setMiniDrawer:zr,setContainer:zr,setMode:zr,setPresetColor:zr,setThemeDirection:zr,setAppDefaultPath:zr,setDrawerWidth:zr,setHorizontalMaxItems:zr,isVerticalLayout:e=>!1,isHorizontalLayout:e=>!1};function are(e){return e==="vertical"}function lre(e){return e==="horizontal"}const nv=P.createContext(PA);function kg({initialConfig:e,children:t}){const[n,r]=ev("theme-config",{...PA,...e});function o(y){r(x=>({...x,fontFamily:y}))}function i(y){r(x=>({...x,menuOrientation:y}))}function s(y){r(x=>({...x,miniDrawer:y}))}function l(y){r(x=>({...x,container:y}))}function u(y){r(x=>({...x,mode:y}))}function d(y){r(x=>({...x,presetColor:y}))}function f(y){r(x=>({...x,themeDirection:y}))}function g(y){r(x=>({...x,appDefaultPath:y}))}function h(y){r(x=>({...x,drawerWidth:y}))}function m(y){r(x=>({...x,horizontalMaxItems:y}))}return p.jsx(nv.Provider,{value:{...n,setFontFamily:o,setMenuOrientation:i,setMiniDrawer:s,setContainer:l,setMode:u,setPresetColor:d,setThemeDirection:f,setAppDefaultPath:g,setDrawerWidth:h,setHorizontalMaxItems:m,isVerticalLayout:are,isHorizontalLayout:lre},children:t})}function rv(){return P.useContext(nv)}function Pn(){return rv()}const cre=nc(W.Toolbar,{slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end",position:"initial !important","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}}));function fi(e){return p.jsx(cre,{...e})}function jA({children:e,spacing:t,defaultValues:n,...r}){const{spacing:o}=Pn();return p.jsx(dre,{defaultValues:n,spacing:t||o,children:p.jsx(E.Grid,{container:!0,...r,spacing:t||o,children:e})})}function ure({children:e,content:t=!0,title:n,subheader:r=null,secondary:o=null,toolbar:i=!1,lg:s=12,md:l=12,sm:u=12,xs:d=12,...f}){const g=W.useTranslate(),h=W.useResourceContext(),{cardTitle:m,cardSubheader:y}=P.useMemo(()=>{const x=n||`resources.${h}.title`;return{cardTitle:g(x,{_:x}),cardSubheader:r!==null?g(r,{_:r}):null}},[h,r,n,g]);return p.jsx(E.Grid,{item:!0,...f,lg:s,md:l,sm:u,xs:d,children:p.jsx(Ln,{content:t,title:m,subheader:y,secondary:o,divider:!0,children:p.jsxs(p.Fragment,{children:[e,i===!0?p.jsx(fi,{children:p.jsx(W.SaveButton,{})}):i]})})})}const dre=ge(W.Form,{slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*1.25),padding:0,minHeight:"unset"},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingRight:"0 !important",paddingLeft:"0 !important",paddingBottom:"0 !important"}}));jA.Section=ure;function RA(e){const{confirmTitle:t,confirmContent:n,confirmColor:r="primary",dialogSx:o,icon:i=gre,label:s="ra.action.delete",mutationMode:l="pessimistic",mutationOptions:u={},onClick:d,onSuccess:f,onError:g,...h}=e,{meta:m,...y}=u,{selectedIds:x,onUnselectItems:C}=re.useListContext(e),[A,I]=re.useSafeSetState(!1),w=re.useNotify(),T=re.useResourceContext(e),O=re.useRefresh(),R=re.useTranslate(),k=Et(),[D,{isLoading:N}]=re.useDeleteMany(T,{ids:x,meta:m},{onSuccess:()=>{O(),w("ra.notification.deleted",{type:"info",messageArgs:{smart_count:x.length},undoable:l==="undoable"}),C(),I(!1),f&&ie.isFunction(f)&&f()},onError:H=>{w(typeof H=="string"?H:H.message||"ra.notification.http_error",{type:"error",messageArgs:{_:typeof H=="string"?H:H&&H.message?H.message:void 0}}),I(!1),g&&ie.isFunction(g)&&g()},mutationMode:l,...y});function M(H){I(!0),H.stopPropagation()}function _(){I(!1)}function U(H){D(),typeof d=="function"&&d(H)}return p.jsxs(p.Fragment,{children:[p.jsx(hre,{onClick:M,label:s,...fre(h),children:i}),p.jsx(W.Confirm,{isOpen:A,loading:N,sx:o||{"& .MuiPaper-root":{p:2},"& .MuiDialogActions-root":{display:"flex",justifyContent:"space-between",width:"100%","& .RaConfirm-confirmPrimary":{backgroundColor:k.palette.primary.main,color:k.palette.primary.contrastText,ml:2,"&:hover":{backgroundColor:k.palette.primary.dark}},"& .MuiButtonBase-root":{width:"50%",border:`1px solid ${k.palette.action.disabled}`},"& .MuiButton-icon":{display:"none"}}},title:t?typeof t=="string"?R(t):t:p.jsx(E.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:p.jsx(E.Box,{sx:{color:"primary.main",fontSize:"28px",borderRadius:"50%",backgroundColor:"primary.lighter",width:"56px",height:"56px",display:"flex",alignItems:"center",justifyContent:"center"},children:p.jsx(ze.DeleteFilled,{})})}),content:n||p.jsx(E.Typography,{maxWidth:"300px",variant:"h4",align:"center",children:R("ra.message.bulk_delete_content",{_:"ra.message.bulk_delete_content",smart_count:x.length,name:R(`resources.${T}.forcedCaseName`,{smart_count:x.length,_:Qo.humanize(R(`resources.${T}.name`,{smart_count:x.length,_:Qo.inflect(T,x.length)}),!0)})})}),confirmColor:r,translateOptions:{smart_count:x.length,name:R(`resources.${T}.forcedCaseName`,{smart_count:x.length,_:Qo.humanize(R(`resources.${T}.name`,{smart_count:x.length,_:Qo.inflect(T,x.length)}),!0)})},onConfirm:U,onClose:_})]})}function fre({classes:e,filterValues:t,label:n,selectedIds:r,...o}){return o}const pre="RaBulkDeleteWithConfirmButton",hre=ge(W.Button,{name:pre,overridesResolver:e=>e.root})(({theme:e})=>({color:e.palette.error.main,"&:hover":{backgroundColor:nt(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}})),gre=p.jsx(T0,{});RA.propTypes={confirmTitle:b.node,confirmContent:b.node,confirmColor:b.string,dialogSx:b.object,icon:b.element,label:b.string,mutationMode:b.oneOf(["pessimistic","optimistic","undoable"]),resource:b.string,selectedIds:b.arrayOf(b.any),onSuccess:b.func,onError:b.func};const mre="RaButton";function vre(e){if(e==null)return;if(typeof e=="string")return{to:e};const{redirect:t,replace:n,state:r,...o}=e;return{to:o,redirect:t,replace:n,state:r}}const yre=ge(E.Button,{name:mre,overridesResolver:(e,t)=>t.root})({"&.MuiButton-sizeSmall":{lineHeight:1.5}});function ts(e){const{disableIconOnly:t=!1,label:n,children:r,className:o,color:i,size:s,disabled:l,alignIcon:u,to:d,...f}=e,g=W.useTranslate(),h=vre(d);if(t){const m=n?g(n,{_:n}):void 0;return p.jsx(yre,{className:o,color:i,size:s,"aria-label":m,disabled:l,startIcon:u==="left"&&r?r:void 0,endIcon:u==="right"&&r?r:void 0,...h,...f,children:m})}return p.jsx(W.Button,{...e})}function kA(e){const{className:t,icon:n=bre,label:r="ra.action.create",resource:o,scrollToTop:i=!0,variant:s,to:l,state:u={},disableFloatingButton:d=!1,...f}=e,g=re.useResourceContext(e),h=re.useCreatePath(),m=re.useTranslate(),y=E.useMediaQuery(A=>A.breakpoints.down("md")),x=f5({},xre.get(String(i)),u),C=Are(l);return!d&&y?p.jsx(Cre,{component:gt.Link,to:h({resource:g,type:"create"}),state:x,color:"primary",className:$e(jd.floating,t),"aria-label":r?m(r):"ra.action.create",...f,...C,children:n}):p.jsx(wre,{component:gt.Link,to:h({resource:g,type:"create"}),state:x,className:$e(jd.root,t),label:r,variant:s,...f,...C,children:n})}const bre=p.jsx(d0,{}),xre=new Map([["true",{_scrollToTop:!0}],["false",{}]]);kA.propTypes={resource:b.string,className:b.string,icon:b.element,label:b.string};const Pd="RaCreateButton",jd={root:`${Pd}-root`,floating:`${Pd}-floating`},Cre=ge(E.Fab,{name:Pd,overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${jd.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),wre=ge(ts,{name:Pd,overridesResolver:(e,t)=>t.root})({});function Sre(e,t){return e.resource===t.resource&&e.label===t.label&&e.translate===t.translate&&e.disabled===t.disabled&&_l(e.to,t.to)&&_l(e.state,t.state)}const MA=L.memo(kA,Sre);function Are(e){if(e==null)return;if(typeof e=="string")return{to:e};const{redirect:t,replace:n,state:r,...o}=e;return{to:o,redirect:t,replace:n,state:r}}function ov(e,t){const n=t.id;if(!e)return[t];const r=e.findIndex(o=>o.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]}function Ere(e,t){return e&&e.data?{data:ov(e.data,t),total:e.total+1}:e}function Tre(e,t){return e&&e.length>0?ov(e,t):e}function Ire(e,t){return e&&e.data?{...e,data:ov(e.data,t),total:e.total+1}:e}function Ore(e){const{disableFloatingButton:t,label:n="ra.action.create",startIcon:r=p.jsx(ze.PlusCircleOutlined,{}),...o}=e,i=P.useCallback(s=>{var l;s.preventDefault(),(l=e==null?void 0:e.onClick)==null||l.call(e)},[e]);return t?p.jsx(ts,{...o,onClick:i,label:n,children:r}):p.jsx(yZ,{...e,onClick:i,label:n,children:r})}function Pre(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=un.useFormContext(),o=re.useTranslate(),i=P.useCallback(s=>{s.preventDefault(),s.stopPropagation(),r(l=>t(l,n))()},[r,t,n]);return p.jsx(E.Button,{onClick:i,color:"primary",variant:"contained",size:"medium",children:o("ra.action.save")})}function jre(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,onSubmit:i,mutationOptions:s,scroll:l="body",...u}=e,d=Vi.useQueryClient(),f=re.useResourceContext(),g=re.useTranslate(),h=P.Children.only(t),[m,y]=P.useState(!1),x=re.useNotify(),C=P.useCallback(()=>y(!0),[]),A=P.useCallback(()=>y(!1),[]),I=P.useCallback((w,T,O)=>{var D,N;const k=Date.now();d.setQueryData([f,"getOne",{id:w.id}],w),d.setQueriesData([f,"getList"],M=>Ire(M,w),{updatedAt:k}),d.setQueriesData([f,"getMany"],M=>Tre(M,w),{updatedAt:k}),d.setQueriesData([f,"getManyReference"],M=>Ere(M,w),{updatedAt:k}),A(),x("ra.notification.created",{messageArgs:{smart_count:1}}),(N=(D=e==null?void 0:e.mutationOptions)==null?void 0:D.onSuccess)==null||N.call(D,w,T,O)},[A,x,e.mutationOptions,d,f]);return p.jsxs(p.Fragment,{children:[p.jsx(Ore,{...u,onClick:C}),p.jsx(E.Dialog,{open:m,scroll:l,onClose:A,maxWidth:n,fullWidth:r,fullScreen:o,children:p.jsx(E.DialogContent,{sx:{m:0,p:0},children:p.jsx(re.CreateBase,{...e,mutationOptions:{...s,onSuccess:I},children:P.isValidElement(h)?P.cloneElement(h,{...h.props,modal:!0,toolbar:p.jsxs(fi,{children:[p.jsx(E.Button,{variant:"text",size:"medium",onClick:A,children:g("ra.action.cancel")}),i?p.jsx(Pre,{onSubmit:i,closeDialog:A}):p.jsx(W0,{type:"button"})]})}):null})})})]})}function ns(e){const{className:t,confirmTitle:n,confirmContent:r,confirmColor:o="primary",color:i="error",dialogSx:s,icon:l=p.jsx(T0,{}),label:u="ra.action.delete",mutationMode:d="pessimistic",mutationOptions:f,onClick:g,redirect:h="list",translateOptions:m={},onConfirm:y,...x}=e,C=re.useTranslate(),A=re.useRecordContext(e),I=re.useResourceContext(e),w=E.useTheme(),{open:T,isLoading:O,handleDialogOpen:R,handleDialogClose:k,handleDelete:D}=re.useDeleteWithConfirmController({record:A,redirect:h,mutationMode:d,onClick:g,mutationOptions:f,resource:I}),N=P.useCallback(M=>{y?y():D(M)},[D,y]);return p.jsxs(p.Fragment,{children:[p.jsx(ts,{onClick:R,label:u,className:$e("ra-delete-button",t),color:i,...x,children:l},"button"),p.jsx(T5,{isOpen:T,loading:O,sx:s||{"& .MuiPaper-root":{p:2},"& .MuiDialogActions-root":{display:"flex",justifyContent:"space-between",width:"100%","& .RaConfirm-confirmPrimary":{backgroundColor:w.palette.primary.main,color:w.palette.primary.contrastText,ml:2,"&:hover":{backgroundColor:w.palette.primary.dark},"&.Mui-disabled":{backgroundColor:w.palette.action.disabled,color:w.palette.primary.contrastText,outline:"none",boxShadow:"none",border:`1px solid ${w.palette.action.disabled}`}},"& .MuiButtonBase-root":{width:"50%",border:`1px solid ${w.palette.action.disabled}`},"& .MuiButton-icon":{display:"none"}}},title:n?typeof n=="string"?C(n):n:p.jsx(E.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:p.jsx(E.Box,{sx:{color:"primary.main",fontSize:"28px",borderRadius:"50%",backgroundColor:"primary.lighter",width:"56px",height:"56px",display:"flex",alignItems:"center",justifyContent:"center"},children:p.jsx(ze.DeleteFilled,{})})}),content:p.jsx(E.Typography,{maxWidth:"300px",variant:"h4",align:"center",children:r||C("ra.message.delete_content",{_:"ra.message.delete_content",name:C(`resources.${I}.forcedCaseName`,{smart_count:1,_:Qo.humanize(C(`resources.${I}.name`,{smart_count:1,_:Qo.singularize(I)}),!0)}),id:A==null?void 0:A.id})}),confirmColor:o,translateOptions:{name:C(`resources.${I}.forcedCaseName`,{smart_count:1,_:Qo.humanize(C(`resources.${I}.name`,{smart_count:1,_:Qo.singularize(I)}),!0)}),id:A==null?void 0:A.id,...m},onConfirm:N,onClose:k})]})}ns.propTypes={basePath:b.string,className:b.string,confirmColor:b.string,confirmContent:b.oneOfType([b.string,b.element]),confirmTitle:b.oneOfType([b.string,b.element]),icon:b.element,label:b.string,mutationMode:b.oneOf(["pessimistic","optimistic","undoable"]),onClick:b.func,record:b.any,redirect:b.oneOfType([b.string,b.bool,b.func]),resource:b.string,translateOptions:b.object};function Rre(e){const t=P.useCallback(n=>{var r;n.preventDefault(),n.stopPropagation(),(r=e==null?void 0:e.onClick)==null||r.call(e)},[e]);return p.jsx(F5,{...e,onClick:t})}function kre(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=un.useFormContext(),o=P.useCallback(i=>{i.preventDefault(),i.stopPropagation(),r(s=>t(s,n))()},[r,t,n]);return p.jsx(ts,{disableIconOnly:!0,onClick:o,color:"primary",variant:"contained",size:"medium",label:"ra.action.save"})}function Mre(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,mutationOptions:i,onSubmit:s,scroll:l="body",...u}=e,d=re.useNotify(),[f,g]=P.useState(!1),h=P.Children.only(t),m=P.useCallback(()=>g(!0),[]),y=P.useCallback(()=>g(!1),[]),x=P.useCallback((A,I,w)=>{var T,O;y(),d("ra.notification.updated",{messageArgs:{smart_count:1},undoable:(e==null?void 0:e.mutationMode)==="undoable"}),(O=(T=e==null?void 0:e.mutationOptions)==null?void 0:T.onSuccess)==null||O.call(T,A,I,w)},[y,d,e.mutationOptions,e.mutationMode]),C=re.useRecordContext();return p.jsxs(p.Fragment,{children:[p.jsx(Rre,{...u,onClick:m}),p.jsx(E.Dialog,{open:f,scroll:l,onClose:y,fullWidth:r,maxWidth:n,fullScreen:o,keepMounted:!1,children:p.jsx(E.DialogContent,{sx:{m:0,p:0},children:p.jsx(re.EditBase,{...e,id:C.id,mutationMode:"pessimistic",mutationOptions:{...i,onSuccess:x},children:P.isValidElement(h)?P.cloneElement(h,{...h.props,modal:!0,toolbar:p.jsxs(fi,{children:[p.jsx(ts,{disableIconOnly:!0,variant:"text",size:"medium",onClick:y,label:"ra.action.cancel"}),s?p.jsx(kre,{onSubmit:s,closeDialog:y}):p.jsx(W0,{type:"button"})]})}):null})})})]})}var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_re={exports:{}},bC={exports:{}},xC;function rt(){return xC||(xC=1,function(e,t){(function(n,r){e.exports=r()})(et,function(){var n=n||function(r,o){var i=Object.create||function(){function C(){}return function(A){var I;return C.prototype=A,I=new C,C.prototype=null,I}}(),s={},l=s.lib={},u=l.Base=function(){return{extend:function(C){var A=i(this);return C&&A.mixIn(C),(!A.hasOwnProperty("init")||this.init===A.init)&&(A.init=function(){A.$super.init.apply(this,arguments)}),A.init.prototype=A,A.$super=this,A},create:function(){var C=this.extend();return C.init.apply(C,arguments),C},init:function(){},mixIn:function(C){for(var A in C)C.hasOwnProperty(A)&&(this[A]=C[A]);C.hasOwnProperty("toString")&&(this.toString=C.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),d=l.WordArray=u.extend({init:function(C,A){C=this.words=C||[],A!=o?this.sigBytes=A:this.sigBytes=C.length*4},toString:function(C){return(C||g).stringify(this)},concat:function(C){var A=this.words,I=C.words,w=this.sigBytes,T=C.sigBytes;if(this.clamp(),w%4)for(var O=0;O<T;O++){var R=I[O>>>2]>>>24-O%4*8&255;A[w+O>>>2]|=R<<24-(w+O)%4*8}else for(var O=0;O<T;O+=4)A[w+O>>>2]=I[O>>>2];return this.sigBytes+=T,this},clamp:function(){var C=this.words,A=this.sigBytes;C[A>>>2]&=4294967295<<32-A%4*8,C.length=r.ceil(A/4)},clone:function(){var C=u.clone.call(this);return C.words=this.words.slice(0),C},random:function(C){for(var A=[],I=function(k){var k=k,D=987654321,N=4294967295;return function(){D=36969*(D&65535)+(D>>16)&N,k=18e3*(k&65535)+(k>>16)&N;var M=(D<<16)+k&N;return M/=4294967296,M+=.5,M*(r.random()>.5?1:-1)}},w=0,T;w<C;w+=4){var O=I((T||r.random())*4294967296);T=O()*987654071,A.push(O()*4294967296|0)}return new d.init(A,C)}}),f=s.enc={},g=f.Hex={stringify:function(C){for(var A=C.words,I=C.sigBytes,w=[],T=0;T<I;T++){var O=A[T>>>2]>>>24-T%4*8&255;w.push((O>>>4).toString(16)),w.push((O&15).toString(16))}return w.join("")},parse:function(C){for(var A=C.length,I=[],w=0;w<A;w+=2)I[w>>>3]|=parseInt(C.substr(w,2),16)<<24-w%8*4;return new d.init(I,A/2)}},h=f.Latin1={stringify:function(C){for(var A=C.words,I=C.sigBytes,w=[],T=0;T<I;T++){var O=A[T>>>2]>>>24-T%4*8&255;w.push(String.fromCharCode(O))}return w.join("")},parse:function(C){for(var A=C.length,I=[],w=0;w<A;w++)I[w>>>2]|=(C.charCodeAt(w)&255)<<24-w%4*8;return new d.init(I,A)}},m=f.Utf8={stringify:function(C){try{return decodeURIComponent(escape(h.stringify(C)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(C){return h.parse(unescape(encodeURIComponent(C)))}},y=l.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(C){typeof C=="string"&&(C=m.parse(C)),this._data.concat(C),this._nDataBytes+=C.sigBytes},_process:function(C){var A=this._data,I=A.words,w=A.sigBytes,T=this.blockSize,O=T*4,R=w/O;C?R=r.ceil(R):R=r.max((R|0)-this._minBufferSize,0);var k=R*T,D=r.min(k*4,w);if(k){for(var N=0;N<k;N+=T)this._doProcessBlock(I,N);var M=I.splice(0,k);A.sigBytes-=D}return new d.init(M,D)},clone:function(){var C=u.clone.call(this);return C._data=this._data.clone(),C},_minBufferSize:0});l.Hasher=y.extend({cfg:u.extend(),init:function(C){this.cfg=this.cfg.extend(C),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(C){return this._append(C),this._process(),this},finalize:function(C){C&&this._append(C);var A=this._doFinalize();return A},blockSize:16,_createHelper:function(C){return function(A,I){return new C.init(I).finalize(A)}},_createHmacHelper:function(C){return function(A,I){return new x.HMAC.init(C,I).finalize(A)}}});var x=s.algo={};return s}(Math);return n})}(bC)),bC.exports}var CC={exports:{}},wC;function Pf(){return wC||(wC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(r){var o=n,i=o.lib,s=i.Base,l=i.WordArray,u=o.x64={};u.Word=s.extend({init:function(d,f){this.high=d,this.low=f}}),u.WordArray=s.extend({init:function(d,f){d=this.words=d||[],f!=r?this.sigBytes=f:this.sigBytes=d.length*8},toX32:function(){for(var d=this.words,f=d.length,g=[],h=0;h<f;h++){var m=d[h];g.push(m.high),g.push(m.low)}return l.create(g,this.sigBytes)},clone:function(){for(var d=s.clone.call(this),f=d.words=this.words.slice(0),g=f.length,h=0;h<g;h++)f[h]=f[h].clone();return d}})}(),n})}(CC)),CC.exports}var SC={exports:{}},AC;function Fre(){return AC||(AC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,o=r.lib,i=o.WordArray,s=i.init,l=i.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray<"u"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var d=u.byteLength,f=[],g=0;g<d;g++)f[g>>>2]|=u[g]<<24-g%4*8;s.call(this,f,d)}else s.apply(this,arguments)};l.prototype=i}}(),n.lib.WordArray})}(SC)),SC.exports}var EC={exports:{}},TC;function Dre(){return TC||(TC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(){var r=n,o=r.lib,i=o.WordArray,s=r.enc;s.Utf16=s.Utf16BE={stringify:function(u){for(var d=u.words,f=u.sigBytes,g=[],h=0;h<f;h+=2){var m=d[h>>>2]>>>16-h%4*8&65535;g.push(String.fromCharCode(m))}return g.join("")},parse:function(u){for(var d=u.length,f=[],g=0;g<d;g++)f[g>>>1]|=u.charCodeAt(g)<<16-g%2*16;return i.create(f,d*2)}},s.Utf16LE={stringify:function(u){for(var d=u.words,f=u.sigBytes,g=[],h=0;h<f;h+=2){var m=l(d[h>>>2]>>>16-h%4*8&65535);g.push(String.fromCharCode(m))}return g.join("")},parse:function(u){for(var d=u.length,f=[],g=0;g<d;g++)f[g>>>1]|=l(u.charCodeAt(g)<<16-g%2*16);return i.create(f,d*2)}};function l(u){return u<<8&4278255360|u>>>8&16711935}}(),n.enc.Utf16})}(EC)),EC.exports}var IC={exports:{}},OC;function Sa(){return OC||(OC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(){var r=n,o=r.lib,i=o.WordArray,s=r.enc;s.Base64={stringify:function(u){var d=u.words,f=u.sigBytes,g=this._map;u.clamp();for(var h=[],m=0;m<f;m+=3)for(var y=d[m>>>2]>>>24-m%4*8&255,x=d[m+1>>>2]>>>24-(m+1)%4*8&255,C=d[m+2>>>2]>>>24-(m+2)%4*8&255,A=y<<16|x<<8|C,I=0;I<4&&m+I*.75<f;I++)h.push(g.charAt(A>>>6*(3-I)&63));var w=g.charAt(64);if(w)for(;h.length%4;)h.push(w);return h.join("")},parse:function(u){var d=u.length,f=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var h=0;h<f.length;h++)g[f.charCodeAt(h)]=h}var m=f.charAt(64);if(m){var y=u.indexOf(m);y!==-1&&(d=y)}return l(u,d,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(u,d,f){for(var g=[],h=0,m=0;m<d;m++)if(m%4){var y=f[u.charCodeAt(m-1)]<<m%4*2,x=f[u.charCodeAt(m)]>>>6-m%4*2;g[h>>>2]|=(y|x)<<24-h%4*8,h++}return i.create(g,h)}}(),n.enc.Base64})}(IC)),IC.exports}var PC={exports:{}},jC;function Aa(){return jC||(jC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(r){var o=n,i=o.lib,s=i.WordArray,l=i.Hasher,u=o.algo,d=[];(function(){for(var x=0;x<64;x++)d[x]=r.abs(r.sin(x+1))*4294967296|0})();var f=u.MD5=l.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(x,C){for(var A=0;A<16;A++){var I=C+A,w=x[I];x[I]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var T=this._hash.words,O=x[C+0],R=x[C+1],k=x[C+2],D=x[C+3],N=x[C+4],M=x[C+5],_=x[C+6],U=x[C+7],H=x[C+8],G=x[C+9],Y=x[C+10],V=x[C+11],X=x[C+12],z=x[C+13],se=x[C+14],K=x[C+15],$=T[0],ee=T[1],ne=T[2],Q=T[3];$=g($,ee,ne,Q,O,7,d[0]),Q=g(Q,$,ee,ne,R,12,d[1]),ne=g(ne,Q,$,ee,k,17,d[2]),ee=g(ee,ne,Q,$,D,22,d[3]),$=g($,ee,ne,Q,N,7,d[4]),Q=g(Q,$,ee,ne,M,12,d[5]),ne=g(ne,Q,$,ee,_,17,d[6]),ee=g(ee,ne,Q,$,U,22,d[7]),$=g($,ee,ne,Q,H,7,d[8]),Q=g(Q,$,ee,ne,G,12,d[9]),ne=g(ne,Q,$,ee,Y,17,d[10]),ee=g(ee,ne,Q,$,V,22,d[11]),$=g($,ee,ne,Q,X,7,d[12]),Q=g(Q,$,ee,ne,z,12,d[13]),ne=g(ne,Q,$,ee,se,17,d[14]),ee=g(ee,ne,Q,$,K,22,d[15]),$=h($,ee,ne,Q,R,5,d[16]),Q=h(Q,$,ee,ne,_,9,d[17]),ne=h(ne,Q,$,ee,V,14,d[18]),ee=h(ee,ne,Q,$,O,20,d[19]),$=h($,ee,ne,Q,M,5,d[20]),Q=h(Q,$,ee,ne,Y,9,d[21]),ne=h(ne,Q,$,ee,K,14,d[22]),ee=h(ee,ne,Q,$,N,20,d[23]),$=h($,ee,ne,Q,G,5,d[24]),Q=h(Q,$,ee,ne,se,9,d[25]),ne=h(ne,Q,$,ee,D,14,d[26]),ee=h(ee,ne,Q,$,H,20,d[27]),$=h($,ee,ne,Q,z,5,d[28]),Q=h(Q,$,ee,ne,k,9,d[29]),ne=h(ne,Q,$,ee,U,14,d[30]),ee=h(ee,ne,Q,$,X,20,d[31]),$=m($,ee,ne,Q,M,4,d[32]),Q=m(Q,$,ee,ne,H,11,d[33]),ne=m(ne,Q,$,ee,V,16,d[34]),ee=m(ee,ne,Q,$,se,23,d[35]),$=m($,ee,ne,Q,R,4,d[36]),Q=m(Q,$,ee,ne,N,11,d[37]),ne=m(ne,Q,$,ee,U,16,d[38]),ee=m(ee,ne,Q,$,Y,23,d[39]),$=m($,ee,ne,Q,z,4,d[40]),Q=m(Q,$,ee,ne,O,11,d[41]),ne=m(ne,Q,$,ee,D,16,d[42]),ee=m(ee,ne,Q,$,_,23,d[43]),$=m($,ee,ne,Q,G,4,d[44]),Q=m(Q,$,ee,ne,X,11,d[45]),ne=m(ne,Q,$,ee,K,16,d[46]),ee=m(ee,ne,Q,$,k,23,d[47]),$=y($,ee,ne,Q,O,6,d[48]),Q=y(Q,$,ee,ne,U,10,d[49]),ne=y(ne,Q,$,ee,se,15,d[50]),ee=y(ee,ne,Q,$,M,21,d[51]),$=y($,ee,ne,Q,X,6,d[52]),Q=y(Q,$,ee,ne,D,10,d[53]),ne=y(ne,Q,$,ee,Y,15,d[54]),ee=y(ee,ne,Q,$,R,21,d[55]),$=y($,ee,ne,Q,H,6,d[56]),Q=y(Q,$,ee,ne,K,10,d[57]),ne=y(ne,Q,$,ee,_,15,d[58]),ee=y(ee,ne,Q,$,z,21,d[59]),$=y($,ee,ne,Q,N,6,d[60]),Q=y(Q,$,ee,ne,V,10,d[61]),ne=y(ne,Q,$,ee,k,15,d[62]),ee=y(ee,ne,Q,$,G,21,d[63]),T[0]=T[0]+$|0,T[1]=T[1]+ee|0,T[2]=T[2]+ne|0,T[3]=T[3]+Q|0},_doFinalize:function(){var x=this._data,C=x.words,A=this._nDataBytes*8,I=x.sigBytes*8;C[I>>>5]|=128<<24-I%32;var w=r.floor(A/4294967296),T=A;C[(I+64>>>9<<4)+15]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,C[(I+64>>>9<<4)+14]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,x.sigBytes=(C.length+1)*4,this._process();for(var O=this._hash,R=O.words,k=0;k<4;k++){var D=R[k];R[k]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return O},clone:function(){var x=l.clone.call(this);return x._hash=this._hash.clone(),x}});function g(x,C,A,I,w,T,O){var R=x+(C&A|~C&I)+w+O;return(R<<T|R>>>32-T)+C}function h(x,C,A,I,w,T,O){var R=x+(C&I|A&~I)+w+O;return(R<<T|R>>>32-T)+C}function m(x,C,A,I,w,T,O){var R=x+(C^A^I)+w+O;return(R<<T|R>>>32-T)+C}function y(x,C,A,I,w,T,O){var R=x+(A^(C|~I))+w+O;return(R<<T|R>>>32-T)+C}o.MD5=l._createHelper(f),o.HmacMD5=l._createHmacHelper(f)}(Math),n.MD5})}(PC)),PC.exports}var RC={exports:{}},kC;function iv(){return kC||(kC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(){var r=n,o=r.lib,i=o.WordArray,s=o.Hasher,l=r.algo,u=[],d=l.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(f,g){for(var h=this._hash.words,m=h[0],y=h[1],x=h[2],C=h[3],A=h[4],I=0;I<80;I++){if(I<16)u[I]=f[g+I]|0;else{var w=u[I-3]^u[I-8]^u[I-14]^u[I-16];u[I]=w<<1|w>>>31}var T=(m<<5|m>>>27)+A+u[I];I<20?T+=(y&x|~y&C)+1518500249:I<40?T+=(y^x^C)+1859775393:I<60?T+=(y&x|y&C|x&C)-1894007588:T+=(y^x^C)-899497514,A=C,C=x,x=y<<30|y>>>2,y=m,m=T}h[0]=h[0]+m|0,h[1]=h[1]+y|0,h[2]=h[2]+x|0,h[3]=h[3]+C|0,h[4]=h[4]+A|0},_doFinalize:function(){var f=this._data,g=f.words,h=this._nDataBytes*8,m=f.sigBytes*8;return g[m>>>5]|=128<<24-m%32,g[(m+64>>>9<<4)+14]=Math.floor(h/4294967296),g[(m+64>>>9<<4)+15]=h,f.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var f=s.clone.call(this);return f._hash=this._hash.clone(),f}});r.SHA1=s._createHelper(d),r.HmacSHA1=s._createHmacHelper(d)}(),n.SHA1})}(RC)),RC.exports}var MC={exports:{}},_C;function _A(){return _C||(_C=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){return function(r){var o=n,i=o.lib,s=i.WordArray,l=i.Hasher,u=o.algo,d=[],f=[];(function(){function m(A){for(var I=r.sqrt(A),w=2;w<=I;w++)if(!(A%w))return!1;return!0}function y(A){return(A-(A|0))*4294967296|0}for(var x=2,C=0;C<64;)m(x)&&(C<8&&(d[C]=y(r.pow(x,1/2))),f[C]=y(r.pow(x,1/3)),C++),x++})();var g=[],h=u.SHA256=l.extend({_doReset:function(){this._hash=new s.init(d.slice(0))},_doProcessBlock:function(m,y){for(var x=this._hash.words,C=x[0],A=x[1],I=x[2],w=x[3],T=x[4],O=x[5],R=x[6],k=x[7],D=0;D<64;D++){if(D<16)g[D]=m[y+D]|0;else{var N=g[D-15],M=(N<<25|N>>>7)^(N<<14|N>>>18)^N>>>3,_=g[D-2],U=(_<<15|_>>>17)^(_<<13|_>>>19)^_>>>10;g[D]=M+g[D-7]+U+g[D-16]}var H=T&O^~T&R,G=C&A^C&I^A&I,Y=(C<<30|C>>>2)^(C<<19|C>>>13)^(C<<10|C>>>22),V=(T<<26|T>>>6)^(T<<21|T>>>11)^(T<<7|T>>>25),X=k+V+H+f[D]+g[D],z=Y+G;k=R,R=O,O=T,T=w+X|0,w=I,I=A,A=C,C=X+z|0}x[0]=x[0]+C|0,x[1]=x[1]+A|0,x[2]=x[2]+I|0,x[3]=x[3]+w|0,x[4]=x[4]+T|0,x[5]=x[5]+O|0,x[6]=x[6]+R|0,x[7]=x[7]+k|0},_doFinalize:function(){var m=this._data,y=m.words,x=this._nDataBytes*8,C=m.sigBytes*8;return y[C>>>5]|=128<<24-C%32,y[(C+64>>>9<<4)+14]=r.floor(x/4294967296),y[(C+64>>>9<<4)+15]=x,m.sigBytes=y.length*4,this._process(),this._hash},clone:function(){var m=l.clone.call(this);return m._hash=this._hash.clone(),m}});o.SHA256=l._createHelper(h),o.HmacSHA256=l._createHmacHelper(h)}(Math),n.SHA256})}(MC)),MC.exports}var FC={exports:{}},DC;function Bre(){return DC||(DC=1,function(e,t){(function(n,r,o){e.exports=r(rt(),_A())})(et,function(n){return function(){var r=n,o=r.lib,i=o.WordArray,s=r.algo,l=s.SHA256,u=s.SHA224=l.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var d=l._doFinalize.call(this);return d.sigBytes-=4,d}});r.SHA224=l._createHelper(u),r.HmacSHA224=l._createHmacHelper(u)}(),n.SHA224})}(FC)),FC.exports}var BC={exports:{}},LC;function FA(){return LC||(LC=1,function(e,t){(function(n,r,o){e.exports=r(rt(),Pf())})(et,function(n){return function(){var r=n,o=r.lib,i=o.Hasher,s=r.x64,l=s.Word,u=s.WordArray,d=r.algo;function f(){return l.create.apply(l,arguments)}var g=[f(1116352408,3609767458),f(1899447441,602891725),f(3049323471,3964484399),f(3921009573,2173295548),f(961987163,4081628472),f(1508970993,3053834265),f(2453635748,2937671579),f(2870763221,3664609560),f(3624381080,2734883394),f(310598401,1164996542),f(607225278,1323610764),f(1426881987,3590304994),f(1925078388,4068182383),f(2162078206,991336113),f(2614888103,633803317),f(3248222580,3479774868),f(3835390401,2666613458),f(4022224774,944711139),f(264347078,2341262773),f(604807628,2007800933),f(770255983,1495990901),f(1249150122,1856431235),f(1555081692,3175218132),f(1996064986,2198950837),f(2554220882,3999719339),f(2821834349,766784016),f(2952996808,2566594879),f(3210313671,3203337956),f(3336571891,1034457026),f(3584528711,2466948901),f(113926993,3758326383),f(338241895,168717936),f(666307205,1188179964),f(773529912,1546045734),f(1294757372,1522805485),f(1396182291,2643833823),f(1695183700,2343527390),f(1986661051,1014477480),f(2177026350,1206759142),f(2456956037,344077627),f(2730485921,1290863460),f(2820302411,3158454273),f(3259730800,3505952657),f(3345764771,106217008),f(3516065817,3606008344),f(3600352804,1432725776),f(4094571909,1467031594),f(275423344,851169720),f(430227734,3100823752),f(506948616,1363258195),f(659060556,3750685593),f(883997877,3785050280),f(958139571,3318307427),f(1322822218,3812723403),f(1537002063,2003034995),f(1747873779,3602036899),f(1955562222,1575990012),f(2024104815,1125592928),f(2227730452,2716904306),f(2361852424,442776044),f(2428436474,593698344),f(2756734187,3733110249),f(3204031479,2999351573),f(3329325298,3815920427),f(3391569614,3928383900),f(3515267271,566280711),f(3940187606,3454069534),f(4118630271,4000239992),f(116418474,1914138554),f(174292421,2731055270),f(289380356,3203993006),f(460393269,320620315),f(685471733,587496836),f(852142971,1086792851),f(1017036298,365543100),f(1126000580,2618297676),f(1288033470,3409855158),f(1501505948,4234509866),f(1607167915,987167468),f(1816402316,1246189591)],h=[];(function(){for(var y=0;y<80;y++)h[y]=f()})();var m=d.SHA512=i.extend({_doReset:function(){this._hash=new u.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(y,x){for(var C=this._hash.words,A=C[0],I=C[1],w=C[2],T=C[3],O=C[4],R=C[5],k=C[6],D=C[7],N=A.high,M=A.low,_=I.high,U=I.low,H=w.high,G=w.low,Y=T.high,V=T.low,X=O.high,z=O.low,se=R.high,K=R.low,$=k.high,ee=k.low,ne=D.high,Q=D.low,de=N,pe=M,ye=_,ce=U,be=H,xe=G,Ee=Y,me=V,Re=X,ve=z,qe=se,Dt=K,bt=$,st=ee,rn=ne,mt=Q,Ke=0;Ke<80;Ke++){var Mt=h[Ke];if(Ke<16)var tt=Mt.high=y[x+Ke*2]|0,ot=Mt.low=y[x+Ke*2+1]|0;else{var wt=h[Ke-15],Pe=wt.high,je=wt.low,Ie=(Pe>>>1|je<<31)^(Pe>>>8|je<<24)^Pe>>>7,Ce=(je>>>1|Pe<<31)^(je>>>8|Pe<<24)^(je>>>7|Pe<<25),vt=h[Ke-2],xt=vt.high,Fe=vt.low,Oe=(xt>>>19|Fe<<13)^(xt<<3|Fe>>>29)^xt>>>6,qt=(Fe>>>19|xt<<13)^(Fe<<3|xt>>>29)^(Fe>>>6|xt<<26),wn=h[Ke-7],Un=wn.high,oo=wn.low,gi=h[Ke-16],Oa=gi.high,is=gi.low,ot=Ce+oo,tt=Ie+Un+(ot>>>0<Ce>>>0?1:0),ot=ot+qt,tt=tt+Oe+(ot>>>0<qt>>>0?1:0),ot=ot+is,tt=tt+Oa+(ot>>>0<is>>>0?1:0);Mt.high=tt,Mt.low=ot}var ss=Re&qe^~Re&bt,ko=ve&Dt^~ve&st,as=de&ye^de&be^ye&be,ls=pe&ce^pe&xe^ce&xe,cs=(de>>>28|pe<<4)^(de<<30|pe>>>2)^(de<<25|pe>>>7),us=(pe>>>28|de<<4)^(pe<<30|de>>>2)^(pe<<25|de>>>7),ds=(Re>>>14|ve<<18)^(Re>>>18|ve<<14)^(Re<<23|ve>>>9),Pa=(ve>>>14|Re<<18)^(ve>>>18|Re<<14)^(ve<<23|Re>>>9),Mo=g[Ke],ja=Mo.high,sr=Mo.low,Jt=mt+Pa,Tt=rn+ds+(Jt>>>0<mt>>>0?1:0),Jt=Jt+ko,Tt=Tt+ss+(Jt>>>0<ko>>>0?1:0),Jt=Jt+sr,Tt=Tt+ja+(Jt>>>0<sr>>>0?1:0),Jt=Jt+ot,Tt=Tt+tt+(Jt>>>0<ot>>>0?1:0),Nr=us+ls,Ra=cs+as+(Nr>>>0<us>>>0?1:0);rn=bt,mt=st,bt=qe,st=Dt,qe=Re,Dt=ve,ve=me+Jt|0,Re=Ee+Tt+(ve>>>0<me>>>0?1:0)|0,Ee=be,me=xe,be=ye,xe=ce,ye=de,ce=pe,pe=Jt+Nr|0,de=Tt+Ra+(pe>>>0<Jt>>>0?1:0)|0}M=A.low=M+pe,A.high=N+de+(M>>>0<pe>>>0?1:0),U=I.low=U+ce,I.high=_+ye+(U>>>0<ce>>>0?1:0),G=w.low=G+xe,w.high=H+be+(G>>>0<xe>>>0?1:0),V=T.low=V+me,T.high=Y+Ee+(V>>>0<me>>>0?1:0),z=O.low=z+ve,O.high=X+Re+(z>>>0<ve>>>0?1:0),K=R.low=K+Dt,R.high=se+qe+(K>>>0<Dt>>>0?1:0),ee=k.low=ee+st,k.high=$+bt+(ee>>>0<st>>>0?1:0),Q=D.low=Q+mt,D.high=ne+rn+(Q>>>0<mt>>>0?1:0)},_doFinalize:function(){var y=this._data,x=y.words,C=this._nDataBytes*8,A=y.sigBytes*8;x[A>>>5]|=128<<24-A%32,x[(A+128>>>10<<5)+30]=Math.floor(C/4294967296),x[(A+128>>>10<<5)+31]=C,y.sigBytes=x.length*4,this._process();var I=this._hash.toX32();return I},clone:function(){var y=i.clone.call(this);return y._hash=this._hash.clone(),y},blockSize:1024/32});r.SHA512=i._createHelper(m),r.HmacSHA512=i._createHmacHelper(m)}(),n.SHA512})}(BC)),BC.exports}var NC={exports:{}},$C;function Lre(){return $C||($C=1,function(e,t){(function(n,r,o){e.exports=r(rt(),Pf(),FA())})(et,function(n){return function(){var r=n,o=r.x64,i=o.Word,s=o.WordArray,l=r.algo,u=l.SHA512,d=l.SHA384=u.extend({_doReset:function(){this._hash=new s.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var f=u._doFinalize.call(this);return f.sigBytes-=16,f}});r.SHA384=u._createHelper(d),r.HmacSHA384=u._createHmacHelper(d)}(),n.SHA384})}(NC)),NC.exports}var VC={exports:{}},WC;function Nre(){return WC||(WC=1,function(e,t){(function(n,r,o){e.exports=r(rt(),Pf())})(et,function(n){return function(r){var o=n,i=o.lib,s=i.WordArray,l=i.Hasher,u=o.x64,d=u.Word,f=o.algo,g=[],h=[],m=[];(function(){for(var C=1,A=0,I=0;I<24;I++){g[C+5*A]=(I+1)*(I+2)/2%64;var w=A%5,T=(2*C+3*A)%5;C=w,A=T}for(var C=0;C<5;C++)for(var A=0;A<5;A++)h[C+5*A]=A+(2*C+3*A)%5*5;for(var O=1,R=0;R<24;R++){for(var k=0,D=0,N=0;N<7;N++){if(O&1){var M=(1<<N)-1;M<32?D^=1<<M:k^=1<<M-32}O&128?O=O<<1^113:O<<=1}m[R]=d.create(k,D)}})();var y=[];(function(){for(var C=0;C<25;C++)y[C]=d.create()})();var x=f.SHA3=l.extend({cfg:l.cfg.extend({outputLength:512}),_doReset:function(){for(var C=this._state=[],A=0;A<25;A++)C[A]=new d.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(C,A){for(var I=this._state,w=this.blockSize/2,T=0;T<w;T++){var O=C[A+2*T],R=C[A+2*T+1];O=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,R=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360;var k=I[T];k.high^=R,k.low^=O}for(var D=0;D<24;D++){for(var N=0;N<5;N++){for(var M=0,_=0,U=0;U<5;U++){var k=I[N+5*U];M^=k.high,_^=k.low}var H=y[N];H.high=M,H.low=_}for(var N=0;N<5;N++)for(var G=y[(N+4)%5],Y=y[(N+1)%5],V=Y.high,X=Y.low,M=G.high^(V<<1|X>>>31),_=G.low^(X<<1|V>>>31),U=0;U<5;U++){var k=I[N+5*U];k.high^=M,k.low^=_}for(var z=1;z<25;z++){var k=I[z],se=k.high,K=k.low,$=g[z];if($<32)var M=se<<$|K>>>32-$,_=K<<$|se>>>32-$;else var M=K<<$-32|se>>>64-$,_=se<<$-32|K>>>64-$;var ee=y[h[z]];ee.high=M,ee.low=_}var ne=y[0],Q=I[0];ne.high=Q.high,ne.low=Q.low;for(var N=0;N<5;N++)for(var U=0;U<5;U++){var z=N+5*U,k=I[z],de=y[z],pe=y[(N+1)%5+5*U],ye=y[(N+2)%5+5*U];k.high=de.high^~pe.high&ye.high,k.low=de.low^~pe.low&ye.low}var k=I[0],ce=m[D];k.high^=ce.high,k.low^=ce.low}},_doFinalize:function(){var C=this._data,A=C.words;this._nDataBytes*8;var I=C.sigBytes*8,w=this.blockSize*32;A[I>>>5]|=1<<24-I%32,A[(r.ceil((I+1)/w)*w>>>5)-1]|=128,C.sigBytes=A.length*4,this._process();for(var T=this._state,O=this.cfg.outputLength/8,R=O/8,k=[],D=0;D<R;D++){var N=T[D],M=N.high,_=N.low;M=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,k.push(_),k.push(M)}return new s.init(k,O)},clone:function(){for(var C=l.clone.call(this),A=C._state=this._state.slice(0),I=0;I<25;I++)A[I]=A[I].clone();return C}});o.SHA3=l._createHelper(x),o.HmacSHA3=l._createHmacHelper(x)}(Math),n.SHA3})}(VC)),VC.exports}var zC={exports:{}},UC;function $re(){return UC||(UC=1,function(e,t){(function(n,r){e.exports=r(rt())})(et,function(n){/** @preserve
225
225
  (c) 2012 by Cédric Mesnil. All rights reserved.
226
226
 
227
227
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Binary file