@dartcom/ui-kit 10.1.6 → 10.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -18,7 +18,7 @@ import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import
18
18
  *
19
19
  * @license MIT
20
20
  */
21
- function Eg(e,t){return e?function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(r=e)||"function"==typeof r||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(r)?n.createElement(e,t):e:null;var r}var Sg=Fd(({number:t})=>{const r=n.useId(),i=n.useRef(null),s=xp({type:"preview",number:t}),{height:o}=ep[t];return e("img",{src:s,id:r,width:fp.preview,height:2*o,ref:i,alt:`traffic-sign-${t}`})});const Tg={height:"",title:_p.traffic_sign_title,type:_p.traffic_sign_type,number:_p.traffic_sign_number};var kg=Fd(({options:t,label:n,column:r})=>{const i=r.getFilterValue(),s=t.find(({value:e})=>e===i);return e(I,{value:s??null,options:t,id:r.id,getOptionLabel:({label:e})=>e,getOptionKey:({value:e})=>e,size:"small",onChange:(e,t)=>{t?r.setFilterValue(t.value):r.setFilterValue(null)},renderInput:t=>e(sn,{...t,label:n})})});var Og=Fd(({pageSize:r=15,defaultValues:i,filtered:s={},onSelect:o,trafficSigns:a})=>{const[l,u]=n.useState({}),[c,h]=n.useState([]),[d,f]=n.useState({pageIndex:0,pageSize:r}),p={accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e},g=n.useMemo(()=>{const t=[{id:"image",header:()=>e(pe,{onClick:()=>{h([])},children:"Очистить все"}),cell:({row:{original:t}})=>e(Sg,{number:t.number})},p.accessor("title",{cell:t=>e(Jt,{variant:"body2",sx:{textAlign:"center",cursor:"inherit"},children:t.getValue()}),footer:e=>e.column.id,header:()=>e(Jt,{variant:"body1",fontWeight:700,children:"Название знака"}),meta:{isFiltered:s?.title??!0}}),p.accessor("number",{cell:t=>{const n=t.getValue();return e(Jt,{variant:"body2",sx:{textAlign:"center",cursor:"inherit"},children:n})},footer:e=>e.column.id,header:()=>e(Jt,{variant:"body1",fontWeight:700,children:"Номер знака"}),filterFn:({original:e},t)=>{const n=c.find(e=>e.id===t);if(n){return n.value===e.number||null===n.value}return!0},meta:{isFiltered:s?.number??!0}}),p.accessor("type",{cell:t=>e(Jt,{variant:"body2",sx:{textAlign:"center",cursor:"inherit"},children:t.getValue()}),footer:e=>e.column.id,header:()=>e(Jt,{variant:"body1",fontWeight:700,children:"Тип знака"}),meta:{isFiltered:s?.type??!0}})];return t},[c,s]),m=n.useMemo(()=>{const e=Object.entries(a).map(([e,t])=>({...t,number:e}));return e},[a]),_=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=n.useState(()=>({current:wg(t)})),[i,s]=n.useState(()=>r.current.initialState);return r.current.setOptions(t=>({...t,...e,state:{...i,...e.state},onStateChange:t=>{s(t),null==e.onStateChange||e.onStateChange(t)}})),r.current}({data:m,columns:g,state:{columnFilters:c,rowSelection:l,pagination:d},enableRowSelection:!0,onColumnFiltersChange:h,onRowSelectionChange:u,onPaginationChange:f,getCoreRowModel:e=>Pp(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,i,s){void 0===i&&(i=0);const o=[];for(let l=0;l<t.length;l++){const u=zp(e,e._getRowId(t[l],l,s),t[l],l,i,0,null==s?void 0:s.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,o.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[l],l),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=r(u.originalSubRows,i+1,u)))}return o};return n.rows=r(t),n},Mp(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex())),getFilteredRowModel:e=>Pp(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||(null==n||!n.length)&&!r){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const i=[],s=[];(null!=n?n:[]).forEach(t=>{var n;const r=e.getColumn(t.id);if(!r)return;const s=r.getFilterFn();s?i.push({id:t.id,filterFn:s,resolvedValue:null!=(n=null==s.resolveFilterValue?void 0:s.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${r.id}.`)});const o=(null!=n?n:[]).map(e=>e.id),a=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(e=>e.getCanGlobalFilter());let u,c;r&&a&&l.length&&(o.push("__global__"),l.forEach(e=>{var t;s.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(r))?t:r})}));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},i.length)for(let e=0;e<i.length;e++){u=i[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,e=>{n.columnFiltersMeta[t]=e})}if(s.length){for(let e=0;e<s.length;e++){c=s[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,e=>{n.columnFiltersMeta[t]=e})){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return Ag(t.rows,e=>{for(let t=0;t<o.length;t++)if(!1===e.columnFilters[o[t]])return!1;return!0},e)},Mp(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex())),getSortedRowModel:e=>Pp(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,i=[],s=r.filter(t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()}),o={};s.forEach(t=>{const n=e.getColumn(t.id);n&&(o[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})});const a=e=>{const t=e.map(e=>({...e}));return t.sort((e,t)=>{for(let r=0;r<s.length;r+=1){var n;const i=s[r],a=o[i.id],l=a.sortUndefined,u=null!=(n=null==i?void 0:i.desc)&&n;let c=0;if(l){const n=void 0===e.getValue(i.id),r=void 0===t.getValue(i.id);if(n||r){if("first"===l)return n?-1:1;if("last"===l)return n?1:-1;c=n&&r?0:n?l:-l}}if(0===c&&(c=a.sortingFn(e,t,i.id)),0!==c)return u&&(c*=-1),a.invertSorting&&(c*=-1),c}return e.index-t.index}),t.forEach(e=>{var t;i.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))}),t};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},Mp(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex())),getPaginationRowModel:e=>Pp(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(t,n)=>{if(!n.rows.length)return n;const{pageSize:r,pageIndex:i}=t;let{rows:s,flatRows:o,rowsById:a}=n;const l=r*i,u=l+r;let c;s=s.slice(l,u),c=e.options.paginateExpandedRows?{rows:s,flatRows:o,rowsById:a}:function(e){const t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}({rows:s,flatRows:o,rowsById:a}),c.flatRows=[];const h=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(h)};return c.rows.forEach(h),c},Mp(e.options,"debugTable","getPaginationRowModel"))}),y=n.useMemo(()=>{const e=new Set,t=[],n=new Set,r=[],i=new Set,s=[];return _.getCoreRowModel().rows.map(({original:{number:t,title:r,type:s}})=>{e.add(t),n.add(r),i.add(s)}),e.forEach(e=>{t.push({label:e,value:e})}),n.forEach(e=>{r.push({label:e,value:e})}),i.forEach(e=>{s.push({label:e,value:e})}),{number:t,title:r,type:s}},[_]);return n.useEffect(()=>{if(i){const e=[];Object.entries(i).forEach(([t,n])=>{e.push({id:t,value:n})}),h(e)}},[i]),t(x,{sx:{display:"grid",justifyItems:"center",gap:"10px"},children:[t(x,{component:"table",sx:{border:"1px solid black",borderCollapse:"collapse","td, th":{border:"1px solid black",padding:"10px"}},children:[e("thead",{children:_.getHeaderGroups().map(n=>e("tr",{style:{border:"1px solid black"},children:n.headers.map(n=>{const r=n.id,i=n.column.columnDef.meta;return e("th",{colSpan:n.colSpan,children:n.isPlaceholder?null:t(x,{sx:{display:"grid",gap:"12px",minWidth:200,padding:"8px 0"},children:[e(x,{sx:{display:"flex",justifyItems:"center",justifyContent:"center",gap:"12px"},children:Eg(n.column.columnDef.header,n.getContext())}),i?.isFiltered?e(kg,{label:Tg[r],column:n.column,options:y[r]??[]}):null]})},n.id)})},n.id))}),e("tbody",{children:_.getRowModel().rows.map(t=>e(x,{component:"tr",onClick:()=>{o(t.original),h([])},children:t.getVisibleCells().map(t=>e(x,{component:"td",sx:{cursor:"pointer",width:t.column.getSize()},children:e(x,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:Eg(t.column.columnDef.cell,t.getContext())})},t.id))},t.id))})]}),t(x,{sx:{display:"flex",alignItems:"center",gap:"10px"},children:[t(x,{sx:{display:"flex",gap:"8px"},children:[e(pe,{variant:"outlined",size:"small",onClick:()=>_.setPageIndex(0),disabled:!_.getCanPreviousPage(),"aria-label":"move all right",children:"<<"}),e(pe,{variant:"outlined",size:"small",onClick:()=>_.previousPage(),disabled:!_.getCanPreviousPage(),"aria-label":"move all right",children:"<"}),e(pe,{variant:"outlined",size:"small",onClick:()=>_.nextPage(),disabled:!_.getCanNextPage(),"aria-label":"move all right",children:">"}),e(pe,{variant:"outlined",size:"small",onClick:()=>_.setPageIndex(_.getPageCount()-1),disabled:!_.getCanNextPage(),"aria-label":"move all right",children:">>"})]}),t(Jt,{fontWeight:700,children:[_.getState().pagination.pageIndex+1," из ",_.getPageCount()]})]})]})});const Rg=({children:t,sx:n={},...r})=>e(x,{...r,sx:{padding:"20px 15px",borderRadius:"10px",boxShadow:"0px 8px 24px 0px rgba(0,0,0,0.3)",maxHeight:"80vh",maxWidth:"90vw",overflowX:"auto",...n},children:t});function Cg({name:t,...r}){const{control:i}=Xe(),s=n.useId();return e(st,{control:i,name:t,render:({field:t})=>e(ne,{...r,...t,id:s,slots:{field:sn}})})}const Pg="oldDops";var Mg=Fd(({index:r,onDelete:i,onUpdate:s})=>{const[o,a]=n.useState(!1),{register:l,setValue:u,watch:c}=Xe(),h=c(`${Pg}.${r}`),{dop_sign_number:d}=h;return t(x,{sx:{display:"grid",gap:"12px"},children:[t(D,{expanded:o,children:[e(F,{expandIcon:e(re,{}),onClick:()=>{a(e=>!e)},"aria-controls":"panel1-content",id:"panel1-header",children:t(x,{sx:{display:"flex",alignItems:"center",gap:"12px"},children:[e(de,{notification:{title:"Удалить traffic sign",description:"Вы действительно хотите удалить данный traffic sign?"},onDelete:()=>{i(h)}}),e(zg,{number:d})]})}),e(z,{children:e(Og,{pageSize:5,filtered:{type:!1},trafficSigns:Jf,onSelect:({title:e,number:t})=>{u(`${Pg}.${r}.dop_sign_number`,t),u(`${Pg}.${r}.dop_sign_title`,e),a(!1)}})})]}),e(on,{...l(`${Pg}.${r}.status`),label:_p.status,items:mp,getKey:({value:e})=>e,getLabel:({label:e})=>e,getValue:({value:e})=>e}),e(an,{...l(`${Pg}.${r}.comment`),label:_p.comment}),e(an,{...l(`${Pg}.${r}.dop_sign_text`),label:_p.dop_sign_text}),t(x,{sx:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"12px"},children:[e(Cg,{...l(`${Pg}.${r}.placement_date`),label:_p.placement_date,format:vp}),e(Cg,{...l(`${Pg}.${r}.verification_date`),label:_p.verification_date,format:vp}),e(Cg,{...l(`${Pg}.${r}.future_maintanance_date`),label:_p.future_maintanance_date,format:vp}),e(Cg,{...l(`${Pg}.${r}.rapair_performed_date`),label:_p.rapair_performed_date,format:vp}),e(Cg,{...l(`${Pg}.${r}.warranty_expr_date`),label:_p.warranty_expr_date,format:vp})]}),e(pe,{onClick:()=>{s(h)},children:"Сохранить"})]})});const Ng="newDops";var Ig=Fd(({index:r,onDelete:i})=>{const{palette:s}=L(),[o,a]=n.useState(!1),{setValue:l,register:u,watch:c}=Xe(),h=c(`${Ng}.${r}`),{dop_sign_number:d}=h;return t(x,{sx:{display:"grid",gap:"12px"},children:[t(D,{expanded:o,children:[e(F,{expandIcon:e(re,{}),onClick:()=>{a(e=>!e)},"aria-controls":"panel1-content",id:"panel1-header",children:t(x,{sx:{display:"flex",alignItems:"center",gap:"12px"},children:[e(Jt,{variant:"h6",color:"error",sx:{fontWeight:700,color:s.primary.main},children:"NEW"}),e(de,{notification:{title:"Удалить traffic sign",description:"Вы действительно хотите удалить данный traffic sign?"},onDelete:i}),e(zg,{number:d})]})}),e(z,{children:e(Og,{pageSize:5,filtered:{type:!1},trafficSigns:Jf,onSelect:({title:e,number:t})=>{l(`${Ng}.${r}.dop_sign_number`,t),l(`${Ng}.${r}.dop_sign_title`,e),a(!1)}})})]}),e(on,{...u(`${Ng}.${r}.status`),label:_p.status,items:mp,getKey:({value:e})=>e,getLabel:({label:e})=>e,getValue:({value:e})=>e}),e(an,{...u(`${Ng}.${r}.comment`),label:_p.comment}),e(an,{...u(`${Ng}.${r}.dop_sign_text`),label:_p.dop_sign_text}),t(x,{sx:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"12px"},children:[e(Cg,{...u(`${Ng}.${r}.placement_date`),label:_p.placement_date,format:vp}),e(Cg,{...u(`${Ng}.${r}.verification_date`),label:_p.verification_date,format:vp}),e(Cg,{...u(`${Ng}.${r}.future_maintanance_date`),label:_p.future_maintanance_date,format:vp}),e(Cg,{...u(`${Ng}.${r}.rapair_performed_date`),label:_p.rapair_performed_date,format:vp}),e(Cg,{...u(`${Ng}.${r}.warranty_expr_date`),label:_p.warranty_expr_date,format:vp})]})]})});var Dg,Fg,zg=Fd(({number:n})=>{const r=Tp(n);return t(x,{sx:{display:"flex",alignItems:"center",gap:"12px"},children:[e(Sg,{number:n}),t(b,{children:[r," (",n,")"]})]})});var Lg,jg,Vg=function(){if(Fg)return Dg;function e(e){this._maxSize=e,this.clear()}Fg=1,e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(e){return this._values[e]},e.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,o=new e(512),a=new e(512),l=new e(512);function u(e){return o.get(e)||o.set(e,c(e).map(function(e){return e.replace(s,"$2")}))}function c(e){return e.match(t)||[""]}function h(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function d(e){return!h(e)&&(function(e){return e.match(r)&&!e.match(n)}(e)||function(e){return i.test(e)}(e))}return Dg={Cache:e,split:c,normalizePath:u,setter:function(e){var t=u(e);return a.get(e)||a.set(e,function(e,n){for(var r=0,i=t.length,s=e;r<i-1;){var o=t[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;s=s[t[r++]]}s[t[r]]=n})},getter:function(e,t){var n=u(e);return l.get(e)||l.set(e,function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(h(t)||n.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,i,s,o,a=e.length;for(i=0;i<a;i++)(r=e[i])&&(d(r)&&(r='"'+r+'"'),s=!(o=h(r))&&/^\d+$/.test(r),t.call(n,r,o,s,i,e))}(Array.isArray(e)?e:c(e),t,n)}},Dg}();var Ug,Bg=function(){if(jg)return Lg;jg=1;const e=/[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,t=t=>t.match(e)||[],n=e=>e[0].toUpperCase()+e.slice(1),r=(e,n)=>t(e).join(n).toLowerCase(),i=e=>t(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,"");return Lg={words:t,upperFirst:n,camelCase:i,pascalCase:e=>n(i(e)),snakeCase:e=>r(e,"_"),kebabCase:e=>r(e,"-"),sentenceCase:e=>n(r(e," ")),titleCase:e=>t(e).map(n).join(" ")}}(),Gg={exports:{}};var $g=function(){if(Ug)return Gg.exports;function e(e,t){var n=e.length,r=new Array(n),i={},s=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!a.has(e[0])||!a.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(e,t,s){if(s.has(e)){var u;try{u=", node was:"+JSON.stringify(e)}catch(e){u=""}throw new Error("Cyclic dependency"+u)}if(!a.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var c=o.get(e)||new Set;if(t=(c=Array.from(c)).length){s.add(e);do{var h=c[--t];l(h,a.get(h),s)}while(t);s.delete(e)}r[--n]=e}}}return Ug=1,Gg.exports=function(t){return e(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(t),t)},Gg.exports.array=e,Gg.exports}(),qg=Pi($g);const Hg=Object.prototype.toString,Wg=Error.prototype.toString,Zg=RegExp.prototype.toString,Kg="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",Xg=/^Symbol\((.*)\)(.*)$/;function Yg(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return Kg.call(e).replace(Xg,"Symbol($1)");const r=Hg.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+Wg.call(e)+"]":"RegExp"===r?Zg.call(e):null}function Qg(e,t){let n=Yg(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=Yg(this[e],t);return null!==r?r:n},2)}function Jg(e){return null==e?[]:[].concat(e)}let em,tm,nm,rm=/\$\{\s*(\w+)\s*\}/g;em=Symbol.toStringTag;class im{constructor(e,t,n,r){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[em]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],Jg(e).forEach(e=>{if(sm.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}tm=Symbol.hasInstance,nm=Symbol.toStringTag;class sm extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace(rm,(e,n)=>Qg(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,i){const s=new im(e,t,n,r);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[nm]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,sm)}static[tm](e){return im[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let om={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=null!=r&&r!==n?` (cast from the value \`${Qg(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${Qg(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Qg(n,!0)}\``+i}},am={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"},lm={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"},um={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},cm={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},hm={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"},dm={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Qg(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Qg(n,!0)}\``}return sm.formatError(om.notType,e)}};Object.assign(Object.create(null),{mixed:om,string:am,number:lm,date:um,object:cm,array:hm,boolean:{isValue:"${path} field must be ${value}"},tuple:dm});const fm=e=>e&&e.__isYupSchema__;class pm{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new pm(e,(e,t)=>{var n;let o=s(...e)?r:i;return null!=(n=null==o?void 0:o(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!fm(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const gm="$",mm=".";class _m{constructor(e,t={}){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,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===gm,this.isValue=this.key[0]===mm,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?gm:this.isValue?mm:"";this.path=this.key.slice(n.length),this.getter=this.path&&Vg.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}_m.prototype.__isYupRef=!0;const ym=e=>null==e;function vm(e){function t({value:t,path:n="",options:r,originalValue:i,schema:s},o,a){const{name:l,test:u,params:c,message:h,skipAbsent:d}=e;let{parent:f,context:p,abortEarly:g=s.spec.abortEarly,disableStackTrace:m=s.spec.disableStackTrace}=r;const _={value:t,parent:f,context:p};function y(e={}){const r=bm(Object.assign({value:t,originalValue:i,label:s.spec.label,path:e.path||n,spec:s.spec,disableStackTrace:e.disableStackTrace||m},c,e.params),_),o=new sm(sm.formatError(e.message||h,r),t,r.path,e.type||l,r.disableStackTrace);return o.params=r,o}const v=g?o:a;let b={path:n,parent:f,type:l,from:r.from,createError:y,resolve:e=>xm(e,_),options:r,originalValue:i,schema:s};const x=e=>{sm.isError(e)?v(e):e?a(null):v(y())},w=e=>{sm.isError(e)?v(e):o(e)};if(d&&ym(t))return x(!0);let A;try{var E;if(A=u.call(b,t,b),"function"==typeof(null==(E=A)?void 0:E.then)){if(r.sync)throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(A).then(x,w)}}catch(e){return void w(e)}x(A)}return t.OPTIONS=e,t}function bm(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=xm(e[n],t);return e}function xm(e,t){return _m.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function wm(e,t,n,r=n){let i,s,o;return t?(Vg.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a,h="tuple"===(e=e.resolve({context:r,parent:i,value:n})).type,d=u?parseInt(c,10):0;if(e.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=h?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[c],e=e.fields[c]}s=c,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Am extends Set{describe(){const e=[];for(const t of this.values())e.push(_m.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new Am(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function Em(e,t=new Map){if(fm(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Em(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Em(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Em(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Em(i,t)}return n}function Sm(e){if(null==e||!e.length)return;const t=[];let n="",r=!1,i=!1;for(let s=0;s<e.length;s++){const o=e[s];"["!==o||i?"]"!==o||i?'"'!==o?"."!==o||r||i?n+=o:n&&(t.push(n),n=""):i=!i:(n&&(/^\d+$/.test(n)?t.push(n):t.push(n.replace(/^"|"$/g,"")),n=""),r=!1):(n&&(t.push(...n.split(".").filter(Boolean)),n=""),r=!0)}return n&&t.push(...n.split(".").filter(Boolean)),t}function Tm(e,t){var n;if((null==(n=e.inner)||!n.length)&&e.errors.length)return function(e,t){const n=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:Sm(n)}))}(e,t);const r=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>Tm(e,r))}class km{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Am,this._blacklist=new Am,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(om.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=Em(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,i;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(i=e.disableStackTrace)?i:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({},t,{value:e})),r="ignore-optionality"===t.assert,i=n._cast(e,t);if(!1!==t.assert&&!n.isType(i)){if(r&&ym(i))return i;let s=Qg(e),o=Qg(i);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(o!==s?`result of cast: ${o}`:""))}return i}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((n,r)=>r.call(this,n,e,this,t),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:i,originalValue:s=e,strict:o=this.spec.strict}=t,a=e;o||(a=this._cast(a,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:i,value:a,originalValue:s,options:t,tests:l},n,e=>{if(e.length)return r(e,a);this.runTests({path:i,value:a,originalValue:s,options:t,tests:this.tests},n,r)})}runTests(e,t,n){let r=!1,{tests:i,value:s,originalValue:o,path:a,options:l}=e,u=e=>{r||(r=!0,t(e,s))},c=e=>{r||(r=!0,n(e,s))},h=i.length,d=[];if(!h)return c([]);let f={value:s,originalValue:o,path:a,options:l,schema:this};for(let e=0;e<i.length;e++){(0,i[e])(f,u,function(e){e&&(Array.isArray(e)?d.push(...e):d.push(e)),--h<=0&&c(d)})}}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:i,options:s}){const o=null!=e?e:t;if(null==o)throw TypeError("Must include `key` or `index` for nested validations");const a="number"==typeof o;let l=n[o];const u=Object.assign({},s,{strict:!0,parent:n,value:l,originalValue:i[o],key:void 0,[a?"index":"key"]:o,path:a||o.includes(".")?`${r||""}[${a?o:`"${o}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(u)._validate(l,u,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),i=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise((n,s)=>r._validate(e,t,(e,t)=>{sm.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new sm(e,t,void 0,void 0,i)):n(t)}))}validateSync(e,t){var n;let r,i=this.resolve(Object.assign({},t,{value:e})),s=null!=(n=null==t?void 0:t.disableStackTrace)?n:i.spec.disableStackTrace;return i._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw sm.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new sm(t,e,void 0,void 0,s);r=n}),r}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(sm.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(sm.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):Em(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=vm({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=vm({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=om.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=om.notNull){return this.nullability(!1,e)}required(e=om.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=om.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=vm(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(i)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=Jg(e).map(e=>new _m(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new pm(r,t):pm.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=vm({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=om.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=vm({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=om.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=vm({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:i,nullable:s}=t.spec,o={meta:r,label:n,optional:i,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?bm(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})};return o}get"~standard"(){const e=this,t={version:1,vendor:"yup",async validate(t){try{return{value:await e.validate(t,{abortEarly:!1})}}catch(e){if(e instanceof sm)return{issues:Tm(e)};throw e}}};return t}}km.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])km.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=wm(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])km.prototype[e]=km.prototype.oneOf;for(const e of["not","nope"])km.prototype[e]=km.prototype.notOneOf;const Om=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Rm(e){var t,n;const r=Om.exec(e);return r?{year:Cm(r[1]),month:Cm(r[2],1)-1,day:Cm(r[3],1),hour:Cm(r[4]),minute:Cm(r[5]),second:Cm(r[6]),millisecond:r[7]?Cm(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Cm(r[10]),minuteOffset:Cm(r[11])}:null}function Cm(e,t=0){return Number(e)||t}let Pm=/^[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])?)*$/,Mm=/^((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,Nm=/^(?:[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,Im=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),Dm=e=>ym(e)||e===e.trim(),Fm={}.toString();function zm(){return new Lm}class Lm extends km{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce||this.isType(e))return e;if(Array.isArray(e))return e;const n=null!=e&&e.toString?e.toString():e;return n===Fm?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||om.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=am.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=am.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=am.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,i=!1;return t&&("object"==typeof t?({excludeEmptyString:i=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||am.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&i||-1!==t.search(e)})}email(e=am.email){return this.matches(Pm,{name:"email",message:e,excludeEmptyString:!0})}url(e=am.url){return this.matches(Mm,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=am.uuid){return this.matches(Nm,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(Im,{name:"datetime",message:r||am.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||am.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=Rm(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||am.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=Rm(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=am.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:Dm})}lowercase(e=am.lowercase){return this.transform(e=>ym(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>ym(e)||e===e.toLowerCase()})}uppercase(e=am.uppercase){return this.transform(e=>ym(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>ym(e)||e===e.toUpperCase()})}}zm.prototype=Lm.prototype;function jm(){return new Vm}class Vm extends km{constructor(){super({type:"number",check:e=>(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e))}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce)return e;let n=e;if("string"==typeof n){if(n=n.replace(/\s/g,""),""===n)return NaN;n=+n}return this.isType(n)||null===n?n:parseFloat(n)})})}min(e,t=lm.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t>=this.resolve(e)}})}max(e,t=lm.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t<=this.resolve(e)}})}lessThan(e,t=lm.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(t){return t<this.resolve(e)}})}moreThan(e,t=lm.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=lm.positive){return this.moreThan(0,e)}negative(e=lm.negative){return this.lessThan(0,e)}integer(e=lm.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>ym(e)?e:0|e)}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>ym(t)?t:Math[e](t))}}jm.prototype=Vm.prototype;let Um=new Date("");function Bm(){return new Gm}class Gm extends km{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation(()=>{this.transform((e,t)=>!this.spec.coerce||this.isType(e)||null===e?e:(e=function(e){const t=Rm(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?Gm.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(_m.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=um.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=um.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function $m(e,t){let n=1/0;return e.some((e,r)=>{var i;if(null!=(i=t.path)&&i.includes(e))return n=r,!0}),n}function qm(e){return(t,n)=>$m(e,t)-$m(e,n)}Gm.INVALID_DATE=Um,Bm.prototype=Gm.prototype,Bm.INVALID_DATE=Um;const Hm=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return n.isType(r)?r:e};function Wm(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Wm(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Wm(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Wm)}):"optional"in e?e.optional():e}let Zm=e=>"[object Object]"===Object.prototype.toString.call(e);function Km(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const Xm=qm([]);function Ym(e){return new Qm(e)}class Qm extends km{constructor(e){super({type:"object",check:e=>Zm(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=Xm,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let i=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(r).filter(e=>!this._nodes.includes(e))),a={},l=Object.assign({},t,{parent:a,__validating:t.__validating||!1}),u=!1;for(const e of o){let n=i[e],o=e in r,c=r[e];if(n){let i;l.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:c,context:t.context,parent:a});let s=n instanceof km?n.spec:void 0,o=null==s?void 0:s.strict;if(null!=s&&s.strip){u=u||e in r;continue}i=t.__validating&&o?c:n.cast(c,l),void 0!==i&&(a[e]=i)}else o&&!s&&(a[e]=c);o===e in a&&a[e]===c||(u=!0)}return u?a:r}_validate(e,t={},n,r){let{from:i=[],originalValue:s=e,recursive:o=this.spec.recursive}=t;t.from=[{schema:this,value:s},...i],t.__validating=!0,t.originalValue=s,super._validate(e,t,n,(e,i)=>{if(!o||!Zm(i))return void r(e,i);s=s||i;let a=[];for(let e of this._nodes){let n=this.fields[e];n&&!_m.isRef(n)&&a.push(n.asNestedTest({options:t,key:e,parent:i,parentPath:t.path,originalParent:s}))}this.runTests({tests:a,value:i,originalValue:s,options:t},n,t=>{r(t.sort(this._sortErrors).concat(e),i)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var r;const i=this.fields[n];let s=e;null!=(r=s)&&r.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),t[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=Vg.split(e)[0];r.add(s),i.has(`${t}-${s}`)||n.push([t,s])}for(const t of Object.keys(e)){let n=e[t];r.add(t),_m.isRef(n)&&n.isSibling?s(n.path,t):fm(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return qg.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=qm(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Wm(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=Vg.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return((e,t)=>{const n=[...Vg.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),i=Vg.getter(Vg.join(n),!0)(e);return!(!i||!(r in i))})(i,e)&&(s=Object.assign({},i),n||delete s[e],s[t]=r(i)),s})}json(){return this.transform(Hm)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||cm.exact,test(e){if(null==e)return!0;const t=Km(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=cm.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=Km(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=cm.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n})}camelCase(){return this.transformKeys(Bg.camelCase)}snakeCase(){return this.transformKeys(Bg.snakeCase)}constantCase(){return this.transformKeys(e=>Bg.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[i,s]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[i]})),n.fields[i]=s.describe(t)}return n}}function Jm(e){return new e_(e)}Ym.prototype=Qm.prototype;class e_ extends km{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const i=n.map((e,i)=>{const s=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${i}]`,parent:n,originalValue:e,value:e,index:i}));return s!==e&&(r=!0),s});return r?i:n}_validate(e,t={},n,r){var i;let s=this.innerType,o=null!=(i=t.recursive)?i:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,n,(i,a)=>{var l;if(!o||!s||!this._typeCheck(a))return void r(i,a);let u=new Array(a.length);for(let n=0;n<a.length;n++){var c;u[n]=s.asNestedTest({options:t,index:n,parent:a,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:a,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},n,e=>r(e.concat(i),a))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(Hm)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!fm(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Qg(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=hm.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||hm.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||hm.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var r;let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=t.innerType.describe(i)}return n}}Jm.prototype=e_.prototype;const t_={traffic_sign_id:zm().required(),dop_id:zm().required()},n_={dop_sign_number:zm().required(),dop_sign_title:zm().required(),status:zm().required(),dop_sign_text:zm().nullable(),comment:zm().nullable()},r_={future_maintanance_date:Bm().required(),placement_date:Bm().required(),rapair_performed_date:Bm().required(),verification_date:Bm().required(),warranty_expr_date:Bm().required()},i_=Ym().shape({...t_,...n_,...r_}),s_=Ym().shape({...n_,...r_}),o_={traffic_sign_type:zm().required(),traffic_sign_number:zm().required(),traffic_sign_title:zm().required(),status:zm().required(),comment:zm().nullable(),traffic_sign_value:zm().nullable(),direction:jm().nullable()},a_={future_maintanance_date:Bm().required(),placement_date:Bm().required(),rapair_performed_date:Bm().required(),verification_date:Bm().required(),warranty_expr_date:Bm().required()},l_={traffic_sign_id:zm().required(),dit_id:jm().required(),tsodd_id:jm().required(),pillar_id:zm().nullable()},u_=Ym().shape({...o_,...a_,...l_,oldDops:Jm().of(i_).required(),newDops:Jm().of(s_).required()}),c_=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ce(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},h_=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?c_(r.ref,n,e):r&&r.refs&&r.refs.forEach(t=>c_(t,n,e))}},d_=(e,t)=>{t.shouldUseNativeValidation&&h_(e,t);const n={};for(const r in e){const i=Ce(t.fields,r),s=Object.assign(e[r]||{},{ref:i&&i.ref});if(f_(t.names||Object.keys(e),r)){const e=Object.assign({},Ce(n,r));Ne(e,"root",s),Ne(n,r,e)}else Ne(n,r,s)}return n},f_=(e,t)=>{const n=p_(t);return e.some(e=>p_(e).match(`^${n}\\.\\d+`))};function p_(e){return e.replace(/\]|\[/g,"")}function g_(e,t,n){return void 0===n&&(n={}),function(r,i,s){try{return Promise.resolve(function(o,a){try{var l=(null!=t&&t.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e["sync"===n.mode?"validateSync":"validate"](r,Object.assign({abortEarly:!1},t,{context:i}))).then(function(e){return s.shouldUseNativeValidation&&h_({},s),{values:n.raw?Object.assign({},r):e,errors:{}}}))}catch(e){return a(e)}return l&&l.then?l.then(void 0,a):l}(0,function(e){if(!e.inner)throw e;return{values:{},errors:d_((t=e,n=!s.shouldUseNativeValidation&&"all"===s.criteriaMode,(t.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var r=e[t.path].types,i=r&&r[t.type];e[t.path]=ot(t.path,n,e,t.type,i?[].concat(i,t.message):t.message)}return e},{})),s)};var t,n}))}catch(e){return Promise.reject(e)}}}var m_=Fd(({trafficSign:r,onSubmit:i,onDelete:s,onDeleteDop:o,onUpdateDop:a})=>{const[l,u]=n.useState("1"),[c,h]=n.useState(!1),d=Qt({resolver:g_(u_),defaultValues:{...r,...Ap(r),oldDops:r.dops.map(e=>({...e,traffic_sign_id:r.traffic_sign_number,...Ap(e)})),newDops:[]}}),{control:f,register:p,setValue:g,watch:m,formState:{errors:_}}=d,y=Yt({control:f,name:"oldDops"}),v=Yt({control:f,name:"newDops"}),b=m("traffic_sign_number");return n.useEffect(()=>{Object.keys(_).length>0&&fu.warn({message:"Ошибки валидации формы",context:"TrafficSignUpdateForm",meta:_})},[_]),t(nn,{form:d,onSubmit:i,children:[t(ie,{value:l,children:[e(x,{sx:{borderBottom:1,borderColor:"divider"},children:t(se,{onChange:(e,t)=>{u(t)},"aria-label":"lab API tabs example",children:[e(j,{label:"Traffic Sign",value:"1",sx:{textTransform:"none"}}),e(j,{label:"Traffic Sign Dop",value:"2",sx:{textTransform:"none"}})]})}),e(oe,{value:"1",children:t(x,{sx:{display:"grid",gap:"12px"},children:[t(D,{expanded:c,children:[e(F,{expandIcon:e(re,{}),onClick:()=>{h(e=>!e)},"aria-controls":"panel1-content",id:"panel1-header",children:t(x,{sx:{display:"flex",alignItems:"center",gap:"12px"},children:[e(de,{notification:{title:"Удалить traffic sign",description:"Вы действительно хотите удалить данный traffic sign?"},onDelete:()=>{s(r)}}),e(zg,{number:b})]})}),e(z,{children:e(Og,{trafficSigns:Qf,pageSize:5,onSelect:({title:e,number:t,type:n})=>{g("traffic_sign_number",t),g("traffic_sign_title",e),g("traffic_sign_type",n),h(!1)}})})]}),e(on,{...p("status"),label:_p.status,items:mp,getKey:({value:e})=>e,getLabel:({label:e})=>e,getValue:({value:e})=>e}),e(an,{...p("traffic_sign_value"),label:_p.traffic_sign_value}),e(an,{...p("comment"),label:_p.comment}),e(an,{...p("direction"),label:_p.direction,type:"number"}),t(x,{sx:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"12px"},children:[e(Cg,{...p("placement_date"),label:_p.placement_date,format:vp}),e(Cg,{...p("verification_date"),label:_p.verification_date,format:vp}),e(Cg,{...p("future_maintanance_date"),label:_p.future_maintanance_date,format:vp}),e(Cg,{...p("rapair_performed_date"),label:_p.rapair_performed_date,format:vp}),e(Cg,{...p("warranty_expr_date"),label:_p.warranty_expr_date,format:vp})]})]})}),e(oe,{value:"2",children:t(x,{sx:{display:"grid",gap:"24px"},children:[e(x,{children:e(pe,{onClick:()=>{v.append({...hp})},children:"Добавить новый traffic sign"})}),y.fields.map(({id:t},n)=>e(Rg,{children:e(Mg,{index:n,onDelete:o,onUpdate:a})},t)),v.fields.map(({id:t},n)=>e(Rg,{children:e(Ig,{onDelete:()=>{v.remove(n)},index:n})},t))]})})]}),e(pe,{type:"submit",children:"Сохранить"})]})});const __=Ym().shape({...o_,...a_,newDops:Jm().of(s_).required()});var y_=Fd(({onSubmit:r})=>{const[i,s]=n.useState("1"),[o,a]=n.useState(!1),l=Qt({resolver:g_(__),defaultValues:{...up}}),{control:u,register:c,setValue:h,watch:d,formState:{errors:f}}=l,p=Yt({control:u,name:"newDops"}),g=d("traffic_sign_number");return n.useEffect(()=>{Object.keys(f).length>0&&fu.warn({message:"Ошибки валидации формы",context:"TrafficSignCreateForm",meta:f})},[f]),t(nn,{form:l,onSubmit:r,children:[t(ie,{value:i,children:[e(x,{sx:{borderBottom:1,borderColor:"divider"},children:t(se,{onChange:(e,t)=>{s(t)},"aria-label":"lab API tabs example",children:[e(j,{label:"TrafficSign",value:"1",sx:{textTransform:"none"}}),e(j,{label:"TrafficSignDop",value:"2",sx:{textTransform:"none"}})]})}),e(oe,{value:"1",children:t(x,{sx:{display:"grid",gap:"12px"},children:[t(D,{expanded:o,children:[e(F,{expandIcon:e(re,{}),onClick:()=>{a(e=>!e)},"aria-controls":"panel1-content",id:"panel1-header",children:e(zg,{number:g})}),e(z,{children:e(Og,{trafficSigns:Qf,pageSize:5,onSelect:({title:e,number:t,type:n})=>{h("traffic_sign_number",t),h("traffic_sign_title",e),h("traffic_sign_type",n),a(!1)}})})]}),e(on,{...c("status"),label:_p.status,items:mp,getKey:({value:e})=>e,getLabel:({label:e})=>e,getValue:({value:e})=>e}),e(an,{...c("traffic_sign_value"),label:_p.traffic_sign_value}),e(an,{...c("comment"),label:_p.comment}),e(an,{...c("direction"),label:_p.direction,type:"number"}),t(x,{sx:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"12px"},children:[e(Cg,{...c("placement_date"),label:_p.placement_date,format:vp}),e(Cg,{...c("verification_date"),label:_p.verification_date,format:vp}),e(Cg,{...c("future_maintanance_date"),label:_p.future_maintanance_date,format:vp}),e(Cg,{...c("rapair_performed_date"),label:_p.rapair_performed_date,format:vp}),e(Cg,{...c("warranty_expr_date"),label:_p.warranty_expr_date,format:vp})]})]})}),e(oe,{value:"2",children:t(x,{sx:{display:"grid",gap:"24px"},children:[e(x,{children:e(pe,{onClick:()=>{p.append({...hp})},children:"Добавить новый traffic sign"})}),p.fields.map(({id:t},n)=>e(Rg,{children:e(Ig,{onDelete:()=>{p.remove(n)},index:n})},t))]})})]}),e(pe,{type:"submit",children:"Сохранить"})]})});const v_=e=>{const t=[],n={source:e,layer:pf.TRAFFIC_SIGNAL},r={},i="traffic_signal",s=`https://dalganmap.ru/api-image/images/msk/${i}/${i}_20.svg`;r[i]={url:s,filtering:"mipmap",sprites:{base:[0,0,20,20]}};const o={id:lh(),data:n,draw:{points:{collide:!1,texture:i,size:20,sprite:"base",placement:"midpoint"}},textures:r,sublayers:{}};return t.push(o),t},b_=e=>{const t=[],n={source:e,layer:pf.CAMERA},r={},i="camera";r[i]={url:`https://dalganmap.ru/api-image/images/msk/${i}/${i}_20.png`,filtering:"mipmap",sprites:{base:[0,0,20,20]}};const s={id:lh(),data:n,draw:{points:{collide:!1,texture:i,size:20,sprite:"base",placement:"midpoint"}},textures:r,sublayers:{}};return t.push(s),t},x_=e=>{const t=[],n={source:e,layer:pf.PILLAR},r={},i="pillar",s=`https://dalganmap.ru/api-image/images/msk/${i}/${i}_20.png`;r[i]={url:s,filtering:"mipmap",sprites:{base:[0,0,20,20]}};const o={id:lh(),data:n,draw:{points:{collide:!1,texture:i,size:20,sprite:"base",placement:"midpoint"}},textures:r,sublayers:{}};return t.push(o),t},w_=({id:e,data:{source:t,layer:n}})=>`${e}-${t}-${n}`,A_=({layer:e,order:t,eventHandlers:n})=>{const r=structuredClone(e),{draw:i,sublayers:s}=r,o=Boolean(n?.[e.data.layer]);if(i){const{points:e,lines:n,polygons:s,text:a,styles:l}=i;e&&(i.points={...structuredClone(e),order:t,interactive:o}),n&&(i.lines={...structuredClone(n),order:t,interactive:o}),s&&(i.polygons={...structuredClone(s),order:t,interactive:o}),a&&(i.text={...structuredClone(a),order:t,interactive:o}),l&&(i.styles=Object.entries(l).reduce((e,[n,r])=>({...e,[n]:{...structuredClone(r),order:t}}),{})),r.draw=structuredClone(i)}return s&&(Object.entries(s).forEach(([e,n])=>{if(n){const{draw:r}=n;if(r){const{points:e,lines:i,polygons:s,text:a}=r;a&&(r.text={...structuredClone(a),order:t,interactive:o}),e&&(r.points={...structuredClone(e),order:t,interactive:o}),i&&(r.lines={...structuredClone(i),order:t,interactive:o}),s&&(r.polygons={...structuredClone(s),order:t,interactive:o}),n.draw=structuredClone(r)}s[e]=structuredClone(n)}}),r.sublayers=structuredClone(s)),r},E_=e=>{const t=Gf(e),n=$f(),r=Xf(),i=Ef(e),s=Bf(e),o=Vf(e),a=zf(e),l=jf(e),u=[];if(e===gf.MSK)u.push(...t,...i,...s,...o,...a,...l);else u.push(...t,...i,...s,...n,...r,...o,...a,...l);return u},S_=e=>{const t=Kf(e),n=Ff(e),r=Lf(e),i=Nf(e),s=Df(e),o=[...r,...n,...t];if(e===gf.MSK);else o.push(...i,...s);return o},T_=e=>{const t=Pf(e),n=Mf(e);return[...t,...Sf(e),...n,...bp(e),...v_(e),...b_(e),...x_(e)]},k_=e=>{const t=[],n=Uf(e),r=E_(e),i=S_(e),s=T_(e),o=vf(e),a=bf(e),l=xf(e),u=wf(e);if(e===gf.MSK)t.push(...r,...i,...o,...a,...l,...u,...n,...s);else t.push(...r,...i,...n,...s);return t},O_=({eventHandlers:e})=>{const{instance:{isValidApiKey:t}}=hu,[r,i]=n.useState(null),s=n.useMemo(()=>{if(r){const{scene:e}=r;return e}return null},[r]),[o,a]=n.useState(null),l=n.useCallback(()=>{Promise.resolve().then(function(){return mb}).then(()=>{if(window.Tangram){const t=window.Tangram.leafletLayer({scene:Af}),{scene:n}=t;n.subscribe({load:({config:e})=>{a(e)}}),t.on("load",()=>{t.setSelectionEvents({click:({feature:t,leaflet_event:n})=>{if(t){const{source_layer:r,properties:i}=t;e?.[r]?.click?.({leaflet_event:n,properties:i})}},hover:({feature:t,leaflet_event:n})=>{if(t){const{source_layer:r,properties:i}=t;e?.[r]?.hover?.({leaflet_event:n,properties:i})}}})}),i(t)}})},[e]),u=n.useCallback(e=>{if(!s)return void fu.warn({message:"Scene не инициализирована"});if(!o)return void fu.warn({message:"Config не инициализирована"});const{name:t}=e;return o.sources[t]=structuredClone(e),s.updateConfig({rebuild:!0}),v()},[s,o]),c=n.useCallback(e=>{if(o)return structuredClone(o.sources[e]);fu.warn({message:"Config не инициализирована"})},[o]),h=n.useCallback((e,t)=>{if(s){if(o)return o.sources[e].url=t,s.updateConfig({rebuild:!0}),v();fu.warn({message:"Config не инициализирована"})}else fu.warn({message:"Scene не инициализирована"})},[o,s]),d=n.useCallback(t=>{if(!s)return void fu.warn({message:"Scene не инициализирован"});if(!o)return void fu.warn({message:"Config не инициализирован"});const n=_().length+1,r=A_({layer:t,order:n,eventHandlers:e}),i=w_(r),{sublayers:a,draw:l,textures:u}=r;if(l){const{styles:e}=l;e&&(r.draw={...structuredClone(r.draw),...structuredClone(e)})}return o.layers[i]={...structuredClone(r),...structuredClone(a)},o.textures={...structuredClone(o.textures),...structuredClone(u)},s.updateConfig({rebuild:!0}),_()},[o,s,e]),f=n.useCallback(e=>{if(!s)return void fu.warn({message:"Scene не инициализирован"});if(!o)return void fu.warn({message:"Config не инициализирован"});const t=w_(e);return o.layers[t]&&delete o.layers[t],s.updateConfig({rebuild:!0}),_()},[o,s]),p=n.useCallback(({name:e,style:t})=>{s?o?(o.styles[e]=structuredClone(t),s.updateConfig({rebuild:!0})):fu.warn({message:"Config не инициализирована"}):fu.warn({message:"Scene не инициализирована"})},[o,s]),g=n.useCallback(e=>{if(!o)return void fu.warn({message:"Config не инициализирована"});const t=w_(e),{visible:n}=o.layers[t];return n},[o]),m=n.useCallback(({layer:e,visible:t})=>{if(!s)return void fu.warn({message:"Config не инициализирована"});if(!o)return void fu.warn({message:"Config не инициализирована"});const n=w_(e);return o.layers[n].visible=t,s.updateConfig(),g(e)},[o,s]),_=n.useCallback(()=>{if(!o)return[];const{layers:e}=o;return Object.keys(e)},[o]),y=n.useCallback(()=>{if(!o)return[];const{layers:e}=o;Object.values(e).forEach(f)},[o]),v=n.useCallback(()=>{if(!o)return[];const{sources:e}=o;return Object.keys(e)},[o]);return n.useEffect(()=>(t&&l(),()=>{i(null),a(null)}),[t]),n.useEffect(()=>{p({name:"zebra_crossing",style:{base:"polygons",lighting:!1,shaders:{attributes:{a_angle:{type:"float",default:0}},uniforms:{u_stripe_width:1},blocks:{filter:"\n vec3 pos = worldPosition().xyz;\n\n float ang = radians(a_angle);\n\n vec2 dir = vec2(sin(ang), cos(ang));\n\n float positionAlongLine = dot(pos.xy, dir);\n\n float stripe = step(1.0, mod(positionAlongLine / u_stripe_width, 2.0));\n\n color.rgb = mix(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.8, 0.0), stripe);\n \n color.a = 1.0;\n "}}}}),Object.values(gf).forEach(e=>{u({tile_size:256,name:e,url:yf[e],type:"MVT"})})},[p,u]),{layer:r,scene:s,config:o,addSource:u,getSource:c,updateSource:h,addLayer:d,removeLayer:f,addStyle:p,getLayerVisibility:g,toggleLayerVisibility:m,getSources:v,getLayers:_,removeLayers:y}},R_=({source:e})=>{const{layer:t,addLayer:r}=O_({}),i=Mi();return n.useEffect(()=>{t&&i.addLayer(t)},[t]),n.useEffect(()=>{k_(e).map(r)},[r,e]),null},C_=({color:t="inherit"})=>e(V,{color:t}),P_=c(null),M_={didCatch:!1,error:null};class N_ extends y{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=M_}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(null!==e){for(var t,n,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];null===(t=(n=this.props).onReset)||void 0===t||t.call(n,{args:i,reason:"imperative-api"}),this.setState(M_)}}componentDidCatch(e,t){var n,r;null===(n=(r=this.props).onError)||void 0===n||n.call(r,e,t)}componentDidUpdate(e,t){const{didCatch:n}=this.state,{resetKeys:r}=this.props;var i,s;n&&null!==t.error&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}(e.resetKeys,r)&&(null===(i=(s=this.props).onReset)||void 0===i||i.call(s,{next:r,prev:e.resetKeys,reason:"keys"}),this.setState(M_))}render(){const{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:s}=this.state;let o=e;if(i){const e={error:s,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)o=t(e);else if(n)o=m(n,e);else{if(void 0===r)throw s;o=r}}return m(P_.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},o)}}const I_=({error:n,resetErrorBoundary:r})=>t(x,{role:"alert",sx:{padding:"20px",background:"#fee"},children:[e(b,{variant:"h2",children:"Ошибка приложения"}),e(b,{variant:"body1",color:"error",children:n.message}),e(pe,{onClick:r,children:"Попробовать снова"})]}),D_=({children:t,FallbackComponent:n=I_})=>e(N_,{FallbackComponent:n,children:t}),F_={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",bgcolor:"background.paper",border:"2px solid #000",boxShadow:24,p:4,maxHeight:"90vh",overflowX:"auto",overflowY:"auto"};var z_=Fd(({name:t,children:r,onClose:i,onOpen:s})=>{const o=n.useId(),{modalStore:a}=lu(),l=a.getIsVisible(t);return n.useEffect(()=>{l&&s?.({name:t})},[l]),e(le,{open:l,onClose:()=>{a.closeModal(t),i?.({name:t})},"aria-labelledby":`modal-${o}-title`,"aria-describedby":`modal-${o}-description`,children:e(ae,{sx:({breakpoints:e})=>({...F_,[e.up("sm")]:{minWidth:400},[e.down("sm")]:{minWidth:"80vw"}}),children:r})})}),L_={createDocument:function(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}},j_=Uint8Array,V_=Uint16Array,U_=Int32Array,B_=new j_([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),G_=new j_([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),$_=new j_([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),q_=function(e,t){for(var n=new V_(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new U_(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return{b:n,r:i}},H_=q_(B_,2),W_=H_.b,Z_=H_.r;W_[28]=258,Z_[258]=28;for(var K_=q_(G_,0).b,X_=new V_(32768),Y_=0;Y_<32768;++Y_){var Q_=(43690&Y_)>>1|(21845&Y_)<<1;Q_=(61680&(Q_=(52428&Q_)>>2|(13107&Q_)<<2))>>4|(3855&Q_)<<4,X_[Y_]=((65280&Q_)>>8|(255&Q_)<<8)>>1}var J_=function(e,t,n){for(var r=e.length,i=0,s=new V_(t);i<r;++i)e[i]&&++s[e[i]-1];var o,a=new V_(t);for(i=1;i<t;++i)a[i]=a[i-1]+s[i-1]<<1;if(n){o=new V_(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],h=a[e[i]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)o[X_[h]>>l]=u}else for(o=new V_(r),i=0;i<r;++i)e[i]&&(o[i]=X_[a[e[i]-1]++]>>15-e[i]);return o},ey=new j_(288);for(Y_=0;Y_<144;++Y_)ey[Y_]=8;for(Y_=144;Y_<256;++Y_)ey[Y_]=9;for(Y_=256;Y_<280;++Y_)ey[Y_]=7;for(Y_=280;Y_<288;++Y_)ey[Y_]=8;var ty=new j_(32);for(Y_=0;Y_<32;++Y_)ty[Y_]=5;var ny=J_(ey,9,1),ry=J_(ty,5,1),iy=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},sy=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},oy=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},ay=function(e){return(e+7)/8|0},ly=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new j_(e.subarray(t,n))},uy=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],cy=function(e,t,n){var r=new Error(t||uy[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,cy),!n)throw r;return r},hy=new j_(0),dy=function(e,t){return e[t]|e[t+1]<<8},fy=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},py=function(e,t){return fy(e,t)+4294967296*fy(e,t+4)};function gy(e,t){return function(e,t,n,r){var i=e.length,s=r?r.length:0;if(!i||t.f&&!t.l)return n||new j_(0);var o=!n,a=o||2!=t.i,l=t.i;o&&(n=new j_(3*i));var u=function(e){var t=n.length;if(e>t){var r=new j_(Math.max(2*t,e));r.set(n),n=r}},c=t.f||0,h=t.p||0,d=t.b||0,f=t.l,p=t.d,g=t.m,m=t.n,_=8*i;do{if(!f){c=sy(e,h,1);var y=sy(e,h+1,3);if(h+=3,!y){var v=e[(C=ay(h)+4)-4]|e[C-3]<<8,b=C+v;if(b>i){l&&cy(0);break}a&&u(d+v),n.set(e.subarray(C,b),d),t.b=d+=v,t.p=h=8*b,t.f=c;continue}if(1==y)f=ny,p=ry,g=9,m=5;else if(2==y){var x=sy(e,h,31)+257,w=sy(e,h+10,15)+4,A=x+sy(e,h+5,31)+1;h+=14;for(var E=new j_(A),S=new j_(19),T=0;T<w;++T)S[$_[T]]=sy(e,h+3*T,7);h+=3*w;var k=iy(S),O=(1<<k)-1,R=J_(S,k,1);for(T=0;T<A;){var C,P=R[sy(e,h,O)];if(h+=15&P,(C=P>>4)<16)E[T++]=C;else{var M=0,N=0;for(16==C?(N=3+sy(e,h,3),h+=2,M=E[T-1]):17==C?(N=3+sy(e,h,7),h+=3):18==C&&(N=11+sy(e,h,127),h+=7);N--;)E[T++]=M}}var I=E.subarray(0,x),D=E.subarray(x);g=iy(I),m=iy(D),f=J_(I,g,1),p=J_(D,m,1)}else cy(1);if(h>_){l&&cy(0);break}}a&&u(d+131072);for(var F=(1<<g)-1,z=(1<<m)-1,L=h;;L=h){var j=(M=f[oy(e,h)&F])>>4;if((h+=15&M)>_){l&&cy(0);break}if(M||cy(2),j<256)n[d++]=j;else{if(256==j){L=h,f=null;break}var V=j-254;if(j>264){var U=B_[T=j-257];V=sy(e,h,(1<<U)-1)+W_[T],h+=U}var B=p[oy(e,h)&z],G=B>>4;if(B||cy(3),h+=15&B,D=K_[G],G>3&&(U=G_[G],D+=oy(e,h)&(1<<U)-1,h+=U),h>_){l&&cy(0);break}a&&u(d+131072);var $=d+V;if(d<D){var q=s-D,H=Math.min(D,$);for(q+d<0&&cy(3);d<H;++d)n[d]=r[q+d]}for(;d<$;++d)n[d]=n[d-D]}}t.l=f,t.p=L,t.b=d,t.f=c,f&&(c=1,t.m=g,t.d=p,t.n=m)}while(!c);return d!=n.length&&o?ly(n,0,d):n.subarray(0,d)}(e,{i:2},t&&t.out,t&&t.dictionary)}var my="undefined"!=typeof TextDecoder&&new TextDecoder;try{my.decode(hy,{stream:!0})}catch(ib){}function _y(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(my)return my.decode(e);var i=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:ly(e,n-1)};i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}(e),s=i.s;return(n=i.r).length&&cy(8),s}var yy=function(e,t){return t+30+dy(e,t+26)+dy(e,t+28)},vy=function(e,t,n){var r=dy(e,t+28),i=_y(e.subarray(t+46,t+46+r),!(2048&dy(e,t+8))),s=t+46+r,o=fy(e,t+20),a=n&&4294967295==o?by(e,s):[o,fy(e,t+24),fy(e,t+42)],l=a[0],u=a[1],c=a[2];return[dy(e,t+10),l,u,i,s+dy(e,t+30)+dy(e,t+32),c]},by=function(e,t){for(;1!=dy(e,t);t+=4+dy(e,t+2));return[py(e,t+12),py(e,t+4),py(e,t+20)]};function xy(e){var t=function(e){for(var t={},n=e.length-22;101010256!=fy(e,n);--n)(!n||e.length-n>65558)&&cy(13);var r=dy(e,n+8);if(!r)return{};var i=fy(e,n+16),s=4294967295==i||65535==r;if(s){var o=fy(e,n-12);(s=101075792==fy(e,o))&&(r=fy(e,o+32),i=fy(e,o+48))}for(var a=0;a<r;++a){var l=vy(e,i,s),u=l[0],c=l[1],h=l[2],d=l[3],f=l[4],p=l[5],g=yy(e,p);i=f,u?8==u?t[d]=gy(e.subarray(g,g+c),{out:new j_(h)}):cy(14,"unknown compression type "+u):t[d]=ly(e,g,g+c)}return t}(new Uint8Array(e));return Promise.resolve(function(e){for(var t=[],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];t[i]=_y(e[i])}return t}(t))}function wy(e,t){for(var n=0;n<e.childNodes.length;){var r=e.childNodes[n];if(1===r.nodeType&&Ty(r)===t)return r;n++}}function Ay(e,t){for(var n=[],r=0;r<e.childNodes.length;){var i=e.childNodes[r];1===i.nodeType&&Ty(i)===t&&n.push(i),r++}return n}function Ey(e,t,n){for(var r=0;r<e.childNodes.length;){var i=e.childNodes[r];t?1===i.nodeType&&Ty(i)===t&&n(i,r):n(i,r),r++}}var Sy=/.+\:/;function Ty(e){return e.tagName.replace(Sy,"")}function ky(e){if(1!==e.nodeType)return e.textContent;for(var t="<"+Ty(e),n=0;n<e.attributes.length;)t+=" "+e.attributes[n].name+'="'+e.attributes[n].value+'"',n++;t+=">";for(var r=0;r<e.childNodes.length;)t+=ky(e.childNodes[r]),r++;return t+="</"+Ty(e)+">"}function Oy(e){var t,n,r=e.documentElement;return t=function(e){var t=wy(e,"t");if(t)return t.textContent;var n="";return Ey(e,"r",function(e){n+=wy(e,"t").textContent}),n},n=[],Ey(r,"si",function(e,r){n.push(t(e,r))}),n}function Ry(e,t){var n=t.createDocument(e),r={},i=function(e){return wy(e.documentElement,"workbookPr")}(n);i&&"1"===i.getAttribute("date1904")&&(r.epoch1904=!0),r.sheets=[];return function(e){return Ay(wy(e.documentElement,"sheets"),"sheet")}(n).forEach(function(e){e.getAttribute("name")&&r.sheets.push({id:e.getAttribute("sheetId"),name:e.getAttribute("name"),relationId:e.getAttribute("r:id")})}),r}function Cy(e,t){var n=t.createDocument(e),r={sheets:{},sharedStrings:void 0,styles:void 0};return function(e){return Ay(e.documentElement,"Relationship")}(n).forEach(function(e){var t=e.getAttribute("Target");switch(e.getAttribute("Type")){case"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles":r.styles=Py(t);break;case"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings":r.sharedStrings=Py(t);break;case"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet":r.sheets[e.getAttribute("Id")]=Py(t)}}),r}function Py(e){return"/"===e[0]?e.slice(1):"xl/"+e}function My(e){"@babel/helpers - typeof";return My="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},My(e)}function Ny(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Iy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ny(Object(n),!0).forEach(function(t){Dy(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ny(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Dy(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==My(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==My(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===My(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fy(e,t){if(!e)return{};var n=t.createDocument(e),r=function(e){var t=wy(e.documentElement,"cellStyleXfs");return t?Ay(t,"xf"):[]}(n).map(Ly),i=function(e){var t=wy(e.documentElement,"numFmts");return t?Ay(t,"numFmt"):[]}(n).map(zy).reduce(function(e,t){return e[t.id]=t,e},[]);return function(e){var t=wy(e.documentElement,"cellXfs");return t?Ay(t,"xf"):[]}(n).map(function(e){return e.hasAttribute("xfId")?Iy(Iy({},r[e.xfId]),Ly(e,i)):Ly(e,i)})}function zy(e){return{id:e.getAttribute("numFmtId"),template:e.getAttribute("formatCode")}}function Ly(e,t){var n={};if(e.hasAttribute("numFmtId")){var r=e.getAttribute("numFmtId");t[r]?n.numberFormat=t[r]:n.numberFormat={id:r}}return n}function jy(e,t){t&&t.epoch1904&&(e+=1462);return new Date(Math.round(24*(e-25569)*36e5))}function Vy(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Uy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Uy(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Uy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function By(e,t,n){if(e){var r=t[e];if(!r)throw new Error("Cell style not found: ".concat(e));if(!r.numberFormat)return!1;if(Gy.indexOf(Number(r.numberFormat.id))>=0||n.dateFormat&&r.numberFormat.template===n.dateFormat||!1!==n.smartDateParser&&r.numberFormat.template&&function(e){for(var t,n=Vy((e=(e=(e=e.toLowerCase()).replace($y,"")).replace(qy,"")).split(/\W+/));!(t=n()).done;){var r=t.value;if(Hy.indexOf(r)<0)return!1}return!0}(r.numberFormat.template))return!0}}var Gy=[14,15,16,17,18,19,20,21,22,27,30,36,45,46,47,50,57],$y=/^\[\$-414\]/,qy=/;@$/;var Hy=["ss","mm","h","hh","am","pm","d","dd","m","mm","mmm","mmmm","yy","yyyy","e"];function Wy(e,t,n){var r=n.getInlineStringValue,i=n.getInlineStringXml,s=n.getStyleId,o=n.styles,a=n.values,l=n.properties,u=n.options;switch(t||(t="n"),t){case"str":e=Zy(e,u);break;case"inlineStr":if(void 0===(e=r()))throw new Error('Unsupported "inline string" cell value structure: '.concat(i()));e=Zy(e,u);break;case"s":var c=Number(e);if(isNaN(c))throw new Error('Invalid "shared" string index: '.concat(e));if(c>=a.length)throw new Error('An out-of-bounds "shared" string index: '.concat(e));e=Zy(e=a[c],u);break;case"b":if("1"===e)e=!0;else{if("0"!==e)throw new Error('Unsupported "boolean" cell value: '.concat(e));e=!1}break;case"z":e=void 0;break;case"e":e=function(e){switch(e){case 0:return"#NULL!";case 7:return"#DIV/0!";case 15:return"#VALUE!";case 23:return"#REF!";case 29:return"#NAME?";case 36:return"#NUM!";case 42:return"#N/A";case 43:return"#GETTING_DATA";default:return"#ERROR_".concat(e)}}(e);break;case"d":if(void 0===e)break;var h=new Date(e);if(isNaN(h.valueOf()))throw new Error('Unsupported "date" cell value: '.concat(e));e=h;break;case"n":if(void 0===e)break;e=By(s(),o,u)?jy(e=Ky(e),l):(u.parseNumber||Ky)(e);break;default:throw new TypeError("Cell type not supported: ".concat(t))}return void 0===e&&(e=null),e}function Zy(e,t){return!1!==t.trim&&(e=e.trim()),""===e&&(e=void 0),e}function Ky(e){var t=Number(e);if(isNaN(t))throw new Error('Invalid "numeric" cell value: '.concat(e));return t}var Xy=["","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function Yy(e){for(var t=0,n=0;n<e.length;)t*=26,t+=Xy.indexOf(e[n]),n++;return t}function Qy(e){return e=e.split(/(\d+)/),[parseInt(e[1]),Yy(e[0].trim())]}function Jy(e,t,n,r,i,s,o){var a,l=Qy(e.getAttribute("r")),u=function(e,t){return wy(t,"v")}(0,e),c=u&&u.textContent;return e.hasAttribute("t")&&(a=e.getAttribute("t")),{row:l[0],column:l[1],value:Wy(c,a,{getInlineStringValue:function(){return function(e,t){if(t.firstChild&&"is"===Ty(t.firstChild)&&t.firstChild.firstChild&&"t"===Ty(t.firstChild.firstChild))return t.firstChild.firstChild.textContent}(0,e)},getInlineStringXml:function(){return ky(e)},getStyleId:function(){return e.getAttribute("s")},styles:i,values:r,properties:s,options:o})}}function ev(e,t,n,r,i,s){var o=function(e){var t=wy(e.documentElement,"sheetData"),n=[];return Ey(t,"row",function(e){Ey(e,"c",function(e){n.push(e)})}),n}(e);return 0===o.length?[]:o.map(function(e){return Jy(e,0,0,n,r,i,s)})}function tv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,0===t);else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rv(e){var t=function(e){var t=wy(e.documentElement,"dimension");if(t)return t.getAttribute("ref")}(e);if(t)return 1===(t=t.split(":").map(Qy).map(function(e){var t=tv(e,2);return{row:t[0],column:t[1]}})).length&&(t=[t[0],t[0]]),t}function iv(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return sv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sv(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function sv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ov(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return av(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return av(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function av(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,0===t);else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}(e,t)||uv(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uv(e,t){if(e){if("string"==typeof e)return cv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cv(e,t):void 0}}function cv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hv(e,t){var n=e.dimensions,r=e.cells;if(0===r.length)return[];var i=lv(n,2);i[0];for(var s=i[1],o=s.column,a=s.row,l=new Array(a),u=0;u<a;){l[u]=new Array(o);for(var c=0;c<o;)l[u][c]=null,c++;u++}for(var h,d=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=uv(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r);!(h=d()).done;){var f=h.value,p=f.row-1,g=f.column-1;g<o&&p<a&&(l[p][g]=f.value)}var m=t.rowIndexSourceMap;if(m)for(var _=0;_<l.length;)m[_]=_,_++;return l=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.rowIndexSourceMap,r=t.accessor,i=void 0===r?function(e){return e}:r,s=t.onlyTrimAtTheEnd,o=e.length-1;o>=0;){for(var a,l=!0,u=iv(e[o]);!(a=u()).done;)if(null!==i(a.value)){l=!1;break}if(l)e.splice(o,1),n&&n.splice(o,1);else if(s)break;o--}return e}(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.accessor,r=void 0===n?function(e){return e}:n,i=t.onlyTrimAtTheEnd,s=e[0].length-1;s>=0;){for(var o,a=!0,l=ov(e);!(o=l()).done;)if(null!==r(o.value[s])){a=!1;break}if(a)for(var u=0;u<e.length;)e[u].splice(s,1),u++;else if(i)break;s--}return e}(l,{onlyTrimAtTheEnd:!0}),{onlyTrimAtTheEnd:!0,rowIndexSourceMap:m}),t.transformData&&(l=t.transformData(l)),l}function dv(e){"@babel/helpers - typeof";return dv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dv(e)}function fv(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return pv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pv(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function pv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gv(Object(n),!0).forEach(function(t){_v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _v(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==dv(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==dv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===dv(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.sheet||(n=mv({sheet:1},n));var r=function(t){if(!e[t])throw new Error('"'.concat(t,'" file not found inside the *.xlsx file zip archive'));return e[t]},i=Cy(r("xl/_rels/workbook.xml.rels"),t),s=i.sharedStrings?function(e,t){return e?Oy(t.createDocument(e)):[]}(r(i.sharedStrings),t):[],o=i.styles?Fy(r(i.styles),t):{},a=Ry(r("xl/workbook.xml"),t);if(n.getSheets)return a.sheets.map(function(e){return{name:e.name}});var l=function(e,t){if("number"==typeof e){var n=t[e-1];return n&&n.relationId}for(var r,i=fv(t);!(r=i()).done;){var s=r.value;if(s.name===e)return s.relationId}}(n.sheet,a.sheets);if(!l||!i.sheets[l])throw function(e,t){var n=t&&t.map(function(e,t){return'"'.concat(e.name,'" (#').concat(t+1,")")}).join(", ");return new Error("Sheet ".concat("number"==typeof e?"#"+e:'"'+e+'"'," not found in the *.xlsx file.").concat(t?" Available sheets: "+n+".":""))}(n.sheet,a.sheets);var u=function(e,t,n,r,i,s){var o=t.createDocument(e),a=ev(o,0,n,r,i,s),l=rv(o)||function(e){var t=function(e,t){return e-t},n=e.map(function(e){return e.row}).sort(t),r=e.map(function(e){return e.column}).sort(t),i=n[0],s=n[n.length-1];return[{row:i,column:r[0]},{row:s,column:r[r.length-1]}]}(a);return{cells:a,dimensions:l}}(r(i.sheets[l]),t,s,o,a,n),c=hv(u,n=mv({rowIndexSourceMap:[]},n));return n.properties?{data:c,properties:a}:c}function vv(e){"@babel/helpers - typeof";return vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vv(e)}function bv(e){var t=Av();return function(){var n,r=Sv(e);if(t){var i=Sv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===vv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function xv(e){var t="function"==typeof Map?new Map:void 0;return xv=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return wv(e,arguments,Sv(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ev(r,e)},xv(e)}function wv(e,t,n){return wv=Av()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Ev(i,n.prototype),i},wv.apply(null,arguments)}function Av(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Ev(e,t){return Ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ev(e,t)}function Sv(e){return Sv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sv(e)}var Tv=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ev(e,t)}(n,xv(Error));var e,t=bv(n);function n(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,"invalid")).reason=e,r}return e=n,Object.defineProperty(e,"prototype",{writable:!1}),e}();function kv(e){if("string"==typeof e){var t=e;if(e=Number(e),String(e)!==t)throw new Tv("not_a_number")}if("number"!=typeof e)throw new Tv("not_a_number");if(isNaN(e))throw new Tv("invalid_number");if(!isFinite(e))throw new Tv("out_of_bounds");return e}function Ov(e){if("string"==typeof e)return e;if("number"==typeof e){if(isNaN(e))throw new Tv("invalid_number");if(!isFinite(e))throw new Tv("out_of_bounds");return String(e)}throw new Tv("not_a_string")}function Rv(e){if("boolean"==typeof e)return e;throw new Tv("not_a_boolean")}var Cv=["isColumnOriented","ignoreEmptyRows","rowIndexSourceMap"];function Pv(e){"@babel/helpers - typeof";return Pv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pv(e)}function Mv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,0===t);else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}(e,t)||Nv(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nv(e,t){if(e){if("string"==typeof e)return Iv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Iv(e,t):void 0}}function Iv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dv(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fv(Object(n),!0).forEach(function(t){Lv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lv(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Pv(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==Pv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Pv(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jv={schemaPropertyValueForMissingColumn:void 0,schemaPropertyValueForMissingValue:null,schemaPropertyShouldSkipRequiredValidationForMissingColumn:function(){return!1},getEmptyObjectValue:function(){return null},getEmptyArrayValue:function(){return null},isColumnOriented:!1,ignoreEmptyRows:!0,arrayValueSeparator:","};function Vv(e,t,n){var r=n=n?zv(zv({},jv),n):jv,i=r.isColumnOriented,s=r.ignoreEmptyRows,o=r.rowIndexSourceMap,a=Dv(r,Cv),l=o&&o.slice();!function(e){for(var t=0,n=Object.keys(e);t<n.length;t++){var r=n[t],i=e[r];if("object"===Pv(i.type)&&!Array.isArray(i.type))throw new Error("When defining a nested schema, use a `schema` property instead of a `type` property");if(!i.schema&&!i.column)throw new Error('"column" not defined for schema entry "'.concat(r,'".'))}}(t),i&&(e=qv(e)),s&&(e=e.filter(function(e,t){return!e.every(function(e){return null===e})||(l&&l.splice(t,1),!1)}));for(var u=e[0],c=[],h=[],d=1;d<e.length;d++){var f=Uv(t,e[d],d,void 0,u,h,a);c.push(f)}if(l)for(var p,g=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=Nv(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(h);!(p=g()).done;){var m=p.value;m.row=l[m.row-1]+1}return{rows:c,errors:h}}function Uv(e,t,n,r,i,s,o){for(var a={},l=!0,u=function(e){var t=e.schemaEntry,r=e.value,i=e.error,s=e.reason,o={error:i,row:n+1,column:t.column,value:r};return s&&(o.reason=s),t.type&&(o.type=t.type),o},c=[],h=function(){var h,p,g,m,_=f[d],y=e[_],v=_,b=y.column,x="".concat(r||"",".").concat(v),w=i.indexOf(b),A=w<0;if(A||(h=t[w]),y.schema)p=Uv(y.schema,t,n,x,i,s,o);else if(A)"schemaPropertyValueForMissingColumn"in o&&(p=o.schemaPropertyValueForMissingColumn);else if(void 0===h)"schemaPropertyValueForMissingValue"in o&&(p=o.schemaPropertyValueForMissingValue);else if(null===h)"schemaPropertyValueForMissingValue"in o&&(p=o.schemaPropertyValueForMissingValue);else if(Array.isArray(y.type)){var E=function(e,t){var n=[],r=0;for(;r<e.length;){var i=Mv($v(e,t,r),2),s=i[0];r+=i[1]+t.length,n.push(s.trim())}return n}(h,o.arrayValueSeparator).map(function(e){if(!g){var t=Bv(e,y,o);return t.error&&(p=e,g=t.error,m=t.reason),t.value}});if(!g){var S=E.every(Hv);p=S?o.getEmptyArrayValue(E,{path:x}):E}}else{var T=Bv(h,y,o);g=T.error,m=T.reason,p=g?h:T.value}!g&&Hv(p)&&y.required&&c.push({schemaEntry:y,value:p,isMissingColumn:A}),g?s.push(u({schemaEntry:y,value:p,error:g,reason:m})):(l&&!Hv(p)&&(l=!1),void 0!==p&&(a[v]=p))},d=0,f=Object.keys(e);d<f.length;d++)h();if(l)return o.getEmptyObjectValue(a,{path:r});for(var p=0,g=c;p<g.length;p++){var m=g[p],_=m.schemaEntry,y=m.value;if(!(m.isMissingColumn&&o.schemaPropertyShouldSkipRequiredValidationForMissingColumn(_.column,{object:a}))){var v=_.required;("boolean"==typeof v?v:v(a))&&s.push(u({schemaEntry:_,value:y,error:"required"}))}}return a}function Bv(e,t,n){if(null===e)return{value:null};var r;if(t.parse)throw new Error("`schemaEntry.parse` property was renamed to `schemaEntry.type`");if(r=t.type?function(e,t,n){switch(t){case String:return Gv(e,Ov);case Number:return Gv(e,kv);case Date:return Gv(e,function(e){return function(e,t){var n=t.properties;if(e instanceof Date){if(isNaN(e.valueOf()))throw new Tv("out_of_bounds");return e}if("number"==typeof e){if(isNaN(e))throw new Tv("invalid_number");if(!isFinite(e))throw new Tv("out_of_bounds");var r=jy(e,n);if(isNaN(r.valueOf()))throw new Tv("out_of_bounds");return r}throw new Tv("not_a_date")}(e,{properties:n.properties})});case Boolean:return Gv(e,Rv);default:if("function"==typeof t)return Gv(e,t);throw new Error("Unsupported schema type: ".concat(t&&t.name||t))}}(e,Array.isArray(t.type)?t.type[0]:t.type,n):{value:e},r.error)return r;if(null!==r.value){if(t.oneOf&&t.oneOf.indexOf(r.value)<0)return{error:"invalid",reason:"unknown"};if(t.validate)try{t.validate(r.value)}catch(e){return{error:e.message}}}return r}function Gv(e,t){try{var n=t(e);return void 0===n?{value:null}:{value:n}}catch(e){var r={error:e.message};return e.reason&&(r.reason=e.reason),r}}function $v(e,t,n){for(var r=0,i="";n+r<e.length;){var s=e[n+r];if(s===t)return[i,r];if('"'===s){var o=$v(e,'"',n+r+1);i+=o[0],r+=1+o[1]+1}else i+=s,r++}return[i,r]}var qv=function(e){return e[0].map(function(t,n){return e.map(function(e){return e[n]})})};function Hv(e){return null==e}function Wv(e){"@babel/helpers - typeof";return Wv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wv(e)}var Zv=["schema"];function Kv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kv(Object(n),!0).forEach(function(t){Yv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Yv(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Wv(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==Wv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Wv(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qv(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Jv(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(t=e,t instanceof File||t instanceof Blob?t.arrayBuffer().then(xy):xy(t)).then(function(e){return function(e,t,n){var r=n.schema,i=Qv(n,Zv);if(i.map)throw new Error("`map` option was removed. Pass a `schema` option instead.");var s=yv(e,t,Xv(Xv({},i),{},{properties:r||i.properties}));return r?Vv(s.data,r,Xv(Xv({},i),{},{properties:s.properties})):s}(e,L_,n)})}const eb=({onParsed:t})=>{const[r,i]=n.useState(!1);return e(me,{accept:".xlsx, .xls",loading:r,onFilesLoad:({files:e})=>{const n=e[0];i(!0),Jv(n).then(e=>{t(e)}).finally(()=>{i(!1)})},children:"Загрузить файлы excel"})};var tb,nb={exports:{}};
21
+ function Eg(e,t){return e?function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(r=e)||"function"==typeof r||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(r)?n.createElement(e,t):e:null;var r}var Sg=Fd(({number:t})=>{const r=n.useId(),i=n.useRef(null),s=xp({type:"preview",number:t}),{height:o}=ep[t];return e("img",{src:s,id:r,width:fp.preview,height:2*o,ref:i,alt:`traffic-sign-${t}`})});const Tg={height:"",title:_p.traffic_sign_title,type:_p.traffic_sign_type,number:_p.traffic_sign_number};var kg=Fd(({options:t,label:n,column:r})=>{const i=r.getFilterValue(),s=t.find(({value:e})=>e===i);return e(I,{value:s??null,options:t,id:r.id,getOptionLabel:({label:e})=>e,getOptionKey:({value:e})=>e,size:"small",onChange:(e,t)=>{t?r.setFilterValue(t.value):r.setFilterValue(null)},renderInput:t=>e(sn,{...t,label:n})})});var Og=Fd(({pageSize:r=15,defaultValues:i,filtered:s={},onSelect:o,trafficSigns:a})=>{const[l,u]=n.useState({}),[c,h]=n.useState([]),[d,f]=n.useState({pageIndex:0,pageSize:r}),p={accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e},g=n.useMemo(()=>{const t=[{id:"image",header:()=>e(pe,{onClick:()=>{h([])},children:"Очистить все"}),cell:({row:{original:t}})=>e(Sg,{number:t.number})},p.accessor("title",{cell:t=>e(Jt,{variant:"body2",sx:{textAlign:"center",cursor:"inherit"},children:t.getValue()}),footer:e=>e.column.id,header:()=>e(Jt,{variant:"body1",fontWeight:700,children:"Название знака"}),meta:{isFiltered:s?.title??!0}}),p.accessor("number",{cell:t=>{const n=t.getValue();return e(Jt,{variant:"body2",sx:{textAlign:"center",cursor:"inherit"},children:n})},footer:e=>e.column.id,header:()=>e(Jt,{variant:"body1",fontWeight:700,children:"Номер знака"}),filterFn:({original:e},t)=>{const n=c.find(e=>e.id===t);if(n){return n.value===e.number||null===n.value}return!0},meta:{isFiltered:s?.number??!0}}),p.accessor("type",{cell:t=>e(Jt,{variant:"body2",sx:{textAlign:"center",cursor:"inherit"},children:t.getValue()}),footer:e=>e.column.id,header:()=>e(Jt,{variant:"body1",fontWeight:700,children:"Тип знака"}),meta:{isFiltered:s?.type??!0}})];return t},[c,s]),m=n.useMemo(()=>{const e=Object.entries(a).map(([e,t])=>({...t,number:e}));return e},[a]),_=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=n.useState(()=>({current:wg(t)})),[i,s]=n.useState(()=>r.current.initialState);return r.current.setOptions(t=>({...t,...e,state:{...i,...e.state},onStateChange:t=>{s(t),null==e.onStateChange||e.onStateChange(t)}})),r.current}({data:m,columns:g,state:{columnFilters:c,rowSelection:l,pagination:d},enableRowSelection:!0,onColumnFiltersChange:h,onRowSelectionChange:u,onPaginationChange:f,getCoreRowModel:e=>Pp(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,i,s){void 0===i&&(i=0);const o=[];for(let l=0;l<t.length;l++){const u=zp(e,e._getRowId(t[l],l,s),t[l],l,i,0,null==s?void 0:s.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,o.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[l],l),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=r(u.originalSubRows,i+1,u)))}return o};return n.rows=r(t),n},Mp(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex())),getFilteredRowModel:e=>Pp(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||(null==n||!n.length)&&!r){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const i=[],s=[];(null!=n?n:[]).forEach(t=>{var n;const r=e.getColumn(t.id);if(!r)return;const s=r.getFilterFn();s?i.push({id:t.id,filterFn:s,resolvedValue:null!=(n=null==s.resolveFilterValue?void 0:s.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${r.id}.`)});const o=(null!=n?n:[]).map(e=>e.id),a=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(e=>e.getCanGlobalFilter());let u,c;r&&a&&l.length&&(o.push("__global__"),l.forEach(e=>{var t;s.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(r))?t:r})}));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},i.length)for(let e=0;e<i.length;e++){u=i[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,e=>{n.columnFiltersMeta[t]=e})}if(s.length){for(let e=0;e<s.length;e++){c=s[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,e=>{n.columnFiltersMeta[t]=e})){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return Ag(t.rows,e=>{for(let t=0;t<o.length;t++)if(!1===e.columnFilters[o[t]])return!1;return!0},e)},Mp(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex())),getSortedRowModel:e=>Pp(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,i=[],s=r.filter(t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()}),o={};s.forEach(t=>{const n=e.getColumn(t.id);n&&(o[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})});const a=e=>{const t=e.map(e=>({...e}));return t.sort((e,t)=>{for(let r=0;r<s.length;r+=1){var n;const i=s[r],a=o[i.id],l=a.sortUndefined,u=null!=(n=null==i?void 0:i.desc)&&n;let c=0;if(l){const n=void 0===e.getValue(i.id),r=void 0===t.getValue(i.id);if(n||r){if("first"===l)return n?-1:1;if("last"===l)return n?1:-1;c=n&&r?0:n?l:-l}}if(0===c&&(c=a.sortingFn(e,t,i.id)),0!==c)return u&&(c*=-1),a.invertSorting&&(c*=-1),c}return e.index-t.index}),t.forEach(e=>{var t;i.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))}),t};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},Mp(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex())),getPaginationRowModel:e=>Pp(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(t,n)=>{if(!n.rows.length)return n;const{pageSize:r,pageIndex:i}=t;let{rows:s,flatRows:o,rowsById:a}=n;const l=r*i,u=l+r;let c;s=s.slice(l,u),c=e.options.paginateExpandedRows?{rows:s,flatRows:o,rowsById:a}:function(e){const t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}({rows:s,flatRows:o,rowsById:a}),c.flatRows=[];const h=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(h)};return c.rows.forEach(h),c},Mp(e.options,"debugTable","getPaginationRowModel"))}),y=n.useMemo(()=>{const e=new Set,t=[],n=new Set,r=[],i=new Set,s=[];return _.getCoreRowModel().rows.map(({original:{number:t,title:r,type:s}})=>{e.add(t),n.add(r),i.add(s)}),e.forEach(e=>{t.push({label:e,value:e})}),n.forEach(e=>{r.push({label:e,value:e})}),i.forEach(e=>{s.push({label:e,value:e})}),{number:t,title:r,type:s}},[_]);return n.useEffect(()=>{if(i){const e=[];Object.entries(i).forEach(([t,n])=>{e.push({id:t,value:n})}),h(e)}},[i]),t(x,{sx:{display:"grid",justifyItems:"center",gap:"10px"},children:[t(x,{component:"table",sx:{border:"1px solid black",borderCollapse:"collapse","td, th":{border:"1px solid black",padding:"10px"}},children:[e("thead",{children:_.getHeaderGroups().map(n=>e("tr",{style:{border:"1px solid black"},children:n.headers.map(n=>{const r=n.id,i=n.column.columnDef.meta;return e("th",{colSpan:n.colSpan,children:n.isPlaceholder?null:t(x,{sx:{display:"grid",gap:"12px",minWidth:200,padding:"8px 0"},children:[e(x,{sx:{display:"flex",justifyItems:"center",justifyContent:"center",gap:"12px"},children:Eg(n.column.columnDef.header,n.getContext())}),i?.isFiltered?e(kg,{label:Tg[r],column:n.column,options:y[r]??[]}):null]})},n.id)})},n.id))}),e("tbody",{children:_.getRowModel().rows.map(t=>e(x,{component:"tr",onClick:()=>{o(t.original),h([])},children:t.getVisibleCells().map(t=>e(x,{component:"td",sx:{cursor:"pointer",width:t.column.getSize()},children:e(x,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:Eg(t.column.columnDef.cell,t.getContext())})},t.id))},t.id))})]}),t(x,{sx:{display:"flex",alignItems:"center",gap:"10px"},children:[t(x,{sx:{display:"flex",gap:"8px"},children:[e(pe,{variant:"outlined",size:"small",onClick:()=>_.setPageIndex(0),disabled:!_.getCanPreviousPage(),"aria-label":"move all right",children:"<<"}),e(pe,{variant:"outlined",size:"small",onClick:()=>_.previousPage(),disabled:!_.getCanPreviousPage(),"aria-label":"move all right",children:"<"}),e(pe,{variant:"outlined",size:"small",onClick:()=>_.nextPage(),disabled:!_.getCanNextPage(),"aria-label":"move all right",children:">"}),e(pe,{variant:"outlined",size:"small",onClick:()=>_.setPageIndex(_.getPageCount()-1),disabled:!_.getCanNextPage(),"aria-label":"move all right",children:">>"})]}),t(Jt,{fontWeight:700,children:[_.getState().pagination.pageIndex+1," из ",_.getPageCount()]})]})]})});const Rg=({children:t,sx:n={},...r})=>e(x,{...r,sx:{padding:"20px 15px",borderRadius:"10px",boxShadow:"0px 8px 24px 0px rgba(0,0,0,0.3)",maxHeight:"80vh",maxWidth:"90vw",overflowX:"auto",...n},children:t});function Cg({name:t,...r}){const{control:i}=Xe(),s=n.useId();return e(st,{control:i,name:t,render:({field:t})=>e(ne,{...r,...t,id:s,slots:{field:sn}})})}const Pg="oldDops";var Mg=Fd(({index:r,onDelete:i,onUpdate:s})=>{const[o,a]=n.useState(!1),{register:l,setValue:u,watch:c}=Xe(),h=c(`${Pg}.${r}`),{dop_sign_number:d}=h;return t(x,{sx:{display:"grid",gap:"12px"},children:[t(D,{expanded:o,children:[e(F,{expandIcon:e(re,{}),onClick:()=>{a(e=>!e)},"aria-controls":"panel1-content",id:"panel1-header",children:t(x,{sx:{display:"flex",alignItems:"center",gap:"12px"},children:[e(de,{notification:{title:"Удалить traffic sign",description:"Вы действительно хотите удалить данный traffic sign?"},onDelete:()=>{i(h)}}),e(zg,{number:d})]})}),e(z,{children:e(Og,{pageSize:5,filtered:{type:!1},trafficSigns:Jf,onSelect:({title:e,number:t})=>{u(`${Pg}.${r}.dop_sign_number`,t),u(`${Pg}.${r}.dop_sign_title`,e),a(!1)}})})]}),e(on,{...l(`${Pg}.${r}.status`),label:_p.status,items:mp,getKey:({value:e})=>e,getLabel:({label:e})=>e,getValue:({value:e})=>e}),e(an,{...l(`${Pg}.${r}.comment`),label:_p.comment}),e(an,{...l(`${Pg}.${r}.dop_sign_text`),label:_p.dop_sign_text}),t(x,{sx:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"12px"},children:[e(Cg,{...l(`${Pg}.${r}.placement_date`),label:_p.placement_date,format:vp}),e(Cg,{...l(`${Pg}.${r}.verification_date`),label:_p.verification_date,format:vp}),e(Cg,{...l(`${Pg}.${r}.future_maintanance_date`),label:_p.future_maintanance_date,format:vp}),e(Cg,{...l(`${Pg}.${r}.rapair_performed_date`),label:_p.rapair_performed_date,format:vp}),e(Cg,{...l(`${Pg}.${r}.warranty_expr_date`),label:_p.warranty_expr_date,format:vp})]}),e(pe,{onClick:()=>{s(h)},children:"Сохранить"})]})});const Ng="newDops";var Ig=Fd(({index:r,onDelete:i})=>{const{palette:s}=L(),[o,a]=n.useState(!1),{setValue:l,register:u,watch:c}=Xe(),h=c(`${Ng}.${r}`),{dop_sign_number:d}=h;return t(x,{sx:{display:"grid",gap:"12px"},children:[t(D,{expanded:o,children:[e(F,{expandIcon:e(re,{}),onClick:()=>{a(e=>!e)},"aria-controls":"panel1-content",id:"panel1-header",children:t(x,{sx:{display:"flex",alignItems:"center",gap:"12px"},children:[e(Jt,{variant:"h6",color:"error",sx:{fontWeight:700,color:s.primary.main},children:"NEW"}),e(de,{notification:{title:"Удалить traffic sign",description:"Вы действительно хотите удалить данный traffic sign?"},onDelete:i}),e(zg,{number:d})]})}),e(z,{children:e(Og,{pageSize:5,filtered:{type:!1},trafficSigns:Jf,onSelect:({title:e,number:t})=>{l(`${Ng}.${r}.dop_sign_number`,t),l(`${Ng}.${r}.dop_sign_title`,e),a(!1)}})})]}),e(on,{...u(`${Ng}.${r}.status`),label:_p.status,items:mp,getKey:({value:e})=>e,getLabel:({label:e})=>e,getValue:({value:e})=>e}),e(an,{...u(`${Ng}.${r}.comment`),label:_p.comment}),e(an,{...u(`${Ng}.${r}.dop_sign_text`),label:_p.dop_sign_text}),t(x,{sx:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"12px"},children:[e(Cg,{...u(`${Ng}.${r}.placement_date`),label:_p.placement_date,format:vp}),e(Cg,{...u(`${Ng}.${r}.verification_date`),label:_p.verification_date,format:vp}),e(Cg,{...u(`${Ng}.${r}.future_maintanance_date`),label:_p.future_maintanance_date,format:vp}),e(Cg,{...u(`${Ng}.${r}.rapair_performed_date`),label:_p.rapair_performed_date,format:vp}),e(Cg,{...u(`${Ng}.${r}.warranty_expr_date`),label:_p.warranty_expr_date,format:vp})]})]})});var Dg,Fg,zg=Fd(({number:n})=>{const r=Tp(n);return t(x,{sx:{display:"flex",alignItems:"center",gap:"12px"},children:[e(Sg,{number:n}),t(b,{children:[r," (",n,")"]})]})});var Lg,jg,Vg=function(){if(Fg)return Dg;function e(e){this._maxSize=e,this.clear()}Fg=1,e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(e){return this._values[e]},e.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,o=new e(512),a=new e(512),l=new e(512);function u(e){return o.get(e)||o.set(e,c(e).map(function(e){return e.replace(s,"$2")}))}function c(e){return e.match(t)||[""]}function h(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function d(e){return!h(e)&&(function(e){return e.match(r)&&!e.match(n)}(e)||function(e){return i.test(e)}(e))}return Dg={Cache:e,split:c,normalizePath:u,setter:function(e){var t=u(e);return a.get(e)||a.set(e,function(e,n){for(var r=0,i=t.length,s=e;r<i-1;){var o=t[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;s=s[t[r++]]}s[t[r]]=n})},getter:function(e,t){var n=u(e);return l.get(e)||l.set(e,function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(h(t)||n.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,i,s,o,a=e.length;for(i=0;i<a;i++)(r=e[i])&&(d(r)&&(r='"'+r+'"'),s=!(o=h(r))&&/^\d+$/.test(r),t.call(n,r,o,s,i,e))}(Array.isArray(e)?e:c(e),t,n)}},Dg}();var Ug,Bg=function(){if(jg)return Lg;jg=1;const e=/[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,t=t=>t.match(e)||[],n=e=>e[0].toUpperCase()+e.slice(1),r=(e,n)=>t(e).join(n).toLowerCase(),i=e=>t(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,"");return Lg={words:t,upperFirst:n,camelCase:i,pascalCase:e=>n(i(e)),snakeCase:e=>r(e,"_"),kebabCase:e=>r(e,"-"),sentenceCase:e=>n(r(e," ")),titleCase:e=>t(e).map(n).join(" ")}}(),Gg={exports:{}};var $g=function(){if(Ug)return Gg.exports;function e(e,t){var n=e.length,r=new Array(n),i={},s=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!a.has(e[0])||!a.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(e,t,s){if(s.has(e)){var u;try{u=", node was:"+JSON.stringify(e)}catch(e){u=""}throw new Error("Cyclic dependency"+u)}if(!a.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var c=o.get(e)||new Set;if(t=(c=Array.from(c)).length){s.add(e);do{var h=c[--t];l(h,a.get(h),s)}while(t);s.delete(e)}r[--n]=e}}}return Ug=1,Gg.exports=function(t){return e(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(t),t)},Gg.exports.array=e,Gg.exports}(),qg=Pi($g);const Hg=Object.prototype.toString,Wg=Error.prototype.toString,Zg=RegExp.prototype.toString,Kg="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",Xg=/^Symbol\((.*)\)(.*)$/;function Yg(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return Kg.call(e).replace(Xg,"Symbol($1)");const r=Hg.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+Wg.call(e)+"]":"RegExp"===r?Zg.call(e):null}function Qg(e,t){let n=Yg(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=Yg(this[e],t);return null!==r?r:n},2)}function Jg(e){return null==e?[]:[].concat(e)}let em,tm,nm,rm=/\$\{\s*(\w+)\s*\}/g;em=Symbol.toStringTag;class im{constructor(e,t,n,r){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[em]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],Jg(e).forEach(e=>{if(sm.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}tm=Symbol.hasInstance,nm=Symbol.toStringTag;class sm extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace(rm,(e,n)=>Qg(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,i){const s=new im(e,t,n,r);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[nm]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,sm)}static[tm](e){return im[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let om={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=null!=r&&r!==n?` (cast from the value \`${Qg(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${Qg(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Qg(n,!0)}\``+i}},am={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"},lm={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"},um={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},cm={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},hm={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"},dm={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Qg(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Qg(n,!0)}\``}return sm.formatError(om.notType,e)}};Object.assign(Object.create(null),{mixed:om,string:am,number:lm,date:um,object:cm,array:hm,boolean:{isValue:"${path} field must be ${value}"},tuple:dm});const fm=e=>e&&e.__isYupSchema__;class pm{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new pm(e,(e,t)=>{var n;let o=s(...e)?r:i;return null!=(n=null==o?void 0:o(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!fm(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const gm="$",mm=".";class _m{constructor(e,t={}){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,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===gm,this.isValue=this.key[0]===mm,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?gm:this.isValue?mm:"";this.path=this.key.slice(n.length),this.getter=this.path&&Vg.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}_m.prototype.__isYupRef=!0;const ym=e=>null==e;function vm(e){function t({value:t,path:n="",options:r,originalValue:i,schema:s},o,a){const{name:l,test:u,params:c,message:h,skipAbsent:d}=e;let{parent:f,context:p,abortEarly:g=s.spec.abortEarly,disableStackTrace:m=s.spec.disableStackTrace}=r;const _={value:t,parent:f,context:p};function y(e={}){const r=bm(Object.assign({value:t,originalValue:i,label:s.spec.label,path:e.path||n,spec:s.spec,disableStackTrace:e.disableStackTrace||m},c,e.params),_),o=new sm(sm.formatError(e.message||h,r),t,r.path,e.type||l,r.disableStackTrace);return o.params=r,o}const v=g?o:a;let b={path:n,parent:f,type:l,from:r.from,createError:y,resolve:e=>xm(e,_),options:r,originalValue:i,schema:s};const x=e=>{sm.isError(e)?v(e):e?a(null):v(y())},w=e=>{sm.isError(e)?v(e):o(e)};if(d&&ym(t))return x(!0);let A;try{var E;if(A=u.call(b,t,b),"function"==typeof(null==(E=A)?void 0:E.then)){if(r.sync)throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(A).then(x,w)}}catch(e){return void w(e)}x(A)}return t.OPTIONS=e,t}function bm(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=xm(e[n],t);return e}function xm(e,t){return _m.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function wm(e,t,n,r=n){let i,s,o;return t?(Vg.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a,h="tuple"===(e=e.resolve({context:r,parent:i,value:n})).type,d=u?parseInt(c,10):0;if(e.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=h?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[c],e=e.fields[c]}s=c,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Am extends Set{describe(){const e=[];for(const t of this.values())e.push(_m.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new Am(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function Em(e,t=new Map){if(fm(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Em(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Em(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Em(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Em(i,t)}return n}function Sm(e){if(null==e||!e.length)return;const t=[];let n="",r=!1,i=!1;for(let s=0;s<e.length;s++){const o=e[s];"["!==o||i?"]"!==o||i?'"'!==o?"."!==o||r||i?n+=o:n&&(t.push(n),n=""):i=!i:(n&&(/^\d+$/.test(n)?t.push(n):t.push(n.replace(/^"|"$/g,"")),n=""),r=!1):(n&&(t.push(...n.split(".").filter(Boolean)),n=""),r=!0)}return n&&t.push(...n.split(".").filter(Boolean)),t}function Tm(e,t){var n;if((null==(n=e.inner)||!n.length)&&e.errors.length)return function(e,t){const n=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:Sm(n)}))}(e,t);const r=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>Tm(e,r))}class km{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Am,this._blacklist=new Am,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(om.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=Em(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,i;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(i=e.disableStackTrace)?i:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({},t,{value:e})),r="ignore-optionality"===t.assert,i=n._cast(e,t);if(!1!==t.assert&&!n.isType(i)){if(r&&ym(i))return i;let s=Qg(e),o=Qg(i);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(o!==s?`result of cast: ${o}`:""))}return i}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((n,r)=>r.call(this,n,e,this,t),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:i,originalValue:s=e,strict:o=this.spec.strict}=t,a=e;o||(a=this._cast(a,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:i,value:a,originalValue:s,options:t,tests:l},n,e=>{if(e.length)return r(e,a);this.runTests({path:i,value:a,originalValue:s,options:t,tests:this.tests},n,r)})}runTests(e,t,n){let r=!1,{tests:i,value:s,originalValue:o,path:a,options:l}=e,u=e=>{r||(r=!0,t(e,s))},c=e=>{r||(r=!0,n(e,s))},h=i.length,d=[];if(!h)return c([]);let f={value:s,originalValue:o,path:a,options:l,schema:this};for(let e=0;e<i.length;e++){(0,i[e])(f,u,function(e){e&&(Array.isArray(e)?d.push(...e):d.push(e)),--h<=0&&c(d)})}}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:i,options:s}){const o=null!=e?e:t;if(null==o)throw TypeError("Must include `key` or `index` for nested validations");const a="number"==typeof o;let l=n[o];const u=Object.assign({},s,{strict:!0,parent:n,value:l,originalValue:i[o],key:void 0,[a?"index":"key"]:o,path:a||o.includes(".")?`${r||""}[${a?o:`"${o}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(u)._validate(l,u,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),i=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise((n,s)=>r._validate(e,t,(e,t)=>{sm.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new sm(e,t,void 0,void 0,i)):n(t)}))}validateSync(e,t){var n;let r,i=this.resolve(Object.assign({},t,{value:e})),s=null!=(n=null==t?void 0:t.disableStackTrace)?n:i.spec.disableStackTrace;return i._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw sm.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new sm(t,e,void 0,void 0,s);r=n}),r}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(sm.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(sm.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):Em(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=vm({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=vm({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=om.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=om.notNull){return this.nullability(!1,e)}required(e=om.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=om.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=vm(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(i)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=Jg(e).map(e=>new _m(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new pm(r,t):pm.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=vm({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=om.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=vm({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=om.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=vm({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:i,nullable:s}=t.spec,o={meta:r,label:n,optional:i,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?bm(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})};return o}get"~standard"(){const e=this,t={version:1,vendor:"yup",async validate(t){try{return{value:await e.validate(t,{abortEarly:!1})}}catch(e){if(e instanceof sm)return{issues:Tm(e)};throw e}}};return t}}km.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])km.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=wm(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])km.prototype[e]=km.prototype.oneOf;for(const e of["not","nope"])km.prototype[e]=km.prototype.notOneOf;const Om=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Rm(e){var t,n;const r=Om.exec(e);return r?{year:Cm(r[1]),month:Cm(r[2],1)-1,day:Cm(r[3],1),hour:Cm(r[4]),minute:Cm(r[5]),second:Cm(r[6]),millisecond:r[7]?Cm(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Cm(r[10]),minuteOffset:Cm(r[11])}:null}function Cm(e,t=0){return Number(e)||t}let Pm=/^[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])?)*$/,Mm=/^((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,Nm=/^(?:[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,Im=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),Dm=e=>ym(e)||e===e.trim(),Fm={}.toString();function zm(){return new Lm}class Lm extends km{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce||this.isType(e))return e;if(Array.isArray(e))return e;const n=null!=e&&e.toString?e.toString():e;return n===Fm?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||om.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=am.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=am.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=am.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,i=!1;return t&&("object"==typeof t?({excludeEmptyString:i=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||am.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&i||-1!==t.search(e)})}email(e=am.email){return this.matches(Pm,{name:"email",message:e,excludeEmptyString:!0})}url(e=am.url){return this.matches(Mm,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=am.uuid){return this.matches(Nm,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(Im,{name:"datetime",message:r||am.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||am.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=Rm(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||am.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=Rm(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=am.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:Dm})}lowercase(e=am.lowercase){return this.transform(e=>ym(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>ym(e)||e===e.toLowerCase()})}uppercase(e=am.uppercase){return this.transform(e=>ym(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>ym(e)||e===e.toUpperCase()})}}zm.prototype=Lm.prototype;function jm(){return new Vm}class Vm extends km{constructor(){super({type:"number",check:e=>(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e))}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce)return e;let n=e;if("string"==typeof n){if(n=n.replace(/\s/g,""),""===n)return NaN;n=+n}return this.isType(n)||null===n?n:parseFloat(n)})})}min(e,t=lm.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t>=this.resolve(e)}})}max(e,t=lm.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t<=this.resolve(e)}})}lessThan(e,t=lm.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(t){return t<this.resolve(e)}})}moreThan(e,t=lm.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=lm.positive){return this.moreThan(0,e)}negative(e=lm.negative){return this.lessThan(0,e)}integer(e=lm.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>ym(e)?e:0|e)}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>ym(t)?t:Math[e](t))}}jm.prototype=Vm.prototype;let Um=new Date("");function Bm(){return new Gm}class Gm extends km{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation(()=>{this.transform((e,t)=>!this.spec.coerce||this.isType(e)||null===e?e:(e=function(e){const t=Rm(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?Gm.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(_m.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=um.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=um.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function $m(e,t){let n=1/0;return e.some((e,r)=>{var i;if(null!=(i=t.path)&&i.includes(e))return n=r,!0}),n}function qm(e){return(t,n)=>$m(e,t)-$m(e,n)}Gm.INVALID_DATE=Um,Bm.prototype=Gm.prototype,Bm.INVALID_DATE=Um;const Hm=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return n.isType(r)?r:e};function Wm(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Wm(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Wm(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Wm)}):"optional"in e?e.optional():e}let Zm=e=>"[object Object]"===Object.prototype.toString.call(e);function Km(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const Xm=qm([]);function Ym(e){return new Qm(e)}class Qm extends km{constructor(e){super({type:"object",check:e=>Zm(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=Xm,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let i=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(r).filter(e=>!this._nodes.includes(e))),a={},l=Object.assign({},t,{parent:a,__validating:t.__validating||!1}),u=!1;for(const e of o){let n=i[e],o=e in r,c=r[e];if(n){let i;l.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:c,context:t.context,parent:a});let s=n instanceof km?n.spec:void 0,o=null==s?void 0:s.strict;if(null!=s&&s.strip){u=u||e in r;continue}i=t.__validating&&o?c:n.cast(c,l),void 0!==i&&(a[e]=i)}else o&&!s&&(a[e]=c);o===e in a&&a[e]===c||(u=!0)}return u?a:r}_validate(e,t={},n,r){let{from:i=[],originalValue:s=e,recursive:o=this.spec.recursive}=t;t.from=[{schema:this,value:s},...i],t.__validating=!0,t.originalValue=s,super._validate(e,t,n,(e,i)=>{if(!o||!Zm(i))return void r(e,i);s=s||i;let a=[];for(let e of this._nodes){let n=this.fields[e];n&&!_m.isRef(n)&&a.push(n.asNestedTest({options:t,key:e,parent:i,parentPath:t.path,originalParent:s}))}this.runTests({tests:a,value:i,originalValue:s,options:t},n,t=>{r(t.sort(this._sortErrors).concat(e),i)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var r;const i=this.fields[n];let s=e;null!=(r=s)&&r.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),t[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=Vg.split(e)[0];r.add(s),i.has(`${t}-${s}`)||n.push([t,s])}for(const t of Object.keys(e)){let n=e[t];r.add(t),_m.isRef(n)&&n.isSibling?s(n.path,t):fm(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return qg.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=qm(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Wm(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=Vg.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return((e,t)=>{const n=[...Vg.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),i=Vg.getter(Vg.join(n),!0)(e);return!(!i||!(r in i))})(i,e)&&(s=Object.assign({},i),n||delete s[e],s[t]=r(i)),s})}json(){return this.transform(Hm)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||cm.exact,test(e){if(null==e)return!0;const t=Km(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=cm.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=Km(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=cm.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n})}camelCase(){return this.transformKeys(Bg.camelCase)}snakeCase(){return this.transformKeys(Bg.snakeCase)}constantCase(){return this.transformKeys(e=>Bg.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[i,s]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[i]})),n.fields[i]=s.describe(t)}return n}}function Jm(e){return new e_(e)}Ym.prototype=Qm.prototype;class e_ extends km{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const i=n.map((e,i)=>{const s=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${i}]`,parent:n,originalValue:e,value:e,index:i}));return s!==e&&(r=!0),s});return r?i:n}_validate(e,t={},n,r){var i;let s=this.innerType,o=null!=(i=t.recursive)?i:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,n,(i,a)=>{var l;if(!o||!s||!this._typeCheck(a))return void r(i,a);let u=new Array(a.length);for(let n=0;n<a.length;n++){var c;u[n]=s.asNestedTest({options:t,index:n,parent:a,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:a,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},n,e=>r(e.concat(i),a))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(Hm)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!fm(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Qg(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=hm.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||hm.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||hm.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var r;let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=t.innerType.describe(i)}return n}}Jm.prototype=e_.prototype;const t_={traffic_sign_id:zm().required(),dop_id:zm().required()},n_={dop_sign_number:zm().required(),dop_sign_title:zm().required(),status:zm().required(),dop_sign_text:zm().nullable(),comment:zm().nullable()},r_={future_maintanance_date:Bm().required(),placement_date:Bm().required(),rapair_performed_date:Bm().required(),verification_date:Bm().required(),warranty_expr_date:Bm().required()},i_=Ym().shape({...t_,...n_,...r_}),s_=Ym().shape({...n_,...r_}),o_={traffic_sign_type:zm().required(),traffic_sign_number:zm().required(),traffic_sign_title:zm().required(),status:zm().required(),comment:zm().nullable(),traffic_sign_value:zm().nullable(),direction:jm().nullable()},a_={future_maintanance_date:Bm().required(),placement_date:Bm().required(),rapair_performed_date:Bm().required(),verification_date:Bm().required(),warranty_expr_date:Bm().required()},l_={traffic_sign_id:zm().required(),dit_id:jm().required(),tsodd_id:jm().required(),pillar_id:zm().nullable()},u_=Ym().shape({...o_,...a_,...l_,oldDops:Jm().of(i_).required(),newDops:Jm().of(s_).required()}),c_=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ce(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},h_=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?c_(r.ref,n,e):r&&r.refs&&r.refs.forEach(t=>c_(t,n,e))}},d_=(e,t)=>{t.shouldUseNativeValidation&&h_(e,t);const n={};for(const r in e){const i=Ce(t.fields,r),s=Object.assign(e[r]||{},{ref:i&&i.ref});if(f_(t.names||Object.keys(e),r)){const e=Object.assign({},Ce(n,r));Ne(e,"root",s),Ne(n,r,e)}else Ne(n,r,s)}return n},f_=(e,t)=>{const n=p_(t);return e.some(e=>p_(e).match(`^${n}\\.\\d+`))};function p_(e){return e.replace(/\]|\[/g,"")}function g_(e,t,n){return void 0===n&&(n={}),function(r,i,s){try{return Promise.resolve(function(o,a){try{var l=(null!=t&&t.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e["sync"===n.mode?"validateSync":"validate"](r,Object.assign({abortEarly:!1},t,{context:i}))).then(function(e){return s.shouldUseNativeValidation&&h_({},s),{values:n.raw?Object.assign({},r):e,errors:{}}}))}catch(e){return a(e)}return l&&l.then?l.then(void 0,a):l}(0,function(e){if(!e.inner)throw e;return{values:{},errors:d_((t=e,n=!s.shouldUseNativeValidation&&"all"===s.criteriaMode,(t.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var r=e[t.path].types,i=r&&r[t.type];e[t.path]=ot(t.path,n,e,t.type,i?[].concat(i,t.message):t.message)}return e},{})),s)};var t,n}))}catch(e){return Promise.reject(e)}}}var m_=Fd(({trafficSign:r,onSubmit:i,onDelete:s,onDeleteDop:o,onUpdateDop:a})=>{const[l,u]=n.useState("1"),c=n.useCallback((e,t)=>{u(t)},[]),[h,d]=n.useState(!1),f=n.useMemo(()=>{const{dops:e,traffic_sign_id:t}=r;return{...r,...Ap(r),oldDops:e.map(e=>({...e,traffic_sign_id:t,...Ap(e)})),newDops:[]}},[r]),p=Qt({resolver:g_(u_),defaultValues:f}),{reset:g,control:m,register:_,setValue:y,watch:v,formState:{errors:b}}=p,w=Yt({control:m,name:"oldDops"}),A=Yt({control:m,name:"newDops"}),E=v("traffic_sign_number");return n.useEffect(()=>{Object.keys(b).length>0&&fu.warn({message:"Ошибки валидации формы",context:"TrafficSignUpdateForm",meta:b})},[b]),n.useEffect(()=>{g(f)},[r]),t(nn,{form:p,onSubmit:i,children:[t(ie,{value:l,children:[e(x,{sx:{borderBottom:1,borderColor:"divider"},children:t(se,{onChange:c,"aria-label":"lab API tabs example",children:[e(j,{label:"Traffic Sign",value:"1",sx:{textTransform:"none"}}),e(j,{label:"Traffic Sign Dop",value:"2",sx:{textTransform:"none"}})]})}),e(oe,{value:"1",children:t(x,{sx:{display:"grid",gap:"12px"},children:[t(D,{expanded:h,children:[e(F,{expandIcon:e(re,{}),onClick:()=>{d(e=>!e)},"aria-controls":"panel1-content",id:"panel1-header",children:t(x,{sx:{display:"flex",alignItems:"center",gap:"12px"},children:[e(de,{notification:{title:"Удалить traffic sign",description:"Вы действительно хотите удалить данный traffic sign?"},onDelete:()=>{s(r)}}),e(zg,{number:E})]})}),e(z,{children:e(Og,{trafficSigns:Qf,pageSize:5,onSelect:({title:e,number:t,type:n})=>{y("traffic_sign_number",t),y("traffic_sign_title",e),y("traffic_sign_type",n),d(!1)}})})]}),e(on,{..._("status"),label:_p.status,items:mp,getKey:({value:e})=>e,getLabel:({label:e})=>e,getValue:({value:e})=>e}),e(an,{..._("traffic_sign_value"),label:_p.traffic_sign_value}),e(an,{..._("comment"),label:_p.comment}),e(an,{..._("direction"),label:_p.direction,type:"number"}),t(x,{sx:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"12px"},children:[e(Cg,{..._("placement_date"),label:_p.placement_date,format:vp}),e(Cg,{..._("verification_date"),label:_p.verification_date,format:vp}),e(Cg,{..._("future_maintanance_date"),label:_p.future_maintanance_date,format:vp}),e(Cg,{..._("rapair_performed_date"),label:_p.rapair_performed_date,format:vp}),e(Cg,{..._("warranty_expr_date"),label:_p.warranty_expr_date,format:vp})]})]})}),e(oe,{value:"2",children:t(x,{sx:{display:"grid",gap:"24px"},children:[e(x,{children:e(pe,{onClick:()=>{A.append({...hp})},children:"Добавить новый traffic sign"})}),w.fields.map(({id:t},n)=>e(Rg,{children:e(Mg,{index:n,onDelete:o,onUpdate:a})},t)),A.fields.map(({id:t},n)=>e(Rg,{children:e(Ig,{onDelete:()=>{A.remove(n)},index:n})},t))]})})]}),e(pe,{type:"submit",children:"Сохранить"})]})});const __=Ym().shape({...o_,...a_,newDops:Jm().of(s_).required()});var y_=Fd(({onSubmit:r})=>{const[i,s]=n.useState("1"),[o,a]=n.useState(!1),l=Qt({resolver:g_(__),defaultValues:{...up}}),{control:u,register:c,setValue:h,watch:d,formState:{errors:f}}=l,p=Yt({control:u,name:"newDops"}),g=d("traffic_sign_number");return n.useEffect(()=>{Object.keys(f).length>0&&fu.warn({message:"Ошибки валидации формы",context:"TrafficSignCreateForm",meta:f})},[f]),t(nn,{form:l,onSubmit:r,children:[t(ie,{value:i,children:[e(x,{sx:{borderBottom:1,borderColor:"divider"},children:t(se,{onChange:(e,t)=>{s(t)},"aria-label":"lab API tabs example",children:[e(j,{label:"TrafficSign",value:"1",sx:{textTransform:"none"}}),e(j,{label:"TrafficSignDop",value:"2",sx:{textTransform:"none"}})]})}),e(oe,{value:"1",children:t(x,{sx:{display:"grid",gap:"12px"},children:[t(D,{expanded:o,children:[e(F,{expandIcon:e(re,{}),onClick:()=>{a(e=>!e)},"aria-controls":"panel1-content",id:"panel1-header",children:e(zg,{number:g})}),e(z,{children:e(Og,{trafficSigns:Qf,pageSize:5,onSelect:({title:e,number:t,type:n})=>{h("traffic_sign_number",t),h("traffic_sign_title",e),h("traffic_sign_type",n),a(!1)}})})]}),e(on,{...c("status"),label:_p.status,items:mp,getKey:({value:e})=>e,getLabel:({label:e})=>e,getValue:({value:e})=>e}),e(an,{...c("traffic_sign_value"),label:_p.traffic_sign_value}),e(an,{...c("comment"),label:_p.comment}),e(an,{...c("direction"),label:_p.direction,type:"number"}),t(x,{sx:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"12px"},children:[e(Cg,{...c("placement_date"),label:_p.placement_date,format:vp}),e(Cg,{...c("verification_date"),label:_p.verification_date,format:vp}),e(Cg,{...c("future_maintanance_date"),label:_p.future_maintanance_date,format:vp}),e(Cg,{...c("rapair_performed_date"),label:_p.rapair_performed_date,format:vp}),e(Cg,{...c("warranty_expr_date"),label:_p.warranty_expr_date,format:vp})]})]})}),e(oe,{value:"2",children:t(x,{sx:{display:"grid",gap:"24px"},children:[e(x,{children:e(pe,{onClick:()=>{p.append({...hp})},children:"Добавить новый traffic sign"})}),p.fields.map(({id:t},n)=>e(Rg,{children:e(Ig,{onDelete:()=>{p.remove(n)},index:n})},t))]})})]}),e(pe,{type:"submit",children:"Сохранить"})]})});const v_=e=>{const t=[],n={source:e,layer:pf.TRAFFIC_SIGNAL},r={},i="traffic_signal",s=`https://dalganmap.ru/api-image/images/msk/${i}/${i}_20.svg`;r[i]={url:s,filtering:"mipmap",sprites:{base:[0,0,20,20]}};const o={id:lh(),data:n,draw:{points:{collide:!1,texture:i,size:20,sprite:"base",placement:"midpoint"}},textures:r,sublayers:{}};return t.push(o),t},b_=e=>{const t=[],n={source:e,layer:pf.CAMERA},r={},i="camera";r[i]={url:`https://dalganmap.ru/api-image/images/msk/${i}/${i}_20.png`,filtering:"mipmap",sprites:{base:[0,0,20,20]}};const s={id:lh(),data:n,draw:{points:{collide:!1,texture:i,size:20,sprite:"base",placement:"midpoint"}},textures:r,sublayers:{}};return t.push(s),t},x_=e=>{const t=[],n={source:e,layer:pf.PILLAR},r={},i="pillar",s=`https://dalganmap.ru/api-image/images/msk/${i}/${i}_20.png`;r[i]={url:s,filtering:"mipmap",sprites:{base:[0,0,20,20]}};const o={id:lh(),data:n,draw:{points:{collide:!1,texture:i,size:20,sprite:"base",placement:"midpoint"}},textures:r,sublayers:{}};return t.push(o),t},w_=({id:e,data:{source:t,layer:n}})=>`${e}-${t}-${n}`,A_=({layer:e,order:t,eventHandlers:n})=>{const r=structuredClone(e),{draw:i,sublayers:s}=r,o=Boolean(n?.[e.data.layer]);if(i){const{points:e,lines:n,polygons:s,text:a,styles:l}=i;e&&(i.points={...structuredClone(e),order:t,interactive:o}),n&&(i.lines={...structuredClone(n),order:t,interactive:o}),s&&(i.polygons={...structuredClone(s),order:t,interactive:o}),a&&(i.text={...structuredClone(a),order:t,interactive:o}),l&&(i.styles=Object.entries(l).reduce((e,[n,r])=>({...e,[n]:{...structuredClone(r),order:t}}),{})),r.draw=structuredClone(i)}return s&&(Object.entries(s).forEach(([e,n])=>{if(n){const{draw:r}=n;if(r){const{points:e,lines:i,polygons:s,text:a}=r;a&&(r.text={...structuredClone(a),order:t,interactive:o}),e&&(r.points={...structuredClone(e),order:t,interactive:o}),i&&(r.lines={...structuredClone(i),order:t,interactive:o}),s&&(r.polygons={...structuredClone(s),order:t,interactive:o}),n.draw=structuredClone(r)}s[e]=structuredClone(n)}}),r.sublayers=structuredClone(s)),r},E_=e=>{const t=Gf(e),n=$f(),r=Xf(),i=Ef(e),s=Bf(e),o=Vf(e),a=zf(e),l=jf(e),u=[];if(e===gf.MSK)u.push(...t,...i,...s,...o,...a,...l);else u.push(...t,...i,...s,...n,...r,...o,...a,...l);return u},S_=e=>{const t=Kf(e),n=Ff(e),r=Lf(e),i=Nf(e),s=Df(e),o=[...r,...n,...t];if(e===gf.MSK);else o.push(...i,...s);return o},T_=e=>{const t=Pf(e),n=Mf(e);return[...t,...Sf(e),...n,...bp(e),...v_(e),...b_(e),...x_(e)]},k_=e=>{const t=[],n=Uf(e),r=E_(e),i=S_(e),s=T_(e),o=vf(e),a=bf(e),l=xf(e),u=wf(e);if(e===gf.MSK)t.push(...r,...i,...o,...a,...l,...u,...n,...s);else t.push(...r,...i,...n,...s);return t},O_=({eventHandlers:e})=>{const{instance:{isValidApiKey:t}}=hu,[r,i]=n.useState(null),s=n.useMemo(()=>{if(r){const{scene:e}=r;return e}return null},[r]),[o,a]=n.useState(null),l=n.useCallback(()=>{Promise.resolve().then(function(){return mb}).then(()=>{if(window.Tangram){const t=window.Tangram.leafletLayer({scene:Af}),{scene:n}=t;n.subscribe({load:({config:e})=>{a(e)}}),t.on("load",()=>{t.setSelectionEvents({click:({feature:t,leaflet_event:n})=>{if(t){const{source_layer:r,properties:i}=t;e?.[r]?.click?.({leaflet_event:n,properties:i})}},hover:({feature:t,leaflet_event:n})=>{if(t){const{source_layer:r,properties:i}=t;e?.[r]?.hover?.({leaflet_event:n,properties:i})}}})}),i(t)}})},[e]),u=n.useCallback(e=>{if(!s)return void fu.warn({message:"Scene не инициализирована"});if(!o)return void fu.warn({message:"Config не инициализирована"});const{name:t}=e;return o.sources[t]=structuredClone(e),s.updateConfig({rebuild:!0}),v()},[s,o]),c=n.useCallback(e=>{if(o)return structuredClone(o.sources[e]);fu.warn({message:"Config не инициализирована"})},[o]),h=n.useCallback((e,t)=>{if(s){if(o)return o.sources[e].url=t,s.updateConfig({rebuild:!0}),v();fu.warn({message:"Config не инициализирована"})}else fu.warn({message:"Scene не инициализирована"})},[o,s]),d=n.useCallback(t=>{if(!s)return void fu.warn({message:"Scene не инициализирован"});if(!o)return void fu.warn({message:"Config не инициализирован"});const n=_().length+1,r=A_({layer:t,order:n,eventHandlers:e}),i=w_(r),{sublayers:a,draw:l,textures:u}=r;if(l){const{styles:e}=l;e&&(r.draw={...structuredClone(r.draw),...structuredClone(e)})}return o.layers[i]={...structuredClone(r),...structuredClone(a)},o.textures={...structuredClone(o.textures),...structuredClone(u)},s.updateConfig({rebuild:!0}),_()},[o,s,e]),f=n.useCallback(e=>{if(!s)return void fu.warn({message:"Scene не инициализирован"});if(!o)return void fu.warn({message:"Config не инициализирован"});const t=w_(e);return o.layers[t]&&delete o.layers[t],s.updateConfig({rebuild:!0}),_()},[o,s]),p=n.useCallback(({name:e,style:t})=>{s?o?(o.styles[e]=structuredClone(t),s.updateConfig({rebuild:!0})):fu.warn({message:"Config не инициализирована"}):fu.warn({message:"Scene не инициализирована"})},[o,s]),g=n.useCallback(e=>{if(!o)return void fu.warn({message:"Config не инициализирована"});const t=w_(e),{visible:n}=o.layers[t];return n},[o]),m=n.useCallback(({layer:e,visible:t})=>{if(!s)return void fu.warn({message:"Config не инициализирована"});if(!o)return void fu.warn({message:"Config не инициализирована"});const n=w_(e);return o.layers[n].visible=t,s.updateConfig(),g(e)},[o,s]),_=n.useCallback(()=>{if(!o)return[];const{layers:e}=o;return Object.keys(e)},[o]),y=n.useCallback(()=>{if(!o)return[];const{layers:e}=o;Object.values(e).forEach(f)},[o]),v=n.useCallback(()=>{if(!o)return[];const{sources:e}=o;return Object.keys(e)},[o]);return n.useEffect(()=>(t&&l(),()=>{i(null),a(null)}),[t]),n.useEffect(()=>{p({name:"zebra_crossing",style:{base:"polygons",lighting:!1,shaders:{attributes:{a_angle:{type:"float",default:0}},uniforms:{u_stripe_width:1},blocks:{filter:"\n vec3 pos = worldPosition().xyz;\n\n float ang = radians(a_angle);\n\n vec2 dir = vec2(sin(ang), cos(ang));\n\n float positionAlongLine = dot(pos.xy, dir);\n\n float stripe = step(1.0, mod(positionAlongLine / u_stripe_width, 2.0));\n\n color.rgb = mix(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.8, 0.0), stripe);\n \n color.a = 1.0;\n "}}}}),Object.values(gf).forEach(e=>{u({tile_size:256,name:e,url:yf[e],type:"MVT"})})},[p,u]),{layer:r,scene:s,config:o,addSource:u,getSource:c,updateSource:h,addLayer:d,removeLayer:f,addStyle:p,getLayerVisibility:g,toggleLayerVisibility:m,getSources:v,getLayers:_,removeLayers:y}},R_=({source:e})=>{const{layer:t,addLayer:r}=O_({}),i=Mi();return n.useEffect(()=>{t&&i.addLayer(t)},[t]),n.useEffect(()=>{k_(e).map(r)},[r,e]),null},C_=({color:t="inherit"})=>e(V,{color:t}),P_=c(null),M_={didCatch:!1,error:null};class N_ extends y{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=M_}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(null!==e){for(var t,n,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];null===(t=(n=this.props).onReset)||void 0===t||t.call(n,{args:i,reason:"imperative-api"}),this.setState(M_)}}componentDidCatch(e,t){var n,r;null===(n=(r=this.props).onError)||void 0===n||n.call(r,e,t)}componentDidUpdate(e,t){const{didCatch:n}=this.state,{resetKeys:r}=this.props;var i,s;n&&null!==t.error&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}(e.resetKeys,r)&&(null===(i=(s=this.props).onReset)||void 0===i||i.call(s,{next:r,prev:e.resetKeys,reason:"keys"}),this.setState(M_))}render(){const{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:s}=this.state;let o=e;if(i){const e={error:s,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)o=t(e);else if(n)o=m(n,e);else{if(void 0===r)throw s;o=r}}return m(P_.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},o)}}const I_=({error:n,resetErrorBoundary:r})=>t(x,{role:"alert",sx:{padding:"20px",background:"#fee"},children:[e(b,{variant:"h2",children:"Ошибка приложения"}),e(b,{variant:"body1",color:"error",children:n.message}),e(pe,{onClick:r,children:"Попробовать снова"})]}),D_=({children:t,FallbackComponent:n=I_})=>e(N_,{FallbackComponent:n,children:t}),F_={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",bgcolor:"background.paper",border:"2px solid #000",boxShadow:24,p:4,maxHeight:"90vh",overflowX:"auto",overflowY:"auto"};var z_=Fd(({name:t,children:r,onClose:i,onOpen:s})=>{const o=n.useId(),{modalStore:a}=lu(),l=a.getIsVisible(t);return n.useEffect(()=>{l&&s?.({name:t})},[l]),e(le,{open:l,onClose:()=>{a.closeModal(t),i?.({name:t})},"aria-labelledby":`modal-${o}-title`,"aria-describedby":`modal-${o}-description`,children:e(ae,{sx:({breakpoints:e})=>({...F_,[e.up("sm")]:{minWidth:400},[e.down("sm")]:{minWidth:"80vw"}}),children:r})})}),L_={createDocument:function(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}},j_=Uint8Array,V_=Uint16Array,U_=Int32Array,B_=new j_([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),G_=new j_([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),$_=new j_([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),q_=function(e,t){for(var n=new V_(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new U_(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return{b:n,r:i}},H_=q_(B_,2),W_=H_.b,Z_=H_.r;W_[28]=258,Z_[258]=28;for(var K_=q_(G_,0).b,X_=new V_(32768),Y_=0;Y_<32768;++Y_){var Q_=(43690&Y_)>>1|(21845&Y_)<<1;Q_=(61680&(Q_=(52428&Q_)>>2|(13107&Q_)<<2))>>4|(3855&Q_)<<4,X_[Y_]=((65280&Q_)>>8|(255&Q_)<<8)>>1}var J_=function(e,t,n){for(var r=e.length,i=0,s=new V_(t);i<r;++i)e[i]&&++s[e[i]-1];var o,a=new V_(t);for(i=1;i<t;++i)a[i]=a[i-1]+s[i-1]<<1;if(n){o=new V_(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],h=a[e[i]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)o[X_[h]>>l]=u}else for(o=new V_(r),i=0;i<r;++i)e[i]&&(o[i]=X_[a[e[i]-1]++]>>15-e[i]);return o},ey=new j_(288);for(Y_=0;Y_<144;++Y_)ey[Y_]=8;for(Y_=144;Y_<256;++Y_)ey[Y_]=9;for(Y_=256;Y_<280;++Y_)ey[Y_]=7;for(Y_=280;Y_<288;++Y_)ey[Y_]=8;var ty=new j_(32);for(Y_=0;Y_<32;++Y_)ty[Y_]=5;var ny=J_(ey,9,1),ry=J_(ty,5,1),iy=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},sy=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},oy=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},ay=function(e){return(e+7)/8|0},ly=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new j_(e.subarray(t,n))},uy=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],cy=function(e,t,n){var r=new Error(t||uy[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,cy),!n)throw r;return r},hy=new j_(0),dy=function(e,t){return e[t]|e[t+1]<<8},fy=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},py=function(e,t){return fy(e,t)+4294967296*fy(e,t+4)};function gy(e,t){return function(e,t,n,r){var i=e.length,s=r?r.length:0;if(!i||t.f&&!t.l)return n||new j_(0);var o=!n,a=o||2!=t.i,l=t.i;o&&(n=new j_(3*i));var u=function(e){var t=n.length;if(e>t){var r=new j_(Math.max(2*t,e));r.set(n),n=r}},c=t.f||0,h=t.p||0,d=t.b||0,f=t.l,p=t.d,g=t.m,m=t.n,_=8*i;do{if(!f){c=sy(e,h,1);var y=sy(e,h+1,3);if(h+=3,!y){var v=e[(C=ay(h)+4)-4]|e[C-3]<<8,b=C+v;if(b>i){l&&cy(0);break}a&&u(d+v),n.set(e.subarray(C,b),d),t.b=d+=v,t.p=h=8*b,t.f=c;continue}if(1==y)f=ny,p=ry,g=9,m=5;else if(2==y){var x=sy(e,h,31)+257,w=sy(e,h+10,15)+4,A=x+sy(e,h+5,31)+1;h+=14;for(var E=new j_(A),S=new j_(19),T=0;T<w;++T)S[$_[T]]=sy(e,h+3*T,7);h+=3*w;var k=iy(S),O=(1<<k)-1,R=J_(S,k,1);for(T=0;T<A;){var C,P=R[sy(e,h,O)];if(h+=15&P,(C=P>>4)<16)E[T++]=C;else{var M=0,N=0;for(16==C?(N=3+sy(e,h,3),h+=2,M=E[T-1]):17==C?(N=3+sy(e,h,7),h+=3):18==C&&(N=11+sy(e,h,127),h+=7);N--;)E[T++]=M}}var I=E.subarray(0,x),D=E.subarray(x);g=iy(I),m=iy(D),f=J_(I,g,1),p=J_(D,m,1)}else cy(1);if(h>_){l&&cy(0);break}}a&&u(d+131072);for(var F=(1<<g)-1,z=(1<<m)-1,L=h;;L=h){var j=(M=f[oy(e,h)&F])>>4;if((h+=15&M)>_){l&&cy(0);break}if(M||cy(2),j<256)n[d++]=j;else{if(256==j){L=h,f=null;break}var V=j-254;if(j>264){var U=B_[T=j-257];V=sy(e,h,(1<<U)-1)+W_[T],h+=U}var B=p[oy(e,h)&z],G=B>>4;if(B||cy(3),h+=15&B,D=K_[G],G>3&&(U=G_[G],D+=oy(e,h)&(1<<U)-1,h+=U),h>_){l&&cy(0);break}a&&u(d+131072);var $=d+V;if(d<D){var q=s-D,H=Math.min(D,$);for(q+d<0&&cy(3);d<H;++d)n[d]=r[q+d]}for(;d<$;++d)n[d]=n[d-D]}}t.l=f,t.p=L,t.b=d,t.f=c,f&&(c=1,t.m=g,t.d=p,t.n=m)}while(!c);return d!=n.length&&o?ly(n,0,d):n.subarray(0,d)}(e,{i:2},t&&t.out,t&&t.dictionary)}var my="undefined"!=typeof TextDecoder&&new TextDecoder;try{my.decode(hy,{stream:!0})}catch(ib){}function _y(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(my)return my.decode(e);var i=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:ly(e,n-1)};i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}(e),s=i.s;return(n=i.r).length&&cy(8),s}var yy=function(e,t){return t+30+dy(e,t+26)+dy(e,t+28)},vy=function(e,t,n){var r=dy(e,t+28),i=_y(e.subarray(t+46,t+46+r),!(2048&dy(e,t+8))),s=t+46+r,o=fy(e,t+20),a=n&&4294967295==o?by(e,s):[o,fy(e,t+24),fy(e,t+42)],l=a[0],u=a[1],c=a[2];return[dy(e,t+10),l,u,i,s+dy(e,t+30)+dy(e,t+32),c]},by=function(e,t){for(;1!=dy(e,t);t+=4+dy(e,t+2));return[py(e,t+12),py(e,t+4),py(e,t+20)]};function xy(e){var t=function(e){for(var t={},n=e.length-22;101010256!=fy(e,n);--n)(!n||e.length-n>65558)&&cy(13);var r=dy(e,n+8);if(!r)return{};var i=fy(e,n+16),s=4294967295==i||65535==r;if(s){var o=fy(e,n-12);(s=101075792==fy(e,o))&&(r=fy(e,o+32),i=fy(e,o+48))}for(var a=0;a<r;++a){var l=vy(e,i,s),u=l[0],c=l[1],h=l[2],d=l[3],f=l[4],p=l[5],g=yy(e,p);i=f,u?8==u?t[d]=gy(e.subarray(g,g+c),{out:new j_(h)}):cy(14,"unknown compression type "+u):t[d]=ly(e,g,g+c)}return t}(new Uint8Array(e));return Promise.resolve(function(e){for(var t=[],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];t[i]=_y(e[i])}return t}(t))}function wy(e,t){for(var n=0;n<e.childNodes.length;){var r=e.childNodes[n];if(1===r.nodeType&&Ty(r)===t)return r;n++}}function Ay(e,t){for(var n=[],r=0;r<e.childNodes.length;){var i=e.childNodes[r];1===i.nodeType&&Ty(i)===t&&n.push(i),r++}return n}function Ey(e,t,n){for(var r=0;r<e.childNodes.length;){var i=e.childNodes[r];t?1===i.nodeType&&Ty(i)===t&&n(i,r):n(i,r),r++}}var Sy=/.+\:/;function Ty(e){return e.tagName.replace(Sy,"")}function ky(e){if(1!==e.nodeType)return e.textContent;for(var t="<"+Ty(e),n=0;n<e.attributes.length;)t+=" "+e.attributes[n].name+'="'+e.attributes[n].value+'"',n++;t+=">";for(var r=0;r<e.childNodes.length;)t+=ky(e.childNodes[r]),r++;return t+="</"+Ty(e)+">"}function Oy(e){var t,n,r=e.documentElement;return t=function(e){var t=wy(e,"t");if(t)return t.textContent;var n="";return Ey(e,"r",function(e){n+=wy(e,"t").textContent}),n},n=[],Ey(r,"si",function(e,r){n.push(t(e,r))}),n}function Ry(e,t){var n=t.createDocument(e),r={},i=function(e){return wy(e.documentElement,"workbookPr")}(n);i&&"1"===i.getAttribute("date1904")&&(r.epoch1904=!0),r.sheets=[];return function(e){return Ay(wy(e.documentElement,"sheets"),"sheet")}(n).forEach(function(e){e.getAttribute("name")&&r.sheets.push({id:e.getAttribute("sheetId"),name:e.getAttribute("name"),relationId:e.getAttribute("r:id")})}),r}function Cy(e,t){var n=t.createDocument(e),r={sheets:{},sharedStrings:void 0,styles:void 0};return function(e){return Ay(e.documentElement,"Relationship")}(n).forEach(function(e){var t=e.getAttribute("Target");switch(e.getAttribute("Type")){case"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles":r.styles=Py(t);break;case"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings":r.sharedStrings=Py(t);break;case"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet":r.sheets[e.getAttribute("Id")]=Py(t)}}),r}function Py(e){return"/"===e[0]?e.slice(1):"xl/"+e}function My(e){"@babel/helpers - typeof";return My="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},My(e)}function Ny(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Iy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ny(Object(n),!0).forEach(function(t){Dy(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ny(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Dy(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==My(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==My(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===My(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fy(e,t){if(!e)return{};var n=t.createDocument(e),r=function(e){var t=wy(e.documentElement,"cellStyleXfs");return t?Ay(t,"xf"):[]}(n).map(Ly),i=function(e){var t=wy(e.documentElement,"numFmts");return t?Ay(t,"numFmt"):[]}(n).map(zy).reduce(function(e,t){return e[t.id]=t,e},[]);return function(e){var t=wy(e.documentElement,"cellXfs");return t?Ay(t,"xf"):[]}(n).map(function(e){return e.hasAttribute("xfId")?Iy(Iy({},r[e.xfId]),Ly(e,i)):Ly(e,i)})}function zy(e){return{id:e.getAttribute("numFmtId"),template:e.getAttribute("formatCode")}}function Ly(e,t){var n={};if(e.hasAttribute("numFmtId")){var r=e.getAttribute("numFmtId");t[r]?n.numberFormat=t[r]:n.numberFormat={id:r}}return n}function jy(e,t){t&&t.epoch1904&&(e+=1462);return new Date(Math.round(24*(e-25569)*36e5))}function Vy(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Uy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Uy(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Uy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function By(e,t,n){if(e){var r=t[e];if(!r)throw new Error("Cell style not found: ".concat(e));if(!r.numberFormat)return!1;if(Gy.indexOf(Number(r.numberFormat.id))>=0||n.dateFormat&&r.numberFormat.template===n.dateFormat||!1!==n.smartDateParser&&r.numberFormat.template&&function(e){for(var t,n=Vy((e=(e=(e=e.toLowerCase()).replace($y,"")).replace(qy,"")).split(/\W+/));!(t=n()).done;){var r=t.value;if(Hy.indexOf(r)<0)return!1}return!0}(r.numberFormat.template))return!0}}var Gy=[14,15,16,17,18,19,20,21,22,27,30,36,45,46,47,50,57],$y=/^\[\$-414\]/,qy=/;@$/;var Hy=["ss","mm","h","hh","am","pm","d","dd","m","mm","mmm","mmmm","yy","yyyy","e"];function Wy(e,t,n){var r=n.getInlineStringValue,i=n.getInlineStringXml,s=n.getStyleId,o=n.styles,a=n.values,l=n.properties,u=n.options;switch(t||(t="n"),t){case"str":e=Zy(e,u);break;case"inlineStr":if(void 0===(e=r()))throw new Error('Unsupported "inline string" cell value structure: '.concat(i()));e=Zy(e,u);break;case"s":var c=Number(e);if(isNaN(c))throw new Error('Invalid "shared" string index: '.concat(e));if(c>=a.length)throw new Error('An out-of-bounds "shared" string index: '.concat(e));e=Zy(e=a[c],u);break;case"b":if("1"===e)e=!0;else{if("0"!==e)throw new Error('Unsupported "boolean" cell value: '.concat(e));e=!1}break;case"z":e=void 0;break;case"e":e=function(e){switch(e){case 0:return"#NULL!";case 7:return"#DIV/0!";case 15:return"#VALUE!";case 23:return"#REF!";case 29:return"#NAME?";case 36:return"#NUM!";case 42:return"#N/A";case 43:return"#GETTING_DATA";default:return"#ERROR_".concat(e)}}(e);break;case"d":if(void 0===e)break;var h=new Date(e);if(isNaN(h.valueOf()))throw new Error('Unsupported "date" cell value: '.concat(e));e=h;break;case"n":if(void 0===e)break;e=By(s(),o,u)?jy(e=Ky(e),l):(u.parseNumber||Ky)(e);break;default:throw new TypeError("Cell type not supported: ".concat(t))}return void 0===e&&(e=null),e}function Zy(e,t){return!1!==t.trim&&(e=e.trim()),""===e&&(e=void 0),e}function Ky(e){var t=Number(e);if(isNaN(t))throw new Error('Invalid "numeric" cell value: '.concat(e));return t}var Xy=["","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function Yy(e){for(var t=0,n=0;n<e.length;)t*=26,t+=Xy.indexOf(e[n]),n++;return t}function Qy(e){return e=e.split(/(\d+)/),[parseInt(e[1]),Yy(e[0].trim())]}function Jy(e,t,n,r,i,s,o){var a,l=Qy(e.getAttribute("r")),u=function(e,t){return wy(t,"v")}(0,e),c=u&&u.textContent;return e.hasAttribute("t")&&(a=e.getAttribute("t")),{row:l[0],column:l[1],value:Wy(c,a,{getInlineStringValue:function(){return function(e,t){if(t.firstChild&&"is"===Ty(t.firstChild)&&t.firstChild.firstChild&&"t"===Ty(t.firstChild.firstChild))return t.firstChild.firstChild.textContent}(0,e)},getInlineStringXml:function(){return ky(e)},getStyleId:function(){return e.getAttribute("s")},styles:i,values:r,properties:s,options:o})}}function ev(e,t,n,r,i,s){var o=function(e){var t=wy(e.documentElement,"sheetData"),n=[];return Ey(t,"row",function(e){Ey(e,"c",function(e){n.push(e)})}),n}(e);return 0===o.length?[]:o.map(function(e){return Jy(e,0,0,n,r,i,s)})}function tv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,0===t);else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rv(e){var t=function(e){var t=wy(e.documentElement,"dimension");if(t)return t.getAttribute("ref")}(e);if(t)return 1===(t=t.split(":").map(Qy).map(function(e){var t=tv(e,2);return{row:t[0],column:t[1]}})).length&&(t=[t[0],t[0]]),t}function iv(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return sv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sv(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function sv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ov(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return av(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return av(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function av(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,0===t);else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}(e,t)||uv(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uv(e,t){if(e){if("string"==typeof e)return cv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cv(e,t):void 0}}function cv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hv(e,t){var n=e.dimensions,r=e.cells;if(0===r.length)return[];var i=lv(n,2);i[0];for(var s=i[1],o=s.column,a=s.row,l=new Array(a),u=0;u<a;){l[u]=new Array(o);for(var c=0;c<o;)l[u][c]=null,c++;u++}for(var h,d=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=uv(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r);!(h=d()).done;){var f=h.value,p=f.row-1,g=f.column-1;g<o&&p<a&&(l[p][g]=f.value)}var m=t.rowIndexSourceMap;if(m)for(var _=0;_<l.length;)m[_]=_,_++;return l=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.rowIndexSourceMap,r=t.accessor,i=void 0===r?function(e){return e}:r,s=t.onlyTrimAtTheEnd,o=e.length-1;o>=0;){for(var a,l=!0,u=iv(e[o]);!(a=u()).done;)if(null!==i(a.value)){l=!1;break}if(l)e.splice(o,1),n&&n.splice(o,1);else if(s)break;o--}return e}(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.accessor,r=void 0===n?function(e){return e}:n,i=t.onlyTrimAtTheEnd,s=e[0].length-1;s>=0;){for(var o,a=!0,l=ov(e);!(o=l()).done;)if(null!==r(o.value[s])){a=!1;break}if(a)for(var u=0;u<e.length;)e[u].splice(s,1),u++;else if(i)break;s--}return e}(l,{onlyTrimAtTheEnd:!0}),{onlyTrimAtTheEnd:!0,rowIndexSourceMap:m}),t.transformData&&(l=t.transformData(l)),l}function dv(e){"@babel/helpers - typeof";return dv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dv(e)}function fv(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return pv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pv(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function pv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gv(Object(n),!0).forEach(function(t){_v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _v(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==dv(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==dv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===dv(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.sheet||(n=mv({sheet:1},n));var r=function(t){if(!e[t])throw new Error('"'.concat(t,'" file not found inside the *.xlsx file zip archive'));return e[t]},i=Cy(r("xl/_rels/workbook.xml.rels"),t),s=i.sharedStrings?function(e,t){return e?Oy(t.createDocument(e)):[]}(r(i.sharedStrings),t):[],o=i.styles?Fy(r(i.styles),t):{},a=Ry(r("xl/workbook.xml"),t);if(n.getSheets)return a.sheets.map(function(e){return{name:e.name}});var l=function(e,t){if("number"==typeof e){var n=t[e-1];return n&&n.relationId}for(var r,i=fv(t);!(r=i()).done;){var s=r.value;if(s.name===e)return s.relationId}}(n.sheet,a.sheets);if(!l||!i.sheets[l])throw function(e,t){var n=t&&t.map(function(e,t){return'"'.concat(e.name,'" (#').concat(t+1,")")}).join(", ");return new Error("Sheet ".concat("number"==typeof e?"#"+e:'"'+e+'"'," not found in the *.xlsx file.").concat(t?" Available sheets: "+n+".":""))}(n.sheet,a.sheets);var u=function(e,t,n,r,i,s){var o=t.createDocument(e),a=ev(o,0,n,r,i,s),l=rv(o)||function(e){var t=function(e,t){return e-t},n=e.map(function(e){return e.row}).sort(t),r=e.map(function(e){return e.column}).sort(t),i=n[0],s=n[n.length-1];return[{row:i,column:r[0]},{row:s,column:r[r.length-1]}]}(a);return{cells:a,dimensions:l}}(r(i.sheets[l]),t,s,o,a,n),c=hv(u,n=mv({rowIndexSourceMap:[]},n));return n.properties?{data:c,properties:a}:c}function vv(e){"@babel/helpers - typeof";return vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vv(e)}function bv(e){var t=Av();return function(){var n,r=Sv(e);if(t){var i=Sv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===vv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function xv(e){var t="function"==typeof Map?new Map:void 0;return xv=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return wv(e,arguments,Sv(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ev(r,e)},xv(e)}function wv(e,t,n){return wv=Av()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Ev(i,n.prototype),i},wv.apply(null,arguments)}function Av(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Ev(e,t){return Ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ev(e,t)}function Sv(e){return Sv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sv(e)}var Tv=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ev(e,t)}(n,xv(Error));var e,t=bv(n);function n(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,"invalid")).reason=e,r}return e=n,Object.defineProperty(e,"prototype",{writable:!1}),e}();function kv(e){if("string"==typeof e){var t=e;if(e=Number(e),String(e)!==t)throw new Tv("not_a_number")}if("number"!=typeof e)throw new Tv("not_a_number");if(isNaN(e))throw new Tv("invalid_number");if(!isFinite(e))throw new Tv("out_of_bounds");return e}function Ov(e){if("string"==typeof e)return e;if("number"==typeof e){if(isNaN(e))throw new Tv("invalid_number");if(!isFinite(e))throw new Tv("out_of_bounds");return String(e)}throw new Tv("not_a_string")}function Rv(e){if("boolean"==typeof e)return e;throw new Tv("not_a_boolean")}var Cv=["isColumnOriented","ignoreEmptyRows","rowIndexSourceMap"];function Pv(e){"@babel/helpers - typeof";return Pv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pv(e)}function Mv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,0===t);else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}(e,t)||Nv(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nv(e,t){if(e){if("string"==typeof e)return Iv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Iv(e,t):void 0}}function Iv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dv(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fv(Object(n),!0).forEach(function(t){Lv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lv(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Pv(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==Pv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Pv(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jv={schemaPropertyValueForMissingColumn:void 0,schemaPropertyValueForMissingValue:null,schemaPropertyShouldSkipRequiredValidationForMissingColumn:function(){return!1},getEmptyObjectValue:function(){return null},getEmptyArrayValue:function(){return null},isColumnOriented:!1,ignoreEmptyRows:!0,arrayValueSeparator:","};function Vv(e,t,n){var r=n=n?zv(zv({},jv),n):jv,i=r.isColumnOriented,s=r.ignoreEmptyRows,o=r.rowIndexSourceMap,a=Dv(r,Cv),l=o&&o.slice();!function(e){for(var t=0,n=Object.keys(e);t<n.length;t++){var r=n[t],i=e[r];if("object"===Pv(i.type)&&!Array.isArray(i.type))throw new Error("When defining a nested schema, use a `schema` property instead of a `type` property");if(!i.schema&&!i.column)throw new Error('"column" not defined for schema entry "'.concat(r,'".'))}}(t),i&&(e=qv(e)),s&&(e=e.filter(function(e,t){return!e.every(function(e){return null===e})||(l&&l.splice(t,1),!1)}));for(var u=e[0],c=[],h=[],d=1;d<e.length;d++){var f=Uv(t,e[d],d,void 0,u,h,a);c.push(f)}if(l)for(var p,g=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=Nv(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(h);!(p=g()).done;){var m=p.value;m.row=l[m.row-1]+1}return{rows:c,errors:h}}function Uv(e,t,n,r,i,s,o){for(var a={},l=!0,u=function(e){var t=e.schemaEntry,r=e.value,i=e.error,s=e.reason,o={error:i,row:n+1,column:t.column,value:r};return s&&(o.reason=s),t.type&&(o.type=t.type),o},c=[],h=function(){var h,p,g,m,_=f[d],y=e[_],v=_,b=y.column,x="".concat(r||"",".").concat(v),w=i.indexOf(b),A=w<0;if(A||(h=t[w]),y.schema)p=Uv(y.schema,t,n,x,i,s,o);else if(A)"schemaPropertyValueForMissingColumn"in o&&(p=o.schemaPropertyValueForMissingColumn);else if(void 0===h)"schemaPropertyValueForMissingValue"in o&&(p=o.schemaPropertyValueForMissingValue);else if(null===h)"schemaPropertyValueForMissingValue"in o&&(p=o.schemaPropertyValueForMissingValue);else if(Array.isArray(y.type)){var E=function(e,t){var n=[],r=0;for(;r<e.length;){var i=Mv($v(e,t,r),2),s=i[0];r+=i[1]+t.length,n.push(s.trim())}return n}(h,o.arrayValueSeparator).map(function(e){if(!g){var t=Bv(e,y,o);return t.error&&(p=e,g=t.error,m=t.reason),t.value}});if(!g){var S=E.every(Hv);p=S?o.getEmptyArrayValue(E,{path:x}):E}}else{var T=Bv(h,y,o);g=T.error,m=T.reason,p=g?h:T.value}!g&&Hv(p)&&y.required&&c.push({schemaEntry:y,value:p,isMissingColumn:A}),g?s.push(u({schemaEntry:y,value:p,error:g,reason:m})):(l&&!Hv(p)&&(l=!1),void 0!==p&&(a[v]=p))},d=0,f=Object.keys(e);d<f.length;d++)h();if(l)return o.getEmptyObjectValue(a,{path:r});for(var p=0,g=c;p<g.length;p++){var m=g[p],_=m.schemaEntry,y=m.value;if(!(m.isMissingColumn&&o.schemaPropertyShouldSkipRequiredValidationForMissingColumn(_.column,{object:a}))){var v=_.required;("boolean"==typeof v?v:v(a))&&s.push(u({schemaEntry:_,value:y,error:"required"}))}}return a}function Bv(e,t,n){if(null===e)return{value:null};var r;if(t.parse)throw new Error("`schemaEntry.parse` property was renamed to `schemaEntry.type`");if(r=t.type?function(e,t,n){switch(t){case String:return Gv(e,Ov);case Number:return Gv(e,kv);case Date:return Gv(e,function(e){return function(e,t){var n=t.properties;if(e instanceof Date){if(isNaN(e.valueOf()))throw new Tv("out_of_bounds");return e}if("number"==typeof e){if(isNaN(e))throw new Tv("invalid_number");if(!isFinite(e))throw new Tv("out_of_bounds");var r=jy(e,n);if(isNaN(r.valueOf()))throw new Tv("out_of_bounds");return r}throw new Tv("not_a_date")}(e,{properties:n.properties})});case Boolean:return Gv(e,Rv);default:if("function"==typeof t)return Gv(e,t);throw new Error("Unsupported schema type: ".concat(t&&t.name||t))}}(e,Array.isArray(t.type)?t.type[0]:t.type,n):{value:e},r.error)return r;if(null!==r.value){if(t.oneOf&&t.oneOf.indexOf(r.value)<0)return{error:"invalid",reason:"unknown"};if(t.validate)try{t.validate(r.value)}catch(e){return{error:e.message}}}return r}function Gv(e,t){try{var n=t(e);return void 0===n?{value:null}:{value:n}}catch(e){var r={error:e.message};return e.reason&&(r.reason=e.reason),r}}function $v(e,t,n){for(var r=0,i="";n+r<e.length;){var s=e[n+r];if(s===t)return[i,r];if('"'===s){var o=$v(e,'"',n+r+1);i+=o[0],r+=1+o[1]+1}else i+=s,r++}return[i,r]}var qv=function(e){return e[0].map(function(t,n){return e.map(function(e){return e[n]})})};function Hv(e){return null==e}function Wv(e){"@babel/helpers - typeof";return Wv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wv(e)}var Zv=["schema"];function Kv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kv(Object(n),!0).forEach(function(t){Yv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Yv(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Wv(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==Wv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Wv(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qv(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Jv(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(t=e,t instanceof File||t instanceof Blob?t.arrayBuffer().then(xy):xy(t)).then(function(e){return function(e,t,n){var r=n.schema,i=Qv(n,Zv);if(i.map)throw new Error("`map` option was removed. Pass a `schema` option instead.");var s=yv(e,t,Xv(Xv({},i),{},{properties:r||i.properties}));return r?Vv(s.data,r,Xv(Xv({},i),{},{properties:s.properties})):s}(e,L_,n)})}const eb=({onParsed:t})=>{const[r,i]=n.useState(!1);return e(me,{accept:".xlsx, .xls",loading:r,onFilesLoad:({files:e})=>{const n=e[0];i(!0),Jv(n).then(e=>{t(e)}).finally(()=>{i(!1)})},children:"Загрузить файлы excel"})};var tb,nb={exports:{}};
22
22
  /* @license
23
23
  Papa Parse
24
24
  v5.5.3