reactjs-tiptap-editor 0.3.19 → 0.3.21

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 (244) hide show
  1. package/lib/{ActionMenuButton-BPq-R8E7.cjs → ActionMenuButton-BTFBZyG2.cjs} +1 -1
  2. package/lib/{ActionMenuButton-DCACoSG3.js → ActionMenuButton-DXwnYZhJ.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +28 -28
  5. package/lib/Attachment.d.ts +28 -28
  6. package/lib/Attachment.js +3 -3
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +28 -28
  9. package/lib/Blockquote.d.ts +28 -28
  10. package/lib/Blockquote.js +2 -2
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +28 -28
  13. package/lib/Bold.d.ts +28 -28
  14. package/lib/Bold.js +2 -2
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +28 -28
  17. package/lib/BulletList.d.ts +28 -28
  18. package/lib/BulletList.js +2 -2
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +28 -28
  21. package/lib/Clear.d.ts +28 -28
  22. package/lib/Clear.js +2 -2
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +28 -28
  25. package/lib/Code.d.ts +28 -28
  26. package/lib/Code.js +2 -2
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +28 -28
  29. package/lib/CodeBlock.d.ts +28 -28
  30. package/lib/CodeBlock.js +3 -3
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +28 -28
  33. package/lib/CodeView.d.ts +28 -28
  34. package/lib/CodeView.js +2 -2
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +28 -28
  37. package/lib/Color.d.ts +28 -28
  38. package/lib/Color.js +3 -3
  39. package/lib/Document.cjs +1 -1
  40. package/lib/Document.d.cts +28 -28
  41. package/lib/Document.d.ts +28 -28
  42. package/lib/Document.js +1 -1
  43. package/lib/{Drawer-Dwx9V0Xb.cjs → Drawer-BrHHs2E9.cjs} +1 -1
  44. package/lib/{Drawer-Qh1zEBl3.js → Drawer-CVuwyG50.js} +3 -3
  45. package/lib/Drawer.cjs +1 -1
  46. package/lib/Drawer.d.cts +28 -28
  47. package/lib/Drawer.d.ts +28 -28
  48. package/lib/Drawer.js +4 -4
  49. package/lib/Emoji.cjs +1 -1
  50. package/lib/Emoji.d.cts +28 -28
  51. package/lib/Emoji.d.ts +28 -28
  52. package/lib/Emoji.js +4 -4
  53. package/lib/{Excalidraw-BP_-zWZH.cjs → Excalidraw-Be_GDV4Q.cjs} +1 -1
  54. package/lib/{Excalidraw-DD3P3ClH.js → Excalidraw-frMX4K62.js} +3 -3
  55. package/lib/Excalidraw.cjs +1 -1
  56. package/lib/Excalidraw.d.cts +28 -28
  57. package/lib/Excalidraw.d.ts +28 -28
  58. package/lib/Excalidraw.js +3 -3
  59. package/lib/ExportPdf.cjs +1 -1
  60. package/lib/ExportPdf.d.cts +28 -28
  61. package/lib/ExportPdf.d.ts +28 -28
  62. package/lib/ExportPdf.js +2 -2
  63. package/lib/ExportWord.cjs +1 -1
  64. package/lib/ExportWord.d.cts +28 -28
  65. package/lib/ExportWord.d.ts +28 -28
  66. package/lib/ExportWord.js +2 -2
  67. package/lib/FontFamily.cjs +1 -1
  68. package/lib/FontFamily.d.cts +28 -28
  69. package/lib/FontFamily.d.ts +28 -28
  70. package/lib/FontFamily.js +4 -4
  71. package/lib/FontSize.cjs +1 -1
  72. package/lib/FontSize.d.cts +28 -28
  73. package/lib/FontSize.d.ts +28 -28
  74. package/lib/FontSize.js +3 -3
  75. package/lib/FormatPainter.cjs +1 -1
  76. package/lib/FormatPainter.d.cts +28 -28
  77. package/lib/FormatPainter.d.ts +28 -28
  78. package/lib/FormatPainter.js +2 -2
  79. package/lib/Heading.cjs +1 -1
  80. package/lib/Heading.d.cts +28 -28
  81. package/lib/Heading.d.ts +28 -28
  82. package/lib/Heading.js +3 -3
  83. package/lib/Highlight.cjs +1 -1
  84. package/lib/Highlight.d.cts +28 -28
  85. package/lib/Highlight.d.ts +28 -28
  86. package/lib/Highlight.js +2 -2
  87. package/lib/History.cjs +1 -1
  88. package/lib/History.d.cts +28 -28
  89. package/lib/History.d.ts +28 -28
  90. package/lib/History.js +2 -2
  91. package/lib/HorizontalRule.cjs +1 -1
  92. package/lib/HorizontalRule.d.cts +28 -28
  93. package/lib/HorizontalRule.d.ts +28 -28
  94. package/lib/HorizontalRule.js +2 -2
  95. package/lib/Iframe.cjs +1 -1
  96. package/lib/Iframe.d.cts +28 -28
  97. package/lib/Iframe.d.ts +28 -28
  98. package/lib/Iframe.js +3 -3
  99. package/lib/Image.cjs +1 -1
  100. package/lib/Image.d.cts +28 -28
  101. package/lib/Image.d.ts +28 -28
  102. package/lib/Image.js +3 -3
  103. package/lib/ImageGif.cjs +1 -1
  104. package/lib/ImageGif.d.cts +28 -28
  105. package/lib/ImageGif.d.ts +28 -28
  106. package/lib/ImageGif.js +3 -3
  107. package/lib/ImportWord.cjs +74 -74
  108. package/lib/ImportWord.d.cts +28 -28
  109. package/lib/ImportWord.d.ts +28 -28
  110. package/lib/ImportWord.js +5015 -4998
  111. package/lib/Indent.cjs +1 -1
  112. package/lib/Indent.d.cts +28 -28
  113. package/lib/Indent.d.ts +28 -28
  114. package/lib/Indent.js +2 -2
  115. package/lib/Italic.cjs +1 -1
  116. package/lib/Italic.d.cts +28 -28
  117. package/lib/Italic.d.ts +28 -28
  118. package/lib/Italic.js +2 -2
  119. package/lib/Katex.cjs +1 -1
  120. package/lib/Katex.d.cts +28 -28
  121. package/lib/Katex.d.ts +28 -28
  122. package/lib/Katex.js +4 -4
  123. package/lib/LineHeight.cjs +1 -1
  124. package/lib/LineHeight.d.cts +28 -28
  125. package/lib/LineHeight.d.ts +28 -28
  126. package/lib/LineHeight.js +2 -2
  127. package/lib/Link.cjs +1 -1
  128. package/lib/Link.d.cts +28 -28
  129. package/lib/Link.d.ts +28 -28
  130. package/lib/Link.js +2 -2
  131. package/lib/ListItem.cjs +1 -1
  132. package/lib/ListItem.d.cts +28 -28
  133. package/lib/ListItem.d.ts +28 -28
  134. package/lib/ListItem.js +1 -1
  135. package/lib/Mention.cjs +1 -1
  136. package/lib/Mention.d.cts +28 -28
  137. package/lib/Mention.d.ts +28 -28
  138. package/lib/Mention.js +123 -91
  139. package/lib/Mermaid.cjs +1 -1
  140. package/lib/Mermaid.d.cts +28 -28
  141. package/lib/Mermaid.d.ts +28 -28
  142. package/lib/Mermaid.js +4 -4
  143. package/lib/MoreMark.cjs +1 -1
  144. package/lib/MoreMark.d.cts +28 -28
  145. package/lib/MoreMark.d.ts +28 -28
  146. package/lib/MoreMark.js +3 -3
  147. package/lib/MultiColumn.cjs +1 -1
  148. package/lib/MultiColumn.d.cts +28 -28
  149. package/lib/MultiColumn.d.ts +28 -28
  150. package/lib/MultiColumn.js +2 -2
  151. package/lib/OrderedList.cjs +1 -1
  152. package/lib/OrderedList.d.cts +28 -28
  153. package/lib/OrderedList.d.ts +28 -28
  154. package/lib/OrderedList.js +2 -2
  155. package/lib/RichTextEditor-CAxwVWUE.cjs +137 -0
  156. package/lib/{RichTextEditor-DIvPROxl.js → RichTextEditor-DjTnd5Uu.js} +1607 -1603
  157. package/lib/SearchAndReplace.cjs +1 -1
  158. package/lib/SearchAndReplace.d.cts +28 -28
  159. package/lib/SearchAndReplace.d.ts +28 -28
  160. package/lib/SearchAndReplace.js +2 -2
  161. package/lib/Selection.cjs +1 -1
  162. package/lib/Selection.d.cts +28 -28
  163. package/lib/Selection.d.ts +28 -28
  164. package/lib/Selection.js +1 -1
  165. package/lib/SlashCommand.cjs +1 -1
  166. package/lib/SlashCommand.d.cts +28 -28
  167. package/lib/SlashCommand.d.ts +28 -28
  168. package/lib/SlashCommand.js +4 -4
  169. package/lib/Strike.cjs +1 -1
  170. package/lib/Strike.d.cts +28 -28
  171. package/lib/Strike.d.ts +28 -28
  172. package/lib/Strike.js +2 -2
  173. package/lib/SubAndSuperScript.cjs +1 -1
  174. package/lib/SubAndSuperScript.d.cts +28 -28
  175. package/lib/SubAndSuperScript.d.ts +28 -28
  176. package/lib/SubAndSuperScript.js +3 -3
  177. package/lib/Table.cjs +1 -1
  178. package/lib/Table.d.cts +28 -28
  179. package/lib/Table.d.ts +28 -28
  180. package/lib/Table.js +2 -2
  181. package/lib/TableOfContent.cjs +1 -1
  182. package/lib/TableOfContent.d.cts +28 -28
  183. package/lib/TableOfContent.d.ts +28 -28
  184. package/lib/TableOfContent.js +3 -3
  185. package/lib/TaskList.cjs +1 -1
  186. package/lib/TaskList.d.cts +28 -28
  187. package/lib/TaskList.d.ts +28 -28
  188. package/lib/TaskList.js +37 -33
  189. package/lib/TextAlign.cjs +1 -1
  190. package/lib/TextAlign.d.cts +28 -28
  191. package/lib/TextAlign.d.ts +28 -28
  192. package/lib/TextAlign.js +2 -2
  193. package/lib/TextBubble.cjs +1 -1
  194. package/lib/TextBubble.d.cts +28 -28
  195. package/lib/TextBubble.d.ts +28 -28
  196. package/lib/TextBubble.js +2 -2
  197. package/lib/TextDirection.cjs +1 -1
  198. package/lib/TextDirection.d.cts +28 -28
  199. package/lib/TextDirection.d.ts +28 -28
  200. package/lib/TextDirection.js +2 -2
  201. package/lib/TextUnderline.cjs +1 -1
  202. package/lib/TextUnderline.d.cts +28 -28
  203. package/lib/TextUnderline.d.ts +28 -28
  204. package/lib/TextUnderline.js +2 -2
  205. package/lib/TrailingNode.cjs +1 -1
  206. package/lib/TrailingNode.d.cts +28 -28
  207. package/lib/TrailingNode.d.ts +28 -28
  208. package/lib/TrailingNode.js +1 -1
  209. package/lib/{Twitter-Bl5HyIX0.cjs → Twitter-V0OzBT_E.cjs} +1 -1
  210. package/lib/{Twitter-raSi7ATg.js → Twitter-dRxbZOad.js} +3 -3
  211. package/lib/Twitter.cjs +1 -1
  212. package/lib/Twitter.d.cts +28 -28
  213. package/lib/Twitter.d.ts +28 -28
  214. package/lib/Twitter.js +3 -3
  215. package/lib/Video.cjs +1 -1
  216. package/lib/Video.d.cts +28 -28
  217. package/lib/Video.d.ts +28 -28
  218. package/lib/Video.js +2 -2
  219. package/lib/bubble-extra.cjs +2 -2
  220. package/lib/bubble-extra.d.cts +28 -28
  221. package/lib/bubble-extra.d.ts +28 -28
  222. package/lib/bubble-extra.js +25 -25
  223. package/lib/{dom-dataset-Cuy-pIfj.cjs → dom-dataset-Byuf1YmW.cjs} +5 -5
  224. package/lib/{dom-dataset-CHDbKz5J.js → dom-dataset-Di3tIRrR.js} +94 -83
  225. package/lib/index-BI-IcZcN.cjs +1 -0
  226. package/lib/{index-CSvnpArE.cjs → index-ByRfqzMr.cjs} +2 -2
  227. package/lib/{index-DIPntess.js → index-C1fzuXpN.js} +1 -1
  228. package/lib/index-CbQQFj2T.js +133 -0
  229. package/lib/{index-BWx1Mchx.js → index-DI9T3iLd.js} +243 -243
  230. package/lib/{index-CrxasX7b.cjs → index-DclQSrIx.cjs} +1 -1
  231. package/lib/{index-DEFQHExY.js → index-LUL9mqY4.js} +1 -1
  232. package/lib/{index-h9_SDuwc.cjs → index-Z4b9rzn-.cjs} +1 -1
  233. package/lib/index.cjs +1 -1
  234. package/lib/index.d.cts +28 -28
  235. package/lib/index.d.ts +28 -28
  236. package/lib/index.js +5 -5
  237. package/lib/locale-bundle.d.cts +28 -28
  238. package/lib/locale-bundle.d.ts +28 -28
  239. package/lib/{textarea-DnBlTntN.js → textarea-6c8drwXJ.js} +1 -1
  240. package/lib/{textarea-DgXP0XRK.cjs → textarea-BsJTSgT-.cjs} +1 -1
  241. package/package.json +67 -67
  242. package/lib/RichTextEditor-DszaQdvS.cjs +0 -141
  243. package/lib/index-Cyh1yoFk.cjs +0 -1
  244. package/lib/index-oQutU45z.js +0 -129
@@ -1,141 +0,0 @@
1
- "use strict";var hf=Object.defineProperty;var pf=(e,t,r)=>t in e?hf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Or=(e,t,r)=>pf(e,typeof t!="symbol"?t+"":t,r);const c=require("react/jsx-runtime"),w=require("react"),pe=require("./dom-dataset-Cuy-pIfj.cjs"),eu=require("@radix-ui/react-slot"),q=require("./index-C19MB4Al.cjs"),mf=require("@radix-ui/react-separator"),gf=require("@radix-ui/react-toast"),N=require("lucide-react"),xf=require("@radix-ui/react-tooltip"),vf=require("@radix-ui/react-toggle"),kr=require("@radix-ui/react-icons"),yf=require("@radix-ui/react-popover"),bf=require("@radix-ui/react-label"),wf=require("@radix-ui/react-dialog"),B=require("./index-CSvnpArE.cjs"),Sf=require("re-resizable"),Af=require("react-image-crop"),Cf=require("@radix-ui/react-tabs"),jf=require("@radix-ui/react-checkbox"),tu=require("tippy.js"),Tf=require("react-colorful"),Ef=require("@radix-ui/react-switch"),If=require("@radix-ui/react-dropdown-menu");function Ne(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const oe=Ne(w),ru=Ne(mf),Re=Ne(gf),Sr=Ne(xf),nu=Ne(vf),dr=Ne(yf),iu=Ne(bf),ke=Ne(wf),jt=Ne(Cf),Go=Ne(jf),Vo=Ne(Ef),fe=Ne(If);var ou=typeof global=="object"&&global&&global.Object===Object&&global,Rf=typeof self=="object"&&self&&self.Object===Object&&self,Ve=ou||Rf||Function("return this")(),We=Ve.Symbol,au=Object.prototype,Pf=au.hasOwnProperty,Of=au.toString,Jt=We?We.toStringTag:void 0;function kf(e){var t=Pf.call(e,Jt),r=e[Jt];try{e[Jt]=void 0;var n=!0}catch{}var i=Of.call(e);return n&&(t?e[Jt]=r:delete e[Jt]),i}var Nf=Object.prototype,Mf=Nf.toString;function Lf(e){return Mf.call(e)}var $f="[object Null]",_f="[object Undefined]",vs=We?We.toStringTag:void 0;function yt(e){return e==null?e===void 0?_f:$f:vs&&vs in Object(e)?kf(e):Lf(e)}function nt(e){return e!=null&&typeof e=="object"}var Df="[object Symbol]";function An(e){return typeof e=="symbol"||nt(e)&&yt(e)==Df}function su(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Ge=Array.isArray,ys=We?We.prototype:void 0,bs=ys?ys.toString:void 0;function Gr(e){if(typeof e=="string")return e;if(Ge(e))return su(e,Gr)+"";if(An(e))return bs?bs.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Bf=/\s/;function zf(e){for(var t=e.length;t--&&Bf.test(e.charAt(t)););return t}var Hf=/^\s+/;function qf(e){return e&&e.slice(0,zf(e)+1).replace(Hf,"")}function xt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ws=NaN,Ff=/^[-+]0x[0-9a-f]+$/i,Uf=/^0b[01]+$/i,Wf=/^0o[0-7]+$/i,Gf=parseInt;function $t(e){if(typeof e=="number")return e;if(An(e))return ws;if(xt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qf(e);var r=Uf.test(e);return r||Wf.test(e)?Gf(e.slice(2),r?2:8):Ff.test(e)?ws:+e}var Ss=1/0,Vf=17976931348623157e292;function Kf(e){if(!e)return e===0?e:0;if(e=$t(e),e===Ss||e===-Ss){var t=e<0?-1:1;return t*Vf}return e===e?e:0}function Xf(e){var t=Kf(e),r=t%1;return t===t?r?t-r:t:0}function xa(e){return e}var Yf="[object AsyncFunction]",Jf="[object Function]",Zf="[object GeneratorFunction]",Qf="[object Proxy]";function cu(e){if(!xt(e))return!1;var t=yt(e);return t==Jf||t==Zf||t==Yf||t==Qf}var Gn=Ve["__core-js_shared__"],As=function(){var e=/[^.]+$/.exec(Gn&&Gn.keys&&Gn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function eh(e){return!!As&&As in e}var th=Function.prototype,rh=th.toString;function Tt(e){if(e!=null){try{return rh.call(e)}catch{}try{return e+""}catch{}}return""}var nh=/[\\^$.*+?()[\]{}|]/g,ih=/^\[object .+?Constructor\]$/,oh=Function.prototype,ah=Object.prototype,sh=oh.toString,ch=ah.hasOwnProperty,lh=RegExp("^"+sh.call(ch).replace(nh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function uh(e){if(!xt(e)||eh(e))return!1;var t=cu(e)?lh:ih;return t.test(Tt(e))}function dh(e,t){return e==null?void 0:e[t]}function Et(e,t){var r=dh(e,t);return uh(r)?r:void 0}var Ko=Et(Ve,"WeakMap");function fh(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var hh=800,ph=16,mh=Date.now;function gh(e){var t=0,r=0;return function(){var n=mh(),i=ph-(n-r);if(r=n,i>0){if(++t>=hh)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function xh(e){return function(){return e}}var Cs=function(){try{var e=Et(Object,"defineProperty");return e({},"",{}),e}catch{}}(),vh=Cs?function(e,t){return Cs(e,"toString",{configurable:!0,enumerable:!1,value:xh(t),writable:!0})}:xa,yh=gh(vh);function bh(e,t,r,n){for(var i=e.length,o=r+-1;++o<i;)if(t(e[o],o,e))return o;return-1}function wh(e){return e!==e}function Sh(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function Ah(e,t,r){return t===t?Sh(e,t,r):bh(e,wh,r)}function Ch(e,t){var r=e==null?0:e.length;return!!r&&Ah(e,t,0)>-1}var jh=9007199254740991,Th=/^(?:0|[1-9]\d*)$/;function lu(e,t){var r=typeof e;return t=t??jh,!!t&&(r=="number"||r!="symbol"&&Th.test(e))&&e>-1&&e%1==0&&e<t}function uu(e,t){return e===t||e!==e&&t!==t}var js=Math.max;function Eh(e,t,r){return t=js(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=js(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),fh(e,this,s)}}function Ih(e,t){return yh(Eh(e,t,xa),e+"")}var Rh=9007199254740991;function va(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Rh}function du(e){return e!=null&&va(e.length)&&!cu(e)}var Ph=Object.prototype;function Oh(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ph;return e===r}function kh(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Nh="[object Arguments]";function Ts(e){return nt(e)&&yt(e)==Nh}var fu=Object.prototype,Mh=fu.hasOwnProperty,Lh=fu.propertyIsEnumerable,ya=Ts(function(){return arguments}())?Ts:function(e){return nt(e)&&Mh.call(e,"callee")&&!Lh.call(e,"callee")};function $h(){return!1}var hu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Es=hu&&typeof module=="object"&&module&&!module.nodeType&&module,_h=Es&&Es.exports===hu,Is=_h?Ve.Buffer:void 0,Dh=Is?Is.isBuffer:void 0,Xo=Dh||$h,Bh="[object Arguments]",zh="[object Array]",Hh="[object Boolean]",qh="[object Date]",Fh="[object Error]",Uh="[object Function]",Wh="[object Map]",Gh="[object Number]",Vh="[object Object]",Kh="[object RegExp]",Xh="[object Set]",Yh="[object String]",Jh="[object WeakMap]",Zh="[object ArrayBuffer]",Qh="[object DataView]",ep="[object Float32Array]",tp="[object Float64Array]",rp="[object Int8Array]",np="[object Int16Array]",ip="[object Int32Array]",op="[object Uint8Array]",ap="[object Uint8ClampedArray]",sp="[object Uint16Array]",cp="[object Uint32Array]",ue={};ue[ep]=ue[tp]=ue[rp]=ue[np]=ue[ip]=ue[op]=ue[ap]=ue[sp]=ue[cp]=!0;ue[Bh]=ue[zh]=ue[Zh]=ue[Hh]=ue[Qh]=ue[qh]=ue[Fh]=ue[Uh]=ue[Wh]=ue[Gh]=ue[Vh]=ue[Kh]=ue[Xh]=ue[Yh]=ue[Jh]=!1;function lp(e){return nt(e)&&va(e.length)&&!!ue[yt(e)]}function ba(e){return function(t){return e(t)}}var pu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nr=pu&&typeof module=="object"&&module&&!module.nodeType&&module,up=nr&&nr.exports===pu,Vn=up&&ou.process,Vr=function(){try{var e=nr&&nr.require&&nr.require("util").types;return e||Vn&&Vn.binding&&Vn.binding("util")}catch{}}(),Rs=Vr&&Vr.isTypedArray,mu=Rs?ba(Rs):lp,dp=Object.prototype,fp=dp.hasOwnProperty;function hp(e,t){var r=Ge(e),n=!r&&ya(e),i=!r&&!n&&Xo(e),o=!r&&!n&&!i&&mu(e),a=r||n||i||o,s=a?kh(e.length,String):[],l=s.length;for(var u in e)fp.call(e,u)&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||lu(u,l)))&&s.push(u);return s}function pp(e,t){return function(r){return e(t(r))}}var mp=pp(Object.keys,Object),gp=Object.prototype,xp=gp.hasOwnProperty;function vp(e){if(!Oh(e))return mp(e);var t=[];for(var r in Object(e))xp.call(e,r)&&r!="constructor"&&t.push(r);return t}function gu(e){return du(e)?hp(e):vp(e)}var yp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bp=/^\w*$/;function wa(e,t){if(Ge(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||An(e)?!0:bp.test(e)||!yp.test(e)||t!=null&&e in Object(t)}var fr=Et(Object,"create");function wp(){this.__data__=fr?fr(null):{},this.size=0}function Sp(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ap="__lodash_hash_undefined__",Cp=Object.prototype,jp=Cp.hasOwnProperty;function Tp(e){var t=this.__data__;if(fr){var r=t[e];return r===Ap?void 0:r}return jp.call(t,e)?t[e]:void 0}var Ep=Object.prototype,Ip=Ep.hasOwnProperty;function Rp(e){var t=this.__data__;return fr?t[e]!==void 0:Ip.call(t,e)}var Pp="__lodash_hash_undefined__";function Op(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fr&&t===void 0?Pp:t,this}function Ct(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ct.prototype.clear=wp;Ct.prototype.delete=Sp;Ct.prototype.get=Tp;Ct.prototype.has=Rp;Ct.prototype.set=Op;function kp(){this.__data__=[],this.size=0}function Cn(e,t){for(var r=e.length;r--;)if(uu(e[r][0],t))return r;return-1}var Np=Array.prototype,Mp=Np.splice;function Lp(e){var t=this.__data__,r=Cn(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Mp.call(t,r,1),--this.size,!0}function $p(e){var t=this.__data__,r=Cn(t,e);return r<0?void 0:t[r][1]}function _p(e){return Cn(this.__data__,e)>-1}function Dp(e,t){var r=this.__data__,n=Cn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function it(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}it.prototype.clear=kp;it.prototype.delete=Lp;it.prototype.get=$p;it.prototype.has=_p;it.prototype.set=Dp;var hr=Et(Ve,"Map");function Bp(){this.size=0,this.__data__={hash:new Ct,map:new(hr||it),string:new Ct}}function zp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function jn(e,t){var r=e.__data__;return zp(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Hp(e){var t=jn(this,e).delete(e);return this.size-=t?1:0,t}function qp(e){return jn(this,e).get(e)}function Fp(e){return jn(this,e).has(e)}function Up(e,t){var r=jn(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ot(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ot.prototype.clear=Bp;ot.prototype.delete=Hp;ot.prototype.get=qp;ot.prototype.has=Fp;ot.prototype.set=Up;var Wp="Expected a function";function Sa(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Wp);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Sa.Cache||ot),r}Sa.Cache=ot;var Gp=500;function Vp(e){var t=Sa(e,function(n){return r.size===Gp&&r.clear(),n}),r=t.cache;return t}var Kp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xp=/\\(\\)?/g,Yp=Vp(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Kp,function(r,n,i,o){t.push(i?o.replace(Xp,"$1"):n||r)}),t});function Yo(e){return e==null?"":Gr(e)}function xu(e,t){return Ge(e)?e:wa(e,t)?[e]:Yp(Yo(e))}function Tn(e){if(typeof e=="string"||An(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function vu(e,t){t=xu(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Tn(t[r++])];return r&&r==n?e:void 0}function Jp(e,t,r){var n=e==null?void 0:vu(e,t);return n===void 0?r:n}function yu(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Ps=We?We.isConcatSpreadable:void 0;function Zp(e){return Ge(e)||ya(e)||!!(Ps&&e&&e[Ps])}function Qp(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=Zp),i||(i=[]);++o<a;){var s=e[o];r(s)&&yu(i,s)}return i}function em(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}function tm(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:em(e,t,r)}var rm="\\ud800-\\udfff",nm="\\u0300-\\u036f",im="\\ufe20-\\ufe2f",om="\\u20d0-\\u20ff",am=nm+im+om,sm="\\ufe0e\\ufe0f",cm="\\u200d",lm=RegExp("["+cm+rm+am+sm+"]");function Aa(e){return lm.test(e)}function um(e){return e.split("")}var bu="\\ud800-\\udfff",dm="\\u0300-\\u036f",fm="\\ufe20-\\ufe2f",hm="\\u20d0-\\u20ff",pm=dm+fm+hm,mm="\\ufe0e\\ufe0f",gm="["+bu+"]",Jo="["+pm+"]",Zo="\\ud83c[\\udffb-\\udfff]",xm="(?:"+Jo+"|"+Zo+")",wu="[^"+bu+"]",Su="(?:\\ud83c[\\udde6-\\uddff]){2}",Au="[\\ud800-\\udbff][\\udc00-\\udfff]",vm="\\u200d",Cu=xm+"?",ju="["+mm+"]?",ym="(?:"+vm+"(?:"+[wu,Su,Au].join("|")+")"+ju+Cu+")*",bm=ju+Cu+ym,wm="(?:"+[wu+Jo+"?",Jo,Su,Au,gm].join("|")+")",Sm=RegExp(Zo+"(?="+Zo+")|"+wm+bm,"g");function Am(e){return e.match(Sm)||[]}function Cm(e){return Aa(e)?Am(e):um(e)}function jm(e,t,r){return e===e&&(r!==void 0&&(e=e<=r?e:r),t!==void 0&&(e=e>=t?e:t)),e}function Tu(e,t,r){return r===void 0&&(r=t,t=void 0),r!==void 0&&(r=$t(r),r=r===r?r:0),t!==void 0&&(t=$t(t),t=t===t?t:0),jm($t(e),t,r)}function Tm(){this.__data__=new it,this.size=0}function Em(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Im(e){return this.__data__.get(e)}function Rm(e){return this.__data__.has(e)}var Pm=200;function Om(e,t){var r=this.__data__;if(r instanceof it){var n=r.__data__;if(!hr||n.length<Pm-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ot(n)}return r.set(e,t),this.size=r.size,this}function rt(e){var t=this.__data__=new it(e);this.size=t.size}rt.prototype.clear=Tm;rt.prototype.delete=Em;rt.prototype.get=Im;rt.prototype.has=Rm;rt.prototype.set=Om;function km(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function Nm(){return[]}var Mm=Object.prototype,Lm=Mm.propertyIsEnumerable,Os=Object.getOwnPropertySymbols,$m=Os?function(e){return e==null?[]:(e=Object(e),km(Os(e),function(t){return Lm.call(e,t)}))}:Nm;function _m(e,t,r){var n=t(e);return Ge(e)?n:yu(n,r(e))}function ks(e){return _m(e,gu,$m)}var Qo=Et(Ve,"DataView"),ea=Et(Ve,"Promise"),ta=Et(Ve,"Set"),Ns="[object Map]",Dm="[object Object]",Ms="[object Promise]",Ls="[object Set]",$s="[object WeakMap]",_s="[object DataView]",Bm=Tt(Qo),zm=Tt(hr),Hm=Tt(ea),qm=Tt(ta),Fm=Tt(Ko),pt=yt;(Qo&&pt(new Qo(new ArrayBuffer(1)))!=_s||hr&&pt(new hr)!=Ns||ea&&pt(ea.resolve())!=Ms||ta&&pt(new ta)!=Ls||Ko&&pt(new Ko)!=$s)&&(pt=function(e){var t=yt(e),r=t==Dm?e.constructor:void 0,n=r?Tt(r):"";if(n)switch(n){case Bm:return _s;case zm:return Ns;case Hm:return Ms;case qm:return Ls;case Fm:return $s}return t});var Ds=Ve.Uint8Array,Um="__lodash_hash_undefined__";function Wm(e){return this.__data__.set(e,Um),this}function Gm(e){return this.__data__.has(e)}function pr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new ot;++t<r;)this.add(e[t])}pr.prototype.add=pr.prototype.push=Wm;pr.prototype.has=Gm;function Vm(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Eu(e,t){return e.has(t)}var Km=1,Xm=2;function Iu(e,t,r,n,i,o){var a=r&Km,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e),f=o.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,p=r&Xm?new pr:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var m=e[d],x=t[d];if(n)var g=a?n(x,m,d,t,e,o):n(m,x,d,e,t,o);if(g!==void 0){if(g)continue;h=!1;break}if(p){if(!Vm(t,function(y,S){if(!Eu(p,S)&&(m===y||i(m,y,r,n,o)))return p.push(S)})){h=!1;break}}else if(!(m===x||i(m,x,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}function Ym(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Jm(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Zm=1,Qm=2,eg="[object Boolean]",tg="[object Date]",rg="[object Error]",ng="[object Map]",ig="[object Number]",og="[object RegExp]",ag="[object Set]",sg="[object String]",cg="[object Symbol]",lg="[object ArrayBuffer]",ug="[object DataView]",Bs=We?We.prototype:void 0,Kn=Bs?Bs.valueOf:void 0;function dg(e,t,r,n,i,o,a){switch(r){case ug:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case lg:return!(e.byteLength!=t.byteLength||!o(new Ds(e),new Ds(t)));case eg:case tg:case ig:return uu(+e,+t);case rg:return e.name==t.name&&e.message==t.message;case og:case sg:return e==t+"";case ng:var s=Ym;case ag:var l=n&Zm;if(s||(s=Jm),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;n|=Qm,a.set(e,t);var f=Iu(s(e),s(t),n,i,o,a);return a.delete(e),f;case cg:if(Kn)return Kn.call(e)==Kn.call(t)}return!1}var fg=1,hg=Object.prototype,pg=hg.hasOwnProperty;function mg(e,t,r,n,i,o){var a=r&fg,s=ks(e),l=s.length,u=ks(t),f=u.length;if(l!=f&&!a)return!1;for(var d=l;d--;){var h=s[d];if(!(a?h in t:pg.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var x=!0;o.set(e,t),o.set(t,e);for(var g=a;++d<l;){h=s[d];var y=e[h],S=t[h];if(n)var T=a?n(S,y,h,t,e,o):n(y,S,h,e,t,o);if(!(T===void 0?y===S||i(y,S,r,n,o):T)){x=!1;break}g||(g=h=="constructor")}if(x&&!g){var E=e.constructor,j=t.constructor;E!=j&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof j=="function"&&j instanceof j)&&(x=!1)}return o.delete(e),o.delete(t),x}var gg=1,zs="[object Arguments]",Hs="[object Array]",Nr="[object Object]",xg=Object.prototype,qs=xg.hasOwnProperty;function vg(e,t,r,n,i,o){var a=Ge(e),s=Ge(t),l=a?Hs:pt(e),u=s?Hs:pt(t);l=l==zs?Nr:l,u=u==zs?Nr:u;var f=l==Nr,d=u==Nr,h=l==u;if(h&&Xo(e)){if(!Xo(t))return!1;a=!0,f=!1}if(h&&!f)return o||(o=new rt),a||mu(e)?Iu(e,t,r,n,i,o):dg(e,t,l,r,n,i,o);if(!(r&gg)){var p=f&&qs.call(e,"__wrapped__"),m=d&&qs.call(t,"__wrapped__");if(p||m){var x=p?e.value():e,g=m?t.value():t;return o||(o=new rt),i(x,g,r,n,o)}}return h?(o||(o=new rt),mg(e,t,r,n,i,o)):!1}function Ca(e,t,r,n,i){return e===t?!0:e==null||t==null||!nt(e)&&!nt(t)?e!==e&&t!==t:vg(e,t,r,n,Ca,i)}var yg=1,bg=2;function wg(e,t,r,n){var i=r.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=r[i];var s=a[0],l=e[s],u=a[1];if(a[2]){if(l===void 0&&!(s in e))return!1}else{var f=new rt,d;if(!(d===void 0?Ca(u,l,yg|bg,n,f):d))return!1}}return!0}function Ru(e){return e===e&&!xt(e)}function Sg(e){for(var t=gu(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Ru(i)]}return t}function Pu(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Ag(e){var t=Sg(e);return t.length==1&&t[0][2]?Pu(t[0][0],t[0][1]):function(r){return r===e||wg(r,e,t)}}function Cg(e,t){return e!=null&&t in Object(e)}function jg(e,t,r){t=xu(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=Tn(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&va(i)&&lu(a,i)&&(Ge(e)||ya(e)))}function Tg(e,t){return e!=null&&jg(e,t,Cg)}var Eg=1,Ig=2;function Rg(e,t){return wa(e)&&Ru(t)?Pu(Tn(e),t):function(r){var n=Jp(r,e);return n===void 0&&n===t?Tg(r,e):Ca(t,n,Eg|Ig)}}function Ou(e){return function(t){return t==null?void 0:t[e]}}function Pg(e){return function(t){return vu(t,e)}}function Og(e){return wa(e)?Ou(Tn(e)):Pg(e)}function kg(e){return typeof e=="function"?e:e==null?xa:typeof e=="object"?Ge(e)?Rg(e[0],e[1]):Ag(e):Og(e)}var Xn=function(){return Ve.Date.now()},Ng="Expected a function",Mg=Math.max,Lg=Math.min;function Ar(e,t,r){var n,i,o,a,s,l,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Ng);t=$t(t)||0,xt(r)&&(f=!!r.leading,d="maxWait"in r,o=d?Mg($t(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(M){var L=n,k=i;return n=i=void 0,u=M,a=e.apply(k,L),a}function m(M){return u=M,s=setTimeout(y,t),f?p(M):a}function x(M){var L=M-l,k=M-u,O=t-L;return d?Lg(O,o-k):O}function g(M){var L=M-l,k=M-u;return l===void 0||L>=t||L<0||d&&k>=o}function y(){var M=Xn();if(g(M))return S(M);s=setTimeout(y,x(M))}function S(M){return s=void 0,h&&n?p(M):(n=i=void 0,a)}function T(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function E(){return s===void 0?a:S(Xn())}function j(){var M=Xn(),L=g(M);if(n=arguments,i=this,l=M,L){if(s===void 0)return m(l);if(d)return clearTimeout(s),s=setTimeout(y,t),p(l)}return s===void 0&&(s=setTimeout(y,t)),a}return j.cancel=T,j.flush=E,j}function Yn(e){return nt(e)&&du(e)}var $g=200;function _g(e,t,r,n){var i=-1,o=Ch,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=su(t,ba(r))),t.length>=$g&&(o=Eu,a=!1,t=new pr(t));e:for(;++i<s;){var f=e[i],d=r==null?f:r(f);if(f=f!==0?f:0,a&&d===d){for(var h=u;h--;)if(t[h]===d)continue e;l.push(f)}else o(t,d,n)||l.push(f)}return l}function Dg(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Bg=Ih(function(e,t){var r=Dg(t);return Yn(r)&&(r=void 0),Yn(e)?_g(e,Qp(t,1,Yn),kg(r)):[]}),zg="[object Number]";function Kr(e){return typeof e=="number"||nt(e)&&yt(e)==zg}var Hg="[object RegExp]";function qg(e){return nt(e)&&yt(e)==Hg}var Fs=Vr&&Vr.isRegExp,Fg=Fs?ba(Fs):qg,Ug=Ou("length"),ku="\\ud800-\\udfff",Wg="\\u0300-\\u036f",Gg="\\ufe20-\\ufe2f",Vg="\\u20d0-\\u20ff",Kg=Wg+Gg+Vg,Xg="\\ufe0e\\ufe0f",Yg="["+ku+"]",ra="["+Kg+"]",na="\\ud83c[\\udffb-\\udfff]",Jg="(?:"+ra+"|"+na+")",Nu="[^"+ku+"]",Mu="(?:\\ud83c[\\udde6-\\uddff]){2}",Lu="[\\ud800-\\udbff][\\udc00-\\udfff]",Zg="\\u200d",$u=Jg+"?",_u="["+Xg+"]?",Qg="(?:"+Zg+"(?:"+[Nu,Mu,Lu].join("|")+")"+_u+$u+")*",ex=_u+$u+Qg,tx="(?:"+[Nu+ra+"?",ra,Mu,Lu,Yg].join("|")+")",Us=RegExp(na+"(?="+na+")|"+tx+ex,"g");function rx(e){for(var t=Us.lastIndex=0;Us.test(e);)++t;return t}function nx(e){return Aa(e)?rx(e):Ug(e)}var ix="Expected a function";function Bt(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(ix);return xt(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ar(e,t,{leading:n,maxWait:t,trailing:i})}var ox=30,ax="...",sx=/\w*$/;function cx(e,t){var r=ox,n=ax;if(xt(t)){var i="separator"in t?t.separator:i;r="length"in t?Xf(t.length):r,n="omission"in t?Gr(t.omission):n}e=Yo(e);var o=e.length;if(Aa(e)){var a=Cm(e);o=a.length}if(r>=o)return e;var s=r-nx(n);if(s<1)return n;var l=a?tm(a,0,s).join(""):e.slice(0,s);if(i===void 0)return l+n;if(a&&(s+=l.length-s),Fg(i)){if(e.slice(s).search(i)){var u,f=l;for(i.global||(i=RegExp(i.source,Yo(sx.exec(i))+"g")),i.lastIndex=0;u=i.exec(f);)var d=u.index;l=l.slice(0,d===void 0?s:d)}}else if(e.indexOf(Gr(i),s)!=s){var h=l.lastIndexOf(i);h>-1&&(l=l.slice(0,h))}return l+n}const ja="-",lx=e=>{const t=dx(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const s=a.split(ja);return s[0]===""&&s.length!==1&&s.shift(),Du(s,t)||ux(a)},getConflictingClassGroupIds:(a,s)=>{const l=r[a]||[];return s&&n[a]?[...l,...n[a]]:l}}},Du=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?Du(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(ja);return(a=t.validators.find(({validator:s})=>s(o)))==null?void 0:a.classGroupId},Ws=/^\[(.+)\]$/,ux=e=>{if(Ws.test(e)){const t=Ws.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},dx=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return hx(Object.entries(e.classGroups),r).forEach(([o,a])=>{ia(a,n,o,t)}),n},ia=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:Gs(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(fx(i)){ia(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,a])=>{ia(a,Gs(t,o),r,n)})})},Gs=(e,t)=>{let r=e;return t.split(ja).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},fx=e=>e.isThemeGetter,hx=(e,t)=>t?e.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[r,i]}):e,px=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,a)=>{r.set(o,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let a=r.get(o);if(a!==void 0)return a;if((a=n.get(o))!==void 0)return i(o,a),a},set(o,a){r.has(o)?r.set(o,a):i(o,a)}}},Bu="!",mx=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,a=s=>{const l=[];let u=0,f=0,d;for(let g=0;g<s.length;g++){let y=s[g];if(u===0){if(y===i&&(n||s.slice(g,g+o)===t)){l.push(s.slice(f,g)),f=g+o;continue}if(y==="/"){d=g;continue}}y==="["?u++:y==="]"&&u--}const h=l.length===0?s:s.substring(f),p=h.startsWith(Bu),m=p?h.substring(1):h,x=d&&d>f?d-f:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:x}};return r?s=>r({className:s,parseClassName:a}):a},gx=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},xx=e=>({cache:px(e.cacheSize),parseClassName:mx(e),...lx(e)}),vx=/\s+/,yx=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(vx);let s="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=r(u);let m=!!p,x=n(m?h.substring(0,p):h);if(!x){if(!m){s=u+(s.length>0?" "+s:s);continue}if(x=n(h),!x){s=u+(s.length>0?" "+s:s);continue}m=!1}const g=gx(f).join(":"),y=d?g+Bu:g,S=y+x;if(o.includes(S))continue;o.push(S);const T=i(x,m);for(let E=0;E<T.length;++E){const j=T[E];o.push(y+j)}s=u+(s.length>0?" "+s:s)}return s};function bx(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=zu(t))&&(n&&(n+=" "),n+=r);return n}const zu=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=zu(e[n]))&&(r&&(r+=" "),r+=t);return r};function wx(e,...t){let r,n,i,o=a;function a(l){const u=t.reduce((f,d)=>d(f),e());return r=xx(u),n=r.cache.get,i=r.cache.set,o=s,s(l)}function s(l){const u=n(l);if(u)return u;const f=yx(l,r);return i(l,f),f}return function(){return o(bx.apply(null,arguments))}}const le=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Hu=/^\[(?:([a-z-]+):)?(.+)\]$/i,Sx=/^\d+\/\d+$/,Ax=new Set(["px","full","screen"]),Cx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jx=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Tx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ix=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ze=e=>_t(e)||Ax.has(e)||Sx.test(e),dt=e=>qt(e,"length",$x),_t=e=>!!e&&!Number.isNaN(Number(e)),Jn=e=>qt(e,"number",_t),Zt=e=>!!e&&Number.isInteger(Number(e)),Rx=e=>e.endsWith("%")&&_t(e.slice(0,-1)),Y=e=>Hu.test(e),ft=e=>Cx.test(e),Px=new Set(["length","size","percentage"]),Ox=e=>qt(e,Px,qu),kx=e=>qt(e,"position",qu),Nx=new Set(["image","url"]),Mx=e=>qt(e,Nx,Dx),Lx=e=>qt(e,"",_x),Qt=()=>!0,qt=(e,t,r)=>{const n=Hu.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},$x=e=>jx.test(e)&&!Tx.test(e),qu=()=>!1,_x=e=>Ex.test(e),Dx=e=>Ix.test(e),Bx=()=>{const e=le("colors"),t=le("spacing"),r=le("blur"),n=le("brightness"),i=le("borderColor"),o=le("borderRadius"),a=le("borderSpacing"),s=le("borderWidth"),l=le("contrast"),u=le("grayscale"),f=le("hueRotate"),d=le("invert"),h=le("gap"),p=le("gradientColorStops"),m=le("gradientColorStopPositions"),x=le("inset"),g=le("margin"),y=le("opacity"),S=le("padding"),T=le("saturate"),E=le("scale"),j=le("sepia"),M=le("skew"),L=le("space"),k=le("translate"),O=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto",Y,t],A=()=>[Y,t],P=()=>["",Ze,dt],D=()=>["auto",_t,Y],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",Y],ve=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ge=()=>[_t,Y];return{cacheSize:500,separator:":",theme:{colors:[Qt],spacing:[Ze,dt],blur:["none","",ft,Y],brightness:ge(),borderColor:[e],borderRadius:["none","","full",ft,Y],borderSpacing:A(),borderWidth:P(),contrast:ge(),grayscale:ne(),hueRotate:ge(),invert:ne(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[Rx,dt],inset:C(),margin:C(),opacity:ge(),padding:A(),saturate:ge(),scale:ge(),sepia:ne(),skew:ge(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",Y]}],container:["container"],columns:[{columns:[ft]}],"break-after":[{"break-after":ve()}],"break-before":[{"break-before":ve()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),Y]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Zt,Y]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Y]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",Zt,Y]}],"grid-cols":[{"grid-cols":[Qt]}],"col-start-end":[{col:["auto",{span:["full",Zt,Y]},Y]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[Qt]}],"row-start-end":[{row:["auto",{span:[Zt,Y]},Y]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Y]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...te()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...te(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...te(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Y,t]}],"min-w":[{"min-w":[Y,t,"min","max","fit"]}],"max-w":[{"max-w":[Y,t,"none","full","min","max","fit","prose",{screen:[ft]},ft]}],h:[{h:[Y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ft,dt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Jn]}],"font-family":[{font:[Qt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Y]}],"line-clamp":[{"line-clamp":["none",_t,Jn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ze,Y]}],"list-image":[{"list-image":["none",Y]}],"list-style-type":[{list:["none","disc","decimal",Y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ze,dt]}],"underline-offset":[{"underline-offset":["auto",Ze,Y]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),kx]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ox]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Mx]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:H()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[Ze,Y]}],"outline-w":[{outline:[Ze,dt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Ze,dt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ft,Lx]}],"shadow-color":[{shadow:[Qt]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ft,Y]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[T]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Y]}],duration:[{duration:ge()}],ease:[{ease:["linear","in","out","in-out",Y]}],delay:[{delay:ge()}],animate:[{animate:["none","spin","ping","pulse","bounce",Y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Zt,Y]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ze,dt,Jn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},zx=wx(Bx);function re(...e){return zx(pe.clsx(e))}let Zn;function Qn(){return Zn===void 0&&(Zn=navigator.platform.includes("Mac")),Zn}function Fu(e){return`${e}`.toLowerCase()==="mod"?Qn()?"⌘":"Ctrl":`${e}`.toLowerCase()==="alt"?Qn()?"⌥":"Alt":`${e}`.toLowerCase()==="shift"?Qn()?"⇧":"Shift":e}function Uu(e){return e.map(Fu).join(" ")}const W=w.forwardRef((e,t)=>{const{icon:r=void 0,tooltip:n=void 0,disabled:i=!1,customClass:o="",loading:a=void 0,shortcutKeys:s=void 0,tooltipOptions:l={},action:u=void 0,isActive:f=void 0,children:d,asChild:h=!1,upload:p=!1,initialDisplayedColor:m=void 0,...x}=e,g=Ia[r],y=h?eu.Slot:Xa;return c.jsxs(Ya,{children:[c.jsx(Ja,{asChild:!0,children:c.jsxs(y,{"data-state":f!=null&&f()?"on":"off",onClick:u,ref:t,size:"sm",className:re("richtext-w-[32px] richtext-h-[32px]",o),disabled:i,...x,children:[g&&c.jsx(g,{className:"richtext-size-4"}),d]})}),n&&c.jsx(kn,{...l,children:c.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[c.jsx("div",{children:n}),!!(s!=null&&s.length)&&c.jsx("span",{children:Uu(s)})]})})]})});function Hx(e){const t=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return t.map((n,i)=>({type:`image-${n}`,component:W,componentProps:{tooltip:q.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateImage({width:q.IMAGE_SIZE[n]}),isActive:()=>e.isActive("image",{width:q.IMAGE_SIZE[n]})}}))}function qx(e){const t=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return t.map((n,i)=>({type:`image-${n}`,component:W,componentProps:{tooltip:q.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateImageGif({width:q.IMAGE_SIZE[n]}),isActive:()=>e.isActive("image",{width:q.IMAGE_SIZE[n]})}}))}function Fx(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:W,componentProps:{tooltip:q.localeActions.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=e.commands)==null?void 0:i.setAlignImage)==null?void 0:o.call(i,n)},isActive:()=>e.isActive({align:n})||!1,disabled:!1}}))}function Ux(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:W,componentProps:{tooltip:q.localeActions.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=e.commands)==null?void 0:i.setAlignImageGif)==null?void 0:o.call(i,n)},isActive:()=>e.isActive({align:n})||!1,disabled:!1}}))}function Wx(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:W,componentProps:{tooltip:q.localeActions.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=e.commands)==null?void 0:i.setAlignImageMermaid)==null?void 0:o.call(i,n)},isActive:()=>e.isActive({align:n})||!1,disabled:!1}}))}function Gx(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:W,componentProps:{tooltip:q.localeActions.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=e.commands)==null?void 0:i.setAlignImageDrawer)==null?void 0:o.call(i,n)},isActive:()=>e.isActive({align:n})||!1,disabled:!1}}))}function Vx(e){return[{type:"flex-start",icon:"AlignLeft",tooltip:"Align left"},{type:"center",icon:"AlignCenter",tooltip:"Align center"},{type:"flex-end",icon:"AlignRight",tooltip:"Align right"}].map(r=>({type:`video-align-${r.type}`,component:W,componentProps:{tooltip:r.tooltip,icon:r.icon,action:()=>e.commands.updateVideo({align:r.type}),isActive:()=>e.getAttributes("video").align===r.type}}))}function Kx(e){const t=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return t.map((n,i)=>({type:`video-${n}`,component:W,componentProps:{tooltip:q.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateVideo({width:q.VIDEO_SIZE[n]}),isActive:()=>e.isActive("video",{width:q.VIDEO_SIZE[n]})}}))}function Xx(e){return[{type:"flipX",component:W,componentProps:{editor:e,tooltip:q.localeActions.t("editor.tooltip.flipX"),icon:"FlipX",action:()=>{const t=e.getAttributes("image"),{flipX:r}=t;e.chain().focus(void 0,{scrollIntoView:!1}).updateImage({flipX:!r}).run()}}},{type:"flipY",component:W,componentProps:{editor:e,tooltip:q.localeActions.t("editor.tooltip.flipY"),icon:"FlipY",action:()=>{const t=e.getAttributes("image"),{flipY:r}=t;e.chain().focus(void 0,{scrollIntoView:!1}).updateImage({flipY:!r}).run()}}},...Hx(e),...Fx(e),{type:"remove",component:W,componentProps:{editor:e,tooltip:q.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;B.deleteSelection(t,r)}}}]}function Yx(e){return[...qx(e),...Ux(e),{type:"remove",component:W,componentProps:{editor:e,tooltip:q.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;B.deleteSelection(t,r)}}}]}function Jx(e){return[...Wx(e),{type:"edit",component:W,componentProps:{editor:e,tooltip:q.localeActions.t("editor.edit"),icon:"Pencil",action:()=>!0}},{type:"remove",component:W,componentProps:{editor:e,tooltip:q.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;B.deleteSelection(t,r)}}}]}function Zx(e){return[...Gx(e),{type:"edit",component:W,componentProps:{editor:e,tooltip:q.localeActions.t("editor.edit"),icon:"Pencil",action:()=>(console.log("AAA"),!0)}},{type:"remove",component:W,componentProps:{editor:e,tooltip:q.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;B.deleteSelection(t,r)}}}]}function Qx(e){return[...Kx(e),...Vx(e),{type:"remove",component:W,componentProps:{editor:e,tooltip:q.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;B.deleteSelection(t,r)}}}]}function e0(e,t){return q.BUBBLE_TEXT_LIST.reduce((r,n)=>{if(n==="divider"&&r.length>0)return[...r,{type:"divider",component:void 0,componentProps:{}}];const i=e.extensionManager.extensions.find(o=>o.name===n);return i?[...r,i.configure().options.button({editor:e,t,extension:i})]:r},[])}function Ta(e,t,r){const n=[],i=e.node(0);r=typeof r=="number"&&r>=0?r:e.sameParent(t)?Math.max(0,e.sharedDepth(t.pos)-1):e.sharedDepth(t.pos);const o=new B.NodeRange(e,t,r),a=o.depth===0?0:i.resolve(o.start).posAtIndex(0);return o.parent.forEach((s,l)=>{const u=a+l,f=u+s.nodeSize;if(u<o.start||u>=o.end)return;const d=new B.SelectionRange(i.resolve(u),i.resolve(f));n.push(d)}),n}class Ea{constructor(t,r){Or(this,"anchor");Or(this,"head");this.anchor=t,this.head=r}map(t){return new Ea(t.map(this.anchor),t.map(this.head))}resolve(t){const r=t.resolve(this.anchor),n=t.resolve(this.head);return new Fe(r,n)}}class Fe extends B.Selection{constructor(r,n,i,o=1){const{doc:a}=r,s=r===n,l=r.pos===a.content.size&&n.pos===a.content.size,u=s&&!l?a.resolve(n.pos+(o>0?1:-1)):n,f=s&&l?a.resolve(r.pos-(o>0?1:-1)):r,d=Ta(f.min(u),f.max(u),i);super(u.pos>=r.pos?d[0].$from:d[d.length-1].$to,u.pos>=r.pos?d[d.length-1].$to:d[0].$from,d);Or(this,"depth");this.depth=i}get $to(){return this.ranges[this.ranges.length-1].$to}eq(r){return r instanceof Fe&&r.$from.pos===this.$from.pos&&r.$to.pos===this.$to.pos}map(r,n){const i=r.resolve(n.map(this.anchor)),o=r.resolve(n.map(this.head));return new Fe(i,o)}toJSON(){return{type:"nodeRange",anchor:this.anchor,head:this.head}}get isForwards(){return this.head>=this.anchor}get isBackwards(){return!this.isForwards}extendBackwards(){const{doc:r}=this.$from;if(this.isForwards&&this.ranges.length>1){const o=this.ranges.slice(0,-1),a=o[0].$from,s=o[o.length-1].$to;return new Fe(a,s,this.depth)}const n=this.ranges[0],i=r.resolve(Math.max(0,n.$from.pos-1));return new Fe(this.$anchor,i,this.depth)}extendForwards(){const{doc:r}=this.$from;if(this.isBackwards&&this.ranges.length>1){const o=this.ranges.slice(1),a=o[0].$from,s=o[o.length-1].$to;return new Fe(s,a,this.depth)}const n=this.ranges[this.ranges.length-1],i=r.resolve(Math.min(r.content.size,n.$to.pos+1));return new Fe(this.$anchor,i,this.depth)}static fromJSON(r,n){return new Fe(r.resolve(n.anchor),r.resolve(n.head))}static create(r,n,i,o,a=1){return new this(r.resolve(n),r.resolve(i),o,a)}getBookmark(){return new Ea(this.anchor,this.head)}}function t0(e){const t=e.cloneNode(!0),r=[e,...Array.from(e.getElementsByTagName("*"))],n=[t,...Array.from(t.getElementsByTagName("*"))];return r.forEach((i,o)=>{n[o].style.cssText=function(a){let s="";const l=getComputedStyle(a);for(let u=0;u<l.length;u+=1)s+=`${l[u]}:${l.getPropertyValue(l[u])};`;return s}(i)}),t}function Mr(e,t){return window.getComputedStyle(e)[t]}function r0(e=0,t=0,r=0){return Math.min(Math.max(e,t),r)}function Vs(e){e.parentNode!==null&&e.parentNode!==void 0&&e.parentNode.removeChild(e)}function Wu(e){const{x:t,y:r,direction:n,editor:i}=e;let o=null,a=null,s=null,l=t;for(;a===null&&l<window.innerWidth&&l>0;){const u=document.elementsFromPoint(l,r),f=u.findIndex(h=>h.classList.contains("ProseMirror")),d=u.slice(0,f);if(d.length>0){const h=d[0];if(o=h,s=i.view.posAtDOM(h,0),s>=0){a=i.state.doc.nodeAt(Math.max(s-1,0)),(a===null||a.isText)&&(a=i.state.doc.nodeAt(Math.max(s-1,0))),a||(a=i.state.doc.nodeAt(Math.max(s,0)));break}}n==="left"?l-=1:l+=1}return{resultElement:o,resultNode:a,pos:s!==null?s:null}}function n0(e,t){const{doc:r}=t.view.state,n=Wu({editor:t,x:e.clientX,y:e.clientY,direction:"right"});if(!n.resultNode||n.pos===null)return[];const i=e.clientX,o=function(f,d,h){const p=Number.parseInt(Mr(f.dom,"paddingLeft"),10),m=Number.parseInt(Mr(f.dom,"paddingRight"),10),x=Number.parseInt(Mr(f.dom,"borderLeftWidth"),10),g=Number.parseInt(Mr(f.dom,"borderLeftWidth"),10),y=f.dom.getBoundingClientRect();return{left:r0(d,y.left+p+x,y.right-m-g),top:h}}(t.view,i,e.clientY),a=t.view.posAtCoords(o);if(!a)return[];const{pos:s}=a;if(!r.resolve(s).parent)return[];const l=r.resolve(n.pos),u=r.resolve(n.pos+1);return Ta(l,u,0)}function Ks(e,t){const r=e.resolve(t),{depth:n}=r;return n===0?t:r.pos-r.parentOffset-1}function Xs(e,t){const r=e.nodeAt(t),n=e.resolve(t);let{depth:i}=n,o=r;for(;i>0;){const a=n.node(i);i-=1,i===0&&(o=a)}return o}function Ys(e,t){let r=t;for(;r&&r.parentNode&&r.parentNode!==e.dom;)r=r.parentNode;return r}const Gu=new B.PluginKey("dragHandle");function i0({pluginKey:e=Gu,element:t,editor:r,tippyOptions:n,onNodeChange:i}){const o=document.createElement("div");let a=null,s=!1,l=null,u=-1;return t.addEventListener("dragstart",f=>{const{view:d}=r;if(!f.dataTransfer)return;const{empty:h,$from:p,$to:m}=d.state.selection,x=n0(f,r),g=Ta(p,m,0),y=g.some(O=>x.find($=>$.$from===O.$from&&$.$to===O.$to)),S=h||!y?x:g;if(S.length===0)return;const{tr:T}=d.state,E=document.createElement("div"),j=S[0].$from.pos,M=S[S.length-1].$to.pos,L=Fe.create(d.state.doc,j,M),k=L.content();S.forEach(O=>{const $=t0(d.nodeDOM(O.$from.pos));E.append($)}),E.style.position="absolute",E.style.top="-10000px",document.body.append(E),f.dataTransfer.clearData(),f.dataTransfer.setDragImage(E,0,0),d.dragging={slice:k,move:!0},T.setSelection(L),d.dispatch(T),document.addEventListener("drop",()=>Vs(E),{once:!0}),setTimeout(()=>{t&&(t.style.pointerEvents="none")},0)}),t.addEventListener("dragend",()=>{t&&(t.style.pointerEvents="auto")}),new B.Plugin({key:typeof e=="string"?new B.PluginKey(e):e,state:{init:()=>({locked:!1}),apply(f,d){const h=f.getMeta("lockDragHandle"),p=f.getMeta("hideDragHandle");if(h!==void 0&&(s=h),p&&a)return a.hide(),s=!1,l=null,u=-1,i==null||i({editor:r,node:null,pos:-1}),d;if(f.docChanged&&u!==-1&&t&&a){const m=f.mapping.map(u);m!==u&&(u=m)}return d}},view:f=>{return d(),h(r.view.dom),a=tu(f.dom,{...p(),...n}),{update(E,j){if(!m(t,a)||(t.draggable=!s,!x(E,j)))return;const M=g(E);M&&y(E,M)},destroy(){T()}};function d(){t.draggable=!0,t.style.pointerEvents="auto"}function h(E){var j;(j=E.parentElement)==null||j.appendChild(o),o.appendChild(t),Object.assign(o.style,{pointerEvents:"none",position:"absolute",top:"0",left:"0"})}function p(){return{getReferenceClientRect:null,interactive:!0,trigger:"manual",placement:"left-start",hideOnClick:!1,duration:100,zIndex:10,appendTo:o,content:t,popperOptions:{modifiers:[{name:"flip",enabled:!1},{name:"preventOverflow",options:{rootBoundary:"document",mainAxis:!1}}]}}}function m(E,j){return E&&j}function x(E,j){return!E.state.doc.eq(j.doc)&&u!==-1}function g(E){let j=E.nodeDOM(u);return j=Ys(E,j),j===E.dom||(j==null?void 0:j.nodeType)!==1?null:j}function y(E,j){const M=E.posAtDOM(j,0),L=Xs(r.state.doc,M);if(L===l)return;const k=Ks(r.state.doc,M);l=L,u=k,i==null||i({editor:r,node:l,pos:u}),S(j)}function S(E){a.setProps({getReferenceClientRect:()=>E.getBoundingClientRect()}),a.show()}function T(){a==null||a.destroy(),t&&Vs(o)}},props:{handleDOMEvents:{mouseleave:(f,d)=>{if(s||!h(d))return!1;return p(),m(),!1;function h(x){return x.target&&!o.contains(x.relatedTarget)}function p(){a==null||a.hide()}function m(){l=null,u=-1,i==null||i({editor:r,node:null,pos:-1})}},mousemove:Ar((f,d)=>{if(!t||!a||s)return!1;const h=Wu({x:d.clientX,y:d.clientY,direction:"right",editor:r});if(!h.resultElement||h.resultElement===f.dom)return!1;const p=Ys(f,h.resultElement);if(p===f.dom||(p==null?void 0:p.nodeType)!==1)return!1;const m=f.posAtDOM(p,0),x=Xs(r.state.doc,m);if(x===l)return!1;const g=Ks(r.state.doc,m);return l=x,u=g,i==null||i({editor:r,node:l,pos:u}),a.setProps({getReferenceClientRect:()=>p.getBoundingClientRect()}),a.show(),!1},100)}}})}var Xr=(e=>(e[e.max=7]="max",e[e.min=0]="min",e[e.more=1]="more",e[e.less=-1]="less",e))(Xr||{});function o0(e,t,r){return e<t?t:e>r?r:e}function a0(e,t,r,n){const{doc:i,selection:o}=e;if(!i||!o||!(o instanceof B.TextSelection||o instanceof B.AllSelection))return e;const{from:a,to:s}=o;return i.nodesBetween(a,s,(l,u)=>{const f=l.type;return r.includes(f.name)?(e=oa(e,u,t),!1):!B.isList(l.type.name,n.extensionManager.extensions)}),e}function oa(e,t,r){if(!e.doc)return e;const n=e.doc.nodeAt(t);if(!n)return e;const a=o0((n.attrs.indent||0)+r,0,7);if(a===n.attrs.indent)return e;const s={...n.attrs,indent:a};return e.setNodeMarkup(t,n.type,s,n.marks)}function s0({delta:e,types:t}){return({state:r,dispatch:n,editor:i})=>{const{selection:o}=r;let{tr:a}=r;return a=a.setSelection(o),a=a0(a,e,t,i),a.docChanged?(n&&n(a),!0):!1}}function c0(e){var k,O,$;const{pluginKey:t=Gu}=e,{t:r}=q.useLocale(),[n,i]=w.useState(null),[o,a]=w.useState(-1),s=w.useRef(null),l=w.useRef(null),[u,f]=w.useState(!1),d=e.editor.extensionManager.extensions.some(C=>C.name==="textAlign"),h=e.editor.extensionManager.extensions.some(C=>C.name==="indent"),p=e.editor.extensionManager.extensions.some(C=>C.name==="clear");w.useEffect(()=>{s.current&&!e.editor.isDestroyed&&(l.current=i0({editor:e.editor,element:s.current,pluginKey:"ContentItemMenu",tippyOptions:{offset:[-2,16],zIndex:99,moveTransition:"transform 0.15s ease-out"},onNodeChange:j}),e.editor.registerPlugin(l.current))},[e.editor,s]);function m(){const C=e.editor.chain();C.setNodeSelection(o).unsetAllMarks(),(n==null?void 0:n.type.name)!=="paragraph"&&C.setParagraph(),C.run()}function x(){e.editor.chain().focus().setNodeSelection(o).run(),document.execCommand("copy")}function g(){e.editor.commands.setNodeSelection(o);const{$anchor:C}=e.editor.state.selection,A=C.node(1)||e.editor.state.selection.node;e.editor.chain().setMeta("hideDragHandle",!0).insertContentAt(o+((n==null?void 0:n.nodeSize)||0),A.toJSON()).run()}function y(C){e.editor.commands.setTextAlign(C)}function S(){const C=oa(e.editor.state.tr,o,1);C.setMeta("hideDragHandle",!0),e.editor.view.dispatch&&e.editor.view.dispatch(C)}function T(){const C=oa(e.editor.state.tr,o,-1);e.editor.view.dispatch&&e.editor.view.dispatch(C)}function E(){e.editor.chain().setMeta("hideDragHandle",!0).setNodeSelection(o).deleteSelection().run()}function j(C){C.node&&i(C.node),a(C.pos)}function M(){var C;if(o!==-1){const A=(n==null?void 0:n.nodeSize)||0,P=o+A,D=(n==null?void 0:n.type.name)==="paragraph"&&((C=n==null?void 0:n.content)==null?void 0:C.size)===0,U=D?o+2:P+2;e.editor.chain().command(({dispatch:H,tr:K,state:te})=>H?(D?K.insertText("/",o,o+1):K.insert(P,te.schema.nodes.paragraph.create(null,[te.schema.text("/")])),H(K)):!0).focus(U).run()}}w.useEffect(()=>(u?e.editor.commands.setMeta("lockDragHandle",!0):e.editor.commands.setMeta("lockDragHandle",!1),()=>{e.editor.commands.setMeta("lockDragHandle",!1)}),[u]),w.useEffect(()=>()=>{l.current&&(e.editor.unregisterPlugin(t),l.current=null)},[]),w.useEffect(()=>{var C;(C=e.editor)!=null&&C.isDestroyed&&l.current&&(e.editor.unregisterPlugin(t),l.current=null)},[(k=e.editor)==null?void 0:k.isDestroyed]);const L=C=>{e!=null&&e.disabled||f(C)};return c.jsx("div",{ref:s,className:`drag-handle richtext-duration-200 richtext-ease-in-out [transition-property:top,_left] ${e==null?void 0:e.className}`,style:{opacity:e!=null&&e.disabled?0:1},children:c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-0.5 richtext-duration-200 richtext-ease-in-out [transition-property:top,_left]",children:[c.jsx(we,{className:"!richtext-size-7 richtext-cursor-grab",disabled:e==null?void 0:e.disabled,onClick:M,size:"icon",type:"button",variant:"ghost",children:c.jsx(me,{className:"richtext-text-lg richtext-text-neutral-600 dark:richtext-text-neutral-200",name:"Plus"})}),c.jsxs(xd,{onOpenChange:L,open:u,children:[c.jsxs("div",{className:"richtext-relative richtext-flex richtext-flex-col",children:[c.jsxs(Ya,{children:[c.jsx(Ja,{asChild:!0,disabled:e==null?void 0:e.disabled,children:c.jsx(we,{className:"richtext-relative richtext-z-[1] !richtext-size-7 richtext-cursor-grab",disabled:e==null?void 0:e.disabled,size:"icon",type:"button",variant:"ghost",onMouseUp:C=>{C.preventDefault(),!(e!=null&&e.disabled)&&f(!0)},children:c.jsx(me,{className:"richtext-text-sm richtext-text-neutral-600 dark:richtext-text-neutral-200",name:"Grip"})})}),c.jsx(kn,{children:r("editor.draghandle.tooltip")})]}),c.jsx(vd,{className:"richtext-absolute richtext-left-0 richtext-top-0 richtext-z-0 richtext-size-[28px]"})]}),c.jsxs(Wa,{align:"start",className:"richtext-w-48",side:"bottom",sideOffset:0,children:[c.jsxs(ze,{className:"richtext-flex richtext-gap-3 richtext-bg-opacity-10 hover:richtext-bg-red-400 hover:richtext-bg-opacity-20 focus:richtext-bg-red-400 focus:richtext-bg-opacity-30 focus:richtext-text-red-500 dark:hover:richtext-bg-opacity-20 dark:hover:richtext-text-red-500",onClick:E,children:[c.jsx(me,{name:"Trash2"}),c.jsx("span",{children:r("editor.remove")})]}),p?c.jsxs(ze,{className:"richtext-flex richtext-gap-3",onClick:m,children:[c.jsx(me,{name:"PaintRoller"}),c.jsx("span",{children:r("editor.clear.tooltip")})]}):null,c.jsxs(ze,{className:"richtext-flex richtext-gap-3",onClick:x,children:[c.jsx(me,{name:"Clipboard"}),c.jsx("span",{children:r("editor.copyToClipboard")})]}),c.jsxs(ze,{className:"richtext-flex richtext-gap-3",onClick:g,children:[c.jsx(me,{name:"Copy"}),c.jsx("span",{children:r("editor.copy")})]}),d||h?c.jsx(Ga,{}):null,d?c.jsxs(cc,{children:[c.jsxs(pa,{className:"richtext-flex richtext-gap-3",children:[c.jsx(me,{name:"AlignCenter"}),c.jsx("span",{children:r("editor.textalign.tooltip")})]}),c.jsx(sc,{children:c.jsxs(ma,{children:[c.jsxs(ze,{className:"richtext-flex richtext-gap-3",onClick:()=>y("left"),children:[c.jsx(me,{name:"AlignLeft"}),c.jsx("span",{children:r("editor.textalign.left.tooltip")})]}),c.jsxs(ze,{className:"richtext-flex richtext-gap-3",onClick:()=>y("center"),children:[c.jsx(me,{name:"AlignCenter"}),c.jsx("span",{children:r("editor.textalign.center.tooltip")})]}),c.jsxs(ze,{className:"richtext-flex richtext-gap-3",onClick:()=>y("right"),children:[c.jsx(me,{name:"AlignRight"}),c.jsx("span",{children:r("editor.textalign.right.tooltip")})]})]})})]}):null,h?c.jsxs(cc,{children:[c.jsxs(pa,{className:"richtext-flex richtext-gap-3",children:[c.jsx(me,{name:"IndentIncrease"}),c.jsx("span",{children:r("editor.indent")})]}),c.jsx(sc,{children:c.jsxs(ma,{children:[c.jsxs(ze,{className:"richtext-flex richtext-gap-3",disabled:((O=n==null?void 0:n.attrs)==null?void 0:O.indent)>=Xr.max,onClick:S,children:[c.jsx(me,{name:"IndentIncrease"}),c.jsx("span",{children:r("editor.indent.tooltip")})]}),c.jsxs(ze,{className:"richtext-flex richtext-gap-3",disabled:(($=n==null?void 0:n.attrs)==null?void 0:$.indent)<=Xr.min,onClick:T,children:[c.jsx(me,{name:"IndentDecrease"}),c.jsx("span",{children:r("editor.outdent.tooltip")})]})]})})]}):null]})]})]})})}const l0={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function u0({item:e,disabled:t,editor:r}){var i;const n=e.component;return n?c.jsx(n,{...e.componentProps,disabled:t||((i=e==null?void 0:e.componentProps)==null?void 0:i.disabled),editor:r}):c.jsx(c.Fragment,{})}function d0(e){const{t,lang:r}=q.useLocale(),n=({editor:o})=>{const{selection:a}=o.view.state,{$from:s,to:l}=a;return s.pos===l?!1:a instanceof B.TextSelection},i=w.useMemo(()=>e.disabled||!(e!=null&&e.editor)?[]:e0(e.editor,t),[e.disabled,e.editor,r,t]);return c.jsx(pe.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:n,tippyOptions:l0,children:i!=null&&i.length?c.jsx("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-gap-[4px] richtext-whitespace-nowrap",children:i==null?void 0:i.map((o,a)=>(o==null?void 0:o.type)==="divider"?c.jsx(Be,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"},`bubbleMenu-divider-${a}`):c.jsx(u0,{disabled:e.disabled,editor:e.editor,item:o},`bubbleMenu-text-${a}`))})}):c.jsx(c.Fragment,{})})}function f0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.jsx("path",{fill:"currentColor",d:"M19 12h-2v3h-3v2h5zM7 9h3V7H5v5h2zm14-6H3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 16H3V5h18z"})})}function h0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 15h15m0 4H6m9-8h6m0-4h-6M9 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2M3 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2"})})}function p0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",className:"richtext-w-4 richtext-h-4",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M5.5 3c1.404 0 2.107 0 2.611.38c.219.164.406.375.552.62C9 4.568 9 5.358 9 6.938v10.125c0 1.58 0 2.37-.337 2.937a2.1 2.1 0 0 1-.552.621c-.504.38-1.207.38-2.611.38s-2.107 0-2.611-.38a2.1 2.1 0 0 1-.552-.62C2 19.432 2 18.642 2 17.062V6.938c0-1.58 0-2.37.337-2.938a2.1 2.1 0 0 1 .552-.62C3.393 3 4.096 3 5.5 3M20 11.938v5.124c0 1.58 0 2.37-.337 2.938a2.1 2.1 0 0 1-.552.62c-.504.38-1.207.38-2.611.38s-2.107 0-2.611-.38a2.1 2.1 0 0 1-.552-.62C13 19.433 13 18.642 13 17.063V6.938c0-1.58 0-2.37.337-2.938M22 9l-6-6m6 0l-6 6",color:"currentColor"})})}function m0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",className:"richtext-w-4 richtext-h-4",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M21 18.5c0 1.404 0 2.107-.38 2.611a2.1 2.1 0 0 1-.62.552c-.567.337-1.358.337-2.937.337H6.938c-1.58 0-2.37 0-2.938-.337a2.1 2.1 0 0 1-.62-.552C3 20.607 3 19.904 3 18.5s0-2.107.38-2.611c.163-.218.374-.406.62-.552C4.567 15 5.357 15 6.938 15h10.125c1.58 0 2.37 0 2.937.337c.246.146.457.334.62.552c.38.504.38 1.207.38 2.611M12.063 4H6.937C5.358 4 4.568 4 4 4.337a2.1 2.1 0 0 0-.62.552C3 5.393 3 6.096 3 7.5s0 2.107.38 2.611c.163.218.374.406.62.552C4.567 11 5.357 11 6.938 11h10.125c1.58 0 2.37 0 2.937-.337M21 8l-6-6m6 0l-6 6",color:"currentColor"})})}function g0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.jsx("path",{fill:"currentColor",d:"M14 2H6a2 2 0 0 0-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V8zm4 18H6V4h7v5h5zm-.65-10l-2.1 9h-1.4l-1.8-6.79l-1.8 6.79h-1.4l-2.2-9h1.5l1.4 6.81l1.8-6.81h1.3l1.8 6.81l1.4-6.81z"})})}function me(e){const t=Ia[e.name];return t?c.jsx(t,{onClick:e==null?void 0:e.onClick,className:`richtext-w-4 richtext-h-4 ${(e==null?void 0:e.className)||""}`}):null}function x0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.jsx("path",{fill:"currentColor",d:"M21 22H3v-2h18zm0-18H3V2h18zm-11 9.7h4l-2-5.4zM11.2 6h1.7l4.7 12h-2l-.9-2.6H9.4L8.5 18h-2z"})})}function Vu(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 48 48",...e,children:c.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M36 19L24 31L12 19z"})})}function v0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.jsx("path",{fill:"currentColor",d:"M9 7v10h6v-2h-4V7z"})})}function y0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.jsx("path",{fill:"currentColor",d:"M9 7c-1.1 0-2 .9-2 2v8h2V9h2v7h2V9h2v8h2V9a2 2 0 0 0-2-2z"})})}function b0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.jsx("path",{fill:"currentColor",d:"M11 7c-1.1 0-2 .9-2 2v2a2 2 0 0 0 2 2h2v2H9v2h4c1.11 0 2-.89 2-2v-2a2 2 0 0 0-2-2h-2V9h4V7z"})})}function w0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.jsx("path",{fill:"currentColor",d:"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6l1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6l-1.4-1.4z"})})}function S0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m-9 8h4m-2-2v4"})})}function A0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m9 8h4m-2-2v4"})})}function C0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 21v-4m0-4V9m0-4V3m-2 18h4M8 5v4h11l2-2l-2-2zm6 8v4H6l-2-2l2-2z"})})}function j0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.jsx("path",{fill:"currentColor",d:"M23.943 19.806a.2.2 0 0 0-.168-.034c-1.26-1.855-2.873-3.61-4.419-5.315l-.252-.284c-.001-.073-.067-.12-.134-.15l-.084-.084c-.05-.1-.169-.167-.286-.1c-.47.234-.907.585-1.327.919c-.554.434-1.109.87-1.63 1.354a5 5 0 0 0-.588.618c-.084.117-.017.217.084.267c-.37.368-.74.736-1.109 1.12a.2.2 0 0 0-.05.134c0 .05.033.1.067.117l.655.502v.016c.924.92 2.554 2.173 4.285 3.527c.251.201.52.402.773.602c.117.134.234.285.335.418c.05.066.169.084.236.033c.033.034.084.067.118.1a.24.24 0 0 0 .1.034a.15.15 0 0 0 .135-.066a.24.24 0 0 0 .033-.1c.017 0 .017.016.034.016a.2.2 0 0 0 .134-.05l3.058-3.327c.12-.116.014-.267 0-.267m-7.628-.134l-1.546-1.17l-.15-.1c-.035-.017-.068-.05-.102-.067l-.117-.1c.66-.66 1.33-1.308 2-1.956c-.488.484-1.463 1.906-1.261 2.373c.002 0 .018.042.067.084zm4.1 3.126l-1.277-.97a27 27 0 0 0-1.58-1.504c.69.518 1.277.97 1.361 1.053c.673.585.638.485 1.093.87l.554.4c-.074.103-.151.148-.151.151m.336.25l-.034-.016a1 1 0 0 0 .152-.117zM.588 3.476c.033.217.084.435.117.636c.201 1.103.403 2.106.772 2.858l.152.568c.05.217.134.485.219.552a67 67 0 0 0 3.578 2.942a.18.18 0 0 0 .219 0s0 .016.016.016a.15.15 0 0 0 .118.05a.2.2 0 0 0 .134-.05c1.798-1.989 3.142-3.627 4.1-4.998c.068-.066.084-.167.084-.25c.067-.067.118-.151.185-.201c.067-.067.067-.184 0-.235l-.017-.016c0-.033-.017-.084-.05-.1c-.42-.401-.722-.685-1.042-.986a94 94 0 0 1-2.352-2.273c-.017-.017-.034-.034-.067-.034c-.336-.117-1.025-.234-1.882-.385c-1.277-.216-3.008-.517-4.57-.986c0 0-.101 0-.118.017l-.05.05C.05.714.022.707 0 .718c.017.1.017.167.05.284c0 .033.068.301.068.334zm7.19 4.78l-.033.034a.036.036 0 0 1 .033-.034M6.553 2.238c.101.1.521.502.622.585c-.437-.2-1.529-.702-2.034-.869c.505.1 1.194.201 1.412.284M.79 1.403c.252.434.454 1.939.655 3.41c-.118-.469-.201-.936-.302-1.372C.992 2.673.84 1.988.638 1.386c.124 0 .152.021.152.017m-.286-.369c0-.016 0-.033-.017-.033c.085 0 .135.017.202.05c0 .006-.145-.017-.185-.017m23.17-.217c.017-.066-.336-.367-.219-.384c.253-.017.253-.401 0-.401c-.335.017-.688.1-1.008.15c-.587.117-1.192.234-1.78.367a80 80 0 0 0-3.949.937c-.403.117-.857.2-1.243.401c-.135.067-.118.2-.05.284c-.034.017-.051.017-.085.034c-.117.017-.218.034-.335.05c-.102.017-.152.1-.135.2c0 .017.017.05.017.067c-.706.936-1.496 1.923-2.353 2.976c-.84.969-1.73 1.989-2.62 3.042c-2.84 3.31-6.05 7.07-9.594 10.38a.16.16 0 0 0 0 .234c.016.016.033.033.05.033c-.05.05-.101.085-.152.134q-.05.05-.05.1a.4.4 0 0 0-.067.084c-.067.067-.067.184.017.234c.067.066.185.066.235-.017c.017-.017.017-.033.033-.033a.265.265 0 0 1 .37 0c.202.217.404.435.588.618l-.42-.35c-.067-.067-.184-.05-.234.016c-.068.066-.051.184.016.234l4.469 3.727c.034.034.067.034.118.034a.15.15 0 0 0 .117-.05l.101-.1c.017.016.05.016.067.016c.05 0 .084-.016.118-.05c6.049-6.05 10.922-10.614 16.5-14.693c.05-.033.067-.1.067-.15c.067 0 .118-.05.15-.117c1.026-3.125 1.228-5.9 1.295-7.27c0-.059.016-.038.016-.068c.017-.033.017-.05.017-.05a.98.98 0 0 0-.067-.619m-10.82 4.915c.268-.301.537-.619.806-.903c-1.73 2.273-4.603 5.767-8.67 9.929c2.773-3.059 5.562-6.218 7.864-9.026M5.14 23.466c-.016-.017-.016-.017 0-.017zm2.504-2.156c.135-.15.27-.284.42-.434c0 0 0 .016.017.016c-.224.198-.433.418-.437.418m.69-.668c.099-.1.14-.173.284-.318c.992-1.02 2.017-2.04 3.059-3.076l.016-.016c.252-.2.555-.418.824-.619a228 228 0 0 0-4.184 4.029M14.852 3.91c-.554.719-1.176 1.671-1.697 2.423c-1.646 2.374-6.94 8.174-7.057 8.274a1190 1190 0 0 1-4.839 4.597l-.1.1c-.085-.1-.085-.25.016-.334C8.652 11.966 13.19 6.133 15.021 3.576c-.05.116-.084.216-.168.334zm2.906 3.427c-.671-.386-.99-.987-.806-1.572l.05-.2a.8.8 0 0 1 .085-.167a1.9 1.9 0 0 1 .756-.703c.016 0 .033 0 .05-.016c-.017-.034-.017-.084-.017-.134c.017-.1.085-.167.202-.167c.202 0 .824.184 1.059.384c.067.05.134.117.202.184c.084.1.218.268.285.401c.034.017.067.184.118.268c.033.134.067.284.05.418c-.017.016 0 .116-.017.116a1.6 1.6 0 0 1-.218.619c-.03.03.006.012-.05.067a1.2 1.2 0 0 1-.32.334a1.49 1.49 0 0 1-1.26.234a2 2 0 0 0-.169-.066m4.37 1.403c0 .017-.017.05 0 .067c-.034 0-.05.017-.085.034a110 110 0 0 0-3.915 3.025c1.11-.986 2.218-1.989 3.378-2.975c.336-.301.571-.686.638-1.12l.168-1.003v-.033c.085-.201.404-.118.353.1c-.004-.001-.173.795-.537 1.905"})})}function Ku(){return c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",children:[c.jsx("path",{fill:"currentColor",d:"M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3z"}),c.jsx("path",{fill:"currentColor",d:"M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z"})]})}function Xu(){return c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:"icon",viewBox:"0 0 1024 1024",children:[c.jsx("path",{fill:"currentColor",d:"M679.253 402.364 618.77 561.015l-60.348-158.651a30.04 30.04 0 0 0-30.447-18.637 29.76 29.76 0 0 0-30.447 18.637l-60.416 158.651-60.416-158.651a30.515 30.515 0 0 0-38.843-17.272 28.945 28.945 0 0 0-17.954 37.547l88.815 233.267c4.369 11.469 15.7 19.115 28.398 19.115a30.31 30.31 0 0 0 28.468-19.115l62.395-163.908 62.396 163.84c4.437 11.605 15.701 19.183 28.4 19.183a30.31 30.31 0 0 0 28.466-19.115l88.747-233.267a28.945 28.945 0 0 0-17.886-37.547 30.447 30.447 0 0 0-38.912 17.272zm219.478 395.605-51.883-29.218c-28.672-16.18-52.224-3.072-52.224 29.082v.273H643.209a29.833 29.833 0 0 0-30.31 29.354c0 16.18 13.584 29.218 30.31 29.218h151.825c1.092 30.516 24.03 43.077 52.224 27.648l51.063-27.989c29.013-15.906 29.15-42.189.41-58.368"}),c.jsx("path",{fill:"currentColor",d:"m810.667 913.135-.478.068H201.796c-19.865 0-36.727-11.673-36.727-25.6v-618.36h154.965c51.268 0 92.911-39.39 92.911-87.858v-87.86H810.19c19.797 0 36.522 11.742 36.522 25.669V739.26h61.987V119.262c0-46.421-44.169-84.241-98.51-84.241H328.364l-225.28 194.56v658.09c0 46.285 44.236 84.105 98.713 84.105H810.19c43.759 0 80.554-24.713 93.32-58.573h-92.842zM350.89 94.89v86.562c0 16.11-13.858 29.286-30.925 29.286H216.815L350.959 94.891z"})]})}function T0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentColor",children:[c.jsx("path",{d:"M14.86 22h-4.312c-3.291 0-4.937 0-6.08-.798a4.2 4.2 0 0 1-.863-.805c-.855-1.066-.855-2.6-.855-5.67v-2.545c0-2.963 0-4.445.473-5.628c.761-1.903 2.37-3.403 4.41-4.113C8.9 2 10.49 2 13.667 2c1.816 0 2.723 0 3.448.252c1.166.406 2.085 1.263 2.52 2.35c.27.676.27 1.523.27 3.216V10"}),c.jsx("path",{d:"M2.75 12c0-1.84 1.506-3.333 3.364-3.333c.672 0 1.464.116 2.117-.057a1.67 1.67 0 0 0 1.19-1.179c.174-.647.057-1.432.057-2.098C9.478 3.493 10.984 2 12.84 2m.002 16h2.523m-4.949-4.15c-.126-.8-.281-.801-1.61-.85h-1.01c-.557 0-1.009.448-1.009 1v3c0 .552.452 1 1.01 1h1.816c.39 0 .803-.313.803-.7v-1.1c0-.11-.113-.304-.224-.304H9.068M12.842 13h1.261m0 0h1.262m-1.262 0v4.875M21.251 13h-2.523c-.557 0-1.009.448-1.009 1v1.5m0 0V18m0-2.5h2.523"})]})})}function E0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:c.jsx("path",{fill:"currentColor",d:"M6.5 3a.75.75 0 0 1 .697.471l3 7.5a.75.75 0 0 1-1.393.557L7.992 9.5H5.008l-.811 2.028a.75.75 0 0 1-1.393-.556l3-7.5A.75.75 0 0 1 6.5 3m0 2.77L5.608 8h1.784zm8.28-1.55a.75.75 0 1 0-1.06 1.06l.72.72h-3.69a.75.75 0 0 0 0 1.5h3.69l-.72.72a.75.75 0 0 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06zm0 7.5a.75.75 0 1 0-1.06 1.06l.72.72H3.75a.75.75 0 0 0 0 1.5h10.69l-.72.72a.75.75 0 1 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06z"})})}function I0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:c.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"4",children:[c.jsx("circle",{cx:"10",cy:"24",r:"4"}),c.jsx("circle",{cx:"38",cy:"10",r:"4"}),c.jsx("circle",{cx:"38",cy:"24",r:"4"}),c.jsx("circle",{cx:"38",cy:"38",r:"4"}),c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M34 38H22V10h12M14 24h20"})]})})}function R0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:c.jsx("path",{fill:"currentColor",d:"M13.5 3a.75.75 0 0 0-.697.471l-3 7.5a.75.75 0 0 0 1.393.557l.812-2.028h2.984l.811 2.028a.75.75 0 0 0 1.393-.556l-3-7.5A.75.75 0 0 0 13.5 3m0 2.77L14.392 8h-1.784zM5.22 4.22a.75.75 0 0 1 1.06 1.06L5.56 6h3.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06zm0 7.5a.75.75 0 0 1 1.06 1.06l-.72.72h10.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06z"})})}function P0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"m3 21l7.548-7.548M21 3l-7.548 7.548m0 0L8 3H3l7.548 10.452m2.904-2.904L21 21h-5l-5.452-7.548",color:"currentColor"})})}function O0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.jsx("path",{fill:"currentColor",d:"M14 2H6a2 2 0 0 0-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V8zm4 18H6V4h7v5h5zm-.65-10l-2.1 9h-1.4l-1.8-6.79l-1.8 6.79h-1.4l-2.2-9h1.5l1.4 6.81l1.8-6.81h1.3l1.8 6.81l1.4-6.81z"})})}const Ia={Bold:N.Bold,LoaderCircle:N.LoaderCircle,Italic:N.Italic,Underline:N.Underline,Quote:N.Quote,TextQuote:h0,Strikethrough:N.Strikethrough,Minus:N.Minus,Eraser:N.Eraser,PaintRoller:N.PaintRoller,Redo2:N.Redo2,Undo2:N.Undo2,AlignCenter:kr.TextAlignCenterIcon,AlignJustify:kr.TextAlignJustifyIcon,AlignLeft:kr.TextAlignLeftIcon,AlignRight:kr.TextAlignRightIcon,ChevronDown:N.ChevronDown,Subscript:N.Subscript,Superscript:N.Superscript,Code:N.Code,Code2:N.CodeXml,Type:N.Type,IndentIncrease:N.IndentIncrease,IndentDecrease:N.IndentDecrease,List:N.List,ListOrdered:N.ListOrdered,ListTodo:N.ListTodo,Link:N.Link,ImageUp:N.ImageUp,Video:N.Video,Maximize:N.Maximize,Minimize:N.Minimize,Table:N.Table,Sparkles:N.Sparkles,Pencil:N.Pencil,Unlink:N.Unlink,BetweenHorizonalEnd:N.BetweenHorizonalEnd,BetweenHorizonalStart:N.BetweenHorizonalStart,BetweenVerticalStart:N.BetweenVerticalStart,BetweenVerticalEnd:N.BetweenVerticalEnd,TableCellsMerge:N.TableCellsMerge,TableCellsSplit:N.TableCellsSplit,Trash2:N.Trash2,Trash:N.Trash,Replace:N.Replace,ChevronsUpDown:N.ChevronsUpDown,LineHeight:x0,Word:g0,Heading1:N.Heading1,Heading2:N.Heading2,Heading3:N.Heading3,Heading4:N.Heading4,Heading5:N.Heading5,Heading6:N.Heading6,Columns2:N.Columns2,Columns3:N.Columns3,Columns4:N.Columns4,Plus:N.Plus,Grip:N.GripVertical,Copy:N.Copy,Clipboard:N.Clipboard,PanelLeft:N.PanelLeft,PanelRight:N.PanelRight,Columns:N.Columns2,Iframe:N.Frame,MenuDown:Vu,SizeS:b0,SizeM:y0,SizeL:v0,AspectRatio:f0,Emoji:N.SmilePlus,DeleteColumn:p0,DeleteRow:m0,SearchAndReplace:N.Replace,EmojiIcon:N.SmilePlusIcon,KatexIcon:N.Sigma,ExportPdf:Ku,ExportWord:Xu,ImportWord:O0,ColumnAddLeft:S0,ColumnAddRight:A0,BookMarked:N.BookMarked,Excalidraw:j0,ZoomIn:N.ZoomIn,ZoomOut:N.ZoomOut,Settings:N.Settings,Eye:N.Eye,TextDirection:C0,LeftToRight:E0,RightToLeft:R0,Attachment:N.Paperclip,GifIcon:T0,ChevronUp:N.ChevronUp,Crop:N.CropIcon,Mermaid:I0,Twitter:P0,CodeView:w0,FlipX:N.FlipVertical,FlipY:N.FlipHorizontal,PencilRuler:N.PencilRuler,WrapText:N.WrapText,Loader:N.Loader2};function k0({fill:e}){return c.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("g",{id:"icon/填充色",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:c.jsxs("g",{id:"icon/背景颜色",children:[c.jsx("g",{id:"编组",fill:"currentColor",children:c.jsxs("g",{transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)",id:"矩形",children:[c.jsx("path",{d:"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z",fillRule:"nonzero"}),c.jsx("path",{d:"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z",fillRule:"evenodd"}),c.jsx("path",{d:"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z",fillRule:"nonzero"})]})}),c.jsx("path",{d:"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",id:"矩形",fill:e||"#FBDE28"})]})})})}function Yu(e){const[t,r]=w.useState(void 0);function n(a){var s;(s=e.action)==null||s.call(e,a)}function i(){var a;(a=e.action)==null||a.call(e,t)}const o=w.useCallback(Ar(a=>{r(a)},350),[]);return c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-h-[32px]",children:[c.jsx(W,{tooltip:e==null?void 0:e.tooltip,disabled:e==null?void 0:e.disabled,action:i,tooltipOptions:e==null?void 0:e.tooltipOptions,shortcutKeys:e==null?void 0:e.shortcutKeys,children:c.jsx("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-text-sm",children:c.jsx(k0,{fill:t})})}),c.jsx(nf,{selectedColor:t,setSelectedColor:o,onChange:n,highlight:!0,disabled:e==null?void 0:e.disabled,children:c.jsx(we,{variant:"ghost",size:"icon",className:"!richtext-w-3 !richtext-h-[32px]",disabled:e==null?void 0:e.disabled,children:c.jsx(me,{className:"!richtext-w-3 !richtext-h-3 richtext-text-zinc-500",name:"MenuDown"})})})]})}function N0({editor:e,disabled:t,actions:r}){var g,y,S,T,E,j,M,L,k,O,$,C,A,P,D,U,H,K;const n=({editor:te})=>B.isActive(te.view.state,"table"),{t:i}=q.useLocale();function o(){e.chain().focus().addColumnBefore().run()}function a(){e.chain().focus().addColumnAfter().run()}function s(){e.chain().focus().deleteColumn().run()}function l(){e.chain().focus().addRowBefore().run()}function u(){e.chain().focus().addRowAfter().run()}function f(){e.chain().focus().deleteRow().run()}function d(){e.chain().focus().mergeCells().run()}function h(){e==null||e.chain().focus().splitCell().run()}function p(){e.chain().focus().deleteTable().run()}function m(te){e.chain().focus().setTableCellBackground(te).run()}const x=()=>{var $e;const{view:te,state:{selection:{from:ne}}}=e,ve=te.domAtPos(ne).node;if(!ve)return new DOMRect(-1e3,-1e3,0,0);const ge=($e=ve==null?void 0:ve.closest)==null?void 0:$e.call(ve,".tableWrapper");return ge?ge.getBoundingClientRect():new DOMRect(-1e3,-1e3,0,0)};return c.jsx(pe.BubbleMenu,{editor:e,pluginKey:"table",shouldShow:n,updateDelay:0,tippyOptions:{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},maxWidth:"auto",getReferenceClientRect:x,plugins:[tu.sticky],sticky:"popper"},children:t?c.jsx(c.Fragment,{}):c.jsxs("div",{className:"richtext-flex richtext-size-full richtext-min-w-32 richtext-flex-row richtext-items-center richtext-gap-0.5 richtext-rounded-lg !richtext-border richtext-border-border richtext-bg-background richtext-p-2 richtext-leading-none richtext-shadow-sm",children:[c.jsx(W,{action:o,disabled:!((y=(g=e==null?void 0:e.can())==null?void 0:g.addColumnBefore)!=null&&y.call(g)),icon:"BetweenHorizonalEnd",tooltip:i("editor.table.menu.insertColumnBefore"),"tooltip-options":{sideOffset:15}}),c.jsx(W,{action:a,disabled:!((T=(S=e==null?void 0:e.can())==null?void 0:S.addColumnAfter)!=null&&T.call(S)),icon:"BetweenHorizonalStart",tooltip:i("editor.table.menu.insertColumnAfter"),"tooltip-options":{sideOffset:15}}),c.jsx(W,{action:s,disabled:!((j=e==null?void 0:(E=e.can()).deleteColumn)!=null&&j.call(E)),icon:"DeleteColumn",tooltip:i("editor.table.menu.deleteColumn"),"tooltip-options":{sideOffset:15}}),c.jsx(Be,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),c.jsx(W,{action:l,disabled:!((L=e==null?void 0:(M=e.can()).addRowBefore)!=null&&L.call(M)),icon:"BetweenVerticalEnd",tooltip:i("editor.table.menu.insertRowAbove"),"tooltip-options":{sideOffset:15}}),c.jsx(W,{action:u,disabled:!((O=(k=e==null?void 0:e.can())==null?void 0:k.addRowAfter)!=null&&O.call(k)),icon:"BetweenVerticalStart",tooltip:i("editor.table.menu.insertRowBelow"),"tooltip-options":{sideOffset:15}}),c.jsx(W,{action:f,disabled:!((C=($=e==null?void 0:e.can())==null?void 0:$.deleteRow)!=null&&C.call($)),icon:"DeleteRow",tooltip:i("editor.table.menu.deleteRow"),"tooltip-options":{sideOffset:15}}),c.jsx(Be,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),c.jsx(W,{action:d,disabled:!((P=(A=e==null?void 0:e.can())==null?void 0:A.mergeCells)!=null&&P.call(A)),icon:"TableCellsMerge",tooltip:i("editor.table.menu.mergeCells"),"tooltip-options":{sideOffset:15}}),c.jsx(W,{action:h,disabled:!((U=(D=e==null?void 0:e.can())==null?void 0:D.splitCell)!=null&&U.call(D)),icon:"TableCellsSplit",tooltip:i("editor.table.menu.splitCells"),"tooltip-options":{sideOffset:15}}),c.jsx(Be,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),c.jsx(Yu,{action:m,editor:e,tooltip:i("editor.table.menu.setCellsBgColor"),tooltipOptions:{sideOffset:15}}),c.jsx(W,{action:p,disabled:!((K=(H=e==null?void 0:e.can())==null?void 0:H.deleteTable)!=null&&K.call(H)),icon:"Trash2",tooltip:i("editor.table.menu.deleteTable"),"tooltip-options":{sideOffset:15}}),r&&r.map((te,ne)=>c.jsx(W,{...te},ne))]})})}const M0="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",L0="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",zt=(e,t)=>{for(const r in t)e[r]=t[r];return e},aa="numeric",sa="ascii",ca="alpha",ir="asciinumeric",rr="alphanumeric",la="domain",Ju="emoji",$0="scheme",_0="slashscheme",ei="whitespace";function D0(e,t){return e in t||(t[e]=[]),t[e]}function At(e,t,r){t[aa]&&(t[ir]=!0,t[rr]=!0),t[sa]&&(t[ir]=!0,t[ca]=!0),t[ir]&&(t[rr]=!0),t[ca]&&(t[rr]=!0),t[rr]&&(t[la]=!0),t[Ju]&&(t[la]=!0);for(const n in t){const i=D0(n,r);i.indexOf(e)<0&&i.push(e)}}function B0(e,t){const r={};for(const n in t)t[n].indexOf(e)>=0&&(r[n]=!0);return r}function Te(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Te.groups={};Te.prototype={accepts(){return!!this.t},go(e){const t=this,r=t.j[e];if(r)return r;for(let n=0;n<t.jr.length;n++){const i=t.jr[n][0],o=t.jr[n][1];if(o&&i.test(e))return o}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,r,n){for(let i=0;i<e.length;i++)this.tt(e[i],t,r,n)},tr(e,t,r,n){n=n||Te.groups;let i;return t&&t.j?i=t:(i=new Te(t),r&&n&&At(t,r,n)),this.jr.push([e,i]),i},ts(e,t,r,n){let i=this;const o=e.length;if(!o)return i;for(let a=0;a<o-1;a++)i=i.tt(e[a]);return i.tt(e[o-1],t,r,n)},tt(e,t,r,n){n=n||Te.groups;const i=this;if(t&&t.j)return i.j[e]=t,t;const o=t;let a,s=i.go(e);if(s?(a=new Te,zt(a.j,s.j),a.jr.push.apply(a.jr,s.jr),a.jd=s.jd,a.t=s.t):a=new Te,o){if(n)if(a.t&&typeof a.t=="string"){const l=zt(B0(a.t,n),r);At(o,l,n)}else r&&At(o,r,n);a.t=o}return i.j[e]=a,a}};const Z=(e,t,r,n,i)=>e.ta(t,r,n,i),he=(e,t,r,n,i)=>e.tr(t,r,n,i),Js=(e,t,r,n,i)=>e.ts(t,r,n,i),R=(e,t,r,n,i)=>e.tt(t,r,n,i),tt="WORD",ua="UWORD",Zu="ASCIINUMERICAL",Qu="ALPHANUMERICAL",mr="LOCALHOST",da="TLD",fa="UTLD",Fr="SCHEME",Lt="SLASH_SCHEME",Ra="NUM",ha="WS",Pa="NL",or="OPENBRACE",ar="CLOSEBRACE",Yr="OPENBRACKET",Jr="CLOSEBRACKET",Zr="OPENPAREN",Qr="CLOSEPAREN",en="OPENANGLEBRACKET",tn="CLOSEANGLEBRACKET",rn="FULLWIDTHLEFTPAREN",nn="FULLWIDTHRIGHTPAREN",on="LEFTCORNERBRACKET",an="RIGHTCORNERBRACKET",sn="LEFTWHITECORNERBRACKET",cn="RIGHTWHITECORNERBRACKET",ln="FULLWIDTHLESSTHAN",un="FULLWIDTHGREATERTHAN",dn="AMPERSAND",Oa="APOSTROPHE",fn="ASTERISK",mt="AT",hn="BACKSLASH",pn="BACKTICK",mn="CARET",gt="COLON",ka="COMMA",gn="DOLLAR",He="DOT",xn="EQUALS",Na="EXCLAMATION",Oe="HYPHEN",sr="PERCENT",vn="PIPE",yn="PLUS",bn="POUND",cr="QUERY",Ma="QUOTE",ed="FULLWIDTHMIDDLEDOT",La="SEMI",qe="SLASH",lr="TILDE",wn="UNDERSCORE",td="EMOJI",Sn="SYM";var rd=Object.freeze({__proto__:null,WORD:tt,UWORD:ua,ASCIINUMERICAL:Zu,ALPHANUMERICAL:Qu,LOCALHOST:mr,TLD:da,UTLD:fa,SCHEME:Fr,SLASH_SCHEME:Lt,NUM:Ra,WS:ha,NL:Pa,OPENBRACE:or,CLOSEBRACE:ar,OPENBRACKET:Yr,CLOSEBRACKET:Jr,OPENPAREN:Zr,CLOSEPAREN:Qr,OPENANGLEBRACKET:en,CLOSEANGLEBRACKET:tn,FULLWIDTHLEFTPAREN:rn,FULLWIDTHRIGHTPAREN:nn,LEFTCORNERBRACKET:on,RIGHTCORNERBRACKET:an,LEFTWHITECORNERBRACKET:sn,RIGHTWHITECORNERBRACKET:cn,FULLWIDTHLESSTHAN:ln,FULLWIDTHGREATERTHAN:un,AMPERSAND:dn,APOSTROPHE:Oa,ASTERISK:fn,AT:mt,BACKSLASH:hn,BACKTICK:pn,CARET:mn,COLON:gt,COMMA:ka,DOLLAR:gn,DOT:He,EQUALS:xn,EXCLAMATION:Na,HYPHEN:Oe,PERCENT:sr,PIPE:vn,PLUS:yn,POUND:bn,QUERY:cr,QUOTE:Ma,FULLWIDTHMIDDLEDOT:ed,SEMI:La,SLASH:qe,TILDE:lr,UNDERSCORE:wn,EMOJI:td,SYM:Sn});const Qe=/[a-z]/,er=new RegExp("\\p{L}","u"),ti=new RegExp("\\p{Emoji}","u"),et=/\d/,ri=/\s/,Zs="\r",ni=`
2
- `,z0="️",H0="‍",ii="";let Lr=null,$r=null;function q0(e=[]){const t={};Te.groups=t;const r=new Te;Lr==null&&(Lr=Qs(M0)),$r==null&&($r=Qs(L0)),R(r,"'",Oa),R(r,"{",or),R(r,"}",ar),R(r,"[",Yr),R(r,"]",Jr),R(r,"(",Zr),R(r,")",Qr),R(r,"<",en),R(r,">",tn),R(r,"(",rn),R(r,")",nn),R(r,"「",on),R(r,"」",an),R(r,"『",sn),R(r,"』",cn),R(r,"<",ln),R(r,">",un),R(r,"&",dn),R(r,"*",fn),R(r,"@",mt),R(r,"`",pn),R(r,"^",mn),R(r,":",gt),R(r,",",ka),R(r,"$",gn),R(r,".",He),R(r,"=",xn),R(r,"!",Na),R(r,"-",Oe),R(r,"%",sr),R(r,"|",vn),R(r,"+",yn),R(r,"#",bn),R(r,"?",cr),R(r,'"',Ma),R(r,"/",qe),R(r,";",La),R(r,"~",lr),R(r,"_",wn),R(r,"\\",hn),R(r,"・",ed);const n=he(r,et,Ra,{[aa]:!0});he(n,et,n);const i=he(n,Qe,Zu,{[ir]:!0}),o=he(n,er,Qu,{[rr]:!0}),a=he(r,Qe,tt,{[sa]:!0});he(a,et,i),he(a,Qe,a),he(i,et,i),he(i,Qe,i);const s=he(r,er,ua,{[ca]:!0});he(s,Qe),he(s,et,o),he(s,er,s),he(o,et,o),he(o,Qe),he(o,er,o);const l=R(r,ni,Pa,{[ei]:!0}),u=R(r,Zs,ha,{[ei]:!0}),f=he(r,ri,ha,{[ei]:!0});R(r,ii,f),R(u,ni,l),R(u,ii,f),he(u,ri,f),R(f,Zs),R(f,ni),he(f,ri,f),R(f,ii,f);const d=he(r,ti,td,{[Ju]:!0});R(d,"#"),he(d,ti,d),R(d,z0,d);const h=R(d,H0);R(h,"#"),he(h,ti,d);const p=[[Qe,a],[et,i]],m=[[Qe,null],[er,s],[et,o]];for(let x=0;x<Lr.length;x++)ht(r,Lr[x],da,tt,p);for(let x=0;x<$r.length;x++)ht(r,$r[x],fa,ua,m);At(da,{tld:!0,ascii:!0},t),At(fa,{utld:!0,alpha:!0},t),ht(r,"file",Fr,tt,p),ht(r,"mailto",Fr,tt,p),ht(r,"http",Lt,tt,p),ht(r,"https",Lt,tt,p),ht(r,"ftp",Lt,tt,p),ht(r,"ftps",Lt,tt,p),At(Fr,{scheme:!0,ascii:!0},t),At(Lt,{slashscheme:!0,ascii:!0},t),e=e.sort((x,g)=>x[0]>g[0]?1:-1);for(let x=0;x<e.length;x++){const g=e[x][0],S=e[x][1]?{[$0]:!0}:{[_0]:!0};g.indexOf("-")>=0?S[la]=!0:Qe.test(g)?et.test(g)?S[ir]=!0:S[sa]=!0:S[aa]=!0,Js(r,g,g,S)}return Js(r,"localhost",mr,{ascii:!0}),r.jd=new Te(Sn),{start:r,tokens:zt({groups:t},rd)}}function nd(e,t){const r=F0(t.replace(/[A-Z]/g,s=>s.toLowerCase())),n=r.length,i=[];let o=0,a=0;for(;a<n;){let s=e,l=null,u=0,f=null,d=-1,h=-1;for(;a<n&&(l=s.go(r[a]));)s=l,s.accepts()?(d=0,h=0,f=s):d>=0&&(d+=r[a].length,h++),u+=r[a].length,o+=r[a].length,a++;o-=d,a-=h,u-=d,i.push({t:f.t,v:t.slice(o-u,o),s:o-u,e:o})}return i}function F0(e){const t=[],r=e.length;let n=0;for(;n<r;){let i=e.charCodeAt(n),o,a=i<55296||i>56319||n+1===r||(o=e.charCodeAt(n+1))<56320||o>57343?e[n]:e.slice(n,n+2);t.push(a),n+=a.length}return t}function ht(e,t,r,n,i){let o;const a=t.length;for(let s=0;s<a-1;s++){const l=t[s];e.j[l]?o=e.j[l]:(o=new Te(n),o.jr=i.slice(),e.j[l]=o),e=o}return o=new Te(r),o.jr=i.slice(),e.j[t[a-1]]=o,o}function Qs(e){const t=[],r=[];let n=0,i="0123456789";for(;n<e.length;){let o=0;for(;i.indexOf(e[n+o])>=0;)o++;if(o>0){t.push(r.join(""));for(let a=parseInt(e.substring(n,n+o),10);a>0;a--)r.pop();n+=o}else r.push(e[n]),n++}return t}const gr={defaultProtocol:"http",events:null,format:ec,formatHref:ec,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function $a(e,t=null){let r=zt({},gr);e&&(r=zt(r,e instanceof $a?e.o:e));const n=r.ignoreTags,i=[];for(let o=0;o<n.length;o++)i.push(n[o].toUpperCase());this.o=r,t&&(this.defaultRender=t),this.ignoreTags=i}$a.prototype={o:gr,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,r){const n=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=r.t in i?i[r.t]:gr[e],typeof i=="function"&&n&&(i=i(t,r))):typeof i=="function"&&n&&(i=i(t,r.t,r)),i)},getObj(e,t,r){let n=this.o[e];return typeof n=="function"&&t!=null&&(n=n(t,r.t,r)),n},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function ec(e){return e}function id(e,t){this.t="token",this.v=e,this.tk=t}id.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),r=e.get("truncate",t,this),n=e.get("format",t,this);return r&&n.length>r?n.substring(0,r)+"…":n},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=gr.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,r=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",r,this),i=e.get("tagName",r,t),o=this.toFormattedString(e),a={},s=e.get("className",r,t),l=e.get("target",r,t),u=e.get("rel",r,t),f=e.getObj("attributes",r,t),d=e.getObj("events",r,t);return a.href=n,s&&(a.class=s),l&&(a.target=l),u&&(a.rel=u),f&&zt(a,f),{tagName:i,attributes:a,content:o,eventListeners:d}}};function En(e,t){class r extends id{constructor(i,o){super(i,o),this.t=e}}for(const n in t)r.prototype[n]=t[n];return r.t=e,r}const tc=En("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),rc=En("text"),U0=En("nl"),_r=En("url",{isLink:!0,toHref(e=gr.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==mr&&e[1].t===gt}}),Pe=e=>new Te(e);function W0({groups:e}){const t=e.domain.concat([dn,fn,mt,hn,pn,mn,gn,xn,Oe,Ra,sr,vn,yn,bn,qe,Sn,lr,wn]),r=[gt,ka,He,Na,sr,cr,Ma,La,en,tn,or,ar,Jr,Yr,Zr,Qr,rn,nn,on,an,sn,cn,ln,un],n=[dn,Oa,fn,hn,pn,mn,gn,xn,Oe,or,ar,sr,vn,yn,bn,cr,qe,Sn,lr,wn],i=Pe(),o=R(i,lr);Z(o,n,o),Z(o,e.domain,o);const a=Pe(),s=Pe(),l=Pe();Z(i,e.domain,a),Z(i,e.scheme,s),Z(i,e.slashscheme,l),Z(a,n,o),Z(a,e.domain,a);const u=R(a,mt);R(o,mt,u),R(s,mt,u),R(l,mt,u);const f=R(o,He);Z(f,n,o),Z(f,e.domain,o);const d=Pe();Z(u,e.domain,d),Z(d,e.domain,d);const h=R(d,He);Z(h,e.domain,d);const p=Pe(tc);Z(h,e.tld,p),Z(h,e.utld,p),R(u,mr,p);const m=R(d,Oe);R(m,Oe,m),Z(m,e.domain,d),Z(p,e.domain,d),R(p,He,h),R(p,Oe,m);const x=R(p,gt);Z(x,e.numeric,tc);const g=R(a,Oe),y=R(a,He);R(g,Oe,g),Z(g,e.domain,a),Z(y,n,o),Z(y,e.domain,a);const S=Pe(_r);Z(y,e.tld,S),Z(y,e.utld,S),Z(S,e.domain,a),Z(S,n,o),R(S,He,y),R(S,Oe,g),R(S,mt,u);const T=R(S,gt),E=Pe(_r);Z(T,e.numeric,E);const j=Pe(_r),M=Pe();Z(j,t,j),Z(j,r,M),Z(M,t,j),Z(M,r,M),R(S,qe,j),R(E,qe,j);const L=R(s,gt),k=R(l,gt),O=R(k,qe),$=R(O,qe);Z(s,e.domain,a),R(s,He,y),R(s,Oe,g),Z(l,e.domain,a),R(l,He,y),R(l,Oe,g),Z(L,e.domain,j),R(L,qe,j),R(L,cr,j),Z($,e.domain,j),Z($,t,j),R($,qe,j);const C=[[or,ar],[Yr,Jr],[Zr,Qr],[en,tn],[rn,nn],[on,an],[sn,cn],[ln,un]];for(let A=0;A<C.length;A++){const[P,D]=C[A],U=R(j,P);R(M,P,U),R(U,D,j);const H=Pe(_r);Z(U,t,H);const K=Pe();Z(U,r),Z(H,t,H),Z(H,r,K),Z(K,t,H),Z(K,r,K),R(H,D,j),R(K,D,j)}return R(i,mr,S),R(i,Pa,U0),{start:i,tokens:rd}}function G0(e,t,r){let n=r.length,i=0,o=[],a=[];for(;i<n;){let s=e,l=null,u=null,f=0,d=null,h=-1;for(;i<n&&!(l=s.go(r[i].t));)a.push(r[i++]);for(;i<n&&(u=l||s.go(r[i].t));)l=null,s=u,s.accepts()?(h=0,d=s):h>=0&&h++,i++,f++;if(h<0)i-=f,i<n&&(a.push(r[i]),i++);else{a.length>0&&(o.push(oi(rc,t,a)),a=[]),i-=h,f-=h;const p=d.t,m=r.slice(i-f,i);o.push(oi(p,t,m))}}return a.length>0&&o.push(oi(rc,t,a)),o}function oi(e,t,r){const n=r[0].s,i=r[r.length-1].e,o=t.slice(n,i);return new e(o,r)}const V0=typeof console<"u"&&console&&console.warn||(()=>{}),K0="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",de={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function X0(){return Te.groups={},de.scanner=null,de.parser=null,de.tokenQueue=[],de.pluginQueue=[],de.customSchemes=[],de.initialized=!1,de}function nc(e,t=!1){if(de.initialized&&V0(`linkifyjs: already initialized - will not register custom scheme "${e}" ${K0}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
3
- 1. Must only contain digits, lowercase ASCII letters or "-"
4
- 2. Cannot start or end with "-"
5
- 3. "-" cannot repeat`);de.customSchemes.push([e,t])}function Y0(){de.scanner=q0(de.customSchemes);for(let e=0;e<de.tokenQueue.length;e++)de.tokenQueue[e][1]({scanner:de.scanner});de.parser=W0(de.scanner.tokens);for(let e=0;e<de.pluginQueue.length;e++)de.pluginQueue[e][1]({scanner:de.scanner,parser:de.parser});return de.initialized=!0,de}function _a(e){return de.initialized||Y0(),G0(de.parser.start,e,nd(de.scanner.start,e))}_a.scan=nd;function od(e,t=null,r=null){if(t&&typeof t=="object"){if(r)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);r=t,t=null}const n=new $a(r),i=_a(e),o=[];for(let a=0;a<i.length;a++){const s=i[a];s.isLink&&(!t||s.t===t)&&n.check(s)&&o.push(s.toFormattedObject(n))}return o}function J0(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function Z0(e){return new B.Plugin({key:new B.PluginKey("autolink"),appendTransaction:(t,r,n)=>{const i=t.some(u=>u.docChanged)&&!r.doc.eq(n.doc),o=t.some(u=>u.getMeta("preventAutolink"));if(!i||o)return;const{tr:a}=n,s=B.combineTransactionSteps(r.doc,[...t]);if(B.getChangedRanges(s).forEach(({newRange:u})=>{const f=B.findChildrenInRange(n.doc,u,p=>p.isTextblock);let d,h;if(f.length>1?(d=f[0],h=n.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):f.length&&n.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(d=f[0],h=n.doc.textBetween(d.pos,u.to,void 0," ")),d&&h){const p=h.split(" ").filter(y=>y!=="");if(p.length<=0)return!1;const m=p[p.length-1],x=d.pos+h.lastIndexOf(m);if(!m)return!1;const g=_a(m).map(y=>y.toObject(e.defaultProtocol));if(!J0(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:x+y.start+1,to:x+y.end+1})).filter(y=>n.schema.marks.code?!n.doc.rangeHasMark(y.from,y.to,n.schema.marks.code):!0).filter(y=>e.validate(y.value)).filter(y=>e.shouldAutoLink(y.value)).forEach(y=>{B.getMarksBetween(y.from,y.to,n.doc).some(S=>S.mark.type===e.type)||a.addMark(y.from,y.to,e.type.create({href:y.href}))})}}),!!a.steps.length)return a}})}function Q0(e){return new B.Plugin({key:new B.PluginKey("handleClickLink"),props:{handleClick:(t,r,n)=>{var i,o;if(n.button!==0||!t.editable)return!1;let a=n.target;const s=[];for(;a.nodeName!=="DIV";)s.push(a),a=a.parentNode;if(!s.find(h=>h.nodeName==="A"))return!1;const l=B.getAttributes(t.state,e.type.name),u=n.target,f=(i=u==null?void 0:u.href)!==null&&i!==void 0?i:l.href,d=(o=u==null?void 0:u.target)!==null&&o!==void 0?o:l.target;return u&&f?(window.open(f,d),!0):!1}}})}function e1(e){return new B.Plugin({key:new B.PluginKey("handlePasteLink"),props:{handlePaste:(t,r,n)=>{const{state:i}=t,{selection:o}=i,{empty:a}=o;if(a)return!1;let s="";n.content.forEach(u=>{s+=u.textContent});const l=od(s,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===s);return!s||!l?!1:e.editor.commands.setMark(e.type,{href:l.href})}}})}const t1=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function wt(e,t){const r=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(n=>{const i=typeof n=="string"?n:n.scheme;i&&r.push(i)}),!e||e.replace(t1,"").match(new RegExp(`^(?:(?:${r.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const r1=B.Mark.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){nc(e);return}nc(e.scheme,e.optionalSlashes)})},onDestroy(){X0()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!wt(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:r=>!!wt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!wt(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",B.mergeAttributes(this.options.HTMLAttributes,e),0]:["a",B.mergeAttributes(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>{const{href:r}=e;return this.options.isAllowedUri(r,{defaultValidate:n=>!!wt(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{const{href:r}=e;return this.options.isAllowedUri(r,{defaultValidate:n=>!!wt(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[B.markPasteRule({find:e=>{const t=[];if(e){const{protocols:r,defaultProtocol:n}=this.options,i=od(e).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:a=>!!wt(a,r),protocols:r,defaultProtocol:n}));i.length&&i.forEach(o=>t.push({text:o.value,data:{href:o.href},index:o.start}))}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)===null||t===void 0?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[],{protocols:t,defaultProtocol:r}=this.options;return this.options.autolink&&e.push(Z0({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:n=>this.options.isAllowedUri(n,{defaultValidate:i=>!!wt(i,t),protocols:t,defaultProtocol:r}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&e.push(Q0({type:this.type})),this.options.linkOnPaste&&e.push(e1({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}});function n1(e){const[t,r]=w.useState(!1);function n(i,o,a){e.action&&(e.action({link:i,text:o,openInNewTab:a}),r(!1))}return c.jsxs(Wt,{modal:!0,open:t,onOpenChange:r,children:[c.jsx(Gt,{disabled:e==null?void 0:e.disabled,asChild:!0,children:c.jsx(W,{tooltip:e==null?void 0:e.tooltip,isActive:e==null?void 0:e.isActive,disabled:e==null?void 0:e.disabled,children:c.jsx(me,{name:e==null?void 0:e.icon})})}),c.jsx(It,{hideWhenDetached:!0,className:"richtext-w-full",align:"start",side:"bottom",children:c.jsx(sd,{editor:e.editor,onSetLink:n})})]})}const ad=r1.extend({inclusive:!1,parseHTML(){return[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",B.mergeAttributes(this.options.HTMLAttributes,e,{class:"link"}),0]},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),openOnClick:!0,button:({editor:t,t:r})=>({component:n1,componentProps:{editor:t,action:n=>{const{link:i,text:o,openInNewTab:a}=n,{state:s}=t,{from:l}=s.selection,u=o.length,f=l+u;t.chain().extendMarkRange("link").insertContent({type:"text",text:o,marks:[{type:"link",attrs:{href:i,target:a?"_blank":""}}]}).setLink({href:i}).setTextSelection({from:l,to:f}).focus().run()},id:"linkk",isActive:()=>t.isActive("link")||!1,disabled:!t.can().setLink({href:""}),icon:"Link",tooltip:r("editor.link.tooltip")}})}},addProseMirrorPlugins(){return[new B.Plugin({props:{handleClick:(e,t)=>{const{schema:r,doc:n,tr:i}=e.state,o=B.getMarkRange(n.resolve(t),r.marks.link);if(!o)return!1;const a=n.resolve(o.from),s=n.resolve(o.to),l=i.setSelection(new B.TextSelection(a,s));e.dispatch(l)}}})]}});function sd(e){const{t}=q.useLocale(),[r,n]=w.useState({text:"",link:""}),[i,o]=w.useState(!1);w.useEffect(()=>{const s=()=>{var l,u,f;if((l=e.editor)!=null&&l.isActive("link")){const{href:d,target:h}=e.editor.getAttributes("link"),{from:p,to:m}=e.editor.state.selection,x=e.editor.state.doc.textBetween(p,m," ");n({link:d||"",text:x}),o(h==="_blank")}else{const d=(u=e.editor.extensionManager.extensions.find(h=>h.name===ad.name))==null?void 0:u.options;o(((f=d==null?void 0:d.HTMLAttributes)==null?void 0:f.target)==="_blank")}};return s(),e.editor.on("selectionUpdate",s),()=>{e.editor.off("selectionUpdate",s)}},[e.editor]);function a(s){s.preventDefault(),s.stopPropagation(),e==null||e.onSetLink(r.link,r.text,i),n({text:"",link:""})}return c.jsx("div",{className:"border-neutral-200 richtext-rounded-lg !richtext-border richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black",children:c.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-gap-2",children:[c.jsx(Ue,{className:"mb-[6px]",children:t("editor.link.dialog.text")}),c.jsx("div",{className:"richtext-mb-[10px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsx("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center",children:c.jsx(Ee,{className:"richtext-w-80",onChange:s=>n({...r,text:s.target.value}),placeholder:"Text",required:!0,type:"text",value:r.text})})}),c.jsx(Ue,{className:"mb-[6px]",children:t("editor.link.dialog.link")}),c.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsxs("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center",children:[c.jsx(Ee,{className:"richtext-pl-10",onChange:s=>n({...r,link:s.target.value}),required:!0,type:"url",value:r.link}),c.jsx("span",{className:"richtext-absolute richtext-inset-y-0 richtext-start-0 richtext-flex richtext-items-center richtext-justify-center richtext-px-2",children:c.jsx(me,{className:"richtext-size-5 richtext-text-muted-foreground",name:"Link"})})]})}),c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-space-x-2",children:[c.jsx(Ue,{children:t("editor.link.dialog.openInNewTab")}),c.jsx(Va,{checked:i,onCheckedChange:s=>{o(s)}})]}),c.jsx(we,{className:"richtext-mt-2 richtext-self-end",onClick:a,type:"button",children:t("editor.link.dialog.button.apply")})]})})}function i1(e){const{t}=q.useLocale();return c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-p-2 richtext-bg-white !richtext-border richtext-rounded-lg richtext-shadow-sm dark:richtext-bg-black richtext-border-neutral-200 dark:richtext-border-neutral-800",children:[c.jsx("a",{href:e==null?void 0:e.link,target:"_blank",rel:"noopener noreferrer",className:"richtext-text-sm richtext-underline richtext-break-all",children:cx(e==null?void 0:e.link,{length:50,omission:"…"})}),(e==null?void 0:e.link)&&c.jsx(Be,{orientation:"vertical",className:"!richtext-h-4"}),c.jsxs("div",{className:"richtext-flex richtext-flex-nowrap",children:[c.jsx(W,{icon:"Pencil",tooltip:t("editor.link.edit.tooltip"),action:()=>{e==null||e.onEdit()},tooltipOptions:{sideOffset:15}}),c.jsx(W,{icon:"Unlink",tooltip:t("editor.link.unlink.tooltip"),action:()=>{e==null||e.onClear()},tooltipOptions:{sideOffset:15}})]})]})}function o1({editor:e,disabled:t}){const[r,n]=w.useState(!1),i=w.useMemo(()=>{const{href:l}=e.getAttributes("link");return l},[e]),o=w.useCallback(({editor:l})=>l.isActive("link"),[]),a=(l,u,f)=>{const d=e.state.selection,{from:h}=d,p=(u==null?void 0:u.length)??0,m=h+p;e.chain().extendMarkRange("link").insertContent({type:"text",text:u,marks:[{type:"link",attrs:{href:l,target:f?"_blank":""}}]}).setLink({href:l}).setTextSelection({from:h,to:m}).focus().run(),n(!1)},s=w.useCallback(()=>{e.chain().extendMarkRange("link").unsetLink().focus().run(),n(!1)},[e]);return c.jsx(c.Fragment,{children:c.jsx(pe.BubbleMenu,{editor:e,shouldShow:o,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999,onHidden:()=>{n(!1)}},children:t?c.jsx(c.Fragment,{}):c.jsx(c.Fragment,{children:r?c.jsx(sd,{onSetLink:a,editor:e}):c.jsx(i1,{editor:e,onClear:s,onEdit:()=>{n(!0)},link:i})})})})}const a1=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Da=B.Node.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",B.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[B.nodeInputRule({find:a1,type:this.type,getAttributes:e=>{const[,,t,r,n]=e;return{src:r,alt:t,title:n}}})]}}),Cr=ke.Root,jr=ke.Trigger,s1=ke.Portal,cd=oe.forwardRef(({className:e,...t},r)=>c.jsx(ke.Overlay,{ref:r,className:re("richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 richtext- data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0",e),...t}));cd.displayName=ke.Overlay.displayName;const Ft=oe.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(s1,{children:[c.jsx(cd,{}),c.jsxs(ke.Content,{ref:n,className:re("richtext-dialog-content richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",e),...r,children:[t,c.jsxs(ke.Close,{className:"richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground",children:[c.jsx(N.X,{className:"richtext-h-4 richtext-w-4"}),c.jsx("span",{className:"richtext-sr-only",children:"Close"})]})]})]}));Ft.displayName=ke.Content.displayName;function ld({className:e,...t}){return c.jsx("div",{className:re("richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",e),...t})}ld.displayName="DialogHeader";function In({className:e,...t}){return c.jsx("div",{className:re("richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",e),...t})}In.displayName="DialogFooter";const Ut=oe.forwardRef(({className:e,...t},r)=>c.jsx(ke.Title,{ref:r,className:re("richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight",e),...t}));Ut.displayName=ke.Title.displayName;const c1=oe.forwardRef(({className:e,...t},r)=>c.jsx(ke.Description,{ref:r,className:re("richtext-text-sm richtext-text-muted-foreground",e),...t}));c1.displayName=ke.Description.displayName;const ic=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,oc=pe.clsx,Rn=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return oc(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(u=>{const f=r==null?void 0:r[u],d=o==null?void 0:o[u];if(f===null)return null;const h=ic(f)||ic(d);return i[u][h]}),s=r&&Object.entries(r).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:d,className:h,...p}=f;return Object.entries(p).every(m=>{let[x,g]=m;return Array.isArray(g)?g.includes({...o,...s}[x]):{...o,...s}[x]===g})?[...u,d,h]:u},[]);return oc(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},l1=Rn("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",{variants:{variant:{default:"!richtext-bg-primary !richtext-text-primary-foreground hover:!richtext-bg-primary/90",destructive:"richtext-bg-destructive richtext-text-destructive-foreground hover:richtext-bg-destructive/90",outline:"richtext-border richtext-border-input richtext-bg-background hover:richtext-bg-accent hover:richtext-text-accent-foreground",secondary:"richtext-bg-secondary richtext-text-secondary-foreground hover:richtext-bg-secondary/80",ghost:"hover:richtext-bg-accent hover:richtext-text-accent-foreground",link:"richtext-text-primary richtext-underline-offset-4 hover:richtext-underline"},size:{default:"richtext-h-10 richtext-px-4 richtext-py-2",sm:"richtext-h-9 richtext-rounded-md richtext-px-3",lg:"richtext-h-11 richtext-rounded-md richtext-px-8",icon:"richtext-h-10 richtext-w-10"}},defaultVariants:{variant:"default",size:"default"}}),we=oe.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},o)=>{const a=n?eu.Slot:"button";return c.jsx(a,{className:re(l1({variant:t,size:r,className:e})),ref:o,...i})});we.displayName="Button";function u1(e){return e.replace(/^.*\/|\..+$/g,"")}function d1(e){return e.split(".").pop()}function f1(e){return e<1024?`${e} Byte`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:`${(e/1024/1024).toFixed(2)} MB`}function h1(e){return e?e==="application/pdf"?"pdf":e.startsWith("application/")&&[".document","word"].some(t=>e.includes(t))?"word":e.startsWith("application/")&&["presentation"].some(t=>e.includes(t))?"excel":e.startsWith("application/")&&["sheet"].some(t=>e.includes(t))?"ppt":e.startsWith("image")?"image":e.startsWith("audio")?"audio":e.startsWith("video")?"video":"file":"file"}function p1(e){return new Promise(t=>{const r=new FileReader;r.addEventListener("load",()=>{t({alt:e.name,src:r.result})},!1),r.readAsDataURL(e)})}function ud(e,t){const r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[r.length-1]);let o=i.length;const a=new Uint8Array(o);for(;o--;)a[o]=i.charCodeAt(o);return new File([a],t,{type:n})}function m1(e,t){const r=e.type,n=e.name.toLowerCase(),i=n.split(".").pop();if(!i)return!1;const a=r||{heif:"image/heif",heic:"image/heic",dng:"image/x-adobe-dng",cr2:"image/x-canon-cr2",nef:"image/x-nikon-nef",arw:"image/x-sony-arw",raf:"image/x-fuji-raf",orf:"image/x-olympus-orf"}[i];return t.some(s=>{if(s.startsWith("."))return n.endsWith(s);if(s.endsWith("/*")){const l=s.split("/")[0];return a==null?void 0:a.startsWith(l+"/")}return a===s})}function dd(e,t){const{acceptMimes:r,maxSize:n,t:i,toast:o}=t,a=[];return(Array.isArray(e)?e:Object.values(e)).forEach(l=>{if(!m1(l,r)){t.onError?t.onError({type:"type",message:i("editor.upload.fileTypeNotSupported",{fileName:l.name}),file:l}):o({variant:"default",title:i("editor.upload.fileTypeNotSupported",{fileName:l.name})});return}if(l.size>n){const u=(n/1024/1024).toFixed(2);t.onError?t.onError({type:"size",message:i("editor.upload.fileSizeTooBig",{fileName:l.name,size:u}),file:l}):o({variant:"default",title:i("editor.upload.fileSizeTooBig",{fileName:l.name,size:u})});return}a.push(l)}),a}function g1({editor:e,imageInline:t,onClose:r,disabled:n,alt:i}){var $,C;const{t:o}=q.useLocale(),{toast:a}=Nn(),[s,l]=w.useState(!1),[u,f]=w.useState(!1),d=w.useRef(null),[h,p]=w.useState(),[m,x]=w.useState(""),g=w.useRef(null),[y,S]=w.useState({src:"",file:null}),T=w.useMemo(()=>{var A;return(A=e.extensionManager.extensions.find(P=>P.name===Ht.name))==null?void 0:A.options},[e]);function E(A){if(d.current&&A.width&&A.height){const P=j(d.current,A);x(P)}}function j(A,P){const D=document.createElement("canvas"),U=A.naturalWidth/A.width,H=A.naturalHeight/A.height;D.width=P.width*U,D.height=P.height*H;const K=D.getContext("2d");return K&&(K.imageSmoothingEnabled=!1,K.drawImage(A,P.x*U,P.y*H,P.width*U,P.height*H,0,0,P.width*U,P.height*H)),D.toDataURL("image/png",1)}const M=w.useCallback(async()=>{var A;if(!u){f(!0);try{const P=ud(m,((A=y==null?void 0:y.file)==null?void 0:A.name)||"image.png");let D="";T.upload?D=await T.upload(P):D=URL.createObjectURL(P),e.chain().focus().setImageInline({src:D,inline:t,alt:i}).run(),l(!1),S({src:"",file:null}),O(),r()}catch(P){console.log("Error cropping image",P)}finally{f(!1)}}},[m,e,t,u,r,($=y==null?void 0:y.file)==null?void 0:$.name,T]);function L(A){var P;A.preventDefault(),(P=g.current)==null||P.click()}const k=async A=>{var K;const P=(K=A==null?void 0:A.target)==null?void 0:K.files;if(!e||e.isDestroyed||P.length===0){A.target.value="";return}const D=dd(P,{acceptMimes:T==null?void 0:T.acceptMimes,maxSize:T==null?void 0:T.maxSize,t:o,toast:a,onError:T.onError});if(D.length<=0){A.target.value="";return}const U=D[0],H=await p1(U);l(!0),S({src:H.src,file:U})},O=()=>{g.current&&(g.current.value="")};return c.jsxs(c.Fragment,{children:[c.jsx(we,{className:"richtext-mt-1 richtext-w-full",disabled:n,onClick:L,size:"sm",children:o("editor.image.dialog.tab.uploadCrop")}),c.jsxs(Cr,{open:s,onOpenChange:A=>{l(A),A||(S({src:"",file:null}),O())},children:[c.jsx(jr,{}),c.jsxs(Ft,{children:[c.jsx(Ut,{children:o("editor.image.dialog.tab.uploadCrop")}),c.jsx("div",{children:y.src&&c.jsx(Af,{className:"richtext-w-full",crop:h,onChange:A=>p(A),onComplete:A=>E(A),children:c.jsx("img",{alt:"Crop me",ref:d,src:y.src})})}),c.jsxs(In,{children:[c.jsxs(we,{disabled:u,onClick:()=>{l(!1),S({src:"",file:null}),O()},children:[o("editor.imageUpload.cancel"),c.jsx(me,{className:"richtext-ml-1",name:"Trash2"})]}),c.jsx(we,{className:"richtext-w-fit",disabled:u||!h,onClick:M,children:u?c.jsxs(c.Fragment,{children:[o("editor.imageUpload.uploading"),c.jsx(me,{className:"richtext-ml-1 richtext-animate-spin",name:"Loader"})]}):c.jsxs(c.Fragment,{children:[o("editor.imageUpload.crop"),c.jsx(me,{className:"richtext-ml-1",name:"Crop"})]})})]})]})]}),c.jsx("input",{accept:((C=T==null?void 0:T.acceptMimes)==null?void 0:C.join(","))||"image/*",multiple:!1,onChange:k,ref:g,style:{display:"none"},type:"file"})]})}function Pn(e){function t(){const o=w.useRef(e),a=w.useCallback(()=>o.current,[]),s=w.useRef(new Set),l=w.useCallback(f=>{o.current={...o.current,...f},s.current.forEach(d=>d())},[]),u=w.useCallback(f=>(s.current.add(f),()=>s.current.delete(f)),[]);return{get:a,set:l,subscribe:u}}const r=w.createContext(null);function n({children:o}){return c.jsx(r.Provider,{value:t(),children:o})}function i(o){const a=w.useContext(r);if(!a)throw new Error("Store not found");return[w.useSyncExternalStore(a.subscribe,()=>o(a.get()),()=>o(e)),a.set]}return{Provider:n,useStore:i}}Pn({value:!1});Pn({value:!1});const{Provider:x1,useStore:fd}=Pn({value:!1}),{Provider:v1,useStore:hd}=Pn({value:"light"});q.d("0");function xr(e,t){return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}function On(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}const vt={UPLOAD_IMAGE:e=>`UPLOAD_IMAGE-${e}`,UPLOAD_VIDEO:e=>`UPLOAD_VIDEO-${e}`,EDIT:e=>`EDIT-${e}`,UPDATE_THEME:e=>`UPDATE_THEME-${e}`,SEARCH_REPLCE:"SEARCH_REPLACE"},pd={setOpen:(e,t)=>{On(vt.UPLOAD_IMAGE(e),t)}};function y1(e){var E;const{t}=q.useLocale(),{toast:r}=Nn(),[n,i]=w.useState(!1),[o,a]=w.useState(!1),s=j=>{i(j.detail)},[l,u]=w.useState(""),[f,d]=w.useState(""),h=w.useRef(null),p=((E=e.editor.extensionManager.extensions.find(j=>j.name===Ht.name))==null?void 0:E.options.defaultInline)||!1,[m,x]=w.useState(p),g=w.useMemo(()=>{var M;return(M=e.editor.extensionManager.extensions.find(L=>L.name===Ht.name))==null?void 0:M.options},[e.editor]);w.useEffect(()=>{const j=xr(vt.UPLOAD_IMAGE(e.editor.id),s);return()=>{j()}},[]);async function y(j){var k;const M=(k=j==null?void 0:j.target)==null?void 0:k.files;if(!e.editor||e.editor.isDestroyed||M.length===0||o){j.target.value="";return}const L=dd(M,{acceptMimes:g==null?void 0:g.acceptMimes,maxSize:g==null?void 0:g.maxSize,t,toast:r,onError:g.onError});if(L.length<=0){j.target.value="";return}a(!0);try{if(g!=null&&g.multiple){const O=L.map(async C=>{let A="";return g.upload?A=await g.upload(C):A=URL.createObjectURL(C),A});(await Promise.all(O)).forEach(C=>{e.editor.chain().focus().setImageInline({src:C,inline:m,alt:f}).run()})}else{const O=L[0];let $="";g.upload?$=await g.upload(O):$=URL.createObjectURL(O),e.editor.chain().focus().setImageInline({src:$,inline:m,alt:f}).run()}i(!1),d(""),x(p)}catch(O){console.error("Error uploading image",O),g.onError?g.onError({type:"upload",message:t("editor.upload.error")}):r({variant:"destructive",title:t("editor.upload.error")})}finally{a(!1),j.target.value=""}}function S(j){j.preventDefault(),j.stopPropagation(),e.editor.chain().focus().setImageInline({src:l,inline:m,alt:f}).run(),i(!1),x(p),u(""),d("")}function T(j){var M;j.preventDefault(),(M=h.current)==null||M.click()}return c.jsxs(Cr,{onOpenChange:i,open:n,children:[c.jsx(jr,{asChild:!0,children:c.jsx(W,{action:()=>i(!0),icon:e.icon,tooltip:e.tooltip})}),c.jsxs(Ft,{children:[c.jsx(Ut,{children:t("editor.image.dialog.title")}),c.jsxs(wd,{activationMode:"manual",defaultValue:g.resourceImage==="both"||g.resourceImage==="upload"?"upload":"link",children:[c.jsxs(Ka,{className:"richtext-grid richtext-w-full richtext-grid-cols-2",children:[g.resourceImage==="both"||g.resourceImage==="upload"?c.jsx(yr,{value:"upload",children:t("editor.image.dialog.tab.upload")}):c.jsx(c.Fragment,{}),g.resourceImage==="both"||g.resourceImage==="link"?c.jsx(yr,{value:"link",children:t("editor.image.dialog.tab.url")}):c.jsx(c.Fragment,{})]}),c.jsxs("div",{className:"richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]",children:[c.jsx(Ed,{checked:m,onCheckedChange:j=>{x(j)}}),c.jsx(Ue,{children:t("editor.link.dialog.inline")})]}),g.enableAlt&&c.jsxs("div",{className:"richtext-my-[10px] ",children:[c.jsx(Ue,{className:"mb-[6px]",children:t("editor.imageUpload.alt")}),c.jsx(Ee,{onChange:j=>d(j.target.value),required:!0,type:"text",value:f})]}),c.jsxs(br,{value:"upload",children:[c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:[c.jsx(we,{className:"richtext-mt-1 richtext-w-full",disabled:o,onClick:T,size:"sm",children:o?c.jsxs(c.Fragment,{children:[t("editor.imageUpload.uploading"),c.jsx(me,{className:"richtext-ml-1 richtext-animate-spin",name:"Loader"})]}):t("editor.image.dialog.tab.upload")}),c.jsx(g1,{alt:f,disabled:o,editor:e.editor,imageInline:m,onClose:()=>{pd.setOpen(e.editor.id,!1),d("")}})]}),c.jsx("input",{accept:g.acceptMimes.join(",")||"image/*",multiple:g.multiple,onChange:y,ref:h,style:{display:"none"},type:"file"})]}),c.jsx(br,{value:"link",children:c.jsx("form",{onSubmit:S,children:c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[c.jsx(Ee,{autoFocus:!0,onChange:j=>u(j.target.value),placeholder:t("editor.image.dialog.placeholder"),required:!0,type:"url",value:l}),c.jsx(we,{type:"submit",children:t("editor.image.dialog.button.apply")})]})})})]})]})]})}const Dr={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function b1(e){var k,O,$;const[t,r]=w.useState({width:q.IMAGE_MAX_SIZE,height:q.IMAGE_MAX_SIZE}),[n,i]=w.useState({width:0,height:0}),[o]=w.useState([Dr.TOP_LEFT,Dr.TOP_RIGHT,Dr.BOTTOM_LEFT,Dr.BOTTOM_RIGHT]),[a,s]=w.useState(!1),[l,u]=w.useState({x:0,y:0,w:0,h:0,dir:""}),{align:f,inline:d}=(k=e==null?void 0:e.node)==null?void 0:k.attrs,h=d&&(f==="left"||f==="right"),p=w.useMemo(()=>{var Le;const{src:C,alt:A,width:P,height:D,flipX:U,flipY:H}=(Le=e==null?void 0:e.node)==null?void 0:Le.attrs,K=Kr(P)?`${P}px`:P,te=Kr(D)?`${D}px`:D,ne=[];U&&ne.push("rotateX(180deg)"),H&&ne.push("rotateY(180deg)");const ve=ne.join(" ");return{src:C||void 0,alt:A||void 0,style:{width:K||void 0,height:te||void 0,transform:ve||"none",...h?{float:f}:{}}}},[(O=e==null?void 0:e.node)==null?void 0:O.attrs]),m=w.useMemo(()=>{const{style:{width:C}}=p;return{width:C==="100%"?C:void 0}},[p]);function x(C){i({width:C.target.width,height:C.target.height})}function g(){const{editor:C,getPos:A}=e;C.commands.setNodeSelection(A())}const y=w.useCallback(Bt(()=>{const{editor:C}=e,{width:A}=getComputedStyle(C.view.dom);r(P=>({...P,width:Number.parseInt(A,10)}))},q.IMAGE_THROTTLE_WAIT_TIME),[e==null?void 0:e.editor]);function S(C,A){C.preventDefault(),C.stopPropagation();const P=n.width,D=n.height,U=P/D;let H=Number(e.node.attrs.width),K=Number(e.node.attrs.height);const te=t.width;H&&!K?(H=H>te?te:H,K=Math.round(H/U)):K&&!H?(H=Math.round(K*U),H=H>te?te:H):!H&&!K?(H=P>te?te:P,K=Math.round(H/U)):H=H>te?te:H,s(!0),u({x:C.clientX,y:C.clientY,w:H,h:K,dir:A})}const T=w.useCallback(Bt(C=>{if(C.preventDefault(),C.stopPropagation(),!a)return;const{x:A,w:P,dir:D}=l,U=(C.clientX-A)*(/l/.test(D)?-1:1),H=Tu(P+U,q.IMAGE_MIN_SIZE,t.width);e.updateAttributes({width:H,height:null})},q.IMAGE_THROTTLE_WAIT_TIME),[a,l,t,e.updateAttributes]),E=w.useCallback(C=>{C.preventDefault(),C.stopPropagation(),a&&(u({x:0,y:0,w:0,h:0,dir:""}),s(!1),g())},[a,g]),j=w.useCallback(()=>{document==null||document.addEventListener("mousemove",T,!0),document==null||document.addEventListener("mouseup",E,!0)},[T,E]),M=w.useCallback(()=>{document==null||document.removeEventListener("mousemove",T,!0),document==null||document.removeEventListener("mouseup",E,!0)},[T,E]);w.useEffect(()=>(a?j():M(),()=>{M()}),[a,j,M]);const L=w.useMemo(()=>new ResizeObserver(()=>y()),[y]);return w.useEffect(()=>(L.observe(e.editor.view.dom),()=>{L.disconnect()}),[e.editor.view.dom,L]),c.jsx(pe.NodeViewWrapper,{as:d?"span":"div",className:"image-view",style:{float:h?f:void 0,margin:h?f==="left"?"1em 1em 1em 0":"1em 0 1em 1em":void 0,display:d?"inline":"block",textAlign:h?void 0:f,width:(($=p.style)==null?void 0:$.width)??"auto",...h?{}:m},children:c.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:m,className:`image-view__body ${e!=null&&e.selected?"image-view__body--focused":""} ${a?"image-view__body--resizing":""}`,children:[c.jsx("img",{alt:p.alt,className:"image-view__body__image block",height:"auto",onClick:g,onLoad:x,src:p.src,style:p.style}),(e==null?void 0:e.editor.view.editable)&&((e==null?void 0:e.selected)||a)&&c.jsx("div",{className:"image-resizer",children:o==null?void 0:o.map(C=>c.jsx("span",{className:`image-resizer__handler image-resizer__handler--${C}`,onMouseDown:A=>S(A,C)},`image-dir-${C}`))})]})})}const Dt=new B.PluginKey("upload-image");function w1(){return new B.Plugin({key:Dt,state:{init(){return B.DecorationSet.empty},apply(e,t){t=t.map(e.mapping,e.doc);const r=e.getMeta(Dt);if(r!=null&&r.add)for(const{id:n,pos:i,src:o}of r.add){const a=S1(o),s=B.Decoration.widget(i,a,{id:n});t=t.add(e.doc,[s])}else if(r!=null&&r.remove)for(const n of r.remove)t=t.remove(t.find(void 0,void 0,i=>i.id===n));return t}},props:{decorations(e){return this.getState(e)}}})}function S1(e){const t=document.createElement("div"),r=document.createElement("img");return r.setAttribute("class","opacity-50"),r.src=e,r.addEventListener("load",()=>{t.setAttribute("class","img-placeholder")}),t.append(r),t}function A1(e,t){var i;const n=Dt.getState(e).find(void 0,void 0,o=>o.id===t);return n.length>0?(i=n[0])==null?void 0:i.from:null}function C1({validateFn:e,onUpload:t,postUpload:r,defaultInline:n=!1}){return(i,o,a)=>{for(const s of i){if(e&&!e(s))continue;const l=Date.now().toString(),u=o.state.tr;u.selection.empty||u.deleteSelection();const f=URL.createObjectURL(s);u.setMeta(Dt,{add:[{id:l,pos:a,src:f}]}),o.dispatch(u),t(s).then(async d=>{var S;r&&typeof d=="string"&&(d=await r(d));const{schema:h}=o.state;let p=A1(o.state,l);if(p===null)return;const m=typeof d=="object"?f:d,x=(S=h.nodes.image)==null?void 0:S.create({src:m,inline:n});if(!x)return;const{doc:g}=o.state;p>g.content.size&&(p=g.content.size-1);const y=o.state.tr.replaceWith(p,p,x).setMeta(Dt,{remove:[l]});o.dispatch(y)},()=>{const d=o.state.tr.delete(a,a).setMeta(Dt,{remove:[l]});o.dispatch(d)})}}}function j1(e,t,r){var i;const n=[...((i=t.clipboardData)==null?void 0:i.files)||[]];if(n.length>0){t.preventDefault();const o=e.state.selection.from;return r(n,e,o+1),!0}return!1}function T1(e,t,r,n){var o;const i=[...((o=t.dataTransfer)==null?void 0:o.files)||[]];if(!r&&i.length>0){t.preventDefault();const a=e.posAtCoords({left:t.clientX,top:t.clientY});if(a)return n(i,e,a.pos+1),!0}return!1}const E1={acceptMimes:["image/jpeg","image/gif","image/png","image/jpg"],maxSize:1024*1024*5,multiple:!0,resourceImage:"both",defaultInline:!1,enableAlt:!0},Ht=Da.extend({group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){var e;return{...E1,...(e=this.parent)==null?void 0:e.call(this),upload:()=>Promise.reject("Image Upload Function"),button:({editor:t,extension:r,t:n})=>{var i,o;return{component:y1,componentProps:{action:()=>!0,upload:r.options.upload,disabled:!((o=(i=t.can()).setImage)!=null&&o.call(i,{})),icon:"ImageUp",tooltip:n("editor.image.tooltip"),editor:t}}}}},addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),flipX:{default:!1},flipY:{default:!1},width:{default:null,parseHTML:t=>{const r=t.style.width||t.getAttribute("width")||null;return r?Number.parseInt(r,10):null},renderHTML:t=>({width:t.width})},align:{default:"center",parseHTML:t=>t.getAttribute("align"),renderHTML:t=>({align:t.align})},inline:{default:!1,parseHTML:t=>!!t.getAttribute("inline"),renderHTML:t=>({inline:t.inline})},alt:{default:"",parseHTML:t=>t.getAttribute("alt"),renderHTML:t=>({alt:t.alt})}}},addNodeView(){return pe.ReactNodeViewRenderer(b1)},addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),setImageInline:t=>({commands:r})=>r.insertContent({type:this.name,attrs:{...t,inline:t.inline??this.options.defaultInline}}),updateImage:t=>({commands:r})=>r.updateAttributes(this.name,t),setAlignImage:t=>({commands:r})=>r.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:e}){const{flipX:t,flipY:r,align:n,inline:i}=e,o=i&&(n==="left"||n==="right"),a=t||r?`transform: rotateX(${t?"180":"0"}deg) rotateY(${r?"180":"0"}deg);`:"",s=o?"":`text-align: ${n};`,f=`${o?`float: ${n};`:""}${o?n==="left"?"margin: 1em 1em 1em 0;":"margin: 1em 0 1em 1em;":""}${a}`;return[i?"span":"div",{style:s,class:"image"},["img",B.mergeAttributes({height:"auto",style:f},this.options.HTMLAttributes,e)]]},parseHTML(){return[{tag:"span.image img",getAttrs:e=>{var o;const t=e==null?void 0:e.parentElement,r=e==null?void 0:e.getAttribute("width"),n=(e==null?void 0:e.getAttribute("flipx"))||!1,i=(e==null?void 0:e.getAttribute("flipy"))||!1;return{src:e==null?void 0:e.getAttribute("src"),alt:e==null?void 0:e.getAttribute("alt"),caption:e==null?void 0:e.getAttribute("caption"),width:r?Number.parseInt(r,10):null,align:(e==null?void 0:e.getAttribute("align"))||((o=t==null?void 0:t.style)==null?void 0:o.textAlign)||null,inline:(e==null?void 0:e.getAttribute("inline"))||!1,flipX:n==="true",flipY:i==="true"}}},{tag:"div[class=image]",getAttrs:e=>{const t=e.querySelector("img"),r=t==null?void 0:t.getAttribute("width"),n=(t==null?void 0:t.getAttribute("flipx"))||!1,i=(t==null?void 0:t.getAttribute("flipy"))||!1;return{src:t==null?void 0:t.getAttribute("src"),alt:t==null?void 0:t.getAttribute("alt"),caption:t==null?void 0:t.getAttribute("caption"),width:r?Number.parseInt(r,10):null,align:(t==null?void 0:t.getAttribute("align"))||e.style.textAlign||null,inline:(t==null?void 0:t.getAttribute("inline"))||!1,flipX:n==="true",flipY:i==="true"}}}]},addProseMirrorPlugins(){const t=C1({validateFn:r=>!(!this.options.acceptMimes.includes(r.type)||r.size>this.options.maxSize),onUpload:this.options.upload,defaultInline:this.options.defaultInline});return[new B.Plugin({props:{handlePaste:(r,n)=>!n.clipboardData||[...n.clipboardData.files||[]].some(o=>o.type==="text/html")?!1:j1(r,n,t),handleDrop:(r,n,i,o)=>(!(n instanceof DragEvent)||!n.dataTransfer||T1(r,n,o,t),!1)}}),w1()]}});function I1({selectImage:e,giphyApiKey:t,children:r}){const[n,i]=w.useState([]),[o]=w.useState(15),a=w.useRef(null),s=(u,f="search")=>{if(!t)return;const h=`${f==="search"?`https://api.giphy.com/v1/gifs/search?q=${u}`:`https://api.giphy.com/v1/gifs/trending?q=${u}`}&limit=${o}&api_key=${t}`;fetch(h).then(p=>p.json()).then(p=>{i(p.data)}).catch(p=>{console.log(p)})};w.useEffect(()=>{s("","trend")},[]);const l=w.useCallback(Ar(u=>{if(!u.target.value){s("","trend");return}s(u.target.value)},350),[]);return c.jsxs(Wt,{modal:!0,children:[c.jsx(Gt,{asChild:!0,children:r}),c.jsx(It,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:t?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"richtext-mb-[10px] richtext-w-full",children:c.jsx(Ee,{onChange:l,placeholder:"Search GIF",ref:a,type:"text"})}),c.jsx("div",{className:"richtext-max-h-[280px] richtext-overflow-y-auto",children:c.jsx("div",{className:"richtext-grid richtext-grid-cols-2 richtext-gap-1 ",children:n!=null&&n.length?n==null?void 0:n.map(u=>c.jsx("img",{alt:"giphy",className:"richtext-cursor-pointer richtext-text-center",height:u.images.fixed_width_downsampled.height,onClick:()=>e(u),src:u.images.fixed_width_downsampled.url,width:u.images.fixed_width_downsampled.width},`giphy-${u.id}`)):c.jsx("p",{children:"No GIFs found"})})})]}):c.jsx("div",{children:c.jsx("p",{children:"Missing Giphy API Key"})})})]})}function R1({editor:e,icon:t,giphyApiKey:r,...n}){const i=o=>{const{url:a}=o.images.original;e.chain().focus().setImageGif({src:a}).run()};return c.jsx(I1,{giphyApiKey:r,selectImage:i,children:c.jsx(W,{icon:t,tooltip:n==null?void 0:n.tooltip})})}const Br={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function P1(e){var M,L;const[t,r]=w.useState({width:q.IMAGE_MAX_SIZE,height:q.IMAGE_MAX_SIZE}),[n,i]=w.useState({width:0,height:0}),[o]=w.useState([Br.TOP_LEFT,Br.TOP_RIGHT,Br.BOTTOM_LEFT,Br.BOTTOM_RIGHT]),[a,s]=w.useState(!1),[l,u]=w.useState({x:0,y:0,w:0,h:0,dir:""}),{align:f}=(M=e==null?void 0:e.node)==null?void 0:M.attrs,d=w.useMemo(()=>{var D;const{src:k,alt:O,width:$,height:C}=(D=e==null?void 0:e.node)==null?void 0:D.attrs,A=Kr($)?`${$}px`:$,P=Kr(C)?`${C}px`:C;return{src:k||void 0,alt:O||void 0,style:{width:A||void 0,height:P||void 0}}},[(L=e==null?void 0:e.node)==null?void 0:L.attrs]),h=w.useMemo(()=>{const{style:{width:k}}=d;return{width:k==="100%"?k:void 0}},[d]);function p(k){i({width:k.target.width,height:k.target.height})}function m(){const{editor:k,getPos:O}=e;k.commands.setNodeSelection(O())}const x=w.useCallback(Bt(()=>{const{editor:k}=e,{width:O}=getComputedStyle(k.view.dom);r($=>({...$,width:Number.parseInt(O,10)}))},q.IMAGE_THROTTLE_WAIT_TIME),[e==null?void 0:e.editor]);function g(k,O){k.preventDefault(),k.stopPropagation();const $=n.width,C=n.height,A=$/C;let P=Number(e.node.attrs.width),D=Number(e.node.attrs.height);const U=t.width;P&&!D?(P=P>U?U:P,D=Math.round(P/A)):D&&!P?(P=Math.round(D*A),P=P>U?U:P):!P&&!D?(P=$>U?U:$,D=Math.round(P/A)):P=P>U?U:P,s(!0),u({x:k.clientX,y:k.clientY,w:P,h:D,dir:O})}const y=w.useCallback(Bt(k=>{if(k.preventDefault(),k.stopPropagation(),!a)return;const{x:O,w:$,dir:C}=l,A=(k.clientX-O)*(/l/.test(C)?-1:1),P=Tu($+A,q.IMAGE_MIN_SIZE,t.width);e.updateAttributes({width:P,height:null})},q.IMAGE_THROTTLE_WAIT_TIME),[a,l,t,e.updateAttributes]),S=w.useCallback(k=>{k.preventDefault(),k.stopPropagation(),a&&(u({x:0,y:0,w:0,h:0,dir:""}),s(!1),m())},[a,m]),T=w.useCallback(()=>{document==null||document.addEventListener("mousemove",y,!0),document==null||document.addEventListener("mouseup",S,!0)},[y,S]),E=w.useCallback(()=>{document==null||document.removeEventListener("mousemove",y,!0),document==null||document.removeEventListener("mouseup",S,!0)},[y,S]);w.useEffect(()=>(a?T():E(),()=>{E()}),[a,T,E]);const j=w.useMemo(()=>new ResizeObserver(()=>x()),[x]);return w.useEffect(()=>(j.observe(e.editor.view.dom),()=>{j.disconnect()}),[e.editor.view.dom,j]),c.jsx(pe.NodeViewWrapper,{className:"image-view",style:{...h,width:"100%",textAlign:f},children:c.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:h,className:`image-view__body ${e!=null&&e.selected?"image-view__body--focused":""} ${a?"image-view__body--resizing":""}`,children:[c.jsx("img",{alt:d.alt,className:"image-view__body__image block",height:"auto",onClick:m,onLoad:p,src:d.src,style:d.style}),(e==null?void 0:e.editor.view.editable)&&((e==null?void 0:e.selected)||a)&&c.jsx("div",{className:"image-resizer",children:o==null?void 0:o.map(k=>c.jsx("span",{className:`image-resizer__handler image-resizer__handler--${k}`,onMouseDown:O=>g(O,k)},`image-dir-${k}`))})]})})}const Ba=Da.extend({name:"imageGif",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),inline:!1,content:"",marks:"",group:"block",GIPHY_API_KEY:"",draggable:!1,selectable:!0,atom:!0,button:({editor:t,extension:r,t:n})=>{var o;const i=((o=r==null?void 0:r.options)==null?void 0:o.GIPHY_API_KEY)||"";return{component:R1,componentProps:{editor:t,action:()=>{},isActive:()=>!1,disabled:!1,icon:"GifIcon",tooltip:n("editor.imageGif.tooltip"),giphyApiKey:i}}}}},addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),width:{default:null,parseHTML:t=>{const r=t.style.width||t.getAttribute("width")||"10";return r===void 0?null:Number.parseInt(`${r}`,10)},renderHTML:t=>({width:t.width})},align:{default:"center",parseHTML:t=>t.getAttribute("align"),renderHTML:t=>({align:t.align})}}},addNodeView(){return pe.ReactNodeViewRenderer(P1)},addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),setImageGif:t=>({commands:r})=>r.insertContent({type:this.name,attrs:t}),updateImageGif:t=>({commands:r})=>r.updateAttributes(this.name,t),setAlignImageGif:t=>({commands:r})=>r.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:e}){const{align:t}=e;return["div",{style:t?`text-align: ${t};`:"",class:"imageGIf"},["img",B.mergeAttributes({height:"auto"},this.options.HTMLAttributes,e)]]},parseHTML(){return[{tag:"div[class=imageGIf]",getAttrs:e=>{const t=e.querySelector("img"),r=t==null?void 0:t.getAttribute("width");return{src:t==null?void 0:t.getAttribute("src"),alt:t==null?void 0:t.getAttribute("alt"),title:t==null?void 0:t.getAttribute("title"),width:r?Number.parseInt(r,10):null,align:(t==null?void 0:t.getAttribute("align"))||e.style.textAlign||null}}}]}});function O1(e,t){let r;try{r=new URL(e)}catch{return!1}return!(t!=null&&t.length)||t.length===1&&t[0]==="."?!0:t.some(n=>{if(n.includes("*")){const i=n.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp(`^${i}$`).test(r.hostname)}return r.hostname.includes(n)})}function k1(e){const{t}=q.useLocale(),[r,n]=w.useState(""),i=w.useRef(null),[o,a]=w.useState(""),[s,l]=w.useState(!1),u=m=>{l(m.detail)};w.useEffect(()=>{const m=xr(vt.UPLOAD_VIDEO(e.editor.id),u);return()=>{m()}},[]);const f=w.useMemo(()=>{var x;return(x=e.editor.extensionManager.extensions.find(g=>g.name===za.name))==null?void 0:x.options},[e.editor]);async function d(m){var S;const x=(S=m==null?void 0:m.target)==null?void 0:S.files;if(!e.editor||e.editor.isDestroyed||x.length===0)return;const g=x[0];let y="";f.upload?y=await f.upload(g):y=URL.createObjectURL(g),e.editor.chain().focus().setVideo({src:y,width:"100%"}).run(),l(!1)}function h(m){m.preventDefault(),m.stopPropagation(),r&&(e.editor.chain().focus().setVideo({src:r,width:"100%"}).run(),l(!1))}function p(m){var x;m.preventDefault(),(x=i.current)==null||x.click()}return c.jsxs(Cr,{onOpenChange:l,open:s,children:[c.jsx(jr,{asChild:!0,children:c.jsx(W,{action:()=>l(!0),icon:e.icon,tooltip:e.tooltip})}),c.jsxs(Ft,{children:[c.jsx(Ut,{children:t("editor.video.dialog.title")}),c.jsxs(wd,{activationMode:"manual",defaultValue:(f==null?void 0:f.resourceVideo)==="both"||(f==null?void 0:f.resourceVideo)==="upload"?"upload":"link",children:[c.jsxs(Ka,{className:"richtext-grid richtext-w-full richtext-grid-cols-2",children:[((f==null?void 0:f.resourceVideo)==="both"||(f==null?void 0:f.resourceVideo)==="upload")&&c.jsx(yr,{value:"upload",children:t("editor.video.dialog.tab.upload")}),((f==null?void 0:f.resourceVideo)==="both"||(f==null?void 0:f.resourceVideo)==="link")&&c.jsx(yr,{value:"link",children:t("editor.video.dialog.link")})]}),c.jsxs(br,{value:"upload",children:[c.jsx("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:c.jsx(we,{className:"richtext-mt-1 richtext-w-full",onClick:p,size:"sm",children:t("editor.video.dialog.tab.upload")})}),c.jsx("input",{accept:"video/*",multiple:!0,onChange:d,ref:i,type:"file",style:{display:"none"}})]}),c.jsxs(br,{value:"link",children:[c.jsx("form",{onSubmit:h,children:c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[c.jsx(Ee,{autoFocus:!0,placeholder:t("editor.video.dialog.placeholder"),required:!0,type:"url",value:r,onChange:m=>{n(m.target.value)},onBlur:m=>{const x=m.target.value,g=f.videoProviders||["."];x&&!O1(x,g)?a("Invalid video URL"):a("")}}),c.jsx(we,{type:"submit",children:t("editor.video.dialog.button.apply")})]})}),o&&c.jsx("div",{className:"richtext-my-[5px] richtext-text-red-500",children:o})]})]})]})]})}function N1(e,t,r){return e<t?t:e>r?r:e}const M1=e=>typeof e=="number",L1=e=>typeof e=="string",$1=e=>typeof e=="function";function _1(e,t="px"){if(!e)return e;const r=M1(e)?String(e):e,n=Number.parseFloat(r),i=r.match(/[%a-z]+$/i),o=i?i[0]:t;return Number.isNaN(n)?e:n+o}function md(e,t){if(!e)return!1;const{extensions:r=[]}=(e==null?void 0:e.extensionManager)??{};return!!r.find(i=>i.name===t)}function D1(e){return e.map(t=>L1(t)?{value:t,name:t}:t)}function B1(e){e=e.replace("https://youtu.be/","https://www.youtube.com/watch?v=").replace("watch?v=","embed/");const t=e.match(/^https:\/\/www\.youtube\.com\/shorts\/([a-zA-Z0-9_-]+)/);t&&(e=`https://www.youtube.com/embed/${t[1]}`);const r=e.match(/^https:\/\/vimeo\.com\/(\d+)(?:\/([a-zA-Z0-9]+))?/);if(r){const i=r[1],o=r[2];o?e=`https://player.vimeo.com/video/${i}?h=${o}`:e=`https://player.vimeo.com/video/${i}`}return/^https?:\/\/www.bilibili.com\/video\/.*/i.test(e)&&(e=e.replace(/\?.*$/,"").replace("https://www.bilibili.com/video/","https://player.bilibili.com/player.html?bvid=")),e.includes("drive.google.com")&&(e=e.replace("/view","/preview")),e}const za=B.Node.create({name:"video",group:"block",atom:!0,draggable:!0,addOptions(){return{divider:!1,spacer:!1,allowFullscreen:!0,upload:void 0,frameborder:!1,resourceVideo:"both",width:q.VIDEO_SIZE["size-medium"],HTMLAttributes:{class:"iframe-wrapper"},button:({editor:e,t})=>{var r,n;return{component:k1,componentProps:{action:()=>{},isActive:()=>e.isActive("video")||!1,disabled:!((n=(r=e.can()).setVideo)!=null&&n.call(r,{})),icon:"Video",tooltip:t("editor.video.tooltip"),videoProviders:["."],editor:e}}}}},addAttributes(){return{src:{default:null,renderHTML:({src:e})=>({src:e?B1(e):null})},width:{default:this.options.width,renderHTML:({width:e})=>({width:_1(e)})},frameborder:{default:this.options.frameborder?1:0,parseHTML:()=>this.options.frameborder?1:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen},align:{default:"center",renderHTML:({align:e})=>({align:e})}}},parseHTML(){return[{tag:"div[data-video] iframe"}]},renderHTML({HTMLAttributes:e}){const{width:t="100%",align:r="center"}=e??{},n={...e,width:"100%",height:"100%"},i=`position: relative;overflow: hidden;display: flex;flex: 1;max-width: ${t};`,o=`flex: 1;padding-bottom: ${9/16*100}%;`,f=["div",{style:`display: flex; justify-content: ${r};`},["div",{style:i},["div",{style:o}],["iframe",n]]];return["div",{...this.options.HTMLAttributes,class:"iframe-wrapper","data-video":""},f]},addCommands(){return{setVideo:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e}),updateVideo:e=>({commands:t})=>t.updateAttributes(this.name,e)}}}),Ha={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function qa({item:e,disabled:t,editor:r}){var i;const n=e.component;return n?c.jsx(w.Fragment,{children:e.type==="divider"?c.jsx(Be,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}):c.jsx(n,{...e.componentProps,disabled:t||((i=e==null?void 0:e.componentProps)==null?void 0:i.disabled),editor:r})}):c.jsx(c.Fragment,{})}function z1(e){return e.type.name===Ht.name}function H1(e){return e.type.name===Ba.name}function q1(e){return e.type.name===za.name}function F1(e){const{lang:t}=q.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:a,to:s}=o;let l=!1;return i.view.state.doc.nodesBetween(a.pos,s,u=>{if(z1(u))return l=!0,!1}),l},n=w.useMemo(()=>e.disabled?[]:Xx(e.editor),[e.disabled,e.editor,t]);return c.jsx(c.Fragment,{children:c.jsx(pe.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:Ha,children:n!=null&&n.length?c.jsx("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap",children:n==null?void 0:n.map((i,o)=>c.jsx(qa,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-image-${o}`))})}):c.jsx(c.Fragment,{})})})}function U1(e){const{lang:t}=q.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:a,to:s}=o;let l=!1;return i.view.state.doc.nodesBetween(a.pos,s,u=>{if(H1(u))return l=!0,!1}),l},n=w.useMemo(()=>e.disabled?[]:Yx(e.editor),[e.disabled,e.editor,t]);return c.jsx(c.Fragment,{children:c.jsx(pe.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:Ha,children:n!=null&&n.length?c.jsx("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap",children:n==null?void 0:n.map((i,o)=>c.jsx(qa,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-image-gif-${o}`))})}):c.jsx(c.Fragment,{})})})}function W1(e){const{lang:t}=q.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:a,to:s}=o;let l=!1;return i.view.state.doc.nodesBetween(a.pos,s,u=>{if(q1(u))return l=!0,!1}),l},n=w.useMemo(()=>e.disabled?[]:Qx(e.editor),[e.editor,e.disabled,t]);return c.jsx(c.Fragment,{children:c.jsx(pe.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:Ha,children:n!=null&&n.length?c.jsx("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap",children:n==null?void 0:n.map((i,o)=>c.jsx(qa,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-video-${o}`))})}):c.jsx(c.Fragment,{})})})}function G1(e,t,r=null){return r?e.createChecked({index:t},r):e.createAndFill({index:t})}function V1(e){if(e.cached.columnsNodeTypes)return e.cached.columnsNodeTypes;const t={columns:e.nodes.columns,column:e.nodes.column};return e.cached.columnsNodeTypes=t,t}function K1(e,t,r=null){const n=V1(e),i=[];for(let o=0;o<t;o+=1){const a=G1(n.column,o,r);a&&i.push(a)}return n.columns.createChecked({cols:t},i)}function ai({state:e,dispatch:t,type:r}){const n=B.findParentNode(o=>o.type.name===vr.name)(e.selection),i=B.findParentNode(o=>o.type.name===Fa.name)(e.selection);if(t&&n&&i){const o=n.node,a=i.node.attrs.index,s=o.toJSON();let l=a;r==="delete"?(l=a-1,s.content.splice(a,1)):(l=r==="addBefore"?a:a+1,s.content.splice(l,0,{type:"column",attrs:{index:a},content:[{type:"paragraph"}]})),s.attrs.cols=s.content.length,s.content.forEach((h,p)=>{h.attrs.index=p});const u=B.Node$1.fromJSON(e.schema,s);let f=n.pos;u.content.forEach((h,p,m)=>{m<l&&(f+=h.nodeSize)});const d=e.tr.setTime(Date.now());d.replaceWith(n.pos,n.pos+n.node.nodeSize,u).setSelection(B.TextSelection.near(d.doc.resolve(f))),t(d)}return!0}function ac({state:e,dispatch:t,type:r}){const n=B.findParentNode(o=>o.type.name===vr.name)(e.selection),i=B.findParentNode(o=>o.type.name===Fa.name)(e.selection);if(t&&n&&i){const o=n.node,a=i.node.attrs.index;let s=0;r==="before"?s=(a-1+o.attrs.cols)%o.attrs.cols:s=(a+1)%o.attrs.cols;let l=n.pos;o.content.forEach((f,d,h)=>{h<s&&(l+=f.nodeSize)});const u=e.tr.setTime(Date.now());return u.setSelection(B.TextSelection.near(u.doc.resolve(l))),t(u),!0}return!1}const Fa=B.Node.create({name:"column",content:"block+",isolating:!0,addOptions(){return{HTMLAttributes:{class:"column"}}},addAttributes(){return{index:{default:0,parseHTML:e=>e.getAttribute("index")}}},parseHTML(){return[{tag:"div[class=column]"}]},renderHTML({HTMLAttributes:e}){return["div",B.mergeAttributes(this.options.HTMLAttributes,e),0]}}),X1=B.Extension.create({name:"columnActionButton",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:r})=>({component:W,componentProps:{action:()=>{t.chain().focus().insertColumns({cols:2}).run()},icon:"Columns",tooltip:r("editor.columns.tooltip")}})}}}),gd=200,vr=B.Node.create({name:"columns",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,content:"column{1,}",priority:gd,addOptions(){return{HTMLAttributes:{class:"columns"}}},addAttributes(){return{cols:{default:2,parseHTML:e=>e.getAttribute("cols")}}},parseHTML(){return[{tag:"div[class=grid]"}]},renderHTML({HTMLAttributes:e}){return["div",B.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{insertColumns:e=>({tr:t,dispatch:r,editor:n})=>{const i=K1(n.schema,e&&e.cols||3);if(r){const o=t.selection.anchor+1;t.replaceSelectionWith(i).scrollIntoView().setSelection(B.TextSelection.near(t.doc.resolve(o)))}return!0},addColBefore:()=>({dispatch:e,state:t})=>ai({dispatch:e,state:t,type:"addBefore"}),addColAfter:()=>({dispatch:e,state:t})=>ai({dispatch:e,state:t,type:"addAfter"}),deleteCol:()=>({dispatch:e,state:t})=>ai({dispatch:e,state:t,type:"delete"})}},addKeyboardShortcuts(){return{"Mod-Alt-G":()=>this.editor.commands.insertColumns(),Tab:()=>ac({state:this.editor.state,dispatch:this.editor.view.dispatch,type:"after"}),"Shift-Tab":()=>ac({state:this.editor.state,dispatch:this.editor.view.dispatch,type:"before"})}}});function Ua(e,t){const{state:r}=t,n=r.selection.$anchor;let i=!1;if(n.depth)for(let o=n.depth;o>0;o--)n.node(o).type.name===e&&(t.dispatchTransaction&&t.dispatchTransaction(r.tr.delete(n.before(o),n.after(o)).scrollIntoView()),i=!0);else{const o=r.selection.node;o&&o.type.name===e&&(t.chain().deleteSelection().run(),i=!0)}if(!i){const o=n.pos;if(o){const a=r.tr.doc.nodeAt(o);a&&a.type.name===e&&(t.dispatchTransaction&&t.dispatchTransaction(r.tr.delete(o,o+a.nodeSize)),i=!0)}}return i}function Y1({editor:e}){const{t}=q.useLocale(),r=w.useCallback(()=>e.isActive(vr.name),[e]),n=w.useCallback(()=>Ua(vr.name,e),[e]),i=w.useCallback(()=>e.chain().focus().addColBefore().run(),[e]),o=w.useCallback(()=>e.chain().focus().addColAfter().run(),[e]),a=w.useCallback(()=>e.chain().focus().deleteCol().run(),[e]);return c.jsx(pe.BubbleMenu,{editor:e,pluginKey:"columns-bubble-menu",shouldShow:r,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999},children:c.jsxs("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:[c.jsx(W,{action:i,icon:"ColumnAddLeft",tooltip:t("editor.table.menu.insertColumnBefore")}),c.jsx(W,{action:o,icon:"ColumnAddRight",tooltip:t("editor.table.menu.insertColumnAfter")}),c.jsx(W,{action:a,icon:"DeleteColumn",tooltip:t("editor.table.menu.deleteColumn")}),c.jsx(W,{action:n,icon:"Trash2",tooltip:t("editor.table.menu.delete_column")})]})})}const xd=fe.Root,vd=fe.Trigger,sc=fe.Portal,cc=fe.Sub,pa=oe.forwardRef(({className:e,inset:t,children:r,...n},i)=>c.jsxs(fe.SubTrigger,{ref:i,className:re("richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none focus:richtext-bg-accent data-[state=open]:richtext-bg-accent",t&&"richtext-pl-8",e),...n,children:[r,c.jsx(N.ChevronRight,{className:"richtext-ml-auto richtext-h-4 richtext-w-4"})]}));pa.displayName=fe.SubTrigger.displayName;const ma=oe.forwardRef(({className:e,...t},r)=>c.jsx(fe.SubContent,{ref:r,className:re("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-lg data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]: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",e),...t}));ma.displayName=fe.SubContent.displayName;const Wa=oe.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(fe.Portal,{children:c.jsx(fe.Content,{ref:n,sideOffset:t,className:re("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]: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",e),...r})}));Wa.displayName=fe.Content.displayName;const ze=oe.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(fe.Item,{ref:n,className:re("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t&&"richtext-pl-8",e),...r}));ze.displayName=fe.Item.displayName;const yd=oe.forwardRef(({className:e,children:t,checked:r,...n},i)=>c.jsxs(fe.CheckboxItem,{ref:i,className:re("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",e),checked:r,...n,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:c.jsx(fe.ItemIndicator,{children:c.jsx(N.Check,{className:"richtext-h-4 richtext-w-4"})})}),t]}));yd.displayName=fe.CheckboxItem.displayName;const J1=oe.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(fe.RadioItem,{ref:n,className:re("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",e),...r,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:c.jsx(fe.ItemIndicator,{children:c.jsx(N.Circle,{className:"richtext-h-2 richtext-w-2 richtext-fill-current"})})}),t]}));J1.displayName=fe.RadioItem.displayName;const Z1=oe.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(fe.Label,{ref:n,className:re("richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",t&&"richtext-pl-8",e),...r}));Z1.displayName=fe.Label.displayName;const Ga=oe.forwardRef(({className:e,...t},r)=>c.jsx(fe.Separator,{ref:r,className:re("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",e),...t}));Ga.displayName=fe.Separator.displayName;function bd({className:e,...t}){return c.jsx("span",{className:re("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",e),...t})}bd.displayName="DropdownMenuShortcut";const Ee=oe.forwardRef(({className:e,type:t,...r},n)=>c.jsx("input",{type:t,className:re("richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background file:richtext-border-0 file:richtext-bg-transparent file:richtext-text-sm file:richtext-font-medium placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",e),ref:n,...r}));Ee.displayName="Input";const Q1=Rn("richtext-text-sm richtext-font-medium richtext-leading-none peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"),Ue=oe.forwardRef(({className:e,...t},r)=>c.jsx(iu.Root,{ref:r,className:re(Q1(),e),...t}));Ue.displayName=iu.Root.displayName;const Wt=dr.Root,Gt=dr.Trigger,It=oe.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},i)=>c.jsx(dr.Portal,{children:c.jsx(dr.Content,{ref:i,align:t,sideOffset:r,className:re("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]: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",e),...n})}));It.displayName=dr.Content.displayName;const Be=oe.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},i)=>c.jsx(ru.Root,{ref:i,decorative:r,orientation:t,className:re("richtext-shrink-0 richtext-bg-border",t==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",e),...n}));Be.displayName=ru.Root.displayName;const Va=oe.forwardRef(({className:e,...t},r)=>c.jsx(Vo.Root,{className:re("richtext-peer richtext-inline-flex richtext-h-6 richtext-w-11 richtext-shrink-0 richtext-cursor-pointer richtext-items-center richtext-rounded-full richtext-border-2 richtext-border-transparent richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 focus-visible:richtext-ring-offset-background disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 data-[state=checked]:richtext-bg-primary data-[state=unchecked]:richtext-bg-input",e),...t,ref:r,children:c.jsx(Vo.Thumb,{className:re("richtext-pointer-events-none richtext-block richtext-h-5 richtext-w-5 richtext-rounded-full richtext-bg-background richtext-shadow-lg richtext-ring-0 richtext-transition-transform data-[state=checked]:richtext-translate-x-5 data-[state=unchecked]:richtext-translate-x-0")})}));Va.displayName=Vo.Root.displayName;const wd=jt.Root,Ka=oe.forwardRef(({className:e,...t},r)=>c.jsx(jt.List,{ref:r,className:re("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",e),...t}));Ka.displayName=jt.List.displayName;const yr=oe.forwardRef(({className:e,...t},r)=>c.jsx(jt.Trigger,{ref:r,className:re("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-2 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",e),...t}));yr.displayName=jt.Trigger.displayName;const br=oe.forwardRef(({className:e,...t},r)=>c.jsx(jt.Content,{ref:r,className:re("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-2",e),...t}));br.displayName=jt.Content.displayName;const ev=Re.Provider,Sd=oe.forwardRef(({className:e,...t},r)=>c.jsx(Re.Viewport,{ref:r,className:re("richtext-fixed richtext-top-0 richtext-z-[100] richtext-flex richtext-max-h-screen richtext-w-full richtext-flex-col-reverse richtext-p-4 sm:richtext-bottom-0 sm:richtext-right-0 sm:richtext-top-auto sm:richtext-flex-col md:richtext-max-w-[420px]",e),...t}));Sd.displayName=Re.Viewport.displayName;const tv=Rn("richtext-group richtext-pointer-events-auto richtext-relative richtext-flex richtext-w-full richtext-items-center richtext-justify-between richtext-space-x-4 richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-p-6 richtext-pr-8 richtext-shadow-lg richtext-transition-all data-[swipe=cancel]:richtext-translate-x-0 data-[swipe=end]:richtext-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:richtext-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:richtext-transition-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[swipe=end]:richtext-animate-out data-[state=closed]:richtext-fade-out-80 data-[state=closed]:richtext-slide-out-to-right-full data-[state=open]:richtext-slide-in-from-top-full data-[state=open]:sm:richtext-slide-in-from-bottom-full",{variants:{variant:{default:"richtext-border richtext-bg-background richtext-text-foreground",destructive:"richtext-destructive richtext-group richtext-border-destructive richtext-bg-destructive richtext-text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Ad=oe.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(Re.Root,{ref:n,className:re(tv({variant:t}),e),...r}));Ad.displayName=Re.Root.displayName;const rv=oe.forwardRef(({className:e,...t},r)=>c.jsx(Re.Action,{ref:r,className:re("richtext-inline-flex richtext-h-8 richtext-shrink-0 richtext-items-center richtext-justify-center richtext-rounded-md !richtext-border richtext-bg-transparent richtext-px-3 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-secondary focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 group-[.destructive]:richtext-border-muted/40 group-[.destructive]:hover:richtext-border-destructive/30 group-[.destructive]:hover:richtext-bg-destructive group-[.destructive]:hover:richtext-text-destructive-foreground group-[.destructive]:focus:richtext-ring-destructive",e),...t}));rv.displayName=Re.Action.displayName;const Cd=oe.forwardRef(({className:e,...t},r)=>c.jsx(Re.Close,{ref:r,className:re("richtext-absolute richtext-right-2 richtext-top-2 richtext-rounded-md richtext-p-1 richtext-text-foreground/50 richtext-opacity-0 richtext-transition-opacity hover:richtext-text-foreground focus:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 group-hover:richtext-opacity-100 group-[.destructive]:richtext-text-red-300 group-[.destructive]:hover:richtext-text-red-50 group-[.destructive]:focus:richtext-ring-red-400 group-[.destructive]:focus:richtext-ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(N.X,{className:"richtext-h-4 richtext-w-4"})}));Cd.displayName=Re.Close.displayName;const jd=oe.forwardRef(({className:e,...t},r)=>c.jsx(Re.Title,{ref:r,className:re("richtext-text-sm richtext-font-semibold",e),...t}));jd.displayName=Re.Title.displayName;const Td=oe.forwardRef(({className:e,...t},r)=>c.jsx(Re.Description,{ref:r,className:re("richtext-text-sm richtext-opacity-90",e),...t}));Td.displayName=Re.Description.displayName;const nv=Rn("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-2 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"}}),Xa=oe.forwardRef(({className:e,variant:t,size:r,...n},i)=>c.jsx(nu.Root,{ref:i,className:re(nv({variant:t,size:r,className:e})),...n}));Xa.displayName=nu.Root.displayName;const iv=Sr.Provider,Ya=Sr.Root,Ja=Sr.Trigger,kn=oe.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(Sr.Content,{ref:n,sideOffset:t,className:re("richtext-z-50 richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-popover-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",e),...r}));kn.displayName=Sr.Content.displayName;const ov=1,av=1e6;let si=0;function sv(){return si=(si+1)%Number.MAX_SAFE_INTEGER,si.toString()}const ci=new Map;function lc(e){if(ci.has(e))return;const t=setTimeout(()=>{ci.delete(e),ur({type:"REMOVE_TOAST",toastId:e})},av);ci.set(e,t)}function cv(e,t){switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ov)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?lc(r):e.toasts.forEach(n=>{lc(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}}const Ur=[];let Wr={toasts:[]};function ur(e){Wr=cv(Wr,e),Ur.forEach(t=>{t(Wr)})}function lv({...e}){const t=sv(),r=i=>ur({type:"UPDATE_TOAST",toast:{...i,id:t}}),n=()=>ur({type:"DISMISS_TOAST",toastId:t});return ur({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function Nn(){const[e,t]=oe.useState(Wr);return oe.useEffect(()=>(Ur.push(t),()=>{const r=Ur.indexOf(t);r>-1&&Ur.splice(r,1)}),[e]),{...e,toast:lv,dismiss:r=>ur({type:"DISMISS_TOAST",toastId:r})}}const Ed=oe.forwardRef(({className:e,...t},r)=>c.jsx(Go.Root,{ref:r,className:re("!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-p-0 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-2 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",e),...t,children:c.jsx(Go.Indicator,{className:re("!richtext-flex !richtext-p-0 !richtext-items-center !richtext-justify-center !richtext-text-current"),children:c.jsx(N.Check,{className:"!richtext-h-4 !richtext-w-4"})})}));Ed.displayName=Go.Root.displayName;const uv={padding:"0 12px 12px"},Id=({width:e,maxWidth:t,height:r,onOk:n,children:i})=>{const{t:o}=q.useLocale(),[a,s]=w.useState({width:"",height:"",maxWidth:""});w.useEffect(()=>{s({width:e,height:r,maxWidth:t})},[r,t,e]);function l(u){u.preventDefault(),u.stopPropagation(),n(a)}return c.jsxs(Wt,{modal:!0,children:[c.jsx(Gt,{asChild:!0,children:i}),c.jsx(It,{children:c.jsx("div",{style:uv,children:c.jsxs("form",{className:"richtext-flex richtext-flex-col richtext-gap-2",onSubmit:l,children:[c.jsx(Ue,{className:"mb-[6px]",children:"Width"}),c.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:c.jsx(Ee,{type:"number",value:a.width,required:!0,onChange:u=>s({...a,width:u.target.value})})})}),c.jsx(Ue,{className:"mb-[6px]",children:"Max Width"}),c.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:c.jsx(Ee,{type:"number",value:a.maxWidth,required:!0,onChange:u=>s({...a,maxWidth:u.target.value})})})}),c.jsx(Ue,{className:"mb-[6px]",children:"Height"}),c.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:c.jsx(Ee,{type:"number",value:a.height,required:!0,onChange:u=>s({...a,height:u.target.value})})})}),c.jsx(we,{type:"submit",className:"richtext-self-end richtext-mt-2",children:o("editor.link.dialog.button.apply")})]})})})]})},Vt={youtube:{example:"https://www.youtube.com/watch?v=I4sMhHbHYXM",src:"https://www.youtube.com/embed/I4sMhHbHYXM",srcPrefix:"https://www.youtube.com/embed",linkRule:[/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\s/]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[&?]v=)|youtu\.be\/)([\w-]{11})/]},youku:{example:"https://v.youku.com/v_show/id_XNDM0NDM4MTcy.html?spm=a2h0c.8166622.PhoneSokuUgc_4.dtitle",src:"https://player.youku.com/embed/XNDM0NDM4MTcy",srcPrefix:"https://player.youku.com/embed",linkRule:[String.raw`v.youku.com\/v_show\/id_\w+\=*`],idRule:String.raw`id_\w+\=*`},bilibili:{example:"https://www.bilibili.com/video/BV1EJ411u7DN",src:"https://player.bilibili.com/player.html?bvid=BV1EJ411u7DN",srcPrefix:"https://player.bilibili.com/player.html?bvid",linkRule:[String.raw`www.bilibili.com\/video\/\w+`]},qqvideo:{example:"https://v.qq.com/x/cover/mzc0020006aw1mn/u0033nvzb5v.html",src:"https://v.qq.com/txp/iframe/player.html?vid=u0033nvzb5v",srcPrefix:"https://v.qq.com/txp/iframe/player.html?vid",linkRule:[String.raw`v.qq.com\/x\/cover\/\w+\/\w+`]},amap:{example:"https://ditu.amap.com/",src:"https://www.amap.com/place/B000A45467",srcPrefix:"",linkRule:[String.raw`\.amap\.com`]},baidu_map:{example:"https://j.map.baidu.com/15/fo",src:"https://j.map.baidu.com/15/fo",srcPrefix:"",linkRule:[String.raw`map\.baidu\.com`]},modao:{example:"https://free.modao.cc/app/2cd26580a6717a147454df7470e7ec464093cba3/embed/v2#screen=sk71k6d1dfxulzx",src:"https://free.modao.cc/app/6UkpAxcGE3nPz52GLqhnOZgC7MATBSy/embed/v2",srcPrefix:"",linkRule:[String.raw`https:\/\/\w+.modao.cc\/app\/\w+\/embed\/v2`],tips:"Modao > More > Share > Embed > COPY"},lanhu:{example:"https://lanhuapp.com/link/#/invite?sid=evP7L",src:"https://lanhuapp.com/url/evP7L",srcPrefix:"",linkRule:[String.raw`https:\/\/lanhuapp.com\/url\/\w+`],tips:"Lanhu > Project > Share > Copy Link"},figma:{example:"https://www.figma.com/file/aS9uSgPXoNpaPkzbjNcK8v/Demo?node-id=0%3A1",src:"https://www.figma.com/file/aS9uSgPXoNpaPkzbjNcK8v/Demo?node-id=0%3A1",srcPrefix:"https://www.figma.com/embed?embed_host=share&url",linkRule:[String.raw`https:\/\/www.figma.com\/file\/\w+`]},canva:{example:"https://www.canva.cn/design/DAD61-t29UI/view",src:"https://www.canva.cn/design/DAD61-t29UI/view",srcPrefix:"",linkRule:[String.raw`https:\/\/www.canva.cn\/design\/.+\/view`]},processon:{example:"https://www.processon.com/embed/5ea99d8607912948b0e6fe78",src:"https://www.processon.com/embed/5ea99d8607912948b0e6fe78",srcPrefix:"",linkRule:[String.raw`https:\/\/www.processon.com\/embed\/\w+`]},codepen:{example:"https://codepen.io/mekery/embed/YzyrKOJ",src:"https://codepen.io/mekery/embed/YzyrKOJ",srcPrefix:"",linkRule:[String.raw`https:\/\/codepen.io\/.+\/embed\/\w+`]},jinshuju:{example:"https://jinshuju.net/f/q9YvVf",src:"https://jinshuju.net/f/q9YvVf",srcPrefix:"",linkRule:[String.raw`https:\/\/jinshuju.net\/f\/\w+`]},iframe:{example:"https://v.youku.com/v_show/id_XNDM0NDM4MTcy.html",src:"https://player.youku.com/embed/XNDM0NDM4MTcy",srcPrefix:"",linkRule:[".+"]},googlemaps:{example:"https://goo.gl/maps/8Ys8b4K1ZJY2",src:"https://www.google.com/maps/embed?pb=https://goo.gl/maps/8Ys8b4K1ZJY2",srcPrefix:"",linkRule:[String.raw`https:\/\/goo.gl\/maps\/\w+`]}};function dv(e){const t=Vt.youtube,r=e.matchedUrl;e.validLink=!0;const n=r.split("="),i=n.length;if(i>0){const o=n[i-1];e.src=`${t.srcPrefix}/${o}`,e.validId=!0}return e}function fv(e){const t=Vt.youku,r=e.matchedUrl,n=t.idRule,i=new RegExp(n),o=r.match(i);if(o&&o.length>0){const a=o[0].slice(3);e.validId=!0,e.src=`${t.srcPrefix}/${a}`}else e.validId=!1;return e}function hv(e){const t=Vt.bilibili,n=e.matchedUrl.split("/"),i=n.length;if(i>0){const o=n[i-1];e.src=`${t.srcPrefix}=${o}`,e.validId=!0}return e}function pv(e){const t=Vt.qqvideo,n=e.matchedUrl.split("/"),i=n.length;if(i>0){const o=n[i-1];e.src=`${t.srcPrefix}=${o}`,e.validId=!0}return e}function mv(e,t){return t.src=e,t.validId=!0,t}function gv(e,t){return t.src=e,t.validId=!0,t}function xv(e,t){return t.src=e,t.validId=!0,t.originalLink=e,t}function vv(e){return e.src=e.matchedUrl,e.validId=!0,e.originalLink=e.src,e}function yv(e){return e.src=e.matchedUrl,e.validId=!0,e.originalLink=e.src,e}function bv(e){const t=Vt.figma;return e.src=`${t.srcPrefix}=${encodeURIComponent(e.matchedUrl)}`,e.validId=!0,e.originalLink=e.matchedUrl,e}function wv(e,t){return t.src=`${t.matchedUrl}?embed`,t.validId=!0,t.originalLink=e,t}function Sv(e,t){return t.src=`${t.matchedUrl}`,t.validId=!0,t.originalLink=e,t}function Av(e){return e.src=`${e.matchedUrl}`,e.validId=!0,e.originalLink=e.src,e}function Cv(e,t){return t.src=`${t.matchedUrl}?background=white&banner=show&embedded=true`,t.validId=!0,t.originalLink=e,t}function jv(e,t){return t.src=`${t.matchedUrl}`,t.validId=!0,t.originalLink=e,t}function Tv(e,t,r){if(e==="googlemaps")return r.validLink=!0,r.matchedUrl=t,r;const i=Vt[e].linkRule;for(const o of i){const a=new RegExp(o),s=t.match(a);if(s&&s.length>0)return r.validLink=!0,r.matchedUrl=e==="youtube"?s[1]:s[0],r}return r}function Ev(e){var r,n;let t="iframe";return((r=e.includes)!=null&&r.call(e,"youtube")||(n=e.includes)!=null&&n.call(e,"youtu.be"))&&(t="youtube"),e.includes("youku")&&(t="youku"),e.includes("bilibili")&&(t="bilibili"),e.includes("qq")&&(t="qqvideo"),e.includes("amap")&&(t="amap"),e.includes("map.baidu")&&(t="baidu_map"),(e.includes("google.com/maps")||e.includes("maps.app.goo.gl"))&&(t="googlemaps"),e.includes("modao")&&(t="modao"),e.includes("lanhuapp")&&(t="lanhu"),e.includes("figma")&&(t="figma"),e.includes("canva")&&(t="canva"),e.includes("processon")&&(t="processon"),e.includes("codepen")&&(t="codepen"),e.includes("jinshuju")&&(t="jinshuju"),e.includes("iframe")&&(t="iframe"),t}function Rd(e){let t={validLink:!1,validId:!1,matchedUrl:"",originalLink:e,src:""};const r=Ev(e);if(t=Tv(r,e,t),!t.validLink)return t;switch(r){case"youtube":return dv(t);case"youku":return fv(t);case"bilibili":return hv(t);case"qqvideo":return pv(t);case"amap":return mv(e,t);case"baidu_map":return gv(e,t);case"googlemaps":return xv(e,t);case"modao":return vv(t);case"lanhu":return yv(t);case"figma":return bv(t);case"canva":return wv(e,t);case"processon":return Sv(e,t);case"codepen":return Av(t);case"jinshuju":return Cv(e,t);case"iframe":return jv(e,t);default:return e}}function Pd(){const[e]=fd(t=>t.value);return e}const Iv={setDisable:(e,t)=>{On(vt.EDIT(e),t)}},Rv="_wrap_5y04w_1",Pv="_innerWrap_5y04w_15",uc={wrap:Rv,innerWrap:Pv};function Ov({editor:e,node:t,updateAttributes:r}){const n=Pd(),{src:i,width:o,height:a}=t.attrs,[s,l]=w.useState("");function u(){if(!s)return;const d=Rd(s);e.chain().updateAttributes(St.name,{src:(d==null?void 0:d.src)||s}).setNodeSelection(e.state.selection.from).focus().run()}const f=w.useCallback(d=>{r({width:d.width,height:d.height})},[r]);return c.jsxs(pe.NodeViewWrapper,{children:[!i&&c.jsxs("div",{className:"richtext-mx-auto richtext-my-[12px] richtext-flex richtext-max-w-[600px] richtext-items-center richtext-justify-center richtext-gap-[10px] richtext-rounded-[12px] richtext-border richtext-border-solid richtext-border-[#ccc] richtext-p-[10px]",children:[c.jsx(Ee,{autoFocus:!0,className:"richtext-flex-1",onInput:d=>l(d.target.value),placeholder:"Enter link",type:"url",value:s}),c.jsx(we,{className:"richtext-w-[60px]",onClick:u,children:"OK"})]}),i&&c.jsx(Sf.Resizable,{size:{width:Number.parseInt(o),height:Number.parseInt(a)},onResizeStop:(d,h,p,m)=>{f({width:Number.parseInt(o)+m.width,height:Number.parseInt(a)+m.height})},children:c.jsx("div",{className:pe.clsx(uc.wrap,"render-wrapper"),children:c.jsx("div",{className:uc.innerWrap,style:{pointerEvents:n?"none":"auto"},children:c.jsx("iframe",{className:"richtext-my-[12px] ",src:i})})})})]})}const St=B.Node.create({name:"iframe",content:"",marks:"",group:"block",selectable:!0,atom:!0,draggable:!0,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"iframe"},button:({editor:t,extension:r,t:n})=>({component:W,componentProps:{action:i=>t.commands.setIframe(i),upload:r.options.upload,disabled:!t.can().setIframe({}),icon:"Iframe",tooltip:n("editor.iframe.tooltip")}})}},addAttributes(){return{width:{default:600,parseHTML:pe.getDatasetAttribute("width")},height:{default:300,parseHTML:pe.getDatasetAttribute("height")},src:{default:null,parseHTML:pe.getDatasetAttribute("src")},defaultShowPicker:{default:!1},frameborder:{default:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen}}},parseHTML(){return[{tag:"iframe"}]},renderHTML({HTMLAttributes:e}){return["iframe",B.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setIframe:e=>({tr:t,commands:r,chain:n})=>{var o,a,s;if(((s=(a=(o=t.selection)==null?void 0:o.node)==null?void 0:a.type)==null?void 0:s.name)==this.name)return r.updateAttributes(this.name,e);const i=e||{url:""};return n().insertContent({type:this.name,attrs:i}).run()}}},addInputRules(){return[B.nodeInputRule({find:/^\$iframe\$$/,type:this.type,getAttributes:()=>({width:"100%"})})]},addNodeView(){return pe.ReactNodeViewRenderer(Ov)}});var wr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Od(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function kd(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var li,dc;function Nd(){if(dc)return li;dc=1;var e=Object.prototype.toString;return li=function(r){var n=e.call(r),i=n==="[object Arguments]";return i||(i=n!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&e.call(r.callee)==="[object Function]"),i},li}var ui,fc;function kv(){if(fc)return ui;fc=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Nd(),i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),a=i.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(h){var p=h.constructor;return p&&p.prototype===h},u={$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},f=function(){if(typeof window>"u")return!1;for(var h in window)try{if(!u["$"+h]&&t.call(window,h)&&window[h]!==null&&typeof window[h]=="object")try{l(window[h])}catch{return!0}}catch{return!0}return!1}(),d=function(h){if(typeof window>"u"||!f)return l(h);try{return l(h)}catch{return!1}};e=function(p){var m=p!==null&&typeof p=="object",x=r.call(p)==="[object Function]",g=n(p),y=m&&r.call(p)==="[object String]",S=[];if(!m&&!x&&!g)throw new TypeError("Object.keys called on a non-object");var T=a&&x;if(y&&p.length>0&&!t.call(p,0))for(var E=0;E<p.length;++E)S.push(String(E));if(g&&p.length>0)for(var j=0;j<p.length;++j)S.push(String(j));else for(var M in p)!(T&&M==="prototype")&&t.call(p,M)&&S.push(String(M));if(o)for(var L=d(p),k=0;k<s.length;++k)!(L&&s[k]==="constructor")&&t.call(p,s[k])&&S.push(s[k]);return S}}return ui=e,ui}var di,hc;function Za(){if(hc)return di;hc=1;var e=Array.prototype.slice,t=Nd(),r=Object.keys,n=r?function(a){return r(a)}:kv(),i=Object.keys;return n.shim=function(){if(Object.keys){var a=function(){var s=Object.keys(arguments);return s&&s.length===arguments.length}(1,2);a||(Object.keys=function(l){return t(l)?i(e.call(l)):i(l)})}else Object.keys=n;return Object.keys||n},di=n,di}var fi,pc;function Mn(){if(pc)return fi;pc=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return fi=e,fi}var hi,mc;function Qa(){return mc||(mc=1,hi=SyntaxError),hi}var pi,gc;function Me(){return gc||(gc=1,pi=TypeError),pi}var mi,xc;function Nv(){return xc||(xc=1,mi=Object.getOwnPropertyDescriptor),mi}var gi,vc;function Rt(){if(vc)return gi;vc=1;var e=Nv();if(e)try{e([],"length")}catch{e=null}return gi=e,gi}var xi,yc;function es(){if(yc)return xi;yc=1;var e=Mn(),t=Qa(),r=Me(),n=Rt();return xi=function(o,a,s){if(!o||typeof o!="object"&&typeof o!="function")throw new r("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,h=!!n&&n(o,a);if(e)e(o,a,{configurable:f===null&&h?h.configurable:!f,enumerable:l===null&&h?h.enumerable:!l,value:s,writable:u===null&&h?h.writable:!u});else if(d||!l&&!u&&!f)o[a]=s;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},xi}var vi,bc;function ts(){if(bc)return vi;bc=1;var e=Mn(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},vi=t,vi}var yi,wc;function Pt(){if(wc)return yi;wc=1;var e=Za(),t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",r=Object.prototype.toString,n=Array.prototype.concat,i=es(),o=function(u){return typeof u=="function"&&r.call(u)==="[object Function]"},a=ts()(),s=function(u,f,d,h){if(f in u){if(h===!0){if(u[f]===d)return}else if(!o(h)||!h())return}a?i(u,f,d,!0):i(u,f,d)},l=function(u,f){var d=arguments.length>2?arguments[2]:{},h=e(f);t&&(h=n.call(h,Object.getOwnPropertySymbols(f)));for(var p=0;p<h.length;p+=1)s(u,h[p],f[h[p]],d[h[p]])};return l.supportsDescriptors=!!a,yi=l,yi}var bi={exports:{}},wi,Sc;function rs(){return Sc||(Sc=1,wi=Object),wi}var Si,Ac;function Md(){return Ac||(Ac=1,Si=Error),Si}var Ai,Cc;function Mv(){return Cc||(Cc=1,Ai=EvalError),Ai}var Ci,jc;function Lv(){return jc||(jc=1,Ci=RangeError),Ci}var ji,Tc;function $v(){return Tc||(Tc=1,ji=ReferenceError),ji}var Ti,Ec;function _v(){return Ec||(Ec=1,Ti=URIError),Ti}var Ei,Ic;function Dv(){return Ic||(Ic=1,Ei=Math.abs),Ei}var Ii,Rc;function Bv(){return Rc||(Rc=1,Ii=Math.floor),Ii}var Ri,Pc;function zv(){return Pc||(Pc=1,Ri=Math.max),Ri}var Pi,Oc;function Hv(){return Oc||(Oc=1,Pi=Math.min),Pi}var Oi,kc;function qv(){return kc||(kc=1,Oi=Math.pow),Oi}var ki,Nc;function Fv(){return Nc||(Nc=1,ki=Math.round),ki}var Ni,Mc;function Uv(){return Mc||(Mc=1,Ni=Number.isNaN||function(t){return t!==t}),Ni}var Mi,Lc;function Wv(){if(Lc)return Mi;Lc=1;var e=Uv();return Mi=function(r){return e(r)||r===0?r:r<0?-1:1},Mi}var Li,$c;function Ln(){return $c||($c=1,Li=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),Li}var $i,_c;function ns(){if(_c)return $i;_c=1;var e=typeof Symbol<"u"&&Symbol,t=Ln();return $i=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},$i}var _i,Dc;function Ld(){return Dc||(Dc=1,_i=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),_i}var Di,Bc;function $d(){if(Bc)return Di;Bc=1;var e=rs();return Di=e.getPrototypeOf||null,Di}var Bi,zc;function Gv(){if(zc)return Bi;zc=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,n="[object Function]",i=function(l,u){for(var f=[],d=0;d<l.length;d+=1)f[d]=l[d];for(var h=0;h<u.length;h+=1)f[h+l.length]=u[h];return f},o=function(l,u){for(var f=[],d=u,h=0;d<l.length;d+=1,h+=1)f[h]=l[d];return f},a=function(s,l){for(var u="",f=0;f<s.length;f+=1)u+=s[f],f+1<s.length&&(u+=l);return u};return Bi=function(l){var u=this;if(typeof u!="function"||t.apply(u)!==n)throw new TypeError(e+u);for(var f=o(arguments,1),d,h=function(){if(this instanceof d){var y=u.apply(this,i(f,arguments));return Object(y)===y?y:this}return u.apply(l,i(f,arguments))},p=r(0,u.length-f.length),m=[],x=0;x<p;x++)m[x]="$"+x;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(h),u.prototype){var g=function(){};g.prototype=u.prototype,d.prototype=new g,g.prototype=null}return d},Bi}var zi,Hc;function Tr(){if(Hc)return zi;Hc=1;var e=Gv();return zi=Function.prototype.bind||e,zi}var Hi,qc;function is(){return qc||(qc=1,Hi=Function.prototype.call),Hi}var qi,Fc;function os(){return Fc||(Fc=1,qi=Function.prototype.apply),qi}var Fi,Uc;function Vv(){return Uc||(Uc=1,Fi=typeof Reflect<"u"&&Reflect&&Reflect.apply),Fi}var Ui,Wc;function _d(){if(Wc)return Ui;Wc=1;var e=Tr(),t=os(),r=is(),n=Vv();return Ui=n||e.call(r,t),Ui}var Wi,Gc;function as(){if(Gc)return Wi;Gc=1;var e=Tr(),t=Me(),r=is(),n=_d();return Wi=function(o){if(o.length<1||typeof o[0]!="function")throw new t("a function is required");return n(e,r,o)},Wi}var Gi,Vc;function Kv(){if(Vc)return Gi;Vc=1;var e=as(),t=Rt(),r;try{r=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var n=!!r&&t&&t(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return Gi=n&&typeof n.get=="function"?e([n.get]):typeof o=="function"?function(s){return o(s==null?s:i(s))}:!1,Gi}var Vi,Kc;function Dd(){if(Kc)return Vi;Kc=1;var e=Ld(),t=$d(),r=Kv();return Vi=e?function(i){return e(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:r?function(i){return r(i)}:null,Vi}var Ki,Xc;function ss(){if(Xc)return Ki;Xc=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=Tr();return Ki=r.call(e,t),Ki}var Xi,Yc;function at(){if(Yc)return Xi;Yc=1;var e,t=rs(),r=Md(),n=Mv(),i=Lv(),o=$v(),a=Qa(),s=Me(),l=_v(),u=Dv(),f=Bv(),d=zv(),h=Hv(),p=qv(),m=Fv(),x=Wv(),g=Function,y=function(ie){try{return g('"use strict"; return ('+ie+").constructor;")()}catch{}},S=Rt(),T=Mn(),E=function(){throw new s},j=S?function(){try{return arguments.callee,E}catch{try{return S(arguments,"callee").get}catch{return E}}}():E,M=ns()(),L=Dd(),k=$d(),O=Ld(),$=os(),C=is(),A={},P=typeof Uint8Array>"u"||!L?e:L(Uint8Array),D={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":M&&L?L([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&L?L(L([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!M||!L?e:L(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":i,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!M||!L?e:L(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&L?L(""[Symbol.iterator]()):e,"%Symbol%":M?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":j,"%TypedArray%":P,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":C,"%Function.prototype.apply%":$,"%Object.defineProperty%":T,"%Object.getPrototypeOf%":k,"%Math.abs%":u,"%Math.floor%":f,"%Math.max%":d,"%Math.min%":h,"%Math.pow%":p,"%Math.round%":m,"%Math.sign%":x,"%Reflect.getPrototypeOf%":O};if(L)try{null.error}catch(ie){var U=L(L(ie));D["%Error.prototype%"]=U}var H=function ie(F){var G;if(F==="%AsyncFunction%")G=y("async function () {}");else if(F==="%GeneratorFunction%")G=y("function* () {}");else if(F==="%AsyncGeneratorFunction%")G=y("async function* () {}");else if(F==="%AsyncGenerator%"){var z=ie("%AsyncGeneratorFunction%");z&&(G=z.prototype)}else if(F==="%AsyncIteratorPrototype%"){var J=ie("%AsyncGenerator%");J&&L&&(G=L(J.prototype))}return D[F]=G,G},K={__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"]},te=Tr(),ne=ss(),ve=te.call(C,Array.prototype.concat),ge=te.call($,Array.prototype.splice),Le=te.call(C,String.prototype.replace),$e=te.call(C,String.prototype.slice),I=te.call(C,RegExp.prototype.exec),_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,X=/\\(\\)?/g,V=function(F){var G=$e(F,0,1),z=$e(F,-1);if(G==="%"&&z!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(z==="%"&&G!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var J=[];return Le(F,_,function(xe,ye,be,Se){J[J.length]=be?Le(Se,X,"$1"):ye||xe}),J},ee=function(F,G){var z=F,J;if(ne(K,z)&&(J=K[z],z="%"+J[0]+"%"),ne(D,z)){var xe=D[z];if(xe===A&&(xe=H(z)),typeof xe>"u"&&!G)throw new s("intrinsic "+F+" exists, but is not available. Please file an issue!");return{alias:J,name:z,value:xe}}throw new a("intrinsic "+F+" does not exist!")};return Xi=function(F,G){if(typeof F!="string"||F.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof G!="boolean")throw new s('"allowMissing" argument must be a boolean');if(I(/^%?[^%]*%?$/,F)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var z=V(F),J=z.length>0?z[0]:"",xe=ee("%"+J+"%",G),ye=xe.name,be=xe.value,Se=!1,Ce=xe.alias;Ce&&(J=Ce[0],ge(z,ve([0,1],Ce)));for(var Ke=1,_e=!0;Ke<z.length;Ke+=1){var je=z[Ke],Xe=$e(je,0,1),Ye=$e(je,-1);if((Xe==='"'||Xe==="'"||Xe==="`"||Ye==='"'||Ye==="'"||Ye==="`")&&Xe!==Ye)throw new a("property names with quotes must have matching quotes");if((je==="constructor"||!_e)&&(Se=!0),J+="."+je,ye="%"+J+"%",ne(D,ye))be=D[ye];else if(be!=null){if(!(je in be)){if(!G)throw new s("base intrinsic for "+F+" exists, but the property is not available.");return}if(S&&Ke+1>=z.length){var Je=S(be,je);_e=!!Je,_e&&"get"in Je&&!("originalValue"in Je.get)?be=Je.get:be=be[je]}else _e=ne(be,je),be=be[je];_e&&!Se&&(D[ye]=be)}}return be},Xi}var Yi,Jc;function Xv(){if(Jc)return Yi;Jc=1;var e=at(),t=es(),r=ts()(),n=Rt(),i=Me(),o=e("%Math.floor%");return Yi=function(s,l){if(typeof s!="function")throw new i("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||o(l)!==l)throw new i("`length` must be a positive 32-bit integer");var u=arguments.length>2&&!!arguments[2],f=!0,d=!0;if("length"in s&&n){var h=n(s,"length");h&&!h.configurable&&(f=!1),h&&!h.writable&&(d=!1)}return(f||d||!u)&&(r?t(s,"length",l,!0,!0):t(s,"length",l)),s},Yi}var Ji,Zc;function Yv(){if(Zc)return Ji;Zc=1;var e=Tr(),t=os(),r=_d();return Ji=function(){return r(e,t,arguments)},Ji}var Qc;function Kt(){return Qc||(Qc=1,function(e){var t=Xv(),r=Mn(),n=as(),i=Yv();e.exports=function(a){var s=n(arguments),l=a.length-(arguments.length-1);return t(s,1+(l>0?l:0),!0)},r?r(e.exports,"apply",{value:i}):e.exports.apply=i}(bi)),bi.exports}var Zi,el;function Ae(){if(el)return Zi;el=1;var e=at(),t=as(),r=t([e("%String.prototype.indexOf%")]);return Zi=function(i,o){var a=e(i,!!o);return typeof a=="function"&&r(i,".prototype.")>-1?t([a]):a},Zi}var Qi,tl;function Bd(){if(tl)return Qi;tl=1;var e=Za(),t=Ln()(),r=Ae(),n=rs(),i=r("Array.prototype.push"),o=r("Object.prototype.propertyIsEnumerable"),a=t?n.getOwnPropertySymbols:null;return Qi=function(l,u){if(l==null)throw new TypeError("target must be an object");var f=n(l);if(arguments.length===1)return f;for(var d=1;d<arguments.length;++d){var h=n(arguments[d]),p=e(h),m=t&&(n.getOwnPropertySymbols||a);if(m)for(var x=m(h),g=0;g<x.length;++g){var y=x[g];o(h,y)&&i(p,y)}for(var S=0;S<p.length;++S){var T=p[S];if(o(h,T)){var E=h[T];f[T]=E}}}return f},Qi}var eo,rl;function zd(){if(rl)return eo;rl=1;var e=Bd(),t=function(){if(!Object.assign)return!1;for(var n="abcdefghijklmnopqrst",i=n.split(""),o={},a=0;a<i.length;++a)o[i[a]]=i[a];var s=Object.assign({},o),l="";for(var u in s)l+=u;return n!==l},r=function(){if(!Object.assign||!Object.preventExtensions)return!1;var n=Object.preventExtensions({1:2});try{Object.assign(n,"xy")}catch{return n[1]==="y"}return!1};return eo=function(){return!Object.assign||t()||r()?e:Object.assign},eo}var to,nl;function Jv(){if(nl)return to;nl=1;var e=Pt(),t=zd();return to=function(){var n=t();return e(Object,{assign:n},{assign:function(){return Object.assign!==n}}),n},to}var ro,il;function Zv(){if(il)return ro;il=1;var e=Pt(),t=Kt(),r=Bd(),n=zd(),i=Jv(),o=t.apply(n()),a=function(l,u){return o(Object,arguments)};return e(a,{getPolyfill:n,implementation:r,shim:i}),ro=a,ro}var no,ol;function Hd(){if(ol)return no;ol=1;var e=at(),t=Kt(),r=t(e("String.prototype.indexOf"));return no=function(i,o){var a=e(i,!!o);return typeof a=="function"&&r(i,".prototype.")>-1?t(a):a},no}var io,al;function Qv(){if(al)return io;al=1;var e=function(){return typeof(function(){}).name=="string"},t=Object.getOwnPropertyDescriptor;if(t)try{t([],"length")}catch{t=null}e.functionsHaveConfigurableNames=function(){if(!e()||!t)return!1;var i=t(function(){},"name");return!!i&&!!i.configurable};var r=Function.prototype.bind;return e.boundFunctionsHaveNames=function(){return e()&&typeof r=="function"&&(function(){}).bind().name!==""},io=e,io}var oo,sl;function ey(){if(sl)return oo;sl=1;var e=es(),t=ts()(),r=Qv().functionsHaveConfigurableNames(),n=Me();return oo=function(o,a){if(typeof o!="function")throw new n("`fn` is not a function");var s=arguments.length>2&&!!arguments[2];return(!s||r)&&(t?e(o,"name",a,!0,!0):e(o,"name",a)),o},oo}var ao,cl;function qd(){if(cl)return ao;cl=1;var e=ey(),t=Me(),r=Object;return ao=e(function(){if(this==null||this!==r(this))throw new t("RegExp.prototype.flags getter called on non-object");var i="";return this.hasIndices&&(i+="d"),this.global&&(i+="g"),this.ignoreCase&&(i+="i"),this.multiline&&(i+="m"),this.dotAll&&(i+="s"),this.unicode&&(i+="u"),this.unicodeSets&&(i+="v"),this.sticky&&(i+="y"),i},"get flags",!0),ao}var so,ll;function Fd(){if(ll)return so;ll=1;var e=qd(),t=Pt().supportsDescriptors,r=Object.getOwnPropertyDescriptor;return so=function(){if(t&&/a/mig.flags==="gim"){var i=r(RegExp.prototype,"flags");if(i&&typeof i.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var o="",a={};if(Object.defineProperty(a,"hasIndices",{get:function(){o+="d"}}),Object.defineProperty(a,"sticky",{get:function(){o+="y"}}),i.get.call(a),o==="dy")return i.get}}return e},so}var co,ul;function ty(){if(ul)return co;ul=1;var e=Pt().supportsDescriptors,t=Fd(),r=Rt(),n=Object.defineProperty,i=Md(),o=Dd(),a=/a/;return co=function(){if(!e||!o)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var l=t(),u=o(a),f=r(u,"flags");return(!f||f.get!==l)&&n(u,"flags",{configurable:!0,enumerable:!1,get:l}),l},co}var lo,dl;function ry(){if(dl)return lo;dl=1;var e=Pt(),t=Kt(),r=qd(),n=Fd(),i=ty(),o=t(n());return e(o,{getPolyfill:n,implementation:r,shim:i}),lo=o,lo}var tr={exports:{}},uo,fl;function Ot(){if(fl)return uo;fl=1;var e=Ln();return uo=function(){return e()&&!!Symbol.toStringTag},uo}var fo,hl;function Ud(){if(hl)return fo;hl=1;var e=Ot()(),t=Ae(),r=t("Object.prototype.toString"),n=function(s){return e&&s&&typeof s=="object"&&Symbol.toStringTag in s?!1:r(s)==="[object Arguments]"},i=function(s){return n(s)?!0:s!==null&&typeof s=="object"&&"length"in s&&typeof s.length=="number"&&s.length>=0&&r(s)!=="[object Array]"&&"callee"in s&&r(s.callee)==="[object Function]"},o=function(){return n(arguments)}();return n.isLegacyArguments=i,fo=o?n:i,fo}const ny={},iy=Object.freeze(Object.defineProperty({__proto__:null,default:ny},Symbol.toStringTag,{value:"Module"})),oy=kd(iy);var ho,pl;function $n(){if(pl)return ho;pl=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&typeof t.get=="function"?t.get:null,n=e&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,o=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=i&&o&&typeof o.get=="function"?o.get:null,s=i&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,u=l?WeakMap.prototype.has:null,f=typeof WeakSet=="function"&&WeakSet.prototype,d=f?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,p=h?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,x=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,S=String.prototype.slice,T=String.prototype.replace,E=String.prototype.toUpperCase,j=String.prototype.toLowerCase,M=RegExp.prototype.test,L=Array.prototype.concat,k=Array.prototype.join,O=Array.prototype.slice,$=Math.floor,C=typeof BigInt=="function"?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,D=typeof Symbol=="function"&&typeof Symbol.iterator=="object",U=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===D||!0)?Symbol.toStringTag:null,H=Object.prototype.propertyIsEnumerable,K=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(v){return v.__proto__}:null);function te(v,b){if(v===1/0||v===-1/0||v!==v||v&&v>-1e3&&v<1e3||M.call(/e/,b))return b;var ae=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof v=="number"){var se=v<0?-$(-v):$(v);if(se!==v){var ce=String(se),Q=S.call(b,ce.length+1);return T.call(ce,ae,"$&_")+"."+T.call(T.call(Q,/([0-9]{3})/g,"$&_"),/_$/,"")}}return T.call(b,ae,"$&_")}var ne=oy,ve=ne.custom,ge=xe(ve)?ve:null,Le={__proto__:null,double:'"',single:"'"},$e={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ho=function v(b,ae,se,ce){var Q=ae||{};if(Se(Q,"quoteStyle")&&!Se(Le,Q.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(Q,"maxStringLength")&&(typeof Q.maxStringLength=="number"?Q.maxStringLength<0&&Q.maxStringLength!==1/0:Q.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var lt=Se(Q,"customInspect")?Q.customInspect:!0;if(typeof lt!="boolean"&&lt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(Q,"indent")&&Q.indent!==null&&Q.indent!==" "&&!(parseInt(Q.indent,10)===Q.indent&&Q.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(Q,"numericSeparator")&&typeof Q.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var bt=Q.numericSeparator;if(typeof b>"u")return"undefined";if(b===null)return"null";if(typeof b=="boolean")return b?"true":"false";if(typeof b=="string")return kt(b,Q);if(typeof b=="number"){if(b===0)return 1/0/b>0?"0":"-0";var Ie=String(b);return bt?te(b,Ie):Ie}if(typeof b=="bigint"){var ut=String(b)+"n";return bt?te(b,ut):ut}var Bn=typeof Q.depth>"u"?5:Q.depth;if(typeof se>"u"&&(se=0),se>=Bn&&Bn>0&&typeof b=="object")return V(b)?"[Array]":"[Object]";var Nt=uf(Q,se);if(typeof ce>"u")ce=[];else if(_e(ce,b)>=0)return"[Circular]";function De(Mt,Pr,ff){if(Pr&&(ce=O.call(ce),ce.push(Pr)),ff){var xs={depth:Q.depth};return Se(Q,"quoteStyle")&&(xs.quoteStyle=Q.quoteStyle),v(Mt,xs,se+1,ce)}return v(Mt,Q,se+1,ce)}if(typeof b=="function"&&!ie(b)){var us=Ke(b),ds=Ir(b,De);return"[Function"+(us?": "+us:" (anonymous)")+"]"+(ds.length>0?" { "+k.call(ds,", ")+" }":"")}if(xe(b)){var fs=D?T.call(String(b),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(b);return typeof b=="object"&&!D?ct(fs):fs}if(st(b)){for(var Yt="<"+j.call(String(b.nodeName)),zn=b.attributes||[],Rr=0;Rr<zn.length;Rr++)Yt+=" "+zn[Rr].name+"="+I(_(zn[Rr].value),"double",Q);return Yt+=">",b.childNodes&&b.childNodes.length&&(Yt+="..."),Yt+="</"+j.call(String(b.nodeName))+">",Yt}if(V(b)){if(b.length===0)return"[]";var Hn=Ir(b,De);return Nt&&!lf(Hn)?"["+Dn(Hn,Nt)+"]":"[ "+k.call(Hn,", ")+" ]"}if(F(b)){var qn=Ir(b,De);return!("cause"in Error.prototype)&&"cause"in b&&!H.call(b,"cause")?"{ ["+String(b)+"] "+k.call(L.call("[cause]: "+De(b.cause),qn),", ")+" }":qn.length===0?"["+String(b)+"]":"{ ["+String(b)+"] "+k.call(qn,", ")+" }"}if(typeof b=="object"&&lt){if(ge&&typeof b[ge]=="function"&&ne)return ne(b,{depth:Bn-se});if(lt!=="symbol"&&typeof b.inspect=="function")return b.inspect()}if(je(b)){var hs=[];return n&&n.call(b,function(Mt,Pr){hs.push(De(Pr,b,!0)+" => "+De(Mt,b))}),ls("Map",r.call(b),hs,Nt)}if(Je(b)){var ps=[];return s&&s.call(b,function(Mt){ps.push(De(Mt,b))}),ls("Set",a.call(b),ps,Nt)}if(Xe(b))return _n("WeakMap");if(Er(b))return _n("WeakSet");if(Ye(b))return _n("WeakRef");if(z(b))return ct(De(Number(b)));if(ye(b))return ct(De(C.call(b)));if(J(b))return ct(m.call(b));if(G(b))return ct(De(String(b)));if(typeof window<"u"&&b===window)return"{ [object Window] }";if(typeof globalThis<"u"&&b===globalThis||typeof wr<"u"&&b===wr)return"{ [object globalThis] }";if(!ee(b)&&!ie(b)){var Fn=Ir(b,De),ms=K?K(b)===Object.prototype:b instanceof Object||b.constructor===Object,Un=b instanceof Object?"":"null prototype",gs=!ms&&U&&Object(b)===b&&U in b?S.call(Ce(b),8,-1):Un?"Object":"",df=ms||typeof b.constructor!="function"?"":b.constructor.name?b.constructor.name+" ":"",Wn=df+(gs||Un?"["+k.call(L.call([],gs||[],Un||[]),": ")+"] ":"");return Fn.length===0?Wn+"{}":Nt?Wn+"{"+Dn(Fn,Nt)+"}":Wn+"{ "+k.call(Fn,", ")+" }"}return String(b)};function I(v,b,ae){var se=ae.quoteStyle||b,ce=Le[se];return ce+v+ce}function _(v){return T.call(String(v),/"/g,"&quot;")}function X(v){return!U||!(typeof v=="object"&&(U in v||typeof v[U]<"u"))}function V(v){return Ce(v)==="[object Array]"&&X(v)}function ee(v){return Ce(v)==="[object Date]"&&X(v)}function ie(v){return Ce(v)==="[object RegExp]"&&X(v)}function F(v){return Ce(v)==="[object Error]"&&X(v)}function G(v){return Ce(v)==="[object String]"&&X(v)}function z(v){return Ce(v)==="[object Number]"&&X(v)}function J(v){return Ce(v)==="[object Boolean]"&&X(v)}function xe(v){if(D)return v&&typeof v=="object"&&v instanceof Symbol;if(typeof v=="symbol")return!0;if(!v||typeof v!="object"||!P)return!1;try{return P.call(v),!0}catch{}return!1}function ye(v){if(!v||typeof v!="object"||!C)return!1;try{return C.call(v),!0}catch{}return!1}var be=Object.prototype.hasOwnProperty||function(v){return v in this};function Se(v,b){return be.call(v,b)}function Ce(v){return x.call(v)}function Ke(v){if(v.name)return v.name;var b=y.call(g.call(v),/^function\s*([\w$]+)/);return b?b[1]:null}function _e(v,b){if(v.indexOf)return v.indexOf(b);for(var ae=0,se=v.length;ae<se;ae++)if(v[ae]===b)return ae;return-1}function je(v){if(!r||!v||typeof v!="object")return!1;try{r.call(v);try{a.call(v)}catch{return!0}return v instanceof Map}catch{}return!1}function Xe(v){if(!u||!v||typeof v!="object")return!1;try{u.call(v,u);try{d.call(v,d)}catch{return!0}return v instanceof WeakMap}catch{}return!1}function Ye(v){if(!p||!v||typeof v!="object")return!1;try{return p.call(v),!0}catch{}return!1}function Je(v){if(!a||!v||typeof v!="object")return!1;try{a.call(v);try{r.call(v)}catch{return!0}return v instanceof Set}catch{}return!1}function Er(v){if(!d||!v||typeof v!="object")return!1;try{d.call(v,d);try{u.call(v,u)}catch{return!0}return v instanceof WeakSet}catch{}return!1}function st(v){return!v||typeof v!="object"?!1:typeof HTMLElement<"u"&&v instanceof HTMLElement?!0:typeof v.nodeName=="string"&&typeof v.getAttribute=="function"}function kt(v,b){if(v.length>b.maxStringLength){var ae=v.length-b.maxStringLength,se="... "+ae+" more character"+(ae>1?"s":"");return kt(S.call(v,0,b.maxStringLength),b)+se}var ce=$e[b.quoteStyle||"single"];ce.lastIndex=0;var Q=T.call(T.call(v,ce,"\\$1"),/[\x00-\x1f]/g,Xt);return I(Q,"single",b)}function Xt(v){var b=v.charCodeAt(0),ae={8:"b",9:"t",10:"n",12:"f",13:"r"}[b];return ae?"\\"+ae:"\\x"+(b<16?"0":"")+E.call(b.toString(16))}function ct(v){return"Object("+v+")"}function _n(v){return v+" { ? }"}function ls(v,b,ae,se){var ce=se?Dn(ae,se):k.call(ae,", ");return v+" ("+b+") {"+ce+"}"}function lf(v){for(var b=0;b<v.length;b++)if(_e(v[b],`
6
- `)>=0)return!1;return!0}function uf(v,b){var ae;if(v.indent===" ")ae=" ";else if(typeof v.indent=="number"&&v.indent>0)ae=k.call(Array(v.indent+1)," ");else return null;return{base:ae,prev:k.call(Array(b+1),ae)}}function Dn(v,b){if(v.length===0)return"";var ae=`
7
- `+b.prev+b.base;return ae+k.call(v,","+ae)+`
8
- `+b.prev}function Ir(v,b){var ae=V(v),se=[];if(ae){se.length=v.length;for(var ce=0;ce<v.length;ce++)se[ce]=Se(v,ce)?b(v[ce],v):""}var Q=typeof A=="function"?A(v):[],lt;if(D){lt={};for(var bt=0;bt<Q.length;bt++)lt["$"+Q[bt]]=Q[bt]}for(var Ie in v)Se(v,Ie)&&(ae&&String(Number(Ie))===Ie&&Ie<v.length||D&&lt["$"+Ie]instanceof Symbol||(M.call(/[^\w$]/,Ie)?se.push(b(Ie,v)+": "+b(v[Ie],v)):se.push(Ie+": "+b(v[Ie],v))));if(typeof A=="function")for(var ut=0;ut<Q.length;ut++)H.call(v,Q[ut])&&se.push("["+b(Q[ut])+"]: "+b(v[Q[ut]],v));return se}return ho}var po,ml;function ay(){if(ml)return po;ml=1;var e=$n(),t=Me(),r=function(s,l,u){for(var f=s,d;(d=f.next)!=null;f=d)if(d.key===l)return f.next=d.next,u||(d.next=s.next,s.next=d),d},n=function(s,l){if(s){var u=r(s,l);return u&&u.value}},i=function(s,l,u){var f=r(s,l);f?f.value=u:s.next={key:l,next:s.next,value:u}},o=function(s,l){return s?!!r(s,l):!1},a=function(s,l){if(s)return r(s,l,!0)};return po=function(){var l,u={assert:function(f){if(!u.has(f))throw new t("Side channel does not contain "+e(f))},delete:function(f){var d=l&&l.next,h=a(l,f);return h&&d&&d===h&&(l=void 0),!!h},get:function(f){return n(l,f)},has:function(f){return o(l,f)},set:function(f,d){l||(l={next:void 0}),i(l,f,d)}};return u},po}var mo,gl;function Wd(){if(gl)return mo;gl=1;var e=at(),t=Ae(),r=$n(),n=Me(),i=e("%Map%",!0),o=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),u=t("Map.prototype.size",!0);return mo=!!i&&function(){var d,h={assert:function(p){if(!h.has(p))throw new n("Side channel does not contain "+r(p))},delete:function(p){if(d){var m=l(d,p);return u(d)===0&&(d=void 0),m}return!1},get:function(p){if(d)return o(d,p)},has:function(p){return d?s(d,p):!1},set:function(p,m){d||(d=new i),a(d,p,m)}};return h},mo}var go,xl;function sy(){if(xl)return go;xl=1;var e=at(),t=Ae(),r=$n(),n=Wd(),i=Me(),o=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),u=t("WeakMap.prototype.delete",!0);return go=o?function(){var d,h,p={assert:function(m){if(!p.has(m))throw new i("Side channel does not contain "+r(m))},delete:function(m){if(o&&m&&(typeof m=="object"||typeof m=="function")){if(d)return u(d,m)}else if(n&&h)return h.delete(m);return!1},get:function(m){return o&&m&&(typeof m=="object"||typeof m=="function")&&d?a(d,m):h&&h.get(m)},has:function(m){return o&&m&&(typeof m=="object"||typeof m=="function")&&d?l(d,m):!!h&&h.has(m)},set:function(m,x){o&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new o),s(d,m,x)):n&&(h||(h=n()),h.set(m,x))}};return p}:n,go}var xo,vl;function Gd(){if(vl)return xo;vl=1;var e=Me(),t=$n(),r=ay(),n=Wd(),i=sy(),o=i||n||r;return xo=function(){var s,l={assert:function(u){if(!l.has(u))throw new e("Side channel does not contain "+t(u))},delete:function(u){return!!s&&s.delete(u)},get:function(u){return s&&s.get(u)},has:function(u){return!!s&&s.has(u)},set:function(u,f){s||(s=o()),s.set(u,f)}};return l},xo}var vo,yl;function cy(){if(yl)return vo;yl=1;var e=ss(),t=Gd()(),r=Me(),n={assert:function(i,o){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`O` is not an object");if(typeof o!="string")throw new r("`slot` must be a string");if(t.assert(i),!n.has(i,o))throw new r("`"+o+"` is not present on `O`")},get:function(i,o){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`O` is not an object");if(typeof o!="string")throw new r("`slot` must be a string");var a=t.get(i);return a&&a["$"+o]},has:function(i,o){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`O` is not an object");if(typeof o!="string")throw new r("`slot` must be a string");var a=t.get(i);return!!a&&e(a,"$"+o)},set:function(i,o,a){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`O` is not an object");if(typeof o!="string")throw new r("`slot` must be a string");var s=t.get(i);s||(s={},t.set(i,s)),s["$"+o]=a}};return Object.freeze&&Object.freeze(n),vo=n,vo}var yo,bl;function ly(){if(bl)return yo;bl=1;var e=cy(),t=Qa(),r=typeof StopIteration=="object"?StopIteration:null;return yo=function(i){if(!r)throw new t("this environment lacks StopIteration");e.set(i,"[[Done]]",!1);var o={next:function(){var s=e.get(this,"[[Iterator]]"),l=!!e.get(s,"[[Done]]");try{return{done:l,value:l?void 0:s.next()}}catch(u){if(e.set(s,"[[Done]]",!0),u!==r)throw u;return{done:!0,value:void 0}}}};return e.set(o,"[[Iterator]]",i),o},yo}var bo,wl;function Vd(){if(wl)return bo;wl=1;var e={}.toString;return bo=Array.isArray||function(t){return e.call(t)=="[object Array]"},bo}var wo,Sl;function Kd(){if(Sl)return wo;Sl=1;var e=Ae(),t=e("String.prototype.valueOf"),r=function(s){try{return t(s),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object String]",o=Ot()();return wo=function(s){return typeof s=="string"?!0:!s||typeof s!="object"?!1:o?r(s):n(s)===i},wo}var So,Al;function Xd(){if(Al)return So;Al=1;var e=typeof Map=="function"&&Map.prototype?Map:null,t=typeof Set=="function"&&Set.prototype?Set:null,r;e||(r=function(a){return!1});var n=e?Map.prototype.has:null,i=t?Set.prototype.has:null;return!r&&!n&&(r=function(a){return!1}),So=r||function(a){if(!a||typeof a!="object")return!1;try{if(n.call(a),i)try{i.call(a)}catch{return!0}return a instanceof e}catch{}return!1},So}var Ao,Cl;function Yd(){if(Cl)return Ao;Cl=1;var e=typeof Map=="function"&&Map.prototype?Map:null,t=typeof Set=="function"&&Set.prototype?Set:null,r;t||(r=function(a){return!1});var n=e?Map.prototype.has:null,i=t?Set.prototype.has:null;return!r&&!i&&(r=function(a){return!1}),Ao=r||function(a){if(!a||typeof a!="object")return!1;try{if(i.call(a),n)try{n.call(a)}catch{return!0}return a instanceof t}catch{}return!1},Ao}var jl;function uy(){if(jl)return tr.exports;jl=1;var e=Ud(),t=ly();if(ns()()||Ln()()){var r=Symbol.iterator;tr.exports=function(O){if(O!=null&&typeof O[r]<"u")return O[r]();if(e(O))return Array.prototype[r].call(O)}}else{var n=Vd(),i=Kd(),o=at(),a=o("%Map%",!0),s=o("%Set%",!0),l=Hd(),u=l("Array.prototype.push"),f=l("String.prototype.charCodeAt"),d=l("String.prototype.slice"),h=function(O,$){var C=O.length;if($+1>=C)return $+1;var A=f(O,$);if(A<55296||A>56319)return $+1;var P=f(O,$+1);return P<56320||P>57343?$+1:$+2},p=function(O){var $=0;return{next:function(){var A=$>=O.length,P;return A||(P=O[$],$+=1),{done:A,value:P}}}},m=function(O,$){if(n(O)||e(O))return p(O);if(i(O)){var C=0;return{next:function(){var P=h(O,C),D=d(O,C,P);return C=P,{done:P>O.length,value:D}}}}if($&&typeof O["_es6-shim iterator_"]<"u")return O["_es6-shim iterator_"]()};if(!a&&!s)tr.exports=function(O){if(O!=null)return m(O,!0)};else{var x=Xd(),g=Yd(),y=l("Map.prototype.forEach",!0),S=l("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var T=l("Map.prototype.iterator",!0),E=l("Set.prototype.iterator",!0);var j=l("Map.prototype.@@iterator",!0)||l("Map.prototype._es6-shim iterator_",!0),M=l("Set.prototype.@@iterator",!0)||l("Set.prototype._es6-shim iterator_",!0),L=function(O){if(x(O)){if(T)return t(T(O));if(j)return j(O);if(y){var $=[];return y(O,function(A,P){u($,[P,A])}),p($)}}if(g(O)){if(E)return t(E(O));if(M)return M(O);if(S){var C=[];return S(O,function(A){u(C,A)}),p(C)}}};tr.exports=function(O){return L(O)||m(O)}}}return tr.exports}var Co,Tl;function Jd(){if(Tl)return Co;Tl=1;var e=function(t){return t!==t};return Co=function(r,n){return r===0&&n===0?1/r===1/n:!!(r===n||e(r)&&e(n))},Co}var jo,El;function Zd(){if(El)return jo;El=1;var e=Jd();return jo=function(){return typeof Object.is=="function"?Object.is:e},jo}var To,Il;function dy(){if(Il)return To;Il=1;var e=Zd(),t=Pt();return To=function(){var n=e();return t(Object,{is:n},{is:function(){return Object.is!==n}}),n},To}var Eo,Rl;function fy(){if(Rl)return Eo;Rl=1;var e=Pt(),t=Kt(),r=Jd(),n=Zd(),i=dy(),o=t(n(),Object);return e(o,{getPolyfill:n,implementation:r,shim:i}),Eo=o,Eo}var Io,Pl;function Qd(){if(Pl)return Io;Pl=1;var e=Kt(),t=Ae(),r=at(),n=r("%ArrayBuffer%",!0),i=t("ArrayBuffer.prototype.byteLength",!0),o=t("Object.prototype.toString"),a=!!n&&!i&&new n(0).slice,s=!!a&&e(a);return Io=i||s?function(u){if(!u||typeof u!="object")return!1;try{return i?i(u):s(u,0),!0}catch{return!1}}:n?function(u){return o(u)==="[object ArrayBuffer]"}:function(u){return!1},Io}var Ro,Ol;function hy(){if(Ol)return Ro;Ol=1;var e=Ae(),t=e("Date.prototype.getDay"),r=function(s){try{return t(s),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object Date]",o=Ot()();return Ro=function(s){return typeof s!="object"||s===null?!1:o?r(s):n(s)===i},Ro}var Po,kl;function ef(){if(kl)return Po;kl=1;var e=Ae(),t=Ot()(),r=ss(),n=Rt(),i;if(t){var o=e("RegExp.prototype.exec"),a={},s=function(){throw a},l={toString:s,valueOf:s};typeof Symbol.toPrimitive=="symbol"&&(l[Symbol.toPrimitive]=s),i=function(h){if(!h||typeof h!="object")return!1;var p=n(h,"lastIndex"),m=p&&r(p,"value");if(!m)return!1;try{o(h,l)}catch(x){return x===a}}}else{var u=e("Object.prototype.toString"),f="[object RegExp]";i=function(h){return!h||typeof h!="object"&&typeof h!="function"?!1:u(h)===f}}return Po=i,Po}var Oo,Nl;function py(){if(Nl)return Oo;Nl=1;var e=Ae(),t=e("SharedArrayBuffer.prototype.byteLength",!0);return Oo=t?function(n){if(!n||typeof n!="object")return!1;try{return t(n),!0}catch{return!1}}:function(n){return!1},Oo}var ko,Ml;function my(){if(Ml)return ko;Ml=1;var e=Ae(),t=e("Number.prototype.toString"),r=function(s){try{return t(s),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object Number]",o=Ot()();return ko=function(s){return typeof s=="number"?!0:!s||typeof s!="object"?!1:o?r(s):n(s)===i},ko}var No,Ll;function gy(){if(Ll)return No;Ll=1;var e=Ae(),t=e("Boolean.prototype.toString"),r=e("Object.prototype.toString"),n=function(s){try{return t(s),!0}catch{return!1}},i="[object Boolean]",o=Ot()();return No=function(s){return typeof s=="boolean"?!0:s===null||typeof s!="object"?!1:o?n(s):r(s)===i},No}var zr={exports:{}},Mo,$l;function xy(){if($l)return Mo;$l=1;var e=Ae(),t=ef(),r=e("RegExp.prototype.exec"),n=Me();return Mo=function(o){if(!t(o))throw new n("`regex` must be a RegExp");return function(s){return r(o,s)!==null}},Mo}var _l;function vy(){if(_l)return zr.exports;_l=1;var e=Ae(),t=e("Object.prototype.toString"),r=ns()(),n=xy();if(r){var i=e("Symbol.prototype.toString"),o=n(/^Symbol\(.*\)$/),a=function(l){return typeof l.valueOf()!="symbol"?!1:o(i(l))};zr.exports=function(l){if(typeof l=="symbol")return!0;if(!l||typeof l!="object"||t(l)!=="[object Symbol]")return!1;try{return a(l)}catch{return!1}}}else zr.exports=function(l){return!1};return zr.exports}var Hr={exports:{}},Lo,Dl;function yy(){if(Dl)return Lo;Dl=1;var e=typeof BigInt<"u"&&BigInt;return Lo=function(){return typeof e=="function"&&typeof BigInt=="function"&&typeof e(42)=="bigint"&&typeof BigInt(42)=="bigint"},Lo}var Bl;function by(){if(Bl)return Hr.exports;Bl=1;var e=yy()();if(e){var t=BigInt.prototype.valueOf,r=function(i){try{return t.call(i),!0}catch{}return!1};Hr.exports=function(i){return i===null||typeof i>"u"||typeof i=="boolean"||typeof i=="string"||typeof i=="number"||typeof i=="symbol"||typeof i=="function"?!1:typeof i=="bigint"?!0:r(i)}}else Hr.exports=function(i){return!1};return Hr.exports}var $o,zl;function wy(){if(zl)return $o;zl=1;var e=Kd(),t=my(),r=gy(),n=vy(),i=by();return $o=function(a){if(a==null||typeof a!="object"&&typeof a!="function")return null;if(e(a))return"String";if(t(a))return"Number";if(r(a))return"Boolean";if(n(a))return"Symbol";if(i(a))return"BigInt"},$o}var _o,Hl;function Sy(){if(Hl)return _o;Hl=1;var e=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,t=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,r;e||(r=function(a){return!1});var n=e?e.prototype.has:null,i=t?t.prototype.has:null;return!r&&!n&&(r=function(a){return!1}),_o=r||function(a){if(!a||typeof a!="object")return!1;try{if(n.call(a,n),i)try{i.call(a,i)}catch{return!0}return a instanceof e}catch{}return!1},_o}var qr={exports:{}},ql;function Ay(){if(ql)return qr.exports;ql=1;var e=at(),t=Ae(),r=e("%WeakSet%",!0),n=t("WeakSet.prototype.has",!0);if(n){var i=t("WeakMap.prototype.has",!0);qr.exports=function(a){if(!a||typeof a!="object")return!1;try{if(n(a,n),i)try{i(a,i)}catch{return!0}return a instanceof r}catch{}return!1}}else qr.exports=function(a){return!1};return qr.exports}var Do,Fl;function Cy(){if(Fl)return Do;Fl=1;var e=Xd(),t=Yd(),r=Sy(),n=Ay();return Do=function(o){if(o&&typeof o=="object"){if(e(o))return"Map";if(t(o))return"Set";if(r(o))return"WeakMap";if(n(o))return"WeakSet"}return!1},Do}var Bo,Ul;function jy(){if(Ul)return Bo;Ul=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,r,n;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},t(function(){throw 42},null,r)}catch(S){S!==n&&(t=null)}else t=null;var i=/^\s*class\b/,o=function(T){try{var E=e.call(T);return i.test(E)}catch{return!1}},a=function(T){try{return o(T)?!1:(e.call(T),!0)}catch{return!1}},s=Object.prototype.toString,l="[object Object]",u="[object Function]",f="[object GeneratorFunction]",d="[object HTMLAllCollection]",h="[object HTML document.all class]",p="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,x=!(0 in[,]),g=function(){return!1};if(typeof document=="object"){var y=document.all;s.call(y)===s.call(document.all)&&(g=function(T){if((x||!T)&&(typeof T>"u"||typeof T=="object"))try{var E=s.call(T);return(E===d||E===h||E===p||E===l)&&T("")==null}catch{}return!1})}return Bo=t?function(T){if(g(T))return!0;if(!T||typeof T!="function"&&typeof T!="object")return!1;try{t(T,null,r)}catch(E){if(E!==n)return!1}return!o(T)&&a(T)}:function(T){if(g(T))return!0;if(!T||typeof T!="function"&&typeof T!="object")return!1;if(m)return a(T);if(o(T))return!1;var E=s.call(T);return E!==u&&E!==f&&!/^\[object HTML/.test(E)?!1:a(T)},Bo}var zo,Wl;function Ty(){if(Wl)return zo;Wl=1;var e=jy(),t=Object.prototype.toString,r=Object.prototype.hasOwnProperty,n=function(l,u,f){for(var d=0,h=l.length;d<h;d++)r.call(l,d)&&(f==null?u(l[d],d,l):u.call(f,l[d],d,l))},i=function(l,u,f){for(var d=0,h=l.length;d<h;d++)f==null?u(l.charAt(d),d,l):u.call(f,l.charAt(d),d,l)},o=function(l,u,f){for(var d in l)r.call(l,d)&&(f==null?u(l[d],d,l):u.call(f,l[d],d,l))};function a(s){return t.call(s)==="[object Array]"}return zo=function(l,u,f){if(!e(u))throw new TypeError("iterator must be a function");var d;arguments.length>=3&&(d=f),a(l)?n(l,u,d):typeof l=="string"?i(l,u,d):o(l,u,d)},zo}var Ho,Gl;function Ey(){return Gl||(Gl=1,Ho=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Ho}var qo,Vl;function Iy(){if(Vl)return qo;Vl=1;var e=Ey(),t=typeof globalThis>"u"?wr:globalThis;return qo=function(){for(var n=[],i=0;i<e.length;i++)typeof t[e[i]]=="function"&&(n[n.length]=e[i]);return n},qo}var Fo,Kl;function Ry(){if(Kl)return Fo;Kl=1;var e=Ty(),t=Iy(),r=Kt(),n=Ae(),i=Rt(),o=n("Object.prototype.toString"),a=Ot()(),s=typeof globalThis>"u"?wr:globalThis,l=t(),u=n("String.prototype.slice"),f=Object.getPrototypeOf,d=n("Array.prototype.indexOf",!0)||function(g,y){for(var S=0;S<g.length;S+=1)if(g[S]===y)return S;return-1},h={__proto__:null};a&&i&&f?e(l,function(x){var g=new s[x];if(Symbol.toStringTag in g){var y=f(g),S=i(y,Symbol.toStringTag);if(!S){var T=f(y);S=i(T,Symbol.toStringTag)}h["$"+x]=r(S.get)}}):e(l,function(x){var g=new s[x],y=g.slice||g.set;y&&(h["$"+x]=r(y))});var p=function(g){var y=!1;return e(h,function(S,T){if(!y)try{"$"+S(g)===T&&(y=u(T,1))}catch{}}),y},m=function(g){var y=!1;return e(h,function(S,T){if(!y)try{S(g),y=u(T,1)}catch{}}),y};return Fo=function(g){if(!g||typeof g!="object")return!1;if(!a){var y=u(o(g),8,-1);return d(l,y)>-1?y:y!=="Object"?!1:m(g)}return i?p(g):null},Fo}var Uo,Xl;function Py(){if(Xl)return Uo;Xl=1;var e=Ae(),t=e("ArrayBuffer.prototype.byteLength",!0),r=Qd();return Uo=function(i){return r(i)?t?t(i):i.byteLength:NaN},Uo}var Wo,Yl;function Oy(){if(Yl)return Wo;Yl=1;var e=Zv(),t=Hd(),r=ry(),n=at(),i=uy(),o=Gd(),a=fy(),s=Ud(),l=Vd(),u=Qd(),f=hy(),d=ef(),h=py(),p=Za(),m=wy(),x=Cy(),g=Ry(),y=Py(),S=t("SharedArrayBuffer.prototype.byteLength",!0),T=t("Date.prototype.getTime"),E=Object.getPrototypeOf,j=t("Object.prototype.toString"),M=n("%Set%",!0),L=t("Map.prototype.has",!0),k=t("Map.prototype.get",!0),O=t("Map.prototype.size",!0),$=t("Set.prototype.add",!0),C=t("Set.prototype.delete",!0),A=t("Set.prototype.has",!0),P=t("Set.prototype.size",!0);function D(I,_,X,V){for(var ee=i(I),ie;(ie=ee.next())&&!ie.done;)if(ne(_,ie.value,X,V))return C(I,ie.value),!0;return!1}function U(I){if(typeof I>"u")return null;if(typeof I!="object")return typeof I=="symbol"?!1:typeof I=="string"||typeof I=="number"?+I==+I:!0}function H(I,_,X,V,ee,ie){var F=U(X);if(F!=null)return F;var G=k(_,F),z=e({},ee,{strict:!1});return typeof G>"u"&&!L(_,F)||!ne(V,G,z,ie)?!1:!L(I,F)&&ne(V,G,z,ie)}function K(I,_,X){var V=U(X);return V??(A(_,V)&&!A(I,V))}function te(I,_,X,V,ee,ie){for(var F=i(I),G,z;(G=F.next())&&!G.done;)if(z=G.value,ne(X,z,ee,ie)&&ne(V,k(_,z),ee,ie))return C(I,z),!0;return!1}function ne(I,_,X,V){var ee=X||{};if(ee.strict?a(I,_):I===_)return!0;var ie=m(I),F=m(_);if(ie!==F)return!1;if(!I||!_||typeof I!="object"&&typeof _!="object")return ee.strict?a(I,_):I==_;var G=V.has(I),z=V.has(_),J;if(G&&z){if(V.get(I)===V.get(_))return!0}else J={};return G||V.set(I,J),z||V.set(_,J),$e(I,_,ee,V)}function ve(I){return!I||typeof I!="object"||typeof I.length!="number"||typeof I.copy!="function"||typeof I.slice!="function"||I.length>0&&typeof I[0]!="number"?!1:!!(I.constructor&&I.constructor.isBuffer&&I.constructor.isBuffer(I))}function ge(I,_,X,V){if(P(I)!==P(_))return!1;for(var ee=i(I),ie=i(_),F,G,z;(F=ee.next())&&!F.done;)if(F.value&&typeof F.value=="object")z||(z=new M),$(z,F.value);else if(!A(_,F.value)){if(X.strict||!K(I,_,F.value))return!1;z||(z=new M),$(z,F.value)}if(z){for(;(G=ie.next())&&!G.done;)if(G.value&&typeof G.value=="object"){if(!D(z,G.value,X.strict,V))return!1}else if(!X.strict&&!A(I,G.value)&&!D(z,G.value,X.strict,V))return!1;return P(z)===0}return!0}function Le(I,_,X,V){if(O(I)!==O(_))return!1;for(var ee=i(I),ie=i(_),F,G,z,J,xe,ye;(F=ee.next())&&!F.done;)if(J=F.value[0],xe=F.value[1],J&&typeof J=="object")z||(z=new M),$(z,J);else if(ye=k(_,J),typeof ye>"u"&&!L(_,J)||!ne(xe,ye,X,V)){if(X.strict||!H(I,_,J,xe,X,V))return!1;z||(z=new M),$(z,J)}if(z){for(;(G=ie.next())&&!G.done;)if(J=G.value[0],ye=G.value[1],J&&typeof J=="object"){if(!te(z,I,J,ye,X,V))return!1}else if(!X.strict&&(!I.has(J)||!ne(k(I,J),ye,X,V))&&!te(z,I,J,ye,e({},X,{strict:!1}),V))return!1;return P(z)===0}return!0}function $e(I,_,X,V){var ee,ie;if(typeof I!=typeof _||I==null||_==null||j(I)!==j(_)||s(I)!==s(_))return!1;var F=l(I),G=l(_);if(F!==G)return!1;var z=I instanceof Error,J=_ instanceof Error;if(z!==J||(z||J)&&(I.name!==_.name||I.message!==_.message))return!1;var xe=d(I),ye=d(_);if(xe!==ye||(xe||ye)&&(I.source!==_.source||r(I)!==r(_)))return!1;var be=f(I),Se=f(_);if(be!==Se||(be||Se)&&T(I)!==T(_)||X.strict&&E&&E(I)!==E(_))return!1;var Ce=g(I),Ke=g(_);if(Ce!==Ke)return!1;if(Ce||Ke){if(I.length!==_.length)return!1;for(ee=0;ee<I.length;ee++)if(I[ee]!==_[ee])return!1;return!0}var _e=ve(I),je=ve(_);if(_e!==je)return!1;if(_e||je){if(I.length!==_.length)return!1;for(ee=0;ee<I.length;ee++)if(I[ee]!==_[ee])return!1;return!0}var Xe=u(I),Ye=u(_);if(Xe!==Ye)return!1;if(Xe||Ye)return y(I)!==y(_)?!1:typeof Uint8Array=="function"&&ne(new Uint8Array(I),new Uint8Array(_),X,V);var Je=h(I),Er=h(_);if(Je!==Er)return!1;if(Je||Er)return S(I)!==S(_)?!1:typeof Uint8Array=="function"&&ne(new Uint8Array(I),new Uint8Array(_),X,V);if(typeof I!=typeof _)return!1;var st=p(I),kt=p(_);if(st.length!==kt.length)return!1;for(st.sort(),kt.sort(),ee=st.length-1;ee>=0;ee--)if(st[ee]!=kt[ee])return!1;for(ee=st.length-1;ee>=0;ee--)if(ie=st[ee],!ne(I[ie],_[ie],X,V))return!1;var Xt=x(I),ct=x(_);return Xt!==ct?!1:Xt==="Set"||ct==="Set"?ge(I,_,X,V):Xt==="Map"?Le(I,_,X,V):!0}return Wo=function(_,X,V){return ne(_,X,V,o())},Wo}var ky=Oy();const tf=Od(ky);function Ny(e){return e}function rf(e,t,r,n){const i=Ny,[o,a]=w.useState(i(r)),s=w.useRef(o);return w.useEffect(()=>{const l=()=>{const u={...r,...e.getAttributes(t)};Object.keys(u).forEach(d=>{(u[d]===null||u[d]===void 0)&&(u[d]=r?r[d]:null)});const f=i(u);tf(s.current,f)||(a(f),s.current=f)};return e.on("selectionUpdate",l),e.on("transaction",l),()=>{e.off("selectionUpdate",l),e.off("transaction",l)}},[e,r,t,i]),o}function My({editor:e}){const{t}=q.useLocale(),{width:r,height:n,src:i}=rf(e,St.name,{width:0,height:0,src:"",defaultShowPicker:!1}),[o,a]=w.useState(!1),[s,l]=w.useState(""),u=w.useCallback(()=>{a(!1)},[a]);w.useEffect(()=>{o&&l(i)},[o,i]);const f=w.useCallback(()=>{const g=Rd(s);e.chain().updateAttributes(St.name,{src:(g==null?void 0:g.src)||s}).setNodeSelection(e.state.selection.from).focus().run(),a(!1)},[e,s,a]),d=w.useCallback(()=>{window.open(i,"_blank")},[i]),h=w.useCallback(()=>{a(!0)},[a]),p=w.useCallback(g=>{e.chain().updateAttributes(St.name,g).setNodeSelection(e.state.selection.from).focus().run()},[e]),m=w.useCallback(()=>e.isActive(St.name)&&!i,[e,i]),x=w.useCallback(()=>Ua(St.name,e),[e]);return c.jsxs(c.Fragment,{children:[c.jsx(pe.BubbleMenu,{className:"bubble-menu",editor:e,pluginKey:"iframe-bubble-menu",shouldShow:m,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999},children:c.jsxs("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:[c.jsx(W,{action:d,icon:"Eye",tooltip:"Visit Link"}),c.jsx(W,{action:h,icon:"Pencil",tooltip:"Open Edit Link"}),c.jsx(Id,{height:n,onOk:p,width:r,children:c.jsx(W,{icon:"Settings",tooltip:t("editor.settings")})}),c.jsx(W,{action:x,icon:"Trash2",tooltip:t("editor.delete")})]})}),c.jsxs(Cr,{onOpenChange:a,open:o,children:[c.jsx(jr,{}),c.jsxs(Ft,{children:[c.jsx(ld,{children:c.jsx(Ut,{children:"Edit Link Iframe"})}),c.jsx(Ee,{autoFocus:!0,onInput:g=>l(g.target.value),placeholder:"Enter link",type:"url",value:s}),c.jsxs(In,{children:[c.jsx(we,{onClick:u,children:"Cancel"}),c.jsx(we,{onClick:f,children:"OK"})]})]})]})]})}function Ly({editor:e,disabled:t,bubbleMenu:r}){const n=e.extensionManager.extensions.map(o=>o.name),i=()=>{var o,a,s,l,u,f,d,h,p,m;return[n.includes("columns")&&!((o=r==null?void 0:r.columnConfig)!=null&&o.hidden)?c.jsx(Y1,{editor:e},"columns"):null,n.includes("table")&&!((a=r==null?void 0:r.tableConfig)!=null&&a.hidden)?c.jsx(N0,{actions:(s=r==null?void 0:r.tableConfig)==null?void 0:s.actions,editor:e},"table"):null,n.includes("link")&&!((l=r==null?void 0:r.linkConfig)!=null&&l.hidden)?c.jsx(o1,{disabled:t,editor:e},"link"):null,n.includes(Ht.name)&&!((u=r==null?void 0:r.imageConfig)!=null&&u.hidden)?c.jsx(F1,{disabled:t,editor:e},"image"):null,n.includes(Ba.name)&&!((f=r==null?void 0:r.imageGifConfig)!=null&&f.hidden)?c.jsx(U1,{disabled:t,editor:e},"imageGif"):null,n.includes("video")&&!((d=r==null?void 0:r.videoConfig)!=null&&d.hidden)?c.jsx(W1,{disabled:t,editor:e},"video"):null,n.includes("iframe")&&!((h=r==null?void 0:r.iframeConfig)!=null&&h.hidden)?c.jsx(My,{disabled:t,editor:e},"iframe"):null,(p=r==null?void 0:r.floatingMenuConfig)!=null&&p.hidden?null:c.jsx(c0,{disabled:t,editor:e},"content"),(m=r==null?void 0:r.textConfig)!=null&&m.hidden?null:c.jsx(d0,{disabled:t,editor:e},"text")]};return r!=null&&r.render?r.render({editor:e,disabled:t||!1,extensionsNames:n,bubbleMenu:r},i()):i().filter(Boolean)}function Jl(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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"})})}function nf(e){const{t}=q.useLocale(),{highlight:r=!1,disabled:n=!1,selectedColor:i,setSelectedColor:o,onChange:a,colors:s=q.COLORS_LIST}=e,l=w.useMemo(()=>{const p=s,m=[];for(let x=0;x<p.length;x+=10)m.push(p.slice(x,x+10));return m},[s]),[u,f]=w.useState([]),d=p=>{const m=[...u],x=m.indexOf(p);x!==-1&&m.splice(x,1),m.unshift(p),m.length>10&&m.pop(),f(m)};function h(p){if(p===void 0){o==null||o(p),a==null||a(p);return}/^#([\da-f]{3}){1,2}$/i.test(p)&&(o==null||o(p),a==null||a(p),d(p))}return c.jsxs(Wt,{modal:!0,children:[c.jsx(Gt,{asChild:!0,className:"!richtext-p-0",disabled:n,children:e==null?void 0:e.children}),c.jsx(It,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:c.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[r?c.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>h(void 0),children:[c.jsx(Jl,{}),c.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:t("editor.nofill")})]}):c.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>{h(void 0)},children:[c.jsx(Jl,{}),c.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:t("editor.default")})]}),l.map((p,m)=>c.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:p.map((x,g)=>c.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:()=>h(x),children:c.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:x},children:x===i?c.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:c.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):c.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:c.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${g}`))},m)),c.jsxs("div",{children:[c.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:t("editor.recent")}),c.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:u==null?void 0:u.map((p,m)=>c.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:()=>h(p),children:c.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:p},children:c.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:c.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${m}`))})]}),c.jsx($y,{setColor:h})]})})]})}function $y({setColor:e}){const[t,r]=w.useState("#000000"),[n,i]=w.useState(!1),{t:o}=q.useLocale();return w.useEffect(()=>()=>{i(!1)},[]),c.jsxs(Wt,{open:n,children:[c.jsx(Gt,{asChild:!0,children:c.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",onClick:a=>{a.preventDefault(),i(!0)},children:[o("editor.color.more"),"..."]})}),c.jsxs(It,{children:[c.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[c.jsx(Tf.HexColorPicker,{color:t,onChange:r}),c.jsx(Ee,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:t.slice(1),onChange:a=>{a.preventDefault(),r(`#${a.target.value}`)}})]}),c.jsx(Be,{className:"richtext-my-[10px]"}),c.jsx(we,{className:"richtext-w-full",onClick:a=>{a.preventDefault(),e(t),i(!1)},children:c.jsx(N.Plus,{size:16})})]})]})}function _y({editor:e,disabled:t,toolbar:r}){const{t:n,lang:i}=q.useLocale(),o=w.useMemo(()=>{const u=[...e.extensionManager.extensions].sort((d,h)=>{const p=d.options.sort??-1,m=h.options.sort??-1;return p-m});let f=[];for(const d of u){const{button:h,divider:p=!1,spacer:m=!1,toolbar:x=!0}=d.options;if(!h||!$1(h)||!x)continue;const g=h({editor:e,extension:d,t:n});if(Array.isArray(g)){const y=g.map((S,T)=>({button:S,divider:T===g.length-1?p:!1,spacer:T===0?m:!1,type:d.type,name:d.name}));f=[...f,...y];continue}f.push({button:g,divider:p,spacer:m,type:d.type,name:d.name})}return f},[e,n,i]),a=l=>c.jsx("div",{className:"richtext-px-1 richtext-py-2 !richtext-border-b",style:{pointerEvents:t?"none":"auto",opacity:t?.5:1},children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-flex-wrap richtext-h-auto richtext-gap-y-1 richtext-gap-x-1",children:l})}),s=o.map((l,u)=>{var d,h;const f=l.button.component;return c.jsxs("div",{className:"richtext-flex richtext-items-center",children:[(l==null?void 0:l.spacer)&&c.jsx(Be,{orientation:"vertical",className:"!richtext-h-[16px] !richtext-mx-[10px]"}),c.jsx(f,{...l.button.componentProps,disabled:t||((h=(d=l==null?void 0:l.button)==null?void 0:d.componentProps)==null?void 0:h.disabled)}),(l==null?void 0:l.divider)&&c.jsx(Be,{orientation:"vertical",className:"!richtext-h-auto !richtext-mx-2"})]},`toolbar-item-${u}`)});return r&&(r!=null&&r.render)?r.render({editor:e,disabled:t||!1},o,s,a):a(s)}function Dy({editor:e,extensions:t}){const{t:r}=q.useLocale(),n=w.useMemo(()=>{var i,o,a;return(a=(o=(i=t==null?void 0:t.find(s=>s.name==="base-kit"))==null?void 0:i.options)==null?void 0:o.characterCount)==null?void 0:a.limit},[t]);return n?c.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t",children:c.jsx("div",{className:"richtext-flex richtext-flex-col",children:c.jsx("div",{className:"richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm",children:c.jsxs("span",{children:[e.storage.characterCount.characters(),"/",n," ",r("editor.characters")]})})})}):c.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t",children:c.jsx("div",{className:"richtext-flex richtext-flex-col",children:c.jsx("div",{className:"richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm",children:c.jsxs("span",{children:[e.storage.characterCount.characters()," ",r("editor.characters")]})})})})}function By(){const{toasts:e}=Nn();return c.jsxs(ev,{children:[e.map(({id:t,title:r,description:n,action:i,...o})=>c.jsxs(Ad,{...o,children:[c.jsxs("div",{className:"richtext-grid richtext-gap-1",children:[r&&c.jsx(jd,{children:r}),n&&c.jsx(Td,{children:n})]}),i,c.jsx(Cd,{})]},t)),c.jsx(Sd,{})]})}const zy=`
9
- .reactjs-tiptap-editor,
10
- .richtext-dialog-content {
11
- button,
12
- input:where([type=button]),
13
- input:where([type=reset]),
14
- input:where([type=submit]) {
15
- -webkit-appearance: button;
16
- background-color: transparent;
17
- background-image: none;
18
- }
19
-
20
- input,
21
- optgroup,
22
- select {
23
- font-family: inherit;
24
- font-feature-settings: inherit;
25
- font-variation-settings: inherit;
26
- font-size: 100%;
27
- font-weight: inherit;
28
- line-height: inherit;
29
- letter-spacing: inherit;
30
- color: inherit;
31
- }
32
-
33
- button {
34
- font-family: inherit;
35
- font-feature-settings: inherit;
36
- font-variation-settings: inherit;
37
- font-size: 100%;
38
- font-weight: inherit;
39
- line-height: inherit;
40
- letter-spacing: inherit;
41
- color: inherit;
42
- }
43
-
44
- *,
45
- ::before,
46
- ::after {
47
- box-sizing: border-box;
48
- border-width: 0;
49
- border-style: solid;
50
- border-color: hsl(var(--richtext-border));
51
- }
52
-
53
- background-color: hsl(var(--richtext-background));
54
- color: hsl(var(--richtext-foreground));
55
-
56
- hr {
57
- height: 0;
58
- color: inherit;
59
- border-top-width: 1px;
60
- }
61
-
62
- a {
63
- color: inherit;
64
- text-decoration: inherit;
65
- }
66
-
67
- b,
68
- strong {
69
- font-weight: bolder;
70
- }
71
-
72
- code,
73
- kbd,
74
- samp,
75
- pre {
76
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
77
- font-feature-settings: normal;
78
- font-variation-settings: normal;
79
- font-size: 1em;
80
- }
81
-
82
- table {
83
- text-indent: 0;
84
- border-color: inherit;
85
- border-collapse: collapse;
86
- }
87
-
88
- input {
89
- border-width: 1px;
90
- }
91
-
92
-
93
- input::placeholder {
94
- opacity: 1;
95
- color: #9ca3af;
96
- }
97
-
98
- button, input {
99
- cursor: pointer;
100
- color: inherit;
101
- }
102
-
103
- img,
104
- svg,
105
- video,
106
- canvas,
107
- audio,
108
- iframe,
109
- embed,
110
- object {
111
- display: block;
112
- vertical-align: middle;
113
- }
114
-
115
- img,
116
- video {
117
- max-width: 100%;
118
- height: auto;
119
- }
120
- }
121
-
122
- div[data-radix-popper-content-wrapper],
123
- div[data-tippy-root] {
124
- *,
125
- ::before,
126
- ::after {
127
- box-sizing: border-box;
128
- border-width: 0;
129
- border-style: solid;
130
- border-color: hsl(var(--richtext-border));
131
- }
132
-
133
- background-color: hsl(var(--richtext-background));
134
- color: hsl(var(--richtext-foreground));
135
-
136
- button, input {
137
- cursor: pointer;
138
- color: inherit;
139
- }
140
- }
141
- `,Hy=w.memo(({children:e,id:t})=>{const[,r]=fd(a=>a.value),[,n]=hd(a=>a.value),i=a=>{r({value:a.detail})},o=a=>{n({value:a.detail})};return w.useEffect(()=>{const a=xr(vt.EDIT(t),i),s=xr(vt.UPDATE_THEME(t),o);return()=>{a(),s()}},[]),c.jsx(c.Fragment,{children:e})});function qy({children:e,id:t}){return c.jsx(x1,{children:c.jsx(v1,{children:c.jsx(Hy,{id:t,children:e})})})}function Fy(){const[e]=hd(t=>t.value);return e}const Uy={setTheme:(e,t)=>{On(vt.UPDATE_THEME(e),t)}},Zl="data-rc-order",Ql="data-rc-priority",Wy="rc-util-key",ga=new Map;function Gy(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function of({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:Wy}function cs(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Vy(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function af(e){return[...(ga.get(e)||e).children].filter(t=>t.tagName==="STYLE")}function sf(e,t={}){const{csp:r,prepend:n,priority:i=0}=t,o=Vy(n),a=o==="prependQueue",s=document.createElement("style");s.setAttribute(Zl,o),a&&i&&s.setAttribute(Ql,`${i}`),r!=null&&r.nonce&&(s.nonce=r==null?void 0:r.nonce),s.innerHTML=e;const l=cs(t),{firstChild:u}=l;if(n){if(a){const f=af(l).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(Zl)))return!1;const h=Number(d.getAttribute(Ql)||0);return i>=h});if(f.length>0)return l.insertBefore(s,f.at(-1).nextSibling),s}u.before(s)}else l.append(s);return s}function cf(e,t={}){const r=cs(t);return af(r).find(n=>n.getAttribute(of(t))===e)}function Ky(e,t={}){const r=cf(e,t);r&&r.remove()}function Xy(e,t){const r=ga.get(e);if(!r||!Gy(document,r)){const n=sf("",t),{parentNode:i}=n;ga.set(e,i),n.remove()}}function Yy(e,t,r={}){var a,s,l;const n=cs(r);Xy(n,r);const i=cf(t,r);if(i)return(a=r.csp)!=null&&a.nonce&&i.nonce!==((s=r.csp)==null?void 0:s.nonce)&&(i.nonce=(l=r.csp)==null?void 0:l.nonce),i.innerHTML!==e&&(i.innerHTML=e),i;const o=sf(e,r);return o.setAttribute(of(r),t),o}function Jy(e,t){const{content:r,extensions:n,useEditorOptions:i={}}=e,o=w.useId(),a=w.useMemo(()=>{const d=Bg(n,n,"name");return[...n.map(p=>{const m=n.find(x=>x.name===p.name);return m?p.configure(m.options):p}),...d].map((p,m)=>p.configure({sort:m}))},[n]),s=Bt(d=>{var p;const h=u(d,e.output);(p=e==null?void 0:e.onChangeContent)==null||p.call(e,h)},q.EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME),l=pe.useEditor({extensions:a,content:r,immediatelyRender:(e==null?void 0:e.immediatelyRender)||!1,onUpdate:({editor:d})=>{s&&s(d)},...i});w.useImperativeHandle(t,()=>({editor:l})),w.useEffect(()=>{document.documentElement.classList.toggle("dark",e.dark),Uy.setTheme(o,e.dark?"dark":"light")},[e.dark]),w.useEffect(()=>{l==null||l.setEditable(!(e!=null&&e.disabled)),Iv.setDisable(o,!(e!=null&&e.disabled))},[l,e==null?void 0:e.disabled]),w.useEffect(()=>((e==null?void 0:e.resetCSS)!==!1&&Yy(zy,"react-tiptap-reset"),()=>{Ky("react-tiptap-reset")}),[e==null?void 0:e.resetCSS]);function u(d,h){return e!=null&&e.removeDefaultWrapper?h==="html"?d.isEmpty?"":d.getHTML():h==="json"?d.isEmpty?{}:d.getJSON():h==="text"?d.isEmpty?"":d.getText():"":h==="html"?d.getHTML():h==="json"?d.getJSON():h==="text"?d.getText():""}w.useLayoutEffect(()=>{l&&(l.id=o)},[o,l]),w.useEffect(()=>()=>{var d;(d=l==null?void 0:l.destroy)==null||d.call(l)},[]);const f=md(l,"characterCount");return l?c.jsxs("div",{className:"reactjs-tiptap-editor",children:[c.jsx(qy,{id:o,children:c.jsx(iv,{delayDuration:0,disableHoverableContent:!0,children:c.jsx("div",{className:"richtext-overflow-hidden richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-outline richtext-outline-1",children:c.jsxs("div",{className:"richtext-flex richtext-max-h-full richtext-w-full richtext-flex-col",children:[!(e!=null&&e.hideToolbar)&&c.jsx(_y,{disabled:!!(e!=null&&e.disabled),editor:l,toolbar:e.toolbar}),c.jsx(pe.EditorContent,{className:`richtext-relative ${(e==null?void 0:e.contentClass)||""}`,editor:l}),f&&c.jsx(Dy,{editor:l,extensions:n}),!(e!=null&&e.hideBubble)&&c.jsx(Ly,{bubbleMenu:e==null?void 0:e.bubbleMenu,disabled:e==null?void 0:e.disabled,editor:l})]})})})}),c.jsx(By,{})]}):c.jsx(c.Fragment,{})}const Zy=w.forwardRef(Jy);exports.ActionButton=W;exports.Button=we;exports.ColorPicker=nf;exports.Column=Fa;exports.ColumnActionButton=X1;exports.Dialog=Cr;exports.DialogContent=Ft;exports.DialogFooter=In;exports.DialogTitle=Ut;exports.DialogTrigger=jr;exports.DropdownMenu=xd;exports.DropdownMenuCheckboxItem=yd;exports.DropdownMenuContent=Wa;exports.DropdownMenuSeparator=Ga;exports.DropdownMenuShortcut=bd;exports.DropdownMenuTrigger=vd;exports.EVENTS=vt;exports.EXTENSION_PRIORITY_HIGHEST=gd;exports.ExportPdf=Ku;exports.ExportWord=Xu;exports.HighlightActionButton=Yu;exports.IconComponent=me;exports.Iframe=St;exports.Image=Da;exports.Image$1=Ht;exports.ImageGif=Ba;exports.IndentProps=Xr;exports.Input=Ee;exports.Label=Ue;exports.Link=ad;exports.MenuDown=Vu;exports.MultiColumn=vr;exports.Popover=Wt;exports.PopoverContent=It;exports.PopoverTrigger=Gt;exports.RichTextEditor=Zy;exports.Separator=Be;exports.SizeSetter=Id;exports.Switch=Va;exports.Toggle=Xa;exports.Tooltip=Ya;exports.TooltipContent=kn;exports.TooltipTrigger=Ja;exports.Video=za;exports.actionDialogImage=pd;exports.clamp=N1;exports.cn=re;exports.commonjsGlobal=wr;exports.createIndentCommand=s0;exports.dataURLtoFile=ud;exports.debounce=Ar;exports.deepEqual=tf;exports.deleteNode=Ua;exports.dispatchEvent=On;exports.ensureNameValueOptions=D1;exports.extractFileExtension=d1;exports.extractFilename=u1;exports.getAugmentedNamespace=kd;exports.getBubbleDrawer=Zx;exports.getBubbleMermaid=Jx;exports.getDefaultExportFromCjs=Od;exports.getShortcutKey=Fu;exports.getShortcutKeys=Uu;exports.hasExtension=md;exports.icons=Ia;exports.listenEvent=xr;exports.normalizeFileSize=f1;exports.normalizeFileType=h1;exports.throttle=Bt;exports.useAttributes=rf;exports.useEditableEditor=Pd;exports.useTheme=Fy;exports.useToast=Nn;