reactjs-tiptap-editor 1.0.14 → 1.0.16

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 (186) hide show
  1. package/lib/{ActionMenuButton-DNj0f_A4.cjs → ActionMenuButton-BYu0NyVo.cjs} +1 -1
  2. package/lib/{ActionMenuButton-l5rSmAO_.js → ActionMenuButton-a8LhmHXe.js} +5 -5
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.js +6 -6
  5. package/lib/Blockquote.cjs +1 -1
  6. package/lib/Blockquote.js +4 -4
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +4 -4
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +4 -4
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +36 -40
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +3 -3
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +4 -4
  17. package/lib/CodeBlock.cjs +1 -1
  18. package/lib/CodeBlock.js +6 -6
  19. package/lib/CodeView.cjs +1 -1
  20. package/lib/CodeView.js +4 -4
  21. package/lib/Color.cjs +1 -1
  22. package/lib/Color.js +6 -6
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +4 -4
  25. package/lib/{Drawer-Cbi_MURj.js → Drawer-CbOJ1Igo.js} +8 -8
  26. package/lib/{Drawer-DKU32YW_.cjs → Drawer-DNaDMoAk.cjs} +1 -1
  27. package/lib/Drawer.cjs +1 -1
  28. package/lib/Drawer.js +3 -3
  29. package/lib/Emoji.cjs +1 -1
  30. package/lib/Emoji.js +212 -2076
  31. package/lib/{Excalidraw-CWrVL5hs.js → Excalidraw-DnHTVOj8.js} +6 -6
  32. package/lib/{Excalidraw-Kb-TRcWY.cjs → Excalidraw-DxfO1lQ_.cjs} +1 -1
  33. package/lib/Excalidraw.cjs +1 -1
  34. package/lib/Excalidraw.js +2 -2
  35. package/lib/ExportPdf.cjs +1 -1
  36. package/lib/ExportPdf.js +4 -4
  37. package/lib/ExportWord.cjs +1 -1
  38. package/lib/ExportWord.js +4 -4
  39. package/lib/FontFamily.cjs +1 -1
  40. package/lib/FontFamily.js +6 -6
  41. package/lib/FontSize.cjs +1 -1
  42. package/lib/FontSize.js +6 -6
  43. package/lib/Heading.cjs +1 -1
  44. package/lib/Heading.js +6 -6
  45. package/lib/Highlight.cjs +1 -1
  46. package/lib/Highlight.js +6 -6
  47. package/lib/History.cjs +1 -1
  48. package/lib/History.js +22 -22
  49. package/lib/HorizontalRule.cjs +1 -1
  50. package/lib/HorizontalRule.js +4 -4
  51. package/lib/{Icon-Ctva8VeB.js → Icon-C0TJMAOm.js} +2 -2
  52. package/lib/{Icon-yqCglrdK.cjs → Icon-DzK0_ztP.cjs} +1 -1
  53. package/lib/{Iframe-BczF8Hex.cjs → Iframe-BSNCsofW.cjs} +1 -1
  54. package/lib/{Iframe-C942bNjs.js → Iframe-CmjbQQcz.js} +6 -6
  55. package/lib/Iframe.cjs +1 -1
  56. package/lib/Iframe.js +2 -2
  57. package/lib/Image-BZEFuS0P.js +925 -0
  58. package/lib/Image-iKsGKjvg.cjs +1 -0
  59. package/lib/Image.cjs +1 -1
  60. package/lib/Image.js +5 -828
  61. package/lib/ImageGif.cjs +1 -1
  62. package/lib/ImageGif.js +9 -9
  63. package/lib/ImportWord.cjs +1 -231
  64. package/lib/ImportWord.js +91 -16623
  65. package/lib/{Indent-C_O5WdyR.js → Indent-BoG-vpIE.js} +4 -4
  66. package/lib/{Indent-CkEC7x36.cjs → Indent-Bou16OcB.cjs} +1 -1
  67. package/lib/Indent.cjs +1 -1
  68. package/lib/Indent.js +2 -2
  69. package/lib/Italic.cjs +1 -1
  70. package/lib/Italic.js +4 -4
  71. package/lib/Katex-BqDocr3a.cjs +4 -0
  72. package/lib/{Katex-D3PEWimM.js → Katex-ByL9snce.js} +369 -347
  73. package/lib/Katex.cjs +1 -1
  74. package/lib/Katex.js +2 -2
  75. package/lib/LineHeight.cjs +1 -1
  76. package/lib/LineHeight.js +7 -7
  77. package/lib/Link.cjs +1 -1
  78. package/lib/Link.js +2 -2
  79. package/lib/{LinkEditBlock-DL1e2ILk.cjs → LinkEditBlock-B0I0EUrt.cjs} +1 -1
  80. package/lib/{LinkEditBlock-h5054QDo.js → LinkEditBlock-Ckih17pU.js} +11 -11
  81. package/lib/Mention.cjs +1 -1
  82. package/lib/Mention.js +41 -63
  83. package/lib/Mermaid.cjs +1 -1
  84. package/lib/Mermaid.js +16 -16
  85. package/lib/MoreMark.cjs +1 -1
  86. package/lib/MoreMark.js +7 -7
  87. package/lib/OrderedList.cjs +1 -1
  88. package/lib/OrderedList.js +4 -4
  89. package/lib/SearchAndReplace.cjs +1 -1
  90. package/lib/SearchAndReplace.js +11 -11
  91. package/lib/SlashCommand.cjs +1 -1
  92. package/lib/SlashCommand.js +9 -9
  93. package/lib/{SlashCommandNodeView-DXUqkx82.js → SlashCommandNodeView-B2g1MbgN.js} +76 -83
  94. package/lib/SlashCommandNodeView-BEJhEzba.cjs +1 -0
  95. package/lib/Strike.cjs +1 -1
  96. package/lib/Strike.js +4 -4
  97. package/lib/{Table-DdrY4jcM.js → Table-BEwrZVup.js} +22 -22
  98. package/lib/{Table-kY0nbqJo.cjs → Table-BclWwp6P.cjs} +1 -1
  99. package/lib/Table.cjs +1 -1
  100. package/lib/Table.js +1 -1
  101. package/lib/TaskList.cjs +1 -1
  102. package/lib/TaskList.js +4 -4
  103. package/lib/TextAlign.cjs +1 -1
  104. package/lib/TextAlign.js +7 -7
  105. package/lib/TextDirection.cjs +1 -1
  106. package/lib/TextDirection.js +7 -7
  107. package/lib/TextUnderline.cjs +1 -1
  108. package/lib/TextUnderline.js +4 -4
  109. package/lib/{Twitter-B-JQ3ZJ1.js → Twitter-4U_ZBhpv.js} +10 -10
  110. package/lib/{Twitter-DjZcVa3l.cjs → Twitter-Dtq6PEMC.cjs} +1 -1
  111. package/lib/Twitter.cjs +1 -1
  112. package/lib/Twitter.js +2 -2
  113. package/lib/Video.cjs +1 -1
  114. package/lib/Video.js +9 -9
  115. package/lib/bubble.cjs +1 -1
  116. package/lib/bubble.js +27 -27
  117. package/lib/{button-Uv01FNnd.js → button-Bwn6gUuS.js} +2 -2
  118. package/lib/{button-BS3n6_Aq.cjs → button-CqJztfH2.cjs} +1 -1
  119. package/lib/{checkbox-C8ByRi7-.cjs → checkbox-BAzbZY2Y.cjs} +1 -1
  120. package/lib/{checkbox-DEFNwGwb.js → checkbox-B_rpz5Xq.js} +1 -1
  121. package/lib/{clsx-BWSGDJNJ.js → clsx-DSzxBzvL.js} +11 -11
  122. package/lib/{dialog-DwTMZSt6.js → dialog-CJvpoeMm.js} +1 -1
  123. package/lib/{dialog-Bt5zwGYB.cjs → dialog-CWYTvz5J.cjs} +1 -1
  124. package/lib/{dropdown-menu-BetI14G6.js → dropdown-menu-CW3Kthwy.js} +1 -1
  125. package/lib/{dropdown-menu-Bo68IEOT.cjs → dropdown-menu-eUeBXQeA.cjs} +1 -1
  126. package/lib/extensions/Emoji/Emoji.d.ts +3 -1
  127. package/lib/extensions/Emoji/components/EmojiList/EmojiNodeView.d.ts +9 -1
  128. package/lib/{index-CHKWG6E8.js → index-4bHF5ovf.js} +1 -1
  129. package/lib/index-BG0kQamI.js +285 -0
  130. package/lib/{index-Doks9cbR.cjs → index-BsFvo9PG.cjs} +1 -1
  131. package/lib/{index-Dujzr6bY.js → index-C07N8gA1.js} +69 -73
  132. package/lib/{index-CcoWj0mF.js → index-CL7JP-Xz.js} +1 -1
  133. package/lib/index-Cn-t3Zxw.cjs +1 -0
  134. package/lib/{index-mR8PNv5P.js → index-CpTykZBR.js} +1 -1
  135. package/lib/{index-BDKHXe7R.js → index-D8li6EQ4.js} +1 -1
  136. package/lib/{index-DJbmnBzK.js → index-DR5tIdL7.js} +1 -1
  137. package/lib/{index-DF5ZPtWM.js → index-DoiuU6VA.js} +54 -56
  138. package/lib/index-NsYff_Ni.cjs +1 -0
  139. package/lib/index.cjs +2 -2
  140. package/lib/index.js +4 -4
  141. package/lib/{input-DUBdJD3L.js → input-B1egKb-t.js} +1 -1
  142. package/lib/{input-Dt_BA_9B.cjs → input-ZGRt7lWR.cjs} +1 -1
  143. package/lib/{isNumber-CIgubz2e.js → isNumber-ClwLypY2.js} +1 -1
  144. package/lib/{label-topD46-u.js → label-Cjrzc5H2.js} +2 -2
  145. package/lib/{label-JNOksCA-.cjs → label-tzSPdqui.cjs} +1 -1
  146. package/lib/locale-bundle.cjs +1 -1
  147. package/lib/locale-bundle.js +1 -1
  148. package/lib/locales/index.d.ts +5 -1
  149. package/lib/{popover-mL-2sX5r.cjs → popover-C6Cya3Cz.cjs} +1 -1
  150. package/lib/{popover-LfNBhRyz.js → popover-CeY3RbI5.js} +1 -1
  151. package/lib/renderNodeView-CSazLrKF.js +28 -0
  152. package/lib/renderNodeView-DfLmGrgA.cjs +1 -0
  153. package/lib/{select-CwGYPsPq.cjs → select-Doa_-jkZ.cjs} +1 -1
  154. package/lib/{select-DctYuHLH.js → select-F0ZZ3VZB.js} +1 -1
  155. package/lib/{separator-NoH_SLRW.cjs → separator-CUh5Y7Rh.cjs} +1 -1
  156. package/lib/{separator-Ddfrhn4D.js → separator-Cjn4YH8a.js} +5 -5
  157. package/lib/store/commandList.d.ts +1 -1
  158. package/lib/store/store.d.ts +7 -6
  159. package/lib/{store-DNpS8vXA.js → store-BsJz5QRC.js} +1 -1
  160. package/lib/{store-CkjKIgjQ.cjs → store-DjkMIIEN.cjs} +1 -1
  161. package/lib/{tabs-DRSwUeKP.cjs → tabs-BP8ypR_m.cjs} +1 -1
  162. package/lib/{tabs-BT3AeqQQ.js → tabs-CBDjOLl_.js} +1 -1
  163. package/lib/{textarea-BDO6XQoF.cjs → textarea-BAolHF_W.cjs} +1 -1
  164. package/lib/{textarea-DZzMEDfZ.js → textarea-tOsPnxHf.js} +1 -1
  165. package/lib/theme.cjs +1 -1
  166. package/lib/theme.js +21 -27
  167. package/lib/{throttle-IERhwcLa.js → throttle-D040PfWL.js} +1 -1
  168. package/lib/{toggle-BQHMh_Q-.cjs → toggle-C_SSvDRy.cjs} +1 -1
  169. package/lib/{toggle-DKHg5sLm.js → toggle-DEerYRil.js} +4 -4
  170. package/lib/{tooltip-DNKq7zgN.js → tooltip-BJIvosho.js} +1 -1
  171. package/lib/{tooltip-BYtGp6FM.cjs → tooltip-FS1rsvd3.cjs} +1 -1
  172. package/lib/{updatePosition-Bie75EFq.js → updatePosition-CDK7OR0i.js} +2 -2
  173. package/lib/{useButtonProps-DVP4s_ER.js → useButtonProps-CtZCbMQu.js} +5 -5
  174. package/lib/{useButtonProps-DBJkNDS2.cjs → useButtonProps-Cz4W5dC8.cjs} +1 -1
  175. package/lib/utils/renderNodeView.d.ts +6 -0
  176. package/package.json +4 -4
  177. package/lib/Katex-DW_HjgNM.cjs +0 -4
  178. package/lib/SlashCommandNodeView-BqrmHCpu.cjs +0 -1
  179. package/lib/_commonjsHelpers-BItOPCY9.js +0 -28
  180. package/lib/_commonjsHelpers-BTDuMlIz.cjs +0 -1
  181. package/lib/extensions/Emoji/components/EmojiList/emojis.d.ts +0 -4
  182. package/lib/index-D3RLYf-J.cjs +0 -1
  183. package/lib/react-BEoMZB61.cjs +0 -1
  184. package/lib/react-c9FSfB30.js +0 -27
  185. package/lib/use-toast-Bz3QCOtE.cjs +0 -1
  186. package/lib/use-toast-Crf7-q5H.js +0 -98
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),n=require("react"),k=require("lucide-react"),E=require("react-colorful"),P=require("./index-D3RLYf-J.cjs");require("./theme.cjs");const j=require("./index-Doks9cbR.cjs"),v=require("./popover-mL-2sX5r.cjs"),O=require("./input-Dt_BA_9B.cjs"),y=require("@radix-ui/react-separator"),R=require("./button-BS3n6_Aq.cjs");function L(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const c in t)if(c!=="default"){const h=Object.getOwnPropertyDescriptor(t,c);Object.defineProperty(r,c,h.get?h:{enumerable:!0,get:()=>t[c]})}}return r.default=t,Object.freeze(r)}const q=L(n),N=L(y);function _(){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z"})})}const w=typeof window>"u";function S(t,r,c=window){const h=n.useRef(void 0);n.useEffect(()=>{h.current=r},[r]),n.useEffect(()=>{if(!(c&&c.addEventListener))return;const f=x=>{h.current&&h.current(x)};return c.addEventListener(t,f),()=>{c.removeEventListener(t,f)}},[t,c])}function $(t,r,c={}){const{initializeWithValue:h=!0}=c,i=n.useCallback(o=>c.serializer?c.serializer(o):JSON.stringify(o),[c]),f=n.useCallback(o=>{if(c.deserializer)return c.deserializer(o);if(o==="undefined")return;const l=r instanceof Function?r():r;let s;try{s=JSON.parse(o)}catch(a){return console.error("Error parsing JSON:",a),l}return s},[c,r]),x=n.useCallback(()=>{const o=r instanceof Function?r():r;if(w)return o;try{const l=window.localStorage.getItem(t);return l?f(l):o}catch(l){return console.warn(`Error reading localStorage key “${t}”:`,l),o}},[r,t,f]),[d,p]=n.useState(()=>h?x():r instanceof Function?r():r),b=n.useCallback(o=>{w&&console.warn(`Tried setting localStorage key “${t}” even though environment is not a client`);try{const l=o instanceof Function?o(x()):o;window.localStorage.setItem(t,i(l)),p(l),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))}catch(l){console.warn(`Error setting localStorage key “${t}”:`,l)}},[t,i,x]),g=n.useCallback(()=>{w&&console.warn(`Tried removing localStorage key “${t}” even though environment is not a client`);const o=r instanceof Function?r():r;window.localStorage.removeItem(t),p(o),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))},[t,r]);n.useEffect(()=>{p(x())},[t]);const m=n.useCallback(o=>{o.key&&o.key!==t||p(x())},[t,x]);return S("storage",m),S("local-storage",m),[d,b,g]}function M(t){const{t:r}=j.useLocale(),{disabled:c=!1,value:h,onChange:i,colors:f=j.COLORS_LIST,highlight:x}=t,[d,p]=n.useState(!1),b=n.useMemo(()=>{const s=f,a=[];for(let u=0;u<s.length;u+=10)a.push(s.slice(u,u+10));return a},[f]),[g,m]=$(x?"richtext-recent-highlight":"richtext-recent-colors",[]),o=s=>{const a=[...g],u=a.indexOf(s);u!==-1&&a.splice(u,1),a.unshift(s),a.length>10&&a.pop(),m(a)};function l(s){if(s===void 0){i==null||i(s),p(!1);return}/^#([\da-f]{3}){1,2}$/i.test(s)&&(i==null||i(s),o(s),p(!1))}return e.jsxs(v.Popover,{modal:!0,onOpenChange:p,open:d,children:[e.jsx(v.PopoverTrigger,{asChild:!0,className:"!richtext-p-0",disabled:c,children:t==null?void 0:t.children}),e.jsx(v.PopoverContent,{align:"start",className:"richtext-size-full !richtext-p-2",hideWhenDetached:!0,side:"bottom",children:e.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[e.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>{l(void 0)},children:[e.jsx(_,{}),e.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:r(x?"editor.nofill":"editor.default")})]}),b.map((s,a)=>e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:s.map((u,z)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-solid !richtext-border-transparent richtext-p-0.5 hover:!richtext-border-border",onClick:()=>l(u),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px]",style:{backgroundColor:u},children:u===h?e.jsx("svg",{className:"richtext-absolute -richtext-top-px richtext-left-px richtext-block richtext-size-3",viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${z}`))},`color-row-${a}`)),e.jsxs("div",{children:[e.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:r("editor.recent")}),e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-flex-wrap richtext-p-0 last:richtext-pb-2",children:g==null?void 0:g.map((s,a)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-transparent richtext-p-0.5 hover:richtext-border-border hover:richtext-shadow-sm",onClick:()=>l(s),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:s},children:e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${a}`))})]}),e.jsx(T,{setColor:l})]})})]})}function T({setColor:t}){const{t:r}=j.useLocale(),[c,h]=n.useState(!1),[i,f]=n.useState("#000000"),x=n.useCallback(d=>{f(d)},[]);return e.jsxs(v.Popover,{onOpenChange:h,open:c,children:[e.jsx(v.PopoverTrigger,{asChild:!0,children:e.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",children:[r("editor.color.more"),"..."]})}),e.jsxs(v.PopoverContent,{children:[e.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[e.jsx(E.HexColorPicker,{color:i,onChange:d=>{x(d)}}),e.jsx(O.Input,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:i.replace("#",""),onChange:d=>{d.preventDefault(),d.stopPropagation(),x(`#${d.target.value}`)}})]}),e.jsx(C,{className:"richtext-my-[10px]"}),e.jsx(R.Button,{className:"richtext-w-full",onClick:d=>{d.preventDefault(),d.stopPropagation(),t(i),h(!1)},children:e.jsx(k.Plus,{size:16})})]})]})}const C=q.forwardRef(({className:t,orientation:r="horizontal",decorative:c=!0,...h},i)=>e.jsx(N.Root,{ref:i,decorative:c,orientation:r,className:P.cn("richtext-shrink-0 richtext-bg-border",r==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",t),...h}));C.displayName=N.Root.displayName;exports.ColorPicker=M;exports.Separator=C;
1
+ "use strict";const e=require("react/jsx-runtime"),n=require("react"),k=require("lucide-react"),E=require("react-colorful"),P=require("./index-Cn-t3Zxw.cjs");require("./theme.cjs");const j=require("./index-BsFvo9PG.cjs"),v=require("./popover-C6Cya3Cz.cjs"),O=require("./input-ZGRt7lWR.cjs"),y=require("@radix-ui/react-separator"),R=require("./button-CqJztfH2.cjs");function L(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const c in t)if(c!=="default"){const h=Object.getOwnPropertyDescriptor(t,c);Object.defineProperty(r,c,h.get?h:{enumerable:!0,get:()=>t[c]})}}return r.default=t,Object.freeze(r)}const q=L(n),N=L(y);function _(){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z"})})}const w=typeof window>"u";function S(t,r,c=window){const h=n.useRef(void 0);n.useEffect(()=>{h.current=r},[r]),n.useEffect(()=>{if(!(c&&c.addEventListener))return;const f=x=>{h.current&&h.current(x)};return c.addEventListener(t,f),()=>{c.removeEventListener(t,f)}},[t,c])}function $(t,r,c={}){const{initializeWithValue:h=!0}=c,i=n.useCallback(o=>c.serializer?c.serializer(o):JSON.stringify(o),[c]),f=n.useCallback(o=>{if(c.deserializer)return c.deserializer(o);if(o==="undefined")return;const l=r instanceof Function?r():r;let s;try{s=JSON.parse(o)}catch(a){return console.error("Error parsing JSON:",a),l}return s},[c,r]),x=n.useCallback(()=>{const o=r instanceof Function?r():r;if(w)return o;try{const l=window.localStorage.getItem(t);return l?f(l):o}catch(l){return console.warn(`Error reading localStorage key “${t}”:`,l),o}},[r,t,f]),[d,p]=n.useState(()=>h?x():r instanceof Function?r():r),b=n.useCallback(o=>{w&&console.warn(`Tried setting localStorage key “${t}” even though environment is not a client`);try{const l=o instanceof Function?o(x()):o;window.localStorage.setItem(t,i(l)),p(l),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))}catch(l){console.warn(`Error setting localStorage key “${t}”:`,l)}},[t,i,x]),g=n.useCallback(()=>{w&&console.warn(`Tried removing localStorage key “${t}” even though environment is not a client`);const o=r instanceof Function?r():r;window.localStorage.removeItem(t),p(o),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))},[t,r]);n.useEffect(()=>{p(x())},[t]);const m=n.useCallback(o=>{o.key&&o.key!==t||p(x())},[t,x]);return S("storage",m),S("local-storage",m),[d,b,g]}function M(t){const{t:r}=j.useLocale(),{disabled:c=!1,value:h,onChange:i,colors:f=j.COLORS_LIST,highlight:x}=t,[d,p]=n.useState(!1),b=n.useMemo(()=>{const s=f,a=[];for(let u=0;u<s.length;u+=10)a.push(s.slice(u,u+10));return a},[f]),[g,m]=$(x?"richtext-recent-highlight":"richtext-recent-colors",[]),o=s=>{const a=[...g],u=a.indexOf(s);u!==-1&&a.splice(u,1),a.unshift(s),a.length>10&&a.pop(),m(a)};function l(s){if(s===void 0){i==null||i(s),p(!1);return}/^#([\da-f]{3}){1,2}$/i.test(s)&&(i==null||i(s),o(s),p(!1))}return e.jsxs(v.Popover,{modal:!0,onOpenChange:p,open:d,children:[e.jsx(v.PopoverTrigger,{asChild:!0,className:"!richtext-p-0",disabled:c,children:t==null?void 0:t.children}),e.jsx(v.PopoverContent,{align:"start",className:"richtext-size-full !richtext-p-2",hideWhenDetached:!0,side:"bottom",children:e.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[e.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>{l(void 0)},children:[e.jsx(_,{}),e.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:r(x?"editor.nofill":"editor.default")})]}),b.map((s,a)=>e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:s.map((u,z)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-solid !richtext-border-transparent richtext-p-0.5 hover:!richtext-border-border",onClick:()=>l(u),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px]",style:{backgroundColor:u},children:u===h?e.jsx("svg",{className:"richtext-absolute -richtext-top-px richtext-left-px richtext-block richtext-size-3",viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${z}`))},`color-row-${a}`)),e.jsxs("div",{children:[e.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:r("editor.recent")}),e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-flex-wrap richtext-p-0 last:richtext-pb-2",children:g==null?void 0:g.map((s,a)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-transparent richtext-p-0.5 hover:richtext-border-border hover:richtext-shadow-sm",onClick:()=>l(s),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:s},children:e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${a}`))})]}),e.jsx(T,{setColor:l})]})})]})}function T({setColor:t}){const{t:r}=j.useLocale(),[c,h]=n.useState(!1),[i,f]=n.useState("#000000"),x=n.useCallback(d=>{f(d)},[]);return e.jsxs(v.Popover,{onOpenChange:h,open:c,children:[e.jsx(v.PopoverTrigger,{asChild:!0,children:e.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",children:[r("editor.color.more"),"..."]})}),e.jsxs(v.PopoverContent,{children:[e.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[e.jsx(E.HexColorPicker,{color:i,onChange:d=>{x(d)}}),e.jsx(O.Input,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:i.replace("#",""),onChange:d=>{d.preventDefault(),d.stopPropagation(),x(`#${d.target.value}`)}})]}),e.jsx(C,{className:"richtext-my-[10px]"}),e.jsx(R.Button,{className:"richtext-w-full",onClick:d=>{d.preventDefault(),d.stopPropagation(),t(i),h(!1)},children:e.jsx(k.Plus,{size:16})})]})]})}const C=q.forwardRef(({className:t,orientation:r="horizontal",decorative:c=!0,...h},i)=>e.jsx(N.Root,{ref:i,decorative:c,orientation:r,className:P.cn("richtext-shrink-0 richtext-bg-border",r==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",t),...h}));C.displayName=N.Root.displayName;exports.ColorPicker=M;exports.Separator=C;
@@ -3,13 +3,13 @@ import * as k from "react";
3
3
  import { useCallback as m, useState as w, useEffect as L, useRef as $, useMemo as M } from "react";
4
4
  import { Plus as I } from "lucide-react";
5
5
  import { HexColorPicker as B } from "react-colorful";
6
- import { c as F } from "./index-DF5ZPtWM.js";
6
+ import { c as F } from "./index-DoiuU6VA.js";
7
7
  import "./theme.js";
8
- import { u as N, C as _ } from "./index-Dujzr6bY.js";
9
- import { P as z, a as E, b as y } from "./popover-LfNBhRyz.js";
10
- import { I as T } from "./input-DUBdJD3L.js";
8
+ import { u as N, C as _ } from "./index-C07N8gA1.js";
9
+ import { P as z, a as E, b as y } from "./popover-CeY3RbI5.js";
10
+ import { I as T } from "./input-B1egKb-t.js";
11
11
  import * as R from "@radix-ui/react-separator";
12
- import { B as j } from "./button-Uv01FNnd.js";
12
+ import { B as j } from "./button-Bwn6gUuS.js";
13
13
  function D() {
14
14
  return /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ t("path", { fill: "currentColor", d: "M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z" }) });
15
15
  }
@@ -1,2 +1,2 @@
1
1
  import { CommandList } from '../extensions/SlashCommand/types';
2
- export declare function useSignalCommandList(): readonly [CommandList[], (newCommandList: CommandList[]) => void];
2
+ export declare function useSignalCommandList(): readonly [CommandList[], (val: CommandList[] | ((oldVal: CommandList[]) => CommandList[])) => void];
@@ -12,11 +12,12 @@ declare const ProviderUploadVideo: ({ children }: {
12
12
  }) => SelectorOutput) => [SelectorOutput, (value: Partial<{
13
13
  value: boolean;
14
14
  }>) => void];
15
- declare const useStoreEditableEditor: import('zustand').UseBoundStore<import('zustand').StoreApi<{
16
- value: boolean;
17
- setEditable: (newValue: {
18
- value: boolean;
19
- }) => void;
20
- }>>;
21
15
  declare function useEditableEditor(): boolean;
16
+ declare function useStoreEditableEditor(): (val: {
17
+ value: boolean;
18
+ } | ((oldVal: {
19
+ value: boolean;
20
+ }) => {
21
+ value: boolean;
22
+ })) => void;
22
23
  export { ProviderUploadImage, useStoreUploadImage, ProviderUploadVideo, useStoreUploadVideo, useStoreEditableEditor, useEditableEditor, };
@@ -1,4 +1,4 @@
1
- import "./index-DF5ZPtWM.js";
1
+ import "./index-DoiuU6VA.js";
2
2
  import { d as o, E as s } from "./events.constant-do95b767.js";
3
3
  const p = {
4
4
  setOpen: (a, t) => {
@@ -1 +1 @@
1
- "use strict";require("./index-D3RLYf-J.cjs");const e=require("./events.constant-Dq21NPdV.cjs"),a={setOpen:(t,n)=>{e.dispatchEvent(e.EVENTS.UPLOAD_IMAGE(t),n)}};exports.actionDialogImage=a;
1
+ "use strict";require("./index-Cn-t3Zxw.cjs");const e=require("./events.constant-Dq21NPdV.cjs"),a={setOpen:(t,n)=>{e.dispatchEvent(e.EVENTS.UPLOAD_IMAGE(t),n)}};exports.actionDialogImage=a;
@@ -1 +1 @@
1
- "use strict";const c=require("react/jsx-runtime"),h=require("react"),d=require("@radix-ui/react-tabs"),s=require("./index-D3RLYf-J.cjs");function o(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return i.default=t,Object.freeze(i)}const n=o(h),r=o(d),l=r.Root,x=n.forwardRef(({className:t,...i},e)=>c.jsx(r.List,{ref:e,className:s.cn("richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",t),...i}));x.displayName=r.List.displayName;const f=n.forwardRef(({className:t,...i},e)=>c.jsx(r.Trigger,{ref:e,className:s.cn("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",t),...i}));f.displayName=r.Trigger.displayName;const u=n.forwardRef(({className:t,...i},e)=>c.jsx(r.Content,{ref:e,className:s.cn("richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1",t),...i}));u.displayName=r.Content.displayName;exports.Tabs=l;exports.TabsContent=u;exports.TabsList=x;exports.TabsTrigger=f;
1
+ "use strict";const c=require("react/jsx-runtime"),h=require("react"),d=require("@radix-ui/react-tabs"),s=require("./index-Cn-t3Zxw.cjs");function o(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return i.default=t,Object.freeze(i)}const n=o(h),r=o(d),l=r.Root,x=n.forwardRef(({className:t,...i},e)=>c.jsx(r.List,{ref:e,className:s.cn("richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",t),...i}));x.displayName=r.List.displayName;const f=n.forwardRef(({className:t,...i},e)=>c.jsx(r.Trigger,{ref:e,className:s.cn("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",t),...i}));f.displayName=r.Trigger.displayName;const u=n.forwardRef(({className:t,...i},e)=>c.jsx(r.Content,{ref:e,className:s.cn("richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1",t),...i}));u.displayName=r.Content.displayName;exports.Tabs=l;exports.TabsContent=u;exports.TabsList=x;exports.TabsTrigger=f;
@@ -1,7 +1,7 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
3
  import * as t from "@radix-ui/react-tabs";
4
- import { c as a } from "./index-DF5ZPtWM.js";
4
+ import { c as a } from "./index-DoiuU6VA.js";
5
5
  const d = t.Root, o = c.forwardRef(({ className: e, ...i }, r) => /* @__PURE__ */ s(
6
6
  t.List,
7
7
  {
@@ -1 +1 @@
1
- "use strict";const n=require("react/jsx-runtime"),o=require("react"),a=require("./index-D3RLYf-J.cjs");function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const x=s(o),c=x.forwardRef(({className:e,...r},t)=>n.jsx("textarea",{ref:t,className:a.cn("richtext-flex richtext-min-h-[80px] richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",e),...r}));c.displayName="Textarea";exports.Textarea=c;
1
+ "use strict";const n=require("react/jsx-runtime"),o=require("react"),a=require("./index-Cn-t3Zxw.cjs");function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const x=s(o),c=x.forwardRef(({className:e,...r},t)=>n.jsx("textarea",{ref:t,className:a.cn("richtext-flex richtext-min-h-[80px] richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",e),...r}));c.displayName="Textarea";exports.Textarea=c;
@@ -1,6 +1,6 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
- import { c as o } from "./index-DF5ZPtWM.js";
3
+ import { c as o } from "./index-DoiuU6VA.js";
4
4
  const x = c.forwardRef(
5
5
  ({ className: t, ...e }, r) => /* @__PURE__ */ i(
6
6
  "textarea",
package/lib/theme.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./react-BEoMZB61.cjs"),c={light:{default:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"240 5.9% 10%","primary-foreground":"0 0% 98%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"240 5.9% 10%"},red:{radius:"0.65rem",background:"0 0% 100%",foreground:"0 0% 3.9%",card:"0 0% 100%","card-foreground":"0 0% 3.9%",popover:"0 0% 100%","popover-foreground":"0 0% 3.9%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 96.1%","secondary-foreground":"0 0% 9%",muted:"0 0% 96.1%","muted-foreground":"0 0% 45.1%",accent:"0 0% 96.1%","accent-foreground":"0 0% 9%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"0 0% 89.8%",input:"0 0% 89.8%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"0 0% 100%",foreground:"222.2 84% 4.9%",card:"0 0% 100%","card-foreground":"222.2 84% 4.9%",popover:"0 0% 100%","popover-foreground":"222.2 84% 4.9%",primary:"221.2 83.2% 53.3%","primary-foreground":"210 40% 98%",secondary:"210 40% 96.1%","secondary-foreground":"222.2 47.4% 11.2%",muted:"210 40% 96.1%","muted-foreground":"215.4 16.3% 46.9%",accent:"210 40% 96.1%","accent-foreground":"222.2 47.4% 11.2%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 40% 98%",border:"214.3 31.8% 91.4%",input:"214.3 31.8% 91.4%",ring:"221.2 83.2% 53.3%"},green:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"142.1 76.2% 36.3%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"142.1 76.2% 36.3%"},orange:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"24.6 95% 53.1%","primary-foreground":"60 9.1% 97.8%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%"},rose:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"0 0% 100%",foreground:"224 71.4% 4.1%",card:"0 0% 100%","card-foreground":"224 71.4% 4.1%",popover:"0 0% 100%","popover-foreground":"224 71.4% 4.1%",primary:"262.1 83.3% 57.8%","primary-foreground":"210 20% 98%",secondary:"220 14.3% 95.9%","secondary-foreground":"220.9 39.3% 11%",muted:"220 14.3% 95.9%","muted-foreground":"220 8.9% 46.1%",accent:"220 14.3% 95.9%","accent-foreground":"220.9 39.3% 11%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 20% 98%",border:"220 13% 91%",input:"220 13% 91%",ring:"262.1 83.3% 57.8%"},yellow:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%",ring:"20 14.3% 4.1"}},dark:{default:{radius:"0.65rem",background:"240 10% 3.9%",foreground:"0 0% 98%",card:"240 10% 3.9%","card-foreground":"0 0% 98%",popover:"240 10% 3.9%","popover-foreground":"0 0% 98%",primary:"0 0% 98%","primary-foreground":"240 5.9% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"240 3.7% 15.9%","muted-foreground":"240 5% 64.9%",accent:"240 3.7% 15.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"240 4.9% 83.9%"},red:{radius:"0.65rem",background:"0 0% 3.9%",foreground:"0 0% 98%",card:"0 0% 3.9%","card-foreground":"0 0% 98%",popover:"0 0% 3.9%","popover-foreground":"0 0% 98%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 14.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 14.9%","muted-foreground":"0 0% 63.9%",accent:"0 0% 14.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"0 0% 14.9%",input:"0 0% 14.9%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"222.2 84% 4.9%",foreground:"210 40% 98%",card:"222.2 84% 4.9%","card-foreground":"210 40% 98%",popover:"222.2 84% 4.9%","popover-foreground":"210 40% 98%",primary:"217.2 91.2% 59.8%","primary-foreground":"222.2 47.4% 11.2%",secondary:"217.2 32.6% 17.5%","secondary-foreground":"210 40% 98%",muted:"217.2 32.6% 17.5%","muted-foreground":"215 20.2% 65.1%",accent:"217.2 32.6% 17.5%","accent-foreground":"210 40% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 40% 98%",border:"217.2 32.6% 17.5%",input:"217.2 32.6% 17.5%",ring:"224.3 76.3% 48%"},green:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"142.1 70.6% 45.3%","primary-foreground":"144.9 80.4% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"142.4 71.8% 29.2%"},orange:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"20.5 90.2% 48.2%","primary-foreground":"60 9.1% 97.8%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 72.2% 50.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"20.5 90.2% 48.2%"},rose:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"224 71.4% 4.1%",foreground:"210 20% 98%",card:"224 71.4% 4.1%","card-foreground":"210 20% 98%",popover:"224 71.4% 4.1%","popover-foreground":"210 20% 98%",primary:"263.4 70% 50.4%","primary-foreground":"210 20% 98%",secondary:"215 27.9% 16.9%","secondary-foreground":"210 20% 98%",muted:"215 27.9% 16.9%","muted-foreground":"217.9 10.6% 64.9%",accent:"215 27.9% 16.9%","accent-foreground":"210 20% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 20% 98%",border:"215 27.9% 16.9%",input:"215 27.9% 16.9%",ring:"263.4 70% 50.4%"},yellow:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 62.8% 30.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"35.5 91.7% 32.9%"}}},o=n.create(r=>({theme:"light",color:"default",borderRadius:"0.65rem",setTheme:e=>{r(()=>({theme:e}))},setColor:e=>{r(()=>({color:e}))},setBorderRadius:e=>{r(()=>({borderRadius:e}))}}));function t(){const r=o(d=>d.theme),e=o(d=>d.color),u=o(d=>d.borderRadius);return{theme:r,color:e,borderRadius:u}}const a={setTheme:r=>{o.getState().setTheme(r)},setColor:r=>{o.getState().setColor(r)},setBorderRadius:r=>{o.getState().setBorderRadius(r)}};exports.THEME=c;exports.themeActions=a;exports.useTheme=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-NsYff_Ni.cjs"),n={light:{default:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"240 5.9% 10%","primary-foreground":"0 0% 98%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"240 5.9% 10%"},red:{radius:"0.65rem",background:"0 0% 100%",foreground:"0 0% 3.9%",card:"0 0% 100%","card-foreground":"0 0% 3.9%",popover:"0 0% 100%","popover-foreground":"0 0% 3.9%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 96.1%","secondary-foreground":"0 0% 9%",muted:"0 0% 96.1%","muted-foreground":"0 0% 45.1%",accent:"0 0% 96.1%","accent-foreground":"0 0% 9%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"0 0% 89.8%",input:"0 0% 89.8%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"0 0% 100%",foreground:"222.2 84% 4.9%",card:"0 0% 100%","card-foreground":"222.2 84% 4.9%",popover:"0 0% 100%","popover-foreground":"222.2 84% 4.9%",primary:"221.2 83.2% 53.3%","primary-foreground":"210 40% 98%",secondary:"210 40% 96.1%","secondary-foreground":"222.2 47.4% 11.2%",muted:"210 40% 96.1%","muted-foreground":"215.4 16.3% 46.9%",accent:"210 40% 96.1%","accent-foreground":"222.2 47.4% 11.2%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 40% 98%",border:"214.3 31.8% 91.4%",input:"214.3 31.8% 91.4%",ring:"221.2 83.2% 53.3%"},green:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"142.1 76.2% 36.3%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"142.1 76.2% 36.3%"},orange:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"24.6 95% 53.1%","primary-foreground":"60 9.1% 97.8%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%"},rose:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"0 0% 100%",foreground:"224 71.4% 4.1%",card:"0 0% 100%","card-foreground":"224 71.4% 4.1%",popover:"0 0% 100%","popover-foreground":"224 71.4% 4.1%",primary:"262.1 83.3% 57.8%","primary-foreground":"210 20% 98%",secondary:"220 14.3% 95.9%","secondary-foreground":"220.9 39.3% 11%",muted:"220 14.3% 95.9%","muted-foreground":"220 8.9% 46.1%",accent:"220 14.3% 95.9%","accent-foreground":"220.9 39.3% 11%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 20% 98%",border:"220 13% 91%",input:"220 13% 91%",ring:"262.1 83.3% 57.8%"},yellow:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%",ring:"20 14.3% 4.1"}},dark:{default:{radius:"0.65rem",background:"240 10% 3.9%",foreground:"0 0% 98%",card:"240 10% 3.9%","card-foreground":"0 0% 98%",popover:"240 10% 3.9%","popover-foreground":"0 0% 98%",primary:"0 0% 98%","primary-foreground":"240 5.9% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"240 3.7% 15.9%","muted-foreground":"240 5% 64.9%",accent:"240 3.7% 15.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"240 4.9% 83.9%"},red:{radius:"0.65rem",background:"0 0% 3.9%",foreground:"0 0% 98%",card:"0 0% 3.9%","card-foreground":"0 0% 98%",popover:"0 0% 3.9%","popover-foreground":"0 0% 98%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 14.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 14.9%","muted-foreground":"0 0% 63.9%",accent:"0 0% 14.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"0 0% 14.9%",input:"0 0% 14.9%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"222.2 84% 4.9%",foreground:"210 40% 98%",card:"222.2 84% 4.9%","card-foreground":"210 40% 98%",popover:"222.2 84% 4.9%","popover-foreground":"210 40% 98%",primary:"217.2 91.2% 59.8%","primary-foreground":"222.2 47.4% 11.2%",secondary:"217.2 32.6% 17.5%","secondary-foreground":"210 40% 98%",muted:"217.2 32.6% 17.5%","muted-foreground":"215 20.2% 65.1%",accent:"217.2 32.6% 17.5%","accent-foreground":"210 40% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 40% 98%",border:"217.2 32.6% 17.5%",input:"217.2 32.6% 17.5%",ring:"224.3 76.3% 48%"},green:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"142.1 70.6% 45.3%","primary-foreground":"144.9 80.4% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"142.4 71.8% 29.2%"},orange:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"20.5 90.2% 48.2%","primary-foreground":"60 9.1% 97.8%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 72.2% 50.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"20.5 90.2% 48.2%"},rose:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"224 71.4% 4.1%",foreground:"210 20% 98%",card:"224 71.4% 4.1%","card-foreground":"210 20% 98%",popover:"224 71.4% 4.1%","popover-foreground":"210 20% 98%",primary:"263.4 70% 50.4%","primary-foreground":"210 20% 98%",secondary:"215 27.9% 16.9%","secondary-foreground":"210 20% 98%",muted:"215 27.9% 16.9%","muted-foreground":"217.9 10.6% 64.9%",accent:"215 27.9% 16.9%","accent-foreground":"210 20% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 20% 98%",border:"215 27.9% 16.9%",input:"215 27.9% 16.9%",ring:"263.4 70% 50.4%"},yellow:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 62.8% 30.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"35.5 91.7% 32.9%"}}},d=o.y({theme:"light",color:"default",borderRadius:"0.65rem"});function c(){const{theme:r,color:e,borderRadius:u}=o.b(d);return{theme:r,color:e,borderRadius:u}}const t={setTheme:r=>{o.v(d).setValue(e=>({...e,theme:r}))},setColor:r=>{o.v(d).setValue(e=>({...e,color:r}))},setBorderRadius:r=>{o.v(d).setValue(e=>({...e,borderRadius:r}))}};exports.THEME=n;exports.themeActions=t;exports.useTheme=c;
package/lib/theme.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as n } from "./react-c9FSfB30.js";
1
+ import { y as n, b as c, v as d } from "./index-BG0kQamI.js";
2
2
  const t = {
3
3
  light: {
4
4
  default: {
@@ -355,47 +355,41 @@ const t = {
355
355
  ring: "35.5 91.7% 32.9%"
356
356
  }
357
357
  }
358
- }, e = n((r) => ({
358
+ }, e = n({
359
359
  theme: "light",
360
360
  color: "default",
361
- borderRadius: "0.65rem",
362
- setTheme: (o) => {
363
- r(() => ({
364
- theme: o
365
- }));
366
- },
367
- setColor: (o) => {
368
- r(() => ({
369
- color: o
370
- }));
371
- },
372
- setBorderRadius: (o) => {
373
- r(() => ({
374
- borderRadius: o
375
- }));
376
- }
377
- }));
378
- function a() {
379
- const r = e((d) => d.theme), o = e((d) => d.color), u = e((d) => d.borderRadius);
361
+ borderRadius: "0.65rem"
362
+ });
363
+ function g() {
364
+ const { theme: r, color: o, borderRadius: u } = c(e);
380
365
  return {
381
366
  theme: r,
382
367
  color: o,
383
368
  borderRadius: u
384
369
  };
385
370
  }
386
- const g = {
371
+ const f = {
387
372
  setTheme: (r) => {
388
- e.getState().setTheme(r);
373
+ d(e).setValue((o) => ({
374
+ ...o,
375
+ theme: r
376
+ }));
389
377
  },
390
378
  setColor: (r) => {
391
- e.getState().setColor(r);
379
+ d(e).setValue((o) => ({
380
+ ...o,
381
+ color: r
382
+ }));
392
383
  },
393
384
  setBorderRadius: (r) => {
394
- e.getState().setBorderRadius(r);
385
+ d(e).setValue((o) => ({
386
+ ...o,
387
+ borderRadius: r
388
+ }));
395
389
  }
396
390
  };
397
391
  export {
398
392
  t as THEME,
399
- g as themeActions,
400
- a as useTheme
393
+ f as themeActions,
394
+ g as useTheme
401
395
  };
@@ -1,4 +1,4 @@
1
- import { N as C, n as L, a2 as W, m as z } from "./clsx-BWSGDJNJ.js";
1
+ import { N as C, n as L, a2 as W, m as z } from "./clsx-DSzxBzvL.js";
2
2
  var B = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, H = C.create({
3
3
  name: "image",
4
4
  addOptions() {
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),h=require("react"),N=require("@radix-ui/react-slot"),u=require("./index-D3RLYf-J.cjs");require("./theme.cjs");const R=require("./useButtonProps-DBJkNDS2.cjs"),a=require("./tooltip-BYtGp6FM.cjs"),O=require("@radix-ui/react-toggle"),f=require("./index-VhKd73hZ.cjs");function g(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return r.default=t,Object.freeze(r)}const S=g(h),p=g(O),w=h.forwardRef((t,r)=>{const{icon:i=void 0,tooltip:o=void 0,disabled:c=!1,customClass:m="",loading:P=void 0,shortcutKeys:n=void 0,tooltipOptions:v={},action:s=void 0,isActive:_=void 0,children:b,asChild:j=!1,upload:k=!1,initialDisplayedColor:D=void 0,dataState:q=!1,...T}=t,x=f.icons[i],y=j?N.Slot:l,C=d=>{if(c){d.preventDefault();return}s==null||s(d)};return e.jsxs(a.Tooltip,{children:[e.jsx(a.TooltipTrigger,{asChild:!0,children:e.jsxs(y,{className:u.cn("richtext-w-[32px] richtext-h-[32px]",m),"data-state":q?"on":"off",disabled:c,onClick:C,ref:r,size:"sm",...T,children:[x&&e.jsx(x,{className:"richtext-size-4"}),b]})}),o&&e.jsx(a.TooltipContent,{...v,className:"richtext-tooltip",children:e.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[e.jsx("div",{children:o}),!!(n!=null&&n.length)&&e.jsx("span",{children:R.getShortcutKeys(n)})]})})]})}),z=f.cva("richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",{variants:{variant:{default:"richtext-bg-transparent",outline:"richtext-border richtext-border-input richtext-bg-transparent hover:richtext-bg-accent hover:richtext-text-accent-foreground"},size:{default:"richtext-h-10 richtext-px-3",sm:"richtext-h-9 richtext-px-2",lg:"richtext-h-11 richtext-px-5"}},defaultVariants:{variant:"default",size:"default"}}),l=S.forwardRef(({className:t,variant:r,size:i,...o},c)=>e.jsx(p.Root,{ref:c,className:u.cn(z({variant:r,size:i,className:t})),...o}));l.displayName=p.Root.displayName;exports.ActionButton=w;exports.Toggle=l;
1
+ "use strict";const e=require("react/jsx-runtime"),h=require("react"),N=require("@radix-ui/react-slot"),u=require("./index-Cn-t3Zxw.cjs");require("./theme.cjs");const R=require("./useButtonProps-Cz4W5dC8.cjs"),a=require("./tooltip-FS1rsvd3.cjs"),O=require("@radix-ui/react-toggle"),f=require("./index-VhKd73hZ.cjs");function g(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return r.default=t,Object.freeze(r)}const S=g(h),p=g(O),w=h.forwardRef((t,r)=>{const{icon:i=void 0,tooltip:o=void 0,disabled:c=!1,customClass:m="",loading:P=void 0,shortcutKeys:n=void 0,tooltipOptions:v={},action:s=void 0,isActive:_=void 0,children:b,asChild:j=!1,upload:k=!1,initialDisplayedColor:D=void 0,dataState:q=!1,...T}=t,x=f.icons[i],y=j?N.Slot:l,C=d=>{if(c){d.preventDefault();return}s==null||s(d)};return e.jsxs(a.Tooltip,{children:[e.jsx(a.TooltipTrigger,{asChild:!0,children:e.jsxs(y,{className:u.cn("richtext-w-[32px] richtext-h-[32px]",m),"data-state":q?"on":"off",disabled:c,onClick:C,ref:r,size:"sm",...T,children:[x&&e.jsx(x,{className:"richtext-size-4"}),b]})}),o&&e.jsx(a.TooltipContent,{...v,className:"richtext-tooltip",children:e.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[e.jsx("div",{children:o}),!!(n!=null&&n.length)&&e.jsx("span",{children:R.getShortcutKeys(n)})]})})]})}),z=f.cva("richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",{variants:{variant:{default:"richtext-bg-transparent",outline:"richtext-border richtext-border-input richtext-bg-transparent hover:richtext-bg-accent hover:richtext-text-accent-foreground"},size:{default:"richtext-h-10 richtext-px-3",sm:"richtext-h-9 richtext-px-2",lg:"richtext-h-11 richtext-px-5"}},defaultVariants:{variant:"default",size:"default"}}),l=S.forwardRef(({className:t,variant:r,size:i,...o},c)=>e.jsx(p.Root,{ref:c,className:u.cn(z({variant:r,size:i,className:t})),...o}));l.displayName=p.Root.displayName;exports.ActionButton=w;exports.Toggle=l;
@@ -2,12 +2,12 @@ import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
2
  import * as N from "react";
3
3
  import R from "react";
4
4
  import { Slot as y } from "@radix-ui/react-slot";
5
- import { c as x } from "./index-DF5ZPtWM.js";
5
+ import { c as x } from "./index-DoiuU6VA.js";
6
6
  import "./theme.js";
7
- import { g as w } from "./useButtonProps-DVP4s_ER.js";
8
- import { T as z, a as j, b as k } from "./tooltip-DNKq7zgN.js";
7
+ import { g as w } from "./useButtonProps-CtZCbMQu.js";
8
+ import { T as z, a as j, b as k } from "./tooltip-BJIvosho.js";
9
9
  import * as d from "@radix-ui/react-toggle";
10
- import { i as A, c as S } from "./index-CcoWj0mF.js";
10
+ import { i as A, c as S } from "./index-CL7JP-Xz.js";
11
11
  const K = R.forwardRef(
12
12
  (o, c) => {
13
13
  const {
@@ -1,7 +1,7 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
3
  import * as t from "@radix-ui/react-tooltip";
4
- import { c } from "./index-DF5ZPtWM.js";
4
+ import { c } from "./index-DoiuU6VA.js";
5
5
  const x = t.Provider, h = t.Root, p = t.Trigger, s = d.forwardRef(({ className: i, sideOffset: r = 4, ...e }, o) => /* @__PURE__ */ a(
6
6
  t.Content,
7
7
  {
@@ -1 +1 @@
1
- "use strict";const a=require("react/jsx-runtime"),d=require("react"),s=require("@radix-ui/react-tooltip"),l=require("./index-D3RLYf-J.cjs");function n(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return i.default=t,Object.freeze(i)}const p=n(d),r=n(s),m=r.Provider,x=r.Root,h=r.Trigger,c=p.forwardRef(({className:t,sideOffset:i=4,...e},o)=>a.jsx(r.Content,{"data-richtext-portal":!0,ref:o,sideOffset:i,className:l.cn("richtext-z-50 richtext-overflow-hidden richtext-rounded-md richtext-bg-primary richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-primary-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2 !richtext-border-none",t),...e}));c.displayName=r.Content.displayName;exports.Tooltip=x;exports.TooltipContent=c;exports.TooltipProvider=m;exports.TooltipTrigger=h;
1
+ "use strict";const a=require("react/jsx-runtime"),d=require("react"),s=require("@radix-ui/react-tooltip"),l=require("./index-Cn-t3Zxw.cjs");function n(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return i.default=t,Object.freeze(i)}const p=n(d),r=n(s),m=r.Provider,x=r.Root,h=r.Trigger,c=p.forwardRef(({className:t,sideOffset:i=4,...e},o)=>a.jsx(r.Content,{"data-richtext-portal":!0,ref:o,sideOffset:i,className:l.cn("richtext-z-50 richtext-overflow-hidden richtext-rounded-md richtext-bg-primary richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-primary-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2 !richtext-border-none",t),...e}));c.displayName=r.Content.displayName;exports.Tooltip=x;exports.TooltipContent=c;exports.TooltipProvider=m;exports.TooltipTrigger=h;
@@ -1,5 +1,5 @@
1
- import { c as a, s as n, f as l } from "./index-BDKHXe7R.js";
2
- import { d as p } from "./clsx-BWSGDJNJ.js";
1
+ import { c as a, s as n, f as l } from "./index-D8li6EQ4.js";
2
+ import { d as p } from "./clsx-DSzxBzvL.js";
3
3
  function m(o, t) {
4
4
  a({
5
5
  getBoundingClientRect: () => p(o.view, o.state.selection.from, o.state.selection.to)
@@ -1,8 +1,8 @@
1
1
  import * as E from "react";
2
2
  import { useState as m, useEffect as b, useMemo as a } from "react";
3
- import { a as S } from "./index-DF5ZPtWM.js";
4
- import { O as h, P as C } from "./clsx-BWSGDJNJ.js";
5
- import { u as M } from "./index-Dujzr6bY.js";
3
+ import { a as S } from "./index-DoiuU6VA.js";
4
+ import { O as h, P as C } from "./clsx-DSzxBzvL.js";
5
+ import { u as M } from "./index-C07N8gA1.js";
6
6
  let l;
7
7
  function p() {
8
8
  return l === void 0 && (l = navigator.platform.includes("Mac")), l;
@@ -130,7 +130,7 @@ export {
130
130
  T as f,
131
131
  F as g,
132
132
  x as h,
133
- R as i,
134
- V as j,
133
+ V as i,
134
+ R as j,
135
135
  B as u
136
136
  };
@@ -1 +1 @@
1
- "use strict";const s=require("react"),b=require("./index-D3RLYf-J.cjs"),m=require("./clsx-CXbNJWDD.cjs"),M=require("./index-Doks9cbR.cjs");function h(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const x=h(s);let l;function p(){return l===void 0&&(l=navigator.platform.includes("Mac")),l}function g(t){return`${t}`.toLowerCase()==="mod"?p()?"⌘":"Ctrl":`${t}`.toLowerCase()==="alt"?p()?"⌥":"Alt":`${t}`.toLowerCase()==="shift"?p()?"⇧":"Shift":t}function y(t){return t.map(g).join(" ")}function C(t){const{editor:e}=m.useCurrentEditor(),n=x.useMemo(()=>e,[t,e]);return m.useEditorState({editor:n,selector(r){return r.editor?{editor:r.editor,editorState:r.editor.state,canCommand:r.editor.can}:{editor:null,editorState:void 0,canCommand:void 0}}})||{editor:null}}function f(){return C().editor}const S=()=>!1;function D(t=S){const e=b.useEditableEditor(),[n,o]=s.useState(()=>{const u=t();return typeof u=="boolean"?!u:u}),r=f();s.useEffect(()=>{if(!r||!t)return;const u=()=>{const c=t();o(typeof c=="boolean"?!c:c)};return u(),r.on("selectionUpdate",u),r.on("transaction",u),()=>{r.off("selectionUpdate",u),r.off("transaction",u)}},[r,t]);const a=s.useMemo(()=>!e||!r?!0:typeof n=="boolean"?n:!1,[e,r,n]),i=s.useMemo(()=>!e||!r,[e,r]);return{disabled:a,dataState:n,editorDisabled:i}}function N(t=S){const e=b.useEditableEditor(),[n,o]=s.useState({}),[r,a]=s.useState(t()),i=f();s.useEffect(()=>{if(!i||!t)return;const d=()=>{a(t())};return d(),i.on("selectionUpdate",d),()=>{i.off("selectionUpdate",d)}},[n,i,t]);const u=s.useMemo(()=>!e||!i,[e,i]),c=s.useMemo(()=>!e||!i,[e,i]);return{disabled:u,dataState:r,editorDisabled:c,update:()=>o({})}}function E(t){const e=f();return s.useMemo(()=>e?e.extensionManager.extensions.find(o=>o.name===t):null,[e,t])}function O(t,e,n){return t<e?e:t>n?n:t}const U=t=>typeof t=="number",P=t=>typeof t=="string",j=t=>typeof t=="function";function $(t,e="px"){if(!t)return t;const n=U(t)?String(t):t,o=Number.parseFloat(n),r=n.match(/[%a-z]+$/i),a=r?r[0]:e;return Number.isNaN(o)?t:o+a}function q(t,e){if(!t)return!1;const{extensions:n=[]}=(t==null?void 0:t.extensionManager)??{};return!!n.find(r=>r.name===e)}function w(t){return t.map(e=>P(e)?{value:e,name:e}:e)}function K(t){const e=f(),n=E(t),{t:o}=M.useLocale();return s.useMemo(()=>{if(!e||!n||!o)return null;const{button:r}=n.options;return!r||!j(r)?null:r({editor:e,extension:n,t:o})},[e,n,o])}exports.clamp=O;exports.ensureNameValueOptions=w;exports.getCssUnitWithDefault=$;exports.getShortcutKey=g;exports.getShortcutKeys=y;exports.hasExtension=q;exports.useActive=D;exports.useButtonProps=K;exports.useEditorInstance=f;exports.useExtension=E;exports.useToggleActive=N;
1
+ "use strict";const s=require("react"),b=require("./index-Cn-t3Zxw.cjs"),m=require("./clsx-CXbNJWDD.cjs"),M=require("./index-BsFvo9PG.cjs");function h(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const x=h(s);let l;function p(){return l===void 0&&(l=navigator.platform.includes("Mac")),l}function g(t){return`${t}`.toLowerCase()==="mod"?p()?"⌘":"Ctrl":`${t}`.toLowerCase()==="alt"?p()?"⌥":"Alt":`${t}`.toLowerCase()==="shift"?p()?"⇧":"Shift":t}function y(t){return t.map(g).join(" ")}function C(t){const{editor:e}=m.useCurrentEditor(),n=x.useMemo(()=>e,[t,e]);return m.useEditorState({editor:n,selector(r){return r.editor?{editor:r.editor,editorState:r.editor.state,canCommand:r.editor.can}:{editor:null,editorState:void 0,canCommand:void 0}}})||{editor:null}}function f(){return C().editor}const S=()=>!1;function D(t=S){const e=b.useEditableEditor(),[n,o]=s.useState(()=>{const u=t();return typeof u=="boolean"?!u:u}),r=f();s.useEffect(()=>{if(!r||!t)return;const u=()=>{const c=t();o(typeof c=="boolean"?!c:c)};return u(),r.on("selectionUpdate",u),r.on("transaction",u),()=>{r.off("selectionUpdate",u),r.off("transaction",u)}},[r,t]);const a=s.useMemo(()=>!e||!r?!0:typeof n=="boolean"?n:!1,[e,r,n]),i=s.useMemo(()=>!e||!r,[e,r]);return{disabled:a,dataState:n,editorDisabled:i}}function N(t=S){const e=b.useEditableEditor(),[n,o]=s.useState({}),[r,a]=s.useState(t()),i=f();s.useEffect(()=>{if(!i||!t)return;const d=()=>{a(t())};return d(),i.on("selectionUpdate",d),()=>{i.off("selectionUpdate",d)}},[n,i,t]);const u=s.useMemo(()=>!e||!i,[e,i]),c=s.useMemo(()=>!e||!i,[e,i]);return{disabled:u,dataState:r,editorDisabled:c,update:()=>o({})}}function E(t){const e=f();return s.useMemo(()=>e?e.extensionManager.extensions.find(o=>o.name===t):null,[e,t])}function O(t,e,n){return t<e?e:t>n?n:t}const U=t=>typeof t=="number",P=t=>typeof t=="string",j=t=>typeof t=="function";function $(t,e="px"){if(!t)return t;const n=U(t)?String(t):t,o=Number.parseFloat(n),r=n.match(/[%a-z]+$/i),a=r?r[0]:e;return Number.isNaN(o)?t:o+a}function q(t,e){if(!t)return!1;const{extensions:n=[]}=(t==null?void 0:t.extensionManager)??{};return!!n.find(r=>r.name===e)}function w(t){return t.map(e=>P(e)?{value:e,name:e}:e)}function K(t){const e=f(),n=E(t),{t:o}=M.useLocale();return s.useMemo(()=>{if(!e||!n||!o)return null;const{button:r}=n.options;return!r||!j(r)?null:r({editor:e,extension:n,t:o})},[e,n,o])}exports.clamp=O;exports.ensureNameValueOptions=w;exports.getCssUnitWithDefault=$;exports.getShortcutKey=g;exports.getShortcutKeys=y;exports.hasExtension=q;exports.useActive=D;exports.useButtonProps=K;exports.useEditorInstance=f;exports.useExtension=E;exports.useToggleActive=N;
@@ -0,0 +1,6 @@
1
+ export declare function renderNodeViewClosure(node: any): () => {
2
+ onStart: (props: any) => void;
3
+ onUpdate(props: any): void;
4
+ onKeyDown(props: any): any;
5
+ onExit(): void;
6
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reactjs-tiptap-editor",
3
3
  "type": "module",
4
- "version": "1.0.14",
4
+ "version": "1.0.16",
5
5
  "packageManager": "pnpm@8.15.9",
6
6
  "description": "A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React",
7
7
  "license": "MIT",
@@ -528,7 +528,7 @@
528
528
  "default": "./lib/Video.js"
529
529
  }
530
530
  },
531
- "./callout": {
531
+ "./callout": {
532
532
  "require": {
533
533
  "types": "./lib/extensions/Callout/index.d.ts",
534
534
  "default": "./lib/Callout.cjs"
@@ -792,11 +792,11 @@
792
792
  "react-colorful": "^5.6.1",
793
793
  "react-image-crop": "^11.0.10",
794
794
  "react-tweet": "^3.3.0",
795
+ "reactjs-signal": "^2.0.4",
795
796
  "scroll-into-view-if-needed": "^3.1.0",
796
797
  "svg64": "^2.0.0",
797
798
  "y-protocols": "^1.0.7",
798
- "yjs": "^13.6.28",
799
- "zustand": "^5.0.9"
799
+ "yjs": "^13.6.28"
800
800
  },
801
801
  "devDependencies": {
802
802
  "@hunghg255/eslint-config": "^1.0.1",
@@ -1,4 +0,0 @@
1
- "use strict";const Fr=require("./clsx-CXbNJWDD.cjs"),Y=require("react/jsx-runtime"),ur=require("react"),Za=require("katex"),Ro=require("./toggle-BQHMh_Q-.cjs");require("./index-D3RLYf-J.cjs");require("./theme.cjs");const Cr=require("./dialog-Bt5zwGYB.cjs"),ln=require("./textarea-BDO6XQoF.cjs"),ae=require("./useButtonProps-DBJkNDS2.cjs"),Br=require("./_commonjsHelpers-BTDuMlIz.cjs"),$o=require("./index-Doks9cbR.cjs"),cn=require("./label-JNOksCA-.cjs"),xo=require("./button-BS3n6_Aq.cjs");var oe,pn;function ro(){if(pn)return oe;pn=1;var r=Object.prototype.toString;return oe=function(n){var o=r.call(n),t=o==="[object Arguments]";return t||(t=o!=="[object Array]"&&n!==null&&typeof n=="object"&&typeof n.length=="number"&&n.length>=0&&r.call(n.callee)==="[object Function]"),t},oe}var ie,yn;function Eo(){if(yn)return ie;yn=1;var r;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=ro(),t=Object.prototype.propertyIsEnumerable,f=!t.call({toString:null},"toString"),i=t.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(y){var h=y.constructor;return h&&h.prototype===y},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},v=(function(){if(typeof window>"u")return!1;for(var y in window)try{if(!c["$"+y]&&e.call(window,y)&&window[y]!==null&&typeof window[y]=="object")try{u(window[y])}catch{return!0}}catch{return!0}return!1})(),p=function(y){if(typeof window>"u"||!v)return u(y);try{return u(y)}catch{return!1}};r=function(h){var S=h!==null&&typeof h=="object",R=n.call(h)==="[object Function]",q=o(h),w=S&&n.call(h)==="[object String]",O=[];if(!S&&!R&&!q)throw new TypeError("Object.keys called on a non-object");var m=i&&R;if(w&&h.length>0&&!e.call(h,0))for(var j=0;j<h.length;++j)O.push(String(j));if(q&&h.length>0)for(var Q=0;Q<h.length;++Q)O.push(String(Q));else for(var H in h)!(m&&H==="prototype")&&e.call(h,H)&&O.push(String(H));if(f)for(var F=p(h),D=0;D<a.length;++D)!(F&&a[D]==="constructor")&&e.call(h,a[D])&&O.push(a[D]);return O}}return ie=r,ie}var ue,vn;function Lt(){if(vn)return ue;vn=1;var r=Array.prototype.slice,e=ro(),n=Object.keys,o=n?function(i){return n(i)}:Eo(),t=Object.keys;return o.shim=function(){if(Object.keys){var i=(function(){var a=Object.keys(arguments);return a&&a.length===arguments.length})(1,2);i||(Object.keys=function(u){return e(u)?t(r.call(u)):t(u)})}else Object.keys=o;return Object.keys||o},ue=o,ue}var fe,gn;function zr(){if(gn)return fe;gn=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return fe=r,fe}var se,hn;function Ut(){return hn||(hn=1,se=SyntaxError),se}var le,dn;function nr(){return dn||(dn=1,le=TypeError),le}var ce,mn;function Bo(){return mn||(mn=1,ce=Object.getOwnPropertyDescriptor),ce}var pe,Sn;function qr(){if(Sn)return pe;Sn=1;var r=Bo();if(r)try{r([],"length")}catch{r=null}return pe=r,pe}var ye,bn;function Ht(){if(bn)return ye;bn=1;var r=zr(),e=Ut(),n=nr(),o=qr();return ye=function(f,i,a){if(!f||typeof f!="object"&&typeof f!="function")throw new n("`obj` must be an object or a function`");if(typeof i!="string"&&typeof i!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,v=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,y=!!o&&o(f,i);if(r)r(f,i,{configurable:v===null&&y?y.configurable:!v,enumerable:u===null&&y?y.enumerable:!u,value:a,writable:c===null&&y?y.writable:!c});else if(p||!u&&!c&&!v)f[i]=a;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ye}var ve,An;function Gt(){if(An)return ve;An=1;var r=zr(),e=function(){return!!r};return e.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},ve=e,ve}var ge,On;function wr(){if(On)return ge;On=1;var r=Lt(),e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,o=Array.prototype.concat,t=Ht(),f=function(c){return typeof c=="function"&&n.call(c)==="[object Function]"},i=Gt()(),a=function(c,v,p,y){if(v in c){if(y===!0){if(c[v]===p)return}else if(!f(y)||!y())return}i?t(c,v,p,!0):t(c,v,p)},u=function(c,v){var p=arguments.length>2?arguments[2]:{},y=r(v);e&&(y=o.call(y,Object.getOwnPropertySymbols(v)));for(var h=0;h<y.length;h+=1)a(c,y[h],v[y[h]],p[y[h]])};return u.supportsDescriptors=!!i,ge=u,ge}var he={exports:{}},de,qn;function zt(){return qn||(qn=1,de=Object),de}var me,wn;function eo(){return wn||(wn=1,me=Error),me}var Se,In;function jo(){return In||(In=1,Se=EvalError),Se}var be,Pn;function To(){return Pn||(Pn=1,be=RangeError),be}var Ae,Rn;function Mo(){return Rn||(Rn=1,Ae=ReferenceError),Ae}var Oe,$n;function Co(){return $n||($n=1,Oe=URIError),Oe}var qe,xn;function Do(){return xn||(xn=1,qe=Math.abs),qe}var we,En;function Fo(){return En||(En=1,we=Math.floor),we}var Ie,Bn;function _o(){return Bn||(Bn=1,Ie=Math.max),Ie}var Pe,jn;function No(){return jn||(jn=1,Pe=Math.min),Pe}var Re,Tn;function Wo(){return Tn||(Tn=1,Re=Math.pow),Re}var $e,Mn;function ko(){return Mn||(Mn=1,$e=Math.round),$e}var xe,Cn;function Lo(){return Cn||(Cn=1,xe=Number.isNaN||function(e){return e!==e}),xe}var Ee,Dn;function Uo(){if(Dn)return Ee;Dn=1;var r=Lo();return Ee=function(n){return r(n)||n===0?n:n<0?-1:1},Ee}var Be,Fn;function Vr(){return Fn||(Fn=1,Be=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var t=42;e[n]=t;for(var f in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==t||a.enumerable!==!0)return!1}return!0}),Be}var je,_n;function Vt(){if(_n)return je;_n=1;var r=typeof Symbol<"u"&&Symbol,e=Vr();return je=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},je}var Te,Nn;function to(){return Nn||(Nn=1,Te=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Te}var Me,Wn;function no(){if(Wn)return Me;Wn=1;var r=zt();return Me=r.getPrototypeOf||null,Me}var Ce,kn;function Ho(){if(kn)return Ce;kn=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,n=Math.max,o="[object Function]",t=function(u,c){for(var v=[],p=0;p<u.length;p+=1)v[p]=u[p];for(var y=0;y<c.length;y+=1)v[y+u.length]=c[y];return v},f=function(u,c){for(var v=[],p=c,y=0;p<u.length;p+=1,y+=1)v[y]=u[p];return v},i=function(a,u){for(var c="",v=0;v<a.length;v+=1)c+=a[v],v+1<a.length&&(c+=u);return c};return Ce=function(u){var c=this;if(typeof c!="function"||e.apply(c)!==o)throw new TypeError(r+c);for(var v=f(arguments,1),p,y=function(){if(this instanceof p){var w=c.apply(this,t(v,arguments));return Object(w)===w?w:this}return c.apply(u,t(v,arguments))},h=n(0,c.length-v.length),S=[],R=0;R<h;R++)S[R]="$"+R;if(p=Function("binder","return function ("+i(S,",")+"){ return binder.apply(this,arguments); }")(y),c.prototype){var q=function(){};q.prototype=c.prototype,p.prototype=new q,q.prototype=null}return p},Ce}var De,Ln;function _r(){if(Ln)return De;Ln=1;var r=Ho();return De=Function.prototype.bind||r,De}var Fe,Un;function Kt(){return Un||(Un=1,Fe=Function.prototype.call),Fe}var _e,Hn;function Jt(){return Hn||(Hn=1,_e=Function.prototype.apply),_e}var Ne,Gn;function Go(){return Gn||(Gn=1,Ne=typeof Reflect<"u"&&Reflect&&Reflect.apply),Ne}var We,zn;function ao(){if(zn)return We;zn=1;var r=_r(),e=Jt(),n=Kt(),o=Go();return We=o||r.call(n,e),We}var ke,Vn;function Yt(){if(Vn)return ke;Vn=1;var r=_r(),e=nr(),n=Kt(),o=ao();return ke=function(f){if(f.length<1||typeof f[0]!="function")throw new e("a function is required");return o(r,n,f)},ke}var Le,Kn;function zo(){if(Kn)return Le;Kn=1;var r=Yt(),e=qr(),n;try{n=[].__proto__===Array.prototype}catch(i){if(!i||typeof i!="object"||!("code"in i)||i.code!=="ERR_PROTO_ACCESS")throw i}var o=!!n&&e&&e(Object.prototype,"__proto__"),t=Object,f=t.getPrototypeOf;return Le=o&&typeof o.get=="function"?r([o.get]):typeof f=="function"?function(a){return f(a==null?a:t(a))}:!1,Le}var Ue,Jn;function Xt(){if(Jn)return Ue;Jn=1;var r=to(),e=no(),n=zo();return Ue=r?function(t){return r(t)}:e?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return e(t)}:n?function(t){return n(t)}:null,Ue}var He,Yn;function Qt(){if(Yn)return He;Yn=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=_r();return He=n.call(r,e),He}var Ge,Xn;function yr(){if(Xn)return Ge;Xn=1;var r,e=zt(),n=eo(),o=jo(),t=To(),f=Mo(),i=Ut(),a=nr(),u=Co(),c=Do(),v=Fo(),p=_o(),y=No(),h=Wo(),S=ko(),R=Uo(),q=Function,w=function(M){try{return q('"use strict"; return ('+M+").constructor;")()}catch{}},O=qr(),m=zr(),j=function(){throw new a},Q=O?(function(){try{return arguments.callee,j}catch{try{return O(arguments,"callee").get}catch{return j}}})():j,H=Vt()(),F=Xt(),D=no(),I=to(),_=Jt(),L=Kt(),N={},U=typeof Uint8Array>"u"||!F?r:F(Uint8Array),V={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":H&&F?F([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":o,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":q,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":H&&F?F(F([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!H||!F?r:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":O,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":t,"%ReferenceError%":f,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!H||!F?r:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":H&&F?F(""[Symbol.iterator]()):r,"%Symbol%":H?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":Q,"%TypedArray%":U,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":_,"%Object.defineProperty%":m,"%Object.getPrototypeOf%":D,"%Math.abs%":c,"%Math.floor%":v,"%Math.max%":p,"%Math.min%":y,"%Math.pow%":h,"%Math.round%":S,"%Math.sign%":R,"%Reflect.getPrototypeOf%":I};if(F)try{null.error}catch(M){var fr=F(F(M));V["%Error.prototype%"]=fr}var Pr=function M(A){var P;if(A==="%AsyncFunction%")P=w("async function () {}");else if(A==="%GeneratorFunction%")P=w("function* () {}");else if(A==="%AsyncGeneratorFunction%")P=w("async function* () {}");else if(A==="%AsyncGenerator%"){var b=M("%AsyncGeneratorFunction%");b&&(P=b.prototype)}else if(A==="%AsyncIteratorPrototype%"){var E=M("%AsyncGenerator%");E&&F&&(P=F(E.prototype))}return V[A]=P,P},Sr={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ar=_r(),G=Qt(),br=ar.call(L,Array.prototype.concat),Rr=ar.call(_,Array.prototype.splice),Ar=ar.call(L,String.prototype.replace),vr=ar.call(L,String.prototype.slice),g=ar.call(L,RegExp.prototype.exec),d=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,x=/\\(\\)?/g,$=function(A){var P=vr(A,0,1),b=vr(A,-1);if(P==="%"&&b!=="%")throw new i("invalid intrinsic syntax, expected closing `%`");if(b==="%"&&P!=="%")throw new i("invalid intrinsic syntax, expected opening `%`");var E=[];return Ar(A,d,function(z,K,J,X){E[E.length]=J?Ar(X,x,"$1"):K||z}),E},T=function(A,P){var b=A,E;if(G(Sr,b)&&(E=Sr[b],b="%"+E[0]+"%"),G(V,b)){var z=V[b];if(z===N&&(z=Pr(b)),typeof z>"u"&&!P)throw new a("intrinsic "+A+" exists, but is not available. Please file an issue!");return{alias:E,name:b,value:z}}throw new i("intrinsic "+A+" does not exist!")};return Ge=function(A,P){if(typeof A!="string"||A.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof P!="boolean")throw new a('"allowMissing" argument must be a boolean');if(g(/^%?[^%]*%?$/,A)===null)throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var b=$(A),E=b.length>0?b[0]:"",z=T("%"+E+"%",P),K=z.name,J=z.value,X=!1,rr=z.alias;rr&&(E=rr[0],Rr(b,br([0,1],rr)));for(var sr=1,or=!0;sr<b.length;sr+=1){var er=b[sr],lr=vr(er,0,1),cr=vr(er,-1);if((lr==='"'||lr==="'"||lr==="`"||cr==='"'||cr==="'"||cr==="`")&&lr!==cr)throw new i("property names with quotes must have matching quotes");if((er==="constructor"||!or)&&(X=!0),E+="."+er,K="%"+E+"%",G(V,K))J=V[K];else if(J!=null){if(!(er in J)){if(!P)throw new a("base intrinsic for "+A+" exists, but the property is not available.");return}if(O&&sr+1>=b.length){var pr=O(J,er);or=!!pr,or&&"get"in pr&&!("originalValue"in pr.get)?J=pr.get:J=J[er]}else or=G(J,er),J=J[er];or&&!X&&(V[K]=J)}}return J},Ge}var ze,Qn;function Vo(){if(Qn)return ze;Qn=1;var r=yr(),e=Ht(),n=Gt()(),o=qr(),t=nr(),f=r("%Math.floor%");return ze=function(a,u){if(typeof a!="function")throw new t("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||f(u)!==u)throw new t("`length` must be a positive 32-bit integer");var c=arguments.length>2&&!!arguments[2],v=!0,p=!0;if("length"in a&&o){var y=o(a,"length");y&&!y.configurable&&(v=!1),y&&!y.writable&&(p=!1)}return(v||p||!c)&&(n?e(a,"length",u,!0,!0):e(a,"length",u)),a},ze}var Ve,Zn;function Ko(){if(Zn)return Ve;Zn=1;var r=_r(),e=Jt(),n=ao();return Ve=function(){return n(r,e,arguments)},Ve}var ra;function jr(){return ra||(ra=1,(function(r){var e=Vo(),n=zr(),o=Yt(),t=Ko();r.exports=function(i){var a=o(arguments),u=i.length-(arguments.length-1);return e(a,1+(u>0?u:0),!0)},n?n(r.exports,"apply",{value:t}):r.exports.apply=t})(he)),he.exports}var Ke,ea;function Z(){if(ea)return Ke;ea=1;var r=yr(),e=Yt(),n=e([r("%String.prototype.indexOf%")]);return Ke=function(t,f){var i=r(t,!!f);return typeof i=="function"&&n(t,".prototype.")>-1?e([i]):i},Ke}var Je,ta;function oo(){if(ta)return Je;ta=1;var r=Lt(),e=Vr()(),n=Z(),o=zt(),t=n("Array.prototype.push"),f=n("Object.prototype.propertyIsEnumerable"),i=e?o.getOwnPropertySymbols:null;return Je=function(u,c){if(u==null)throw new TypeError("target must be an object");var v=o(u);if(arguments.length===1)return v;for(var p=1;p<arguments.length;++p){var y=o(arguments[p]),h=r(y),S=e&&(o.getOwnPropertySymbols||i);if(S)for(var R=S(y),q=0;q<R.length;++q){var w=R[q];f(y,w)&&t(h,w)}for(var O=0;O<h.length;++O){var m=h[O];if(f(y,m)){var j=y[m];v[m]=j}}}return v},Je}var Ye,na;function io(){if(na)return Ye;na=1;var r=oo(),e=function(){if(!Object.assign)return!1;for(var o="abcdefghijklmnopqrst",t=o.split(""),f={},i=0;i<t.length;++i)f[t[i]]=t[i];var a=Object.assign({},f),u="";for(var c in a)u+=c;return o!==u},n=function(){if(!Object.assign||!Object.preventExtensions)return!1;var o=Object.preventExtensions({1:2});try{Object.assign(o,"xy")}catch{return o[1]==="y"}return!1};return Ye=function(){return!Object.assign||e()||n()?r:Object.assign},Ye}var Xe,aa;function Jo(){if(aa)return Xe;aa=1;var r=wr(),e=io();return Xe=function(){var o=e();return r(Object,{assign:o},{assign:function(){return Object.assign!==o}}),o},Xe}var Qe,oa;function Yo(){if(oa)return Qe;oa=1;var r=wr(),e=jr(),n=oo(),o=io(),t=Jo(),f=e.apply(o()),i=function(u,c){return f(Object,arguments)};return r(i,{getPolyfill:o,implementation:n,shim:t}),Qe=i,Qe}var Ze,ia;function uo(){if(ia)return Ze;ia=1;var r=yr(),e=jr(),n=e(r("String.prototype.indexOf"));return Ze=function(t,f){var i=r(t,!!f);return typeof i=="function"&&n(t,".prototype.")>-1?e(i):i},Ze}var rt,ua;function Xo(){if(ua)return rt;ua=1;var r=function(){return typeof(function(){}).name=="string"},e=Object.getOwnPropertyDescriptor;if(e)try{e([],"length")}catch{e=null}r.functionsHaveConfigurableNames=function(){if(!r()||!e)return!1;var t=e(function(){},"name");return!!t&&!!t.configurable};var n=Function.prototype.bind;return r.boundFunctionsHaveNames=function(){return r()&&typeof n=="function"&&(function(){}).bind().name!==""},rt=r,rt}var et,fa;function Qo(){if(fa)return et;fa=1;var r=Ht(),e=Gt()(),n=Xo().functionsHaveConfigurableNames(),o=nr();return et=function(f,i){if(typeof f!="function")throw new o("`fn` is not a function");var a=arguments.length>2&&!!arguments[2];return(!a||n)&&(e?r(f,"name",i,!0,!0):r(f,"name",i)),f},et}var tt,sa;function fo(){if(sa)return tt;sa=1;var r=Qo(),e=nr(),n=Object;return tt=r(function(){if(this==null||this!==n(this))throw new e("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),tt}var nt,la;function so(){if(la)return nt;la=1;var r=fo(),e=wr().supportsDescriptors,n=Object.getOwnPropertyDescriptor;return nt=function(){if(e&&/a/mig.flags==="gim"){var t=n(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var f="",i={};if(Object.defineProperty(i,"hasIndices",{get:function(){f+="d"}}),Object.defineProperty(i,"sticky",{get:function(){f+="y"}}),t.get.call(i),f==="dy")return t.get}}return r},nt}var at,ca;function Zo(){if(ca)return at;ca=1;var r=wr().supportsDescriptors,e=so(),n=qr(),o=Object.defineProperty,t=eo(),f=Xt(),i=/a/;return at=function(){if(!r||!f)throw new t("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=e(),c=f(i),v=n(c,"flags");return(!v||v.get!==u)&&o(c,"flags",{configurable:!0,enumerable:!1,get:u}),u},at}var ot,pa;function ri(){if(pa)return ot;pa=1;var r=wr(),e=jr(),n=fo(),o=so(),t=Zo(),f=e(o());return r(f,{getPolyfill:o,implementation:n,shim:t}),ot=f,ot}var Dr={exports:{}},it,ya;function Ir(){if(ya)return it;ya=1;var r=Vr();return it=function(){return r()&&!!Symbol.toStringTag},it}var ut,va;function lo(){if(va)return ut;va=1;var r=Ir()(),e=Z(),n=e("Object.prototype.toString"),o=function(a){return r&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:n(a)==="[object Arguments]"},t=function(a){return o(a)?!0:a!==null&&typeof a=="object"&&"length"in a&&typeof a.length=="number"&&a.length>=0&&n(a)!=="[object Array]"&&"callee"in a&&n(a.callee)==="[object Function]"},f=(function(){return o(arguments)})();return o.isLegacyArguments=t,ut=f?o:t,ut}const ei={},ti=Object.freeze(Object.defineProperty({__proto__:null,default:ei},Symbol.toStringTag,{value:"Module"})),ni=Br.getAugmentedNamespace(ti);var ft,ga;function Kr(){if(ga)return ft;ga=1;var r=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=r&&e&&typeof e.get=="function"?e.get:null,o=r&&Map.prototype.forEach,t=typeof Set=="function"&&Set.prototype,f=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,i=t&&f&&typeof f.get=="function"?f.get:null,a=t&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,c=u?WeakMap.prototype.has:null,v=typeof WeakSet=="function"&&WeakSet.prototype,p=v?WeakSet.prototype.has:null,y=typeof WeakRef=="function"&&WeakRef.prototype,h=y?WeakRef.prototype.deref:null,S=Boolean.prototype.valueOf,R=Object.prototype.toString,q=Function.prototype.toString,w=String.prototype.match,O=String.prototype.slice,m=String.prototype.replace,j=String.prototype.toUpperCase,Q=String.prototype.toLowerCase,H=RegExp.prototype.test,F=Array.prototype.concat,D=Array.prototype.join,I=Array.prototype.slice,_=Math.floor,L=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,V=typeof Symbol=="function"&&typeof Symbol.iterator=="object",fr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===V||!0)?Symbol.toStringTag:null,Pr=Object.prototype.propertyIsEnumerable,Sr=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(s){return s.__proto__}:null);function ar(s,l){if(s===1/0||s===-1/0||s!==s||s&&s>-1e3&&s<1e3||H.call(/e/,l))return l;var C=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof s=="number"){var W=s<0?-_(-s):_(s);if(W!==s){var k=String(W),B=O.call(l,k.length+1);return m.call(k,C,"$&_")+"."+m.call(m.call(B,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(l,C,"$&_")}var G=ni,br=G.custom,Rr=z(br)?br:null,Ar={__proto__:null,double:'"',single:"'"},vr={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ft=function s(l,C,W,k){var B=C||{};if(X(B,"quoteStyle")&&!X(Ar,B.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(X(B,"maxStringLength")&&(typeof B.maxStringLength=="number"?B.maxStringLength<0&&B.maxStringLength!==1/0:B.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var dr=X(B,"customInspect")?B.customInspect:!0;if(typeof dr!="boolean"&&dr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(X(B,"indent")&&B.indent!==null&&B.indent!==" "&&!(parseInt(B.indent,10)===B.indent&&B.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(X(B,"numericSeparator")&&typeof B.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Or=B.numericSeparator;if(typeof l>"u")return"undefined";if(l===null)return"null";if(typeof l=="boolean")return l?"true":"false";if(typeof l=="string")return $r(l,B);if(typeof l=="number"){if(l===0)return 1/0/l>0?"0":"-0";var tr=String(l);return Or?ar(l,tr):tr}if(typeof l=="bigint"){var mr=String(l)+"n";return Or?ar(l,mr):mr}var Xr=typeof B.depth>"u"?5:B.depth;if(typeof W>"u"&&(W=0),W>=Xr&&Xr>0&&typeof l=="object")return $(l)?"[Array]":"[Object]";var xr=wo(B,W);if(typeof k>"u")k=[];else if(or(k,l)>=0)return"[Circular]";function ir(Er,Lr,Po){if(Lr&&(k=I.call(k),k.push(Lr)),Po){var sn={depth:B.depth};return X(B,"quoteStyle")&&(sn.quoteStyle=B.quoteStyle),s(Er,sn,W+1,k)}return s(Er,B,W+1,k)}if(typeof l=="function"&&!M(l)){var en=sr(l),tn=Wr(l,ir);return"[Function"+(en?": "+en:" (anonymous)")+"]"+(tn.length>0?" { "+D.call(tn,", ")+" }":"")}if(z(l)){var nn=V?m.call(String(l),/^(Symbol\(.*\))_[^)]*$/,"$1"):U.call(l);return typeof l=="object"&&!V?hr(nn):nn}if(gr(l)){for(var Mr="<"+Q.call(String(l.nodeName)),Qr=l.attributes||[],kr=0;kr<Qr.length;kr++)Mr+=" "+Qr[kr].name+"="+g(d(Qr[kr].value),"double",B);return Mr+=">",l.childNodes&&l.childNodes.length&&(Mr+="..."),Mr+="</"+Q.call(String(l.nodeName))+">",Mr}if($(l)){if(l.length===0)return"[]";var Zr=Wr(l,ir);return xr&&!qo(Zr)?"["+Yr(Zr,xr)+"]":"[ "+D.call(Zr,", ")+" ]"}if(A(l)){var re=Wr(l,ir);return!("cause"in Error.prototype)&&"cause"in l&&!Pr.call(l,"cause")?"{ ["+String(l)+"] "+D.call(F.call("[cause]: "+ir(l.cause),re),", ")+" }":re.length===0?"["+String(l)+"]":"{ ["+String(l)+"] "+D.call(re,", ")+" }"}if(typeof l=="object"&&dr){if(Rr&&typeof l[Rr]=="function"&&G)return G(l,{depth:Xr-W});if(dr!=="symbol"&&typeof l.inspect=="function")return l.inspect()}if(er(l)){var an=[];return o&&o.call(l,function(Er,Lr){an.push(ir(Lr,l,!0)+" => "+ir(Er,l))}),rn("Map",n.call(l),an,xr)}if(pr(l)){var on=[];return a&&a.call(l,function(Er){on.push(ir(Er,l))}),rn("Set",i.call(l),on,xr)}if(lr(l))return Jr("WeakMap");if(Nr(l))return Jr("WeakSet");if(cr(l))return Jr("WeakRef");if(b(l))return hr(ir(Number(l)));if(K(l))return hr(ir(L.call(l)));if(E(l))return hr(S.call(l));if(P(l))return hr(ir(String(l)));if(typeof window<"u"&&l===window)return"{ [object Window] }";if(typeof globalThis<"u"&&l===globalThis||typeof Br.commonjsGlobal<"u"&&l===Br.commonjsGlobal)return"{ [object globalThis] }";if(!T(l)&&!M(l)){var ee=Wr(l,ir),un=Sr?Sr(l)===Object.prototype:l instanceof Object||l.constructor===Object,te=l instanceof Object?"":"null prototype",fn=!un&&fr&&Object(l)===l&&fr in l?O.call(rr(l),8,-1):te?"Object":"",Io=un||typeof l.constructor!="function"?"":l.constructor.name?l.constructor.name+" ":"",ne=Io+(fn||te?"["+D.call(F.call([],fn||[],te||[]),": ")+"] ":"");return ee.length===0?ne+"{}":xr?ne+"{"+Yr(ee,xr)+"}":ne+"{ "+D.call(ee,", ")+" }"}return String(l)};function g(s,l,C){var W=C.quoteStyle||l,k=Ar[W];return k+s+k}function d(s){return m.call(String(s),/"/g,"&quot;")}function x(s){return!fr||!(typeof s=="object"&&(fr in s||typeof s[fr]<"u"))}function $(s){return rr(s)==="[object Array]"&&x(s)}function T(s){return rr(s)==="[object Date]"&&x(s)}function M(s){return rr(s)==="[object RegExp]"&&x(s)}function A(s){return rr(s)==="[object Error]"&&x(s)}function P(s){return rr(s)==="[object String]"&&x(s)}function b(s){return rr(s)==="[object Number]"&&x(s)}function E(s){return rr(s)==="[object Boolean]"&&x(s)}function z(s){if(V)return s&&typeof s=="object"&&s instanceof Symbol;if(typeof s=="symbol")return!0;if(!s||typeof s!="object"||!U)return!1;try{return U.call(s),!0}catch{}return!1}function K(s){if(!s||typeof s!="object"||!L)return!1;try{return L.call(s),!0}catch{}return!1}var J=Object.prototype.hasOwnProperty||function(s){return s in this};function X(s,l){return J.call(s,l)}function rr(s){return R.call(s)}function sr(s){if(s.name)return s.name;var l=w.call(q.call(s),/^function\s*([\w$]+)/);return l?l[1]:null}function or(s,l){if(s.indexOf)return s.indexOf(l);for(var C=0,W=s.length;C<W;C++)if(s[C]===l)return C;return-1}function er(s){if(!n||!s||typeof s!="object")return!1;try{n.call(s);try{i.call(s)}catch{return!0}return s instanceof Map}catch{}return!1}function lr(s){if(!c||!s||typeof s!="object")return!1;try{c.call(s,c);try{p.call(s,p)}catch{return!0}return s instanceof WeakMap}catch{}return!1}function cr(s){if(!h||!s||typeof s!="object")return!1;try{return h.call(s),!0}catch{}return!1}function pr(s){if(!i||!s||typeof s!="object")return!1;try{i.call(s);try{n.call(s)}catch{return!0}return s instanceof Set}catch{}return!1}function Nr(s){if(!p||!s||typeof s!="object")return!1;try{p.call(s,p);try{c.call(s,c)}catch{return!0}return s instanceof WeakSet}catch{}return!1}function gr(s){return!s||typeof s!="object"?!1:typeof HTMLElement<"u"&&s instanceof HTMLElement?!0:typeof s.nodeName=="string"&&typeof s.getAttribute=="function"}function $r(s,l){if(s.length>l.maxStringLength){var C=s.length-l.maxStringLength,W="... "+C+" more character"+(C>1?"s":"");return $r(O.call(s,0,l.maxStringLength),l)+W}var k=vr[l.quoteStyle||"single"];k.lastIndex=0;var B=m.call(m.call(s,k,"\\$1"),/[\x00-\x1f]/g,Tr);return g(B,"single",l)}function Tr(s){var l=s.charCodeAt(0),C={8:"b",9:"t",10:"n",12:"f",13:"r"}[l];return C?"\\"+C:"\\x"+(l<16?"0":"")+j.call(l.toString(16))}function hr(s){return"Object("+s+")"}function Jr(s){return s+" { ? }"}function rn(s,l,C,W){var k=W?Yr(C,W):D.call(C,", ");return s+" ("+l+") {"+k+"}"}function qo(s){for(var l=0;l<s.length;l++)if(or(s[l],`
2
- `)>=0)return!1;return!0}function wo(s,l){var C;if(s.indent===" ")C=" ";else if(typeof s.indent=="number"&&s.indent>0)C=D.call(Array(s.indent+1)," ");else return null;return{base:C,prev:D.call(Array(l+1),C)}}function Yr(s,l){if(s.length===0)return"";var C=`
3
- `+l.prev+l.base;return C+D.call(s,","+C)+`
4
- `+l.prev}function Wr(s,l){var C=$(s),W=[];if(C){W.length=s.length;for(var k=0;k<s.length;k++)W[k]=X(s,k)?l(s[k],s):""}var B=typeof N=="function"?N(s):[],dr;if(V){dr={};for(var Or=0;Or<B.length;Or++)dr["$"+B[Or]]=B[Or]}for(var tr in s)X(s,tr)&&(C&&String(Number(tr))===tr&&tr<s.length||V&&dr["$"+tr]instanceof Symbol||(H.call(/[^\w$]/,tr)?W.push(l(tr,s)+": "+l(s[tr],s)):W.push(tr+": "+l(s[tr],s))));if(typeof N=="function")for(var mr=0;mr<B.length;mr++)Pr.call(s,B[mr])&&W.push("["+l(B[mr])+"]: "+l(s[B[mr]],s));return W}return ft}var st,ha;function ai(){if(ha)return st;ha=1;var r=Kr(),e=nr(),n=function(a,u,c){for(var v=a,p;(p=v.next)!=null;v=p)if(p.key===u)return v.next=p.next,c||(p.next=a.next,a.next=p),p},o=function(a,u){if(a){var c=n(a,u);return c&&c.value}},t=function(a,u,c){var v=n(a,u);v?v.value=c:a.next={key:u,next:a.next,value:c}},f=function(a,u){return a?!!n(a,u):!1},i=function(a,u){if(a)return n(a,u,!0)};return st=function(){var u,c={assert:function(v){if(!c.has(v))throw new e("Side channel does not contain "+r(v))},delete:function(v){var p=u&&u.next,y=i(u,v);return y&&p&&p===y&&(u=void 0),!!y},get:function(v){return o(u,v)},has:function(v){return f(u,v)},set:function(v,p){u||(u={next:void 0}),t(u,v,p)}};return c},st}var lt,da;function co(){if(da)return lt;da=1;var r=yr(),e=Z(),n=Kr(),o=nr(),t=r("%Map%",!0),f=e("Map.prototype.get",!0),i=e("Map.prototype.set",!0),a=e("Map.prototype.has",!0),u=e("Map.prototype.delete",!0),c=e("Map.prototype.size",!0);return lt=!!t&&function(){var p,y={assert:function(h){if(!y.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(p){var S=u(p,h);return c(p)===0&&(p=void 0),S}return!1},get:function(h){if(p)return f(p,h)},has:function(h){return p?a(p,h):!1},set:function(h,S){p||(p=new t),i(p,h,S)}};return y},lt}var ct,ma;function oi(){if(ma)return ct;ma=1;var r=yr(),e=Z(),n=Kr(),o=co(),t=nr(),f=r("%WeakMap%",!0),i=e("WeakMap.prototype.get",!0),a=e("WeakMap.prototype.set",!0),u=e("WeakMap.prototype.has",!0),c=e("WeakMap.prototype.delete",!0);return ct=f?function(){var p,y,h={assert:function(S){if(!h.has(S))throw new t("Side channel does not contain "+n(S))},delete:function(S){if(f&&S&&(typeof S=="object"||typeof S=="function")){if(p)return c(p,S)}else if(o&&y)return y.delete(S);return!1},get:function(S){return f&&S&&(typeof S=="object"||typeof S=="function")&&p?i(p,S):y&&y.get(S)},has:function(S){return f&&S&&(typeof S=="object"||typeof S=="function")&&p?u(p,S):!!y&&y.has(S)},set:function(S,R){f&&S&&(typeof S=="object"||typeof S=="function")?(p||(p=new f),a(p,S,R)):o&&(y||(y=o()),y.set(S,R))}};return h}:o,ct}var pt,Sa;function po(){if(Sa)return pt;Sa=1;var r=nr(),e=Kr(),n=ai(),o=co(),t=oi(),f=t||o||n;return pt=function(){var a,u={assert:function(c){if(!u.has(c))throw new r("Side channel does not contain "+e(c))},delete:function(c){return!!a&&a.delete(c)},get:function(c){return a&&a.get(c)},has:function(c){return!!a&&a.has(c)},set:function(c,v){a||(a=f()),a.set(c,v)}};return u},pt}var yt,ba;function ii(){if(ba)return yt;ba=1;var r=Qt(),e=po()(),n=nr(),o={assert:function(t,f){if(!t||typeof t!="object"&&typeof t!="function")throw new n("`O` is not an object");if(typeof f!="string")throw new n("`slot` must be a string");if(e.assert(t),!o.has(t,f))throw new n("`"+f+"` is not present on `O`")},get:function(t,f){if(!t||typeof t!="object"&&typeof t!="function")throw new n("`O` is not an object");if(typeof f!="string")throw new n("`slot` must be a string");var i=e.get(t);return i&&i["$"+f]},has:function(t,f){if(!t||typeof t!="object"&&typeof t!="function")throw new n("`O` is not an object");if(typeof f!="string")throw new n("`slot` must be a string");var i=e.get(t);return!!i&&r(i,"$"+f)},set:function(t,f,i){if(!t||typeof t!="object"&&typeof t!="function")throw new n("`O` is not an object");if(typeof f!="string")throw new n("`slot` must be a string");var a=e.get(t);a||(a={},e.set(t,a)),a["$"+f]=i}};return Object.freeze&&Object.freeze(o),yt=o,yt}var vt,Aa;function ui(){if(Aa)return vt;Aa=1;var r=ii(),e=Ut(),n=typeof StopIteration=="object"?StopIteration:null;return vt=function(t){if(!n)throw new e("this environment lacks StopIteration");r.set(t,"[[Done]]",!1);var f={next:function(){var a=r.get(this,"[[Iterator]]"),u=!!r.get(a,"[[Done]]");try{return{done:u,value:u?void 0:a.next()}}catch(c){if(r.set(a,"[[Done]]",!0),c!==n)throw c;return{done:!0,value:void 0}}}};return r.set(f,"[[Iterator]]",t),f},vt}var gt,Oa;function yo(){if(Oa)return gt;Oa=1;var r={}.toString;return gt=Array.isArray||function(e){return r.call(e)=="[object Array]"},gt}var ht,qa;function vo(){if(qa)return ht;qa=1;var r=Z(),e=r("String.prototype.valueOf"),n=function(a){try{return e(a),!0}catch{return!1}},o=r("Object.prototype.toString"),t="[object String]",f=Ir()();return ht=function(a){return typeof a=="string"?!0:!a||typeof a!="object"?!1:f?n(a):o(a)===t},ht}var dt,wa;function go(){if(wa)return dt;wa=1;var r=typeof Map=="function"&&Map.prototype?Map:null,e=typeof Set=="function"&&Set.prototype?Set:null,n;r||(n=function(i){return!1});var o=r?Map.prototype.has:null,t=e?Set.prototype.has:null;return!n&&!o&&(n=function(i){return!1}),dt=n||function(i){if(!i||typeof i!="object")return!1;try{if(o.call(i),t)try{t.call(i)}catch{return!0}return i instanceof r}catch{}return!1},dt}var mt,Ia;function ho(){if(Ia)return mt;Ia=1;var r=typeof Map=="function"&&Map.prototype?Map:null,e=typeof Set=="function"&&Set.prototype?Set:null,n;e||(n=function(i){return!1});var o=r?Map.prototype.has:null,t=e?Set.prototype.has:null;return!n&&!t&&(n=function(i){return!1}),mt=n||function(i){if(!i||typeof i!="object")return!1;try{if(t.call(i),o)try{o.call(i)}catch{return!0}return i instanceof e}catch{}return!1},mt}var Pa;function fi(){if(Pa)return Dr.exports;Pa=1;var r=lo(),e=ui();if(Vt()()||Vr()()){var n=Symbol.iterator;Dr.exports=function(I){if(I!=null&&typeof I[n]<"u")return I[n]();if(r(I))return Array.prototype[n].call(I)}}else{var o=yo(),t=vo(),f=yr(),i=f("%Map%",!0),a=f("%Set%",!0),u=uo(),c=u("Array.prototype.push"),v=u("String.prototype.charCodeAt"),p=u("String.prototype.slice"),y=function(I,_){var L=I.length;if(_+1>=L)return _+1;var N=v(I,_);if(N<55296||N>56319)return _+1;var U=v(I,_+1);return U<56320||U>57343?_+1:_+2},h=function(I){var _=0;return{next:function(){var N=_>=I.length,U;return N||(U=I[_],_+=1),{done:N,value:U}}}},S=function(I,_){if(o(I)||r(I))return h(I);if(t(I)){var L=0;return{next:function(){var U=y(I,L),V=p(I,L,U);return L=U,{done:U>I.length,value:V}}}}if(_&&typeof I["_es6-shim iterator_"]<"u")return I["_es6-shim iterator_"]()};if(!i&&!a)Dr.exports=function(I){if(I!=null)return S(I,!0)};else{var R=go(),q=ho(),w=u("Map.prototype.forEach",!0),O=u("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var m=u("Map.prototype.iterator",!0),j=u("Set.prototype.iterator",!0);var Q=u("Map.prototype.@@iterator",!0)||u("Map.prototype._es6-shim iterator_",!0),H=u("Set.prototype.@@iterator",!0)||u("Set.prototype._es6-shim iterator_",!0),F=function(I){if(R(I)){if(m)return e(m(I));if(Q)return Q(I);if(w){var _=[];return w(I,function(N,U){c(_,[U,N])}),h(_)}}if(q(I)){if(j)return e(j(I));if(H)return H(I);if(O){var L=[];return O(I,function(N){c(L,N)}),h(L)}}};Dr.exports=function(I){return F(I)||S(I)}}}return Dr.exports}var St,Ra;function mo(){if(Ra)return St;Ra=1;var r=function(e){return e!==e};return St=function(n,o){return n===0&&o===0?1/n===1/o:!!(n===o||r(n)&&r(o))},St}var bt,$a;function So(){if($a)return bt;$a=1;var r=mo();return bt=function(){return typeof Object.is=="function"?Object.is:r},bt}var At,xa;function si(){if(xa)return At;xa=1;var r=So(),e=wr();return At=function(){var o=r();return e(Object,{is:o},{is:function(){return Object.is!==o}}),o},At}var Ot,Ea;function li(){if(Ea)return Ot;Ea=1;var r=wr(),e=jr(),n=mo(),o=So(),t=si(),f=e(o(),Object);return r(f,{getPolyfill:o,implementation:n,shim:t}),Ot=f,Ot}var qt,Ba;function bo(){if(Ba)return qt;Ba=1;var r=jr(),e=Z(),n=yr(),o=n("%ArrayBuffer%",!0),t=e("ArrayBuffer.prototype.byteLength",!0),f=e("Object.prototype.toString"),i=!!o&&!t&&new o(0).slice,a=!!i&&r(i);return qt=t||a?function(c){if(!c||typeof c!="object")return!1;try{return t?t(c):a(c,0),!0}catch{return!1}}:o?function(c){return f(c)==="[object ArrayBuffer]"}:function(c){return!1},qt}var wt,ja;function ci(){if(ja)return wt;ja=1;var r=Z(),e=r("Date.prototype.getDay"),n=function(a){try{return e(a),!0}catch{return!1}},o=r("Object.prototype.toString"),t="[object Date]",f=Ir()();return wt=function(a){return typeof a!="object"||a===null?!1:f?n(a):o(a)===t},wt}var It,Ta;function Ao(){if(Ta)return It;Ta=1;var r=Z(),e=Ir()(),n=Qt(),o=qr(),t;if(e){var f=r("RegExp.prototype.exec"),i={},a=function(){throw i},u={toString:a,valueOf:a};typeof Symbol.toPrimitive=="symbol"&&(u[Symbol.toPrimitive]=a),t=function(y){if(!y||typeof y!="object")return!1;var h=o(y,"lastIndex"),S=h&&n(h,"value");if(!S)return!1;try{f(y,u)}catch(R){return R===i}}}else{var c=r("Object.prototype.toString"),v="[object RegExp]";t=function(y){return!y||typeof y!="object"&&typeof y!="function"?!1:c(y)===v}}return It=t,It}var Pt,Ma;function pi(){if(Ma)return Pt;Ma=1;var r=Z(),e=r("SharedArrayBuffer.prototype.byteLength",!0);return Pt=e?function(o){if(!o||typeof o!="object")return!1;try{return e(o),!0}catch{return!1}}:function(o){return!1},Pt}var Rt,Ca;function yi(){if(Ca)return Rt;Ca=1;var r=Z(),e=r("Number.prototype.toString"),n=function(a){try{return e(a),!0}catch{return!1}},o=r("Object.prototype.toString"),t="[object Number]",f=Ir()();return Rt=function(a){return typeof a=="number"?!0:!a||typeof a!="object"?!1:f?n(a):o(a)===t},Rt}var $t,Da;function vi(){if(Da)return $t;Da=1;var r=Z(),e=r("Boolean.prototype.toString"),n=r("Object.prototype.toString"),o=function(a){try{return e(a),!0}catch{return!1}},t="[object Boolean]",f=Ir()();return $t=function(a){return typeof a=="boolean"?!0:a===null||typeof a!="object"?!1:f?o(a):n(a)===t},$t}var Ur={exports:{}},xt,Fa;function gi(){if(Fa)return xt;Fa=1;var r=Z(),e=Ao(),n=r("RegExp.prototype.exec"),o=nr();return xt=function(f){if(!e(f))throw new o("`regex` must be a RegExp");return function(a){return n(f,a)!==null}},xt}var _a;function hi(){if(_a)return Ur.exports;_a=1;var r=Z(),e=r("Object.prototype.toString"),n=Vt()(),o=gi();if(n){var t=r("Symbol.prototype.toString"),f=o(/^Symbol\(.*\)$/),i=function(u){return typeof u.valueOf()!="symbol"?!1:f(t(u))};Ur.exports=function(u){if(typeof u=="symbol")return!0;if(!u||typeof u!="object"||e(u)!=="[object Symbol]")return!1;try{return i(u)}catch{return!1}}}else Ur.exports=function(u){return!1};return Ur.exports}var Hr={exports:{}},Et,Na;function di(){if(Na)return Et;Na=1;var r=typeof BigInt<"u"&&BigInt;return Et=function(){return typeof r=="function"&&typeof BigInt=="function"&&typeof r(42)=="bigint"&&typeof BigInt(42)=="bigint"},Et}var Wa;function mi(){if(Wa)return Hr.exports;Wa=1;var r=di()();if(r){var e=BigInt.prototype.valueOf,n=function(t){try{return e.call(t),!0}catch{}return!1};Hr.exports=function(t){return t===null||typeof t>"u"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:n(t)}}else Hr.exports=function(t){return!1};return Hr.exports}var Bt,ka;function Si(){if(ka)return Bt;ka=1;var r=vo(),e=yi(),n=vi(),o=hi(),t=mi();return Bt=function(i){if(i==null||typeof i!="object"&&typeof i!="function")return null;if(r(i))return"String";if(e(i))return"Number";if(n(i))return"Boolean";if(o(i))return"Symbol";if(t(i))return"BigInt"},Bt}var jt,La;function bi(){if(La)return jt;La=1;var r=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,e=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,n;r||(n=function(i){return!1});var o=r?r.prototype.has:null,t=e?e.prototype.has:null;return!n&&!o&&(n=function(i){return!1}),jt=n||function(i){if(!i||typeof i!="object")return!1;try{if(o.call(i,o),t)try{t.call(i,t)}catch{return!0}return i instanceof r}catch{}return!1},jt}var Gr={exports:{}},Ua;function Ai(){if(Ua)return Gr.exports;Ua=1;var r=yr(),e=Z(),n=r("%WeakSet%",!0),o=e("WeakSet.prototype.has",!0);if(o){var t=e("WeakMap.prototype.has",!0);Gr.exports=function(i){if(!i||typeof i!="object")return!1;try{if(o(i,o),t)try{t(i,t)}catch{return!0}return i instanceof n}catch{}return!1}}else Gr.exports=function(i){return!1};return Gr.exports}var Tt,Ha;function Oi(){if(Ha)return Tt;Ha=1;var r=go(),e=ho(),n=bi(),o=Ai();return Tt=function(f){if(f&&typeof f=="object"){if(r(f))return"Map";if(e(f))return"Set";if(n(f))return"WeakMap";if(o(f))return"WeakSet"}return!1},Tt}var Mt,Ga;function qi(){if(Ga)return Mt;Ga=1;var r=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,o;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw o}}),o={},e(function(){throw 42},null,n)}catch(O){O!==o&&(e=null)}else e=null;var t=/^\s*class\b/,f=function(m){try{var j=r.call(m);return t.test(j)}catch{return!1}},i=function(m){try{return f(m)?!1:(r.call(m),!0)}catch{return!1}},a=Object.prototype.toString,u="[object Object]",c="[object Function]",v="[object GeneratorFunction]",p="[object HTMLAllCollection]",y="[object HTML document.all class]",h="[object HTMLCollection]",S=typeof Symbol=="function"&&!!Symbol.toStringTag,R=!(0 in[,]),q=function(){return!1};if(typeof document=="object"){var w=document.all;a.call(w)===a.call(document.all)&&(q=function(m){if((R||!m)&&(typeof m>"u"||typeof m=="object"))try{var j=a.call(m);return(j===p||j===y||j===h||j===u)&&m("")==null}catch{}return!1})}return Mt=e?function(m){if(q(m))return!0;if(!m||typeof m!="function"&&typeof m!="object")return!1;try{e(m,null,n)}catch(j){if(j!==o)return!1}return!f(m)&&i(m)}:function(m){if(q(m))return!0;if(!m||typeof m!="function"&&typeof m!="object")return!1;if(S)return i(m);if(f(m))return!1;var j=a.call(m);return j!==c&&j!==v&&!/^\[object HTML/.test(j)?!1:i(m)},Mt}var Ct,za;function wi(){if(za)return Ct;za=1;var r=qi(),e=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=function(u,c,v){for(var p=0,y=u.length;p<y;p++)n.call(u,p)&&(v==null?c(u[p],p,u):c.call(v,u[p],p,u))},t=function(u,c,v){for(var p=0,y=u.length;p<y;p++)v==null?c(u.charAt(p),p,u):c.call(v,u.charAt(p),p,u)},f=function(u,c,v){for(var p in u)n.call(u,p)&&(v==null?c(u[p],p,u):c.call(v,u[p],p,u))};function i(a){return e.call(a)==="[object Array]"}return Ct=function(u,c,v){if(!r(c))throw new TypeError("iterator must be a function");var p;arguments.length>=3&&(p=v),i(u)?o(u,c,p):typeof u=="string"?t(u,c,p):f(u,c,p)},Ct}var Dt,Va;function Ii(){return Va||(Va=1,Dt=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Dt}var Ft,Ka;function Pi(){if(Ka)return Ft;Ka=1;var r=Ii(),e=typeof globalThis>"u"?Br.commonjsGlobal:globalThis;return Ft=function(){for(var o=[],t=0;t<r.length;t++)typeof e[r[t]]=="function"&&(o[o.length]=r[t]);return o},Ft}var _t,Ja;function Ri(){if(Ja)return _t;Ja=1;var r=wi(),e=Pi(),n=jr(),o=Z(),t=qr(),f=Xt(),i=o("Object.prototype.toString"),a=Ir()(),u=typeof globalThis>"u"?Br.commonjsGlobal:globalThis,c=e(),v=o("String.prototype.slice"),p=o("Array.prototype.indexOf",!0)||function(q,w){for(var O=0;O<q.length;O+=1)if(q[O]===w)return O;return-1},y={__proto__:null};a&&t&&f?r(c,function(R){var q=new u[R];if(Symbol.toStringTag in q&&f){var w=f(q),O=t(w,Symbol.toStringTag);if(!O&&w){var m=f(w);O=t(m,Symbol.toStringTag)}y["$"+R]=n(O.get)}}):r(c,function(R){var q=new u[R],w=q.slice||q.set;w&&(y["$"+R]=n(w))});var h=function(q){var w=!1;return r(y,function(O,m){if(!w)try{"$"+O(q)===m&&(w=v(m,1))}catch{}}),w},S=function(q){var w=!1;return r(y,function(O,m){if(!w)try{O(q),w=v(m,1)}catch{}}),w};return _t=function(q){if(!q||typeof q!="object")return!1;if(!a){var w=v(i(q),8,-1);return p(c,w)>-1?w:w!=="Object"?!1:S(q)}return t?h(q):null},_t}var Nt,Ya;function $i(){if(Ya)return Nt;Ya=1;var r=Z(),e=r("ArrayBuffer.prototype.byteLength",!0),n=bo();return Nt=function(t){return n(t)?e?e(t):t.byteLength:NaN},Nt}var Wt,Xa;function xi(){if(Xa)return Wt;Xa=1;var r=Yo(),e=uo(),n=ri(),o=yr(),t=fi(),f=po(),i=li(),a=lo(),u=yo(),c=bo(),v=ci(),p=Ao(),y=pi(),h=Lt(),S=Si(),R=Oi(),q=Ri(),w=$i(),O=e("SharedArrayBuffer.prototype.byteLength",!0),m=e("Date.prototype.getTime"),j=Object.getPrototypeOf,Q=e("Object.prototype.toString"),H=o("%Set%",!0),F=e("Map.prototype.has",!0),D=e("Map.prototype.get",!0),I=e("Map.prototype.size",!0),_=e("Set.prototype.add",!0),L=e("Set.prototype.delete",!0),N=e("Set.prototype.has",!0),U=e("Set.prototype.size",!0);function V(g,d,x,$){for(var T=t(g),M;(M=T.next())&&!M.done;)if(G(d,M.value,x,$))return L(g,M.value),!0;return!1}function fr(g){if(typeof g>"u")return null;if(typeof g!="object")return typeof g=="symbol"?!1:typeof g=="string"||typeof g=="number"?+g==+g:!0}function Pr(g,d,x,$,T,M){var A=fr(x);if(A!=null)return A;var P=D(d,A),b=r({},T,{strict:!1});return typeof P>"u"&&!F(d,A)||!G($,P,b,M)?!1:!F(g,A)&&G($,P,b,M)}function Sr(g,d,x){var $=fr(x);return $??(N(d,$)&&!N(g,$))}function ar(g,d,x,$,T,M){for(var A=t(g),P,b;(P=A.next())&&!P.done;)if(b=P.value,G(x,b,T,M)&&G($,D(d,b),T,M))return L(g,b),!0;return!1}function G(g,d,x,$){var T=x||{};if(T.strict?i(g,d):g===d)return!0;var M=S(g),A=S(d);if(M!==A)return!1;if(!g||!d||typeof g!="object"&&typeof d!="object")return T.strict?i(g,d):g==d;var P=$.has(g),b=$.has(d),E;if(P&&b){if($.get(g)===$.get(d))return!0}else E={};return P||$.set(g,E),b||$.set(d,E),vr(g,d,T,$)}function br(g){return!g||typeof g!="object"||typeof g.length!="number"||typeof g.copy!="function"||typeof g.slice!="function"||g.length>0&&typeof g[0]!="number"?!1:!!(g.constructor&&g.constructor.isBuffer&&g.constructor.isBuffer(g))}function Rr(g,d,x,$){if(U(g)!==U(d))return!1;for(var T=t(g),M=t(d),A,P,b;(A=T.next())&&!A.done;)if(A.value&&typeof A.value=="object")b||(b=new H),_(b,A.value);else if(!N(d,A.value)){if(x.strict||!Sr(g,d,A.value))return!1;b||(b=new H),_(b,A.value)}if(b){for(;(P=M.next())&&!P.done;)if(P.value&&typeof P.value=="object"){if(!V(b,P.value,x.strict,$))return!1}else if(!x.strict&&!N(g,P.value)&&!V(b,P.value,x.strict,$))return!1;return U(b)===0}return!0}function Ar(g,d,x,$){if(I(g)!==I(d))return!1;for(var T=t(g),M=t(d),A,P,b,E,z,K;(A=T.next())&&!A.done;)if(E=A.value[0],z=A.value[1],E&&typeof E=="object")b||(b=new H),_(b,E);else if(K=D(d,E),typeof K>"u"&&!F(d,E)||!G(z,K,x,$)){if(x.strict||!Pr(g,d,E,z,x,$))return!1;b||(b=new H),_(b,E)}if(b){for(;(P=M.next())&&!P.done;)if(E=P.value[0],K=P.value[1],E&&typeof E=="object"){if(!ar(b,g,E,K,x,$))return!1}else if(!x.strict&&(!g.has(E)||!G(D(g,E),K,x,$))&&!ar(b,g,E,K,r({},x,{strict:!1}),$))return!1;return U(b)===0}return!0}function vr(g,d,x,$){var T,M;if(typeof g!=typeof d||g==null||d==null||Q(g)!==Q(d)||a(g)!==a(d))return!1;var A=u(g),P=u(d);if(A!==P)return!1;var b=g instanceof Error,E=d instanceof Error;if(b!==E||(b||E)&&(g.name!==d.name||g.message!==d.message))return!1;var z=p(g),K=p(d);if(z!==K||(z||K)&&(g.source!==d.source||n(g)!==n(d)))return!1;var J=v(g),X=v(d);if(J!==X||(J||X)&&m(g)!==m(d)||x.strict&&j&&j(g)!==j(d))return!1;var rr=q(g),sr=q(d);if(rr!==sr)return!1;if(rr||sr){if(g.length!==d.length)return!1;for(T=0;T<g.length;T++)if(g[T]!==d[T])return!1;return!0}var or=br(g),er=br(d);if(or!==er)return!1;if(or||er){if(g.length!==d.length)return!1;for(T=0;T<g.length;T++)if(g[T]!==d[T])return!1;return!0}var lr=c(g),cr=c(d);if(lr!==cr)return!1;if(lr||cr)return w(g)!==w(d)?!1:typeof Uint8Array=="function"&&G(new Uint8Array(g),new Uint8Array(d),x,$);var pr=y(g),Nr=y(d);if(pr!==Nr)return!1;if(pr||Nr)return O(g)!==O(d)?!1:typeof Uint8Array=="function"&&G(new Uint8Array(g),new Uint8Array(d),x,$);if(typeof g!=typeof d)return!1;var gr=h(g),$r=h(d);if(gr.length!==$r.length)return!1;for(gr.sort(),$r.sort(),T=gr.length-1;T>=0;T--)if(gr[T]!=$r[T])return!1;for(T=gr.length-1;T>=0;T--)if(M=gr[T],!G(g[M],d[M],x,$))return!1;var Tr=R(g),hr=R(d);return Tr!==hr?!1:Tr==="Set"||hr==="Set"?Rr(g,d,x,$):Tr==="Map"?Ar(g,d,x,$):!0}return Wt=function(d,x,$){return G(d,x,$,f())},Wt}var Ei=xi();const Bi=Br.getDefaultExportFromCjs(Ei);function ji(r){return r}function Oo(r,e,n,o){const t=ji,[f,i]=ur.useState(t(n)),a=ur.useRef(f);return ur.useEffect(()=>{const u=()=>{const c={...n,...r.getAttributes(e)};Object.keys(c).forEach(p=>{(c[p]===null||c[p]===void 0)&&(c[p]=n?n[p]:null)});const v=t(c);Bi(a.current,v)||(i(v),a.current=v)};return r.on("selectionUpdate",u),r.on("transaction",u),()=>{r.off("selectionUpdate",u),r.off("transaction",u)}},[r,n,e,t]),f}function Zt(r,e={}){if(typeof r=="object")return r;try{return JSON.parse(r)}catch{return e}}function Ti({node:r}){const{text:e,macros:n}=r.attrs,o=ur.useMemo(()=>{try{return Za.renderToString(decodeURIComponent(e||""),{macros:Zt(decodeURIComponent(n||""))})}catch{return e}},[e,n]),t=ur.useMemo(()=>e.trim()?Y.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:o}}):Y.jsx("span",{contentEditable:!1,children:"Not enter a formula"}),[e,o]);return Y.jsx(Fr.NodeViewWrapper,{as:"span",style:{display:"inline-block"},children:t})}function Mi(){const{t:r}=$o.useLocale(),[e,n]=ur.useState(!1),o=ae.useButtonProps(kt.name),{icon:t=void 0,tooltip:f=void 0,tooltipOptions:i={},isActive:a=void 0}=(o==null?void 0:o.componentProps)??{},{editorDisabled:u}=ae.useToggleActive(a),c=ae.useEditorInstance(),v=Oo(c,kt.name,{text:"",macros:""}),{text:p,macros:y}=v,[h,S]=ur.useState(decodeURIComponent(p||"")),[R,q]=ur.useState(decodeURIComponent(y||"")),w=ur.useCallback(()=>{c.chain().focus().setKatex({text:encodeURIComponent(h),macros:encodeURIComponent(R)}).run(),S(""),q(""),n(!1)},[c,h,R]),O=ur.useMemo(()=>{try{return Za.renderToString(h,{macros:Zt(R)})}catch{return h}},[R,h]),m=ur.useMemo(()=>`${h}`.trim()?O:null,[h,O]);return Y.jsxs(Cr.Dialog,{onOpenChange:n,open:e,children:[Y.jsx(Cr.DialogTrigger,{asChild:!0,disabled:u,children:Y.jsx(Ro.ActionButton,{disabled:u,icon:t,tooltip:f,tooltipOptions:i,action:()=>{u||n(!0)}})}),Y.jsxs(Cr.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[Y.jsx(Cr.DialogTitle,{children:r("editor.formula.dialog.text")}),Y.jsx("div",{style:{height:"100%",border:"1px solid hsl(var(--border))"},children:Y.jsxs("div",{className:"richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]",children:[Y.jsxs("div",{className:"richtext-flex-1",children:[Y.jsx(cn.Label,{className:"mb-[6px]",children:"Expression"}),Y.jsx(ln.Textarea,{autoFocus:!0,className:"richtext-mb-[10px]",onChange:j=>S(j.target.value),placeholder:"Text",required:!0,rows:10,value:h,style:{color:"hsl(var(--foreground))"}}),Y.jsx(cn.Label,{className:"mb-[6px]",children:"Macros"}),Y.jsx(ln.Textarea,{className:"richtext-flex-1",placeholder:"Macros",rows:10,value:R,onChange:j=>{q(j.target.value)},style:{color:"hsl(var(--foreground))"}})]}),Y.jsx("div",{className:"richtext-flex richtext-flex-1 richtext-items-center richtext-justify-center richtext-rounded-[10px] richtext-p-[10px]",dangerouslySetInnerHTML:{__html:m||""},style:{height:"100%",borderWidth:1,minHeight:500,background:"#fff"}})]})}),Y.jsx(Cr.DialogFooter,{children:Y.jsx(xo.Button,{onClick:w,type:"button",children:"Save changes"})})]})]})}function Qa(r){return e=>e.getAttribute(r)}const kt=Fr.Node3.create({name:"katex",group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){return{HTMLAttributes:{class:"katex"},button:({t:r})=>({componentProps:{action:()=>!0,isActive:()=>!1,disabled:!1,icon:"KatexIcon",tooltip:r("editor.katex.tooltip")}})}},addAttributes(){return{text:{default:"",parseHTML:Qa("text")},macros:{default:"",parseHTML:Qa("macros")}}},parseHTML(){return[{tag:"span.katex"}]},renderHTML({HTMLAttributes:r}){return["span",Fr.mergeAttributes(this.options&&this.options.HTMLAttributes||{},r)]},addCommands(){return{setKatex:r=>({commands:e})=>e.insertContent({type:this.name,attrs:r})}},addInputRules(){return[Fr.nodeInputRule({find:/^\$katex\$$/,type:this.type})]},addNodeView(){return Fr.ReactNodeViewRenderer(Ti)}});exports.Katex=kt;exports.RichTextKatex=Mi;exports.safeJSONParse=Zt;exports.useAttributes=Oo;