reactjs-tiptap-editor 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/lib/{ActionMenuButton-Bycn676n.js → ActionMenuButton-BllDdN2-.js} +1 -1
  2. package/lib/{ActionMenuButton-CpFNwSUZ.cjs → ActionMenuButton-tLPdHfCT.cjs} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +5 -5
  5. package/lib/Attachment.d.ts +5 -5
  6. package/lib/Attachment.js +1 -1
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +5 -5
  9. package/lib/Blockquote.d.ts +5 -5
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +5 -5
  13. package/lib/Bold.d.ts +5 -5
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +5 -5
  17. package/lib/BulletList.d.ts +5 -5
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +5 -5
  21. package/lib/Clear.d.ts +5 -5
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +5 -5
  25. package/lib/Code.d.ts +5 -5
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +39 -34
  28. package/lib/CodeBlock.d.cts +5 -5
  29. package/lib/CodeBlock.d.ts +5 -5
  30. package/lib/CodeBlock.js +1345 -795
  31. package/lib/Color.cjs +1 -1
  32. package/lib/Color.d.cts +5 -5
  33. package/lib/Color.d.ts +5 -5
  34. package/lib/Color.js +1 -1
  35. package/lib/Document.d.cts +5 -5
  36. package/lib/Document.d.ts +5 -5
  37. package/lib/{Drawer-rwnFvgZR.cjs → Drawer-BBmEHEAp.cjs} +1 -1
  38. package/lib/{Drawer-BZadE1gM.js → Drawer-hyBIiEP6.js} +1 -1
  39. package/lib/Drawer.cjs +1 -1
  40. package/lib/Drawer.d.cts +5 -5
  41. package/lib/Drawer.d.ts +5 -5
  42. package/lib/Drawer.js +2 -2
  43. package/lib/Emoji.cjs +1 -1
  44. package/lib/Emoji.d.cts +5 -5
  45. package/lib/Emoji.d.ts +5 -5
  46. package/lib/Emoji.js +1 -1
  47. package/lib/{Excalidraw-B2414Smc.js → Excalidraw-BQ2PeAoa.js} +1 -1
  48. package/lib/{Excalidraw-D21vMFe0.cjs → Excalidraw-Cd01zFJl.cjs} +1 -1
  49. package/lib/Excalidraw.cjs +1 -1
  50. package/lib/Excalidraw.d.cts +5 -5
  51. package/lib/Excalidraw.d.ts +5 -5
  52. package/lib/Excalidraw.js +1 -1
  53. package/lib/ExportPdf.cjs +1 -1
  54. package/lib/ExportPdf.d.cts +5 -5
  55. package/lib/ExportPdf.d.ts +5 -5
  56. package/lib/ExportPdf.js +1 -1
  57. package/lib/ExportWord.cjs +1 -1
  58. package/lib/ExportWord.d.cts +5 -5
  59. package/lib/ExportWord.d.ts +5 -5
  60. package/lib/ExportWord.js +1 -1
  61. package/lib/FontFamily.cjs +1 -1
  62. package/lib/FontFamily.d.cts +5 -5
  63. package/lib/FontFamily.d.ts +5 -5
  64. package/lib/FontFamily.js +2 -2
  65. package/lib/FontSize.cjs +1 -1
  66. package/lib/FontSize.d.cts +5 -5
  67. package/lib/FontSize.d.ts +5 -5
  68. package/lib/FontSize.js +2 -2
  69. package/lib/FormatPainter.cjs +1 -1
  70. package/lib/FormatPainter.d.cts +5 -5
  71. package/lib/FormatPainter.d.ts +5 -5
  72. package/lib/FormatPainter.js +1 -1
  73. package/lib/Heading.cjs +1 -1
  74. package/lib/Heading.d.cts +5 -5
  75. package/lib/Heading.d.ts +5 -5
  76. package/lib/Heading.js +2 -2
  77. package/lib/Highlight.cjs +1 -1
  78. package/lib/Highlight.d.cts +5 -5
  79. package/lib/Highlight.d.ts +5 -5
  80. package/lib/Highlight.js +1 -1
  81. package/lib/History.cjs +1 -1
  82. package/lib/History.d.cts +5 -5
  83. package/lib/History.d.ts +5 -5
  84. package/lib/History.js +1 -1
  85. package/lib/HorizontalRule.cjs +1 -1
  86. package/lib/HorizontalRule.d.cts +5 -5
  87. package/lib/HorizontalRule.d.ts +5 -5
  88. package/lib/HorizontalRule.js +1 -1
  89. package/lib/Iframe.cjs +1 -1
  90. package/lib/Iframe.d.cts +5 -5
  91. package/lib/Iframe.d.ts +5 -5
  92. package/lib/Iframe.js +1 -1
  93. package/lib/Image.cjs +1 -1
  94. package/lib/Image.d.cts +5 -5
  95. package/lib/Image.d.ts +5 -5
  96. package/lib/Image.js +1 -1
  97. package/lib/ImageGif.cjs +1 -1
  98. package/lib/ImageGif.d.cts +5 -5
  99. package/lib/ImageGif.d.ts +5 -5
  100. package/lib/ImageGif.js +1 -1
  101. package/lib/ImportWord.cjs +1 -1
  102. package/lib/ImportWord.d.cts +5 -5
  103. package/lib/ImportWord.d.ts +5 -5
  104. package/lib/ImportWord.js +1 -1
  105. package/lib/Indent.cjs +1 -1
  106. package/lib/Indent.d.cts +5 -5
  107. package/lib/Indent.d.ts +5 -5
  108. package/lib/Indent.js +1 -1
  109. package/lib/Italic.cjs +1 -1
  110. package/lib/Italic.d.cts +5 -5
  111. package/lib/Italic.d.ts +5 -5
  112. package/lib/Italic.js +1 -1
  113. package/lib/Katex.cjs +1 -1
  114. package/lib/Katex.d.cts +5 -5
  115. package/lib/Katex.d.ts +5 -5
  116. package/lib/Katex.js +2 -2
  117. package/lib/LineHeight.cjs +1 -1
  118. package/lib/LineHeight.d.cts +5 -5
  119. package/lib/LineHeight.d.ts +5 -5
  120. package/lib/LineHeight.js +1 -1
  121. package/lib/Link.cjs +1 -1
  122. package/lib/Link.d.cts +5 -5
  123. package/lib/Link.d.ts +5 -5
  124. package/lib/Link.js +1 -1
  125. package/lib/ListItem.d.cts +5 -5
  126. package/lib/ListItem.d.ts +5 -5
  127. package/lib/Mention.d.cts +5 -5
  128. package/lib/Mention.d.ts +5 -5
  129. package/lib/Mermaid.cjs +1 -1
  130. package/lib/Mermaid.d.cts +5 -5
  131. package/lib/Mermaid.d.ts +5 -5
  132. package/lib/Mermaid.js +2 -2
  133. package/lib/MoreMark.cjs +1 -1
  134. package/lib/MoreMark.d.cts +5 -5
  135. package/lib/MoreMark.d.ts +5 -5
  136. package/lib/MoreMark.js +1 -1
  137. package/lib/MultiColumn.cjs +1 -1
  138. package/lib/MultiColumn.d.cts +5 -5
  139. package/lib/MultiColumn.d.ts +5 -5
  140. package/lib/MultiColumn.js +1 -1
  141. package/lib/OrderedList.cjs +1 -1
  142. package/lib/OrderedList.d.cts +5 -5
  143. package/lib/OrderedList.d.ts +5 -5
  144. package/lib/OrderedList.js +1 -1
  145. package/lib/RichTextEditor-CM-Xq9RS.cjs +137 -0
  146. package/lib/{RichTextEditor-Cy9XKEI5.js → RichTextEditor-DvrUVNK2.js} +4949 -4710
  147. package/lib/SearchAndReplace.cjs +1 -1
  148. package/lib/SearchAndReplace.d.cts +5 -5
  149. package/lib/SearchAndReplace.d.ts +5 -5
  150. package/lib/SearchAndReplace.js +1 -1
  151. package/lib/Selection.d.cts +5 -5
  152. package/lib/Selection.d.ts +5 -5
  153. package/lib/SlashCommand.cjs +1 -1
  154. package/lib/SlashCommand.d.cts +5 -5
  155. package/lib/SlashCommand.d.ts +5 -5
  156. package/lib/SlashCommand.js +1 -1
  157. package/lib/Strike.cjs +1 -1
  158. package/lib/Strike.d.cts +5 -5
  159. package/lib/Strike.d.ts +5 -5
  160. package/lib/Strike.js +1 -1
  161. package/lib/SubAndSuperScript.cjs +1 -1
  162. package/lib/SubAndSuperScript.d.cts +5 -5
  163. package/lib/SubAndSuperScript.d.ts +5 -5
  164. package/lib/SubAndSuperScript.js +1 -1
  165. package/lib/Table.cjs +1 -1
  166. package/lib/Table.d.cts +5 -5
  167. package/lib/Table.d.ts +5 -5
  168. package/lib/Table.js +1 -1
  169. package/lib/TableOfContent.cjs +1 -1
  170. package/lib/TableOfContent.d.cts +5 -5
  171. package/lib/TableOfContent.d.ts +5 -5
  172. package/lib/TableOfContent.js +1 -1
  173. package/lib/TaskList.cjs +1 -1
  174. package/lib/TaskList.d.cts +5 -5
  175. package/lib/TaskList.d.ts +5 -5
  176. package/lib/TaskList.js +1 -1
  177. package/lib/TextAlign.cjs +1 -1
  178. package/lib/TextAlign.d.cts +5 -5
  179. package/lib/TextAlign.d.ts +5 -5
  180. package/lib/TextAlign.js +1 -1
  181. package/lib/TextBubble.cjs +1 -1
  182. package/lib/TextBubble.d.cts +5 -5
  183. package/lib/TextBubble.d.ts +5 -5
  184. package/lib/TextBubble.js +1 -1
  185. package/lib/TextDirection.cjs +1 -1
  186. package/lib/TextDirection.d.cts +5 -5
  187. package/lib/TextDirection.d.ts +5 -5
  188. package/lib/TextDirection.js +1 -1
  189. package/lib/TextUnderline.cjs +1 -1
  190. package/lib/TextUnderline.d.cts +5 -5
  191. package/lib/TextUnderline.d.ts +5 -5
  192. package/lib/TextUnderline.js +1 -1
  193. package/lib/TrailingNode.d.cts +5 -5
  194. package/lib/TrailingNode.d.ts +5 -5
  195. package/lib/{Twitter-CfDC4bFV.cjs → Twitter-BuMkJKBq.cjs} +1 -1
  196. package/lib/{Twitter-B_tSItrW.js → Twitter-BvdxYuDK.js} +1 -1
  197. package/lib/Twitter.cjs +1 -1
  198. package/lib/Twitter.d.cts +5 -5
  199. package/lib/Twitter.d.ts +5 -5
  200. package/lib/Twitter.js +1 -1
  201. package/lib/Video.cjs +1 -1
  202. package/lib/Video.d.cts +5 -5
  203. package/lib/Video.d.ts +5 -5
  204. package/lib/Video.js +1 -1
  205. package/lib/bubble-extra.cjs +1 -1
  206. package/lib/bubble-extra.d.cts +5 -5
  207. package/lib/bubble-extra.d.ts +5 -5
  208. package/lib/bubble-extra.js +5 -5
  209. package/lib/index.cjs +1 -1
  210. package/lib/index.d.cts +5 -5
  211. package/lib/index.d.ts +5 -5
  212. package/lib/index.js +2 -2
  213. package/lib/locale-bundle.d.cts +5 -5
  214. package/lib/locale-bundle.d.ts +5 -5
  215. package/lib/{textarea-DXTdXr2y.js → textarea-B172kMgC.js} +1 -1
  216. package/lib/{textarea-B45fP3gP.cjs → textarea-CapyElEP.cjs} +1 -1
  217. package/package.json +1 -1
  218. package/lib/RichTextEditor-DkpDEr5U.cjs +0 -137
@@ -1,137 +0,0 @@
1
- "use strict";var mu=Object.defineProperty;var xu=(e,t,r)=>t in e?mu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var tr=(e,t,r)=>xu(e,typeof t!="symbol"?t+"":t,r);const a=require("react/jsx-runtime"),b=require("react"),le=require("./dom-dataset-CAXnsjYE.cjs"),gc=require("@radix-ui/react-slot"),B=require("./index-LbrE7K9i.cjs"),vu=require("@radix-ui/react-separator"),yu=require("@radix-ui/react-toast"),E=require("lucide-react"),bu=require("@radix-ui/react-tooltip"),wu=require("@radix-ui/react-toggle"),rr=require("@radix-ui/react-icons"),Su=require("@radix-ui/react-dialog"),Au=require("@radix-ui/react-popover"),ju=require("@radix-ui/react-label"),H=require("./index-COecBbaE.cjs"),Cu=require("re-resizable"),Tu=require("react-image-crop"),Iu=require("@radix-ui/react-tabs"),Ou=require("@radix-ui/react-checkbox"),mc=require("tippy.js"),Eu=require("react-colorful"),Pu=require("@radix-ui/react-switch"),Ru=require("@radix-ui/react-dropdown-menu");function Te(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 ee=Te(b),xc=Te(vu),je=Te(yu),Wt=Te(bu),vc=Te(wu),Ce=Te(Su),$t=Te(Au),yc=Te(ju),ct=Te(Iu),Ri=Te(Ou),Mi=Te(Pu),ce=Te(Ru);var bc=typeof global=="object"&&global&&global.Object===Object&&global,Mu=typeof self=="object"&&self&&self.Object===Object&&self,ke=bc||Mu||Function("return this")(),_e=ke.Symbol,wc=Object.prototype,Nu=wc.hasOwnProperty,_u=wc.toString,Et=_e?_e.toStringTag:void 0;function $u(e){var t=Nu.call(e,Et),r=e[Et];try{e[Et]=void 0;var n=!0}catch{}var i=_u.call(e);return n&&(t?e[Et]=r:delete e[Et]),i}var ku=Object.prototype,Lu=ku.toString;function Du(e){return Lu.call(e)}var Bu="[object Null]",zu="[object Undefined]",qo=_e?_e.toStringTag:void 0;function it(e){return e==null?e===void 0?zu:Bu:qo&&qo in Object(e)?$u(e):Du(e)}function We(e){return e!=null&&typeof e=="object"}var qu="[object Symbol]";function mr(e){return typeof e=="symbol"||We(e)&&it(e)==qu}function Sc(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 $e=Array.isArray,Fo=_e?_e.prototype:void 0,Ho=Fo?Fo.toString:void 0;function dr(e){if(typeof e=="string")return e;if($e(e))return Sc(e,dr)+"";if(mr(e))return Ho?Ho.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Fu=/\s/;function Hu(e){for(var t=e.length;t--&&Fu.test(e.charAt(t)););return t}var Wu=/^\s+/;function Gu(e){return e&&e.slice(0,Hu(e)+1).replace(Wu,"")}function rt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Wo=NaN,Uu=/^[-+]0x[0-9a-f]+$/i,Vu=/^0b[01]+$/i,Xu=/^0o[0-7]+$/i,Ku=parseInt;function xt(e){if(typeof e=="number")return e;if(mr(e))return Wo;if(rt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=rt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Gu(e);var r=Vu.test(e);return r||Xu.test(e)?Ku(e.slice(2),r?2:8):Uu.test(e)?Wo:+e}var Yu=1/0,Zu=17976931348623157e292;function Ju(e){if(!e)return e===0?e:0;if(e=xt(e),e===Yu||e===-1/0){var t=e<0?-1:1;return t*Zu}return e===e?e:0}function Qu(e){var t=Ju(e),r=t%1;return t===t?r?t-r:t:0}function Xi(e){return e}var ef="[object AsyncFunction]",tf="[object Function]",rf="[object GeneratorFunction]",nf="[object Proxy]";function Ac(e){if(!rt(e))return!1;var t=it(e);return t==tf||t==rf||t==ef||t==nf}var Lr=ke["__core-js_shared__"],Go=function(){var e=/[^.]+$/.exec(Lr&&Lr.keys&&Lr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function of(e){return!!Go&&Go in e}var af=Function.prototype,sf=af.toString;function lt(e){if(e!=null){try{return sf.call(e)}catch{}try{return e+""}catch{}}return""}var cf=/[\\^$.*+?()[\]{}|]/g,lf=/^\[object .+?Constructor\]$/,uf=Function.prototype,ff=Object.prototype,df=uf.toString,hf=ff.hasOwnProperty,pf=RegExp("^"+df.call(hf).replace(cf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gf(e){if(!rt(e)||of(e))return!1;var t=Ac(e)?pf:lf;return t.test(lt(e))}function mf(e,t){return e==null?void 0:e[t]}function ut(e,t){var r=mf(e,t);return gf(r)?r:void 0}var Ni=ut(ke,"WeakMap");function xf(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 vf=800,yf=16,bf=Date.now;function wf(e){var t=0,r=0;return function(){var n=bf(),i=yf-(n-r);if(r=n,i>0){if(++t>=vf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Sf(e){return function(){return e}}var Uo=function(){try{var e=ut(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Af=Uo?function(e,t){return Uo(e,"toString",{configurable:!0,enumerable:!1,value:Sf(t),writable:!0})}:Xi,jf=wf(Af);function Cf(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 Tf(e){return e!==e}function If(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function Of(e,t,r){return t===t?If(e,t,r):Cf(e,Tf,r)}function Ef(e,t){var r=e==null?0:e.length;return!!r&&Of(e,t,0)>-1}var Pf=9007199254740991,Rf=/^(?:0|[1-9]\d*)$/;function jc(e,t){var r=typeof e;return t=t??Pf,!!t&&(r=="number"||r!="symbol"&&Rf.test(e))&&e>-1&&e%1==0&&e<t}function Cc(e,t){return e===t||e!==e&&t!==t}var Vo=Math.max;function Mf(e,t,r){return t=Vo(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Vo(n.length-t,0),s=Array(o);++i<o;)s[i]=n[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=n[i];return c[t]=r(s),xf(e,this,c)}}function Nf(e,t){return jf(Mf(e,t,Xi),e+"")}var _f=9007199254740991;function Ki(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=_f}function Tc(e){return e!=null&&Ki(e.length)&&!Ac(e)}var $f=Object.prototype;function kf(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||$f;return e===r}function Lf(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Df="[object Arguments]";function Xo(e){return We(e)&&it(e)==Df}var Ic=Object.prototype,Bf=Ic.hasOwnProperty,zf=Ic.propertyIsEnumerable,Yi=Xo(function(){return arguments}())?Xo:function(e){return We(e)&&Bf.call(e,"callee")&&!zf.call(e,"callee")};function qf(){return!1}var Oc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ko=Oc&&typeof module=="object"&&module&&!module.nodeType&&module,Ff=Ko&&Ko.exports===Oc,Yo=Ff?ke.Buffer:void 0,Hf=Yo?Yo.isBuffer:void 0,_i=Hf||qf,Wf="[object Arguments]",Gf="[object Array]",Uf="[object Boolean]",Vf="[object Date]",Xf="[object Error]",Kf="[object Function]",Yf="[object Map]",Zf="[object Number]",Jf="[object Object]",Qf="[object RegExp]",ed="[object Set]",td="[object String]",rd="[object WeakMap]",nd="[object ArrayBuffer]",id="[object DataView]",od="[object Float32Array]",ad="[object Float64Array]",sd="[object Int8Array]",cd="[object Int16Array]",ld="[object Int32Array]",ud="[object Uint8Array]",fd="[object Uint8ClampedArray]",dd="[object Uint16Array]",hd="[object Uint32Array]",se={};se[od]=se[ad]=se[sd]=se[cd]=se[ld]=se[ud]=se[fd]=se[dd]=se[hd]=!0;se[Wf]=se[Gf]=se[nd]=se[Uf]=se[id]=se[Vf]=se[Xf]=se[Kf]=se[Yf]=se[Zf]=se[Jf]=se[Qf]=se[ed]=se[td]=se[rd]=!1;function pd(e){return We(e)&&Ki(e.length)&&!!se[it(e)]}function Zi(e){return function(t){return e(t)}}var Ec=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nt=Ec&&typeof module=="object"&&module&&!module.nodeType&&module,gd=Nt&&Nt.exports===Ec,Dr=gd&&bc.process,hr=function(){try{var e=Nt&&Nt.require&&Nt.require("util").types;return e||Dr&&Dr.binding&&Dr.binding("util")}catch{}}(),Zo=hr&&hr.isTypedArray,Pc=Zo?Zi(Zo):pd,md=Object.prototype,xd=md.hasOwnProperty;function vd(e,t){var r=$e(e),n=!r&&Yi(e),i=!r&&!n&&_i(e),o=!r&&!n&&!i&&Pc(e),s=r||n||i||o,c=s?Lf(e.length,String):[],l=c.length;for(var u in e)xd.call(e,u)&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||jc(u,l)))&&c.push(u);return c}function yd(e,t){return function(r){return e(t(r))}}var bd=yd(Object.keys,Object),wd=Object.prototype,Sd=wd.hasOwnProperty;function Ad(e){if(!kf(e))return bd(e);var t=[];for(var r in Object(e))Sd.call(e,r)&&r!="constructor"&&t.push(r);return t}function Rc(e){return Tc(e)?vd(e):Ad(e)}var jd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cd=/^\w*$/;function Ji(e,t){if($e(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||mr(e)?!0:Cd.test(e)||!jd.test(e)||t!=null&&e in Object(t)}var kt=ut(Object,"create");function Td(){this.__data__=kt?kt(null):{},this.size=0}function Id(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Od="__lodash_hash_undefined__",Ed=Object.prototype,Pd=Ed.hasOwnProperty;function Rd(e){var t=this.__data__;if(kt){var r=t[e];return r===Od?void 0:r}return Pd.call(t,e)?t[e]:void 0}var Md=Object.prototype,Nd=Md.hasOwnProperty;function _d(e){var t=this.__data__;return kt?t[e]!==void 0:Nd.call(t,e)}var $d="__lodash_hash_undefined__";function kd(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=kt&&t===void 0?$d:t,this}function st(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])}}st.prototype.clear=Td;st.prototype.delete=Id;st.prototype.get=Rd;st.prototype.has=_d;st.prototype.set=kd;function Ld(){this.__data__=[],this.size=0}function xr(e,t){for(var r=e.length;r--;)if(Cc(e[r][0],t))return r;return-1}var Dd=Array.prototype,Bd=Dd.splice;function zd(e){var t=this.__data__,r=xr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Bd.call(t,r,1),--this.size,!0}function qd(e){var t=this.__data__,r=xr(t,e);return r<0?void 0:t[r][1]}function Fd(e){return xr(this.__data__,e)>-1}function Hd(e,t){var r=this.__data__,n=xr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ge(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])}}Ge.prototype.clear=Ld;Ge.prototype.delete=zd;Ge.prototype.get=qd;Ge.prototype.has=Fd;Ge.prototype.set=Hd;var Lt=ut(ke,"Map");function Wd(){this.size=0,this.__data__={hash:new st,map:new(Lt||Ge),string:new st}}function Gd(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function vr(e,t){var r=e.__data__;return Gd(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ud(e){var t=vr(this,e).delete(e);return this.size-=t?1:0,t}function Vd(e){return vr(this,e).get(e)}function Xd(e){return vr(this,e).has(e)}function Kd(e,t){var r=vr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Ue(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])}}Ue.prototype.clear=Wd;Ue.prototype.delete=Ud;Ue.prototype.get=Vd;Ue.prototype.has=Xd;Ue.prototype.set=Kd;var Yd="Expected a function";function Qi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Yd);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 s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Qi.Cache||Ue),r}Qi.Cache=Ue;var Zd=500;function Jd(e){var t=Qi(e,function(n){return r.size===Zd&&r.clear(),n}),r=t.cache;return t}var Qd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eh=/\\(\\)?/g,th=Jd(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Qd,function(r,n,i,o){t.push(i?o.replace(eh,"$1"):n||r)}),t});function $i(e){return e==null?"":dr(e)}function Mc(e,t){return $e(e)?e:Ji(e,t)?[e]:th($i(e))}function yr(e){if(typeof e=="string"||mr(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Nc(e,t){t=Mc(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[yr(t[r++])];return r&&r==n?e:void 0}function rh(e,t,r){var n=e==null?void 0:Nc(e,t);return n===void 0?r:n}function _c(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Jo=_e?_e.isConcatSpreadable:void 0;function nh(e){return $e(e)||Yi(e)||!!(Jo&&e&&e[Jo])}function ih(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=nh),i||(i=[]);++o<s;){var c=e[o];r(c)&&_c(i,c)}return i}function oh(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 ah(e,t,r){var n=e.length;return r=r===void 0?n:r,r>=n?e:oh(e,t,r)}var sh="\\ud800-\\udfff",ch="\\u0300-\\u036f",lh="\\ufe20-\\ufe2f",uh="\\u20d0-\\u20ff",fh=ch+lh+uh,dh="\\ufe0e\\ufe0f",hh="\\u200d",ph=RegExp("["+hh+sh+fh+dh+"]");function eo(e){return ph.test(e)}function gh(e){return e.split("")}var $c="\\ud800-\\udfff",mh="\\u0300-\\u036f",xh="\\ufe20-\\ufe2f",vh="\\u20d0-\\u20ff",yh=mh+xh+vh,bh="\\ufe0e\\ufe0f",wh="["+$c+"]",ki="["+yh+"]",Li="\\ud83c[\\udffb-\\udfff]",Sh="(?:"+ki+"|"+Li+")",kc="[^"+$c+"]",Lc="(?:\\ud83c[\\udde6-\\uddff]){2}",Dc="[\\ud800-\\udbff][\\udc00-\\udfff]",Ah="\\u200d",Bc=Sh+"?",zc="["+bh+"]?",jh="(?:"+Ah+"(?:"+[kc,Lc,Dc].join("|")+")"+zc+Bc+")*",Ch=zc+Bc+jh,Th="(?:"+[kc+ki+"?",ki,Lc,Dc,wh].join("|")+")",Ih=RegExp(Li+"(?="+Li+")|"+Th+Ch,"g");function Oh(e){return e.match(Ih)||[]}function Eh(e){return eo(e)?Oh(e):gh(e)}function Ph(e,t,r){return e===e&&(r!==void 0&&(e=e<=r?e:r),t!==void 0&&(e=e>=t?e:t)),e}function qc(e,t,r){return r===void 0&&(r=t,t=void 0),r!==void 0&&(r=xt(r),r=r===r?r:0),t!==void 0&&(t=xt(t),t=t===t?t:0),Ph(xt(e),t,r)}function Rh(){this.__data__=new Ge,this.size=0}function Mh(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Nh(e){return this.__data__.get(e)}function _h(e){return this.__data__.has(e)}var $h=200;function kh(e,t){var r=this.__data__;if(r instanceof Ge){var n=r.__data__;if(!Lt||n.length<$h-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ue(n)}return r.set(e,t),this.size=r.size,this}function Fe(e){var t=this.__data__=new Ge(e);this.size=t.size}Fe.prototype.clear=Rh;Fe.prototype.delete=Mh;Fe.prototype.get=Nh;Fe.prototype.has=_h;Fe.prototype.set=kh;function Lh(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function Dh(){return[]}var Bh=Object.prototype,zh=Bh.propertyIsEnumerable,Qo=Object.getOwnPropertySymbols,qh=Qo?function(e){return e==null?[]:(e=Object(e),Lh(Qo(e),function(t){return zh.call(e,t)}))}:Dh;function Fh(e,t,r){var n=t(e);return $e(e)?n:_c(n,r(e))}function ea(e){return Fh(e,Rc,qh)}var Di=ut(ke,"DataView"),Bi=ut(ke,"Promise"),zi=ut(ke,"Set"),ta="[object Map]",Hh="[object Object]",ra="[object Promise]",na="[object Set]",ia="[object WeakMap]",oa="[object DataView]",Wh=lt(Di),Gh=lt(Lt),Uh=lt(Bi),Vh=lt(zi),Xh=lt(Ni),tt=it;(Di&&tt(new Di(new ArrayBuffer(1)))!=oa||Lt&&tt(new Lt)!=ta||Bi&&tt(Bi.resolve())!=ra||zi&&tt(new zi)!=na||Ni&&tt(new Ni)!=ia)&&(tt=function(e){var t=it(e),r=t==Hh?e.constructor:void 0,n=r?lt(r):"";if(n)switch(n){case Wh:return oa;case Gh:return ta;case Uh:return ra;case Vh:return na;case Xh:return ia}return t});var aa=ke.Uint8Array,Kh="__lodash_hash_undefined__";function Yh(e){return this.__data__.set(e,Kh),this}function Zh(e){return this.__data__.has(e)}function Dt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Ue;++t<r;)this.add(e[t])}Dt.prototype.add=Dt.prototype.push=Yh;Dt.prototype.has=Zh;function Jh(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 Fc(e,t){return e.has(t)}var Qh=1,ep=2;function Hc(e,t,r,n,i,o){var s=r&Qh,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,p=r&ep?new Dt:void 0;for(o.set(e,t),o.set(t,e);++f<c;){var g=e[f],m=t[f];if(n)var y=s?n(m,g,f,t,e,o):n(g,m,f,e,t,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!Jh(t,function(S,A){if(!Fc(p,A)&&(g===S||i(g,S,r,n,o)))return p.push(A)})){h=!1;break}}else if(!(g===m||i(g,m,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}function tp(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function rp(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var np=1,ip=2,op="[object Boolean]",ap="[object Date]",sp="[object Error]",cp="[object Map]",lp="[object Number]",up="[object RegExp]",fp="[object Set]",dp="[object String]",hp="[object Symbol]",pp="[object ArrayBuffer]",gp="[object DataView]",sa=_e?_e.prototype:void 0,Br=sa?sa.valueOf:void 0;function mp(e,t,r,n,i,o,s){switch(r){case gp:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pp:return!(e.byteLength!=t.byteLength||!o(new aa(e),new aa(t)));case op:case ap:case lp:return Cc(+e,+t);case sp:return e.name==t.name&&e.message==t.message;case up:case dp:return e==t+"";case cp:var c=tp;case fp:var l=n&np;if(c||(c=rp),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;n|=ip,s.set(e,t);var d=Hc(c(e),c(t),n,i,o,s);return s.delete(e),d;case hp:if(Br)return Br.call(e)==Br.call(t)}return!1}var xp=1,vp=Object.prototype,yp=vp.hasOwnProperty;function bp(e,t,r,n,i,o){var s=r&xp,c=ea(e),l=c.length,u=ea(t),d=u.length;if(l!=d&&!s)return!1;for(var f=l;f--;){var h=c[f];if(!(s?h in t:yp.call(t,h)))return!1}var p=o.get(e),g=o.get(t);if(p&&g)return p==t&&g==e;var m=!0;o.set(e,t),o.set(t,e);for(var y=s;++f<l;){h=c[f];var S=e[h],A=t[h];if(n)var w=s?n(A,S,h,t,e,o):n(S,A,h,e,t,o);if(!(w===void 0?S===A||i(S,A,r,n,o):w)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var j=e.constructor,P=t.constructor;j!=P&&"constructor"in e&&"constructor"in t&&!(typeof j=="function"&&j instanceof j&&typeof P=="function"&&P instanceof P)&&(m=!1)}return o.delete(e),o.delete(t),m}var wp=1,ca="[object Arguments]",la="[object Array]",nr="[object Object]",Sp=Object.prototype,ua=Sp.hasOwnProperty;function Ap(e,t,r,n,i,o){var s=$e(e),c=$e(t),l=s?la:tt(e),u=c?la:tt(t);l=l==ca?nr:l,u=u==ca?nr:u;var d=l==nr,f=u==nr,h=l==u;if(h&&_i(e)){if(!_i(t))return!1;s=!0,d=!1}if(h&&!d)return o||(o=new Fe),s||Pc(e)?Hc(e,t,r,n,i,o):mp(e,t,l,r,n,i,o);if(!(r&wp)){var p=d&&ua.call(e,"__wrapped__"),g=f&&ua.call(t,"__wrapped__");if(p||g){var m=p?e.value():e,y=g?t.value():t;return o||(o=new Fe),i(m,y,r,n,o)}}return h?(o||(o=new Fe),bp(e,t,r,n,i,o)):!1}function to(e,t,r,n,i){return e===t?!0:e==null||t==null||!We(e)&&!We(t)?e!==e&&t!==t:Ap(e,t,r,n,to,i)}var jp=1,Cp=2;function Tp(e,t,r,n){var i=r.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var s=r[i];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=r[i];var c=s[0],l=e[c],u=s[1];if(s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new Fe,f;if(!(f===void 0?to(u,l,jp|Cp,n,d):f))return!1}}return!0}function Wc(e){return e===e&&!rt(e)}function Ip(e){for(var t=Rc(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Wc(i)]}return t}function Gc(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Op(e){var t=Ip(e);return t.length==1&&t[0][2]?Gc(t[0][0],t[0][1]):function(r){return r===e||Tp(r,e,t)}}function Ep(e,t){return e!=null&&t in Object(e)}function Pp(e,t,r){t=Mc(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var s=yr(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&Ki(i)&&jc(s,i)&&($e(e)||Yi(e)))}function Rp(e,t){return e!=null&&Pp(e,t,Ep)}var Mp=1,Np=2;function _p(e,t){return Ji(e)&&Wc(t)?Gc(yr(e),t):function(r){var n=rh(r,e);return n===void 0&&n===t?Rp(r,e):to(t,n,Mp|Np)}}function Uc(e){return function(t){return t==null?void 0:t[e]}}function $p(e){return function(t){return Nc(t,e)}}function kp(e){return Ji(e)?Uc(yr(e)):$p(e)}function Lp(e){return typeof e=="function"?e:e==null?Xi:typeof e=="object"?$e(e)?_p(e[0],e[1]):Op(e):kp(e)}var zr=function(){return ke.Date.now()},Dp="Expected a function",Bp=Math.max,zp=Math.min;function Gt(e,t,r){var n,i,o,s,c,l,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Dp);t=xt(t)||0,rt(r)&&(d=!!r.leading,f="maxWait"in r,o=f?Bp(xt(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(M){var N=n,I=i;return n=i=void 0,u=M,s=e.apply(I,N),s}function g(M){return u=M,c=setTimeout(S,t),d?p(M):s}function m(M){var N=M-l,I=M-u,C=t-N;return f?zp(C,o-I):C}function y(M){var N=M-l,I=M-u;return l===void 0||N>=t||N<0||f&&I>=o}function S(){var M=zr();if(y(M))return A(M);c=setTimeout(S,m(M))}function A(M){return c=void 0,h&&n?p(M):(n=i=void 0,s)}function w(){c!==void 0&&clearTimeout(c),u=0,n=l=i=c=void 0}function j(){return c===void 0?s:A(zr())}function P(){var M=zr(),N=y(M);if(n=arguments,i=this,l=M,N){if(c===void 0)return g(l);if(f)return clearTimeout(c),c=setTimeout(S,t),p(l)}return c===void 0&&(c=setTimeout(S,t)),s}return P.cancel=w,P.flush=j,P}function qr(e){return We(e)&&Tc(e)}var qp=200;function Fp(e,t,r,n){var i=-1,o=Ef,s=!0,c=e.length,l=[],u=t.length;if(!c)return l;r&&(t=Sc(t,Zi(r))),t.length>=qp&&(o=Fc,s=!1,t=new Dt(t));e:for(;++i<c;){var d=e[i],f=r==null?d:r(d);if(d=d!==0?d:0,s&&f===f){for(var h=u;h--;)if(t[h]===f)continue e;l.push(d)}else o(t,f,n)||l.push(d)}return l}function Hp(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Wp=Nf(function(e,t){var r=Hp(t);return qr(r)&&(r=void 0),qr(e)?Fp(e,ih(t,1,qr),Lp(r)):[]}),Gp="[object Number]";function pr(e){return typeof e=="number"||We(e)&&it(e)==Gp}var Up="[object RegExp]";function Vp(e){return We(e)&&it(e)==Up}var fa=hr&&hr.isRegExp,Xp=fa?Zi(fa):Vp,Kp=Uc("length"),Vc="\\ud800-\\udfff",Yp="\\u0300-\\u036f",Zp="\\ufe20-\\ufe2f",Jp="\\u20d0-\\u20ff",Qp=Yp+Zp+Jp,eg="\\ufe0e\\ufe0f",tg="["+Vc+"]",qi="["+Qp+"]",Fi="\\ud83c[\\udffb-\\udfff]",rg="(?:"+qi+"|"+Fi+")",Xc="[^"+Vc+"]",Kc="(?:\\ud83c[\\udde6-\\uddff]){2}",Yc="[\\ud800-\\udbff][\\udc00-\\udfff]",ng="\\u200d",Zc=rg+"?",Jc="["+eg+"]?",ig="(?:"+ng+"(?:"+[Xc,Kc,Yc].join("|")+")"+Jc+Zc+")*",og=Jc+Zc+ig,ag="(?:"+[Xc+qi+"?",qi,Kc,Yc,tg].join("|")+")",da=RegExp(Fi+"(?="+Fi+")|"+ag+og,"g");function sg(e){for(var t=da.lastIndex=0;da.test(e);)++t;return t}function cg(e){return eo(e)?sg(e):Kp(e)}var lg="Expected a function";function bt(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(lg);return rt(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Gt(e,t,{leading:n,maxWait:t,trailing:i})}var ug=30,fg="...",dg=/\w*$/;function hg(e,t){var r=ug,n=fg;if(rt(t)){var i="separator"in t?t.separator:i;r="length"in t?Qu(t.length):r,n="omission"in t?dr(t.omission):n}e=$i(e);var o=e.length;if(eo(e)){var s=Eh(e);o=s.length}if(r>=o)return e;var c=r-cg(n);if(c<1)return n;var l=s?ah(s,0,c).join(""):e.slice(0,c);if(i===void 0)return l+n;if(s&&(c+=l.length-c),Xp(i)){if(e.slice(c).search(i)){var u,d=l;for(i.global||(i=RegExp(i.source,$i(dg.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;l=l.slice(0,f===void 0?c:f)}}else if(e.indexOf(dr(i),c)!=c){var h=l.lastIndexOf(i);h>-1&&(l=l.slice(0,h))}return l+n}const ro="-",pg=e=>{const t=mg(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const c=s.split(ro);return c[0]===""&&c.length!==1&&c.shift(),Qc(c,t)||gg(s)},getConflictingClassGroupIds:(s,c)=>{const l=r[s]||[];return c&&n[s]?[...l,...n[s]]:l}}},Qc=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?Qc(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(ro);return(s=t.validators.find(({validator:c})=>c(o)))==null?void 0:s.classGroupId},ha=/^\[(.+)\]$/,gg=e=>{if(ha.test(e)){const t=ha.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},mg=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return vg(Object.entries(e.classGroups),r).forEach(([o,s])=>{Hi(s,n,o,t)}),n},Hi=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:pa(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(xg(i)){Hi(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,s])=>{Hi(s,pa(t,o),r,n)})})},pa=(e,t)=>{let r=e;return t.split(ro).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},xg=e=>e.isThemeGetter,vg=(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(([s,c])=>[t+s,c])):o);return[r,i]}):e,yg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,s)=>{r.set(o,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let s=r.get(o);if(s!==void 0)return s;if((s=n.get(o))!==void 0)return i(o,s),s},set(o,s){r.has(o)?r.set(o,s):i(o,s)}}},el="!",bg=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,s=c=>{const l=[];let u=0,d=0,f;for(let y=0;y<c.length;y++){let S=c[y];if(u===0){if(S===i&&(n||c.slice(y,y+o)===t)){l.push(c.slice(d,y)),d=y+o;continue}if(S==="/"){f=y;continue}}S==="["?u++:S==="]"&&u--}const h=l.length===0?c:c.substring(d),p=h.startsWith(el),g=p?h.substring(1):h,m=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return r?c=>r({className:c,parseClassName:s}):s},wg=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},Sg=e=>({cache:yg(e.cacheSize),parseClassName:bg(e),...pg(e)}),Ag=/\s+/,jg=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],s=e.trim().split(Ag);let c="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=r(u);let g=!!p,m=n(g?h.substring(0,p):h);if(!m){if(!g){c=u+(c.length>0?" "+c:c);continue}if(m=n(h),!m){c=u+(c.length>0?" "+c:c);continue}g=!1}const y=wg(d).join(":"),S=f?y+el:y,A=S+m;if(o.includes(A))continue;o.push(A);const w=i(m,g);for(let j=0;j<w.length;++j){const P=w[j];o.push(S+P)}c=u+(c.length>0?" "+c:c)}return c};function Cg(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=tl(t))&&(n&&(n+=" "),n+=r);return n}const tl=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=tl(e[n]))&&(r&&(r+=" "),r+=t);return r};function Tg(e,...t){let r,n,i,o=s;function s(l){const u=t.reduce((d,f)=>f(d),e());return r=Sg(u),n=r.cache.get,i=r.cache.set,o=c,c(l)}function c(l){const u=n(l);if(u)return u;const d=jg(l,r);return i(l,d),d}return function(){return o(Cg.apply(null,arguments))}}const ae=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},rl=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ig=/^\d+\/\d+$/,Og=new Set(["px","full","screen"]),Eg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pg=/\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$/,Rg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Mg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ng=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qe=e=>vt(e)||Og.has(e)||Ig.test(e),Qe=e=>St(e,"length",qg),vt=e=>!!e&&!Number.isNaN(Number(e)),Fr=e=>St(e,"number",vt),Pt=e=>!!e&&Number.isInteger(Number(e)),_g=e=>e.endsWith("%")&&vt(e.slice(0,-1)),U=e=>rl.test(e),et=e=>Eg.test(e),$g=new Set(["length","size","percentage"]),kg=e=>St(e,$g,nl),Lg=e=>St(e,"position",nl),Dg=new Set(["image","url"]),Bg=e=>St(e,Dg,Hg),zg=e=>St(e,"",Fg),Rt=()=>!0,St=(e,t,r)=>{const n=rl.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},qg=e=>Pg.test(e)&&!Rg.test(e),nl=()=>!1,Fg=e=>Mg.test(e),Hg=e=>Ng.test(e),Wg=()=>{const e=ae("colors"),t=ae("spacing"),r=ae("blur"),n=ae("brightness"),i=ae("borderColor"),o=ae("borderRadius"),s=ae("borderSpacing"),c=ae("borderWidth"),l=ae("contrast"),u=ae("grayscale"),d=ae("hueRotate"),f=ae("invert"),h=ae("gap"),p=ae("gradientColorStops"),g=ae("gradientColorStopPositions"),m=ae("inset"),y=ae("margin"),S=ae("opacity"),A=ae("padding"),w=ae("saturate"),j=ae("scale"),P=ae("sepia"),M=ae("skew"),N=ae("space"),I=ae("translate"),C=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",U,t],R=()=>[U,t],L=()=>["",qe,Qe],k=()=>["auto",vt,U],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],re=()=>["solid","dashed","dotted","double","none"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",U],xe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],de=()=>[vt,U];return{cacheSize:500,separator:":",theme:{colors:[Rt],spacing:[qe,Qe],blur:["none","",et,U],brightness:de(),borderColor:[e],borderRadius:["none","","full",et,U],borderSpacing:R(),borderWidth:L(),contrast:de(),grayscale:Q(),hueRotate:de(),invert:Q(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[_g,Qe],inset:O(),margin:O(),opacity:de(),padding:R(),saturate:de(),scale:de(),sepia:Q(),skew:de(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",U]}],container:["container"],columns:[{columns:[et]}],"break-after":[{"break-after":xe()}],"break-before":[{"break-before":xe()}],"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:[...K(),U]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Pt,U]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",U]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Pt,U]}],"grid-cols":[{"grid-cols":[Rt]}],"col-start-end":[{col:["auto",{span:["full",Pt,U]},U]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[Rt]}],"row-start-end":[{row:["auto",{span:[Pt,U]},U]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",U]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",U]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...ne()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ne(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ne(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],pe:[{pe:[A]}],pt:[{pt:[A]}],pr:[{pr:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",U,t]}],"min-w":[{"min-w":[U,t,"min","max","fit"]}],"max-w":[{"max-w":[U,t,"none","full","min","max","fit","prose",{screen:[et]},et]}],h:[{h:[U,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[U,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[U,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[U,t,"auto","min","max","fit"]}],"font-size":[{text:["base",et,Qe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Fr]}],"font-family":[{font:[Rt]}],"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",U]}],"line-clamp":[{"line-clamp":["none",vt,Fr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qe,U]}],"list-image":[{"list-image":["none",U]}],"list-style-type":[{list:["none","disc","decimal",U]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qe,Qe]}],"underline-offset":[{"underline-offset":["auto",qe,U]}],"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:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",U]}],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",U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),Lg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kg]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Bg]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"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:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...re(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:re()}],"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:["",...re()]}],"outline-offset":[{"outline-offset":[qe,U]}],"outline-w":[{outline:[qe,Qe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[qe,Qe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",et,zg]}],"shadow-color":[{shadow:[Rt]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...ue(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ue()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",et,U]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[P]}],"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":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",U]}],duration:[{duration:de()}],ease:[{ease:["linear","in","out","in-out",U]}],delay:[{delay:de()}],animate:[{animate:["none","spin","ping","pulse","bounce",U]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Pt,U]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"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",U]}],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",U]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",U]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[qe,Qe,Fr]}],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"]}}},Gg=Tg(Wg);function Z(...e){return Gg(le.clsx(e))}let Hr;function Wr(){return Hr===void 0&&(Hr=navigator.platform.includes("Mac")),Hr}function il(e){return`${e}`.toLowerCase()==="mod"?Wr()?"⌘":"Ctrl":`${e}`.toLowerCase()==="alt"?Wr()?"⌥":"Alt":`${e}`.toLowerCase()==="shift"?Wr()?"⇧":"Shift":e}function ol(e){return e.map(il).join(" ")}const F=b.forwardRef((e,t)=>{const{icon:r=void 0,tooltip:n=void 0,disabled:i=!1,customClass:o="",loading:s=void 0,shortcutKeys:c=void 0,tooltipOptions:l={},action:u=void 0,isActive:d=void 0,children:f,asChild:h=!1,upload:p=!1,...g}=e,m=oo[r],y=h?gc.Slot:Oo;return a.jsxs(Eo,{children:[a.jsx(Po,{asChild:!0,children:a.jsxs(y,{"data-state":d!=null&&d()?"on":"off",onClick:u,ref:t,size:"sm",className:Z("richtext-w-[32px] richtext-h-[32px]",o),disabled:i,...g,children:[m&&a.jsx(m,{className:"richtext-size-4"}),f]})}),n&&a.jsx(Ir,{...l,children:a.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[a.jsx("div",{children:n}),!!(c!=null&&c.length)&&a.jsx("span",{children:ol(c)})]})})]})});function Ug(e){const t=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return t.map((n,i)=>({type:`image-${n}`,component:F,componentProps:{tooltip:B.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateImage({width:B.IMAGE_SIZE[n]}),isActive:()=>e.isActive("image",{width:B.IMAGE_SIZE[n]})}}))}function Vg(e){const t=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return t.map((n,i)=>({type:`image-${n}`,component:F,componentProps:{tooltip:B.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateImageGif({width:B.IMAGE_SIZE[n]}),isActive:()=>e.isActive("image",{width:B.IMAGE_SIZE[n]})}}))}function Xg(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:F,componentProps:{tooltip:B.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 Kg(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:F,componentProps:{tooltip:B.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 Yg(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:F,componentProps:{tooltip:B.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 Zg(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:F,componentProps:{tooltip:B.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 Jg(e){const t=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return t.map((n,i)=>({type:`video-${n}`,component:F,componentProps:{tooltip:B.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateVideo({width:B.VIDEO_SIZE[n]}),isActive:()=>e.isActive("video",{width:B.VIDEO_SIZE[n]})}}))}function Qg(e){return[{type:"flipX",component:F,componentProps:{editor:e,tooltip:B.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:F,componentProps:{editor:e,tooltip:B.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()}}},...Ug(e),...Xg(e),{type:"remove",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;H.deleteSelection(t,r)}}}]}function em(e){return[...Vg(e),...Kg(e),{type:"remove",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;H.deleteSelection(t,r)}}}]}function tm(e){return[...Yg(e),{type:"edit",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.edit"),icon:"Pencil",action:()=>!0}},{type:"remove",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;H.deleteSelection(t,r)}}}]}function rm(e){return[...Zg(e),{type:"edit",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.edit"),icon:"Pencil",action:()=>(console.log("AAA"),!0)}},{type:"remove",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;H.deleteSelection(t,r)}}}]}function nm(e){return[...Jg(e),{type:"remove",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;H.deleteSelection(t,r)}}}]}function im(e,t){return B.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 no(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 H.NodeRange(e,t,r),s=o.depth===0?0:i.resolve(o.start).posAtIndex(0);return o.parent.forEach((c,l)=>{const u=s+l,d=u+c.nodeSize;if(u<o.start||u>=o.end)return;const f=new H.SelectionRange(i.resolve(u),i.resolve(d));n.push(f)}),n}class io{constructor(t,r){tr(this,"anchor");tr(this,"head");this.anchor=t,this.head=r}map(t){return new io(t.map(this.anchor),t.map(this.head))}resolve(t){const r=t.resolve(this.anchor),n=t.resolve(this.head);return new Ne(r,n)}}class Ne extends H.Selection{constructor(r,n,i,o=1){const{doc:s}=r,c=r===n,l=r.pos===s.content.size&&n.pos===s.content.size,u=c&&!l?s.resolve(n.pos+(o>0?1:-1)):n,d=c&&l?s.resolve(r.pos-(o>0?1:-1)):r,f=no(d.min(u),d.max(u),i);super(u.pos>=r.pos?f[0].$from:f[f.length-1].$to,u.pos>=r.pos?f[f.length-1].$to:f[0].$from,f);tr(this,"depth");this.depth=i}get $to(){return this.ranges[this.ranges.length-1].$to}eq(r){return r instanceof Ne&&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 Ne(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),s=o[0].$from,c=o[o.length-1].$to;return new Ne(s,c,this.depth)}const n=this.ranges[0],i=r.resolve(Math.max(0,n.$from.pos-1));return new Ne(this.$anchor,i,this.depth)}extendForwards(){const{doc:r}=this.$from;if(this.isBackwards&&this.ranges.length>1){const o=this.ranges.slice(1),s=o[0].$from,c=o[o.length-1].$to;return new Ne(c,s,this.depth)}const n=this.ranges[this.ranges.length-1],i=r.resolve(Math.min(r.content.size,n.$to.pos+1));return new Ne(this.$anchor,i,this.depth)}static fromJSON(r,n){return new Ne(r.resolve(n.anchor),r.resolve(n.head))}static create(r,n,i,o,s=1){return new this(r.resolve(n),r.resolve(i),o,s)}getBookmark(){return new io(this.anchor,this.head)}}function om(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(s){let c="";const l=getComputedStyle(s);for(let u=0;u<l.length;u+=1)c+=`${l[u]}:${l.getPropertyValue(l[u])};`;return c}(i)}),t}function ir(e,t){return window.getComputedStyle(e)[t]}function am(e=0,t=0,r=0){return Math.min(Math.max(e,t),r)}function ga(e){e.parentNode!==null&&e.parentNode!==void 0&&e.parentNode.removeChild(e)}function al(e){const{x:t,y:r,direction:n,editor:i}=e;let o=null,s=null,c=null,l=t;for(;s===null&&l<window.innerWidth&&l>0;){const u=document.elementsFromPoint(l,r),d=u.findIndex(h=>h.classList.contains("ProseMirror")),f=u.slice(0,d);if(f.length>0){const h=f[0];if(o=h,c=i.view.posAtDOM(h,0),c>=0){s=i.state.doc.nodeAt(Math.max(c-1,0)),(s===null||s.isText)&&(s=i.state.doc.nodeAt(Math.max(c-1,0))),s||(s=i.state.doc.nodeAt(Math.max(c,0)));break}}n==="left"?l-=1:l+=1}return{resultElement:o,resultNode:s,pos:c!==null?c:null}}function sm(e,t){const{doc:r}=t.view.state,n=al({editor:t,x:e.clientX,y:e.clientY,direction:"right"});if(!n.resultNode||n.pos===null)return[];const i=e.clientX,o=function(d,f,h){const p=Number.parseInt(ir(d.dom,"paddingLeft"),10),g=Number.parseInt(ir(d.dom,"paddingRight"),10),m=Number.parseInt(ir(d.dom,"borderLeftWidth"),10),y=Number.parseInt(ir(d.dom,"borderLeftWidth"),10),S=d.dom.getBoundingClientRect();return{left:am(f,S.left+p+m,S.right-g-y),top:h}}(t.view,i,e.clientY),s=t.view.posAtCoords(o);if(!s)return[];const{pos:c}=s;if(!r.resolve(c).parent)return[];const l=r.resolve(n.pos),u=r.resolve(n.pos+1);return no(l,u,0)}function ma(e,t){const r=e.resolve(t),{depth:n}=r;return n===0?t:r.pos-r.parentOffset-1}function xa(e,t){const r=e.nodeAt(t),n=e.resolve(t);let{depth:i}=n,o=r;for(;i>0;){const s=n.node(i);i-=1,i===0&&(o=s)}return o}function va(e,t){let r=t;for(;r&&r.parentNode&&r.parentNode!==e.dom;)r=r.parentNode;return r}const sl=new H.PluginKey("dragHandle");function cm({pluginKey:e=sl,element:t,editor:r,tippyOptions:n,onNodeChange:i}){const o=document.createElement("div");let s=null,c=!1,l=null,u=-1;return t.addEventListener("dragstart",d=>{const{view:f}=r;if(!d.dataTransfer)return;const{empty:h,$from:p,$to:g}=f.state.selection,m=sm(d,r),y=no(p,g,0),S=y.some(C=>m.find($=>$.$from===C.$from&&$.$to===C.$to)),A=h||!S?m:y;if(A.length===0)return;const{tr:w}=f.state,j=document.createElement("div"),P=A[0].$from.pos,M=A[A.length-1].$to.pos,N=Ne.create(f.state.doc,P,M),I=N.content();A.forEach(C=>{const $=om(f.nodeDOM(C.$from.pos));j.append($)}),j.style.position="absolute",j.style.top="-10000px",document.body.append(j),d.dataTransfer.clearData(),d.dataTransfer.setDragImage(j,0,0),f.dragging={slice:I,move:!0},w.setSelection(N),f.dispatch(w),document.addEventListener("drop",()=>ga(j),{once:!0}),setTimeout(()=>{t&&(t.style.pointerEvents="none")},0)}),t.addEventListener("dragend",()=>{t&&(t.style.pointerEvents="auto")}),new H.Plugin({key:typeof e=="string"?new H.PluginKey(e):e,state:{init:()=>({locked:!1}),apply(d,f){const h=d.getMeta("lockDragHandle"),p=d.getMeta("hideDragHandle");if(h!==void 0&&(c=h),p&&s)return s.hide(),c=!1,l=null,u=-1,i==null||i({editor:r,node:null,pos:-1}),f;if(d.docChanged&&u!==-1&&t&&s){const g=d.mapping.map(u);g!==u&&(u=g)}return f}},view:d=>{return f(),h(r.view.dom),s=mc(d.dom,{...p(),...n}),{update(j,P){if(!g(t,s)||(t.draggable=!c,!m(j,P)))return;const M=y(j);M&&S(j,M)},destroy(){w()}};function f(){t.draggable=!0,t.style.pointerEvents="auto"}function h(j){var P;(P=j.parentElement)==null||P.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 g(j,P){return j&&P}function m(j,P){return!j.state.doc.eq(P.doc)&&u!==-1}function y(j){let P=j.nodeDOM(u);return P=va(j,P),P===j.dom||(P==null?void 0:P.nodeType)!==1?null:P}function S(j,P){const M=j.posAtDOM(P,0),N=xa(r.state.doc,M);if(N===l)return;const I=ma(r.state.doc,M);l=N,u=I,i==null||i({editor:r,node:l,pos:u}),A(P)}function A(j){s.setProps({getReferenceClientRect:()=>j.getBoundingClientRect()}),s.show()}function w(){s==null||s.destroy(),t&&ga(o)}},props:{handleDOMEvents:{mouseleave:(d,f)=>{if(c||!h(f))return!1;return p(),g(),!1;function h(m){return m.target&&!o.contains(m.relatedTarget)}function p(){s==null||s.hide()}function g(){l=null,u=-1,i==null||i({editor:r,node:null,pos:-1})}},mousemove:Gt((d,f)=>{if(!t||!s||c)return!1;const h=al({x:f.clientX,y:f.clientY,direction:"right",editor:r});if(!h.resultElement||h.resultElement===d.dom)return!1;const p=va(d,h.resultElement);if(p===d.dom||(p==null?void 0:p.nodeType)!==1)return!1;const g=d.posAtDOM(p,0),m=xa(r.state.doc,g);if(m===l)return!1;const y=ma(r.state.doc,g);return l=m,u=y,i==null||i({editor:r,node:l,pos:u}),s.setProps({getReferenceClientRect:()=>p.getBoundingClientRect()}),s.show(),!1},100)}}})}var gr=(e=>(e[e.max=7]="max",e[e.min=0]="min",e[e.more=1]="more",e[e.less=-1]="less",e))(gr||{});function lm(e,t,r){return e<t?t:e>r?r:e}function um(e,t,r,n){const{doc:i,selection:o}=e;if(!i||!o||!(o instanceof H.TextSelection||o instanceof H.AllSelection))return e;const{from:s,to:c}=o;return i.nodesBetween(s,c,(l,u)=>{const d=l.type;return r.includes(d.name)?(e=Wi(e,u,t),!1):!H.isList(l.type.name,n.extensionManager.extensions)}),e}function Wi(e,t,r){if(!e.doc)return e;const n=e.doc.nodeAt(t);if(!n)return e;const s=lm((n.attrs.indent||0)+r,0,7);if(s===n.attrs.indent)return e;const c={...n.attrs,indent:s};return e.setNodeMarkup(t,n.type,c,n.marks)}function fm({delta:e,types:t}){return({state:r,dispatch:n,editor:i})=>{const{selection:o}=r;let{tr:s}=r;return s=s.setSelection(o),s=um(s,e,t,i),s.docChanged?(n&&n(s),!0):!1}}function dm(e){var I,C,$;const{pluginKey:t=sl}=e,{t:r}=B.useLocale(),[n,i]=b.useState(null),[o,s]=b.useState(-1),c=b.useRef(null),l=b.useRef(null),[u,d]=b.useState(!1),f=e.editor.extensionManager.extensions.some(O=>O.name==="textAlign"),h=e.editor.extensionManager.extensions.some(O=>O.name==="indent"),p=e.editor.extensionManager.extensions.some(O=>O.name==="clear");b.useEffect(()=>{c.current&&!e.editor.isDestroyed&&(l.current=cm({editor:e.editor,element:c.current,pluginKey:"ContentItemMenu",tippyOptions:{offset:[-2,16],zIndex:99,moveTransition:"transform 0.15s ease-out"},onNodeChange:P}),e.editor.registerPlugin(l.current))},[e.editor,c]);function g(){const O=e.editor.chain();O.setNodeSelection(o).unsetAllMarks(),(n==null?void 0:n.type.name)!=="paragraph"&&O.setParagraph(),O.run()}function m(){e.editor.chain().focus().setNodeSelection(o).run(),document.execCommand("copy")}function y(){e.editor.commands.setNodeSelection(o);const{$anchor:O}=e.editor.state.selection,R=O.node(1)||e.editor.state.selection.node;e.editor.chain().setMeta("hideDragHandle",!0).insertContentAt(o+((n==null?void 0:n.nodeSize)||0),R.toJSON()).run()}function S(O){e.editor.commands.setTextAlign(O)}function A(){const O=Wi(e.editor.state.tr,o,1);O.setMeta("hideDragHandle",!0),e.editor.view.dispatch&&e.editor.view.dispatch(O)}function w(){const O=Wi(e.editor.state.tr,o,-1);e.editor.view.dispatch&&e.editor.view.dispatch(O)}function j(){e.editor.chain().setMeta("hideDragHandle",!0).setNodeSelection(o).deleteSelection().run()}function P(O){O.node&&i(O.node),s(O.pos)}function M(){var O;if(o!==-1){const R=(n==null?void 0:n.nodeSize)||0,L=o+R,k=(n==null?void 0:n.type.name)==="paragraph"&&((O=n==null?void 0:n.content)==null?void 0:O.size)===0,K=k?o+2:L+2;e.editor.chain().command(({dispatch:re,tr:ue,state:ne})=>re?(k?ue.insertText("/",o,o+1):ue.insert(L,ne.schema.nodes.paragraph.create(null,[ne.schema.text("/")])),re(ue)):!0).focus(K).run()}}b.useEffect(()=>(u?e.editor.commands.setMeta("lockDragHandle",!0):e.editor.commands.setMeta("lockDragHandle",!1),()=>{e.editor.commands.setMeta("lockDragHandle",!1)}),[u]),b.useEffect(()=>()=>{l.current&&(e.editor.unregisterPlugin(t),l.current=null)},[]),b.useEffect(()=>{var O;(O=e.editor)!=null&&O.isDestroyed&&l.current&&(e.editor.unregisterPlugin(t),l.current=null)},[(I=e.editor)==null?void 0:I.isDestroyed]);const N=O=>{e!=null&&e.disabled||d(O)};return a.jsx("div",{ref:c,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:a.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-0.5 richtext-duration-200 richtext-ease-in-out [transition-property:top,_left]",children:[a.jsx(me,{className:"!richtext-size-7 richtext-cursor-grab",disabled:e==null?void 0:e.disabled,onClick:M,size:"icon",type:"button",variant:"ghost",children:a.jsx(ge,{className:"richtext-text-lg richtext-text-neutral-600 dark:richtext-text-neutral-200",name:"Plus"})}),a.jsxs(Vl,{onOpenChange:N,open:u,children:[a.jsxs("div",{className:"richtext-relative richtext-flex richtext-flex-col",children:[a.jsxs(Eo,{children:[a.jsx(Po,{asChild:!0,disabled:e==null?void 0:e.disabled,children:a.jsx(me,{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:O=>{O.preventDefault(),!(e!=null&&e.disabled)&&d(!0)},children:a.jsx(ge,{className:"richtext-text-sm richtext-text-neutral-600 dark:richtext-text-neutral-200",name:"Grip"})})}),a.jsx(Ir,{children:r("editor.draghandle.tooltip")})]}),a.jsx(Xl,{className:"richtext-absolute richtext-left-0 richtext-top-0 richtext-z-0 richtext-size-[28px]"})]}),a.jsxs(jo,{align:"start",className:"richtext-w-48",side:"bottom",sideOffset:0,children:[a.jsxs(Me,{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:j,children:[a.jsx(ge,{name:"Trash2"}),a.jsx("span",{children:r("editor.remove")})]}),p?a.jsxs(Me,{className:"richtext-flex richtext-gap-3",onClick:g,children:[a.jsx(ge,{name:"PaintRoller"}),a.jsx("span",{children:r("editor.clear.tooltip")})]}):null,a.jsxs(Me,{className:"richtext-flex richtext-gap-3",onClick:m,children:[a.jsx(ge,{name:"Clipboard"}),a.jsx("span",{children:r("editor.copyToClipboard")})]}),a.jsxs(Me,{className:"richtext-flex richtext-gap-3",onClick:y,children:[a.jsx(ge,{name:"Copy"}),a.jsx("span",{children:r("editor.copy")})]}),f||h?a.jsx(Co,{}):null,f?a.jsxs(lc,{children:[a.jsxs(Gi,{className:"richtext-flex richtext-gap-3",children:[a.jsx(ge,{name:"AlignCenter"}),a.jsx("span",{children:r("editor.textalign.tooltip")})]}),a.jsx(cc,{children:a.jsxs(Ui,{children:[a.jsxs(Me,{className:"richtext-flex richtext-gap-3",onClick:()=>S("left"),children:[a.jsx(ge,{name:"AlignLeft"}),a.jsx("span",{children:r("editor.textalign.left.tooltip")})]}),a.jsxs(Me,{className:"richtext-flex richtext-gap-3",onClick:()=>S("center"),children:[a.jsx(ge,{name:"AlignCenter"}),a.jsx("span",{children:r("editor.textalign.center.tooltip")})]}),a.jsxs(Me,{className:"richtext-flex richtext-gap-3",onClick:()=>S("right"),children:[a.jsx(ge,{name:"AlignRight"}),a.jsx("span",{children:r("editor.textalign.right.tooltip")})]})]})})]}):null,h?a.jsxs(lc,{children:[a.jsxs(Gi,{className:"richtext-flex richtext-gap-3",children:[a.jsx(ge,{name:"IndentIncrease"}),a.jsx("span",{children:r("editor.indent")})]}),a.jsx(cc,{children:a.jsxs(Ui,{children:[a.jsxs(Me,{className:"richtext-flex richtext-gap-3",disabled:((C=n==null?void 0:n.attrs)==null?void 0:C.indent)>=gr.max,onClick:A,children:[a.jsx(ge,{name:"IndentIncrease"}),a.jsx("span",{children:r("editor.indent.tooltip")})]}),a.jsxs(Me,{className:"richtext-flex richtext-gap-3",disabled:(($=n==null?void 0:n.attrs)==null?void 0:$.indent)<=gr.min,onClick:w,children:[a.jsx(ge,{name:"IndentDecrease"}),a.jsx("span",{children:r("editor.outdent.tooltip")})]})]})})]}):null]})]})]})})}const hm={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function pm({item:e,disabled:t,editor:r}){var i;const n=e.component;return n?a.jsx(n,{...e.componentProps,disabled:t||((i=e==null?void 0:e.componentProps)==null?void 0:i.disabled),editor:r}):a.jsx(a.Fragment,{})}function gm(e){const{t,lang:r}=B.useLocale(),n=({editor:o})=>{const{selection:s}=o.view.state,{$from:c,to:l}=s;return c.pos===l?!1:s instanceof H.TextSelection},i=b.useMemo(()=>e.disabled||!(e!=null&&e.editor)?[]:im(e.editor,t),[e.disabled,e.editor,r,t]);return a.jsx(le.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:n,tippyOptions:hm,children:i!=null&&i.length?a.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:a.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,s)=>(o==null?void 0:o.type)==="divider"?a.jsx(Re,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"},`bubbleMenu-divider-${s}`):a.jsx(pm,{disabled:e.disabled,editor:e.editor,item:o},`bubbleMenu-text-${s}`))})}):a.jsx(a.Fragment,{})})}function mm(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.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 xm(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.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 vm(){return a.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:a.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 ym(){return a.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:a.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 bm(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.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 ge(e){const t=oo[e.name];return t?a.jsx(t,{onClick:e==null?void 0:e.onClick,className:`richtext-w-4 richtext-h-4 ${(e==null?void 0:e.className)||""}`}):null}function wm(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.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 cl(e){return a.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:a.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M36 19L24 31L12 19z"})})}function Sm(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M9 7v10h6v-2h-4V7z"})})}function Am(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M9 7c-1.1 0-2 .9-2 2v8h2V9h2v7h2V9h2v8h2V9a2 2 0 0 0-2-2z"})})}function jm(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.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 Cm(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 Tm(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 Im(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 Om(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 ll(){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",children:[a.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"}),a.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 ul(){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:"icon",viewBox:"0 0 1024 1024",children:[a.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"}),a.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 Em(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentColor",children:[a.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"}),a.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 Pm(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:a.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 Rm(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:a.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"4",children:[a.jsx("circle",{cx:"10",cy:"24",r:"4"}),a.jsx("circle",{cx:"38",cy:"10",r:"4"}),a.jsx("circle",{cx:"38",cy:"24",r:"4"}),a.jsx("circle",{cx:"38",cy:"38",r:"4"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M34 38H22V10h12M14 24h20"})]})})}function Mm(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:a.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 Nm(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 _m(){return a.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:a.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 oo={Bold:E.Bold,LoaderCircle:E.LoaderCircle,Italic:E.Italic,Underline:E.Underline,Quote:E.Quote,TextQuote:xm,Strikethrough:E.Strikethrough,Minus:E.Minus,Eraser:E.Eraser,PaintRoller:E.PaintRoller,Redo2:E.Redo2,Undo2:E.Undo2,AlignCenter:rr.TextAlignCenterIcon,AlignJustify:rr.TextAlignJustifyIcon,AlignLeft:rr.TextAlignLeftIcon,AlignRight:rr.TextAlignRightIcon,ChevronDown:E.ChevronDown,Subscript:E.Subscript,Superscript:E.Superscript,Code:E.Code,Code2:E.CodeXml,Type:E.Type,IndentIncrease:E.IndentIncrease,IndentDecrease:E.IndentDecrease,List:E.List,ListOrdered:E.ListOrdered,ListTodo:E.ListTodo,Link:E.Link,ImageUp:E.ImageUp,Video:E.Video,Maximize:E.Maximize,Minimize:E.Minimize,Table:E.Table,Sparkles:E.Sparkles,Pencil:E.Pencil,Unlink:E.Unlink,BetweenHorizonalEnd:E.BetweenHorizonalEnd,BetweenHorizonalStart:E.BetweenHorizonalStart,BetweenVerticalStart:E.BetweenVerticalStart,BetweenVerticalEnd:E.BetweenVerticalEnd,TableCellsMerge:E.TableCellsMerge,TableCellsSplit:E.TableCellsSplit,Trash2:E.Trash2,Trash:E.Trash,Replace:E.Replace,ChevronsUpDown:E.ChevronsUpDown,LineHeight:wm,Word:bm,Heading1:E.Heading1,Heading2:E.Heading2,Heading3:E.Heading3,Heading4:E.Heading4,Heading5:E.Heading5,Heading6:E.Heading6,Columns2:E.Columns2,Columns3:E.Columns3,Columns4:E.Columns4,Plus:E.Plus,Grip:E.GripVertical,Copy:E.Copy,Clipboard:E.Clipboard,PanelLeft:E.PanelLeft,PanelRight:E.PanelRight,Columns:E.Columns2,Iframe:E.Frame,MenuDown:cl,SizeS:jm,SizeM:Am,SizeL:Sm,AspectRatio:mm,Emoji:E.SmilePlus,DeleteColumn:vm,DeleteRow:ym,SearchAndReplace:E.Replace,EmojiIcon:E.SmilePlusIcon,KatexIcon:E.Sigma,ExportPdf:ll,ExportWord:ul,ImportWord:_m,ColumnAddLeft:Cm,ColumnAddRight:Tm,BookMarked:E.BookMarked,Excalidraw:Om,ZoomIn:E.ZoomIn,ZoomOut:E.ZoomOut,Settings:E.Settings,Eye:E.Eye,TextDirection:Im,LeftToRight:Pm,RightToLeft:Mm,Attachment:E.Paperclip,GifIcon:Em,ChevronUp:E.ChevronUp,Crop:E.CropIcon,Mermaid:Rm,Twitter:Nm,FlipX:E.FlipVertical,FlipY:E.FlipHorizontal,PencilRuler:E.PencilRuler,WrapText:E.WrapText};function $m({fill:e}){return a.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("g",{id:"icon/填充色",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:a.jsxs("g",{id:"icon/背景颜色",children:[a.jsx("g",{id:"编组",fill:"currentColor",children:a.jsxs("g",{transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)",id:"矩形",children:[a.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"}),a.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"}),a.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"})]})}),a.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 fl(e){const[t,r]=b.useState(void 0);function n(s){var c;(c=e.action)==null||c.call(e,s)}function i(){var s;(s=e.action)==null||s.call(e,t)}const o=b.useCallback(Gt(s=>{r(s)},350),[]);return a.jsxs("div",{className:"richtext-flex richtext-items-center richtext-h-[32px]",children:[a.jsx(F,{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:a.jsx("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-text-sm",children:a.jsx($m,{fill:t})})}),a.jsx(su,{selectedColor:t,setSelectedColor:o,onChange:n,highlight:!0,disabled:e==null?void 0:e.disabled,children:a.jsx(me,{variant:"ghost",size:"icon",className:"!richtext-w-3 !richtext-h-[32px]",disabled:e==null?void 0:e.disabled,children:a.jsx(ge,{className:"!richtext-w-3 !richtext-h-3 richtext-text-zinc-500",name:"MenuDown"})})})]})}function km({editor:e,disabled:t,actions:r}){var y,S,A,w,j,P,M,N,I,C,$,O,R,L,k,K,re,ue;const n=({editor:ne})=>H.isActive(ne.view.state,"table"),{t:i}=B.useLocale();function o(){e.chain().focus().addColumnBefore().run()}function s(){e.chain().focus().addColumnAfter().run()}function c(){e.chain().focus().deleteColumn().run()}function l(){e.chain().focus().addRowBefore().run()}function u(){e.chain().focus().addRowAfter().run()}function d(){e.chain().focus().deleteRow().run()}function f(){e.chain().focus().mergeCells().run()}function h(){e==null||e.chain().focus().splitCell().run()}function p(){e.chain().focus().deleteTable().run()}function g(ne){e.chain().focus().setTableCellBackground(ne).run()}const m=()=>{var Oe;const{view:ne,state:{selection:{from:Q}}}=e,xe=ne.domAtPos(Q).node;if(!xe)return new DOMRect(-1e3,-1e3,0,0);const de=(Oe=xe==null?void 0:xe.closest)==null?void 0:Oe.call(xe,".tableWrapper");return de?de.getBoundingClientRect():new DOMRect(-1e3,-1e3,0,0)};return a.jsx(le.BubbleMenu,{editor:e,pluginKey:"table",shouldShow:n,updateDelay:0,tippyOptions:{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},maxWidth:"auto",getReferenceClientRect:m,plugins:[mc.sticky],sticky:"popper"},children:t?a.jsx(a.Fragment,{}):a.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:[a.jsx(F,{action:o,disabled:!((S=(y=e==null?void 0:e.can())==null?void 0:y.addColumnBefore)!=null&&S.call(y)),icon:"BetweenHorizonalEnd",tooltip:i("editor.table.menu.insertColumnBefore"),"tooltip-options":{sideOffset:15}}),a.jsx(F,{action:s,disabled:!((w=(A=e==null?void 0:e.can())==null?void 0:A.addColumnAfter)!=null&&w.call(A)),icon:"BetweenHorizonalStart",tooltip:i("editor.table.menu.insertColumnAfter"),"tooltip-options":{sideOffset:15}}),a.jsx(F,{action:c,disabled:!((P=e==null?void 0:(j=e.can()).deleteColumn)!=null&&P.call(j)),icon:"DeleteColumn",tooltip:i("editor.table.menu.deleteColumn"),"tooltip-options":{sideOffset:15}}),a.jsx(Re,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),a.jsx(F,{action:l,disabled:!((N=e==null?void 0:(M=e.can()).addRowBefore)!=null&&N.call(M)),icon:"BetweenVerticalEnd",tooltip:i("editor.table.menu.insertRowAbove"),"tooltip-options":{sideOffset:15}}),a.jsx(F,{action:u,disabled:!((C=(I=e==null?void 0:e.can())==null?void 0:I.addRowAfter)!=null&&C.call(I)),icon:"BetweenVerticalStart",tooltip:i("editor.table.menu.insertRowBelow"),"tooltip-options":{sideOffset:15}}),a.jsx(F,{action:d,disabled:!((O=($=e==null?void 0:e.can())==null?void 0:$.deleteRow)!=null&&O.call($)),icon:"DeleteRow",tooltip:i("editor.table.menu.deleteRow"),"tooltip-options":{sideOffset:15}}),a.jsx(Re,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),a.jsx(F,{action:f,disabled:!((L=(R=e==null?void 0:e.can())==null?void 0:R.mergeCells)!=null&&L.call(R)),icon:"TableCellsMerge",tooltip:i("editor.table.menu.mergeCells"),"tooltip-options":{sideOffset:15}}),a.jsx(F,{action:h,disabled:!((K=(k=e==null?void 0:e.can())==null?void 0:k.splitCell)!=null&&K.call(k)),icon:"TableCellsSplit",tooltip:i("editor.table.menu.splitCells"),"tooltip-options":{sideOffset:15}}),a.jsx(Re,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),a.jsx(fl,{action:g,editor:e,tooltip:i("editor.table.menu.setCellsBgColor"),tooltipOptions:{sideOffset:15}}),a.jsx(F,{action:p,disabled:!((ue=(re=e==null?void 0:e.can())==null?void 0:re.deleteTable)!=null&&ue.call(re)),icon:"Trash2",tooltip:i("editor.table.menu.deleteTable"),"tooltip-options":{sideOffset:15}}),r&&r.map((ne,Q)=>a.jsx(F,{...ne},Q))]})})}function dl(e){const{t}=B.useLocale(),[r,n]=b.useState({text:"",link:""}),[i,o]=b.useState(!1);b.useEffect(()=>{var c;if(e!=null&&e.editor){const{href:l,target:u}=(c=e.editor)==null?void 0:c.getAttributes("link"),{from:d,to:f}=e.editor.state.selection,h=e.editor.state.doc.textBetween(d,f," ");n({link:l,text:h}),o(u==="_blank")}},[e==null?void 0:e.editor]);function s(c){c.preventDefault(),c.stopPropagation(),e==null||e.onSetLink(r.link,r.text,i)}return a.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:a.jsxs("form",{className:"richtext-flex richtext-flex-col richtext-gap-2",onSubmit:s,children:[a.jsx(He,{className:"mb-[6px]",children:t("editor.link.dialog.text")}),a.jsx("div",{className:"richtext-mb-[10px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:a.jsx("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center",children:a.jsx(Ae,{className:"richtext-w-80",onChange:c=>n({...r,text:c.target.value}),placeholder:"Text",required:!0,type:"text",value:r.text})})}),a.jsx(He,{className:"mb-[6px]",children:t("editor.link.dialog.link")}),a.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:a.jsxs("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center",children:[a.jsx(Ae,{className:"richtext-pl-10",onChange:c=>n({...r,link:c.target.value}),required:!0,type:"url",value:r.link}),a.jsx("span",{className:"richtext-absolute richtext-inset-y-0 richtext-start-0 richtext-flex richtext-items-center richtext-justify-center richtext-px-2",children:a.jsx(ge,{className:"richtext-size-5 richtext-text-muted-foreground",name:"Link"})})]})}),a.jsxs("div",{className:"richtext-flex richtext-items-center richtext-space-x-2",children:[a.jsx(He,{children:t("editor.link.dialog.openInNewTab")}),a.jsx(To,{checked:i,onCheckedChange:c=>{o(c)}})]}),a.jsx(me,{className:"richtext-mt-2 richtext-self-end",type:"submit",children:t("editor.link.dialog.button.apply")})]})})}function Lm(e){const{t}=B.useLocale();return a.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:[a.jsx("a",{href:e==null?void 0:e.link,target:"_blank",rel:"noopener noreferrer",className:"richtext-text-sm richtext-underline richtext-break-all",children:hg(e==null?void 0:e.link,{length:50,omission:"…"})}),(e==null?void 0:e.link)&&a.jsx(Re,{orientation:"vertical",className:"!richtext-h-4"}),a.jsxs("div",{className:"richtext-flex richtext-flex-nowrap",children:[a.jsx(F,{icon:"Pencil",tooltip:t("editor.link.edit.tooltip"),action:()=>{e==null||e.onEdit()},tooltipOptions:{sideOffset:15}}),a.jsx(F,{icon:"Unlink",tooltip:t("editor.link.unlink.tooltip"),action:()=>{e==null||e.onClear()},tooltipOptions:{sideOffset:15}})]})]})}function Dm({editor:e,disabled:t}){const[r,n]=b.useState(!1),i=b.useMemo(()=>{const{href:l}=e.getAttributes("link");return l},[e]),o=b.useCallback(({editor:l})=>l.isActive("link"),[]),s=(l,u,d)=>{e.chain().extendMarkRange("link").insertContent({type:"text",text:u,marks:[{type:"link",attrs:{href:l,target:d?"_blank":""}}]}).setLink({href:l}).focus().run(),n(!1)},c=b.useCallback(()=>{e.chain().extendMarkRange("link").unsetLink().focus().run(),n(!1)},[e]);return a.jsx(a.Fragment,{children:a.jsx(le.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?a.jsx(a.Fragment,{}):a.jsx(a.Fragment,{children:r?a.jsx(dl,{onSetLink:s,editor:e}):a.jsx(Lm,{editor:e,onClear:c,onEdit:()=>{n(!0)},link:i})})})})}const Bm=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,ao=H.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",H.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[H.nodeInputRule({find:Bm,type:this.type,getAttributes:e=>{const[,,t,r,n]=e;return{src:r,alt:t,title:n}}})]}}),Ut=Ce.Root,Vt=Ce.Trigger,zm=Ce.Portal,hl=ee.forwardRef(({className:e,...t},r)=>a.jsx(Ce.Overlay,{ref:r,className:Z("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}));hl.displayName=Ce.Overlay.displayName;const At=ee.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(zm,{children:[a.jsx(hl,{}),a.jsxs(Ce.Content,{ref:n,className:Z("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,a.jsxs(Ce.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:[a.jsx(E.X,{className:"richtext-h-4 richtext-w-4"}),a.jsx("span",{className:"richtext-sr-only",children:"Close"})]})]})]}));At.displayName=Ce.Content.displayName;function pl({className:e,...t}){return a.jsx("div",{className:Z("richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",e),...t})}pl.displayName="DialogHeader";function br({className:e,...t}){return a.jsx("div",{className:Z("richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",e),...t})}br.displayName="DialogFooter";const jt=ee.forwardRef(({className:e,...t},r)=>a.jsx(Ce.Title,{ref:r,className:Z("richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight",e),...t}));jt.displayName=Ce.Title.displayName;const qm=ee.forwardRef(({className:e,...t},r)=>a.jsx(Ce.Description,{ref:r,className:Z("richtext-text-sm richtext-text-muted-foreground",e),...t}));qm.displayName=Ce.Description.displayName;const ya=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ba=le.clsx,wr=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ba(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const d=r==null?void 0:r[u],f=o==null?void 0:o[u];if(d===null)return null;const h=ya(d)||ya(f);return i[u][h]}),c=r&&Object.entries(r).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(g=>{let[m,y]=g;return Array.isArray(y)?y.includes({...o,...c}[m]):{...o,...c}[m]===y})?[...u,f,h]:u},[]);return ba(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)},Fm=wr("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"}}),me=ee.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},o)=>{const s=n?gc.Slot:"button";return a.jsx(s,{className:Z(Fm({variant:t,size:r,className:e})),ref:o,...i})});me.displayName="Button";function Hm(e){return e.replace(/^.*\/|\..+$/g,"")}function Wm(e){return e.split(".").pop()}function Gm(e){return e<1024?`${e} Byte`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:`${(e/1024/1024).toFixed(2)} MB`}function Um(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 Vm(e){return new Promise(t=>{const r=new FileReader;r.addEventListener("load",()=>{t({alt:e.name,src:r.result})},!1),r.readAsDataURL(e)})}function gl(e,t){const r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[r.length-1]);let o=i.length;const s=new Uint8Array(o);for(;o--;)s[o]=i.charCodeAt(o);return new File([s],t,{type:n})}function Xm({editor:e,imageInline:t,onClose:r}){const{t:n}=B.useLocale(),[i,o]=b.useState(!1),s=b.useRef(null),[c,l]=b.useState(),[u,d]=b.useState(""),f=b.useRef(null),[h,p]=b.useState({src:"",file:null});function g(w){if(s.current&&w.width&&w.height){const j=m(s.current,w);d(j)}}function m(w,j){const P=document.createElement("canvas"),M=w.naturalWidth/w.width,N=w.naturalHeight/w.height;P.width=j.width*M,P.height=j.height*N;const I=P.getContext("2d");return I&&(I.imageSmoothingEnabled=!1,I.drawImage(w,j.x*M,j.y*N,j.width*M,j.height*N,0,0,j.width*M,j.height*N)),P.toDataURL("image/png",1)}async function y(){var w,j;try{const P=gl(u,((w=h==null?void 0:h.file)==null?void 0:w.name)||"image.png"),M=(j=e.extensionManager.extensions.find(I=>I.name===wt.name))==null?void 0:j.options;let N="";M.upload?N=await M.upload(P):N=URL.createObjectURL(P),e.chain().focus().setImageInline({src:N,inline:t}).run(),o(!1),p({src:"",file:null}),r()}catch(P){console.log("Error cropping image",P)}}function S(w){var j;w.preventDefault(),(j=f.current)==null||j.click()}const A=async w=>{var N;const j=(N=w==null?void 0:w.target)==null?void 0:N.files;if(!e||e.isDestroyed||j.length===0)return;const P=j[0],M=await Vm(P);o(!0),p({src:M.src,file:P})};return a.jsxs(a.Fragment,{children:[a.jsx(me,{className:"richtext-mt-1 richtext-w-full",onClick:S,size:"sm",children:n("editor.image.dialog.tab.uploadCrop")}),a.jsxs(Ut,{open:i,children:[a.jsx(Vt,{}),a.jsxs(At,{children:[a.jsx(jt,{children:n("editor.image.dialog.tab.uploadCrop")}),a.jsx("div",{children:h.src&&a.jsx(Tu,{className:"richtext-w-full",crop:c,onChange:w=>l(w),onComplete:w=>g(w),children:a.jsx("img",{alt:"Crop me",ref:s,src:h.src})})}),a.jsxs(br,{children:[a.jsxs(me,{onClick:()=>{o(!1),p({src:"",file:null})},children:[n("editor.imageUpload.cancel"),a.jsx(ge,{className:"richtext-ml-[4px]",name:"Trash2"})]}),a.jsxs(me,{className:"richtext-w-fit",onClick:y,children:[n("editor.imageUpload.crop"),a.jsx(ge,{className:"richtext-ml-[4px]",name:"Crop"})]})]})]})]}),a.jsx("input",{accept:"image/*",multiple:!0,onChange:A,ref:f,type:"file",style:{display:"none"}})]})}function Sr(e){function t(){const o=b.useRef(e),s=b.useCallback(()=>o.current,[]),c=b.useRef(new Set),l=b.useCallback(d=>{o.current={...o.current,...d},c.current.forEach(f=>f())},[]),u=b.useCallback(d=>(c.current.add(d),()=>c.current.delete(d)),[]);return{get:s,set:l,subscribe:u}}const r=b.createContext(null);function n({children:o}){return a.jsx(r.Provider,{value:t(),children:o})}function i(o){const s=b.useContext(r);if(!s)throw new Error("Store not found");return[b.useSyncExternalStore(s.subscribe,()=>o(s.get()),()=>o(e)),s.set]}return{Provider:n,useStore:i}}Sr({value:!1});Sr({value:!1});const{Provider:Km,useStore:ml}=Sr({value:!1}),{Provider:Ym,useStore:xl}=Sr({value:"light"});B.d("0");function Bt(e,t){return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}function Ar(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}const nt={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"},vl={setOpen:(e,t)=>{Ar(nt.UPLOAD_IMAGE(e),t)}};function Zm(e){var g;const{t}=B.useLocale(),[r,n]=b.useState(!1),i=m=>{n(m.detail)},[o,s]=b.useState(""),c=b.useRef(null),[l,u]=b.useState(((g=e.editor.extensionManager.extensions.find(m=>m.name===wt.name))==null?void 0:g.options.defaultInline)||!1),d=b.useMemo(()=>{var y;return(y=e.editor.extensionManager.extensions.find(S=>S.name===wt.name))==null?void 0:y.options},[e.editor]);b.useEffect(()=>{const m=Bt(nt.UPLOAD_IMAGE(e.editor.id),i);return()=>{m()}},[]);async function f(m){var w;const y=(w=m==null?void 0:m.target)==null?void 0:w.files;if(!e.editor||e.editor.isDestroyed||y.length===0)return;const S=y[0];let A="";d.upload?A=await d.upload(S):A=URL.createObjectURL(S),e.editor.chain().focus().setImageInline({src:A,inline:l}).run(),n(!1),u(!1)}function h(m){m.preventDefault(),m.stopPropagation(),e.editor.chain().focus().setImageInline({src:o,inline:l}).run(),n(!1),u(!1),s("")}function p(m){var y;m.preventDefault(),(y=c.current)==null||y.click()}return a.jsxs(Ut,{onOpenChange:n,open:r,children:[a.jsx(Vt,{asChild:!0,children:a.jsx(F,{action:()=>n(!0),icon:e.icon,tooltip:e.tooltip})}),a.jsxs(At,{children:[a.jsx(jt,{children:t("editor.image.dialog.title")}),a.jsxs(Zl,{activationMode:"manual",defaultValue:d.resourceImage==="both"||d.resourceImage==="upload"?"upload":"link",children:[a.jsxs(Io,{className:"richtext-grid richtext-w-full richtext-grid-cols-2",children:[d.resourceImage==="both"||d.resourceImage==="upload"?a.jsx(Ft,{value:"upload",children:t("editor.image.dialog.tab.upload")}):a.jsx(a.Fragment,{}),d.resourceImage==="both"||d.resourceImage==="link"?a.jsx(Ft,{value:"link",children:t("editor.image.dialog.tab.url")}):a.jsx(a.Fragment,{})]}),a.jsxs("div",{className:"richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]",children:[a.jsx(iu,{checked:l,onCheckedChange:m=>{u(m)}}),a.jsx(He,{children:t("editor.link.dialog.inline")})]}),a.jsxs(Ht,{value:"upload",children:[a.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:[a.jsx(me,{className:"richtext-mt-1 richtext-w-full",onClick:p,size:"sm",children:t("editor.image.dialog.tab.upload")}),a.jsx(Xm,{editor:e.editor,imageInline:l,onClose:()=>vl.setOpen(e.editor.id,!1)})]}),a.jsx("input",{accept:"image/*",multiple:!0,onChange:f,ref:c,type:"file",style:{display:"none"}})]}),a.jsx(Ht,{value:"link",children:a.jsx("form",{onSubmit:h,children:a.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[a.jsx(Ae,{autoFocus:!0,onChange:m=>s(m.target.value),placeholder:t("editor.image.dialog.placeholder"),required:!0,type:"url",value:o}),a.jsx(me,{type:"submit",children:t("editor.image.dialog.button.apply")})]})})})]})]})]})}const or={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function Jm(e){var N,I;const[t,r]=b.useState({width:B.IMAGE_MAX_SIZE,height:B.IMAGE_MAX_SIZE}),[n,i]=b.useState({width:0,height:0}),[o]=b.useState([or.TOP_LEFT,or.TOP_RIGHT,or.BOTTOM_LEFT,or.BOTTOM_RIGHT]),[s,c]=b.useState(!1),[l,u]=b.useState({x:0,y:0,w:0,h:0,dir:""}),{align:d,inline:f}=(N=e==null?void 0:e.node)==null?void 0:N.attrs,h=b.useMemo(()=>{var Q;const{src:C,alt:$,width:O,height:R,flipX:L,flipY:k}=(Q=e==null?void 0:e.node)==null?void 0:Q.attrs,K=pr(O)?`${O}px`:O,re=pr(R)?`${R}px`:R,ue=[];L&&ue.push("rotateX(180deg)"),k&&ue.push("rotateY(180deg)");const ne=ue.join(" ");return{src:C||void 0,alt:$||void 0,style:{width:K||void 0,height:re||void 0,transform:ne||"none"}}},[(I=e==null?void 0:e.node)==null?void 0:I.attrs]),p=b.useMemo(()=>{const{style:{width:C}}=h;return{width:C==="100%"?C:void 0}},[h]);function g(C){i({width:C.target.width,height:C.target.height})}function m(){const{editor:C,getPos:$}=e;C.commands.setNodeSelection($())}const y=b.useCallback(bt(()=>{const{editor:C}=e,{width:$}=getComputedStyle(C.view.dom);r(O=>({...O,width:Number.parseInt($,10)}))},B.IMAGE_THROTTLE_WAIT_TIME),[e==null?void 0:e.editor]);function S(C,$){C.preventDefault(),C.stopPropagation();const O=n.width,R=n.height,L=O/R;let k=Number(e.node.attrs.width),K=Number(e.node.attrs.height);const re=t.width;k&&!K?(k=k>re?re:k,K=Math.round(k/L)):K&&!k?(k=Math.round(K*L),k=k>re?re:k):!k&&!K?(k=O>re?re:O,K=Math.round(k/L)):k=k>re?re:k,c(!0),u({x:C.clientX,y:C.clientY,w:k,h:K,dir:$})}const A=b.useCallback(bt(C=>{if(C.preventDefault(),C.stopPropagation(),!s)return;const{x:$,w:O,dir:R}=l,L=(C.clientX-$)*(/l/.test(R)?-1:1),k=qc(O+L,B.IMAGE_MIN_SIZE,t.width);e.updateAttributes({width:k,height:null})},B.IMAGE_THROTTLE_WAIT_TIME),[s,l,t,e.updateAttributes]),w=b.useCallback(C=>{C.preventDefault(),C.stopPropagation(),s&&(u({x:0,y:0,w:0,h:0,dir:""}),c(!1),m())},[s,m]),j=b.useCallback(()=>{document==null||document.addEventListener("mousemove",A,!0),document==null||document.addEventListener("mouseup",w,!0)},[A,w]),P=b.useCallback(()=>{document==null||document.removeEventListener("mousemove",A,!0),document==null||document.removeEventListener("mouseup",w,!0)},[A,w]);b.useEffect(()=>(s?j():P(),()=>{P()}),[s,j,P]);const M=b.useMemo(()=>new ResizeObserver(()=>y()),[y]);return b.useEffect(()=>(M.observe(e.editor.view.dom),()=>{M.disconnect()}),[e.editor.view.dom,M]),a.jsx(le.NodeViewWrapper,{as:f?"span":"div",className:"image-view",style:{...p,textAlign:d,display:f?"inline":"block"},children:a.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:p,className:`image-view__body ${e!=null&&e.selected?"image-view__body--focused":""} ${s?"image-view__body--resizing":""}`,children:[a.jsx("img",{alt:h.alt,className:"image-view__body__image block",height:"auto",onClick:m,onLoad:g,src:h.src,style:h.style}),(e==null?void 0:e.editor.view.editable)&&((e==null?void 0:e.selected)||s)&&a.jsx("div",{className:"image-resizer",children:o==null?void 0:o.map(C=>a.jsx("span",{className:`image-resizer__handler image-resizer__handler--${C}`,onMouseDown:$=>S($,C)},`image-dir-${C}`))})]})})}const yt=new H.PluginKey("upload-image");function Qm(){return new H.Plugin({key:yt,state:{init(){return H.DecorationSet.empty},apply(e,t){t=t.map(e.mapping,e.doc);const r=e.getMeta(yt);if(r!=null&&r.add)for(const{id:n,pos:i,src:o}of r.add){const s=ex(o),c=H.Decoration.widget(i,s,{id:n});t=t.add(e.doc,[c])}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 ex(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 tx(e,t){var i;const n=yt.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 rx({validateFn:e,onUpload:t,postUpload:r,defaultInline:n=!1}){return(i,o,s)=>{for(const c of i){if(e&&!e(c))continue;const l=Date.now().toString(),u=o.state.tr;u.selection.empty||u.deleteSelection();const d=URL.createObjectURL(c);u.setMeta(yt,{add:[{id:l,pos:s,src:d}]}),o.dispatch(u),t(c).then(async f=>{var A;r&&typeof f=="string"&&(f=await r(f));const{schema:h}=o.state;let p=tx(o.state,l);if(p===null)return;const g=typeof f=="object"?d:f,m=(A=h.nodes.image)==null?void 0:A.create({src:g,inline:n});if(!m)return;const{doc:y}=o.state;p>y.content.size&&(p=y.content.size-1);const S=o.state.tr.replaceWith(p,p,m).setMeta(yt,{remove:[l]});o.dispatch(S)},()=>{const f=o.state.tr.delete(s,s).setMeta(yt,{remove:[l]});o.dispatch(f)})}}}function nx(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 ix(e,t,r,n){var o;const i=[...((o=t.dataTransfer)==null?void 0:o.files)||[]];if(!r&&i.length>0){t.preventDefault();const s=e.posAtCoords({left:t.clientX,top:t.clientY});if(s)return n(i,e,s.pos+1),!0}return!1}const ox={acceptMimes:["image/jpeg","image/gif","image/png","image/jpg"],maxSize:1024*1024*5,resourceImage:"both",defaultInline:!1},wt=ao.extend({group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){var e;return{...ox,...(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:Zm,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})}}},addNodeView(){return le.ReactNodeViewRenderer(Jm)},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=t||r?`transform: rotateX(${t?"180":"0"}deg) rotateY(${r?"180":"0"}deg);`:"",s=n?`text-align: ${n};`:"";return[i?"span":"div",{style:s,class:"image"},["img",H.mergeAttributes({height:"auto",style:o},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=rx({validateFn:r=>!(!this.options.acceptMimes.includes(r.type)||r.size>this.options.maxSize),onUpload:this.options.upload,defaultInline:this.options.defaultInline});return[new H.Plugin({props:{handlePaste:(r,n)=>!n.clipboardData||[...n.clipboardData.files||[]].some(o=>o.type==="text/html")?!1:nx(r,n,t),handleDrop:(r,n,i,o)=>(!(n instanceof DragEvent)||!n.dataTransfer||ix(r,n,o,t),!1)}}),Qm()]}});function ax({selectImage:e,giphyApiKey:t,children:r}){const[n,i]=b.useState([]),[o]=b.useState(15),s=b.useRef(null),c=(u,d="search")=>{if(!t)return;const h=`${d==="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)})};b.useEffect(()=>{c("","trend")},[]);const l=b.useCallback(Gt(u=>{if(!u.target.value){c("","trend");return}c(u.target.value)},350),[]);return a.jsxs(Kt,{modal:!0,children:[a.jsx(Yt,{asChild:!0,children:r}),a.jsx(Tt,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:t?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"richtext-mb-[10px] richtext-w-full",children:a.jsx(Ae,{onChange:l,placeholder:"Search GIF",ref:s,type:"text"})}),a.jsx("div",{className:"richtext-max-h-[280px] richtext-overflow-y-auto",children:a.jsx("div",{className:"richtext-grid richtext-grid-cols-2 richtext-gap-1 ",children:n!=null&&n.length?n==null?void 0:n.map(u=>a.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}`)):a.jsx("p",{children:"No GIFs found"})})})]}):a.jsx("div",{children:a.jsx("p",{children:"Missing Giphy API Key"})})})]})}function sx({editor:e,icon:t,giphyApiKey:r,...n}){const i=o=>{const{url:s}=o.images.original;e.chain().focus().setImageGif({src:s}).run()};return a.jsx(ax,{giphyApiKey:r,selectImage:i,children:a.jsx(F,{icon:t,tooltip:n==null?void 0:n.tooltip})})}const ar={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function cx(e){var M,N;const[t,r]=b.useState({width:B.IMAGE_MAX_SIZE,height:B.IMAGE_MAX_SIZE}),[n,i]=b.useState({width:0,height:0}),[o]=b.useState([ar.TOP_LEFT,ar.TOP_RIGHT,ar.BOTTOM_LEFT,ar.BOTTOM_RIGHT]),[s,c]=b.useState(!1),[l,u]=b.useState({x:0,y:0,w:0,h:0,dir:""}),{align:d}=(M=e==null?void 0:e.node)==null?void 0:M.attrs,f=b.useMemo(()=>{var k;const{src:I,alt:C,width:$,height:O}=(k=e==null?void 0:e.node)==null?void 0:k.attrs,R=pr($)?`${$}px`:$,L=pr(O)?`${O}px`:O;return{src:I||void 0,alt:C||void 0,style:{width:R||void 0,height:L||void 0}}},[(N=e==null?void 0:e.node)==null?void 0:N.attrs]),h=b.useMemo(()=>{const{style:{width:I}}=f;return{width:I==="100%"?I:void 0}},[f]);function p(I){i({width:I.target.width,height:I.target.height})}function g(){const{editor:I,getPos:C}=e;I.commands.setNodeSelection(C())}const m=b.useCallback(bt(()=>{const{editor:I}=e,{width:C}=getComputedStyle(I.view.dom);r($=>({...$,width:Number.parseInt(C,10)}))},B.IMAGE_THROTTLE_WAIT_TIME),[e==null?void 0:e.editor]);function y(I,C){I.preventDefault(),I.stopPropagation();const $=n.width,O=n.height,R=$/O;let L=Number(e.node.attrs.width),k=Number(e.node.attrs.height);const K=t.width;L&&!k?(L=L>K?K:L,k=Math.round(L/R)):k&&!L?(L=Math.round(k*R),L=L>K?K:L):!L&&!k?(L=$>K?K:$,k=Math.round(L/R)):L=L>K?K:L,c(!0),u({x:I.clientX,y:I.clientY,w:L,h:k,dir:C})}const S=b.useCallback(bt(I=>{if(I.preventDefault(),I.stopPropagation(),!s)return;const{x:C,w:$,dir:O}=l,R=(I.clientX-C)*(/l/.test(O)?-1:1),L=qc($+R,B.IMAGE_MIN_SIZE,t.width);e.updateAttributes({width:L,height:null})},B.IMAGE_THROTTLE_WAIT_TIME),[s,l,t,e.updateAttributes]),A=b.useCallback(I=>{I.preventDefault(),I.stopPropagation(),s&&(u({x:0,y:0,w:0,h:0,dir:""}),c(!1),g())},[s,g]),w=b.useCallback(()=>{document==null||document.addEventListener("mousemove",S,!0),document==null||document.addEventListener("mouseup",A,!0)},[S,A]),j=b.useCallback(()=>{document==null||document.removeEventListener("mousemove",S,!0),document==null||document.removeEventListener("mouseup",A,!0)},[S,A]);b.useEffect(()=>(s?w():j(),()=>{j()}),[s,w,j]);const P=b.useMemo(()=>new ResizeObserver(()=>m()),[m]);return b.useEffect(()=>(P.observe(e.editor.view.dom),()=>{P.disconnect()}),[e.editor.view.dom,P]),a.jsx(le.NodeViewWrapper,{className:"image-view",style:{...h,width:"100%",textAlign:d},children:a.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:h,className:`image-view__body ${e!=null&&e.selected?"image-view__body--focused":""} ${s?"image-view__body--resizing":""}`,children:[a.jsx("img",{alt:f.alt,className:"image-view__body__image block",height:"auto",onClick:g,onLoad:p,src:f.src,style:f.style}),(e==null?void 0:e.editor.view.editable)&&((e==null?void 0:e.selected)||s)&&a.jsx("div",{className:"image-resizer",children:o==null?void 0:o.map(I=>a.jsx("span",{className:`image-resizer__handler image-resizer__handler--${I}`,onMouseDown:C=>y(C,I)},`image-dir-${I}`))})]})})}const so=ao.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:sx,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 le.ReactNodeViewRenderer(cx)},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",H.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 lx(e){return/\.(?:mp4|webm|ogg|mov)$/i.test(e)}function ux(e){const{t}=B.useLocale(),[r,n]=b.useState(""),i=b.useRef(null),[o,s]=b.useState(""),[c,l]=b.useState(!1),u=g=>{l(g.detail)};b.useEffect(()=>{const g=Bt(nt.UPLOAD_VIDEO(e.editor.id),u);return()=>{g()}},[]);const d=b.useMemo(()=>{var m;return(m=e.editor.extensionManager.extensions.find(y=>y.name===co.name))==null?void 0:m.options},[e.editor]);async function f(g){var A;const m=(A=g==null?void 0:g.target)==null?void 0:A.files;if(!e.editor||e.editor.isDestroyed||m.length===0)return;const y=m[0];let S="";d.upload?S=await d.upload(y):S=URL.createObjectURL(y),e.editor.chain().focus().setVideo({src:S,width:"100%"}).run(),l(!1)}function h(g){g.preventDefault(),g.stopPropagation(),r&&(e.editor.chain().focus().setVideo({src:r,width:"100%"}).run(),l(!1))}function p(g){var m;g.preventDefault(),(m=i.current)==null||m.click()}return a.jsxs(Ut,{onOpenChange:l,open:c,children:[a.jsx(Vt,{asChild:!0,children:a.jsx(F,{action:()=>l(!0),icon:e.icon,tooltip:e.tooltip})}),a.jsxs(At,{children:[a.jsx(jt,{children:t("editor.video.dialog.title")}),a.jsxs(Zl,{activationMode:"manual",defaultValue:(d==null?void 0:d.resourceVideo)==="both"||(d==null?void 0:d.resourceVideo)==="upload"?"upload":"link",children:[a.jsxs(Io,{className:"richtext-grid richtext-w-full richtext-grid-cols-2",children:[((d==null?void 0:d.resourceVideo)==="both"||(d==null?void 0:d.resourceVideo)==="upload")&&a.jsx(Ft,{value:"upload",children:t("editor.video.dialog.tab.upload")}),((d==null?void 0:d.resourceVideo)==="both"||(d==null?void 0:d.resourceVideo)==="link")&&a.jsx(Ft,{value:"link",children:t("editor.video.dialog.link")})]}),a.jsxs(Ht,{value:"upload",children:[a.jsx("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:a.jsx(me,{className:"richtext-mt-1 richtext-w-full",onClick:p,size:"sm",children:t("editor.video.dialog.tab.upload")})}),a.jsx("input",{accept:"video/*",multiple:!0,onChange:f,ref:i,type:"file",style:{display:"none"}})]}),a.jsxs(Ht,{value:"link",children:[a.jsx("form",{onSubmit:h,children:a.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[a.jsx(Ae,{autoFocus:!0,placeholder:t("editor.video.dialog.placeholder"),required:!0,type:"url",value:r,onChange:g=>{const m=g.target.value;if(!lx(m)){s("Invalid video URL"),n("");return}s(""),n(m)}}),a.jsx(me,{type:"submit",children:t("editor.video.dialog.button.apply")})]})}),o&&a.jsx("div",{className:"richtext-my-[5px] richtext-text-red-500",children:o})]})]})]})]})}function fx(e,t,r){return e<t?t:e>r?r:e}const dx=e=>typeof e=="number",hx=e=>typeof e=="string",px=e=>typeof e=="function";function gx(e,t="px"){if(!e)return e;const r=dx(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 yl(e,t){if(!e)return!1;const{extensions:r=[]}=(e==null?void 0:e.extensionManager)??{};return!!r.find(i=>i.name===t)}function mx(e){return e.map(t=>hx(t)?{value:t,name:t}:t)}function xx(e){return e=e.replace("https://youtu.be/","https://www.youtube.com/watch?v=").replace("watch?v=","embed/"),e=e.replace("https://vimeo.com/","https://player.vimeo.com/video/"),/^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 co=H.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:B.VIDEO_SIZE["size-medium"],HTMLAttributes:{class:"iframe-wrapper",style:"display: flex;justify-content: center;"},button:({editor:e,t})=>{var r,n;return{component:ux,componentProps:{action:()=>{},isActive:()=>e.isActive("video")||!1,disabled:!((n=(r=e.can()).setVideo)!=null&&n.call(r,{})),icon:"Video",tooltip:t("editor.video.tooltip"),editor:e}}}}},addAttributes(){return{src:{default:null,renderHTML:({src:e})=>({src:e?xx(e):null})},width:{default:this.options.width,renderHTML:({width:e})=>({width:gx(e)})},frameborder:{default:this.options.frameborder?1:0,parseHTML:()=>this.options.frameborder?1:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen}}},parseHTML(){return[{tag:"div[data-video] iframe"}]},renderHTML({HTMLAttributes:e}){const{width:t="100%"}=e??{},r={...e,width:"100%",height:"100%"},n=`position: relative;overflow: hidden;display: flex;flex: 1;max-width: ${t};`,i=`flex: 1;padding-bottom: ${9/16*100}%;`,c=["div",{style:n},["div",{style:i}],["iframe",r]];return["div",{...this.options.HTMLAttributes,"data-video":""},c]},addCommands(){return{setVideo:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e}),updateVideo:e=>({commands:t})=>t.updateAttributes(this.name,e)}}}),lo={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function uo({item:e,disabled:t,editor:r}){var i;const n=e.component;return n?a.jsx(b.Fragment,{children:e.type==="divider"?a.jsx(Re,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}):a.jsx(n,{...e.componentProps,disabled:t||((i=e==null?void 0:e.componentProps)==null?void 0:i.disabled),editor:r})}):a.jsx(a.Fragment,{})}function vx(e){return e.type.name===wt.name}function yx(e){return e.type.name===so.name}function bx(e){return e.type.name===co.name}function wx(e){const{lang:t}=B.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:s,to:c}=o;let l=!1;return i.view.state.doc.nodesBetween(s.pos,c,u=>{if(vx(u))return l=!0,!1}),l},n=b.useMemo(()=>e.disabled?[]:Qg(e.editor),[e.disabled,e.editor,t]);return a.jsx(a.Fragment,{children:a.jsx(le.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:lo,children:n!=null&&n.length?a.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:a.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)=>a.jsx(uo,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-image-${o}`))})}):a.jsx(a.Fragment,{})})})}function Sx(e){const{lang:t}=B.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:s,to:c}=o;let l=!1;return i.view.state.doc.nodesBetween(s.pos,c,u=>{if(yx(u))return l=!0,!1}),l},n=b.useMemo(()=>e.disabled?[]:em(e.editor),[e.disabled,e.editor,t]);return a.jsx(a.Fragment,{children:a.jsx(le.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:lo,children:n!=null&&n.length?a.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:a.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)=>a.jsx(uo,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-image-gif-${o}`))})}):a.jsx(a.Fragment,{})})})}function Ax(e){const{lang:t}=B.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:s,to:c}=o;let l=!1;return i.view.state.doc.nodesBetween(s.pos,c,u=>{if(bx(u))return l=!0,!1}),l},n=b.useMemo(()=>e.disabled?[]:nm(e.editor),[e.editor,e.disabled,t]);return a.jsx(a.Fragment,{children:a.jsx(le.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:lo,children:n!=null&&n.length?a.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:a.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)=>a.jsx(uo,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-video-${o}`))})}):a.jsx(a.Fragment,{})})})}function jx(e,t,r=null){return r?e.createChecked({index:t},r):e.createAndFill({index:t})}function Cx(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 Tx(e,t,r=null){const n=Cx(e),i=[];for(let o=0;o<t;o+=1){const s=jx(n.column,o,r);s&&i.push(s)}return n.columns.createChecked({cols:t},i)}function Gr({state:e,dispatch:t,type:r}){const n=H.findParentNode(o=>o.type.name===zt.name)(e.selection),i=H.findParentNode(o=>o.type.name===fo.name)(e.selection);if(t&&n&&i){const o=n.node,s=i.node.attrs.index,c=o.toJSON();let l=s;r==="delete"?(l=s-1,c.content.splice(s,1)):(l=r==="addBefore"?s:s+1,c.content.splice(l,0,{type:"column",attrs:{index:s},content:[{type:"paragraph"}]})),c.attrs.cols=c.content.length,c.content.forEach((h,p)=>{h.attrs.index=p});const u=H.Node$1.fromJSON(e.schema,c);let d=n.pos;u.content.forEach((h,p,g)=>{g<l&&(d+=h.nodeSize)});const f=e.tr.setTime(Date.now());f.replaceWith(n.pos,n.pos+n.node.nodeSize,u).setSelection(H.TextSelection.near(f.doc.resolve(d))),t(f)}return!0}function wa({state:e,dispatch:t,type:r}){const n=H.findParentNode(o=>o.type.name===zt.name)(e.selection),i=H.findParentNode(o=>o.type.name===fo.name)(e.selection);if(t&&n&&i){const o=n.node,s=i.node.attrs.index;let c=0;r==="before"?c=(s-1+o.attrs.cols)%o.attrs.cols:c=(s+1)%o.attrs.cols;let l=n.pos;o.content.forEach((d,f,h)=>{h<c&&(l+=d.nodeSize)});const u=e.tr.setTime(Date.now());return u.setSelection(H.TextSelection.near(u.doc.resolve(l))),t(u),!0}return!1}const fo=H.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",H.mergeAttributes(this.options.HTMLAttributes,e),0]}}),Ix=H.Extension.create({name:"columnActionButton",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:r})=>({component:F,componentProps:{action:()=>{t.chain().focus().insertColumns({cols:2}).run()},icon:"Columns",tooltip:r("editor.columns.tooltip")}})}}}),bl=200,zt=H.Node.create({name:"columns",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,content:"column{1,}",priority:bl,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",H.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{insertColumns:e=>({tr:t,dispatch:r,editor:n})=>{const i=Tx(n.schema,e&&e.cols||3);if(r){const o=t.selection.anchor+1;t.replaceSelectionWith(i).scrollIntoView().setSelection(H.TextSelection.near(t.doc.resolve(o)))}return!0},addColBefore:()=>({dispatch:e,state:t})=>Gr({dispatch:e,state:t,type:"addBefore"}),addColAfter:()=>({dispatch:e,state:t})=>Gr({dispatch:e,state:t,type:"addAfter"}),deleteCol:()=>({dispatch:e,state:t})=>Gr({dispatch:e,state:t,type:"delete"})}},addKeyboardShortcuts(){return{"Mod-Alt-G":()=>this.editor.commands.insertColumns(),Tab:()=>wa({state:this.editor.state,dispatch:this.editor.view.dispatch,type:"after"}),"Shift-Tab":()=>wa({state:this.editor.state,dispatch:this.editor.view.dispatch,type:"before"})}}});function ho(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 s=r.tr.doc.nodeAt(o);s&&s.type.name===e&&(t.dispatchTransaction&&t.dispatchTransaction(r.tr.delete(o,o+s.nodeSize)),i=!0)}}return i}function Ox({editor:e}){const{t}=B.useLocale(),r=b.useCallback(()=>e.isActive(zt.name),[e]),n=b.useCallback(()=>ho(zt.name,e),[e]),i=b.useCallback(()=>e.chain().focus().addColBefore().run(),[e]),o=b.useCallback(()=>e.chain().focus().addColAfter().run(),[e]),s=b.useCallback(()=>e.chain().focus().deleteCol().run(),[e]);return a.jsx(le.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:a.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:[a.jsx(F,{action:i,icon:"ColumnAddLeft",tooltip:t("editor.table.menu.insertColumnBefore")}),a.jsx(F,{action:o,icon:"ColumnAddRight",tooltip:t("editor.table.menu.insertColumnAfter")}),a.jsx(F,{action:s,icon:"DeleteColumn",tooltip:t("editor.table.menu.deleteColumn")}),a.jsx(F,{action:n,icon:"Trash2",tooltip:t("editor.table.menu.delete_column")})]})})}var qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Sl(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 Ur,Sa;function Al(){if(Sa)return Ur;Sa=1;var e=Object.prototype.toString;return Ur=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},Ur}var Vr,Aa;function Ex(){if(Aa)return Vr;Aa=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Al(),i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),c=["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},d=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}(),f=function(h){if(typeof window>"u"||!d)return l(h);try{return l(h)}catch{return!1}};e=function(p){var g=p!==null&&typeof p=="object",m=r.call(p)==="[object Function]",y=n(p),S=g&&r.call(p)==="[object String]",A=[];if(!g&&!m&&!y)throw new TypeError("Object.keys called on a non-object");var w=s&&m;if(S&&p.length>0&&!t.call(p,0))for(var j=0;j<p.length;++j)A.push(String(j));if(y&&p.length>0)for(var P=0;P<p.length;++P)A.push(String(P));else for(var M in p)!(w&&M==="prototype")&&t.call(p,M)&&A.push(String(M));if(o)for(var N=f(p),I=0;I<c.length;++I)!(N&&c[I]==="constructor")&&t.call(p,c[I])&&A.push(c[I]);return A}}return Vr=e,Vr}var Xr,ja;function po(){if(ja)return Xr;ja=1;var e=Array.prototype.slice,t=Al(),r=Object.keys,n=r?function(s){return r(s)}:Ex(),i=Object.keys;return n.shim=function(){if(Object.keys){var s=function(){var c=Object.keys(arguments);return c&&c.length===arguments.length}(1,2);s||(Object.keys=function(l){return t(l)?i(e.call(l)):i(l)})}else Object.keys=n;return Object.keys||n},Xr=n,Xr}var Kr,Ca;function jr(){if(Ca)return Kr;Ca=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Kr=e,Kr}var Yr,Ta;function go(){return Ta||(Ta=1,Yr=SyntaxError),Yr}var Zr,Ia;function Ie(){return Ia||(Ia=1,Zr=TypeError),Zr}var Jr,Oa;function Px(){return Oa||(Oa=1,Jr=Object.getOwnPropertyDescriptor),Jr}var Qr,Ea;function ft(){if(Ea)return Qr;Ea=1;var e=Px();if(e)try{e([],"length")}catch{e=null}return Qr=e,Qr}var en,Pa;function mo(){if(Pa)return en;Pa=1;var e=jr(),t=go(),r=Ie(),n=ft();return en=function(o,s,c){if(!o||typeof o!="object"&&typeof o!="function")throw new r("`obj` must be an object or a function`");if(typeof s!="string"&&typeof s!="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,d=arguments.length>5?arguments[5]:null,f=arguments.length>6?arguments[6]:!1,h=!!n&&n(o,s);if(e)e(o,s,{configurable:d===null&&h?h.configurable:!d,enumerable:l===null&&h?h.enumerable:!l,value:c,writable:u===null&&h?h.writable:!u});else if(f||!l&&!u&&!d)o[s]=c;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},en}var tn,Ra;function xo(){if(Ra)return tn;Ra=1;var e=jr(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},tn=t,tn}var rn,Ma;function dt(){if(Ma)return rn;Ma=1;var e=po(),t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",r=Object.prototype.toString,n=Array.prototype.concat,i=mo(),o=function(u){return typeof u=="function"&&r.call(u)==="[object Function]"},s=xo()(),c=function(u,d,f,h){if(d in u){if(h===!0){if(u[d]===f)return}else if(!o(h)||!h())return}s?i(u,d,f,!0):i(u,d,f)},l=function(u,d){var f=arguments.length>2?arguments[2]:{},h=e(d);t&&(h=n.call(h,Object.getOwnPropertySymbols(d)));for(var p=0;p<h.length;p+=1)c(u,h[p],d[h[p]],f[h[p]])};return l.supportsDescriptors=!!s,rn=l,rn}var nn={exports:{}},on,Na;function vo(){return Na||(Na=1,on=Object),on}var an,_a;function jl(){return _a||(_a=1,an=Error),an}var sn,$a;function Rx(){return $a||($a=1,sn=EvalError),sn}var cn,ka;function Mx(){return ka||(ka=1,cn=RangeError),cn}var ln,La;function Nx(){return La||(La=1,ln=ReferenceError),ln}var un,Da;function _x(){return Da||(Da=1,un=URIError),un}var fn,Ba;function $x(){return Ba||(Ba=1,fn=Math.abs),fn}var dn,za;function kx(){return za||(za=1,dn=Math.floor),dn}var hn,qa;function Lx(){return qa||(qa=1,hn=Math.max),hn}var pn,Fa;function Dx(){return Fa||(Fa=1,pn=Math.min),pn}var gn,Ha;function Bx(){return Ha||(Ha=1,gn=Math.pow),gn}var mn,Wa;function zx(){return Wa||(Wa=1,mn=Math.round),mn}var xn,Ga;function qx(){return Ga||(Ga=1,xn=Number.isNaN||function(t){return t!==t}),xn}var vn,Ua;function Fx(){if(Ua)return vn;Ua=1;var e=qx();return vn=function(r){return e(r)||r===0?r:r<0?-1:1},vn}var yn,Va;function Cr(){return Va||(Va=1,yn=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 s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(t,r);if(c.value!==i||c.enumerable!==!0)return!1}return!0}),yn}var bn,Xa;function yo(){if(Xa)return bn;Xa=1;var e=typeof Symbol<"u"&&Symbol,t=Cr();return bn=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},bn}var wn,Ka;function Cl(){return Ka||(Ka=1,wn=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),wn}var Sn,Ya;function Tl(){if(Ya)return Sn;Ya=1;var e=vo();return Sn=e.getPrototypeOf||null,Sn}var An,Za;function Hx(){if(Za)return An;Za=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 d=[],f=0;f<l.length;f+=1)d[f]=l[f];for(var h=0;h<u.length;h+=1)d[h+l.length]=u[h];return d},o=function(l,u){for(var d=[],f=u,h=0;f<l.length;f+=1,h+=1)d[h]=l[f];return d},s=function(c,l){for(var u="",d=0;d<c.length;d+=1)u+=c[d],d+1<c.length&&(u+=l);return u};return An=function(l){var u=this;if(typeof u!="function"||t.apply(u)!==n)throw new TypeError(e+u);for(var d=o(arguments,1),f,h=function(){if(this instanceof f){var S=u.apply(this,i(d,arguments));return Object(S)===S?S:this}return u.apply(l,i(d,arguments))},p=r(0,u.length-d.length),g=[],m=0;m<p;m++)g[m]="$"+m;if(f=Function("binder","return function ("+s(g,",")+"){ return binder.apply(this,arguments); }")(h),u.prototype){var y=function(){};y.prototype=u.prototype,f.prototype=new y,y.prototype=null}return f},An}var jn,Ja;function Xt(){if(Ja)return jn;Ja=1;var e=Hx();return jn=Function.prototype.bind||e,jn}var Cn,Qa;function bo(){return Qa||(Qa=1,Cn=Function.prototype.call),Cn}var Tn,es;function wo(){return es||(es=1,Tn=Function.prototype.apply),Tn}var In,ts;function Wx(){return ts||(ts=1,In=typeof Reflect<"u"&&Reflect&&Reflect.apply),In}var On,rs;function Il(){if(rs)return On;rs=1;var e=Xt(),t=wo(),r=bo(),n=Wx();return On=n||e.call(r,t),On}var En,ns;function So(){if(ns)return En;ns=1;var e=Xt(),t=Ie(),r=bo(),n=Il();return En=function(o){if(o.length<1||typeof o[0]!="function")throw new t("a function is required");return n(e,r,o)},En}var Pn,is;function Gx(){if(is)return Pn;is=1;var e=So(),t=ft(),r;try{r=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var n=!!r&&t&&t(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return Pn=n&&typeof n.get=="function"?e([n.get]):typeof o=="function"?function(c){return o(c==null?c:i(c))}:!1,Pn}var Rn,os;function Ol(){if(os)return Rn;os=1;var e=Cl(),t=Tl(),r=Gx();return Rn=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,Rn}var Mn,as;function Ao(){if(as)return Mn;as=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=Xt();return Mn=r.call(e,t),Mn}var Nn,ss;function Ve(){if(ss)return Nn;ss=1;var e,t=vo(),r=jl(),n=Rx(),i=Mx(),o=Nx(),s=go(),c=Ie(),l=_x(),u=$x(),d=kx(),f=Lx(),h=Dx(),p=Bx(),g=zx(),m=Fx(),y=Function,S=function(J){try{return y('"use strict"; return ('+J+").constructor;")()}catch{}},A=ft(),w=jr(),j=function(){throw new c},P=A?function(){try{return arguments.callee,j}catch{try{return A(arguments,"callee").get}catch{return j}}}():j,M=yo()(),N=Ol(),I=Tl(),C=Cl(),$=wo(),O=bo(),R={},L=typeof Uint8Array>"u"||!N?e:N(Uint8Array),k={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":M&&N?N([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%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%":y,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&N?N(N([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!M||!N?e:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":A,"%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||!N?e:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&N?N(""[Symbol.iterator]()):e,"%Symbol%":M?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":P,"%TypedArray%":L,"%TypeError%":c,"%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%":O,"%Function.prototype.apply%":$,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":I,"%Math.abs%":u,"%Math.floor%":d,"%Math.max%":f,"%Math.min%":h,"%Math.pow%":p,"%Math.round%":g,"%Math.sign%":m,"%Reflect.getPrototypeOf%":C};if(N)try{null.error}catch(J){var K=N(N(J));k["%Error.prototype%"]=K}var re=function J(z){var q;if(z==="%AsyncFunction%")q=S("async function () {}");else if(z==="%GeneratorFunction%")q=S("function* () {}");else if(z==="%AsyncGeneratorFunction%")q=S("async function* () {}");else if(z==="%AsyncGenerator%"){var D=J("%AsyncGeneratorFunction%");D&&(q=D.prototype)}else if(z==="%AsyncIteratorPrototype%"){var V=J("%AsyncGenerator%");V&&N&&(q=N(V.prototype))}return k[z]=q,q},ue={__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"]},ne=Xt(),Q=Ao(),xe=ne.call(O,Array.prototype.concat),de=ne.call($,Array.prototype.splice),Xe=ne.call(O,String.prototype.replace),Oe=ne.call(O,String.prototype.slice),T=ne.call(O,RegExp.prototype.exec),_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,W=function(z){var q=Oe(z,0,1),D=Oe(z,-1);if(q==="%"&&D!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(D==="%"&&q!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var V=[];return Xe(z,_,function(fe,he,pe,ve){V[V.length]=pe?Xe(ve,G,"$1"):he||fe}),V},Y=function(z,q){var D=z,V;if(Q(ue,D)&&(V=ue[D],D="%"+V[0]+"%"),Q(k,D)){var fe=k[D];if(fe===R&&(fe=re(D)),typeof fe>"u"&&!q)throw new c("intrinsic "+z+" exists, but is not available. Please file an issue!");return{alias:V,name:D,value:fe}}throw new s("intrinsic "+z+" does not exist!")};return Nn=function(z,q){if(typeof z!="string"||z.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new c('"allowMissing" argument must be a boolean');if(T(/^%?[^%]*%?$/,z)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var D=W(z),V=D.length>0?D[0]:"",fe=Y("%"+V+"%",q),he=fe.name,pe=fe.value,ve=!1,be=fe.alias;be&&(V=be[0],de(D,xe([0,1],be)));for(var Le=1,Ee=!0;Le<D.length;Le+=1){var we=D[Le],De=Oe(we,0,1),Be=Oe(we,-1);if((De==='"'||De==="'"||De==="`"||Be==='"'||Be==="'"||Be==="`")&&De!==Be)throw new s("property names with quotes must have matching quotes");if((we==="constructor"||!Ee)&&(ve=!0),V+="."+we,he="%"+V+"%",Q(k,he))pe=k[he];else if(pe!=null){if(!(we in pe)){if(!q)throw new c("base intrinsic for "+z+" exists, but the property is not available.");return}if(A&&Le+1>=D.length){var ze=A(pe,we);Ee=!!ze,Ee&&"get"in ze&&!("originalValue"in ze.get)?pe=ze.get:pe=pe[we]}else Ee=Q(pe,we),pe=pe[we];Ee&&!ve&&(k[he]=pe)}}return pe},Nn}var _n,cs;function Ux(){if(cs)return _n;cs=1;var e=Ve(),t=mo(),r=xo()(),n=ft(),i=Ie(),o=e("%Math.floor%");return _n=function(c,l){if(typeof c!="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],d=!0,f=!0;if("length"in c&&n){var h=n(c,"length");h&&!h.configurable&&(d=!1),h&&!h.writable&&(f=!1)}return(d||f||!u)&&(r?t(c,"length",l,!0,!0):t(c,"length",l)),c},_n}var $n,ls;function Vx(){if(ls)return $n;ls=1;var e=Xt(),t=wo(),r=Il();return $n=function(){return r(e,t,arguments)},$n}var us;function Ct(){return us||(us=1,function(e){var t=Ux(),r=jr(),n=So(),i=Vx();e.exports=function(s){var c=n(arguments),l=s.length-(arguments.length-1);return t(c,1+(l>0?l:0),!0)},r?r(e.exports,"apply",{value:i}):e.exports.apply=i}(nn)),nn.exports}var kn,fs;function ye(){if(fs)return kn;fs=1;var e=Ve(),t=So(),r=t([e("%String.prototype.indexOf%")]);return kn=function(i,o){var s=e(i,!!o);return typeof s=="function"&&r(i,".prototype.")>-1?t([s]):s},kn}var Ln,ds;function El(){if(ds)return Ln;ds=1;var e=po(),t=Cr()(),r=ye(),n=vo(),i=r("Array.prototype.push"),o=r("Object.prototype.propertyIsEnumerable"),s=t?n.getOwnPropertySymbols:null;return Ln=function(l,u){if(l==null)throw new TypeError("target must be an object");var d=n(l);if(arguments.length===1)return d;for(var f=1;f<arguments.length;++f){var h=n(arguments[f]),p=e(h),g=t&&(n.getOwnPropertySymbols||s);if(g)for(var m=g(h),y=0;y<m.length;++y){var S=m[y];o(h,S)&&i(p,S)}for(var A=0;A<p.length;++A){var w=p[A];if(o(h,w)){var j=h[w];d[w]=j}}}return d},Ln}var Dn,hs;function Pl(){if(hs)return Dn;hs=1;var e=El(),t=function(){if(!Object.assign)return!1;for(var n="abcdefghijklmnopqrst",i=n.split(""),o={},s=0;s<i.length;++s)o[i[s]]=i[s];var c=Object.assign({},o),l="";for(var u in c)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 Dn=function(){return!Object.assign||t()||r()?e:Object.assign},Dn}var Bn,ps;function Xx(){if(ps)return Bn;ps=1;var e=dt(),t=Pl();return Bn=function(){var n=t();return e(Object,{assign:n},{assign:function(){return Object.assign!==n}}),n},Bn}var zn,gs;function Kx(){if(gs)return zn;gs=1;var e=dt(),t=Ct(),r=El(),n=Pl(),i=Xx(),o=t.apply(n()),s=function(l,u){return o(Object,arguments)};return e(s,{getPolyfill:n,implementation:r,shim:i}),zn=s,zn}var qn,ms;function Rl(){if(ms)return qn;ms=1;var e=Ve(),t=Ct(),r=t(e("String.prototype.indexOf"));return qn=function(i,o){var s=e(i,!!o);return typeof s=="function"&&r(i,".prototype.")>-1?t(s):s},qn}var Fn,xs;function Yx(){if(xs)return Fn;xs=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!==""},Fn=e,Fn}var Hn,vs;function Zx(){if(vs)return Hn;vs=1;var e=mo(),t=xo()(),r=Yx().functionsHaveConfigurableNames(),n=Ie();return Hn=function(o,s){if(typeof o!="function")throw new n("`fn` is not a function");var c=arguments.length>2&&!!arguments[2];return(!c||r)&&(t?e(o,"name",s,!0,!0):e(o,"name",s)),o},Hn}var Wn,ys;function Ml(){if(ys)return Wn;ys=1;var e=Zx(),t=Ie(),r=Object;return Wn=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),Wn}var Gn,bs;function Nl(){if(bs)return Gn;bs=1;var e=Ml(),t=dt().supportsDescriptors,r=Object.getOwnPropertyDescriptor;return Gn=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="",s={};if(Object.defineProperty(s,"hasIndices",{get:function(){o+="d"}}),Object.defineProperty(s,"sticky",{get:function(){o+="y"}}),i.get.call(s),o==="dy")return i.get}}return e},Gn}var Un,ws;function Jx(){if(ws)return Un;ws=1;var e=dt().supportsDescriptors,t=Nl(),r=ft(),n=Object.defineProperty,i=jl(),o=Ol(),s=/a/;return Un=function(){if(!e||!o)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var l=t(),u=o(s),d=r(u,"flags");return(!d||d.get!==l)&&n(u,"flags",{configurable:!0,enumerable:!1,get:l}),l},Un}var Vn,Ss;function Qx(){if(Ss)return Vn;Ss=1;var e=dt(),t=Ct(),r=Ml(),n=Nl(),i=Jx(),o=t(n());return e(o,{getPolyfill:n,implementation:r,shim:i}),Vn=o,Vn}var Mt={exports:{}},Xn,As;function ht(){if(As)return Xn;As=1;var e=Cr();return Xn=function(){return e()&&!!Symbol.toStringTag},Xn}var Kn,js;function _l(){if(js)return Kn;js=1;var e=ht()(),t=ye(),r=t("Object.prototype.toString"),n=function(c){return e&&c&&typeof c=="object"&&Symbol.toStringTag in c?!1:r(c)==="[object Arguments]"},i=function(c){return n(c)?!0:c!==null&&typeof c=="object"&&"length"in c&&typeof c.length=="number"&&c.length>=0&&r(c)!=="[object Array]"&&"callee"in c&&r(c.callee)==="[object Function]"},o=function(){return n(arguments)}();return n.isLegacyArguments=i,Kn=o?n:i,Kn}const ev={},tv=Object.freeze(Object.defineProperty({__proto__:null,default:ev},Symbol.toStringTag,{value:"Module"})),rv=Sl(tv);var Yn,Cs;function Tr(){if(Cs)return Yn;Cs=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,s=i&&o&&typeof o.get=="function"?o.get:null,c=i&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,u=l?WeakMap.prototype.has:null,d=typeof WeakSet=="function"&&WeakSet.prototype,f=d?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,p=h?WeakRef.prototype.deref:null,g=Boolean.prototype.valueOf,m=Object.prototype.toString,y=Function.prototype.toString,S=String.prototype.match,A=String.prototype.slice,w=String.prototype.replace,j=String.prototype.toUpperCase,P=String.prototype.toLowerCase,M=RegExp.prototype.test,N=Array.prototype.concat,I=Array.prototype.join,C=Array.prototype.slice,$=Math.floor,O=typeof BigInt=="function"?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,k=typeof Symbol=="function"&&typeof Symbol.iterator=="object",K=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===k||!0)?Symbol.toStringTag:null,re=Object.prototype.propertyIsEnumerable,ue=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(x){return x.__proto__}:null);function ne(x,v){if(x===1/0||x===-1/0||x!==x||x&&x>-1e3&&x<1e3||M.call(/e/,v))return v;var te=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof x=="number"){var ie=x<0?-$(-x):$(x);if(ie!==x){var oe=String(ie),X=A.call(v,oe.length+1);return w.call(oe,te,"$&_")+"."+w.call(w.call(X,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(v,te,"$&_")}var Q=rv,xe=Q.custom,de=fe(xe)?xe:null,Xe={__proto__:null,double:'"',single:"'"},Oe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Yn=function x(v,te,ie,oe){var X=te||{};if(ve(X,"quoteStyle")&&!ve(Xe,X.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ve(X,"maxStringLength")&&(typeof X.maxStringLength=="number"?X.maxStringLength<0&&X.maxStringLength!==1/0:X.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ze=ve(X,"customInspect")?X.customInspect:!0;if(typeof Ze!="boolean"&&Ze!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ve(X,"indent")&&X.indent!==null&&X.indent!==" "&&!(parseInt(X.indent,10)===X.indent&&X.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ve(X,"numericSeparator")&&typeof X.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ot=X.numericSeparator;if(typeof v>"u")return"undefined";if(v===null)return"null";if(typeof v=="boolean")return v?"true":"false";if(typeof v=="string")return pt(v,X);if(typeof v=="number"){if(v===0)return 1/0/v>0?"0":"-0";var Se=String(v);return ot?ne(v,Se):Se}if(typeof v=="bigint"){var Je=String(v)+"n";return ot?ne(v,Je):Je}var Pr=typeof X.depth>"u"?5:X.depth;if(typeof ie>"u"&&(ie=0),ie>=Pr&&Pr>0&&typeof v=="object")return W(v)?"[Array]":"[Object]";var gt=hu(X,ie);if(typeof oe>"u")oe=[];else if(Ee(oe,v)>=0)return"[Circular]";function Pe(mt,er,gu){if(er&&(oe=C.call(oe),oe.push(er)),gu){var zo={depth:X.depth};return ve(X,"quoteStyle")&&(zo.quoteStyle=X.quoteStyle),x(mt,zo,ie+1,oe)}return x(mt,X,ie+1,oe)}if(typeof v=="function"&&!J(v)){var No=Le(v),_o=Jt(v,Pe);return"[Function"+(No?": "+No:" (anonymous)")+"]"+(_o.length>0?" { "+I.call(_o,", ")+" }":"")}if(fe(v)){var $o=k?w.call(String(v),/^(Symbol\(.*\))_[^)]*$/,"$1"):L.call(v);return typeof v=="object"&&!k?Ye($o):$o}if(Ke(v)){for(var Ot="<"+P.call(String(v.nodeName)),Rr=v.attributes||[],Qt=0;Qt<Rr.length;Qt++)Ot+=" "+Rr[Qt].name+"="+T(_(Rr[Qt].value),"double",X);return Ot+=">",v.childNodes&&v.childNodes.length&&(Ot+="..."),Ot+="</"+P.call(String(v.nodeName))+">",Ot}if(W(v)){if(v.length===0)return"[]";var Mr=Jt(v,Pe);return gt&&!du(Mr)?"["+Er(Mr,gt)+"]":"[ "+I.call(Mr,", ")+" ]"}if(z(v)){var Nr=Jt(v,Pe);return!("cause"in Error.prototype)&&"cause"in v&&!re.call(v,"cause")?"{ ["+String(v)+"] "+I.call(N.call("[cause]: "+Pe(v.cause),Nr),", ")+" }":Nr.length===0?"["+String(v)+"]":"{ ["+String(v)+"] "+I.call(Nr,", ")+" }"}if(typeof v=="object"&&Ze){if(de&&typeof v[de]=="function"&&Q)return Q(v,{depth:Pr-ie});if(Ze!=="symbol"&&typeof v.inspect=="function")return v.inspect()}if(we(v)){var ko=[];return n&&n.call(v,function(mt,er){ko.push(Pe(er,v,!0)+" => "+Pe(mt,v))}),Mo("Map",r.call(v),ko,gt)}if(ze(v)){var Lo=[];return c&&c.call(v,function(mt){Lo.push(Pe(mt,v))}),Mo("Set",s.call(v),Lo,gt)}if(De(v))return Or("WeakMap");if(Zt(v))return Or("WeakSet");if(Be(v))return Or("WeakRef");if(D(v))return Ye(Pe(Number(v)));if(he(v))return Ye(Pe(O.call(v)));if(V(v))return Ye(g.call(v));if(q(v))return Ye(Pe(String(v)));if(typeof window<"u"&&v===window)return"{ [object Window] }";if(typeof globalThis<"u"&&v===globalThis||typeof qt<"u"&&v===qt)return"{ [object globalThis] }";if(!Y(v)&&!J(v)){var _r=Jt(v,Pe),Do=ue?ue(v)===Object.prototype:v instanceof Object||v.constructor===Object,$r=v instanceof Object?"":"null prototype",Bo=!Do&&K&&Object(v)===v&&K in v?A.call(be(v),8,-1):$r?"Object":"",pu=Do||typeof v.constructor!="function"?"":v.constructor.name?v.constructor.name+" ":"",kr=pu+(Bo||$r?"["+I.call(N.call([],Bo||[],$r||[]),": ")+"] ":"");return _r.length===0?kr+"{}":gt?kr+"{"+Er(_r,gt)+"}":kr+"{ "+I.call(_r,", ")+" }"}return String(v)};function T(x,v,te){var ie=te.quoteStyle||v,oe=Xe[ie];return oe+x+oe}function _(x){return w.call(String(x),/"/g,"&quot;")}function G(x){return!K||!(typeof x=="object"&&(K in x||typeof x[K]<"u"))}function W(x){return be(x)==="[object Array]"&&G(x)}function Y(x){return be(x)==="[object Date]"&&G(x)}function J(x){return be(x)==="[object RegExp]"&&G(x)}function z(x){return be(x)==="[object Error]"&&G(x)}function q(x){return be(x)==="[object String]"&&G(x)}function D(x){return be(x)==="[object Number]"&&G(x)}function V(x){return be(x)==="[object Boolean]"&&G(x)}function fe(x){if(k)return x&&typeof x=="object"&&x instanceof Symbol;if(typeof x=="symbol")return!0;if(!x||typeof x!="object"||!L)return!1;try{return L.call(x),!0}catch{}return!1}function he(x){if(!x||typeof x!="object"||!O)return!1;try{return O.call(x),!0}catch{}return!1}var pe=Object.prototype.hasOwnProperty||function(x){return x in this};function ve(x,v){return pe.call(x,v)}function be(x){return m.call(x)}function Le(x){if(x.name)return x.name;var v=S.call(y.call(x),/^function\s*([\w$]+)/);return v?v[1]:null}function Ee(x,v){if(x.indexOf)return x.indexOf(v);for(var te=0,ie=x.length;te<ie;te++)if(x[te]===v)return te;return-1}function we(x){if(!r||!x||typeof x!="object")return!1;try{r.call(x);try{s.call(x)}catch{return!0}return x instanceof Map}catch{}return!1}function De(x){if(!u||!x||typeof x!="object")return!1;try{u.call(x,u);try{f.call(x,f)}catch{return!0}return x instanceof WeakMap}catch{}return!1}function Be(x){if(!p||!x||typeof x!="object")return!1;try{return p.call(x),!0}catch{}return!1}function ze(x){if(!s||!x||typeof x!="object")return!1;try{s.call(x);try{r.call(x)}catch{return!0}return x instanceof Set}catch{}return!1}function Zt(x){if(!f||!x||typeof x!="object")return!1;try{f.call(x,f);try{u.call(x,u)}catch{return!0}return x instanceof WeakSet}catch{}return!1}function Ke(x){return!x||typeof x!="object"?!1:typeof HTMLElement<"u"&&x instanceof HTMLElement?!0:typeof x.nodeName=="string"&&typeof x.getAttribute=="function"}function pt(x,v){if(x.length>v.maxStringLength){var te=x.length-v.maxStringLength,ie="... "+te+" more character"+(te>1?"s":"");return pt(A.call(x,0,v.maxStringLength),v)+ie}var oe=Oe[v.quoteStyle||"single"];oe.lastIndex=0;var X=w.call(w.call(x,oe,"\\$1"),/[\x00-\x1f]/g,It);return T(X,"single",v)}function It(x){var v=x.charCodeAt(0),te={8:"b",9:"t",10:"n",12:"f",13:"r"}[v];return te?"\\"+te:"\\x"+(v<16?"0":"")+j.call(v.toString(16))}function Ye(x){return"Object("+x+")"}function Or(x){return x+" { ? }"}function Mo(x,v,te,ie){var oe=ie?Er(te,ie):I.call(te,", ");return x+" ("+v+") {"+oe+"}"}function du(x){for(var v=0;v<x.length;v++)if(Ee(x[v],`
2
- `)>=0)return!1;return!0}function hu(x,v){var te;if(x.indent===" ")te=" ";else if(typeof x.indent=="number"&&x.indent>0)te=I.call(Array(x.indent+1)," ");else return null;return{base:te,prev:I.call(Array(v+1),te)}}function Er(x,v){if(x.length===0)return"";var te=`
3
- `+v.prev+v.base;return te+I.call(x,","+te)+`
4
- `+v.prev}function Jt(x,v){var te=W(x),ie=[];if(te){ie.length=x.length;for(var oe=0;oe<x.length;oe++)ie[oe]=ve(x,oe)?v(x[oe],x):""}var X=typeof R=="function"?R(x):[],Ze;if(k){Ze={};for(var ot=0;ot<X.length;ot++)Ze["$"+X[ot]]=X[ot]}for(var Se in x)ve(x,Se)&&(te&&String(Number(Se))===Se&&Se<x.length||k&&Ze["$"+Se]instanceof Symbol||(M.call(/[^\w$]/,Se)?ie.push(v(Se,x)+": "+v(x[Se],x)):ie.push(Se+": "+v(x[Se],x))));if(typeof R=="function")for(var Je=0;Je<X.length;Je++)re.call(x,X[Je])&&ie.push("["+v(X[Je])+"]: "+v(x[X[Je]],x));return ie}return Yn}var Zn,Ts;function nv(){if(Ts)return Zn;Ts=1;var e=Tr(),t=Ie(),r=function(c,l,u){for(var d=c,f;(f=d.next)!=null;d=f)if(f.key===l)return d.next=f.next,u||(f.next=c.next,c.next=f),f},n=function(c,l){if(c){var u=r(c,l);return u&&u.value}},i=function(c,l,u){var d=r(c,l);d?d.value=u:c.next={key:l,next:c.next,value:u}},o=function(c,l){return c?!!r(c,l):!1},s=function(c,l){if(c)return r(c,l,!0)};return Zn=function(){var l,u={assert:function(d){if(!u.has(d))throw new t("Side channel does not contain "+e(d))},delete:function(d){var f=l&&l.next,h=s(l,d);return h&&f&&f===h&&(l=void 0),!!h},get:function(d){return n(l,d)},has:function(d){return o(l,d)},set:function(d,f){l||(l={next:void 0}),i(l,d,f)}};return u},Zn}var Jn,Is;function $l(){if(Is)return Jn;Is=1;var e=Ve(),t=ye(),r=Tr(),n=Ie(),i=e("%Map%",!0),o=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),c=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),u=t("Map.prototype.size",!0);return Jn=!!i&&function(){var f,h={assert:function(p){if(!h.has(p))throw new n("Side channel does not contain "+r(p))},delete:function(p){if(f){var g=l(f,p);return u(f)===0&&(f=void 0),g}return!1},get:function(p){if(f)return o(f,p)},has:function(p){return f?c(f,p):!1},set:function(p,g){f||(f=new i),s(f,p,g)}};return h},Jn}var Qn,Os;function iv(){if(Os)return Qn;Os=1;var e=Ve(),t=ye(),r=Tr(),n=$l(),i=Ie(),o=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),c=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),u=t("WeakMap.prototype.delete",!0);return Qn=o?function(){var f,h,p={assert:function(g){if(!p.has(g))throw new i("Side channel does not contain "+r(g))},delete:function(g){if(o&&g&&(typeof g=="object"||typeof g=="function")){if(f)return u(f,g)}else if(n&&h)return h.delete(g);return!1},get:function(g){return o&&g&&(typeof g=="object"||typeof g=="function")&&f?s(f,g):h&&h.get(g)},has:function(g){return o&&g&&(typeof g=="object"||typeof g=="function")&&f?l(f,g):!!h&&h.has(g)},set:function(g,m){o&&g&&(typeof g=="object"||typeof g=="function")?(f||(f=new o),c(f,g,m)):n&&(h||(h=n()),h.set(g,m))}};return p}:n,Qn}var ei,Es;function kl(){if(Es)return ei;Es=1;var e=Ie(),t=Tr(),r=nv(),n=$l(),i=iv(),o=i||n||r;return ei=function(){var c,l={assert:function(u){if(!l.has(u))throw new e("Side channel does not contain "+t(u))},delete:function(u){return!!c&&c.delete(u)},get:function(u){return c&&c.get(u)},has:function(u){return!!c&&c.has(u)},set:function(u,d){c||(c=o()),c.set(u,d)}};return l},ei}var ti,Ps;function ov(){if(Ps)return ti;Ps=1;var e=Ao(),t=kl()(),r=Ie(),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 s=t.get(i);return s&&s["$"+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 s=t.get(i);return!!s&&e(s,"$"+o)},set:function(i,o,s){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 c=t.get(i);c||(c={},t.set(i,c)),c["$"+o]=s}};return Object.freeze&&Object.freeze(n),ti=n,ti}var ri,Rs;function av(){if(Rs)return ri;Rs=1;var e=ov(),t=go(),r=typeof StopIteration=="object"?StopIteration:null;return ri=function(i){if(!r)throw new t("this environment lacks StopIteration");e.set(i,"[[Done]]",!1);var o={next:function(){var c=e.get(this,"[[Iterator]]"),l=!!e.get(c,"[[Done]]");try{return{done:l,value:l?void 0:c.next()}}catch(u){if(e.set(c,"[[Done]]",!0),u!==r)throw u;return{done:!0,value:void 0}}}};return e.set(o,"[[Iterator]]",i),o},ri}var ni,Ms;function Ll(){if(Ms)return ni;Ms=1;var e={}.toString;return ni=Array.isArray||function(t){return e.call(t)=="[object Array]"},ni}var ii,Ns;function Dl(){if(Ns)return ii;Ns=1;var e=ye(),t=e("String.prototype.valueOf"),r=function(c){try{return t(c),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object String]",o=ht()();return ii=function(c){return typeof c=="string"?!0:!c||typeof c!="object"?!1:o?r(c):n(c)===i},ii}var oi,_s;function Bl(){if(_s)return oi;_s=1;var e=typeof Map=="function"&&Map.prototype?Map:null,t=typeof Set=="function"&&Set.prototype?Set:null,r;e||(r=function(s){return!1});var n=e?Map.prototype.has:null,i=t?Set.prototype.has:null;return!r&&!n&&(r=function(s){return!1}),oi=r||function(s){if(!s||typeof s!="object")return!1;try{if(n.call(s),i)try{i.call(s)}catch{return!0}return s instanceof e}catch{}return!1},oi}var ai,$s;function zl(){if($s)return ai;$s=1;var e=typeof Map=="function"&&Map.prototype?Map:null,t=typeof Set=="function"&&Set.prototype?Set:null,r;t||(r=function(s){return!1});var n=e?Map.prototype.has:null,i=t?Set.prototype.has:null;return!r&&!i&&(r=function(s){return!1}),ai=r||function(s){if(!s||typeof s!="object")return!1;try{if(i.call(s),n)try{n.call(s)}catch{return!0}return s instanceof t}catch{}return!1},ai}var ks;function sv(){if(ks)return Mt.exports;ks=1;var e=_l(),t=av();if(yo()()||Cr()()){var r=Symbol.iterator;Mt.exports=function(C){if(C!=null&&typeof C[r]<"u")return C[r]();if(e(C))return Array.prototype[r].call(C)}}else{var n=Ll(),i=Dl(),o=Ve(),s=o("%Map%",!0),c=o("%Set%",!0),l=Rl(),u=l("Array.prototype.push"),d=l("String.prototype.charCodeAt"),f=l("String.prototype.slice"),h=function(C,$){var O=C.length;if($+1>=O)return $+1;var R=d(C,$);if(R<55296||R>56319)return $+1;var L=d(C,$+1);return L<56320||L>57343?$+1:$+2},p=function(C){var $=0;return{next:function(){var R=$>=C.length,L;return R||(L=C[$],$+=1),{done:R,value:L}}}},g=function(C,$){if(n(C)||e(C))return p(C);if(i(C)){var O=0;return{next:function(){var L=h(C,O),k=f(C,O,L);return O=L,{done:L>C.length,value:k}}}}if($&&typeof C["_es6-shim iterator_"]<"u")return C["_es6-shim iterator_"]()};if(!s&&!c)Mt.exports=function(C){if(C!=null)return g(C,!0)};else{var m=Bl(),y=zl(),S=l("Map.prototype.forEach",!0),A=l("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var w=l("Map.prototype.iterator",!0),j=l("Set.prototype.iterator",!0);var P=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),N=function(C){if(m(C)){if(w)return t(w(C));if(P)return P(C);if(S){var $=[];return S(C,function(R,L){u($,[L,R])}),p($)}}if(y(C)){if(j)return t(j(C));if(M)return M(C);if(A){var O=[];return A(C,function(R){u(O,R)}),p(O)}}};Mt.exports=function(C){return N(C)||g(C)}}}return Mt.exports}var si,Ls;function ql(){if(Ls)return si;Ls=1;var e=function(t){return t!==t};return si=function(r,n){return r===0&&n===0?1/r===1/n:!!(r===n||e(r)&&e(n))},si}var ci,Ds;function Fl(){if(Ds)return ci;Ds=1;var e=ql();return ci=function(){return typeof Object.is=="function"?Object.is:e},ci}var li,Bs;function cv(){if(Bs)return li;Bs=1;var e=Fl(),t=dt();return li=function(){var n=e();return t(Object,{is:n},{is:function(){return Object.is!==n}}),n},li}var ui,zs;function lv(){if(zs)return ui;zs=1;var e=dt(),t=Ct(),r=ql(),n=Fl(),i=cv(),o=t(n(),Object);return e(o,{getPolyfill:n,implementation:r,shim:i}),ui=o,ui}var fi,qs;function Hl(){if(qs)return fi;qs=1;var e=Ct(),t=ye(),r=Ve(),n=r("%ArrayBuffer%",!0),i=t("ArrayBuffer.prototype.byteLength",!0),o=t("Object.prototype.toString"),s=!!n&&!i&&new n(0).slice,c=!!s&&e(s);return fi=i||c?function(u){if(!u||typeof u!="object")return!1;try{return i?i(u):c(u,0),!0}catch{return!1}}:n?function(u){return o(u)==="[object ArrayBuffer]"}:function(u){return!1},fi}var di,Fs;function uv(){if(Fs)return di;Fs=1;var e=ye(),t=e("Date.prototype.getDay"),r=function(c){try{return t(c),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object Date]",o=ht()();return di=function(c){return typeof c!="object"||c===null?!1:o?r(c):n(c)===i},di}var hi,Hs;function Wl(){if(Hs)return hi;Hs=1;var e=ye(),t=ht()(),r=Ao(),n=ft(),i;if(t){var o=e("RegExp.prototype.exec"),s={},c=function(){throw s},l={toString:c,valueOf:c};typeof Symbol.toPrimitive=="symbol"&&(l[Symbol.toPrimitive]=c),i=function(h){if(!h||typeof h!="object")return!1;var p=n(h,"lastIndex"),g=p&&r(p,"value");if(!g)return!1;try{o(h,l)}catch(m){return m===s}}}else{var u=e("Object.prototype.toString"),d="[object RegExp]";i=function(h){return!h||typeof h!="object"&&typeof h!="function"?!1:u(h)===d}}return hi=i,hi}var pi,Ws;function fv(){if(Ws)return pi;Ws=1;var e=ye(),t=e("SharedArrayBuffer.prototype.byteLength",!0);return pi=t?function(n){if(!n||typeof n!="object")return!1;try{return t(n),!0}catch{return!1}}:function(n){return!1},pi}var gi,Gs;function dv(){if(Gs)return gi;Gs=1;var e=ye(),t=e("Number.prototype.toString"),r=function(c){try{return t(c),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object Number]",o=ht()();return gi=function(c){return typeof c=="number"?!0:!c||typeof c!="object"?!1:o?r(c):n(c)===i},gi}var mi,Us;function hv(){if(Us)return mi;Us=1;var e=ye(),t=e("Boolean.prototype.toString"),r=e("Object.prototype.toString"),n=function(c){try{return t(c),!0}catch{return!1}},i="[object Boolean]",o=ht()();return mi=function(c){return typeof c=="boolean"?!0:c===null||typeof c!="object"?!1:o?n(c):r(c)===i},mi}var sr={exports:{}},xi,Vs;function pv(){if(Vs)return xi;Vs=1;var e=ye(),t=Wl(),r=e("RegExp.prototype.exec"),n=Ie();return xi=function(o){if(!t(o))throw new n("`regex` must be a RegExp");return function(c){return r(o,c)!==null}},xi}var Xs;function gv(){if(Xs)return sr.exports;Xs=1;var e=ye(),t=e("Object.prototype.toString"),r=yo()(),n=pv();if(r){var i=e("Symbol.prototype.toString"),o=n(/^Symbol\(.*\)$/),s=function(l){return typeof l.valueOf()!="symbol"?!1:o(i(l))};sr.exports=function(l){if(typeof l=="symbol")return!0;if(!l||typeof l!="object"||t(l)!=="[object Symbol]")return!1;try{return s(l)}catch{return!1}}}else sr.exports=function(l){return!1};return sr.exports}var cr={exports:{}},vi,Ks;function mv(){if(Ks)return vi;Ks=1;var e=typeof BigInt<"u"&&BigInt;return vi=function(){return typeof e=="function"&&typeof BigInt=="function"&&typeof e(42)=="bigint"&&typeof BigInt(42)=="bigint"},vi}var Ys;function xv(){if(Ys)return cr.exports;Ys=1;var e=mv()();if(e){var t=BigInt.prototype.valueOf,r=function(i){try{return t.call(i),!0}catch{}return!1};cr.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 cr.exports=function(i){return!1};return cr.exports}var yi,Zs;function vv(){if(Zs)return yi;Zs=1;var e=Dl(),t=dv(),r=hv(),n=gv(),i=xv();return yi=function(s){if(s==null||typeof s!="object"&&typeof s!="function")return null;if(e(s))return"String";if(t(s))return"Number";if(r(s))return"Boolean";if(n(s))return"Symbol";if(i(s))return"BigInt"},yi}var bi,Js;function yv(){if(Js)return bi;Js=1;var e=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,t=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,r;e||(r=function(s){return!1});var n=e?e.prototype.has:null,i=t?t.prototype.has:null;return!r&&!n&&(r=function(s){return!1}),bi=r||function(s){if(!s||typeof s!="object")return!1;try{if(n.call(s,n),i)try{i.call(s,i)}catch{return!0}return s instanceof e}catch{}return!1},bi}var lr={exports:{}},Qs;function bv(){if(Qs)return lr.exports;Qs=1;var e=Ve(),t=ye(),r=e("%WeakSet%",!0),n=t("WeakSet.prototype.has",!0);if(n){var i=t("WeakMap.prototype.has",!0);lr.exports=function(s){if(!s||typeof s!="object")return!1;try{if(n(s,n),i)try{i(s,i)}catch{return!0}return s instanceof r}catch{}return!1}}else lr.exports=function(s){return!1};return lr.exports}var wi,ec;function wv(){if(ec)return wi;ec=1;var e=Bl(),t=zl(),r=yv(),n=bv();return wi=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},wi}var Si,tc;function Sv(){if(tc)return Si;tc=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(A){A!==n&&(t=null)}else t=null;var i=/^\s*class\b/,o=function(w){try{var j=e.call(w);return i.test(j)}catch{return!1}},s=function(w){try{return o(w)?!1:(e.call(w),!0)}catch{return!1}},c=Object.prototype.toString,l="[object Object]",u="[object Function]",d="[object GeneratorFunction]",f="[object HTMLAllCollection]",h="[object HTML document.all class]",p="[object HTMLCollection]",g=typeof Symbol=="function"&&!!Symbol.toStringTag,m=!(0 in[,]),y=function(){return!1};if(typeof document=="object"){var S=document.all;c.call(S)===c.call(document.all)&&(y=function(w){if((m||!w)&&(typeof w>"u"||typeof w=="object"))try{var j=c.call(w);return(j===f||j===h||j===p||j===l)&&w("")==null}catch{}return!1})}return Si=t?function(w){if(y(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{t(w,null,r)}catch(j){if(j!==n)return!1}return!o(w)&&s(w)}:function(w){if(y(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(g)return s(w);if(o(w))return!1;var j=c.call(w);return j!==u&&j!==d&&!/^\[object HTML/.test(j)?!1:s(w)},Si}var Ai,rc;function Av(){if(rc)return Ai;rc=1;var e=Sv(),t=Object.prototype.toString,r=Object.prototype.hasOwnProperty,n=function(l,u,d){for(var f=0,h=l.length;f<h;f++)r.call(l,f)&&(d==null?u(l[f],f,l):u.call(d,l[f],f,l))},i=function(l,u,d){for(var f=0,h=l.length;f<h;f++)d==null?u(l.charAt(f),f,l):u.call(d,l.charAt(f),f,l)},o=function(l,u,d){for(var f in l)r.call(l,f)&&(d==null?u(l[f],f,l):u.call(d,l[f],f,l))};function s(c){return t.call(c)==="[object Array]"}return Ai=function(l,u,d){if(!e(u))throw new TypeError("iterator must be a function");var f;arguments.length>=3&&(f=d),s(l)?n(l,u,f):typeof l=="string"?i(l,u,f):o(l,u,f)},Ai}var ji,nc;function jv(){return nc||(nc=1,ji=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),ji}var Ci,ic;function Cv(){if(ic)return Ci;ic=1;var e=jv(),t=typeof globalThis>"u"?qt:globalThis;return Ci=function(){for(var n=[],i=0;i<e.length;i++)typeof t[e[i]]=="function"&&(n[n.length]=e[i]);return n},Ci}var Ti,oc;function Tv(){if(oc)return Ti;oc=1;var e=Av(),t=Cv(),r=Ct(),n=ye(),i=ft(),o=n("Object.prototype.toString"),s=ht()(),c=typeof globalThis>"u"?qt:globalThis,l=t(),u=n("String.prototype.slice"),d=Object.getPrototypeOf,f=n("Array.prototype.indexOf",!0)||function(y,S){for(var A=0;A<y.length;A+=1)if(y[A]===S)return A;return-1},h={__proto__:null};s&&i&&d?e(l,function(m){var y=new c[m];if(Symbol.toStringTag in y){var S=d(y),A=i(S,Symbol.toStringTag);if(!A){var w=d(S);A=i(w,Symbol.toStringTag)}h["$"+m]=r(A.get)}}):e(l,function(m){var y=new c[m],S=y.slice||y.set;S&&(h["$"+m]=r(S))});var p=function(y){var S=!1;return e(h,function(A,w){if(!S)try{"$"+A(y)===w&&(S=u(w,1))}catch{}}),S},g=function(y){var S=!1;return e(h,function(A,w){if(!S)try{A(y),S=u(w,1)}catch{}}),S};return Ti=function(y){if(!y||typeof y!="object")return!1;if(!s){var S=u(o(y),8,-1);return f(l,S)>-1?S:S!=="Object"?!1:g(y)}return i?p(y):null},Ti}var Ii,ac;function Iv(){if(ac)return Ii;ac=1;var e=ye(),t=e("ArrayBuffer.prototype.byteLength",!0),r=Hl();return Ii=function(i){return r(i)?t?t(i):i.byteLength:NaN},Ii}var Oi,sc;function Ov(){if(sc)return Oi;sc=1;var e=Kx(),t=Rl(),r=Qx(),n=Ve(),i=sv(),o=kl(),s=lv(),c=_l(),l=Ll(),u=Hl(),d=uv(),f=Wl(),h=fv(),p=po(),g=vv(),m=wv(),y=Tv(),S=Iv(),A=t("SharedArrayBuffer.prototype.byteLength",!0),w=t("Date.prototype.getTime"),j=Object.getPrototypeOf,P=t("Object.prototype.toString"),M=n("%Set%",!0),N=t("Map.prototype.has",!0),I=t("Map.prototype.get",!0),C=t("Map.prototype.size",!0),$=t("Set.prototype.add",!0),O=t("Set.prototype.delete",!0),R=t("Set.prototype.has",!0),L=t("Set.prototype.size",!0);function k(T,_,G,W){for(var Y=i(T),J;(J=Y.next())&&!J.done;)if(Q(_,J.value,G,W))return O(T,J.value),!0;return!1}function K(T){if(typeof T>"u")return null;if(typeof T!="object")return typeof T=="symbol"?!1:typeof T=="string"||typeof T=="number"?+T==+T:!0}function re(T,_,G,W,Y,J){var z=K(G);if(z!=null)return z;var q=I(_,z),D=e({},Y,{strict:!1});return typeof q>"u"&&!N(_,z)||!Q(W,q,D,J)?!1:!N(T,z)&&Q(W,q,D,J)}function ue(T,_,G){var W=K(G);return W??(R(_,W)&&!R(T,W))}function ne(T,_,G,W,Y,J){for(var z=i(T),q,D;(q=z.next())&&!q.done;)if(D=q.value,Q(G,D,Y,J)&&Q(W,I(_,D),Y,J))return O(T,D),!0;return!1}function Q(T,_,G,W){var Y=G||{};if(Y.strict?s(T,_):T===_)return!0;var J=g(T),z=g(_);if(J!==z)return!1;if(!T||!_||typeof T!="object"&&typeof _!="object")return Y.strict?s(T,_):T==_;var q=W.has(T),D=W.has(_),V;if(q&&D){if(W.get(T)===W.get(_))return!0}else V={};return q||W.set(T,V),D||W.set(_,V),Oe(T,_,Y,W)}function xe(T){return!T||typeof T!="object"||typeof T.length!="number"||typeof T.copy!="function"||typeof T.slice!="function"||T.length>0&&typeof T[0]!="number"?!1:!!(T.constructor&&T.constructor.isBuffer&&T.constructor.isBuffer(T))}function de(T,_,G,W){if(L(T)!==L(_))return!1;for(var Y=i(T),J=i(_),z,q,D;(z=Y.next())&&!z.done;)if(z.value&&typeof z.value=="object")D||(D=new M),$(D,z.value);else if(!R(_,z.value)){if(G.strict||!ue(T,_,z.value))return!1;D||(D=new M),$(D,z.value)}if(D){for(;(q=J.next())&&!q.done;)if(q.value&&typeof q.value=="object"){if(!k(D,q.value,G.strict,W))return!1}else if(!G.strict&&!R(T,q.value)&&!k(D,q.value,G.strict,W))return!1;return L(D)===0}return!0}function Xe(T,_,G,W){if(C(T)!==C(_))return!1;for(var Y=i(T),J=i(_),z,q,D,V,fe,he;(z=Y.next())&&!z.done;)if(V=z.value[0],fe=z.value[1],V&&typeof V=="object")D||(D=new M),$(D,V);else if(he=I(_,V),typeof he>"u"&&!N(_,V)||!Q(fe,he,G,W)){if(G.strict||!re(T,_,V,fe,G,W))return!1;D||(D=new M),$(D,V)}if(D){for(;(q=J.next())&&!q.done;)if(V=q.value[0],he=q.value[1],V&&typeof V=="object"){if(!ne(D,T,V,he,G,W))return!1}else if(!G.strict&&(!T.has(V)||!Q(I(T,V),he,G,W))&&!ne(D,T,V,he,e({},G,{strict:!1}),W))return!1;return L(D)===0}return!0}function Oe(T,_,G,W){var Y,J;if(typeof T!=typeof _||T==null||_==null||P(T)!==P(_)||c(T)!==c(_))return!1;var z=l(T),q=l(_);if(z!==q)return!1;var D=T instanceof Error,V=_ instanceof Error;if(D!==V||(D||V)&&(T.name!==_.name||T.message!==_.message))return!1;var fe=f(T),he=f(_);if(fe!==he||(fe||he)&&(T.source!==_.source||r(T)!==r(_)))return!1;var pe=d(T),ve=d(_);if(pe!==ve||(pe||ve)&&w(T)!==w(_)||G.strict&&j&&j(T)!==j(_))return!1;var be=y(T),Le=y(_);if(be!==Le)return!1;if(be||Le){if(T.length!==_.length)return!1;for(Y=0;Y<T.length;Y++)if(T[Y]!==_[Y])return!1;return!0}var Ee=xe(T),we=xe(_);if(Ee!==we)return!1;if(Ee||we){if(T.length!==_.length)return!1;for(Y=0;Y<T.length;Y++)if(T[Y]!==_[Y])return!1;return!0}var De=u(T),Be=u(_);if(De!==Be)return!1;if(De||Be)return S(T)!==S(_)?!1:typeof Uint8Array=="function"&&Q(new Uint8Array(T),new Uint8Array(_),G,W);var ze=h(T),Zt=h(_);if(ze!==Zt)return!1;if(ze||Zt)return A(T)!==A(_)?!1:typeof Uint8Array=="function"&&Q(new Uint8Array(T),new Uint8Array(_),G,W);if(typeof T!=typeof _)return!1;var Ke=p(T),pt=p(_);if(Ke.length!==pt.length)return!1;for(Ke.sort(),pt.sort(),Y=Ke.length-1;Y>=0;Y--)if(Ke[Y]!=pt[Y])return!1;for(Y=Ke.length-1;Y>=0;Y--)if(J=Ke[Y],!Q(T[J],_[J],G,W))return!1;var It=m(T),Ye=m(_);return It!==Ye?!1:It==="Set"||Ye==="Set"?de(T,_,G,W):It==="Map"?Xe(T,_,G,W):!0}return Oi=function(_,G,W){return Q(_,G,W,o())},Oi}var Ev=Ov();const Gl=wl(Ev);function Pv(e){return e}function Ul(e,t,r,n){const i=Pv,[o,s]=b.useState(i(r)),c=b.useRef(o);return b.useEffect(()=>{const l=()=>{const u={...r,...e.getAttributes(t)};Object.keys(u).forEach(f=>{(u[f]===null||u[f]===void 0)&&(u[f]=r?r[f]:null)});const d=i(u);Gl(c.current,d)||(s(d),c.current=d)};return e.on("selectionUpdate",l),e.on("transaction",l),()=>{e.off("selectionUpdate",l),e.off("transaction",l)}},[e,r,t,i]),o}const Vl=ce.Root,Xl=ce.Trigger,cc=ce.Portal,lc=ce.Sub,Gi=ee.forwardRef(({className:e,inset:t,children:r,...n},i)=>a.jsxs(ce.SubTrigger,{ref:i,className:Z("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,a.jsx(E.ChevronRight,{className:"richtext-ml-auto richtext-h-4 richtext-w-4"})]}));Gi.displayName=ce.SubTrigger.displayName;const Ui=ee.forwardRef(({className:e,...t},r)=>a.jsx(ce.SubContent,{ref:r,className:Z("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}));Ui.displayName=ce.SubContent.displayName;const jo=ee.forwardRef(({className:e,sideOffset:t=4,...r},n)=>a.jsx(ce.Portal,{children:a.jsx(ce.Content,{ref:n,sideOffset:t,className:Z("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})}));jo.displayName=ce.Content.displayName;const Me=ee.forwardRef(({className:e,inset:t,...r},n)=>a.jsx(ce.Item,{ref:n,className:Z("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}));Me.displayName=ce.Item.displayName;const Kl=ee.forwardRef(({className:e,children:t,checked:r,...n},i)=>a.jsxs(ce.CheckboxItem,{ref:i,className:Z("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:[a.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:a.jsx(ce.ItemIndicator,{children:a.jsx(E.Check,{className:"richtext-h-4 richtext-w-4"})})}),t]}));Kl.displayName=ce.CheckboxItem.displayName;const Rv=ee.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(ce.RadioItem,{ref:n,className:Z("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:[a.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:a.jsx(ce.ItemIndicator,{children:a.jsx(E.Circle,{className:"richtext-h-2 richtext-w-2 richtext-fill-current"})})}),t]}));Rv.displayName=ce.RadioItem.displayName;const Mv=ee.forwardRef(({className:e,inset:t,...r},n)=>a.jsx(ce.Label,{ref:n,className:Z("richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",t&&"richtext-pl-8",e),...r}));Mv.displayName=ce.Label.displayName;const Co=ee.forwardRef(({className:e,...t},r)=>a.jsx(ce.Separator,{ref:r,className:Z("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",e),...t}));Co.displayName=ce.Separator.displayName;function Yl({className:e,...t}){return a.jsx("span",{className:Z("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",e),...t})}Yl.displayName="DropdownMenuShortcut";const Ae=ee.forwardRef(({className:e,type:t,...r},n)=>a.jsx("input",{type:t,className:Z("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}));Ae.displayName="Input";const Nv=wr("richtext-text-sm richtext-font-medium richtext-leading-none peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"),He=ee.forwardRef(({className:e,...t},r)=>a.jsx(yc.Root,{ref:r,className:Z(Nv(),e),...t}));He.displayName=yc.Root.displayName;const Kt=$t.Root,Yt=$t.Trigger,Tt=ee.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},i)=>a.jsx($t.Portal,{children:a.jsx($t.Content,{ref:i,align:t,sideOffset:r,className:Z("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})}));Tt.displayName=$t.Content.displayName;const Re=ee.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},i)=>a.jsx(xc.Root,{ref:i,decorative:r,orientation:t,className:Z("richtext-shrink-0 richtext-bg-border",t==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",e),...n}));Re.displayName=xc.Root.displayName;const To=ee.forwardRef(({className:e,...t},r)=>a.jsx(Mi.Root,{className:Z("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:a.jsx(Mi.Thumb,{className:Z("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")})}));To.displayName=Mi.Root.displayName;const Zl=ct.Root,Io=ee.forwardRef(({className:e,...t},r)=>a.jsx(ct.List,{ref:r,className:Z("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}));Io.displayName=ct.List.displayName;const Ft=ee.forwardRef(({className:e,...t},r)=>a.jsx(ct.Trigger,{ref:r,className:Z("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}));Ft.displayName=ct.Trigger.displayName;const Ht=ee.forwardRef(({className:e,...t},r)=>a.jsx(ct.Content,{ref:r,className:Z("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}));Ht.displayName=ct.Content.displayName;const _v=je.Provider,Jl=ee.forwardRef(({className:e,...t},r)=>a.jsx(je.Viewport,{ref:r,className:Z("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}));Jl.displayName=je.Viewport.displayName;const $v=wr("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"}}),Ql=ee.forwardRef(({className:e,variant:t,...r},n)=>a.jsx(je.Root,{ref:n,className:Z($v({variant:t}),e),...r}));Ql.displayName=je.Root.displayName;const kv=ee.forwardRef(({className:e,...t},r)=>a.jsx(je.Action,{ref:r,className:Z("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}));kv.displayName=je.Action.displayName;const eu=ee.forwardRef(({className:e,...t},r)=>a.jsx(je.Close,{ref:r,className:Z("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:a.jsx(E.X,{className:"richtext-h-4 richtext-w-4"})}));eu.displayName=je.Close.displayName;const tu=ee.forwardRef(({className:e,...t},r)=>a.jsx(je.Title,{ref:r,className:Z("richtext-text-sm richtext-font-semibold",e),...t}));tu.displayName=je.Title.displayName;const ru=ee.forwardRef(({className:e,...t},r)=>a.jsx(je.Description,{ref:r,className:Z("richtext-text-sm richtext-opacity-90",e),...t}));ru.displayName=je.Description.displayName;const Lv=wr("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"}}),Oo=ee.forwardRef(({className:e,variant:t,size:r,...n},i)=>a.jsx(vc.Root,{ref:i,className:Z(Lv({variant:t,size:r,className:e})),...n}));Oo.displayName=vc.Root.displayName;const Dv=Wt.Provider,Eo=Wt.Root,Po=Wt.Trigger,Ir=ee.forwardRef(({className:e,sideOffset:t=4,...r},n)=>a.jsx(Wt.Content,{ref:n,sideOffset:t,className:Z("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}));Ir.displayName=Wt.Content.displayName;const Bv=1,zv=1e6;let Ei=0;function qv(){return Ei=(Ei+1)%Number.MAX_SAFE_INTEGER,Ei.toString()}const Pi=new Map;function uc(e){if(Pi.has(e))return;const t=setTimeout(()=>{Pi.delete(e),_t({type:"REMOVE_TOAST",toastId:e})},zv);Pi.set(e,t)}function Fv(e,t){switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Bv)};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?uc(r):e.toasts.forEach(n=>{uc(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 fr={toasts:[]};function _t(e){fr=Fv(fr,e),ur.forEach(t=>{t(fr)})}function Hv({...e}){const t=qv(),r=i=>_t({type:"UPDATE_TOAST",toast:{...i,id:t}}),n=()=>_t({type:"DISMISS_TOAST",toastId:t});return _t({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function nu(){const[e,t]=ee.useState(fr);return ee.useEffect(()=>(ur.push(t),()=>{const r=ur.indexOf(t);r>-1&&ur.splice(r,1)}),[e]),{...e,toast:Hv,dismiss:r=>_t({type:"DISMISS_TOAST",toastId:r})}}const iu=ee.forwardRef(({className:e,...t},r)=>a.jsx(Ri.Root,{ref:r,className:Z("!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:a.jsx(Ri.Indicator,{className:Z("!richtext-flex !richtext-p-0 !richtext-items-center !richtext-justify-center !richtext-text-current"),children:a.jsx(E.Check,{className:"!richtext-h-4 !richtext-w-4"})})}));iu.displayName=Ri.Root.displayName;const Wv={padding:"0 12px 12px"},ou=({width:e,maxWidth:t,height:r,onOk:n,children:i})=>{const{t:o}=B.useLocale(),[s,c]=b.useState({width:"",height:"",maxWidth:""});b.useEffect(()=>{c({width:e,height:r,maxWidth:t})},[r,t,e]);function l(u){u.preventDefault(),u.stopPropagation(),n(s)}return a.jsxs(Kt,{modal:!0,children:[a.jsx(Yt,{asChild:!0,children:i}),a.jsx(Tt,{children:a.jsx("div",{style:Wv,children:a.jsxs("form",{className:"richtext-flex richtext-flex-col richtext-gap-2",onSubmit:l,children:[a.jsx(He,{className:"mb-[6px]",children:"Width"}),a.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:a.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:a.jsx(Ae,{type:"number",value:s.width,required:!0,onChange:u=>c({...s,width:u.target.value})})})}),a.jsx(He,{className:"mb-[6px]",children:"Max Width"}),a.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:a.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:a.jsx(Ae,{type:"number",value:s.maxWidth,required:!0,onChange:u=>c({...s,maxWidth:u.target.value})})})}),a.jsx(He,{className:"mb-[6px]",children:"Height"}),a.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:a.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:a.jsx(Ae,{type:"number",value:s.height,required:!0,onChange:u=>c({...s,height:u.target.value})})})}),a.jsx(me,{type:"submit",className:"richtext-self-end richtext-mt-2",children:o("editor.link.dialog.button.apply")})]})})})]})};function au(){const[e]=ml(t=>t.value);return e}const Gv={setDisable:(e,t)=>{Ar(nt.EDIT(e),t)}},Uv="_wrap_5y04w_1",Vv="_innerWrap_5y04w_15",fc={wrap:Uv,innerWrap:Vv};function Xv({editor:e,node:t,updateAttributes:r}){const n=au(),{url:i,width:o,height:s}=t.attrs,[c,l]=b.useState("");function u(){c&&e.chain().updateAttributes(at.name,{url:c}).setNodeSelection(e.state.selection.from).focus().run()}const d=b.useCallback(f=>{r({width:f.width,height:f.height})},[r]);return a.jsxs(le.NodeViewWrapper,{children:[!i&&a.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:[a.jsx(Ae,{autoFocus:!0,className:"richtext-flex-1",onInput:f=>l(f.target.value),placeholder:"Enter link",type:"url",value:c}),a.jsx(me,{className:"richtext-w-[60px]",onClick:u,children:"OK"})]}),i&&a.jsx(Cu.Resizable,{size:{width:Number.parseInt(o),height:Number.parseInt(s)},onResizeStop:(f,h,p,g)=>{d({width:Number.parseInt(o)+g.width,height:Number.parseInt(s)+g.height})},children:a.jsx("div",{className:le.clsx(fc.wrap,"render-wrapper"),children:a.jsx("div",{className:fc.innerWrap,style:{pointerEvents:n?"none":"auto"},children:a.jsx("iframe",{className:"richtext-my-[12px] ",src:i})})})})]})}const at=H.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:F,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:le.getDatasetAttribute("width")},height:{default:300,parseHTML:le.getDatasetAttribute("height")},url:{default:null,parseHTML:le.getDatasetAttribute("url")},defaultShowPicker:{default:!1},frameborder:{default:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen}}},parseHTML(){return[{tag:"iframe"}]},renderHTML({HTMLAttributes:e}){return["iframe",H.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setIframe:e=>({tr:t,commands:r,chain:n})=>{var o,s,c;if(((c=(s=(o=t.selection)==null?void 0:o.node)==null?void 0:s.type)==null?void 0:c.name)==this.name)return r.updateAttributes(this.name,e);const i=e||{url:""};return n().insertContent({type:this.name,attrs:i}).run()}}},addInputRules(){return[H.nodeInputRule({find:/^\$iframe\$$/,type:this.type,getAttributes:()=>({width:"100%"})})]},addNodeView(){return le.ReactNodeViewRenderer(Xv)}});function Kv({editor:e}){const{t}=B.useLocale(),{width:r,height:n,url:i}=Ul(e,at.name,{width:0,height:0,url:"",defaultShowPicker:!1}),[o,s]=b.useState(!1),[c,l]=b.useState(""),u=b.useCallback(()=>{s(!1)},[s]);b.useEffect(()=>{o&&l(i)},[o,i]);const d=b.useCallback(()=>{e.chain().updateAttributes(at.name,{url:c}).setNodeSelection(e.state.selection.from).focus().run(),s(!1)},[e,c,s]),f=b.useCallback(()=>{window.open(i,"_blank")},[i]),h=b.useCallback(()=>{s(!0)},[s]),p=b.useCallback(y=>{e.chain().updateAttributes(at.name,y).setNodeSelection(e.state.selection.from).focus().run()},[e]),g=b.useCallback(()=>e.isActive(at.name)&&!i,[e,i]),m=b.useCallback(()=>ho(at.name,e),[e]);return a.jsxs(a.Fragment,{children:[a.jsx(le.BubbleMenu,{className:"bubble-menu",editor:e,pluginKey:"iframe-bubble-menu",shouldShow:g,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999},children:a.jsxs("div",{className:"richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background",children:[a.jsx(F,{action:f,icon:"Eye",tooltip:"Visit Link"}),a.jsx(F,{action:h,icon:"Pencil",tooltip:"Open Edit Link"}),a.jsx(ou,{width:r,height:n,onOk:p,children:a.jsx(F,{icon:"Settings",tooltip:t("editor.settings")})}),a.jsx(F,{action:m,icon:"Trash2",tooltip:t("editor.delete")})]})}),a.jsxs(Ut,{open:o,onOpenChange:s,children:[a.jsx(Vt,{}),a.jsxs(At,{children:[a.jsx(pl,{children:a.jsx(jt,{children:"Edit Link Iframe"})}),a.jsx(Ae,{value:c,onInput:y=>l(y.target.value),type:"url",autoFocus:!0,placeholder:"Enter link"}),a.jsxs(br,{children:[a.jsx(me,{onClick:u,children:"Cancel"}),a.jsx(me,{onClick:d,children:"OK"})]})]})]})]})}function Yv({editor:e,disabled:t,bubbleMenu:r}){const n=e.extensionManager.extensions.map(o=>o.name),i=()=>{var o,s,c,l,u,d,f,h,p,g;return[n.includes("columns")&&!((o=r==null?void 0:r.columnConfig)!=null&&o.hidden)?a.jsx(Ox,{editor:e},"columns"):null,n.includes("table")&&!((s=r==null?void 0:r.tableConfig)!=null&&s.hidden)?a.jsx(km,{actions:(c=r==null?void 0:r.tableConfig)==null?void 0:c.actions,editor:e},"table"):null,n.includes("link")&&!((l=r==null?void 0:r.linkConfig)!=null&&l.hidden)?a.jsx(Dm,{disabled:t,editor:e},"link"):null,n.includes(wt.name)&&!((u=r==null?void 0:r.imageConfig)!=null&&u.hidden)?a.jsx(wx,{disabled:t,editor:e},"image"):null,n.includes(so.name)&&!((d=r==null?void 0:r.imageGifConfig)!=null&&d.hidden)?a.jsx(Sx,{disabled:t,editor:e},"imageGif"):null,n.includes("video")&&!((f=r==null?void 0:r.videoConfig)!=null&&f.hidden)?a.jsx(Ax,{disabled:t,editor:e},"video"):null,n.includes("iframe")&&!((h=r==null?void 0:r.iframeConfig)!=null&&h.hidden)?a.jsx(Kv,{disabled:t,editor:e},"iframe"):null,(p=r==null?void 0:r.floatingMenuConfig)!=null&&p.hidden?null:a.jsx(dm,{disabled:t,editor:e},"content"),(g=r==null?void 0:r.textConfig)!=null&&g.hidden?null:a.jsx(gm,{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 dc(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 su(e){const{t}=B.useLocale(),{highlight:r=!1,disabled:n=!1,selectedColor:i,setSelectedColor:o,onChange:s,colors:c=B.COLORS_LIST}=e,l=b.useMemo(()=>{const p=c,g=[];for(let m=0;m<p.length;m+=10)g.push(p.slice(m,m+10));return g},[c]),[u,d]=b.useState([]),f=p=>{const g=[...u],m=g.indexOf(p);m!==-1&&g.splice(m,1),g.unshift(p),g.length>10&&g.pop(),d(g)};function h(p){if(p===void 0){o==null||o(p),s==null||s(p);return}/^#([\da-f]{3}){1,2}$/i.test(p)&&(o==null||o(p),s==null||s(p),f(p))}return a.jsxs(Kt,{modal:!0,children:[a.jsx(Yt,{asChild:!0,className:"!richtext-p-0",disabled:n,children:e==null?void 0:e.children}),a.jsx(Tt,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:a.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[r?a.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:[a.jsx(dc,{}),a.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:t("editor.nofill")})]}):a.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:[a.jsx(dc,{}),a.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:t("editor.default")})]}),l.map((p,g)=>a.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:p.map((m,y)=>a.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(m),children:a.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:m},children:m===i?a.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:a.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):a.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:a.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${y}`))},g)),a.jsxs("div",{children:[a.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:t("editor.recent")}),a.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,g)=>a.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:a.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:p},children:a.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:a.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${g}`))})]}),a.jsx(Zv,{setColor:h})]})})]})}function Zv({setColor:e}){const[t,r]=b.useState("#000000"),[n,i]=b.useState(!1),{t:o}=B.useLocale();return b.useEffect(()=>()=>{i(!1)},[]),a.jsxs(Kt,{open:n,children:[a.jsx(Yt,{asChild:!0,children:a.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",onClick:s=>{s.preventDefault(),i(!0)},children:[o("editor.color.more"),"..."]})}),a.jsxs(Tt,{children:[a.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[a.jsx(Eu.HexColorPicker,{color:t,onChange:r}),a.jsx(Ae,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:t.slice(1),onChange:s=>{s.preventDefault(),r(`#${s.target.value}`)}})]}),a.jsx(Re,{className:"richtext-my-[10px]"}),a.jsx(me,{className:"richtext-w-full",onClick:s=>{s.preventDefault(),e(t),i(!1)},children:a.jsx(E.Plus,{size:16})})]})]})}function Jv({editor:e,disabled:t,toolbar:r}){const{t:n,lang:i}=B.useLocale(),o=b.useMemo(()=>{const u=[...e.extensionManager.extensions].sort((f,h)=>{const p=f.options.sort??-1,g=h.options.sort??-1;return p-g});let d=[];for(const f of u){const{button:h,divider:p=!1,spacer:g=!1,toolbar:m=!0}=f.options;if(!h||!px(h)||!m)continue;const y=h({editor:e,extension:f,t:n});if(Array.isArray(y)){const S=y.map((A,w)=>({button:A,divider:w===y.length-1?p:!1,spacer:w===0?g:!1,type:f.type,name:f.name}));d=[...d,...S];continue}d.push({button:y,divider:p,spacer:g,type:f.type,name:f.name})}return d},[e,n,i]),s=l=>a.jsx("div",{className:"richtext-px-1 richtext-py-2 !richtext-border-b",style:{pointerEvents:t?"none":"auto",opacity:t?.5:1},children:a.jsx("div",{className:"richtext-relative richtext-flex richtext-flex-wrap richtext-h-auto richtext-gap-y-1 richtext-gap-x-1",children:l})}),c=o.map((l,u)=>{var f,h;const d=l.button.component;return a.jsxs("div",{className:"richtext-flex richtext-items-center",children:[(l==null?void 0:l.spacer)&&a.jsx(Re,{orientation:"vertical",className:"!richtext-h-[16px] !richtext-mx-[10px]"}),a.jsx(d,{...l.button.componentProps,disabled:t||((h=(f=l==null?void 0:l.button)==null?void 0:f.componentProps)==null?void 0:h.disabled)}),(l==null?void 0:l.divider)&&a.jsx(Re,{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,c,s):s(c)}function Qv({editor:e,extensions:t}){const{t:r}=B.useLocale(),n=b.useMemo(()=>{var i,o,s;return(s=(o=(i=t==null?void 0:t.find(c=>c.name==="base-kit"))==null?void 0:i.options)==null?void 0:o.characterCount)==null?void 0:s.limit},[t]);return n?a.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t",children:a.jsx("div",{className:"richtext-flex richtext-flex-col",children:a.jsx("div",{className:"richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm",children:a.jsxs("span",{children:[e.storage.characterCount.characters(),"/",n," ",r("editor.characters")]})})})}):a.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t",children:a.jsx("div",{className:"richtext-flex richtext-flex-col",children:a.jsx("div",{className:"richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm",children:a.jsxs("span",{children:[e.storage.characterCount.characters()," ",r("editor.characters")]})})})})}function e1(){const{toasts:e}=nu();return a.jsxs(_v,{children:[e.map(({id:t,title:r,description:n,action:i,...o})=>a.jsxs(Ql,{...o,children:[a.jsxs("div",{className:"richtext-grid richtext-gap-1",children:[r&&a.jsx(tu,{children:r}),n&&a.jsx(ru,{children:n})]}),i,a.jsx(eu,{})]},t)),a.jsx(Jl,{})]})}const t1=`
5
- .reactjs-tiptap-editor,
6
- .richtext-dialog-content {
7
- button,
8
- input:where([type=button]),
9
- input:where([type=reset]),
10
- input:where([type=submit]) {
11
- -webkit-appearance: button;
12
- background-color: transparent;
13
- background-image: none;
14
- }
15
-
16
- input,
17
- optgroup,
18
- select {
19
- font-family: inherit;
20
- font-feature-settings: inherit;
21
- font-variation-settings: inherit;
22
- font-size: 100%;
23
- font-weight: inherit;
24
- line-height: inherit;
25
- letter-spacing: inherit;
26
- color: inherit;
27
- }
28
-
29
- button {
30
- font-family: inherit;
31
- font-feature-settings: inherit;
32
- font-variation-settings: inherit;
33
- font-size: 100%;
34
- font-weight: inherit;
35
- line-height: inherit;
36
- letter-spacing: inherit;
37
- color: inherit;
38
- }
39
-
40
- *,
41
- ::before,
42
- ::after {
43
- box-sizing: border-box;
44
- border-width: 0;
45
- border-style: solid;
46
- border-color: hsl(var(--richtext-border));
47
- }
48
-
49
- background-color: hsl(var(--richtext-background));
50
- color: hsl(var(--richtext-foreground));
51
-
52
- hr {
53
- height: 0;
54
- color: inherit;
55
- border-top-width: 1px;
56
- }
57
-
58
- a {
59
- color: inherit;
60
- text-decoration: inherit;
61
- }
62
-
63
- b,
64
- strong {
65
- font-weight: bolder;
66
- }
67
-
68
- code,
69
- kbd,
70
- samp,
71
- pre {
72
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
73
- font-feature-settings: normal;
74
- font-variation-settings: normal;
75
- font-size: 1em;
76
- }
77
-
78
- table {
79
- text-indent: 0;
80
- border-color: inherit;
81
- border-collapse: collapse;
82
- }
83
-
84
- input {
85
- border-width: 1px;
86
- }
87
-
88
-
89
- input::placeholder {
90
- opacity: 1;
91
- color: #9ca3af;
92
- }
93
-
94
- button, input {
95
- cursor: pointer;
96
- color: inherit;
97
- }
98
-
99
- img,
100
- svg,
101
- video,
102
- canvas,
103
- audio,
104
- iframe,
105
- embed,
106
- object {
107
- display: block;
108
- vertical-align: middle;
109
- }
110
-
111
- img,
112
- video {
113
- max-width: 100%;
114
- height: auto;
115
- }
116
- }
117
-
118
- div[data-radix-popper-content-wrapper],
119
- div[data-tippy-root] {
120
- *,
121
- ::before,
122
- ::after {
123
- box-sizing: border-box;
124
- border-width: 0;
125
- border-style: solid;
126
- border-color: hsl(var(--richtext-border));
127
- }
128
-
129
- background-color: hsl(var(--richtext-background));
130
- color: hsl(var(--richtext-foreground));
131
-
132
- button, input {
133
- cursor: pointer;
134
- color: inherit;
135
- }
136
- }
137
- `,r1=b.memo(({children:e,id:t})=>{const[,r]=ml(s=>s.value),[,n]=xl(s=>s.value),i=s=>{r({value:s.detail})},o=s=>{n({value:s.detail})};return b.useEffect(()=>{const s=Bt(nt.EDIT(t),i),c=Bt(nt.UPDATE_THEME(t),o);return()=>{s(),c()}},[]),a.jsx(a.Fragment,{children:e})});function n1({children:e,id:t}){return a.jsx(Km,{children:a.jsx(Ym,{children:a.jsx(r1,{id:t,children:e})})})}function i1(){const[e]=xl(t=>t.value);return e}const o1={setTheme:(e,t)=>{Ar(nt.UPDATE_THEME(e),t)}},hc="data-rc-order",pc="data-rc-priority",a1="rc-util-key",Vi=new Map;function s1(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 cu({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:a1}function Ro(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function c1(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function lu(e){return[...(Vi.get(e)||e).children].filter(t=>t.tagName==="STYLE")}function uu(e,t={}){const{csp:r,prepend:n,priority:i=0}=t,o=c1(n),s=o==="prependQueue",c=document.createElement("style");c.setAttribute(hc,o),s&&i&&c.setAttribute(pc,`${i}`),r!=null&&r.nonce&&(c.nonce=r==null?void 0:r.nonce),c.innerHTML=e;const l=Ro(t),{firstChild:u}=l;if(n){if(s){const d=lu(l).filter(f=>{if(!["prepend","prependQueue"].includes(f.getAttribute(hc)))return!1;const h=Number(f.getAttribute(pc)||0);return i>=h});if(d.length>0)return l.insertBefore(c,d.at(-1).nextSibling),c}u.before(c)}else l.append(c);return c}function fu(e,t={}){const r=Ro(t);return lu(r).find(n=>n.getAttribute(cu(t))===e)}function l1(e,t={}){const r=fu(e,t);r&&r.remove()}function u1(e,t){const r=Vi.get(e);if(!r||!s1(document,r)){const n=uu("",t),{parentNode:i}=n;Vi.set(e,i),n.remove()}}function f1(e,t,r={}){var s,c,l;const n=Ro(r);u1(n,r);const i=fu(t,r);if(i)return(s=r.csp)!=null&&s.nonce&&i.nonce!==((c=r.csp)==null?void 0:c.nonce)&&(i.nonce=(l=r.csp)==null?void 0:l.nonce),i.innerHTML!==e&&(i.innerHTML=e),i;const o=uu(e,r);return o.setAttribute(cu(r),t),o}function d1(e,t){const{content:r,extensions:n,useEditorOptions:i={}}=e,o=b.useId(),s=b.useMemo(()=>{const f=Wp(n,n,"name");return[...n.map(p=>{const g=n.find(m=>m.name===p.name);return g?p.configure(g.options):p}),...f].map((p,g)=>p.configure({sort:g}))},[n]),c=bt(f=>{var p;const h=u(f,e.output);(p=e==null?void 0:e.onChangeContent)==null||p.call(e,h)},B.EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME),l=le.useEditor({extensions:s,content:r,onUpdate:({editor:f})=>{c&&c(f)},...i});b.useImperativeHandle(t,()=>({editor:l})),b.useEffect(()=>{document.documentElement.classList.toggle("dark",e.dark),o1.setTheme(o,e.dark?"dark":"light")},[e.dark]),b.useEffect(()=>{l==null||l.setEditable(!(e!=null&&e.disabled)),Gv.setDisable(o,!(e!=null&&e.disabled))},[l,e==null?void 0:e.disabled]),b.useEffect(()=>((e==null?void 0:e.resetCSS)!==!1&&f1(t1,"react-tiptap-reset"),()=>{l1("react-tiptap-reset")}),[e==null?void 0:e.resetCSS]);function u(f,h){return e!=null&&e.removeDefaultWrapper?h==="html"?f.isEmpty?"":f.getHTML():h==="json"?f.isEmpty?{}:f.getJSON():h==="text"?f.isEmpty?"":f.getText():"":h==="html"?f.getHTML():h==="json"?f.getJSON():h==="text"?f.getText():""}b.useLayoutEffect(()=>{l&&(l.id=o)},[o,l]),b.useEffect(()=>()=>{var f;(f=l==null?void 0:l.destroy)==null||f.call(l)},[]);const d=yl(l,"characterCount");return l?a.jsxs("div",{className:"reactjs-tiptap-editor",children:[a.jsx(n1,{id:o,children:a.jsx(Dv,{delayDuration:0,disableHoverableContent:!0,children:a.jsx("div",{className:"richtext-overflow-hidden richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-outline richtext-outline-1",children:a.jsxs("div",{className:"richtext-flex richtext-max-h-full richtext-w-full richtext-flex-col",children:[!(e!=null&&e.hideToolbar)&&a.jsx(Jv,{disabled:!!(e!=null&&e.disabled),editor:l,toolbar:e.toolbar}),a.jsx(le.EditorContent,{className:`richtext-relative ${(e==null?void 0:e.contentClass)||""}`,editor:l}),d&&a.jsx(Qv,{editor:l,extensions:n}),!(e!=null&&e.hideBubble)&&a.jsx(Yv,{bubbleMenu:e==null?void 0:e.bubbleMenu,disabled:e==null?void 0:e.disabled,editor:l})]})})})}),a.jsx(e1,{})]}):a.jsx(a.Fragment,{})}const h1=b.forwardRef(d1);exports.ActionButton=F;exports.Button=me;exports.ColorPicker=su;exports.Column=fo;exports.ColumnActionButton=Ix;exports.Dialog=Ut;exports.DialogContent=At;exports.DialogFooter=br;exports.DialogTitle=jt;exports.DialogTrigger=Vt;exports.DropdownMenu=Vl;exports.DropdownMenuCheckboxItem=Kl;exports.DropdownMenuContent=jo;exports.DropdownMenuSeparator=Co;exports.DropdownMenuShortcut=Yl;exports.DropdownMenuTrigger=Xl;exports.EVENTS=nt;exports.EXTENSION_PRIORITY_HIGHEST=bl;exports.ExportPdf=ll;exports.ExportWord=ul;exports.HighlightActionButton=fl;exports.IconComponent=ge;exports.Iframe=at;exports.Image=ao;exports.Image$1=wt;exports.ImageGif=so;exports.IndentProps=gr;exports.Input=Ae;exports.Label=He;exports.LinkEditBlock=dl;exports.MenuDown=cl;exports.MultiColumn=zt;exports.Popover=Kt;exports.PopoverContent=Tt;exports.PopoverTrigger=Yt;exports.RichTextEditor=h1;exports.Separator=Re;exports.SizeSetter=ou;exports.Switch=To;exports.Toggle=Oo;exports.Tooltip=Eo;exports.TooltipContent=Ir;exports.TooltipTrigger=Po;exports.Video=co;exports.actionDialogImage=vl;exports.clamp=fx;exports.cn=Z;exports.commonjsGlobal=qt;exports.createIndentCommand=fm;exports.dataURLtoFile=gl;exports.debounce=Gt;exports.deepEqual=Gl;exports.deleteNode=ho;exports.dispatchEvent=Ar;exports.ensureNameValueOptions=mx;exports.extractFileExtension=Wm;exports.extractFilename=Hm;exports.getAugmentedNamespace=Sl;exports.getBubbleDrawer=rm;exports.getBubbleMermaid=tm;exports.getDefaultExportFromCjs=wl;exports.getShortcutKey=il;exports.getShortcutKeys=ol;exports.hasExtension=yl;exports.icons=oo;exports.listenEvent=Bt;exports.normalizeFileSize=Gm;exports.normalizeFileType=Um;exports.throttle=bt;exports.useAttributes=Ul;exports.useEditableEditor=au;exports.useTheme=i1;exports.useToast=nu;