@wecode-team/we0-cms 1.1.32 → 1.1.34

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.
Files changed (124) hide show
  1. package/dist/components/tiptap-extension/node-background-extension.d.ts +23 -0
  2. package/dist/components/tiptap-icons/align-center-icon.d.ts +3 -0
  3. package/dist/components/tiptap-icons/align-justify-icon.d.ts +3 -0
  4. package/dist/components/tiptap-icons/align-left-icon.d.ts +3 -0
  5. package/dist/components/tiptap-icons/align-right-icon.d.ts +3 -0
  6. package/dist/components/tiptap-icons/arrow-left-icon.d.ts +3 -0
  7. package/dist/components/tiptap-icons/ban-icon.d.ts +3 -0
  8. package/dist/components/tiptap-icons/blockquote-icon.d.ts +3 -0
  9. package/dist/components/tiptap-icons/bold-icon.d.ts +3 -0
  10. package/dist/components/tiptap-icons/check-icon.d.ts +3 -0
  11. package/dist/components/tiptap-icons/chevron-down-icon.d.ts +3 -0
  12. package/dist/components/tiptap-icons/close-icon.d.ts +3 -0
  13. package/dist/components/tiptap-icons/code-block-icon.d.ts +3 -0
  14. package/dist/components/tiptap-icons/code2-icon.d.ts +3 -0
  15. package/dist/components/tiptap-icons/corner-down-left-icon.d.ts +3 -0
  16. package/dist/components/tiptap-icons/external-link-icon.d.ts +3 -0
  17. package/dist/components/tiptap-icons/heading-five-icon.d.ts +3 -0
  18. package/dist/components/tiptap-icons/heading-four-icon.d.ts +3 -0
  19. package/dist/components/tiptap-icons/heading-icon.d.ts +3 -0
  20. package/dist/components/tiptap-icons/heading-one-icon.d.ts +3 -0
  21. package/dist/components/tiptap-icons/heading-six-icon.d.ts +3 -0
  22. package/dist/components/tiptap-icons/heading-three-icon.d.ts +3 -0
  23. package/dist/components/tiptap-icons/heading-two-icon.d.ts +3 -0
  24. package/dist/components/tiptap-icons/highlighter-icon.d.ts +3 -0
  25. package/dist/components/tiptap-icons/image-plus-icon.d.ts +3 -0
  26. package/dist/components/tiptap-icons/italic-icon.d.ts +3 -0
  27. package/dist/components/tiptap-icons/link-icon.d.ts +3 -0
  28. package/dist/components/tiptap-icons/list-icon.d.ts +3 -0
  29. package/dist/components/tiptap-icons/list-ordered-icon.d.ts +3 -0
  30. package/dist/components/tiptap-icons/list-todo-icon.d.ts +3 -0
  31. package/dist/components/tiptap-icons/moon-star-icon.d.ts +3 -0
  32. package/dist/components/tiptap-icons/redo2-icon.d.ts +3 -0
  33. package/dist/components/tiptap-icons/strike-icon.d.ts +3 -0
  34. package/dist/components/tiptap-icons/subscript-icon.d.ts +3 -0
  35. package/dist/components/tiptap-icons/sun-icon.d.ts +3 -0
  36. package/dist/components/tiptap-icons/superscript-icon.d.ts +3 -0
  37. package/dist/components/tiptap-icons/trash-icon.d.ts +3 -0
  38. package/dist/components/tiptap-icons/underline-icon.d.ts +3 -0
  39. package/dist/components/tiptap-icons/undo2-icon.d.ts +3 -0
  40. package/dist/components/tiptap-node/horizontal-rule-node/horizontal-rule-node-extension.d.ts +2 -0
  41. package/dist/components/tiptap-node/image-upload-node/image-upload-node-extension.d.ts +58 -0
  42. package/dist/components/tiptap-node/image-upload-node/image-upload-node.d.ts +69 -0
  43. package/dist/components/tiptap-node/image-upload-node/index.d.ts +1 -0
  44. package/dist/components/tiptap-templates/simple/simple-editor.d.ts +19 -0
  45. package/dist/components/tiptap-templates/simple/theme-toggle.d.ts +1 -0
  46. package/dist/components/tiptap-ui/blockquote-button/blockquote-button.d.ts +22 -0
  47. package/dist/components/tiptap-ui/blockquote-button/index.d.ts +2 -0
  48. package/dist/components/tiptap-ui/blockquote-button/use-blockquote.d.ts +80 -0
  49. package/dist/components/tiptap-ui/code-block-button/code-block-button.d.ts +22 -0
  50. package/dist/components/tiptap-ui/code-block-button/index.d.ts +2 -0
  51. package/dist/components/tiptap-ui/code-block-button/use-code-block.d.ts +87 -0
  52. package/dist/components/tiptap-ui/color-highlight-button/color-highlight-button.d.ts +46 -0
  53. package/dist/components/tiptap-ui/color-highlight-button/index.d.ts +2 -0
  54. package/dist/components/tiptap-ui/color-highlight-button/use-color-highlight.d.ts +93 -0
  55. package/dist/components/tiptap-ui/color-highlight-popover/color-highlight-popover.d.ts +35 -0
  56. package/dist/components/tiptap-ui/color-highlight-popover/index.d.ts +1 -0
  57. package/dist/components/tiptap-ui/heading-button/heading-button.d.ts +23 -0
  58. package/dist/components/tiptap-ui/heading-button/index.d.ts +2 -0
  59. package/dist/components/tiptap-ui/heading-button/use-heading.d.ts +108 -0
  60. package/dist/components/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.d.ts +19 -0
  61. package/dist/components/tiptap-ui/heading-dropdown-menu/index.d.ts +2 -0
  62. package/dist/components/tiptap-ui/heading-dropdown-menu/use-heading-dropdown-menu.d.ts +73 -0
  63. package/dist/components/tiptap-ui/image-upload-button/image-upload-button.d.ts +29 -0
  64. package/dist/components/tiptap-ui/image-upload-button/index.d.ts +2 -0
  65. package/dist/components/tiptap-ui/image-upload-button/use-image-upload.d.ts +84 -0
  66. package/dist/components/tiptap-ui/link-popover/index.d.ts +2 -0
  67. package/dist/components/tiptap-ui/link-popover/link-popover.d.ts +58 -0
  68. package/dist/components/tiptap-ui/link-popover/use-link-popover.d.ts +117 -0
  69. package/dist/components/tiptap-ui/list-button/index.d.ts +2 -0
  70. package/dist/components/tiptap-ui/list-button/list-button.d.ts +23 -0
  71. package/dist/components/tiptap-ui/list-button/use-list.d.ts +97 -0
  72. package/dist/components/tiptap-ui/list-dropdown-menu/index.d.ts +1 -0
  73. package/dist/components/tiptap-ui/list-dropdown-menu/list-dropdown-menu.d.ts +28 -0
  74. package/dist/components/tiptap-ui/list-dropdown-menu/use-list-dropdown-menu.d.ts +90 -0
  75. package/dist/components/tiptap-ui/mark-button/index.d.ts +2 -0
  76. package/dist/components/tiptap-ui/mark-button/mark-button.d.ts +23 -0
  77. package/dist/components/tiptap-ui/mark-button/use-mark.d.ts +104 -0
  78. package/dist/components/tiptap-ui/text-align-button/index.d.ts +2 -0
  79. package/dist/components/tiptap-ui/text-align-button/text-align-button.d.ts +30 -0
  80. package/dist/components/tiptap-ui/text-align-button/use-text-align.d.ts +102 -0
  81. package/dist/components/tiptap-ui/undo-redo-button/index.d.ts +2 -0
  82. package/dist/components/tiptap-ui/undo-redo-button/undo-redo-button.d.ts +23 -0
  83. package/dist/components/tiptap-ui/undo-redo-button/use-undo-redo.d.ts +90 -0
  84. package/dist/components/tiptap-ui-primitive/badge/badge.d.ts +11 -0
  85. package/dist/components/tiptap-ui-primitive/badge/index.d.ts +1 -0
  86. package/dist/components/tiptap-ui-primitive/button/button.d.ts +16 -0
  87. package/dist/components/tiptap-ui-primitive/button/index.d.ts +1 -0
  88. package/dist/components/tiptap-ui-primitive/button-group/button-group.d.ts +11 -0
  89. package/dist/components/tiptap-ui-primitive/button-group/index.d.ts +1 -0
  90. package/dist/components/tiptap-ui-primitive/card/card.d.ts +10 -0
  91. package/dist/components/tiptap-ui-primitive/card/index.d.ts +1 -0
  92. package/dist/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.d.ts +29 -0
  93. package/dist/components/tiptap-ui-primitive/dropdown-menu/index.d.ts +1 -0
  94. package/dist/components/tiptap-ui-primitive/input/index.d.ts +1 -0
  95. package/dist/components/tiptap-ui-primitive/input/input.d.ts +3 -0
  96. package/dist/components/tiptap-ui-primitive/popover/index.d.ts +1 -0
  97. package/dist/components/tiptap-ui-primitive/popover/popover.d.ts +6 -0
  98. package/dist/components/tiptap-ui-primitive/separator/index.d.ts +1 -0
  99. package/dist/components/tiptap-ui-primitive/separator/separator.d.ts +6 -0
  100. package/dist/components/tiptap-ui-primitive/spacer/index.d.ts +1 -0
  101. package/dist/components/tiptap-ui-primitive/spacer/spacer.d.ts +5 -0
  102. package/dist/components/tiptap-ui-primitive/toolbar/index.d.ts +1 -0
  103. package/dist/components/tiptap-ui-primitive/toolbar/toolbar.d.ts +9 -0
  104. package/dist/components/tiptap-ui-primitive/tooltip/index.d.ts +1 -0
  105. package/dist/components/tiptap-ui-primitive/tooltip/tooltip.d.ts +29 -0
  106. package/dist/components/ui/richtext.d.ts +19 -3
  107. package/dist/hooks/use-composed-ref.d.ts +3 -0
  108. package/dist/hooks/use-cursor-visibility.d.ts +20 -0
  109. package/dist/hooks/use-element-rect.d.ts +35 -0
  110. package/dist/hooks/use-is-breakpoint.d.ts +9 -0
  111. package/dist/hooks/use-menu-navigation.d.ts +52 -0
  112. package/dist/hooks/use-scrolling.d.ts +8 -0
  113. package/dist/hooks/use-throttled-callback.d.ts +18 -0
  114. package/dist/hooks/use-tiptap-editor.d.ts +6 -0
  115. package/dist/hooks/use-unmount.d.ts +7 -0
  116. package/dist/hooks/use-window-size.d.ts +35 -0
  117. package/dist/i18n/types.d.ts +9 -0
  118. package/dist/index.css +2 -2
  119. package/dist/index.esm.js +11 -3
  120. package/dist/index.esm.js.map +1 -1
  121. package/dist/index.js +11 -3
  122. package/dist/index.js.map +1 -1
  123. package/dist/lib/tiptap-utils.d.ts +173 -0
  124. package/package.json +4 -1
package/dist/index.js CHANGED
@@ -1,11 +1,19 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react/jsx-runtime"),n=require("react-dom"),r=require("react-dom/client"),a=require("@uiw/react-codemirror"),o=require("@codemirror/lang-json"),i=require("@codemirror/view"),s=require("@tiptap/react"),l=require("@tiptap/starter-kit"),c=require("@tiptap/extension-underline"),u=require("dayjs");function d(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var f=d(e),m=d(n);function p(e,t){this.v=e,this.k=t}function h(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 v(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise(function(n){n(e[t](r))}),{done:!1,value:new p(r,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):r("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return r("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):r("return",e)}),t}function g(e){var t,n,r,a=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);a--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new b(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function b(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return b=function(e){this.s=e,this.n=e.next},b.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new b(e)}function y(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function w(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){y(o,r,a,i,s,"next",e)}function s(e){y(o,r,a,i,s,"throw",e)}i(void 0)})}}function x(e){return new p(e,0)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P(r.key),r)}}function k(e,t,n){return t&&N(e.prototype,t),n&&N(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=L(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw o}}}}function S(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach(function(t){S(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _(){
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react/jsx-runtime"),n=require("react-dom"),r=require("react-dom/client"),o=require("@uiw/react-codemirror"),a=require("@codemirror/lang-json"),i=require("@codemirror/view"),s=require("dayjs");function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var c=l(e),u=l(n);function d(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 f(e,t,n,r,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){f(a,r,o,i,s,"next",e)}function s(e){f(a,r,o,i,s,"throw",e)}i(void 0)})}}function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=x(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function h(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
3
- var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return R(c,"_invoke",function(n,r,a){var o,s,l,c=0,u=a||[],d=!1,f={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,i}};function m(n,r){for(s=n,l=r,t=0;!d&&c&&!a&&t<u.length;t++){var a,o=u[t],m=f.p,p=o[2];n>3?(a=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=m&&((a=n<2&&m<o[1])?(s=0,f.v=r,f.n=o[1]):m<p&&(a=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,s=0))}if(a||n>1)return i;throw d=!0,r}return function(a,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&m(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),m(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(a="next"),t=o[a]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==i)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,a,o),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(R(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,R(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,R(d,"constructor",c),R(c,"constructor",l),l.displayName="GeneratorFunction",R(c,a,"GeneratorFunction"),R(d),R(d,a,"Generator"),R(d,r,function(){return this}),R(d,"toString",function(){return"[object Generator]"}),(_=function(){return{w:o,m:f}})()}function R(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}R=function(e,t,n,r){function o(t,n){R(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},R(e,t,n,r)}function T(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||L(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||L(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.")}()}function P(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function L(e,t){if(e){if("string"==typeof e)return h(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)?h(e,t):void 0}}function F(e){return function(){return new I(e.apply(this,arguments))}}function I(e){var t,n;function r(t,n){try{var o=e[t](n),i=o.value,s=i instanceof p;Promise.resolve(s?i.v:i).then(function(n){if(s){var l="return"===t?"return":"next";if(!i.k||n.done)return r(l,n);n=e[l](n).value}a(o.done?"return":"normal",n)},function(e){r("throw",e)})}catch(e){a("throw",e)}}function a(e,a){switch(e){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,a){return new Promise(function(o,i){var s={key:e,arg:a,resolve:o,reject:i,next:null};n?n=n.next=s:(t=n=s,r(e,a))})},"function"!=typeof e.return&&(this.return=void 0)}I.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},I.prototype.next=function(e){return this._invoke("next",e)},I.prototype.throw=function(e){return this._invoke("throw",e)},I.prototype.return=function(e){return this._invoke("return",e)};var U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},U.apply(this,arguments)};function z(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}"function"==typeof SuppressedError&&SuppressedError;
3
+ var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return b(c,"_invoke",function(n,r,o){var a,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,s=0,l=e,f.n=n,i}};function p(n,r){for(s=n,l=r,t=0;!d&&c&&!o&&t<u.length;t++){var o,a=u[t],p=f.p,m=a[2];n>3?(o=m===r)&&(l=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&p<a[1])?(s=0,f.v=r,f.n=a[1]):p<m&&(o=n<3||a[0]>r||r>m)&&(a[4]=n,a[5]=r,f.n=m,s=0))}if(o||n>1)return i;throw d=!0,r}return function(o,u,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,m),s=u,l=m;(t=s<2?e:l)||!d;){a||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,a){if(s||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);a=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==i)break}catch(t){a=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,o,a),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(b(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,b(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,b(d,"constructor",c),b(c,"constructor",l),l.displayName="GeneratorFunction",b(c,o,"GeneratorFunction"),b(d),b(d,o,"Generator"),b(d,r,function(){return this}),b(d,"toString",function(){return"[object Generator]"}),(g=function(){return{w:a,m:f}})()}function b(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}b=function(e,t,n,r){function a(t,n){b(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},b(e,t,n,r)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(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.")}()}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function x(e,t){if(e){if("string"==typeof e)return d(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)?d(e,t):void 0}}var E=function(){return E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},E.apply(this,arguments)};function _(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;
4
4
  /**
5
5
  * @license lucide-react v0.344.0 - ISC
6
6
  *
7
7
  * This source code is licensed under the ISC license.
8
8
  * See the LICENSE file in the root directory of this source tree.
9
9
  */
10
- var B={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},q=["color","size","strokeWidth","absoluteStrokeWidth","className","children"],H=function(t,n){var r=e.forwardRef(function(r,a){var o,i=r.color,s=void 0===i?"currentColor":i,l=r.size,c=void 0===l?24:l,u=r.strokeWidth,d=void 0===u?2:u,f=r.absoluteStrokeWidth,m=r.className,p=void 0===m?"":m,h=r.children,v=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(r,q);return e.createElement("svg",j(j({ref:a},B),{},{width:c,height:c,stroke:s,strokeWidth:f?24*Number(d)/Number(c):d,className:["lucide","lucide-".concat((o=t,o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim())),p].join(" ")},v),[].concat(M(n.map(function(t){var n=A(t,2),r=n[0],a=n[1];return e.createElement(r,a)})),M(Array.isArray(h)?h:[h])))});return r.displayName="".concat(t),r},W=H("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),V=H("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),K=H("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),$=H("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Y=H("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),G=H("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),J=H("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),X=H("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Z=H("Crown",[["path",{d:"m2 4 3 12h14l3-12-6 7-4-7-4 7-6-7zm3 16h14",key:"zkxr6b"}]]),Q=H("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),ee=H("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),te=H("FileImage",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]),ne=H("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),re=H("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),ae=H("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),oe=H("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]),ie=H("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),se=H("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]),le=H("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),ce=H("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),ue=H("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]),de=H("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),fe=H("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),me=H("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),pe=H("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),he=H("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),ve=H("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]]),ge=H("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]),be=H("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),ye=H("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),we=H("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),xe=H("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),Ee=H("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Ne(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Ne(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ke(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Ne(e))&&(r&&(r+=" "),r+=t);return r}const Ce=e=>{const t=_e(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),Se(n,t)||je(e)},getConflictingClassGroupIds:(e,t)=>{const a=n[e]||[];return t&&r[e]?[...a,...r[e]]:a}}},Se=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?Se(e.slice(1),r):void 0;if(a)return a;if(0===t.validators.length)return;const o=e.join("-");return t.validators.find(({validator:e})=>e(o))?.classGroupId},Oe=/^\[(.+)\]$/,je=e=>{if(Oe.test(e)){const t=Oe.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},_e=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Me(Object.entries(e.classGroups),n).forEach(([e,n])=>{Re(n,r,e,t)}),r},Re=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Te(t,e)).classGroupId=n)}if("function"==typeof e)return Ae(e)?void Re(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,a])=>{Re(a,Te(t,e),n,r)})})},Te=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Ae=e=>e.isThemeGetter,Me=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,Pe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(a(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):a(e,t)}}},De=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,a=t[0],o=t.length,i=e=>{const n=[];let i,s=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===s){if(u===a&&(r||e.slice(c,c+o)===t)){n.push(e.slice(l,c)),l=c+o;continue}if("/"===u){i=c;continue}}"["===u?s++:"]"===u&&s--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:i&&i>l?i-l:void 0}};return n?e=>n({className:e,parseClassName:i}):i},Le=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},Fe=/\s+/;function Ie(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Ue(e))&&(r&&(r+=" "),r+=t);return r}const Ue=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ue(e[r]))&&(n&&(n+=" "),n+=t);return n};function ze(e,...t){let n,r,a,o=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:Pe(e.cacheSize),parseClassName:De(e),...Ce(e)}))(l),r=n.cache.get,a=n.cache.set,o=i,i(s)};function i(e){const t=r(e);if(t)return t;const o=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,o=[],i=e.trim().split(Fe);let s="";for(let e=i.length-1;e>=0;e-=1){const t=i[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let f=Boolean(d),m=r(f?u.substring(0,d):u);if(!m){if(!f){s=t+(s.length>0?" "+s:s);continue}if(m=r(u),!m){s=t+(s.length>0?" "+s:s);continue}f=!1}const p=Le(l).join(":"),h=c?p+"!":p,v=h+m;if(o.includes(v))continue;o.push(v);const g=a(m,f);for(let e=0;e<g.length;++e){const t=g[e];o.push(h+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return a(e,o),o}return function(){return o(Ie.apply(null,arguments))}}const Be=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},qe=/^\[(?:([a-z-]+):)?(.+)\]$/i,He=/^\d+\/\d+$/,We=new Set(["px","full","screen"]),Ve=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ke=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$e=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ge=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Je=e=>Ze(e)||We.has(e)||He.test(e),Xe=e=>dt(e,"length",ft),Ze=e=>Boolean(e)&&!Number.isNaN(Number(e)),Qe=e=>dt(e,"number",Ze),et=e=>Boolean(e)&&Number.isInteger(Number(e)),tt=e=>e.endsWith("%")&&Ze(e.slice(0,-1)),nt=e=>qe.test(e),rt=e=>Ve.test(e),at=new Set(["length","size","percentage"]),ot=e=>dt(e,at,mt),it=e=>dt(e,"position",mt),st=new Set(["image","url"]),lt=e=>dt(e,st,ht),ct=e=>dt(e,"",pt),ut=()=>!0,dt=(e,t,n)=>{const r=qe.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},ft=e=>Ke.test(e)&&!$e.test(e),mt=()=>!1,pt=e=>Ye.test(e),ht=e=>Ge.test(e),vt=ze(()=>{const e=Be("colors"),t=Be("spacing"),n=Be("blur"),r=Be("brightness"),a=Be("borderColor"),o=Be("borderRadius"),i=Be("borderSpacing"),s=Be("borderWidth"),l=Be("contrast"),c=Be("grayscale"),u=Be("hueRotate"),d=Be("invert"),f=Be("gap"),m=Be("gradientColorStops"),p=Be("gradientColorStopPositions"),h=Be("inset"),v=Be("margin"),g=Be("opacity"),b=Be("padding"),y=Be("saturate"),w=Be("scale"),x=Be("sepia"),E=Be("skew"),N=Be("space"),k=Be("translate"),C=()=>["auto",nt,t],S=()=>[nt,t],O=()=>["",Je,Xe],j=()=>["auto",Ze,nt],_=()=>["","0",nt],R=()=>[Ze,nt];return{cacheSize:500,separator:":",theme:{colors:[ut],spacing:[Je,Xe],blur:["none","",rt,nt],brightness:R(),borderColor:[e],borderRadius:["none","","full",rt,nt],borderSpacing:S(),borderWidth:O(),contrast:R(),grayscale:_(),hueRotate:R(),invert:_(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[tt,Xe],inset:C(),margin:C(),opacity:R(),padding:S(),saturate:R(),scale:R(),sepia:_(),skew:R(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",nt]}],container:["container"],columns:[{columns:[rt]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",nt]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",et,nt]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",nt]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",et,nt]}],"grid-cols":[{"grid-cols":[ut]}],"col-start-end":[{col:["auto",{span:["full",et,nt]},nt]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[ut]}],"row-start-end":[{row:["auto",{span:[et,nt]},nt]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",nt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",nt]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",nt,t]}],"min-w":[{"min-w":[nt,t,"min","max","fit"]}],"max-w":[{"max-w":[nt,t,"none","full","min","max","fit","prose",{screen:[rt]},rt]}],h:[{h:[nt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[nt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[nt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[nt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",rt,Xe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Qe]}],"font-family":[{font:[ut]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",nt]}],"line-clamp":[{"line-clamp":["none",Ze,Qe]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Je,nt]}],"list-image":[{"list-image":["none",nt]}],"list-style-type":[{list:["none","disc","decimal",nt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Je,Xe]}],"underline-offset":[{"underline-offset":["auto",Je,nt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",nt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",nt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",it]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ot]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},lt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Je,nt]}],"outline-w":[{outline:[Je,Xe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Je,Xe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",rt,ct]}],"shadow-color":[{shadow:[ut]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",rt,nt]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",nt]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",nt]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",nt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[et,nt]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",nt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",nt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",nt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Je,Xe,Qe]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function gt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return vt(ke(t))}function bt(e){var t=e.className,n=z(e,["className"]);return f.createElement("div",Object.assign({className:gt("animate-pulse rounded-md bg-muted",t)},n))}function yt(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function wt(...e){return t=>{let n=!1;const r=e.map(e=>{const r=yt(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():yt(e[t],null)}}}}function xt(...e){return f.useCallback(wt(...e),e)}var Et=Symbol.for("react.lazy"),Nt=f[" use ".trim().toString()];function kt(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===Et&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function Ct(e){const n=Ot(e),r=f.forwardRef((e,r)=>{let{children:a,...o}=e;kt(a)&&"function"==typeof Nt&&(a=Nt(a._payload));const i=f.Children.toArray(a),s=i.find(_t);if(s){const e=s.props.children,a=i.map(t=>t===s?f.Children.count(e)>1?f.Children.only(null):f.isValidElement(e)?e.props.children:null:t);return t.jsx(n,{...o,ref:r,children:f.isValidElement(e)?f.cloneElement(e,void 0,a):null})}return t.jsx(n,{...o,ref:r,children:a})});return r.displayName=`${e}.Slot`,r}var St=Ct("Slot");function Ot(e){const t=f.forwardRef((e,t)=>{let{children:n,...r}=e;if(kt(n)&&"function"==typeof Nt&&(n=Nt(n._payload)),f.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==f.Fragment&&(a.ref=t?wt(t,e):e),f.cloneElement(n,a)}return f.Children.count(n)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jt=Symbol("radix.slottable");function _t(e){return f.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===jt}const Rt=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Tt=ke,At=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Tt(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(e=>{const t=null==n?void 0:n[e],r=null==o?void 0:o[e];if(null===t)return null;const i=Rt(t)||Rt(r);return a[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...o,...s}[t]):{...o,...s}[t]===n})?[...e,n,r]:e},[]);return Tt(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)};var Mt=At("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-bold transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--primary))]/30 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-[0_4px_20px_-2px_rgba(93,112,82,0.15)] hover:scale-105 hover:shadow-[0_6px_24px_-4px_rgba(93,112,82,0.25)] active:scale-95",destructive:"bg-destructive text-destructive-foreground shadow-[0_4px_20px_-2px_rgba(168,84,72,0.15)] hover:scale-105 hover:shadow-[0_6px_24px_-4px_rgba(168,84,72,0.25)] active:scale-95",outline:"border border-[hsl(var(--border))]/70 bg-[hsl(var(--secondary))]/35 text-foreground shadow-[0_8px_24px_-18px_rgba(33,43,54,0.28)] hover:border-[hsl(var(--primary))]/30 hover:bg-[hsl(var(--secondary))]/55 hover:text-foreground hover:scale-105 active:scale-95",secondary:"bg-secondary text-secondary-foreground shadow-[0_4px_20px_-2px_rgba(193,140,93,0.15)] hover:scale-105 hover:shadow-[0_6px_24px_-4px_rgba(193,140,93,0.25)] active:scale-95",ghost:"bg-transparent text-primary hover:bg-primary/10 hover:scale-105 active:scale-95",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-12 px-8 py-2",sm:"h-10 px-6 text-sm",lg:"h-14 px-10 text-base",icon:"h-12 w-12"}},defaultVariants:{variant:"default",size:"default"}}),Pt=f.forwardRef(function(e,t){var n=e.className,r=e.variant,a=e.size,o=e.asChild,i=void 0!==o&&o,s=z(e,["className","variant","size","asChild"]),l=i?St:"button";return f.createElement(l,Object.assign({className:gt(Mt({variant:r,size:a,className:n})),ref:t},s))});Pt.displayName="Button";var Dt=f.forwardRef(function(e,t){var n=e.className,r=e.type,a=z(e,["className","type"]);return f.createElement("input",Object.assign({type:r,className:gt("flex h-12 w-full rounded-full border border-input bg-background px-6 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--primary))]/30 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-300 md:text-sm",n),ref:t},a))});Dt.displayName="Input";var Lt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{const r=Ct(`Primitive.${n}`),a=f.forwardRef((e,a)=>{const{asChild:o,...i}=e,s=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...i,ref:a})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{}),Ft="horizontal",It=["horizontal","vertical"],Ut=f.forwardRef((e,n)=>{const{decorative:r,orientation:a=Ft,...o}=e,i=function(e){return It.includes(e)}(a)?a:Ft,s=r?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"};return t.jsx(Lt.div,{"data-orientation":i,...s,...o,ref:n})});Ut.displayName="Separator";var zt=Ut;function Bt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function qt(e,n=[]){let r=[];const a=()=>{const t=r.map(e=>f.createContext(e));return function(n){const r=n?.[e]||t;return f.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return a.scopeName=e,[function(n,a){const o=f.createContext(a),i=r.length;r=[...r,a];const s=n=>{const{scope:r,children:a,...s}=n,l=r?.[e]?.[i]||o,c=f.useMemo(()=>s,Object.values(s));return t.jsx(l.Provider,{value:c,children:a})};return s.displayName=n+"Provider",[s,function(t,r){const s=r?.[e]?.[i]||o,l=f.useContext(s);if(l)return l;if(void 0!==a)return a;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},Ht(a,...n)]}function Ht(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}f.forwardRef(function(e,t){var n=e.className,r=e.orientation,a=void 0===r?"horizontal":r,o=e.decorative,i=void 0===o||o,s=z(e,["className","orientation","decorative"]);return f.createElement(zt,Object.assign({ref:t,decorative:i,orientation:a,className:gt("shrink-0 bg-border","horizontal"===a?"h-[1px] w-full":"h-full w-[1px]",n)},s))}).displayName=zt.displayName;var Wt=globalThis?.document?f.useLayoutEffect:()=>{},Vt=f[" useId ".trim().toString()]||(()=>{}),Kt=0;function $t(e){const[t,n]=f.useState(Vt());return Wt(()=>{e||n(e=>e??String(Kt++))},[e]),e||(t?`radix-${t}`:"")}var Yt=f[" useInsertionEffect ".trim().toString()]||Wt;function Gt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,i]=function({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),a=f.useRef(n),o=f.useRef(t);return Yt(()=>{o.current=t},[t]),f.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:a;{const t=f.useRef(void 0!==e);f.useEffect(()=>{const e=t.current;if(e!==s){}t.current=s},[s,r])}const c=f.useCallback(t=>{if(s){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&i.current?.(n)}else o(t)},[s,e,o,i]);return[l,c]}function Jt(e){const n=Xt(e),r=f.forwardRef((e,r)=>{const{children:a,...o}=e,i=f.Children.toArray(a),s=i.find(Qt);if(s){const e=s.props.children,a=i.map(t=>t===s?f.Children.count(e)>1?f.Children.only(null):f.isValidElement(e)?e.props.children:null:t);return t.jsx(n,{...o,ref:r,children:f.isValidElement(e)?f.cloneElement(e,void 0,a):null})}return t.jsx(n,{...o,ref:r,children:a})});return r.displayName=`${e}.Slot`,r}function Xt(e){const t=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==f.Fragment&&(a.ref=t?wt(t,e):e),f.cloneElement(n,a)}return f.Children.count(n)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zt=Symbol("radix.slottable");function Qt(e){return f.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Zt}var en=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{const r=Jt(`Primitive.${n}`),a=f.forwardRef((e,a)=>{const{asChild:o,...i}=e,s=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...i,ref:a})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{});function tn(e,t){e&&m.flushSync(()=>e.dispatchEvent(t))}function nn(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...e)=>t.current?.(...e),[])}var rn,an="dismissableLayer.update",on="dismissableLayer.pointerDownOutside",sn="dismissableLayer.focusOutside",ln=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cn=f.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=e,u=f.useContext(ln),[d,m]=f.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=f.useState({}),v=xt(n,e=>m(e)),g=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),w=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,E=w>=y,N=function(e,t=globalThis?.document){const n=nn(e),r=f.useRef(!1),a=f.useRef(()=>{});return f.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){dn(on,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...u.branches].some(e=>e.contains(t));E&&!n&&(o?.(e),s?.(e),e.defaultPrevented||l?.())},p),k=function(e,t=globalThis?.document){const n=nn(e),r=f.useRef(!1);return f.useEffect(()=>{const e=e=>{if(e.target&&!r.current){dn(sn,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(i?.(e),s?.(e),e.defaultPrevented||l?.())},p);return function(e,t=globalThis?.document){const n=nn(e);f.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{w===u.layers.size-1&&(a?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},p),f.useEffect(()=>{if(d)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(rn=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),un(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=rn)}},[d,p,r,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),un())},[d,u]),f.useEffect(()=>{const e=()=>h({});return document.addEventListener(an,e),()=>document.removeEventListener(an,e)},[]),t.jsx(en.div,{...c,ref:v,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:Bt(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Bt(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Bt(e.onPointerDownCapture,N.onPointerDownCapture)})});cn.displayName="DismissableLayer";function un(){const e=new CustomEvent(an);document.dispatchEvent(e)}function dn(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?tn(a,o):a.dispatchEvent(o)}f.forwardRef((e,n)=>{const r=f.useContext(ln),a=f.useRef(null),o=xt(n,a);return f.useEffect(()=>{const e=a.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),t.jsx(en.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var fn="focusScope.autoFocusOnMount",mn="focusScope.autoFocusOnUnmount",pn={bubbles:!1,cancelable:!0},hn=f.forwardRef((e,n)=>{const{loop:r=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,c]=f.useState(null),u=nn(o),d=nn(i),m=f.useRef(null),p=xt(n,e=>c(e)),h=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(a){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?m.current=t:yn(m.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||yn(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&yn(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[a,l,h.paused]),f.useEffect(()=>{if(l){wn.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(fn,pn);l.addEventListener(fn,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(yn(r,{select:t}),document.activeElement!==n)return}((e=vn(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&yn(l))}return()=>{l.removeEventListener(fn,u),setTimeout(()=>{const e=new CustomEvent(mn,pn);l.addEventListener(mn,d),l.dispatchEvent(e),e.defaultPrevented||yn(t??document.body,{select:!0}),l.removeEventListener(mn,d),wn.remove(h)},0)}}var e},[l,u,d,h]);const v=f.useCallback(e=>{if(!r&&!a)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[a,o]=function(e){const t=vn(e),n=gn(t,e),r=gn(t.reverse(),e);return[n,r]}(t);a&&o?e.shiftKey||n!==o?e.shiftKey&&n===a&&(e.preventDefault(),r&&yn(o,{select:!0})):(e.preventDefault(),r&&yn(a,{select:!0})):n===t&&e.preventDefault()}},[r,a,h.paused]);return t.jsx(en.div,{tabIndex:-1,...s,ref:p,onKeyDown:v})});function vn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gn(e,t){for(const n of e)if(!bn(n,{upTo:t}))return n}function bn(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function yn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}hn.displayName="FocusScope";var wn=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=xn(e,t),e.unshift(t)},remove(t){e=xn(e,t),e[0]?.resume()}}}();function xn(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var En=f.forwardRef((e,r)=>{const{container:a,...o}=e,[i,s]=f.useState(!1);Wt(()=>s(!0),[]);const l=a||i&&globalThis?.document?.body;return l?n.createPortal(t.jsx(en.div,{...o,ref:r}),l):null});En.displayName="Portal";var Nn=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=f.useState(),r=f.useRef(null),a=f.useRef(e),o=f.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return f.useReducer((e,n)=>t[e][n]??e,e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const e=kn(r.current);o.current="mounted"===s?e:"none"},[s]),Wt(()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=kn(t);if(e)l("MOUNT");else if("none"===i||"none"===t?.display)l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}},[e,l]),Wt(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=kn(r.current).includes(CSS.escape(o.animationName));if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(o.current=kn(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:f.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),a="function"==typeof n?n({present:r.isPresent}):f.Children.only(n),o=xt(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?f.cloneElement(a,{ref:o}):null};function kn(e){return e?.animationName||"none"}Nn.displayName="Presence";var Cn=0;function Sn(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??On()),document.body.insertAdjacentElement("beforeend",e[1]??On()),Cn++,()=>{1===Cn&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Cn--}},[])}function On(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var jn="right-scroll-bar-position",_n="width-before-scroll-bar";function Rn(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Tn="undefined"!=typeof window?f.useLayoutEffect:f.useEffect,An=new WeakMap;function Mn(t,n){var r,a,o,i=(r=n||null,a=function(e){return t.forEach(function(t){return Rn(t,e)})},(o=e.useState(function(){return{value:r,callback:a,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=a,o.facade);return Tn(function(){var e=An.get(i);if(e){var n=new Set(e),r=new Set(t),a=i.current;n.forEach(function(e){r.has(e)||Rn(e,null)}),r.forEach(function(e){n.has(e)||Rn(e,a)})}An.set(i,t)},[t]),i}function Pn(e){return e}var Dn=function(e){var t=e.sideCar,n=z(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,U({},n))};Dn.isSideCarExport=!0;var Ln=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Pn);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var a=t(e,r);return n.push(a),function(){n=n.filter(function(e){return e!==a})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var a=n;n=[],a.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(o)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=U({async:!0,ssr:!1},e),t}(),Fn=function(){},In=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:Fn,onWheelCapture:Fn,onTouchMoveCapture:Fn}),a=r[0],o=r[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,m=e.sideCar,p=e.noRelative,h=e.noIsolation,v=e.inert,g=e.allowPinchZoom,b=e.as,y=void 0===b?"div":b,w=e.gapMode,x=z(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,N=Mn([n,t]),k=U(U({},x),a);return f.createElement(f.Fragment,null,u&&f.createElement(E,{sideCar:Ln,removeScrollBar:c,shards:d,noRelative:p,noIsolation:h,inert:v,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:w}),i?f.cloneElement(f.Children.only(s),U(U({},k),{ref:N})):f.createElement(y,U({},k,{className:l,ref:N}),s))});In.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},In.classNames={fullWidth:_n,zeroRight:jn};function Un(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var zn=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=Un())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Bn=function(){var e,t=(e=zn(),function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},qn={left:0,top:0,right:0,gap:0},Hn=function(e){return parseInt(e||"",10)||0},Wn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return qn;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[Hn(n),Hn(r),Hn(a)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Vn=Bn(),Kn="data-scroll-locked",$n=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Kn,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(jn," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(_n," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(jn," .").concat(jn," {\n right: 0 ").concat(r,";\n }\n \n .").concat(_n," .").concat(_n," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Kn,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Yn=function(){var e=parseInt(document.body.getAttribute(Kn)||"0",10);return isFinite(e)?e:0},Gn=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;f.useEffect(function(){return document.body.setAttribute(Kn,(Yn()+1).toString()),function(){var e=Yn()-1;e<=0?document.body.removeAttribute(Kn):document.body.setAttribute(Kn,e.toString())}},[]);var o=f.useMemo(function(){return Wn(a)},[a]);return f.createElement(Vn,{styles:$n(o,!t,a,n?"":"!important")})},Jn=!1;if("undefined"!=typeof window)try{var Xn=Object.defineProperty({},"passive",{get:function(){return Jn=!0,!0}});window.addEventListener("test",Xn,Xn),window.removeEventListener("test",Xn,Xn)}catch(e){Jn=!1}var Zn=!!Jn&&{passive:!1},Qn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},er=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),tr(e,r)){var a=nr(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},tr=function(e,t){return"v"===e?function(e){return Qn(e,"overflowY")}(t):function(e){return Qn(e,"overflowX")}(t)},nr=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},rr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ar=function(e){return[e.deltaX,e.deltaY]},or=function(e){return e&&"current"in e?e.current:e},ir=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},sr=0,lr=[];function cr(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ur,dr=(ur=function(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),a=f.useState(sr++)[0],o=f.useState(Bn)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(or),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=f.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=rr(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],c="deltaY"in e?e.deltaY:s[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=window.getSelection(),m=f&&f.anchorNode;if(m&&(m===u||m.contains(u)))return!1;var p=er(d,u);if(!p)return!0;if(p?a=d:(a="v"===d?"h":"v",p=er(d,u)),!p)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=a),!a)return!0;var h=r.current||a;return function(e,t,n,r,a){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,s=n.target,l=t.contains(s),c=!1,u=i>0,d=0,f=0;do{if(!s)break;var m=nr(e,s),p=m[0],h=m[1]-m[2]-o*p;(p||h)&&tr(e,s)&&(d+=h,f+=p);var v=s.parentNode;s=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(a&&Math.abs(d)<1||!a&&i>d)||!u&&(a&&Math.abs(f)<1||!a&&-i>f))&&(c=!0),c}(h,t,e,"h"===h?l:c,!0)},[]),l=f.useCallback(function(e){var n=e;if(lr.length&&lr[lr.length-1]===o){var r="deltaY"in n?ar(n):rr(n),a=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,a=r,t[0]===a[0]&&t[1]===a[1]);var t,a})[0];if(a&&a.should)n.cancelable&&n.preventDefault();else if(!a){var l=(i.current.shards||[]).map(or).filter(Boolean).filter(function(e){return e.contains(n.target)});(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),c=f.useCallback(function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:cr(r)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),u=f.useCallback(function(e){n.current=rr(e),r.current=void 0},[]),d=f.useCallback(function(t){c(t.type,ar(t),t.target,s(t,e.lockRef.current))},[]),m=f.useCallback(function(t){c(t.type,rr(t),t.target,s(t,e.lockRef.current))},[]);f.useEffect(function(){return lr.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Zn),document.addEventListener("touchmove",l,Zn),document.addEventListener("touchstart",u,Zn),function(){lr=lr.filter(function(e){return e!==o}),document.removeEventListener("wheel",l,Zn),document.removeEventListener("touchmove",l,Zn),document.removeEventListener("touchstart",u,Zn)}},[]);var p=e.removeScrollBar,h=e.inert;return f.createElement(f.Fragment,null,h?f.createElement(o,{styles:ir(a)}):null,p?f.createElement(Gn,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Ln.useMedium(ur),Dn),fr=f.forwardRef(function(e,t){return f.createElement(In,U({},e,{ref:t,sideCar:dr}))});fr.classNames=In.classNames;var mr=fr,pr=new WeakMap,hr=new WeakMap,vr={},gr=0,br=function(e){return e&&(e.host||br(e.parentNode))},yr=function(e,t,n,r){var a=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=br(t);return n&&e.contains(n)?n:null}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);vr[n]||(vr[n]=new WeakMap);var o=vr[n],i=[],s=new Set,l=new Set(a),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};a.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,l=(pr.get(e)||0)+1,c=(o.get(e)||0)+1;pr.set(e,l),o.set(e,c),i.push(e),1===l&&a&&hr.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(e){}})};return u(t),s.clear(),gr++,function(){i.forEach(function(e){var t=pr.get(e)-1,a=o.get(e)-1;pr.set(e,t),o.set(e,a),t||(hr.has(e)||e.removeAttribute(r),hr.delete(e)),a||e.removeAttribute(n)}),--gr||(pr=new WeakMap,pr=new WeakMap,hr=new WeakMap,vr={})}},wr=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),yr(r,a,n,"aria-hidden")):function(){return null}},xr="Dialog",[Er,Nr]=qt(xr),[kr,Cr]=Er(xr),Sr=e=>{const{__scopeDialog:n,children:r,open:a,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,l=f.useRef(null),c=f.useRef(null),[u,d]=Gt({prop:a,defaultProp:o??!1,onChange:i,caller:xr});return t.jsx(kr,{scope:n,triggerRef:l,contentRef:c,contentId:$t(),titleId:$t(),descriptionId:$t(),open:u,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(e=>!e),[d]),modal:s,children:r})};Sr.displayName=xr;var Or="DialogTrigger",jr=f.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=Cr(Or,r),i=xt(n,o.triggerRef);return t.jsx(en.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Yr(o.open),...a,ref:i,onClick:Bt(e.onClick,o.onOpenToggle)})});jr.displayName=Or;var _r="DialogPortal",[Rr,Tr]=Er(_r,{forceMount:void 0}),Ar=e=>{const{__scopeDialog:n,forceMount:r,children:a,container:o}=e,i=Cr(_r,n);return t.jsx(Rr,{scope:n,forceMount:r,children:f.Children.map(a,e=>t.jsx(Nn,{present:r||i.open,children:t.jsx(En,{asChild:!0,container:o,children:e})}))})};Ar.displayName=_r;var Mr="DialogOverlay",Pr=f.forwardRef((e,n)=>{const r=Tr(Mr,e.__scopeDialog),{forceMount:a=r.forceMount,...o}=e,i=Cr(Mr,e.__scopeDialog);return i.modal?t.jsx(Nn,{present:a||i.open,children:t.jsx(Lr,{...o,ref:n})}):null});Pr.displayName=Mr;var Dr=Jt("DialogOverlay.RemoveScroll"),Lr=f.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=Cr(Mr,r);return t.jsx(mr,{as:Dr,allowPinchZoom:!0,shards:[o.contentRef],children:t.jsx(en.div,{"data-state":Yr(o.open),...a,ref:n,style:{pointerEvents:"auto",...a.style}})})}),Fr="DialogContent",Ir=f.forwardRef((e,n)=>{const r=Tr(Fr,e.__scopeDialog),{forceMount:a=r.forceMount,...o}=e,i=Cr(Fr,e.__scopeDialog);return t.jsx(Nn,{present:a||i.open,children:i.modal?t.jsx(Ur,{...o,ref:n}):t.jsx(zr,{...o,ref:n})})});Ir.displayName=Fr;var Ur=f.forwardRef((e,n)=>{const r=Cr(Fr,e.__scopeDialog),a=f.useRef(null),o=xt(n,r.contentRef,a);return f.useEffect(()=>{const e=a.current;if(e)return wr(e)},[]),t.jsx(Br,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bt(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Bt(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:Bt(e.onFocusOutside,e=>e.preventDefault())})}),zr=f.forwardRef((e,n)=>{const r=Cr(Fr,e.__scopeDialog),a=f.useRef(!1),o=f.useRef(!1);return t.jsx(Br,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||r.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const n=t.target,i=r.triggerRef.current?.contains(n);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),Br=f.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,l=Cr(Fr,r),c=f.useRef(null),u=xt(n,c);return Sn(),t.jsxs(t.Fragment,{children:[t.jsx(hn,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:i,children:t.jsx(cn,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Yr(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),t.jsxs(t.Fragment,{children:[t.jsx(Zr,{titleId:l.titleId}),t.jsx(Qr,{contentRef:c,descriptionId:l.descriptionId})]})]})}),qr="DialogTitle",Hr=f.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=Cr(qr,r);return t.jsx(en.h2,{id:o.titleId,...a,ref:n})});Hr.displayName=qr;var Wr="DialogDescription",Vr=f.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=Cr(Wr,r);return t.jsx(en.p,{id:o.descriptionId,...a,ref:n})});Vr.displayName=Wr;var Kr="DialogClose",$r=f.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=Cr(Kr,r);return t.jsx(en.button,{type:"button",...a,ref:n,onClick:Bt(e.onClick,()=>o.onOpenChange(!1))})});function Yr(e){return e?"open":"closed"}$r.displayName=Kr;var Gr="DialogTitleWarning",[Jr,Xr]=function(e,n){const r=f.createContext(n),a=e=>{const{children:n,...a}=e,o=f.useMemo(()=>a,Object.values(a));return t.jsx(r.Provider,{value:o,children:n})};return a.displayName=e+"Provider",[a,function(t){const a=f.useContext(r);if(a)return a;if(void 0!==n)return n;throw new Error(`\`${t}\` must be used within \`${e}\``)}]}(Gr,{contentName:Fr,titleName:qr,docsSlug:"dialog"}),Zr=({titleId:e})=>{const t=Xr(Gr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{if(e){document.getElementById(e)}},[n,e]),null},Qr=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Xr("DialogDescriptionWarning").contentName}}.`;return f.useEffect(()=>{const n=e.current?.getAttribute("aria-describedby");if(t&&n){document.getElementById(t)}},[n,e,t]),null},ea=Sr,ta=jr,na=Ar,ra=Pr,aa=Ir,oa=Hr,ia=Vr,sa=$r,la=ea,ca=na,ua=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(ra,Object.assign({className:gt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n)},r,{ref:t}))});ua.displayName=ra.displayName;var da=At("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),fa=f.forwardRef(function(e,t){var n=e.side,r=void 0===n?"right":n,a=e.className,o=e.children,i=z(e,["side","className","children"]);return f.createElement(ca,null,f.createElement(ua,null),f.createElement(aa,Object.assign({ref:t,className:gt(da({side:r}),a)},i),o,f.createElement(sa,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},f.createElement(Ee,{className:"h-4 w-4"}),f.createElement("span",{className:"sr-only"},"Close"))))});fa.displayName=aa.displayName;var ma=function(e){var t=e.className,n=z(e,["className"]);return f.createElement("div",Object.assign({className:gt("flex flex-col space-y-2 text-center sm:text-left",t)},n))};ma.displayName="SheetHeader";var pa=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(oa,Object.assign({ref:t,className:gt("text-lg font-semibold text-foreground",n)},r))});pa.displayName=oa.displayName;var ha=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(ia,Object.assign({ref:t,className:gt("text-sm text-muted-foreground",n)},r))});ha.displayName=ia.displayName;const va=["top","right","bottom","left"],ga=Math.min,ba=Math.max,ya=Math.round,wa=Math.floor,xa=e=>({x:e,y:e}),Ea={left:"right",right:"left",bottom:"top",top:"bottom"},Na={start:"end",end:"start"};function ka(e,t,n){return ba(e,ga(t,n))}function Ca(e,t){return"function"==typeof e?e(t):e}function Sa(e){return e.split("-")[0]}function Oa(e){return e.split("-")[1]}function ja(e){return"x"===e?"y":"x"}function _a(e){return"y"===e?"height":"width"}const Ra=new Set(["top","bottom"]);function Ta(e){return Ra.has(Sa(e))?"y":"x"}function Aa(e){return ja(Ta(e))}function Ma(e){return e.replace(/start|end/g,e=>Na[e])}const Pa=["left","right"],Da=["right","left"],La=["top","bottom"],Fa=["bottom","top"];function Ia(e,t,n,r){const a=Oa(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Da:Pa:t?Pa:Da;case"left":case"right":return t?La:Fa;default:return[]}}(Sa(e),"start"===n,r);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(Ma)))),o}function Ua(e){return e.replace(/left|right|bottom|top/g,e=>Ea[e])}function za(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Ba(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function qa(e,t,n){let{reference:r,floating:a}=e;const o=Ta(t),i=Aa(t),s=_a(i),l=Sa(t),c="y"===o,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,f=r[s]/2-a[s]/2;let m;switch(l){case"top":m={x:u,y:r.y-a.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-a.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Oa(t)){case"start":m[i]-=f*(n&&c?-1:1);break;case"end":m[i]+=f*(n&&c?-1:1)}return m}async function Ha(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=Ca(t,e),p=za(m),h=s[f?"floating"===d?"reference":"floating":d],v=Ba(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(h)))||n?h:h.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===d?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),y=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},w=Ba(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:b,strategy:l}):g);return{top:(v.top-w.top+p.top)/y.y,bottom:(w.bottom-v.bottom+p.bottom)/y.y,left:(v.left-w.left+p.left)/y.x,right:(w.right-v.right+p.right)/y.x}}function Wa(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Va(e){return va.some(t=>e[t]>=0)}const Ka=new Set(["left","top"]);function $a(){return"undefined"!=typeof window}function Ya(e){return Xa(e)?(e.nodeName||"").toLowerCase():"#document"}function Ga(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ja(e){var t;return null==(t=(Xa(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Xa(e){return!!$a()&&(e instanceof Node||e instanceof Ga(e).Node)}function Za(e){return!!$a()&&(e instanceof Element||e instanceof Ga(e).Element)}function Qa(e){return!!$a()&&(e instanceof HTMLElement||e instanceof Ga(e).HTMLElement)}function eo(e){return!(!$a()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ga(e).ShadowRoot)}const to=new Set(["inline","contents"]);function no(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=ho(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!to.has(a)}const ro=new Set(["table","td","th"]);function ao(e){return ro.has(Ya(e))}const oo=[":popover-open",":modal"];function io(e){return oo.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const so=["transform","translate","scale","rotate","perspective"],lo=["transform","translate","scale","rotate","perspective","filter"],co=["paint","layout","strict","content"];function uo(e){const t=fo(),n=Za(e)?ho(e):e;return so.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||lo.some(e=>(n.willChange||"").includes(e))||co.some(e=>(n.contain||"").includes(e))}function fo(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const mo=new Set(["html","body","#document"]);function po(e){return mo.has(Ya(e))}function ho(e){return Ga(e).getComputedStyle(e)}function vo(e){return Za(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function go(e){if("html"===Ya(e))return e;const t=e.assignedSlot||e.parentNode||eo(e)&&e.host||Ja(e);return eo(t)?t.host:t}function bo(e){const t=go(e);return po(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qa(t)&&no(t)?t:bo(t)}function yo(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=bo(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=Ga(a);if(o){const e=wo(i);return t.concat(i,i.visualViewport||[],no(a)?a:[],e&&n?yo(e):[])}return t.concat(a,yo(a,[],n))}function wo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xo(e){const t=ho(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Qa(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=ya(n)!==o||ya(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function Eo(e){return Za(e)?e:e.contextElement}function No(e){const t=Eo(e);if(!Qa(t))return xa(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=xo(t);let i=(o?ya(n.width):n.width)/r,s=(o?ya(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const ko=xa(0);function Co(e){const t=Ga(e);return fo()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ko}function So(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=Eo(e);let i=xa(1);t&&(r?Za(r)&&(i=No(r)):i=No(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ga(e))&&t}(o,n,r)?Co(o):xa(0);let l=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const e=Ga(o),t=r&&Za(r)?Ga(r):r;let n=e,a=wo(n);for(;a&&r&&t!==n;){const e=No(a),t=a.getBoundingClientRect(),r=ho(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,n=Ga(a),a=wo(n)}}return Ba({width:u,height:d,x:l,y:c})}function Oo(e,t){const n=vo(e).scrollLeft;return t?t.left+n:So(Ja(e)).left+n}function jo(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Oo(e,n),y:n.top+t.scrollTop}}const _o=new Set(["absolute","fixed"]);function Ro(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ga(e),r=Ja(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const e=fo();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}const c=Oo(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-a);i<=25&&(o-=i)}else c<=25&&(o+=c);return{width:o,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Ja(e),n=vo(e),r=e.ownerDocument.body,a=ba(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ba(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Oo(e);const s=-n.scrollTop;return"rtl"===ho(r).direction&&(i+=ba(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(Ja(e));else if(Za(t))r=function(e,t){const n=So(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Qa(e)?No(e):xa(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}}(t,n);else{const n=Co(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ba(r)}function To(e,t){const n=go(e);return!(n===t||!Za(n)||po(n))&&("fixed"===ho(n).position||To(n,t))}function Ao(e,t,n){const r=Qa(t),a=Ja(t),o="fixed"===n,i=So(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=xa(0);function c(){l.x=Oo(a)}if(r||!r&&!o)if(("body"!==Ya(t)||no(a))&&(s=vo(t)),r){const e=So(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&c();o&&!r&&a&&c();const u=!a||r||o?xa(0):jo(a,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function Mo(e){return"static"===ho(e).position}function Po(e,t){if(!Qa(e)||"fixed"===ho(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ja(e)===n&&(n=n.ownerDocument.body),n}function Do(e,t){const n=Ga(e);if(io(e))return n;if(!Qa(e)){let t=go(e);for(;t&&!po(t);){if(Za(t)&&!Mo(t))return t;t=go(t)}return n}let r=Po(e,t);for(;r&&ao(r)&&Mo(r);)r=Po(r,t);return r&&po(r)&&Mo(r)&&!uo(r)?n:r||function(e){let t=go(e);for(;Qa(t)&&!po(t);){if(uo(t))return t;if(io(t))return null;t=go(t)}return null}(e)||n}const Lo={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=Ja(r),s=!!t&&io(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=xa(1);const u=xa(0),d=Qa(r);if((d||!d&&!o)&&(("body"!==Ya(r)||no(i))&&(l=vo(r)),Qa(r))){const e=So(r);c=No(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!i||d||o?xa(0):jo(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:Ja,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?io(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=yo(e,[],!1).filter(e=>Za(e)&&"body"!==Ya(e)),a=null;const o="fixed"===ho(e).position;let i=o?go(e):e;for(;Za(i)&&!po(i);){const t=ho(i),n=uo(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&_o.has(a.position)||no(i)&&!n&&To(e,i))?r=r.filter(e=>e!==i):a=t,i=go(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=o[0],s=o.reduce((e,n)=>{const r=Ro(t,n,a);return e.top=ba(r.top,e.top),e.right=ga(r.right,e.right),e.bottom=ga(r.bottom,e.bottom),e.left=ba(r.left,e.left),e},Ro(t,i,a));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Do,getElementRects:async function(e){const t=this.getOffsetParent||Do,n=this.getDimensions,r=await n(e.floating);return{reference:Ao(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=xo(e);return{width:t,height:n}},getScale:No,isElement:Za,isRTL:function(e){return"rtl"===ho(e).direction}};function Fo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Io(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Eo(e),u=a||o?[...c?yo(c):[],...yo(t)]:[];u.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const a=Ja(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:m}=c;if(s||t(),!f||!m)return;const p={rootMargin:-wa(d)+"px "+-wa(a.clientWidth-(u+f))+"px "+-wa(a.clientHeight-(d+m))+"px "+-wa(u)+"px",threshold:ba(0,ga(1,l))||1};let h=!0;function v(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||Fo(c,e.getBoundingClientRect())||i(),h=!1}try{r=new IntersectionObserver(v,{...p,root:a.ownerDocument})}catch(e){r=new IntersectionObserver(v,p)}r.observe(e)}(!0),o}(c,n):null;let f,m=-1,p=null;i&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let h=l?So(e):null;return l&&function t(){const r=So(e);h&&!Fo(h,r)&&n();h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(f)}}const Uo=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=Sa(n),s=Oa(n),l="y"===Ta(n),c=Ka.has(i)?-1:1,u=o&&l?-1:1,d=Ca(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof p&&(m="end"===s?-1*p:p),l?{x:m*u,y:f*c}:{x:f*c,y:m*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},zo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ca(e,t),c={x:n,y:r},u=await Ha(t,l),d=Ta(Sa(a)),f=ja(d);let m=c[f],p=c[d];if(o){const e="y"===f?"bottom":"right";m=ka(m+u["y"===f?"top":"left"],m,m-u[e])}if(i){const e="y"===d?"bottom":"right";p=ka(p+u["y"===d?"top":"left"],p,p-u[e])}const h=s.fn({...t,[f]:m,[d]:p});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:o,[d]:i}}}}}},Bo=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...v}=Ca(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const g=Sa(a),b=Ta(s),y=Sa(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(y||!h?[Ua(s)]:function(e){const t=Ua(e);return[Ma(e),t,Ma(t)]}(s)),E="none"!==p;!f&&E&&x.push(...Ia(s,h,p,w));const N=[s,...x],k=await Ha(t,v),C=[];let S=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&C.push(k[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Oa(e),a=Aa(e),o=_a(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Ua(i)),[i,Ua(i)]}(a,i,w);C.push(k[e[0]],k[e[1]])}if(S=[...S,{placement:a,overflows:C}],!C.every(e=>e<=0)){var O,j;const e=((null==(O=o.flip)?void 0:O.index)||0)+1,t=N[e];if(t){if(!("alignment"===d&&b!==Ta(t))||S.every(e=>Ta(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let n=null==(j=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:j.placement;if(!n)switch(m){case"bestFit":{var _;const e=null==(_=S.filter(e=>{if(E){const t=Ta(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:_[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}},qo=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:l=()=>{},...c}=Ca(e,t),u=await Ha(t,c),d=Sa(a),f=Oa(a),m="y"===Ta(a),{width:p,height:h}=o.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=f===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v="end"===f?"top":"bottom");const b=h-u.top-u.bottom,y=p-u.left-u.right,w=ga(h-u[v],b),x=ga(p-u[g],y),E=!t.middlewareData.shift;let N=w,k=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=y),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(N=b),E&&!f){const e=ba(u.left,0),t=ba(u.right,0),n=ba(u.top,0),r=ba(u.bottom,0);m?k=p-2*(0!==e||0!==t?e+t:ba(u.left,u.right)):N=h-2*(0!==n||0!==r?n+r:ba(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:N});const C=await i.getDimensions(s.floating);return p!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}},Ho=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=Ca(e,t);switch(r){case"referenceHidden":{const e=Wa(await Ha(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Va(e)}}}case"escaped":{const e=Wa(await Ha(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Va(e)}}}default:return{}}}}},Wo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ca(e,t)||{};if(null==c)return{};const d=za(u),f={x:n,y:r},m=Aa(a),p=_a(m),h=await i.getDimensions(c),v="y"===m,g=v?"top":"left",b=v?"bottom":"right",y=v?"clientHeight":"clientWidth",w=o.reference[p]+o.reference[m]-f[m]-o.floating[p],x=f[m]-o.reference[m],E=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let N=E?E[y]:0;N&&await(null==i.isElement?void 0:i.isElement(E))||(N=s.floating[y]||o.floating[p]);const k=w/2-x/2,C=N/2-h[p]/2-1,S=ga(d[g],C),O=ga(d[b],C),j=S,_=N-h[p]-O,R=N/2-h[p]/2+k,T=ka(j,R,_),A=!l.arrow&&null!=Oa(a)&&R!==T&&o.reference[p]/2-(R<j?S:O)-h[p]/2<0,M=A?R<j?R-j:R-_:0;return{[m]:f[m]+M,data:{[m]:T,centerOffset:R-T-M,...A&&{alignmentOffset:M}},reset:A}}}),Vo=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Ca(e,t),u={x:n,y:r},d=Ta(a),f=ja(d);let m=u[f],p=u[d];const h=Ca(s,t),v="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+v.mainAxis,n=o.reference[f]+o.reference[e]-v.mainAxis;m<t?m=t:m>n&&(m=n)}if(c){var g,b;const e="y"===f?"width":"height",t=Ka.has(Sa(a)),n=o.reference[d]-o.floating[e]+(t&&(null==(g=i.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(b=i.offset)?void 0:b[d])||0)-(t?v.crossAxis:0);p<n?p=n:p>r&&(p=r)}return{[f]:m,[d]:p}}}},Ko=(e,t,n)=>{const r=new Map,a={platform:Lo,...n},o={...a.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=o.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=qa(c,r,l),f=r,m={},p=0;for(let n=0;n<s.length;n++){const{name:o,fn:h}=s[n],{x:v,y:g,data:b,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:a,middlewareData:m,rects:c,platform:i,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=g?g:d,m={...m,[o]:{...m[o],...b}},y&&p<=50&&(p++,"object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(c=!0===y.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):y.rects),({x:u,y:d}=qa(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:a,middlewareData:m}})(e,t,{...a,platform:o})};var $o="undefined"!=typeof document?e.useLayoutEffect:function(){};function Yo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Yo(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!==r--;){const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!Yo(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Go(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jo(e,t){const n=Go(e);return Math.round(t*n)/n}function Xo(e){const t=f.useRef(e);return $o(()=>{t.current=e}),t}const Zo=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?Wo({element:n.current,padding:r}).fn(t):{}:n?Wo({element:n,padding:r}).fn(t):{};var a}}),Qo=(e,t)=>({...Uo(e),options:[e,t]}),ei=(e,t)=>({...zo(e),options:[e,t]}),ti=(e,t)=>({...Vo(e),options:[e,t]}),ni=(e,t)=>({...Bo(e),options:[e,t]}),ri=(e,t)=>({...qo(e),options:[e,t]}),ai=(e,t)=>({...Ho(e),options:[e,t]}),oi=(e,t)=>({...Zo(e),options:[e,t]});var ii=f.forwardRef((e,n)=>{const{children:r,width:a=10,height:o=5,...i}=e;return t.jsx(en.svg,{...i,ref:n,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:t.jsx("polygon",{points:"0,0 30,0 15,10"})})});ii.displayName="Arrow";var si=ii;function li(e){const[t,n]=f.useState(void 0);return Wt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}var ci="Popper",[ui,di]=qt(ci),[fi,mi]=ui(ci),pi=e=>{const{__scopePopper:n,children:r}=e,[a,o]=f.useState(null);return t.jsx(fi,{scope:n,anchor:a,onAnchorChange:o,children:r})};pi.displayName=ci;var hi="PopperAnchor",vi=f.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:a,...o}=e,i=mi(hi,r),s=f.useRef(null),l=xt(n,s),c=f.useRef(null);return f.useEffect(()=>{const e=c.current;c.current=a?.current||s.current,e!==c.current&&i.onAnchorChange(c.current)}),a?null:t.jsx(en.div,{...o,ref:l})});vi.displayName=hi;var gi="PopperContent",[bi,yi]=ui(gi),wi=f.forwardRef((e,n)=>{const{__scopePopper:r,side:a="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:g,...b}=e,y=mi(gi,r),[w,x]=f.useState(null),E=xt(n,e=>x(e)),[N,k]=f.useState(null),C=li(N),S=C?.width??0,O=C?.height??0,j=a+("center"!==i?"-"+i:""),_="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},R=Array.isArray(u)?u:[u],T=R.length>0,A={padding:_,boundary:R.filter(ki),altBoundary:T},{refs:M,floatingStyles:P,placement:D,isPositioned:L,middlewareData:F}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=f.useState(r);Yo(p,r)||h(r);const[v,g]=f.useState(null),[b,y]=f.useState(null),w=f.useCallback(e=>{e!==k.current&&(k.current=e,g(e))},[]),x=f.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),E=o||v,N=i||b,k=f.useRef(null),C=f.useRef(null),S=f.useRef(u),O=null!=l,j=Xo(l),_=Xo(a),R=Xo(c),T=f.useCallback(()=>{if(!k.current||!C.current)return;const e={placement:t,strategy:n,middleware:p};_.current&&(e.platform=_.current),Ko(k.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==R.current};A.current&&!Yo(S.current,t)&&(S.current=t,m.flushSync(()=>{d(t)}))})},[p,t,n,_,R]);$o(()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const A=f.useRef(!1);$o(()=>(A.current=!0,()=>{A.current=!1}),[]),$o(()=>{if(E&&(k.current=E),N&&(C.current=N),E&&N){if(j.current)return j.current(E,N,T);T()}},[E,N,T,j,O]);const M=f.useMemo(()=>({reference:k,floating:C,setReference:w,setFloating:x}),[w,x]),P=f.useMemo(()=>({reference:E,floating:N}),[E,N]),D=f.useMemo(()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=Jo(P.floating,u.x),r=Jo(P.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Go(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:T,refs:M,elements:P,floatingStyles:D}),[u,T,M,P,D])}({strategy:"fixed",placement:j,whileElementsMounted:(...e)=>Io(...e,{animationFrame:"always"===v}),elements:{reference:y.anchor},middleware:[Qo({mainAxis:o+O,alignmentAxis:s}),c&&ei({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?ti():void 0,...A}),c&&ni({...A}),ri({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),N&&oi({element:N,padding:l}),Ci({arrowWidth:S,arrowHeight:O}),h&&ai({strategy:"referenceHidden",...A})]}),[I,U]=Si(D),z=nn(g);Wt(()=>{L&&z?.()},[L,z]);const B=F.arrow?.x,q=F.arrow?.y,H=0!==F.arrow?.centerOffset,[W,V]=f.useState();return Wt(()=>{w&&V(window.getComputedStyle(w).zIndex)},[w]),t.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...P,transform:L?P.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:t.jsx(bi,{scope:r,placedSide:I,onArrowChange:k,arrowX:B,arrowY:q,shouldHideArrow:H,children:t.jsx(en.div,{"data-side":I,"data-align":U,...b,ref:E,style:{...b.style,animation:L?void 0:"none"}})})})});wi.displayName=gi;var xi="PopperArrow",Ei={top:"bottom",right:"left",bottom:"top",left:"right"},Ni=f.forwardRef(function(e,n){const{__scopePopper:r,...a}=e,o=yi(xi,r),i=Ei[o.placedSide];return t.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:t.jsx(si,{...a,ref:n,style:{...a.style,display:"block"}})})});function ki(e){return null!==e}Ni.displayName=xi;var Ci=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,o=0!==a.arrow?.centerOffset,i=o?0:e.arrowWidth,s=o?0:e.arrowHeight,[l,c]=Si(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(a.arrow?.x??0)+i/2,f=(a.arrow?.y??0)+s/2;let m="",p="";return"bottom"===l?(m=o?u:`${d}px`,p=-s+"px"):"top"===l?(m=o?u:`${d}px`,p=`${r.floating.height+s}px`):"right"===l?(m=-s+"px",p=o?u:`${f}px`):"left"===l&&(m=`${r.floating.width+s}px`,p=o?u:`${f}px`),{data:{x:m,y:p}}}});function Si(e){const[t,n="center"]=e.split("-");return[t,n]}var Oi=pi,ji=vi,_i=wi,Ri=Ni,Ti=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ai=f.forwardRef((e,n)=>t.jsx(en.span,{...e,ref:n,style:{...Ti,...e.style}}));Ai.displayName="VisuallyHidden";var Mi=Ai,[Pi,Di]=qt("Tooltip",[di]),Li=di(),Fi="TooltipProvider",Ii=700,Ui="tooltip.open",[zi,Bi]=Pi(Fi),qi=e=>{const{__scopeTooltip:n,delayDuration:r=Ii,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:i}=e,s=f.useRef(!0),l=f.useRef(!1),c=f.useRef(0);return f.useEffect(()=>{const e=c.current;return()=>window.clearTimeout(e)},[]),t.jsx(zi,{scope:n,isOpenDelayedRef:s,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,a)},[a]),isPointerInTransitRef:l,onPointerInTransitChange:f.useCallback(e=>{l.current=e},[]),disableHoverableContent:o,children:i})};qi.displayName=Fi;var Hi="Tooltip",[Wi,Vi]=Pi(Hi),Ki=e=>{const{__scopeTooltip:n,children:r,open:a,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:l}=e,c=Bi(Hi,e.__scopeTooltip),u=Li(n),[d,m]=f.useState(null),p=$t(),h=f.useRef(0),v=s??c.disableHoverableContent,g=l??c.delayDuration,b=f.useRef(!1),[y,w]=Gt({prop:a,defaultProp:o??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ui))):c.onClose(),i?.(e)},caller:Hi}),x=f.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),E=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,w(!0)},[w]),N=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),k=f.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,w(!0),h.current=0},g)},[g,w]);return f.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),t.jsx(Oi,{...u,children:t.jsx(Wi,{scope:n,contentId:p,open:y,stateAttribute:x,trigger:d,onTriggerChange:m,onTriggerEnter:f.useCallback(()=>{c.isOpenDelayedRef.current?k():E()},[c.isOpenDelayedRef,k,E]),onTriggerLeave:f.useCallback(()=>{v?N():(window.clearTimeout(h.current),h.current=0)},[N,v]),onOpen:E,onClose:N,disableHoverableContent:v,children:r})})};Ki.displayName=Hi;var $i="TooltipTrigger",Yi=f.forwardRef((e,n)=>{const{__scopeTooltip:r,...a}=e,o=Vi($i,r),i=Bi($i,r),s=Li(r),l=xt(n,f.useRef(null),o.onTriggerChange),c=f.useRef(!1),u=f.useRef(!1),d=f.useCallback(()=>c.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),t.jsx(ji,{asChild:!0,...s,children:t.jsx(en.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:l,onPointerMove:Bt(e.onPointerMove,e=>{"touch"!==e.pointerType&&(u.current||i.isPointerInTransitRef.current||(o.onTriggerEnter(),u.current=!0))}),onPointerLeave:Bt(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:Bt(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Bt(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:Bt(e.onBlur,o.onClose),onClick:Bt(e.onClick,o.onClose)})})});Yi.displayName=$i;var[Gi,Ji]=Pi("TooltipPortal",{forceMount:void 0}),Xi="TooltipContent",Zi=f.forwardRef((e,n)=>{const r=Ji(Xi,e.__scopeTooltip),{forceMount:a=r.forceMount,side:o="top",...i}=e,s=Vi(Xi,e.__scopeTooltip);return t.jsx(Nn,{present:a||s.open,children:s.disableHoverableContent?t.jsx(rs,{side:o,...i,ref:n}):t.jsx(Qi,{side:o,...i,ref:n})})}),Qi=f.forwardRef((e,n)=>{const r=Vi(Xi,e.__scopeTooltip),a=Bi(Xi,e.__scopeTooltip),o=f.useRef(null),i=xt(n,o),[s,l]=f.useState(null),{trigger:c,onClose:u}=r,d=o.current,{onPointerInTransitChange:m}=a,p=f.useCallback(()=>{l(null),m(!1)},[m]),h=f.useCallback((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},a=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),o=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...a,...function(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}(t.getBoundingClientRect())]);l(o),m(!0)},[m]);return f.useEffect(()=>()=>p(),[p]),f.useEffect(()=>{if(c&&d){const e=e=>h(e,d),t=e=>h(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}},[c,d,h,p]),f.useEffect(()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||d?.contains(t),a=!function(e,t){const{x:n,y:r}=e;let a=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){const i=t[e],s=t[o],l=i.x,c=i.y,u=s.x,d=s.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(a=!a)}return a}(n,s);r?p():a&&(p(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,d,s,u,p]),t.jsx(rs,{...e,ref:i})}),[es,ts]=Pi(Hi,{isInside:!1}),ns=function(e){const n=({children:e})=>t.jsx(t.Fragment,{children:e});return n.displayName=`${e}.Slottable`,n.__radixId=Zt,n}("TooltipContent"),rs=f.forwardRef((e,n)=>{const{__scopeTooltip:r,children:a,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...l}=e,c=Vi(Xi,r),u=Li(r),{onClose:d}=c;return f.useEffect(()=>(document.addEventListener(Ui,d),()=>document.removeEventListener(Ui,d)),[d]),f.useEffect(()=>{if(c.trigger){const e=e=>{const t=e.target;t?.contains(c.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[c.trigger,d]),t.jsx(cn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:t.jsxs(_i,{"data-state":c.stateAttribute,...u,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[t.jsx(ns,{children:a}),t.jsx(es,{scope:r,isInside:!0,children:t.jsx(Mi,{id:c.contentId,role:"tooltip",children:o||a})})]})})});Zi.displayName=Xi;var as="TooltipArrow";f.forwardRef((e,n)=>{const{__scopeTooltip:r,...a}=e,o=Li(r);return ts(as,r).isInside?null:t.jsx(Ri,{...o,...a,ref:n})}).displayName=as;var os=Zi,is=qi,ss=Ki,ls=Yi,cs=f.forwardRef(function(e,t){var n=e.className,r=e.sideOffset,a=void 0===r?4:r,o=z(e,["className","sideOffset"]);return f.createElement(os,Object.assign({ref:t,sideOffset:a,className:gt("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",n)},o))});cs.displayName=os.displayName;var us=f.createContext(null);function ds(){var e=f.useContext(us);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function fs(e){var t=e.defaultOpen,n=void 0===t||t,r=e.open,a=e.onOpenChange,o=e.className,i=e.style,s=e.children,l=z(e,["defaultOpen","open","onOpenChange","className","style","children"]),c=function(){var e=A(f.useState(void 0),2),t=e[0],n=e[1];return f.useEffect(function(){var e=window.matchMedia("(max-width: ".concat(767,"px)")),t=function(){n(window.innerWidth<768)};return e.addEventListener("change",t),n(window.innerWidth<768),function(){return e.removeEventListener("change",t)}},[]),!!t}(),u=A(f.useState(!1),2),d=u[0],m=u[1],p=A(f.useState(n),2),h=p[0],v=p[1],g=null!=r?r:h,b=f.useCallback(function(e){var t="function"==typeof e?e(g):e;a?a(t):v(t),document.cookie="".concat("sidebar_state","=").concat(t,"; path=/; max-age=").concat(604800)},[a,g]),y=f.useCallback(function(){return c?m(function(e){return!e}):b(function(e){return!e})},[c,b,m]);f.useEffect(function(){var e=function(e){"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[y]);var w=g?"expanded":"collapsed",x=f.useMemo(function(){return{state:w,open:g,setOpen:b,isMobile:c,openMobile:d,setOpenMobile:m,toggleSidebar:y}},[w,g,b,c,d,m,y]);return f.createElement(us.Provider,{value:x},f.createElement(is,{delayDuration:0},f.createElement("div",Object.assign({style:Object.assign({"--sidebar-width":"16rem","--sidebar-width-icon":"3rem"},i),className:gt("group/sidebar-wrapper flex min-h-svh w-full",o)},l),s)))}function ms(e){var t=e.side,n=void 0===t?"left":t,r=e.variant,a=void 0===r?"sidebar":r,o=e.collapsible,i=void 0===o?"offcanvas":o,s=e.className,l=e.children,c=z(e,["side","variant","collapsible","className","children"]),u=ds(),d=u.isMobile,m=u.state,p=u.openMobile,h=u.setOpenMobile;return"none"===i?f.createElement("div",Object.assign({className:gt("bg-sidebar text-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",s)},c),l):d?f.createElement(la,Object.assign({open:p,onOpenChange:h},c),f.createElement(fa,{className:"bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:n},f.createElement(ma,{className:"sr-only"},f.createElement(pa,null,"Sidebar"),f.createElement(ha,null,"Displays the mobile sidebar.")),f.createElement("div",{className:"flex h-full w-full flex-col"},l))):f.createElement("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":m,"data-collapsible":"collapsed"===m?i:"","data-variant":a,"data-side":n},f.createElement("div",{className:gt("relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","floating"===a||"inset"===a?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")}),f.createElement("div",Object.assign({className:gt("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex","left"===n?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===a||"inset"===a?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",s)},c),f.createElement("div",{className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"},l)))}function ps(e){var t=e.className,n=e.onClick,r=z(e,["className","onClick"]),a=ds().toggleSidebar;return f.createElement(Pt,Object.assign({variant:"ghost",size:"icon",className:gt("h-7 w-7",t),onClick:function(e){null==n||n(e),a()}},r),f.createElement(fe,null),f.createElement("span",{className:"sr-only"},"Toggle Sidebar"))}function hs(e){var t=e.className,n=z(e,["className"]);return f.createElement("main",Object.assign({className:gt("bg-background relative flex w-full flex-1 flex-col min-w-0 overflow-x-hidden","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t)},n))}function vs(e){var t=e.className,n=z(e,["className"]);return f.createElement("div",Object.assign({className:gt("flex flex-col gap-2 p-2",t)},n))}function gs(e){var t=e.className,n=z(e,["className"]);return f.createElement("div",Object.assign({className:gt("flex flex-col gap-2 p-2",t)},n))}function bs(e){var t=e.className,n=z(e,["className"]);return f.createElement("div",Object.assign({className:gt("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t)},n))}function ys(e){var t=e.className,n=z(e,["className"]);return f.createElement("div",Object.assign({className:gt("relative flex w-full min-w-0 flex-col p-2",t)},n))}function ws(e){var t=e.className,n=e.asChild,r=void 0!==n&&n,a=z(e,["className","asChild"]),o=r?St:"div";return f.createElement(o,Object.assign({className:gt("text-sidebar-foreground/70 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t)},a))}function xs(e){var t=e.className,n=z(e,["className"]);return f.createElement("div",Object.assign({className:gt("w-full text-sm",t)},n))}function Es(e){var t=e.className,n=z(e,["className"]);return f.createElement("ul",Object.assign({className:gt("flex w-full min-w-0 flex-col gap-1",t)},n))}function Ns(e){var t=e.className,n=z(e,["className"]);return f.createElement("li",Object.assign({className:gt("group/menu-item relative",t)},n))}var ks=At("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Cs(e){var t=e.asChild,n=void 0!==t&&t,r=e.isActive,a=void 0!==r&&r,o=e.variant,i=void 0===o?"default":o,s=e.size,l=void 0===s?"default":s,c=e.tooltip,u=e.className,d=z(e,["asChild","isActive","variant","size","tooltip","className"]),m=n?St:"button",p=ds(),h=p.isMobile,v=p.state,g=f.createElement(m,Object.assign({"data-size":l,"data-active":a,className:gt(ks({variant:i,size:l}),u)},d));return c?("string"==typeof c&&(c={children:c}),f.createElement(ss,null,f.createElement(ls,{asChild:!0},g),f.createElement(cs,Object.assign({side:"right",align:"center",hidden:"collapsed"!==v||h},c)))):g}function Ss(n){const r=n+"CollectionProvider",[a,o]=qt(r),[i,s]=a(r,{collectionRef:{current:null},itemMap:new Map}),l=n=>{const{scope:r,children:a}=n,o=e.useRef(null),s=e.useRef(new Map).current;return t.jsx(i,{scope:r,itemMap:s,collectionRef:o,children:a})};l.displayName=r;const c=n+"CollectionSlot",u=Jt(c),d=e.forwardRef((e,n)=>{const{scope:r,children:a}=e,o=xt(n,s(c,r).collectionRef);return t.jsx(u,{ref:o,children:a})});d.displayName=c;const f=n+"CollectionItemSlot",m="data-radix-collection-item",p=Jt(f),h=e.forwardRef((n,r)=>{const{scope:a,children:o,...i}=n,l=e.useRef(null),c=xt(r,l),u=s(f,a);return e.useEffect(()=>(u.itemMap.set(l,{ref:l,...i}),()=>{u.itemMap.delete(l)})),t.jsx(p,{[m]:"",ref:c,children:o})});return h.displayName=f,[{Provider:l,Slot:d,ItemSlot:h},function(t){const r=s(n+"CollectionConsumer",t);return e.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])},o]}var Os=f.createContext(void 0);function js(e){const t=f.useContext(Os);return e||t||"ltr"}var _s="rovingFocusGroup.onEntryFocus",Rs={bubbles:!1,cancelable:!0},Ts="RovingFocusGroup",[As,Ms,Ps]=Ss(Ts),[Ds,Ls]=qt(Ts,[Ps]),[Fs,Is]=Ds(Ts),Us=f.forwardRef((e,n)=>t.jsx(As.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(As.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(zs,{...e,ref:n})})}));Us.displayName=Ts;var zs=f.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:a,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=f.useRef(null),h=xt(n,p),v=js(i),[g,b]=Gt({prop:s,defaultProp:l??null,onChange:c,caller:Ts}),[y,w]=f.useState(!1),x=nn(u),E=Ms(r),N=f.useRef(!1),[k,C]=f.useState(0);return f.useEffect(()=>{const e=p.current;if(e)return e.addEventListener(_s,x),()=>e.removeEventListener(_s,x)},[x]),t.jsx(Fs,{scope:r,orientation:a,dir:v,loop:o,currentTabStopId:g,onItemFocus:f.useCallback(e=>b(e),[b]),onItemShiftTab:f.useCallback(()=>w(!0),[]),onFocusableItemAdd:f.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:f.useCallback(()=>C(e=>e-1),[]),children:t.jsx(en.div,{tabIndex:y||0===k?-1:0,"data-orientation":a,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:Bt(e.onMouseDown,()=>{N.current=!0}),onFocus:Bt(e.onFocus,e=>{const t=!N.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(_s,Rs);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=E().filter(e=>e.focusable);Ws([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),d)}}N.current=!1}),onBlur:Bt(e.onBlur,()=>w(!1))})})}),Bs="RovingFocusGroupItem",qs=f.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:a=!0,active:o=!1,tabStopId:i,children:s,...l}=e,c=$t(),u=i||c,d=Is(Bs,r),m=d.currentTabStopId===u,p=Ms(r),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:g}=d;return f.useEffect(()=>{if(a)return h(),()=>v()},[a,h,v]),t.jsx(As.ItemSlot,{scope:r,id:u,focusable:a,active:o,children:t.jsx(en.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...l,ref:n,onMouseDown:Bt(e.onMouseDown,e=>{a?d.onItemFocus(u):e.preventDefault()}),onFocus:Bt(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Bt(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void d.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Hs[r]}(e,d.orientation,d.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=p().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){"prev"===t&&a.reverse();const o=a.indexOf(e.currentTarget);a=d.loop?(r=o+1,(n=a).map((e,t)=>n[(r+t)%n.length])):a.slice(o+1)}setTimeout(()=>Ws(a))}var n,r}),children:"function"==typeof s?s({isCurrentTabStop:m,hasTabStop:null!=g}):s})})});qs.displayName=Bs;var Hs={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ws(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Vs=Us,Ks=qs,$s=["Enter"," "],Ys=["ArrowUp","PageDown","End"],Gs=["ArrowDown","PageUp","Home",...Ys],Js={ltr:[...$s,"ArrowRight"],rtl:[...$s,"ArrowLeft"]},Xs={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Zs="Menu",[Qs,el,tl]=Ss(Zs),[nl,rl]=qt(Zs,[tl,di,Ls]),al=di(),ol=Ls(),[il,sl]=nl(Zs),[ll,cl]=nl(Zs),ul=e=>{const{__scopeMenu:n,open:r=!1,children:a,dir:o,onOpenChange:i,modal:s=!0}=e,l=al(n),[c,u]=f.useState(null),d=f.useRef(!1),m=nn(i),p=js(o);return f.useEffect(()=>{const e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),t.jsx(Oi,{...l,children:t.jsx(il,{scope:n,open:r,onOpenChange:m,content:c,onContentChange:u,children:t.jsx(ll,{scope:n,onClose:f.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:d,dir:p,modal:s,children:a})})})};ul.displayName=Zs;var dl=f.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e,o=al(r);return t.jsx(ji,{...o,...a,ref:n})});dl.displayName="MenuAnchor";var fl="MenuPortal",[ml,pl]=nl(fl,{forceMount:void 0}),hl=e=>{const{__scopeMenu:n,forceMount:r,children:a,container:o}=e,i=sl(fl,n);return t.jsx(ml,{scope:n,forceMount:r,children:t.jsx(Nn,{present:r||i.open,children:t.jsx(En,{asChild:!0,container:o,children:a})})})};hl.displayName=fl;var vl="MenuContent",[gl,bl]=nl(vl),yl=f.forwardRef((e,n)=>{const r=pl(vl,e.__scopeMenu),{forceMount:a=r.forceMount,...o}=e,i=sl(vl,e.__scopeMenu),s=cl(vl,e.__scopeMenu);return t.jsx(Qs.Provider,{scope:e.__scopeMenu,children:t.jsx(Nn,{present:a||i.open,children:t.jsx(Qs.Slot,{scope:e.__scopeMenu,children:s.modal?t.jsx(wl,{...o,ref:n}):t.jsx(xl,{...o,ref:n})})})})}),wl=f.forwardRef((e,n)=>{const r=sl(vl,e.__scopeMenu),a=f.useRef(null),o=xt(n,a);return f.useEffect(()=>{const e=a.current;if(e)return wr(e)},[]),t.jsx(Nl,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Bt(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),xl=f.forwardRef((e,n)=>{const r=sl(vl,e.__scopeMenu);return t.jsx(Nl,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),El=Jt("MenuContent.ScrollLock"),Nl=f.forwardRef((e,n)=>{const{__scopeMenu:r,loop:a=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:p,onDismiss:h,disableOutsideScroll:v,...g}=e,b=sl(vl,r),y=cl(vl,r),w=al(r),x=ol(r),E=el(r),[N,k]=f.useState(null),C=f.useRef(null),S=xt(n,C,b.onContentChange),O=f.useRef(0),j=f.useRef(""),_=f.useRef(0),R=f.useRef(null),T=f.useRef("right"),A=f.useRef(0),M=v?mr:f.Fragment,P=v?{as:El,allowPinchZoom:!0}:void 0,D=e=>{const t=j.current+e,n=E().filter(e=>!e.disabled),r=document.activeElement,a=n.find(e=>e.ref.current===r)?.textValue,o=function(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),a=r?t[0]:t,o=n?e.indexOf(n):-1;let i=(s=e,l=Math.max(o,0),s.map((e,t)=>s[(l+t)%s.length]));var s,l;1===a.length&&(i=i.filter(e=>e!==n));const c=i.find(e=>e.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}(n.map(e=>e.textValue),t,a),i=n.find(e=>e.textValue===o)?.ref.current;!function e(t){j.current=t,window.clearTimeout(O.current),""!==t&&(O.current=window.setTimeout(()=>e(""),1e3))}(t),i&&setTimeout(()=>i.focus())};f.useEffect(()=>()=>window.clearTimeout(O.current),[]),Sn();const L=f.useCallback(e=>T.current===R.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let a=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){const i=t[e],s=t[o],l=i.x,c=i.y,u=s.x,d=s.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(a=!a)}return a}(n,t)}(e,R.current?.area),[]);return t.jsx(gl,{scope:r,searchRef:j,onItemEnter:f.useCallback(e=>{L(e)&&e.preventDefault()},[L]),onItemLeave:f.useCallback(e=>{L(e)||(C.current?.focus(),k(null))},[L]),onTriggerLeave:f.useCallback(e=>{L(e)&&e.preventDefault()},[L]),pointerGraceTimerRef:_,onPointerGraceIntentChange:f.useCallback(e=>{R.current=e},[]),children:t.jsx(M,{...P,children:t.jsx(hn,{asChild:!0,trapped:o,onMountAutoFocus:Bt(i,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:t.jsx(cn,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:p,onDismiss:h,children:t.jsx(Vs,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:a,currentTabStopId:N,onCurrentTabStopIdChange:k,onEntryFocus:Bt(c,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:t.jsx(_i,{role:"menu","aria-orientation":"vertical","data-state":Gl(b.open),"data-radix-menu-content":"",dir:y.dir,...w,...g,ref:S,style:{outline:"none",...g.style},onKeyDown:Bt(g.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&D(e.key));const a=C.current;if(e.target!==a)return;if(!Gs.includes(e.key))return;e.preventDefault();const o=E().filter(e=>!e.disabled).map(e=>e.ref.current);Ys.includes(e.key)&&o.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(o)}),onBlur:Bt(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(O.current),j.current="")}),onPointerMove:Bt(e.onPointerMove,Zl(e=>{const t=e.target,n=A.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>A.current?"right":"left";T.current=t,A.current=e.clientX}}))})})})})})})});yl.displayName=vl;var kl=f.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e;return t.jsx(en.div,{role:"group",...a,ref:n})});kl.displayName="MenuGroup";var Cl=f.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e;return t.jsx(en.div,{...a,ref:n})});Cl.displayName="MenuLabel";var Sl="MenuItem",Ol="menu.itemSelect",jl=f.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:a,...o}=e,i=f.useRef(null),s=cl(Sl,e.__scopeMenu),l=bl(Sl,e.__scopeMenu),c=xt(n,i),u=f.useRef(!1);return t.jsx(_l,{...o,ref:c,disabled:r,onClick:Bt(e.onClick,()=>{const e=i.current;if(!r&&e){const t=new CustomEvent(Ol,{bubbles:!0,cancelable:!0});e.addEventListener(Ol,e=>a?.(e),{once:!0}),tn(e,t),t.defaultPrevented?u.current=!1:s.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:Bt(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:Bt(e.onKeyDown,e=>{const t=""!==l.searchRef.current;r||t&&" "===e.key||$s.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});jl.displayName=Sl;var _l=f.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:a=!1,textValue:o,...i}=e,s=bl(Sl,r),l=ol(r),c=f.useRef(null),u=xt(n,c),[d,m]=f.useState(!1),[p,h]=f.useState("");return f.useEffect(()=>{const e=c.current;e&&h((e.textContent??"").trim())},[i.children]),t.jsx(Qs.ItemSlot,{scope:r,disabled:a,textValue:o??p,children:t.jsx(Ks,{asChild:!0,...l,focusable:!a,children:t.jsx(en.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...i,ref:u,onPointerMove:Bt(e.onPointerMove,Zl(e=>{if(a)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:Bt(e.onPointerLeave,Zl(e=>s.onItemLeave(e))),onFocus:Bt(e.onFocus,()=>m(!0)),onBlur:Bt(e.onBlur,()=>m(!1))})})})}),Rl=f.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:a,...o}=e;return t.jsx(Il,{scope:e.__scopeMenu,checked:r,children:t.jsx(jl,{role:"menuitemcheckbox","aria-checked":Jl(r)?"mixed":r,...o,ref:n,"data-state":Xl(r),onSelect:Bt(o.onSelect,()=>a?.(!!Jl(r)||!r),{checkForDefaultPrevented:!1})})})});Rl.displayName="MenuCheckboxItem";var Tl="MenuRadioGroup",[Al,Ml]=nl(Tl,{value:void 0,onValueChange:()=>{}}),Pl=f.forwardRef((e,n)=>{const{value:r,onValueChange:a,...o}=e,i=nn(a);return t.jsx(Al,{scope:e.__scopeMenu,value:r,onValueChange:i,children:t.jsx(kl,{...o,ref:n})})});Pl.displayName=Tl;var Dl="MenuRadioItem",Ll=f.forwardRef((e,n)=>{const{value:r,...a}=e,o=Ml(Dl,e.__scopeMenu),i=r===o.value;return t.jsx(Il,{scope:e.__scopeMenu,checked:i,children:t.jsx(jl,{role:"menuitemradio","aria-checked":i,...a,ref:n,"data-state":Xl(i),onSelect:Bt(a.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Ll.displayName=Dl;var Fl="MenuItemIndicator",[Il,Ul]=nl(Fl,{checked:!1}),zl=f.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:a,...o}=e,i=Ul(Fl,r);return t.jsx(Nn,{present:a||Jl(i.checked)||!0===i.checked,children:t.jsx(en.span,{...o,ref:n,"data-state":Xl(i.checked)})})});zl.displayName=Fl;var Bl=f.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e;return t.jsx(en.div,{role:"separator","aria-orientation":"horizontal",...a,ref:n})});Bl.displayName="MenuSeparator";var ql=f.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e,o=al(r);return t.jsx(Ri,{...o,...a,ref:n})});ql.displayName="MenuArrow";var[Hl,Wl]=nl("MenuSub"),Vl="MenuSubTrigger",Kl=f.forwardRef((e,n)=>{const r=sl(Vl,e.__scopeMenu),a=cl(Vl,e.__scopeMenu),o=Wl(Vl,e.__scopeMenu),i=bl(Vl,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},d=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>d,[d]),f.useEffect(()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}},[l,c]),t.jsx(dl,{asChild:!0,...u,children:t.jsx(_l,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Gl(r.open),...e,ref:wt(n,o.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Bt(e.onPointerMove,Zl(t=>{i.onItemEnter(t),t.defaultPrevented||e.disabled||r.open||s.current||(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:Bt(e.onPointerLeave,Zl(e=>{d();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,a="right"===n,o=a?-5:5,s=t[a?"left":"right"],c=t[a?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:n}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Bt(e.onKeyDown,t=>{const n=""!==i.searchRef.current;e.disabled||n&&" "===t.key||Js[a.dir].includes(t.key)&&(r.onOpenChange(!0),r.content?.focus(),t.preventDefault())})})})});Kl.displayName=Vl;var $l="MenuSubContent",Yl=f.forwardRef((e,n)=>{const r=pl(vl,e.__scopeMenu),{forceMount:a=r.forceMount,...o}=e,i=sl(vl,e.__scopeMenu),s=cl(vl,e.__scopeMenu),l=Wl($l,e.__scopeMenu),c=f.useRef(null),u=xt(n,c);return t.jsx(Qs.Provider,{scope:e.__scopeMenu,children:t.jsx(Nn,{present:a||i.open,children:t.jsx(Qs.Slot,{scope:e.__scopeMenu,children:t.jsx(Nl,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Bt(e.onFocusOutside,e=>{e.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Bt(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:Bt(e.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=Xs[s.dir].includes(e.key);t&&n&&(i.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});function Gl(e){return e?"open":"closed"}function Jl(e){return"indeterminate"===e}function Xl(e){return Jl(e)?"indeterminate":e?"checked":"unchecked"}function Zl(e){return t=>"mouse"===t.pointerType?e(t):void 0}Yl.displayName=$l;var Ql=ul,ec=dl,tc=hl,nc=yl,rc=kl,ac=Cl,oc=jl,ic=Rl,sc=Pl,lc=Ll,cc=zl,uc=Bl,dc=ql,fc=Kl,mc=Yl,pc="DropdownMenu",[hc,vc]=qt(pc,[rl]),gc=rl(),[bc,yc]=hc(pc),wc=e=>{const{__scopeDropdownMenu:n,children:r,dir:a,open:o,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,c=gc(n),u=f.useRef(null),[d,m]=Gt({prop:o,defaultProp:i??!1,onChange:s,caller:pc});return t.jsx(bc,{scope:n,triggerId:$t(),triggerRef:u,contentId:$t(),open:d,onOpenChange:m,onOpenToggle:f.useCallback(()=>m(e=>!e),[m]),modal:l,children:t.jsx(Ql,{...c,open:d,onOpenChange:m,dir:a,modal:l,children:r})})};wc.displayName=pc;var xc="DropdownMenuTrigger",Ec=f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:a=!1,...o}=e,i=yc(xc,r),s=gc(r);return t.jsx(ec,{asChild:!0,...s,children:t.jsx(en.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...o,ref:wt(n,i.triggerRef),onPointerDown:Bt(e.onPointerDown,e=>{a||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())}),onKeyDown:Bt(e.onKeyDown,e=>{a||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});Ec.displayName=xc;var Nc=e=>{const{__scopeDropdownMenu:n,...r}=e,a=gc(n);return t.jsx(tc,{...a,...r})};Nc.displayName="DropdownMenuPortal";var kc="DropdownMenuContent",Cc=f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=yc(kc,r),i=gc(r),s=f.useRef(!1);return t.jsx(nc,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...a,ref:n,onCloseAutoFocus:Bt(e.onCloseAutoFocus,e=>{s.current||o.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:Bt(e.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.modal&&!r||(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cc.displayName=kc;f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=gc(r);return t.jsx(rc,{...o,...a,ref:n})}).displayName="DropdownMenuGroup";var Sc=f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=gc(r);return t.jsx(ac,{...o,...a,ref:n})});Sc.displayName="DropdownMenuLabel";var Oc=f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=gc(r);return t.jsx(oc,{...o,...a,ref:n})});Oc.displayName="DropdownMenuItem";var jc=f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=gc(r);return t.jsx(ic,{...o,...a,ref:n})});jc.displayName="DropdownMenuCheckboxItem";f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=gc(r);return t.jsx(sc,{...o,...a,ref:n})}).displayName="DropdownMenuRadioGroup";var _c=f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=gc(r);return t.jsx(lc,{...o,...a,ref:n})});_c.displayName="DropdownMenuRadioItem";var Rc=f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=gc(r);return t.jsx(cc,{...o,...a,ref:n})});Rc.displayName="DropdownMenuItemIndicator";var Tc=f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=gc(r);return t.jsx(uc,{...o,...a,ref:n})});Tc.displayName="DropdownMenuSeparator";f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=gc(r);return t.jsx(dc,{...o,...a,ref:n})}).displayName="DropdownMenuArrow";var Ac=f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=gc(r);return t.jsx(fc,{...o,...a,ref:n})});Ac.displayName="DropdownMenuSubTrigger";var Mc=f.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=gc(r);return t.jsx(mc,{...o,...a,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Mc.displayName="DropdownMenuSubContent";var Pc=Nc,Dc=Cc,Lc=Sc,Fc=Oc,Ic=jc,Uc=_c,zc=Rc,Bc=Tc,qc=Ac,Hc=Mc,Wc=wc,Vc=Ec;f.forwardRef(function(e,t){var n=e.className,r=e.inset,a=e.children,o=z(e,["className","inset","children"]);return f.createElement(qc,Object.assign({ref:t,className:gt("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",n)},o),a,f.createElement(G,{className:"ml-auto"}))}).displayName=qc.displayName,f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(Hc,Object.assign({ref:t,className:gt("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",n)},r))}).displayName=Hc.displayName;var Kc=f.forwardRef(function(e,t){var n=e.className,r=e.sideOffset,a=void 0===r?4:r,o=z(e,["className","sideOffset"]);return f.createElement(Pc,null,f.createElement(Dc,Object.assign({ref:t,sideOffset:a,className:gt("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",n)},o)))});Kc.displayName=Dc.displayName;var $c=f.forwardRef(function(e,t){var n=e.className,r=e.inset,a=z(e,["className","inset"]);return f.createElement(Fc,Object.assign({ref:t,className:gt("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",n)},a))});$c.displayName=Fc.displayName,f.forwardRef(function(e,t){var n=e.className,r=e.children,a=e.checked,o=z(e,["className","children","checked"]);return f.createElement(Ic,Object.assign({ref:t,className:gt("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),checked:a},o),f.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},f.createElement(zc,null,f.createElement(K,{className:"h-4 w-4"}))),r)}).displayName=Ic.displayName,f.forwardRef(function(e,t){var n=e.className,r=e.children,a=z(e,["className","children"]);return f.createElement(Uc,Object.assign({ref:t,className:gt("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n)},a),f.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},f.createElement(zc,null,f.createElement(X,{className:"h-2 w-2 fill-current"}))),r)}).displayName=Uc.displayName,f.forwardRef(function(e,t){var n=e.className,r=e.inset,a=z(e,["className","inset"]);return f.createElement(Lc,Object.assign({ref:t,className:gt("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",n)},a))}).displayName=Lc.displayName,f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(Bc,Object.assign({ref:t,className:gt("-mx-1 my-1 h-px bg-muted",n)},r))}).displayName=Bc.displayName;var Yc=f.forwardRef((e,n)=>t.jsx(Lt.label,{...e,ref:n,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));Yc.displayName="Label";var Gc=Yc,Jc=At("text-sm font-bold leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-foreground"),Xc=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(Gc,Object.assign({ref:t,className:gt(Jc(),n)},r))});Xc.displayName=Gc.displayName;var Zc=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("div",Object.assign({ref:t,className:gt("rounded-[2rem] border border-[hsl(var(--border))]/50 bg-card text-card-foreground shadow-[0_4px_20px_-2px_rgba(93,112,82,0.15)] transition-all duration-300",n)},r))});Zc.displayName="Card";var Qc=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("div",Object.assign({ref:t,className:gt("flex flex-col space-y-1.5 p-6",n)},r))});Qc.displayName="CardHeader";var eu=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("div",Object.assign({ref:t,className:gt("text-2xl font-bold leading-none tracking-tight",n)},r))});eu.displayName="CardTitle";var tu=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("div",Object.assign({ref:t,className:gt("text-sm text-muted-foreground",n)},r))});tu.displayName="CardDescription";var nu=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("div",Object.assign({ref:t,className:gt("p-6 pt-0",n)},r))});nu.displayName="CardContent",f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("div",Object.assign({ref:t,className:gt("flex items-center p-6 pt-0",n)},r))}).displayName="CardFooter";var ru={items:[],config:Object.assign({},{top:24,duration:3,maxCount:5})},au=new Set;function ou(){au.forEach(function(e){return e(ru.items.slice())})}function iu(t){switch(t){case"success":return e.createElement(V,null);case"error":return e.createElement(xe,null);case"warning":return e.createElement(W,null);case"loading":return e.createElement(le,{className:"animate-spin"});default:return e.createElement(ie,null)}}function su(e){var t,n,r;du();var a=Date.now(),o=null!==(t=e.key)&&void 0!==t?t:"msg_".concat(a,"_").concat(Math.random().toString(36).slice(2)),i=ru.items.findIndex(function(e){return e.key===o}),s={key:o,content:e.content,duration:null!==(n=e.duration)&&void 0!==n?n:ru.config.duration,type:e.type,onClose:e.onClose,icon:null!==(r=e.icon)&&void 0!==r?r:iu(e.type),className:e.className,createdAt:a};return i>=0?ru.items[i]=Object.assign({},ru.items[i],s):(ru.items.length>=ru.config.maxCount&&ru.items.shift(),ru.items.push(s)),ou(),s.duration>0&&"loading"!==s.type&&window.setTimeout(function(){lu(o)},1e3*s.duration),{close:function(){return lu(o)}}}function lu(e){var t;if(void 0===e)return ru.items.forEach(function(e){var t;return null===(t=e.onClose)||void 0===t?void 0:t.call(e)}),ru.items=[],void ou();var n=ru.items.findIndex(function(t){return t.key===e});if(n>=0){var r=A(ru.items.splice(n,1),1)[0];null===(t=null==r?void 0:r.onClose)||void 0===t||t.call(r),ou()}}var cu=null,uu=null;function du(){"undefined"!=typeof window&&(uu||((uu=document.createElement("div")).setAttribute("data-custom-message-holder",""),document.body.appendChild(uu)),cu||(cu=r.createRoot(uu)).render(e.createElement(fu,null)))}function fu(){var t=function(){var t=A(e.useState(ru.items),2),n=t[0],r=t[1];return e.useEffect(function(){var e=r;return au.add(e),function(){au.delete(e)}},[]),n}(),n=ru.config.top;return e.createElement("div",{className:"fixed left-1/2 -translate-x-1/2 z-[1000] w-80 pointer-events-none",style:{top:n}},e.createElement("div",{className:"mx-auto flex w-full max-w-xl flex-col items-center gap-2 px-4"},t.map(function(t){var n,r,a=function(e){switch(e){case"success":return{container:"border-green-200 bg-green-50/90 text-green-800 border-l-4 border-l-green-500",icon:"text-green-500",text:"text-green-800"};case"error":return{container:"border-red-200 bg-red-50/90 text-red-800 border-l-4 border-l-red-500",icon:"text-red-500",text:"text-red-800"};case"warning":return{container:"border-yellow-200 bg-yellow-50/90 text-yellow-800 border-l-4 border-l-yellow-500",icon:"text-yellow-500",text:"text-yellow-800"};default:return{container:"border-blue-200 bg-blue-50/90 text-blue-800 border-l-4 border-l-blue-500",icon:"text-blue-500",text:"text-blue-800"}}}(t.type);return e.createElement("div",{key:t.key,className:"pointer-events-auto flex w-full items-center gap-2 rounded-md border px-3 py-2 backdrop-blur ".concat(a.container," ").concat(null!==(n=t.className)&&void 0!==n?n:"")},e.createElement("span",{className:"text-[18px] leading-none ".concat(a.icon)},null!==(r=t.icon)&&void 0!==r?r:iu(t.type)),e.createElement("div",{className:"min-w-0 flex-1 text-[14px] leading-normal ".concat(a.text)},"string"==typeof t.content?e.createElement("span",{className:"break-words align-middle"},t.content):t.content))})))}function mu(t,n,r,a){if(e.isValidElement(n)||"string"==typeof n||"number"==typeof n)return{type:t,content:n,duration:r,onClose:a};var o=n;return Object.assign({},o,{type:t})}var pu,hu,vu=(hu={open:function(e){var t;return su(Object.assign({},e,{type:null!==(t=e.type)&&void 0!==t?t:"info"}))},info:function(e,t,n){return su(mu("info",e,t,n))},success:function(e,t,n){return su(mu("success",e,t,n))},error:function(e,t,n){return su(mu("error",e,t,n))},warning:function(e,t,n){return su(mu("warning",e,t,n))},loading:function(e,t,n){return su(mu("loading",e,null!=t?t:0,n))},destroy:function(e){return lu(e)},config:function(e){return t=e,ru.config=Object.assign({},ru.config,t),void ou();var t},useMessage:function(){var t=e.useMemo(function(){return"undefined"!=typeof window&&du(),e.createElement(e.Fragment,null)},[]);return[pu.current,t]}},(pu={}).current=hu,hu);function gu(e,t){return function(){return e.apply(t,arguments)}}var bu,yu=Object.prototype.toString,wu=Object.getPrototypeOf,xu=Symbol.iterator,Eu=Symbol.toStringTag,Nu=(bu=Object.create(null),function(e){var t=yu.call(e);return bu[t]||(bu[t]=t.slice(8,-1).toLowerCase())}),ku=function(e){return e=e.toLowerCase(),function(t){return Nu(t)===e}},Cu=function(e){return function(t){return D(t)===e}},Su=Array.isArray,Ou=Cu("undefined");function ju(e){return null!==e&&!Ou(e)&&null!==e.constructor&&!Ou(e.constructor)&&Tu(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var _u=ku("ArrayBuffer");var Ru=Cu("string"),Tu=Cu("function"),Au=Cu("number"),Mu=function(e){return null!==e&&"object"===D(e)},Pu=function(e){if("object"!==Nu(e))return!1;var t=wu(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Eu in e||xu in e)},Du=ku("Date"),Lu=ku("File"),Fu=ku("Blob"),Iu=ku("FileList"),Uu=ku("URLSearchParams"),zu=A(["ReadableStream","Request","Response","Headers"].map(ku),4),Bu=zu[0],qu=zu[1],Hu=zu[2],Wu=zu[3];function Vu(e,t){var n,r,a=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,o=void 0!==a&&a;if(null!=e)if("object"!==D(e)&&(e=[e]),Su(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{if(ju(e))return;var i,s=o?Object.getOwnPropertyNames(e):Object.keys(e),l=s.length;for(n=0;n<l;n++)i=s[n],t.call(null,e[i],i,e)}}function Ku(e,t){if(ju(e))return null;t=t.toLowerCase();for(var n,r=Object.keys(e),a=r.length;a-- >0;)if(t===(n=r[a]).toLowerCase())return n;return null}var $u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Yu=function(e){return!Ou(e)&&e!==$u};var Gu,Ju=(Gu="undefined"!=typeof Uint8Array&&wu(Uint8Array),function(e){return Gu&&e instanceof Gu}),Xu=ku("HTMLFormElement"),Zu=function(){var e=Object.prototype.hasOwnProperty;return function(t,n){return e.call(t,n)}}(),Qu=ku("RegExp"),ed=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};Vu(n,function(n,a){var o;!1!==(o=t(n,a,e))&&(r[a]=o||n)}),Object.defineProperties(e,r)};var td,nd,rd,ad,od=ku("AsyncFunction"),id=(td="function"==typeof setImmediate,nd=Tu($u.postMessage),td?setImmediate:nd?(rd="axios@".concat(Math.random()),ad=[],$u.addEventListener("message",function(e){var t=e.source,n=e.data;t===$u&&n===rd&&ad.length&&ad.shift()()},!1),function(e){ad.push(e),$u.postMessage(rd,"*")}):function(e){return setTimeout(e)}),sd="undefined"!=typeof queueMicrotask?queueMicrotask.bind($u):"undefined"!=typeof process&&process.nextTick||id,ld={isArray:Su,isArrayBuffer:_u,isBuffer:ju,isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||Tu(e.append)&&("formdata"===(t=Nu(e))||"object"===t&&Tu(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&_u(e.buffer)},isString:Ru,isNumber:Au,isBoolean:function(e){return!0===e||!1===e},isObject:Mu,isPlainObject:Pu,isEmptyObject:function(e){if(!Mu(e)||ju(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Bu,isRequest:qu,isResponse:Hu,isHeaders:Wu,isUndefined:Ou,isDate:Du,isFile:Lu,isBlob:Fu,isRegExp:Qu,isFunction:Tu,isStream:function(e){return Mu(e)&&Tu(e.pipe)},isURLSearchParams:Uu,isTypedArray:Ju,isFileList:Iu,forEach:Vu,merge:function e(){for(var t=Yu(this)&&this||{},n=t.caseless,r=t.skipUndefined,a={},o=function(t,o){var i=n&&Ku(a,o)||o;Pu(a[i])&&Pu(t)?a[i]=e(a[i],t):Pu(t)?a[i]=e({},t):Su(t)?a[i]=t.slice():r&&Ou(t)||(a[i]=t)},i=0,s=arguments.length;i<s;i++)arguments[i]&&Vu(arguments[i],o);return a},extend:function(e,t,n){return Vu(t,function(t,r){n&&Tu(t)?e[r]=gu(t,n):e[r]=t},{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var a,o,i,s={};if(t=t||{},null==e)return t;do{for(o=(a=Object.getOwnPropertyNames(e)).length;o-- >0;)i=a[o],r&&!r(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==n&&wu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Nu,kindOfTest:ku,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(Su(e))return e;var t=e.length;if(!Au(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[xu]).call(e);(n=r.next())&&!n.done;){var a=n.value;t.call(e,a[0],a[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Xu,hasOwnProperty:Zu,hasOwnProp:Zu,reduceDescriptors:ed,freezeMethods:function(e){ed(e,function(t,n){if(Tu(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];Tu(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:function(e,t){var n={},r=function(e){e.forEach(function(e){n[e]=!0})};return Su(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n})},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:Ku,global:$u,isContextDefined:Yu,isSpecCompliantForm:function(e){return!!(e&&Tu(e.append)&&"FormData"===e[Eu]&&e[xu])},toJSONObject:function(e){var t=new Array(10),n=function(e,r){if(Mu(e)){if(t.indexOf(e)>=0)return;if(ju(e))return e;if(!("toJSON"in e)){t[r]=e;var a=Su(e)?[]:{};return Vu(e,function(e,t){var o=n(e,r+1);!Ou(o)&&(a[t]=o)}),t[r]=void 0,a}}return e};return n(e,0)},isAsyncFn:od,isThenable:function(e){return e&&(Mu(e)||Tu(e))&&Tu(e.then)&&Tu(e.catch)},setImmediate:id,asap:sd,isIterable:function(e){return null!=e&&Tu(e[xu])}};function cd(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}ld.inherits(cd,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ld.toJSONObject(this.config),code:this.code,status:this.status}}});var ud=cd.prototype,dd={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){dd[e]={value:e}}),Object.defineProperties(cd,dd),Object.defineProperty(ud,"isAxiosError",{value:!0}),cd.from=function(e,t,n,r,a,o){var i=Object.create(ud);ld.toFlatObject(e,i,function(e){return e!==Error.prototype},function(e){return"isAxiosError"!==e});var s=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return cd.call(i,s,l,n,r,a),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};function fd(e){return ld.isPlainObject(e)||ld.isArray(e)}function md(e){return ld.endsWith(e,"[]")?e.slice(0,-2):e}function pd(e,t,n){return e?e.concat(t).map(function(e,t){return e=md(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}var hd=ld.toFlatObject(ld,{},null,function(e){return/^is[A-Z]/.test(e)});function vd(e,t,n){if(!ld.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=ld.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!ld.isUndefined(t[e])})).metaTokens,a=n.visitor||c,o=n.dots,i=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ld.isSpecCompliantForm(t);if(!ld.isFunction(a))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(ld.isDate(e))return e.toISOString();if(ld.isBoolean(e))return e.toString();if(!s&&ld.isBlob(e))throw new cd("Blob is not supported. Use a Buffer instead.");return ld.isArrayBuffer(e)||ld.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,a){var s=e;if(e&&!a&&"object"===D(e))if(ld.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(ld.isArray(e)&&function(e){return ld.isArray(e)&&!e.some(fd)}(e)||(ld.isFileList(e)||ld.endsWith(n,"[]"))&&(s=ld.toArray(e)))return n=md(n),s.forEach(function(e,r){!ld.isUndefined(e)&&null!==e&&t.append(!0===i?pd([n],r,o):null===i?n:n+"[]",l(e))}),!1;return!!fd(e)||(t.append(pd(a,n,o),l(e)),!1)}var u=[],d=Object.assign(hd,{defaultVisitor:c,convertValue:l,isVisitable:fd});if(!ld.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!ld.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),ld.forEach(n,function(n,o){!0===(!(ld.isUndefined(n)||null===n)&&a.call(t,n,ld.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])}),u.pop()}}(e),t}function gd(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function bd(e,t){this._pairs=[],e&&vd(e,this,t)}var yd=bd.prototype;function wd(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function xd(e,t,n){if(!t)return e;var r=n&&n.encode||wd;ld.isFunction(n)&&(n={serialize:n});var a,o=n&&n.serialize;if(a=o?o(t,n):ld.isURLSearchParams(t)?t.toString():new bd(t,n).toString(r)){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}yd.append=function(e,t){this._pairs.push([e,t])},yd.toString=function(e){var t=e?function(t){return e.call(this,t,gd)}:gd;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Ed=function(){return k(function e(){E(this,e),this.handlers=[]},[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){ld.forEach(this.handlers,function(t){null!==t&&e(t)})}}])}(),Nd=Ed,kd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Cd={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:bd,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Sd="undefined"!=typeof window&&"undefined"!=typeof document,Od="object"===("undefined"==typeof navigator?"undefined":D(navigator))&&navigator||void 0,jd=Sd&&(!Od||["ReactNative","NativeScript","NS"].indexOf(Od.product)<0),_d="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Rd=Sd&&window.location.href||"http://localhost",Td=j(j({},Object.freeze({__proto__:null,hasBrowserEnv:Sd,hasStandardBrowserEnv:jd,hasStandardBrowserWebWorkerEnv:_d,navigator:Od,origin:Rd})),Cd);function Ad(e){function t(e,n,r,a){var o=e[a++];if("__proto__"===o)return!0;var i=Number.isFinite(+o),s=a>=e.length;return o=!o&&ld.isArray(r)?r.length:o,s?(ld.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!i):(r[o]&&ld.isObject(r[o])||(r[o]=[]),t(e,n,r[o],a)&&ld.isArray(r[o])&&(r[o]=function(e){var t,n,r={},a=Object.keys(e),o=a.length;for(t=0;t<o;t++)r[n=a[t]]=e[n];return r}(r[o])),!i)}if(ld.isFormData(e)&&ld.isFunction(e.entries)){var n={};return ld.forEachEntry(e,function(e,r){t(function(e){return ld.matchAll(/\w+|\[(\w*)]/g,e).map(function(e){return"[]"===e[0]?"":e[1]||e[0]})}(e),r,n,0)}),n}return null}var Md={transitional:kd,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",a=r.indexOf("application/json")>-1,o=ld.isObject(e);if(o&&ld.isHTMLForm(e)&&(e=new FormData(e)),ld.isFormData(e))return a?JSON.stringify(Ad(e)):e;if(ld.isArrayBuffer(e)||ld.isBuffer(e)||ld.isStream(e)||ld.isFile(e)||ld.isBlob(e)||ld.isReadableStream(e))return e;if(ld.isArrayBufferView(e))return e.buffer;if(ld.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return vd(e,new Td.classes.URLSearchParams,j({visitor:function(e,t,n,r){return Td.isNode&&ld.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=ld.isFileList(e))||r.indexOf("multipart/form-data")>-1){var i=this.env&&this.env.FormData;return vd(n?{"files[]":e}:e,i&&new i,this.formSerializer)}}return o||a?(t.setContentType("application/json",!1),function(e,t,n){if(ld.isString(e))try{return(t||JSON.parse)(e),ld.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Md.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(ld.isResponse(e)||ld.isReadableStream(e))return e;if(e&&ld.isString(e)&&(n&&!this.responseType||r)){var a=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(a){if("SyntaxError"===e.name)throw cd.from(e,cd.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Td.classes.FormData,Blob:Td.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ld.forEach(["delete","get","head","post","put","patch"],function(e){Md.headers[e]={}});var Pd=Md,Dd=ld.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ld=Symbol("internals");function Fd(e){return e&&String(e).trim().toLowerCase()}function Id(e){return!1===e||null==e?e:ld.isArray(e)?e.map(Id):String(e)}function Ud(e,t,n,r,a){return ld.isFunction(r)?r.call(this,t,n):(a&&(t=n),ld.isString(t)?ld.isString(r)?-1!==t.indexOf(r):ld.isRegExp(r)?r.test(t):void 0:void 0)}var zd=function(){return k(function e(t){E(this,e),t&&this.set(t)},[{key:"set",value:function(e,t,n){var r=this;function a(e,t,n){var a=Fd(t);if(!a)throw new Error("header name must be a non-empty string");var o=ld.findKey(r,a);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Id(e))}var o=function(e,t){return ld.forEach(e,function(e,n){return a(e,n,t)})};if(ld.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(ld.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o(function(e){var t,n,r,a={};return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||a[t]&&Dd[t]||("set-cookie"===t?a[t]?a[t].push(n):a[t]=[n]:a[t]=a[t]?a[t]+", "+n:n)}),a}(e),t);else if(ld.isObject(e)&&ld.isIterable(e)){var i,s,l,c={},u=C(e);try{for(u.s();!(l=u.n()).done;){var d=l.value;if(!ld.isArray(d))throw TypeError("Object iterator must return a key-value pair");c[s=d[0]]=(i=c[s])?ld.isArray(i)?[].concat(M(i),[d[1]]):[i,d[1]]:d[1]}}catch(e){u.e(e)}finally{u.f()}o(c,t)}else null!=e&&a(t,e,n);return this}},{key:"get",value:function(e,t){if(e=Fd(e)){var n=ld.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(ld.isFunction(t))return t.call(this,r,n);if(ld.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Fd(e)){var n=ld.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ud(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function a(e){if(e=Fd(e)){var a=ld.findKey(n,e);!a||t&&!Ud(0,n[a],a,t)||(delete n[a],r=!0)}}return ld.isArray(e)?e.forEach(a):a(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var a=t[n];e&&!Ud(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return ld.forEach(this,function(r,a){var o=ld.findKey(n,a);if(o)return t[o]=Id(r),void delete t[a];var i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n})}(a):String(a).trim();i!==a&&delete t[a],t[i]=Id(r),n[i]=!0}),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return ld.forEach(this,function(n,r){null!=n&&!1!==n&&(t[r]=e&&ld.isArray(n)?n.join(", "):n)}),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map(function(e){var t=A(e,2);return t[0]+": "+t[1]}).join("\n")}},{key:"getSetCookie",value:function(){return this.get("set-cookie")||[]}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return r.forEach(function(e){return t.set(e)}),t}},{key:"accessor",value:function(e){var t=(this[Ld]=this[Ld]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=Fd(e);t[r]||(!function(e,t){var n=ld.toCamelCase(" "+t);["get","set","has"].forEach(function(r){Object.defineProperty(e,r+n,{value:function(e,n,a){return this[r].call(this,t,e,n,a)},configurable:!0})})}(n,e),t[r]=!0)}return ld.isArray(e)?e.forEach(r):r(e),this}}])}();zd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ld.reduceDescriptors(zd.prototype,function(e,t){var n=e.value,r=t[0].toUpperCase()+t.slice(1);return{get:function(){return n},set:function(e){this[r]=e}}}),ld.freezeMethods(zd);var Bd=zd;function qd(e,t){var n=this||Pd,r=t||n,a=Bd.from(r.headers),o=r.data;return ld.forEach(e,function(e){o=e.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function Hd(e){return!(!e||!e.__CANCEL__)}function Wd(e,t,n){cd.call(this,null==e?"canceled":e,cd.ERR_CANCELED,t,n),this.name="CanceledError"}function Vd(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new cd("Request failed with status code "+n.status,[cd.ERR_BAD_REQUEST,cd.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}ld.inherits(Wd,cd,{__CANCEL__:!0});var Kd=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0,a=function(e,t){e=e||10;var n,r=new Array(e),a=new Array(e),o=0,i=0;return t=void 0!==t?t:1e3,function(s){var l=Date.now(),c=a[i];n||(n=l),r[o]=s,a[o]=l;for(var u=i,d=0;u!==o;)d+=r[u++],u%=e;if((o=(o+1)%e)===i&&(i=(i+1)%e),!(l-n<t)){var f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}}(50,250);return function(e,t){var n,r,a=0,o=1e3/t,i=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();a=o,n=null,r&&(clearTimeout(r),r=null),e.apply(void 0,M(t))};return[function(){for(var e=Date.now(),t=e-a,s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];t>=o?i(l,e):(n=l,r||(r=setTimeout(function(){r=null,i(n)},o-t)))},function(){return n&&i(n)}]}(function(n){var o=n.loaded,i=n.lengthComputable?n.total:void 0,s=o-r,l=a(s);r=o;var c=S({loaded:o,total:i,progress:i?o/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&o<=i?(i-o)/l:void 0,event:n,lengthComputable:null!=i},t?"download":"upload",!0);e(c)},n)},$d=function(e,t){var n=null!=e;return[function(r){return t[0]({lengthComputable:n,total:e,loaded:r})},t[1]]},Yd=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ld.asap(function(){return e.apply(void 0,n)})}},Gd=Td.hasStandardBrowserEnv?function(e,t){return function(n){return n=new URL(n,Td.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)}}(new URL(Td.origin),Td.navigator&&/(msie|trident)/i.test(Td.navigator.userAgent)):function(){return!0},Jd=Td.hasStandardBrowserEnv?{write:function(e,t,n,r,a,o,i){if("undefined"!=typeof document){var s=["".concat(e,"=").concat(encodeURIComponent(t))];ld.isNumber(n)&&s.push("expires=".concat(new Date(n).toUTCString())),ld.isString(r)&&s.push("path=".concat(r)),ld.isString(a)&&s.push("domain=".concat(a)),!0===o&&s.push("secure"),ld.isString(i)&&s.push("SameSite=".concat(i)),document.cookie=s.join("; ")}},read:function(e){if("undefined"==typeof document)return null;var t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove:function(e){this.write(e,"",Date.now()-864e5,"/")}}:{write:function(){},read:function(){return null},remove:function(){}};function Xd(e,t,n){var r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Zd=function(e){return e instanceof Bd?j({},e):e};function Qd(e,t){t=t||{};var n={};function r(e,t,n,r){return ld.isPlainObject(e)&&ld.isPlainObject(t)?ld.merge.call({caseless:r},e,t):ld.isPlainObject(t)?ld.merge({},t):ld.isArray(t)?t.slice():t}function a(e,t,n,a){return ld.isUndefined(t)?ld.isUndefined(e)?void 0:r(void 0,e,0,a):r(e,t,0,a)}function o(e,t){if(!ld.isUndefined(t))return r(void 0,t)}function i(e,t){return ld.isUndefined(t)?ld.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,a,o){return o in t?r(n,a):o in e?r(void 0,n):void 0}var l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:function(e,t,n){return a(Zd(e),Zd(t),0,!0)}};return ld.forEach(Object.keys(j(j({},e),t)),function(r){var o=l[r]||a,i=o(e[r],t[r],r);ld.isUndefined(i)&&o!==s||(n[r]=i)}),n}var ef,tf=function(e){var t=Qd({},e),n=t.data,r=t.withXSRFToken,a=t.xsrfHeaderName,o=t.xsrfCookieName,i=t.headers,s=t.auth;if(t.headers=i=Bd.from(i),t.url=xd(Xd(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),ld.isFormData(n))if(Td.hasStandardBrowserEnv||Td.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(ld.isFunction(n.getHeaders)){var l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(function(e){var t=A(e,2),n=t[0],r=t[1];c.includes(n.toLowerCase())&&i.set(n,r)})}if(Td.hasStandardBrowserEnv&&(r&&ld.isFunction(r)&&(r=r(t)),r||!1!==r&&Gd(t.url))){var u=a&&o&&Jd.read(o);u&&i.set(a,u)}return t},nf="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){var r,a,o,i,s,l=tf(e),c=l.data,u=Bd.from(l.headers).normalize(),d=l.responseType,f=l.onUploadProgress,m=l.onDownloadProgress;function p(){i&&i(),s&&s(),l.cancelToken&&l.cancelToken.unsubscribe(r),l.signal&&l.signal.removeEventListener("abort",r)}var h=new XMLHttpRequest;function v(){if(h){var r=Bd.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());Vd(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}}if(h.open(l.method.toUpperCase(),l.url,!0),h.timeout=l.timeout,"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(v)},h.onabort=function(){h&&(n(new cd("Request aborted",cd.ECONNABORTED,e,h)),h=null)},h.onerror=function(t){var r=new cd(t&&t.message?t.message:"Network Error",cd.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){var t=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",r=l.transitional||kd;l.timeoutErrorMessage&&(t=l.timeoutErrorMessage),n(new cd(t,r.clarifyTimeoutError?cd.ETIMEDOUT:cd.ECONNABORTED,e,h)),h=null},void 0===c&&u.setContentType(null),"setRequestHeader"in h&&ld.forEach(u.toJSON(),function(e,t){h.setRequestHeader(t,e)}),ld.isUndefined(l.withCredentials)||(h.withCredentials=!!l.withCredentials),d&&"json"!==d&&(h.responseType=l.responseType),m){var g=A(Kd(m,!0),2);o=g[0],s=g[1],h.addEventListener("progress",o)}if(f&&h.upload){var b=A(Kd(f),2);a=b[0],i=b[1],h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",i)}(l.cancelToken||l.signal)&&(r=function(t){h&&(n(!t||t.type?new Wd(null,e,h):t),h.abort(),h=null)},l.cancelToken&&l.cancelToken.subscribe(r),l.signal&&(l.signal.aborted?r():l.signal.addEventListener("abort",r)));var y,w,x=(y=l.url,(w=/^([-+\w]{1,25})(:?\/\/|:)/.exec(y))&&w[1]||"");x&&-1===Td.protocols.indexOf(x)?n(new cd("Unsupported protocol "+x+":",cd.ERR_BAD_REQUEST,e)):h.send(c||null)})},rf=function(e,t){var n=(e=e?e.filter(Boolean):[]).length;if(t||n){var r,a=new AbortController,o=function(e){if(!r){r=!0,s();var t=e instanceof Error?e:this.reason;a.abort(t instanceof cd?t:new Wd(t instanceof Error?t.message:t))}},i=t&&setTimeout(function(){i=null,o(new cd("timeout ".concat(t," of ms exceeded"),cd.ETIMEDOUT))},t),s=function(){e&&(i&&clearTimeout(i),i=null,e.forEach(function(e){e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(function(e){return e.addEventListener("abort",o)});var l=a.signal;return l.unsubscribe=function(){return ld.asap(s)},l}},af=_().m(function e(t,n){var r,a,o;return _().w(function(e){for(;;)switch(e.n){case 0:if(r=t.byteLength,n&&!(r<n)){e.n=2;break}return e.n=1,t;case 1:return e.a(2);case 2:a=0;case 3:if(!(a<r)){e.n=5;break}return o=a+n,e.n=4,t.slice(a,o);case 4:a=o,e.n=3;break;case 5:return e.a(2)}},e)}),of=function(){var e=F(_().m(function e(t,n){var r,a,o,i,s,l,c;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:r=!1,a=!1,e.p=1,i=g(sf(t));case 2:return e.n=3,x(i.next());case 3:if(!(r=!(s=e.v).done)){e.n=5;break}return l=s.value,e.d(T(v(g(af(l,n)))),4);case 4:r=!1,e.n=2;break;case 5:e.n=7;break;case 6:e.p=6,c=e.v,a=!0,o=c;case 7:if(e.p=7,e.p=8,!r||null==i.return){e.n=9;break}return e.n=9,x(i.return());case 9:if(e.p=9,!a){e.n=10;break}throw o;case 10:return e.f(9);case 11:return e.f(7);case 12:return e.a(2)}},e,null,[[8,,9,11],[1,6,7,12]])}));return function(t,n){return e.apply(this,arguments)}}(),sf=function(){var e=F(_().m(function e(t){var n,r,a,o;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!t[Symbol.asyncIterator]){e.n=2;break}return e.d(T(v(g(t))),1);case 1:return e.a(2);case 2:n=t.getReader(),e.p=3;case 4:return e.n=5,x(n.read());case 5:if(r=e.v,a=r.done,o=r.value,!a){e.n=6;break}return e.a(3,8);case 6:return e.n=7,o;case 7:e.n=4;break;case 8:return e.p=8,e.n=9,x(n.cancel());case 9:return e.f(8);case 10:return e.a(2)}},e,null,[[3,,8,10]])}));return function(t){return e.apply(this,arguments)}}(),lf=function(e,t,n,r){var a,o=of(e,t),i=0,s=function(e){a||(a=!0,r&&r(e))};return new ReadableStream({pull:function(e){return w(_().m(function t(){var r,a,l,c,u,d;return _().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,o.next();case 1:if(r=t.v,a=r.done,l=r.value,!a){t.n=2;break}return s(),e.close(),t.a(2);case 2:c=l.byteLength,n&&(u=i+=c,n(u)),e.enqueue(new Uint8Array(l)),t.n=4;break;case 3:throw t.p=3,d=t.v,s(d),d;case 4:return t.a(2)}},t,null,[[0,3]])}))()},cancel:function(e){return s(e),o.return()}},{highWaterMark:2})},cf=ld.isFunction,uf={Request:(ef=ld.global).Request,Response:ef.Response},df=ld.global,ff=df.ReadableStream,mf=df.TextEncoder,pf=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return!!e.apply(void 0,n)}catch(e){return!1}},hf=function(e){var t=e=ld.merge.call({skipUndefined:!0},uf,e),n=t.fetch,r=t.Request,a=t.Response,o=n?cf(n):"function"==typeof fetch,i=cf(r),s=cf(a);if(!o)return!1;var l,c=o&&cf(ff),u=o&&("function"==typeof mf?(l=new mf,function(e){return l.encode(e)}):function(){var e=w(_().m(function e(t){var n,a;return _().w(function(e){for(;;)switch(e.n){case 0:return n=Uint8Array,e.n=1,new r(t).arrayBuffer();case 1:return a=e.v,e.a(2,new n(a))}},e)}));return function(t){return e.apply(this,arguments)}}()),d=i&&c&&pf(function(){var e=!1,t=new r(Td.origin,{body:new ff,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),f=s&&c&&pf(function(){return ld.isReadableStream(new a("").body)}),m={stream:f&&function(e){return e.body}};o&&["text","arrayBuffer","blob","formData","stream"].forEach(function(e){!m[e]&&(m[e]=function(t,n){var r=t&&t[e];if(r)return r.call(t);throw new cd("Response type '".concat(e,"' is not supported"),cd.ERR_NOT_SUPPORT,n)})});var p=function(){var e=w(_().m(function e(t){var n;return _().w(function(e){for(;;)switch(e.n){case 0:if(null!=t){e.n=1;break}return e.a(2,0);case 1:if(!ld.isBlob(t)){e.n=2;break}return e.a(2,t.size);case 2:if(!ld.isSpecCompliantForm(t)){e.n=4;break}return n=new r(Td.origin,{method:"POST",body:t}),e.n=3,n.arrayBuffer();case 3:case 6:return e.a(2,e.v.byteLength);case 4:if(!ld.isArrayBufferView(t)&&!ld.isArrayBuffer(t)){e.n=5;break}return e.a(2,t.byteLength);case 5:if(ld.isURLSearchParams(t)&&(t+=""),!ld.isString(t)){e.n=7;break}return e.n=6,u(t);case 7:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),h=function(){var e=w(_().m(function e(t,n){var r;return _().w(function(e){for(;;)if(0===e.n)return r=ld.toFiniteNumber(t.getContentLength()),e.a(2,null==r?p(n):r)},e)}));return function(t,n){return e.apply(this,arguments)}}();return function(){var e=w(_().m(function e(t){var o,s,l,c,u,p,v,g,b,y,w,x,E,N,k,C,S,O,R,T,M,P,D,L,F,I,U,z,B,q,H,W,V,K,$,Y,G,J,X;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if(o=tf(t),s=o.url,l=o.method,c=o.data,u=o.signal,p=o.cancelToken,v=o.timeout,g=o.onDownloadProgress,b=o.onUploadProgress,y=o.responseType,w=o.headers,x=o.withCredentials,E=void 0===x?"same-origin":x,N=o.fetchOptions,k=n||fetch,y=y?(y+"").toLowerCase():"text",C=rf([u,p&&p.toAbortSignal()],v),S=null,O=C&&C.unsubscribe&&function(){C.unsubscribe()},e.p=1,!(G=b&&d&&"get"!==l&&"head"!==l)){e.n=3;break}return e.n=2,h(w,c);case 2:J=R=e.v,G=0!==J;case 3:if(!G){e.n=4;break}T=new r(s,{method:"POST",body:c,duplex:"half"}),ld.isFormData(c)&&(M=T.headers.get("content-type"))&&w.setContentType(M),T.body&&(P=$d(R,Kd(Yd(b))),D=A(P,2),L=D[0],F=D[1],c=lf(T.body,65536,L,F));case 4:return ld.isString(E)||(E=E?"include":"omit"),I=i&&"credentials"in r.prototype,U=j(j({},N),{},{signal:C,method:l.toUpperCase(),headers:w.normalize().toJSON(),body:c,duplex:"half",credentials:I?E:void 0}),S=i&&new r(s,U),e.n=5,i?k(S,N):k(s,U);case 5:return z=e.v,B=f&&("stream"===y||"response"===y),f&&(g||B&&O)&&(q={},["status","statusText","headers"].forEach(function(e){q[e]=z[e]}),H=ld.toFiniteNumber(z.headers.get("content-length")),W=g&&$d(H,Kd(Yd(g),!0))||[],V=A(W,2),K=V[0],$=V[1],z=new a(lf(z.body,65536,K,function(){$&&$(),O&&O()}),q)),y=y||"text",e.n=6,m[ld.findKey(m,y)||"text"](z,t);case 6:return Y=e.v,!B&&O&&O(),e.n=7,new Promise(function(e,n){Vd(e,n,{data:Y,headers:Bd.from(z.headers),status:z.status,statusText:z.statusText,config:t,request:S})});case 7:return e.a(2,e.v);case 8:if(e.p=8,X=e.v,O&&O(),!X||"TypeError"!==X.name||!/Load failed|fetch/i.test(X.message)){e.n=9;break}throw Object.assign(new cd("Network Error",cd.ERR_NETWORK,t,S),{cause:X.cause||X});case 9:throw cd.from(X,X&&X.code,t,S);case 10:return e.a(2)}},e,null,[[1,8]])}));return function(t){return e.apply(this,arguments)}}()},vf=new Map,gf=function(e){for(var t,n,r=e&&e.env||{},a=r.fetch,o=[r.Request,r.Response,a],i=o.length,s=vf;i--;)t=o[i],void 0===(n=s.get(t))&&s.set(t,n=i?new Map:hf(r)),s=n;return n};gf();var bf={http:null,xhr:nf,fetch:{get:gf}};ld.forEach(bf,function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});var yf=function(e){return"- ".concat(e)},wf=function(e){return ld.isFunction(e)||null===e||!1===e};var xf={getAdapter:function(e,t){for(var n,r,a=(e=ld.isArray(e)?e:[e]).length,o={},i=0;i<a;i++){var s=void 0;if(r=n=e[i],!wf(n)&&void 0===(r=bf[(s=String(n)).toLowerCase()]))throw new cd("Unknown adapter '".concat(s,"'"));if(r&&(ld.isFunction(r)||(r=r.get(t))))break;o[s||"#"+i]=r}if(!r){var l=Object.entries(o).map(function(e){var t=A(e,2),n=t[0],r=t[1];return"adapter ".concat(n," ")+(!1===r?"is not supported by the environment":"is not available in the build")});throw new cd("There is no suitable adapter to dispatch the request "+(a?l.length>1?"since :\n"+l.map(yf).join("\n"):" "+yf(l[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r},adapters:bf};function Ef(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wd(null,e)}function Nf(e){return Ef(e),e.headers=Bd.from(e.headers),e.data=qd.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xf.getAdapter(e.adapter||Pd.adapter,e)(e).then(function(t){return Ef(e),t.data=qd.call(e,e.transformResponse,t),t.headers=Bd.from(t.headers),t},function(t){return Hd(t)||(Ef(e),t&&t.response&&(t.response.data=qd.call(e,e.transformResponse,t.response),t.response.headers=Bd.from(t.response.headers))),Promise.reject(t)})}var kf="1.13.2",Cf={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Cf[e]=function(n){return D(n)===e||"a"+(t<1?"n ":" ")+e}});var Sf={};Cf.transitional=function(e,t,n){return function(r,a,o){if(!1===e)throw new cd(function(e,t){return"[Axios v"+kf+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}(a," has been removed"+(t?" in "+t:"")),cd.ERR_DEPRECATED);return t&&!Sf[a]&&(Sf[a]=!0),!e||e(r,a,o)}},Cf.spelling=function(e){return function(e,t){return!0}};var Of={assertOptions:function(e,t,n){if("object"!==D(e))throw new cd("options must be an object",cd.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),a=r.length;a-- >0;){var o=r[a],i=t[o];if(i){var s=e[o],l=void 0===s||i(s,o,e);if(!0!==l)throw new cd("option "+o+" must be "+l,cd.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new cd("Unknown option "+o,cd.ERR_BAD_OPTION)}},validators:Cf},jf=Of.validators,_f=function(){return k(function e(t){E(this,e),this.defaults=t||{},this.interceptors={request:new Nd,response:new Nd}},[{key:"request",value:(e=w(_().m(function e(t,n){var r,a,o;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request(t,n);case 1:return e.a(2,e.v);case 2:if(e.p=2,(o=e.v)instanceof Error){r={},Error.captureStackTrace?Error.captureStackTrace(r):r=new Error,a=r.stack?r.stack.replace(/^.+\n/,""):"";try{o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+="\n"+a):o.stack=a}catch(e){}}throw o;case 3:return e.a(2)}},e,this,[[0,2]])})),function(t,n){return e.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n=t=Qd(this.defaults,t),r=n.transitional,a=n.paramsSerializer,o=n.headers;void 0!==r&&Of.assertOptions(r,{silentJSONParsing:jf.transitional(jf.boolean),forcedJSONParsing:jf.transitional(jf.boolean),clarifyTimeoutError:jf.transitional(jf.boolean)},!1),null!=a&&(ld.isFunction(a)?t.paramsSerializer={serialize:a}:Of.assertOptions(a,{encode:jf.function,serialize:jf.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Of.assertOptions(t,{baseUrl:jf.spelling("baseURL"),withXsrfToken:jf.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();var i=o&&ld.merge(o.common,o[t.method]);o&&ld.forEach(["delete","get","head","post","put","patch","common"],function(e){delete o[e]}),t.headers=Bd.concat(i,o);var s=[],l=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});var c,u=[];this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});var d,f=0;if(!l){var m=[Nf.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,u),d=m.length,c=Promise.resolve(t);f<d;)c=c.then(m[f++],m[f++]);return c}d=s.length;for(var p=t;f<d;){var h=s[f++],v=s[f++];try{p=h(p)}catch(e){v.call(this,e);break}}try{c=Nf.call(this,p)}catch(e){return Promise.reject(e)}for(f=0,d=u.length;f<d;)c=c.then(u[f++],u[f++]);return c}},{key:"getUri",value:function(e){return xd(Xd((e=Qd(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}]);var e}();ld.forEach(["delete","get","head","options"],function(e){_f.prototype[e]=function(t,n){return this.request(Qd(n||{},{method:e,url:t,data:(n||{}).data}))}}),ld.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,a){return this.request(Qd(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}_f.prototype[e]=t(),_f.prototype[e+"Form"]=t(!0)});var Rf=_f,Tf=function(){function e(t){if(E(this,e),"function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(e){n=e});var r=this;this.promise.then(function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}}),this.promise.then=function(e){var t,n=new Promise(function(e){r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t(function(e,t,a){r.reason||(r.reason=new Wd(e,t,a),n(r.reason))})}return k(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,n=function(e){t.abort(e)};return this.subscribe(n),t.signal.unsubscribe=function(){return e.unsubscribe(n)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e(function(e){t=e}),cancel:t}}}])}(),Af=Tf;var Mf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Mf).forEach(function(e){var t=A(e,2),n=t[0],r=t[1];Mf[r]=n});var Pf=Mf;var Df=function e(t){var n=new Rf(t),r=gu(Rf.prototype.request,n);return ld.extend(r,Rf.prototype,n,{allOwnKeys:!0}),ld.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Qd(t,n))},r}(Pd);Df.Axios=Rf,Df.CanceledError=Wd,Df.CancelToken=Af,Df.isCancel=Hd,Df.VERSION=kf,Df.toFormData=vd,Df.AxiosError=cd,Df.Cancel=Df.CanceledError,Df.all=function(e){return Promise.all(e)},Df.spread=function(e){return function(t){return e.apply(null,t)}},Df.isAxiosError=function(e){return ld.isObject(e)&&!0===e.isAxiosError},Df.mergeConfig=Qd,Df.AxiosHeaders=Bd,Df.formToJSON=function(e){return Ad(ld.isHTMLForm(e)?new FormData(e):e)},Df.getAdapter=xf.getAdapter,Df.HttpStatusCode=Pf,Df.default=Df;var Lf=Df;Lf.Axios,Lf.AxiosError,Lf.CanceledError,Lf.isCancel,Lf.CancelToken,Lf.VERSION,Lf.all,Lf.Cancel,Lf.isAxiosError,Lf.spread,Lf.toFormData,Lf.AxiosHeaders,Lf.HttpStatusCode,Lf.formToJSON,Lf.getAdapter,Lf.mergeConfig;var Ff=Lf.create({baseURL:"/api/cms",timeout:1e4,headers:{"Content-Type":"application/json"}}),If=new Map;Ff.interceptors.request.use(function(e){e.url&&e.url.startsWith("http")&&(e.baseURL="");var t=localStorage.getItem("cms_token");t&&(e.headers.Authorization="Bearer ".concat(t));var n=localStorage.getItem("cms_session_id");return n&&(e.headers["X-Session-Id"]=n),e},function(e){return Promise.reject(e)}),Ff.interceptors.response.use(function(e){return e},function(e){var t="请求错误",n=!1;if(e.response){var r=e.response.status,a=e.response.data;401===r?"登录已过期,请重新登录"===(null==a?void 0:a.message)?(t="登录已过期,请重新登录",n=!0):"认证信息无效"===(null==a?void 0:a.message)?(t="认证信息无效,请重新登录",n=!0):(t="认证失败,请登录",n=!0):t=(null==a?void 0:a.message)||"HTTP ".concat(r,": ").concat(e.response.statusText)}else t=e.request?"网络连接失败,请检查网络状态":e.message||"请求错误";return n?(localStorage.removeItem("cms_token"),localStorage.removeItem("cms_user"),"/login"!==window.location.pathname&&"/"!==window.location.pathname&&(vu.error(t),setTimeout(function(){window.location.reload()},1e3))):vu.error(t),Promise.reject(e)});var Uf,zf=function(e,t,n){var r=e;if(t){var a=new URLSearchParams(t).toString();r=r+(r.includes("?")?"&":"?")+a}var o="GET ".concat(r),i=If.get(o);if(i)return i;var s=Ff.get(r,n).then(function(e){return e.data}).finally(function(){If.delete(o)});return If.set(o,s),s},Bf=function(e,t,n){return Ff.post(e,t,n).then(function(e){return e.data})},qf=function(e,t,n){return Ff.put(e,t,n).then(function(e){return e.data})},Hf=function(e,t){return Ff.delete(e,t).then(function(e){return e.data})};function Wf(){return Uf}function Vf(){return Wf()}function Kf(e){return e?e.replace(/-/g,"_")+"_":""}function $f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wf(),n=(e||"").trim();if(!n)return n;var r=Kf(t);return r?n.startsWith(r)?n:"".concat(r).concat(n):n}function Yf(e){return!e||!e.readOnly&&!1!==e.editable}function Gf(e){return null!=e&&("string"==typeof e?""!==e.trim():!Array.isArray(e)||e.length>0)}function Jf(e,t){if(!e||0===e.length)return null;var n,r=C(e);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(null==a?void 0:a.required)if("id"!==a.name)if(Yf(a))if("relation"===a.type&&a.relation){if(!Gf(t[a.relation.foreignKey||"".concat(a.relation.target,"_id")]))return a}else if(!Gf(t[a.name]))return a}}catch(e){r.e(e)}finally{r.f()}return null}function Xf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wf(),n=(e||"").trim();if(!n)return n;var r=Kf(t);if(!r)return n;if(n.startsWith(r))return n;throw new Error('表名必须包含当前 session 前缀 "'.concat(r,'",请传完整表名'))}function Zf(e){Uf=e;try{localStorage.setItem("cms_session_id",e)}catch(e){}}var Qf=function(){return zf("/models")},em=function(){return zf("/auth/signup/status/".concat(Kf(Wf()),"cms_users"))},tm=function(e){return Bf("/auth/signup/".concat(Kf(Wf()),"cms_users"),e)},nm=function(e){return Bf("/auth/login/".concat(Kf(Wf()),"cms_users"),e)},rm=function(){return Bf("/auth/verify/".concat(Kf(Wf()),"cms_users"))},am=function(){return zf("/auth/user/".concat(Kf(Wf()),"cms_users"))},om=function(){localStorage.removeItem("cms_token"),localStorage.removeItem("cms_user")},im=function(){return localStorage.getItem("cms_token")},sm=function(){var e=localStorage.getItem("cms_user");return e?JSON.parse(e):null},lm=function(e,t){var n=Xf(e),r=t?Object.assign({},t):void 0;return(null==r?void 0:r.filters)&&Array.isArray(r.filters)&&(r.filters=JSON.stringify(r.filters)),zf("/data/".concat(n),r)},cm=function(e,t){var n=Xf(e);return zf("/relation/".concat(n,"/options"),t)},um=function(e,t){var n=Xf(e);return Bf("/data/".concat(n),t)},dm=function(e,t){var n=Xf(e);return qf("/data/".concat(n),t)},fm=function(e,t){var n=Xf(e);return Hf("/data/".concat(n,"?id=").concat(t))},mm={"zh-CN":{common:{confirm:"确认",cancel:"取消",save:"保存",delete:"删除",edit:"编辑",add:"添加",search:"搜索",filter:"筛选",reset:"重置",submit:"提交",back:"返回",next:"下一页",previous:"上一页",loading:"加载中...",success:"成功",error:"错误",warning:"警告",info:"信息",close:"关闭",refresh:"刷新",export:"导出",import:"导入",view:"查看",create:"创建",update:"更新",actions:"操作",operation:"操作",total:"共",page:"页",pageSize:"每页",goto:"跳转"},auth:{login:"登录",logout:"登出",username:"用户名",password:"密码",email:"邮箱",signup:"注册",welcome:"欢迎",loginSuccess:"登录成功",loginFailed:"登录失败",logoutSuccess:"已成功登出",logoutConfirm:"确定要登出系统吗?",pleaseLogin:"请登录",invalidCredentials:"用户名或密码错误",createAdminAccount:"创建管理员账号",adminCreatedSuccess:"管理员账号创建成功",noAdmin:"系统中还没有管理员账号",firstTimeSetup:"首次使用,请创建管理员账号"},data:{dataManagement:"内容管理",dataList:"内容列表",addData:"新建记录",editData:"编辑记录",deleteData:"删除记录",deleteConfirm:"确定要删除这条记录吗?",deleteSuccess:"删除成功",deleteFailed:"删除失败",createSuccess:"创建成功",createFailed:"创建失败",updateSuccess:"更新成功",updateFailed:"更新失败",loadFailed:"加载失败",noData:"暂无数据",selectModel:"选择内容类型",selectModelFirst:"请先选择内容类型",selectModelPrompt:"请选择数据模型",searchPlaceholder:"搜索...",searchData:"搜索数据...",filterTitle:"筛选条件",addFilter:"添加筛选",clearFilters:"清除筛选",totalRecords:"条记录",perPage:"条/页",newData:"新建记录",newRecord:"新建数据",createdAt:"创建时间",updatedAt:"更新时间",yes:"是",no:"否",operationFailed:"操作失败",deleteConfirmFull:"确定要删除这条数据吗?此操作不可撤销。",updating:"更新中...",creating:"创建中...",viewAndManage:"查看和管理",ofData:"的数据",totalCount:"共",records:"条数据",page:"第",pageOf:"页,共",pages:"页",previousPage:"上一页",nextPage:"下一页",tableName:"表名",editRecord:"编辑数据",createRecord:"新建数据",loadingOptions:"加载中...",pleaseSelect:"请选择",clickToOpenImage:"点击打开原图",fieldError:"字段",loadRelationOptionsFailed:"加载关联选项失败",assetUploadButton:"上传文件",assetUploading:"上传中...",assetReplace:"替换文件",assetClear:"清空",assetEmpty:"暂未上传资源",assetAcceptHint:"允许格式",assetMaxSizeHint:"大小限制",assetUploadSuccess:"上传成功",assetUploadFailed:"上传失败",assetUploadHandlerMissing:"当前 CMS 未配置上传处理器",assetUploadInvalidType:"所选文件类型不受支持",assetUploadTooLarge:"文件大小超过限制",assetUploadInvalidResult:"上传结果无效,未返回 URL"},model:{modelManagement:"内容类型管理",modelList:"内容类型列表",addModel:"新增内容类型",editModel:"编辑内容类型",deleteModel:"删除内容类型",deleteConfirm:"确定要删除这个内容类型吗?",modelName:"名称",tableName:"数据库标识符",fields:"字段列表",fieldName:"字段名称",fieldType:"字段类型",fieldComment:"字段描述",required:"必填",unique:"唯一",maxLength:"最大长度",defaultValue:"默认值",addField:"添加字段",removeField:"移除字段",createSuccess:"内容类型创建成功",createFailed:"内容类型创建失败",updateSuccess:"内容类型更新成功",updateFailed:"内容类型更新失败",deleteSuccess:"内容类型删除成功",deleteFailed:"内容类型删除失败",loadFailed:"加载内容类型失败",noModels:"暂无内容类型"},field:{string:"字符串",number:"数字",boolean:"布尔值",date:"日期",datetime:"日期时间",text:"文本",email:"邮箱",url:"链接",json:"JSON",relation:"关联",timestamp:"时间戳",time:"时间",enum:"枚举",select:"下拉选择",asset:"资源上传"},validation:{required:"此字段为必填项",invalidEmail:"请输入有效的邮箱地址",invalidUrl:"请输入有效的URL",maxLength:"超过最大长度限制",minLength:"未达到最小长度要求",invalidFormat:"格式不正确"},settings:{settings:"设置",language:"语言",theme:"主题",general:"通用",advanced:"高级",navigation:"导航",dragToReorder:"拖拽以调整顺序",copyUsername:"点击复制用户名",usernameCopied:"用户名已复制",copyFailed:"复制失败"}},"en-US":{common:{confirm:"Confirm",cancel:"Cancel",save:"Save",delete:"Delete",edit:"Edit",add:"Add",search:"Search",filter:"Filter",reset:"Reset",submit:"Submit",back:"Back",next:"Next",previous:"Previous",loading:"Loading...",success:"Success",error:"Error",warning:"Warning",info:"Info",close:"Close",refresh:"Refresh",export:"Export",import:"Import",view:"View",create:"Create",update:"Update",actions:"Actions",operation:"Operation",total:"Total",page:"Page",pageSize:"Page Size",goto:"Go to"},auth:{login:"Login",logout:"Logout",username:"Username",password:"Password",email:"Email",signup:"Sign Up",welcome:"Welcome",loginSuccess:"Login successful",loginFailed:"Login failed",logoutSuccess:"Logout successful",logoutConfirm:"Are you sure you want to logout?",pleaseLogin:"Please login",invalidCredentials:"Invalid username or password",createAdminAccount:"Create Admin Account",adminCreatedSuccess:"Admin account created successfully",noAdmin:"No admin account exists",firstTimeSetup:"First time setup, please create admin account"},data:{dataManagement:"Content",dataList:"Content List",addData:"New Record",editData:"Edit Record",deleteData:"Delete Record",deleteConfirm:"Are you sure you want to delete this record?",deleteSuccess:"Deleted successfully",deleteFailed:"Delete failed",createSuccess:"Created successfully",createFailed:"Create failed",updateSuccess:"Updated successfully",updateFailed:"Update failed",loadFailed:"Load failed",noData:"No data",selectModel:"Select Content Type",selectModelFirst:"Please select a content type first",selectModelPrompt:"Please select a data model",searchPlaceholder:"Search...",searchData:"Search data...",filterTitle:"Filters",addFilter:"Add Filter",clearFilters:"Clear Filters",totalRecords:"records",perPage:"per page",newData:"New Record",newRecord:"New Data",createdAt:"Created At",updatedAt:"Updated At",yes:"Yes",no:"No",operationFailed:"Operation failed",deleteConfirmFull:"Are you sure you want to delete this data? This action cannot be undone.",updating:"Updating...",creating:"Creating...",viewAndManage:"View and manage",ofData:"data",totalCount:"Total",records:"records",page:"Page",pageOf:"of",pages:"pages",previousPage:"Previous",nextPage:"Next",tableName:"Table",editRecord:"Edit Data",createRecord:"New Data",loadingOptions:"Loading...",pleaseSelect:"Please select",clickToOpenImage:"Click to open image",fieldError:"Field",loadRelationOptionsFailed:"Failed to load relation options",assetUploadButton:"Upload file",assetUploading:"Uploading...",assetReplace:"Replace file",assetClear:"Clear",assetEmpty:"No asset uploaded yet",assetAcceptHint:"Accepted",assetMaxSizeHint:"Max size",assetUploadSuccess:"Upload successful",assetUploadFailed:"Upload failed",assetUploadHandlerMissing:"No upload handler is configured for this CMS",assetUploadInvalidType:"The selected file type is not supported",assetUploadTooLarge:"The selected file exceeds the size limit",assetUploadInvalidResult:"Upload result is invalid because no URL was returned"},model:{modelManagement:"Content Types",modelList:"Content Type List",addModel:"New Content Type",editModel:"Edit Content Type",deleteModel:"Delete Content Type",deleteConfirm:"Are you sure you want to delete this content type?",modelName:"Name",tableName:"Database Identifier",fields:"Fields",fieldName:"Field Name",fieldType:"Field Type",fieldComment:"Field Description",required:"Required",unique:"Unique",maxLength:"Max Length",defaultValue:"Default Value",addField:"Add Field",removeField:"Remove Field",createSuccess:"Content type created successfully",createFailed:"Content type creation failed",updateSuccess:"Content type updated successfully",updateFailed:"Content type update failed",deleteSuccess:"Content type deleted successfully",deleteFailed:"Content type deletion failed",loadFailed:"Failed to load content types",noModels:"No content types"},field:{string:"String",number:"Number",boolean:"Boolean",date:"Date",datetime:"Datetime",text:"Text",email:"Email",url:"URL",json:"JSON",relation:"Relation",timestamp:"Timestamp",time:"Time",enum:"Enum",select:"Select",asset:"Asset"},validation:{required:"This field is required",invalidEmail:"Please enter a valid email address",invalidUrl:"Please enter a valid URL",maxLength:"Exceeded maximum length",minLength:"Below minimum length",invalidFormat:"Invalid format"},settings:{settings:"Settings",language:"Language",theme:"Theme",general:"General",advanced:"Advanced",navigation:"Navigation",dragToReorder:"Drag to reorder",copyUsername:"Click to copy username",usernameCopied:"Username copied",copyFailed:"Copy failed"}}},pm=e.createContext(void 0);function hm(t){var n=t.children,r=t.defaultLocale,a=A(e.useState(r||function(){try{var e=localStorage.getItem("cms_locale");if(e&&("zh-CN"===e||"en-US"===e))return e}catch(e){}return"zh-CN"}()),2),o=a[0],i=a[1],s={locale:o,setLocale:function(e){i(e),function(e){try{localStorage.setItem("cms_locale",e)}catch(e){}}(e)},t:function(e){var t,n=e.split("."),r=mm[o],a=C(n);try{for(a.s();!(t=a.n()).done;){var i=t.value;if(!r||"object"!==D(r)||!(i in r))return e;r=r[i]}}catch(e){a.e(e)}finally{a.f()}return"string"==typeof r?r:e},messages:mm[o]};return e.createElement(pm.Provider,{value:s},n)}function vm(){var t=e.useContext(pm);if(!t)throw new Error("useTranslation must be used within I18nProvider");return t}function gm(){return vm().t}function bm(){var e=vm();return{locale:e.locale,setLocale:e.setLocale}}function ym(e){var t,n=function(e){try{var t=e.split(".")[1],n=atob(t.replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(n)}catch(e){return null}}(e);(null===(t=null==n?void 0:n.user_metadata)||void 0===t?void 0:t.session_id)&&Zf(n.user_metadata.session_id.replace(/_/g,"-"))}function wm(t){var n=t.onLoginSuccess,r=gm(),a=A(e.useState(""),2),o=a[0],i=a[1],s=A(e.useState(""),2),l=s[0],c=s[1],u=A(e.useState(!1),2),d=u[0],f=u[1],m=A(e.useState("login"),2),p=m[0],h=m[1];e.useEffect(function(){var e=im();if(e){var t=function(){var t=w(_().m(function t(){var r;return _().w(function(t){for(;;)switch(t.p=t.n){case 0:return f(!0),t.p=1,t.n=2,rm();case 2:if(t.v.success){t.n=3;break}throw new Error("token验证失败");case 3:return t.n=4,am();case 4:if(!(r=t.v).success||!r.data){t.n=5;break}localStorage.setItem("cms_user",JSON.stringify(r.data)),ym(e),null==n||n(e,r.data),t.n=6;break;case 5:throw new Error("获取用户信息失败");case 6:t.n=8;break;case 7:t.p=7,t.v,om();case 8:return t.p=8,f(!1),t.f(8);case 9:return t.a(2)}},t,null,[[1,7,8,9]])}));return function(){return t.apply(this,arguments)}}();t()}},[n]),e.useEffect(function(){if(!im()){var e=function(){var e=w(_().m(function e(){var t,n;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:return f(!0),e.p=1,e.n=2,em();case 2:(n=e.v).success&&(null===(t=n.data)||void 0===t?void 0:t.allowSignup)?h("signup"):h("login"),e.n=4;break;case 3:e.p=3,e.v,h("login");case 4:return e.p=4,f(!1),e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}));return function(){return e.apply(this,arguments)}}();e()}},[]);var v=function(){var e=w(_().m(function e(t){var a,i,s,c,u;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t.preventDefault(),o&&l){e.n=1;break}return vu.error(r("validation.required")),e.a(2);case 1:if(f(!0),e.p=2,"signup"!==p){e.n=4;break}return e.n=3,tm({username:o,password:l});case 3:c=e.v,e.n=6;break;case 4:return e.n=5,nm({username:o,password:l});case 5:c=e.v;case 6:if((s=c).success&&(null===(a=s.data)||void 0===a?void 0:a.token)){e.n=7;break}return vu.error(s.message||r("auth.loginFailed")),"signup"===p&&(null===(i=s.message)||void 0===i?void 0:i.includes("已存在管理员"))&&h("login"),e.a(2);case 7:localStorage.setItem("cms_token",s.data.token),localStorage.setItem("cms_user",JSON.stringify(s.data.user)),ym(s.data.token),null==n||n(s.data.token,s.data.user),e.n=9;break;case 8:e.p=8,u=e.v,vu.error("".concat(r("auth.loginFailed"),", ").concat(u.message||r("common.error")));case 9:return e.p=9,f(!1),e.f(9);case 10:return e.a(2)}},e,null,[[2,8,9,10]])}));return function(t){return e.apply(this,arguments)}}();return e.createElement("div",{className:"we0-cms-root"},e.createElement("div",{className:"min-h-screen flex relative overflow-hidden bg-white"},e.createElement("div",{className:"pointer-events-none absolute inset-0"},e.createElement("div",{className:"absolute inset-0 bg-[linear-gradient(110deg,#ffffff_0%,#f7fbff_40%,#edf6ff_70%,#eaf3ff_100%)]"}),e.createElement("div",{className:"absolute inset-0 bg-[radial-gradient(1200px_600px_at_-10%_-10%,rgba(59,130,246,0.12),transparent),radial-gradient(900px_500px_at_110%_20%,rgba(147,51,234,0.10),transparent),radial-gradient(700px_400px_at_60%_120%,rgba(99,102,241,0.10),transparent)]"}),e.createElement("div",{className:"absolute inset-0 bg-[linear-gradient(115deg,rgba(255,255,255,0.6)_0%,rgba(255,255,255,0.15)_32%,transparent_32%,transparent_68%,rgba(255,255,255,0.15)_68%,rgba(255,255,255,0.6)_100%)]"})),e.createElement("div",{className:"flex-1 relative flex items-center justify-center"},e.createElement("div",{className:"relative z-10 max-w-4xl w-full px-16 text-left"},e.createElement("div",{className:"mb-12"},e.createElement("div",{className:"inline-flex items-center rounded-2xl px-4 py-2 bg-white/70 backdrop-blur border border-white/60"},e.createElement("span",{className:"text-2xl font-semibold tracking-tight text-gray-900"},r("data.dataManagement"))),e.createElement("h1",{className:"mt-8 text-5xl md:text-6xl font-extrabold leading-tight text-gray-900"},"WE0-CMS"),e.createElement("p",{className:"mt-6 text-2xl text-gray-600"},r("auth.welcome"))))),e.createElement("div",{className:"w-[480px] min-w-[380px] flex items-center justify-center p-8 mt-30"},e.createElement("div",{className:"w-full max-w-sm"},d?e.createElement(Zc,{className:"bg-white/30 backdrop-blur-xl border border-white/50 shadow-none rounded-3xl overflow-hidden"},e.createElement(nu,{className:"p-8"},e.createElement("div",{className:"space-y-4"},e.createElement(bt,{className:"h-12 w-48"}),e.createElement(bt,{className:"h-4 w-64"}),e.createElement(bt,{className:"h-10 w-full"}),e.createElement(bt,{className:"h-10 w-full"})))):e.createElement(Zc,{className:"bg-white/30 backdrop-blur-xl border border-white/50 shadow-none rounded-3xl overflow-hidden"},e.createElement(Qc,{className:"p-8 pb-6"},e.createElement(eu,{className:"text-center text-2xl mb-2 text-gray-800"},r("signup"===p?"auth.createAdminAccount":"auth.welcome")),e.createElement(tu,{className:"text-center text-gray-500"},r("signup"===p?"auth.firstTimeSetup":"auth.pleaseLogin"))),e.createElement(nu,{className:"p-8 pt-0"},e.createElement("form",{onSubmit:v,className:"space-y-6"},e.createElement("div",{className:"space-y-2"},e.createElement(Xc,{htmlFor:"username"},r("auth.username"),"/",r("auth.email")),e.createElement("div",{className:"relative"},e.createElement(we,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),e.createElement(Dt,{id:"username",type:"text",placeholder:r("auth.email"),value:o,onChange:function(e){return i(e.target.value)},className:"pl-10 h-12 rounded-xl border-gray-200 hover:border-blue-400 focus:border-blue-500 transition-colors",required:!0,minLength:2}))),e.createElement("div",{className:"space-y-2"},e.createElement(Xc,{htmlFor:"password"},r("auth.password")),e.createElement("div",{className:"relative"},e.createElement(ce,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),e.createElement(Dt,{id:"password",type:"password",placeholder:r("auth.password"),value:l,onChange:function(e){return c(e.target.value)},className:"pl-10 h-12 rounded-xl border-gray-200 hover:border-blue-400 focus:border-blue-500 transition-colors",required:!0,minLength:6}))),e.createElement(Pt,{type:"submit",className:"w-full h-12 rounded-xl transition-all duration-200 font-semibold text-base shadow-lg hover:brightness-[1.03] active:scale-[0.99]",style:{backgroundImage:"linear-gradient(135deg, rgba(236, 248, 255, 0.78) 0%, rgba(221, 238, 255, 0.78) 100%)",color:"rgba(0, 0, 0, 0.7)",border:"none",boxShadow:"0 6px 24px rgba(37, 99, 235, 0.12)"},disabled:d},e.createElement(ue,{className:"h-4 w-4 mr-2"}),r(d?"common.loading":"signup"===p?"auth.signup":"auth.login")))))))))}function xm(e,[t,n]){return Math.min(n,Math.max(t,e))}function Em(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Nm=[" ","Enter","ArrowUp","ArrowDown"],km=[" ","Enter"],Cm="Select",[Sm,Om,jm]=Ss(Cm),[_m,Rm]=qt(Cm,[jm,di]),Tm=di(),[Am,Mm]=_m(Cm),[Pm,Dm]=_m(Cm),Lm=e=>{const{__scopeSelect:n,children:r,open:a,defaultOpen:o,onOpenChange:i,value:s,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:m,disabled:p,required:h,form:v}=e,g=Tm(n),[b,y]=f.useState(null),[w,x]=f.useState(null),[E,N]=f.useState(!1),k=js(u),[C,S]=Gt({prop:a,defaultProp:o??!1,onChange:i,caller:Cm}),[O,j]=Gt({prop:s,defaultProp:l,onChange:c,caller:Cm}),_=f.useRef(null),R=!b||(v||!!b.closest("form")),[T,A]=f.useState(new Set),M=Array.from(T).map(e=>e.props.value).join(";");return t.jsx(Oi,{...g,children:t.jsxs(Am,{required:h,scope:n,trigger:b,onTriggerChange:y,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:E,onValueNodeHasChildrenChange:N,contentId:$t(),value:O,onValueChange:j,open:C,onOpenChange:S,dir:k,triggerPointerDownPosRef:_,disabled:p,children:[t.jsx(Sm.Provider,{scope:n,children:t.jsx(Pm,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:f.useCallback(e=>{A(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:r})}),R?t.jsxs(Ep,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:m,value:O,onChange:e=>j(e.target.value),disabled:p,form:v,children:[void 0===O?t.jsx("option",{value:""}):null,Array.from(T)]},M):null]})})};Lm.displayName=Cm;var Fm="SelectTrigger",Im=f.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:a=!1,...o}=e,i=Tm(r),s=Mm(Fm,r),l=s.disabled||a,c=xt(n,s.onTriggerChange),u=Om(r),d=f.useRef("touch"),[m,p,h]=kp(e=>{const t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=Cp(t,e,n);void 0!==r&&s.onValueChange(r.value)}),v=e=>{l||(s.onOpenChange(!0),h()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return t.jsx(ji,{asChild:!0,...i,children:t.jsx(en.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Np(s.value)?"":void 0,...o,ref:c,onClick:Bt(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==d.current&&v(e)}),onPointerDown:Bt(o.onPointerDown,e=>{d.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(v(e),e.preventDefault())}),onKeyDown:Bt(o.onKeyDown,e=>{const t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||Nm.includes(e.key)&&(v(),e.preventDefault())})})})});Im.displayName=Fm;var Um="SelectValue",zm=f.forwardRef((e,n)=>{const{__scopeSelect:r,className:a,style:o,children:i,placeholder:s="",...l}=e,c=Mm(Um,r),{onValueNodeHasChildrenChange:u}=c,d=void 0!==i,f=xt(n,c.onValueNodeChange);return Wt(()=>{u(d)},[u,d]),t.jsx(en.span,{...l,ref:f,style:{pointerEvents:"none"},children:Np(c.value)?t.jsx(t.Fragment,{children:s}):i})});zm.displayName=Um;var Bm=f.forwardRef((e,n)=>{const{__scopeSelect:r,children:a,...o}=e;return t.jsx(en.span,{"aria-hidden":!0,...o,ref:n,children:a||"▼"})});Bm.displayName="SelectIcon";var qm=e=>t.jsx(En,{asChild:!0,...e});qm.displayName="SelectPortal";var Hm="SelectContent",Wm=f.forwardRef((e,n)=>{const r=Mm(Hm,e.__scopeSelect),[a,o]=f.useState();if(Wt(()=>{o(new DocumentFragment)},[]),!r.open){const n=a;return n?m.createPortal(t.jsx(Km,{scope:e.__scopeSelect,children:t.jsx(Sm.Slot,{scope:e.__scopeSelect,children:t.jsx("div",{children:e.children})})}),n):null}return t.jsx(Gm,{...e,ref:n})});Wm.displayName=Hm;var Vm=10,[Km,$m]=_m(Hm),Ym=Jt("SelectContent.RemoveScroll"),Gm=f.forwardRef((e,n)=>{const{__scopeSelect:r,position:a="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:b,...y}=e,w=Mm(Hm,r),[x,E]=f.useState(null),[N,k]=f.useState(null),C=xt(n,e=>E(e)),[S,O]=f.useState(null),[j,_]=f.useState(null),R=Om(r),[T,A]=f.useState(!1),M=f.useRef(!1);f.useEffect(()=>{if(x)return wr(x)},[x]),Sn();const P=f.useCallback(e=>{const[t,...n]=R().map(e=>e.ref.current),[r]=n.slice(-1),a=document.activeElement;for(const n of e){if(n===a)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&N&&(N.scrollTop=0),n===r&&N&&(N.scrollTop=N.scrollHeight),n?.focus(),document.activeElement!==a)return}},[R,N]),D=f.useCallback(()=>P([S,x]),[P,S,x]);f.useEffect(()=>{T&&D()},[T,D]);const{onOpenChange:L,triggerPointerDownPosRef:F}=w;f.useEffect(()=>{if(x){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),F.current=null};return null!==F.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[x,L,F]),f.useEffect(()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[L]);const[I,U]=kp(e=>{const t=R().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=Cp(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),z=f.useCallback((e,t,n)=>{const r=!M.current&&!n;(void 0!==w.value&&w.value===t||r)&&(O(e),r&&(M.current=!0))},[w.value]),B=f.useCallback(()=>x?.focus(),[x]),q=f.useCallback((e,t,n)=>{const r=!M.current&&!n;(void 0!==w.value&&w.value===t||r)&&_(e)},[w.value]),H="popper"===a?Xm:Jm,W=H===Xm?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:b}:{};return t.jsx(Km,{scope:r,content:x,viewport:N,onViewportChange:k,itemRefCallback:z,selectedItem:S,onItemLeave:B,itemTextRefCallback:q,focusSelectedItem:D,selectedItemText:j,position:a,isPositioned:T,searchRef:I,children:t.jsx(mr,{as:Ym,allowPinchZoom:!0,children:t.jsx(hn,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Bt(o,e=>{w.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:t.jsx(cn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:t.jsx(H,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault(),...y,...W,onPlaced:()=>A(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Bt(y.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=R().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>P(t)),e.preventDefault()}})})})})})})});Gm.displayName="SelectContentImpl";var Jm=f.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:a,...o}=e,i=Mm(Hm,r),s=$m(Hm,r),[l,c]=f.useState(null),[u,d]=f.useState(null),m=xt(n,e=>d(e)),p=Om(r),h=f.useRef(!1),v=f.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:y,focusSelectedItem:w}=s,x=f.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&g&&b&&y){const e=i.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if("rtl"!==i.dir){const a=r.left-t.left,o=n.left-a,i=e.left-o,s=e.width+i,c=Math.max(s,t.width),u=window.innerWidth-Vm,d=xm(o,[Vm,Math.max(Vm,u-c)]);l.style.minWidth=s+"px",l.style.left=d+"px"}else{const a=t.right-r.right,o=window.innerWidth-n.right-a,i=window.innerWidth-e.right-o,s=e.width+i,c=Math.max(s,t.width),u=window.innerWidth-Vm,d=xm(o,[Vm,Math.max(Vm,u-c)]);l.style.minWidth=s+"px",l.style.right=d+"px"}const o=p(),s=window.innerHeight-2*Vm,c=g.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),v=parseInt(d.borderBottomWidth,10),w=f+m+c+parseInt(d.paddingBottom,10)+v,x=Math.min(5*b.offsetHeight,w),E=window.getComputedStyle(g),N=parseInt(E.paddingTop,10),k=parseInt(E.paddingBottom,10),C=e.top+e.height/2-Vm,S=s-C,O=b.offsetHeight/2,j=f+m+(b.offsetTop+O),_=w-j;if(j<=C){const e=o.length>0&&b===o[o.length-1].ref.current;l.style.bottom="0px";const t=u.clientHeight-g.offsetTop-g.offsetHeight,n=j+Math.max(S,O+(e?k:0)+t+v);l.style.height=n+"px"}else{const e=o.length>0&&b===o[0].ref.current;l.style.top="0px";const t=Math.max(C,f+g.offsetTop+(e?N:0)+O)+_;l.style.height=t+"px",g.scrollTop=j-C+g.offsetTop}l.style.margin=`${Vm}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=s+"px",a?.(),requestAnimationFrame(()=>h.current=!0)}},[p,i.trigger,i.valueNode,l,u,g,b,y,i.dir,a]);Wt(()=>x(),[x]);const[E,N]=f.useState();Wt(()=>{u&&N(window.getComputedStyle(u).zIndex)},[u]);const k=f.useCallback(e=>{e&&!0===v.current&&(x(),w?.(),v.current=!1)},[x,w]);return t.jsx(Zm,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:k,children:t.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:t.jsx(en.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Jm.displayName="SelectItemAlignedPosition";var Xm=f.forwardRef((e,n)=>{const{__scopeSelect:r,align:a="start",collisionPadding:o=Vm,...i}=e,s=Tm(r);return t.jsx(_i,{...s,...i,ref:n,align:a,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Xm.displayName="SelectPopperPosition";var[Zm,Qm]=_m(Hm,{}),ep="SelectViewport",tp=f.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:a,...o}=e,i=$m(ep,r),s=Qm(ep,r),l=xt(n,i.onViewportChange),c=f.useRef(0);return t.jsxs(t.Fragment,{children:[t.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),t.jsx(Sm.Slot,{scope:r,children:t.jsx(en.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Bt(o.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){const e=Math.abs(c.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Vm,a=parseFloat(n.style.minHeight),o=parseFloat(n.style.height),i=Math.max(a,o);if(i<r){const a=i+e,o=Math.min(r,a),s=a-o;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});tp.displayName=ep;var np="SelectGroup",[rp,ap]=_m(np);f.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e,o=$t();return t.jsx(rp,{scope:r,id:o,children:t.jsx(en.div,{role:"group","aria-labelledby":o,...a,ref:n})})}).displayName=np;var op="SelectLabel",ip=f.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e,o=ap(op,r);return t.jsx(en.div,{id:o.id,...a,ref:n})});ip.displayName=op;var sp="SelectItem",[lp,cp]=_m(sp),up=f.forwardRef((e,n)=>{const{__scopeSelect:r,value:a,disabled:o=!1,textValue:i,...s}=e,l=Mm(sp,r),c=$m(sp,r),u=l.value===a,[d,m]=f.useState(i??""),[p,h]=f.useState(!1),v=xt(n,e=>c.itemRefCallback?.(e,a,o)),g=$t(),b=f.useRef("touch"),y=()=>{o||(l.onValueChange(a),l.onOpenChange(!1))};if(""===a)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return t.jsx(lp,{scope:r,value:a,disabled:o,textId:g,isSelected:u,onItemTextChange:f.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:t.jsx(Sm.ItemSlot,{scope:r,value:a,disabled:o,textValue:d,children:t.jsx(en.div,{role:"option","aria-labelledby":g,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:Bt(s.onFocus,()=>h(!0)),onBlur:Bt(s.onBlur,()=>h(!1)),onClick:Bt(s.onClick,()=>{"mouse"!==b.current&&y()}),onPointerUp:Bt(s.onPointerUp,()=>{"mouse"===b.current&&y()}),onPointerDown:Bt(s.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:Bt(s.onPointerMove,e=>{b.current=e.pointerType,o?c.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Bt(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Bt(s.onKeyDown,e=>{""!==c.searchRef?.current&&" "===e.key||(km.includes(e.key)&&y()," "===e.key&&e.preventDefault())})})})})});up.displayName=sp;var dp="SelectItemText",fp=f.forwardRef((e,n)=>{const{__scopeSelect:r,className:a,style:o,...i}=e,s=Mm(dp,r),l=$m(dp,r),c=cp(dp,r),u=Dm(dp,r),[d,p]=f.useState(null),h=xt(n,e=>p(e),c.onItemTextChange,e=>l.itemTextRefCallback?.(e,c.value,c.disabled)),v=d?.textContent,g=f.useMemo(()=>t.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:b,onNativeOptionRemove:y}=u;return Wt(()=>(b(g),()=>y(g)),[b,y,g]),t.jsxs(t.Fragment,{children:[t.jsx(en.span,{id:c.textId,...i,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?m.createPortal(i.children,s.valueNode):null]})});fp.displayName=dp;var mp="SelectItemIndicator",pp=f.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e;return cp(mp,r).isSelected?t.jsx(en.span,{"aria-hidden":!0,...a,ref:n}):null});pp.displayName=mp;var hp="SelectScrollUpButton",vp=f.forwardRef((e,n)=>{const r=$m(hp,e.__scopeSelect),a=Qm(hp,e.__scopeSelect),[o,i]=f.useState(!1),s=xt(n,a.onScrollButtonChange);return Wt(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;i(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),o?t.jsx(yp,{...e,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});vp.displayName=hp;var gp="SelectScrollDownButton",bp=f.forwardRef((e,n)=>{const r=$m(gp,e.__scopeSelect),a=Qm(gp,e.__scopeSelect),[o,i]=f.useState(!1),s=xt(n,a.onScrollButtonChange);return Wt(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),o?t.jsx(yp,{...e,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});bp.displayName=gp;var yp=f.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:a,...o}=e,i=$m("SelectScrollButton",r),s=f.useRef(null),l=Om(r),c=f.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>c(),[c]),Wt(()=>{const e=l().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[l]),t.jsx(en.div,{"aria-hidden":!0,...o,ref:n,style:{flexShrink:0,...o.style},onPointerDown:Bt(o.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(a,50))}),onPointerMove:Bt(o.onPointerMove,()=>{i.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(a,50))}),onPointerLeave:Bt(o.onPointerLeave,()=>{c()})})}),wp=f.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e;return t.jsx(en.div,{"aria-hidden":!0,...a,ref:n})});wp.displayName="SelectSeparator";var xp="SelectArrow";f.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e,o=Tm(r),i=Mm(xp,r),s=$m(xp,r);return i.open&&"popper"===s.position?t.jsx(Ri,{...o,...a,ref:n}):null}).displayName=xp;var Ep=f.forwardRef(({__scopeSelect:e,value:n,...r},a)=>{const o=f.useRef(null),i=xt(a,o),s=Em(n);return f.useEffect(()=>{const e=o.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(s!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[s,n]),t.jsx(en.select,{...r,style:{...Ti,...r.style},ref:i,defaultValue:n})});function Np(e){return""===e||void 0===e}function kp(e){const t=nn(e),n=f.useRef(""),r=f.useRef(0),a=f.useCallback(e=>{const a=n.current+e;t(a),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(a)},[t]),o=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function Cp(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=(i=e,s=Math.max(a,0),i.map((e,t)=>i[(s+t)%i.length]));var i,s;1===r.length&&(o=o.filter(e=>e!==n));const l=o.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}Ep.displayName="SelectBubbleInput";var Sp=Im,Op=Bm,jp=qm,_p=Wm,Rp=tp,Tp=ip,Ap=up,Mp=fp,Pp=pp,Dp=vp,Lp=bp,Fp=wp,Ip=Lm,Up=zm,zp=f.forwardRef(function(e,t){var n=e.className,r=e.children,a=z(e,["className","children"]);return f.createElement(Sp,Object.assign({ref:t,className:gt("flex h-12 w-full items-center justify-between rounded-full border border-input bg-background px-6 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-[hsl(var(--primary))]/30 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-300 [&>span]:line-clamp-1",n)},a),r,f.createElement(Op,{asChild:!0},f.createElement($,{className:"h-4 w-4 opacity-50"})))});zp.displayName=Sp.displayName;var Bp=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(Dp,Object.assign({ref:t,className:gt("flex cursor-default items-center justify-center py-1",n)},r),f.createElement(J,{className:"h-4 w-4"}))});Bp.displayName=Dp.displayName;var qp=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(Lp,Object.assign({ref:t,className:gt("flex cursor-default items-center justify-center py-1",n)},r),f.createElement($,{className:"h-4 w-4"}))});qp.displayName=Lp.displayName;var Hp=f.forwardRef(function(e,t){var n=e.className,r=e.children,a=e.position,o=void 0===a?"popper":a,i=z(e,["className","children","position"]);return f.createElement(jp,null,f.createElement(_p,Object.assign({ref:t,className:gt("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-2xl border bg-popover text-popover-foreground shadow-[0_10px_40px_-10px_rgba(93,112,82,0.2)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:o},i),f.createElement(Bp,null),f.createElement(Rp,{className:gt("p-1","popper"===o&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},r),f.createElement(qp,null)))});Hp.displayName=_p.displayName,f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(Tp,Object.assign({ref:t,className:gt("py-1.5 pl-8 pr-2 text-sm font-semibold",n)},r))}).displayName=Tp.displayName;var Wp=f.forwardRef(function(e,t){var n=e.className,r=e.children,a=z(e,["className","children"]);return f.createElement(Ap,Object.assign({ref:t,className:gt("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n)},a),f.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},f.createElement(Pp,null,f.createElement(K,{className:"h-4 w-4"}))),f.createElement(Mp,null,r))});Wp.displayName=Ap.displayName,f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(Fp,Object.assign({ref:t,className:gt("-mx-1 my-1 h-px bg-muted",n)},r))}).displayName=Fp.displayName;var Vp="Switch",[Kp,$p]=qt(Vp),[Yp,Gp]=Kp(Vp),Jp=f.forwardRef((e,n)=>{const{__scopeSwitch:r,name:a,checked:o,defaultChecked:i,required:s,disabled:l,value:c="on",onCheckedChange:u,form:d,...m}=e,[p,h]=f.useState(null),v=xt(n,e=>h(e)),g=f.useRef(!1),b=!p||(d||!!p.closest("form")),[y,w]=Gt({prop:o,defaultProp:i??!1,onChange:u,caller:Vp});return t.jsxs(Yp,{scope:r,checked:y,disabled:l,children:[t.jsx(en.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":eh(y),"data-disabled":l?"":void 0,disabled:l,value:c,...m,ref:v,onClick:Bt(e.onClick,e=>{w(e=>!e),b&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})}),b&&t.jsx(Qp,{control:p,bubbles:!g.current,name:a,value:c,checked:y,required:s,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});Jp.displayName=Vp;var Xp="SwitchThumb",Zp=f.forwardRef((e,n)=>{const{__scopeSwitch:r,...a}=e,o=Gp(Xp,r);return t.jsx(en.span,{"data-state":eh(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:n})});Zp.displayName=Xp;var Qp=f.forwardRef(({__scopeSwitch:e,control:n,checked:r,bubbles:a=!0,...o},i)=>{const s=f.useRef(null),l=xt(s,i),c=Em(r),u=li(n);return f.useEffect(()=>{const e=s.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==r&&n){const t=new Event("click",{bubbles:a});n.call(e,r),e.dispatchEvent(t)}},[c,r,a]),t.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function eh(e){return e?"checked":"unchecked"}Qp.displayName="SwitchBubbleInput";var th=Jp,nh=Zp,rh=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(th,Object.assign({className:gt("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",n)},r,{ref:t}),f.createElement(nh,{className:gt("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")}))});function ah(e){return/^https?:\/\//i.test(e)}rh.displayName=th.displayName;var oh=[".png",".jpg",".jpeg",".gif",".webp",".bmp",".svg",".ico",".avif"];function ih(e){return oh.includes(e)}function sh(e){var t,n=e.trim();if(!n)return!1;if(n.startsWith("data:image/"))return!0;if(!ah(n))return!1;var r=(null===(t=n.split("#")[0])||void 0===t?void 0:t.split("?")[0])||n;return/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(r)}function lh(e){return!Number.isFinite(e)||e<=0?"0 B":e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(1)," KB"):"".concat((e/1048576).toFixed(1)," MB")}function ch(e,t){if(!t)return!0;var n=t.split(",").map(function(e){return e.trim().toLowerCase()}).filter(Boolean);if(0===n.length)return!0;var r=e.name.toLowerCase(),a=e.type.toLowerCase();return n.some(function(e){if(e.endsWith("/*")){var t=e.slice(0,-1);return a.startsWith(t)}return e.startsWith(".")?r.endsWith(e):a===e})}function uh(e){var t;return(null===(t=null==e?void 0:e.url)||void 0===t?void 0:t.trim())||""}var dh=e.createContext(void 0);function fh(t){var n=t.uploadHandler,r=t.children;return e.createElement(dh.Provider,{value:n},r)}function mh(t){var n=t.url,r=t.emptyText,a=void 0===r?"-":r,o=t.mode,i=void 0===o?"file":o,s=t.className,l=(n||"").trim();return l?"image"===i&&sh(l)?e.createElement("div",{className:gt("flex items-center gap-3 min-w-0",s)},e.createElement("a",{href:l,target:"_blank",rel:"noreferrer",className:"inline-flex h-14 w-14 shrink-0 items-center justify-center overflow-hidden rounded-lg border bg-muted",title:l},e.createElement("img",{src:l,alt:"",className:"h-full w-full object-cover",onError:function(e){e.currentTarget.style.display="none"}}),e.createElement(te,{className:"hidden h-5 w-5 text-muted-foreground"})),e.createElement("a",{href:l,target:"_blank",rel:"noreferrer",className:"block min-w-0 flex-1 truncate text-sm text-primary underline-offset-2 hover:underline",title:l},l)):ah(l)?e.createElement("a",{href:l,target:"_blank",rel:"noreferrer",className:gt("inline-flex max-w-full items-center gap-2 truncate text-sm text-primary underline-offset-2 hover:underline",s),title:l},e.createElement(re,{className:"h-4 w-4 shrink-0"}),e.createElement("span",{className:"min-w-0 flex-1 truncate"},l),e.createElement(ee,{className:"h-4 w-4 shrink-0"})):e.createElement("div",{className:gt("text-sm truncate",s),title:l},l):e.createElement("div",{className:gt("text-sm text-muted-foreground",s)},a)}function ph(t){var n,r,a,o,i,s=t.field,l=t.model,c=t.value,u=t.disabled,d=t.onChange,f=gm(),m=e.useContext(dh),p=e.useRef(null),h=A(e.useState(!1),2),v=h[0],g=h[1],b=null===(n=s.upload)||void 0===n?void 0:n.accept,y=null===(r=s.upload)||void 0===r?void 0:r.maxSize,x=function(e){var t=e.assetKind,n=void 0===t?"auto":t,r=e.accept,a=e.value;if("image"===n)return"image";if("file"===n)return"file";var o=(r||"").split(",").map(function(e){return e.trim().toLowerCase()}).filter(Boolean);if(o.length>0){var i,s=!1,l=!1,c=C(o);try{for(c.s();!(i=c.n()).done;){var u=i.value;"image/*"===u||u.startsWith("image/")||u.startsWith(".")&&ih(u)?s=!0:l=!0}}catch(e){c.e(e)}finally{c.f()}if(s&&!l)return"image";if(l&&!s)return"file"}return sh((a||"").trim())?"image":"file"}({assetKind:null===(a=s.upload)||void 0===a?void 0:a.assetKind,accept:b,value:c}),E=!!m,N=!!(c||"").trim(),k=function(){var e=w(_().m(function e(t){var n,r,a,o,i,c;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=null===(n=t.target.files)||void 0===n?void 0:n[0],t.target.value="",r){e.n=1;break}return e.a(2);case 1:if(m){e.n=2;break}return vu.error(f("data.assetUploadHandlerMissing")),e.a(2);case 2:if(ch(r,b)){e.n=3;break}return vu.error(f("data.assetUploadInvalidType")),e.a(2);case 3:if(!("number"==typeof y&&y>0&&r.size>y)){e.n=4;break}return vu.error("".concat(f("data.assetUploadTooLarge")," (").concat(lh(y),")")),e.a(2);case 4:return g(!0),e.p=5,e.n=6,m(r,{field:s,model:l,sessionId:Vf()});case 6:if(a=e.v,o=uh(a)){e.n=7;break}throw new Error(f("data.assetUploadInvalidResult"));case 7:d(o),vu.success(f("data.assetUploadSuccess")),e.n=9;break;case 8:e.p=8,c=e.v,i=c instanceof Error?c.message:f("data.assetUploadFailed"),vu.error(i);case 9:return e.p=9,g(!1),e.f(9);case 10:return e.a(2)}},e,null,[[5,8,9,10]])}));return function(t){return e.apply(this,arguments)}}();return e.createElement("div",{className:"space-y-2.5"},e.createElement(Xc,{htmlFor:s.name,className:"text-sm font-semibold"},s.comment||s.name,s.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement("input",{ref:p,id:s.name,type:"file",accept:b,className:"hidden",disabled:u||v||!E,onChange:k}),e.createElement("div",{className:"rounded-lg border bg-card p-4 space-y-4"},e.createElement(mh,{url:c,mode:x,emptyText:(null===(o=s.upload)||void 0===o?void 0:o.placeholder)||f("data.assetEmpty"),className:"w-[360px] max-w-full"}),e.createElement("div",{className:"flex flex-wrap gap-2"},e.createElement(Pt,{type:"button",variant:"outline",onClick:function(){var e;u||v||(E?null===(e=p.current)||void 0===e||e.click():vu.error(f("data.assetUploadHandlerMissing")))},disabled:u||v||!E},v?e.createElement(e.Fragment,null,e.createElement(le,{className:"h-4 w-4 mr-2 animate-spin"}),f("data.assetUploading")):e.createElement(e.Fragment,null,e.createElement(ye,{className:"h-4 w-4 mr-2"}),N?f("data.assetReplace"):(null===(i=s.upload)||void 0===i?void 0:i.buttonText)||f("data.assetUploadButton"))),N&&e.createElement(Pt,{type:"button",variant:"ghost",onClick:function(){d("")},disabled:u||v},e.createElement(be,{className:"h-4 w-4 mr-2"}),f("data.assetClear"))),e.createElement("div",{className:"space-y-1 text-xs text-muted-foreground"},b&&e.createElement("div",null,f("data.assetAcceptHint"),": ",e.createElement("span",{className:"font-mono"},b)),"number"==typeof y&&y>0&&e.createElement("div",null,f("data.assetMaxSizeHint"),": ",lh(y)),!E&&e.createElement("div",null,f("data.assetUploadHandlerMissing")))))}var hh=ea,vh=ta,gh=na,bh=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(ra,Object.assign({ref:t,className:gt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n)},r))});bh.displayName=ra.displayName;var yh=f.forwardRef(function(e,t){var n=e.className,r=e.children,a=z(e,["className","children"]);return f.createElement(gh,null,f.createElement(bh,null),f.createElement(aa,Object.assign({ref:t,className:gt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-[hsl(var(--border))]/50 bg-background p-6 shadow-[0_20px_60px_-10px_rgba(93,112,82,0.2)] duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-[2rem]",n)},a),r,f.createElement(sa,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},f.createElement(Ee,{className:"h-4 w-4"}),f.createElement("span",{className:"sr-only"},"Close"))))});yh.displayName=aa.displayName;var wh=function(e){var t=e.className,n=z(e,["className"]);return f.createElement("div",Object.assign({className:gt("flex flex-col space-y-1.5 text-center sm:text-left",t)},n))};wh.displayName="DialogHeader";var xh=function(e){var t=e.className,n=z(e,["className"]);return f.createElement("div",Object.assign({className:gt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t)},n))};xh.displayName="DialogFooter";var Eh=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(oa,Object.assign({ref:t,className:gt("text-lg font-semibold leading-none tracking-tight",n)},r))});Eh.displayName=oa.displayName;var Nh,kh=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement(ia,Object.assign({ref:t,className:gt("text-sm text-muted-foreground",n)},r))});function Ch(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.length,r=0,a="",o=0,i=16,s=0,l=0,c=0,u=0,d=0;function f(t,n){for(var a=0,o=0;a<t||!n;){var i=e.charCodeAt(r);if(i>=48&&i<=57)o=16*o+i-48;else if(i>=65&&i<=70)o=16*o+i-65+10;else{if(!(i>=97&&i<=102))break;o=16*o+i-97+10}r++,a++}return a<t&&(o=-1),o}function m(){if(a="",d=0,o=r,l=s,u=c,r>=n)return o=n,i=17;var t=e.charCodeAt(r);if(Sh(t)){do{r++,a+=String.fromCharCode(t),t=e.charCodeAt(r)}while(Sh(t));return i=15}if(Oh(t))return r++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,a+="\n"),s++,c=r,i=14;switch(t){case 123:return r++,i=1;case 125:return r++,i=2;case 91:return r++,i=3;case 93:return r++,i=4;case 58:return r++,i=6;case 44:return r++,i=5;case 34:return r++,a=function(){for(var t="",a=r;;){if(r>=n){t+=e.substring(a,r),d=2;break}var o=e.charCodeAt(r);if(34===o){t+=e.substring(a,r),r++;break}if(92!==o){if(o>=0&&o<=31){if(Oh(o)){t+=e.substring(a,r),d=2;break}d=6}r++}else{if(t+=e.substring(a,r),++r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var i=f(4,!0);i>=0?t+=String.fromCharCode(i):d=4;break;default:d=5}a=r}}return t}(),i=10;case 47:var m=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!Oh(e.charCodeAt(r));)r++;return a=e.substring(m,r),i=12}if(42===e.charCodeAt(r+1)){r+=2;for(var h=n-1,v=!1;r<h;){var g=e.charCodeAt(r);if(42===g&&47===e.charCodeAt(r+1)){r+=2,v=!0;break}r++,Oh(g)&&(13===g&&10===e.charCodeAt(r)&&r++,s++,c=r)}return v||(r++,d=1),a=e.substring(m,r),i=13}return a+=String.fromCharCode(t),r++,i=16;case 45:if(a+=String.fromCharCode(t),++r===n||!jh(e.charCodeAt(r)))return i=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a+=function(){var t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&jh(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(!(++r<e.length&&jh(e.charCodeAt(r))))return d=3,e.substring(t,r);for(r++;r<e.length&&jh(e.charCodeAt(r));)r++}var n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if((++r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&jh(e.charCodeAt(r))){for(r++;r<e.length&&jh(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}(),i=11;default:for(;r<n&&p(t);)r++,t=e.charCodeAt(r);if(o!==r){switch(a=e.substring(o,r)){case"true":return i=8;case"false":return i=9;case"null":return i=7}return i=16}return a+=String.fromCharCode(t),r++,i=16}}function p(e){if(Sh(e)||Oh(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,a="",o=0,i=16,d=0},getPosition:function(){return r},scan:t?function(){var e;do{e=m()}while(e>=12&&e<=15);return e}:m,getToken:function(){return i},getTokenValue:function(){return a},getTokenOffset:function(){return o},getTokenLength:function(){return r-o},getTokenStartLine:function(){return l},getTokenStartCharacter:function(){return o-u},getTokenError:function(){return d}}}function Sh(e){return 32===e||9===e}function Oh(e){return 10===e||13===e}function jh(e){return e>=48&&e<=57}kh.displayName=ia.displayName,function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(Nh||(Nh={}));var _h,Rh,Th,Ah=new Array(20).fill(0).map(function(e,t){return" ".repeat(t)}),Mh=200,Ph={" ":{"\n":new Array(Mh).fill(0).map(function(e,t){return"\n"+" ".repeat(t)}),"\r":new Array(Mh).fill(0).map(function(e,t){return"\r"+" ".repeat(t)}),"\r\n":new Array(Mh).fill(0).map(function(e,t){return"\r\n"+" ".repeat(t)})},"\t":{"\n":new Array(Mh).fill(0).map(function(e,t){return"\n"+"\t".repeat(t)}),"\r":new Array(Mh).fill(0).map(function(e,t){return"\r"+"\t".repeat(t)}),"\r\n":new Array(Mh).fill(0).map(function(e,t){return"\r\n"+"\t".repeat(t)})}},Dh=["\n","\r","\r\n"];function Lh(e,t,n){var r,a,o,i,s;if(t){for(i=t.offset,s=i+t.length,o=i;o>0&&!Ih(e,o-1);)o--;for(var l=s;l<e.length&&!Ih(e,l);)l++;a=e.substring(o,l),r=function(e,t){var n=0,r=0,a=t.tabSize||4;for(;n<e.length;){var o=e.charAt(n);if(o===Ah[1])r++;else{if("\t"!==o)break;r+=a}n++}return Math.floor(r/a)}(a,n)}else a=e,r=0,o=0,i=0,s=e.length;var c,u,d=function(e,t){for(var n=0;n<t.length;n++){var r=t.charAt(n);if("\r"===r)return n+1<t.length&&"\n"===t.charAt(n+1)?"\r\n":"\r";if("\n"===r)return"\n"}return e&&e.eol||"\n"}(n,e),f=Dh.includes(d),m=0,p=0;n.insertSpaces?c=null!==(u=Ah[n.tabSize||4])&&void 0!==u?u:Fh(Ah[1],n.tabSize||4):c="\t";var h="\t"===c?"\t":" ",v=Ch(a,!1),g=!1;function b(){if(m>1)return Fh(d,m)+Fh(c,r+p);var e=c.length*(r+p);return!f||e>Ph[h][d].length?d+Fh(c,r+p):e<=0?d:Ph[h][d][e]}function y(){var e=v.scan();for(m=0;15===e||14===e;)14===e&&n.keepLines?m+=1:14===e&&(m=1),e=v.scan();return g=16===e||0!==v.getTokenError(),e}var w=[];function x(n,r,a){g||t&&!(r<s&&a>i)||e.substring(r,a)===n||w.push({offset:r,length:a-r,content:n})}var E=y();if(n.keepLines&&m>0&&x(Fh(d,m),0,0),17!==E){var N=v.getTokenOffset()+o;x(c.length*r<20&&n.insertSpaces?Ah[c.length*r]:Fh(c,r),o,N)}for(;17!==E;){for(var k=v.getTokenOffset()+v.getTokenLength()+o,C=y(),S="",O=!1;0===m&&(12===C||13===C);){var j=v.getTokenOffset()+o;x(Ah[1],k,j),k=v.getTokenOffset()+v.getTokenLength()+o,S=(O=12===C)?b():"",C=y()}if(2===C)1!==E&&p--,n.keepLines&&m>0||!n.keepLines&&1!==E?S=b():n.keepLines&&(S=Ah[1]);else if(4===C)3!==E&&p--,n.keepLines&&m>0||!n.keepLines&&3!==E?S=b():n.keepLines&&(S=Ah[1]);else{switch(E){case 3:case 1:p++,S=n.keepLines&&m>0||!n.keepLines?b():Ah[1];break;case 5:S=n.keepLines&&m>0||!n.keepLines?b():Ah[1];break;case 12:S=b();break;case 13:m>0?S=b():O||(S=Ah[1]);break;case 6:n.keepLines&&m>0?S=b():O||(S=Ah[1]);break;case 10:n.keepLines&&m>0?S=b():6!==C||O||(S="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&m>0?S=b():12!==C&&13!==C||O?5!==C&&17!==C&&(g=!0):S=Ah[1];break;case 16:g=!0}m>0&&(12===C||13===C)&&(S=b())}17===C&&(S=n.keepLines&&m>0?b():n.insertFinalNewline?d:""),x(S,k,v.getTokenOffset()+o),E=C}return w}function Fh(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}function Ih(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}!function(e){e.DEFAULT={allowTrailingComma:!1}}(_h||(_h={})),function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(Rh||(Rh={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(Th||(Th={}));var Uh,zh=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_h.DEFAULT,r=null,a=[],o=[];function i(e){Array.isArray(a)?a.push(e):null!==r&&(a[r]=e)}var s={onObjectBegin:function(){var e={};i(e),o.push(a),a=e,r=null},onObjectProperty:function(e){r=e},onObjectEnd:function(){a=o.pop()},onArrayBegin:function(){var e=[];i(e),o.push(a),a=e,r=null},onArrayEnd:function(){a=o.pop()},onLiteralValue:i,onError:function(e,n,r){t.push({error:e,offset:n,length:r})}};return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_h.DEFAULT,r=Ch(e,!1),a=[],o=0;function i(e){return e?function(){return 0===o&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}function s(e){return e?function(t){return 0===o&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}function l(e){return e?function(t){return 0===o&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),function(){return a.slice()})}:function(){return!0}}function c(e){return e?function(){o>0?o++:!1===e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),function(){return a.slice()})&&(o=1)}:function(){return!0}}function u(e){return e?function(){o>0&&o--,0===o&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}var d=c(t.onObjectBegin),f=l(t.onObjectProperty),m=u(t.onObjectEnd),p=c(t.onArrayBegin),h=u(t.onArrayEnd),v=l(t.onLiteralValue),g=s(t.onSeparator),b=i(t.onComment),y=s(t.onError),w=n&&n.disallowComments,x=n&&n.allowTrailingComma;function E(){for(;;){var e=r.scan();switch(r.getTokenError()){case 4:N(14);break;case 5:N(15);break;case 3:N(13);break;case 1:w||N(11);break;case 2:N(12);break;case 6:N(16)}switch(e){case 12:case 13:w?N(10):b();break;case 16:N(1);break;case 15:case 14:break;default:return e}}}function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(y(e),t.length+n.length>0)for(var a=r.getToken();17!==a;){if(-1!==t.indexOf(a)){E();break}if(-1!==n.indexOf(a))break;a=E()}}function k(e){var t=r.getTokenValue();return e?v(t):(f(t),a.push(t)),E(),!0}function C(){switch(r.getToken()){case 11:var e=r.getTokenValue(),t=Number(e);isNaN(t)&&(N(2),t=0),v(t);break;case 7:v(null);break;case 8:v(!0);break;case 9:v(!1);break;default:return!1}return E(),!0}function S(){return 10!==r.getToken()?(N(3,[],[2,5]),!1):(k(!1),6===r.getToken()?(g(":"),E(),_()||N(4,[],[2,5])):N(5,[],[2,5]),a.pop(),!0)}function O(){d(),E();for(var e=!1;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||N(4,[],[]),g(","),E(),2===r.getToken()&&x)break}else e&&N(6,[],[]);S()||N(4,[],[2,5]),e=!0}return m(),2!==r.getToken()?N(7,[2],[]):E(),!0}function j(){p(),E();for(var e=!0,t=!1;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||N(4,[],[]),g(","),E(),4===r.getToken()&&x)break}else t&&N(6,[],[]);e?(a.push(0),e=!1):a[a.length-1]++,_()||N(4,[],[4,5]),t=!0}return h(),e||a.pop(),4!==r.getToken()?N(8,[4],[]):E(),!0}function _(){switch(r.getToken()){case 3:return j();case 1:return O();case 10:return k(!0);default:return C()}}if(E(),17===r.getToken())return!!n.allowEmptyContent||(N(4,[],[]),!1);if(!_())return N(4,[],[]),!1;17!==r.getToken()&&N(9,[],[])}(e,s,n),a[0]};function Bh(e,t){if(!t.length)return"JSON 格式不正确";var n=t[0],r=function(e,t){for(var n=1,r=1,a=Math.max(0,Math.min(t,e.length)),o=0;o<a;o++){"\n"===e.charAt(o)?(n++,r=1):r++}return{line:n,col:r}}(e,n.offset),a=r.line,o=r.col,i=function(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}(n.error);return"JSON 格式不正确(".concat(i,",行 ").concat(a," 列 ").concat(o,")")}function qh(e){if(null==e||""===e)return{ok:!0,value:null,pretty:"null",compact:"null"};try{if("string"!=typeof e)return{ok:!0,value:e,pretty:JSON.stringify(e,null,2),compact:JSON.stringify(e)};var t=e,n=[],r=zh(t,n,{allowTrailingComma:!0,disallowComments:!1});return n.length?{ok:!1,message:Bh(t,n),pretty:t,compact:t}:{ok:!0,value:r,pretty:JSON.stringify(r,null,2),compact:JSON.stringify(r)}}catch(t){var a="string"==typeof e?e:String(e);return{ok:!1,message:"JSON 格式不正确",pretty:a,compact:a}}}function Hh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=(e||"").toString(),r=[];if(zh(n,r,{allowTrailingComma:!0,disallowComments:!1}),r.length)return{ok:!1,message:Bh(n,r)};for(var a=function(e,t,n){return Lh(e,t,n)}(n,void 0,{insertSpaces:!0,tabSize:t}),o=n,i=a.length-1;i>=0;i--){var s=a[i];o=o.slice(0,s.offset)+s.content+o.slice(s.offset+s.length)}return{ok:!0,formatted:o}}function Wh(e){return Vh.apply(this,arguments)}function Vh(){return(Vh=w(_().m(function e(t){var n,r;return _().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:if(!(null===(n=null===navigator||void 0===navigator?void 0:navigator.clipboard)||void 0===n?void 0:n.writeText)){e.n=3;break}return e.n=2,navigator.clipboard.writeText(t);case 2:return e.a(2);case 3:(r=document.createElement("textarea")).value=t,r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r);case 4:return e.a(2)}},e)}))).apply(this,arguments)}function Kh(e){var t=e.value,n=e.title;if(null==t||""===t)return f.createElement("span",null,"-");var r,a=qh(t),o=a.ok,i=a.pretty,s=a.compact,l=s.length>80?s.slice(0,80)+"…":s;return f.createElement(hh,null,f.createElement(vh,{asChild:!0},f.createElement("button",{type:"button",className:"max-w-xs truncate text-left font-mono text-xs text-muted-foreground hover:underline",title:"点击查看 JSON"},l)),f.createElement(yh,{className:"max-w-3xl"},f.createElement(wh,null,f.createElement(Eh,null,n||"JSON")),f.createElement("div",{className:"flex items-center justify-end gap-2"},f.createElement(Pt,{variant:"outline",size:"sm",onClick:(r=w(_().m(function e(){return _().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Wh(i);case 1:vu.success("已复制 JSON"),e.n=3;break;case 2:e.p=2,e.v,vu.error("复制失败");case 3:return e.a(2)}},e,null,[[0,2]])})),function(){return r.apply(this,arguments)})},"复制")),f.createElement("pre",{className:"max-h-[60vh] overflow-auto rounded-md bg-muted p-3 text-xs font-mono whitespace-pre-wrap break-all"},i),!o&&f.createElement("div",{className:"text-xs text-destructive"},a.ok?"":a.message)))}function $h(e){e.id;var t=e.value;e.required;var n,r=e.disabled,s=e.onChange,l=A(f.useState(null),2),c=l[0],u=l[1];return f.createElement("div",{className:"space-y-2"},f.createElement("div",{className:"flex items-center justify-end gap-2"},f.createElement(Pt,{type:"button",variant:"outline",size:"sm",disabled:!!r,onClick:function(){if(!r){var e=(t||"").trim();if(e){var n=Hh(e,2);n.ok?(s(n.formatted),u(null)):u(n.message)}}}},"格式化"),f.createElement(Pt,{type:"button",variant:"outline",size:"sm",onClick:(n=w(_().m(function e(){return _().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Wh(t||"");case 1:vu.success("已复制"),e.n=3;break;case 2:e.p=2,e.v,vu.error("复制失败");case 3:return e.a(2)}},e,null,[[0,2]])})),function(){return n.apply(this,arguments)})},"复制")),f.createElement("div",{className:"w-full max-w-full overflow-hidden rounded-md border bg-background"},f.createElement(a,{className:"w-full max-w-full",editable:!r,value:t||"",height:"220px",basicSetup:{lineNumbers:!0,foldGutter:!0,highlightActiveLine:!0},extensions:[o.json(),i.EditorView.lineWrapping],onChange:function(e){r||(s(e),function(e){var t=(e||"").trim();if(!t)return u(null),!0;var n=qh(t);n.ok?u(null):u(n.message)}(e))}})),c&&f.createElement("div",{className:"text-xs text-destructive"},c))}function Yh(t){var n=t.value,r=t.onChange,a=t.disabled,o=void 0!==a&&a,i=function(e){o||e()},u=s.useEditor({extensions:[l.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1}),c],content:n||"",editable:!o,immediatelyRender:!1,onUpdate:function(e){var t=e.editor;r(t.getHTML())}});return e.useEffect(function(){if(u){var e=n||"";u.getHTML()!==e&&u.commands.setContent(e,{emitUpdate:!1})}},[u,n]),e.useEffect(function(){u&&u.setEditable(!o)},[u,o]),u?e.createElement("div",{className:"rounded-md border bg-background"},e.createElement("div",{className:"flex flex-wrap gap-1 border-b p-2"},e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm font-semibold disabled:cursor-not-allowed disabled:opacity-50",disabled:o,onMouseDown:function(e){e.preventDefault(),i(function(){return u.chain().focus().toggleBold().run()})}},"B"),e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm font-semibold italic disabled:cursor-not-allowed disabled:opacity-50",disabled:o,onMouseDown:function(e){e.preventDefault(),i(function(){return u.chain().focus().toggleItalic().run()})}},"I"),e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm font-semibold underline disabled:cursor-not-allowed disabled:opacity-50",disabled:o,onMouseDown:function(e){e.preventDefault(),i(function(){return u.chain().focus().toggleUnderline().run()})}},"U"),e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm font-semibold disabled:cursor-not-allowed disabled:opacity-50",disabled:o,onMouseDown:function(e){e.preventDefault(),i(function(){return u.chain().focus().toggleOrderedList().run()})}},"OL"),e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm font-semibold disabled:cursor-not-allowed disabled:opacity-50",disabled:o,onMouseDown:function(e){e.preventDefault(),i(function(){return u.chain().focus().toggleBulletList().run()})}},"UL"),e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm font-semibold disabled:cursor-not-allowed disabled:opacity-50",disabled:o,onMouseDown:function(e){e.preventDefault(),i(function(){return u.chain().focus().clearNodes().unsetAllMarks().run()})}},"Clear")),e.createElement(s.EditorContent,{editor:u,className:"min-h-[120px] px-3 py-2 [&_.ProseMirror]:min-h-[96px] [&_.ProseMirror]:outline-none [&_.ProseMirror_ul]:list-disc [&_.ProseMirror_ol]:list-decimal [&_.ProseMirror_ul]:pl-6 [&_.ProseMirror_ol]:pl-6"})):e.createElement("div",{className:"min-h-[120px] rounded-md border bg-background"})}function Gh(t){var n=t.value;return n?e.createElement("div",{className:"prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:n}}):e.createElement("span",{className:"text-muted-foreground"},"-")}function Jh(e){return Array.isArray(null==e?void 0:e.enum)&&e.enum.length>0}function Xh(e){return null==e?"":String(e)}function Zh(e,t){var n,r=Xh(t);return r?(null===(n=e.enumLabels)||void 0===n?void 0:n[r])||r:""}function Qh(e,t){var n=(e.enum||[]).map(function(t){return{value:t,valueKey:Xh(t),label:Zh(e,t)}}),r=Xh(t);return r?n.some(function(e){return e.valueKey===r})?n:[].concat(M(n),[{value:"number"==typeof t||"string"==typeof t?t:r,valueKey:r,label:r}]):n}function ev(e,t){var n=(e.enum||[]).find(function(e){return Xh(e)===t});return void 0!==n?n:t}!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(Uh||(Uh={}));var tv=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("div",{className:"relative w-full overflow-x-auto"},f.createElement("table",Object.assign({ref:t,className:gt("w-full min-w-max caption-bottom text-sm",n)},r)))});tv.displayName="Table";var nv=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("thead",Object.assign({ref:t,className:gt("[&_tr]:border-b",n)},r))});nv.displayName="TableHeader";var rv=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("tbody",Object.assign({ref:t,className:gt("[&_tr:last-child]:border-0",n)},r))});rv.displayName="TableBody",f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("tfoot",Object.assign({ref:t,className:gt("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",n)},r))}).displayName="TableFooter";var av=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("tr",Object.assign({ref:t,className:gt("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",n)},r))});av.displayName="TableRow";var ov=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("th",Object.assign({ref:t,className:gt("h-12 px-4 text-left align-middle font-medium text-muted-foreground whitespace-nowrap [&:has([role=checkbox])]:pr-0",n)},r))});ov.displayName="TableHead";var iv=f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("td",Object.assign({ref:t,className:gt("p-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",n)},r))});iv.displayName="TableCell",f.forwardRef(function(e,t){var n=e.className,r=z(e,["className"]);return f.createElement("caption",Object.assign({ref:t,className:gt("mt-4 text-sm text-muted-foreground",n)},r))}).displayName="TableCaption";var sv=At("inline-flex items-center rounded-full border px-3 py-1 text-xs font-bold transition-all duration-300",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-[0_2px_8px_-1px_rgba(93,112,82,0.15)] hover:scale-105",secondary:"border-transparent bg-secondary text-secondary-foreground shadow-[0_2px_8px_-1px_rgba(193,140,93,0.15)] hover:scale-105",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-[0_2px_8px_-1px_rgba(168,84,72,0.15)] hover:scale-105",outline:"text-foreground border-border"}},defaultVariants:{variant:"default"}});function lv(e){var t=e.className,n=e.variant,r=z(e,["className","variant"]);return f.createElement("div",Object.assign({className:gt(sv({variant:n}),t)},r))}function cv(){return"".concat(Date.now(),"_").concat(Math.random().toString(16).slice(2))}function uv(e){var t,n=(null==e?void 0:e.type)||"string";return(null===(t=null==e?void 0:e.enum)||void 0===t?void 0:t.length)?[{value:"eq",label:"等于"},{value:"neq",label:"不等于"},{value:"in",label:"属于(多个)"},{value:"isNull",label:"为空(NULL)"}]:"integer"===n||"float"===n?[{value:"eq",label:"等于"},{value:"neq",label:"不等于"},{value:"gt",label:"大于"},{value:"gte",label:"大于等于"},{value:"lt",label:"小于"},{value:"lte",label:"小于等于"},{value:"in",label:"属于(多个)"},{value:"isNull",label:"为空(NULL)"}]:"boolean"===n?[{value:"eq",label:"等于"},{value:"neq",label:"不等于"},{value:"isNull",label:"为空(NULL)"}]:"date"===n||"datetime"===n?[{value:"eq",label:"等于"},{value:"neq",label:"不等于"},{value:"gt",label:"晚于/大于"},{value:"gte",label:"晚于等于/大于等于"},{value:"lt",label:"早于/小于"},{value:"lte",label:"早于等于/小于等于"},{value:"isNull",label:"为空(NULL)"}]:[{value:"contains",label:"包含"},{value:"startsWith",label:"开头是"},{value:"endsWith",label:"结尾是"},{value:"eq",label:"等于"},{value:"neq",label:"不等于"},{value:"in",label:"属于(多个)"},{value:"isNull",label:"为空(NULL)"}]}function dv(t){var n,r,a=e.useMemo(function(){var e=[];e.push.apply(e,M([{column:"id",label:"ID",type:"id"},{column:"created_at",label:"创建时间",type:"datetime"},{column:"updated_at",label:"更新时间",type:"datetime"}]));var n,r=C(t.fields||[]);try{for(r.s();!(n=r.n()).done;){var a=n.value;if((null==a?void 0:a.name)&&("json"!==a.type&&"jsonb"!==a.type))if("relation"===a.type&&a.relation){var o=a.relation.foreignKey||"".concat(a.relation.target,"_id");e.push({column:o,label:"".concat(a.comment||a.name,"(关联)"),type:"relation"})}else e.push({column:a.name,label:a.comment||a.name,type:a.type,enum:Jh(a)?M(a.enum||[]):void 0,enumLabels:a.enumLabels})}}catch(e){r.e(e)}finally{r.f()}var i=new Set;return e.filter(function(e){return!i.has(e.column)&&(i.add(e.column),!0)})},[t.fields]),o=e.useMemo(function(){return new Map(a.map(function(e){return[e.column,e]}))},[a]),i=e.useMemo(function(){return new Map(a.map(function(e){return[e.column,e.type]}))},[a]),s=A(e.useState([]),2),l=s[0],c=s[1];e.useEffect(function(){c(function(e,t){return(e||[]).map(function(e){if(t.get(e.column),"is"===e.operator&&(null===e.value||"null"===e.value))return{id:cv(),column:e.column,operator:"isNull",value:""};if(("ilike"===e.operator||"like"===e.operator)&&"string"==typeof e.value){var n=e.value;if(n.startsWith("%")&&n.endsWith("%")&&n.length>=2)return{id:cv(),column:e.column,operator:"contains",value:n.slice(1,-1)};if(n.endsWith("%"))return{id:cv(),column:e.column,operator:"startsWith",value:n.slice(0,-1)};if(n.startsWith("%"))return{id:cv(),column:e.column,operator:"endsWith",value:n.slice(1)}}if("in"===e.operator){var r=Array.isArray(e.value)?e.value:[];return{id:cv(),column:e.column,operator:"in",value:r.join(",")}}return{id:cv(),column:e.column,operator:["eq","neq","gt","gte","lt","lte"].includes(e.operator)?e.operator:"eq",value:void 0===e.value||null===e.value?"":String(e.value)}})}(t.value||[],i))},[JSON.stringify(t.value),a.length]);var u=function(e,t){c(function(n){return n.map(function(n){var r;if(n.id!==e)return n;var a=Object.assign(Object.assign({},n),t);if(t.column&&t.column!==n.column){var i=uv(o.get(t.column));a.operator=(null===(r=i[0])||void 0===r?void 0:r.value)||"eq",a.value=""}return t.operator&&"isNull"===t.operator&&(a.value=""),a})})};return e.createElement("div",{className:"space-y-3"},e.createElement("div",{className:"flex items-center justify-between gap-3"},e.createElement(Xc,{className:"text-base font-medium flex items-center gap-2"},e.createElement(ae,{className:"h-4 w-4"}),"动态筛选"),e.createElement("div",{className:"flex items-center gap-2"},(null===(n=t.value)||void 0===n?void 0:n.length)>0&&e.createElement(lv,{variant:"secondary"},"已应用 ",t.value.length," 条"),e.createElement(Pt,{type:"button",variant:"outline",size:"sm",onClick:function(){var e=a[0];if(e){var t=uv(e);c(function(n){var r;return[].concat(M(n),[{id:cv(),column:e.column,operator:(null===(r=t[0])||void 0===r?void 0:r.value)||"eq",value:""}])})}}},e.createElement(me,{className:"h-4 w-4 mr-1"}),"添加条件"))),0===l.length?e.createElement("div",{className:"text-sm text-muted-foreground border rounded-lg p-3 bg-muted/20"},"暂无筛选条件(可添加条件后点击“应用”)"):e.createElement("div",{className:"space-y-2"},l.map(function(t){var n,r,i=o.get(t.column),s=(null==i?void 0:i.type)||"string",l=uv(i),d="isNull"!==t.operator,f=(null===(n=null==i?void 0:i.enum)||void 0===n?void 0:n.length)&&"in"!==t.operator?Qh({enum:i.enum,enumLabels:i.enumLabels},t.value):[];return e.createElement("div",{key:t.id,className:"grid grid-cols-12 gap-2 items-center"},e.createElement("div",{className:"col-span-5"},e.createElement(Ip,{value:t.column,onValueChange:function(e){return u(t.id,{column:e})}},e.createElement(zp,{className:"h-10"},e.createElement(Up,{placeholder:"字段"})),e.createElement(Hp,null,a.map(function(t){return e.createElement(Wp,{key:t.column,value:t.column},t.label," (",t.column,")")})))),e.createElement("div",{className:"col-span-3"},e.createElement(Ip,{value:t.operator,onValueChange:function(e){return u(t.id,{operator:e})}},e.createElement(zp,{className:"h-10"},e.createElement(Up,{placeholder:"操作符"})),e.createElement(Hp,null,l.map(function(t){return e.createElement(Wp,{key:t.value,value:t.value},t.label)})))),e.createElement("div",{className:"col-span-3"},d?(null===(r=null==i?void 0:i.enum)||void 0===r?void 0:r.length)&&"in"!==t.operator?e.createElement(Ip,{value:t.value,onValueChange:function(e){return u(t.id,{value:e})}},e.createElement(zp,{className:"h-10"},e.createElement(Up,{placeholder:"值"})),e.createElement(Hp,null,f.map(function(t){return e.createElement(Wp,{key:t.valueKey,value:t.valueKey},t.label)}))):"boolean"===s?e.createElement(Ip,{value:t.value,onValueChange:function(e){return u(t.id,{value:e})}},e.createElement(zp,{className:"h-10"},e.createElement(Up,{placeholder:"值"})),e.createElement(Hp,null,e.createElement(Wp,{value:"true"},"true"),e.createElement(Wp,{value:"false"},"false"))):e.createElement(Dt,{className:"h-10",placeholder:"in"===t.operator?"多个值用逗号分隔":"值",type:"integer"===s||"float"===s?"number":"date"===s?"date":"datetime"===s?"datetime-local":"text",value:t.value,onChange:function(e){return u(t.id,{value:e.target.value})}}):e.createElement("div",{className:"h-10 flex items-center text-sm text-muted-foreground"},"无需填写")),e.createElement("div",{className:"col-span-1 flex justify-end"},e.createElement(Pt,{type:"button",variant:"ghost",size:"sm",className:"h-9 w-9 p-0",onClick:function(){return e=t.id,void c(function(t){return t.filter(function(t){return t.id!==e})});var e}},e.createElement(Ee,{className:"h-4 w-4"}))))})),e.createElement("div",{className:"flex items-center justify-end gap-2"},e.createElement(Pt,{type:"button",variant:"outline",onClick:function(){c([]),t.onChange([])},disabled:0===l.length&&0===((null===(r=t.value)||void 0===r?void 0:r.length)||0)},"清空"),e.createElement(Pt,{type:"button",onClick:function(){var e=function(e,t){var n,r,a=[],o=C(e);try{for(o.s();!(r=o.n()).done;){var i=r.value,s=t.get(i.column);if(s&&i.operator)if("isNull"!==i.operator){var l=null!==(n=i.value)&&void 0!==n?n:"",c=String(l).trim();if(c)if("contains"!==i.operator)if("startsWith"!==i.operator)if("endsWith"!==i.operator)if("in"!==i.operator)a.push({column:s.column,operator:i.operator,value:c});else{var u=c.split(",").map(function(e){return e.trim()}).filter(Boolean);a.push({column:s.column,operator:"in",value:u})}else a.push({column:s.column,operator:"ilike",value:"%".concat(c)});else a.push({column:s.column,operator:"ilike",value:"".concat(c,"%")});else a.push({column:s.column,operator:"ilike",value:"%".concat(c,"%")})}else a.push({column:s.column,operator:"is",value:null})}}catch(e){o.e(e)}finally{o.f()}return a}(l,o);t.onChange(e)},disabled:0===l.length},"应用")))}function fv(){var t,n=A(e.useState([]),2),r=n[0],a=n[1],o=A(e.useState(null),2),i=o[0],s=o[1],l=A(e.useState([]),2),c=l[0],d=l[1],f=A(e.useState(!1),2),m=f[0],p=f[1],h=A(e.useState(!1),2),v=h[0],g=h[1],b=A(e.useState(null),2),y=b[0],x=b[1],E=A(e.useState({}),2),N=E[0],k=E[1],C=A(e.useState(1),2),O=C[0],j=C[1],R=A(e.useState(10),2),T=R[0];R[1];var M=A(e.useState(0),2),P=M[0],D=M[1],L=A(e.useState(""),2),F=L[0],I=L[1],U=A(e.useState(!1),2),z=U[0],B=U[1],q=A(e.useState(null),2),H=q[0],W=q[1],V=A(e.useState(!0),2),K=V[0],$=V[1],J=A(e.useState([]),2),X=J[0],Z=J[1],Q=A(e.useState(!1),2),ee=Q[0],te=Q[1],ne=function(e){return Array.isArray(e)?e:Array.isArray(null==e?void 0:e.models)?e.models:Array.isArray(null==e?void 0:e.data)?e.data:Array.isArray(null==e?void 0:e.items)?e.items:[]},re=function(e){var t;if(e&&Array.isArray(e.data)){var n="number"==typeof e.total?e.total:"number"==typeof(null===(t=e.pagination)||void 0===t?void 0:t.total)?e.pagination.total:e.data.length;return{rows:e.data,total:n}}if(e&&Array.isArray(e.rows)){var r="number"==typeof e.total?e.total:e.rows.length;return{rows:e.rows,total:r}}return Array.isArray(e)?{rows:e,total:e.length}:{rows:[],total:0}},oe=function(e){return!e||!e.readOnly&&!1!==e.editable};e.useEffect(function(){ie()},[]),e.useEffect(function(){i&&se()},[i,O,T,F,X]);var ie=function(){var e=w(_().m(function e(){var t;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:return $(!0),e.p=1,e.n=2,Qf();case 2:t=e.v,a(ne(t.data)),e.n=4;break;case 3:e.p=3,e.v,vu.error("加载模型列表失败");case 4:return e.p=4,$(!1),e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}));return function(){return e.apply(this,arguments)}}(),se=function(){var e=w(_().m(function e(){var t,n,r,a;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if(i){e.n=1;break}return e.a(2);case 1:return p(!0),e.p=2,t={page:O,limit:T},F&&(t.search=F),X.length>0&&(t.filters=X),e.n=3,lm(i.table_name,t);case 3:if((n=e.v).success){e.n=4;break}return vu.error(n.message||"加载数据失败"),d([]),D(0),e.a(2);case 4:r=re(n.data),d(r.rows),D(r.total),e.n=6;break;case 5:e.p=5,a=e.v,vu.error(a instanceof Error?a.message:"加载数据失败"),d([]),D(0);case 6:return e.p=6,p(!1),e.f(6);case 7:return e.a(2)}},e,null,[[2,5,6,7]])}));return function(){return e.apply(this,arguments)}}(),ce=function(){var e=w(_().m(function e(t){var n;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if(confirm("确定要删除这条数据吗?此操作不可撤销。")){e.n=1;break}return e.a(2);case 1:return W(t.id),e.p=2,e.n=3,fm(null==i?void 0:i.table_name,t.id);case 3:(n=e.v).success?(vu.success("删除成功"),se()):vu.error(n.message||"删除失败"),e.n=5;break;case 4:e.p=4,e.v,vu.error("删除失败");case 5:return e.p=5,W(null),e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(t){return e.apply(this,arguments)}}(),ue=function(){var e=w(_().m(function e(){var t,n,r,a,o,s;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if(i){e.n=1;break}return e.a(2);case 1:if(B(!0),e.p=2,!(t=Jf(i.json_schema.fields,N))){e.n=3;break}throw new Error("字段 ".concat(t.comment||t.name," 为必填项"));case 3:if(n={},i.json_schema.fields.forEach(function(e){if("id"!==e.name&&oe(e)){var t=N[e.name];if("date"!==e.type&&"datetime"!==e.type||(t=t?new Date(t).toISOString():null),"json"===e.type||"jsonb"===e.type){var r=(t||"").toString().trim();if(r){var a=qh(r);if(!a.ok)throw new Error("字段 ".concat(e.comment||e.name,":").concat(a.message));t=a.value}else t=null}n[e.name]=t}}),!y){e.n=5;break}return e.n=4,dm(i.table_name,Object.assign(Object.assign({},n),{id:y.id}));case 4:(r=e.v).success?(vu.success("更新成功"),g(!1),se()):vu.error(r.message||"更新失败"),e.n=7;break;case 5:return e.n=6,um(i.table_name,n);case 6:(a=e.v).success?(vu.success("创建成功"),g(!1),se()):vu.error(a.message||"创建失败");case 7:e.n=9;break;case 8:e.p=8,s=e.v,o=s instanceof Error?s.message:"操作失败",vu.error(o);case 9:return e.p=9,B(!1),e.f(9);case 10:return e.a(2)}},e,null,[[2,8,9,10]])}));return function(){return e.apply(this,arguments)}}();return e.createElement("div",{className:"min-h-[calc(100vh-4rem)] bg-gradient-to-br from-background via-background to-muted/20"},e.createElement("div",{className:"container mx-auto px-6 py-8 space-y-6"},e.createElement("div",{className:"space-y-2"},e.createElement("h1",{className:"text-3xl font-bold tracking-tight"},"数据列表"),e.createElement("p",{className:"text-muted-foreground"},"选择模型查看和管理数据")),e.createElement(Zc,{className:"border-2 shadow-lg"},e.createElement(Qc,{className:"bg-muted/30"},e.createElement("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4"},e.createElement("div",null,e.createElement(eu,null,"数据管理"),e.createElement(tu,null,"选择数据模型进行查看和管理")),i&&e.createElement(Pt,{onClick:function(){x(null),k({}),g(!0)},className:"w-full md:w-auto"},e.createElement(me,{className:"h-4 w-4 mr-2"}),"新建数据"))),e.createElement(nu,{className:"space-y-6 pt-6"},e.createElement("div",{className:"flex flex-col md:flex-row gap-4"},e.createElement("div",{className:"flex-1 space-y-2"},e.createElement(Xc,{htmlFor:"model",className:"text-base font-medium flex items-center gap-2"},e.createElement(ae,{className:"h-4 w-4"}),"选择数据模型"),e.createElement(Ip,{value:(null===(t=null==i?void 0:i.id)||void 0===t?void 0:t.toString())||"",onValueChange:function(e){var t=r.find(function(t){return t.id.toString()===e});s(t||null),j(1),I(""),Z([])},disabled:K},e.createElement(zp,{className:"h-11"},K?e.createElement("div",{className:"flex items-center gap-2"},e.createElement(le,{className:"h-4 w-4 animate-spin"}),e.createElement("span",null,"加载中...")):e.createElement(Up,{placeholder:"请选择模型"})),e.createElement(Hp,null,r.map(function(t){return e.createElement(Wp,{key:t.id,value:t.id.toString()},t.name," (",t.table_name,")")})))),i&&e.createElement("div",{className:"flex-1 space-y-2"},e.createElement(Xc,{htmlFor:"search",className:"text-base font-medium flex items-center gap-2"},e.createElement(pe,{className:"h-4 w-4"}),"搜索"),e.createElement("div",{className:"relative"},e.createElement(pe,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.createElement(Dt,{id:"search",placeholder:"搜索数据...",value:F,onChange:function(e){return I(e.target.value)},className:"pl-10 h-11"})))),i&&e.createElement(e.Fragment,null,e.createElement("div",{className:"flex items-center justify-end"},e.createElement(Pt,{type:"button",variant:"outline",className:"h-10",onClick:function(){return te(!0)}},e.createElement(ae,{className:"h-4 w-4 mr-2"}),"筛选",X.length>0?"(".concat(X.length,")"):"")),e.createElement("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50 border"},e.createElement("div",{className:"text-sm text-muted-foreground"},"共"," ",e.createElement("span",{className:"font-semibold text-foreground"},P)," ","条数据"),e.createElement(lv,{variant:"outline"},i.name)),e.createElement("div",{className:"rounded-lg border overflow-hidden"},e.createElement("div",{className:"overflow-x-auto"},e.createElement(tv,null,e.createElement(nv,null,e.createElement(av,{className:"bg-muted/50"},e.createElement(ov,{className:"font-semibold w-20"},"ID"),i.json_schema.fields.map(function(t){return e.createElement(ov,{key:t.name,className:"font-semibold"},t.comment||t.name)}),e.createElement(ov,{className:"font-semibold"},"创建时间"),e.createElement(ov,{className:"font-semibold"},"更新时间"),e.createElement(ov,{className:"font-semibold w-32 text-center"},"操作"))),e.createElement(rv,null,m?Array.from({length:1}).map(function(t,n){return e.createElement(av,{key:n},e.createElement(iv,{colSpan:i.json_schema.fields.length+4},e.createElement("div",{className:"flex items-center gap-2 py-4"},e.createElement(le,{className:"h-4 w-4 animate-spin text-muted-foreground"}),e.createElement("span",{className:"text-sm text-muted-foreground"},"加载中..."))))}):0===c.length?e.createElement(av,null,e.createElement(iv,{colSpan:i.json_schema.fields.length+4,className:"text-center py-12"},e.createElement("div",{className:"flex flex-col items-center gap-2 text-muted-foreground"},e.createElement(pe,{className:"h-8 w-8"}),e.createElement("p",null,"暂无数据")))):c.map(function(t,n){return e.createElement(av,{key:t.id,className:n%2==0?"bg-muted/20":""},e.createElement(iv,{className:"font-mono font-medium"},t.id),i.json_schema.fields.map(function(n){return e.createElement(iv,{key:n.name},function(t,n){return Jh(t)?Zh(t,n)||"-":"asset"===t.type?e.createElement(mh,{url:n,emptyText:"-",className:"w-[360px] max-w-full"}):"boolean"===t.type?e.createElement(lv,{variant:n?"default":"secondary"},n?"是":"否"):"date"===t.type||"datetime"===t.type?n?u(n).format("YYYY-MM-DD HH:mm:ss"):"-":"text"===t.type?e.createElement(Gh,{value:n||""}):"json"===t.type||"jsonb"===t.type?e.createElement(Kh,{value:n,title:t.comment||t.name}):null==n||""===n?"-":n}(n,t[n.name]))}),e.createElement(iv,{className:"text-sm text-muted-foreground"},u(t.created_at).format("YYYY-MM-DD HH:mm")),e.createElement(iv,{className:"text-sm text-muted-foreground"},u(t.updated_at).format("YYYY-MM-DD HH:mm")),e.createElement(iv,null,e.createElement("div",{className:"flex items-center justify-center gap-2"},e.createElement(Pt,{variant:"ghost",size:"sm",onClick:function(){return function(e){x(e);var t={};null==i||i.json_schema.fields.forEach(function(n){if("id"!==n.name){var r=e[n.name];"date"!==n.type&&"datetime"!==n.type||(r=r?u(r).format("YYYY-MM-DDTHH:mm"):""),"json"!==n.type&&"jsonb"!==n.type||(r=null==r||""===r?"":"string"==typeof r?r:JSON.stringify(r,null,2)),t[n.name]=r}}),k(t),g(!0)}(t)},className:"h-8 w-8 p-0"},e.createElement(ve,{className:"h-4 w-4"})),e.createElement(Pt,{variant:"ghost",size:"sm",onClick:function(){return ce(t)},disabled:H===t.id,className:"h-8 w-8 p-0 text-destructive hover:text-destructive"},H===t.id?e.createElement(le,{className:"h-4 w-4 animate-spin"}):e.createElement(be,{className:"h-4 w-4"})))))}))))),P>T&&e.createElement("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50 border"},e.createElement("div",{className:"text-sm text-muted-foreground"},"第"," ",e.createElement("span",{className:"font-semibold text-foreground"},O)," ","页, 共"," ",e.createElement("span",{className:"font-semibold text-foreground"},Math.ceil(P/T))," ","页"),e.createElement("div",{className:"flex gap-2"},e.createElement(Pt,{variant:"outline",size:"sm",onClick:function(){return j(Math.max(1,O-1))},disabled:1===O||m},e.createElement(Y,{className:"h-4 w-4 mr-1"}),"上一页"),e.createElement(Pt,{variant:"outline",size:"sm",onClick:function(){return j(Math.min(Math.ceil(P/T),O+1))},disabled:O>=Math.ceil(P/T)||m},"下一页",e.createElement(G,{className:"h-4 w-4 ml-1"}))))))),i&&e.createElement(hh,{open:ee,onOpenChange:te},e.createElement(yh,{className:"max-w-3xl"},e.createElement(wh,null,e.createElement(Eh,{className:"text-xl"},"筛选"),e.createElement(kh,{className:"text-sm"},i.name," - ",i.table_name)),e.createElement("div",{className:"py-2"},e.createElement(dv,{fields:i.json_schema.fields,value:X,onChange:function(e){Z(e),j(1)}})),e.createElement(xh,{className:"gap-2"},e.createElement(Pt,{variant:"outline",onClick:function(){return te(!1)}},"关闭")))),e.createElement(hh,{open:v,onOpenChange:g},e.createElement(yh,{className:"max-w-3xl max-h-[85vh] overflow-y-auto"},e.createElement(wh,null,e.createElement(Eh,{className:"text-2xl"},y?"编辑数据":"新建数据"),e.createElement(kh,{className:"text-base"},null==i?void 0:i.name," - ",null==i?void 0:i.table_name)),e.createElement("div",{className:"space-y-4 py-4"},null==i?void 0:i.json_schema.fields.map(function(t){return function(t){if("id"===t.name)return null;var n=oe(t);if(Jh(t)){var r=N[t.name],a=Qh(t,r),o=Xh(r);return e.createElement("div",{key:t.name,className:"space-y-2"},e.createElement(Xc,{htmlFor:t.name,className:"text-base font-medium"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Ip,{value:o,disabled:!n,onValueChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,ev(t,e))))}},e.createElement(zp,{className:"h-11"},e.createElement(Up,{placeholder:"请选择".concat(t.comment||t.name)})),e.createElement(Hp,null,a.map(function(t){return e.createElement(Wp,{key:t.valueKey,value:t.valueKey},t.label)}))))}switch(t.type){case"boolean":return e.createElement("div",{key:t.name,className:"flex items-center space-x-3 p-4 rounded-lg border bg-card"},e.createElement(rh,{id:t.name,checked:N[t.name]||!1,disabled:!n,onCheckedChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e)))}}),e.createElement(Xc,{htmlFor:t.name,className:"text-base font-medium cursor-pointer"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")));case"date":return e.createElement("div",{key:t.name,className:"space-y-2"},e.createElement(Xc,{htmlFor:t.name,className:"text-base font-medium"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Dt,{id:t.name,type:"date",value:N[t.name]||"",disabled:!n,onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e.target.value)))},required:t.required,className:"h-11"}));case"datetime":return e.createElement("div",{key:t.name,className:"space-y-2"},e.createElement(Xc,{htmlFor:t.name,className:"text-base font-medium"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Dt,{id:t.name,type:"datetime-local",value:N[t.name]||"",disabled:!n,onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e.target.value)))},required:t.required,className:"h-11"}));case"text":return e.createElement("div",{key:t.name,className:"space-y-2"},e.createElement(Xc,{htmlFor:t.name,className:"text-base font-medium"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Yh,{value:N[t.name]||"",onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e)))},disabled:!n}));case"json":case"jsonb":return e.createElement("div",{key:t.name,className:"space-y-2"},e.createElement(Xc,{htmlFor:t.name,className:"text-base font-medium"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement($h,{id:t.name,value:N[t.name]||"",required:t.required,disabled:!n,onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e)))}}));case"asset":return e.createElement(ph,{key:t.name,field:t,model:i,value:N[t.name]||"",disabled:!n,onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e)))}});case"integer":case"float":return e.createElement("div",{key:t.name,className:"space-y-2"},e.createElement(Xc,{htmlFor:t.name,className:"text-base font-medium"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Dt,{id:t.name,type:"number",value:N[t.name]||"",disabled:!n,onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e.target.value)))},required:t.required,className:"h-11"}));default:return e.createElement("div",{key:t.name,className:"space-y-2"},e.createElement(Xc,{htmlFor:t.name,className:"text-base font-medium"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Dt,{id:t.name,type:"email"===t.type?"email":"text",maxLength:t.maxLength,value:N[t.name]||"",disabled:!n,onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e.target.value)))},required:t.required,className:"h-11"}))}}(t)})),e.createElement(xh,{className:"gap-2"},e.createElement(Pt,{variant:"outline",onClick:function(){return g(!1)},disabled:z},"取消"),e.createElement(Pt,{onClick:ue,disabled:z},z?e.createElement(e.Fragment,null,e.createElement(le,{className:"h-4 w-4 mr-2 animate-spin"}),y?"更新中...":"创建中..."):y?"更新":"创建"))))))}function mv(){var e=Vf();if(e)return e;try{return localStorage.getItem("cms_session_id")||void 0}catch(e){return}}function pv(e,t){return e instanceof Error&&e.message?e.message:t}function hv(t){var n=t.model,r=gm(),a=n,o=A(e.useState([]),2),i=o[0],s=o[1],l=A(e.useState(!1),2),c=l[0],d=l[1],f=A(e.useState(!1),2),m=f[0],p=f[1],h=A(e.useState(!1),2),v=h[0],g=h[1],b=A(e.useState(null),2),y=b[0],x=b[1],E=A(e.useState({}),2),N=E[0],k=E[1],C=A(e.useState(1),2),O=C[0],j=C[1],R=A(e.useState(10),2),T=R[0];R[1];var M=A(e.useState(0),2),P=M[0],D=M[1],L=A(e.useState(""),2),F=L[0],I=L[1],U=A(e.useState(!1),2),z=U[0],B=U[1],q=A(e.useState(null),2),H=q[0],W=q[1],V=A(e.useState({}),2),K=V[0],$=V[1],J=A(e.useState([]),2),X=J[0],Z=J[1],ee=e.useMemo(function(){return X.length?JSON.stringify(X):""},[X]),te=function(e){return!e.readOnly&&!1!==e.editable};e.useEffect(function(){a&&re()},[null==a?void 0:a.table_name,O,T,F,ee]);var ne=function(){var e=w(_().m(function e(t){var n,a,o,i,s,l;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if("relation"===t.type&&t.relation){e.n=1;break}return e.a(2);case 1:if(n=t.relation,a=n.target,o=n.displayField,i="".concat(a,"_").concat(o||"name"),!K[i]){e.n=2;break}return e.a(2);case 2:return e.p=2,e.n=3,cm($f(a,mv()),{displayField:o||"name",limit:200});case 3:(s=e.v).success&&s.data&&$(function(e){return Object.assign(Object.assign({},e),S({},i,s.data))}),e.n=5;break;case 4:e.p=4,l=e.v,vu.error(pv(l,r("data.loadFailed")));case 5:return e.a(2)}},e,null,[[2,4]])}));return function(t){return e.apply(this,arguments)}}();e.useEffect(function(){m&&a&&a.json_schema.fields.filter(function(e){return"relation"===e.type&&e.relation}).forEach(function(e){return ne(e)})},[m,a]);var re=function(){var e=w(_().m(function e(){var t,n,o,i,l;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if(a){e.n=1;break}return e.a(2);case 1:return d(!0),e.p=2,o={page:O,limit:T},F&&(o.search=F),X.length>0&&(o.filters=X),e.n=3,lm(a.table_name,o);case 3:if((i=e.v).success){e.n=4;break}return vu.error(i.message||r("data.loadFailed")),s([]),D(0),e.a(2);case 4:s((null===(t=i.data)||void 0===t?void 0:t.data)||[]),D((null===(n=i.data)||void 0===n?void 0:n.total)||0),e.n=6;break;case 5:e.p=5,l=e.v,vu.error(pv(l,r("data.loadFailed"))),s([]),D(0);case 6:return e.p=6,d(!1),e.f(6);case 7:return e.a(2)}},e,null,[[2,5,6,7]])}));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=w(_().m(function e(t){var n;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if(confirm(r("data.deleteConfirmFull"))){e.n=1;break}return e.a(2);case 1:return W(t.id),e.p=2,e.n=3,fm(null==a?void 0:a.table_name,t.id);case 3:(n=e.v).success?(vu.success(r("data.deleteSuccess")),re()):vu.error(n.message||r("data.deleteFailed")),e.n=5;break;case 4:e.p=4,e.v,vu.error(r("data.deleteFailed"));case 5:return e.p=5,W(null),e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=w(_().m(function e(){var t,n,o,i,s,l,c;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if(a){e.n=1;break}return e.a(2);case 1:if(B(!0),e.p=2,!(t=Jf(a.json_schema.fields,N))){e.n=3;break}throw new Error("".concat(r("data.fieldError")," ").concat(t.comment||t.name," ").concat(r("validation.required")));case 3:if(n={},a.json_schema.fields.forEach(function(e){if("id"!==e.name&&te(e))if("relation"===e.type&&e.relation){var t=e.relation.foreignKey||"".concat(e.relation.target,"_id");n[t]=N[t]}else{var a=N[e.name];if("date"!==e.type&&"datetime"!==e.type||(a=a?new Date(a).toISOString():null),"json"===e.type||"jsonb"===e.type){var o=(a||"").toString().trim();if(o){var i=qh(o);if(!i.ok)throw new Error("".concat(r("data.fieldError")," ").concat(e.comment||e.name,":").concat(i.message));a=i.value}else a=null}n[e.name]=a}}),!y){e.n=5;break}return o=Object.assign(Object.assign({},n),{id:y.id}),e.n=4,dm(a.table_name,o);case 4:(i=e.v).success?(vu.success(r("data.updateSuccess")),p(!1),re()):vu.error(i.message||r("data.updateFailed")),e.n=7;break;case 5:return e.n=6,um(a.table_name,n);case 6:(s=e.v).success?(vu.success(r("data.createSuccess")),p(!1),re()):vu.error(s.message||r("data.createFailed"));case 7:e.n=9;break;case 8:e.p=8,c=e.v,l=c instanceof Error?c.message:r("data.operationFailed"),vu.error(l);case 9:return e.p=9,B(!1),e.f(9);case 10:return e.a(2)}},e,null,[[2,8,9,10]])}));return function(){return e.apply(this,arguments)}}();return a?e.createElement("div",{className:"min-h-[calc(100vh-4rem)] bg-gradient-to-br from-background via-background to-muted/20"},e.createElement("div",{className:"w-full py-4 space-y-4"},e.createElement("div",{className:"space-y-1"},e.createElement("div",{className:"flex items-center gap-3"},e.createElement("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-lg bg-primary/10 text-primary"},e.createElement(Q,{className:"h-4 w-4"})),e.createElement("div",null,e.createElement("h1",{className:"text-2xl font-bold tracking-tight leading-tight"},a.name),e.createElement("p",{className:"text-sm text-muted-foreground"},r("data.tableName"),": ",a.table_name)))),e.createElement(Zc,{className:"border-2 shadow-lg"},e.createElement(Qc,{className:"bg-muted/30"},e.createElement("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4"},e.createElement("div",null,e.createElement(eu,null,r("data.dataManagement")),e.createElement(tu,null,r("data.viewAndManage")," ",a.name," ",r("data.ofData"))),e.createElement(Pt,{onClick:function(){x(null),k({}),p(!0)},className:"w-full md:w-auto"},e.createElement(me,{className:"h-4 w-4 mr-2"}),r("data.newRecord")))),e.createElement(nu,{className:"space-y-4 pt-4"},e.createElement("div",{className:"flex flex-col md:flex-row md:items-center gap-3"},e.createElement("div",{className:"flex-1"},e.createElement(Xc,{htmlFor:"search",className:"sr-only"},r("common.search")),e.createElement("div",{className:"relative"},e.createElement(pe,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.createElement(Dt,{id:"search",placeholder:r("data.searchData"),value:F,onChange:function(e){return I(e.target.value)},className:"pl-10 h-10"}))),e.createElement(Pt,{type:"button",variant:"outline",className:"h-10",onClick:function(){return g(!0)}},e.createElement(ae,{className:"h-4 w-4 mr-2"}),r("common.filter"),X.length>0?"(".concat(X.length,")"):"")),e.createElement("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50 border"},e.createElement("div",{className:"text-sm text-muted-foreground"},r("data.totalCount")," ",e.createElement("span",{className:"font-semibold text-foreground"},P)," ",r("data.records")),e.createElement(lv,{variant:"outline"},a.name)),e.createElement("div",{className:"rounded-lg border overflow-hidden"},e.createElement(tv,null,e.createElement(nv,null,e.createElement(av,{className:"bg-muted/50"},e.createElement(ov,{className:"font-semibold w-20"},"ID"),a.json_schema.fields.map(function(t){return e.createElement(ov,{key:t.name,className:"font-semibold"},t.comment||t.name)}),e.createElement(ov,{className:"font-semibold"},r("data.createdAt")),e.createElement(ov,{className:"font-semibold"},r("data.updatedAt")),e.createElement(ov,{className:gt("font-semibold w-32 text-center sticky right-0 z-30 bg-background","before:content-[''] before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border","after:content-[''] after:absolute after:inset-y-0 after:left-[-16px] after:w-4 after:bg-gradient-to-l after:from-background after:to-transparent","shadow-[-10px_0_16px_-14px_rgba(0,0,0,0.35)]")},r("common.actions")))),e.createElement(rv,null,c?Array.from({length:1}).map(function(t,n){return e.createElement(av,{key:n},e.createElement(iv,{colSpan:a.json_schema.fields.length+4},e.createElement("div",{className:"flex items-center gap-2 py-4"},e.createElement(le,{className:"h-4 w-4 animate-spin text-muted-foreground"}),e.createElement("span",{className:"text-sm text-muted-foreground"},r("common.loading")))))}):0===i.length?e.createElement(av,null,e.createElement(iv,{colSpan:a.json_schema.fields.length+4,className:"text-center py-12"},e.createElement("div",{className:"flex flex-col items-center gap-2 text-muted-foreground"},e.createElement(pe,{className:"h-8 w-8"}),e.createElement("p",null,r("data.noData"))))):i.map(function(t,n){return e.createElement(av,{key:t.id,className:gt("group hover:bg-muted",n%2==0?"bg-muted/20":"")},e.createElement(iv,{className:"font-mono font-medium max-w-[220px] truncate",title:String(t.id)},t.id),a.json_schema.fields.map(function(n){return e.createElement(iv,{key:n.name},function(t,n,a){if(Jh(t))return Zh(t,n)||"-";if("asset"===t.type)return e.createElement(mh,{url:n,emptyText:"-",className:"w-[360px] max-w-full"});if("string"==typeof n){var o=n.trim();if(o&&sh(o))return e.createElement(mh,{url:o,emptyText:"-",className:"w-[360px] max-w-full"});if(o&&ah(o))return e.createElement(mh,{url:o,emptyText:"-",className:"w-[360px] max-w-full"})}if("boolean"===t.type)return e.createElement(lv,{variant:n?"default":"secondary"},r(n?"data.yes":"data.no"));if("date"===t.type||"datetime"===t.type)return n?u(n).format("YYYY-MM-DD HH:mm:ss"):"-";if("text"===t.type&&n&&n.length>50)return e.createElement("span",{className:"max-w-xs truncate block",title:n},n.substring(0,50),"...");if("json"===t.type||"jsonb"===t.type)return e.createElement(Kh,{value:n,title:t.comment||t.name});if("relation"===t.type&&t.relation&&a){var i=t.relation.displayField,s=void 0===i?"name":i,l=a["".concat(t.name,"_data")];if(l)return e.createElement(lv,{variant:"outline"},l[s]||"ID: ".concat(l.id));var c=a[t.relation.foreignKey||"".concat(t.relation.target,"_id")];return c?"ID: ".concat(c):"-"}return null==n||""===n?"-":n}(n,t[n.name],t))}),e.createElement(iv,{className:"text-sm text-muted-foreground"},u(t.created_at).format("YYYY-MM-DD HH:mm")),e.createElement(iv,{className:"text-sm text-muted-foreground"},u(t.updated_at).format("YYYY-MM-DD HH:mm")),e.createElement(iv,{className:gt("sticky right-0 z-20 bg-background","before:content-[''] before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border","after:content-[''] after:absolute after:inset-y-0 after:left-[-16px] after:w-4 after:bg-gradient-to-l after:from-background after:to-transparent","shadow-[-10px_0_16px_-14px_rgba(0,0,0,0.25)]","group-hover:bg-muted")},e.createElement("div",{className:"flex items-center justify-center gap-2"},e.createElement(Pt,{variant:"ghost",size:"sm",onClick:function(){return function(e){x(e);var t={};null==a||a.json_schema.fields.forEach(function(n){if("id"!==n.name)if("relation"===n.type&&n.relation){var r=n.relation.foreignKey||"".concat(n.relation.target,"_id");t[r]=e[r]}else{var a=e[n.name];"date"!==n.type&&"datetime"!==n.type||(a=a?u(a).format("YYYY-MM-DDTHH:mm"):""),"json"!==n.type&&"jsonb"!==n.type||(a=null==a||""===a?"":"string"==typeof a?a:JSON.stringify(a,null,2)),t[n.name]=a}}),k(t),p(!0)}(t)},className:"h-8 w-8 p-0"},e.createElement(ve,{className:"h-4 w-4"})),e.createElement(Pt,{variant:"ghost",size:"sm",onClick:function(){return oe(t)},disabled:H===t.id,className:"h-8 w-8 p-0 text-destructive hover:text-destructive"},H===t.id?e.createElement(le,{className:"h-4 w-4 animate-spin"}):e.createElement(be,{className:"h-4 w-4"})))))})))),P>T&&e.createElement("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50 border"},e.createElement("div",{className:"text-sm text-muted-foreground"},r("data.page")," ",e.createElement("span",{className:"font-semibold text-foreground"},O)," ",r("data.pageOf")," ",e.createElement("span",{className:"font-semibold text-foreground"},Math.ceil(P/T))," ",r("data.pages")),e.createElement("div",{className:"flex gap-2"},e.createElement(Pt,{variant:"outline",size:"sm",onClick:function(){return j(Math.max(1,O-1))},disabled:1===O||c},e.createElement(Y,{className:"h-4 w-4 mr-1"}),r("data.previousPage")),e.createElement(Pt,{variant:"outline",size:"sm",onClick:function(){return j(Math.min(Math.ceil(P/T),O+1))},disabled:O>=Math.ceil(P/T)||c},r("data.nextPage"),e.createElement(G,{className:"h-4 w-4 ml-1"})))))),e.createElement(hh,{open:v,onOpenChange:g},e.createElement(yh,{className:"max-w-3xl"},e.createElement(wh,null,e.createElement(Eh,{className:"text-xl"},r("common.filter")),e.createElement(kh,{className:"text-sm"},a.name," - ",a.table_name)),e.createElement("div",{className:"py-2"},e.createElement(dv,{fields:a.json_schema.fields,value:X,onChange:function(e){Z(e),j(1)}})),e.createElement(xh,{className:"gap-2"},e.createElement(Pt,{variant:"outline",onClick:function(){return g(!1)}},r("common.close"))))),e.createElement(hh,{open:m,onOpenChange:p},e.createElement(yh,{className:"max-w-3xl max-h-[85vh] overflow-y-auto"},e.createElement(wh,null,e.createElement(Eh,{className:"text-2xl"},r(y?"data.editRecord":"data.createRecord")),e.createElement(kh,{className:"text-base"},a.name," - ",a.table_name)),e.createElement("div",{className:"space-y-6 py-4"},a.json_schema.fields.map(function(t){return function(t){if("id"===t.name)return null;var n=te(t);if(Jh(t)){var o=N[t.name],i=Qh(t,o),s=Xh(o);return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Xc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Ip,{value:s,disabled:!n,onValueChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,ev(t,e))))}},e.createElement(zp,{className:"h-11"},e.createElement(Up,{placeholder:"".concat(r("data.pleaseSelect")).concat(t.comment||t.name)})),e.createElement(Hp,null,i.map(function(t){return e.createElement(Wp,{key:t.valueKey,value:t.valueKey},t.label)}))))}switch(t.type){case"boolean":return e.createElement("div",{key:t.name,className:"flex items-center space-x-3 p-4 rounded-lg border bg-card"},e.createElement(rh,{id:t.name,checked:N[t.name]||!1,disabled:!n,onCheckedChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e)))}}),e.createElement(Xc,{htmlFor:t.name,className:"text-sm font-semibold cursor-pointer"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")));case"date":return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Xc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Dt,{id:t.name,type:"date",value:N[t.name]||"",disabled:!n,onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e.target.value)))},required:t.required,className:"h-11"}));case"datetime":return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Xc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Dt,{id:t.name,type:"datetime-local",value:N[t.name]||"",disabled:!n,onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e.target.value)))},required:t.required,className:"h-11"}));case"text":return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Xc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Yh,{value:N[t.name]||"",onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e)))},disabled:!n}));case"json":case"jsonb":return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Xc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement($h,{id:t.name,value:N[t.name]||"",required:t.required,disabled:!n,onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e)))}}));case"asset":return e.createElement(ph,{key:t.name,field:t,model:a,value:N[t.name]||"",disabled:!n,onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e)))}});case"integer":case"float":return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Xc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Dt,{id:t.name,type:"number",value:N[t.name]||"",disabled:!n,onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e.target.value)))},required:t.required,className:"h-11"}));case"relation":if(!t.relation)return null;var l=t.relation,c=l.target,u=l.displayField,d=void 0===u?"name":u,f="".concat(c,"_").concat(d),m=K[f]||[],p=t.relation.foreignKey||"".concat(c,"_id"),h=void 0!==N[p]&&null!==N[p]?String(N[p]):"",v=m.find(function(e){return String(e.id)===h});return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Xc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Ip,{value:h,disabled:!n,onValueChange:function(e){var t=parseInt(e,10),n=!isNaN(t)&&String(t)===e;k(Object.assign(Object.assign({},N),S({},p,n?t:e)))}},e.createElement(zp,{className:"h-11"},e.createElement(Up,{placeholder:"".concat(r("data.pleaseSelect")).concat(t.comment||t.name)},v?v.label:h?"ID: ".concat(h):"".concat(r("data.pleaseSelect")).concat(t.comment||t.name))),e.createElement(Hp,null,0===m.length?e.createElement(Wp,{value:"_loading",disabled:!0},r("data.loadingOptions")):m.map(function(t){return e.createElement(Wp,{key:t.id,value:String(t.id)},t.label)}))));default:return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Xc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Dt,{id:t.name,type:"email"===t.type?"email":"text",maxLength:t.maxLength,value:N[t.name]||"",disabled:!n,onChange:function(e){return k(Object.assign(Object.assign({},N),S({},t.name,e.target.value)))},required:t.required,className:"h-11"}))}}(t)})),e.createElement(xh,{className:"gap-2"},e.createElement(Pt,{variant:"outline",onClick:function(){return p(!1)},disabled:z},r("common.cancel")),e.createElement(Pt,{onClick:ie,disabled:z},z?e.createElement(e.Fragment,null,e.createElement(le,{className:"h-4 w-4 mr-2 animate-spin"}),r(y?"data.updating":"data.creating")):r(y?"common.update":"common.create"))))))):e.createElement("div",{className:"min-h-[calc(100vh-4rem)] bg-gradient-to-br from-background via-background to-muted/20"},e.createElement("div",{className:"w-full py-4"},e.createElement(Zc,{className:"border-2"},e.createElement(nu,{className:"py-16 text-center"},e.createElement(Q,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground"}),e.createElement("p",{className:"text-lg text-muted-foreground"},r("data.selectModelPrompt"))))))}function vv(t){var n=t.model;return e.createElement(hv,{key:n.id,model:n})}function gv(t){return t.models.map(function(t){return{path:"/data/list-".concat(t.id),name:t.name,icon:e.createElement(ge),component:function(){return e.createElement(vv,{model:t})}}})}var bv=function(t,n){var r=function(e,t){return n?n(e):t};return[{path:"/login",name:r("auth.login","登录"),icon:e.createElement(ue),component:wm},{name:r("data.dataManagement","内容管理"),icon:e.createElement(Z),path:"/data",component:fv,routes:M(gv(t))}]},yv=he,wv=we,xv=de,Ev=se;function Nv(e){return kv.apply(this,arguments)}function kv(){return(kv=w(_().m(function e(t){var n,r;return _().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:if(!(null===(n=null===navigator||void 0===navigator?void 0:navigator.clipboard)||void 0===n?void 0:n.writeText)){e.n=3;break}return e.n=2,navigator.clipboard.writeText(t);case 2:return e.a(2);case 3:(r=document.createElement("textarea")).value=t,r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r);case 4:return e.a(2)}},e)}))).apply(this,arguments)}function Cv(t){var n=t.inputModels,r=t.skipAuth,a=void 0!==r&&r,o=t.brandName,i=void 0===o?"super CMS":o,s=t.uploadHandler,l=gm(),c=bm(),u=c.locale,d=c.setLocale,f=A(e.useState("/data"),2),m=f[0],p=f[1],h=A(e.useState([]),2);h[0],h[1];var v=A(e.useState(!1),2),g=v[0],b=v[1],y=A(e.useState(null),2),x=y[0],E=y[1],N=A(e.useState(!0),2),k=N[0],S=N[1],O=A(e.useState(null),2),j=O[0],R=O[1],T=A(e.useState([]),2),P=T[0],D=T[1],L=function(){var e=Vf();if(e)return e;try{return localStorage.getItem("cms_session_id")||void 0}catch(e){return}}();e.useEffect(function(){try{var e=localStorage.getItem("cms_models_order");e&&D(JSON.parse(e))}catch(e){}},[]);var F=e.useMemo(function(){if(0===P.length)return n.models;var e=new Map(n.models.map(function(e){return[e.id,e]})),t=P.map(function(t){return e.get(t)}).filter(function(e){return void 0!==e}),r=new Set(P),a=n.models.filter(function(e){return!r.has(e.id)});return[].concat(M(t),M(a))},[n.models,P]),I=e.useMemo(function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wf();return e.map(function(e){if(!(null==e?void 0:e.table_name))return e;var n=$f(e.table_name,t);return n===e.table_name?e:Object.assign(Object.assign({},e),{table_name:n})})}(F,L)},[F,L]),U=e.useMemo(function(){return bv({models:I},l)},[I,u]);e.useEffect(function(){if(a)return b(!0),E(null),S(!1),void("/login"===m&&p("/data"));var e=function(){var e=w(_().m(function e(){var t,n;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,im()){e.n=1;break}return b(!1),p("/login"),S(!1),e.a(2);case 1:return e.p=1,e.n=2,rm();case 2:if(e.v.success){e.n=3;break}throw new Error("token验证失败");case 3:if(!(t=sm())){e.n=4;break}E(t),e.n=6;break;case 4:return e.n=5,am();case 5:(n=e.v).success&&n.data&&(E(n.data),localStorage.setItem("cms_user",JSON.stringify(n.data)));case 6:b(!0),"/login"===m&&p("/data"),e.n=8;break;case 7:e.p=7,e.v,om(),b(!1),E(null),p("/login");case 8:e.n=10;break;case 9:e.p=9,e.v,b(!1),E(null),p("/login");case 10:return e.p=10,S(!1),e.f(10);case 11:return e.a(2)}},e,null,[[1,7],[0,9,10,11]])}));return function(){return e.apply(this,arguments)}}();e()},[a]);var z=function(e,t){E(t),b(!0),p("/data"),vu.success("".concat(l("auth.welcome"),", ").concat(t.username,"!"))},B=function(){var e=w(_().m(function e(){var t,n;return _().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=null===(t=null==x?void 0:x.username)||void 0===t?void 0:t.trim()){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,Nv(n);case 2:vu.success(l("settings.usernameCopied")),e.n=4;break;case 3:e.p=3,e.v,vu.error(l("settings.copyFailed"));case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),q=function(e,t){var n,r=C(e);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a.path===t)return a;if(a.routes){var o=q(a.routes,t);if(o)return o}}}catch(e){r.e(e)}finally{r.f()}return null};if(k)return e.createElement("div",{className:"flex min-h-screen items-center justify-center bg-background"},e.createElement("div",{className:"space-y-4"},e.createElement(bt,{className:"h-12 w-48"}),e.createElement(bt,{className:"h-4 w-64"})));if(!g)return e.createElement(wm,{onLoginSuccess:z});var H=U.filter(function(e){return"/login"!==e.path}),W=function(t){if(!t)return Q;if(e.isValidElement(t)){var n=t.type;if(n&&"function"==typeof n){var r=n.name||"";if(r.includes("Home"))return oe;if(r.includes("Table"))return ge;if(r.includes("Database"))return Q;if(r.includes("File"))return ne}}return Q},V=H.flatMap(function(e){return e.routes&&e.routes.length>0?e.routes.map(function(e){return{title:e.name,icon:W(e.icon),path:e.path}}):[{title:e.name,icon:W(e.icon),path:e.path}]}),K=function(e){return function(t){R(e),t.dataTransfer.effectAllowed="move"}},$=function(e){return function(t){if(t.preventDefault(),t.dataTransfer.dropEffect="move",null!==j&&j!==e){var n=U.find(function(e){return"/data"===e.path});if(null==n?void 0:n.routes){var r=M(n.routes.map(function(e){var t=e.path.match(/\/data\/list-(\d+)/);return t?parseInt(t[1],10):null}).filter(function(e){return null!==e})),a=A(r.splice(j,1),1)[0];r.splice(e,0,a),function(e){try{localStorage.setItem("cms_models_order",JSON.stringify(e)),D(e)}catch(e){}}(r),R(e)}}}},Y=function(){R(null)};return e.createElement("div",{className:"we0-cms-root"},e.createElement(fh,{uploadHandler:s},e.createElement(fs,null,e.createElement(ms,{variant:"inset"},e.createElement(vs,{className:"border-b border-sidebar-border p-4"},e.createElement("div",{className:"flex items-center gap-3"},e.createElement("div",{className:"flex items-center justify-center w-12 h-12 rounded-2xl bg-primary shadow-[0_4px_12px_-2px_rgba(93,112,82,0.2)] transition-all duration-300 hover:scale-105"},e.createElement(yv,{className:"w-5 h-5 text-primary-foreground"})),e.createElement("span",{className:"font-bold text-xl text-foreground"},i))),e.createElement(bs,null,e.createElement(ys,null,e.createElement(ws,null,l("settings.navigation"),e.createElement("span",{className:"ml-2 text-xs text-muted-foreground"},l("settings.dragToReorder"))),e.createElement(xs,null,e.createElement(Es,null,V.map(function(t,n){var r,a=t.path.startsWith("/data/list-");return e.createElement(Ns,{key:t.path,draggable:a,onDragStart:a?K(n):void 0,onDragOver:a?$(n):void 0,onDragEnd:a?Y:void 0,className:a&&j===n?"opacity-50":"",style:{cursor:a?"move":"default"}},e.createElement(Cs,{onClick:function(){return p(t.path)},isActive:(r=t.path,m===r||m.startsWith(r+"/")),tooltip:t.title},e.createElement(t.icon,{className:"w-4 h-4"}),e.createElement("span",null,t.title)))}))))),e.createElement(gs,{className:"border-t border-sidebar-border"},e.createElement(Es,null,e.createElement(Ns,null,e.createElement(Wc,null,e.createElement(Vc,{asChild:!0},e.createElement(Cs,{tooltip:l("settings.language")},e.createElement(Ev,{className:"w-4 h-4"}),e.createElement("span",null,"zh-CN"===u?"中文":"English"))),e.createElement(Kc,{align:"end",className:"w-48"},e.createElement($c,{onClick:function(){return d("zh-CN")},className:"zh-CN"===u?"bg-accent":""},"简体中文"),e.createElement($c,{onClick:function(){return d("en-US")},className:"en-US"===u?"bg-accent":""},"English")))),!a&&x&&e.createElement(e.Fragment,null,e.createElement(Ns,null,e.createElement(Cs,{onClick:function(){B()},tooltip:l("settings.copyUsername"),title:l("settings.copyUsername")},e.createElement(wv,{className:"w-4 h-4"}),e.createElement("span",{className:"truncate"},x.username))),e.createElement(Ns,null,e.createElement(Cs,{onClick:function(){window.confirm(l("auth.logoutConfirm"))&&(om(),localStorage.removeItem("cms_token"),localStorage.removeItem("cms_user"),b(!1),E(null),p("/login"),vu.success(l("auth.logoutSuccess")))},tooltip:l("auth.logout")},e.createElement(xv,{className:"w-4 h-4"}),e.createElement("span",null,l("auth.logout")))))))),e.createElement(hs,null,e.createElement("header",{className:"flex h-16 items-center gap-4 border-b border-border/50 bg-background/80 backdrop-blur-sm px-6 sticky top-0 z-10"},e.createElement(ps,null),e.createElement("h1",{className:"text-xl font-bold text-foreground"},function(){if("/login"===m)return l("auth.login");var e=q(U,m);return(null==e?void 0:e.name)||l("data.dataManagement")}())),e.createElement("main",{className:"flex-1 min-w-0 p-8 bg-gradient-to-br from-background via-background to-muted/20"},function(){if(!a&&"/login"===m)return e.createElement(wm,{onLoginSuccess:z});if(a&&"/login"===m)return e.createElement(fv,null);var t=q(U,m);if(t){var n=t.component;return e.createElement(n,null)}return e.createElement(fv,null)}())))))}function Sv(t){var n=t.defaultLocale,r=z(t,["defaultLocale"]);return e.createElement(hm,{defaultLocale:n},e.createElement(Cv,Object.assign({},r)))}exports.CmsLayoutShadcn=Sv,exports.I18nProvider=hm,exports.RichTextEditor=Yh,exports.RichTextViewer=Gh,exports.cmsRoutes=bv,exports.default=Sv,exports.setSessionId=Zf,exports.useLocale=bm,exports.useT=gm,exports.useTranslation=vm;
10
+ var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
11
+ /**
12
+ * @license lucide-react v0.344.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const C=(t,n)=>{const r=e.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:s="",children:l,...c},u)=>{return e.createElement("svg",{ref:u,...k,width:o,height:o,stroke:r,strokeWidth:i?24*Number(a)/Number(o):a,className:["lucide",`lucide-${d=t,d.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim()}`,s].join(" "),...c},[...n.map(([t,n])=>e.createElement(t,n)),...Array.isArray(l)?l:[l]]);var d});return r.displayName=`${t}`,r},N=C("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),D=C("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),S=C("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),A=C("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),T=C("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),R=C("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),O=C("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),F=C("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),M=C("Crown",[["path",{d:"m2 4 3 12h14l3-12-6 7-4-7-4 7-6-7zm3 16h14",key:"zkxr6b"}]]),j=C("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),L=C("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),P=C("FileImage",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]),I=C("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),z=C("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),B=C("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),U=C("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]),q=C("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),H=C("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]),W=C("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),V=C("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),$=C("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]),G=C("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),K=C("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),Z=C("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Y=C("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),J=C("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),X=C("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]),Q=C("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]]),ee=C("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]),te=C("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),ne=C("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),re=C("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),oe=C("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),ae=C("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function ie(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=ie(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function se(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ie(e))&&(r&&(r+=" "),r+=t);return r}const le=e=>{const t=fe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),ce(n,t)||de(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},ce=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ce(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const a=e.join("-");return t.validators.find(({validator:e})=>e(a))?.classGroupId},ue=/^\[(.+)\]$/,de=e=>{if(ue.test(e)){const t=ue.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},fe=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ge(Object.entries(e.classGroups),n).forEach(([e,n])=>{pe(n,r,e,t)}),r},pe=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:me(t,e)).classGroupId=n)}if("function"==typeof e)return he(e)?void pe(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,o])=>{pe(o,me(t,e),n,r)})})},me=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},he=e=>e.isThemeGetter,ge=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,be=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},ve=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],a=t.length,i=e=>{const n=[];let i,s=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===s){if(u===o&&(r||e.slice(c,c+a)===t)){n.push(e.slice(l,c)),l=c+a;continue}if("/"===u){i=c;continue}}"["===u?s++:"]"===u&&s--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:i&&i>l?i-l:void 0}};return n?e=>n({className:e,parseClassName:i}):i},ye=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},we=/\s+/;function xe(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Ee(e))&&(r&&(r+=" "),r+=t);return r}const Ee=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ee(e[r]))&&(n&&(n+=" "),n+=t);return n};function _e(e,...t){let n,r,o,a=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:be(e.cacheSize),parseClassName:ve(e),...le(e)}))(l),r=n.cache.get,o=n.cache.set,a=i,i(s)};function i(e){const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(we);let s="";for(let e=i.length-1;e>=0;e-=1){const t=i[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let f=Boolean(d),p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?" "+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?" "+s:s);continue}f=!1}const m=ye(l).join(":"),h=c?m+"!":m,g=h+p;if(a.includes(g))continue;a.push(g);const b=o(p,f);for(let e=0;e<b.length;++e){const t=b[e];a.push(h+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return o(e,a),a}return function(){return a(xe.apply(null,arguments))}}const ke=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Ce=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ne=/^\d+\/\d+$/,De=new Set(["px","full","screen"]),Se=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ae=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Te=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Re=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Oe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fe=e=>je(e)||De.has(e)||Ne.test(e),Me=e=>Ke(e,"length",Ze),je=e=>Boolean(e)&&!Number.isNaN(Number(e)),Le=e=>Ke(e,"number",je),Pe=e=>Boolean(e)&&Number.isInteger(Number(e)),Ie=e=>e.endsWith("%")&&je(e.slice(0,-1)),ze=e=>Ce.test(e),Be=e=>Se.test(e),Ue=new Set(["length","size","percentage"]),qe=e=>Ke(e,Ue,Ye),He=e=>Ke(e,"position",Ye),We=new Set(["image","url"]),Ve=e=>Ke(e,We,Xe),$e=e=>Ke(e,"",Je),Ge=()=>!0,Ke=(e,t,n)=>{const r=Ce.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},Ze=e=>Ae.test(e)&&!Te.test(e),Ye=()=>!1,Je=e=>Re.test(e),Xe=e=>Oe.test(e),Qe=()=>{const e=ke("colors"),t=ke("spacing"),n=ke("blur"),r=ke("brightness"),o=ke("borderColor"),a=ke("borderRadius"),i=ke("borderSpacing"),s=ke("borderWidth"),l=ke("contrast"),c=ke("grayscale"),u=ke("hueRotate"),d=ke("invert"),f=ke("gap"),p=ke("gradientColorStops"),m=ke("gradientColorStopPositions"),h=ke("inset"),g=ke("margin"),b=ke("opacity"),v=ke("padding"),y=ke("saturate"),w=ke("scale"),x=ke("sepia"),E=ke("skew"),_=ke("space"),k=ke("translate"),C=()=>["auto",ze,t],N=()=>[ze,t],D=()=>["",Fe,Me],S=()=>["auto",je,ze],A=()=>["","0",ze],T=()=>[je,ze];return{cacheSize:500,separator:":",theme:{colors:[Ge],spacing:[Fe,Me],blur:["none","",Be,ze],brightness:T(),borderColor:[e],borderRadius:["none","","full",Be,ze],borderSpacing:N(),borderWidth:D(),contrast:T(),grayscale:A(),hueRotate:T(),invert:A(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Ie,Me],inset:C(),margin:C(),opacity:T(),padding:N(),saturate:T(),scale:T(),sepia:A(),skew:T(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",ze]}],container:["container"],columns:[{columns:[Be]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",ze]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Pe,ze]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ze]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",Pe,ze]}],"grid-cols":[{"grid-cols":[Ge]}],"col-start-end":[{col:["auto",{span:["full",Pe,ze]},ze]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[Ge]}],"row-start-end":[{row:["auto",{span:[Pe,ze]},ze]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ze]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ze,t]}],"min-w":[{"min-w":[ze,t,"min","max","fit"]}],"max-w":[{"max-w":[ze,t,"none","full","min","max","fit","prose",{screen:[Be]},Be]}],h:[{h:[ze,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ze,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ze,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ze,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Be,Me]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Le]}],"font-family":[{font:[Ge]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ze]}],"line-clamp":[{"line-clamp":["none",je,Le]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Fe,ze]}],"list-image":[{"list-image":["none",ze]}],"list-style-type":[{list:["none","disc","decimal",ze]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Fe,Me]}],"underline-offset":[{"underline-offset":["auto",Fe,ze]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",He]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ve]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Fe,ze]}],"outline-w":[{outline:[Fe,Me]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Fe,Me]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Be,$e]}],"shadow-color":[{shadow:[Ge]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Be,ze]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ze]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",ze]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[Pe,ze]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ze]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ze]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ze]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Fe,Me,Le]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},et=_e(Qe);function tt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return et(se(t))}function nt(e){var t=e.className,n=_(e,["className"]);return c.createElement("div",Object.assign({className:tt("animate-pulse rounded-md bg-muted",t)},n))}function rt(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ot(...e){return t=>{let n=!1;const r=e.map(e=>{const r=rt(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():rt(e[t],null)}}}}function at(...e){return c.useCallback(ot(...e),e)}var it=Symbol.for("react.lazy"),st=c[" use ".trim().toString()];function lt(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===it&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function ct(e){const n=dt(e),r=c.forwardRef((e,r)=>{let{children:o,...a}=e;lt(o)&&"function"==typeof st&&(o=st(o._payload));const i=c.Children.toArray(o),s=i.find(pt);if(s){const e=s.props.children,o=i.map(t=>t===s?c.Children.count(e)>1?c.Children.only(null):c.isValidElement(e)?e.props.children:null:t);return t.jsx(n,{...a,ref:r,children:c.isValidElement(e)?c.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})});return r.displayName=`${e}.Slot`,r}var ut=ct("Slot");function dt(e){const t=c.forwardRef((e,t)=>{let{children:n,...r}=e;if(lt(n)&&"function"==typeof st&&(n=st(n._payload)),c.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==c.Fragment&&(o.ref=t?ot(t,e):e),c.cloneElement(n,o)}return c.Children.count(n)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ft=Symbol("radix.slottable");function pt(e){return c.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ft}const mt=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,ht=se,gt=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return ht(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=mt(t)||mt(r);return o[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return ht(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)};var bt=gt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-bold transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--primary))]/30 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-[0_4px_20px_-2px_rgba(93,112,82,0.15)] hover:scale-105 hover:shadow-[0_6px_24px_-4px_rgba(93,112,82,0.25)] active:scale-95",destructive:"bg-destructive text-destructive-foreground shadow-[0_4px_20px_-2px_rgba(168,84,72,0.15)] hover:scale-105 hover:shadow-[0_6px_24px_-4px_rgba(168,84,72,0.25)] active:scale-95",outline:"border border-[hsl(var(--border))]/70 bg-[hsl(var(--secondary))]/35 text-foreground shadow-[0_8px_24px_-18px_rgba(33,43,54,0.28)] hover:border-[hsl(var(--primary))]/30 hover:bg-[hsl(var(--secondary))]/55 hover:text-foreground hover:scale-105 active:scale-95",secondary:"bg-secondary text-secondary-foreground shadow-[0_4px_20px_-2px_rgba(193,140,93,0.15)] hover:scale-105 hover:shadow-[0_6px_24px_-4px_rgba(193,140,93,0.25)] active:scale-95",ghost:"bg-transparent text-primary hover:bg-primary/10 hover:scale-105 active:scale-95",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-12 px-8 py-2",sm:"h-10 px-6 text-sm",lg:"h-14 px-10 text-base",icon:"h-12 w-12"}},defaultVariants:{variant:"default",size:"default"}}),vt=c.forwardRef(function(e,t){var n=e.className,r=e.variant,o=e.size,a=e.asChild,i=void 0!==a&&a,s=_(e,["className","variant","size","asChild"]),l=i?ut:"button";return c.createElement(l,Object.assign({className:tt(bt({variant:r,size:o,className:n})),ref:t},s))});vt.displayName="Button";var yt=c.forwardRef(function(e,t){var n=e.className,r=e.type,o=_(e,["className","type"]);return c.createElement("input",Object.assign({type:r,className:tt("flex h-12 w-full rounded-full border border-input bg-background px-6 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--primary))]/30 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-300 md:text-sm",n),ref:t},o))});yt.displayName="Input";var wt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{const r=ct(`Primitive.${n}`),o=c.forwardRef((e,o)=>{const{asChild:a,...i}=e,s=a?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...i,ref:o})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),xt="horizontal",Et=["horizontal","vertical"],_t=c.forwardRef((e,n)=>{const{decorative:r,orientation:o=xt,...a}=e,i=function(e){return Et.includes(e)}(o)?o:xt,s=r?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"};return t.jsx(wt.div,{"data-orientation":i,...s,...a,ref:n})});_t.displayName="Separator";var kt=_t,Ct=c.forwardRef(function(e,t){var n=e.className,r=e.orientation,o=void 0===r?"horizontal":r,a=e.decorative,i=void 0===a||a,s=_(e,["className","orientation","decorative"]);return c.createElement(kt,Object.assign({ref:t,decorative:i,orientation:o,className:tt("shrink-0 bg-border","horizontal"===o?"h-[1px] w-full":"h-full w-[1px]",n)},s))});function Nt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Dt(e,n=[]){let r=[];const o=()=>{const t=r.map(e=>c.createContext(e));return function(n){const r=n?.[e]||t;return c.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return o.scopeName=e,[function(n,o){const a=c.createContext(o),i=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[e]?.[i]||a,u=c.useMemo(()=>s,Object.values(s));return t.jsx(l.Provider,{value:u,children:o})};return s.displayName=n+"Provider",[s,function(t,r){const s=r?.[e]?.[i]||a,l=c.useContext(s);if(l)return l;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},St(o,...n)]}function St(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}Ct.displayName=kt.displayName;var At=globalThis?.document?c.useLayoutEffect:()=>{},Tt=c[" useId ".trim().toString()]||(()=>{}),Rt=0;function Ot(e){const[t,n]=c.useState(Tt());return At(()=>{e||n(e=>e??String(Rt++))},[e]),e||(t?`radix-${t}`:"")}var Ft=c[" useInsertionEffect ".trim().toString()]||At;function Mt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=function({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),a=c.useRef(t);return Ft(()=>{a.current=t},[t]),c.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:o;{const t=c.useRef(void 0!==e);c.useEffect(()=>{const e=t.current;if(e!==s){}t.current=s},[s,r])}const u=c.useCallback(t=>{if(s){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&i.current?.(n)}else a(t)},[s,e,a,i]);return[l,u]}function jt(e){const t=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==c.Fragment&&(o.ref=t?ot(t,e):e),c.cloneElement(n,o)}return c.Children.count(n)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Lt=Symbol("radix.slottable");function Pt(e){return c.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Lt}var It=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{const r=function(e){const n=jt(e),r=c.forwardRef((e,r)=>{const{children:o,...a}=e,i=c.Children.toArray(o),s=i.find(Pt);if(s){const e=s.props.children,o=i.map(t=>t===s?c.Children.count(e)>1?c.Children.only(null):c.isValidElement(e)?e.props.children:null:t);return t.jsx(n,{...a,ref:r,children:c.isValidElement(e)?c.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})});return r.displayName=`${e}.Slot`,r}(`Primitive.${n}`),o=c.forwardRef((e,o)=>{const{asChild:a,...i}=e,s=a?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...i,ref:o})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function zt(e,t){e&&u.flushSync(()=>e.dispatchEvent(t))}function Bt(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...e)=>t.current?.(...e),[])}var Ut,qt="dismissableLayer.update",Ht="dismissableLayer.pointerDownOutside",Wt="dismissableLayer.focusOutside",Vt=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$t=c.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...u}=e,d=c.useContext(Vt),[f,p]=c.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=c.useState({}),g=at(n,e=>p(e)),b=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(v),w=f?b.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,E=w>=y,_=function(e,t=globalThis?.document){const n=Bt(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Kt(Ht,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...d.branches].some(e=>e.contains(t));E&&!n&&(a?.(e),s?.(e),e.defaultPrevented||l?.())},m),k=function(e,t=globalThis?.document){const n=Bt(e),r=c.useRef(!1);return c.useEffect(()=>{const e=e=>{if(e.target&&!r.current){Kt(Wt,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[...d.branches].some(e=>e.contains(t))||(i?.(e),s?.(e),e.defaultPrevented||l?.())},m);return function(e,t=globalThis?.document){const n=Bt(e);c.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{w===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},m),c.useEffect(()=>{if(f)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Ut=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Gt(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=Ut)}},[f,m,r,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Gt())},[f,d]),c.useEffect(()=>{const e=()=>h({});return document.addEventListener(qt,e),()=>document.removeEventListener(qt,e)},[]),t.jsx(It.div,{...u,ref:g,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:Nt(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Nt(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Nt(e.onPointerDownCapture,_.onPointerDownCapture)})});$t.displayName="DismissableLayer";function Gt(){const e=new CustomEvent(qt);document.dispatchEvent(e)}function Kt(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?zt(o,a):o.dispatchEvent(a)}c.forwardRef((e,n)=>{const r=c.useContext(Vt),o=c.useRef(null),a=at(n,o);return c.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),t.jsx(It.div,{...e,ref:a})}).displayName="DismissableLayerBranch";var Zt="focusScope.autoFocusOnMount",Yt="focusScope.autoFocusOnUnmount",Jt={bubbles:!1,cancelable:!0},Xt=c.forwardRef((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=e,[l,u]=c.useState(null),d=Bt(a),f=Bt(i),p=c.useRef(null),m=at(n,e=>u(e)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?p.current=t:nn(p.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||nn(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&nn(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[o,l,h.paused]),c.useEffect(()=>{if(l){rn.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(Zt,Jt);l.addEventListener(Zt,d),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(nn(r,{select:t}),document.activeElement!==n)return}((e=Qt(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&nn(l))}return()=>{l.removeEventListener(Zt,d),setTimeout(()=>{const e=new CustomEvent(Yt,Jt);l.addEventListener(Yt,f),l.dispatchEvent(e),e.defaultPrevented||nn(t??document.body,{select:!0}),l.removeEventListener(Yt,f),rn.remove(h)},0)}}var e},[l,d,f,h]);const g=c.useCallback(e=>{if(!r&&!o)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,a]=function(e){const t=Qt(e),n=en(t,e),r=en(t.reverse(),e);return[n,r]}(t);o&&a?e.shiftKey||n!==a?e.shiftKey&&n===o&&(e.preventDefault(),r&&nn(a,{select:!0})):(e.preventDefault(),r&&nn(o,{select:!0})):n===t&&e.preventDefault()}},[r,o,h.paused]);return t.jsx(It.div,{tabIndex:-1,...s,ref:m,onKeyDown:g})});function Qt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function en(e,t){for(const n of e)if(!tn(n,{upTo:t}))return n}function tn(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function nn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Xt.displayName="FocusScope";var rn=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=on(e,t),e.unshift(t)},remove(t){e=on(e,t),e[0]?.resume()}}}();function on(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var an=c.forwardRef((e,r)=>{const{container:o,...a}=e,[i,s]=c.useState(!1);At(()=>s(!0),[]);const l=o||i&&globalThis?.document?.body;return l?n.createPortal(t.jsx(It.div,{...a,ref:r}),l):null});an.displayName="Portal";var sn=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),a=c.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const e=ln(r.current);a.current="mounted"===s?e:"none"},[s]),At(()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=ln(t);if(e)l("MOUNT");else if("none"===i||"none"===t?.display)l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,l]),At(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=ln(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&i&&(l("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=ln(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):c.Children.only(n),a=at(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?c.cloneElement(o,{ref:a}):null};function ln(e){return e?.animationName||"none"}sn.displayName="Presence";var cn=0;function un(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dn()),document.body.insertAdjacentElement("beforeend",e[1]??dn()),cn++,()=>{1===cn&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),cn--}},[])}function dn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var fn="right-scroll-bar-position",pn="width-before-scroll-bar";function mn(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var hn="undefined"!=typeof window?c.useLayoutEffect:c.useEffect,gn=new WeakMap;function bn(t,n){var r,o,a,i=(r=n||null,o=function(e){return t.forEach(function(t){return mn(t,e)})},(a=e.useState(function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}})[0]).callback=o,a.facade);return hn(function(){var e=gn.get(i);if(e){var n=new Set(e),r=new Set(t),o=i.current;n.forEach(function(e){r.has(e)||mn(e,null)}),r.forEach(function(e){n.has(e)||mn(e,o)})}gn.set(i,t)},[t]),i}function vn(e){return e}var yn=function(e){var t=e.sideCar,n=_(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,E({},n))};yn.isSideCarExport=!0;var wn=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=vn);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=E({async:!0,ssr:!1},e),t}(),xn=function(){},En=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:xn,onWheelCapture:xn,onTouchMoveCapture:xn}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,b=e.allowPinchZoom,v=e.as,y=void 0===v?"div":v,w=e.gapMode,x=_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=p,C=bn([n,t]),N=E(E({},x),o);return c.createElement(c.Fragment,null,d&&c.createElement(k,{sideCar:wn,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:w}),i?c.cloneElement(c.Children.only(s),E(E({},N),{ref:C})):c.createElement(y,E({},N,{className:l,ref:C}),s))});En.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},En.classNames={fullWidth:pn,zeroRight:fn};function _n(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var kn=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=_n())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Cn=function(){var e,t=(e=kn(),function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Nn={left:0,top:0,right:0,gap:0},Dn=function(e){return parseInt(e||"",10)||0},Sn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Nn;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Dn(n),Dn(r),Dn(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},An=Cn(),Tn="data-scroll-locked",Rn=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Tn,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(fn," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(pn," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(fn," .").concat(fn," {\n right: 0 ").concat(r,";\n }\n \n .").concat(pn," .").concat(pn," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Tn,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},On=function(){var e=parseInt(document.body.getAttribute(Tn)||"0",10);return isFinite(e)?e:0},Fn=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;c.useEffect(function(){return document.body.setAttribute(Tn,(On()+1).toString()),function(){var e=On()-1;e<=0?document.body.removeAttribute(Tn):document.body.setAttribute(Tn,e.toString())}},[]);var a=c.useMemo(function(){return Sn(o)},[o]);return c.createElement(An,{styles:Rn(a,!t,o,n?"":"!important")})},Mn=!1;if("undefined"!=typeof window)try{var jn=Object.defineProperty({},"passive",{get:function(){return Mn=!0,!0}});window.addEventListener("test",jn,jn),window.removeEventListener("test",jn,jn)}catch(e){Mn=!1}var Ln=!!Mn&&{passive:!1},Pn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},In=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),zn(e,r)){var o=Bn(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},zn=function(e,t){return"v"===e?function(e){return Pn(e,"overflowY")}(t):function(e){return Pn(e,"overflowX")}(t)},Bn=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},Un=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qn=function(e){return[e.deltaX,e.deltaY]},Hn=function(e){return e&&"current"in e?e.current:e},Wn=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Vn=0,$n=[];function Gn(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Kn,Zn=(Kn=function(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(Vn++)[0],a=c.useState(Cn)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(Hn),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=c.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=Un(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-a[0],c="deltaY"in e?e.deltaY:s[1]-a[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=In(d,u);if(!m)return!0;if(m?o=d:(o="v"===d?"h":"v",m=In(d,u)),!m)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var h=r.current||o;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,l=t.contains(s),c=!1,u=i>0,d=0,f=0;do{if(!s)break;var p=Bn(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&zn(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(o&&Math.abs(d)<1||!o&&i>d)||!u&&(o&&Math.abs(f)<1||!o&&-i>f))&&(c=!0),c}(h,t,e,"h"===h?l:c,!0)},[]),l=c.useCallback(function(e){var n=e;if($n.length&&$n[$n.length-1]===a){var r="deltaY"in n?qn(n):Un(n),o=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var l=(i.current.shards||[]).map(Hn).filter(Boolean).filter(function(e){return e.contains(n.target)});(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=c.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:Gn(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=c.useCallback(function(e){n.current=Un(e),r.current=void 0},[]),f=c.useCallback(function(t){u(t.type,qn(t),t.target,s(t,e.lockRef.current))},[]),p=c.useCallback(function(t){u(t.type,Un(t),t.target,s(t,e.lockRef.current))},[]);c.useEffect(function(){return $n.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Ln),document.addEventListener("touchmove",l,Ln),document.addEventListener("touchstart",d,Ln),function(){$n=$n.filter(function(e){return e!==a}),document.removeEventListener("wheel",l,Ln),document.removeEventListener("touchmove",l,Ln),document.removeEventListener("touchstart",d,Ln)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:Wn(o)}):null,m?c.createElement(Fn,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},wn.useMedium(Kn),yn),Yn=c.forwardRef(function(e,t){return c.createElement(En,E({},e,{ref:t,sideCar:Zn}))});Yn.classNames=En.classNames;var Jn=Yn,Xn=new WeakMap,Qn=new WeakMap,er={},tr=0,nr=function(e){return e&&(e.host||nr(e.parentNode))},rr=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=nr(t);return n&&e.contains(n)?n:null}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);er[n]||(er[n]=new WeakMap);var a=er[n],i=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(Xn.get(e)||0)+1,c=(a.get(e)||0)+1;Xn.set(e,l),a.set(e,c),i.push(e),1===l&&o&&Qn.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(e){}})};return u(t),s.clear(),tr++,function(){i.forEach(function(e){var t=Xn.get(e)-1,o=a.get(e)-1;Xn.set(e,t),a.set(e,o),t||(Qn.has(e)||e.removeAttribute(r),Qn.delete(e)),o||e.removeAttribute(n)}),--tr||(Xn=new WeakMap,Xn=new WeakMap,Qn=new WeakMap,er={})}},or=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),rr(r,o,n,"aria-hidden")):function(){return null}};function ar(e){const t=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==c.Fragment&&(o.ref=t?ot(t,e):e),c.cloneElement(n,o)}return c.Children.count(n)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ir=Symbol("radix.slottable");function sr(e){return c.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ir}var lr="Dialog",[cr,ur]=Dt(lr),[dr,fr]=cr(lr),pr=e=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=c.useRef(null),u=c.useRef(null),[d,f]=Mt({prop:o,defaultProp:a??!1,onChange:i,caller:lr});return t.jsx(dr,{scope:n,triggerRef:l,contentRef:u,contentId:Ot(),titleId:Ot(),descriptionId:Ot(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(e=>!e),[f]),modal:s,children:r})};pr.displayName=lr;var mr="DialogTrigger",hr=c.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=fr(mr,r),i=at(n,a.triggerRef);return t.jsx(It.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":jr(a.open),...o,ref:i,onClick:Nt(e.onClick,a.onOpenToggle)})});hr.displayName=mr;var gr="DialogPortal",[br,vr]=cr(gr,{forceMount:void 0}),yr=e=>{const{__scopeDialog:n,forceMount:r,children:o,container:a}=e,i=fr(gr,n);return t.jsx(br,{scope:n,forceMount:r,children:c.Children.map(o,e=>t.jsx(sn,{present:r||i.open,children:t.jsx(an,{asChild:!0,container:a,children:e})}))})};yr.displayName=gr;var wr="DialogOverlay",xr=c.forwardRef((e,n)=>{const r=vr(wr,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,i=fr(wr,e.__scopeDialog);return i.modal?t.jsx(sn,{present:o||i.open,children:t.jsx(_r,{...a,ref:n})}):null});xr.displayName=wr;var Er=function(e){const n=ar(e),r=c.forwardRef((e,r)=>{const{children:o,...a}=e,i=c.Children.toArray(o),s=i.find(sr);if(s){const e=s.props.children,o=i.map(t=>t===s?c.Children.count(e)>1?c.Children.only(null):c.isValidElement(e)?e.props.children:null:t);return t.jsx(n,{...a,ref:r,children:c.isValidElement(e)?c.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})});return r.displayName=`${e}.Slot`,r}("DialogOverlay.RemoveScroll"),_r=c.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=fr(wr,r);return t.jsx(Jn,{as:Er,allowPinchZoom:!0,shards:[a.contentRef],children:t.jsx(It.div,{"data-state":jr(a.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),kr="DialogContent",Cr=c.forwardRef((e,n)=>{const r=vr(kr,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,i=fr(kr,e.__scopeDialog);return t.jsx(sn,{present:o||i.open,children:i.modal?t.jsx(Nr,{...a,ref:n}):t.jsx(Dr,{...a,ref:n})})});Cr.displayName=kr;var Nr=c.forwardRef((e,n)=>{const r=fr(kr,e.__scopeDialog),o=c.useRef(null),a=at(n,r.contentRef,o);return c.useEffect(()=>{const e=o.current;if(e)return or(e)},[]),t.jsx(Sr,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Nt(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Nt(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:Nt(e.onFocusOutside,e=>e.preventDefault())})}),Dr=c.forwardRef((e,n)=>{const r=fr(kr,e.__scopeDialog),o=c.useRef(!1),a=c.useRef(!1);return t.jsx(Sr,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const n=t.target,i=r.triggerRef.current?.contains(n);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),Sr=c.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=e,l=fr(kr,r),u=c.useRef(null),d=at(n,u);return un(),t.jsxs(t.Fragment,{children:[t.jsx(Xt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:i,children:t.jsx($t,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":jr(l.open),...s,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),t.jsxs(t.Fragment,{children:[t.jsx(zr,{titleId:l.titleId}),t.jsx(Br,{contentRef:u,descriptionId:l.descriptionId})]})]})}),Ar="DialogTitle",Tr=c.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=fr(Ar,r);return t.jsx(It.h2,{id:a.titleId,...o,ref:n})});Tr.displayName=Ar;var Rr="DialogDescription",Or=c.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=fr(Rr,r);return t.jsx(It.p,{id:a.descriptionId,...o,ref:n})});Or.displayName=Rr;var Fr="DialogClose",Mr=c.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=fr(Fr,r);return t.jsx(It.button,{type:"button",...o,ref:n,onClick:Nt(e.onClick,()=>a.onOpenChange(!1))})});function jr(e){return e?"open":"closed"}Mr.displayName=Fr;var Lr="DialogTitleWarning",[Pr,Ir]=function(e,n){const r=c.createContext(n),o=e=>{const{children:n,...o}=e,a=c.useMemo(()=>o,Object.values(o));return t.jsx(r.Provider,{value:a,children:n})};return o.displayName=e+"Provider",[o,function(t){const o=c.useContext(r);if(o)return o;if(void 0!==n)return n;throw new Error(`\`${t}\` must be used within \`${e}\``)}]}(Lr,{contentName:kr,titleName:Ar,docsSlug:"dialog"}),zr=({titleId:e})=>{const t=Ir(Lr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{if(e){document.getElementById(e)}},[n,e]),null},Br=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ir("DialogDescriptionWarning").contentName}}.`;return c.useEffect(()=>{const n=e.current?.getAttribute("aria-describedby");if(t&&n){document.getElementById(t)}},[n,e,t]),null},Ur=pr,qr=hr,Hr=yr,Wr=xr,Vr=Cr,$r=Tr,Gr=Or,Kr=Mr,Zr=Ur,Yr=Hr,Jr=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement(Wr,Object.assign({className:tt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n)},r,{ref:t}))});Jr.displayName=Wr.displayName;var Xr=gt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Qr=c.forwardRef(function(e,t){var n=e.side,r=void 0===n?"right":n,o=e.className,a=e.children,i=_(e,["side","className","children"]);return c.createElement(Yr,null,c.createElement(Jr,null),c.createElement(Vr,Object.assign({ref:t,className:tt(Xr({side:r}),o)},i),a,c.createElement(Kr,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},c.createElement(ae,{className:"h-4 w-4"}),c.createElement("span",{className:"sr-only"},"Close"))))});Qr.displayName=Vr.displayName;var eo=function(e){var t=e.className,n=_(e,["className"]);return c.createElement("div",Object.assign({className:tt("flex flex-col space-y-2 text-center sm:text-left",t)},n))};eo.displayName="SheetHeader";var to=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement($r,Object.assign({ref:t,className:tt("text-lg font-semibold text-foreground",n)},r))});to.displayName=$r.displayName;var no=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement(Gr,Object.assign({ref:t,className:tt("text-sm text-muted-foreground",n)},r))});no.displayName=Gr.displayName;const ro=["top","right","bottom","left"],oo=Math.min,ao=Math.max,io=Math.round,so=Math.floor,lo=e=>({x:e,y:e}),co={left:"right",right:"left",bottom:"top",top:"bottom"};function uo(e,t,n){return ao(e,oo(t,n))}function fo(e,t){return"function"==typeof e?e(t):e}function po(e){return e.split("-")[0]}function mo(e){return e.split("-")[1]}function ho(e){return"x"===e?"y":"x"}function go(e){return"y"===e?"height":"width"}function bo(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function vo(e){return ho(bo(e))}function yo(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const wo=["left","right"],xo=["right","left"],Eo=["top","bottom"],_o=["bottom","top"];function ko(e,t,n,r){const o=mo(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?xo:wo:t?wo:xo;case"left":case"right":return t?Eo:_o;default:return[]}}(po(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(yo)))),a}function Co(e){const t=po(e);return co[t]+e.slice(t.length)}function No(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Do(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function So(e,t,n){let{reference:r,floating:o}=e;const a=bo(t),i=vo(t),s=go(i),l=po(t),c="y"===a,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(mo(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1)}return p}async function Ao(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=fo(t,e),m=No(p),h=s[f?"floating"===d?"reference":"floating":d],g=Do(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),y=await(null==a.isElement?void 0:a.isElement(v))&&await(null==a.getScale?void 0:a.getScale(v))||{x:1,y:1},w=Do(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:v,strategy:l}):b);return{top:(g.top-w.top+m.top)/y.y,bottom:(w.bottom-g.bottom+m.bottom)/y.y,left:(g.left-w.left+m.left)/y.x,right:(w.right-g.right+m.right)/y.x}}function To(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ro(e){return ro.some(t=>e[t]>=0)}const Oo=new Set(["left","top"]);function Fo(){return"undefined"!=typeof window}function Mo(e){return Po(e)?(e.nodeName||"").toLowerCase():"#document"}function jo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Lo(e){var t;return null==(t=(Po(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Po(e){return!!Fo()&&(e instanceof Node||e instanceof jo(e).Node)}function Io(e){return!!Fo()&&(e instanceof Element||e instanceof jo(e).Element)}function zo(e){return!!Fo()&&(e instanceof HTMLElement||e instanceof jo(e).HTMLElement)}function Bo(e){return!(!Fo()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof jo(e).ShadowRoot)}function Uo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Jo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function qo(e){return/^(table|td|th)$/.test(Mo(e))}function Ho(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Wo=/transform|translate|scale|rotate|perspective|filter/,Vo=/paint|layout|strict|content/,$o=e=>!!e&&"none"!==e;let Go;function Ko(e){const t=Io(e)?Jo(e):e;return $o(t.transform)||$o(t.translate)||$o(t.scale)||$o(t.rotate)||$o(t.perspective)||!Zo()&&($o(t.backdropFilter)||$o(t.filter))||Wo.test(t.willChange||"")||Vo.test(t.contain||"")}function Zo(){return null==Go&&(Go="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Go}function Yo(e){return/^(html|body|#document)$/.test(Mo(e))}function Jo(e){return jo(e).getComputedStyle(e)}function Xo(e){return Io(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qo(e){if("html"===Mo(e))return e;const t=e.assignedSlot||e.parentNode||Bo(e)&&e.host||Lo(e);return Bo(t)?t.host:t}function ea(e){const t=Qo(e);return Yo(t)?e.ownerDocument?e.ownerDocument.body:e.body:zo(t)&&Uo(t)?t:ea(t)}function ta(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ea(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=jo(o);if(a){const e=na(i);return t.concat(i,i.visualViewport||[],Uo(o)?o:[],e&&n?ta(e):[])}return t.concat(o,ta(o,[],n))}function na(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ra(e){const t=Jo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=zo(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=io(n)!==a||io(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function oa(e){return Io(e)?e:e.contextElement}function aa(e){const t=oa(e);if(!zo(t))return lo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=ra(t);let i=(a?io(n.width):n.width)/r,s=(a?io(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const ia=lo(0);function sa(e){const t=jo(e);return Zo()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ia}function la(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=oa(e);let i=lo(1);t&&(r?Io(r)&&(i=aa(r)):i=aa(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==jo(e))&&t}(a,n,r)?sa(a):lo(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){const e=jo(a),t=r&&Io(r)?jo(r):r;let n=e,o=na(n);for(;o&&r&&t!==n;){const e=aa(o),t=o.getBoundingClientRect(),r=Jo(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=a,c+=i,n=jo(o),o=na(n)}}return Do({width:u,height:d,x:l,y:c})}function ca(e,t){const n=Xo(e).scrollLeft;return t?t.left+n:la(Lo(e)).left+n}function ua(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ca(e,n),y:n.top+t.scrollTop}}function da(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=jo(e),r=Lo(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const e=Zo();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=ca(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Lo(e),n=Xo(e),r=e.ownerDocument.body,o=ao(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ao(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ca(e);const s=-n.scrollTop;return"rtl"===Jo(r).direction&&(i+=ao(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}(Lo(e));else if(Io(t))r=function(e,t){const n=la(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=zo(e)?aa(e):lo(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=sa(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Do(r)}function fa(e,t){const n=Qo(e);return!(n===t||!Io(n)||Yo(n))&&("fixed"===Jo(n).position||fa(n,t))}function pa(e,t,n){const r=zo(t),o=Lo(t),a="fixed"===n,i=la(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=lo(0);function c(){l.x=ca(o)}if(r||!r&&!a)if(("body"!==Mo(t)||Uo(o))&&(s=Xo(t)),r){const e=la(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const u=!o||r||a?lo(0):ua(o,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function ma(e){return"static"===Jo(e).position}function ha(e,t){if(!zo(e)||"fixed"===Jo(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Lo(e)===n&&(n=n.ownerDocument.body),n}function ga(e,t){const n=jo(e);if(Ho(e))return n;if(!zo(e)){let t=Qo(e);for(;t&&!Yo(t);){if(Io(t)&&!ma(t))return t;t=Qo(t)}return n}let r=ha(e,t);for(;r&&qo(r)&&ma(r);)r=ha(r,t);return r&&Yo(r)&&ma(r)&&!Ko(r)?n:r||function(e){let t=Qo(e);for(;zo(t)&&!Yo(t);){if(Ko(t))return t;if(Ho(t))return null;t=Qo(t)}return null}(e)||n}const ba={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=Lo(r),s=!!t&&Ho(t.floating);if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=lo(1);const u=lo(0),d=zo(r);if((d||!d&&!a)&&(("body"!==Mo(r)||Uo(i))&&(l=Xo(r)),d)){const e=la(r);c=aa(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!i||d||a?lo(0):ua(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:Lo,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?Ho(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=ta(e,[],!1).filter(e=>Io(e)&&"body"!==Mo(e)),o=null;const a="fixed"===Jo(e).position;let i=a?Qo(e):e;for(;Io(i)&&!Yo(i);){const t=Jo(i),n=Ko(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Uo(i)&&!n&&fa(e,i))?r=r.filter(e=>e!==i):o=t,i=Qo(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=da(t,a[0],o);let s=i.top,l=i.right,c=i.bottom,u=i.left;for(let e=1;e<a.length;e++){const n=da(t,a[e],o);s=ao(n.top,s),l=oo(n.right,l),c=oo(n.bottom,c),u=ao(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:ga,getElementRects:async function(e){const t=this.getOffsetParent||ga,n=this.getDimensions,r=await n(e.floating);return{reference:pa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ra(e);return{width:t,height:n}},getScale:aa,isElement:Io,isRTL:function(e){return"rtl"===Jo(e).direction}};function va(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ya(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=oa(e),u=o||a?[...c?ta(c):[],...t?ta(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=Lo(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const m={rootMargin:-so(d)+"px "+-so(o.clientWidth-(u+f))+"px "+-so(o.clientHeight-(d+p))+"px "+-so(u)+"px",threshold:ao(0,oo(1,l))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||va(c,e.getBoundingClientRect())||i(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),a}(c,n):null;let f,p=-1,m=null;i&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!l&&m.observe(c),t&&m.observe(t));let h=l?la(e):null;return l&&function t(){const r=la(e);h&&!va(h,r)&&n();h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(f)}}const wa=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=po(n),s=mo(n),l="y"===bo(n),c=Oo.has(i)?-1:1,u=a&&l?-1:1,d=fo(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},xa=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=fo(e,t),u={x:n,y:r},d=await a.detectOverflow(t,c),f=bo(po(o)),p=ho(f);let m=u[p],h=u[f];if(i){const e="y"===p?"bottom":"right";m=uo(m+d["y"===p?"top":"left"],m,m-d[e])}if(s){const e="y"===f?"bottom":"right";h=uo(h+d["y"===f?"top":"left"],h,h-d[e])}const g=l.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[f]:s}}}}}},Ea=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=fo(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const b=po(o),v=bo(s),y=po(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(y||!h?[Co(s)]:function(e){const t=Co(e);return[yo(e),t,yo(t)]}(s)),E="none"!==m;!f&&E&&x.push(...ko(s,h,m,w));const _=[s,...x],k=await l.detectOverflow(t,g),C=[];let N=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&C.push(k[b]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=mo(e),o=vo(e),a=go(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Co(i)),[i,Co(i)]}(o,i,w);C.push(k[e[0]],k[e[1]])}if(N=[...N,{placement:o,overflows:C}],!C.every(e=>e<=0)){var D,S;const e=((null==(D=a.flip)?void 0:D.index)||0)+1,t=_[e];if(t){if(!("alignment"===d&&v!==bo(t))||N.every(e=>bo(e.placement)!==v||e.overflows[0]>0))return{data:{index:e,overflows:N},reset:{placement:t}}}let n=null==(S=N.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:S.placement;if(!n)switch(p){case"bestFit":{var A;const e=null==(A=N.filter(e=>{if(E){const t=bo(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:A[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},_a=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=fo(e,t),u=await i.detectOverflow(t,c),d=po(o),f=mo(o),p="y"===bo(o),{width:m,height:h}=a.floating;let g,b;"top"===d||"bottom"===d?(g=d,b=f===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=d,g="end"===f?"top":"bottom");const v=h-u.top-u.bottom,y=m-u.left-u.right,w=oo(h-u[g],v),x=oo(m-u[b],y),E=!t.middlewareData.shift;let _=w,k=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=y),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(_=v),E&&!f){const e=ao(u.left,0),t=ao(u.right,0),n=ao(u.top,0),r=ao(u.bottom,0);p?k=m-2*(0!==e||0!==t?e+t:ao(u.left,u.right)):_=h-2*(0!==n||0!==r?n+r:ao(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:_});const C=await i.getDimensions(s.floating);return m!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}},ka=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=fo(e,t);switch(o){case"referenceHidden":{const e=To(await r.detectOverflow(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ro(e)}}}case"escaped":{const e=To(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ro(e)}}}default:return{}}}}},Ca=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=fo(e,t)||{};if(null==c)return{};const d=No(u),f={x:n,y:r},p=vo(o),m=go(p),h=await i.getDimensions(c),g="y"===p,b=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],E=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let _=E?E[y]:0;_&&await(null==i.isElement?void 0:i.isElement(E))||(_=s.floating[y]||a.floating[m]);const k=w/2-x/2,C=_/2-h[m]/2-1,N=oo(d[b],C),D=oo(d[v],C),S=N,A=_-h[m]-D,T=_/2-h[m]/2+k,R=uo(S,T,A),O=!l.arrow&&null!=mo(o)&&T!==R&&a.reference[m]/2-(T<S?N:D)-h[m]/2<0,F=O?T<S?T-S:T-A:0;return{[p]:f[p]+F,data:{[p]:R,centerOffset:T-R-F,...O&&{alignmentOffset:F}},reset:O}}}),Na=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=fo(e,t),u={x:n,y:r},d=bo(o),f=ho(d);let p=u[f],m=u[d];const h=fo(s,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var b,v;const e="y"===f?"width":"height",t=Oo.has(po(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(b=i.offset)?void 0:b[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Da=(e,t,n)=>{const r=new Map,o={platform:ba,...n},a={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:Ao},l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=So(c,r,l),f=r,p=0;const m={};for(let n=0;n<a.length;n++){const h=a[n];if(!h)continue;const{name:g,fn:b}=h,{x:v,y:y,data:w,reset:x}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=y?y:d,m[g]={...m[g],...w},x&&p<50&&(p++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:u,y:d}=So(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}})(e,t,{...o,platform:a})};var Sa="undefined"!=typeof document?e.useLayoutEffect:function(){};function Aa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Aa(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Aa(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Ta(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ra(e,t){const n=Ta(e);return Math.round(t*n)/n}function Oa(e){const t=c.useRef(e);return Sa(()=>{t.current=e}),t}const Fa=(e,t)=>{const n=wa(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ma=(e,t)=>{const n=xa(e);return{name:n.name,fn:n.fn,options:[e,t]}},ja=(e,t)=>({fn:Na(e).fn,options:[e,t]}),La=(e,t)=>{const n=Ea(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pa=(e,t)=>{const n=_a(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ia=(e,t)=>{const n=ka(e);return{name:n.name,fn:n.fn,options:[e,t]}},za=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Ca({element:n.current,padding:r}).fn(t):{}:n?Ca({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ba=c.forwardRef((e,n)=>{const{children:r,width:o=10,height:a=5,...i}=e;return t.jsx(It.svg,{...i,ref:n,width:o,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:t.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ba.displayName="Arrow";var Ua=Ba;function qa(e){const[t,n]=c.useState(void 0);return At(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}var Ha="Popper",[Wa,Va]=Dt(Ha),[$a,Ga]=Wa(Ha),Ka=e=>{const{__scopePopper:n,children:r}=e,[o,a]=c.useState(null);return t.jsx($a,{scope:n,anchor:o,onAnchorChange:a,children:r})};Ka.displayName=Ha;var Za="PopperAnchor",Ya=c.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:o,...a}=e,i=Ga(Za,r),s=c.useRef(null),l=at(n,s),u=c.useRef(null);return c.useEffect(()=>{const e=u.current;u.current=o?.current||s.current,e!==u.current&&i.onAnchorChange(u.current)}),o?null:t.jsx(It.div,{...a,ref:l})});Ya.displayName=Za;var Ja="PopperContent",[Xa,Qa]=Wa(Ja),ei=c.forwardRef((e,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:a=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:b,...v}=e,y=Ga(Ja,r),[w,x]=c.useState(null),E=at(n,e=>x(e)),[_,k]=c.useState(null),C=qa(_),N=C?.width??0,D=C?.height??0,S=o+("center"!==i?"-"+i:""),A="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},T=Array.isArray(f)?f:[f],R=T.length>0,O={padding:A,boundary:T.filter(oi),altBoundary:R},{refs:F,floatingStyles:M,placement:j,isPositioned:L,middlewareData:P}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:d}=e,[f,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=c.useState(r);Aa(m,r)||h(r);const[g,b]=c.useState(null),[v,y]=c.useState(null),w=c.useCallback(e=>{e!==k.current&&(k.current=e,b(e))},[]),x=c.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),E=a||g,_=i||v,k=c.useRef(null),C=c.useRef(null),N=c.useRef(f),D=null!=l,S=Oa(l),A=Oa(o),T=Oa(d),R=c.useCallback(()=>{if(!k.current||!C.current)return;const e={placement:t,strategy:n,middleware:m};A.current&&(e.platform=A.current),Da(k.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==T.current};O.current&&!Aa(N.current,t)&&(N.current=t,u.flushSync(()=>{p(t)}))})},[m,t,n,A,T]);Sa(()=>{!1===d&&N.current.isPositioned&&(N.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const O=c.useRef(!1);Sa(()=>(O.current=!0,()=>{O.current=!1}),[]),Sa(()=>{if(E&&(k.current=E),_&&(C.current=_),E&&_){if(S.current)return S.current(E,_,R);R()}},[E,_,R,S,D]);const F=c.useMemo(()=>({reference:k,floating:C,setReference:w,setFloating:x}),[w,x]),M=c.useMemo(()=>({reference:E,floating:_}),[E,_]),j=c.useMemo(()=>{const e={position:n,left:0,top:0};if(!M.floating)return e;const t=Ra(M.floating,f.x),r=Ra(M.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Ta(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,M.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:R,refs:F,elements:M,floatingStyles:j}),[f,R,F,M,j])}({strategy:"fixed",placement:S,whileElementsMounted:(...e)=>ya(...e,{animationFrame:"always"===g}),elements:{reference:y.anchor},middleware:[Fa({mainAxis:a+D,alignmentAxis:s}),d&&Ma({mainAxis:!0,crossAxis:!1,limiter:"partial"===m?ja():void 0,...O}),d&&La({...O}),Pa({...O,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),_&&za({element:_,padding:l}),ai({arrowWidth:N,arrowHeight:D}),h&&Ia({strategy:"referenceHidden",...O})]}),[I,z]=ii(j),B=Bt(b);At(()=>{L&&B?.()},[L,B]);const U=P.arrow?.x,q=P.arrow?.y,H=0!==P.arrow?.centerOffset,[W,V]=c.useState();return At(()=>{w&&V(window.getComputedStyle(w).zIndex)},[w]),t.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:L?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(" "),...P.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:t.jsx(Xa,{scope:r,placedSide:I,onArrowChange:k,arrowX:U,arrowY:q,shouldHideArrow:H,children:t.jsx(It.div,{"data-side":I,"data-align":z,...v,ref:E,style:{...v.style,animation:L?void 0:"none"}})})})});ei.displayName=Ja;var ti="PopperArrow",ni={top:"bottom",right:"left",bottom:"top",left:"right"},ri=c.forwardRef(function(e,n){const{__scopePopper:r,...o}=e,a=Qa(ti,r),i=ni[a.placedSide];return t.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:t.jsx(Ua,{...o,ref:n,style:{...o.style,display:"block"}})})});function oi(e){return null!==e}ri.displayName=ti;var ai=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,i=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=ii(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+i/2,f=(o.arrow?.y??0)+s/2;let p="",m="";return"bottom"===l?(p=a?u:`${d}px`,m=-s+"px"):"top"===l?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):"right"===l?(p=-s+"px",m=a?u:`${f}px`):"left"===l&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function ii(e){const[t,n="center"]=e.split("-");return[t,n]}var si=Ka,li=Ya,ci=ei,ui=ri,di=Symbol("radix.slottable");var fi=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),pi=c.forwardRef((e,n)=>t.jsx(It.span,{...e,ref:n,style:{...fi,...e.style}}));pi.displayName="VisuallyHidden";var mi=pi,[hi,gi]=Dt("Tooltip",[Va]),bi=Va(),vi="TooltipProvider",yi=700,wi="tooltip.open",[xi,Ei]=hi(vi),_i=e=>{const{__scopeTooltip:n,delayDuration:r=yi,skipDelayDuration:o=300,disableHoverableContent:a=!1,children:i}=e,s=c.useRef(!0),l=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const e=u.current;return()=>window.clearTimeout(e)},[]),t.jsx(xi,{scope:n,isOpenDelayedRef:s,delayDuration:r,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,o)},[o]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(e=>{l.current=e},[]),disableHoverableContent:a,children:i})};_i.displayName=vi;var ki="Tooltip",[Ci,Ni]=hi(ki),Di=e=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:a,onOpenChange:i,disableHoverableContent:s,delayDuration:l}=e,u=Ei(ki,e.__scopeTooltip),d=bi(n),[f,p]=c.useState(null),m=Ot(),h=c.useRef(0),g=s??u.disableHoverableContent,b=l??u.delayDuration,v=c.useRef(!1),[y,w]=Mt({prop:o,defaultProp:a??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(wi))):u.onClose(),i?.(e)},caller:ki}),x=c.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),E=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,w(!0)},[w]),_=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),k=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,w(!0),h.current=0},b)},[b,w]);return c.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),t.jsx(si,{...d,children:t.jsx(Ci,{scope:n,contentId:m,open:y,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayedRef.current?k():E()},[u.isOpenDelayedRef,k,E]),onTriggerLeave:c.useCallback(()=>{g?_():(window.clearTimeout(h.current),h.current=0)},[_,g]),onOpen:E,onClose:_,disableHoverableContent:g,children:r})})};Di.displayName=ki;var Si="TooltipTrigger",Ai=c.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,a=Ni(Si,r),i=Ei(Si,r),s=bi(r),l=at(n,c.useRef(null),a.onTriggerChange),u=c.useRef(!1),d=c.useRef(!1),f=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),t.jsx(li,{asChild:!0,...s,children:t.jsx(It.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...o,ref:l,onPointerMove:Nt(e.onPointerMove,e=>{"touch"!==e.pointerType&&(d.current||i.isPointerInTransitRef.current||(a.onTriggerEnter(),d.current=!0))}),onPointerLeave:Nt(e.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:Nt(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Nt(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:Nt(e.onBlur,a.onClose),onClick:Nt(e.onClick,a.onClose)})})});Ai.displayName=Si;var[Ti,Ri]=hi("TooltipPortal",{forceMount:void 0}),Oi="TooltipContent",Fi=c.forwardRef((e,n)=>{const r=Ri(Oi,e.__scopeTooltip),{forceMount:o=r.forceMount,side:a="top",...i}=e,s=Ni(Oi,e.__scopeTooltip);return t.jsx(sn,{present:o||s.open,children:s.disableHoverableContent?t.jsx(Ii,{side:a,...i,ref:n}):t.jsx(Mi,{side:a,...i,ref:n})})}),Mi=c.forwardRef((e,n)=>{const r=Ni(Oi,e.__scopeTooltip),o=Ei(Oi,e.__scopeTooltip),a=c.useRef(null),i=at(n,a),[s,l]=c.useState(null),{trigger:u,onClose:d}=r,f=a.current,{onPointerInTransitChange:p}=o,m=c.useCallback(()=>{l(null),p(!1)},[p]),h=c.useCallback((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),a=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...o,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);l(a),p(!0)},[p]);return c.useEffect(()=>()=>m(),[m]),c.useEffect(()=>{if(u&&f){const e=e=>h(e,f),t=e=>h(e,u);return u.addEventListener("pointerleave",e),f.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),f.removeEventListener("pointerleave",t)}}},[u,f,h,m]),c.useEffect(()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||f?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e],s=t[a],l=i.x,c=i.y,u=s.x,d=s.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}(n,s);r?m():o&&(m(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[u,f,s,d,m]),t.jsx(Ii,{...e,ref:i})}),[ji,Li]=hi(ki,{isInside:!1}),Pi=function(e){const n=({children:e})=>t.jsx(t.Fragment,{children:e});return n.displayName=`${e}.Slottable`,n.__radixId=di,n}("TooltipContent"),Ii=c.forwardRef((e,n)=>{const{__scopeTooltip:r,children:o,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:s,...l}=e,u=Ni(Oi,r),d=bi(r),{onClose:f}=u;return c.useEffect(()=>(document.addEventListener(wi,f),()=>document.removeEventListener(wi,f)),[f]),c.useEffect(()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&f()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[u.trigger,f]),t.jsx($t,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:t.jsxs(ci,{"data-state":u.stateAttribute,...d,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[t.jsx(Pi,{children:o}),t.jsx(ji,{scope:r,isInside:!0,children:t.jsx(mi,{id:u.contentId,role:"tooltip",children:a||o})})]})})});Fi.displayName=Oi;var zi="TooltipArrow";c.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,a=bi(r);return Li(zi,r).isInside?null:t.jsx(ui,{...a,...o,ref:n})}).displayName=zi;var Bi=Fi,Ui=_i,qi=Di,Hi=Ai,Wi=c.forwardRef(function(e,t){var n=e.className,r=e.sideOffset,o=void 0===r?4:r,a=_(e,["className","sideOffset"]);return c.createElement(Bi,Object.assign({ref:t,sideOffset:o,className:tt("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",n)},a))});Wi.displayName=Bi.displayName;var Vi=c.createContext(null);function $i(){var e=c.useContext(Vi);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Gi(e){var t=e.defaultOpen,n=void 0===t||t,r=e.open,o=e.onOpenChange,a=e.className,i=e.style,s=e.children,l=_(e,["defaultOpen","open","onOpenChange","className","style","children"]),u=function(){var e=v(c.useState(void 0),2),t=e[0],n=e[1];return c.useEffect(function(){var e=window.matchMedia("(max-width: ".concat(767,"px)")),t=function(){n(window.innerWidth<768)};return e.addEventListener("change",t),n(window.innerWidth<768),function(){return e.removeEventListener("change",t)}},[]),!!t}(),d=v(c.useState(!1),2),f=d[0],p=d[1],m=v(c.useState(n),2),h=m[0],g=m[1],b=null!=r?r:h,y=c.useCallback(function(e){var t="function"==typeof e?e(b):e;o?o(t):g(t),document.cookie="".concat("sidebar_state","=").concat(t,"; path=/; max-age=").concat(604800)},[o,b]),w=c.useCallback(function(){return u?p(function(e){return!e}):y(function(e){return!e})},[u,y,p]);c.useEffect(function(){var e=function(e){"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),w())};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[w]);var x=b?"expanded":"collapsed",E=c.useMemo(function(){return{state:x,open:b,setOpen:y,isMobile:u,openMobile:f,setOpenMobile:p,toggleSidebar:w}},[x,b,y,u,f,p,w]);return c.createElement(Vi.Provider,{value:E},c.createElement(Ui,{delayDuration:0},c.createElement("div",Object.assign({style:Object.assign({"--sidebar-width":"16rem","--sidebar-width-icon":"3rem"},i),className:tt("group/sidebar-wrapper flex min-h-svh w-full",a)},l),s)))}function Ki(e){var t=e.side,n=void 0===t?"left":t,r=e.variant,o=void 0===r?"sidebar":r,a=e.collapsible,i=void 0===a?"offcanvas":a,s=e.className,l=e.children,u=_(e,["side","variant","collapsible","className","children"]),d=$i(),f=d.isMobile,p=d.state,m=d.openMobile,h=d.setOpenMobile;return"none"===i?c.createElement("div",Object.assign({className:tt("bg-sidebar text-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",s)},u),l):f?c.createElement(Zr,Object.assign({open:m,onOpenChange:h},u),c.createElement(Qr,{className:"bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:n},c.createElement(eo,{className:"sr-only"},c.createElement(to,null,"Sidebar"),c.createElement(no,null,"Displays the mobile sidebar.")),c.createElement("div",{className:"flex h-full w-full flex-col"},l))):c.createElement("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":p,"data-collapsible":"collapsed"===p?i:"","data-variant":o,"data-side":n},c.createElement("div",{className:tt("relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","floating"===o||"inset"===o?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")}),c.createElement("div",Object.assign({className:tt("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex","left"===n?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===o||"inset"===o?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",s)},u),c.createElement("div",{className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"},l)))}function Zi(e){var t=e.className,n=e.onClick,r=_(e,["className","onClick"]),o=$i().toggleSidebar;return c.createElement(vt,Object.assign({variant:"ghost",size:"icon",className:tt("h-7 w-7",t),onClick:function(e){null==n||n(e),o()}},r),c.createElement(K,null),c.createElement("span",{className:"sr-only"},"Toggle Sidebar"))}function Yi(e){var t=e.className,n=_(e,["className"]);return c.createElement("main",Object.assign({className:tt("bg-background relative flex w-full flex-1 flex-col min-w-0 overflow-x-hidden","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t)},n))}function Ji(e){var t=e.className,n=_(e,["className"]);return c.createElement("div",Object.assign({className:tt("flex flex-col gap-2 p-2",t)},n))}function Xi(e){var t=e.className,n=_(e,["className"]);return c.createElement("div",Object.assign({className:tt("flex flex-col gap-2 p-2",t)},n))}function Qi(e){var t=e.className,n=_(e,["className"]);return c.createElement("div",Object.assign({className:tt("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t)},n))}function es(e){var t=e.className,n=_(e,["className"]);return c.createElement("div",Object.assign({className:tt("relative flex w-full min-w-0 flex-col p-2",t)},n))}function ts(e){var t=e.className,n=e.asChild,r=void 0!==n&&n,o=_(e,["className","asChild"]),a=r?ut:"div";return c.createElement(a,Object.assign({className:tt("text-sidebar-foreground/70 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t)},o))}function ns(e){var t=e.className,n=_(e,["className"]);return c.createElement("div",Object.assign({className:tt("w-full text-sm",t)},n))}function rs(e){var t=e.className,n=_(e,["className"]);return c.createElement("ul",Object.assign({className:tt("flex w-full min-w-0 flex-col gap-1",t)},n))}function os(e){var t=e.className,n=_(e,["className"]);return c.createElement("li",Object.assign({className:tt("group/menu-item relative",t)},n))}var as=gt("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function is(e){var t=e.asChild,n=void 0!==t&&t,r=e.isActive,o=void 0!==r&&r,a=e.variant,i=void 0===a?"default":a,s=e.size,l=void 0===s?"default":s,u=e.tooltip,d=e.className,f=_(e,["asChild","isActive","variant","size","tooltip","className"]),p=n?ut:"button",m=$i(),h=m.isMobile,g=m.state,b=c.createElement(p,Object.assign({"data-size":l,"data-active":o,className:tt(as({variant:i,size:l}),d)},f));return u?("string"==typeof u&&(u={children:u}),c.createElement(qi,null,c.createElement(Hi,{asChild:!0},b),c.createElement(Wi,Object.assign({side:"right",align:"center",hidden:"collapsed"!==g||h},u)))):b}function ss(e){const n=ls(e),r=c.forwardRef((e,r)=>{const{children:o,...a}=e,i=c.Children.toArray(o),s=i.find(us);if(s){const e=s.props.children,o=i.map(t=>t===s?c.Children.count(e)>1?c.Children.only(null):c.isValidElement(e)?e.props.children:null:t);return t.jsx(n,{...a,ref:r,children:c.isValidElement(e)?c.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})});return r.displayName=`${e}.Slot`,r}function ls(e){const t=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==c.Fragment&&(o.ref=t?ot(t,e):e),c.cloneElement(n,o)}return c.Children.count(n)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var cs=Symbol("radix.slottable");function us(e){return c.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===cs}function ds(n){const r=n+"CollectionProvider",[o,a]=Dt(r),[i,s]=o(r,{collectionRef:{current:null},itemMap:new Map}),l=n=>{const{scope:r,children:o}=n,a=e.useRef(null),s=e.useRef(new Map).current;return t.jsx(i,{scope:r,itemMap:s,collectionRef:a,children:o})};l.displayName=r;const c=n+"CollectionSlot",u=ss(c),d=e.forwardRef((e,n)=>{const{scope:r,children:o}=e,a=at(n,s(c,r).collectionRef);return t.jsx(u,{ref:a,children:o})});d.displayName=c;const f=n+"CollectionItemSlot",p="data-radix-collection-item",m=ss(f),h=e.forwardRef((n,r)=>{const{scope:o,children:a,...i}=n,l=e.useRef(null),c=at(r,l),u=s(f,o);return e.useEffect(()=>(u.itemMap.set(l,{ref:l,...i}),()=>{u.itemMap.delete(l)})),t.jsx(m,{[p]:"",ref:c,children:a})});return h.displayName=f,[{Provider:l,Slot:d,ItemSlot:h},function(t){const r=s(n+"CollectionConsumer",t);return e.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])},a]}var fs=c.createContext(void 0);function ps(e){const t=c.useContext(fs);return e||t||"ltr"}var ms="rovingFocusGroup.onEntryFocus",hs={bubbles:!1,cancelable:!0},gs="RovingFocusGroup",[bs,vs,ys]=ds(gs),[ws,xs]=Dt(gs,[ys]),[Es,_s]=ws(gs),ks=c.forwardRef((e,n)=>t.jsx(bs.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(bs.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Cs,{...e,ref:n})})}));ks.displayName=gs;var Cs=c.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=c.useRef(null),h=at(n,m),g=ps(i),[b,v]=Mt({prop:s,defaultProp:l??null,onChange:u,caller:gs}),[y,w]=c.useState(!1),x=Bt(d),E=vs(r),_=c.useRef(!1),[k,C]=c.useState(0);return c.useEffect(()=>{const e=m.current;if(e)return e.addEventListener(ms,x),()=>e.removeEventListener(ms,x)},[x]),t.jsx(Es,{scope:r,orientation:o,dir:g,loop:a,currentTabStopId:b,onItemFocus:c.useCallback(e=>v(e),[v]),onItemShiftTab:c.useCallback(()=>w(!0),[]),onFocusableItemAdd:c.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:c.useCallback(()=>C(e=>e-1),[]),children:t.jsx(It.div,{tabIndex:y||0===k?-1:0,"data-orientation":o,...p,ref:h,style:{outline:"none",...e.style},onMouseDown:Nt(e.onMouseDown,()=>{_.current=!0}),onFocus:Nt(e.onFocus,e=>{const t=!_.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(ms,hs);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=E().filter(e=>e.focusable);As([e.find(e=>e.active),e.find(e=>e.id===b),...e].filter(Boolean).map(e=>e.ref.current),f)}}_.current=!1}),onBlur:Nt(e.onBlur,()=>w(!1))})})}),Ns="RovingFocusGroupItem",Ds=c.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:a=!1,tabStopId:i,children:s,...l}=e,u=Ot(),d=i||u,f=_s(Ns,r),p=f.currentTabStopId===d,m=vs(r),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:b}=f;return c.useEffect(()=>{if(o)return h(),()=>g()},[o,h,g]),t.jsx(bs.ItemSlot,{scope:r,id:d,focusable:o,active:a,children:t.jsx(It.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:n,onMouseDown:Nt(e.onMouseDown,e=>{o?f.onItemFocus(d):e.preventDefault()}),onFocus:Nt(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:Nt(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void f.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Ss[r]}(e,f.orientation,f.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=m().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const a=o.indexOf(e.currentTarget);o=f.loop?(r=a+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(a+1)}setTimeout(()=>As(o))}var n,r}),children:"function"==typeof s?s({isCurrentTabStop:p,hasTabStop:null!=b}):s})})});Ds.displayName=Ns;var Ss={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function As(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Ts=ks,Rs=Ds,Os=["Enter"," "],Fs=["ArrowUp","PageDown","End"],Ms=["ArrowDown","PageUp","Home",...Fs],js={ltr:[...Os,"ArrowRight"],rtl:[...Os,"ArrowLeft"]},Ls={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ps="Menu",[Is,zs,Bs]=ds(Ps),[Us,qs]=Dt(Ps,[Bs,Va,xs]),Hs=Va(),Ws=xs(),[Vs,$s]=Us(Ps),[Gs,Ks]=Us(Ps),Zs=e=>{const{__scopeMenu:n,open:r=!1,children:o,dir:a,onOpenChange:i,modal:s=!0}=e,l=Hs(n),[u,d]=c.useState(null),f=c.useRef(!1),p=Bt(i),m=ps(a);return c.useEffect(()=>{const e=()=>{f.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),t.jsx(si,{...l,children:t.jsx(Vs,{scope:n,open:r,onOpenChange:p,content:u,onContentChange:d,children:t.jsx(Gs,{scope:n,onClose:c.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:s,children:o})})})};Zs.displayName=Ps;var Ys=c.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,a=Hs(r);return t.jsx(li,{...a,...o,ref:n})});Ys.displayName="MenuAnchor";var Js="MenuPortal",[Xs,Qs]=Us(Js,{forceMount:void 0}),el=e=>{const{__scopeMenu:n,forceMount:r,children:o,container:a}=e,i=$s(Js,n);return t.jsx(Xs,{scope:n,forceMount:r,children:t.jsx(sn,{present:r||i.open,children:t.jsx(an,{asChild:!0,container:a,children:o})})})};el.displayName=Js;var tl="MenuContent",[nl,rl]=Us(tl),ol=c.forwardRef((e,n)=>{const r=Qs(tl,e.__scopeMenu),{forceMount:o=r.forceMount,...a}=e,i=$s(tl,e.__scopeMenu),s=Ks(tl,e.__scopeMenu);return t.jsx(Is.Provider,{scope:e.__scopeMenu,children:t.jsx(sn,{present:o||i.open,children:t.jsx(Is.Slot,{scope:e.__scopeMenu,children:s.modal?t.jsx(al,{...a,ref:n}):t.jsx(il,{...a,ref:n})})})})}),al=c.forwardRef((e,n)=>{const r=$s(tl,e.__scopeMenu),o=c.useRef(null),a=at(n,o);return c.useEffect(()=>{const e=o.current;if(e)return or(e)},[]),t.jsx(ll,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Nt(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),il=c.forwardRef((e,n)=>{const r=$s(tl,e.__scopeMenu);return t.jsx(ll,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),sl=ss("MenuContent.ScrollLock"),ll=c.forwardRef((e,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,...b}=e,v=$s(tl,r),y=Ks(tl,r),w=Hs(r),x=Ws(r),E=zs(r),[_,k]=c.useState(null),C=c.useRef(null),N=at(n,C,v.onContentChange),D=c.useRef(0),S=c.useRef(""),A=c.useRef(0),T=c.useRef(null),R=c.useRef("right"),O=c.useRef(0),F=g?Jn:c.Fragment,M=g?{as:sl,allowPinchZoom:!0}:void 0,j=e=>{const t=S.current+e,n=E().filter(e=>!e.disabled),r=document.activeElement,o=n.find(e=>e.ref.current===r)?.textValue,a=function(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),o=r?t[0]:t,a=n?e.indexOf(n):-1;let i=(s=e,l=Math.max(a,0),s.map((e,t)=>s[(l+t)%s.length]));var s,l;1===o.length&&(i=i.filter(e=>e!==n));const c=i.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}(n.map(e=>e.textValue),t,o),i=n.find(e=>e.textValue===a)?.ref.current;!function e(t){S.current=t,window.clearTimeout(D.current),""!==t&&(D.current=window.setTimeout(()=>e(""),1e3))}(t),i&&setTimeout(()=>i.focus())};c.useEffect(()=>()=>window.clearTimeout(D.current),[]),un();const L=c.useCallback(e=>R.current===T.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e],s=t[a],l=i.x,c=i.y,u=s.x,d=s.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}(n,t)}(e,T.current?.area),[]);return t.jsx(nl,{scope:r,searchRef:S,onItemEnter:c.useCallback(e=>{L(e)&&e.preventDefault()},[L]),onItemLeave:c.useCallback(e=>{L(e)||(C.current?.focus(),k(null))},[L]),onTriggerLeave:c.useCallback(e=>{L(e)&&e.preventDefault()},[L]),pointerGraceTimerRef:A,onPointerGraceIntentChange:c.useCallback(e=>{T.current=e},[]),children:t.jsx(F,{...M,children:t.jsx(Xt,{asChild:!0,trapped:a,onMountAutoFocus:Nt(i,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:t.jsx($t,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:t.jsx(Ts,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:_,onCurrentTabStopIdChange:k,onEntryFocus:Nt(u,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:t.jsx(ci,{role:"menu","aria-orientation":"vertical","data-state":Ml(v.open),"data-radix-menu-content":"",dir:y.dir,...w,...b,ref:N,style:{outline:"none",...b.style},onKeyDown:Nt(b.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&j(e.key));const o=C.current;if(e.target!==o)return;if(!Ms.includes(e.key))return;e.preventDefault();const a=E().filter(e=>!e.disabled).map(e=>e.ref.current);Fs.includes(e.key)&&a.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(a)}),onBlur:Nt(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),S.current="")}),onPointerMove:Nt(e.onPointerMove,Pl(e=>{const t=e.target,n=O.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>O.current?"right":"left";R.current=t,O.current=e.clientX}}))})})})})})})});ol.displayName=tl;var cl=c.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return t.jsx(It.div,{role:"group",...o,ref:n})});cl.displayName="MenuGroup";var ul=c.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return t.jsx(It.div,{...o,ref:n})});ul.displayName="MenuLabel";var dl="MenuItem",fl="menu.itemSelect",pl=c.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:o,...a}=e,i=c.useRef(null),s=Ks(dl,e.__scopeMenu),l=rl(dl,e.__scopeMenu),u=at(n,i),d=c.useRef(!1);return t.jsx(ml,{...a,ref:u,disabled:r,onClick:Nt(e.onClick,()=>{const e=i.current;if(!r&&e){const t=new CustomEvent(fl,{bubbles:!0,cancelable:!0});e.addEventListener(fl,e=>o?.(e),{once:!0}),zt(e,t),t.defaultPrevented?d.current=!1:s.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:Nt(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:Nt(e.onKeyDown,e=>{const t=""!==l.searchRef.current;r||t&&" "===e.key||Os.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});pl.displayName=dl;var ml=c.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:a,...i}=e,s=rl(dl,r),l=Ws(r),u=c.useRef(null),d=at(n,u),[f,p]=c.useState(!1),[m,h]=c.useState("");return c.useEffect(()=>{const e=u.current;e&&h((e.textContent??"").trim())},[i.children]),t.jsx(Is.ItemSlot,{scope:r,disabled:o,textValue:a??m,children:t.jsx(Rs,{asChild:!0,...l,focusable:!o,children:t.jsx(It.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...i,ref:d,onPointerMove:Nt(e.onPointerMove,Pl(e=>{if(o)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:Nt(e.onPointerLeave,Pl(e=>s.onItemLeave(e))),onFocus:Nt(e.onFocus,()=>p(!0)),onBlur:Nt(e.onBlur,()=>p(!1))})})})}),hl=c.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:o,...a}=e;return t.jsx(_l,{scope:e.__scopeMenu,checked:r,children:t.jsx(pl,{role:"menuitemcheckbox","aria-checked":jl(r)?"mixed":r,...a,ref:n,"data-state":Ll(r),onSelect:Nt(a.onSelect,()=>o?.(!!jl(r)||!r),{checkForDefaultPrevented:!1})})})});hl.displayName="MenuCheckboxItem";var gl="MenuRadioGroup",[bl,vl]=Us(gl,{value:void 0,onValueChange:()=>{}}),yl=c.forwardRef((e,n)=>{const{value:r,onValueChange:o,...a}=e,i=Bt(o);return t.jsx(bl,{scope:e.__scopeMenu,value:r,onValueChange:i,children:t.jsx(cl,{...a,ref:n})})});yl.displayName=gl;var wl="MenuRadioItem",xl=c.forwardRef((e,n)=>{const{value:r,...o}=e,a=vl(wl,e.__scopeMenu),i=r===a.value;return t.jsx(_l,{scope:e.__scopeMenu,checked:i,children:t.jsx(pl,{role:"menuitemradio","aria-checked":i,...o,ref:n,"data-state":Ll(i),onSelect:Nt(o.onSelect,()=>a.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});xl.displayName=wl;var El="MenuItemIndicator",[_l,kl]=Us(El,{checked:!1}),Cl=c.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:o,...a}=e,i=kl(El,r);return t.jsx(sn,{present:o||jl(i.checked)||!0===i.checked,children:t.jsx(It.span,{...a,ref:n,"data-state":Ll(i.checked)})})});Cl.displayName=El;var Nl=c.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return t.jsx(It.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});Nl.displayName="MenuSeparator";var Dl=c.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,a=Hs(r);return t.jsx(ui,{...a,...o,ref:n})});Dl.displayName="MenuArrow";var[Sl,Al]=Us("MenuSub"),Tl="MenuSubTrigger",Rl=c.forwardRef((e,n)=>{const r=$s(Tl,e.__scopeMenu),o=Ks(Tl,e.__scopeMenu),a=Al(Tl,e.__scopeMenu),i=rl(Tl,e.__scopeMenu),s=c.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=i,d={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const e=l.current;return()=>{window.clearTimeout(e),u(null)}},[l,u]),t.jsx(Ys,{asChild:!0,...d,children:t.jsx(ml,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":Ml(r.open),...e,ref:ot(n,a.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Nt(e.onPointerMove,Pl(t=>{i.onItemEnter(t),t.defaultPrevented||e.disabled||r.open||s.current||(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:Nt(e.onPointerLeave,Pl(e=>{f();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,o="right"===n,a=o?-5:5,s=t[o?"left":"right"],c=t[o?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:n}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Nt(e.onKeyDown,t=>{const n=""!==i.searchRef.current;e.disabled||n&&" "===t.key||js[o.dir].includes(t.key)&&(r.onOpenChange(!0),r.content?.focus(),t.preventDefault())})})})});Rl.displayName=Tl;var Ol="MenuSubContent",Fl=c.forwardRef((e,n)=>{const r=Qs(tl,e.__scopeMenu),{forceMount:o=r.forceMount,...a}=e,i=$s(tl,e.__scopeMenu),s=Ks(tl,e.__scopeMenu),l=Al(Ol,e.__scopeMenu),u=c.useRef(null),d=at(n,u);return t.jsx(Is.Provider,{scope:e.__scopeMenu,children:t.jsx(sn,{present:o||i.open,children:t.jsx(Is.Slot,{scope:e.__scopeMenu,children:t.jsx(ll,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:d,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Nt(e.onFocusOutside,e=>{e.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Nt(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:Nt(e.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=Ls[s.dir].includes(e.key);t&&n&&(i.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});function Ml(e){return e?"open":"closed"}function jl(e){return"indeterminate"===e}function Ll(e){return jl(e)?"indeterminate":e?"checked":"unchecked"}function Pl(e){return t=>"mouse"===t.pointerType?e(t):void 0}Fl.displayName=Ol;var Il=Zs,zl=Ys,Bl=el,Ul=ol,ql=cl,Hl=ul,Wl=pl,Vl=hl,$l=yl,Gl=xl,Kl=Cl,Zl=Nl,Yl=Dl,Jl=Rl,Xl=Fl,Ql="DropdownMenu",[ec,tc]=Dt(Ql,[qs]),nc=qs(),[rc,oc]=ec(Ql),ac=e=>{const{__scopeDropdownMenu:n,children:r,dir:o,open:a,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,u=nc(n),d=c.useRef(null),[f,p]=Mt({prop:a,defaultProp:i??!1,onChange:s,caller:Ql});return t.jsx(rc,{scope:n,triggerId:Ot(),triggerRef:d,contentId:Ot(),open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(e=>!e),[p]),modal:l,children:t.jsx(Il,{...u,open:f,onOpenChange:p,dir:o,modal:l,children:r})})};ac.displayName=Ql;var ic="DropdownMenuTrigger",sc=c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...a}=e,i=oc(ic,r),s=nc(r);return t.jsx(zl,{asChild:!0,...s,children:t.jsx(It.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...a,ref:ot(n,i.triggerRef),onPointerDown:Nt(e.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())}),onKeyDown:Nt(e.onKeyDown,e=>{o||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});sc.displayName=ic;var lc=e=>{const{__scopeDropdownMenu:n,...r}=e,o=nc(n);return t.jsx(Bl,{...o,...r})};lc.displayName="DropdownMenuPortal";var cc="DropdownMenuContent",uc=c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=oc(cc,r),i=nc(r),s=c.useRef(!1);return t.jsx(Ul,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...o,ref:n,onCloseAutoFocus:Nt(e.onCloseAutoFocus,e=>{s.current||a.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:Nt(e.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.modal&&!r||(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});uc.displayName=cc;c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=nc(r);return t.jsx(ql,{...a,...o,ref:n})}).displayName="DropdownMenuGroup";var dc=c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=nc(r);return t.jsx(Hl,{...a,...o,ref:n})});dc.displayName="DropdownMenuLabel";var fc=c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=nc(r);return t.jsx(Wl,{...a,...o,ref:n})});fc.displayName="DropdownMenuItem";var pc=c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=nc(r);return t.jsx(Vl,{...a,...o,ref:n})});pc.displayName="DropdownMenuCheckboxItem";c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=nc(r);return t.jsx($l,{...a,...o,ref:n})}).displayName="DropdownMenuRadioGroup";var mc=c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=nc(r);return t.jsx(Gl,{...a,...o,ref:n})});mc.displayName="DropdownMenuRadioItem";var hc=c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=nc(r);return t.jsx(Kl,{...a,...o,ref:n})});hc.displayName="DropdownMenuItemIndicator";var gc=c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=nc(r);return t.jsx(Zl,{...a,...o,ref:n})});gc.displayName="DropdownMenuSeparator";c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=nc(r);return t.jsx(Yl,{...a,...o,ref:n})}).displayName="DropdownMenuArrow";var bc=c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=nc(r);return t.jsx(Jl,{...a,...o,ref:n})});bc.displayName="DropdownMenuSubTrigger";var vc=c.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=nc(r);return t.jsx(Xl,{...a,...o,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});vc.displayName="DropdownMenuSubContent";var yc=lc,wc=uc,xc=dc,Ec=fc,_c=pc,kc=mc,Cc=hc,Nc=gc,Dc=bc,Sc=vc,Ac=ac,Tc=sc,Rc=c.forwardRef(function(e,t){var n=e.className,r=e.inset,o=e.children,a=_(e,["className","inset","children"]);return c.createElement(Dc,Object.assign({ref:t,className:tt("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",n)},a),o,c.createElement(R,{className:"ml-auto"}))});Rc.displayName=Dc.displayName;var Oc=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement(Sc,Object.assign({ref:t,className:tt("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",n)},r))});Oc.displayName=Sc.displayName;var Fc=c.forwardRef(function(e,t){var n=e.className,r=e.sideOffset,o=void 0===r?4:r,a=_(e,["className","sideOffset"]);return c.createElement(yc,null,c.createElement(wc,Object.assign({ref:t,sideOffset:o,className:tt("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",n)},a)))});Fc.displayName=wc.displayName;var Mc=c.forwardRef(function(e,t){var n=e.className,r=e.inset,o=_(e,["className","inset"]);return c.createElement(Ec,Object.assign({ref:t,className:tt("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",n)},o))});Mc.displayName=Ec.displayName;var jc=c.forwardRef(function(e,t){var n=e.className,r=e.children,o=e.checked,a=_(e,["className","children","checked"]);return c.createElement(_c,Object.assign({ref:t,className:tt("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),checked:o},a),c.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},c.createElement(Cc,null,c.createElement(S,{className:"h-4 w-4"}))),r)});jc.displayName=_c.displayName;var Lc=c.forwardRef(function(e,t){var n=e.className,r=e.children,o=_(e,["className","children"]);return c.createElement(kc,Object.assign({ref:t,className:tt("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n)},o),c.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},c.createElement(Cc,null,c.createElement(F,{className:"h-2 w-2 fill-current"}))),r)});Lc.displayName=kc.displayName;var Pc=c.forwardRef(function(e,t){var n=e.className,r=e.inset,o=_(e,["className","inset"]);return c.createElement(xc,Object.assign({ref:t,className:tt("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",n)},o))});Pc.displayName=xc.displayName;var Ic=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement(Nc,Object.assign({ref:t,className:tt("-mx-1 my-1 h-px bg-muted",n)},r))});Ic.displayName=Nc.displayName;var zc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{const r=ct(`Primitive.${n}`),o=c.forwardRef((e,o)=>{const{asChild:a,...i}=e,s=a?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...i,ref:o})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Bc=c.forwardRef((e,n)=>t.jsx(zc.label,{...e,ref:n,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));Bc.displayName="Label";var Uc=Bc,qc=gt("text-sm font-bold leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-foreground"),Hc=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement(Uc,Object.assign({ref:t,className:tt(qc(),n)},r))});Hc.displayName=Uc.displayName;var Wc=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("div",Object.assign({ref:t,className:tt("rounded-[2rem] border border-[hsl(var(--border))]/50 bg-card text-card-foreground shadow-[0_4px_20px_-2px_rgba(93,112,82,0.15)] transition-all duration-300",n)},r))});Wc.displayName="Card";var Vc=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("div",Object.assign({ref:t,className:tt("flex flex-col space-y-1.5 p-6",n)},r))});Vc.displayName="CardHeader";var $c=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("div",Object.assign({ref:t,className:tt("text-2xl font-bold leading-none tracking-tight",n)},r))});$c.displayName="CardTitle";var Gc=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("div",Object.assign({ref:t,className:tt("text-sm text-muted-foreground",n)},r))});Gc.displayName="CardDescription";var Kc=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("div",Object.assign({ref:t,className:tt("p-6 pt-0",n)},r))});Kc.displayName="CardContent";var Zc=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("div",Object.assign({ref:t,className:tt("flex items-center p-6 pt-0",n)},r))});Zc.displayName="CardFooter";var Yc={items:[],config:Object.assign({},{top:24,duration:3,maxCount:5})},Jc=new Set;function Xc(){Jc.forEach(function(e){return e(Yc.items.slice())})}function Qc(t){switch(t){case"success":return e.createElement(D,null);case"error":return e.createElement(oe,null);case"warning":return e.createElement(N,null);case"loading":return e.createElement(W,{className:"animate-spin"});default:return e.createElement(q,null)}}function eu(e){var t,n,r;ou();var o=Date.now(),a=null!==(t=e.key)&&void 0!==t?t:"msg_".concat(o,"_").concat(Math.random().toString(36).slice(2)),i=Yc.items.findIndex(function(e){return e.key===a}),s={key:a,content:e.content,duration:null!==(n=e.duration)&&void 0!==n?n:Yc.config.duration,type:e.type,onClose:e.onClose,icon:null!==(r=e.icon)&&void 0!==r?r:Qc(e.type),className:e.className,createdAt:o};return i>=0?Yc.items[i]=Object.assign({},Yc.items[i],s):(Yc.items.length>=Yc.config.maxCount&&Yc.items.shift(),Yc.items.push(s)),Xc(),s.duration>0&&"loading"!==s.type&&window.setTimeout(function(){tu(a)},1e3*s.duration),{close:function(){return tu(a)}}}function tu(e){var t;if(void 0===e)return Yc.items.forEach(function(e){var t;return null===(t=e.onClose)||void 0===t?void 0:t.call(e)}),Yc.items=[],void Xc();var n=Yc.items.findIndex(function(t){return t.key===e});if(n>=0){var r=v(Yc.items.splice(n,1),1)[0];null===(t=null==r?void 0:r.onClose)||void 0===t||t.call(r),Xc()}}var nu=null,ru=null;function ou(){"undefined"!=typeof window&&(ru||((ru=document.createElement("div")).setAttribute("data-custom-message-holder",""),document.body.appendChild(ru)),nu||(nu=r.createRoot(ru)).render(e.createElement(au,null)))}function au(){var t=function(){var t=v(e.useState(Yc.items),2),n=t[0],r=t[1];return e.useEffect(function(){var e=r;return Jc.add(e),function(){Jc.delete(e)}},[]),n}(),n=Yc.config.top;return e.createElement("div",{className:"fixed left-1/2 -translate-x-1/2 z-[1000] w-80 pointer-events-none",style:{top:n}},e.createElement("div",{className:"mx-auto flex w-full max-w-xl flex-col items-center gap-2 px-4"},t.map(function(t){var n,r,o=function(e){switch(e){case"success":return{container:"border-green-200 bg-green-50/90 text-green-800 border-l-4 border-l-green-500",icon:"text-green-500",text:"text-green-800"};case"error":return{container:"border-red-200 bg-red-50/90 text-red-800 border-l-4 border-l-red-500",icon:"text-red-500",text:"text-red-800"};case"warning":return{container:"border-yellow-200 bg-yellow-50/90 text-yellow-800 border-l-4 border-l-yellow-500",icon:"text-yellow-500",text:"text-yellow-800"};default:return{container:"border-blue-200 bg-blue-50/90 text-blue-800 border-l-4 border-l-blue-500",icon:"text-blue-500",text:"text-blue-800"}}}(t.type);return e.createElement("div",{key:t.key,className:"pointer-events-auto flex w-full items-center gap-2 rounded-md border px-3 py-2 backdrop-blur ".concat(o.container," ").concat(null!==(n=t.className)&&void 0!==n?n:"")},e.createElement("span",{className:"text-[18px] leading-none ".concat(o.icon)},null!==(r=t.icon)&&void 0!==r?r:Qc(t.type)),e.createElement("div",{className:"min-w-0 flex-1 text-[14px] leading-normal ".concat(o.text)},"string"==typeof t.content?e.createElement("span",{className:"break-words align-middle"},t.content):t.content))})))}function iu(t,n,r,o){if(e.isValidElement(n)||"string"==typeof n||"number"==typeof n)return{type:t,content:n,duration:r,onClose:o};var a=n;return Object.assign({},a,{type:t})}var su,lu,cu=(lu={open:function(e){var t;return eu(Object.assign({},e,{type:null!==(t=e.type)&&void 0!==t?t:"info"}))},info:function(e,t,n){return eu(iu("info",e,t,n))},success:function(e,t,n){return eu(iu("success",e,t,n))},error:function(e,t,n){return eu(iu("error",e,t,n))},warning:function(e,t,n){return eu(iu("warning",e,t,n))},loading:function(e,t,n){return eu(iu("loading",e,null!=t?t:0,n))},destroy:function(e){return tu(e)},config:function(e){return t=e,Yc.config=Object.assign({},Yc.config,t),void Xc();var t},useMessage:function(){var t=e.useMemo(function(){return"undefined"!=typeof window&&ou(),e.createElement(e.Fragment,null)},[]);return[su.current,t]}},(su={}).current=lu,lu);function uu(e,t){return function(){return e.apply(t,arguments)}}const{toString:du}=Object.prototype,{getPrototypeOf:fu}=Object,{iterator:pu,toStringTag:mu}=Symbol,hu=(gu=Object.create(null),e=>{const t=du.call(e);return gu[t]||(gu[t]=t.slice(8,-1).toLowerCase())});var gu;const bu=e=>(e=e.toLowerCase(),t=>hu(t)===e),vu=e=>t=>typeof t===e,{isArray:yu}=Array,wu=vu("undefined");function xu(e){return null!==e&&!wu(e)&&null!==e.constructor&&!wu(e.constructor)&&ku(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Eu=bu("ArrayBuffer");const _u=vu("string"),ku=vu("function"),Cu=vu("number"),Nu=e=>null!==e&&"object"==typeof e,Du=e=>{if("object"!==hu(e))return!1;const t=fu(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||mu in e||pu in e)},Su=bu("Date"),Au=bu("File"),Tu=bu("Blob"),Ru=bu("FileList"),Ou=bu("URLSearchParams"),[Fu,Mu,ju,Lu]=["ReadableStream","Request","Response","Headers"].map(bu);function Pu(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),yu(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(xu(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let i;for(r=0;r<a;r++)i=o[r],t.call(null,e[i],i,e)}}function Iu(e,t){if(xu(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const zu="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Bu=e=>!wu(e)&&e!==zu;const Uu=(qu="undefined"!=typeof Uint8Array&&fu(Uint8Array),e=>qu&&e instanceof qu);var qu;const Hu=bu("HTMLFormElement"),Wu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Vu=bu("RegExp"),$u=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Pu(n,(n,o)=>{let a;!1!==(a=t(n,o,e))&&(r[o]=a||n)}),Object.defineProperties(e,r)};const Gu=bu("AsyncFunction"),Ku=(Zu="function"==typeof setImmediate,Yu=ku(zu.postMessage),Zu?setImmediate:Yu?(Ju=`axios@${Math.random()}`,Xu=[],zu.addEventListener("message",({source:e,data:t})=>{e===zu&&t===Ju&&Xu.length&&Xu.shift()()},!1),e=>{Xu.push(e),zu.postMessage(Ju,"*")}):e=>setTimeout(e));var Zu,Yu,Ju,Xu;const Qu="undefined"!=typeof queueMicrotask?queueMicrotask.bind(zu):"undefined"!=typeof process&&process.nextTick||Ku;var ed={isArray:yu,isArrayBuffer:Eu,isBuffer:xu,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||ku(e.append)&&("formdata"===(t=hu(e))||"object"===t&&ku(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Eu(e.buffer),t},isString:_u,isNumber:Cu,isBoolean:e=>!0===e||!1===e,isObject:Nu,isPlainObject:Du,isEmptyObject:e=>{if(!Nu(e)||xu(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Fu,isRequest:Mu,isResponse:ju,isHeaders:Lu,isUndefined:wu,isDate:Su,isFile:Au,isBlob:Tu,isRegExp:Vu,isFunction:ku,isStream:e=>Nu(e)&&ku(e.pipe),isURLSearchParams:Ou,isTypedArray:Uu,isFileList:Ru,forEach:Pu,merge:function e(){const{caseless:t,skipUndefined:n}=Bu(this)&&this||{},r={},o=(o,a)=>{const i=t&&Iu(r,a)||a;Du(r[i])&&Du(o)?r[i]=e(r[i],o):Du(o)?r[i]=e({},o):yu(o)?r[i]=o.slice():n&&wu(o)||(r[i]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Pu(arguments[e],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(Pu(t,(t,r)=>{n&&ku(t)?e[r]=uu(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],r&&!r(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==n&&fu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:hu,kindOfTest:bu,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(yu(e))return e;let t=e.length;if(!Cu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[pu]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Hu,hasOwnProperty:Wu,hasOwnProp:Wu,reduceDescriptors:$u,freezeMethods:e=>{$u(e,(t,n)=>{if(ku(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];ku(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return yu(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Iu,global:zu,isContextDefined:Bu,isSpecCompliantForm:function(e){return!!(e&&ku(e.append)&&"FormData"===e[mu]&&e[pu])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Nu(e)){if(t.indexOf(e)>=0)return;if(xu(e))return e;if(!("toJSON"in e)){t[r]=e;const o=yu(e)?[]:{};return Pu(e,(e,t)=>{const a=n(e,r+1);!wu(a)&&(o[t]=a)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Gu,isThenable:e=>e&&(Nu(e)||ku(e))&&ku(e.then)&&ku(e.catch),setImmediate:Ku,asap:Qu,isIterable:e=>null!=e&&ku(e[pu])};function td(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}ed.inherits(td,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ed.toJSONObject(this.config),code:this.code,status:this.status}}});const nd=td.prototype,rd={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{rd[e]={value:e}}),Object.defineProperties(td,rd),Object.defineProperty(nd,"isAxiosError",{value:!0}),td.from=(e,t,n,r,o,a)=>{const i=Object.create(nd);ed.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return td.call(i,s,l,n,r,o),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",a&&Object.assign(i,a),i};function od(e){return ed.isPlainObject(e)||ed.isArray(e)}function ad(e){return ed.endsWith(e,"[]")?e.slice(0,-2):e}function id(e,t,n){return e?e.concat(t).map(function(e,t){return e=ad(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const sd=ed.toFlatObject(ed,{},null,function(e){return/^is[A-Z]/.test(e)});function ld(e,t,n){if(!ed.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=ed.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!ed.isUndefined(t[e])})).metaTokens,o=n.visitor||c,a=n.dots,i=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ed.isSpecCompliantForm(t);if(!ed.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(ed.isDate(e))return e.toISOString();if(ed.isBoolean(e))return e.toString();if(!s&&ed.isBlob(e))throw new td("Blob is not supported. Use a Buffer instead.");return ed.isArrayBuffer(e)||ed.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(ed.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(ed.isArray(e)&&function(e){return ed.isArray(e)&&!e.some(od)}(e)||(ed.isFileList(e)||ed.endsWith(n,"[]"))&&(s=ed.toArray(e)))return n=ad(n),s.forEach(function(e,r){!ed.isUndefined(e)&&null!==e&&t.append(!0===i?id([n],r,a):null===i?n:n+"[]",l(e))}),!1;return!!od(e)||(t.append(id(o,n,a),l(e)),!1)}const u=[],d=Object.assign(sd,{defaultVisitor:c,convertValue:l,isVisitable:od});if(!ed.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!ed.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),ed.forEach(n,function(n,a){!0===(!(ed.isUndefined(n)||null===n)&&o.call(t,n,ed.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])}),u.pop()}}(e),t}function cd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ud(e,t){this._pairs=[],e&&ld(e,this,t)}const dd=ud.prototype;function fd(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function pd(e,t,n){if(!t)return e;const r=n&&n.encode||fd;ed.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(a=o?o(t,n):ed.isURLSearchParams(t)?t.toString():new ud(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}dd.append=function(e,t){this._pairs.push([e,t])},dd.toString=function(e){const t=e?function(t){return e.call(this,t,cd)}:cd;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var md=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ed.forEach(this.handlers,function(t){null!==t&&e(t)})}},hd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gd={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ud,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const bd="undefined"!=typeof window&&"undefined"!=typeof document,vd="object"==typeof navigator&&navigator||void 0,yd=bd&&(!vd||["ReactNative","NativeScript","NS"].indexOf(vd.product)<0),wd="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,xd=bd&&window.location.href||"http://localhost";var Ed={...Object.freeze({__proto__:null,hasBrowserEnv:bd,hasStandardBrowserEnv:yd,hasStandardBrowserWebWorkerEnv:wd,navigator:vd,origin:xd}),...gd};function _d(e){function t(e,n,r,o){let a=e[o++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),s=o>=e.length;if(a=!a&&ed.isArray(r)?r.length:a,s)return ed.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!i;r[a]&&ed.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],o)&&ed.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}(r[a])),!i}if(ed.isFormData(e)&&ed.isFunction(e.entries)){const n={};return ed.forEachEntry(e,(e,r)=>{t(function(e){return ed.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const kd={transitional:hd,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=ed.isObject(e);o&&ed.isHTMLForm(e)&&(e=new FormData(e));if(ed.isFormData(e))return r?JSON.stringify(_d(e)):e;if(ed.isArrayBuffer(e)||ed.isBuffer(e)||ed.isStream(e)||ed.isFile(e)||ed.isBlob(e)||ed.isReadableStream(e))return e;if(ed.isArrayBufferView(e))return e.buffer;if(ed.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ld(e,new Ed.classes.URLSearchParams,{visitor:function(e,t,n,r){return Ed.isNode&&ed.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((a=ed.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ld(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(ed.isString(e))try{return(t||JSON.parse)(e),ed.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||kd.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(ed.isResponse(e)||ed.isReadableStream(e))return e;if(e&&ed.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw td.from(e,td.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ed.classes.FormData,Blob:Ed.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ed.forEach(["delete","get","head","post","put","patch"],e=>{kd.headers[e]={}});var Cd=kd;const Nd=ed.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Dd=Symbol("internals");function Sd(e){return e&&String(e).trim().toLowerCase()}function Ad(e){return!1===e||null==e?e:ed.isArray(e)?e.map(Ad):String(e)}function Td(e,t,n,r,o){return ed.isFunction(r)?r.call(this,t,n):(o&&(t=n),ed.isString(t)?ed.isString(r)?-1!==t.indexOf(r):ed.isRegExp(r)?r.test(t):void 0:void 0)}class Rd{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Sd(t);if(!o)throw new Error("header name must be a non-empty string");const a=ed.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=Ad(e))}const a=(e,t)=>ed.forEach(e,(e,n)=>o(e,n,t));if(ed.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(ed.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Nd[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(ed.isObject(e)&&ed.isIterable(e)){let n,r,o={};for(const t of e){if(!ed.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?ed.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=Sd(e)){const n=ed.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(ed.isFunction(t))return t.call(this,e,n);if(ed.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Sd(e)){const n=ed.findKey(this,e);return!(!n||void 0===this[n]||t&&!Td(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Sd(e)){const o=ed.findKey(n,e);!o||t&&!Td(0,n[o],o,t)||(delete n[o],r=!0)}}return ed.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Td(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return ed.forEach(this,(r,o)=>{const a=ed.findKey(n,o);if(a)return t[a]=Ad(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();i!==o&&delete t[o],t[i]=Ad(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ed.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ed.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Dd]=this[Dd]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Sd(e);t[r]||(!function(e,t){const n=ed.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return ed.isArray(e)?e.forEach(r):r(e),this}}Rd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ed.reduceDescriptors(Rd.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),ed.freezeMethods(Rd);var Od=Rd;function Fd(e,t){const n=this||Cd,r=t||n,o=Od.from(r.headers);let a=r.data;return ed.forEach(e,function(e){a=e.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Md(e){return!(!e||!e.__CANCEL__)}function jd(e,t,n){td.call(this,null==e?"canceled":e,td.ERR_CANCELED,t,n),this.name="CanceledError"}function Ld(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new td("Request failed with status code "+n.status,[td.ERR_BAD_REQUEST,td.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}ed.inherits(jd,td,{__CANCEL__:!0});const Pd=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,a=0,i=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[i];o||(o=l),n[a]=s,r[a]=l;let u=i,d=0;for(;u!==a;)d+=n[u++],u%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,a=1e3/t;const i=(t,a=Date.now())=>{o=a,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=a?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},a-s)))},()=>n&&i(n)]}(n=>{const a=n.loaded,i=n.lengthComputable?n.total:void 0,s=a-r,l=o(s);r=a;e({loaded:a,total:i,progress:i?a/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&a<=i?(i-a)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},Id=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},zd=e=>(...t)=>ed.asap(()=>e(...t));var Bd=Ed.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ed.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ed.origin),Ed.navigator&&/(msie|trident)/i.test(Ed.navigator.userAgent)):()=>!0,Ud=Ed.hasStandardBrowserEnv?{write(e,t,n,r,o,a,i){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];ed.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),ed.isString(r)&&s.push(`path=${r}`),ed.isString(o)&&s.push(`domain=${o}`),!0===a&&s.push("secure"),ed.isString(i)&&s.push(`SameSite=${i}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function qd(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Hd=e=>e instanceof Od?{...e}:e;function Wd(e,t){t=t||{};const n={};function r(e,t,n,r){return ed.isPlainObject(e)&&ed.isPlainObject(t)?ed.merge.call({caseless:r},e,t):ed.isPlainObject(t)?ed.merge({},t):ed.isArray(t)?t.slice():t}function o(e,t,n,o){return ed.isUndefined(t)?ed.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function a(e,t){if(!ed.isUndefined(t))return r(void 0,t)}function i(e,t){return ed.isUndefined(t)?ed.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,a){return a in t?r(n,o):a in e?r(void 0,n):void 0}const l={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(e,t,n)=>o(Hd(e),Hd(t),0,!0)};return ed.forEach(Object.keys({...e,...t}),function(r){const a=l[r]||o,i=a(e[r],t[r],r);ed.isUndefined(i)&&a!==s||(n[r]=i)}),n}var Vd=e=>{const t=Wd({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;if(t.headers=i=Od.from(i),t.url=pd(qd(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),ed.isFormData(n))if(Ed.hasStandardBrowserEnv||Ed.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(ed.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(Ed.hasStandardBrowserEnv&&(r&&ed.isFunction(r)&&(r=r(t)),r||!1!==r&&Bd(t.url))){const e=o&&a&&Ud.read(a);e&&i.set(o,e)}return t};var $d="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Vd(e);let o=r.data;const a=Od.from(r.headers).normalize();let i,s,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function m(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let h=new XMLHttpRequest;function g(){if(!h)return;const r=Od.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());Ld(function(e){t(e),m()},function(e){n(e),m()},{data:d&&"text"!==d&&"json"!==d?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout,"onloadend"in h?h.onloadend=g:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(g)},h.onabort=function(){h&&(n(new td("Request aborted",td.ECONNABORTED,e,h)),h=null)},h.onerror=function(t){const r=new td(t&&t.message?t.message:"Network Error",td.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||hd;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new td(t,o.clarifyTimeoutError?td.ETIMEDOUT:td.ECONNABORTED,e,h)),h=null},void 0===o&&a.setContentType(null),"setRequestHeader"in h&&ed.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),ed.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),d&&"json"!==d&&(h.responseType=r.responseType),p&&([l,u]=Pd(p,!0),h.addEventListener("progress",l)),f&&h.upload&&([s,c]=Pd(f),h.upload.addEventListener("progress",s),h.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(i=t=>{h&&(n(!t||t.type?new jd(null,e,h):t),h.abort(),h=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===Ed.protocols.indexOf(b)?n(new td("Unsupported protocol "+b+":",td.ERR_BAD_REQUEST,e)):h.send(o||null)})};var Gd=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof td?t:new jd(t instanceof Error?t.message:t))}};let a=t&&setTimeout(()=>{a=null,o(new td(`timeout ${t} of ms exceeded`,td.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>ed.asap(i),s}};const Kd=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Zd=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Yd=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Zd(e))yield*Kd(n,t)}(e,t);let a,i=0,s=e=>{a||(a=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let a=r.byteLength;if(n){let e=i+=a;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:Jd}=ed,Xd=(({Request:e,Response:t})=>({Request:e,Response:t}))(ed.global),{ReadableStream:Qd,TextEncoder:ef}=ed.global,tf=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},nf=e=>{e=ed.merge.call({skipUndefined:!0},Xd,e);const{fetch:t,Request:n,Response:r}=e,o=t?Jd(t):"function"==typeof fetch,a=Jd(n),i=Jd(r);if(!o)return!1;const s=o&&Jd(Qd),l=o&&("function"==typeof ef?(c=new ef,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const u=a&&s&&tf(()=>{let e=!1;const t=new n(Ed.origin,{body:new Qd,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&s&&tf(()=>ed.isReadableStream(new r("").body)),f={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new td(`Response type '${e}' is not supported`,td.ERR_NOT_SUPPORT,n)})});const p=async(e,t)=>{const r=ed.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(ed.isBlob(e))return e.size;if(ed.isSpecCompliantForm(e)){const t=new n(Ed.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return ed.isArrayBufferView(e)||ed.isArrayBuffer(e)?e.byteLength:(ed.isURLSearchParams(e)&&(e+=""),ed.isString(e)?(await l(e)).byteLength:void 0)})(t):r};return async e=>{let{url:o,method:i,data:s,signal:l,cancelToken:c,timeout:m,onDownloadProgress:h,onUploadProgress:g,responseType:b,headers:v,withCredentials:y="same-origin",fetchOptions:w}=Vd(e),x=t||fetch;b=b?(b+"").toLowerCase():"text";let E=Gd([l,c&&c.toAbortSignal()],m),_=null;const k=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let C;try{if(g&&u&&"get"!==i&&"head"!==i&&0!==(C=await p(v,s))){let e,t=new n(o,{method:"POST",body:s,duplex:"half"});if(ed.isFormData(s)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,n]=Id(C,Pd(zd(g)));s=Yd(t.body,65536,e,n)}}ed.isString(y)||(y=y?"include":"omit");const t=a&&"credentials"in n.prototype,l={...w,signal:E,method:i.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:"half",credentials:t?y:void 0};_=a&&new n(o,l);let c=await(a?x(_,w):x(o,l));const m=d&&("stream"===b||"response"===b);if(d&&(h||m&&k)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=c[t]});const t=ed.toFiniteNumber(c.headers.get("content-length")),[n,o]=h&&Id(t,Pd(zd(h),!0))||[];c=new r(Yd(c.body,65536,n,()=>{o&&o(),k&&k()}),e)}b=b||"text";let N=await f[ed.findKey(f,b)||"text"](c,e);return!m&&k&&k(),await new Promise((t,n)=>{Ld(t,n,{data:N,headers:Od.from(c.headers),status:c.status,statusText:c.statusText,config:e,request:_})})}catch(t){if(k&&k(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new td("Network Error",td.ERR_NETWORK,e,_),{cause:t.cause||t});throw td.from(t,t&&t.code,e,_)}}},rf=new Map,of=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let i,s,l=a.length,c=rf;for(;l--;)i=a[l],s=c.get(i),void 0===s&&c.set(i,s=l?new Map:nf(t)),c=s;return s};of();const af={http:null,xhr:$d,fetch:{get:of}};ed.forEach(af,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const sf=e=>`- ${e}`,lf=e=>ed.isFunction(e)||null===e||!1===e;var cf={getAdapter:function(e,t){e=ed.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let i=0;i<n;i++){let n;if(r=e[i],o=r,!lf(r)&&(o=af[(n=String(r)).toLowerCase()],void 0===o))throw new td(`Unknown adapter '${n}'`);if(o&&(ed.isFunction(o)||(o=o.get(t))))break;a[n||"#"+i]=o}if(!o){const e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new td("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(sf).join("\n"):" "+sf(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o},adapters:af};function uf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new jd(null,e)}function df(e){uf(e),e.headers=Od.from(e.headers),e.data=Fd.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return cf.getAdapter(e.adapter||Cd.adapter,e)(e).then(function(t){return uf(e),t.data=Fd.call(e,e.transformResponse,t),t.headers=Od.from(t.headers),t},function(t){return Md(t)||(uf(e),t&&t.response&&(t.response.data=Fd.call(e,e.transformResponse,t.response),t.response.headers=Od.from(t.response.headers))),Promise.reject(t)})}const ff="1.13.2",pf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pf[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const mf={};pf.transitional=function(e,t,n){return(r,o,a)=>{if(!1===e)throw new td(function(e,t){return"[Axios v"+ff+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}(o," has been removed"+(t?" in "+t:"")),td.ERR_DEPRECATED);return t&&!mf[o]&&(mf[o]=!0),!e||e(r,o,a)}},pf.spelling=function(e){return(e,t)=>!0};var hf={assertOptions:function(e,t,n){if("object"!=typeof e)throw new td("options must be an object",td.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const t=e[a],n=void 0===t||i(t,a,e);if(!0!==n)throw new td("option "+a+" must be "+n,td.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new td("Unknown option "+a,td.ERR_BAD_OPTION)}},validators:pf};const gf=hf.validators;class bf{constructor(e){this.defaults=e||{},this.interceptors={request:new md,response:new md}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Wd(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&hf.assertOptions(n,{silentJSONParsing:gf.transitional(gf.boolean),forcedJSONParsing:gf.transitional(gf.boolean),clarifyTimeoutError:gf.transitional(gf.boolean)},!1),null!=r&&(ed.isFunction(r)?t.paramsSerializer={serialize:r}:hf.assertOptions(r,{encode:gf.function,serialize:gf.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),hf.assertOptions(t,{baseUrl:gf.spelling("baseURL"),withXsrfToken:gf.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&ed.merge(o.common,o[t.method]);o&&ed.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Od.concat(a,o);const i=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!s){const e=[df.bind(this),void 0];for(e.unshift(...i),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=i.length;let f=t;for(;d<u;){const e=i[d++],t=i[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=df.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return pd(qd((e=Wd(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}ed.forEach(["delete","get","head","options"],function(e){bf.prototype[e]=function(t,n){return this.request(Wd(n||{},{method:e,url:t,data:(n||{}).data}))}}),ed.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(Wd(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}bf.prototype[e]=t(),bf.prototype[e+"Form"]=t(!0)});var vf=bf;class yf{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new jd(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new yf(function(t){e=t}),cancel:e}}}var wf=yf;const xf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(xf).forEach(([e,t])=>{xf[t]=e});var Ef=xf;const _f=function e(t){const n=new vf(t),r=uu(vf.prototype.request,n);return ed.extend(r,vf.prototype,n,{allOwnKeys:!0}),ed.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Wd(t,n))},r}(Cd);_f.Axios=vf,_f.CanceledError=jd,_f.CancelToken=wf,_f.isCancel=Md,_f.VERSION=ff,_f.toFormData=ld,_f.AxiosError=td,_f.Cancel=_f.CanceledError,_f.all=function(e){return Promise.all(e)},_f.spread=function(e){return function(t){return e.apply(null,t)}},_f.isAxiosError=function(e){return ed.isObject(e)&&!0===e.isAxiosError},_f.mergeConfig=Wd,_f.AxiosHeaders=Od,_f.formToJSON=e=>_d(ed.isHTMLForm(e)?new FormData(e):e),_f.getAdapter=cf.getAdapter,_f.HttpStatusCode=Ef,_f.default=_f;var kf=_f.create({baseURL:"/api/cms",timeout:1e4,headers:{"Content-Type":"application/json"}}),Cf=new Map;kf.interceptors.request.use(function(e){e.url&&e.url.startsWith("http")&&(e.baseURL="");var t=localStorage.getItem("cms_token");t&&(e.headers.Authorization="Bearer ".concat(t));var n=localStorage.getItem("cms_session_id");return n&&(e.headers["X-Session-Id"]=n),e},function(e){return Promise.reject(e)}),kf.interceptors.response.use(function(e){return e},function(e){var t="请求错误",n=!1;if(e.response){var r=e.response.status,o=e.response.data;401===r?"登录已过期,请重新登录"===(null==o?void 0:o.message)?(t="登录已过期,请重新登录",n=!0):"认证信息无效"===(null==o?void 0:o.message)?(t="认证信息无效,请重新登录",n=!0):(t="认证失败,请登录",n=!0):t=(null==o?void 0:o.message)||"HTTP ".concat(r,": ").concat(e.response.statusText)}else t=e.request?"网络连接失败,请检查网络状态":e.message||"请求错误";return n?(localStorage.removeItem("cms_token"),localStorage.removeItem("cms_user"),"/login"!==window.location.pathname&&"/"!==window.location.pathname&&(cu.error(t),setTimeout(function(){window.location.reload()},1e3))):cu.error(t),Promise.reject(e)});var Nf,Df=function(e,t,n){var r=e;if(t){var o=new URLSearchParams(t).toString();r=r+(r.includes("?")?"&":"?")+o}var a="GET ".concat(r),i=Cf.get(a);if(i)return i;var s=kf.get(r,n).then(function(e){return e.data}).finally(function(){Cf.delete(a)});return Cf.set(a,s),s},Sf=function(e,t,n){return kf.post(e,t,n).then(function(e){return e.data})},Af=function(e,t,n){return kf.put(e,t,n).then(function(e){return e.data})},Tf=function(e,t){return kf.delete(e,t).then(function(e){return e.data})};function Rf(){return Nf}function Of(){return Rf()}function Ff(e){return e?e.replace(/-/g,"_")+"_":""}function Mf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rf(),n=(e||"").trim();if(!n)return n;var r=Ff(t);return r?n.startsWith(r)?n:"".concat(r).concat(n):n}function jf(e){return!e||!e.readOnly&&!1!==e.editable}function Lf(e){return null!=e&&("string"==typeof e?""!==e.trim():!Array.isArray(e)||e.length>0)}function Pf(e,t){if(!e||0===e.length)return null;var n,r=m(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(null==o?void 0:o.required)if("id"!==o.name)if(jf(o))if("relation"===o.type&&o.relation){if(!Lf(t[o.relation.foreignKey||"".concat(o.relation.target,"_id")]))return o}else if(!Lf(t[o.name]))return o}}catch(e){r.e(e)}finally{r.f()}return null}function If(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rf(),n=(e||"").trim();if(!n)return n;var r=Ff(t);if(!r)return n;if(n.startsWith(r))return n;throw new Error('表名必须包含当前 session 前缀 "'.concat(r,'",请传完整表名'))}function zf(e){Nf=e;try{localStorage.setItem("cms_session_id",e)}catch(e){}}var Bf=function(){return Df("/auth/signup/status/".concat(Ff(Rf()),"cms_users"))},Uf=function(e){return Sf("/auth/signup/".concat(Ff(Rf()),"cms_users"),e)},qf=function(e){return Sf("/auth/login/".concat(Ff(Rf()),"cms_users"),e)},Hf=function(){return Sf("/auth/verify/".concat(Ff(Rf()),"cms_users"))},Wf=function(){return Df("/auth/user/".concat(Ff(Rf()),"cms_users"))},Vf=function(){localStorage.removeItem("cms_token"),localStorage.removeItem("cms_user")},$f=function(){return localStorage.getItem("cms_token")},Gf=function(){var e=localStorage.getItem("cms_user");return e?JSON.parse(e):null},Kf=function(e,t){var n=If(e),r=t?Object.assign({},t):void 0;return(null==r?void 0:r.filters)&&Array.isArray(r.filters)&&(r.filters=JSON.stringify(r.filters)),Df("/data/".concat(n),r)},Zf=function(e,t){var n=If(e);return Df("/relation/".concat(n,"/options"),t)},Yf=function(e,t){var n=If(e);return Sf("/data/".concat(n),t)},Jf=function(e,t){var n=If(e);return Af("/data/".concat(n),t)},Xf=function(e,t){var n=If(e);return Tf("/data/".concat(n,"?id=").concat(t))},Qf={"zh-CN":{common:{confirm:"确认",cancel:"取消",save:"保存",delete:"删除",edit:"编辑",add:"添加",search:"搜索",filter:"筛选",reset:"重置",submit:"提交",back:"返回",next:"下一页",previous:"上一页",loading:"加载中...",success:"成功",error:"错误",warning:"警告",info:"信息",close:"关闭",refresh:"刷新",export:"导出",import:"导入",view:"查看",create:"创建",update:"更新",actions:"操作",operation:"操作",total:"共",page:"页",pageSize:"每页",goto:"跳转"},auth:{login:"登录",logout:"登出",username:"用户名",password:"密码",email:"邮箱",signup:"注册",welcome:"欢迎",loginSuccess:"登录成功",loginFailed:"登录失败",logoutSuccess:"已成功登出",logoutConfirm:"确定要登出系统吗?",pleaseLogin:"请登录",invalidCredentials:"用户名或密码错误",createAdminAccount:"创建管理员账号",adminCreatedSuccess:"管理员账号创建成功",noAdmin:"系统中还没有管理员账号",firstTimeSetup:"首次使用,请创建管理员账号"},data:{dataManagement:"内容管理",dataList:"内容列表",addData:"新建记录",editData:"编辑记录",deleteData:"删除记录",deleteConfirm:"确定要删除这条记录吗?",deleteSuccess:"删除成功",deleteFailed:"删除失败",createSuccess:"创建成功",createFailed:"创建失败",updateSuccess:"更新成功",updateFailed:"更新失败",loadFailed:"加载失败",noData:"暂无数据",selectModel:"选择内容类型",selectModelFirst:"请先选择内容类型",selectModelPrompt:"请选择数据模型",searchPlaceholder:"搜索...",searchData:"搜索数据...",filterTitle:"筛选条件",addFilter:"添加筛选",clearFilters:"清除筛选",totalRecords:"条记录",perPage:"条/页",newData:"新建记录",newRecord:"新建数据",createdAt:"创建时间",updatedAt:"更新时间",yes:"是",no:"否",operationFailed:"操作失败",deleteConfirmFull:"确定要删除这条数据吗?此操作不可撤销。",updating:"更新中...",creating:"创建中...",viewAndManage:"查看和管理",ofData:"的数据",totalCount:"共",records:"条数据",page:"第",pageOf:"页,共",pages:"页",previousPage:"上一页",nextPage:"下一页",tableName:"表名",editRecord:"编辑数据",createRecord:"新建数据",loadingOptions:"加载中...",pleaseSelect:"请选择",clickToOpenImage:"点击打开原图",fieldError:"字段",loadRelationOptionsFailed:"加载关联选项失败",assetUploadButton:"上传文件",assetUploading:"上传中...",assetReplace:"替换文件",assetClear:"清空",assetEmpty:"暂未上传资源",assetAcceptHint:"允许格式",assetMaxSizeHint:"大小限制",assetUploadSuccess:"上传成功",assetUploadFailed:"上传失败",assetUploadHandlerMissing:"当前 CMS 未配置上传处理器",assetUploadInvalidType:"所选文件类型不受支持",assetUploadTooLarge:"文件大小超过限制",assetUploadInvalidResult:"上传结果无效,未返回 URL",markdownPlaceholder:"请输入 Markdown 内容...",markdownWrite:"编写",markdownPreview:"预览",markdownSplit:"分栏",markdownQuote:"引用",markdownLink:"链接",markdownCode:"代码",markdownClear:"清空",markdownEmpty:"-"},model:{modelManagement:"内容类型管理",modelList:"内容类型列表",addModel:"新增内容类型",editModel:"编辑内容类型",deleteModel:"删除内容类型",deleteConfirm:"确定要删除这个内容类型吗?",modelName:"名称",tableName:"数据库标识符",fields:"字段列表",fieldName:"字段名称",fieldType:"字段类型",fieldComment:"字段描述",required:"必填",unique:"唯一",maxLength:"最大长度",defaultValue:"默认值",addField:"添加字段",removeField:"移除字段",createSuccess:"内容类型创建成功",createFailed:"内容类型创建失败",updateSuccess:"内容类型更新成功",updateFailed:"内容类型更新失败",deleteSuccess:"内容类型删除成功",deleteFailed:"内容类型删除失败",loadFailed:"加载内容类型失败",noModels:"暂无内容类型"},field:{string:"字符串",number:"数字",boolean:"布尔值",date:"日期",datetime:"日期时间",text:"文本",email:"邮箱",url:"链接",json:"JSON",relation:"关联",timestamp:"时间戳",time:"时间",enum:"枚举",select:"下拉选择",asset:"资源上传"},validation:{required:"此字段为必填项",invalidEmail:"请输入有效的邮箱地址",invalidUrl:"请输入有效的URL",maxLength:"超过最大长度限制",minLength:"未达到最小长度要求",invalidFormat:"格式不正确"},settings:{settings:"设置",language:"语言",theme:"主题",general:"通用",advanced:"高级",navigation:"导航",dragToReorder:"拖拽以调整顺序",copyUsername:"点击复制用户名",usernameCopied:"用户名已复制",copyFailed:"复制失败"}},"en-US":{common:{confirm:"Confirm",cancel:"Cancel",save:"Save",delete:"Delete",edit:"Edit",add:"Add",search:"Search",filter:"Filter",reset:"Reset",submit:"Submit",back:"Back",next:"Next",previous:"Previous",loading:"Loading...",success:"Success",error:"Error",warning:"Warning",info:"Info",close:"Close",refresh:"Refresh",export:"Export",import:"Import",view:"View",create:"Create",update:"Update",actions:"Actions",operation:"Operation",total:"Total",page:"Page",pageSize:"Page Size",goto:"Go to"},auth:{login:"Login",logout:"Logout",username:"Username",password:"Password",email:"Email",signup:"Sign Up",welcome:"Welcome",loginSuccess:"Login successful",loginFailed:"Login failed",logoutSuccess:"Logout successful",logoutConfirm:"Are you sure you want to logout?",pleaseLogin:"Please login",invalidCredentials:"Invalid username or password",createAdminAccount:"Create Admin Account",adminCreatedSuccess:"Admin account created successfully",noAdmin:"No admin account exists",firstTimeSetup:"First time setup, please create admin account"},data:{dataManagement:"Content",dataList:"Content List",addData:"New Record",editData:"Edit Record",deleteData:"Delete Record",deleteConfirm:"Are you sure you want to delete this record?",deleteSuccess:"Deleted successfully",deleteFailed:"Delete failed",createSuccess:"Created successfully",createFailed:"Create failed",updateSuccess:"Updated successfully",updateFailed:"Update failed",loadFailed:"Load failed",noData:"No data",selectModel:"Select Content Type",selectModelFirst:"Please select a content type first",selectModelPrompt:"Please select a data model",searchPlaceholder:"Search...",searchData:"Search data...",filterTitle:"Filters",addFilter:"Add Filter",clearFilters:"Clear Filters",totalRecords:"records",perPage:"per page",newData:"New Record",newRecord:"New Data",createdAt:"Created At",updatedAt:"Updated At",yes:"Yes",no:"No",operationFailed:"Operation failed",deleteConfirmFull:"Are you sure you want to delete this data? This action cannot be undone.",updating:"Updating...",creating:"Creating...",viewAndManage:"View and manage",ofData:"data",totalCount:"Total",records:"records",page:"Page",pageOf:"of",pages:"pages",previousPage:"Previous",nextPage:"Next",tableName:"Table",editRecord:"Edit Data",createRecord:"New Data",loadingOptions:"Loading...",pleaseSelect:"Please select",clickToOpenImage:"Click to open image",fieldError:"Field",loadRelationOptionsFailed:"Failed to load relation options",assetUploadButton:"Upload file",assetUploading:"Uploading...",assetReplace:"Replace file",assetClear:"Clear",assetEmpty:"No asset uploaded yet",assetAcceptHint:"Accepted",assetMaxSizeHint:"Max size",assetUploadSuccess:"Upload successful",assetUploadFailed:"Upload failed",assetUploadHandlerMissing:"No upload handler is configured for this CMS",assetUploadInvalidType:"The selected file type is not supported",assetUploadTooLarge:"The selected file exceeds the size limit",assetUploadInvalidResult:"Upload result is invalid because no URL was returned",markdownPlaceholder:"Write markdown here...",markdownWrite:"Write",markdownPreview:"Preview",markdownSplit:"Split",markdownQuote:"Quote",markdownLink:"Link",markdownCode:"Code",markdownClear:"Clear",markdownEmpty:"-"},model:{modelManagement:"Content Types",modelList:"Content Type List",addModel:"New Content Type",editModel:"Edit Content Type",deleteModel:"Delete Content Type",deleteConfirm:"Are you sure you want to delete this content type?",modelName:"Name",tableName:"Database Identifier",fields:"Fields",fieldName:"Field Name",fieldType:"Field Type",fieldComment:"Field Description",required:"Required",unique:"Unique",maxLength:"Max Length",defaultValue:"Default Value",addField:"Add Field",removeField:"Remove Field",createSuccess:"Content type created successfully",createFailed:"Content type creation failed",updateSuccess:"Content type updated successfully",updateFailed:"Content type update failed",deleteSuccess:"Content type deleted successfully",deleteFailed:"Content type deletion failed",loadFailed:"Failed to load content types",noModels:"No content types"},field:{string:"String",number:"Number",boolean:"Boolean",date:"Date",datetime:"Datetime",text:"Text",email:"Email",url:"URL",json:"JSON",relation:"Relation",timestamp:"Timestamp",time:"Time",enum:"Enum",select:"Select",asset:"Asset"},validation:{required:"This field is required",invalidEmail:"Please enter a valid email address",invalidUrl:"Please enter a valid URL",maxLength:"Exceeded maximum length",minLength:"Below minimum length",invalidFormat:"Invalid format"},settings:{settings:"Settings",language:"Language",theme:"Theme",general:"General",advanced:"Advanced",navigation:"Navigation",dragToReorder:"Drag to reorder",copyUsername:"Click to copy username",usernameCopied:"Username copied",copyFailed:"Copy failed"}}},ep=e.createContext(void 0);function tp(t){var n=t.children,r=t.defaultLocale,o=v(e.useState(r||function(){try{var e=localStorage.getItem("cms_locale");if(e&&("zh-CN"===e||"en-US"===e))return e}catch(e){}return"zh-CN"}()),2),a=o[0],i=o[1],s={locale:a,setLocale:function(e){i(e),function(e){try{localStorage.setItem("cms_locale",e)}catch(e){}}(e)},t:function(e){var t,n=e.split("."),r=Qf[a],o=m(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;if(!r||"object"!==w(r)||!(i in r))return e;r=r[i]}}catch(e){o.e(e)}finally{o.f()}return"string"==typeof r?r:e},messages:Qf[a]};return e.createElement(ep.Provider,{value:s},n)}function np(){var t=e.useContext(ep);if(!t)throw new Error("useTranslation must be used within I18nProvider");return t}function rp(){return np().t}function op(){var e=np();return{locale:e.locale,setLocale:e.setLocale}}function ap(e){var t,n=function(e){try{var t=e.split(".")[1],n=atob(t.replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(n)}catch(e){return null}}(e);(null===(t=null==n?void 0:n.user_metadata)||void 0===t?void 0:t.session_id)&&zf(n.user_metadata.session_id.replace(/_/g,"-"))}function ip(t){var n=t.onLoginSuccess,r=rp(),o=v(e.useState(""),2),a=o[0],i=o[1],s=v(e.useState(""),2),l=s[0],c=s[1],u=v(e.useState(!1),2),d=u[0],f=u[1],m=v(e.useState("login"),2),h=m[0],b=m[1];e.useEffect(function(){var e=$f();if(e){var t=function(){var t=p(g().m(function t(){var r;return g().w(function(t){for(;;)switch(t.p=t.n){case 0:return f(!0),t.p=1,t.n=2,Hf();case 2:if(t.v.success){t.n=3;break}throw new Error("token验证失败");case 3:return t.n=4,Wf();case 4:if(!(r=t.v).success||!r.data){t.n=5;break}localStorage.setItem("cms_user",JSON.stringify(r.data)),ap(e),null==n||n(e,r.data),t.n=6;break;case 5:throw new Error("获取用户信息失败");case 6:t.n=8;break;case 7:t.p=7,t.v,Vf();case 8:return t.p=8,f(!1),t.f(8);case 9:return t.a(2)}},t,null,[[1,7,8,9]])}));return function(){return t.apply(this,arguments)}}();t()}},[n]),e.useEffect(function(){if(!$f()){var e=function(){var e=p(g().m(function e(){var t,n;return g().w(function(e){for(;;)switch(e.p=e.n){case 0:return f(!0),e.p=1,e.n=2,Bf();case 2:(n=e.v).success&&(null===(t=n.data)||void 0===t?void 0:t.allowSignup)?b("signup"):b("login"),e.n=4;break;case 3:e.p=3,e.v,b("login");case 4:return e.p=4,f(!1),e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}));return function(){return e.apply(this,arguments)}}();e()}},[]);var y=function(){var e=p(g().m(function e(t){var o,i,s,c,u;return g().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t.preventDefault(),a&&l){e.n=1;break}return cu.error(r("validation.required")),e.a(2);case 1:if(f(!0),e.p=2,"signup"!==h){e.n=4;break}return e.n=3,Uf({username:a,password:l});case 3:c=e.v,e.n=6;break;case 4:return e.n=5,qf({username:a,password:l});case 5:c=e.v;case 6:if((s=c).success&&(null===(o=s.data)||void 0===o?void 0:o.token)){e.n=7;break}return cu.error(s.message||r("auth.loginFailed")),"signup"===h&&(null===(i=s.message)||void 0===i?void 0:i.includes("已存在管理员"))&&b("login"),e.a(2);case 7:localStorage.setItem("cms_token",s.data.token),localStorage.setItem("cms_user",JSON.stringify(s.data.user)),ap(s.data.token),null==n||n(s.data.token,s.data.user),e.n=9;break;case 8:e.p=8,u=e.v,cu.error("".concat(r("auth.loginFailed"),", ").concat(u.message||r("common.error")));case 9:return e.p=9,f(!1),e.f(9);case 10:return e.a(2)}},e,null,[[2,8,9,10]])}));return function(t){return e.apply(this,arguments)}}();return e.createElement("div",{className:"we0-cms-root"},e.createElement("div",{className:"min-h-screen flex relative overflow-hidden bg-white"},e.createElement("div",{className:"pointer-events-none absolute inset-0"},e.createElement("div",{className:"absolute inset-0 bg-[linear-gradient(110deg,#ffffff_0%,#f7fbff_40%,#edf6ff_70%,#eaf3ff_100%)]"}),e.createElement("div",{className:"absolute inset-0 bg-[radial-gradient(1200px_600px_at_-10%_-10%,rgba(59,130,246,0.12),transparent),radial-gradient(900px_500px_at_110%_20%,rgba(147,51,234,0.10),transparent),radial-gradient(700px_400px_at_60%_120%,rgba(99,102,241,0.10),transparent)]"}),e.createElement("div",{className:"absolute inset-0 bg-[linear-gradient(115deg,rgba(255,255,255,0.6)_0%,rgba(255,255,255,0.15)_32%,transparent_32%,transparent_68%,rgba(255,255,255,0.15)_68%,rgba(255,255,255,0.6)_100%)]"})),e.createElement("div",{className:"flex-1 relative flex items-center justify-center"},e.createElement("div",{className:"relative z-10 max-w-4xl w-full px-16 text-left"},e.createElement("div",{className:"mb-12"},e.createElement("div",{className:"inline-flex items-center rounded-2xl px-4 py-2 bg-white/70 backdrop-blur border border-white/60"},e.createElement("span",{className:"text-2xl font-semibold tracking-tight text-gray-900"},r("data.dataManagement"))),e.createElement("h1",{className:"mt-8 text-5xl md:text-6xl font-extrabold leading-tight text-gray-900"},"WE0-CMS"),e.createElement("p",{className:"mt-6 text-2xl text-gray-600"},r("auth.welcome"))))),e.createElement("div",{className:"w-[480px] min-w-[380px] flex items-center justify-center p-8 mt-30"},e.createElement("div",{className:"w-full max-w-sm"},d?e.createElement(Wc,{className:"bg-white/30 backdrop-blur-xl border border-white/50 shadow-none rounded-3xl overflow-hidden"},e.createElement(Kc,{className:"p-8"},e.createElement("div",{className:"space-y-4"},e.createElement(nt,{className:"h-12 w-48"}),e.createElement(nt,{className:"h-4 w-64"}),e.createElement(nt,{className:"h-10 w-full"}),e.createElement(nt,{className:"h-10 w-full"})))):e.createElement(Wc,{className:"bg-white/30 backdrop-blur-xl border border-white/50 shadow-none rounded-3xl overflow-hidden"},e.createElement(Vc,{className:"p-8 pb-6"},e.createElement($c,{className:"text-center text-2xl mb-2 text-gray-800"},r("signup"===h?"auth.createAdminAccount":"auth.welcome")),e.createElement(Gc,{className:"text-center text-gray-500"},r("signup"===h?"auth.firstTimeSetup":"auth.pleaseLogin"))),e.createElement(Kc,{className:"p-8 pt-0"},e.createElement("form",{onSubmit:y,className:"space-y-6"},e.createElement("div",{className:"space-y-2"},e.createElement(Hc,{htmlFor:"username"},r("auth.username"),"/",r("auth.email")),e.createElement("div",{className:"relative"},e.createElement(re,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),e.createElement(yt,{id:"username",type:"text",placeholder:r("auth.email"),value:a,onChange:function(e){return i(e.target.value)},className:"pl-10 h-12 rounded-xl border-gray-200 hover:border-blue-400 focus:border-blue-500 transition-colors",required:!0,minLength:2}))),e.createElement("div",{className:"space-y-2"},e.createElement(Hc,{htmlFor:"password"},r("auth.password")),e.createElement("div",{className:"relative"},e.createElement(V,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),e.createElement(yt,{id:"password",type:"password",placeholder:r("auth.password"),value:l,onChange:function(e){return c(e.target.value)},className:"pl-10 h-12 rounded-xl border-gray-200 hover:border-blue-400 focus:border-blue-500 transition-colors",required:!0,minLength:6}))),e.createElement(vt,{type:"submit",className:"w-full h-12 rounded-xl transition-all duration-200 font-semibold text-base shadow-lg hover:brightness-[1.03] active:scale-[0.99]",style:{backgroundImage:"linear-gradient(135deg, rgba(236, 248, 255, 0.78) 0%, rgba(221, 238, 255, 0.78) 100%)",color:"rgba(0, 0, 0, 0.7)",border:"none",boxShadow:"0 6px 24px rgba(37, 99, 235, 0.12)"},disabled:d},e.createElement($,{className:"h-4 w-4 mr-2"}),r(d?"common.loading":"signup"===h?"auth.signup":"auth.login")))))))))}function sp(){return e.createElement("div",{className:"min-h-[calc(100vh-4rem)] bg-gradient-to-br from-background via-background to-muted/20"},e.createElement("div",{className:"mx-auto flex min-h-[calc(100vh-8rem)] max-w-5xl items-center px-6 py-8"},e.createElement(Wc,{className:"relative w-full overflow-hidden border-border/60 bg-card/95 shadow-[0_24px_80px_-48px_rgba(15,23,42,0.5)]"},e.createElement("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_top_right,_rgba(13,148,136,0.10),_transparent_32%),linear-gradient(180deg,transparent,rgba(15,23,42,0.03))]"}),e.createElement(Vc,{className:"relative space-y-4 p-8 md:p-10"},e.createElement("div",{className:"inline-flex h-12 w-12 items-center justify-center rounded-2xl bg-teal-600/10 text-teal-700"},e.createElement(X,{className:"h-5 w-5"})),e.createElement("div",{className:"space-y-3"},e.createElement($c,{className:"text-3xl font-semibold tracking-tight md:text-5xl"},"欢迎来到内容管理中心"),e.createElement(Gc,{className:"max-w-2xl text-base leading-7"},"这里是 CMS 的欢迎页。你可以从左侧导航进入具体内容类型,开始查看和管理数据。"))))))}function lp(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var cp="Switch",[up,dp]=Dt(cp),[fp,pp]=up(cp),mp=c.forwardRef((e,n)=>{const{__scopeSwitch:r,name:o,checked:a,defaultChecked:i,required:s,disabled:l,value:u="on",onCheckedChange:d,form:f,...p}=e,[m,h]=c.useState(null),g=at(n,e=>h(e)),b=c.useRef(!1),v=!m||(f||!!m.closest("form")),[y,w]=Mt({prop:a,defaultProp:i??!1,onChange:d,caller:cp});return t.jsxs(fp,{scope:r,checked:y,disabled:l,children:[t.jsx(It.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":vp(y),"data-disabled":l?"":void 0,disabled:l,value:u,...p,ref:g,onClick:Nt(e.onClick,e=>{w(e=>!e),v&&(b.current=e.isPropagationStopped(),b.current||e.stopPropagation())})}),v&&t.jsx(bp,{control:m,bubbles:!b.current,name:o,value:u,checked:y,required:s,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});mp.displayName=cp;var hp="SwitchThumb",gp=c.forwardRef((e,n)=>{const{__scopeSwitch:r,...o}=e,a=pp(hp,r);return t.jsx(It.span,{"data-state":vp(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:n})});gp.displayName=hp;var bp=c.forwardRef(({__scopeSwitch:e,control:n,checked:r,bubbles:o=!0,...a},i)=>{const s=c.useRef(null),l=at(s,i),u=lp(r),d=qa(n);return c.useEffect(()=>{const e=s.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}},[u,r,o]),t.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function vp(e){return e?"checked":"unchecked"}bp.displayName="SwitchBubbleInput";var yp=mp,wp=gp,xp=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement(yp,Object.assign({className:tt("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",n)},r,{ref:t}),c.createElement(wp,{className:tt("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")}))});function Ep(e){return/^https?:\/\//i.test(e)}xp.displayName=yp.displayName;var _p=[".png",".jpg",".jpeg",".gif",".webp",".bmp",".svg",".ico",".avif"];function kp(e){return _p.includes(e)}function Cp(e){var t,n=e.trim();if(!n)return!1;if(n.startsWith("data:image/"))return!0;if(!Ep(n))return!1;var r=(null===(t=n.split("#")[0])||void 0===t?void 0:t.split("?")[0])||n;return/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(r)}function Np(e){return!Number.isFinite(e)||e<=0?"0 B":e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(1)," KB"):"".concat((e/1048576).toFixed(1)," MB")}function Dp(e,t){if(!t)return!0;var n=t.split(",").map(function(e){return e.trim().toLowerCase()}).filter(Boolean);if(0===n.length)return!0;var r=e.name.toLowerCase(),o=e.type.toLowerCase();return n.some(function(e){if(e.endsWith("/*")){var t=e.slice(0,-1);return o.startsWith(t)}return e.startsWith(".")?r.endsWith(e):o===e})}function Sp(e){var t;return(null===(t=null==e?void 0:e.url)||void 0===t?void 0:t.trim())||""}var Ap=e.createContext(void 0);function Tp(t){var n=t.uploadHandler,r=t.children;return e.createElement(Ap.Provider,{value:n},r)}function Rp(t){var n=t.url,r=t.emptyText,o=void 0===r?"-":r,a=t.mode,i=void 0===a?"file":a,s=t.className,l=(n||"").trim();return l?"image"===i&&Cp(l)?e.createElement("div",{className:tt("flex items-center gap-3 min-w-0",s)},e.createElement("a",{href:l,target:"_blank",rel:"noreferrer",className:"inline-flex h-14 w-14 shrink-0 items-center justify-center overflow-hidden rounded-lg border bg-muted",title:l},e.createElement("img",{src:l,alt:"",className:"h-full w-full object-cover",onError:function(e){e.currentTarget.style.display="none"}}),e.createElement(P,{className:"hidden h-5 w-5 text-muted-foreground"})),e.createElement("a",{href:l,target:"_blank",rel:"noreferrer",className:"block min-w-0 flex-1 truncate text-sm text-primary underline-offset-2 hover:underline",title:l},l)):Ep(l)?e.createElement("a",{href:l,target:"_blank",rel:"noreferrer",className:tt("inline-flex max-w-full items-center gap-2 truncate text-sm text-primary underline-offset-2 hover:underline",s),title:l},e.createElement(z,{className:"h-4 w-4 shrink-0"}),e.createElement("span",{className:"min-w-0 flex-1 truncate"},l),e.createElement(L,{className:"h-4 w-4 shrink-0"})):e.createElement("div",{className:tt("text-sm truncate",s),title:l},l):e.createElement("div",{className:tt("text-sm text-muted-foreground",s)},o)}function Op(t){var n,r,o,a,i,s=t.field,l=t.model,c=t.value,u=t.disabled,d=t.onChange,f=rp(),h=e.useContext(Ap),b=e.useRef(null),y=v(e.useState(!1),2),w=y[0],x=y[1],E=null===(n=s.upload)||void 0===n?void 0:n.accept,_=null===(r=s.upload)||void 0===r?void 0:r.maxSize,k=function(e){var t=e.assetKind,n=void 0===t?"auto":t,r=e.accept,o=e.value;if("image"===n)return"image";if("file"===n)return"file";var a=(r||"").split(",").map(function(e){return e.trim().toLowerCase()}).filter(Boolean);if(a.length>0){var i,s=!1,l=!1,c=m(a);try{for(c.s();!(i=c.n()).done;){var u=i.value;"image/*"===u||u.startsWith("image/")||u.startsWith(".")&&kp(u)?s=!0:l=!0}}catch(e){c.e(e)}finally{c.f()}if(s&&!l)return"image";if(l&&!s)return"file"}return Cp((o||"").trim())?"image":"file"}({assetKind:null===(o=s.upload)||void 0===o?void 0:o.assetKind,accept:E,value:c}),C=!!h,N=!!(c||"").trim(),D=function(){var e=p(g().m(function e(t){var n,r,o,a,i,c;return g().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=null===(n=t.target.files)||void 0===n?void 0:n[0],t.target.value="",r){e.n=1;break}return e.a(2);case 1:if(h){e.n=2;break}return cu.error(f("data.assetUploadHandlerMissing")),e.a(2);case 2:if(Dp(r,E)){e.n=3;break}return cu.error(f("data.assetUploadInvalidType")),e.a(2);case 3:if(!("number"==typeof _&&_>0&&r.size>_)){e.n=4;break}return cu.error("".concat(f("data.assetUploadTooLarge")," (").concat(Np(_),")")),e.a(2);case 4:return x(!0),e.p=5,e.n=6,h(r,{field:s,model:l,sessionId:Of()});case 6:if(o=e.v,a=Sp(o)){e.n=7;break}throw new Error(f("data.assetUploadInvalidResult"));case 7:d(a),cu.success(f("data.assetUploadSuccess")),e.n=9;break;case 8:e.p=8,c=e.v,i=c instanceof Error?c.message:f("data.assetUploadFailed"),cu.error(i);case 9:return e.p=9,x(!1),e.f(9);case 10:return e.a(2)}},e,null,[[5,8,9,10]])}));return function(t){return e.apply(this,arguments)}}();return e.createElement("div",{className:"space-y-2.5"},e.createElement(Hc,{htmlFor:s.name,className:"text-sm font-semibold"},s.comment||s.name,s.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement("input",{ref:b,id:s.name,type:"file",accept:E,className:"hidden",disabled:u||w||!C,onChange:D}),e.createElement("div",{className:"rounded-lg border bg-card p-4 space-y-4"},e.createElement(Rp,{url:c,mode:k,emptyText:(null===(a=s.upload)||void 0===a?void 0:a.placeholder)||f("data.assetEmpty"),className:"w-[360px] max-w-full"}),e.createElement("div",{className:"flex flex-wrap gap-2"},e.createElement(vt,{type:"button",variant:"outline",onClick:function(){var e;u||w||(C?null===(e=b.current)||void 0===e||e.click():cu.error(f("data.assetUploadHandlerMissing")))},disabled:u||w||!C},w?e.createElement(e.Fragment,null,e.createElement(W,{className:"h-4 w-4 mr-2 animate-spin"}),f("data.assetUploading")):e.createElement(e.Fragment,null,e.createElement(ne,{className:"h-4 w-4 mr-2"}),N?f("data.assetReplace"):(null===(i=s.upload)||void 0===i?void 0:i.buttonText)||f("data.assetUploadButton"))),N&&e.createElement(vt,{type:"button",variant:"ghost",onClick:function(){d("")},disabled:u||w},e.createElement(te,{className:"h-4 w-4 mr-2"}),f("data.assetClear"))),e.createElement("div",{className:"space-y-1 text-xs text-muted-foreground"},E&&e.createElement("div",null,f("data.assetAcceptHint"),": ",e.createElement("span",{className:"font-mono"},E)),"number"==typeof _&&_>0&&e.createElement("div",null,f("data.assetMaxSizeHint"),": ",Np(_)),!C&&e.createElement("div",null,f("data.assetUploadHandlerMissing")))))}var Fp=Ur,Mp=qr,jp=Hr,Lp=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement(Wr,Object.assign({ref:t,className:tt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n)},r))});Lp.displayName=Wr.displayName;var Pp=c.forwardRef(function(e,t){var n=e.className,r=e.children,o=_(e,["className","children"]);return c.createElement(jp,null,c.createElement(Lp,null),c.createElement(Vr,Object.assign({ref:t,className:tt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-[hsl(var(--border))]/50 bg-background p-6 shadow-[0_20px_60px_-10px_rgba(93,112,82,0.2)] duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-[2rem]",n)},o),r,c.createElement(Kr,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},c.createElement(ae,{className:"h-4 w-4"}),c.createElement("span",{className:"sr-only"},"Close"))))});Pp.displayName=Vr.displayName;var Ip=function(e){var t=e.className,n=_(e,["className"]);return c.createElement("div",Object.assign({className:tt("flex flex-col space-y-1.5 text-center sm:text-left",t)},n))};Ip.displayName="DialogHeader";var zp=function(e){var t=e.className,n=_(e,["className"]);return c.createElement("div",Object.assign({className:tt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t)},n))};zp.displayName="DialogFooter";var Bp=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement($r,Object.assign({ref:t,className:tt("text-lg font-semibold leading-none tracking-tight",n)},r))});Bp.displayName=$r.displayName;var Up,qp=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement(Gr,Object.assign({ref:t,className:tt("text-sm text-muted-foreground",n)},r))});function Hp(e,t=!1){const n=e.length;let r=0,o="",a=0,i=16,s=0,l=0,c=0,u=0,d=0;function f(t,n){let o=0,a=0;for(;o<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=16*a+t-48;else if(t>=65&&t<=70)a=16*a+t-65+10;else{if(!(t>=97&&t<=102))break;a=16*a+t-97+10}r++,o++}return o<t&&(a=-1),a}function p(){if(o="",d=0,a=r,l=s,u=c,r>=n)return a=n,i=17;let t=e.charCodeAt(r);if(Wp(t)){do{r++,o+=String.fromCharCode(t),t=e.charCodeAt(r)}while(Wp(t));return i=15}if(Vp(t))return r++,o+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,o+="\n"),s++,c=r,i=14;switch(t){case 123:return r++,i=1;case 125:return r++,i=2;case 91:return r++,i=3;case 93:return r++,i=4;case 58:return r++,i=6;case 44:return r++,i=5;case 34:return r++,o=function(){let t="",o=r;for(;;){if(r>=n){t+=e.substring(o,r),d=2;break}const a=e.charCodeAt(r);if(34===a){t+=e.substring(o,r),r++;break}if(92!==a){if(a>=0&&a<=31){if(Vp(a)){t+=e.substring(o,r),d=2;break}d=6}r++}else{if(t+=e.substring(o,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=f(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}o=r}}return t}(),i=10;case 47:const l=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!Vp(e.charCodeAt(r));)r++;return o=e.substring(l,r),i=12}if(42===e.charCodeAt(r+1)){r+=2;const t=n-1;let a=!1;for(;r<t;){const t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,a=!0;break}r++,Vp(t)&&(13===t&&10===e.charCodeAt(r)&&r++,s++,c=r)}return a||(r++,d=1),o=e.substring(l,r),i=13}return o+=String.fromCharCode(t),r++,i=16;case 45:if(o+=String.fromCharCode(t),r++,r===n||!$p(e.charCodeAt(r)))return i=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=function(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&$p(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&$p(e.charCodeAt(r))))return d=3,e.substring(t,r);for(r++;r<e.length&&$p(e.charCodeAt(r));)r++}let n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if(r++,(r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&$p(e.charCodeAt(r))){for(r++;r<e.length&&$p(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}(),i=11;default:for(;r<n&&m(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(o=e.substring(a,r),o){case"true":return i=8;case"false":return i=9;case"null":return i=7}return i=16}return o+=String.fromCharCode(t),r++,i=16}}function m(e){if(Wp(e)||Vp(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,o="",a=0,i=16,d=0},getPosition:()=>r,scan:t?function(){let e;do{e=p()}while(e>=12&&e<=15);return e}:p,getToken:()=>i,getTokenValue:()=>o,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>l,getTokenStartCharacter:()=>a-u,getTokenError:()=>d}}function Wp(e){return 32===e||9===e}function Vp(e){return 10===e||13===e}function $p(e){return e>=48&&e<=57}qp.displayName=Gr.displayName,function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(Up||(Up={}));const Gp=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),Kp=200,Zp={" ":{"\n":new Array(Kp).fill(0).map((e,t)=>"\n"+" ".repeat(t)),"\r":new Array(Kp).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Kp).fill(0).map((e,t)=>"\r\n"+" ".repeat(t))},"\t":{"\n":new Array(Kp).fill(0).map((e,t)=>"\n"+"\t".repeat(t)),"\r":new Array(Kp).fill(0).map((e,t)=>"\r"+"\t".repeat(t)),"\r\n":new Array(Kp).fill(0).map((e,t)=>"\r\n"+"\t".repeat(t))}},Yp=["\n","\r","\r\n"];function Jp(e,t,n){let r,o,a,i,s;if(t){for(i=t.offset,s=i+t.length,a=i;a>0&&!Qp(e,a-1);)a--;let l=s;for(;l<e.length&&!Qp(e,l);)l++;o=e.substring(a,l),r=function(e,t){let n=0,r=0;const o=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===Gp[1])r++;else{if("\t"!==t)break;r+=o}n++}return Math.floor(r/o)}(o,n)}else o=e,r=0,a=0,i=0,s=e.length;const l=function(e,t){for(let e=0;e<t.length;e++){const n=t.charAt(e);if("\r"===n)return e+1<t.length&&"\n"===t.charAt(e+1)?"\r\n":"\r";if("\n"===n)return"\n"}return e&&e.eol||"\n"}(n,e),c=Yp.includes(l);let u,d=0,f=0;u=n.insertSpaces?Gp[n.tabSize||4]??Xp(Gp[1],n.tabSize||4):"\t";const p="\t"===u?"\t":" ";let m=Hp(o,!1),h=!1;function g(){if(d>1)return Xp(l,d)+Xp(u,r+f);const e=u.length*(r+f);return!c||e>Zp[p][l].length?l+Xp(u,r+f):e<=0?l:Zp[p][l][e]}function b(){let e=m.scan();for(d=0;15===e||14===e;)14===e&&n.keepLines?d+=1:14===e&&(d=1),e=m.scan();return h=16===e||0!==m.getTokenError(),e}const v=[];function y(n,r,o){h||t&&!(r<s&&o>i)||e.substring(r,o)===n||v.push({offset:r,length:o-r,content:n})}let w=b();if(n.keepLines&&d>0&&y(Xp(l,d),0,0),17!==w){let e=m.getTokenOffset()+a;y(u.length*r<20&&n.insertSpaces?Gp[u.length*r]:Xp(u,r),a,e)}for(;17!==w;){let e=m.getTokenOffset()+m.getTokenLength()+a,t=b(),r="",o=!1;for(;0===d&&(12===t||13===t);){let n=m.getTokenOffset()+a;y(Gp[1],e,n),e=m.getTokenOffset()+m.getTokenLength()+a,o=12===t,r=o?g():"",t=b()}if(2===t)1!==w&&f--,n.keepLines&&d>0||!n.keepLines&&1!==w?r=g():n.keepLines&&(r=Gp[1]);else if(4===t)3!==w&&f--,n.keepLines&&d>0||!n.keepLines&&3!==w?r=g():n.keepLines&&(r=Gp[1]);else{switch(w){case 3:case 1:f++,r=n.keepLines&&d>0||!n.keepLines?g():Gp[1];break;case 5:r=n.keepLines&&d>0||!n.keepLines?g():Gp[1];break;case 12:r=g();break;case 13:d>0?r=g():o||(r=Gp[1]);break;case 6:n.keepLines&&d>0?r=g():o||(r=Gp[1]);break;case 10:n.keepLines&&d>0?r=g():6!==t||o||(r="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&d>0?r=g():12!==t&&13!==t||o?5!==t&&17!==t&&(h=!0):r=Gp[1];break;case 16:h=!0}d>0&&(12===t||13===t)&&(r=g())}17===t&&(r=n.keepLines&&d>0?g():n.insertFinalNewline?l:"");y(r,e,m.getTokenOffset()+a),w=t}return v}function Xp(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}function Qp(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}var em,tm,nm;!function(e){e.DEFAULT={allowTrailingComma:!1}}(em||(em={})),function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(tm||(tm={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(nm||(nm={}));const rm=function(e,t=[],n=em.DEFAULT){let r=null,o=[];const a=[];function i(e){Array.isArray(o)?o.push(e):null!==r&&(o[r]=e)}const s={onObjectBegin:()=>{const e={};i(e),a.push(o),o=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{o=a.pop()},onArrayBegin:()=>{const e=[];i(e),a.push(o),o=e,r=null},onArrayEnd:()=>{o=a.pop()},onLiteralValue:i,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}};return function(e,t,n=em.DEFAULT){const r=Hp(e,!1),o=[];let a=0;function i(e){return e?()=>0===a&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function s(e){return e?t=>0===a&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>0===a&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}function c(e){return e?()=>{if(a>0)a++;else{!1===e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice())&&(a=1)}}:()=>!0}function u(e){return e?()=>{a>0&&a--,0===a&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}const d=c(t.onObjectBegin),f=l(t.onObjectProperty),p=u(t.onObjectEnd),m=c(t.onArrayBegin),h=u(t.onArrayEnd),g=l(t.onLiteralValue),b=s(t.onSeparator),v=i(t.onComment),y=s(t.onError),w=n&&n.disallowComments,x=n&&n.allowTrailingComma;function E(){for(;;){const e=r.scan();switch(r.getTokenError()){case 4:_(14);break;case 5:_(15);break;case 3:_(13);break;case 1:w||_(11);break;case 2:_(12);break;case 6:_(16)}switch(e){case 12:case 13:w?_(10):v();break;case 16:_(1);break;case 15:case 14:break;default:return e}}}function _(e,t=[],n=[]){if(y(e),t.length+n.length>0){let e=r.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){E();break}if(-1!==n.indexOf(e))break;e=E()}}}function k(e){const t=r.getTokenValue();return e?g(t):(f(t),o.push(t)),E(),!0}function C(){switch(r.getToken()){case 11:const e=r.getTokenValue();let t=Number(e);isNaN(t)&&(_(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return E(),!0}function N(){return 10!==r.getToken()?(_(3,[],[2,5]),!1):(k(!1),6===r.getToken()?(b(":"),E(),A()||_(4,[],[2,5])):_(5,[],[2,5]),o.pop(),!0)}function D(){d(),E();let e=!1;for(;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||_(4,[],[]),b(","),E(),2===r.getToken()&&x)break}else e&&_(6,[],[]);N()||_(4,[],[2,5]),e=!0}return p(),2!==r.getToken()?_(7,[2],[]):E(),!0}function S(){m(),E();let e=!0,t=!1;for(;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||_(4,[],[]),b(","),E(),4===r.getToken()&&x)break}else t&&_(6,[],[]);e?(o.push(0),e=!1):o[o.length-1]++,A()||_(4,[],[4,5]),t=!0}return h(),e||o.pop(),4!==r.getToken()?_(8,[4],[]):E(),!0}function A(){switch(r.getToken()){case 3:return S();case 1:return D();case 10:return k(!0);default:return C()}}if(E(),17===r.getToken())return!!n.allowEmptyContent||(_(4,[],[]),!1);if(!A())return _(4,[],[]),!1;17!==r.getToken()&&_(9,[],[])}(e,s,n),o[0]};var om;function am(e,t){if(!t.length)return"JSON 格式不正确";var n=t[0],r=function(e,t){for(var n=1,r=1,o=Math.max(0,Math.min(t,e.length)),a=0;a<o;a++){"\n"===e.charAt(a)?(n++,r=1):r++}return{line:n,col:r}}(e,n.offset),o=r.line,a=r.col,i=function(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}(n.error);return"JSON 格式不正确(".concat(i,",行 ").concat(o," 列 ").concat(a,")")}function im(e){if(null==e||""===e)return{ok:!0,value:null,pretty:"null",compact:"null"};try{if("string"!=typeof e)return{ok:!0,value:e,pretty:JSON.stringify(e,null,2),compact:JSON.stringify(e)};var t=e,n=[],r=rm(t,n,{allowTrailingComma:!0,disallowComments:!1});return n.length?{ok:!1,message:am(t,n),pretty:t,compact:t}:{ok:!0,value:r,pretty:JSON.stringify(r,null,2),compact:JSON.stringify(r)}}catch(t){var o="string"==typeof e?e:String(e);return{ok:!1,message:"JSON 格式不正确",pretty:o,compact:o}}}function sm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=(e||"").toString(),r=[];if(rm(n,r,{allowTrailingComma:!0,disallowComments:!1}),r.length)return{ok:!1,message:am(n,r)};for(var o=function(e,t,n){return Jp(e,t,n)}(n,void 0,{insertSpaces:!0,tabSize:t}),a=n,i=o.length-1;i>=0;i--){var s=o[i];a=a.slice(0,s.offset)+s.content+a.slice(s.offset+s.length)}return{ok:!0,formatted:a}}function lm(e){return cm.apply(this,arguments)}function cm(){return cm=p(g().m(function e(t){var n,r;return g().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:if(!(null===(n=null===navigator||void 0===navigator?void 0:navigator.clipboard)||void 0===n?void 0:n.writeText)){e.n=3;break}return e.n=2,navigator.clipboard.writeText(t);case 2:return e.a(2);case 3:(r=document.createElement("textarea")).value=t,r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r);case 4:return e.a(2)}},e)})),cm.apply(this,arguments)}function um(e){var t=e.value,n=e.title;if(null==t||""===t)return c.createElement("span",null,"-");var r,o=im(t),a=o.ok,i=o.pretty,s=o.compact,l=s.length>80?s.slice(0,80)+"…":s;return c.createElement(Fp,null,c.createElement(Mp,{asChild:!0},c.createElement("button",{type:"button",className:"max-w-xs truncate text-left font-mono text-xs text-muted-foreground hover:underline",title:"点击查看 JSON"},l)),c.createElement(Pp,{className:"max-w-3xl"},c.createElement(Ip,null,c.createElement(Bp,null,n||"JSON")),c.createElement("div",{className:"flex items-center justify-end gap-2"},c.createElement(vt,{variant:"outline",size:"sm",onClick:(r=p(g().m(function e(){return g().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,lm(i);case 1:cu.success("已复制 JSON"),e.n=3;break;case 2:e.p=2,e.v,cu.error("复制失败");case 3:return e.a(2)}},e,null,[[0,2]])})),function(){return r.apply(this,arguments)})},"复制")),c.createElement("pre",{className:"max-h-[60vh] overflow-auto rounded-md bg-muted p-3 text-xs font-mono whitespace-pre-wrap break-all"},i),!a&&c.createElement("div",{className:"text-xs text-destructive"},o.ok?"":o.message)))}function dm(e){e.id;var t=e.value;e.required;var n,r=e.disabled,s=e.onChange,l=v(c.useState(null),2),u=l[0],d=l[1];return c.createElement("div",{className:"space-y-2"},c.createElement("div",{className:"flex items-center justify-end gap-2"},c.createElement(vt,{type:"button",variant:"outline",size:"sm",disabled:!!r,onClick:function(){if(!r){var e=(t||"").trim();if(e){var n=sm(e,2);n.ok?(s(n.formatted),d(null)):d(n.message)}}}},"格式化"),c.createElement(vt,{type:"button",variant:"outline",size:"sm",onClick:(n=p(g().m(function e(){return g().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,lm(t||"");case 1:cu.success("已复制"),e.n=3;break;case 2:e.p=2,e.v,cu.error("复制失败");case 3:return e.a(2)}},e,null,[[0,2]])})),function(){return n.apply(this,arguments)})},"复制")),c.createElement("div",{className:"w-full max-w-full overflow-hidden rounded-md border bg-background"},c.createElement(o,{className:"w-full max-w-full",editable:!r,value:t||"",height:"220px",basicSetup:{lineNumbers:!0,foldGutter:!0,highlightActiveLine:!0},extensions:[a.json(),i.EditorView.lineWrapping],onChange:function(e){r||(s(e),function(e){var t=(e||"").trim();if(!t)return d(null),!0;var n=im(t);n.ok?d(null):d(n.message)}(e))}})),u&&c.createElement("div",{className:"text-xs text-destructive"},u))}!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(om||(om={}));const fm={};function pm(e,t){"string"!=typeof t&&(t=pm.defaultChars);const n=function(e){let t=fm[e];if(t)return t;t=fm[e]=[];for(let e=0;e<128;e++){const n=String.fromCharCode(e);t.push(n)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t="";for(let r=0,o=e.length;r<o;r+=3){const a=parseInt(e.slice(r+1,r+3),16);if(a<128)t+=n[a];else{if(192==(224&a)&&r+3<o){const n=parseInt(e.slice(r+4,r+6),16);if(128==(192&n)){const e=a<<6&1984|63&n;t+=e<128?"��":String.fromCharCode(e),r+=3;continue}}if(224==(240&a)&&r+6<o){const n=parseInt(e.slice(r+4,r+6),16),o=parseInt(e.slice(r+7,r+9),16);if(128==(192&n)&&128==(192&o)){const e=a<<12&61440|n<<6&4032|63&o;t+=e<2048||e>=55296&&e<=57343?"���":String.fromCharCode(e),r+=6;continue}}if(240==(248&a)&&r+9<o){const n=parseInt(e.slice(r+4,r+6),16),o=parseInt(e.slice(r+7,r+9),16),i=parseInt(e.slice(r+10,r+12),16);if(128==(192&n)&&128==(192&o)&&128==(192&i)){let e=a<<18&1835008|n<<12&258048|o<<6&4032|63&i;e<65536||e>1114111?t+="����":(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),r+=9;continue}}t+="�"}}return t})}pm.defaultChars=";/?:@&=+$,#",pm.componentChars="";const mm={};function hm(e,t,n){"string"!=typeof t&&(n=t,t=hm.defaultChars),void 0===n&&(n=!0);const r=function(e){let t=mm[e];if(t)return t;t=mm[e]=[];for(let e=0;e<128;e++){const n=String.fromCharCode(e);/^[0-9a-z]$/i.test(n)?t.push(n):t.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}(t);let o="";for(let t=0,a=e.length;t<a;t++){const i=e.charCodeAt(t);if(n&&37===i&&t+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3)))o+=e.slice(t,t+3),t+=2;else if(i<128)o+=r[i];else if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&t+1<a){const n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){o+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}o+="%EF%BF%BD"}else o+=encodeURIComponent(e[t])}return o}function gm(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function bm(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}hm.defaultChars=";/?:@&=+$,-_.!~*'()#",hm.componentChars="-_.!~*'()";const vm=/^([a-z0-9.+-]+:)/i,ym=/:[0-9]*$/,wm=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,xm=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Em=["'"].concat(xm),_m=["%","/","?",";","#"].concat(Em),km=["/","?","#"],Cm=/^[+a-z0-9A-Z_-]{0,63}$/,Nm=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Dm={javascript:!0,"javascript:":!0},Sm={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Am(e,t){if(e&&e instanceof bm)return e;const n=new bm;return n.parse(e,t),n}bm.prototype.parse=function(e,t){let n,r,o,a=e;if(a=a.trim(),!t&&1===e.split("#").length){const e=wm.exec(a);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let i=vm.exec(a);if(i&&(i=i[0],n=i.toLowerCase(),this.protocol=i,a=a.substr(i.length)),(t||i||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o="//"===a.substr(0,2),!o||i&&Dm[i]||(a=a.substr(2),this.slashes=!0)),!Dm[i]&&(o||i&&!Sm[i])){let e,t,n=-1;for(let e=0;e<km.length;e++)r=a.indexOf(km[e]),-1!==r&&(-1===n||r<n)&&(n=r);t=-1===n?a.lastIndexOf("@"):a.lastIndexOf("@",n),-1!==t&&(e=a.slice(0,t),a=a.slice(t+1),this.auth=e),n=-1;for(let e=0;e<_m.length;e++)r=a.indexOf(_m[e]),-1!==r&&(-1===n||r<n)&&(n=r);-1===n&&(n=a.length),":"===a[n-1]&&n--;const o=a.slice(0,n);a=a.slice(n),this.parseHost(o),this.hostname=this.hostname||"";const i="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!i){const e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){const n=e[t];if(n&&!n.match(Cm)){let r="";for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+="x":r+=n[e];if(!r.match(Cm)){const r=e.slice(0,t),o=e.slice(t+1),i=n.match(Nm);i&&(r.push(i[1]),o.unshift(i[2])),o.length&&(a=o.join(".")+a),this.hostname=r.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),i&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=a.indexOf("#");-1!==s&&(this.hash=a.substr(s),a=a.slice(0,s));const l=a.indexOf("?");return-1!==l&&(this.search=a.substr(l),a=a.slice(0,l)),a&&(this.pathname=a),Sm[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},bm.prototype.parseHost=function(e){let t=ym.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Tm,Rm=Object.freeze({__proto__:null,decode:pm,encode:hm,format:gm,parse:Am}),Om=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Fm=/[\0-\x1F\x7F-\x9F]/,Mm=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,jm=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Lm=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Pm=Object.freeze({__proto__:null,Any:Om,Cc:Fm,Cf:/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,P:Mm,S:jm,Z:Lm}),Im=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),zm=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));const Bm=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Um=null!==(Tm=String.fromCodePoint)&&void 0!==Tm?Tm:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};var qm;!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(qm||(qm={}));var Hm,Wm,Vm;function $m(e){return e>=qm.ZERO&&e<=qm.NINE}function Gm(e){return e>=qm.UPPER_A&&e<=qm.UPPER_F||e>=qm.LOWER_A&&e<=qm.LOWER_F}function Km(e){return e===qm.EQUALS||function(e){return e>=qm.UPPER_A&&e<=qm.UPPER_Z||e>=qm.LOWER_A&&e<=qm.LOWER_Z||$m(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(Hm||(Hm={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(Wm||(Wm={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(Vm||(Vm={}));class Zm{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Wm.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Vm.Strict}startEntity(e){this.decodeMode=e,this.state=Wm.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Wm.EntityStart:return e.charCodeAt(t)===qm.NUM?(this.state=Wm.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Wm.NamedEntity,this.stateNamedEntity(e,t));case Wm.NumericStart:return this.stateNumericStart(e,t);case Wm.NumericDecimal:return this.stateNumericDecimal(e,t);case Wm.NumericHex:return this.stateNumericHex(e,t);case Wm.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===qm.LOWER_X?(this.state=Wm.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Wm.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const o=n-t;this.result=this.result*Math.pow(r,o)+parseInt(e.substr(t,o),r),this.consumed+=o}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!$m(r)&&!Gm(r))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3);t+=1}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!$m(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===qm.SEMI)this.consumed+=1;else if(this.decodeMode===Vm.Strict)return 0;return this.emitCodePoint(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=Bm.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==qm.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],o=(r&Hm.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const a=e.charCodeAt(t);if(this.treeIndex=Jm(n,r,this.treeIndex+Math.max(1,o),a),this.treeIndex<0)return 0===this.result||this.decodeMode===Vm.Attribute&&(0===o||Km(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],o=(r&Hm.VALUE_LENGTH)>>14,0!==o){if(a===qm.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Vm.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&Hm.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~Hm.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Wm.NamedEntity:return 0===this.result||this.decodeMode===Vm.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case Wm.NumericDecimal:return this.emitNumericEntity(0,2);case Wm.NumericHex:return this.emitNumericEntity(0,3);case Wm.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Wm.EntityStart:return 0}}}function Ym(e){let t="";const n=new Zm(e,e=>t+=Um(e));return function(e,r){let o=0,a=0;for(;(a=e.indexOf("&",a))>=0;){t+=e.slice(o,a),n.startEntity(r);const i=n.write(e,a+1);if(i<0){o=a+n.end();break}o=a+i,a=0===i?o+1:o}const i=t+e.slice(o);return t="",i}}function Jm(e,t,n,r){const o=(t&Hm.BRANCH_LENGTH)>>7,a=t&Hm.JUMP_TABLE;if(0===o)return 0!==a&&r===a?n:-1;if(a){const t=r-a;return t<0||t>=o?-1:e[n+t]-1}let i=n,s=i+o-1;for(;i<=s;){const t=i+s>>>1,n=e[t];if(n<r)i=t+1;else{if(!(n>r))return e[t+o];s=t-1}}return-1}const Xm=Ym(Im);function Qm(e,t=Vm.Legacy){return Xm(e,t)}function eh(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)}Ym(zm);const th=Object.prototype.hasOwnProperty;function nh(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function rh(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function oh(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(!!(65535&~e&&65534!=(65535&e))&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function ah(e){if(e>65535){const t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const ih=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,sh=new RegExp(ih.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),lh=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function ch(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(sh,function(e,t,n){return t||function(e,t){if(35===t.charCodeAt(0)&&lh.test(t)){const n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return oh(n)?ah(n):e}const n=Qm(e);return n!==e?n:e}(e,n)})}const uh=/[&<>"]/,dh=/[&<>"]/g,fh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function ph(e){return fh[e]}function mh(e){return uh.test(e)?e.replace(dh,ph):e}const hh=/[.?*+^$[\]\\(){}|-]/g;function gh(e){switch(e){case 9:case 32:return!0}return!1}function bh(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function vh(e){return Mm.test(e)||jm.test(e)}function yh(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function wh(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const xh={mdurl:Rm,ucmicro:Pm};var Eh=Object.freeze({__proto__:null,arrayReplaceAt:rh,assign:nh,escapeHtml:mh,escapeRE:function(e){return e.replace(hh,"\\$&")},fromCodePoint:ah,has:function(e,t){return th.call(e,t)},isMdAsciiPunct:yh,isPunctChar:vh,isSpace:gh,isString:eh,isValidEntityCode:oh,isWhiteSpace:bh,lib:xh,normalizeReference:wh,unescapeAll:ch,unescapeMd:function(e){return e.indexOf("\\")<0?e:e.replace(ih,"$1")}});var _h=Object.freeze({__proto__:null,parseLinkDestination:function(e,t,n){let r,o=t;const a={ok:!1,pos:0,str:""};if(60===e.charCodeAt(o)){for(o++;o<n;){if(r=e.charCodeAt(o),10===r)return a;if(60===r)return a;if(62===r)return a.pos=o+1,a.str=ch(e.slice(t+1,o)),a.ok=!0,a;92===r&&o+1<n?o+=2:o++}return a}let i=0;for(;o<n&&(r=e.charCodeAt(o),32!==r)&&!(r<32||127===r);)if(92===r&&o+1<n){if(32===e.charCodeAt(o+1))break;o+=2}else{if(40===r&&(i++,i>32))return a;if(41===r){if(0===i)break;i--}o++}return t===o||0!==i||(a.str=ch(e.slice(t,o)),a.pos=o,a.ok=!0),a},parseLinkLabel:function(e,t,n){let r,o,a,i;const s=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos<s;){if(a=e.src.charCodeAt(e.pos),93===a&&(r--,0===r)){o=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===a)if(i===e.pos-1)r++;else if(n)return e.pos=l,-1}let c=-1;return o&&(c=e.pos),e.pos=l,c},parseLinkTitle:function(e,t,n,r){let o,a=t;const i={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)i.str=r.str,i.marker=r.marker;else{if(a>=n)return i;let r=e.charCodeAt(a);if(34!==r&&39!==r&&40!==r)return i;t++,a++,40===r&&(r=41),i.marker=r}for(;a<n;){if(o=e.charCodeAt(a),o===i.marker)return i.pos=a+1,i.str+=ch(e.slice(t,a)),i.ok=!0,i;if(40===o&&41===i.marker)return i;92===o&&a+1<n&&a++,a++}return i.can_continue=!0,i.str+=ch(e.slice(t,a)),i}});const kh={};function Ch(){this.rules=nh({},kh)}function Nh(){this.__rules__=[],this.__cache__=null}function Dh(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}function Sh(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}kh.code_inline=function(e,t,n,r,o){const a=e[t];return"<code"+o.renderAttrs(a)+">"+mh(a.content)+"</code>"},kh.code_block=function(e,t,n,r,o){const a=e[t];return"<pre"+o.renderAttrs(a)+"><code>"+mh(e[t].content)+"</code></pre>\n"},kh.fence=function(e,t,n,r,o){const a=e[t],i=a.info?ch(a.info).trim():"";let s,l="",c="";if(i){const e=i.split(/(\s+)/g);l=e[0],c=e.slice(2).join("")}if(s=n.highlight&&n.highlight(a.content,l,c)||mh(a.content),0===s.indexOf("<pre"))return s+"\n";if(i){const e=a.attrIndex("class"),t=a.attrs?a.attrs.slice():[];e<0?t.push(["class",n.langPrefix+l]):(t[e]=t[e].slice(),t[e][1]+=" "+n.langPrefix+l);const r={attrs:t};return`<pre><code${o.renderAttrs(r)}>${s}</code></pre>\n`}return`<pre><code${o.renderAttrs(a)}>${s}</code></pre>\n`},kh.image=function(e,t,n,r,o){const a=e[t];return a.attrs[a.attrIndex("alt")][1]=o.renderInlineAsText(a.children,n,r),o.renderToken(e,t,n)},kh.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},kh.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},kh.text=function(e,t){return mh(e[t].content)},kh.html_block=function(e,t){return e[t].content},kh.html_inline=function(e,t){return e[t].content},Ch.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+mh(e.attrs[t][0])+'="'+mh(e.attrs[t][1])+'"';return r},Ch.prototype.renderToken=function(e,t,n){const r=e[t];let o="";if(r.hidden)return"";r.block&&-1!==r.nesting&&t&&e[t-1].hidden&&(o+="\n"),o+=(-1===r.nesting?"</":"<")+r.tag,o+=this.renderAttrs(r),0===r.nesting&&n.xhtmlOut&&(o+=" /");let a=!1;if(r.block&&(a=!0,1===r.nesting&&t+1<e.length)){const n=e[t+1];("inline"===n.type||n.hidden||-1===n.nesting&&n.tag===r.tag)&&(a=!1)}return o+=a?">\n":">",o},Ch.prototype.renderInline=function(e,t,n){let r="";const o=this.rules;for(let a=0,i=e.length;a<i;a++){const i=e[a].type;void 0!==o[i]?r+=o[i](e,a,t,n,this):r+=this.renderToken(e,a,t)}return r},Ch.prototype.renderInlineAsText=function(e,t,n){let r="";for(let o=0,a=e.length;o<a;o++)switch(e[o].type){case"text":case"html_inline":case"html_block":r+=e[o].content;break;case"image":r+=this.renderInlineAsText(e[o].children,t,n);break;case"softbreak":case"hardbreak":r+="\n"}return r},Ch.prototype.render=function(e,t,n){let r="";const o=this.rules;for(let a=0,i=e.length;a<i;a++){const i=e[a].type;"inline"===i?r+=this.renderInline(e[a].children,t,n):void 0!==o[i]?r+=o[i](e,a,t,n,this):r+=this.renderToken(e,a,t,n)}return r},Nh.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},Nh.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){t.indexOf(e)<0&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))})})},Nh.prototype.at=function(e,t,n){const r=this.__find__(e),o=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null},Nh.prototype.before=function(e,t,n,r){const o=this.__find__(e),a=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},Nh.prototype.after=function(e,t,n,r){const o=this.__find__(e),a=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},Nh.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},Nh.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(e){const r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)},this),this.__cache__=null,n},Nh.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},Nh.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(e){const r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)},this),this.__cache__=null,n},Nh.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},Dh.prototype.attrIndex=function(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1},Dh.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},Dh.prototype.attrSet=function(e,t){const n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},Dh.prototype.attrGet=function(e){const t=this.attrIndex(e);let n=null;return t>=0&&(n=this.attrs[t][1]),n},Dh.prototype.attrJoin=function(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},Sh.prototype.Token=Dh;const Ah=/\r\n?|\n/g,Th=/\0/g;function Rh(e){return/^<a[>\s]/i.test(e)}function Oh(e){return/^<\/a\s*>/i.test(e)}const Fh=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Mh=/\((c|tm|r)\)/i,jh=/\((c|tm|r)\)/gi,Lh={c:"©",r:"®",tm:"™"};function Ph(e,t){return Lh[t.toLowerCase()]}function Ih(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];"text"!==r.type||t||(r.content=r.content.replace(jh,Ph)),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}function zh(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];"text"!==r.type||t||Fh.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}const Bh=/['"]/,Uh=/['"]/g;function qh(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function Hh(e,t){let n;const r=[];for(let o=0;o<e.length;o++){const a=e[o],i=e[o].level;for(n=r.length-1;n>=0&&!(r[n].level<=i);n--);if(r.length=n+1,"text"!==a.type)continue;let s=a.content,l=0,c=s.length;e:for(;l<c;){Uh.lastIndex=l;const u=Uh.exec(s);if(!u)break;let d=!0,f=!0;l=u.index+1;const p="'"===u[0];let m=32;if(u.index-1>=0)m=s.charCodeAt(u.index-1);else for(n=o-1;n>=0&&("softbreak"!==e[n].type&&"hardbreak"!==e[n].type);n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let h=32;if(l<c)h=s.charCodeAt(l);else for(n=o+1;n<e.length&&("softbreak"!==e[n].type&&"hardbreak"!==e[n].type);n++)if(e[n].content){h=e[n].content.charCodeAt(0);break}const g=yh(m)||vh(String.fromCharCode(m)),b=yh(h)||vh(String.fromCharCode(h)),v=bh(m),y=bh(h);if(y?d=!1:b&&(v||g||(d=!1)),v?f=!1:g&&(y||b||(f=!1)),34===h&&'"'===u[0]&&m>=48&&m<=57&&(f=d=!1),d&&f&&(d=g,f=b),d||f){if(f)for(n=r.length-1;n>=0;n--){let d=r[n];if(r[n].level<i)break;if(d.single===p&&r[n].level===i){let i,f;d=r[n],p?(i=t.md.options.quotes[2],f=t.md.options.quotes[3]):(i=t.md.options.quotes[0],f=t.md.options.quotes[1]),a.content=qh(a.content,u.index,f),e[d.token].content=qh(e[d.token].content,d.pos,i),l+=f.length-1,d.token===o&&(l+=i.length-1),s=a.content,c=s.length,r.length=n;continue e}}d?r.push({token:o,pos:u.index,single:p,level:i}):f&&p&&(a.content=qh(a.content,u.index,"’"))}else p&&(a.content=qh(a.content,u.index,"’"))}}}const Wh=[["normalize",function(e){let t;t=e.src.replace(Ah,"\n"),t=t.replace(Th,"�"),e.src=t}],["block",function(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const r=t[n];"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}],["linkify",function(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if("inline"!==t[n].type||!e.md.linkify.pretest(t[n].content))continue;let r=t[n].children,o=0;for(let a=r.length-1;a>=0;a--){const i=r[a];if("link_close"!==i.type){if("html_inline"===i.type&&(Rh(i.content)&&o>0&&o--,Oh(i.content)&&o++),!(o>0)&&"text"===i.type&&e.md.linkify.test(i.content)){const o=i.content;let s=e.md.linkify.match(o);const l=[];let c=i.level,u=0;s.length>0&&0===s[0].index&&a>0&&"text_special"===r[a-1].type&&(s=s.slice(1));for(let t=0;t<s.length;t++){const n=s[t].url,r=e.md.normalizeLink(n);if(!e.md.validateLink(r))continue;let a=s[t].text;a=s[t].schema?"mailto:"!==s[t].schema||/^mailto:/i.test(a)?e.md.normalizeLinkText(a):e.md.normalizeLinkText("mailto:"+a).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+a).replace(/^http:\/\//,"");const i=s[t].index;if(i>u){const t=new e.Token("text","",0);t.content=o.slice(u,i),t.level=c,l.push(t)}const d=new e.Token("link_open","a",1);d.attrs=[["href",r]],d.level=c++,d.markup="linkify",d.info="auto",l.push(d);const f=new e.Token("text","",0);f.content=a,f.level=c,l.push(f);const p=new e.Token("link_close","a",-1);p.level=--c,p.markup="linkify",p.info="auto",l.push(p),u=s[t].lastIndex}if(u<o.length){const t=new e.Token("text","",0);t.content=o.slice(u),t.level=c,l.push(t)}t[n].children=r=rh(r,a,l)}}else for(a--;r[a].level!==i.level&&"link_open"!==r[a].type;)a--}}}],["replacements",function(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(Mh.test(e.tokens[t].content)&&Ih(e.tokens[t].children),Fh.test(e.tokens[t].content)&&zh(e.tokens[t].children))}],["smartquotes",function(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&Bh.test(e.tokens[t].content)&&Hh(e.tokens[t].children,e)}],["text_join",function(e){let t,n;const r=e.tokens,o=r.length;for(let e=0;e<o;e++){if("inline"!==r[e].type)continue;const o=r[e].children,a=o.length;for(t=0;t<a;t++)"text_special"===o[t].type&&(o[t].type="text");for(t=n=0;t<a;t++)"text"===o[t].type&&t+1<a&&"text"===o[t+1].type?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}}]];function Vh(){this.ruler=new Nh;for(let e=0;e<Wh.length;e++)this.ruler.push(Wh[e][0],Wh[e][1])}function $h(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let e=0,t=0,n=0,r=0,a=o.length,i=!1;t<a;t++){const s=o.charCodeAt(t);if(!i){if(gh(s)){n++,9===s?r+=4-r%4:r++;continue}i=!0}10!==s&&t!==a-1||(10!==s&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(n),this.sCount.push(r),this.bsCount.push(0),i=!1,n=0,r=0,e=t+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Vh.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)},Vh.prototype.State=Sh,$h.prototype.push=function(e,t,n){const r=new Dh(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},$h.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},$h.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},$h.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){if(!gh(this.src.charCodeAt(e)))break}return e},$h.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!gh(this.src.charCodeAt(--e)))return e+1;return e},$h.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},$h.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},$h.prototype.getLines=function(e,t,n,r){if(e>=t)return"";const o=new Array(t-e);for(let a=0,i=e;i<t;i++,a++){let e=0;const s=this.bMarks[i];let l,c=s;for(l=i+1<t||r?this.eMarks[i]+1:this.eMarks[i];c<l&&e<n;){const t=this.src.charCodeAt(c);if(gh(t))9===t?e+=4-(e+this.bsCount[i])%4:e++;else{if(!(c-s<this.tShift[i]))break;e++}c++}o[a]=e>n?new Array(e-n+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return o.join("")},$h.prototype.Token=Dh;function Gh(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Kh(e){const t=[],n=e.length;let r=0,o=e.charCodeAt(r),a=!1,i=0,s="";for(;r<n;)124===o&&(a?(s+=e.substring(i,r-1),i=r):(t.push(s+e.substring(i,r)),s="",i=r+1)),a=92===o,r++,o=e.charCodeAt(r);return t.push(s+e.substring(i)),t}function Zh(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(r++);if(42!==o&&45!==o&&43!==o)return-1;if(r<n){if(!gh(e.src.charCodeAt(r)))return-1}return r}function Yh(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let o=n;if(o+1>=r)return-1;let a=e.src.charCodeAt(o++);if(a<48||a>57)return-1;for(;;){if(o>=r)return-1;if(a=e.src.charCodeAt(o++),!(a>=48&&a<=57)){if(41===a||46===a)break;return-1}if(o-n>=10)return-1}return o<r&&(a=e.src.charCodeAt(o),!gh(a))?-1:o}const Jh="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",Xh="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Qh=new RegExp("^(?:"+Jh+"|"+Xh+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),eg=new RegExp("^(?:"+Jh+"|"+Xh+")"),tg=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"].join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(eg.source+"\\s*$"),/^$/,!1]];const ng=[["table",function(e,t,n,r){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent)return!1;if(e.sCount[o]-e.blkIndent>=4)return!1;let a=e.bMarks[o]+e.tShift[o];if(a>=e.eMarks[o])return!1;const i=e.src.charCodeAt(a++);if(124!==i&&45!==i&&58!==i)return!1;if(a>=e.eMarks[o])return!1;const s=e.src.charCodeAt(a++);if(124!==s&&45!==s&&58!==s&&!gh(s))return!1;if(45===i&&gh(s))return!1;for(;a<e.eMarks[o];){const t=e.src.charCodeAt(a);if(124!==t&&45!==t&&58!==t&&!gh(t))return!1;a++}let l=Gh(e,t+1),c=l.split("|");const u=[];for(let e=0;e<c.length;e++){const t=c[e].trim();if(!t){if(0===e||e===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;58===t.charCodeAt(t.length-1)?u.push(58===t.charCodeAt(0)?"center":"right"):58===t.charCodeAt(0)?u.push("left"):u.push("")}if(l=Gh(e,t).trim(),-1===l.indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;c=Kh(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const d=c.length;if(0===d||d!==u.length)return!1;if(r)return!0;const f=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=[t,0];e.push("table_open","table",1).map=m,e.push("thead_open","thead",1).map=[t,t+1],e.push("tr_open","tr",1).map=[t,t+1];for(let t=0;t<c.length;t++){const n=e.push("th_open","th",1);u[t]&&(n.attrs=[["style","text-align:"+u[t]]]);const r=e.push("inline","",0);r.content=c[t].trim(),r.children=[],e.push("th_close","th",-1)}let h;e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let g=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let r=!1;for(let t=0,a=p.length;t<a;t++)if(p[t](e,o,n,!0)){r=!0;break}if(r)break;if(l=Gh(e,o).trim(),!l)break;if(e.sCount[o]-e.blkIndent>=4)break;if(c=Kh(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),g+=d-c.length,g>65536)break;if(o===t+2){e.push("tbody_open","tbody",1).map=h=[t+2,0]}e.push("tr_open","tr",1).map=[o,o+1];for(let t=0;t<d;t++){const n=e.push("td_open","td",1);u[t]&&(n.attrs=[["style","text-align:"+u[t]]]);const r=e.push("inline","",0);r.content=c[t]?c[t].trim():"",r.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return h&&(e.push("tbody_close","tbody",-1),h[1]=o),e.push("table_close","table",-1),m[1]=o,e.parentType=f,e.line=o,!0},["paragraph","reference"]],["code",function(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,o=r;for(;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;r++,o=r}e.line=o;const a=e.push("code_block","code",0);return a.content=e.getLines(t,o,4+e.blkIndent,!1)+"\n",a.map=[t,e.line],!0}],["fence",function(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(o+3>a)return!1;const i=e.src.charCodeAt(o);if(126!==i&&96!==i)return!1;let s=o;o=e.skipChars(o,i);let l=o-s;if(l<3)return!1;const c=e.src.slice(s,o),u=e.src.slice(o,a);if(96===i&&u.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;(d++,!(d>=n))&&(o=s=e.bMarks[d]+e.tShift[d],a=e.eMarks[d],!(o<a&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(o)===i&&!(e.sCount[d]-e.blkIndent>=4||(o=e.skipChars(o,i),o-s<l||(o=e.skipSpaces(o),o<a)))){f=!0;break}l=e.sCount[t],e.line=d+(f?1:0);const p=e.push("fence","code",0);return p.info=u,p.content=e.getLines(t+1,d,l,!0),p.markup=c,p.map=[t,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];const i=e.lineMax;if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(o))return!1;if(r)return!0;const s=[],l=[],c=[],u=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p,m=!1;for(p=t;p<n;p++){const t=e.sCount[p]<e.blkIndent;if(o=e.bMarks[p]+e.tShift[p],a=e.eMarks[p],o>=a)break;if(62===e.src.charCodeAt(o++)&&!t){let t,n,r=e.sCount[p]+1;32===e.src.charCodeAt(o)?(o++,r++,n=!1,t=!0):9===e.src.charCodeAt(o)?(t=!0,(e.bsCount[p]+r)%4==3?(o++,r++,n=!1):n=!0):t=!1;let i=r;for(s.push(e.bMarks[p]),e.bMarks[p]=o;o<a;){const t=e.src.charCodeAt(o);if(!gh(t))break;9===t?i+=4-(i+e.bsCount[p]+(n?1:0))%4:i++,o++}m=o>=a,l.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(t?1:0),c.push(e.sCount[p]),e.sCount[p]=i-r,u.push(e.tShift[p]),e.tShift[p]=o-e.bMarks[p];continue}if(m)break;let r=!1;for(let t=0,o=d.length;t<o;t++)if(d[t](e,p,n,!0)){r=!0;break}if(r){e.lineMax=p,0!==e.blkIndent&&(s.push(e.bMarks[p]),l.push(e.bsCount[p]),u.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}s.push(e.bMarks[p]),l.push(e.bsCount[p]),u.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]=-1}const h=e.blkIndent;e.blkIndent=0;const g=e.push("blockquote_open","blockquote",1);g.markup=">";const b=[t,0];g.map=b,e.md.block.tokenize(e,t,p),e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=i,e.parentType=f,b[1]=e.line;for(let n=0;n<u.length;n++)e.bMarks[n+t]=s[n],e.tShift[n+t]=u[n],e.sCount[n+t]=c[n],e.bsCount[n+t]=l[n];return e.blkIndent=h,!0},["paragraph","reference","blockquote","list"]],["hr",function(e,t,n,r){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(a++);if(42!==i&&45!==i&&95!==i)return!1;let s=1;for(;a<o;){const t=e.src.charCodeAt(a++);if(t!==i&&!gh(t))return!1;t===i&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(i)),!0},["paragraph","reference","blockquote","list"]],["list",function(e,t,n,r){let o,a,i,s,l=t,c=!0;if(e.sCount[l]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let u,d,f,p=!1;if(r&&"paragraph"===e.parentType&&e.sCount[l]>=e.blkIndent&&(p=!0),(f=Yh(e,l))>=0){if(u=!0,i=e.bMarks[l]+e.tShift[l],d=Number(e.src.slice(i,f-1)),p&&1!==d)return!1}else{if(!((f=Zh(e,l))>=0))return!1;u=!1}if(p&&e.skipSpaces(f)>=e.eMarks[l])return!1;if(r)return!0;const m=e.src.charCodeAt(f-1),h=e.tokens.length;u?(s=e.push("ordered_list_open","ol",1),1!==d&&(s.attrs=[["start",d]])):s=e.push("bullet_list_open","ul",1);const g=[l,0];s.map=g,s.markup=String.fromCharCode(m);let b=!1;const v=e.md.block.ruler.getRules("list"),y=e.parentType;for(e.parentType="list";l<n;){a=f,o=e.eMarks[l];const t=e.sCount[l]+f-(e.bMarks[l]+e.tShift[l]);let r=t;for(;a<o;){const t=e.src.charCodeAt(a);if(9===t)r+=4-(r+e.bsCount[l])%4;else{if(32!==t)break;r++}a++}const d=a;let p;p=d>=o?1:r-t,p>4&&(p=1);const h=t+p;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const g=[l,0];s.map=g,u&&(s.info=e.src.slice(i,f-1));const y=e.tight,w=e.tShift[l],x=e.sCount[l],E=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=h,e.tight=!0,e.tShift[l]=d-e.bMarks[l],e.sCount[l]=r,d>=o&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),e.tight&&!b||(c=!1),b=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=E,e.tShift[l]=w,e.sCount[l]=x,e.tight=y,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),l=e.line,g[1]=l,l>=n)break;if(e.sCount[l]<e.blkIndent)break;if(e.sCount[l]-e.blkIndent>=4)break;let _=!1;for(let t=0,r=v.length;t<r;t++)if(v[t](e,l,n,!0)){_=!0;break}if(_)break;if(u){if(f=Yh(e,l),f<0)break;i=e.bMarks[l]+e.tShift[l]}else if(f=Zh(e,l),f<0)break;if(m!==e.src.charCodeAt(f-1))break}return s=u?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(m),g[1]=l,e.line=l,e.parentType=y,c&&function(e,t){const n=e.level+2;for(let r=t+2,o=e.tokens.length-2;r<o;r++)e.tokens[r].level===n&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}(e,h),!0},["paragraph","reference","blockquote"]],["reference",function(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],i=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(o))return!1;function s(t){const n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){const r=e.md.block.ruler.getRules("reference"),o=e.parentType;e.parentType="reference";let a=!1;for(let o=0,i=r.length;o<i;o++)if(r[o](e,t,n,!0)){a=!0;break}if(e.parentType=o,a)return null}const o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];return e.src.slice(o,a+1)}let l=e.src.slice(o,a+1);a=l.length;let c=-1;for(o=1;o<a;o++){const e=l.charCodeAt(o);if(91===e)return!1;if(93===e){c=o;break}if(10===e){const e=s(i);null!==e&&(l+=e,a=l.length,i++)}else if(92===e&&(o++,o<a&&10===l.charCodeAt(o))){const e=s(i);null!==e&&(l+=e,a=l.length,i++)}}if(c<0||58!==l.charCodeAt(c+1))return!1;for(o=c+2;o<a;o++){const e=l.charCodeAt(o);if(10===e){const e=s(i);null!==e&&(l+=e,a=l.length,i++)}else if(!gh(e))break}const u=e.md.helpers.parseLinkDestination(l,o,a);if(!u.ok)return!1;const d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;o=u.pos;const f=o,p=i,m=o;for(;o<a;o++){const e=l.charCodeAt(o);if(10===e){const e=s(i);null!==e&&(l+=e,a=l.length,i++)}else if(!gh(e))break}let h,g=e.md.helpers.parseLinkTitle(l,o,a);for(;g.can_continue;){const t=s(i);if(null===t)break;l+=t,o=a,a=l.length,i++,g=e.md.helpers.parseLinkTitle(l,o,a,g)}for(o<a&&m!==o&&g.ok?(h=g.str,o=g.pos):(h="",o=f,i=p);o<a;){if(!gh(l.charCodeAt(o)))break;o++}if(o<a&&10!==l.charCodeAt(o)&&h)for(h="",o=f,i=p;o<a;){if(!gh(l.charCodeAt(o)))break;o++}if(o<a&&10!==l.charCodeAt(o))return!1;const b=wh(l.slice(1,c));return!!b&&(r||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[b]&&(e.env.references[b]={title:h,href:d}),e.line=i),!0)}],["html_block",function(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(o))return!1;let i=e.src.slice(o,a),s=0;for(;s<tg.length&&!tg[s][0].test(i);s++);if(s===tg.length)return!1;if(r)return tg[s][2];let l=t+1;if(!tg[s][1].test(i))for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(o=e.bMarks[l]+e.tShift[l],a=e.eMarks[l],i=e.src.slice(o,a),tg[s][1].test(i)){0!==i.length&&l++;break}e.line=l;const c=e.push("html_block","",0);return c.map=[t,l],c.content=e.getLines(t,l,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.src.charCodeAt(o);if(35!==i||o>=a)return!1;let s=1;for(i=e.src.charCodeAt(++o);35===i&&o<a&&s<=6;)s++,i=e.src.charCodeAt(++o);if(s>6||o<a&&!gh(i))return!1;if(r)return!0;a=e.skipSpacesBack(a,o);const l=e.skipCharsBack(a,35,o);l>o&&gh(e.src.charCodeAt(l-1))&&(a=l),e.line=t+1;const c=e.push("heading_open","h"+String(s),1);c.markup="########".slice(0,s),c.map=[t,e.line];const u=e.push("inline","",0);return u.content=e.src.slice(o,a).trim(),u.map=[t,e.line],u.children=[],e.push("heading_close","h"+String(s),-1).markup="########".slice(0,s),!0},["paragraph","reference","blockquote"]],["lheading",function(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let a,i=0,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let t=e.bMarks[s]+e.tShift[s];const n=e.eMarks[s];if(t<n&&(a=e.src.charCodeAt(t),(45===a||61===a)&&(t=e.skipChars(t,a),t=e.skipSpaces(t),t>=n))){i=61===a?1:2;break}}if(e.sCount[s]<0)continue;let t=!1;for(let o=0,a=r.length;o<a;o++)if(r[o](e,s,n,!0)){t=!0;break}if(t)break}if(!i)return!1;const l=e.getLines(t,s,e.blkIndent,!1).trim();e.line=s+1;const c=e.push("heading_open","h"+String(i),1);c.markup=String.fromCharCode(a),c.map=[t,e.line];const u=e.push("inline","",0);return u.content=l,u.map=[t,e.line-1],u.children=[],e.push("heading_close","h"+String(i),-1).markup=String.fromCharCode(a),e.parentType=o,!0}],["paragraph",function(e,t,n){const r=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let a=t+1;for(e.parentType="paragraph";a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]<0)continue;let t=!1;for(let o=0,i=r.length;o<i;o++)if(r[o](e,a,n,!0)){t=!0;break}if(t)break}const i=e.getLines(t,a,e.blkIndent,!1).trim();e.line=a,e.push("paragraph_open","p",1).map=[t,e.line];const s=e.push("inline","",0);return s.content=i,s.map=[t,e.line],s.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}]];function rg(){this.ruler=new Nh;for(let e=0;e<ng.length;e++)this.ruler.push(ng[e][0],ng[e][1],{alt:(ng[e][2]||[]).slice()})}function og(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}function ag(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}rg.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),o=r.length,a=e.md.options.maxNesting;let i=t,s=!1;for(;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=a){e.line=n;break}const t=e.line;let l=!1;for(let a=0;a<o;a++)if(l=r[a](e,i,n,!1),l){if(t>=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),i=e.line,i<n&&e.isEmpty(i)&&(s=!0,i++,e.line=i)}},rg.prototype.parse=function(e,t,n,r){if(!e)return;const o=new this.State(e,t,n,r);this.tokenize(o,o.line,o.lineMax)},rg.prototype.State=$h,og.prototype.pushPending=function(){const e=new Dh("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},og.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new Dh(e,t,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r},og.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32;let a=e;for(;a<n&&this.src.charCodeAt(a)===r;)a++;const i=a-e,s=a<n?this.src.charCodeAt(a):32,l=yh(o)||vh(String.fromCharCode(o)),c=yh(s)||vh(String.fromCharCode(s)),u=bh(o),d=bh(s),f=!d&&(!c||u||l),p=!u&&(!l||d||c);return{can_open:f&&(t||!p||l),can_close:p&&(t||!f||c),length:i}},og.prototype.Token=Dh;const ig=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;const sg=[];for(let e=0;e<256;e++)sg.push(0);function lg(e,t){let n;const r=[],o=t.length;for(let a=0;a<o;a++){const o=t[a];if(126!==o.marker)continue;if(-1===o.end)continue;const i=t[o.end];n=e.tokens[o.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[i.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="","text"===e.tokens[i.token-1].type&&"~"===e.tokens[i.token-1].content&&r.push(i.token-1)}for(;r.length;){const t=r.pop();let o=t+1;for(;o<e.tokens.length&&"s_close"===e.tokens[o].type;)o++;o--,t!==o&&(n=e.tokens[o],e.tokens[o]=e.tokens[t],e.tokens[t]=n)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){sg[e.charCodeAt(0)]=1});var cg={tokenize:function(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(126!==r)return!1;const o=e.scanDelims(e.pos,!0);let a=o.length;const i=String.fromCharCode(r);if(a<2)return!1;let s;a%2&&(s=e.push("text","",0),s.content=i,a--);for(let t=0;t<a;t+=2)s=e.push("text","",0),s.content=i+i,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0},postProcess:function(e){const t=e.tokens_meta,n=e.tokens_meta.length;lg(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&lg(e,t[r].delimiters)}};function ug(e,t){for(let n=t.length-1;n>=0;n--){const r=t[n];if(95!==r.marker&&42!==r.marker)continue;if(-1===r.end)continue;const o=t[r.end],a=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===o.token+1,i=String.fromCharCode(r.marker),s=e.tokens[r.token];s.type=a?"strong_open":"em_open",s.tag=a?"strong":"em",s.nesting=1,s.markup=a?i+i:i,s.content="";const l=e.tokens[o.token];l.type=a?"strong_close":"em_close",l.tag=a?"strong":"em",l.nesting=-1,l.markup=a?i+i:i,l.content="",a&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--)}}var dg={tokenize:function(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(95!==r&&42!==r)return!1;const o=e.scanDelims(e.pos,42===r);for(let t=0;t<o.length;t++){e.push("text","",0).content=String.fromCharCode(r),e.delimiters.push({marker:r,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0},postProcess:function(e){const t=e.tokens_meta,n=e.tokens_meta.length;ug(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&ug(e,t[r].delimiters)}};const fg=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,pg=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;const mg=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,hg=/^&([a-z][a-z0-9]{1,31});/i;function gg(e){const t={},n=e.length;if(!n)return;let r=0,o=-2;const a=[];for(let i=0;i<n;i++){const n=e[i];if(a.push(0),e[r].marker===n.marker&&o===n.token-1||(r=i),o=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);const s=t[n.marker][(n.open?3:0)+n.length%3];let l=r-a[r]-1,c=l;for(;l>s;l-=a[l]+1){const t=e[l];if(t.marker===n.marker&&(t.open&&t.end<0)){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3==0&&n.length%3==0||(r=!0)),!r){const r=l>0&&!e[l-1].open?a[l-1]+1:0;a[i]=i-l+r,a[l]=r,n.open=!1,t.end=i,t.close=!1,c=-1,o=-2;break}}}-1!==c&&(t[n.marker][(n.open?3:0)+(n.length||0)%3]=c)}}const bg=[["text",function(e,t){let n=e.pos;for(;n<e.posMax&&!ag(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}],["linkify",function(e,t){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;const n=e.pos;if(n+3>e.posMax)return!1;if(58!==e.src.charCodeAt(n))return!1;if(47!==e.src.charCodeAt(n+1))return!1;if(47!==e.src.charCodeAt(n+2))return!1;const r=e.pending.match(ig);if(!r)return!1;const o=r[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let i=a.url;if(i.length<=o.length)return!1;let s=i.length;for(;s>0&&42===i.charCodeAt(s-1);)s--;s!==i.length&&(i=i.slice(0,s));const l=e.md.normalizeLink(i);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const t=e.push("link_open","a",1);t.attrs=[["href",l]],t.markup="linkify",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(i);const n=e.push("link_close","a",-1);n.markup="linkify",n.info="auto"}return e.pos+=i.length-o.length,!0}],["newline",function(e,t){let n=e.pos;if(10!==e.src.charCodeAt(n))return!1;const r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&32===e.pending.charCodeAt(r))if(r>=1&&32===e.pending.charCodeAt(r-1)){let t=r-1;for(;t>=1&&32===e.pending.charCodeAt(t-1);)t--;e.pending=e.pending.slice(0,t),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&gh(e.src.charCodeAt(n));)n++;return e.pos=n,!0}],["escape",function(e,t){let n=e.pos;const r=e.posMax;if(92!==e.src.charCodeAt(n))return!1;if(n++,n>=r)return!1;let o=e.src.charCodeAt(n);if(10===o){for(t||e.push("hardbreak","br",0),n++;n<r&&(o=e.src.charCodeAt(n),gh(o));)n++;return e.pos=n,!0}let a=e.src[n];if(o>=55296&&o<=56319&&n+1<r){const t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(a+=e.src[n+1],n++)}const i="\\"+a;if(!t){const t=e.push("text_special","",0);o<256&&0!==sg[o]?t.content=a:t.content=i,t.markup=i,t.info="escape"}return e.pos=n+1,!0}],["backticks",function(e,t){let n=e.pos;if(96!==e.src.charCodeAt(n))return!1;const r=n;n++;const o=e.posMax;for(;n<o&&96===e.src.charCodeAt(n);)n++;const a=e.src.slice(r,n),i=a.length;if(e.backticksScanned&&(e.backticks[i]||0)<=r)return t||(e.pending+=a),e.pos+=i,!0;let s,l=n;for(;-1!==(s=e.src.indexOf("`",l));){for(l=s+1;l<o&&96===e.src.charCodeAt(l);)l++;const r=l-s;if(r===i){if(!t){const t=e.push("code_inline","code",0);t.markup=a,t.content=e.src.slice(n,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[r]=s}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=i,!0}],["strikethrough",cg.tokenize],["emphasis",dg.tokenize],["link",function(e,t){let n,r,o,a,i="",s="",l=e.pos,c=!0;if(91!==e.src.charCodeAt(e.pos))return!1;const u=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<d&&40===e.src.charCodeAt(m)){for(c=!1,m++;m<d&&(n=e.src.charCodeAt(m),gh(n)||10===n);m++);if(m>=d)return!1;if(l=m,o=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),o.ok){for(i=e.md.normalizeLink(o.str),e.md.validateLink(i)?m=o.pos:i="",l=m;m<d&&(n=e.src.charCodeAt(m),gh(n)||10===n);m++);if(o=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<d&&l!==m&&o.ok)for(s=o.str,m=o.pos;m<d&&(n=e.src.charCodeAt(m),gh(n)||10===n);m++);}(m>=d||41!==e.src.charCodeAt(m))&&(c=!0),m++}if(c){if(void 0===e.env.references)return!1;if(m<d&&91===e.src.charCodeAt(m)?(l=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?r=e.src.slice(l,m++):m=p+1):m=p+1,r||(r=e.src.slice(f,p)),a=e.env.references[wh(r)],!a)return e.pos=u,!1;i=a.href,s=a.title}if(!t){e.pos=f,e.posMax=p;const t=[["href",i]];e.push("link_open","a",1).attrs=t,s&&t.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=d,!0}],["image",function(e,t){let n,r,o,a,i,s,l,c,u="";const d=e.pos,f=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(a=m+1,a<f&&40===e.src.charCodeAt(a)){for(a++;a<f&&(n=e.src.charCodeAt(a),gh(n)||10===n);a++);if(a>=f)return!1;for(c=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(u=e.md.normalizeLink(s.str),e.md.validateLink(u)?a=s.pos:u=""),c=a;a<f&&(n=e.src.charCodeAt(a),gh(n)||10===n);a++);if(s=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<f&&c!==a&&s.ok)for(l=s.str,a=s.pos;a<f&&(n=e.src.charCodeAt(a),gh(n)||10===n);a++);else l="";if(a>=f||41!==e.src.charCodeAt(a))return e.pos=d,!1;a++}else{if(void 0===e.env.references)return!1;if(a<f&&91===e.src.charCodeAt(a)?(c=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?o=e.src.slice(c,a++):a=m+1):a=m+1,o||(o=e.src.slice(p,m)),i=e.env.references[wh(o)],!i)return e.pos=d,!1;u=i.href,l=i.title}if(!t){r=e.src.slice(p,m);const t=[];e.md.inline.parse(r,e.md,e.env,t);const n=e.push("image","img",0),o=[["src",u],["alt",""]];n.attrs=o,n.children=t,n.content=r,l&&o.push(["title",l])}return e.pos=a,e.posMax=f,!0}],["autolink",function(e,t){let n=e.pos;if(60!==e.src.charCodeAt(n))return!1;const r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const t=e.src.charCodeAt(n);if(60===t)return!1;if(62===t)break}const a=e.src.slice(r+1,n);if(pg.test(a)){const n=e.md.normalizeLink(a);if(!e.md.validateLink(n))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(a);const r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=a.length+2,!0}if(fg.test(a)){const n=e.md.normalizeLink("mailto:"+a);if(!e.md.validateLink(n))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(a);const r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=a.length+2,!0}return!1}],["html_inline",function(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(60!==e.src.charCodeAt(r)||r+2>=n)return!1;const o=e.src.charCodeAt(r+1);if(33!==o&&63!==o&&47!==o&&!function(e){const t=32|e;return t>=97&&t<=122}(o))return!1;const a=e.src.slice(r).match(Qh);if(!a)return!1;if(!t){const t=e.push("html_inline","",0);t.content=a[0],i=t.content,/^<a[>\s]/i.test(i)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(t.content)&&e.linkLevel--}var i;return e.pos+=a[0].length,!0}],["entity",function(e,t){const n=e.pos,r=e.posMax;if(38!==e.src.charCodeAt(n))return!1;if(n+1>=r)return!1;if(35===e.src.charCodeAt(n+1)){const r=e.src.slice(n).match(mg);if(r){if(!t){const t="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push("text_special","",0);n.content=oh(t)?ah(t):ah(65533),n.markup=r[0],n.info="entity"}return e.pos+=r[0].length,!0}}else{const r=e.src.slice(n).match(hg);if(r){const n=Qm(r[0]);if(n!==r[0]){if(!t){const t=e.push("text_special","",0);t.content=n,t.markup=r[0],t.info="entity"}return e.pos+=r[0].length,!0}}}return!1}]],vg=[["balance_pairs",function(e){const t=e.tokens_meta,n=e.tokens_meta.length;gg(e.delimiters);for(let e=0;e<n;e++)t[e]&&t[e].delimiters&&gg(t[e].delimiters)}],["strikethrough",cg.postProcess],["emphasis",dg.postProcess],["fragments_join",function(e){let t,n,r=0;const o=e.tokens,a=e.tokens.length;for(t=n=0;t<a;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,"text"===o[t].type&&t+1<a&&"text"===o[t+1].type?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}]];function yg(){this.ruler=new Nh;for(let e=0;e<bg.length;e++)this.ruler.push(bg[e][0],bg[e][1]);this.ruler2=new Nh;for(let e=0;e<vg.length;e++)this.ruler2.push(vg[e][0],vg[e][1])}function wg(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function xg(e){return Object.prototype.toString.call(e)}function Eg(e){return"[object Function]"===xg(e)}function _g(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}yg.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,o=e.md.options.maxNesting,a=e.cache;if(void 0!==a[t])return void(e.pos=a[t]);let i=!1;if(e.level<o){for(let o=0;o<r;o++)if(e.level++,i=n[o](e,!0),e.level--,i){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;i||e.pos++,a[t]=e.pos},yg.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos<r;){const a=e.pos;let i=!1;if(e.level<o)for(let r=0;r<n;r++)if(i=t[r](e,!1),i){if(a>=e.pos)throw new Error("inline rule didn't increment state.pos");break}if(i){if(e.pos>=r)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},yg.prototype.parse=function(e,t,n,r){const o=new this.State(e,t,n,r);this.tokenize(o);const a=this.ruler2.getRules(""),i=a.length;for(let e=0;e<i;e++)a[e](o)},yg.prototype.State=og;const kg={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};const Cg={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},Ng="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Dg(e){const t=e.re=function(e){const t={};e=e||{},t.src_Any=Om.source,t.src_Cc=Fm.source,t.src_Z=Lm.source,t.src_P=Mm.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}(e.__opts__),n=e.__tlds__.slice();function r(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];function a(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){const n=e.__schemas__[t];if(null===n)return;const r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===xg(n))return!function(e){return"[object RegExp]"===xg(e)}(n.validate)?Eg(n.validate)?r.validate=n.validate:a(t,n):r.validate=function(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(Eg(n.normalize)?r.normalize=n.normalize:n.normalize?a(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===xg(e)}(n)?a(t,n):o.push(t)}),o.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};const i=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(_g).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function Sg(e,t){const n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function Ag(e,t){const n=new Sg(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Tg(e,t){if(!(this instanceof Tg))return new Tg(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||kg.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=wg({},kg,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=wg({},Cg,e),this.__compiled__={},this.__tlds__=Ng,this.__tlds_replaced__=!1,this.re={},Dg(this)}Tg.prototype.add=function(e,t){return this.__schemas__[e]=t,Dg(this),this},Tg.prototype.set=function(e){return this.__opts__=wg(this.__opts__,e),this},Tg.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,o,a,i,s,l,c;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;null!==(t=s.exec(e));)if(o=this.testSchemaAt(e,t[2],s.lastIndex),o){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(a=n.index+n[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(a=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=i))),this.__index__>=0},Tg.prototype.pretest=function(e){return this.re.pretest.test(e)},Tg.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},Tg.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(Ag(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(Ag(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},Tg.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,Ag(this,0)):null},Tg.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),Dg(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Dg(this),this)},Tg.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},Tg.prototype.onCompile=function(){};const Rg=2147483647,Og=36,Fg=/^xn--/,Mg=/[^\0-\x7F]/,jg=/[\x2E\u3002\uFF0E\uFF61]/g,Lg={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Pg=Math.floor,Ig=String.fromCharCode;function zg(e){throw new RangeError(Lg[e])}function Bg(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]);const o=function(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}((e=e.replace(jg,".")).split("."),t).join(".");return r+o}function Ug(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&o)<<10)+(1023&r)+65536):(t.push(o),n--)}else t.push(o)}return t}const qg=function(e){return e>=48&&e<58?e-48+26:e>=65&&e<91?e-65:e>=97&&e<123?e-97:Og},Hg=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},Wg=function(e,t,n){let r=0;for(e=n?Pg(e/700):e>>1,e+=Pg(e/t);e>455;r+=Og)e=Pg(e/35);return Pg(r+36*e/(e+38))},Vg=function(e){const t=[],n=e.length;let r=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(let n=0;n<i;++n)e.charCodeAt(n)>=128&&zg("not-basic"),t.push(e.charCodeAt(n));for(let s=i>0?i+1:0;s<n;){const i=r;for(let t=1,o=Og;;o+=Og){s>=n&&zg("invalid-input");const i=qg(e.charCodeAt(s++));i>=Og&&zg("invalid-input"),i>Pg((Rg-r)/t)&&zg("overflow"),r+=i*t;const l=o<=a?1:o>=a+26?26:o-a;if(i<l)break;const c=Og-l;t>Pg(Rg/c)&&zg("overflow"),t*=c}const l=t.length+1;a=Wg(r-i,l,0==i),Pg(r/l)>Rg-o&&zg("overflow"),o+=Pg(r/l),r%=l,t.splice(r++,0,o)}return String.fromCodePoint(...t)},$g=function(e){const t=[],n=(e=Ug(e)).length;let r=128,o=0,a=72;for(const n of e)n<128&&t.push(Ig(n));const i=t.length;let s=i;for(i&&t.push("-");s<n;){let n=Rg;for(const t of e)t>=r&&t<n&&(n=t);const l=s+1;n-r>Pg((Rg-o)/l)&&zg("overflow"),o+=(n-r)*l,r=n;for(const n of e)if(n<r&&++o>Rg&&zg("overflow"),n===r){let e=o;for(let n=Og;;n+=Og){const r=n<=a?1:n>=a+26?26:n-a;if(e<r)break;const o=e-r,i=Og-r;t.push(Ig(Hg(r+o%i,0))),e=Pg(o/i)}t.push(Ig(Hg(e,0))),a=Wg(o,l,s===i),o=0,++s}++o,++r}return t.join("")},Gg=function(e){return Bg(e,function(e){return Mg.test(e)?"xn--"+$g(e):e})},Kg=function(e){return Bg(e,function(e){return Fg.test(e)?Vg(e.slice(4).toLowerCase()):e})};const Zg={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Yg=/^(vbscript|javascript|file|data):/,Jg=/^data:image\/(gif|png|jpeg|webp);/;function Xg(e){const t=e.trim().toLowerCase();return!Yg.test(t)||Jg.test(t)}const Qg=["http:","https:","mailto:"];function eb(e){const t=Am(e,!0);if(t.hostname&&(!t.protocol||Qg.indexOf(t.protocol)>=0))try{t.hostname=Gg(t.hostname)}catch(e){}return hm(gm(t))}function tb(e){const t=Am(e,!0);if(t.hostname&&(!t.protocol||Qg.indexOf(t.protocol)>=0))try{t.hostname=Kg(t.hostname)}catch(e){}return pm(gm(t),pm.defaultChars+"%")}function nb(e,t){if(!(this instanceof nb))return new nb(e,t);t||eh(e)||(t=e||{},e="default"),this.inline=new yg,this.block=new rg,this.core=new Vh,this.renderer=new Ch,this.linkify=new Tg,this.validateLink=Xg,this.normalizeLink=eb,this.normalizeLinkText=tb,this.utils=Eh,this.helpers=nh({},_h),this.options={},this.configure(e),t&&this.set(t)}nb.prototype.set=function(e){return nh(this.options,e),this},nb.prototype.configure=function(e){const t=this;if(eh(e)){const t=e;if(!(e=Zg[t]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},nb.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},nb.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},nb.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},nb.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},nb.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},nb.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},nb.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};
17
+ /*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */
18
+ const{entries:rb,setPrototypeOf:ob,isFrozen:ab,getPrototypeOf:ib,getOwnPropertyDescriptor:sb}=Object;let{freeze:lb,seal:cb,create:ub}=Object,{apply:db,construct:fb}="undefined"!=typeof Reflect&&Reflect;lb||(lb=function(e){return e}),cb||(cb=function(e){return e}),db||(db=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),fb||(fb=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const pb=Sb(Array.prototype.forEach),mb=Sb(Array.prototype.lastIndexOf),hb=Sb(Array.prototype.pop),gb=Sb(Array.prototype.push),bb=Sb(Array.prototype.splice),vb=Sb(String.prototype.toLowerCase),yb=Sb(String.prototype.toString),wb=Sb(String.prototype.match),xb=Sb(String.prototype.replace),Eb=Sb(String.prototype.indexOf),_b=Sb(String.prototype.trim),kb=Sb(Object.prototype.hasOwnProperty),Cb=Sb(RegExp.prototype.test),Nb=(Db=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return fb(Db,t)});var Db;function Sb(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return db(e,t,r)}}function Ab(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vb;ob&&ob(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(ab(t)||(t[r]=e),o=e)}e[o]=!0}return e}function Tb(e){for(let t=0;t<e.length;t++){kb(e,t)||(e[t]=null)}return e}function Rb(e){const t=ub(null);for(const[n,r]of rb(e)){kb(e,n)&&(Array.isArray(r)?t[n]=Tb(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=Rb(r):t[n]=r)}return t}function Ob(e,t){for(;null!==e;){const n=sb(e,t);if(n){if(n.get)return Sb(n.get);if("function"==typeof n.value)return Sb(n.value)}e=ib(e)}return function(){return null}}const Fb=lb(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Mb=lb(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),jb=lb(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Lb=lb(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Pb=lb(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ib=lb(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zb=lb(["#text"]),Bb=lb(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ub=lb(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),qb=lb(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Hb=lb(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Wb=cb(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Vb=cb(/<%[\w\W]*|[\w\W]*%>/gm),$b=cb(/\$\{[\w\W]*/gm),Gb=cb(/^data-[\-\w.\u00B7-\uFFFF]+$/),Kb=cb(/^aria-[\-\w]+$/),Zb=cb(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yb=cb(/^(?:\w+script|data):/i),Jb=cb(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xb=cb(/^html$/i),Qb=cb(/^[a-z][.\w]*(-[.\w]+)+$/i);var ev=Object.freeze({__proto__:null,ARIA_ATTR:Kb,ATTR_WHITESPACE:Jb,CUSTOM_ELEMENT:Qb,DATA_ATTR:Gb,DOCTYPE_NAME:Xb,ERB_EXPR:Vb,IS_ALLOWED_URI:Zb,IS_SCRIPT_OR_DATA:Yb,MUSTACHE_EXPR:Wb,TMPLIT_EXPR:$b});const tv=1,nv=3,rv=7,ov=8,av=9,iv=function(){return"undefined"==typeof window?null:window};var sv=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:iv();const n=t=>e(t);if(n.version="3.3.3",n.removed=[],!t||!t.document||t.document.nodeType!==av||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,a=o.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:m}=t,h=c.prototype,g=Ob(h,"cloneNode"),b=Ob(h,"remove"),v=Ob(h,"nextSibling"),y=Ob(h,"childNodes"),w=Ob(h,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let x,E="";const{implementation:_,createNodeIterator:k,createDocumentFragment:C,getElementsByTagName:N}=r,{importNode:D}=o;let S={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof rb&&"function"==typeof w&&_&&void 0!==_.createHTMLDocument;const{MUSTACHE_EXPR:A,ERB_EXPR:T,TMPLIT_EXPR:R,DATA_ATTR:O,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:j,CUSTOM_ELEMENT:L}=ev;let{IS_ALLOWED_URI:P}=ev,I=null;const z=Ab({},[...Fb,...Mb,...jb,...Pb,...zb]);let B=null;const U=Ab({},[...Bb,...Ub,...qb,...Hb]);let q=Object.seal(ub(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),H=null,W=null;const V=Object.seal(ub(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let $=!0,G=!0,K=!1,Z=!0,Y=!1,J=!0,X=!1,Q=!1,ee=!1,te=!1,ne=!1,re=!1,oe=!0,ae=!1,ie=!0,se=!1,le={},ce=null;const ue=Ab({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const fe=Ab({},["audio","video","img","source","image","track"]);let pe=null;const me=Ab({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml";let ve=be,ye=!1,we=null;const xe=Ab({},[he,ge,be],yb);let Ee=Ab({},["mi","mo","mn","ms","mtext"]),_e=Ab({},["annotation-xml"]);const ke=Ab({},["title","style","font","a","script"]);let Ce=null;const Ne=["application/xhtml+xml","text/html"];let De=null,Se=null;const Ae=r.createElement("form"),Te=function(e){return e instanceof RegExp||e instanceof Function},Re=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Se||Se!==e){if(e&&"object"==typeof e||(e={}),e=Rb(e),Ce=-1===Ne.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,De="application/xhtml+xml"===Ce?yb:vb,I=kb(e,"ALLOWED_TAGS")?Ab({},e.ALLOWED_TAGS,De):z,B=kb(e,"ALLOWED_ATTR")?Ab({},e.ALLOWED_ATTR,De):U,we=kb(e,"ALLOWED_NAMESPACES")?Ab({},e.ALLOWED_NAMESPACES,yb):xe,pe=kb(e,"ADD_URI_SAFE_ATTR")?Ab(Rb(me),e.ADD_URI_SAFE_ATTR,De):me,de=kb(e,"ADD_DATA_URI_TAGS")?Ab(Rb(fe),e.ADD_DATA_URI_TAGS,De):fe,ce=kb(e,"FORBID_CONTENTS")?Ab({},e.FORBID_CONTENTS,De):ue,H=kb(e,"FORBID_TAGS")?Ab({},e.FORBID_TAGS,De):Rb({}),W=kb(e,"FORBID_ATTR")?Ab({},e.FORBID_ATTR,De):Rb({}),le=!!kb(e,"USE_PROFILES")&&e.USE_PROFILES,$=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,K=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,J=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,re=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,oe=!1!==e.SANITIZE_DOM,ae=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,se=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||Zb,ve=e.NAMESPACE||be,Ee=e.MATHML_TEXT_INTEGRATION_POINTS||Ee,_e=e.HTML_INTEGRATION_POINTS||_e,q=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Te(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(q.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Te(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(q.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(q.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(G=!1),ne&&(te=!0),le&&(I=Ab({},zb),B=ub(null),!0===le.html&&(Ab(I,Fb),Ab(B,Bb)),!0===le.svg&&(Ab(I,Mb),Ab(B,Ub),Ab(B,Hb)),!0===le.svgFilters&&(Ab(I,jb),Ab(B,Ub),Ab(B,Hb)),!0===le.mathMl&&(Ab(I,Pb),Ab(B,qb),Ab(B,Hb))),kb(e,"ADD_TAGS")||(V.tagCheck=null),kb(e,"ADD_ATTR")||(V.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?V.tagCheck=e.ADD_TAGS:(I===z&&(I=Rb(I)),Ab(I,e.ADD_TAGS,De))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?V.attributeCheck=e.ADD_ATTR:(B===U&&(B=Rb(B)),Ab(B,e.ADD_ATTR,De))),e.ADD_URI_SAFE_ATTR&&Ab(pe,e.ADD_URI_SAFE_ATTR,De),e.FORBID_CONTENTS&&(ce===ue&&(ce=Rb(ce)),Ab(ce,e.FORBID_CONTENTS,De)),e.ADD_FORBID_CONTENTS&&(ce===ue&&(ce=Rb(ce)),Ab(ce,e.ADD_FORBID_CONTENTS,De)),ie&&(I["#text"]=!0),X&&Ab(I,["html","head","body"]),I.table&&(Ab(I,["tbody"]),delete H.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Nb('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Nb('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=e.TRUSTED_TYPES_POLICY,E=x.createHTML("")}else void 0===x&&(x=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return null}}(m,a)),null!==x&&"string"==typeof E&&(E=x.createHTML(""));lb&&lb(e),Se=e}},Oe=Ab({},[...Mb,...jb,...Lb]),Fe=Ab({},[...Pb,...Ib]),Me=function(e){gb(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){b(e)}},je=function(e,t){try{gb(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){gb(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ne)try{Me(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Le=function(e){let t=null,n=null;if(ee)e="<remove></remove>"+e;else{const t=wb(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ce&&ve===be&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=x?x.createHTML(e):e;if(ve===be)try{t=(new p).parseFromString(o,Ce)}catch(e){}if(!t||!t.documentElement){t=_.createDocument(ve,"template",null);try{t.documentElement.innerHTML=ye?E:o}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),ve===be?N.call(t,X?"html":"body")[0]:X?t.documentElement:a},Pe=function(e){return k.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Ie=function(e){return e instanceof f&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},ze=function(e){return"function"==typeof l&&e instanceof l};function Be(e,t,r){pb(e,e=>{e.call(n,t,r,Se)})}const Ue=function(e){let t=null;if(Be(S.beforeSanitizeElements,e,null),Ie(e))return Me(e),!0;const r=De(e.nodeName);if(Be(S.uponSanitizeElement,e,{tagName:r,allowedTags:I}),J&&e.hasChildNodes()&&!ze(e.firstElementChild)&&Cb(/<[/\w!]/g,e.innerHTML)&&Cb(/<[/\w!]/g,e.textContent))return Me(e),!0;if(e.nodeType===rv)return Me(e),!0;if(J&&e.nodeType===ov&&Cb(/<[/\w]/g,e.data))return Me(e),!0;if(!(V.tagCheck instanceof Function&&V.tagCheck(r))&&(!I[r]||H[r])){if(!H[r]&&He(r)){if(q.tagNameCheck instanceof RegExp&&Cb(q.tagNameCheck,r))return!1;if(q.tagNameCheck instanceof Function&&q.tagNameCheck(r))return!1}if(ie&&!ce[r]){const t=w(e)||e.parentNode,n=y(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=g(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,v(e))}}}return Me(e),!0}return e instanceof c&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:ve,tagName:"template"});const n=vb(e.tagName),r=vb(t.tagName);return!!we[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===be?"svg"===n:t.namespaceURI===he?"svg"===n&&("annotation-xml"===r||Ee[r]):Boolean(Oe[n]):e.namespaceURI===he?t.namespaceURI===be?"math"===n:t.namespaceURI===ge?"math"===n&&_e[r]:Boolean(Fe[n]):e.namespaceURI===be?!(t.namespaceURI===ge&&!_e[r])&&!(t.namespaceURI===he&&!Ee[r])&&!Fe[n]&&(ke[n]||!Oe[n]):!("application/xhtml+xml"!==Ce||!we[e.namespaceURI]))}(e)?(Me(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!Cb(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===nv&&(t=e.textContent,pb([A,T,R],e=>{t=xb(t,e," ")}),e.textContent!==t&&(gb(n.removed,{element:e.cloneNode()}),e.textContent=t)),Be(S.afterSanitizeElements,e,null),!1):(Me(e),!0)},qe=function(e,t,n){if(W[t])return!1;if(oe&&("id"===t||"name"===t)&&(n in r||n in Ae))return!1;if(G&&!W[t]&&Cb(O,t));else if($&&Cb(F,t));else if(V.attributeCheck instanceof Function&&V.attributeCheck(t,e));else if(!B[t]||W[t]){if(!(He(e)&&(q.tagNameCheck instanceof RegExp&&Cb(q.tagNameCheck,e)||q.tagNameCheck instanceof Function&&q.tagNameCheck(e))&&(q.attributeNameCheck instanceof RegExp&&Cb(q.attributeNameCheck,t)||q.attributeNameCheck instanceof Function&&q.attributeNameCheck(t,e))||"is"===t&&q.allowCustomizedBuiltInElements&&(q.tagNameCheck instanceof RegExp&&Cb(q.tagNameCheck,n)||q.tagNameCheck instanceof Function&&q.tagNameCheck(n))))return!1}else if(pe[t]);else if(Cb(P,xb(n,j,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Eb(n,"data:")||!de[e]){if(K&&!Cb(M,xb(n,j,"")));else if(n)return!1}else;return!0},He=function(e){return"annotation-xml"!==e&&wb(e,L)},We=function(e){Be(S.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Ie(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B,forceKeepAttr:void 0};let o=t.length;for(;o--;){const a=t[o],{name:i,namespaceURI:s,value:l}=a,c=De(i),u=l;let d="value"===i?u:_b(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,Be(S.uponSanitizeAttribute,e,r),d=r.attrValue,!ae||"id"!==c&&"name"!==c||(je(i,e),d="user-content-"+d),J&&Cb(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){je(i,e);continue}if("attributename"===c&&wb(d,"href")){je(i,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){je(i,e);continue}if(!Z&&Cb(/\/>/i,d)){je(i,e);continue}Y&&pb([A,T,R],e=>{d=xb(d,e," ")});const f=De(e.nodeName);if(qe(f,c,d)){if(x&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(s);else switch(m.getAttributeType(f,c)){case"TrustedHTML":d=x.createHTML(d);break;case"TrustedScriptURL":d=x.createScriptURL(d)}if(d!==u)try{s?e.setAttributeNS(s,i,d):e.setAttribute(i,d),Ie(e)?Me(e):hb(n.removed)}catch(t){je(i,e)}}else je(i,e)}Be(S.afterSanitizeAttributes,e,null)},Ve=function e(t){let n=null;const r=Pe(t);for(Be(S.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Be(S.uponSanitizeShadowNode,n,null),Ue(n),We(n),n.content instanceof i&&e(n.content);Be(S.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,s=null,c=null;if(ye=!e,ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ze(e)){if("function"!=typeof e.toString)throw Nb("toString is not a function");if("string"!=typeof(e=e.toString()))throw Nb("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Q||Re(t),n.removed=[],"string"==typeof e&&(se=!1),se){if(e.nodeName){const t=De(e.nodeName);if(!I[t]||H[t])throw Nb("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=Le("\x3c!----\x3e"),a=r.ownerDocument.importNode(e,!0),a.nodeType===tv&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!te&&!Y&&!X&&-1===e.indexOf("<"))return x&&re?x.createHTML(e):e;if(r=Le(e),!r)return te?null:re?E:""}r&&ee&&Me(r.firstChild);const u=Pe(se?e:r);for(;s=u.nextNode();)Ue(s),We(s),s.content instanceof i&&Ve(s.content);if(se)return e;if(te){if(ne)for(c=C.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(B.shadowroot||B.shadowrootmode)&&(c=D.call(o,c,!0)),c}let d=X?r.outerHTML:r.innerHTML;return X&&I["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Cb(Xb,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Y&&pb([A,T,R],e=>{d=xb(d,e," ")}),x&&re?x.createHTML(d):d},n.setConfig=function(){Re(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){Se=null,Q=!1},n.isValidAttribute=function(e,t,n){Se||Re({});const r=De(e),o=De(t);return qe(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&gb(S[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=mb(S[e],t);return-1===n?void 0:bb(S[e],n,1)[0]}return hb(S[e])},n.removeHooks=function(e){S[e]=[]},n.removeAllHooks=function(){S={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),lv={html:!1,linkify:!0,breaks:!0};function cv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}function uv(e,t){if(!e)return"";try{var n=function(e){return new nb(Object.assign(Object.assign({},lv),e||{}))}(t).render(e);return n?sv.sanitize(n):""}catch(e){return""}}function dv(t){var n=t.value,r=t.onChange,o=t.disabled,a=void 0!==o&&o,i=t.placeholder,s=t.defaultMode,l=void 0===s?"split":s,c=t.showToolbar,u=void 0===c||c,d=t.markdownOptions,f=t.previewClassName,p=rp(),m=e.useRef(null),h=v(e.useState(l),2),g=h[0],b=h[1],y=i||p("data.markdownPlaceholder"),w=e.useCallback(function(){var e=m.current;return!e||a?null:(e.focus(),e)},[a]),x=e.useCallback(function(e){var t,o,a=w();if(a){var i=null!==(t=a.selectionStart)&&void 0!==t?t:n.length,s=null!==(o=a.selectionEnd)&&void 0!==o?o:n.length,l=e(n.slice(i,s)),c=l.text,u=l.cursorOffset,d="".concat(n.slice(0,i)).concat(c).concat(n.slice(s));r(d),window.requestAnimationFrame(function(){var e=m.current;if(e){var t="number"==typeof u?i+u:i+c.length;e.focus(),e.setSelectionRange(t,t)}})}},[w,r,n]),E=e.useCallback(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text";x(function(r){var o=r||n,a="".concat(e).concat(o).concat(t);return{text:a,cursorOffset:r?a.length:e.length+n.length}})},[x]),_=e.useCallback(function(e,t){x(function(n){return{text:(n||t).split("\n").map(function(t){return"".concat(e).concat(t)}).join("\n")}})},[x]),k=e.useCallback(function(e,t){x(function(){return{text:e,cursorOffset:t}})},[x]),C=a&&"write"===g?"preview":g;return e.createElement("div",{className:"rounded-md border bg-background"},e.createElement("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b p-2"},e.createElement("div",{className:"flex flex-wrap gap-1"},e.createElement("button",{type:"button",className:cv("rounded border px-2 py-1 text-sm font-medium","write"===C&&"bg-muted"),disabled:a,onClick:function(){return b("write")}},p("data.markdownWrite")),e.createElement("button",{type:"button",className:cv("rounded border px-2 py-1 text-sm font-medium","preview"===C&&"bg-muted"),onClick:function(){return b("preview")}},p("data.markdownPreview")),e.createElement("button",{type:"button",className:cv("rounded border px-2 py-1 text-sm font-medium","split"===C&&"bg-muted"),disabled:a,onClick:function(){return b("split")}},p("data.markdownSplit"))),u&&e.createElement("div",{className:"flex flex-wrap gap-1"},e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm font-semibold disabled:cursor-not-allowed disabled:opacity-50",disabled:a||"preview"===C,onMouseDown:function(e){e.preventDefault(),E("**")}},"B"),e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm italic disabled:cursor-not-allowed disabled:opacity-50",disabled:a||"preview"===C,onMouseDown:function(e){e.preventDefault(),E("*")}},"I"),e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm disabled:cursor-not-allowed disabled:opacity-50",disabled:a||"preview"===C,onMouseDown:function(e){e.preventDefault(),_("- ","list item")}},"UL"),e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm disabled:cursor-not-allowed disabled:opacity-50",disabled:a||"preview"===C,onMouseDown:function(e){e.preventDefault(),_("1. ","list item")}},"OL"),e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm disabled:cursor-not-allowed disabled:opacity-50",disabled:a||"preview"===C,onMouseDown:function(e){e.preventDefault(),_("> ","quote")}},p("data.markdownQuote")),e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm disabled:cursor-not-allowed disabled:opacity-50",disabled:a||"preview"===C,onMouseDown:function(e){e.preventDefault(),E("[","](https://example.com)","link text")}},p("data.markdownLink")),e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm disabled:cursor-not-allowed disabled:opacity-50",disabled:a||"preview"===C,onMouseDown:function(e){e.preventDefault(),k("```\ncode\n```",8)}},p("data.markdownCode")),e.createElement("button",{type:"button",className:"rounded border px-2 py-1 text-sm disabled:cursor-not-allowed disabled:opacity-50",disabled:a||"preview"===C,onMouseDown:function(e){e.preventDefault(),r(""),w()}},p("data.markdownClear")))),e.createElement("div",{className:cv("gap-0","split"===C&&"grid md:grid-cols-2")},"preview"!==C&&e.createElement("textarea",{ref:m,value:n||"",disabled:a,onChange:function(e){return r(e.target.value)},className:"min-h-[220px] w-full resize-y border-0 bg-transparent px-3 py-2 font-mono text-sm leading-6 outline-none",placeholder:y}),"write"!==C&&e.createElement("div",{className:cv("min-h-[220px] border-t px-3 py-2 md:border-t-0","split"===C&&"md:border-l")},e.createElement(fv,{value:n||"",markdownOptions:d,className:f}))))}function fv(t){var n=t.value,r=t.markdownOptions,o=t.className,a=t.emptyText,i=rp();if(!n)return e.createElement(e.Fragment,null,a||e.createElement("span",{className:"text-muted-foreground"},i("data.markdownEmpty")));var s=uv(n,r);return s?e.createElement("div",{className:cv("max-w-none break-words text-sm leading-7 text-foreground","[&_h1]:mb-4 [&_h1]:text-3xl [&_h1]:font-bold [&_h1]:leading-tight","[&_h2]:mb-3 [&_h2]:text-2xl [&_h2]:font-semibold [&_h2]:leading-tight","[&_h3]:mb-3 [&_h3]:text-xl [&_h3]:font-semibold","[&_h4]:mb-2 [&_h4]:text-lg [&_h4]:font-semibold","[&_h5]:mb-2 [&_h5]:text-base [&_h5]:font-semibold","[&_h6]:mb-2 [&_h6]:text-sm [&_h6]:font-semibold","[&_p]:my-3 [&_p]:leading-7","[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2","[&_strong]:font-semibold","[&_em]:italic","[&_blockquote]:my-4 [&_blockquote]:border-l-4 [&_blockquote]:border-border [&_blockquote]:pl-4 [&_blockquote]:text-muted-foreground","[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-6","[&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-6","[&_li]:my-1","[&_hr]:my-4 [&_hr]:border-border","[&_code]:rounded [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.9em]","[&_pre]:my-4 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-muted [&_pre]:p-3","[&_pre_code]:bg-transparent [&_pre_code]:p-0","[&_table]:my-4 [&_table]:w-full [&_table]:border-collapse","[&_th]:border [&_th]:border-border [&_th]:bg-muted [&_th]:px-3 [&_th]:py-2 [&_th]:text-left [&_th]:font-semibold","[&_td]:border [&_td]:border-border [&_td]:px-3 [&_td]:py-2",o),dangerouslySetInnerHTML:{__html:s}}):e.createElement("span",{className:"text-muted-foreground"},n)}function pv(e){return Array.isArray(null==e?void 0:e.enum)&&e.enum.length>0}function mv(e){return null==e?"":String(e)}function hv(e,t){var n,r=mv(t);return r?(null===(n=e.enumLabels)||void 0===n?void 0:n[r])||r:""}function gv(e,t){var n=(e.enum||[]).map(function(t){return{value:t,valueKey:mv(t),label:hv(e,t)}}),r=mv(t);return r?n.some(function(e){return e.valueKey===r})?n:[].concat(y(n),[{value:"number"==typeof t||"string"==typeof t?t:r,valueKey:r,label:r}]):n}var bv=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("div",{className:"relative w-full overflow-x-auto"},c.createElement("table",Object.assign({ref:t,className:tt("w-full min-w-max caption-bottom text-sm",n)},r)))});bv.displayName="Table";var vv=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("thead",Object.assign({ref:t,className:tt("[&_tr]:border-b",n)},r))});vv.displayName="TableHeader";var yv=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("tbody",Object.assign({ref:t,className:tt("[&_tr:last-child]:border-0",n)},r))});yv.displayName="TableBody";var wv=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("tfoot",Object.assign({ref:t,className:tt("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",n)},r))});wv.displayName="TableFooter";var xv=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("tr",Object.assign({ref:t,className:tt("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",n)},r))});xv.displayName="TableRow";var Ev=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("th",Object.assign({ref:t,className:tt("h-12 px-4 text-left align-middle font-medium text-muted-foreground whitespace-nowrap [&:has([role=checkbox])]:pr-0",n)},r))});Ev.displayName="TableHead";var _v=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("td",Object.assign({ref:t,className:tt("p-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",n)},r))});_v.displayName="TableCell";var kv=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement("caption",Object.assign({ref:t,className:tt("mt-4 text-sm text-muted-foreground",n)},r))});kv.displayName="TableCaption";var Cv=gt("inline-flex items-center rounded-full border px-3 py-1 text-xs font-bold transition-all duration-300",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-[0_2px_8px_-1px_rgba(93,112,82,0.15)] hover:scale-105",secondary:"border-transparent bg-secondary text-secondary-foreground shadow-[0_2px_8px_-1px_rgba(193,140,93,0.15)] hover:scale-105",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-[0_2px_8px_-1px_rgba(168,84,72,0.15)] hover:scale-105",outline:"text-foreground border-border"}},defaultVariants:{variant:"default"}});function Nv(e){var t=e.className,n=e.variant,r=_(e,["className","variant"]);return c.createElement("div",Object.assign({className:tt(Cv({variant:n}),t)},r))}function Dv(e,[t,n]){return Math.min(n,Math.max(t,e))}function Sv(e){const n=Av(e),r=c.forwardRef((e,r)=>{const{children:o,...a}=e,i=c.Children.toArray(o),s=i.find(Rv);if(s){const e=s.props.children,o=i.map(t=>t===s?c.Children.count(e)>1?c.Children.only(null):c.isValidElement(e)?e.props.children:null:t);return t.jsx(n,{...a,ref:r,children:c.isValidElement(e)?c.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})});return r.displayName=`${e}.Slot`,r}function Av(e){const t=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==c.Fragment&&(o.ref=t?ot(t,e):e),c.cloneElement(n,o)}return c.Children.count(n)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Tv=Symbol("radix.slottable");function Rv(e){return c.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Tv}var Ov=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});c.forwardRef((e,n)=>t.jsx(It.span,{...e,ref:n,style:{...Ov,...e.style}})).displayName="VisuallyHidden";var Fv=[" ","Enter","ArrowUp","ArrowDown"],Mv=[" ","Enter"],jv="Select",[Lv,Pv,Iv]=function(n){const r=n+"CollectionProvider",[o,a]=Dt(r),[i,s]=o(r,{collectionRef:{current:null},itemMap:new Map}),l=n=>{const{scope:r,children:o}=n,a=e.useRef(null),s=e.useRef(new Map).current;return t.jsx(i,{scope:r,itemMap:s,collectionRef:a,children:o})};l.displayName=r;const c=n+"CollectionSlot",u=Sv(c),d=e.forwardRef((e,n)=>{const{scope:r,children:o}=e,a=at(n,s(c,r).collectionRef);return t.jsx(u,{ref:a,children:o})});d.displayName=c;const f=n+"CollectionItemSlot",p="data-radix-collection-item",m=Sv(f),h=e.forwardRef((n,r)=>{const{scope:o,children:a,...i}=n,l=e.useRef(null),c=at(r,l),u=s(f,o);return e.useEffect(()=>(u.itemMap.set(l,{ref:l,...i}),()=>{u.itemMap.delete(l)})),t.jsx(m,{[p]:"",ref:c,children:a})});return h.displayName=f,[{Provider:l,Slot:d,ItemSlot:h},function(t){const r=s(n+"CollectionConsumer",t);return e.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])},a]}(jv),[zv,Bv]=Dt(jv,[Iv,Va]),Uv=Va(),[qv,Hv]=zv(jv),[Wv,Vv]=zv(jv),$v=e=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:a,onOpenChange:i,value:s,defaultValue:l,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:m,required:h,form:g}=e,b=Uv(n),[v,y]=c.useState(null),[w,x]=c.useState(null),[E,_]=c.useState(!1),k=ps(d),[C,N]=Mt({prop:o,defaultProp:a??!1,onChange:i,caller:jv}),[D,S]=Mt({prop:s,defaultProp:l,onChange:u,caller:jv}),A=c.useRef(null),T=!v||(g||!!v.closest("form")),[R,O]=c.useState(new Set),F=Array.from(R).map(e=>e.props.value).join(";");return t.jsx(si,{...b,children:t.jsxs(qv,{required:h,scope:n,trigger:v,onTriggerChange:y,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:E,onValueNodeHasChildrenChange:_,contentId:Ot(),value:D,onValueChange:S,open:C,onOpenChange:N,dir:k,triggerPointerDownPosRef:A,disabled:m,children:[t.jsx(Lv.Provider,{scope:n,children:t.jsx(Wv,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(e=>{O(t=>new Set(t).add(e))},[]),onNativeOptionRemove:c.useCallback(e=>{O(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:r})}),T?t.jsxs(Oy,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:D,onChange:e=>S(e.target.value),disabled:m,form:g,children:[void 0===D?t.jsx("option",{value:""}):null,Array.from(R)]},F):null]})})};$v.displayName=jv;var Gv="SelectTrigger",Kv=c.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:o=!1,...a}=e,i=Uv(r),s=Hv(Gv,r),l=s.disabled||o,u=at(n,s.onTriggerChange),d=Pv(r),f=c.useRef("touch"),[p,m,h]=My(e=>{const t=d().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=jy(t,e,n);void 0!==r&&s.onValueChange(r.value)}),g=e=>{l||(s.onOpenChange(!0),h()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return t.jsx(li,{asChild:!0,...i,children:t.jsx(It.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Fy(s.value)?"":void 0,...a,ref:u,onClick:Nt(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==f.current&&g(e)}),onPointerDown:Nt(a.onPointerDown,e=>{f.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:Nt(a.onKeyDown,e=>{const t=""!==p.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),t&&" "===e.key||Fv.includes(e.key)&&(g(),e.preventDefault())})})})});Kv.displayName=Gv;var Zv="SelectValue",Yv=c.forwardRef((e,n)=>{const{__scopeSelect:r,className:o,style:a,children:i,placeholder:s="",...l}=e,c=Hv(Zv,r),{onValueNodeHasChildrenChange:u}=c,d=void 0!==i,f=at(n,c.onValueNodeChange);return At(()=>{u(d)},[u,d]),t.jsx(It.span,{...l,ref:f,style:{pointerEvents:"none"},children:Fy(c.value)?t.jsx(t.Fragment,{children:s}):i})});Yv.displayName=Zv;var Jv=c.forwardRef((e,n)=>{const{__scopeSelect:r,children:o,...a}=e;return t.jsx(It.span,{"aria-hidden":!0,...a,ref:n,children:o||"▼"})});Jv.displayName="SelectIcon";var Xv=e=>t.jsx(an,{asChild:!0,...e});Xv.displayName="SelectPortal";var Qv="SelectContent",ey=c.forwardRef((e,n)=>{const r=Hv(Qv,e.__scopeSelect),[o,a]=c.useState();if(At(()=>{a(new DocumentFragment)},[]),!r.open){const n=o;return n?u.createPortal(t.jsx(ny,{scope:e.__scopeSelect,children:t.jsx(Lv.Slot,{scope:e.__scopeSelect,children:t.jsx("div",{children:e.children})})}),n):null}return t.jsx(ay,{...e,ref:n})});ey.displayName=Qv;var ty=10,[ny,ry]=zv(Qv),oy=Sv("SelectContent.RemoveScroll"),ay=c.forwardRef((e,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:b,avoidCollisions:v,...y}=e,w=Hv(Qv,r),[x,E]=c.useState(null),[_,k]=c.useState(null),C=at(n,e=>E(e)),[N,D]=c.useState(null),[S,A]=c.useState(null),T=Pv(r),[R,O]=c.useState(!1),F=c.useRef(!1);c.useEffect(()=>{if(x)return or(x)},[x]),un();const M=c.useCallback(e=>{const[t,...n]=T().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&_&&(_.scrollTop=0),n===r&&_&&(_.scrollTop=_.scrollHeight),n?.focus(),document.activeElement!==o)return}},[T,_]),j=c.useCallback(()=>M([N,x]),[M,N,x]);c.useEffect(()=>{R&&j()},[R,j]);const{onOpenChange:L,triggerPointerDownPosRef:P}=w;c.useEffect(()=>{if(x){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(P.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),P.current=null};return null!==P.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[x,L,P]),c.useEffect(()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[L]);const[I,z]=My(e=>{const t=T().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=jy(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),B=c.useCallback((e,t,n)=>{const r=!F.current&&!n;(void 0!==w.value&&w.value===t||r)&&(D(e),r&&(F.current=!0))},[w.value]),U=c.useCallback(()=>x?.focus(),[x]),q=c.useCallback((e,t,n)=>{const r=!F.current&&!n;(void 0!==w.value&&w.value===t||r)&&A(e)},[w.value]),H="popper"===o?sy:iy,W=H===sy?{side:l,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:b,avoidCollisions:v}:{};return t.jsx(ny,{scope:r,content:x,viewport:_,onViewportChange:k,itemRefCallback:B,selectedItem:N,onItemLeave:U,itemTextRefCallback:q,focusSelectedItem:j,selectedItemText:S,position:o,isPositioned:R,searchRef:I,children:t.jsx(Jn,{as:oy,allowPinchZoom:!0,children:t.jsx(Xt,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Nt(a,e=>{w.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:t.jsx($t,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:t.jsx(H,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault(),...y,...W,onPlaced:()=>O(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Nt(y.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=T().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})});ay.displayName="SelectContentImpl";var iy=c.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:o,...a}=e,i=Hv(Qv,r),s=ry(Qv,r),[l,u]=c.useState(null),[d,f]=c.useState(null),p=at(n,e=>f(e)),m=Pv(r),h=c.useRef(!1),g=c.useRef(!0),{viewport:b,selectedItem:v,selectedItemText:y,focusSelectedItem:w}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&d&&b&&v&&y){const e=i.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if("rtl"!==i.dir){const o=r.left-t.left,a=n.left-o,i=e.left-a,s=e.width+i,c=Math.max(s,t.width),u=window.innerWidth-ty,d=Dv(a,[ty,Math.max(ty,u-c)]);l.style.minWidth=s+"px",l.style.left=d+"px"}else{const o=t.right-r.right,a=window.innerWidth-n.right-o,i=window.innerWidth-e.right-a,s=e.width+i,c=Math.max(s,t.width),u=window.innerWidth-ty,d=Dv(a,[ty,Math.max(ty,u-c)]);l.style.minWidth=s+"px",l.style.right=d+"px"}const a=m(),s=window.innerHeight-2*ty,c=b.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),w=f+p+c+parseInt(u.paddingBottom,10)+g,x=Math.min(5*v.offsetHeight,w),E=window.getComputedStyle(b),_=parseInt(E.paddingTop,10),k=parseInt(E.paddingBottom,10),C=e.top+e.height/2-ty,N=s-C,D=v.offsetHeight/2,S=f+p+(v.offsetTop+D),A=w-S;if(S<=C){const e=a.length>0&&v===a[a.length-1].ref.current;l.style.bottom="0px";const t=d.clientHeight-b.offsetTop-b.offsetHeight,n=S+Math.max(N,D+(e?k:0)+t+g);l.style.height=n+"px"}else{const e=a.length>0&&v===a[0].ref.current;l.style.top="0px";const t=Math.max(C,f+b.offsetTop+(e?_:0)+D)+A;l.style.height=t+"px",b.scrollTop=S-C+b.offsetTop}l.style.margin=`${ty}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=s+"px",o?.(),requestAnimationFrame(()=>h.current=!0)}},[m,i.trigger,i.valueNode,l,d,b,v,y,i.dir,o]);At(()=>x(),[x]);const[E,_]=c.useState();At(()=>{d&&_(window.getComputedStyle(d).zIndex)},[d]);const k=c.useCallback(e=>{e&&!0===g.current&&(x(),w?.(),g.current=!1)},[x,w]);return t.jsx(ly,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:k,children:t.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:t.jsx(It.div,{...a,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});iy.displayName="SelectItemAlignedPosition";var sy=c.forwardRef((e,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:a=ty,...i}=e,s=Uv(r);return t.jsx(ci,{...s,...i,ref:n,align:o,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});sy.displayName="SelectPopperPosition";var[ly,cy]=zv(Qv,{}),uy="SelectViewport",dy=c.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:o,...a}=e,i=ry(uy,r),s=cy(uy,r),l=at(n,i.onViewportChange),u=c.useRef(0);return t.jsxs(t.Fragment,{children:[t.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),t.jsx(Lv.Slot,{scope:r,children:t.jsx(It.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Nt(a.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){const e=Math.abs(u.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*ty,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}u.current=t.scrollTop})})})]})});dy.displayName=uy;var fy="SelectGroup",[py,my]=zv(fy);c.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,a=Ot();return t.jsx(py,{scope:r,id:a,children:t.jsx(It.div,{role:"group","aria-labelledby":a,...o,ref:n})})}).displayName=fy;var hy="SelectLabel",gy=c.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,a=my(hy,r);return t.jsx(It.div,{id:a.id,...o,ref:n})});gy.displayName=hy;var by="SelectItem",[vy,yy]=zv(by),wy=c.forwardRef((e,n)=>{const{__scopeSelect:r,value:o,disabled:a=!1,textValue:i,...s}=e,l=Hv(by,r),u=ry(by,r),d=l.value===o,[f,p]=c.useState(i??""),[m,h]=c.useState(!1),g=at(n,e=>u.itemRefCallback?.(e,o,a)),b=Ot(),v=c.useRef("touch"),y=()=>{a||(l.onValueChange(o),l.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return t.jsx(vy,{scope:r,value:o,disabled:a,textId:b,isSelected:d,onItemTextChange:c.useCallback(e=>{p(t=>t||(e?.textContent??"").trim())},[]),children:t.jsx(Lv.ItemSlot,{scope:r,value:o,disabled:a,textValue:f,children:t.jsx(It.div,{role:"option","aria-labelledby":b,"data-highlighted":m?"":void 0,"aria-selected":d&&m,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:g,onFocus:Nt(s.onFocus,()=>h(!0)),onBlur:Nt(s.onBlur,()=>h(!1)),onClick:Nt(s.onClick,()=>{"mouse"!==v.current&&y()}),onPointerUp:Nt(s.onPointerUp,()=>{"mouse"===v.current&&y()}),onPointerDown:Nt(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:Nt(s.onPointerMove,e=>{v.current=e.pointerType,a?u.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Nt(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:Nt(s.onKeyDown,e=>{""!==u.searchRef?.current&&" "===e.key||(Mv.includes(e.key)&&y()," "===e.key&&e.preventDefault())})})})})});wy.displayName=by;var xy="SelectItemText",Ey=c.forwardRef((e,n)=>{const{__scopeSelect:r,className:o,style:a,...i}=e,s=Hv(xy,r),l=ry(xy,r),d=yy(xy,r),f=Vv(xy,r),[p,m]=c.useState(null),h=at(n,e=>m(e),d.onItemTextChange,e=>l.itemTextRefCallback?.(e,d.value,d.disabled)),g=p?.textContent,b=c.useMemo(()=>t.jsx("option",{value:d.value,disabled:d.disabled,children:g},d.value),[d.disabled,d.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=f;return At(()=>(v(b),()=>y(b)),[v,y,b]),t.jsxs(t.Fragment,{children:[t.jsx(It.span,{id:d.textId,...i,ref:h}),d.isSelected&&s.valueNode&&!s.valueNodeHasChildren?u.createPortal(i.children,s.valueNode):null]})});Ey.displayName=xy;var _y="SelectItemIndicator",ky=c.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e;return yy(_y,r).isSelected?t.jsx(It.span,{"aria-hidden":!0,...o,ref:n}):null});ky.displayName=_y;var Cy="SelectScrollUpButton",Ny=c.forwardRef((e,n)=>{const r=ry(Cy,e.__scopeSelect),o=cy(Cy,e.__scopeSelect),[a,i]=c.useState(!1),s=at(n,o.onScrollButtonChange);return At(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;i(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?t.jsx(Ay,{...e,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Ny.displayName=Cy;var Dy="SelectScrollDownButton",Sy=c.forwardRef((e,n)=>{const r=ry(Dy,e.__scopeSelect),o=cy(Dy,e.__scopeSelect),[a,i]=c.useState(!1),s=at(n,o.onScrollButtonChange);return At(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?t.jsx(Ay,{...e,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Sy.displayName=Dy;var Ay=c.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:o,...a}=e,i=ry("SelectScrollButton",r),s=c.useRef(null),l=Pv(r),u=c.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),At(()=>{const e=l().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[l]),t.jsx(It.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:Nt(a.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(o,50))}),onPointerMove:Nt(a.onPointerMove,()=>{i.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(o,50))}),onPointerLeave:Nt(a.onPointerLeave,()=>{u()})})}),Ty=c.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e;return t.jsx(It.div,{"aria-hidden":!0,...o,ref:n})});Ty.displayName="SelectSeparator";var Ry="SelectArrow";c.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,a=Uv(r),i=Hv(Ry,r),s=ry(Ry,r);return i.open&&"popper"===s.position?t.jsx(ui,{...a,...o,ref:n}):null}).displayName=Ry;var Oy=c.forwardRef(({__scopeSelect:e,value:n,...r},o)=>{const a=c.useRef(null),i=at(o,a),s=lp(n);return c.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(s!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[s,n]),t.jsx(It.select,{...r,style:{...Ov,...r.style},ref:i,defaultValue:n})});function Fy(e){return""===e||void 0===e}function My(e){const t=Bt(e),n=c.useRef(""),r=c.useRef(0),o=c.useCallback(e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),a=c.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function jy(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=(i=e,s=Math.max(o,0),i.map((e,t)=>i[(s+t)%i.length]));var i,s;1===r.length&&(a=a.filter(e=>e!==n));const l=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}Oy.displayName="SelectBubbleInput";var Ly=Kv,Py=Jv,Iy=Xv,zy=ey,By=dy,Uy=gy,qy=wy,Hy=Ey,Wy=ky,Vy=Ny,$y=Sy,Gy=Ty,Ky=$v,Zy=Yv,Yy=c.forwardRef(function(e,t){var n=e.className,r=e.children,o=_(e,["className","children"]);return c.createElement(Ly,Object.assign({ref:t,className:tt("flex h-12 w-full items-center justify-between rounded-full border border-input bg-background px-6 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-[hsl(var(--primary))]/30 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-300 [&>span]:line-clamp-1",n)},o),r,c.createElement(Py,{asChild:!0},c.createElement(A,{className:"h-4 w-4 opacity-50"})))});Yy.displayName=Ly.displayName;var Jy=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement(Vy,Object.assign({ref:t,className:tt("flex cursor-default items-center justify-center py-1",n)},r),c.createElement(O,{className:"h-4 w-4"}))});Jy.displayName=Vy.displayName;var Xy=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement($y,Object.assign({ref:t,className:tt("flex cursor-default items-center justify-center py-1",n)},r),c.createElement(A,{className:"h-4 w-4"}))});Xy.displayName=$y.displayName;var Qy=c.forwardRef(function(e,t){var n=e.className,r=e.children,o=e.position,a=void 0===o?"popper":o,i=_(e,["className","children","position"]);return c.createElement(Iy,null,c.createElement(zy,Object.assign({ref:t,className:tt("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-2xl border bg-popover text-popover-foreground shadow-[0_10px_40px_-10px_rgba(93,112,82,0.2)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:a},i),c.createElement(Jy,null),c.createElement(By,{className:tt("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},r),c.createElement(Xy,null)))});Qy.displayName=zy.displayName;var ew=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement(Uy,Object.assign({ref:t,className:tt("py-1.5 pl-8 pr-2 text-sm font-semibold",n)},r))});ew.displayName=Uy.displayName;var tw=c.forwardRef(function(e,t){var n=e.className,r=e.children,o=_(e,["className","children"]);return c.createElement(qy,Object.assign({ref:t,className:tt("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n)},o),c.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},c.createElement(Wy,null,c.createElement(S,{className:"h-4 w-4"}))),c.createElement(Hy,null,r))});tw.displayName=qy.displayName;var nw=c.forwardRef(function(e,t){var n=e.className,r=_(e,["className"]);return c.createElement(Gy,Object.assign({ref:t,className:tt("-mx-1 my-1 h-px bg-muted",n)},r))});function rw(){return"".concat(Date.now(),"_").concat(Math.random().toString(16).slice(2))}function ow(e){var t,n=(null==e?void 0:e.type)||"string";return(null===(t=null==e?void 0:e.enum)||void 0===t?void 0:t.length)?[{value:"eq",label:"等于"},{value:"neq",label:"不等于"},{value:"in",label:"属于(多个)"},{value:"isNull",label:"为空(NULL)"}]:"integer"===n||"float"===n?[{value:"eq",label:"等于"},{value:"neq",label:"不等于"},{value:"gt",label:"大于"},{value:"gte",label:"大于等于"},{value:"lt",label:"小于"},{value:"lte",label:"小于等于"},{value:"in",label:"属于(多个)"},{value:"isNull",label:"为空(NULL)"}]:"boolean"===n?[{value:"eq",label:"等于"},{value:"neq",label:"不等于"},{value:"isNull",label:"为空(NULL)"}]:"date"===n||"datetime"===n?[{value:"eq",label:"等于"},{value:"neq",label:"不等于"},{value:"gt",label:"晚于/大于"},{value:"gte",label:"晚于等于/大于等于"},{value:"lt",label:"早于/小于"},{value:"lte",label:"早于等于/小于等于"},{value:"isNull",label:"为空(NULL)"}]:[{value:"contains",label:"包含"},{value:"startsWith",label:"开头是"},{value:"endsWith",label:"结尾是"},{value:"eq",label:"等于"},{value:"neq",label:"不等于"},{value:"in",label:"属于(多个)"},{value:"isNull",label:"为空(NULL)"}]}function aw(t){var n,r,o=e.useMemo(function(){var e=[];e.push.apply(e,y([{column:"id",label:"ID",type:"id"},{column:"created_at",label:"创建时间",type:"datetime"},{column:"updated_at",label:"更新时间",type:"datetime"}]));var n,r=m(t.fields||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;if((null==o?void 0:o.name)&&("json"!==o.type&&"jsonb"!==o.type))if("relation"===o.type&&o.relation){var a=o.relation.foreignKey||"".concat(o.relation.target,"_id");e.push({column:a,label:"".concat(o.comment||o.name,"(关联)"),type:"relation"})}else e.push({column:o.name,label:o.comment||o.name,type:o.type,enum:pv(o)?y(o.enum||[]):void 0,enumLabels:o.enumLabels})}}catch(e){r.e(e)}finally{r.f()}var i=new Set;return e.filter(function(e){return!i.has(e.column)&&(i.add(e.column),!0)})},[t.fields]),a=e.useMemo(function(){return new Map(o.map(function(e){return[e.column,e]}))},[o]),i=e.useMemo(function(){return new Map(o.map(function(e){return[e.column,e.type]}))},[o]),s=v(e.useState([]),2),l=s[0],c=s[1];e.useEffect(function(){c(function(e,t){return(e||[]).map(function(e){if(t.get(e.column),"is"===e.operator&&(null===e.value||"null"===e.value))return{id:rw(),column:e.column,operator:"isNull",value:""};if(("ilike"===e.operator||"like"===e.operator)&&"string"==typeof e.value){var n=e.value;if(n.startsWith("%")&&n.endsWith("%")&&n.length>=2)return{id:rw(),column:e.column,operator:"contains",value:n.slice(1,-1)};if(n.endsWith("%"))return{id:rw(),column:e.column,operator:"startsWith",value:n.slice(0,-1)};if(n.startsWith("%"))return{id:rw(),column:e.column,operator:"endsWith",value:n.slice(1)}}if("in"===e.operator){var r=Array.isArray(e.value)?e.value:[];return{id:rw(),column:e.column,operator:"in",value:r.join(",")}}return{id:rw(),column:e.column,operator:["eq","neq","gt","gte","lt","lte"].includes(e.operator)?e.operator:"eq",value:void 0===e.value||null===e.value?"":String(e.value)}})}(t.value||[],i))},[JSON.stringify(t.value),o.length]);var u=function(e,t){c(function(n){return n.map(function(n){var r;if(n.id!==e)return n;var o=Object.assign(Object.assign({},n),t);if(t.column&&t.column!==n.column){var i=ow(a.get(t.column));o.operator=(null===(r=i[0])||void 0===r?void 0:r.value)||"eq",o.value=""}return t.operator&&"isNull"===t.operator&&(o.value=""),o})})};return e.createElement("div",{className:"space-y-3"},e.createElement("div",{className:"flex items-center justify-between gap-3"},e.createElement(Hc,{className:"text-base font-medium flex items-center gap-2"},e.createElement(B,{className:"h-4 w-4"}),"动态筛选"),e.createElement("div",{className:"flex items-center gap-2"},(null===(n=t.value)||void 0===n?void 0:n.length)>0&&e.createElement(Nv,{variant:"secondary"},"已应用 ",t.value.length," 条"),e.createElement(vt,{type:"button",variant:"outline",size:"sm",onClick:function(){var e=o[0];if(e){var t=ow(e);c(function(n){var r;return[].concat(y(n),[{id:rw(),column:e.column,operator:(null===(r=t[0])||void 0===r?void 0:r.value)||"eq",value:""}])})}}},e.createElement(Z,{className:"h-4 w-4 mr-1"}),"添加条件"))),0===l.length?e.createElement("div",{className:"text-sm text-muted-foreground border rounded-lg p-3 bg-muted/20"},"暂无筛选条件(可添加条件后点击“应用”)"):e.createElement("div",{className:"space-y-2"},l.map(function(t){var n,r,i=a.get(t.column),s=(null==i?void 0:i.type)||"string",l=ow(i),d="isNull"!==t.operator,f=(null===(n=null==i?void 0:i.enum)||void 0===n?void 0:n.length)&&"in"!==t.operator?gv({enum:i.enum,enumLabels:i.enumLabels},t.value):[];return e.createElement("div",{key:t.id,className:"grid grid-cols-12 gap-2 items-center"},e.createElement("div",{className:"col-span-5"},e.createElement(Ky,{value:t.column,onValueChange:function(e){return u(t.id,{column:e})}},e.createElement(Yy,{className:"h-10"},e.createElement(Zy,{placeholder:"字段"})),e.createElement(Qy,null,o.map(function(t){return e.createElement(tw,{key:t.column,value:t.column},t.label," (",t.column,")")})))),e.createElement("div",{className:"col-span-3"},e.createElement(Ky,{value:t.operator,onValueChange:function(e){return u(t.id,{operator:e})}},e.createElement(Yy,{className:"h-10"},e.createElement(Zy,{placeholder:"操作符"})),e.createElement(Qy,null,l.map(function(t){return e.createElement(tw,{key:t.value,value:t.value},t.label)})))),e.createElement("div",{className:"col-span-3"},d?(null===(r=null==i?void 0:i.enum)||void 0===r?void 0:r.length)&&"in"!==t.operator?e.createElement(Ky,{value:t.value,onValueChange:function(e){return u(t.id,{value:e})}},e.createElement(Yy,{className:"h-10"},e.createElement(Zy,{placeholder:"值"})),e.createElement(Qy,null,f.map(function(t){return e.createElement(tw,{key:t.valueKey,value:t.valueKey},t.label)}))):"boolean"===s?e.createElement(Ky,{value:t.value,onValueChange:function(e){return u(t.id,{value:e})}},e.createElement(Yy,{className:"h-10"},e.createElement(Zy,{placeholder:"值"})),e.createElement(Qy,null,e.createElement(tw,{value:"true"},"true"),e.createElement(tw,{value:"false"},"false"))):e.createElement(yt,{className:"h-10",placeholder:"in"===t.operator?"多个值用逗号分隔":"值",type:"integer"===s||"float"===s?"number":"date"===s?"date":"datetime"===s?"datetime-local":"text",value:t.value,onChange:function(e){return u(t.id,{value:e.target.value})}}):e.createElement("div",{className:"h-10 flex items-center text-sm text-muted-foreground"},"无需填写")),e.createElement("div",{className:"col-span-1 flex justify-end"},e.createElement(vt,{type:"button",variant:"ghost",size:"sm",className:"h-9 w-9 p-0",onClick:function(){return e=t.id,void c(function(t){return t.filter(function(t){return t.id!==e})});var e}},e.createElement(ae,{className:"h-4 w-4"}))))})),e.createElement("div",{className:"flex items-center justify-end gap-2"},e.createElement(vt,{type:"button",variant:"outline",onClick:function(){c([]),t.onChange([])},disabled:0===l.length&&0===((null===(r=t.value)||void 0===r?void 0:r.length)||0)},"清空"),e.createElement(vt,{type:"button",onClick:function(){var e=function(e,t){var n,r,o=[],a=m(e);try{for(a.s();!(r=a.n()).done;){var i=r.value,s=t.get(i.column);if(s&&i.operator)if("isNull"!==i.operator){var l=null!==(n=i.value)&&void 0!==n?n:"",c=String(l).trim();if(c)if("contains"!==i.operator)if("startsWith"!==i.operator)if("endsWith"!==i.operator)if("in"!==i.operator)o.push({column:s.column,operator:i.operator,value:c});else{var u=c.split(",").map(function(e){return e.trim()}).filter(Boolean);o.push({column:s.column,operator:"in",value:u})}else o.push({column:s.column,operator:"ilike",value:"%".concat(c)});else o.push({column:s.column,operator:"ilike",value:"".concat(c,"%")});else o.push({column:s.column,operator:"ilike",value:"%".concat(c,"%")})}else o.push({column:s.column,operator:"is",value:null})}}catch(e){a.e(e)}finally{a.f()}return o}(l,a);t.onChange(e)},disabled:0===l.length},"应用")))}function iw(){var e=Of();if(e)return e;try{return localStorage.getItem("cms_session_id")||void 0}catch(e){return}}function sw(e,t){return e instanceof Error&&e.message?e.message:t}function lw(t){var n=t.model,r=rp(),o=n,a=v(e.useState([]),2),i=a[0],l=a[1],c=v(e.useState(!1),2),u=c[0],d=c[1],f=v(e.useState(!1),2),m=f[0],b=f[1],y=v(e.useState(!1),2),w=y[0],x=y[1],E=v(e.useState(null),2),_=E[0],k=E[1],C=v(e.useState({}),2),N=C[0],D=C[1],S=v(e.useState(1),2),A=S[0],O=S[1],F=v(e.useState(10),2),M=F[0];F[1];var L=v(e.useState(0),2),P=L[0],I=L[1],z=v(e.useState(""),2),U=z[0],q=z[1],H=v(e.useState(!1),2),V=H[0],$=H[1],G=v(e.useState(null),2),K=G[0],J=G[1],X=v(e.useState({}),2),ee=X[0],ne=X[1],re=v(e.useState([]),2),oe=re[0],ae=re[1],ie=e.useMemo(function(){return oe.length?JSON.stringify(oe):""},[oe]),se=function(e){return!e.readOnly&&!1!==e.editable};e.useEffect(function(){o&&ce()},[null==o?void 0:o.table_name,A,M,U,ie]);var le=function(){var e=p(g().m(function e(t){var n,o,a,i,s,l;return g().w(function(e){for(;;)switch(e.p=e.n){case 0:if("relation"===t.type&&t.relation){e.n=1;break}return e.a(2);case 1:if(n=t.relation,o=n.target,a=n.displayField,i="".concat(o,"_").concat(a||"name"),!ee[i]){e.n=2;break}return e.a(2);case 2:return e.p=2,e.n=3,Zf(Mf(o,iw()),{displayField:a||"name",limit:200});case 3:(s=e.v).success&&s.data&&ne(function(e){return Object.assign(Object.assign({},e),h({},i,s.data))}),e.n=5;break;case 4:e.p=4,l=e.v,cu.error(sw(l,r("data.loadFailed")));case 5:return e.a(2)}},e,null,[[2,4]])}));return function(t){return e.apply(this,arguments)}}();e.useEffect(function(){m&&o&&o.json_schema.fields.filter(function(e){return"relation"===e.type&&e.relation}).forEach(function(e){return le(e)})},[m,o]);var ce=function(){var e=p(g().m(function e(){var t,n,a,i,s;return g().w(function(e){for(;;)switch(e.p=e.n){case 0:if(o){e.n=1;break}return e.a(2);case 1:return d(!0),e.p=2,a={page:A,limit:M},U&&(a.search=U),oe.length>0&&(a.filters=oe),e.n=3,Kf(o.table_name,a);case 3:if((i=e.v).success){e.n=4;break}return cu.error(i.message||r("data.loadFailed")),l([]),I(0),e.a(2);case 4:l((null===(t=i.data)||void 0===t?void 0:t.data)||[]),I((null===(n=i.data)||void 0===n?void 0:n.total)||0),e.n=6;break;case 5:e.p=5,s=e.v,cu.error(sw(s,r("data.loadFailed"))),l([]),I(0);case 6:return e.p=6,d(!1),e.f(6);case 7:return e.a(2)}},e,null,[[2,5,6,7]])}));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=p(g().m(function e(t){var n;return g().w(function(e){for(;;)switch(e.p=e.n){case 0:if(confirm(r("data.deleteConfirmFull"))){e.n=1;break}return e.a(2);case 1:return J(t.id),e.p=2,e.n=3,Xf(null==o?void 0:o.table_name,t.id);case 3:(n=e.v).success?(cu.success(r("data.deleteSuccess")),ce()):cu.error(n.message||r("data.deleteFailed")),e.n=5;break;case 4:e.p=4,e.v,cu.error(r("data.deleteFailed"));case 5:return e.p=5,J(null),e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(t){return e.apply(this,arguments)}}(),de=function(){var e=p(g().m(function e(){var t,n,a,i,s,l,c;return g().w(function(e){for(;;)switch(e.p=e.n){case 0:if(o){e.n=1;break}return e.a(2);case 1:if($(!0),e.p=2,!(t=Pf(o.json_schema.fields,N))){e.n=3;break}throw new Error("".concat(r("data.fieldError")," ").concat(t.comment||t.name," ").concat(r("validation.required")));case 3:if(n={},o.json_schema.fields.forEach(function(e){if("id"!==e.name&&se(e))if("relation"===e.type&&e.relation){var t=e.relation.foreignKey||"".concat(e.relation.target,"_id");n[t]=N[t]}else{var o=N[e.name];if("date"===e.type&&(o=o||null),"datetime"===e.type&&(o=o?new Date(o).toISOString():null),"json"===e.type||"jsonb"===e.type){var a=(o||"").toString().trim();if(a){var i=im(a);if(!i.ok)throw new Error("".concat(r("data.fieldError")," ").concat(e.comment||e.name,":").concat(i.message));o=i.value}else o=null}n[e.name]=o}}),!_){e.n=5;break}return a=Object.assign(Object.assign({},n),{id:_.id}),e.n=4,Jf(o.table_name,a);case 4:(i=e.v).success?(cu.success(r("data.updateSuccess")),b(!1),ce()):cu.error(i.message||r("data.updateFailed")),e.n=7;break;case 5:return e.n=6,Yf(o.table_name,n);case 6:(s=e.v).success?(cu.success(r("data.createSuccess")),b(!1),ce()):cu.error(s.message||r("data.createFailed"));case 7:e.n=9;break;case 8:e.p=8,c=e.v,l=c instanceof Error?c.message:r("data.operationFailed"),cu.error(l);case 9:return e.p=9,$(!1),e.f(9);case 10:return e.a(2)}},e,null,[[2,8,9,10]])}));return function(){return e.apply(this,arguments)}}(),fe=function(t){if("id"===t.name)return null;var n=se(t);if(pv(t)){var a=N[t.name],i=gv(t,a),s=mv(a);return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Hc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Ky,{value:s,disabled:!n,onValueChange:function(e){return D(Object.assign(Object.assign({},N),h({},t.name,function(e,t){var n=(e.enum||[]).find(function(e){return mv(e)===t});return void 0!==n?n:t}(t,e))))}},e.createElement(Yy,{className:"h-11"},e.createElement(Zy,{placeholder:"".concat(r("data.pleaseSelect")).concat(t.comment||t.name)})),e.createElement(Qy,null,i.map(function(t){return e.createElement(tw,{key:t.valueKey,value:t.valueKey},t.label)}))))}switch(t.type){case"boolean":return e.createElement("div",{key:t.name,className:"flex items-center space-x-3 p-4 rounded-lg border bg-card"},e.createElement(xp,{id:t.name,checked:N[t.name]||!1,disabled:!n,onCheckedChange:function(e){return D(Object.assign(Object.assign({},N),h({},t.name,e)))}}),e.createElement(Hc,{htmlFor:t.name,className:"text-sm font-semibold cursor-pointer"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")));case"date":return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Hc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(yt,{id:t.name,type:"date",value:N[t.name]||"",disabled:!n,onChange:function(e){return D(Object.assign(Object.assign({},N),h({},t.name,e.target.value)))},required:t.required,className:"h-11"}));case"datetime":return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Hc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(yt,{id:t.name,type:"datetime-local",value:N[t.name]||"",disabled:!n,onChange:function(e){return D(Object.assign(Object.assign({},N),h({},t.name,e.target.value)))},required:t.required,className:"h-11"}));case"text":return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Hc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(dv,{value:N[t.name]||"",onChange:function(e){return D(Object.assign(Object.assign({},N),h({},t.name,e)))},disabled:!n}));case"json":case"jsonb":return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Hc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(dm,{id:t.name,value:N[t.name]||"",required:t.required,disabled:!n,onChange:function(e){return D(Object.assign(Object.assign({},N),h({},t.name,e)))}}));case"asset":return e.createElement(Op,{key:t.name,field:t,model:o,value:N[t.name]||"",disabled:!n,onChange:function(e){return D(Object.assign(Object.assign({},N),h({},t.name,e)))}});case"integer":case"float":return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Hc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(yt,{id:t.name,type:"number",value:N[t.name]||"",disabled:!n,onChange:function(e){return D(Object.assign(Object.assign({},N),h({},t.name,e.target.value)))},required:t.required,className:"h-11"}));case"relation":if(!t.relation)return null;var l=t.relation,c=l.target,u=l.displayField,d=void 0===u?"name":u,f="".concat(c,"_").concat(d),p=ee[f]||[],m=t.relation.foreignKey||"".concat(c,"_id"),g=void 0!==N[m]&&null!==N[m]?String(N[m]):"",b=p.find(function(e){return String(e.id)===g});return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Hc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(Ky,{value:g,disabled:!n,onValueChange:function(e){var t=parseInt(e,10),n=!isNaN(t)&&String(t)===e;D(Object.assign(Object.assign({},N),h({},m,n?t:e)))}},e.createElement(Yy,{className:"h-11"},e.createElement(Zy,{placeholder:"".concat(r("data.pleaseSelect")).concat(t.comment||t.name)},b?b.label:g?"ID: ".concat(g):"".concat(r("data.pleaseSelect")).concat(t.comment||t.name))),e.createElement(Qy,null,0===p.length?e.createElement(tw,{value:"_loading",disabled:!0},r("data.loadingOptions")):p.map(function(t){return e.createElement(tw,{key:t.id,value:String(t.id)},t.label)}))));default:return e.createElement("div",{key:t.name,className:"space-y-2.5"},e.createElement(Hc,{htmlFor:t.name,className:"text-sm font-semibold"},t.comment||t.name,t.required&&e.createElement("span",{className:"text-destructive ml-1"},"*")),e.createElement(yt,{id:t.name,type:"email"===t.type?"email":"text",maxLength:t.maxLength,value:N[t.name]||"",disabled:!n,onChange:function(e){return D(Object.assign(Object.assign({},N),h({},t.name,e.target.value)))},required:t.required,className:"h-11"}))}};return o?e.createElement("div",{className:"min-h-[calc(100vh-4rem)] bg-gradient-to-br from-background via-background to-muted/20"},e.createElement("div",{className:"w-full py-4 space-y-4"},e.createElement("div",{className:"space-y-1"},e.createElement("div",{className:"flex items-center gap-3"},e.createElement("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-lg bg-primary/10 text-primary"},e.createElement(j,{className:"h-4 w-4"})),e.createElement("div",null,e.createElement("h1",{className:"text-2xl font-bold tracking-tight leading-tight"},o.name),e.createElement("p",{className:"text-sm text-muted-foreground"},r("data.tableName"),": ",o.table_name)))),e.createElement(Wc,{className:"border-2 shadow-lg"},e.createElement(Vc,{className:"bg-muted/30"},e.createElement("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4"},e.createElement("div",null,e.createElement($c,null,r("data.dataManagement")),e.createElement(Gc,null,r("data.viewAndManage")," ",o.name," ",r("data.ofData"))),e.createElement(vt,{onClick:function(){k(null),D({}),b(!0)},className:"w-full md:w-auto"},e.createElement(Z,{className:"h-4 w-4 mr-2"}),r("data.newRecord")))),e.createElement(Kc,{className:"space-y-4 pt-4"},e.createElement("div",{className:"flex flex-col md:flex-row md:items-center gap-3"},e.createElement("div",{className:"flex-1"},e.createElement(Hc,{htmlFor:"search",className:"sr-only"},r("common.search")),e.createElement("div",{className:"relative"},e.createElement(Y,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.createElement(yt,{id:"search",placeholder:r("data.searchData"),value:U,onChange:function(e){return q(e.target.value)},className:"pl-10 h-10"}))),e.createElement(vt,{type:"button",variant:"outline",className:"h-10",onClick:function(){return x(!0)}},e.createElement(B,{className:"h-4 w-4 mr-2"}),r("common.filter"),oe.length>0?"(".concat(oe.length,")"):"")),e.createElement("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50 border"},e.createElement("div",{className:"text-sm text-muted-foreground"},r("data.totalCount")," ",e.createElement("span",{className:"font-semibold text-foreground"},P)," ",r("data.records")),e.createElement(Nv,{variant:"outline"},o.name)),e.createElement("div",{className:"rounded-lg border overflow-hidden"},e.createElement(bv,null,e.createElement(vv,null,e.createElement(xv,{className:"bg-muted/50"},e.createElement(Ev,{className:"font-semibold w-20"},"ID"),o.json_schema.fields.map(function(t){return e.createElement(Ev,{key:t.name,className:"font-semibold"},t.comment||t.name)}),e.createElement(Ev,{className:"font-semibold"},r("data.createdAt")),e.createElement(Ev,{className:"font-semibold"},r("data.updatedAt")),e.createElement(Ev,{className:tt("font-semibold w-32 text-center sticky right-0 z-30 bg-background","before:content-[''] before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border","after:content-[''] after:absolute after:inset-y-0 after:left-[-16px] after:w-4 after:bg-gradient-to-l after:from-background after:to-transparent","shadow-[-10px_0_16px_-14px_rgba(0,0,0,0.35)]")},r("common.actions")))),e.createElement(yv,null,u?Array.from({length:1}).map(function(t,n){return e.createElement(xv,{key:n},e.createElement(_v,{colSpan:o.json_schema.fields.length+4},e.createElement("div",{className:"flex items-center gap-2 py-4"},e.createElement(W,{className:"h-4 w-4 animate-spin text-muted-foreground"}),e.createElement("span",{className:"text-sm text-muted-foreground"},r("common.loading")))))}):0===i.length?e.createElement(xv,null,e.createElement(_v,{colSpan:o.json_schema.fields.length+4,className:"text-center py-12"},e.createElement("div",{className:"flex flex-col items-center gap-2 text-muted-foreground"},e.createElement(Y,{className:"h-8 w-8"}),e.createElement("p",null,r("data.noData"))))):i.map(function(t,n){return e.createElement(xv,{key:t.id,className:tt("group hover:bg-muted",n%2==0?"bg-muted/20":"")},e.createElement(_v,{className:"font-mono font-medium max-w-[220px] truncate",title:String(t.id)},t.id),o.json_schema.fields.map(function(n){return e.createElement(_v,{key:n.name},function(t,n,o){if(pv(t))return hv(t,n)||"-";if("asset"===t.type)return e.createElement(Rp,{url:n,emptyText:"-",className:"w-[360px] max-w-full"});if("string"==typeof n){var a=n.trim();if(a&&Cp(a))return e.createElement(Rp,{url:a,emptyText:"-",className:"w-[360px] max-w-full"});if(a&&Ep(a))return e.createElement(Rp,{url:a,emptyText:"-",className:"w-[360px] max-w-full"})}if("boolean"===t.type)return e.createElement(Nv,{variant:n?"default":"secondary"},r(n?"data.yes":"data.no"));if("date"===t.type)return n?s(n).format("YYYY-MM-DD"):"-";if("datetime"===t.type)return n?s(n).format("YYYY-MM-DD HH:mm:ss"):"-";if("text"===t.type&&n&&n.length>50)return e.createElement("span",{className:"max-w-xs truncate block",title:n},n.substring(0,50),"...");if("json"===t.type||"jsonb"===t.type)return e.createElement(um,{value:n,title:t.comment||t.name});if("relation"===t.type&&t.relation&&o){var i=t.relation.displayField,l=void 0===i?"name":i,c=o["".concat(t.name,"_data")];if(c)return e.createElement(Nv,{variant:"outline"},c[l]||"ID: ".concat(c.id));var u=o[t.relation.foreignKey||"".concat(t.relation.target,"_id")];return u?"ID: ".concat(u):"-"}return null==n||""===n?"-":n}(n,t[n.name],t))}),e.createElement(_v,{className:"text-sm text-muted-foreground"},s(t.created_at).format("YYYY-MM-DD HH:mm")),e.createElement(_v,{className:"text-sm text-muted-foreground"},s(t.updated_at).format("YYYY-MM-DD HH:mm")),e.createElement(_v,{className:tt("sticky right-0 z-20 bg-background","before:content-[''] before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border","after:content-[''] after:absolute after:inset-y-0 after:left-[-16px] after:w-4 after:bg-gradient-to-l after:from-background after:to-transparent","shadow-[-10px_0_16px_-14px_rgba(0,0,0,0.25)]","group-hover:bg-muted")},e.createElement("div",{className:"flex items-center justify-center gap-2"},e.createElement(vt,{variant:"ghost",size:"sm",onClick:function(){return function(e){k(e);var t={};null==o||o.json_schema.fields.forEach(function(n){if("id"!==n.name)if("relation"===n.type&&n.relation){var r=n.relation.foreignKey||"".concat(n.relation.target,"_id");t[r]=e[r]}else{var o=e[n.name];"date"===n.type&&(o=o?s(o).format("YYYY-MM-DD"):""),"datetime"===n.type&&(o=o?s(o).format("YYYY-MM-DDTHH:mm"):""),"json"!==n.type&&"jsonb"!==n.type||(o=null==o||""===o?"":"string"==typeof o?o:JSON.stringify(o,null,2)),t[n.name]=o}}),D(t),b(!0)}(t)},className:"h-8 w-8 p-0"},e.createElement(Q,{className:"h-4 w-4"})),e.createElement(vt,{variant:"ghost",size:"sm",onClick:function(){return ue(t)},disabled:K===t.id,className:"h-8 w-8 p-0 text-destructive hover:text-destructive"},K===t.id?e.createElement(W,{className:"h-4 w-4 animate-spin"}):e.createElement(te,{className:"h-4 w-4"})))))})))),P>M&&e.createElement("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50 border"},e.createElement("div",{className:"text-sm text-muted-foreground"},r("data.page")," ",e.createElement("span",{className:"font-semibold text-foreground"},A)," ",r("data.pageOf")," ",e.createElement("span",{className:"font-semibold text-foreground"},Math.ceil(P/M))," ",r("data.pages")),e.createElement("div",{className:"flex gap-2"},e.createElement(vt,{variant:"outline",size:"sm",onClick:function(){return O(Math.max(1,A-1))},disabled:1===A||u},e.createElement(T,{className:"h-4 w-4 mr-1"}),r("data.previousPage")),e.createElement(vt,{variant:"outline",size:"sm",onClick:function(){return O(Math.min(Math.ceil(P/M),A+1))},disabled:A>=Math.ceil(P/M)||u},r("data.nextPage"),e.createElement(R,{className:"h-4 w-4 ml-1"})))))),e.createElement(Fp,{open:w,onOpenChange:x},e.createElement(Pp,{className:"max-w-3xl"},e.createElement(Ip,null,e.createElement(Bp,{className:"text-xl"},r("common.filter")),e.createElement(qp,{className:"text-sm"},o.name," - ",o.table_name)),e.createElement("div",{className:"py-2"},e.createElement(aw,{fields:o.json_schema.fields,value:oe,onChange:function(e){ae(e),O(1)}})),e.createElement(zp,{className:"gap-2"},e.createElement(vt,{variant:"outline",onClick:function(){return x(!1)}},r("common.close"))))),e.createElement(Fp,{open:m,onOpenChange:b},e.createElement(Pp,{className:"max-w-3xl max-h-[85vh] overflow-y-auto"},e.createElement(Ip,null,e.createElement(Bp,{className:"text-2xl"},r(_?"data.editRecord":"data.createRecord")),e.createElement(qp,{className:"text-base"},o.name," - ",o.table_name)),e.createElement("div",{className:"space-y-6 py-4"},o.json_schema.fields.map(function(e){return fe(e)})),e.createElement(zp,{className:"gap-2"},e.createElement(vt,{variant:"outline",onClick:function(){return b(!1)},disabled:V},r("common.cancel")),e.createElement(vt,{onClick:de,disabled:V},V?e.createElement(e.Fragment,null,e.createElement(W,{className:"h-4 w-4 mr-2 animate-spin"}),r(_?"data.updating":"data.creating")):r(_?"common.update":"common.create"))))))):e.createElement("div",{className:"min-h-[calc(100vh-4rem)] bg-gradient-to-br from-background via-background to-muted/20"},e.createElement("div",{className:"w-full py-4"},e.createElement(Wc,{className:"border-2"},e.createElement(Kc,{className:"py-16 text-center"},e.createElement(j,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground"}),e.createElement("p",{className:"text-lg text-muted-foreground"},r("data.selectModelPrompt"))))))}function cw(t){var n=t.model;return e.createElement(lw,{key:n.id,model:n})}function uw(t){return t.models.map(function(t){return{path:"/data/list-".concat(t.id),name:t.name,icon:e.createElement(ee),component:function(){return e.createElement(cw,{model:t})}}})}nw.displayName=Gy.displayName;var dw=function(t,n){var r=function(e,t){return n?n(e):t};return[{path:"/login",name:r("auth.login","登录"),icon:e.createElement($),component:ip},{name:r("data.dataManagement","内容管理"),icon:e.createElement(M),path:"/data",component:sp,routes:y(uw(t))}]},fw=J,pw=re,mw=G,hw=H;function gw(e){return bw.apply(this,arguments)}function bw(){return bw=p(g().m(function e(t){var n,r;return g().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:if(!(null===(n=null===navigator||void 0===navigator?void 0:navigator.clipboard)||void 0===n?void 0:n.writeText)){e.n=3;break}return e.n=2,navigator.clipboard.writeText(t);case 2:return e.a(2);case 3:(r=document.createElement("textarea")).value=t,r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r);case 4:return e.a(2)}},e)})),bw.apply(this,arguments)}function vw(t){var n=t.inputModels,r=t.skipAuth,o=void 0!==r&&r,a=t.brandName,i=void 0===a?"super CMS":a,s=t.uploadHandler,l=rp(),c=op(),u=c.locale,d=c.setLocale,f=v(e.useState("/data"),2),h=f[0],b=f[1],w=v(e.useState([]),2);w[0],w[1];var x=v(e.useState(!1),2),E=x[0],_=x[1],k=v(e.useState(null),2),C=k[0],N=k[1],D=v(e.useState(!0),2),S=D[0],A=D[1],T=v(e.useState(null),2),R=T[0],O=T[1],F=v(e.useState([]),2),M=F[0],L=F[1],P=function(){var e=Of();if(e)return e;try{return localStorage.getItem("cms_session_id")||void 0}catch(e){return}}();e.useEffect(function(){try{var e=localStorage.getItem("cms_models_order");e&&L(JSON.parse(e))}catch(e){}},[]);var z=e.useMemo(function(){if(0===M.length)return n.models;var e=new Map(n.models.map(function(e){return[e.id,e]})),t=M.map(function(t){return e.get(t)}).filter(function(e){return void 0!==e}),r=new Set(M),o=n.models.filter(function(e){return!r.has(e.id)});return[].concat(y(t),y(o))},[n.models,M]),B=e.useMemo(function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rf();return e.map(function(e){if(!(null==e?void 0:e.table_name))return e;var n=Mf(e.table_name,t);return n===e.table_name?e:Object.assign(Object.assign({},e),{table_name:n})})}(z,P)},[z,P]),q=e.useMemo(function(){return dw({models:B},l)},[B,u]);e.useEffect(function(){if(o)return _(!0),N(null),A(!1),void("/login"===h&&b("/data"));var e=function(){var e=p(g().m(function e(){var t,n;return g().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,$f()){e.n=1;break}return _(!1),b("/login"),A(!1),e.a(2);case 1:return e.p=1,e.n=2,Hf();case 2:if(e.v.success){e.n=3;break}throw new Error("token验证失败");case 3:if(!(t=Gf())){e.n=4;break}N(t),e.n=6;break;case 4:return e.n=5,Wf();case 5:(n=e.v).success&&n.data&&(N(n.data),localStorage.setItem("cms_user",JSON.stringify(n.data)));case 6:_(!0),"/login"===h&&b("/data"),e.n=8;break;case 7:e.p=7,e.v,Vf(),_(!1),N(null),b("/login");case 8:e.n=10;break;case 9:e.p=9,e.v,_(!1),N(null),b("/login");case 10:return e.p=10,A(!1),e.f(10);case 11:return e.a(2)}},e,null,[[1,7],[0,9,10,11]])}));return function(){return e.apply(this,arguments)}}();e()},[o]);var H=function(e,t){N(t),_(!0),b("/data"),cu.success("".concat(l("auth.welcome"),", ").concat(t.username,"!"))},W=function(){var e=p(g().m(function e(){var t,n;return g().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=null===(t=null==C?void 0:C.username)||void 0===t?void 0:t.trim()){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,gw(n);case 2:cu.success(l("settings.usernameCopied")),e.n=4;break;case 3:e.p=3,e.v,cu.error(l("settings.copyFailed"));case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),V=function(e,t){var n,r=m(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.path===t)return o;if(o.routes){var a=V(o.routes,t);if(a)return a}}}catch(e){r.e(e)}finally{r.f()}return null};if(S)return e.createElement("div",{className:"flex min-h-screen items-center justify-center bg-background"},e.createElement("div",{className:"space-y-4"},e.createElement(nt,{className:"h-12 w-48"}),e.createElement(nt,{className:"h-4 w-64"})));if(!E)return e.createElement(ip,{onLoginSuccess:H});var $=q.filter(function(e){return"/login"!==e.path}),G=function(t){if(!t)return j;if(e.isValidElement(t)){var n=t.type;if(n&&"function"==typeof n){var r=n.name||"";if(r.includes("Home"))return U;if(r.includes("Table"))return ee;if(r.includes("Database"))return j;if(r.includes("File"))return I}}return j},K=$.flatMap(function(e){return e.routes&&e.routes.length>0?e.routes.map(function(e){return{title:e.name,icon:G(e.icon),path:e.path}}):[{title:e.name,icon:G(e.icon),path:e.path}]}),Z=function(e){return function(t){O(e),t.dataTransfer.effectAllowed="move"}},Y=function(e){return function(t){if(t.preventDefault(),t.dataTransfer.dropEffect="move",null!==R&&R!==e){var n=q.find(function(e){return"/data"===e.path});if(null==n?void 0:n.routes){var r=y(n.routes.map(function(e){var t=e.path.match(/\/data\/list-(\d+)/);return t?parseInt(t[1],10):null}).filter(function(e){return null!==e})),o=v(r.splice(R,1),1)[0];r.splice(e,0,o),function(e){try{localStorage.setItem("cms_models_order",JSON.stringify(e)),L(e)}catch(e){}}(r),O(e)}}}},J=function(){O(null)};return e.createElement("div",{className:"we0-cms-root"},e.createElement(Tp,{uploadHandler:s},e.createElement(Gi,null,e.createElement(Ki,{variant:"inset"},e.createElement(Ji,{className:"border-b border-sidebar-border p-4"},e.createElement("div",{className:"flex items-center gap-3"},e.createElement("div",{className:"flex items-center justify-center w-12 h-12 rounded-2xl bg-primary shadow-[0_4px_12px_-2px_rgba(93,112,82,0.2)] transition-all duration-300 hover:scale-105"},e.createElement(fw,{className:"w-5 h-5 text-primary-foreground"})),e.createElement("span",{className:"font-bold text-xl text-foreground"},i))),e.createElement(Qi,null,e.createElement(es,null,e.createElement(ts,null,l("settings.navigation"),e.createElement("span",{className:"ml-2 text-xs text-muted-foreground"},l("settings.dragToReorder"))),e.createElement(ns,null,e.createElement(rs,null,K.map(function(t,n){var r,o=t.path.startsWith("/data/list-");return e.createElement(os,{key:t.path,draggable:o,onDragStart:o?Z(n):void 0,onDragOver:o?Y(n):void 0,onDragEnd:o?J:void 0,className:o&&R===n?"opacity-50":"",style:{cursor:o?"move":"default"}},e.createElement(is,{onClick:function(){return b(t.path)},isActive:(r=t.path,h===r||h.startsWith(r+"/")),tooltip:t.title},e.createElement(t.icon,{className:"w-4 h-4"}),e.createElement("span",null,t.title)))}))))),e.createElement(Xi,{className:"border-t border-sidebar-border"},e.createElement(rs,null,e.createElement(os,null,e.createElement(Ac,null,e.createElement(Tc,{asChild:!0},e.createElement(is,{tooltip:l("settings.language")},e.createElement(hw,{className:"w-4 h-4"}),e.createElement("span",null,"zh-CN"===u?"中文":"English"))),e.createElement(Fc,{align:"end",className:"w-48"},e.createElement(Mc,{onClick:function(){return d("zh-CN")},className:"zh-CN"===u?"bg-accent":""},"简体中文"),e.createElement(Mc,{onClick:function(){return d("en-US")},className:"en-US"===u?"bg-accent":""},"English")))),!o&&C&&e.createElement(e.Fragment,null,e.createElement(os,null,e.createElement(is,{onClick:function(){W()},tooltip:l("settings.copyUsername"),title:l("settings.copyUsername")},e.createElement(pw,{className:"w-4 h-4"}),e.createElement("span",{className:"truncate"},C.username))),e.createElement(os,null,e.createElement(is,{onClick:function(){window.confirm(l("auth.logoutConfirm"))&&(Vf(),localStorage.removeItem("cms_token"),localStorage.removeItem("cms_user"),_(!1),N(null),b("/login"),cu.success(l("auth.logoutSuccess")))},tooltip:l("auth.logout")},e.createElement(mw,{className:"w-4 h-4"}),e.createElement("span",null,l("auth.logout")))))))),e.createElement(Yi,null,e.createElement("header",{className:"flex h-16 items-center gap-4 border-b border-border/50 bg-background/80 backdrop-blur-sm px-6 sticky top-0 z-10"},e.createElement(Zi,null),e.createElement("h1",{className:"text-xl font-bold text-foreground"},function(){if("/login"===h)return l("auth.login");var e=V(q,h);return(null==e?void 0:e.name)||l("data.dataManagement")}())),e.createElement("main",{className:"flex-1 min-w-0 p-8 bg-gradient-to-br from-background via-background to-muted/20"},function(){if(!o&&"/login"===h)return e.createElement(ip,{onLoginSuccess:H});if(o&&"/login"===h)return e.createElement(sp,null);var t=V(q,h);if(t){var n=t.component;return e.createElement(n,null)}return e.createElement(sp,null)}())))))}function yw(t){var n=t.defaultLocale,r=_(t,["defaultLocale"]);return e.createElement(tp,{defaultLocale:n},e.createElement(vw,Object.assign({},r)))}exports.CmsLayoutShadcn=yw,exports.I18nProvider=tp,exports.RichTextEditor=dv,exports.RichTextViewer=fv,exports.cmsRoutes=dw,exports.default=yw,exports.setSessionId=zf,exports.useLocale=op,exports.useT=rp,exports.useTranslation=np;
11
19
  //# sourceMappingURL=index.js.map