reactjs-tiptap-editor 1.0.22 → 1.0.24

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 (159) hide show
  1. package/lib/{ActionMenuButton-BBDqKvKg.cjs → ActionMenuButton-B8NhVw5m.cjs} +1 -1
  2. package/lib/{ActionMenuButton-B1067mIC.js → ActionMenuButton-HYlhmRvw.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.js +4 -4
  5. package/lib/Blockquote.cjs +1 -1
  6. package/lib/Blockquote.js +2 -2
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +2 -2
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +2 -2
  11. package/lib/{Callout-lBlBlK_w.cjs → Callout-B-S2f0Qo.cjs} +1 -1
  12. package/lib/{Callout-V2mO6s2Y.js → Callout-CF7Y9yJ7.js} +4 -4
  13. package/lib/Callout.cjs +1 -1
  14. package/lib/Callout.js +4 -4
  15. package/lib/Clear.cjs +1 -1
  16. package/lib/Clear.js +2 -2
  17. package/lib/Code.cjs +1 -1
  18. package/lib/Code.js +6 -6
  19. package/lib/CodeBlock.cjs +1 -1
  20. package/lib/CodeBlock.js +27 -27
  21. package/lib/CodeView.cjs +1 -1
  22. package/lib/CodeView.js +2 -2
  23. package/lib/Color.cjs +1 -1
  24. package/lib/Color.js +3 -3
  25. package/lib/Column.cjs +1 -1
  26. package/lib/Column.js +7 -7
  27. package/lib/{Drawer-Cyv27orn.js → Drawer-CaXVhxo4.js} +21 -21
  28. package/lib/{Drawer-BeYo9jAG.cjs → Drawer-Was4hxYH.cjs} +1 -1
  29. package/lib/Drawer.cjs +1 -1
  30. package/lib/Drawer.js +4 -4
  31. package/lib/Emoji.cjs +1 -1
  32. package/lib/Emoji.js +4312 -1860
  33. package/lib/Excalidraw.cjs +1 -1
  34. package/lib/Excalidraw.js +3 -3
  35. package/lib/ExportPdf.cjs +1 -1
  36. package/lib/ExportPdf.js +2 -2
  37. package/lib/ExportWord.cjs +1 -1
  38. package/lib/ExportWord.js +2 -2
  39. package/lib/FontFamily.cjs +1 -1
  40. package/lib/FontFamily.js +5 -5
  41. package/lib/FontSize.cjs +1 -1
  42. package/lib/FontSize.js +9 -9
  43. package/lib/Heading.cjs +1 -1
  44. package/lib/Heading.js +5 -5
  45. package/lib/Highlight.cjs +1 -1
  46. package/lib/Highlight.js +69 -46
  47. package/lib/History.cjs +1 -1
  48. package/lib/History.js +556 -418
  49. package/lib/HorizontalRule.cjs +1 -1
  50. package/lib/HorizontalRule.js +2 -2
  51. package/lib/{Iframe-Bx-VDxSB.cjs → Iframe-BI0sq6pd.cjs} +1 -1
  52. package/lib/{Iframe-D9JVKzO0.js → Iframe-Bp986fj0.js} +3 -3
  53. package/lib/Iframe.cjs +1 -1
  54. package/lib/Iframe.js +3 -3
  55. package/lib/Image.cjs +1 -1
  56. package/lib/Image.js +3 -3
  57. package/lib/ImageGif.cjs +1 -1
  58. package/lib/ImageGif.js +47 -47
  59. package/lib/ImportWord.cjs +1 -1
  60. package/lib/ImportWord.js +3 -3
  61. package/lib/{Indent-B5tQ5Wfg.js → Indent-E6B8DkyN.js} +4 -4
  62. package/lib/{Indent-CCLO0KpG.cjs → Indent-FvM52kjA.cjs} +1 -1
  63. package/lib/Indent.cjs +1 -1
  64. package/lib/Indent.js +2 -2
  65. package/lib/Italic.cjs +1 -1
  66. package/lib/Italic.js +2 -2
  67. package/lib/{Katex-rtfVV2pl.cjs → Katex-DP6EjdKz.cjs} +1 -1
  68. package/lib/{Katex-w_c6vAMd.js → Katex-pzwyyiFJ.js} +5 -5
  69. package/lib/Katex.cjs +1 -1
  70. package/lib/Katex.js +3 -3
  71. package/lib/LineHeight.cjs +1 -1
  72. package/lib/LineHeight.js +4 -4
  73. package/lib/Link.cjs +1 -1
  74. package/lib/Link.js +2 -2
  75. package/lib/LinkEditBlock-Cmkmp2fW.cjs +5 -0
  76. package/lib/{LinkEditBlock-CTlU8YnO.js → LinkEditBlock-OjN4F2rM.js} +222 -224
  77. package/lib/MarkdownPaste.cjs +1 -1
  78. package/lib/MarkdownPaste.js +1 -1
  79. package/lib/Mention.cjs +1 -1
  80. package/lib/Mention.js +8 -8
  81. package/lib/Mermaid.cjs +1 -1
  82. package/lib/Mermaid.js +34 -34
  83. package/lib/MoreMark.cjs +1 -1
  84. package/lib/MoreMark.js +3 -3
  85. package/lib/OrderedList.cjs +1 -1
  86. package/lib/OrderedList.js +2 -2
  87. package/lib/SearchAndReplace.cjs +1 -1
  88. package/lib/SearchAndReplace.js +4 -4
  89. package/lib/SlashCommand.cjs +1 -1
  90. package/lib/SlashCommand.js +7 -7
  91. package/lib/{SlashCommandNodeView-CVKjpS6r.cjs → SlashCommandNodeView-DarAytvt.cjs} +1 -1
  92. package/lib/{SlashCommandNodeView-DNkpJuM3.js → SlashCommandNodeView-o323V8li.js} +2 -2
  93. package/lib/Strike.cjs +1 -1
  94. package/lib/Strike.js +2 -2
  95. package/lib/Table-CC9uNHPL.js +1984 -0
  96. package/lib/Table-Clnz-i4l.cjs +9 -0
  97. package/lib/Table.cjs +1 -1
  98. package/lib/Table.js +1 -1
  99. package/lib/TaskList.cjs +1 -1
  100. package/lib/TaskList.js +2 -2
  101. package/lib/TextAlign.cjs +1 -1
  102. package/lib/TextAlign.js +3 -3
  103. package/lib/TextDirection.cjs +1 -1
  104. package/lib/TextDirection.js +3 -3
  105. package/lib/TextUnderline.cjs +1 -1
  106. package/lib/TextUnderline.js +2 -2
  107. package/lib/{Twitter-BJjt8vv_.cjs → Twitter-0kmrijjL.cjs} +1 -1
  108. package/lib/{Twitter-CKm0M53B.js → Twitter-BVnXL8we.js} +5 -5
  109. package/lib/Twitter.cjs +1 -1
  110. package/lib/Twitter.js +3 -3
  111. package/lib/Video.cjs +1 -1
  112. package/lib/Video.js +3 -3
  113. package/lib/bubble.cjs +6 -6
  114. package/lib/bubble.js +1573 -1561
  115. package/lib/{clsx-Bg-2aTKh.js → clsx-0OU6n9va.js} +379 -353
  116. package/lib/clsx-D6gYQn3o.cjs +33 -0
  117. package/lib/{dropdown-menu-Dre693DD.cjs → dropdown-menu-BIGvxqiu.cjs} +1 -1
  118. package/lib/{dropdown-menu-AhMKS9PQ.js → dropdown-menu-BW2M6saA.js} +1 -1
  119. package/lib/index-BAb_UADw.cjs +1 -0
  120. package/lib/index-BF3EVCB1.cjs +2 -0
  121. package/lib/{index-D0EmqTpe.js → index-BblvcbTH.js} +1130 -1064
  122. package/lib/index-Bcj8cyOO.cjs +24 -0
  123. package/lib/{index-BfHAqkoX.js → index-BrsJsbds.js} +3 -3
  124. package/lib/index-CGjT-a9h.js +1377 -0
  125. package/lib/index-CPTpXLfX.cjs +11 -0
  126. package/lib/{index-C3dgmjIF.cjs → index-CUvjYuRp.cjs} +1 -1
  127. package/lib/{index-C4aGVY2E.cjs → index-CWw4s87s.cjs} +1 -1
  128. package/lib/{index-DXtVL0al.js → index-Cal5SPfB.js} +189 -134
  129. package/lib/{index-CjLxMm5d.js → index-D-Ouz0vF.js} +1 -1
  130. package/lib/{index-83hp1lZH.cjs → index-deubsx3z.cjs} +1 -1
  131. package/lib/{index-DtVRewGA.js → index-oj858lQO.js} +229 -31
  132. package/lib/{index-CbkpBnTX.js → index-zw-Kd38i.js} +47 -50
  133. package/lib/index.cjs +1 -1
  134. package/lib/index.js +2 -2
  135. package/lib/locale-bundle.cjs +1 -1
  136. package/lib/locale-bundle.js +7 -6
  137. package/lib/locales/index.d.ts +199 -1
  138. package/lib/locales/ja.d.ts +198 -0
  139. package/lib/{popover-B1ptDngu.js → popover-BIVHT1W9.js} +1 -1
  140. package/lib/{popover-D7w_FVSV.cjs → popover-DoSfJsFS.cjs} +1 -1
  141. package/lib/{renderNodeView-CbxCTni3.js → renderNodeView-CfWJK4rG.js} +2 -2
  142. package/lib/{renderNodeView-DFVrJy0l.cjs → renderNodeView-D--fDFov.cjs} +1 -1
  143. package/lib/{separator-C_7KkuoG.cjs → separator-SRbPfmGa.cjs} +1 -1
  144. package/lib/{separator-CDoF4Z4Z.js → separator-b-qOPJmp.js} +3 -3
  145. package/lib/{textarea-CNzZnjjW.js → textarea-CpxXPky_.js} +1 -1
  146. package/lib/{textarea-CEtXap1b.cjs → textarea-DbGw9oCU.cjs} +1 -1
  147. package/lib/updatePosition-BwzAsiY0.js +16 -0
  148. package/lib/{updatePosition-CQE1ct18.cjs → updatePosition-DGPtRfWN.cjs} +1 -1
  149. package/package.json +60 -60
  150. package/lib/LinkEditBlock-_41zgSyl.cjs +0 -5
  151. package/lib/Table-BFiU40iW.cjs +0 -9
  152. package/lib/Table-yZtD5Qo1.js +0 -1945
  153. package/lib/clsx-DSAWW32g.cjs +0 -33
  154. package/lib/index-C4WLt4NA.cjs +0 -24
  155. package/lib/index-DlxZt4_j.cjs +0 -1
  156. package/lib/index-P5_MyY0i.js +0 -1362
  157. package/lib/index-TcJ2UKnv.cjs +0 -1
  158. package/lib/index-fbGGohBT.cjs +0 -12
  159. package/lib/updatePosition-BGD41Hbg.js +0 -16
@@ -0,0 +1,33 @@
1
+ "use strict";const S=require("react"),re=require("react-dom"),A=require("react/jsx-runtime"),P=require("./index-Bcj8cyOO.cjs");var j={exports:{}},M={};/**
2
+ * @license React
3
+ * use-sync-external-store-shim.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var B;function le(){if(B)return M;B=1;var e=S;function t(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,a=e.useLayoutEffect,i=e.useDebugValue;function s(p,v){var l=v(),f=n({inst:{value:l,getSnapshot:v}}),m=f[0].inst,u=f[1];return a(function(){m.value=l,m.getSnapshot=v,y(m)&&u({inst:m})},[p,l,v]),o(function(){return y(m)&&u({inst:m}),p(function(){y(m)&&u({inst:m})})},[p]),i(l),l}function y(p){var v=p.getSnapshot;p=p.value;try{var l=v();return!r(p,l)}catch{return!0}}function c(p,v){return v()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return M.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,M}var q={};/**
10
+ * @license React
11
+ * use-sync-external-store-shim.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var k;function de(){return k||(k=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}function t(l,f){h||o.startTransition===void 0||(h=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=f();if(!p){var u=f();a(m,u)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}u=i({inst:{value:m,getSnapshot:f}});var d=u[0].inst,E=u[1];return y(function(){d.value=m,d.getSnapshot=f,r(d)&&E({inst:d})},[l,m,f]),s(function(){return r(d)&&E({inst:d}),l(function(){r(d)&&E({inst:d})})},[l]),c(m),m}function r(l){var f=l.getSnapshot;l=l.value;try{var m=f();return!a(l,m)}catch{return!0}}function n(l,f){return f()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,a=typeof Object.is=="function"?Object.is:e,i=o.useState,s=o.useEffect,y=o.useLayoutEffect,c=o.useDebugValue,h=!1,p=!1,v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;q.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),q}var z;function W(){return z||(z=1,process.env.NODE_ENV==="production"?j.exports=le():j.exports=de()),j.exports}var ne=W();const{getOwnPropertyNames:fe,getOwnPropertySymbols:he}=Object,{hasOwnProperty:pe}=Object.prototype;function I(e,t){return function(n,o,a){return e(n,o,a)&&t(n,o,a)}}function N(e){return function(r,n,o){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,o);const{cache:a}=o,i=a.get(r),s=a.get(n);if(i&&s)return i===n&&s===r;a.set(r,n),a.set(n,r);const y=e(r,n,o);return a.delete(r),a.delete(n),y}}function me(e){return e!=null?e[Symbol.toStringTag]:void 0}function F(e){return fe(e).concat(he(e))}const Ee=Object.hasOwn||((e,t)=>pe.call(e,t));function C(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const ye="__v",ve="__o",Se="_owner",{getOwnPropertyDescriptor:H,keys:K}=Object;function _e(e,t){return e.byteLength===t.byteLength&&L(new Uint8Array(e),new Uint8Array(t))}function ge(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Oe(e,t){return e.byteLength===t.byteLength&&L(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function we(e,t){return C(e.getTime(),t.getTime())}function Re(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Ae(e,t){return e===t}function Y(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const o=new Array(n),a=e.entries();let i,s,y=0;for(;(i=a.next())&&!i.done;){const c=t.entries();let h=!1,p=0;for(;(s=c.next())&&!s.done;){if(o[p]){p++;continue}const v=i.value,l=s.value;if(r.equals(v[0],l[0],y,p,e,t,r)&&r.equals(v[1],l[1],v[0],l[0],e,t,r)){h=o[p]=!0;break}p++}if(!h)return!1;y++}return!0}const be=C;function Ce(e,t,r){const n=K(e);let o=n.length;if(K(t).length!==o)return!1;for(;o-- >0;)if(!oe(e,t,r,n[o]))return!1;return!0}function x(e,t,r){const n=F(e);let o=n.length;if(F(t).length!==o)return!1;let a,i,s;for(;o-- >0;)if(a=n[o],!oe(e,t,r,a)||(i=H(e,a),s=H(t,a),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function Te(e,t){return C(e.valueOf(),t.valueOf())}function xe(e,t){return e.source===t.source&&e.flags===t.flags}function J(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const o=new Array(n),a=e.values();let i,s;for(;(i=a.next())&&!i.done;){const y=t.values();let c=!1,h=0;for(;(s=y.next())&&!s.done;){if(!o[h]&&r.equals(i.value,s.value,i.value,s.value,e,t,r)){c=o[h]=!0;break}h++}if(!c)return!1}return!0}function L(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function je(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function oe(e,t,r,n){return(n===Se||n===ve||n===ye)&&(e.$$typeof||t.$$typeof)?!0:Ee(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const Ne="[object ArrayBuffer]",De="[object Arguments]",Le="[object Boolean]",Ve="[object DataView]",Pe="[object Date]",Me="[object Error]",qe="[object Map]",Ie="[object Number]",Ue="[object Object]",Ge="[object RegExp]",We="[object Set]",$e="[object String]",Be={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},ke="[object URL]",ze=Object.prototype.toString;function Fe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:o,areFunctionsEqual:a,areMapsEqual:i,areNumbersEqual:s,areObjectsEqual:y,arePrimitiveWrappersEqual:c,areRegExpsEqual:h,areSetsEqual:p,areTypedArraysEqual:v,areUrlsEqual:l,unknownTagComparators:f}){return function(u,d,E){if(u===d)return!0;if(u==null||d==null)return!1;const R=typeof u;if(R!==typeof d)return!1;if(R!=="object")return R==="number"?s(u,d,E):R==="function"?a(u,d,E):!1;const O=u.constructor;if(O!==d.constructor)return!1;if(O===Object)return y(u,d,E);if(Array.isArray(u))return t(u,d,E);if(O===Date)return n(u,d,E);if(O===RegExp)return h(u,d,E);if(O===Map)return i(u,d,E);if(O===Set)return p(u,d,E);const g=ze.call(u);if(g===Pe)return n(u,d,E);if(g===Ge)return h(u,d,E);if(g===qe)return i(u,d,E);if(g===We)return p(u,d,E);if(g===Ue)return typeof u.then!="function"&&typeof d.then!="function"&&y(u,d,E);if(g===ke)return l(u,d,E);if(g===Me)return o(u,d,E);if(g===De)return y(u,d,E);if(Be[g])return v(u,d,E);if(g===Ne)return e(u,d,E);if(g===Ve)return r(u,d,E);if(g===Le||g===Ie||g===$e)return c(u,d,E);if(f){let _=f[g];if(!_){const w=me(u);w&&(_=f[w])}if(_)return _(u,d,E)}return!1}}function He({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:_e,areArraysEqual:r?x:ge,areDataViewsEqual:Oe,areDatesEqual:we,areErrorsEqual:Re,areFunctionsEqual:Ae,areMapsEqual:r?I(Y,x):Y,areNumbersEqual:be,areObjectsEqual:r?x:Ce,arePrimitiveWrappersEqual:Te,areRegExpsEqual:xe,areSetsEqual:r?I(J,x):J,areTypedArraysEqual:r?I(L,x):L,areUrlsEqual:je,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const o=N(n.areArraysEqual),a=N(n.areMapsEqual),i=N(n.areObjectsEqual),s=N(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:i,areSetsEqual:s})}return n}function Ke(e){return function(t,r,n,o,a,i,s){return e(t,r,s)}}function Ye({circular:e,comparator:t,createState:r,equals:n,strict:o}){if(r)return function(s,y){const{cache:c=e?new WeakMap:void 0,meta:h}=r();return t(s,y,{cache:c,equals:n,meta:h,strict:o})};if(e)return function(s,y){return t(s,y,{cache:new WeakMap,equals:n,meta:void 0,strict:o})};const a={cache:void 0,equals:n,meta:void 0,strict:o};return function(s,y){return t(s,y,a)}}const Je=b();b({strict:!0});b({circular:!0});b({circular:!0,strict:!0});b({createInternalComparator:()=>C});b({strict:!0,createInternalComparator:()=>C});b({circular:!0,createInternalComparator:()=>C});b({circular:!0,createInternalComparator:()=>C,strict:!0});function b(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:o=!1}=e,a=He(e),i=Fe(a),s=r?r(i):Ke(i);return Ye({circular:t,comparator:i,createState:n,equals:s,strict:o})}var D={exports:{}},U={};/**
18
+ * @license React
19
+ * use-sync-external-store-shim/with-selector.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var X;function Xe(){if(X)return U;X=1;var e=S,t=W();function r(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,a=e.useRef,i=e.useEffect,s=e.useMemo,y=e.useDebugValue;return U.useSyncExternalStoreWithSelector=function(c,h,p,v,l){var f=a(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=s(function(){function d(_){if(!E){if(E=!0,R=_,_=v(_),l!==void 0&&m.hasValue){var w=m.value;if(l(w,_))return O=w}return O=_}if(w=O,n(R,_))return w;var T=v(_);return l!==void 0&&l(w,T)?(R=_,w):(R=_,O=T)}var E=!1,R,O,g=p===void 0?null:p;return[function(){return d(h())},g===null?void 0:function(){return d(g())}]},[h,p,v,l]);var u=o(c,f[0],f[1]);return i(function(){m.hasValue=!0,m.value=u},[u]),y(u),u},U}var G={};/**
26
+ * @license React
27
+ * use-sync-external-store-shim/with-selector.development.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Z;function Ze(){return Z||(Z=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,r=W(),n=typeof Object.is=="function"?Object.is:e,o=r.useSyncExternalStore,a=t.useRef,i=t.useEffect,s=t.useMemo,y=t.useDebugValue;G.useSyncExternalStoreWithSelector=function(c,h,p,v,l){var f=a(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=s(function(){function d(_){if(!E){if(E=!0,R=_,_=v(_),l!==void 0&&m.hasValue){var w=m.value;if(l(w,_))return O=w}return O=_}if(w=O,n(R,_))return w;var T=v(_);return l!==void 0&&l(w,T)?(R=_,w):(R=_,O=T)}var E=!1,R,O,g=p===void 0?null:p;return[function(){return d(h())},g===null?void 0:function(){return d(g())}]},[h,p,v,l]);var u=o(c,f[0],f[1]);return i(function(){m.hasValue=!0,m.value=u},[u]),y(u),u},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),G}var Q;function Qe(){return Q||(Q=1,process.env.NODE_ENV==="production"?D.exports=Xe():D.exports=Ze()),D.exports}var et=Qe(),tt=(...e)=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r&&(r.current=t)})},rt=({contentComponent:e})=>{const t=ne.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return A.jsx(A.Fragment,{children:Object.values(t)})};function nt(){const e=new Set;let t={};return{subscribe(r){return e.add(r),()=>{e.delete(r)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(r,n){t={...t,[r]:re.createPortal(n.reactElement,n.element,r)},e.forEach(o=>o())},removeRenderer(r){const n={...t};delete n[r],t=n,e.forEach(o=>o())}}}var ot=class extends S.Component{constructor(e){super(e),this.editorContentRef=S.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;const t=this.props.editor;if(t&&!t.isDestroyed&&((e=t.view.dom)!=null&&e.parentNode)){if(t.contentComponent)return;const r=this.editorContentRef.current;r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r}),t.contentComponent=nt(),t.createNodeViews(),t.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var e;const t=this.props.editor;if(t){t.isEditorContentInitialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.parentNode))return;const r=document.createElement("div");r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r})}catch{}}}render(){const{editor:e,innerRef:t,...r}=this.props;return A.jsxs(A.Fragment,{children:[A.jsx("div",{ref:tt(t,this.editorContentRef),...r}),(e==null?void 0:e.contentComponent)&&A.jsx(rt,{contentComponent:e.contentComponent})]})}},it=S.forwardRef((e,t)=>{const r=S.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return S.createElement(ot,{key:r,innerRef:t,...e})}),st=S.memo(it),ut=typeof window<"u"?S.useLayoutEffect:S.useEffect,at=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const t=()=>{this.transactionNumber+=1,this.subscribers.forEach(n=>n())},r=this.editor;return r.on("transaction",t),()=>{r.off("transaction",t)}}}};function ct(e){var t;const[r]=S.useState(()=>new at(e.editor)),n=et.useSyncExternalStoreWithSelector(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:Je);return ut(()=>r.watch(e.editor),[e.editor,r]),S.useDebugValue(n),n}process.env.NODE_ENV;var V=S.createContext({editor:null});V.Consumer;var lt=()=>S.useContext(V),ie=S.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),dt=()=>S.useContext(ie),ft=S.forwardRef((e,t)=>{const{onDragStart:r}=dt(),n=e.as||"div";return A.jsx(n,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})});function ee(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function te(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.forward_ref)"||e.$$typeof.description==="react.forward_ref"))}function ht(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.memo)"||e.$$typeof.description==="react.memo"))}function pt(e){if(ee(e)||te(e))return!0;if(ht(e)){const t=e.type;if(t)return ee(t)||te(t)}return!1}function mt(){try{if(S.version)return parseInt(S.version.split(".")[0],10)>=19}catch{}return!1}var se=class{constructor(e,{editor:t,props:r={},as:n="div",className:o=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=r,this.element=document.createElement(n),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isEditorContentInitialized?re.flushSync(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var e;if(this.destroyed)return;const t=this.component,r=this.props,n=this.editor,o=mt(),a=pt(t),i={...r};i.ref&&!(o||a)&&delete i.ref,!i.ref&&(o||a)&&(i.ref=s=>{this.ref=s}),this.reactElement=A.jsx(t,{...i}),(e=n==null?void 0:n.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){if(this.destroyed)return;let t=!1;const r=Object.keys(e);for(let n=0;n<r.length;n+=1){const o=r[n];if(e[o]!==this.props[o]){t=!0;break}}t&&(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0;const t=this.editor;(e=t==null?void 0:t.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}};S.createContext({markViewContentRef:()=>{}});var Et=class extends P.NodeView{constructor(e,t,r){if(super(e,t,r),this.selectionRafId=null,this.handlePositionUpdate=()=>{const n=this.getPos();typeof n!="number"||n===this.currentPos||(this.currentPos=n,this.renderer.updateProps({getPos:()=>this.getPos()}),typeof this.options.attrs=="function"&&this.updateElementAttributes())},this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const n=this.dom.querySelector("[data-node-view-content]");if(!n)return;n.appendChild(this.contentDOMElement)}this.options.trackNodeViewPosition&&this.editor.on("update",this.handlePositionUpdate)}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){const e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(r,n,o){var a;return n==="storage"?(a=e.storage[t.name])!=null?a:{}:Reflect.get(r,n,o)}})}return this.cachedExtensionWithSyncedStorage}mount(){const t={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(c={})=>this.updateAttributes(c),deleteNode:()=>this.deleteNode(),ref:S.createRef()};if(!this.component.displayName){const c=h=>h.charAt(0).toUpperCase()+h.substring(1);this.component.displayName=c(this.extension.name)}const o={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:c=>{c&&this.contentDOMElement&&c.firstChild!==this.contentDOMElement&&(c.hasAttribute("data-node-view-wrapper")&&c.removeAttribute("data-node-view-wrapper"),c.appendChild(this.contentDOMElement))}},a=this.component,i=S.memo(c=>A.jsx(ie.Provider,{value:o,children:S.createElement(a,c)}));i.displayName="ReactNodeView";let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);const{className:y=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new se(i,{editor:this.editor,props:t,as:s,className:`node-${this.node.type.name} ${y}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes(),this.currentPos=this.getPos()}get dom(){var e;if(this.renderer.element.firstElementChild&&!((e=this.renderer.element.firstElementChild)!=null&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;const e=this.currentPos;if(typeof e!="number")return;if(P.isNodeViewSelected({selection:this.editor.state.selection,pos:e,nodeSize:this.node.nodeSize,selectedOnTextSelection:this.options.selectedOnTextSelection})){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,r){const n=s=>{this.renderer.updateProps(s),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const s=this.node,y=this.decorations,c=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=r,this.currentPos=this.getPos(),this.options.update({oldNode:s,oldDecorations:y,newNode:e,newDecorations:t,oldInnerDecorations:c,innerDecorations:r,updateProps:()=>n({node:e,decorations:t,innerDecorations:r,extension:this.extensionWithSyncedStorage})})}if(!(e!==this.node))return this.node=e,this.decorations=t,this.innerDecorations=r,!0;const a=this.getPos();this.node=e,this.decorations=t,this.innerDecorations=r,this.currentPos=a;const i={node:e,decorations:t,innerDecorations:r,extension:this.extensionWithSyncedStorage};return this.options.trackNodeViewPosition&&(i.getPos=()=>this.getPos()),n(i),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.options.trackNodeViewPosition&&this.editor.off("update",this.handlePositionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){const t=this.editor.extensionManager.attributes,r=P.getRenderedAttributes(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:r})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function yt(e,t){return r=>r.editor.contentComponent?new Et(e,r,t):{}}var $=S.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});$.displayName="TiptapContext";var vt=()=>S.useContext($);function ue({editor:e,instance:t,children:r}){const n=e??t;if(!n)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const o=S.useMemo(()=>({editor:n}),[n]),a=S.useMemo(()=>({editor:n}),[n]);return A.jsx(V.Provider,{value:a,children:A.jsx($.Provider,{value:o,children:r})})}ue.displayName="Tiptap";function ae({...e}){const{editor:t}=vt();return A.jsx(st,{editor:t,...e})}ae.displayName="Tiptap.Content";Object.assign(ue,{Content:ae});function ce(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=ce(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function St(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=ce(e))&&(n&&(n+=" "),n+=t);return n}exports.EditorContext=V;exports.NodeViewWrapper=ft;exports.ReactNodeViewRenderer=yt;exports.ReactRenderer=se;exports.clsx=St;exports.shimExports=ne;exports.useCurrentEditor=lt;exports.useEditorState=ct;
@@ -1 +1 @@
1
- "use strict";const c=require("react/jsx-runtime"),w=require("@radix-ui/react-dropdown-menu"),d=require("lucide-react"),g=require("react"),a=require("./index-83hp1lZH.cjs");function x(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return r.default=t,Object.freeze(r)}const e=x(w),n=x(g),y=e.Root,N=e.Trigger,D=e.Portal,M=e.Sub,h=n.forwardRef(({className:t,inset:r,children:i,...o},s)=>c.jsxs(e.SubTrigger,{ref:s,className:a.cn("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",r&&"richtext-pl-8",t),...o,children:[i,c.jsx(d.ChevronRight,{className:"richtext-ml-auto richtext-size-4"})]}));h.displayName=e.SubTrigger.displayName;const l=n.forwardRef(({className:t,...r},i)=>c.jsx(e.SubContent,{"data-richtext-portal":!0,ref:i,className:a.cn("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border !richtext-border-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",t),...r}));l.displayName=e.SubContent.displayName;const u=n.forwardRef(({className:t,sideOffset:r=4,...i},o)=>c.jsx(e.Portal,{"data-richtext-portal":!0,children:c.jsx(e.Content,{"data-richtext-portal":!0,ref:o,sideOffset:r,className:a.cn("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border !richtext-border-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",t),...i})}));u.displayName=e.Content.displayName;const p=n.forwardRef(({className:t,inset:r,...i},o)=>c.jsx(e.Item,{ref:o,className:a.cn("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",r&&"richtext-pl-8",t),...i}));p.displayName=e.Item.displayName;const m=n.forwardRef(({className:t,children:r,checked:i,...o},s)=>c.jsxs(e.CheckboxItem,{checked:i,ref:s,className:a.cn("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",t),...o,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:c.jsx(e.ItemIndicator,{children:c.jsx(d.Check,{className:"richtext-size-4"})})}),r]}));m.displayName=e.CheckboxItem.displayName;const j=n.forwardRef(({className:t,children:r,...i},o)=>c.jsxs(e.RadioItem,{ref:o,className:a.cn("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",t),...i,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:c.jsx(e.ItemIndicator,{children:c.jsx(d.Circle,{className:"richtext-size-2 richtext-fill-current"})})}),r]}));j.displayName=e.RadioItem.displayName;const S=n.forwardRef(({className:t,inset:r,...i},o)=>c.jsx(e.Label,{ref:o,className:a.cn("richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",r&&"richtext-pl-8",t),...i}));S.displayName=e.Label.displayName;const f=n.forwardRef(({className:t,...r},i)=>c.jsx(e.Separator,{className:a.cn("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",t),ref:i,...r}));f.displayName=e.Separator.displayName;function b({className:t,...r}){return c.jsx("span",{className:a.cn("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",t),...r})}b.displayName="DropdownMenuShortcut";exports.DropdownMenu=y;exports.DropdownMenuCheckboxItem=m;exports.DropdownMenuContent=u;exports.DropdownMenuItem=p;exports.DropdownMenuPortal=D;exports.DropdownMenuSeparator=f;exports.DropdownMenuShortcut=b;exports.DropdownMenuSub=M;exports.DropdownMenuSubContent=l;exports.DropdownMenuSubTrigger=h;exports.DropdownMenuTrigger=N;
1
+ "use strict";const c=require("react/jsx-runtime"),w=require("@radix-ui/react-dropdown-menu"),d=require("lucide-react"),g=require("react"),a=require("./index-deubsx3z.cjs");function x(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return r.default=t,Object.freeze(r)}const e=x(w),n=x(g),y=e.Root,N=e.Trigger,D=e.Portal,M=e.Sub,h=n.forwardRef(({className:t,inset:r,children:i,...o},s)=>c.jsxs(e.SubTrigger,{ref:s,className:a.cn("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",r&&"richtext-pl-8",t),...o,children:[i,c.jsx(d.ChevronRight,{className:"richtext-ml-auto richtext-size-4"})]}));h.displayName=e.SubTrigger.displayName;const l=n.forwardRef(({className:t,...r},i)=>c.jsx(e.SubContent,{"data-richtext-portal":!0,ref:i,className:a.cn("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border !richtext-border-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",t),...r}));l.displayName=e.SubContent.displayName;const u=n.forwardRef(({className:t,sideOffset:r=4,...i},o)=>c.jsx(e.Portal,{"data-richtext-portal":!0,children:c.jsx(e.Content,{"data-richtext-portal":!0,ref:o,sideOffset:r,className:a.cn("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border !richtext-border-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",t),...i})}));u.displayName=e.Content.displayName;const p=n.forwardRef(({className:t,inset:r,...i},o)=>c.jsx(e.Item,{ref:o,className:a.cn("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",r&&"richtext-pl-8",t),...i}));p.displayName=e.Item.displayName;const m=n.forwardRef(({className:t,children:r,checked:i,...o},s)=>c.jsxs(e.CheckboxItem,{checked:i,ref:s,className:a.cn("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",t),...o,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:c.jsx(e.ItemIndicator,{children:c.jsx(d.Check,{className:"richtext-size-4"})})}),r]}));m.displayName=e.CheckboxItem.displayName;const j=n.forwardRef(({className:t,children:r,...i},o)=>c.jsxs(e.RadioItem,{ref:o,className:a.cn("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",t),...i,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:c.jsx(e.ItemIndicator,{children:c.jsx(d.Circle,{className:"richtext-size-2 richtext-fill-current"})})}),r]}));j.displayName=e.RadioItem.displayName;const S=n.forwardRef(({className:t,inset:r,...i},o)=>c.jsx(e.Label,{ref:o,className:a.cn("richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",r&&"richtext-pl-8",t),...i}));S.displayName=e.Label.displayName;const f=n.forwardRef(({className:t,...r},i)=>c.jsx(e.Separator,{className:a.cn("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",t),ref:i,...r}));f.displayName=e.Separator.displayName;function b({className:t,...r}){return c.jsx("span",{className:a.cn("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",t),...r})}b.displayName="DropdownMenuShortcut";exports.DropdownMenu=y;exports.DropdownMenuCheckboxItem=m;exports.DropdownMenuContent=u;exports.DropdownMenuItem=p;exports.DropdownMenuPortal=D;exports.DropdownMenuSeparator=f;exports.DropdownMenuShortcut=b;exports.DropdownMenuSub=M;exports.DropdownMenuSubContent=l;exports.DropdownMenuSubTrigger=h;exports.DropdownMenuTrigger=N;
@@ -2,7 +2,7 @@ import { jsx as c, jsxs as x } from "react/jsx-runtime";
2
2
  import * as t from "@radix-ui/react-dropdown-menu";
3
3
  import { ChevronRight as d, Check as h, Circle as l } from "lucide-react";
4
4
  import * as s from "react";
5
- import { c as o } from "./index-BfHAqkoX.js";
5
+ import { c as o } from "./index-BrsJsbds.js";
6
6
  const R = t.Root, I = t.Trigger, S = t.Portal, C = t.Sub, m = s.forwardRef(({ className: e, inset: r, children: i, ...a }, n) => /* @__PURE__ */ x(
7
7
  t.SubTrigger,
8
8
  {
@@ -0,0 +1 @@
1
+ "use strict";const n=require("./index-Bcj8cyOO.cjs");var p=20,i=(t,e=0)=>{const r=[];return!t.children.length||e>p||Array.from(t.children).forEach(o=>{o.tagName==="SPAN"?r.push(o):o.children.length&&r.push(...i(o,e+1))}),r},f=t=>{if(!t.children.length)return;const e=i(t);e&&e.forEach(r=>{var o,s;const l=r.getAttribute("style"),d=(s=(o=r.parentElement)==null?void 0:o.closest("span"))==null?void 0:s.getAttribute("style");r.setAttribute("style",`${d};${l}`)})},c=n.Mark.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&f(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",n.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(r,o)=>{if(r.isTextblock)return!0;r.marks.filter(s=>s.type===this.type).some(s=>Object.values(s.attrs).some(l=>!!l))||t.removeMark(o,o+r.nodeSize,this.type)}),!0}}}}),S=n.Extension.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const r=(e=n.getStyleProperty(t,"background-color"))!=null?e:t.style.backgroundColor;return r==null?void 0:r.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),a=n.Extension.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const r=(e=n.getStyleProperty(t,"color"))!=null?e:t.style.color;return r==null?void 0:r.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),u=n.Extension.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>{var e;return(e=n.getStyleProperty(t,"font-family"))!=null?e:t.style.fontFamily},renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),g=n.Extension.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>{var e;return(e=n.getStyleProperty(t,"font-size"))!=null?e:t.style.fontSize},renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),y=n.Extension.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>{var e;return(e=n.getStyleProperty(t,"line-height"))!=null?e:t.style.lineHeight},renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});n.Extension.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(S.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(a.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(u.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(g.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(y.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(c.configure(this.options.textStyle)),t}});exports.Color=a;exports.FontFamily=u;exports.LineHeight=y;
@@ -0,0 +1,2 @@
1
+ "use strict";const qt=require("@tiptap/pm/state"),Et=require("@tiptap/pm/view"),ee=require("./index-Bcj8cyOO.cjs"),It=["top","right","bottom","left"],Dt=["start","end"],Tt=It.reduce((t,e)=>t.concat(e,e+"-"+Dt[0],e+"-"+Dt[1]),[]),Y=Math.min,_=Math.max,lt=Math.round,j=t=>({x:t,y:t}),ne={left:"right",right:"left",bottom:"top",top:"bottom"};function yt(t,e,o){return _(t,Y(e,o))}function z(t,e){return typeof t=="function"?t(e):t}function F(t){return t.split("-")[0]}function I(t){return t.split("-")[1]}function Ht(t){return t==="x"?"y":"x"}function bt(t){return t==="y"?"height":"width"}function X(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Rt(t){return Ht(X(t))}function Vt(t,e,o){o===void 0&&(o=!1);const n=I(t),i=Rt(t),s=bt(i);let r=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=ft(r)),[r,ft(r)]}function oe(t){const e=ft(t);return[at(t),e,at(e)]}function at(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Lt=["left","right"],$t=["right","left"],ie=["top","bottom"],se=["bottom","top"];function re(t,e,o){switch(t){case"top":case"bottom":return o?e?$t:Lt:e?Lt:$t;case"left":case"right":return e?ie:se;default:return[]}}function ce(t,e,o,n){const i=I(t);let s=re(F(t),o==="start",n);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(at)))),s}function ft(t){const e=F(t);return ne[e]+t.slice(e.length)}function le(t){return{top:0,right:0,bottom:0,left:0,...t}}function St(t){return typeof t!="number"?le(t):{top:t,right:t,bottom:t,left:t}}function tt(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Mt(t,e,o){let{reference:n,floating:i}=t;const s=X(e),r=Rt(e),c=bt(r),f=F(e),m=s==="y",u=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2,h=n[c]/2-i[c]/2;let d;switch(f){case"top":d={x:u,y:n.y-i.height};break;case"bottom":d={x:u,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:l};break;case"left":d={x:n.x-i.width,y:l};break;default:d={x:n.x,y:n.y}}switch(I(e)){case"start":d[r]-=h*(o&&m?-1:1);break;case"end":d[r]+=h*(o&&m?-1:1);break}return d}async function ae(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:s,rects:r,elements:c,strategy:f}=t,{boundary:m="clippingAncestors",rootBoundary:u="viewport",elementContext:l="floating",altBoundary:h=!1,padding:d=0}=z(e,t),p=St(d),w=c[h?l==="floating"?"reference":"floating":l],S=tt(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(w)))==null||o?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:m,rootBoundary:u,strategy:f})),R=l==="floating"?{x:n,y:i,width:r.floating.width,height:r.floating.height}:r.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),A=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},T=tt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:R,offsetParent:g,strategy:f}):R);return{top:(S.top-T.top+p.top)/A.y,bottom:(T.bottom-S.bottom+p.bottom)/A.y,left:(S.left-T.left+p.left)/A.x,right:(T.right-S.right+p.right)/A.x}}const fe=50,ue=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:r}=o,c=r.detectOverflow?r:{...r,detectOverflow:ae},f=await(r.isRTL==null?void 0:r.isRTL(e));let m=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:l}=Mt(m,n,f),h=n,d=0;const p={};for(let v=0;v<s.length;v++){const w=s[v];if(!w)continue;const{name:S,fn:R}=w,{x:g,y:A,data:T,reset:E}=await R({x:u,y:l,initialPlacement:n,placement:h,strategy:i,middlewareData:p,rects:m,platform:c,elements:{reference:t,floating:e}});u=g??u,l=A??l,p[S]={...p[S],...T},E&&d<fe&&(d++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(m=E.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):E.rects),{x:u,y:l}=Mt(m,h,f)),v=-1)}return{x:u,y:l,placement:h,strategy:i,middlewareData:p}},de=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:n,placement:i,rects:s,platform:r,elements:c,middlewareData:f}=e,{element:m,padding:u=0}=z(t,e)||{};if(m==null)return{};const l=St(u),h={x:o,y:n},d=Rt(i),p=bt(d),v=await r.getDimensions(m),w=d==="y",S=w?"top":"left",R=w?"bottom":"right",g=w?"clientHeight":"clientWidth",A=s.reference[p]+s.reference[d]-h[d]-s.floating[p],T=h[d]-s.reference[d],E=await(r.getOffsetParent==null?void 0:r.getOffsetParent(m));let M=E?E[g]:0;(!M||!await(r.isElement==null?void 0:r.isElement(E)))&&(M=c.floating[g]||s.floating[p]);const B=A/2-T/2,$=M/2-v[p]/2-1,a=Y(l[S],$),x=Y(l[R],$),O=a,C=M-v[p]-x,b=M/2-v[p]/2+B,P=yt(O,b,C),D=!f.arrow&&I(i)!=null&&b!==P&&s.reference[p]/2-(b<O?a:x)-v[p]/2<0,L=D?b<O?b-O:b-C:0;return{[d]:h[d]+L,data:{[d]:P,centerOffset:b-P-L,...D&&{alignmentOffset:L}},reset:D}}});function me(t,e,o){return(t?[...o.filter(i=>I(i)===t),...o.filter(i=>I(i)!==t)]:o.filter(i=>F(i)===i)).filter(i=>t?I(i)===t||(e?at(i)!==i:!1):!0)}const ge=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,n,i;const{rects:s,middlewareData:r,placement:c,platform:f,elements:m}=e,{crossAxis:u=!1,alignment:l,allowedPlacements:h=Tt,autoAlignment:d=!0,...p}=z(t,e),v=l!==void 0||h===Tt?me(l||null,d,h):h,w=await f.detectOverflow(e,p),S=((o=r.autoPlacement)==null?void 0:o.index)||0,R=v[S];if(R==null)return{};const g=Vt(R,s,await(f.isRTL==null?void 0:f.isRTL(m.floating)));if(c!==R)return{reset:{placement:v[0]}};const A=[w[F(R)],w[g[0]],w[g[1]]],T=[...((n=r.autoPlacement)==null?void 0:n.overflows)||[],{placement:R,overflows:A}],E=v[S+1];if(E)return{data:{index:S+1,overflows:T},reset:{placement:E}};const M=T.map(a=>{const x=I(a.placement);return[a.placement,x&&u?a.overflows.slice(0,2).reduce((O,C)=>O+C,0):a.overflows[0],a.overflows]}).sort((a,x)=>a[1]-x[1]),$=((i=M.filter(a=>a[2].slice(0,I(a[0])?2:3).every(x=>x<=0))[0])==null?void 0:i[0])||M[0][0];return $!==c?{data:{index:S+1,overflows:T},reset:{placement:$}}:{}}}},he=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:f,elements:m}=e,{mainAxis:u=!0,crossAxis:l=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...w}=z(t,e);if((o=s.arrow)!=null&&o.alignmentOffset)return{};const S=F(i),R=X(c),g=F(c)===c,A=await(f.isRTL==null?void 0:f.isRTL(m.floating)),T=h||(g||!v?[ft(c)]:oe(c)),E=p!=="none";!h&&E&&T.push(...ce(c,v,p,A));const M=[c,...T],B=await f.detectOverflow(e,w),$=[];let a=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&$.push(B[S]),l){const b=Vt(i,r,A);$.push(B[b[0]],B[b[1]])}if(a=[...a,{placement:i,overflows:$}],!$.every(b=>b<=0)){var x,O;const b=(((x=s.flip)==null?void 0:x.index)||0)+1,P=M[b];if(P&&(!(l==="alignment"?R!==X(P):!1)||a.every(k=>X(k.placement)===R?k.overflows[0]>0:!0)))return{data:{index:b,overflows:a},reset:{placement:P}};let D=(O=a.filter(L=>L.overflows[0]<=0).sort((L,k)=>L.overflows[1]-k.overflows[1])[0])==null?void 0:O.placement;if(!D)switch(d){case"bestFit":{var C;const L=(C=a.filter(k=>{if(E){const y=X(k.placement);return y===R||y==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(y=>y>0).reduce((y,q)=>y+q,0)]).sort((k,y)=>k[1]-y[1])[0])==null?void 0:C[0];L&&(D=L);break}case"initialPlacement":D=c;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function kt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function _t(t){return It.some(e=>t[e]>=0)}const pe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:o,platform:n}=e,{strategy:i="referenceHidden",...s}=z(t,e);switch(i){case"referenceHidden":{const r=await n.detectOverflow(e,{...s,elementContext:"reference"}),c=kt(r,o.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:_t(c)}}}case"escaped":{const r=await n.detectOverflow(e,{...s,altBoundary:!0}),c=kt(r,o.floating);return{data:{escapedOffsets:c,escaped:_t(c)}}}default:return{}}}}};function Xt(t){const e=Y(...t.map(s=>s.left)),o=Y(...t.map(s=>s.top)),n=_(...t.map(s=>s.right)),i=_(...t.map(s=>s.bottom));return{x:e,y:o,width:n-e,height:i-o}}function we(t){const e=t.slice().sort((i,s)=>i.y-s.y),o=[];let n=null;for(let i=0;i<e.length;i++){const s=e[i];!n||s.y-n.y>n.height/2?o.push([s]):o[o.length-1].push(s),n=s}return o.map(i=>tt(Xt(i)))}const xe=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:o,elements:n,rects:i,platform:s,strategy:r}=e,{padding:c=2,x:f,y:m}=z(t,e),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),l=we(u),h=tt(Xt(u)),d=St(c);function p(){if(l.length===2&&l[0].left>l[1].right&&f!=null&&m!=null)return l.find(w=>f>w.left-d.left&&f<w.right+d.right&&m>w.top-d.top&&m<w.bottom+d.bottom)||h;if(l.length>=2){if(X(o)==="y"){const a=l[0],x=l[l.length-1],O=F(o)==="top",C=a.top,b=x.bottom,P=O?a.left:x.left,D=O?a.right:x.right,L=D-P,k=b-C;return{top:C,bottom:b,left:P,right:D,width:L,height:k,x:P,y:C}}const w=F(o)==="left",S=_(...l.map(a=>a.right)),R=Y(...l.map(a=>a.left)),g=l.filter(a=>w?a.left===R:a.right===S),A=g[0].top,T=g[g.length-1].bottom,E=R,M=S,B=M-E,$=T-A;return{top:A,bottom:T,left:E,right:M,width:B,height:$,x:E,y:A}}return h}const v=await s.getElementRects({reference:{getBoundingClientRect:p},floating:n.floating,strategy:r});return i.reference.x!==v.reference.x||i.reference.y!==v.reference.y||i.reference.width!==v.reference.width||i.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},ye=new Set(["left","top"]);async function ve(t,e){const{placement:o,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),r=F(o),c=I(o),f=X(o)==="y",m=ye.has(r)?-1:1,u=s&&f?-1:1,l=z(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return c&&typeof p=="number"&&(d=c==="end"?p*-1:p),f?{x:d*u,y:h*m}:{x:h*m,y:d*u}}const be=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:s,placement:r,middlewareData:c}=e,f=await ve(e,t);return r===((o=c.offset)==null?void 0:o.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:i+f.x,y:s+f.y,data:{...f,placement:r}}}}},Re=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:f={fn:S=>{let{x:R,y:g}=S;return{x:R,y:g}}},...m}=z(t,e),u={x:o,y:n},l=await s.detectOverflow(e,m),h=X(F(i)),d=Ht(h);let p=u[d],v=u[h];if(r){const S=d==="y"?"top":"left",R=d==="y"?"bottom":"right",g=p+l[S],A=p-l[R];p=yt(g,p,A)}if(c){const S=h==="y"?"top":"left",R=h==="y"?"bottom":"right",g=v+l[S],A=v-l[R];v=yt(g,v,A)}const w=f.fn({...e,[d]:p,[h]:v});return{...w,data:{x:w.x-o,y:w.y-n,enabled:{[d]:r,[h]:c}}}}}},Se=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;const{placement:i,rects:s,platform:r,elements:c}=e,{apply:f=()=>{},...m}=z(t,e),u=await r.detectOverflow(e,m),l=F(i),h=I(i),d=X(i)==="y",{width:p,height:v}=s.floating;let w,S;l==="top"||l==="bottom"?(w=l,S=h===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(S=l,w=h==="end"?"top":"bottom");const R=v-u.top-u.bottom,g=p-u.left-u.right,A=Y(v-u[w],R),T=Y(p-u[S],g),E=!e.middlewareData.shift;let M=A,B=T;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(B=g),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(M=R),E&&!h){const a=_(u.left,0),x=_(u.right,0),O=_(u.top,0),C=_(u.bottom,0);d?B=p-2*(a!==0||x!==0?a+x:_(u.left,u.right)):M=v-2*(O!==0||C!==0?O+C:_(u.top,u.bottom))}await f({...e,availableWidth:B,availableHeight:M});const $=await r.getDimensions(c.floating);return p!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function ut(){return typeof window<"u"}function nt(t){return jt(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function K(t){var e;return(e=(jt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function jt(t){return ut()?t instanceof Node||t instanceof W(t).Node:!1}function H(t){return ut()?t instanceof Element||t instanceof W(t).Element:!1}function U(t){return ut()?t instanceof HTMLElement||t instanceof W(t).HTMLElement:!1}function Bt(t){return!ut()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof W(t).ShadowRoot}function st(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=V(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&i!=="inline"&&i!=="contents"}function Oe(t){return/^(table|td|th)$/.test(nt(t))}function dt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Ae=/transform|translate|scale|rotate|perspective|filter/,Ce=/paint|layout|strict|content/,J=t=>!!t&&t!=="none";let wt;function Ot(t){const e=H(t)?V(t):t;return J(e.transform)||J(e.translate)||J(e.scale)||J(e.rotate)||J(e.perspective)||!At()&&(J(e.backdropFilter)||J(e.filter))||Ae.test(e.willChange||"")||Ce.test(e.contain||"")}function Pe(t){let e=G(t);for(;U(e)&&!et(e);){if(Ot(e))return e;if(dt(e))return null;e=G(e)}return null}function At(){return wt==null&&(wt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wt}function et(t){return/^(html|body|#document)$/.test(nt(t))}function V(t){return W(t).getComputedStyle(t)}function mt(t){return H(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function G(t){if(nt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Bt(t)&&t.host||K(t);return Bt(e)?e.host:e}function Yt(t){const e=G(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:U(e)&&st(e)?e:Yt(e)}function zt(t,e,o){var n;e===void 0&&(e=[]);const i=Yt(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),r=W(i);return s?(vt(r),e.concat(r,r.visualViewport||[],st(i)?i:[],[])):e.concat(i,zt(i,[]))}function vt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Kt(t){const e=V(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=U(t),s=i?t.offsetWidth:o,r=i?t.offsetHeight:n,c=lt(o)!==s||lt(n)!==r;return c&&(o=s,n=r),{width:o,height:n,$:c}}function Ut(t){return H(t)?t:t.contextElement}function Z(t){const e=Ut(t);if(!U(e))return j(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:s}=Kt(e);let r=(s?lt(o.width):o.width)/n,c=(s?lt(o.height):o.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Ee=j(0);function Gt(t){const e=W(t);return!At()||!e.visualViewport?Ee:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function De(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==W(t)?!1:e}function it(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),s=Ut(t);let r=j(1);e&&(n?H(n)&&(r=Z(n)):r=Z(t));const c=De(s,o,n)?Gt(s):j(0);let f=(i.left+c.x)/r.x,m=(i.top+c.y)/r.y,u=i.width/r.x,l=i.height/r.y;if(s){const h=W(s),d=n&&H(n)?W(n):n;let p=h,v=vt(p);for(;v&&n&&d!==p;){const w=Z(v),S=v.getBoundingClientRect(),R=V(v),g=S.left+(v.clientLeft+parseFloat(R.paddingLeft))*w.x,A=S.top+(v.clientTop+parseFloat(R.paddingTop))*w.y;f*=w.x,m*=w.y,u*=w.x,l*=w.y,f+=g,m+=A,p=W(v),v=vt(p)}}return tt({width:u,height:l,x:f,y:m})}function gt(t,e){const o=mt(t).scrollLeft;return e?e.left+o:it(K(t)).left+o}function Jt(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-gt(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function Te(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const s=i==="fixed",r=K(n),c=e?dt(e.floating):!1;if(n===r||c&&s)return o;let f={scrollLeft:0,scrollTop:0},m=j(1);const u=j(0),l=U(n);if((l||!l&&!s)&&((nt(n)!=="body"||st(r))&&(f=mt(n)),l)){const d=it(n);m=Z(n),u.x=d.x+n.clientLeft,u.y=d.y+n.clientTop}const h=r&&!l&&!s?Jt(r,f):j(0);return{width:o.width*m.x,height:o.height*m.y,x:o.x*m.x-f.scrollLeft*m.x+u.x+h.x,y:o.y*m.y-f.scrollTop*m.y+u.y+h.y}}function Le(t){return Array.from(t.getClientRects())}function $e(t){const e=K(t),o=mt(t),n=t.ownerDocument.body,i=_(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=_(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+gt(t);const c=-o.scrollTop;return V(n).direction==="rtl"&&(r+=_(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:r,y:c}}const Nt=25;function Me(t,e){const o=W(t),n=K(t),i=o.visualViewport;let s=n.clientWidth,r=n.clientHeight,c=0,f=0;if(i){s=i.width,r=i.height;const u=At();(!u||u&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const m=gt(n);if(m<=0){const u=n.ownerDocument,l=u.body,h=getComputedStyle(l),d=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(n.clientWidth-l.clientWidth-d);p<=Nt&&(s-=p)}else m<=Nt&&(s+=m);return{width:s,height:r,x:c,y:f}}function ke(t,e){const o=it(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,s=U(t)?Z(t):j(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,f=i*s.x,m=n*s.y;return{width:r,height:c,x:f,y:m}}function Wt(t,e,o){let n;if(e==="viewport")n=Me(t,o);else if(e==="document")n=$e(K(t));else if(H(e))n=ke(e,o);else{const i=Gt(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return tt(n)}function Qt(t,e){const o=G(t);return o===e||!H(o)||et(o)?!1:V(o).position==="fixed"||Qt(o,e)}function _e(t,e){const o=e.get(t);if(o)return o;let n=zt(t,[]).filter(c=>H(c)&&nt(c)!=="body"),i=null;const s=V(t).position==="fixed";let r=s?G(t):t;for(;H(r)&&!et(r);){const c=V(r),f=Ot(r);!f&&c.position==="fixed"&&(i=null),(s?!f&&!i:!f&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||st(r)&&!f&&Qt(t,r))?n=n.filter(u=>u!==r):i=c,r=G(r)}return e.set(t,n),n}function Be(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const r=[...o==="clippingAncestors"?dt(e)?[]:_e(e,this._c):[].concat(o),n],c=Wt(e,r[0],i);let f=c.top,m=c.right,u=c.bottom,l=c.left;for(let h=1;h<r.length;h++){const d=Wt(e,r[h],i);f=_(d.top,f),m=Y(d.right,m),u=Y(d.bottom,u),l=_(d.left,l)}return{width:m-l,height:u-f,x:l,y:f}}function Ne(t){const{width:e,height:o}=Kt(t);return{width:e,height:o}}function We(t,e,o){const n=U(e),i=K(e),s=o==="fixed",r=it(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const f=j(0);function m(){f.x=gt(i)}if(n||!n&&!s)if((nt(e)!=="body"||st(i))&&(c=mt(e)),n){const d=it(e,!0,s,e);f.x=d.x+e.clientLeft,f.y=d.y+e.clientTop}else i&&m();s&&!n&&i&&m();const u=i&&!n&&!s?Jt(i,c):j(0),l=r.left+c.scrollLeft-f.x-u.x,h=r.top+c.scrollTop-f.y-u.y;return{x:l,y:h,width:r.width,height:r.height}}function xt(t){return V(t).position==="static"}function Ft(t,e){if(!U(t)||V(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return K(t)===o&&(o=o.ownerDocument.body),o}function Zt(t,e){const o=W(t);if(dt(t))return o;if(!U(t)){let i=G(t);for(;i&&!et(i);){if(H(i)&&!xt(i))return i;i=G(i)}return o}let n=Ft(t,e);for(;n&&Oe(n)&&xt(n);)n=Ft(n,e);return n&&et(n)&&xt(n)&&!Ot(n)?o:n||Pe(t)||o}const Fe=async function(t){const e=this.getOffsetParent||Zt,o=this.getDimensions,n=await o(t.floating);return{reference:We(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function qe(t){return V(t).direction==="rtl"}const Ie={convertOffsetParentRelativeRectToViewportRelativeRect:Te,getDocumentElement:K,getClippingRect:Be,getOffsetParent:Zt,getElementRects:Fe,getClientRects:Le,getDimensions:Ne,getScale:Z,isElement:H,isRTL:qe},He=be,Ve=ge,Xe=Re,je=he,Ye=Se,ze=pe,Ke=de,Ue=xe,Ge=(t,e,o)=>{const n=new Map,i={platform:Ie,...o},s={...i.platform,_c:n};return ue(t,e,{...i,platform:s})};function Je(t){var e;const{char:o,allowSpaces:n,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:r,$position:c}=t,f=n&&!i,m=ee.escapeForRegEx(o),u=new RegExp(`\\s${m}$`),l=r?"^":"",h=i?"":m,d=f?new RegExp(`${l}${m}.*?(?=\\s${h}|$)`,"gm"):new RegExp(`${l}(?:^)?${m}[^\\s${h}]*`,"gm"),p=((e=c.nodeBefore)==null?void 0:e.isText)&&c.nodeBefore.text;if(!p)return null;const v=c.pos-p.length,w=Array.from(p.matchAll(d)).pop();if(!w||w.input===void 0||w.index===void 0)return null;const S=w.input.slice(Math.max(0,w.index-1),w.index),R=new RegExp(`^[${s==null?void 0:s.join("")}\0]?$`).test(S);if(s!==null&&!R)return null;const g=v+w.index;let A=g+w[0].length;return f&&u.test(p.slice(A-1,A+1))&&(w[0]+=" ",A+=1),g<c.pos&&A>=c.pos?{range:{from:g,to:A},query:w[0].slice(o.length),text:w[0]}:null}function Qe(t){return t.docChanged?t.steps.some(e=>{const o=e.slice;if(!(o!=null&&o.content))return!1;const n=o.content.textBetween(0,o.content.size,`
2
+ `);return/\s/.test(n)}):!1}var Ze=new qt.PluginKey("suggestion");function tn({pluginKey:t=Ze,editor:e,char:o="@",allowSpaces:n=!1,allowToIncludeChar:i=!1,allowedPrefixes:s=[" "],startOfLine:r=!1,decorationTag:c="span",decorationClass:f="suggestion",decorationContent:m="",decorationEmptyClass:u="is-empty",command:l=()=>null,items:h=()=>[],render:d=()=>({}),allow:p=()=>!0,findSuggestionMatch:v=Je,shouldShow:w,shouldResetDismissed:S}){let R;const g=d==null?void 0:d(),A=n&&!i,T=()=>{const a=e.state.selection.$anchor.pos,x=e.view.coordsAtPos(a),{top:O,right:C,bottom:b,left:P}=x;try{return new DOMRect(P,O,C-P,b-O)}catch{return null}},E=(a,x)=>x?()=>{const O=t.getState(e.state),C=O==null?void 0:O.decorationId,b=a.dom.querySelector(`[data-decoration-id="${C}"]`);return(b==null?void 0:b.getBoundingClientRect())||null}:T,M=({match:a,dismissedRange:x,state:O,transaction:C})=>S!=null&&S({editor:e,state:O,range:x,match:a,transaction:C,allowSpaces:A})?!1:A?a.range.from===x.from:a.range.from===x.from&&!Qe(C);function B(a,x){var O;try{const b=t.getState(a.state),P=b!=null&&b.decorationId?a.dom.querySelector(`[data-decoration-id="${b.decorationId}"]`):null,D={editor:e,range:(b==null?void 0:b.range)||{from:0,to:0},query:(b==null?void 0:b.query)||null,text:(b==null?void 0:b.text)||null,items:[],command:L=>l({editor:e,range:(b==null?void 0:b.range)||{from:0,to:0},props:L}),decorationNode:P,clientRect:E(a,P)};(O=g==null?void 0:g.onExit)==null||O.call(g,D)}catch{}const C=a.state.tr.setMeta(x,{exit:!0});a.dispatch(C)}const $=new qt.Plugin({key:t,view(){return{update:async(a,x)=>{var O,C,b,P,D,L,k;const y=(O=this.key)==null?void 0:O.getState(x),q=(C=this.key)==null?void 0:C.getState(a.state),N=y.active&&q.active&&y.range.from!==q.range.from,rt=!y.active&&q.active,Ct=y.active&&!q.active,ht=!rt&&!Ct&&y.query!==q.query,ot=rt||N&&ht,ct=ht||N,pt=Ct||N&&ht;if(!ot&&!ct&&!pt)return;const Q=pt&&!ot?y:q,Pt=a.dom.querySelector(`[data-decoration-id="${Q.decorationId}"]`);R={editor:e,range:Q.range,query:Q.query,text:Q.text,items:[],command:te=>l({editor:e,range:Q.range,props:te}),decorationNode:Pt,clientRect:E(a,Pt)},ot&&((b=g==null?void 0:g.onBeforeStart)==null||b.call(g,R)),ct&&((P=g==null?void 0:g.onBeforeUpdate)==null||P.call(g,R)),(ct||ot)&&(R.items=await h({editor:e,query:Q.query})),pt&&((D=g==null?void 0:g.onExit)==null||D.call(g,R)),ct&&((L=g==null?void 0:g.onUpdate)==null||L.call(g,R)),ot&&((k=g==null?void 0:g.onStart)==null||k.call(g,R))},destroy:()=>{var a;R&&((a=g==null?void 0:g.onExit)==null||a.call(g,R))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}},apply(a,x,O,C){const{isEditable:b}=e,{composing:P}=e.view,{selection:D}=a,{empty:L,from:k}=D,y={...x},q=a.getMeta(t);if(q&&q.exit)return y.active=!1,y.decorationId=null,y.range={from:0,to:0},y.query=null,y.text=null,y.dismissedRange=x.active?{...x.range}:x.dismissedRange,y;if(y.composing=P,a.docChanged&&y.dismissedRange!==null&&(y.dismissedRange={from:a.mapping.map(y.dismissedRange.from),to:a.mapping.map(y.dismissedRange.to)}),b&&(L||e.view.composing)){(k<x.range.from||k>x.range.to)&&!P&&!x.composing&&(y.active=!1);const N=v({char:o,allowSpaces:n,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:r,$position:D.$from}),rt=`id_${Math.floor(Math.random()*4294967295)}`;N&&p({editor:e,state:C,range:N.range,isActive:x.active})&&(!w||w({editor:e,range:N.range,query:N.query,text:N.text,transaction:a}))?(y.dismissedRange!==null&&!M({match:N,dismissedRange:y.dismissedRange,state:C,transaction:a})&&(y.dismissedRange=null),y.dismissedRange===null?(y.active=!0,y.decorationId=x.decorationId?x.decorationId:rt,y.range=N.range,y.query=N.query,y.text=N.text):y.active=!1):(N||(y.dismissedRange=null),y.active=!1)}else y.active=!1;return y.active||(y.decorationId=null,y.range={from:0,to:0},y.query=null,y.text=null),y}},props:{handleKeyDown(a,x){var O,C;const{active:b,range:P}=$.getState(a.state);if(!b)return!1;if(x.key==="Escape"||x.key==="Esc"){const L=$.getState(a.state);return(O=g==null?void 0:g.onKeyDown)==null||O.call(g,{view:a,event:x,range:L.range}),B(a,t),!0}return((C=g==null?void 0:g.onKeyDown)==null?void 0:C.call(g,{view:a,event:x,range:P}))||!1},decorations(a){const{active:x,range:O,decorationId:C,query:b}=$.getState(a);if(!x)return null;const P=!(b!=null&&b.length),D=[f];return P&&D.push(u),Et.DecorationSet.create(a.doc,[Et.Decoration.inline(O.from,O.to,{nodeName:c,class:D.join(" "),"data-decoration-id":C,"data-decoration-content":m})])}}});return $}exports.Suggestion=tn;exports.arrow=Ke;exports.autoPlacement=Ve;exports.computePosition=Ge;exports.flip=je;exports.hide=ze;exports.inline=Ue;exports.offset=He;exports.shift=Xe;exports.size=Ye;