@sistemas-ucol-mx/ucol-dynamic 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -299,7 +299,7 @@ declare interface DirectPermissions {
299
299
  v?: boolean;
300
300
  }
301
301
 
302
- export declare const DynamicCrud: <T extends Record<string, unknown>>({ columns, data, title, formTitle, formTitles, description, formDescription, fields, showCreateButton, createButtonText, createButtonIcon, icon, layout, actionConfig, searchConfig, headerDirection, showRefreshButton, onRefresh, loading, onCreate, createRedirect, onEdit, onDelete, onView, submitButtonText, apiConfig, initialData, themeConfig, moreActions, formCols, formCustomCols, exportToExcel, backButton, showSearchBar, customFilters, disableWrapper, hiddenActions, widthActionsCol, crudName, permissions, paginationConfig, bulkUpload }: DynamicCrudProps<T>) => ReactNode;
302
+ export declare const DynamicCrud: <T extends Record<string, unknown>>({ columns, data, title, formTitle, formTitles, description, formDescription, fields, showCreateButton, createButtonText, createButtonIcon, icon, layout, actionConfig, searchConfig, headerDirection, showRefreshButton, onRefresh, loading, onCreate, createRedirect, onEdit, onDelete, onView, submitButtonText, apiConfig, initialData, themeConfig, moreActions, formCols, formCustomCols, exportToExcel, backButton, showSearchBar, customFilters, disableWrapper, hiddenActions, widthActionsCol, crudName, permissions, paginationConfig, bulkUpload, borderedTable, sizeTable, }: DynamicCrudProps<T>) => ReactNode;
303
303
 
304
304
  export declare interface DynamicCrudProps<T extends Record<string, unknown>> {
305
305
  title?: string | ReactElement;
@@ -353,6 +353,8 @@ export declare interface DynamicCrudProps<T extends Record<string, unknown>> {
353
353
  view?: boolean;
354
354
  refresh?: boolean;
355
355
  };
356
+ borderedTable?: boolean;
357
+ sizeTable?: "small" | "middle" | "large";
356
358
  }
357
359
 
358
360
  export declare const DynamicForm: ({ mode, title, description, icon, layout, cols, fields, submitButtonText, submitEditText, onSubmit, initialData, customCols, }: DynamicFormProps) => default_2.ReactNode;
@@ -373,7 +375,7 @@ declare interface DynamicFormProps {
373
375
  customCols?: boolean;
374
376
  }
375
377
 
376
- export declare const DynamicTable: <T extends Record<string, unknown>>({ title, icon: Icon, description, showSearchBar, showCreateButton, onCreate, onEdit, onDelete, onView, onRefresh, exportToExcel, createButtonText, createButtonIcon, columns, data, loading, moreActions, customFilters, disableWrapper, actionConfig, showRefreshButton, hiddenActions, searchConfig, backButton, widthActionsCol, bulkUpload, onBulkUpload, paginationConfig, }: DynamicTableProps<T>) => default_2.ReactNode;
378
+ export declare const DynamicTable: <T extends Record<string, unknown>>({ title, icon: Icon, description, showSearchBar, showCreateButton, onCreate, onEdit, onDelete, onView, onRefresh, exportToExcel, createButtonText, createButtonIcon, columns, data, loading, moreActions, customFilters, disableWrapper, actionConfig, showRefreshButton, hiddenActions, searchConfig, backButton, widthActionsCol, bulkUpload, onBulkUpload, paginationConfig, borderedTable, sizeTable, }: DynamicTableProps<T>) => default_2.ReactNode;
377
379
 
378
380
  export declare interface DynamicTableProps<T = Record<string, unknown>> {
379
381
  title?: string | ReactElement;
@@ -408,6 +410,8 @@ export declare interface DynamicTableProps<T = Record<string, unknown>> {
408
410
  bulkUpload?: BulkUploadProps;
409
411
  onBulkUpload?: () => void;
410
412
  paginationConfig?: PaginationConfig | false;
413
+ borderedTable?: boolean;
414
+ sizeTable?: "small" | "middle" | "large";
411
415
  }
412
416
 
413
417
  export declare interface ExcelConfigProps<T = Record<string, unknown>> {
@@ -7,19 +7,18 @@ return ne.jsxs("div",{children:[
7
7
  /* @__PURE__ */ne.jsxs("div",{className:"flex items-center gap-4",children:[l&&t.cloneElement(l),
8
8
  /* @__PURE__ */ne.jsx("span",{className:"font-semibold",children:a})]}),
9
9
  /* @__PURE__ */ne.jsx("p",{className:"text-sm text-gray-500",children:i})]}),
10
- /* @__PURE__ */ne.jsxs(b,{form:y,layout:s,initialValues:h,onFinish:e=>{const t={...e};c.filter((e=>"object"==typeof e&&!Array.isArray(e))).forEach((e=>{"datepicker"===e.type&&t[e.name]&&(t[e.name]=I(t[e.name]).format(e.datepickerConfig?.format||"YYYY-MM-DD")),e.submitKey&&void 0!==t[e.name]&&(t[e.submitKey]=t[e.name],e.submitKey!==e.name&&delete t[e.name])}));const n=je(t);p?.(n)},onValuesChange:j,children:[(q=c,m?q.map((e=>Array.isArray(e)?e:[e])):W(q)).map(((e,t)=>/* @__PURE__ */ne.jsx(v,{gutter:16,children:e.map(((n,r)=>/* @__PURE__ */ne.jsx(w,{span:24/e.length,children:U(n)},`${t}-${r}`)))},t))),c.filter((t=>"object"==typeof t&&!Array.isArray(t)&&(!0===t.hidden||"create"===t.hiddenIn&&"create"===e||"edit"===t.hiddenIn&&"update"===e))).map((e=>/* @__PURE__ */ne.jsx(b.Item,{name:e.name,hidden:!0,children:/* @__PURE__ */ne.jsx(k,{type:"hidden"})},e.name))),"view"!==e&&/* @__PURE__ */ne.jsx(v,{justify:"end",children:/* @__PURE__ */ne.jsx(b.Item,{children:/* @__PURE__ */ne.jsx(g,{type:"primary",htmlType:"submit",className:"bg-primary",style:{color:"white"},children:"update"===e?f:d})})})]})]});var q};function Ie(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5.82843 6.99955L8.36396 9.53509L6.94975 10.9493L2 5.99955L6.94975 1.0498L8.36396 2.46402L5.82843 4.99955H13C17.4183 4.99955 21 8.58127 21 12.9996C21 17.4178 17.4183 20.9996 13 20.9996H4V18.9996H13C16.3137 18.9996 19 16.3133 19 12.9996C19 9.68584 16.3137 6.99955 13 6.99955H5.82843Z"},child:[]}]})(e)}function He(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M6.41421 15.89L16.5563 5.74785L15.1421 4.33363L5 14.4758V15.89H6.41421ZM7.24264 17.89H3V13.6473L14.435 2.21231C14.8256 1.82179 15.4587 1.82179 15.8492 2.21231L18.6777 5.04074C19.0682 5.43126 19.0682 6.06443 18.6777 6.45495L7.24264 17.89ZM3 19.89H21V21.89H3V19.89Z"},child:[]}]})(e)}function Ve(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M2.85858 2.87732L15.4293 1.0815C15.7027 1.04245 15.9559 1.2324 15.995 1.50577C15.9983 1.52919 16 1.55282 16 1.57648V22.4235C16 22.6996 15.7761 22.9235 15.5 22.9235C15.4763 22.9235 15.4527 22.9218 15.4293 22.9184L2.85858 21.1226C2.36593 21.0522 2 20.6303 2 20.1327V3.86727C2 3.36962 2.36593 2.9477 2.85858 2.87732ZM4 4.73457V19.2654L14 20.694V3.30599L4 4.73457ZM17 19H20V4.99997H17V2.99997H21C21.5523 2.99997 22 3.44769 22 3.99997V20C22 20.5523 21.5523 21 21 21H17V19ZM10.2 12L13 16H10.6L9 13.7143L7.39999 16H5L7.8 12L5 7.99997H7.39999L9 10.2857L10.6 7.99997H13L10.2 12Z"},child:[]}]})(e)}function Be(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M11 11V7H13V11H17V13H13V17H11V13H7V11H11ZM12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z"},child:[]}]})(e)}function We(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z"},child:[]}]})(e)}function Ue(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z"},child:[]}]})(e)}function qe(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5.46257 4.43262C7.21556 2.91688 9.5007 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C9.84982 4 7.89777 4.84827 6.46023 6.22842L5.46257 4.43262ZM18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 9.86386 2.66979 7.88416 3.8108 6.25944L7 12H4C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z"},child:[]}]})(e)}function Xe(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z"},child:[]}]})(e)}const{Search:Qe}=k,Ge=({title:e,icon:r,description:o,showSearchBar:i=!0,showCreateButton:l,onCreate:s,onEdit:u,onDelete:c,onView:d,onRefresh:f,exportToExcel:p,createButtonText:h="Crear",createButtonIcon:m=/* @__PURE__ */ne.jsx(Be,{}),columns:y,data:b,loading:v,moreActions:w,customFilters:k,disableWrapper:S=!1,actionConfig:x={showDefaultActions:!0,showEdit:!0,showDelete:!0,showView:!1,refreshButtonText:"Refrescar",useDefaultDeleteConfirm:!0,customIcons:{create:/* @__PURE__ */ne.jsx(Be,{}),edit:/* @__PURE__ */ne.jsx(He,{}),delete:/* @__PURE__ */ne.jsx(We,{}),refresh:/* @__PURE__ */ne.jsx(qe,{}),view:/* @__PURE__ */ne.jsx(Ue,{})},customActionsColor:{edit:"!bg-yellow-500 hover:!bg-yellow-700",delete:"!bg-red-500 hover:!bg-red-700",view:"!bg-sky-500 hover:!bg-sky-700"}},showRefreshButton:C,hiddenActions:E=!1,searchConfig:P={searchableFields:[],customSearch:void 0},backButton:N,widthActionsCol:T,bulkUpload:O,onBulkUpload:z,paginationConfig:F})=>{const[R,j]=n(""),D=e=>"object"==typeof e&&null!==e&&"items"in e&&"pagination"in e,A=a((()=>D(b)?b.items:b),[b]),M=a((()=>{if(D(b))return b.pagination}),[b]),I="transition-all duration-300 shadow-xs hover:shadow-sm",H="flex-1 xs:flex-initial bg-white hover:bg-gray-50 border border-gray-200 px-3 h-8 text-sm dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:text-white",B="rounded-lg h-8 w-8 flex items-center justify-center !text-white !border-none flex-shrink-0",W="!bg-yellow-500 hover:!bg-yellow-700 dark:!bg-yellow-600 dark:hover:!bg-yellow-800 hover:!border hover:!border-yellow-500",U="!bg-red-500 hover:!bg-red-700 dark:!bg-red-600 dark:hover:!bg-red-800 hover:!border hover:!border-red-500",q="bg-sky-500 hover:bg-sky-700 dark:bg-sky-600 dark:hover:bg-sky-800 hover:!text-sky-500 hover:!border hover:!border-sky-500",X=a((()=>A.map(((e,t)=>({...e,key:t})))),[A]),Q=(e,t)=>Object.values(e).some((e=>null!=e&&("object"==typeof e?"object"==typeof e&&null!==e&&!Array.isArray(e)&&Q(e,t):e.toString().toLowerCase().includes(t.toLowerCase())))),G=a((()=>R?X.filter((e=>{const t=e;return P.customSearch?P.customSearch(t,R):P.searchableFields&&P.searchableFields.length>0?((e,t,n)=>n.some((n=>{const r=n.includes(".")?Fe(e,n):e[n];return null!=r&&r.toString().toLowerCase().includes(t.toLowerCase())})))(t,R,P.searchableFields):Q(e,R)})):X),[X,R,P]),Y=e=>{j(e)},K=a((()=>{if(!1===F)return!1;const e=()=>F?.showTotal?"function"==typeof F.showTotal?F.showTotal:e=>`Total ${e} registros`:e=>`Total ${e} registros${R?" filtrados":""}`;return M?{current:M.current_page,pageSize:M.per_page,total:M.total,showSizeChanger:F?.showSizeChanger??!0,showTotal:e(),pageSizeOptions:F?.pageSizeOptions||["10","20","50","100"],onChange:(e,t)=>{F?.onChange?.(e,t)}}:{defaultPageSize:F?.defaultPageSize||10,showSizeChanger:F?.showSizeChanger??!0,showTotal:e(),pageSizeOptions:F?.pageSizeOptions||["10","20","50","100"],onChange:F?.onChange,onShowSizeChange:F?.onShowSizeChange}}),[F,M,R]),Z=e=>{u?.(e)},J=e=>{c?.(e)},ee=e=>{d?.(e)},te=()=>N?"boolean"==typeof N?/* @__PURE__ */ne.jsx(g,{icon:/* @__PURE__ */ne.jsx(Ie,{}),className:`${I} ${H} px-4`,onClick:()=>window.history.back(),children:"Volver"}):N:null;/* @__PURE__ */
11
- return ne.jsxs("div",{className:"my-1 "+(S?"":"bg-white rounded-xl shadow-lg p-1 dark:bg-gray-800"),children:[
12
- /* @__PURE__ */ne.jsxs("div",{className:"mb-2 space-y-3 sm:space-y-3",children:[e&&/* @__PURE__ */ne.jsxs("div",{className:"mb-3 sm:mb-4 space-y-2",children:[
13
- /* @__PURE__ */ne.jsxs("div",{className:"flex items-center gap-3",children:[te&&/* @__PURE__ */ne.jsx("div",{children:te()}),r&&/* @__PURE__ */ne.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-full bg-primary-lightest hover:bg-primary-lightest/70 transition-colors dark:bg-primary-dark dark:hover:bg-primary-dark/70",children:t.isValidElement(r)?t.cloneElement(r):r}),
10
+ /* @__PURE__ */ne.jsxs(b,{form:y,layout:s,initialValues:h,onFinish:e=>{const t={...e};c.filter((e=>"object"==typeof e&&!Array.isArray(e))).forEach((e=>{"datepicker"===e.type&&t[e.name]&&(t[e.name]=I(t[e.name]).format(e.datepickerConfig?.format||"YYYY-MM-DD")),e.submitKey&&void 0!==t[e.name]&&(t[e.submitKey]=t[e.name],e.submitKey!==e.name&&delete t[e.name])}));const n=je(t);p?.(n)},onValuesChange:j,children:[(q=c,m?q.map((e=>Array.isArray(e)?e:[e])):W(q)).map(((e,t)=>/* @__PURE__ */ne.jsx(v,{gutter:16,children:e.map(((n,r)=>/* @__PURE__ */ne.jsx(w,{span:24/e.length,children:U(n)},`${t}-${r}`)))},t))),c.filter((t=>"object"==typeof t&&!Array.isArray(t)&&(!0===t.hidden||"create"===t.hiddenIn&&"create"===e||"edit"===t.hiddenIn&&"update"===e))).map((e=>/* @__PURE__ */ne.jsx(b.Item,{name:e.name,hidden:!0,children:/* @__PURE__ */ne.jsx(k,{type:"hidden"})},e.name))),"view"!==e&&/* @__PURE__ */ne.jsx(v,{justify:"end",children:/* @__PURE__ */ne.jsx(b.Item,{children:/* @__PURE__ */ne.jsx(g,{type:"primary",htmlType:"submit",className:"bg-primary",style:{color:"white"},children:"update"===e?f:d})})})]})]});var q};function Ie(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5.82843 6.99955L8.36396 9.53509L6.94975 10.9493L2 5.99955L6.94975 1.0498L8.36396 2.46402L5.82843 4.99955H13C17.4183 4.99955 21 8.58127 21 12.9996C21 17.4178 17.4183 20.9996 13 20.9996H4V18.9996H13C16.3137 18.9996 19 16.3133 19 12.9996C19 9.68584 16.3137 6.99955 13 6.99955H5.82843Z"},child:[]}]})(e)}function He(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M6.41421 15.89L16.5563 5.74785L15.1421 4.33363L5 14.4758V15.89H6.41421ZM7.24264 17.89H3V13.6473L14.435 2.21231C14.8256 1.82179 15.4587 1.82179 15.8492 2.21231L18.6777 5.04074C19.0682 5.43126 19.0682 6.06443 18.6777 6.45495L7.24264 17.89ZM3 19.89H21V21.89H3V19.89Z"},child:[]}]})(e)}function Ve(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M2.85858 2.87732L15.4293 1.0815C15.7027 1.04245 15.9559 1.2324 15.995 1.50577C15.9983 1.52919 16 1.55282 16 1.57648V22.4235C16 22.6996 15.7761 22.9235 15.5 22.9235C15.4763 22.9235 15.4527 22.9218 15.4293 22.9184L2.85858 21.1226C2.36593 21.0522 2 20.6303 2 20.1327V3.86727C2 3.36962 2.36593 2.9477 2.85858 2.87732ZM4 4.73457V19.2654L14 20.694V3.30599L4 4.73457ZM17 19H20V4.99997H17V2.99997H21C21.5523 2.99997 22 3.44769 22 3.99997V20C22 20.5523 21.5523 21 21 21H17V19ZM10.2 12L13 16H10.6L9 13.7143L7.39999 16H5L7.8 12L5 7.99997H7.39999L9 10.2857L10.6 7.99997H13L10.2 12Z"},child:[]}]})(e)}function Be(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M11 11V7H13V11H17V13H13V17H11V13H7V11H11ZM12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z"},child:[]}]})(e)}function We(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z"},child:[]}]})(e)}function Ue(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z"},child:[]}]})(e)}function qe(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5.46257 4.43262C7.21556 2.91688 9.5007 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C9.84982 4 7.89777 4.84827 6.46023 6.22842L5.46257 4.43262ZM18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 9.86386 2.66979 7.88416 3.8108 6.25944L7 12H4C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z"},child:[]}]})(e)}function Xe(e){return fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z"},child:[]}]})(e)}const{Search:Qe}=k,Ge=({title:e,icon:r,description:o,showSearchBar:i=!0,showCreateButton:l,onCreate:s,onEdit:u,onDelete:c,onView:d,onRefresh:f,exportToExcel:p,createButtonText:h="Crear",createButtonIcon:m=/* @__PURE__ */ne.jsx(Be,{}),columns:y,data:b,loading:v,moreActions:w,customFilters:k,disableWrapper:S=!1,actionConfig:x={showDefaultActions:!0,showEdit:!0,showDelete:!0,showView:!1,refreshButtonText:"Refrescar",useDefaultDeleteConfirm:!0,customIcons:{create:/* @__PURE__ */ne.jsx(Be,{}),edit:/* @__PURE__ */ne.jsx(He,{}),delete:/* @__PURE__ */ne.jsx(We,{}),refresh:/* @__PURE__ */ne.jsx(qe,{}),view:/* @__PURE__ */ne.jsx(Ue,{})},customActionsColor:{edit:"!bg-yellow-500 hover:!bg-yellow-700",delete:"!bg-red-500 hover:!bg-red-700",view:"!bg-sky-500 hover:!bg-sky-700"}},showRefreshButton:C,hiddenActions:E=!1,searchConfig:P={searchableFields:[],customSearch:void 0},backButton:N,widthActionsCol:T,bulkUpload:O,onBulkUpload:z,paginationConfig:F,borderedTable:R=!0,sizeTable:j="middle"})=>{const[D,A]=n(""),M=e=>"object"==typeof e&&null!==e&&"items"in e&&"pagination"in e,I=a((()=>M(b)?b.items:b),[b]),H=a((()=>{if(M(b))return b.pagination}),[b]),B="transition-all duration-300 shadow-xs hover:shadow-sm",W="flex-1 xs:flex-initial bg-white hover:bg-gray-50 border border-gray-200 px-3 h-8 text-sm dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:text-white",U="rounded-lg h-8 w-8 flex items-center justify-center !text-white !border-none flex-shrink-0",q="!bg-yellow-500 hover:!bg-yellow-700 dark:!bg-yellow-600 dark:hover:!bg-yellow-800 hover:!border hover:!border-yellow-500",X="!bg-red-500 hover:!bg-red-700 dark:!bg-red-600 dark:hover:!bg-red-800 hover:!border hover:!border-red-500",Q="bg-sky-500 hover:bg-sky-700 dark:bg-sky-600 dark:hover:bg-sky-800 hover:!text-sky-500 hover:!border hover:!border-sky-500",G=a((()=>I.map(((e,t)=>({...e,key:t})))),[I]),Y=(e,t)=>Object.values(e).some((e=>null!=e&&("object"==typeof e?"object"==typeof e&&null!==e&&!Array.isArray(e)&&Y(e,t):e.toString().toLowerCase().includes(t.toLowerCase())))),K=a((()=>D?G.filter((e=>{const t=e;return P.customSearch?P.customSearch(t,D):P.searchableFields&&P.searchableFields.length>0?((e,t,n)=>n.some((n=>{const r=n.includes(".")?Fe(e,n):e[n];return null!=r&&r.toString().toLowerCase().includes(t.toLowerCase())})))(t,D,P.searchableFields):Y(e,D)})):G),[G,D,P]),Z=e=>{A(e)},J=a((()=>{if(!1===F)return!1;const e=()=>F?.showTotal?"function"==typeof F.showTotal?F.showTotal:e=>`Total ${e} registros`:e=>`Total ${e} registros${D?" filtrados":""}`;return H?{current:H.current_page,pageSize:H.per_page,total:H.total,showSizeChanger:F?.showSizeChanger??!0,showTotal:e(),pageSizeOptions:F?.pageSizeOptions||["10","20","50","100"],onChange:(e,t)=>{F?.onChange?.(e,t)}}:{defaultPageSize:F?.defaultPageSize||10,showSizeChanger:F?.showSizeChanger??!0,showTotal:e(),pageSizeOptions:F?.pageSizeOptions||["10","20","50","100"],onChange:F?.onChange,onShowSizeChange:F?.onShowSizeChange}}),[F,H,D]),ee=e=>{u?.(e)},te=e=>{c?.(e)},re=e=>{d?.(e)},oe=()=>N?"boolean"==typeof N?/* @__PURE__ */ne.jsx(g,{icon:/* @__PURE__ */ne.jsx(Ie,{}),className:`${B} ${W} px-4`,onClick:()=>window.history.back(),children:"Volver"}):N:null;/* @__PURE__ */
11
+ return ne.jsxs("div",{className:""+(S?"":"bg-white rounded-xl shadow-lg p-1 dark:bg-gray-800 my-1"),children:[e||o?/* @__PURE__ */ne.jsxs("div",{className:"mb-2 space-y-3 sm:space-y-3",children:[e&&/* @__PURE__ */ne.jsxs("div",{className:"mb-3 sm:mb-4 space-y-2",children:[
12
+ /* @__PURE__ */ne.jsxs("div",{className:"flex items-center gap-3",children:[oe&&/* @__PURE__ */ne.jsx("div",{children:oe()}),r&&/* @__PURE__ */ne.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-full bg-primary-lightest hover:bg-primary-lightest/70 transition-colors dark:bg-primary-dark dark:hover:bg-primary-dark/70",children:t.isValidElement(r)?t.cloneElement(r):r}),
14
13
  /* @__PURE__ */ne.jsx("h1",{className:"text-xl font-semibold dark:text-white",children:e})]}),o&&/* @__PURE__ */ne.jsx("span",{className:"text-gray-700 block pl-[3.25rem] sm:pl-[3.25rem] dark:text-gray-300",children:o})]}),
15
- /* @__PURE__ */ne.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[i&&/* @__PURE__ */ne.jsx("div",{className:"flex-1 sm:max-w-md lg:max-w-lg",children:/* @__PURE__ */ne.jsx(Qe,{allowClear:!0,className:"!w-full dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400",placeholder:"Buscar",onChange:e=>Y(e.target.value),onSearch:Y})}),
16
- /* @__PURE__ */ne.jsxs("div",{className:"flex items-center gap-2 sm:flex-shrink-0",children:[p&&/* @__PURE__ */ne.jsxs(g,{icon:/* @__PURE__ */ne.jsx(Ve,{}),className:p.buttonProps?.className||`${I} ${H}`,style:p.buttonProps?.style,onClick:()=>{if(!p)return;const{fileName:e,sheetName:t,data:n,columns:r}=p,o=n.map((e=>{const t={};return r.forEach((n=>{const r=n.dataIndex;r?.includes(".")?t[n.title]=Fe(e,r):t[n.title]=e[r]})),t})),a=V.utils.book_new(),i=V.utils.json_to_sheet(o);V.utils.book_append_sheet(a,i,t),V.writeFile(a,`${e}.xlsx`)},children:[
14
+ /* @__PURE__ */ne.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[i&&/* @__PURE__ */ne.jsx("div",{className:"flex-1 sm:max-w-md lg:max-w-lg",children:/* @__PURE__ */ne.jsx(Qe,{allowClear:!0,className:"!w-full dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400",placeholder:"Buscar",onChange:e=>Z(e.target.value),onSearch:Z})}),
15
+ /* @__PURE__ */ne.jsxs("div",{className:"flex items-center gap-2 sm:flex-shrink-0",children:[p&&/* @__PURE__ */ne.jsxs(g,{icon:/* @__PURE__ */ne.jsx(Ve,{}),className:p.buttonProps?.className||`${B} ${W}`,style:p.buttonProps?.style,onClick:()=>{if(!p)return;const{fileName:e,sheetName:t,data:n,columns:r}=p,o=n.map((e=>{const t={};return r.forEach((n=>{const r=n.dataIndex;r?.includes(".")?t[n.title]=Fe(e,r):t[n.title]=e[r]})),t})),a=V.utils.book_new(),i=V.utils.json_to_sheet(o);V.utils.book_append_sheet(a,i,t),V.writeFile(a,`${e}.xlsx`)},children:[
17
16
  /* @__PURE__ */ne.jsx("span",{className:"hidden sm:inline",children:p.buttonProps?.text||"Exportar a Excel"}),
18
- /* @__PURE__ */ne.jsx("span",{className:"sm:hidden",children:"Excel"})]}),k&&/* @__PURE__ */ne.jsx(ne.Fragment,{children:k.map((e=>/* @__PURE__ */ne.jsx(g,{type:"default",className:e.className||`${I} ${H}`,icon:e.icon,onClick:()=>e.onClick({}),children:/* @__PURE__ */ne.jsx("span",{className:"font-medium",children:e.label})},e.key)))}),C&&/* @__PURE__ */ne.jsx(g,{type:"default",className:`${I} ${H}`,icon:x.customIcons?.refresh||/* @__PURE__ */ne.jsx(qe,{}),onClick:async()=>{f?.()},children:/* @__PURE__ */ne.jsx("span",{className:"font-medium hidden sm:inline",children:x.refreshButtonText||"Refrescar"})}),O&&!1!==O.enabled&&/* @__PURE__ */ne.jsxs(g,{type:"default",className:`${I} ${H}`,icon:/* @__PURE__ */ne.jsx(Xe,{}),onClick:z,children:[
17
+ /* @__PURE__ */ne.jsx("span",{className:"sm:hidden",children:"Excel"})]}),k&&/* @__PURE__ */ne.jsx(ne.Fragment,{children:k.map((e=>/* @__PURE__ */ne.jsx(g,{type:"default",className:e.className||`${B} ${W}`,icon:e.icon,onClick:()=>e.onClick({}),children:/* @__PURE__ */ne.jsx("span",{className:"font-medium",children:e.label})},e.key)))}),C&&/* @__PURE__ */ne.jsx(g,{type:"default",className:`${B} ${W}`,icon:x.customIcons?.refresh||/* @__PURE__ */ne.jsx(qe,{}),onClick:async()=>{f?.()},children:/* @__PURE__ */ne.jsx("span",{className:"font-medium hidden sm:inline",children:x.refreshButtonText||"Refrescar"})}),O&&!1!==O.enabled&&/* @__PURE__ */ne.jsxs(g,{type:"default",className:`${B} ${W}`,icon:/* @__PURE__ */ne.jsx(Xe,{}),onClick:z,children:[
19
18
  /* @__PURE__ */ne.jsx("span",{className:"hidden sm:inline",children:"Carga masiva"}),
20
- /* @__PURE__ */ne.jsx("span",{className:"sm:hidden",children:"Carga masiva"})]}),l&&/* @__PURE__ */ne.jsx(g,{type:"primary",className:"flex-1 xs:flex-initial flex items-center justify-center gap-2 hover:opacity-90 transition-all duration-200 shadow-xs hover:shadow-md px-3 h-8 text-sm font-medium dark:bg-blue-600 dark:hover:bg-blue-700 dark:text-white",icon:t.cloneElement(m)||/* @__PURE__ */ne.jsx(Be,{}),onClick:s,children:/* @__PURE__ */ne.jsx("span",{children:h})})]})]})]}),
19
+ /* @__PURE__ */ne.jsx("span",{className:"sm:hidden",children:"Carga masiva"})]}),l&&/* @__PURE__ */ne.jsx(g,{type:"primary",className:"flex-1 xs:flex-initial flex items-center justify-center gap-2 hover:opacity-90 transition-all duration-200 shadow-xs hover:shadow-md px-3 h-8 text-sm font-medium dark:bg-blue-600 dark:hover:bg-blue-700 dark:text-white",icon:t.cloneElement(m)||/* @__PURE__ */ne.jsx(Be,{}),onClick:s,children:/* @__PURE__ */ne.jsx("span",{children:h})})]})]})]}):null,
21
20
  /* @__PURE__ */ne.jsx("div",{className:"overflow-x-auto",children:/* @__PURE__ */ne.jsx($,{columns:(e=>{const n=e.filter((e=>!e.isHidden)).map((e=>({...e,title:e.icon?/* @__PURE__ */ne.jsxs("div",{className:"flex items-center gap-2",children:[t.isValidElement(e.icon)?t.cloneElement(e.icon):e.icon,
22
- /* @__PURE__ */ne.jsx("span",{className:"font-medium",children:e.title})]}):/* @__PURE__ */ne.jsx("span",{className:"font-medium",children:e.title}),className:"py-4 px-6",sorter:e.sorter?(t,n)=>Ae(e.key)(t,n):void 0,filters:e.filters,onFilter:e.onFilter,render:e.render||(e.key&&String(e.key).includes(".")?(t,n)=>{const r=Fe(n,String(e.key));return null!=r?String(r):""}:void 0)}))),r={title:/* @__PURE__ */ne.jsx("span",{className:"font-medium",children:"Acciones"}),key:"actions",width:T||"auto",className:"py-4 px-6",render:(e,n)=>(e=>/* @__PURE__ */ne.jsxs("div",{className:"flex items-center gap-3 "+(T?"flex-wrap":"flex-nowrap"),style:T?{maxWidth:`${T}px`,width:"100%"}:void 0,children:[w?.map((n=>!("function"==typeof n.hidden&&n.hidden(e))&&/* @__PURE__ */ne.jsx(_,{title:n.tooltip,children:/* @__PURE__ */ne.jsx(g,{type:"button",className:n.className||`${I} flex-shrink-0 !bg-slate-500 hover:!bg-slate-700 dark:!bg-slate-600 dark:hover:!bg-slate-800 !text-white !border-none`,style:n.style,icon:t.isValidElement(n.icon)?t.cloneElement(n.icon):n.icon,onClick:()=>n.onClick(e),children:n.label})},n.key))),x.showDefaultActions&&/* @__PURE__ */ne.jsxs(ne.Fragment,{children:[x.showEdit&&("function"==typeof x.showEdit?x.showEdit(e)&&/* @__PURE__ */ne.jsx(_,{title:"Editar",children:/* @__PURE__ */ne.jsx(g,{type:"warning",title:"Editar",className:`${I} ${B} ${W}`,icon:x.customIcons?.edit||/* @__PURE__ */ne.jsx(He,{className:"text-white"}),onClick:()=>Z(e)})}):x.showEdit&&/* @__PURE__ */ne.jsx(_,{title:"Editar",children:/* @__PURE__ */ne.jsx(g,{type:"warning",className:`${I} ${B} ${W}`,icon:x.customIcons?.edit||/* @__PURE__ */ne.jsx(He,{className:"text-white"}),onClick:()=>Z(e)})})),x.showDelete&&("function"==typeof x.showDelete?x.showDelete(e)&&(!1!==x.useDefaultDeleteConfirm?/* @__PURE__ */ne.jsx(L,{title:"¿Estás seguro de que deseas eliminar este registro?",onConfirm:()=>J(e),okText:"Eliminar",cancelText:"Cancelar",children:/* @__PURE__ */ne.jsx(_,{title:"Eliminar",children:/* @__PURE__ */ne.jsx(g,{type:"default",className:`${I} ${B} ${U}`,icon:x.customIcons?.delete?.type?t.createElement(x.customIcons.delete.type):/* @__PURE__ */ne.jsx(We,{className:"text-white"})})})}):/* @__PURE__ */ne.jsx(_,{title:"Eliminar",children:/* @__PURE__ */ne.jsx(g,{type:"default",className:`${I} ${B} ${U}`,icon:x.customIcons?.delete?.type?t.createElement(x.customIcons.delete.type):/* @__PURE__ */ne.jsx(We,{className:"text-white"}),onClick:()=>J(e)})})):x.showDelete&&(!1!==x.useDefaultDeleteConfirm?/* @__PURE__ */ne.jsx(L,{title:"¿Estás seguro de que deseas eliminar este registro?",onConfirm:()=>J(e),okText:"Eliminar",cancelText:"Cancelar",children:/* @__PURE__ */ne.jsx(_,{title:"Eliminar",children:/* @__PURE__ */ne.jsx(g,{type:"default",className:`${I} ${B} ${U}`,icon:x.customIcons?.delete?.type?t.createElement(x.customIcons.delete.type):/* @__PURE__ */ne.jsx(We,{className:"text-white"})})})}):/* @__PURE__ */ne.jsx(_,{title:"Eliminar",children:/* @__PURE__ */ne.jsx(g,{type:"default",className:`${I} ${B} ${U}`,icon:x.customIcons?.delete?.type?t.createElement(x.customIcons.delete.type):/* @__PURE__ */ne.jsx(We,{className:"text-white"}),onClick:()=>J(e)})}))),x.showView&&d&&("function"==typeof x.showView?x.showView(e)&&/* @__PURE__ */ne.jsx(_,{title:"Ver",children:/* @__PURE__ */ne.jsx(g,{type:"view",className:`${I} ${B} ${q}`,icon:x.customIcons?.view||/* @__PURE__ */ne.jsx(Ue,{className:"text-white"}),onClick:()=>ee(e)})}):x.showView&&/* @__PURE__ */ne.jsx(_,{title:"Ver",children:/* @__PURE__ */ne.jsx(g,{type:"view",className:`${I} ${B} ${x.customActionsColor?.view||q}`,icon:x.customIcons?.view||/* @__PURE__ */ne.jsx(Ue,{className:"text-white"}),onClick:()=>ee(e)})}))]})]}))(n)};return x.showDefaultActions||w&&w.length>0||!1===E?[...n,r]:n})(y),dataSource:G,loading:v,pagination:K,className:"dynamic-table !mt-4",scroll:{x:"max-content"}})})]})},Ye=/* @__PURE__ */i({});function Ke(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ke(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ze(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ke(e))&&(r&&(r+=" "),r+=t);return r}const Je={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},et=Math.round;function tt(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map((e=>parseFloat(e)));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const nt=(e,t,n)=>0===n?e:e/100;function rt(e,t){const n=t||255;return e>n?n:e<0?0:e}class ot{isValid=!0;r=0;g=0;b=0;a=1;_h;_hsl_s;_hsv_s;_l;_v;_max;_min;_brightness;constructor(e){function t(t){return t[0]in e&&t[1]in e&&t[2]in e}if(e)if("string"==typeof e){let t=function(e){return n.startsWith(e)};const n=e.trim();if(/^#?[A-F\d]{3,8}$/i.test(n))this.fromHexString(n);else if(t("rgb"))this.fromRgbString(n);else if(t("hsl"))this.fromHslString(n);else if(t("hsv")||t("hsb"))this.fromHsvString(n);else{const e=Je[n.toLowerCase()];e&&this.fromHexString(parseInt(e,36).toString(16).padStart(6,"0"))}}else if(e instanceof ot)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._hsl_s=e._hsl_s,this._hsv_s=e._hsv_s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=rt(e.r),this.g=rt(e.g),this.b=rt(e.b),this.a="number"==typeof e.a?rt(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else{if(!t("hsv"))throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e));this.fromHsv(e)}else;}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}return.2126*e(this.r)+.7152*e(this.g)+.0722*e(this.b)}getHue(){if(void 0===this._h){const e=this.getMax()-this.getMin();this._h=0===e?0:et(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){return this.getHSVSaturation()}getHSVSaturation(){if(void 0===this._hsv_s){const e=this.getMax()-this.getMin();this._hsv_s=0===e?0:e/this.getMax()}return this._hsv_s}getHSLSaturation(){if(void 0===this._hsl_s){const e=this.getMax()-this.getMin();if(0===e)this._hsl_s=0;else{const t=this.getLightness();this._hsl_s=e/255/(1-Math.abs(2*t-1))}}return this._hsl_s}getLightness(){return void 0===this._l&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return void 0===this._v&&(this._v=this.getMax()/255),this._v}getBrightness(){return void 0===this._brightness&&(this._brightness=(299*this.r+587*this.g+114*this.b)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e,t=50){const n=this._c(e),r=t/100,o=e=>(n[e]-this[e])*r+this[e],a={r:et(o("r")),g:et(o("g")),b:et(o("b")),a:et(100*o("a"))/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),r=e=>et((this[e]*this.a+t[e]*t.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=2===t.length?t:"0"+t;const n=(this.g||0).toString(16);e+=2===n.length?n:"0"+n;const r=(this.b||0).toString(16);if(e+=2===r.length?r:"0"+r,"number"==typeof this.a&&this.a>=0&&this.a<1){const t=et(255*this.a).toString(16);e+=2===t.length?t:"0"+t}return e}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=et(100*this.getHSLSaturation()),n=et(100*this.getLightness());return 1!==this.a?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return 1!==this.a?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const r=this.clone();return r[e]=rt(t,n),r}_c(e){return new this.constructor(e)}getMax(){return void 0===this._max&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return void 0===this._min&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(e,n){return parseInt(t[e]+t[n||e],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:r}){const o=(e%360+360)%360;if(this._h=o,this._hsl_s=t,this._l=n,this.a="number"==typeof r?r:1,t<=0){const e=et(255*n);return this.r=e,this.g=e,void(this.b=e)}let a=0,i=0,l=0;const s=o/60,u=(1-Math.abs(2*n-1))*t,c=u*(1-Math.abs(s%2-1));s>=0&&s<1?(a=u,i=c):s>=1&&s<2?(a=c,i=u):s>=2&&s<3?(i=u,l=c):s>=3&&s<4?(i=c,l=u):s>=4&&s<5?(a=c,l=u):s>=5&&s<6&&(a=u,l=c);const d=n-u/2;this.r=et(255*(a+d)),this.g=et(255*(i+d)),this.b=et(255*(l+d))}fromHsv({h:e,s:t,v:n,a:r}){const o=(e%360+360)%360;this._h=o,this._hsv_s=t,this._v=n,this.a="number"==typeof r?r:1;const a=et(255*n);if(this.r=a,this.g=a,this.b=a,t<=0)return;const i=o/60,l=Math.floor(i),s=i-l,u=et(n*(1-t)*255),c=et(n*(1-t*s)*255),d=et(n*(1-t*(1-s))*255);switch(l){case 0:this.g=d,this.b=u;break;case 1:this.r=c,this.b=u;break;case 2:this.r=u,this.b=d;break;case 3:this.r=u,this.g=c;break;case 4:this.r=d,this.g=u;break;default:this.g=u,this.b=c}}fromHsvString(e){const t=tt(e,nt);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=tt(e,nt);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=tt(e,((e,t)=>t.includes("%")?et(e/100*255):e));this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}const at=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function it(e,t,n){let r;return r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t,r<0?r+=360:r>=360&&(r-=360),r}function lt(e,t,n){if(0===e.h&&0===e.s)return e.s;let r;return r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t,r>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(100*r)/100}function st(e,t,n){let r;return r=n?e.v+.05*t:e.v-.15*t,r=Math.max(0,Math.min(1,r)),Math.round(100*r)/100}function ut(e,t={}){const n=[],r=new ot(e),o=r.toHsv();for(let a=5;a>0;a-=1){const e=new ot({h:it(o,a,!0),s:lt(o,a,!0),v:st(o,a,!0)});n.push(e)}n.push(r);for(let a=1;a<=4;a+=1){const e=new ot({h:it(o,a),s:lt(o,a),v:st(o,a)});n.push(e)}return"dark"===t.theme?at.map((({index:e,amount:r})=>new ot(t.backgroundColor||"#141414").mix(n[e],r).toHexString())):n.map((e=>e.toHexString()))}const ct={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},dt=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];dt.primary=dt[5];const ft=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];ft.primary=ft[5];const pt=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];pt.primary=pt[5];const ht=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];ht.primary=ht[5];const mt=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];mt.primary=mt[5];const gt=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];gt.primary=gt[5];const yt=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];yt.primary=yt[5];const bt=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];bt.primary=bt[5];const vt=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];vt.primary=vt[5];const wt=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];wt.primary=wt[5];const kt=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];kt.primary=kt[5];const St=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];St.primary=St[5];const xt=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];xt.primary=xt[5];const Ct={red:dt,volcano:ft,orange:pt,gold:ht,yellow:mt,lime:gt,green:yt,cyan:bt,blue:vt,geekblue:wt,purple:kt,magenta:St,grey:xt};function Et(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}const Pt="data-rc-order",Nt="data-rc-priority",Tt=/* @__PURE__ */new Map;function Ot({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:"rc-util-key"}function zt(e){if(e.attachTo)return e.attachTo;return document.querySelector("head")||document.body}function $t(e){return Array.from((Tt.get(e)||e).children).filter((e=>"STYLE"===e.tagName))}function _t(e,t={}){if(!Et())return null;const{csp:n,prepend:r,priority:o=0}=t,a=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r),i="prependQueue"===a,l=document.createElement("style");l.setAttribute(Pt,a),i&&o&&l.setAttribute(Nt,`${o}`),n?.nonce&&(l.nonce=n?.nonce),l.innerHTML=e;const s=zt(t),{firstChild:u}=s;if(r){if(i){const e=(t.styles||$t(s)).filter((e=>{if(!["prepend","prependQueue"].includes(e.getAttribute(Pt)))return!1;const t=Number(e.getAttribute(Nt)||0);return o>=t}));if(e.length)return s.insertBefore(l,e[e.length-1].nextSibling),l}s.insertBefore(l,u)}else s.appendChild(l);return l}function Lt(e,t={}){let{styles:n}=t;return n||=$t(zt(t)),n.find((n=>n.getAttribute(Ot(t))===e))}function Ft(e,t={}){const n=Lt(e,t);if(n){zt(t).removeChild(n)}}function Rt(e,t,n={}){const r=zt(n),o=$t(r),a={...n,styles:o};!function(e,t){const n=Tt.get(e);if(!n||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){const n=_t("",t),{parentNode:r}=n;Tt.set(e,r),e.removeChild(n)}}(r,a);const i=Lt(t,a);if(i)return a.csp?.nonce&&i.nonce!==a.csp?.nonce&&(i.nonce=a.csp?.nonce),i.innerHTML!==e&&(i.innerHTML=e),i;const l=_t(e,a);return l.setAttribute(Ot(a),t),l}function jt(e){return e?.getRootNode?.()}function Dt(e){return function(e){return jt(e)instanceof ShadowRoot}(e)?jt(e):null}let At={};const Mt=[];function It(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){Mt.reduce(((e,t)=>t(e??"","warning")),t)}}function Ht(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){Mt.reduce(((e,t)=>t(e??"","note")),t)}}function Vt(e,t,n){t||At[n]||(e(!1,n),At[n]=!0)}function Bt(e,t){Vt(It,e,t)}function Wt(e){return"object"==typeof e&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"==typeof e.icon||"function"==typeof e.icon)}function Ut(e={}){return Object.keys(e).reduce(((t,n)=>{const r=e[n];if("class"===n)t.className=r,delete t.class;else delete t[n],t[(o=n,o.replace(/-(.)/g,((e,t)=>t.toUpperCase())))]=r;var o;return t}),{})}function qt(e,n,r){return r?/* @__PURE__ */t.createElement(e.tag,{key:n,...Ut(e.attrs),...r},(e.children||[]).map(((t,r)=>qt(t,`${n}-${e.tag}-${r}`)))):/* @__PURE__ */t.createElement(e.tag,{key:n,...Ut(e.attrs)},(e.children||[]).map(((t,r)=>qt(t,`${n}-${e.tag}-${r}`))))}function Xt(e){return ut(e)[0]}function Qt(e){return e?Array.isArray(e)?e:[e]:[]}Bt.preMessage=e=>{Mt.push(e)},Bt.resetWarned=function(){At={}},Bt.noteOnce=function(e,t){Vt(Ht,e,t)};const Gt={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};const Yt=t=>{const{icon:n,className:o,onClick:a,style:i,primaryColor:s,secondaryColor:u,...c}=t,d=e.useRef(null);let f=Gt;if(s&&(f={primaryColor:s,secondaryColor:u||Xt(s)}),(e=>{const{csp:t,prefixCls:n,layer:o}=l(Ye);let a="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n vertical-align: inherit;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";n&&(a=a.replace(/anticon/g,n)),o&&(a=`@layer ${o} {\n${a}\n}`),r((()=>{const n=Dt(e.current);Rt(a,"@ant-design-icons",{prepend:!o,csp:t,attachTo:n})}),[])})(d),Bt(Wt(n),`[@ant-design/icons] ${`icon should be icon definiton, but got ${n}`}`),!Wt(n))return null;let p=n;return p&&"function"==typeof p.icon&&(p={...p,icon:p.icon(f.primaryColor,f.secondaryColor)}),qt(p.icon,`svg-${p.name}`,{className:o,onClick:a,style:i,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...c,ref:d})};function Kt(e){const[t,n]=Qt(e);return Yt.setTwoToneColors({primaryColor:t,secondaryColor:n})}function Zt(){return Zt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zt.apply(this,arguments)}Yt.displayName="IconReact",Yt.getTwoToneColors=function(){return{...Gt}},Yt.setTwoToneColors=function({primaryColor:e,secondaryColor:t}){Gt.primaryColor=e,Gt.secondaryColor=t||Xt(e),Gt.calculated=!!t},Kt(vt.primary);const Jt=/* @__PURE__ */e.forwardRef(((t,n)=>{const{className:r,icon:o,spin:a,rotate:i,tabIndex:l,onClick:s,twoToneColor:u,...c}=t,{prefixCls:d="anticon",rootClassName:f}=e.useContext(Ye),p=Ze(f,d,{[`${d}-${o.name}`]:!!o.name,[`${d}-spin`]:!!a||"loading"===o.name},r);let h=l;void 0===h&&s&&(h=-1);const m=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0,[g,y]=Qt(u);/* @__PURE__ */
21
+ /* @__PURE__ */ne.jsx("span",{className:"font-medium",children:e.title})]}):/* @__PURE__ */ne.jsx("span",{className:"font-medium",children:e.title}),className:"py-4 px-6",sorter:e.sorter?(t,n)=>Ae(e.key)(t,n):void 0,filters:e.filters,onFilter:e.onFilter,render:e.render||(e.key&&String(e.key).includes(".")?(t,n)=>{const r=Fe(n,String(e.key));return null!=r?String(r):""}:void 0)}))),r={title:/* @__PURE__ */ne.jsx("span",{className:"font-medium",children:"Acciones"}),key:"actions",width:T||"auto",className:"py-4 px-6",render:(e,n)=>(e=>/* @__PURE__ */ne.jsxs("div",{className:"flex items-center gap-3 "+(T?"flex-wrap":"flex-nowrap"),style:T?{maxWidth:`${T}px`,width:"100%"}:void 0,children:[w?.map((n=>!("function"==typeof n.hidden&&n.hidden(e))&&/* @__PURE__ */ne.jsx(_,{title:n.tooltip,children:/* @__PURE__ */ne.jsx(g,{type:"button",className:n.className||`${B} flex-shrink-0 !bg-slate-500 hover:!bg-slate-700 dark:!bg-slate-600 dark:hover:!bg-slate-800 !text-white !border-none`,style:n.style,icon:t.isValidElement(n.icon)?t.cloneElement(n.icon):n.icon,onClick:()=>n.onClick(e),children:n.label})},n.key))),x.showDefaultActions&&/* @__PURE__ */ne.jsxs(ne.Fragment,{children:[x.showEdit&&("function"==typeof x.showEdit?x.showEdit(e)&&/* @__PURE__ */ne.jsx(_,{title:"Editar",children:/* @__PURE__ */ne.jsx(g,{type:"warning",title:"Editar",className:`${B} ${U} ${q}`,icon:x.customIcons?.edit||/* @__PURE__ */ne.jsx(He,{className:"text-white"}),onClick:()=>ee(e)})}):x.showEdit&&/* @__PURE__ */ne.jsx(_,{title:"Editar",children:/* @__PURE__ */ne.jsx(g,{type:"warning",className:`${B} ${U} ${q}`,icon:x.customIcons?.edit||/* @__PURE__ */ne.jsx(He,{className:"text-white"}),onClick:()=>ee(e)})})),x.showDelete&&("function"==typeof x.showDelete?x.showDelete(e)&&(!1!==x.useDefaultDeleteConfirm?/* @__PURE__ */ne.jsx(L,{title:"¿Estás seguro de que deseas eliminar este registro?",onConfirm:()=>te(e),okText:"Eliminar",cancelText:"Cancelar",children:/* @__PURE__ */ne.jsx(_,{title:"Eliminar",children:/* @__PURE__ */ne.jsx(g,{type:"default",className:`${B} ${U} ${X}`,icon:x.customIcons?.delete?.type?t.createElement(x.customIcons.delete.type):/* @__PURE__ */ne.jsx(We,{className:"text-white"})})})}):/* @__PURE__ */ne.jsx(_,{title:"Eliminar",children:/* @__PURE__ */ne.jsx(g,{type:"default",className:`${B} ${U} ${X}`,icon:x.customIcons?.delete?.type?t.createElement(x.customIcons.delete.type):/* @__PURE__ */ne.jsx(We,{className:"text-white"}),onClick:()=>te(e)})})):x.showDelete&&(!1!==x.useDefaultDeleteConfirm?/* @__PURE__ */ne.jsx(L,{title:"¿Estás seguro de que deseas eliminar este registro?",onConfirm:()=>te(e),okText:"Eliminar",cancelText:"Cancelar",children:/* @__PURE__ */ne.jsx(_,{title:"Eliminar",children:/* @__PURE__ */ne.jsx(g,{type:"default",className:`${B} ${U} ${X}`,icon:x.customIcons?.delete?.type?t.createElement(x.customIcons.delete.type):/* @__PURE__ */ne.jsx(We,{className:"text-white"})})})}):/* @__PURE__ */ne.jsx(_,{title:"Eliminar",children:/* @__PURE__ */ne.jsx(g,{type:"default",className:`${B} ${U} ${X}`,icon:x.customIcons?.delete?.type?t.createElement(x.customIcons.delete.type):/* @__PURE__ */ne.jsx(We,{className:"text-white"}),onClick:()=>te(e)})}))),x.showView&&d&&("function"==typeof x.showView?x.showView(e)&&/* @__PURE__ */ne.jsx(_,{title:"Ver",children:/* @__PURE__ */ne.jsx(g,{type:"view",className:`${B} ${U} ${Q}`,icon:x.customIcons?.view||/* @__PURE__ */ne.jsx(Ue,{className:"text-white"}),onClick:()=>re(e)})}):x.showView&&/* @__PURE__ */ne.jsx(_,{title:"Ver",children:/* @__PURE__ */ne.jsx(g,{type:"view",className:`${B} ${U} ${x.customActionsColor?.view||Q}`,icon:x.customIcons?.view||/* @__PURE__ */ne.jsx(Ue,{className:"text-white"}),onClick:()=>re(e)})}))]})]}))(n)};return x.showDefaultActions||w&&w.length>0||!1===E?[...n,r]:n})(y),dataSource:K,loading:v,pagination:J,className:"dynamic-table !mt-4",scroll:{x:"max-content"},bordered:R,size:j})})]})},Ye=/* @__PURE__ */i({});function Ke(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ke(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ze(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ke(e))&&(r&&(r+=" "),r+=t);return r}const Je={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},et=Math.round;function tt(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map((e=>parseFloat(e)));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const nt=(e,t,n)=>0===n?e:e/100;function rt(e,t){const n=t||255;return e>n?n:e<0?0:e}class ot{isValid=!0;r=0;g=0;b=0;a=1;_h;_hsl_s;_hsv_s;_l;_v;_max;_min;_brightness;constructor(e){function t(t){return t[0]in e&&t[1]in e&&t[2]in e}if(e)if("string"==typeof e){let t=function(e){return n.startsWith(e)};const n=e.trim();if(/^#?[A-F\d]{3,8}$/i.test(n))this.fromHexString(n);else if(t("rgb"))this.fromRgbString(n);else if(t("hsl"))this.fromHslString(n);else if(t("hsv")||t("hsb"))this.fromHsvString(n);else{const e=Je[n.toLowerCase()];e&&this.fromHexString(parseInt(e,36).toString(16).padStart(6,"0"))}}else if(e instanceof ot)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._hsl_s=e._hsl_s,this._hsv_s=e._hsv_s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=rt(e.r),this.g=rt(e.g),this.b=rt(e.b),this.a="number"==typeof e.a?rt(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else{if(!t("hsv"))throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e));this.fromHsv(e)}else;}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}return.2126*e(this.r)+.7152*e(this.g)+.0722*e(this.b)}getHue(){if(void 0===this._h){const e=this.getMax()-this.getMin();this._h=0===e?0:et(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){return this.getHSVSaturation()}getHSVSaturation(){if(void 0===this._hsv_s){const e=this.getMax()-this.getMin();this._hsv_s=0===e?0:e/this.getMax()}return this._hsv_s}getHSLSaturation(){if(void 0===this._hsl_s){const e=this.getMax()-this.getMin();if(0===e)this._hsl_s=0;else{const t=this.getLightness();this._hsl_s=e/255/(1-Math.abs(2*t-1))}}return this._hsl_s}getLightness(){return void 0===this._l&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return void 0===this._v&&(this._v=this.getMax()/255),this._v}getBrightness(){return void 0===this._brightness&&(this._brightness=(299*this.r+587*this.g+114*this.b)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e,t=50){const n=this._c(e),r=t/100,o=e=>(n[e]-this[e])*r+this[e],a={r:et(o("r")),g:et(o("g")),b:et(o("b")),a:et(100*o("a"))/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),r=e=>et((this[e]*this.a+t[e]*t.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=2===t.length?t:"0"+t;const n=(this.g||0).toString(16);e+=2===n.length?n:"0"+n;const r=(this.b||0).toString(16);if(e+=2===r.length?r:"0"+r,"number"==typeof this.a&&this.a>=0&&this.a<1){const t=et(255*this.a).toString(16);e+=2===t.length?t:"0"+t}return e}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=et(100*this.getHSLSaturation()),n=et(100*this.getLightness());return 1!==this.a?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return 1!==this.a?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const r=this.clone();return r[e]=rt(t,n),r}_c(e){return new this.constructor(e)}getMax(){return void 0===this._max&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return void 0===this._min&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(e,n){return parseInt(t[e]+t[n||e],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:r}){const o=(e%360+360)%360;if(this._h=o,this._hsl_s=t,this._l=n,this.a="number"==typeof r?r:1,t<=0){const e=et(255*n);return this.r=e,this.g=e,void(this.b=e)}let a=0,i=0,l=0;const s=o/60,u=(1-Math.abs(2*n-1))*t,c=u*(1-Math.abs(s%2-1));s>=0&&s<1?(a=u,i=c):s>=1&&s<2?(a=c,i=u):s>=2&&s<3?(i=u,l=c):s>=3&&s<4?(i=c,l=u):s>=4&&s<5?(a=c,l=u):s>=5&&s<6&&(a=u,l=c);const d=n-u/2;this.r=et(255*(a+d)),this.g=et(255*(i+d)),this.b=et(255*(l+d))}fromHsv({h:e,s:t,v:n,a:r}){const o=(e%360+360)%360;this._h=o,this._hsv_s=t,this._v=n,this.a="number"==typeof r?r:1;const a=et(255*n);if(this.r=a,this.g=a,this.b=a,t<=0)return;const i=o/60,l=Math.floor(i),s=i-l,u=et(n*(1-t)*255),c=et(n*(1-t*s)*255),d=et(n*(1-t*(1-s))*255);switch(l){case 0:this.g=d,this.b=u;break;case 1:this.r=c,this.b=u;break;case 2:this.r=u,this.b=d;break;case 3:this.r=u,this.g=c;break;case 4:this.r=d,this.g=u;break;default:this.g=u,this.b=c}}fromHsvString(e){const t=tt(e,nt);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=tt(e,nt);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=tt(e,((e,t)=>t.includes("%")?et(e/100*255):e));this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}const at=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function it(e,t,n){let r;return r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t,r<0?r+=360:r>=360&&(r-=360),r}function lt(e,t,n){if(0===e.h&&0===e.s)return e.s;let r;return r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t,r>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(100*r)/100}function st(e,t,n){let r;return r=n?e.v+.05*t:e.v-.15*t,r=Math.max(0,Math.min(1,r)),Math.round(100*r)/100}function ut(e,t={}){const n=[],r=new ot(e),o=r.toHsv();for(let a=5;a>0;a-=1){const e=new ot({h:it(o,a,!0),s:lt(o,a,!0),v:st(o,a,!0)});n.push(e)}n.push(r);for(let a=1;a<=4;a+=1){const e=new ot({h:it(o,a),s:lt(o,a),v:st(o,a)});n.push(e)}return"dark"===t.theme?at.map((({index:e,amount:r})=>new ot(t.backgroundColor||"#141414").mix(n[e],r).toHexString())):n.map((e=>e.toHexString()))}const ct={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},dt=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];dt.primary=dt[5];const ft=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];ft.primary=ft[5];const pt=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];pt.primary=pt[5];const ht=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];ht.primary=ht[5];const mt=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];mt.primary=mt[5];const gt=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];gt.primary=gt[5];const yt=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];yt.primary=yt[5];const bt=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];bt.primary=bt[5];const vt=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];vt.primary=vt[5];const wt=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];wt.primary=wt[5];const kt=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];kt.primary=kt[5];const St=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];St.primary=St[5];const xt=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];xt.primary=xt[5];const Ct={red:dt,volcano:ft,orange:pt,gold:ht,yellow:mt,lime:gt,green:yt,cyan:bt,blue:vt,geekblue:wt,purple:kt,magenta:St,grey:xt};function Et(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}const Pt="data-rc-order",Nt="data-rc-priority",Tt=/* @__PURE__ */new Map;function Ot({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:"rc-util-key"}function zt(e){if(e.attachTo)return e.attachTo;return document.querySelector("head")||document.body}function $t(e){return Array.from((Tt.get(e)||e).children).filter((e=>"STYLE"===e.tagName))}function _t(e,t={}){if(!Et())return null;const{csp:n,prepend:r,priority:o=0}=t,a=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r),i="prependQueue"===a,l=document.createElement("style");l.setAttribute(Pt,a),i&&o&&l.setAttribute(Nt,`${o}`),n?.nonce&&(l.nonce=n?.nonce),l.innerHTML=e;const s=zt(t),{firstChild:u}=s;if(r){if(i){const e=(t.styles||$t(s)).filter((e=>{if(!["prepend","prependQueue"].includes(e.getAttribute(Pt)))return!1;const t=Number(e.getAttribute(Nt)||0);return o>=t}));if(e.length)return s.insertBefore(l,e[e.length-1].nextSibling),l}s.insertBefore(l,u)}else s.appendChild(l);return l}function Lt(e,t={}){let{styles:n}=t;return n||=$t(zt(t)),n.find((n=>n.getAttribute(Ot(t))===e))}function Ft(e,t={}){const n=Lt(e,t);if(n){zt(t).removeChild(n)}}function Rt(e,t,n={}){const r=zt(n),o=$t(r),a={...n,styles:o};!function(e,t){const n=Tt.get(e);if(!n||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){const n=_t("",t),{parentNode:r}=n;Tt.set(e,r),e.removeChild(n)}}(r,a);const i=Lt(t,a);if(i)return a.csp?.nonce&&i.nonce!==a.csp?.nonce&&(i.nonce=a.csp?.nonce),i.innerHTML!==e&&(i.innerHTML=e),i;const l=_t(e,a);return l.setAttribute(Ot(a),t),l}function jt(e){return e?.getRootNode?.()}function Dt(e){return function(e){return jt(e)instanceof ShadowRoot}(e)?jt(e):null}let At={};const Mt=[];function It(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){Mt.reduce(((e,t)=>t(e??"","warning")),t)}}function Ht(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){Mt.reduce(((e,t)=>t(e??"","note")),t)}}function Vt(e,t,n){t||At[n]||(e(!1,n),At[n]=!0)}function Bt(e,t){Vt(It,e,t)}function Wt(e){return"object"==typeof e&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"==typeof e.icon||"function"==typeof e.icon)}function Ut(e={}){return Object.keys(e).reduce(((t,n)=>{const r=e[n];if("class"===n)t.className=r,delete t.class;else delete t[n],t[(o=n,o.replace(/-(.)/g,((e,t)=>t.toUpperCase())))]=r;var o;return t}),{})}function qt(e,n,r){return r?/* @__PURE__ */t.createElement(e.tag,{key:n,...Ut(e.attrs),...r},(e.children||[]).map(((t,r)=>qt(t,`${n}-${e.tag}-${r}`)))):/* @__PURE__ */t.createElement(e.tag,{key:n,...Ut(e.attrs)},(e.children||[]).map(((t,r)=>qt(t,`${n}-${e.tag}-${r}`))))}function Xt(e){return ut(e)[0]}function Qt(e){return e?Array.isArray(e)?e:[e]:[]}Bt.preMessage=e=>{Mt.push(e)},Bt.resetWarned=function(){At={}},Bt.noteOnce=function(e,t){Vt(Ht,e,t)};const Gt={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};const Yt=t=>{const{icon:n,className:o,onClick:a,style:i,primaryColor:s,secondaryColor:u,...c}=t,d=e.useRef(null);let f=Gt;if(s&&(f={primaryColor:s,secondaryColor:u||Xt(s)}),(e=>{const{csp:t,prefixCls:n,layer:o}=l(Ye);let a="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n vertical-align: inherit;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";n&&(a=a.replace(/anticon/g,n)),o&&(a=`@layer ${o} {\n${a}\n}`),r((()=>{const n=Dt(e.current);Rt(a,"@ant-design-icons",{prepend:!o,csp:t,attachTo:n})}),[])})(d),Bt(Wt(n),`[@ant-design/icons] ${`icon should be icon definiton, but got ${n}`}`),!Wt(n))return null;let p=n;return p&&"function"==typeof p.icon&&(p={...p,icon:p.icon(f.primaryColor,f.secondaryColor)}),qt(p.icon,`svg-${p.name}`,{className:o,onClick:a,style:i,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...c,ref:d})};function Kt(e){const[t,n]=Qt(e);return Yt.setTwoToneColors({primaryColor:t,secondaryColor:n})}function Zt(){return Zt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zt.apply(this,arguments)}Yt.displayName="IconReact",Yt.getTwoToneColors=function(){return{...Gt}},Yt.setTwoToneColors=function({primaryColor:e,secondaryColor:t}){Gt.primaryColor=e,Gt.secondaryColor=t||Xt(e),Gt.calculated=!!t},Kt(vt.primary);const Jt=/* @__PURE__ */e.forwardRef(((t,n)=>{const{className:r,icon:o,spin:a,rotate:i,tabIndex:l,onClick:s,twoToneColor:u,...c}=t,{prefixCls:d="anticon",rootClassName:f}=e.useContext(Ye),p=Ze(f,d,{[`${d}-${o.name}`]:!!o.name,[`${d}-spin`]:!!a||"loading"===o.name},r);let h=l;void 0===h&&s&&(h=-1);const m=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0,[g,y]=Qt(u);/* @__PURE__ */
23
22
  return e.createElement("span",Zt({role:"img","aria-label":o.name},c,{ref:n,tabIndex:h,onClick:s,className:p}),/* @__PURE__ */e.createElement(Yt,{icon:o,primaryColor:g,secondaryColor:y,style:m}))}));Jt.getTwoToneColor=function(){const e=Yt.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},Jt.setTwoToneColor=Kt,"production"!==process.env.NODE_ENV&&(Jt.displayName="AntdIcon");var en={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function tn(){return tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tn.apply(this,arguments)}const nn=(t,n)=>/* @__PURE__ */e.createElement(Jt,tn({},t,{ref:n,icon:en})),rn=/* @__PURE__ */e.forwardRef(nn);"production"!==process.env.NODE_ENV&&(rn.displayName="CheckCircleFilled");var on={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};function an(){return an=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},an.apply(this,arguments)}const ln=(t,n)=>/* @__PURE__ */e.createElement(Jt,an({},t,{ref:n,icon:on})),sn=/* @__PURE__ */e.forwardRef(ln);"production"!==process.env.NODE_ENV&&(sn.displayName="CheckOutlined");var un={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function cn(){return cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cn.apply(this,arguments)}const dn=(t,n)=>/* @__PURE__ */e.createElement(Jt,cn({},t,{ref:n,icon:un})),fn=/* @__PURE__ */e.forwardRef(dn);"production"!==process.env.NODE_ENV&&(fn.displayName="CloseCircleFilled");var pn={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};function hn(){return hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hn.apply(this,arguments)}const mn=(t,n)=>/* @__PURE__ */e.createElement(Jt,hn({},t,{ref:n,icon:pn})),gn=/* @__PURE__ */e.forwardRef(mn);"production"!==process.env.NODE_ENV&&(gn.displayName="CloseOutlined");var yn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};function bn(){return bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bn.apply(this,arguments)}const vn=(t,n)=>/* @__PURE__ */e.createElement(Jt,bn({},t,{ref:n,icon:yn})),wn=/* @__PURE__ */e.forwardRef(vn);"production"!==process.env.NODE_ENV&&(wn.displayName="DeleteOutlined");var kn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};function Sn(){return Sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sn.apply(this,arguments)}const xn=(t,n)=>/* @__PURE__ */e.createElement(Jt,Sn({},t,{ref:n,icon:kn})),Cn=/* @__PURE__ */e.forwardRef(xn);"production"!==process.env.NODE_ENV&&(Cn.displayName="DownloadOutlined");var En={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};function Pn(){return Pn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pn.apply(this,arguments)}const Nn=(t,n)=>/* @__PURE__ */e.createElement(Jt,Pn({},t,{ref:n,icon:En})),Tn=/* @__PURE__ */e.forwardRef(Nn);"production"!==process.env.NODE_ENV&&(Tn.displayName="EditOutlined");var On={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function zn(){return zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zn.apply(this,arguments)}const $n=(t,n)=>/* @__PURE__ */e.createElement(Jt,zn({},t,{ref:n,icon:On})),_n=/* @__PURE__ */e.forwardRef($n);"production"!==process.env.NODE_ENV&&(_n.displayName="EyeOutlined");var Ln={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:t}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:e}}]}},name:"file",theme:"twotone"};function Fn(){return Fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fn.apply(this,arguments)}const Rn=(t,n)=>/* @__PURE__ */e.createElement(Jt,Fn({},t,{ref:n,icon:Ln})),jn=/* @__PURE__ */e.forwardRef(Rn);"production"!==process.env.NODE_ENV&&(jn.displayName="FileTwoTone");var Dn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};function An(){return An=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},An.apply(this,arguments)}const Mn=(t,n)=>/* @__PURE__ */e.createElement(Jt,An({},t,{ref:n,icon:Dn})),In=/* @__PURE__ */e.forwardRef(Mn);"production"!==process.env.NODE_ENV&&(In.displayName="InfoCircleFilled");var Hn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function Vn(){return Vn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vn.apply(this,arguments)}const Bn=(t,n)=>/* @__PURE__ */e.createElement(Jt,Vn({},t,{ref:n,icon:Hn})),Wn=/* @__PURE__ */e.forwardRef(Bn);"production"!==process.env.NODE_ENV&&(Wn.displayName="LoadingOutlined");var Un={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};function qn(){return qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qn.apply(this,arguments)}const Xn=(t,n)=>/* @__PURE__ */e.createElement(Jt,qn({},t,{ref:n,icon:Un})),Qn=/* @__PURE__ */e.forwardRef(Xn);"production"!==process.env.NODE_ENV&&(Qn.displayName="PaperClipOutlined");var Gn={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:e}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:t}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:t}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:t}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:e}}]}},name:"picture",theme:"twotone"};function Yn(){return Yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yn.apply(this,arguments)}const Kn=(t,n)=>/* @__PURE__ */e.createElement(Jt,Yn({},t,{ref:n,icon:Gn})),Zn=/* @__PURE__ */e.forwardRef(Kn);"production"!==process.env.NODE_ENV&&(Zn.displayName="PictureTwoTone");var Jn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};function er(){return er=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},er.apply(this,arguments)}const tr=(t,n)=>/* @__PURE__ */e.createElement(Jt,er({},t,{ref:n,icon:Jn})),nr=/* @__PURE__ */e.forwardRef(tr);"production"!==process.env.NODE_ENV&&(nr.displayName="PlusOutlined");var rr,or={exports:{}},ar={};var ir,lr,sr={};var ur=(lr||(lr=1,"production"===process.env.NODE_ENV?or.exports=function(){if(rr)return ar;rr=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case a:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case s:case l:case u:case p:case f:case i:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),ar.ContextConsumer=l,ar.ContextProvider=i,ar.Element=t,ar.ForwardRef=u,ar.Fragment=r,ar.Lazy=p,ar.Memo=f,ar.Portal=n,ar.Profiler=a,ar.StrictMode=o,ar.Suspense=c,ar.SuspenseList=d,ar.isAsyncMode=function(){return!1},ar.isConcurrentMode=function(){return!1},ar.isContextConsumer=function(e){return m(e)===l},ar.isContextProvider=function(e){return m(e)===i},ar.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ar.isForwardRef=function(e){return m(e)===u},ar.isFragment=function(e){return m(e)===r},ar.isLazy=function(e){return m(e)===p},ar.isMemo=function(e){return m(e)===f},ar.isPortal=function(e){return m(e)===n},ar.isProfiler=function(e){return m(e)===a},ar.isStrictMode=function(e){return m(e)===o},ar.isSuspense=function(e){return m(e)===c},ar.isSuspenseList=function(e){return m(e)===d},ar.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===c||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},ar.typeOf=m,ar}():or.exports=(ir||(ir=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case r:case a:case o:case c:case d:return m;default:var g=m&&m.$$typeof;switch(g){case s:case l:case u:case p:case f:case i:return g;default:return h}}case n:return h}}}e=Symbol.for("react.module.reference");var g=l,y=i,b=t,v=u,w=r,k=p,S=f,x=n,C=a,E=o,P=c,N=d,T=!1,O=!1;sr.ContextConsumer=g,sr.ContextProvider=y,sr.Element=b,sr.ForwardRef=v,sr.Fragment=w,sr.Lazy=k,sr.Memo=S,sr.Portal=x,sr.Profiler=C,sr.StrictMode=E,sr.Suspense=P,sr.SuspenseList=N,sr.isAsyncMode=function(e){return T||(T=!0),!1},sr.isConcurrentMode=function(e){return O||(O=!0),!1},sr.isContextConsumer=function(e){return m(e)===l},sr.isContextProvider=function(e){return m(e)===i},sr.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},sr.isForwardRef=function(e){return m(e)===u},sr.isFragment=function(e){return m(e)===r},sr.isLazy=function(e){return m(e)===p},sr.isMemo=function(e){return m(e)===f},sr.isPortal=function(e){return m(e)===n},sr.isProfiler=function(e){return m(e)===a},sr.isStrictMode=function(e){return m(e)===o},sr.isSuspense=function(e){return m(e)===c},sr.isSuspenseList=function(e){return m(e)===d},sr.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===c||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},sr.typeOf=m}()),sr)),or.exports);const cr=Symbol.for("react.element"),dr=Symbol.for("react.transitional.element"),fr=Symbol.for("react.fragment");function pr(e){return e&&"object"==typeof e&&(e.$$typeof===cr||e.$$typeof===dr)&&e.type===fr}const hr=Number(u.split(".")[0]),mr=(...e)=>{const t=e.filter(Boolean);return t.length<=1?t[0]:t=>{e.forEach((e=>{((e,t)=>{"function"==typeof e?e(t):"object"==typeof e&&e&&"current"in e&&(e.current=t)})(e,t)}))}},gr=(...t)=>function(t,n,r){const o=e.useRef({});return"value"in o.current&&!r(o.current.condition,n)||(o.current.value=t(),o.current.condition=n),o.current.value}((()=>mr(...t)),t,((e,t)=>e.length!==t.length||e.every(((e,n)=>e!==t[n])))),yr=e=>{if(!e)return!1;if(br(e)&&hr>=19)return!0;const t=ur.isMemo(e)?e.type.type:e.type;return!("function"==typeof t&&!t.prototype?.render&&t.$$typeof!==ur.ForwardRef)&&!("function"==typeof e&&!e.prototype?.render&&e.$$typeof!==ur.ForwardRef)};function br(e){/* @__PURE__ */
24
23
  return s(e)&&!pr(e)}const vr=e=>{if(e&&br(e)){const t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null},wr={c:"create",r:"read",u:"update",d:"delete",v:"view"},kr=e=>wr[e]||e,Sr=i(void 0),xr=({role:e,config:t,children:n})=>{const r=a((()=>{const n=(n,r)=>{const o=kr(r);return(t[n]?.[e]||[]).map(kr).includes(o)};return{role:e,config:t,hasPermission:n,canCreate:e=>n(e,"create"),canRead:e=>n(e,"read"),canUpdate:e=>n(e,"update"),canDelete:e=>n(e,"delete"),canView:e=>n(e,"view")}}),[e,t]);/* @__PURE__ */
25
24
  return ne.jsx(Sr.Provider,{value:r,children:n})},Cr=(e,t)=>{const n=l(Sr);return a((()=>{if(t){const e=t.create??t.c??!1,n=t.read??t.r??!1,r=t.update??t.u??!1,o=t.delete??t.d??!1,a=t.view??t.v??!1;return{canCreate:e,canRead:n,canUpdate:r,canDelete:o,canView:a,hasPermission:t=>{switch(kr(t)){case"create":return e;case"read":return n;case"update":return r;case"delete":return o;case"view":return a;default:return!1}}}}return n&&e?{canCreate:n.canCreate(e),canUpdate:n.canUpdate(e),canDelete:n.canDelete(e),canView:n.canView(e),hasPermission:t=>n.hasPermission(e,t)}:{canCreate:!1,canUpdate:!1,canDelete:!1,canView:!1,canRefresh:!1,canExport:!1,hasPermission:()=>!1}}),[n,e,t])};function Er(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M416 128 192 384l-96-96"},child:[]}]})(e)}function Pr(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M336 176h40a40 40 0 0 1 40 40v208a40 40 0 0 1-40 40H136a40 40 0 0 1-40-40V216a40 40 0 0 1 40-40h40"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m176 272 80 80 80-80M256 48v288"},child:[]}]})(e)}function Nr(e){return fe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z"},child:[]},{tag:"circle",attr:{cx:"256",cy:"256",r:"80",fill:"none",strokeMiterlimit:"10",strokeWidth:"32"},child:[]}]})(e)}function Tr(e){return fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0zm0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function Or(e){return fe({attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20.986 17c0-.105-.004-.211-.038-.316l-2-6c-.093-.276-.302-.483-.56-.594.881-1.175.799-2.847-.269-3.914l-6.119-6.121-6.121 6.121c-1.067 1.067-1.149 2.739-.27 3.914-.256.109-.467.316-.559.594l-2 6c-.034.105-.038.211-.038.316-.012 0-.012 5-.012 5 0 .553.447 1 1 1h16c.553 0 1-.447 1-1 0 0 0-5-.014-5zm-13.693-9.41l4.707-4.707 4.707 4.707c.391.391.391 1.023 0 1.414-.379.377-1.035.377-1.414 0l-2.293-2.293v5.789c0 .552-.448 1-1 1s-1-.448-1-1v-5.789l-2.293 2.293c-.379.377-1.035.377-1.414 0-.391-.391-.391-1.025 0-1.414zm-.572 4.41h2.279v.5c0 1.654 1.346 3 3 3s3-1.346 3-3v-.5h2.279l1.666 5h-13.892l1.668-5zm-1.721 9v-3h14v3h-14z"},child:[]}]})(e)}const zr=[{title:"Descargar plantilla",description:"Obten el formato correcto",icon:/* @__PURE__ */ne.jsx(Pr,{})},{title:"Subir archivo",description:"Carga tu archivo de datos",icon:/* @__PURE__ */ne.jsx(Or,{})},{title:"Vista previa",description:"Revisa los datos cargados",icon:/* @__PURE__ */ne.jsx(Nr,{})},{title:"Validar",description:"Verifica que los datos sean correctos",icon:/* @__PURE__ */ne.jsx(Er,{})},{title:"Confirmar",description:"Procesa la carga masiva",icon:/* @__PURE__ */ne.jsx(Tr,{})}];function $r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _r(e,t){if(e){if("string"==typeof e)return $r(e,t);var n={}.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)?$r(e,t):void 0}}function Lr(e){return function(e){if(Array.isArray(e))return $r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_r(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Fr="accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError".split(/[\s\n]+/);function Rr(e,t){return 0===e.indexOf(t)}function jr(t){const n=e.useRef(t);n.current=t;return e.useCallback(((...e)=>n.current?.(...e)),[])}const Dr="test"!==process.env.NODE_ENV&&Et()?e.useLayoutEffect:e.useEffect,Ar=(t,n)=>{const r=e.useRef(!0);Dr((()=>t(r.current)),n),Dr((()=>(r.current=!1,()=>{r.current=!0})),[])},Mr=t=>{const n=e.useRef(!1),[r,o]=e.useState(t);return e.useEffect((()=>(n.current=!1,()=>{n.current=!0})),[]),[r,function(e,t){t&&n.current||o(e)}]};function Ir(e,t){const[r,o]=n(e),a=void 0!==t?t:r;return Ar((e=>{e||o(t)}),[t]),[a,o]}function Hr(e,t){let n=e;for(let r=0;r<t.length;r+=1){if(null==n)return;n=n[t[r]]}return n}function Vr(e,t,n,r){if(!t.length)return n;const[o,...a]=t;let i;return i=e||"number"!=typeof o?Array.isArray(e)?[...e]:{...e}:[],r&&void 0===n&&1===a.length?delete i[o][a[0]]:i[o]=Vr(i[o],a,n,r),i}function Br(e,t,n,r=!1){return t.length&&r&&void 0===n&&!Hr(e,t.slice(0,-1))?e:Vr(e,t,n,r)}function Wr(e){return Array.isArray(e)?[]:{}}const Ur="undefined"==typeof Reflect?Object.keys:Reflect.ownKeys;function qr(e,t={}){const{prepareArray:n}=t,r=n||(()=>[]);let o=Wr(e[0]);return e.forEach((e=>{!function t(n,a){const i=new Set(a),l=Hr(e,n),s=Array.isArray(l);if(s||"object"==typeof(u=l)&&null!==u&&Object.getPrototypeOf(u)===Object.prototype){if(!i.has(l)){i.add(l);const e=Hr(o,n);s?o=Br(o,n,r(e,l)):e&&"object"==typeof e||(o=Br(o,n,Wr(l))),Ur(l).forEach((e=>{Object.getOwnPropertyDescriptor(l,e).enumerable&&t([...n,e],i)}))}}else o=Br(o,n,l);var u}([])})),o}function Xr(...e){return qr(e)}function Qr(e,t){const n=Object.assign({},e);return Array.isArray(t)&&t.forEach((e=>{delete n[e]})),n}function Gr(e,n={}){let r=[];return t.Children.forEach(e,(e=>{(null!=e||n.keepEmpty)&&(Array.isArray(e)?r=r.concat(Gr(e)):pr(e)&&e.props?r=r.concat(Gr(e.props.children,n)):r.push(e))})),r}function Yr(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(n){return t}}function Kr(e){const t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});const n=new FormData;e.data&&Object.keys(e.data).forEach((t=>{const r=e.data[t];Array.isArray(r)?r.forEach((e=>{n.append(`${t}[]`,e)})):n.append(t,r)})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){const n=`cannot ${e.method} ${e.action} ${t.status}'`,r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),Yr(t)):e.onSuccess(Yr(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((e=>{null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort(){t.abort()}}}const Zr=async(e,t)=>{const n=[],r=[];e.forEach((e=>r.push(e.webkitGetAsEntry())));const o=async(e,o)=>{if(e)if(e.path="",e.isFile){const r=await async function(e){return new Promise((n=>{e.file((r=>{t(r)?(e.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=e.fullPath.replace(/^\//,""),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),n(r)):n(null)}))}))}(e);r&&n.push(r)}else if(e.isDirectory){const t=await async function(e){const t=e.createReader(),n=[];for(;;){const e=await new Promise((e=>{t.readEntries(e,(()=>e([])))})),r=e.length;if(!r)break;for(let t=0;t<r;t++)n.push(e[t])}return n}(e);r.push(...t)}};let a=0;for(;a<r.length;)await o(r[a]),a++;return n},Jr=+/* @__PURE__ */new Date;let eo=0;function to(){return`rc-upload-${Jr}-${++eo}`}function no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},no.apply(this,arguments)}class ro extends c{state={uid:to()};reqs={};fileInput;_isMounted;filterFile=(e,t=!1)=>{const{accept:n,directory:r}=this.props;let o,a;if("string"==typeof n)a=n;else{const{filter:e,format:t}=n||{};a=t,o="native"===e?()=>!0:e}const i=o||(r||t?e=>((e,t)=>{if(e&&t){const n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=e.type||"",a=o.replace(/\/.*$/,"");return n.some((e=>{const t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if("."===t.charAt(0)){const e=r.toLowerCase(),n=t.toLowerCase();let o=[n];return".jpg"!==n&&".jpeg"!==n||(o=[".jpg",".jpeg"]),o.some((t=>e.endsWith(t)))}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,""):o===t||!!/^\w+$/.test(t)&&(Bt(!1,`Upload takes an invalidate 'accept' type '${t}'.Skip for check.`),!0)}))}return!0})(e,a):()=>!0);return i(e)};onChange=e=>{const{files:t}=e.target,n=[...t].filter((e=>this.filterFile(e)));this.uploadFiles(n),this.reset()};onClick=e=>{const t=this.fileInput;if(!t)return;const n=e.target,{onClick:r}=this.props;if(n&&"BUTTON"===n.tagName){t.parentNode.focus(),n.blur()}t.click(),r&&r(e)};onKeyDown=e=>{"Enter"===e.key&&this.onClick(e)};onDataTransferFiles=async(e,t)=>{const{multiple:n,directory:r}=this.props,o=[...e.items||[]];let a=[...e.files||[]];if((a.length>0||o.some((e=>"file"===e.kind)))&&t?.(),r)a=await Zr(Array.prototype.slice.call(o),this.filterFile),this.uploadFiles(a);else{let e=[...a].filter((e=>this.filterFile(e,!0)));!1===n&&(e=a.slice(0,1)),this.uploadFiles(e)}};onFilePaste=async e=>{const{pastable:t}=this.props;if(t&&"paste"===e.type){const t=e.clipboardData;return this.onDataTransferFiles(t,(()=>{e.preventDefault()}))}};onFileDragOver=e=>{e.preventDefault()};onFileDrop=async e=>{if(e.preventDefault(),"drop"===e.type){const t=e.dataTransfer;return this.onDataTransferFiles(t)}};componentDidMount(){this._isMounted=!0;const{pastable:e}=this.props;e&&document.addEventListener("paste",this.onFilePaste)}componentWillUnmount(){this._isMounted=!1,this.abort(),document.removeEventListener("paste",this.onFilePaste)}componentDidUpdate(e){const{pastable:t}=this.props;t&&!e.pastable?document.addEventListener("paste",this.onFilePaste):!t&&e.pastable&&document.removeEventListener("paste",this.onFilePaste)}uploadFiles=e=>{const t=[...e],n=t.map((e=>(e.uid=to(),this.processFile(e,t))));Promise.all(n).then((e=>{const{onBatchStart:t}=this.props;t?.(e.map((({origin:e,parsedFile:t})=>({file:e,parsedFile:t})))),e.filter((e=>null!==e.parsedFile)).forEach((e=>{this.post(e)}))}))};processFile=async(e,t)=>{const{beforeUpload:n}=this.props;let r=e;if(n){try{r=await n(e,t)}catch(d){r=!1}if(!1===r)return{origin:e,parsedFile:null,action:null,data:null}}const{action:o}=this.props;let a;a="function"==typeof o?await o(e):o;const{data:i}=this.props;let l;l="function"==typeof i?await i(e):i;const s="object"!=typeof r&&"string"!=typeof r||!r?e:r;let u;u=s instanceof File?s:new File([s],e.name,{type:e.type});const c=u;return c.uid=e.uid,{origin:e,data:l,parsedFile:c,action:a}};post({data:e,origin:t,action:n,parsedFile:r}){if(!this._isMounted)return;const{onStart:o,customRequest:a,name:i,headers:l,withCredentials:s,method:u}=this.props,{uid:c}=t,d=a||Kr,f={action:n,filename:i,data:e,file:r,headers:l,withCredentials:s,method:u||"post",onProgress:e=>{const{onProgress:t}=this.props;t?.(e,r)},onSuccess:(e,t)=>{const{onSuccess:n}=this.props;n?.(e,r,t),delete this.reqs[c]},onError:(e,t)=>{const{onError:n}=this.props;n?.(e,t,r),delete this.reqs[c]}};o(t),this.reqs[c]=d(f,{defaultRequest:Kr})}reset(){this.setState({uid:to()})}abort(e){const{reqs:t}=this;if(e){const n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach((e=>{t[e]&&t[e].abort&&t[e].abort(),delete t[e]}))}saveFileInput=e=>{this.fileInput=e};render(){const{component:e,prefixCls:n,className:r,classNames:o={},disabled:a,id:i,name:l,style:s,styles:u={},multiple:c,accept:d,capture:f,children:p,directory:h,openFileDialogOnClick:m,onMouseEnter:g,onMouseLeave:y,hasControlInside:b,...v}=this.props,w="string"==typeof d?d:d?.format,k=Ze(n,{[`${n}-disabled`]:a,[r]:r}),S=h?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},x=a?{}:{onClick:m?this.onClick:()=>{},onKeyDown:m?this.onKeyDown:()=>{},onMouseEnter:g,onMouseLeave:y,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:b?void 0:"0"};/* @__PURE__ */
@@ -141,6 +140,6 @@ return ne.jsxs(j,{children:[
141
140
  /* @__PURE__ */ne.jsx("strong",{children:"Advertencias:"})," ",C?.details.filter((e=>"warning"===e.severity)).length||0]})]}),type:"info",style:{margin:"16px 0"}}),
142
141
  /* @__PURE__ */ne.jsxs(v,{gutter:16,children:[
143
142
  /* @__PURE__ */ne.jsx(w,{span:12,children:/* @__PURE__ */ne.jsx(g,{block:!0,onClick:()=>u(3),children:"Volver a validación"})}),
144
- /* @__PURE__ */ne.jsx(w,{span:12,children:/* @__PURE__ */ne.jsx(g,{type:"primary",block:!0,onClick:()=>{x.success(`${P.length} registros cargados exitosamente`),a&&P.length>0&&a(P),q(),o()},children:"Cargar datos"})})]})]});default:return null}})()]})},uh=({columns:e,data:t,title:r,formTitle:i,formTitles:l,description:s,formDescription:u,fields:c,showCreateButton:d,createButtonText:f="Crear",createButtonIcon:p,icon:h,layout:m,actionConfig:g,searchConfig:y,headerDirection:b,showRefreshButton:v,onRefresh:w,loading:k,onCreate:S,createRedirect:x=!1,onEdit:C,onDelete:E,onView:P,submitButtonText:N="Guardar",apiConfig:T,initialData:O,themeConfig:z,moreActions:$,formCols:_=1,formCustomCols:L=!1,exportToExcel:R,backButton:j,showSearchBar:D,customFilters:A,disableWrapper:M=!0,hiddenActions:H=!1,widthActionsCol:V,crudName:B,permissions:W,paginationConfig:U,bulkUpload:q={enabled:!1}})=>{const[X,Q]=n(!1),[G,Y]=n(null),[K,Z]=n(O?"update":"create"),[J,ee]=n(!1),{canCreate:te,canUpdate:re,canDelete:oe,canView:ae}=Cr(B,W),ie=Boolean(B||W),le=o(((e,t,n)=>n?!!t&&("function"==typeof e?e:void 0===e||e):e),[]),se=a((()=>ie?{...g,showEdit:le(g?.showEdit,re,ie),showDelete:le(g?.showDelete,oe,ie),showView:le(g?.showView,ae,ie)}:g),[g,re,oe,ae,ie,le]),ue=ie?d&&te:d,ce=e.find((e=>e.isPrimaryKey))?.dataIndex||"id",de=e=>{const t={...e};return c?.forEach((e=>{"datepicker"===e.type&&t[e.name]&&(t[e.name]=I(t[e.name]))})),t},fe=i||("create"===K?l?.[0]||"Crear nuevo registro":"update"===K?l?.[1]||"Editar registro":l?.[2]||"Ver registro"),pe=h||("create"===K?p||/* @__PURE__ */ne.jsx(nr,{}):"update"===K?/* @__PURE__ */ne.jsx(Tn,{}):/* @__PURE__ */ne.jsx(In,{}));/* @__PURE__ */
143
+ /* @__PURE__ */ne.jsx(w,{span:12,children:/* @__PURE__ */ne.jsx(g,{type:"primary",block:!0,onClick:()=>{x.success(`${P.length} registros cargados exitosamente`),a&&P.length>0&&a(P),q(),o()},children:"Cargar datos"})})]})]});default:return null}})()]})},uh=({columns:e,data:t,title:r,formTitle:i,formTitles:l,description:s,formDescription:u,fields:c,showCreateButton:d,createButtonText:f="Crear",createButtonIcon:p,icon:h,layout:m,actionConfig:g,searchConfig:y,headerDirection:b,showRefreshButton:v,onRefresh:w,loading:k,onCreate:S,createRedirect:x=!1,onEdit:C,onDelete:E,onView:P,submitButtonText:N="Guardar",apiConfig:T,initialData:O,themeConfig:z,moreActions:$,formCols:_=1,formCustomCols:L=!1,exportToExcel:R,backButton:j,showSearchBar:D,customFilters:A,disableWrapper:M=!0,hiddenActions:H=!1,widthActionsCol:V,crudName:B,permissions:W,paginationConfig:U,bulkUpload:q={enabled:!1},borderedTable:X=!0,sizeTable:Q="middle"})=>{const[G,Y]=n(!1),[K,Z]=n(null),[J,ee]=n(O?"update":"create"),[te,re]=n(!1),{canCreate:oe,canUpdate:ae,canDelete:ie,canView:le}=Cr(B,W),se=Boolean(B||W),ue=o(((e,t,n)=>n?!!t&&("function"==typeof e?e:void 0===e||e):e),[]),ce=a((()=>se?{...g,showEdit:ue(g?.showEdit,ae,se),showDelete:ue(g?.showDelete,ie,se),showView:ue(g?.showView,le,se)}:g),[g,ae,ie,le,se,ue]),de=se?d&&oe:d,fe=e.find((e=>e.isPrimaryKey))?.dataIndex||"id",pe=e=>{const t={...e};return c?.forEach((e=>{"datepicker"===e.type&&t[e.name]&&(t[e.name]=I(t[e.name]))})),t},he=i||("create"===J?l?.[0]||"Crear nuevo registro":"update"===J?l?.[1]||"Editar registro":l?.[2]||"Ver registro"),me=h||("create"===J?p||/* @__PURE__ */ne.jsx(nr,{}):"update"===J?/* @__PURE__ */ne.jsx(Tn,{}):/* @__PURE__ */ne.jsx(In,{}));/* @__PURE__ */
145
144
  return ne.jsxs("div",{children:[
146
- /* @__PURE__ */ne.jsx(Ge,{title:r,description:s,icon:h,columns:e,data:t||[],showCreateButton:ue,createButtonText:f,createButtonIcon:p,searchConfig:y,actionConfig:se,hiddenActions:H,headerDirection:b,showSearchBar:D,showRefreshButton:v,loading:k,onCreate:()=>{x?"function"==typeof S&&S({}):(Q(!0),Z("create"))},onEdit:e=>{const t=de(e);Y(t),Q(!0),Z("update")},onRefresh:w,onDelete:e=>{E?.(e)},onView:e=>{if(P)P(e);else{const t=de(e);Y(t),Q(!0),Z("view")}},themeConfig:z,moreActions:$,customFilters:A,exportToExcel:R,bulkUpload:q,backButton:j,disableWrapper:M,widthActionsCol:V,onBulkUpload:()=>{ee(!0)},paginationConfig:U}),X&&/* @__PURE__ */ne.jsx(F,{open:X,onCancel:()=>{Q(!1),Y(null),Z(O?"update":"create")},footer:null,children:/* @__PURE__ */ne.jsx(Me,{title:fe,description:u||s,fields:c||[],icon:pe,layout:m,initialData:G||void 0,onSubmit:e=>{try{if("update"===K){const t={..."object"==typeof e&&null!==e?e:{},[ce]:G?.[ce]};C?.(t),Y(null)}else S?.(e);Q(!1)}catch(t){}},mode:K,submitButtonText:N,apiConfig:T,cols:_,customCols:L})}),J&&q?.enabled&&/* @__PURE__ */ne.jsx(sh,{title:q?.title||"Carga masiva",visible:J,onCancel:()=>ee(!1),onFinish:q.onFinish,config:q.config})]})};class ch{baseUrl;config;instances;constructor(e,t){this.baseUrl=e,this.config=t,this.instances={};const n=H.create({baseURL:this.baseUrl,...this.config});Object.assign(n,{getInstance:this.getInstance.bind(this)}),this.instances.default=n}createApiInstance(e){return H.create({baseURL:`${this.baseUrl}/${e}`,...this.config})}version(e){return this.instances[e]||(this.instances[e]=this.createApiInstance(e)),this.instances[e]}getInstance(e){return this.instances[e]||(this.instances[e]=this.createApiInstance(e)),this.instances[e]}}const dh=e=>Object.values(e).map((e=>({key:e.key,title:e.title,dataIndex:e.key,sorter:e.sorter?(t,n)=>Ae(e.key)(t,n):void 0,width:e.width,align:e.align,icon:e.icon,isHidden:e.isHidden,render:e.render,filters:e.filtrers,onFilter:e.onFilter,isPrimaryKey:"id"===e.key?.toLowerCase()||"uuid"===e.key?.toLowerCase()}))),fh=e=>Object.entries(e).map((([e,t])=>({type:t.type||"text",name:e,label:t.label,placeholder:t.placeholder,validations:t.validations,datepickerConfig:t.datepickerConfig,min:t.min,max:t.max,step:t.step,width:t.width,readonly:t.readonly,hidden:t.hiddenInForm,hiddenIn:t.hiddenIn,submitKey:t.submitKey,checkboxConfig:t.checkboxConfig,selectConfig:t.selectConfig,dependsOn:t.dependsOn,options:t.options,onChange:t.onChange,uploadConfig:t.uploadConfig,radioConfig:t.radioConfig}))),ph=(e,t,n,r="bottomRight")=>{M[e]({message:t,description:n,placement:r})},hh=({queryKey:e,queryFn:t,config:n={}})=>q({queryKey:e,queryFn:t,...n}),mh=({queryKey:e,mutationFn:t,config:n={}})=>{const r=X();return Q({mutationFn:t,onSettled:()=>{r.invalidateQueries({queryKey:e})},...n})};function gh({getAll:e,create:t,update:n,delete:r,idField:o="id",entityName:a="item"}){const i=[`crud-${o}`],{data:l=[],isLoading:s,refetch:u}=hh({queryKey:i,queryFn:async()=>(await e()).data??[],config:{onError:e=>ph("error","Error al cargar los datos",e.message)}}),c={creado:"crear",actualizado:"actualizar",eliminado:"eliminar"},d=e=>({queryKey:i,config:{onSuccess:()=>{ph("success",`${a.charAt(0).toUpperCase()+a.slice(1)} ${e} exitosamente`,""),u()},onError:t=>ph("error",`Error al ${c[e]} el ${a}`,t.message)}}),{mutateAsync:f}=mh({...d("creado"),mutationFn:async e=>{if(!t)throw new Error("Create function is not defined");const n=await t(e);if(n.error)throw new Error(n.message);return n.data}}),{mutateAsync:p}=mh({...d("actualizado"),mutationFn:async e=>{if(!n)throw new Error("Update function is not defined");const t=await n(e);if(t.error)throw new Error(t.message);return t.data}}),{mutateAsync:h}=mh({...d("eliminado"),mutationFn:async e=>{if(!r)throw new Error("Delete function is not defined");return(await r(e)).data}});return{data:l,isLoading:s,refetch:u,handleCreate:async e=>{const t=e;return await f(t)},handleUpdate:async e=>{const t=e;return await p(t)},handleDelete:async e=>{const t=e;return await h(t)},createItemAsync:f,updateItemAsync:p,deleteItemAsync:h}}const yh=(e,t)=>{const[o,a]=n(),[i,l]=n(null),[s,u]=n(!0);return r((()=>{(async()=>{try{u(!0);const t=await e();a(t&&"object"==typeof t&&"data"in t?t.data:t)}catch(t){l(t instanceof Error?t:new Error("An error occurred"))}finally{u(!1)}})()}),t||[]),{data:o,error:i,loading:s}},bh=()=>function(e,t,n,r,o,a,i="",l={}){return{key:e,icon:t,label:i,style:l,tooltip:n,className:r,onClick:o,hidden:a}},vh=e=>e,wh={FULL_ACCESS:["create","read","update","delete","view","refresh","export"],READ_WRITE:["create","read","update","view","refresh"],READ_ONLY:["read","view"],VIEW_ONLY:["view"],NO_ACCESS:[]},kh=(...e)=>e,Sh=(e,t)=>n=>Th(n,e)!==t,xh=(e,t)=>n=>Th(n,e)===t,Ch=(e,t)=>n=>{const r=Th(n,e);return!t.includes(r)},Eh=e=>t=>e.every((e=>e(t))),Ph=e=>t=>e.some((e=>e(t))),Nh=e=>t=>!e(t),Th=(e,t)=>{const n=t.split(".");let r=e;for(const o of n){if(!r||"object"!=typeof r||!(o in r))return;r=r[o]}return r},Oh=e=>e.filter((e=>!e.isHidden)).map((e=>({title:e.title,dataIndex:e.key,key:e.key,width:e.width,align:e.align,icon:e.icon,render:e.render,sorter:e.sorter,filters:e.filtrers,onFilter:e.onFilter}))),zh=(e,t)=>e.filter((e=>!e.hiddenInForm&&(("create"!==t||"create"!==e.hiddenIn)&&("edit"!==t||"edit"!==e.hiddenIn)))).map((e=>({name:e.submitKey||e.key,label:e.label||e.title,type:e.type||"text",placeholder:e.placeholder,validations:e.validations,readonly:e.readonly,checkboxConfig:e.checkboxConfig,selectConfig:e.selectConfig,dependsOn:e.dependsOn,min:e.min,max:e.max,step:e.step,options:e.options,onChange:e.onChange,uploadConfig:e.uploadConfig,radioConfig:e.radioConfig,datepickerConfig:e.datepickerConfig}))),$h=(e,t)=>({columns:Oh(e),fields:zh(e,t)});export{ch as ApiVersioning,ze as Btn,uh as DynamicCrud,Me as DynamicForm,Ge as DynamicTable,wh as PERMISSIONS,xr as PermissionsProvider,_e as Title,Eh as combineConditions,Ph as combineConditionsOr,bh as createActionFactory,kh as createPermissions,vh as createPermissionsConfig,De as flattenObject,dh as generateColumns,fh as generateFields,Fe as getNestedValue,Sh as hideActionWhen,Ch as hideActionWhenIn,Nh as not,ph as openNotification,$h as processSharedFields,Re as setNestedValue,Oh as sharedFieldsToColumns,zh as sharedFieldsToFormFields,xh as showActionWhen,Ae as sortOrder,je as unflattenObject,yh as useAsync,gh as useCrudOperations,mh as useMutationFetch,Cr as usePermissions,hh as useQueryFetch};
145
+ /* @__PURE__ */ne.jsx(Ge,{title:r,description:s,icon:h,columns:e,data:t||[],showCreateButton:de,createButtonText:f,createButtonIcon:p,searchConfig:y,actionConfig:ce,hiddenActions:H,headerDirection:b,showSearchBar:D,showRefreshButton:v,loading:k,onCreate:()=>{x?"function"==typeof S&&S({}):(Y(!0),ee("create"))},onEdit:e=>{const t=pe(e);Z(t),Y(!0),ee("update")},onRefresh:w,onDelete:e=>{E?.(e)},onView:e=>{if(P)P(e);else{const t=pe(e);Z(t),Y(!0),ee("view")}},themeConfig:z,moreActions:$,customFilters:A,exportToExcel:R,bulkUpload:q,backButton:j,disableWrapper:M,widthActionsCol:V,onBulkUpload:()=>{re(!0)},paginationConfig:U,borderedTable:X,sizeTable:Q}),G&&/* @__PURE__ */ne.jsx(F,{open:G,onCancel:()=>{Y(!1),Z(null),ee(O?"update":"create")},footer:null,children:/* @__PURE__ */ne.jsx(Me,{title:he,description:u||s,fields:c||[],icon:me,layout:m,initialData:K||void 0,onSubmit:e=>{try{if("update"===J){const t={..."object"==typeof e&&null!==e?e:{},[fe]:K?.[fe]};C?.(t),Z(null)}else S?.(e);Y(!1)}catch(t){}},mode:J,submitButtonText:N,apiConfig:T,cols:_,customCols:L})}),te&&q?.enabled&&/* @__PURE__ */ne.jsx(sh,{title:q?.title||"Carga masiva",visible:te,onCancel:()=>re(!1),onFinish:q.onFinish,config:q.config})]})};class ch{baseUrl;config;instances;constructor(e,t){this.baseUrl=e,this.config=t,this.instances={};const n=H.create({baseURL:this.baseUrl,...this.config});Object.assign(n,{getInstance:this.getInstance.bind(this)}),this.instances.default=n}createApiInstance(e){return H.create({baseURL:`${this.baseUrl}/${e}`,...this.config})}version(e){return this.instances[e]||(this.instances[e]=this.createApiInstance(e)),this.instances[e]}getInstance(e){return this.instances[e]||(this.instances[e]=this.createApiInstance(e)),this.instances[e]}}const dh=e=>Object.values(e).map((e=>({key:e.key,title:e.title,dataIndex:e.key,sorter:e.sorter?(t,n)=>Ae(e.key)(t,n):void 0,width:e.width,align:e.align,icon:e.icon,isHidden:e.isHidden,render:e.render,filters:e.filtrers,onFilter:e.onFilter,isPrimaryKey:"id"===e.key?.toLowerCase()||"uuid"===e.key?.toLowerCase()}))),fh=e=>Object.entries(e).map((([e,t])=>({type:t.type||"text",name:e,label:t.label,placeholder:t.placeholder,validations:t.validations,datepickerConfig:t.datepickerConfig,min:t.min,max:t.max,step:t.step,width:t.width,readonly:t.readonly,hidden:t.hiddenInForm,hiddenIn:t.hiddenIn,submitKey:t.submitKey,checkboxConfig:t.checkboxConfig,selectConfig:t.selectConfig,dependsOn:t.dependsOn,options:t.options,onChange:t.onChange,uploadConfig:t.uploadConfig,radioConfig:t.radioConfig}))),ph=(e,t,n,r="bottomRight")=>{M[e]({message:t,description:n,placement:r})},hh=({queryKey:e,queryFn:t,config:n={}})=>q({queryKey:e,queryFn:t,...n}),mh=({queryKey:e,mutationFn:t,config:n={}})=>{const r=X();return Q({mutationFn:t,onSettled:()=>{r.invalidateQueries({queryKey:e})},...n})};function gh({getAll:e,create:t,update:n,delete:r,idField:o="id",entityName:a="item"}){const i=[`crud-${o}`],{data:l=[],isLoading:s,refetch:u}=hh({queryKey:i,queryFn:async()=>(await e()).data??[],config:{onError:e=>ph("error","Error al cargar los datos",e.message)}}),c={creado:"crear",actualizado:"actualizar",eliminado:"eliminar"},d=e=>({queryKey:i,config:{onSuccess:()=>{ph("success",`${a.charAt(0).toUpperCase()+a.slice(1)} ${e} exitosamente`,""),u()},onError:t=>ph("error",`Error al ${c[e]} el ${a}`,t.message)}}),{mutateAsync:f}=mh({...d("creado"),mutationFn:async e=>{if(!t)throw new Error("Create function is not defined");const n=await t(e);if(n.error)throw new Error(n.message);return n.data}}),{mutateAsync:p}=mh({...d("actualizado"),mutationFn:async e=>{if(!n)throw new Error("Update function is not defined");const t=await n(e);if(t.error)throw new Error(t.message);return t.data}}),{mutateAsync:h}=mh({...d("eliminado"),mutationFn:async e=>{if(!r)throw new Error("Delete function is not defined");return(await r(e)).data}});return{data:l,isLoading:s,refetch:u,handleCreate:async e=>{const t=e;return await f(t)},handleUpdate:async e=>{const t=e;return await p(t)},handleDelete:async e=>{const t=e;return await h(t)},createItemAsync:f,updateItemAsync:p,deleteItemAsync:h}}const yh=(e,t)=>{const[o,a]=n(),[i,l]=n(null),[s,u]=n(!0);return r((()=>{(async()=>{try{u(!0);const t=await e();a(t&&"object"==typeof t&&"data"in t?t.data:t)}catch(t){l(t instanceof Error?t:new Error("An error occurred"))}finally{u(!1)}})()}),t||[]),{data:o,error:i,loading:s}},bh=()=>function(e,t,n,r,o,a,i="",l={}){return{key:e,icon:t,label:i,style:l,tooltip:n,className:r,onClick:o,hidden:a}},vh=e=>e,wh={FULL_ACCESS:["create","read","update","delete","view","refresh","export"],READ_WRITE:["create","read","update","view","refresh"],READ_ONLY:["read","view"],VIEW_ONLY:["view"],NO_ACCESS:[]},kh=(...e)=>e,Sh=(e,t)=>n=>Th(n,e)!==t,xh=(e,t)=>n=>Th(n,e)===t,Ch=(e,t)=>n=>{const r=Th(n,e);return!t.includes(r)},Eh=e=>t=>e.every((e=>e(t))),Ph=e=>t=>e.some((e=>e(t))),Nh=e=>t=>!e(t),Th=(e,t)=>{const n=t.split(".");let r=e;for(const o of n){if(!r||"object"!=typeof r||!(o in r))return;r=r[o]}return r},Oh=e=>e.filter((e=>!e.isHidden)).map((e=>({title:e.title,dataIndex:e.key,key:e.key,width:e.width,align:e.align,icon:e.icon,render:e.render,sorter:e.sorter,filters:e.filtrers,onFilter:e.onFilter}))),zh=(e,t)=>e.filter((e=>!e.hiddenInForm&&(("create"!==t||"create"!==e.hiddenIn)&&("edit"!==t||"edit"!==e.hiddenIn)))).map((e=>({name:e.submitKey||e.key,label:e.label||e.title,type:e.type||"text",placeholder:e.placeholder,validations:e.validations,readonly:e.readonly,checkboxConfig:e.checkboxConfig,selectConfig:e.selectConfig,dependsOn:e.dependsOn,min:e.min,max:e.max,step:e.step,options:e.options,onChange:e.onChange,uploadConfig:e.uploadConfig,radioConfig:e.radioConfig,datepickerConfig:e.datepickerConfig}))),$h=(e,t)=>({columns:Oh(e),fields:zh(e,t)});export{ch as ApiVersioning,ze as Btn,uh as DynamicCrud,Me as DynamicForm,Ge as DynamicTable,wh as PERMISSIONS,xr as PermissionsProvider,_e as Title,Eh as combineConditions,Ph as combineConditionsOr,bh as createActionFactory,kh as createPermissions,vh as createPermissionsConfig,De as flattenObject,dh as generateColumns,fh as generateFields,Fe as getNestedValue,Sh as hideActionWhen,Ch as hideActionWhenIn,Nh as not,ph as openNotification,$h as processSharedFields,Re as setNestedValue,Oh as sharedFieldsToColumns,zh as sharedFieldsToFormFields,xh as showActionWhen,Ae as sortOrder,je as unflattenObject,yh as useAsync,gh as useCrudOperations,mh as useMutationFetch,Cr as usePermissions,hh as useQueryFetch};