fastapi-rtk 0.1.2 → 0.1.4

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.
@@ -2616,7 +2616,7 @@ function GE({
2616
2616
  refetch: P,
2617
2617
  error: R
2618
2618
  } = _a({
2619
- queryKey: [`info-${e}`],
2619
+ queryKey: ["info", e],
2620
2620
  queryFn: ({ signal: K }) => VC(ht(e, "_info"), K).then((H) => ({ ...VE(H), path: e })),
2621
2621
  placeholderData: s ? null : oh,
2622
2622
  enabled: o,
@@ -2631,7 +2631,7 @@ function GE({
2631
2631
  refetch: re,
2632
2632
  error: T
2633
2633
  } = _a({
2634
- queryKey: [`data-${b.current}`, JSON.stringify(S)],
2634
+ queryKey: ["data", b.current, JSON.stringify(S)],
2635
2635
  queryFn: ({ signal: K }) => S ? GC(ht(b.current, "/"), S, K).then((H) => ({
2636
2636
  ...H,
2637
2637
  result: H.result.map((G, X) => ({ ...G, id: H.ids[X] })),
@@ -2657,7 +2657,7 @@ function GE({
2657
2657
  if (!u)
2658
2658
  return;
2659
2659
  const K = na(null, t);
2660
- g != null && g.page_size && (K.page_size = g.page_size), y(K);
2660
+ g != null && g.page_size && (K.page_size = g.page_size), y({ ...K });
2661
2661
  }, [e]);
2662
2662
  const ee = Fe(
2663
2663
  async (K) => {
@@ -1,7 +1,7 @@
1
1
  (function(O,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react/jsx-runtime"),require("@mantine/core"),require("react"),require("react-router-dom"),require("zustand"),require("@tanstack/react-query"),require("@mantine/hooks"),require("@jsonforms/react"),require("@jsonforms/core"),require("@mantine/dates"),require("clsx"),require("@emotion/react"),require("@mantine/form"),require("mantine-react-table")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@mantine/core","react","react-router-dom","zustand","@tanstack/react-query","@mantine/hooks","@jsonforms/react","@jsonforms/core","@mantine/dates","clsx","@emotion/react","@mantine/form","mantine-react-table"],d):(O=typeof globalThis<"u"?globalThis:O||self,d(O["fastapi-rtk"]={},O.jsxRuntime,O.core,O.React,O.reactRouterDom,O.zustand,O.reactQuery,O.hooks,O.react,O.core$1,O.dates,O.clsx,O.react$1,O.form,O.mantineReactTable))})(this,function(O,d,v,x,Tf,wf,Ln,Ze,De,ue,Gi,Pr,Sf,Ba,yn){"use strict";var lz=Object.defineProperty;var uz=(O,d,v)=>d in O?lz(O,d,{enumerable:!0,configurable:!0,writable:!0,value:v}):O[d]=v;var rb=(O,d,v)=>uz(O,typeof d!="symbol"?d+"":d,v);function ib(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ft=ib(x),za=x.createContext({path:"",data:null,info:null,queryParams:null,loading:!1,error:null,streaming:null,specialKey:null,setQueryParams:e=>null,refetch:()=>null,refetchInfo:()=>null,getEntry:async e=>({}),addEntry:async e=>({}),updateEntry:async(e,t)=>({}),deleteEntry:async e=>({}),download:async({label:e,export_mode:t,delimiter:n})=>null,upload:async(e,{delimiter:t})=>({}),resetError:()=>null});function Ae(){const e=x.useContext(za);if(e===void 0)throw new Error("useApi must be used within a ApiProvider");return e}const Cf=0,Ef=25,rr=250,Hi=",",Ua=[{value:",",label:"Comma (,)"},{value:";",label:"Semicolon (;)"},{value:"|",label:"Pipe (|)"},{value:" ",label:"Tab"},{value:" ",label:"Space"}];function Tt({path:e,method:t,body:n=void 0,queryParams:o=void 0}){const s=Object.entries(o||{}).reduce((c,[h,p])=>((Array.isArray(p)||typeof p=="object")&&(p=JSON.stringify(p)),c[h]=p,c),{}),a=new Tf.createSearchParams(s);e=e+"?"+a;const u={method:t,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:n?JSON.stringify(n):null};return{fetchPath:e,options:u}}function ob(e){return e&&typeof e=="object"&&!Array.isArray(e)}const Bn=(...e)=>{const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(o=>{ob(n[o])&&o!=="ref"&&t[o]?t[o]=Bn(t[o],n[o]):t[o]=n[o]})}),t},ja=e=>e==null?e:typeof e=="boolean"?e.toString():Array.isArray(e)?e.map(t=>ja(t)).join(", "):typeof e=="object"?e.name_||JSON.stringify(e):e,Yi=(e,t,n=!0)=>{const o=t.split(".");let s=e;for(const a of o)Array.isArray(s)?s=s.map(u=>Yi(u,a,!1)):s=s==null?void 0:s[a];return n?ja(s):s},Wa=(e,t)=>e===void 0?t:e;function ti(e){return e!=null}const ft=(e,t)=>typeof e=="function"?e(t):e;function xf(e){const t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);e[0].match(/^[^/:]+:\/*$/)&&e.length>1&&(e[0]=e.shift()+e[0]),e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(let s=0;s<e.length;s++){let a=e[s];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(s>0&&(a=a.replace(/^[\/]+/,"")),s<e.length-1?a=a.replace(/[\/]+$/,""):a=a.replace(/[\/]+$/,"/"),t.push(a))}let n=t.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");const o=n.split("?");return n=o.shift()+(o.length>0?"?":"")+o.join("&"),n}function it(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return xf(t)}const Uo=e=>new Proxy(e,{get(t,n){return t(o=>o[n])}}),Af=(e,t)=>Object.entries(t).reduce((n,[o,s])=>typeof s=="object"&&JSON.stringify(s)===JSON.stringify(e[o])||s===e[o]?n:{...n,[o]:s},{});function qi(e){const[t]=x.useState(()=>wf.create(()=>({...e}))),[n]=x.useState(()=>Uo(t));return x.useEffect(()=>{t.setState(o=>Af(o,e))},[e,t]),n}const Va=x.createContext({user:null,loading:!1,error:null,signin:async(e,t)=>null,signout:async()=>null,update:async e=>null,resetPassword:async e=>null,oauth_signin:(e,t)=>null,refetch:async()=>null});function $r(){return x.useContext(Va)}const Ga=x.createContext({baseUrl:"",info:null,loading:!1,error:null});function Of(){return x.useContext(Ga)}async function If(e,{username:t,password:n}){const o=new FormData;o.append("username",t),o.append("password",n);const{fetchPath:s,options:a}=Tt({path:it(e,"auth/login"),method:"POST"}),u=await fetch(s,{...a,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(o)});if(!u.ok)throw u.status===400?new Error("Username or password wrong."):new Error("Failed to sign in.")}async function Pf(e){const{fetchPath:t,options:n}=Tt({path:it(e,"auth/logout"),method:"POST"});if(!(await fetch(t,n)).ok)throw new Error("Failed to sign out.")}async function $f(e,t,{email:n}){const{fetchPath:o,options:s}=Tt({path:it(e,"auth/forgot-password"),method:"POST",body:{email:n}}),a=await fetch(o,s);if(!a.ok)throw new Error("Couldn't request token to reset password");const u=await a.json(),{token:c}=u,{fetchPath:h,options:p}=Tt({path:it(e,"auth/reset-password"),method:"POST",body:{token:c,password:t}});if(!(await fetch(h,p)).ok)throw new Error("Couldn't reset password")}async function Mf(e,t,n,o){const s=it(e,"auth/login",t);if(!n){window.location.href=it(e,"auth/login",t);return}const a=500,u=500,c=window.screenLeft+window.outerWidth/2-a/2,h=window.screenTop+window.outerHeight/2-u/2,p=window.open(s+"?popup=true","auth",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${a}, height=${u}, top=${h}, left=${c}`),g=window.setInterval(function(){p.closed!==!1&&(window.clearInterval(g),o==null||o())},200)}async function Ff(e,t){const{fetchPath:n,options:o}=Tt({path:it(e,"info/"),method:"GET"}),s=await fetch(n,{signal:t,...o}),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a}async function Df(e,t){const{fetchPath:n,options:o}=Tt({path:it(e,"auth/user"),method:"GET"}),s=await fetch(n,{signal:t,...o}),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a}async function kf(e,t){const{fetchPath:n,options:o}=Tt({path:it(e,"auth/user"),method:"PUT",body:t}),s=await fetch(n,o),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a}function Nf(e,t){const n=Ln.useQueryClient(),o=Ln.useQuery({queryKey:["user"],queryFn:({signal:y})=>Df(e,y),retry:!1,...t}),[s,a]=x.useState(null),u=x.useCallback(({username:y,password:_})=>{a(null),If(e,{username:y,password:_}).then(()=>n.invalidateQueries({queryKey:["user"]})).catch(C=>a(C))},[e,n]),c=x.useCallback(()=>{a(null),Pf(e).then(()=>n.resetQueries({queryKey:["user"]})).then(()=>n.resetQueries({queryKey:["info"]})).catch(y=>a(y))},[e,n]),h=x.useCallback(y=>{a(null),kf(e,y).then(()=>n.invalidateQueries({queryKey:["user"]})).catch(_=>a(_))},[e,n]),p=x.useCallback(y=>{a(null),$f(e,y,o.data).catch(_=>a(_))},[e,o.data]),g=x.useCallback((y,_)=>Mf(e,y,_,()=>n.invalidateQueries({queryKey:["user"]})),[e,n]);return{user:o.isError?null:o.data,loading:o.isFetching,error:s?s.message:null,signin:u,signout:c,update:h,resetPassword:p,oauth_signin:g,refetch:o.refetch}}function Lf(e,t){const n=Ln.useQuery({queryKey:["info"],queryFn:({signal:o})=>Ff(e,o),enabled:!1});return x.useEffect(()=>{t.user&&!n.data&&n.refetch()},[t.user,n]),{baseUrl:e,info:n.data,loading:n.isFetching,error:n.error}}function sb(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:n,authQueryProps:o,children:s}={...t,...e},a=Nf(n,o),u=qi(a),c=Lf(n,a),h=qi(c);return d.jsx(Va.Provider,{value:u,children:d.jsx(Ga.Provider,{value:h,children:s})})}function ab(e){const[t]=x.useState(()=>new Ln.QueryClient);return d.jsx(Ln.QueryClientProvider,{client:t,children:d.jsx(sb,{...e})})}const Ha=x.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null});function lb(){const e=x.useContext(Ha);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const Bf={opened:!1,setOpened:()=>{throw new Error("setOpened must be defined in a provider")},view:0,setView:()=>{throw new Error("setView must be defined in a provider")},state:void 0,setState:()=>{throw new Error("setState must be defined in a provider")},reset:()=>{throw new Error("reset must be defined in a provider")},item:void 0,itemLoading:!1,setItem:()=>{throw new Error("setItem must be defined in a provider")},setItemLoading:()=>{throw new Error("setItemLoading must be defined in a provider")}},jo={errors:[],data:void 0},Ya=x.createContext(Bf),qa=x.createContext(Bf);function zn(e="add"){const t=x.useContext(e==="add"?Ya:qa);if(t===void 0)throw new Error("useForms must be used within an ApiProvider");return t}const zf=async(e,t)=>{const{fetchPath:n,options:o}=Tt({path:it(e,"/"),method:"POST",body:t}),s=await fetch(n,o);let a=null;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?a=await s.json():a=await s.text(),!s.ok)throw typeof a=="object"?new Error(typeof a.detail=="string"?a.detail:JSON.stringify(a,null,2)):new Error(a);return a},Uf=async(e,t)=>{const{fetchPath:n,options:o}=Tt({path:it(e,t.toString()),method:"DELETE"}),s=await fetch(n,o);let a=null;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?a=await s.json():a=await s.text(),!s.ok)throw typeof a=="object"?new Error(typeof a.detail=="string"?a.detail:JSON.stringify(a,null,2)):new Error(a);return a},jf=async(e,t,{label:n="",export_mode:o="",delimiter:s=Hi}={})=>{const a={...t,label:n,export_mode:o,delimiter:s,check_validity:!0},{fetchPath:u,options:c}=Tt({path:it(e,"/download"),method:"GET",queryParams:a});if(!(await fetch(u,c)).ok)throw new Error("Download failed");delete a.check_validity;const{fetchPath:p}=Tt({path:it(e,"/download"),method:"GET",queryParams:a}),g=document.createElement("a");g.href=p,g.download=n,g.style.display="none",document.body.appendChild(g),g.click(),document.body.removeChild(g)},Wf=async(e,t)=>{const{fetchPath:n,options:o}=Tt({path:e,method:"GET"}),s=await fetch(n,{signal:t,...o}),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a},Vf=async(e,t)=>{const{fetchPath:n,options:o}=Tt({path:it(e,t.toString()),method:"GET"}),s=await fetch(n,o);let a=null;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?a=await s.json():a=await s.text(),!s.ok)throw typeof a=="object"?new Error(typeof a.detail=="string"?a.detail:JSON.stringify(a,null,2)):new Error(a);return a},Gf=async(e,t,n)=>{const{fetchPath:o,options:s}=Tt({path:e,method:"GET",queryParams:t}),a=await fetch(o,{signal:n,...s});let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.text(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);return u},Hf=async(e,t,n)=>{const{fetchPath:o,options:s}=Tt({path:it(e,t.toString()),method:"PUT",body:n}),a=await fetch(o,s);let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.text(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);return u},Yf=async(e,t,{delimiter:n=","}={})=>{const o=new FormData;o.append("file",t);const{fetchPath:s,options:a}=Tt({path:it(e,"/upload"),method:"POST",queryParams:{delimiter:n}}),u=await fetch(s,{...a,headers:void 0,body:o});if(!u.ok)throw new Error("Upload failed");return await u.json()},qf=async(e,t,n)=>{const{fetchPath:o,options:s}=Tt({path:it(e,"/bulk",t),method:"POST",body:n}),a=await fetch(o,s);let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.text(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);return u},xt=e=>e&&typeof e=="object"?Array.isArray(e)?e.join(","):JSON.stringify(e):e,Ka=e=>{const t={};for(const n of e)switch(n.type){case"RelatedList":t[n.name]=[];break;case"Boolean":t[n.name]="false";break;case"Date":case"DateTime":case"Integer":case"Float":case"Geometry":case"Raw":case"Related":t[n.name]=void 0;break;default:t[n.name]=""}return t};var Un=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ir(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mr(e){this._maxSize=e,this.clear()}Mr.prototype.clear=function(){this._size=0,this._values=Object.create(null)},Mr.prototype.get=function(e){return this._values[e]},Mr.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var ub=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Kf=/^\d+$/,cb=/^\d/,fb=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,db=/^\s*(['"]?)(.*?)(\1)\s*$/,Ja=512,Jf=new Mr(Ja),Rf=new Mr(Ja),Zf=new Mr(Ja),Fr={Cache:Mr,split:Za,normalizePath:Ra,setter:function(e){var t=Ra(e);return Rf.get(e)||Rf.set(e,function(o,s){for(var a=0,u=t.length,c=o;a<u-1;){var h=t[a];if(h==="__proto__"||h==="constructor"||h==="prototype")return o;c=c[t[a++]]}c[t[a]]=s})},getter:function(e,t){var n=Ra(e);return Zf.get(e)||Zf.set(e,function(s){for(var a=0,u=n.length;a<u;)if(s!=null||!t)s=s[n[a++]];else return;return s})},join:function(e){return e.reduce(function(t,n){return t+(Xa(n)||Kf.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){hb(Array.isArray(e)?e:Za(e),t,n)}};function Ra(e){return Jf.get(e)||Jf.set(e,Za(e).map(function(t){return t.replace(db,"$2")}))}function Za(e){return e.match(ub)||[""]}function hb(e,t,n){var o=e.length,s,a,u,c;for(a=0;a<o;a++)s=e[a],s&&(mb(s)&&(s='"'+s+'"'),c=Xa(s),u=!c&&/^\d+$/.test(s),t.call(n,s,c,u,a,e))}function Xa(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function pb(e){return e.match(cb)&&!e.match(Kf)}function gb(e){return fb.test(e)}function mb(e){return!Xa(e)&&(pb(e)||gb(e))}const yb=/[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,Wo=e=>e.match(yb)||[],Vo=e=>e[0].toUpperCase()+e.slice(1),Qa=(e,t)=>Wo(e).join(t).toLowerCase(),Xf=e=>Wo(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,"");var el={words:Wo,upperFirst:Vo,camelCase:Xf,pascalCase:e=>Vo(Xf(e)),snakeCase:e=>Qa(e,"_"),kebabCase:e=>Qa(e,"-"),sentenceCase:e=>Vo(Qa(e," ")),titleCase:e=>Wo(e).map(Vo).join(" ")},tl={exports:{}};tl.exports=function(e){return Qf(vb(e),e)},tl.exports.array=Qf;function Qf(e,t){var n=e.length,o=new Array(n),s={},a=n,u=bb(t),c=_b(e);for(t.forEach(function(p){if(!c.has(p[0])||!c.has(p[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});a--;)s[a]||h(e[a],a,new Set);return o;function h(p,g,y){if(y.has(p)){var _;try{_=", node was:"+JSON.stringify(p)}catch{_=""}throw new Error("Cyclic dependency"+_)}if(!c.has(p))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(p));if(!s[g]){s[g]=!0;var C=u.get(p)||new Set;if(C=Array.from(C),g=C.length){y.add(p);do{var E=C[--g];h(E,c.get(E),y)}while(g);y.delete(p)}o[--n]=p}}}function vb(e){for(var t=new Set,n=0,o=e.length;n<o;n++){var s=e[n];t.add(s[0]),t.add(s[1])}return Array.from(t)}function bb(e){for(var t=new Map,n=0,o=e.length;n<o;n++){var s=e[n];t.has(s[0])||t.set(s[0],new Set),t.has(s[1])||t.set(s[1],new Set),t.get(s[0]).add(s[1])}return t}function _b(e){for(var t=new Map,n=0,o=e.length;n<o;n++)t.set(e[n],n);return t}var Tb=tl.exports;const wb=ir(Tb),Sb=Object.prototype.toString,Cb=Error.prototype.toString,Eb=RegExp.prototype.toString,xb=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Ab=/^Symbol\((.*)\)(.*)$/;function Ob(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function ed(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return Ob(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return xb.call(e).replace(Ab,"Symbol($1)");const o=Sb.call(e).slice(8,-1);return o==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):o==="Error"||e instanceof Error?"["+Cb.call(e)+"]":o==="RegExp"?Eb.call(e):null}function An(e,t){let n=ed(e,t);return n!==null?n:JSON.stringify(e,function(o,s){let a=ed(this[o],t);return a!==null?a:s},2)}function td(e){return e==null?[]:[].concat(e)}let nd,rd,id,Ib=/\$\{\s*(\w+)\s*\}/g;nd=Symbol.toStringTag;class od{constructor(t,n,o,s){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[nd]="Error",this.name="ValidationError",this.value=n,this.path=o,this.type=s,this.errors=[],this.inner=[],td(t).forEach(a=>{if(wt.isError(a)){this.errors.push(...a.errors);const u=a.inner.length?a.inner:[a];this.inner.push(...u)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}rd=Symbol.hasInstance,id=Symbol.toStringTag;class wt extends Error{static formatError(t,n){const o=n.label||n.path||"this";return n=Object.assign({},n,{path:o,originalPath:n.path}),typeof t=="string"?t.replace(Ib,(s,a)=>An(n[a])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,o,s,a){const u=new od(t,n,o,s);if(a)return u;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[id]="Error",this.name=u.name,this.message=u.message,this.type=u.type,this.value=u.value,this.path=u.path,this.errors=u.errors,this.inner=u.inner,Error.captureStackTrace&&Error.captureStackTrace(this,wt)}static[rd](t){return od[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let On={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:o})=>{const s=o!=null&&o!==n?` (cast from the value \`${An(o,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${An(n,!0)}\``+s:`${e} must match the configured type. The validated value was: \`${An(n,!0)}\``+s}},jt={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"},or={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"},nl={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},rl={isValue:"${path} field must be ${value}"},Go={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Ho={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"},sd={notType:e=>{const{path:t,value:n,spec:o}=e,s=o.types.length;if(Array.isArray(n)){if(n.length<s)return`${t} tuple value has too few items, expected a length of ${s} but got ${n.length} for value: \`${An(n,!0)}\``;if(n.length>s)return`${t} tuple value has too many items, expected a length of ${s} but got ${n.length} for value: \`${An(n,!0)}\``}return wt.formatError(On.notType,e)}};var ad=Object.assign(Object.create(null),{mixed:On,string:jt,number:or,date:nl,object:Go,array:Ho,boolean:rl,tuple:sd});const Dr=e=>e&&e.__isYupSchema__;class Yo{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:o,then:s,otherwise:a}=n,u=typeof o=="function"?o:(...c)=>c.every(h=>h===o);return new Yo(t,(c,h)=>{var p;let g=u(...c)?s:a;return(p=g==null?void 0:g(h))!=null?p:h})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let o=this.refs.map(a=>a.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),s=this.fn(o,t,n);if(s===void 0||s===t)return t;if(!Dr(s))throw new TypeError("conditions must return a schema object");return s.resolve(n)}}const qo={context:"$",value:"."};function Pb(e,t){return new sr(e,t)}class sr{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]===qo.context,this.isValue=this.key[0]===qo.value,this.isSibling=!this.isContext&&!this.isValue;let o=this.isContext?qo.context:this.isValue?qo.value:"";this.path=this.key.slice(o.length),this.getter=this.path&&Fr.getter(this.path,!0),this.map=n.map}getValue(t,n,o){let s=this.isContext?o:this.isValue?t:n;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}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}}sr.prototype.__isYupRef=!0;const vn=e=>e==null;function ni(e){function t({value:n,path:o="",options:s,originalValue:a,schema:u},c,h){const{name:p,test:g,params:y,message:_,skipAbsent:C}=e;let{parent:E,context:w,abortEarly:P=u.spec.abortEarly,disableStackTrace:N=u.spec.disableStackTrace}=s;function Z(U){return sr.isRef(U)?U.getValue(n,E,w):U}function V(U={}){const ne=Object.assign({value:n,originalValue:a,label:u.spec.label,path:U.path||o,spec:u.spec,disableStackTrace:U.disableStackTrace||N},y,U.params);for(const ye of Object.keys(ne))ne[ye]=Z(ne[ye]);const fe=new wt(wt.formatError(U.message||_,ne),n,ne.path,U.type||p,ne.disableStackTrace);return fe.params=ne,fe}const B=P?c:h;let D={path:o,parent:E,type:p,from:s.from,createError:V,resolve:Z,options:s,originalValue:a,schema:u};const k=U=>{wt.isError(U)?B(U):U?h(null):B(V())},H=U=>{wt.isError(U)?B(U):c(U)};if(C&&vn(n))return k(!0);let oe;try{var S;if(oe=g.call(D,n,D),typeof((S=oe)==null?void 0:S.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${D.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(oe).then(k,H)}}catch(U){H(U);return}k(oe)}return t.OPTIONS=e,t}function il(e,t,n,o=n){let s,a,u;return t?(Fr.forEach(t,(c,h,p)=>{let g=h?c.slice(1,c.length-1):c;e=e.resolve({context:o,parent:s,value:n});let y=e.type==="tuple",_=p?parseInt(g,10):0;if(e.innerType||y){if(y&&!p)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${u}" must contain an index to the tuple element, e.g. "${u}[0]"`);if(n&&_>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);s=n,n=n&&n[_],e=y?e.spec.types[_]:e.innerType}if(!p){if(!e.fields||!e.fields[g])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${u} which is a type: "${e.type}")`);s=n,n=n&&n[g],e=e.fields[g]}a=g,u=h?"["+c+"]":"."+c}),{schema:e,parent:s,parentPath:a}):{parent:s,parentPath:t,schema:e}}function $b(e,t,n,o){return il(e,t,n,o).schema}class Ko extends Set{describe(){const t=[];for(const n of this.values())t.push(sr.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const o of this.values())n.push(t(o));return n}clone(){return new Ko(this.values())}merge(t,n){const o=this.clone();return t.forEach(s=>o.add(s)),n.forEach(s=>o.delete(s)),o}}function ri(e,t=new Map){if(Dr(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 o=0;o<e.length;o++)n[o]=ri(e[o],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[o,s]of e.entries())n.set(o,ri(s,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const o of e)n.add(ri(o,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[o,s]of Object.entries(e))n[o]=ri(s,t)}else throw Error(`Unable to clone ${e}`);return n}class It{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 Ko,this._blacklist=new Ko,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(On.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=ri(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 o=t(this);return this._mutate=n,o}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,o=t.clone();const s=Object.assign({},n.spec,o.spec);return o.spec=s,o.internalTests=Object.assign({},n.internalTests,o.internalTests),o._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),o._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),o.tests=n.tests,o.exclusiveTests=n.exclusiveTests,o.withMutation(a=>{t.tests.forEach(u=>{a.test(u.OPTIONS)})}),o.transforms=[...n.transforms,...o.transforms],o}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 o=n.conditions;n=n.clone(),n.conditions=[],n=o.reduce((s,a)=>a.resolve(s,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,o,s,a;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(o=t.abortEarly)!=null?o:this.spec.abortEarly,recursive:(s=t.recursive)!=null?s:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,n={}){let o=this.resolve(Object.assign({value:t},n)),s=n.assert==="ignore-optionality",a=o._cast(t,n);if(n.assert!==!1&&!o.isType(a)){if(s&&vn(a))return a;let u=An(t),c=An(a);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${o.type}".
2
2
 
3
3
  attempted value: ${u}
4
- `+(c!==u?`result of cast: ${c}`:""))}return a}_cast(t,n){let o=t===void 0?t:this.transforms.reduce((s,a)=>a.call(this,s,t,this),t);return o===void 0&&(o=this.getDefault(n)),o}_validate(t,n={},o,s){let{path:a,originalValue:u=t,strict:c=this.spec.strict}=n,h=t;c||(h=this._cast(h,Object.assign({assert:!1},n)));let p=[];for(let g of Object.values(this.internalTests))g&&p.push(g);this.runTests({path:a,value:h,originalValue:u,options:n,tests:p},o,g=>{if(g.length)return s(g,h);this.runTests({path:a,value:h,originalValue:u,options:n,tests:this.tests},o,s)})}runTests(t,n,o){let s=!1,{tests:a,value:u,originalValue:c,path:h,options:p}=t,g=w=>{s||(s=!0,n(w,u))},y=w=>{s||(s=!0,o(w,u))},_=a.length,C=[];if(!_)return y([]);let E={value:u,originalValue:c,path:h,options:p,schema:this};for(let w=0;w<a.length;w++){const P=a[w];P(E,g,function(Z){Z&&(Array.isArray(Z)?C.push(...Z):C.push(Z)),--_<=0&&y(C)})}}asNestedTest({key:t,index:n,parent:o,parentPath:s,originalParent:a,options:u}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const h=typeof c=="number";let p=o[c];const g=Object.assign({},u,{strict:!0,parent:o,value:p,originalValue:a[c],key:void 0,[h?"index":"key"]:c,path:h||c.includes(".")?`${s||""}[${h?c:`"${c}"`}]`:(s?`${s}.`:"")+t});return(y,_,C)=>this.resolve(g)._validate(p,g,_,C)}validate(t,n){var o;let s=this.resolve(Object.assign({},n,{value:t})),a=(o=n==null?void 0:n.disableStackTrace)!=null?o:s.spec.disableStackTrace;return new Promise((u,c)=>s._validate(t,n,(h,p)=>{wt.isError(h)&&(h.value=p),c(h)},(h,p)=>{h.length?c(new wt(h,p,void 0,void 0,a)):u(p)}))}validateSync(t,n){var o;let s=this.resolve(Object.assign({},n,{value:t})),a,u=(o=n==null?void 0:n.disableStackTrace)!=null?o:s.spec.disableStackTrace;return s._validate(t,Object.assign({},n,{sync:!0}),(c,h)=>{throw wt.isError(c)&&(c.value=h),c},(c,h)=>{if(c.length)throw new wt(c,t,void 0,void 0,u);a=h}),a}isValid(t,n){return this.validate(t,n).then(()=>!0,o=>{if(wt.isError(o))return!1;throw o})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(o){if(wt.isError(o))return!1;throw o}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):ri(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 o=this.clone({nullable:t});return o.internalTests.nullable=ni({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),o}optionality(t,n){const o=this.clone({optional:t});return o.internalTests.optionality=ni({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),o}optional(){return this.optionality(!0)}defined(t=On.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=On.notNull){return this.nullability(!1,t)}required(t=On.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=On.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let o=this.clone(),s=ni(n),a=n.exclusive||n.name&&o.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&&(o.exclusiveTests[n.name]=!!n.exclusive),o.tests=o.tests.filter(u=>!(u.OPTIONS.name===n.name&&(a||u.OPTIONS.test===s.OPTIONS.test))),o.tests.push(s),o}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let o=this.clone(),s=td(t).map(a=>new sr(a));return s.forEach(a=>{a.isSibling&&o.deps.push(a.key)}),o.conditions.push(typeof n=="function"?new Yo(s,n):Yo.fromOptions(s,n)),o}typeError(t){let n=this.clone();return n.internalTests.typeError=ni({message:t,name:"typeError",skipAbsent:!0,test(o){return this.schema._typeCheck(o)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=On.oneOf){let o=this.clone();return t.forEach(s=>{o._whitelist.add(s),o._blacklist.delete(s)}),o.internalTests.whiteList=ni({message:n,name:"oneOf",skipAbsent:!0,test(s){let a=this.schema._whitelist,u=a.resolveAll(this.resolve);return u.includes(s)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:u}})}}),o}notOneOf(t,n=On.notOneOf){let o=this.clone();return t.forEach(s=>{o._blacklist.add(s),o._whitelist.delete(s)}),o.internalTests.blacklist=ni({message:n,name:"notOneOf",test(s){let a=this.schema._blacklist,u=a.resolveAll(this.resolve);return u.includes(s)?this.createError({params:{values:Array.from(a).join(", "),resolved:u}}):!0}}),o}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:o,meta:s,optional:a,nullable:u}=n.spec;return{meta:s,label:o,optional:a,nullable:u,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(h=>({name:h.OPTIONS.name,params:h.OPTIONS.params})).filter((h,p,g)=>g.findIndex(y=>y.name===h.name)===p)}}}It.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])It.prototype[`${e}At`]=function(t,n,o={}){const{parent:s,parentPath:a,schema:u}=il(this,t,n,o.context);return u[e](s&&s[a],Object.assign({},o,{parent:s,path:t}))};for(const e of["equals","is"])It.prototype[e]=It.prototype.oneOf;for(const e of["not","nope"])It.prototype[e]=It.prototype.notOneOf;const Mb=()=>!0;function Jo(e){return new ol(e)}class ol extends It{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Mb},t))}}Jo.prototype=ol.prototype;function sl(){return new al}class al extends It{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(o.spec.coerce&&!o.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=rl.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return vn(n)||n===!0}})}isFalse(t=rl.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return vn(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}sl.prototype=al.prototype;const Fb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Db(e){const t=ll(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 ll(e){var t,n;const o=Fb.exec(e);return o?{year:jn(o[1]),month:jn(o[2],1)-1,day:jn(o[3],1),hour:jn(o[4]),minute:jn(o[5]),second:jn(o[6]),millisecond:o[7]?jn(o[7].substring(0,3)):0,precision:(t=(n=o[7])==null?void 0:n.length)!=null?t:void 0,z:o[8]||void 0,plusMinus:o[9]||void 0,hourOffset:jn(o[10]),minuteOffset:jn(o[11])}:null}function jn(e,t=0){return Number(e)||t}let kb=/^[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])?)*$/,Nb=/^((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,Lb=/^(?:[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,Bb="^\\d{4}-\\d{2}-\\d{2}",zb="\\d{2}:\\d{2}:\\d{2}",Ub="(([+-]\\d{2}(:?\\d{2})?)|Z)",jb=new RegExp(`${Bb}T${zb}(\\.\\d+)?${Ub}$`),Wb=e=>vn(e)||e===e.trim(),Vb={}.toString();function Ro(){return new ul}class ul extends It{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(!o.spec.coerce||o.isType(t)||Array.isArray(t))return t;const s=t!=null&&t.toString?t.toString():t;return s===Vb?t:s})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||On.required,name:"required",skipAbsent:!0,test:o=>!!o.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=jt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,n=jt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,n=jt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}matches(t,n){let o=!1,s,a;return n&&(typeof n=="object"?{excludeEmptyString:o=!1,message:s,name:a}=n:s=n),this.test({name:a||"matches",message:s||jt.matches,params:{regex:t},skipAbsent:!0,test:u=>u===""&&o||u.search(t)!==-1})}email(t=jt.email){return this.matches(kb,{name:"email",message:t,excludeEmptyString:!0})}url(t=jt.url){return this.matches(Nb,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=jt.uuid){return this.matches(Lb,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",o,s;return t&&(typeof t=="object"?{message:n="",allowOffset:o=!1,precision:s=void 0}=t:n=t),this.matches(jb,{name:"datetime",message:n||jt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||jt.datetime_offset,params:{allowOffset:o},skipAbsent:!0,test:a=>{if(!a||o)return!0;const u=ll(a);return u?!!u.z:!1}}).test({name:"datetime_precision",message:n||jt.datetime_precision,params:{precision:s},skipAbsent:!0,test:a=>{if(!a||s==null)return!0;const u=ll(a);return u?u.precision===s:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=jt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Wb})}lowercase(t=jt.lowercase){return this.transform(n=>vn(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>vn(n)||n===n.toLowerCase()})}uppercase(t=jt.uppercase){return this.transform(n=>vn(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>vn(n)||n===n.toUpperCase()})}}Ro.prototype=ul.prototype;let Gb=e=>e!=+e;function ld(){return new cl}class cl extends It{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Gb(t)}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(!o.spec.coerce)return t;let s=t;if(typeof s=="string"){if(s=s.replace(/\s/g,""),s==="")return NaN;s=+s}return o.isType(s)||s===null?s:parseFloat(s)})})}min(t,n=or.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(t)}})}max(t,n=or.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(t)}})}lessThan(t,n=or.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(o){return o<this.resolve(t)}})}moreThan(t,n=or.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(o){return o>this.resolve(t)}})}positive(t=or.positive){return this.moreThan(0,t)}negative(t=or.negative){return this.lessThan(0,t)}integer(t=or.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>vn(t)?t:t|0)}round(t){var n;let o=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(o.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+o.join(", "));return this.transform(s=>vn(s)?s:Math[t](s))}}ld.prototype=cl.prototype;let ud=new Date(""),Hb=e=>Object.prototype.toString.call(e)==="[object Date]";function fl(){return new ii}class ii extends It{constructor(){super({type:"date",check(t){return Hb(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,o)=>!o.spec.coerce||o.isType(t)||t===null?t:(t=Db(t),isNaN(t)?ii.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let o;if(sr.isRef(t))o=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);o=s}return o}min(t,n=nl.min){let o=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(o)}})}max(t,n=nl.max){let o=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(o)}})}}ii.INVALID_DATE=ud,fl.prototype=ii.prototype,fl.INVALID_DATE=ud;function Yb(e,t=[]){let n=[],o=new Set,s=new Set(t.map(([u,c])=>`${u}-${c}`));function a(u,c){let h=Fr.split(u)[0];o.add(h),s.has(`${c}-${h}`)||n.push([c,h])}for(const u of Object.keys(e)){let c=e[u];o.add(u),sr.isRef(c)&&c.isSibling?a(c.path,u):Dr(c)&&"deps"in c&&c.deps.forEach(h=>a(h,u))}return wb.array(Array.from(o),n).reverse()}function cd(e,t){let n=1/0;return e.some((o,s)=>{var a;if((a=t.path)!=null&&a.includes(o))return n=s,!0}),n}function fd(e){return(t,n)=>cd(e,t)-cd(e,n)}const dd=(e,t,n)=>{if(typeof e!="string")return e;let o=e;try{o=JSON.parse(e)}catch{}return n.isType(o)?o:e};function Zo(e){if("fields"in e){const t={};for(const[n,o]of Object.entries(e.fields))t[n]=Zo(o);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Zo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Zo)}):"optional"in e?e.optional():e}const qb=(e,t)=>{const n=[...Fr.normalizePath(t)];if(n.length===1)return n[0]in e;let o=n.pop(),s=Fr.getter(Fr.join(n),!0)(e);return!!(s&&o in s)};let hd=e=>Object.prototype.toString.call(e)==="[object Object]";function pd(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(o=>n.indexOf(o)===-1)}const Kb=fd([]);function Ki(e){return new dl(e)}class dl extends It{constructor(t){super({type:"object",check(n){return hd(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Kb,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var o;let s=super._cast(t,n);if(s===void 0)return this.getDefault(n);if(!this._typeCheck(s))return s;let a=this.fields,u=(o=n.stripUnknown)!=null?o:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(s).filter(y=>!this._nodes.includes(y))),h={},p=Object.assign({},n,{parent:h,__validating:n.__validating||!1}),g=!1;for(const y of c){let _=a[y],C=y in s;if(_){let E,w=s[y];p.path=(n.path?`${n.path}.`:"")+y,_=_.resolve({value:w,context:n.context,parent:h});let P=_ instanceof It?_.spec:void 0,N=P==null?void 0:P.strict;if(P!=null&&P.strip){g=g||y in s;continue}E=!n.__validating||!N?_.cast(s[y],p):s[y],E!==void 0&&(h[y]=E)}else C&&!u&&(h[y]=s[y]);(C!==y in h||h[y]!==s[y])&&(g=!0)}return g?h:s}_validate(t,n={},o,s){let{from:a=[],originalValue:u=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:u},...a],n.__validating=!0,n.originalValue=u,super._validate(t,n,o,(h,p)=>{if(!c||!hd(p)){s(h,p);return}u=u||p;let g=[];for(let y of this._nodes){let _=this.fields[y];!_||sr.isRef(_)||g.push(_.asNestedTest({options:n,key:y,parent:p,parentPath:n.path,originalParent:u}))}this.runTests({tests:g,value:p,originalValue:u,options:n},o,y=>{s(y.sort(this._sortErrors).concat(h),p)})})}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),o=n.fields;for(let[s,a]of Object.entries(this.fields)){const u=o[s];o[s]=u===void 0?a:u}return n.withMutation(s=>s.setFields(o,[...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(o=>{var s;const a=this.fields[o];let u=t;(s=u)!=null&&s.value&&(u=Object.assign({},u,{parent:u.value,value:u.value[o]})),n[o]=a&&"getDefault"in a?a.getDefault(u):void 0}),n}setFields(t,n){let o=this.clone();return o.fields=t,o._nodes=Yb(t,n),o._sortErrors=fd(Object.keys(t)),n&&(o._excludedEdges=n),o}shape(t,n=[]){return this.clone().withMutation(o=>{let s=o._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),s=[...o._excludedEdges,...n]),o.setFields(Object.assign(o.fields,t),s)})}partial(){const t={};for(const[n,o]of Object.entries(this.fields))t[n]="optional"in o&&o.optional instanceof Function?o.optional():o;return this.setFields(t)}deepPartial(){return Zo(this)}pick(t){const n={};for(const o of t)this.fields[o]&&(n[o]=this.fields[o]);return this.setFields(n,this._excludedEdges.filter(([o,s])=>t.includes(o)&&t.includes(s)))}omit(t){const n=[];for(const o of Object.keys(this.fields))t.includes(o)||n.push(o);return this.pick(n)}from(t,n,o){let s=Fr.getter(t,!0);return this.transform(a=>{if(!a)return a;let u=a;return qb(a,t)&&(u=Object.assign({},a),o||delete u[t],u[n]=s(a)),u})}json(){return this.transform(dd)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Go.exact,test(n){if(n==null)return!0;const o=pd(this.schema,n);return o.length===0||this.createError({params:{properties:o.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Go.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let o=this.test({name:"noUnknown",exclusive:!0,message:n,test(s){if(s==null)return!0;const a=pd(this.schema,s);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return o.spec.noUnknown=t,o}unknown(t=!0,n=Go.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const o={};for(const s of Object.keys(n))o[t(s)]=n[s];return o})}camelCase(){return this.transformKeys(el.camelCase)}snakeCase(){return this.transformKeys(el.snakeCase)}constantCase(){return this.transformKeys(t=>el.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);o.fields={};for(const[a,u]of Object.entries(n.fields)){var s;let c=t;(s=c)!=null&&s.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[a]})),o.fields[a]=u.describe(c)}return o}}Ki.prototype=dl.prototype;function hl(e){return new pl(e)}class pl extends It{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const o=super._cast(t,n);if(!this._typeCheck(o)||!this.innerType)return o;let s=!1;const a=o.map((u,c)=>{const h=this.innerType.cast(u,Object.assign({},n,{path:`${n.path||""}[${c}]`}));return h!==u&&(s=!0),h});return s?a:o}_validate(t,n={},o,s){var a;let u=this.innerType,c=(a=n.recursive)!=null?a:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,o,(h,p)=>{var g;if(!c||!u||!this._typeCheck(p)){s(h,p);return}let y=new Array(p.length);for(let C=0;C<p.length;C++){var _;y[C]=u.asNestedTest({options:n,index:C,parent:p,parentPath:n.path,originalParent:(_=n.originalValue)!=null?_:t})}this.runTests({value:p,tests:y,originalValue:(g=n.originalValue)!=null?g:t,options:n},o,C=>s(C.concat(h),p))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(dd)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!Dr(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+An(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=Ho.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,n){return n=n||Ho.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,n){return n=n||Ho.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(o,s,a)=>!t(o,s,a):o=>!!o;return this.transform(o=>o!=null?o.filter(n):o)}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);if(n.innerType){var s;let a=t;(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[0]})),o.innerType=n.innerType.describe(a)}return o}}hl.prototype=pl.prototype;function gd(e){return new gl(e)}class gl extends It{constructor(t){super({type:"tuple",spec:{types:t},check(n){const o=this.spec.types;return Array.isArray(n)&&n.length===o.length}}),this.withMutation(()=>{this.typeError(sd.notType)})}_cast(t,n){const{types:o}=this.spec,s=super._cast(t,n);if(!this._typeCheck(s))return s;let a=!1;const u=o.map((c,h)=>{const p=c.cast(s[h],Object.assign({},n,{path:`${n.path||""}[${h}]`}));return p!==s[h]&&(a=!0),p});return a?u:s}_validate(t,n={},o,s){let a=this.spec.types;super._validate(t,n,o,(u,c)=>{var h;if(!this._typeCheck(c)){s(u,c);return}let p=[];for(let[y,_]of a.entries()){var g;p[y]=_.asNestedTest({options:n,index:y,parent:c,parentPath:n.path,originalParent:(g=n.originalValue)!=null?g:t})}this.runTests({value:c,tests:p,originalValue:(h=n.originalValue)!=null?h:t,options:n},o,y=>s(y.concat(u),c))})}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);return o.innerType=n.spec.types.map((s,a)=>{var u;let c=t;return(u=c)!=null&&u.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[a]})),s.describe(c)}),o}}gd.prototype=gl.prototype;function Jb(e){return new Xo(e)}function md(e){try{return e()}catch(t){if(wt.isError(t))return Promise.reject(t);throw t}}class Xo{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(n,o={})=>{let s=this.builder(n,o);if(!Dr(s))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(s=s.optional()),s.resolve(o)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const n=new Xo(this.builder);return n.spec=Object.assign({},this.spec,t),n}optionality(t){return this.clone({optional:t})}optional(){return this.optionality(!0)}resolve(t){return this._resolve(t.value,t)}cast(t,n){return this._resolve(t,n).cast(t,n)}asNestedTest(t){let{key:n,index:o,parent:s,options:a}=t,u=s[o??n];return this._resolve(u,Object.assign({},a,{value:u,parent:s})).asNestedTest(t)}validate(t,n){return md(()=>this._resolve(t,n).validate(t,n))}validateSync(t,n){return this._resolve(t,n).validateSync(t,n)}validateAt(t,n,o){return md(()=>this._resolve(n,o).validateAt(t,n,o))}validateSyncAt(t,n,o){return this._resolve(n,o).validateSyncAt(t,n,o)}isValid(t,n){try{return this._resolve(t,n).isValid(t,n)}catch(o){if(wt.isError(o))return Promise.resolve(!1);throw o}}isValidSync(t,n){return this._resolve(t,n).isValidSync(t,n)}describe(t){return t?this.resolve(t).describe(t):{type:"lazy",meta:this.spec.meta,label:void 0}}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}}function Rb(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{ad[t][n]=e[t][n]})})}function Zb(e,t,n){if(!e||!Dr(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof t!="string")throw new TypeError("A Method name must be provided");if(typeof n!="function")throw new TypeError("Method function must be provided");e.prototype[t]=n}const yd=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:pl,BooleanSchema:al,DateSchema:ii,LazySchema:Xo,MixedSchema:ol,NumberSchema:cl,ObjectSchema:dl,Schema:It,StringSchema:ul,TupleSchema:gl,ValidationError:wt,addMethod:Zb,array:hl,bool:sl,boolean:sl,date:fl,defaultLocale:ad,getIn:il,isSchema:Dr,lazy:Jb,mixed:Jo,number:ld,object:Ki,printValue:An,reach:$b,ref:Pb,setLocale:Rb,string:Ro,tuple:gd},Symbol.toStringTag,{value:"Module"})),ml=e=>{const t=e.reduce((n,o)=>{let{name:s,required:a,type:u}=o;switch(u){case"RelatedList":u="array";break;case"Integer":case"Float":u="number";break;case"Related":case"Geometry":case"Raw":u="mixed";break;default:u="string"}let c;try{a?c=yd[u]().typeError(`Field must be of type ${u}`).required("Field is required"):c=yd[u]().typeError(`Field must be of type ${u}`).nullable(!0)}catch(h){console.log(h)}return n[s]=c,n},{});return Ki().shape(t)},vd=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:ml(e.add_columns),defaultValues:Ka(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:ml(e.edit_columns),defaultValues:Ka(e.edit_columns)}}:null,Xb={columns:[],filters:[],page:0,page_size:25};function Ji(e,t={}){return Object.entries(t).reduce((n,[o,s])=>s==null?(delete n[o],n):{...n,[o]:s},e||Xb)}function bd({path:e,initialQueryParams:t,relation:n,fetchInfo:o=!0,clearInfoOnRefetch:s=!1,clearDataOnRefetch:a=!1,resetQueryParamsOnPathChange:u=!0,infoQueryProps:c,dataQueryProps:h,streaming:p=!1}){const[g,y]=x.useState(t?Ji(null,t):null),_=x.useRef(e),C=x.useMemo(()=>(_.current=e,n?{...g,filters:[...g.filters,{col:n.foreign_key,opr:n.type,value:xt(n.id)}]}:g),[n,g]),E=x.useCallback(X=>y(K=>{if(typeof X=="function"&&(X=X(K)),!K)return Ji(null,X);const J=Ji({...K},X);if(X&&((X.filters||X.order_column||X.order_direction)&&!X.page&&(J.page=0),p)){if(X.page&&X.page!==K.page&&!X.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(X.page_size&&X.page_size!==K.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return J}),[p]),[w,P]=x.useState(null),N=x.useMemo(()=>w,[w]),Z=x.useCallback(()=>P(null),[]),{data:V,isFetching:B,refetch:D,error:k}=Ln.useQuery({queryKey:[`info-${e}`],queryFn:({signal:X})=>Wf(it(e,"_info"),X).then(K=>({...vd(K),path:e})),placeholderData:s?null:Ln.keepPreviousData,enabled:o,retry:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...c}),{data:H,isFetching:ae,refetch:oe,error:S}=Ln.useQuery({queryKey:[`data-${_.current}`,JSON.stringify(C)],queryFn:({signal:X})=>C?Gf(it(_.current,"/"),C,X).then(K=>({...K,result:K.result.map((J,ee)=>({...J,id:K.ids[ee]})),path:_.current})):null,placeholderData:a?null:Ln.keepPreviousData,retry:!1,...h});x.useEffect(()=>{if(k){P({message:"Couldn't fetch info",originalError:k});return}if(S){P({message:"Couldn't fetch list",originalError:S});return}Z()},[k,S,Z]);const U=x.useMemo(()=>B||ae,[B,ae]);Ze.useDidUpdate(()=>{if(!u)return;const X=Ji(null,t);g!=null&&g.page_size&&(X.page_size=g.page_size),y(X)},[e]);const ne=x.useCallback(async X=>{try{const K=await Vf(e,xt(X));return Z(),K}catch(K){P({message:`Couldn't fetch item with id ${X}`,originalError:K})}},[e,Z]),fe=x.useCallback(async X=>{try{const K=await zf(e,X);return Z(),K}catch(K){P({message:"Couldn't add item",originalError:K})}},[e,Z]),ye=x.useCallback(async(X,K)=>{try{const J=await Hf(e,xt(X),K);return Z(),J}catch(J){P({message:`Couldn't update item with id ${X}`,originalError:J})}},[e,Z]),Me=x.useCallback(async X=>{try{const K=await Uf(e,xt(X));return Z(),K}catch(K){P({message:`Couldn't delete item with id ${X}`,originalError:K})}},[e,Z]),we=x.useCallback(async({label:X,export_mode:K,delimiter:J})=>{try{await jf(e,C,{label:X,export_mode:K,delimiter:J}),Z()}catch(ee){P({message:"Couldn't download",originalError:ee})}},[e,C,Z]),Le=x.useCallback(async(X,{delimiter:K})=>{try{const J=await Yf(e,X,{delimiter:K});return Z(),J}catch(J){P({message:"Couldn't upload",originalError:J})}},[e,Z]),[Ie,lt]=Ze.useSetState({data:{},isEnd:!1,fetch:()=>null});x.useEffect(()=>{p&&lt({fetch:()=>E({page:0,streaming:!0})})},[E,lt,p]),x.useEffect(()=>{p&&H&&lt(X=>{let K=Object.keys(X.data).length;const J={isEnd:!1};return C.page<K?(K=C.page,J.data={[C.page]:H.result}):J.data={...X.data,[C.page]:H.result},H.result.length<C.page_size?(J.isEnd=!0,J.fetch=()=>null):J.fetch=()=>E({page:K+1,streaming:!0}),J})},[H,E,lt,p]);const Y=x.useMemo(()=>{const X={all:"all",actions:"actions"};return H==null||H.list_columns.forEach(K=>{X[K]&&(X[K]=`_${K}`)}),X},[H==null?void 0:H.list_columns]),q=x.useCallback(()=>C?oe():E(),[oe,C,E]);return{path:e,data:H,info:V,queryParams:C,loading:U,error:N,streaming:Ie,specialKey:Y,setQueryParams:E,refetch:q,refetchInfo:D,getEntry:ne,addEntry:fe,updateEntry:ye,deleteEntry:Me,download:we,upload:Le,resetError:Z}}const _d=({path:e,refetch:t})=>{const[n,o]=x.useState([]),[s,a]=x.useState(null),u=x.useCallback(async(h,p)=>{try{a(null);const g=await qf(e,h,n);return p||t(),g}catch(g){console.error(g),a({message:"Couldn't perform bulk action",originalError:g})}},[e,t,n]);return{bulkActions:x.useMemo(()=>({selectedIds:n,setSelectedIds:o}),[n,o]),dispatchBulkActions:u,error:s}},mt={NORMAL:"normal",FULL_SCREEN:"fullScreen",OVERLAY:"overlay"},yl=()=>{const[e]=x.useState(()=>wf.create(t=>({opened:!1,setOpened:n=>t({opened:n}),view:mt.NORMAL,setView:n=>t({view:n}),state:jo,setState:n=>t({state:n}),reset:()=>t({state:jo}),item:void 0,itemLoading:!1,setItem:n=>t({item:n,itemLoading:!1}),setItemLoading:n=>t({itemLoading:n})})));return e};function Td({resource_name:e="",initialQueryParams:t,relation:n,fetchInfo:o,clearInfoOnRefetch:s,clearDataOnRefetch:a,resetQueryParamsOnPathChange:u,infoQueryProps:c,dataQueryProps:h,children:p,streaming:g}){const{baseUrl:y}=Of(),_=bd({path:it(y,e),initialQueryParams:t,relation:n,fetchInfo:o,clearInfoOnRefetch:s,clearDataOnRefetch:a,resetQueryParamsOnPathChange:u,infoQueryProps:c,dataQueryProps:h,streaming:g}),C=qi(_),E=_d(C),w=qi(E),P=yl(),[N]=x.useState(()=>Uo(P)),Z=yl(),[V]=x.useState(()=>Uo(Z));return d.jsx(za.Provider,{value:C,children:d.jsx(Ha.Provider,{value:w,children:d.jsx(Ya.Provider,{value:N,children:d.jsx(qa.Provider,{value:V,children:p})})})})}/**
4
+ `+(c!==u?`result of cast: ${c}`:""))}return a}_cast(t,n){let o=t===void 0?t:this.transforms.reduce((s,a)=>a.call(this,s,t,this),t);return o===void 0&&(o=this.getDefault(n)),o}_validate(t,n={},o,s){let{path:a,originalValue:u=t,strict:c=this.spec.strict}=n,h=t;c||(h=this._cast(h,Object.assign({assert:!1},n)));let p=[];for(let g of Object.values(this.internalTests))g&&p.push(g);this.runTests({path:a,value:h,originalValue:u,options:n,tests:p},o,g=>{if(g.length)return s(g,h);this.runTests({path:a,value:h,originalValue:u,options:n,tests:this.tests},o,s)})}runTests(t,n,o){let s=!1,{tests:a,value:u,originalValue:c,path:h,options:p}=t,g=w=>{s||(s=!0,n(w,u))},y=w=>{s||(s=!0,o(w,u))},_=a.length,C=[];if(!_)return y([]);let E={value:u,originalValue:c,path:h,options:p,schema:this};for(let w=0;w<a.length;w++){const P=a[w];P(E,g,function(Z){Z&&(Array.isArray(Z)?C.push(...Z):C.push(Z)),--_<=0&&y(C)})}}asNestedTest({key:t,index:n,parent:o,parentPath:s,originalParent:a,options:u}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const h=typeof c=="number";let p=o[c];const g=Object.assign({},u,{strict:!0,parent:o,value:p,originalValue:a[c],key:void 0,[h?"index":"key"]:c,path:h||c.includes(".")?`${s||""}[${h?c:`"${c}"`}]`:(s?`${s}.`:"")+t});return(y,_,C)=>this.resolve(g)._validate(p,g,_,C)}validate(t,n){var o;let s=this.resolve(Object.assign({},n,{value:t})),a=(o=n==null?void 0:n.disableStackTrace)!=null?o:s.spec.disableStackTrace;return new Promise((u,c)=>s._validate(t,n,(h,p)=>{wt.isError(h)&&(h.value=p),c(h)},(h,p)=>{h.length?c(new wt(h,p,void 0,void 0,a)):u(p)}))}validateSync(t,n){var o;let s=this.resolve(Object.assign({},n,{value:t})),a,u=(o=n==null?void 0:n.disableStackTrace)!=null?o:s.spec.disableStackTrace;return s._validate(t,Object.assign({},n,{sync:!0}),(c,h)=>{throw wt.isError(c)&&(c.value=h),c},(c,h)=>{if(c.length)throw new wt(c,t,void 0,void 0,u);a=h}),a}isValid(t,n){return this.validate(t,n).then(()=>!0,o=>{if(wt.isError(o))return!1;throw o})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(o){if(wt.isError(o))return!1;throw o}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):ri(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 o=this.clone({nullable:t});return o.internalTests.nullable=ni({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),o}optionality(t,n){const o=this.clone({optional:t});return o.internalTests.optionality=ni({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),o}optional(){return this.optionality(!0)}defined(t=On.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=On.notNull){return this.nullability(!1,t)}required(t=On.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=On.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let o=this.clone(),s=ni(n),a=n.exclusive||n.name&&o.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&&(o.exclusiveTests[n.name]=!!n.exclusive),o.tests=o.tests.filter(u=>!(u.OPTIONS.name===n.name&&(a||u.OPTIONS.test===s.OPTIONS.test))),o.tests.push(s),o}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let o=this.clone(),s=td(t).map(a=>new sr(a));return s.forEach(a=>{a.isSibling&&o.deps.push(a.key)}),o.conditions.push(typeof n=="function"?new Yo(s,n):Yo.fromOptions(s,n)),o}typeError(t){let n=this.clone();return n.internalTests.typeError=ni({message:t,name:"typeError",skipAbsent:!0,test(o){return this.schema._typeCheck(o)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=On.oneOf){let o=this.clone();return t.forEach(s=>{o._whitelist.add(s),o._blacklist.delete(s)}),o.internalTests.whiteList=ni({message:n,name:"oneOf",skipAbsent:!0,test(s){let a=this.schema._whitelist,u=a.resolveAll(this.resolve);return u.includes(s)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:u}})}}),o}notOneOf(t,n=On.notOneOf){let o=this.clone();return t.forEach(s=>{o._blacklist.add(s),o._whitelist.delete(s)}),o.internalTests.blacklist=ni({message:n,name:"notOneOf",test(s){let a=this.schema._blacklist,u=a.resolveAll(this.resolve);return u.includes(s)?this.createError({params:{values:Array.from(a).join(", "),resolved:u}}):!0}}),o}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:o,meta:s,optional:a,nullable:u}=n.spec;return{meta:s,label:o,optional:a,nullable:u,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(h=>({name:h.OPTIONS.name,params:h.OPTIONS.params})).filter((h,p,g)=>g.findIndex(y=>y.name===h.name)===p)}}}It.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])It.prototype[`${e}At`]=function(t,n,o={}){const{parent:s,parentPath:a,schema:u}=il(this,t,n,o.context);return u[e](s&&s[a],Object.assign({},o,{parent:s,path:t}))};for(const e of["equals","is"])It.prototype[e]=It.prototype.oneOf;for(const e of["not","nope"])It.prototype[e]=It.prototype.notOneOf;const Mb=()=>!0;function Jo(e){return new ol(e)}class ol extends It{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Mb},t))}}Jo.prototype=ol.prototype;function sl(){return new al}class al extends It{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(o.spec.coerce&&!o.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=rl.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return vn(n)||n===!0}})}isFalse(t=rl.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return vn(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}sl.prototype=al.prototype;const Fb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Db(e){const t=ll(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 ll(e){var t,n;const o=Fb.exec(e);return o?{year:jn(o[1]),month:jn(o[2],1)-1,day:jn(o[3],1),hour:jn(o[4]),minute:jn(o[5]),second:jn(o[6]),millisecond:o[7]?jn(o[7].substring(0,3)):0,precision:(t=(n=o[7])==null?void 0:n.length)!=null?t:void 0,z:o[8]||void 0,plusMinus:o[9]||void 0,hourOffset:jn(o[10]),minuteOffset:jn(o[11])}:null}function jn(e,t=0){return Number(e)||t}let kb=/^[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])?)*$/,Nb=/^((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,Lb=/^(?:[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,Bb="^\\d{4}-\\d{2}-\\d{2}",zb="\\d{2}:\\d{2}:\\d{2}",Ub="(([+-]\\d{2}(:?\\d{2})?)|Z)",jb=new RegExp(`${Bb}T${zb}(\\.\\d+)?${Ub}$`),Wb=e=>vn(e)||e===e.trim(),Vb={}.toString();function Ro(){return new ul}class ul extends It{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(!o.spec.coerce||o.isType(t)||Array.isArray(t))return t;const s=t!=null&&t.toString?t.toString():t;return s===Vb?t:s})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||On.required,name:"required",skipAbsent:!0,test:o=>!!o.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=jt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,n=jt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,n=jt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}matches(t,n){let o=!1,s,a;return n&&(typeof n=="object"?{excludeEmptyString:o=!1,message:s,name:a}=n:s=n),this.test({name:a||"matches",message:s||jt.matches,params:{regex:t},skipAbsent:!0,test:u=>u===""&&o||u.search(t)!==-1})}email(t=jt.email){return this.matches(kb,{name:"email",message:t,excludeEmptyString:!0})}url(t=jt.url){return this.matches(Nb,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=jt.uuid){return this.matches(Lb,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",o,s;return t&&(typeof t=="object"?{message:n="",allowOffset:o=!1,precision:s=void 0}=t:n=t),this.matches(jb,{name:"datetime",message:n||jt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||jt.datetime_offset,params:{allowOffset:o},skipAbsent:!0,test:a=>{if(!a||o)return!0;const u=ll(a);return u?!!u.z:!1}}).test({name:"datetime_precision",message:n||jt.datetime_precision,params:{precision:s},skipAbsent:!0,test:a=>{if(!a||s==null)return!0;const u=ll(a);return u?u.precision===s:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=jt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Wb})}lowercase(t=jt.lowercase){return this.transform(n=>vn(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>vn(n)||n===n.toLowerCase()})}uppercase(t=jt.uppercase){return this.transform(n=>vn(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>vn(n)||n===n.toUpperCase()})}}Ro.prototype=ul.prototype;let Gb=e=>e!=+e;function ld(){return new cl}class cl extends It{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Gb(t)}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(!o.spec.coerce)return t;let s=t;if(typeof s=="string"){if(s=s.replace(/\s/g,""),s==="")return NaN;s=+s}return o.isType(s)||s===null?s:parseFloat(s)})})}min(t,n=or.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(t)}})}max(t,n=or.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(t)}})}lessThan(t,n=or.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(o){return o<this.resolve(t)}})}moreThan(t,n=or.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(o){return o>this.resolve(t)}})}positive(t=or.positive){return this.moreThan(0,t)}negative(t=or.negative){return this.lessThan(0,t)}integer(t=or.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>vn(t)?t:t|0)}round(t){var n;let o=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(o.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+o.join(", "));return this.transform(s=>vn(s)?s:Math[t](s))}}ld.prototype=cl.prototype;let ud=new Date(""),Hb=e=>Object.prototype.toString.call(e)==="[object Date]";function fl(){return new ii}class ii extends It{constructor(){super({type:"date",check(t){return Hb(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,o)=>!o.spec.coerce||o.isType(t)||t===null?t:(t=Db(t),isNaN(t)?ii.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let o;if(sr.isRef(t))o=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);o=s}return o}min(t,n=nl.min){let o=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(o)}})}max(t,n=nl.max){let o=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(o)}})}}ii.INVALID_DATE=ud,fl.prototype=ii.prototype,fl.INVALID_DATE=ud;function Yb(e,t=[]){let n=[],o=new Set,s=new Set(t.map(([u,c])=>`${u}-${c}`));function a(u,c){let h=Fr.split(u)[0];o.add(h),s.has(`${c}-${h}`)||n.push([c,h])}for(const u of Object.keys(e)){let c=e[u];o.add(u),sr.isRef(c)&&c.isSibling?a(c.path,u):Dr(c)&&"deps"in c&&c.deps.forEach(h=>a(h,u))}return wb.array(Array.from(o),n).reverse()}function cd(e,t){let n=1/0;return e.some((o,s)=>{var a;if((a=t.path)!=null&&a.includes(o))return n=s,!0}),n}function fd(e){return(t,n)=>cd(e,t)-cd(e,n)}const dd=(e,t,n)=>{if(typeof e!="string")return e;let o=e;try{o=JSON.parse(e)}catch{}return n.isType(o)?o:e};function Zo(e){if("fields"in e){const t={};for(const[n,o]of Object.entries(e.fields))t[n]=Zo(o);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Zo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Zo)}):"optional"in e?e.optional():e}const qb=(e,t)=>{const n=[...Fr.normalizePath(t)];if(n.length===1)return n[0]in e;let o=n.pop(),s=Fr.getter(Fr.join(n),!0)(e);return!!(s&&o in s)};let hd=e=>Object.prototype.toString.call(e)==="[object Object]";function pd(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(o=>n.indexOf(o)===-1)}const Kb=fd([]);function Ki(e){return new dl(e)}class dl extends It{constructor(t){super({type:"object",check(n){return hd(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Kb,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var o;let s=super._cast(t,n);if(s===void 0)return this.getDefault(n);if(!this._typeCheck(s))return s;let a=this.fields,u=(o=n.stripUnknown)!=null?o:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(s).filter(y=>!this._nodes.includes(y))),h={},p=Object.assign({},n,{parent:h,__validating:n.__validating||!1}),g=!1;for(const y of c){let _=a[y],C=y in s;if(_){let E,w=s[y];p.path=(n.path?`${n.path}.`:"")+y,_=_.resolve({value:w,context:n.context,parent:h});let P=_ instanceof It?_.spec:void 0,N=P==null?void 0:P.strict;if(P!=null&&P.strip){g=g||y in s;continue}E=!n.__validating||!N?_.cast(s[y],p):s[y],E!==void 0&&(h[y]=E)}else C&&!u&&(h[y]=s[y]);(C!==y in h||h[y]!==s[y])&&(g=!0)}return g?h:s}_validate(t,n={},o,s){let{from:a=[],originalValue:u=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:u},...a],n.__validating=!0,n.originalValue=u,super._validate(t,n,o,(h,p)=>{if(!c||!hd(p)){s(h,p);return}u=u||p;let g=[];for(let y of this._nodes){let _=this.fields[y];!_||sr.isRef(_)||g.push(_.asNestedTest({options:n,key:y,parent:p,parentPath:n.path,originalParent:u}))}this.runTests({tests:g,value:p,originalValue:u,options:n},o,y=>{s(y.sort(this._sortErrors).concat(h),p)})})}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),o=n.fields;for(let[s,a]of Object.entries(this.fields)){const u=o[s];o[s]=u===void 0?a:u}return n.withMutation(s=>s.setFields(o,[...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(o=>{var s;const a=this.fields[o];let u=t;(s=u)!=null&&s.value&&(u=Object.assign({},u,{parent:u.value,value:u.value[o]})),n[o]=a&&"getDefault"in a?a.getDefault(u):void 0}),n}setFields(t,n){let o=this.clone();return o.fields=t,o._nodes=Yb(t,n),o._sortErrors=fd(Object.keys(t)),n&&(o._excludedEdges=n),o}shape(t,n=[]){return this.clone().withMutation(o=>{let s=o._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),s=[...o._excludedEdges,...n]),o.setFields(Object.assign(o.fields,t),s)})}partial(){const t={};for(const[n,o]of Object.entries(this.fields))t[n]="optional"in o&&o.optional instanceof Function?o.optional():o;return this.setFields(t)}deepPartial(){return Zo(this)}pick(t){const n={};for(const o of t)this.fields[o]&&(n[o]=this.fields[o]);return this.setFields(n,this._excludedEdges.filter(([o,s])=>t.includes(o)&&t.includes(s)))}omit(t){const n=[];for(const o of Object.keys(this.fields))t.includes(o)||n.push(o);return this.pick(n)}from(t,n,o){let s=Fr.getter(t,!0);return this.transform(a=>{if(!a)return a;let u=a;return qb(a,t)&&(u=Object.assign({},a),o||delete u[t],u[n]=s(a)),u})}json(){return this.transform(dd)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Go.exact,test(n){if(n==null)return!0;const o=pd(this.schema,n);return o.length===0||this.createError({params:{properties:o.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Go.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let o=this.test({name:"noUnknown",exclusive:!0,message:n,test(s){if(s==null)return!0;const a=pd(this.schema,s);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return o.spec.noUnknown=t,o}unknown(t=!0,n=Go.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const o={};for(const s of Object.keys(n))o[t(s)]=n[s];return o})}camelCase(){return this.transformKeys(el.camelCase)}snakeCase(){return this.transformKeys(el.snakeCase)}constantCase(){return this.transformKeys(t=>el.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);o.fields={};for(const[a,u]of Object.entries(n.fields)){var s;let c=t;(s=c)!=null&&s.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[a]})),o.fields[a]=u.describe(c)}return o}}Ki.prototype=dl.prototype;function hl(e){return new pl(e)}class pl extends It{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const o=super._cast(t,n);if(!this._typeCheck(o)||!this.innerType)return o;let s=!1;const a=o.map((u,c)=>{const h=this.innerType.cast(u,Object.assign({},n,{path:`${n.path||""}[${c}]`}));return h!==u&&(s=!0),h});return s?a:o}_validate(t,n={},o,s){var a;let u=this.innerType,c=(a=n.recursive)!=null?a:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,o,(h,p)=>{var g;if(!c||!u||!this._typeCheck(p)){s(h,p);return}let y=new Array(p.length);for(let C=0;C<p.length;C++){var _;y[C]=u.asNestedTest({options:n,index:C,parent:p,parentPath:n.path,originalParent:(_=n.originalValue)!=null?_:t})}this.runTests({value:p,tests:y,originalValue:(g=n.originalValue)!=null?g:t,options:n},o,C=>s(C.concat(h),p))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(dd)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!Dr(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+An(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=Ho.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,n){return n=n||Ho.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,n){return n=n||Ho.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(o,s,a)=>!t(o,s,a):o=>!!o;return this.transform(o=>o!=null?o.filter(n):o)}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);if(n.innerType){var s;let a=t;(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[0]})),o.innerType=n.innerType.describe(a)}return o}}hl.prototype=pl.prototype;function gd(e){return new gl(e)}class gl extends It{constructor(t){super({type:"tuple",spec:{types:t},check(n){const o=this.spec.types;return Array.isArray(n)&&n.length===o.length}}),this.withMutation(()=>{this.typeError(sd.notType)})}_cast(t,n){const{types:o}=this.spec,s=super._cast(t,n);if(!this._typeCheck(s))return s;let a=!1;const u=o.map((c,h)=>{const p=c.cast(s[h],Object.assign({},n,{path:`${n.path||""}[${h}]`}));return p!==s[h]&&(a=!0),p});return a?u:s}_validate(t,n={},o,s){let a=this.spec.types;super._validate(t,n,o,(u,c)=>{var h;if(!this._typeCheck(c)){s(u,c);return}let p=[];for(let[y,_]of a.entries()){var g;p[y]=_.asNestedTest({options:n,index:y,parent:c,parentPath:n.path,originalParent:(g=n.originalValue)!=null?g:t})}this.runTests({value:c,tests:p,originalValue:(h=n.originalValue)!=null?h:t,options:n},o,y=>s(y.concat(u),c))})}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);return o.innerType=n.spec.types.map((s,a)=>{var u;let c=t;return(u=c)!=null&&u.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[a]})),s.describe(c)}),o}}gd.prototype=gl.prototype;function Jb(e){return new Xo(e)}function md(e){try{return e()}catch(t){if(wt.isError(t))return Promise.reject(t);throw t}}class Xo{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(n,o={})=>{let s=this.builder(n,o);if(!Dr(s))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(s=s.optional()),s.resolve(o)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const n=new Xo(this.builder);return n.spec=Object.assign({},this.spec,t),n}optionality(t){return this.clone({optional:t})}optional(){return this.optionality(!0)}resolve(t){return this._resolve(t.value,t)}cast(t,n){return this._resolve(t,n).cast(t,n)}asNestedTest(t){let{key:n,index:o,parent:s,options:a}=t,u=s[o??n];return this._resolve(u,Object.assign({},a,{value:u,parent:s})).asNestedTest(t)}validate(t,n){return md(()=>this._resolve(t,n).validate(t,n))}validateSync(t,n){return this._resolve(t,n).validateSync(t,n)}validateAt(t,n,o){return md(()=>this._resolve(n,o).validateAt(t,n,o))}validateSyncAt(t,n,o){return this._resolve(n,o).validateSyncAt(t,n,o)}isValid(t,n){try{return this._resolve(t,n).isValid(t,n)}catch(o){if(wt.isError(o))return Promise.resolve(!1);throw o}}isValidSync(t,n){return this._resolve(t,n).isValidSync(t,n)}describe(t){return t?this.resolve(t).describe(t):{type:"lazy",meta:this.spec.meta,label:void 0}}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}}function Rb(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{ad[t][n]=e[t][n]})})}function Zb(e,t,n){if(!e||!Dr(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof t!="string")throw new TypeError("A Method name must be provided");if(typeof n!="function")throw new TypeError("Method function must be provided");e.prototype[t]=n}const yd=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:pl,BooleanSchema:al,DateSchema:ii,LazySchema:Xo,MixedSchema:ol,NumberSchema:cl,ObjectSchema:dl,Schema:It,StringSchema:ul,TupleSchema:gl,ValidationError:wt,addMethod:Zb,array:hl,bool:sl,boolean:sl,date:fl,defaultLocale:ad,getIn:il,isSchema:Dr,lazy:Jb,mixed:Jo,number:ld,object:Ki,printValue:An,reach:$b,ref:Pb,setLocale:Rb,string:Ro,tuple:gd},Symbol.toStringTag,{value:"Module"})),ml=e=>{const t=e.reduce((n,o)=>{let{name:s,required:a,type:u}=o;switch(u){case"RelatedList":u="array";break;case"Integer":case"Float":u="number";break;case"Related":case"Geometry":case"Raw":u="mixed";break;default:u="string"}let c;try{a?c=yd[u]().typeError(`Field must be of type ${u}`).required("Field is required"):c=yd[u]().typeError(`Field must be of type ${u}`).nullable(!0)}catch(h){console.log(h)}return n[s]=c,n},{});return Ki().shape(t)},vd=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:ml(e.add_columns),defaultValues:Ka(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:ml(e.edit_columns),defaultValues:Ka(e.edit_columns)}}:null,Xb={columns:[],filters:[],page:0,page_size:25};function Ji(e,t={}){return Object.entries(t).reduce((n,[o,s])=>s==null?(delete n[o],n):{...n,[o]:s},e||Xb)}function bd({path:e,initialQueryParams:t,relation:n,fetchInfo:o=!0,clearInfoOnRefetch:s=!1,clearDataOnRefetch:a=!1,resetQueryParamsOnPathChange:u=!0,infoQueryProps:c,dataQueryProps:h,streaming:p=!1}){const[g,y]=x.useState(t?Ji(null,t):null),_=x.useRef(e),C=x.useMemo(()=>(_.current=e,n?{...g,filters:[...g.filters,{col:n.foreign_key,opr:n.type,value:xt(n.id)}]}:g),[n,g]),E=x.useCallback(X=>y(K=>{if(typeof X=="function"&&(X=X(K)),!K)return Ji(null,X);const J=Ji({...K},X);if(X&&((X.filters||X.order_column||X.order_direction)&&!X.page&&(J.page=0),p)){if(X.page&&X.page!==K.page&&!X.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(X.page_size&&X.page_size!==K.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return J}),[p]),[w,P]=x.useState(null),N=x.useMemo(()=>w,[w]),Z=x.useCallback(()=>P(null),[]),{data:V,isFetching:B,refetch:D,error:k}=Ln.useQuery({queryKey:["info",e],queryFn:({signal:X})=>Wf(it(e,"_info"),X).then(K=>({...vd(K),path:e})),placeholderData:s?null:Ln.keepPreviousData,enabled:o,retry:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...c}),{data:H,isFetching:ae,refetch:oe,error:S}=Ln.useQuery({queryKey:["data",_.current,JSON.stringify(C)],queryFn:({signal:X})=>C?Gf(it(_.current,"/"),C,X).then(K=>({...K,result:K.result.map((J,ee)=>({...J,id:K.ids[ee]})),path:_.current})):null,placeholderData:a?null:Ln.keepPreviousData,retry:!1,...h});x.useEffect(()=>{if(k){P({message:"Couldn't fetch info",originalError:k});return}if(S){P({message:"Couldn't fetch list",originalError:S});return}Z()},[k,S,Z]);const U=x.useMemo(()=>B||ae,[B,ae]);Ze.useDidUpdate(()=>{if(!u)return;const X=Ji(null,t);g!=null&&g.page_size&&(X.page_size=g.page_size),y({...X})},[e]);const ne=x.useCallback(async X=>{try{const K=await Vf(e,xt(X));return Z(),K}catch(K){P({message:`Couldn't fetch item with id ${X}`,originalError:K})}},[e,Z]),fe=x.useCallback(async X=>{try{const K=await zf(e,X);return Z(),K}catch(K){P({message:"Couldn't add item",originalError:K})}},[e,Z]),ye=x.useCallback(async(X,K)=>{try{const J=await Hf(e,xt(X),K);return Z(),J}catch(J){P({message:`Couldn't update item with id ${X}`,originalError:J})}},[e,Z]),Me=x.useCallback(async X=>{try{const K=await Uf(e,xt(X));return Z(),K}catch(K){P({message:`Couldn't delete item with id ${X}`,originalError:K})}},[e,Z]),we=x.useCallback(async({label:X,export_mode:K,delimiter:J})=>{try{await jf(e,C,{label:X,export_mode:K,delimiter:J}),Z()}catch(ee){P({message:"Couldn't download",originalError:ee})}},[e,C,Z]),Le=x.useCallback(async(X,{delimiter:K})=>{try{const J=await Yf(e,X,{delimiter:K});return Z(),J}catch(J){P({message:"Couldn't upload",originalError:J})}},[e,Z]),[Ie,lt]=Ze.useSetState({data:{},isEnd:!1,fetch:()=>null});x.useEffect(()=>{p&&lt({fetch:()=>E({page:0,streaming:!0})})},[E,lt,p]),x.useEffect(()=>{p&&H&&lt(X=>{let K=Object.keys(X.data).length;const J={isEnd:!1};return C.page<K?(K=C.page,J.data={[C.page]:H.result}):J.data={...X.data,[C.page]:H.result},H.result.length<C.page_size?(J.isEnd=!0,J.fetch=()=>null):J.fetch=()=>E({page:K+1,streaming:!0}),J})},[H,E,lt,p]);const Y=x.useMemo(()=>{const X={all:"all",actions:"actions"};return H==null||H.list_columns.forEach(K=>{X[K]&&(X[K]=`_${K}`)}),X},[H==null?void 0:H.list_columns]),q=x.useCallback(()=>C?oe():E(),[oe,C,E]);return{path:e,data:H,info:V,queryParams:C,loading:U,error:N,streaming:Ie,specialKey:Y,setQueryParams:E,refetch:q,refetchInfo:D,getEntry:ne,addEntry:fe,updateEntry:ye,deleteEntry:Me,download:we,upload:Le,resetError:Z}}const _d=({path:e,refetch:t})=>{const[n,o]=x.useState([]),[s,a]=x.useState(null),u=x.useCallback(async(h,p)=>{try{a(null);const g=await qf(e,h,n);return p||t(),g}catch(g){console.error(g),a({message:"Couldn't perform bulk action",originalError:g})}},[e,t,n]);return{bulkActions:x.useMemo(()=>({selectedIds:n,setSelectedIds:o}),[n,o]),dispatchBulkActions:u,error:s}},mt={NORMAL:"normal",FULL_SCREEN:"fullScreen",OVERLAY:"overlay"},yl=()=>{const[e]=x.useState(()=>wf.create(t=>({opened:!1,setOpened:n=>t({opened:n}),view:mt.NORMAL,setView:n=>t({view:n}),state:jo,setState:n=>t({state:n}),reset:()=>t({state:jo}),item:void 0,itemLoading:!1,setItem:n=>t({item:n,itemLoading:!1}),setItemLoading:n=>t({itemLoading:n})})));return e};function Td({resource_name:e="",initialQueryParams:t,relation:n,fetchInfo:o,clearInfoOnRefetch:s,clearDataOnRefetch:a,resetQueryParamsOnPathChange:u,infoQueryProps:c,dataQueryProps:h,children:p,streaming:g}){const{baseUrl:y}=Of(),_=bd({path:it(y,e),initialQueryParams:t,relation:n,fetchInfo:o,clearInfoOnRefetch:s,clearDataOnRefetch:a,resetQueryParamsOnPathChange:u,infoQueryProps:c,dataQueryProps:h,streaming:g}),C=qi(_),E=_d(C),w=qi(E),P=yl(),[N]=x.useState(()=>Uo(P)),Z=yl(),[V]=x.useState(()=>Uo(Z));return d.jsx(za.Provider,{value:C,children:d.jsx(Ha.Provider,{value:w,children:d.jsx(Ya.Provider,{value:N,children:d.jsx(qa.Provider,{value:V,children:p})})})})}/**
5
5
  * @license @tabler/icons-react v3.31.0 - MIT
6
6
  *
7
7
  * This source code is licensed under the MIT license.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastapi-rtk",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "private": false,
5
5
  "description": "A react component library for Flask Appbuilder",
6
6
  "license": "MIT",