PageSourceSearch

https://clodo.ai/_next/static/chunks/1313-d29c9f70b7b599f3.js

js clodo.ai collected 2026-10-05 11:56:29 UTC 53,023 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1313],{31313:function(e,t,i){let n,o;i.d(t,{N:function(){return ts}});var l=i(42752);let r=["top","right","bottom","left"],s=r.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),a=Math.min,h=Math.max,d=Math.round,u=e=>({x:e,y:e}),f={left:"right",right:"left",bottom:"top",top:"bottom"},c={start:"end",end:"start"};function p(e,t){return"function"==typeof e?e(t):e}function m(e){return e.split("-")[0]}function g(e){return e.split("-")[1]}function w(e){return"x"===e?"y":"x"}function v(e){return"y"===e?"height":"width"}let y=new Set(["top","bottom"]);function b(e){return y.has(m(e))?"y":"x"}function x(e,t,i){void 0===i&&(i=!1);let n=g(e),o=w(b(e)),l=v(o),r="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[l]>t.floating[l]&&(r=I(r)),[r,I(r)]}function C(e){return e.replace(/start|end/g,e=>c[e])}let O=["left","right"],R=["right","left"],S=["top","bottom"],T=["bottom","top"];function I(e){return e.replace(/left|right|bottom|top/g,e=>f[e])}function D(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function E(e){let{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function H(e,t,i){let n,{reference:o,floating:l}=e,r=b(t),s=w(b(t)),a=v(s),h=m(t),d="y"===r,u=o.x+o.width/2-l.width/2,f=o.y+o.height/2-l.height/2,c=o[a]/2-l[a]/2;switch(h){case"top":n={x:u,y:o.y-l.height};break;case"bottom":n={x:u,y:o.y+o.height};break;case"right":n={x:o.x+o.width,y:f};break;case"left":n={x:o.x-l.width,y:f};break;default:n={x:o.x,y:o.y}}switch(g(t)){case"start":n[s]-=c*(i&&d?-1:1);break;case"end":n[s]+=c*(i&&d?-1:1)}return n}async function U(e,t){var i;void 0===t&&(t={});let{x:n,y:o,platform:l,rects:r,elements:s,strategy:a}=e,{boundary:h="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:c=0}=p(t,e),m=D(c),g=s[f?"floating"===u?"reference":"floating":u],w=E(await l.getClippingRect({element:null==(i=await (null==l.isElement?void 0:l.isElement(g)))||i?g:g.contextElement||await (null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:h,rootBoundary:d,strategy:a})),v="floating"===u?{x:n,y:o,width:r.floating.width,height:r.floating.height}:r.reference,y=await (null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),b=await (null==l.isElement?void 0:l.isElement(y))&&await (null==l.getScale?void 0:l.getScale(y))||{x:1,y:1},x=E(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:a}):v);return{top:(w.top-x.top+m.top)/b.y,bottom:(x.bottom-w.bottom+m.bottom)/b.y,left:(w.left-x.left+m.left)/b.x,right:(x.right-w.right+m.right)/b.x}}let $=async(e,t,i)=>{let{placement:n="bottom",strategy:o="absolute",middleware:l=[],platform:r}=i,s=l.filter(Boolean),a=await (null==r.isRTL?void 0:r.isRTL(t)),h=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=H(h,n,a),f=n,c={},p=0;for(let i=0;i<s.length;i++){var m;let{name:l,fn:g}=s[i],{x:w,y:v,data:y,reset:b}=await g({x:d,y:u,initialPlacement:n,placement:f,strategy:o,middlewareData:c,rects:h,platform:{...r,detectOverflow:null!=(m=r.detectOverflow)?m:U},elements:{reference:e,floating:t}});d=null!=w?w:d,u=null!=v?v:u,c={...c,[l]:{...c[l],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(h=!0===b.rects?await r.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:d,y:u}=H(h,f,a)),i=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:c}};function z(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function L(e){return r.some(t=>e[t]>=0)}function M(e){let t=a(...e.map(e=>e.left)),i=a(...e.map(e=>e.top));return{x:t,y:i,width:h(...e.map(e=>e.right))-t,height:h(...e.map(e=>e.bottom))-i}}let P=new Set(["left","top"]);async function A(e,t){let{placement:i,platform:n,elements:o}=e,l=await (null==n.isRTL?void 0:n.isRTL(o.floating)),r=m(i),s=g(i),a="y"===b(i),h=P.has(r)?-1:1,d=l&&a?-1:1,u=p(t,e),{mainAxis:f,crossAxis:c,alignmentAxis:w}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}
1:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof w&&(c="end"===s?-1*w:w),a?{x:c*d,y:f*h}:{x:f*h,y:c*d}}function k(){return"undefined"!=typeof window}function N(e){return W(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function B(e){var t;return null==(t=(W(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function W(e){return!!k()&&(e instanceof Node||e instanceof V(e).Node)}function F(e){return!!k()&&(e instanceof Element||e instanceof V(e).Element)}function K(e){return!!k()&&(e instanceof HTMLElement||e instanceof V(e).HTMLElement)}function _(e){return!!k()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof V(e).ShadowRoot)}let j=new Set(["inline","contents"]);function q(e){let{overflow:t,overflowX:i,overflowY:n,display:o}=eo(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!j.has(o)}let Y=new Set(["table","td","th"]),J=[":popover-open",":modal"];function Z(e){return J.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let G=["transform","translate","scale","rotate","perspective"],Q=["transform","translate","scale","rotate","perspective","filter"],X=["paint","layout","strict","content"];function ee(e){let t=et(),i=F(e)?eo(e):e;return G.some(e=>!!i[e]&&"none"!==i[e])||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||Q.some(e=>(i.willChange||"").includes(e))||X.some(e=>(i.contain||"").includes(e))}function et(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let ei=new Set(["html","body","#document"]);function en(e){return ei.has(N(e))}function eo(e){return V(e).getComputedStyle(e)}function el(e){return F(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function er(e){if("html"===N(e))return e;let t=e.assignedSlot||e.parentNode||_(e)&&e.host||B(e);return _(t)?t.host:t}function es(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ea(e){let t=eo(e),i=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=K(e),l=o?e.offsetWidth:i,r=o?e.offsetHeight:n,s=d(i)!==l||d(n)!==r;return s&&(i=l,n=r),{width:i,height:n,$:s}}function eh(e){return F(e)?e:e.contextElement}function ed(e){let t=eh(e);if(!K(t))return u(1);let i=t.getBoundingClientRect(),{width:n,height:o,$:l}=ea(t),r=(l?d(i.width):i.width)/n,s=(l?d(i.height):i.height)/o;return r&&Number.isFinite(r)||(r=1),s&&Number.isFinite(s)||(s=1),{x:r,y:s}}let eu=u(0);function ef(e){let t=V(e);return et()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eu}function ec(e,t,i,n){var o;void 0===t&&(t=!1),void 0===i&&(i=!1);let l=e.getBoundingClientRect(),r=eh(e),s=u(1);t&&(n?F(n)&&(s=ed(n)):s=ed(e));let a=(void 0===(o=i)&&(o=!1),n&&(!o||n===V(r))&&o)?ef(r):u(0),h=(l.left+a.x)/s.x,d=(l.top+a.y)/s.y,f=l.width/s.x,c=l.height/s.y;if(r){let e=V(r),t=n&&F(n)?V(n):n,i=e,o=es(i);for(;o&&n&&t!==i;){let e=ed(o),t=o.getBoundingClientRect(),n=eo(o),l=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,r=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;h*=e.x,d*=e.y,f*=e.x,c*=e.y,h+=l,d+=r,o=es(i=V(o))}}return E({width:f,height:c,x:h,y:d})}function ep(e,t){let i=el(e).scrollLeft;return t?t.left+i:ec(B(e)).left+i}function em(e,t){let i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-ep(e,i),y:i.top+t.scrollTop}}let eg=new Set(["absolute","fixed"]);function ew(e,t,i){let n;if("viewport"===t)n=function(e,t){let i=V(e),n=B(e),o=i.visualViewport,l=n.clientWidth,r=n.clientHeight,s=0,a=0;if(o){l=o.width,r=o.height;let e=et();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,a=o.offsetTop)}let h=ep(n);if(h<=0){let e=n.ownerDocument,t=e.body,i=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,r=Math.abs(n.clientWidth-t.clientWidth-o);r<=25&&(l-=r)}else h<=25&&(l+=h);return{width:l,height:r,x:s,y:a}}(e,i);else if("document"===t)n=function(e){let t=B(e),i=el(e),n=e.ownerDocument.body,o=h(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),l=h(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),r=-i.scrollLeft+ep(e),s=-i.scrollTop;return"rtl"===eo(n).direction&&(r+=h(t.clientWidth,n.clientWidth)-o),{width:o,height:l,x:r,y:s}}(B(e));else if(F(t))n=function(e,t){let i=ec(e,!0,"fixed"===t),n=i.top+e.clientTop,o=i.left+e.clientLeft,l=K(e)?ed(e):u(1),r=e.clientWidth*l.x;return{width:r,height:e.clientHeight*l.y,x:o*l.x,y:n*l.y}}(t,i);else{let i=ef(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return E(n)}function ev(e){return"static"===eo(e).position}function ey(e,t){if(!K(e)||"fixed"===eo(e).position)return null;if(t)return t(e);let i=e.offsetParent;return B(e)===i&&(i=i.ownerDocument.body),i}function eb(e,t){var i;let n=V(e);if(Z(e))return n;if(!K(e)){let t=er(e);for(;t&&!en(t);){if(F(t)&&!ev(t))return t;t=er(t)}return n}let o=ey(e,t);for(;o&&(i=o,Y.has(N(i)))&&ev(o);)o=ey(o,t);return o&&en(o)&&ev(o)&&!ee(o)?n:o||function(e){let t=er(e);for(;K(t)&&!en(t);){if(ee(t))return t;if(Z(t))break;t=er(t)}return null}(e)||n}let ex=async function(e){let t=this.getOffsetParent||eb,i=this.getDimensions,n=await i(e.floating);return{reference:function(e,t,i){let n=K(t),o=B(t),l="fixed"===i,r=ec(e,!0,l,t),s={scrollLeft:0,scrollTop:0},a=u(0);if(n||!n&&!l){if(("body"!==N(t)||q(o))&&(s=el(t)),n){let e=ec(t,!0,l,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=ep(o))}l&&!n&&o&&(a.x=ep(o));let h=!o||n||l?u(0):em(o,s);return{x:r.left+s.scrollLeft-a.x-h.x,y:r.top+s.scrollTop-a.y-h.y,width:r.width,height:r.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},eC={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e,l="fixed"===o,r=B(n),s=!!t&&Z(t.floating);if(n===r||s&&l)return i;let a={scrollLeft:0,scrollTop:0},h=u(1),d=u(0),f=K(n);if((f||!f&&!l)&&(("body"!==N(n)||q(r))&&(a=el(n)),K(n))){let e=ec(n);h=ed(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}let c=!r||f||l?u(0):em(r,a);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-a.scrollLeft*h.x+d.x+c.x,y:i.y*h.y-a.scrollTop*h.y+d.y+c.y}},getDocumentElement:B,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e,l=[..."clippingAncestors"===i?Z(t)?[]:function(e,t){let i=t.get(e);if(i)return i;let n=(function e(t,i,n){var o;void 0===i&&(i=[]),void 0===n&&(n=!0);let l=function e(t){let i=er(t);return en(i)?t.ownerDocument?t.ownerDocument.body:t.body:K(i)&&q(i)?i:e(i)}(t),r=l===(null==(o=t.ownerDocument)?void 0:o.body),s=V(l);if(r){let t=es(s);
1return i.concat(s,s.visualViewport||[],q(l)?l:[],t&&n?e(t):[])}return i.concat(l,e(l,[],n))})(e,[],!1).filter(e=>F(e)&&"body"!==N(e)),o=null,l="fixed"===eo(e).position,r=l?er(e):e;for(;F(r)&&!en(r);){let t=eo(r),i=ee(r);i||"fixed"!==t.position||(o=null),(l?!i&&!o:!i&&"static"===t.position&&!!o&&eg.has(o.position)||q(r)&&!i&&function e(t,i){let n=er(t);return!(n===i||!F(n)||en(n))&&("fixed"===eo(n).position||e(n,i))}(e,r))?n=n.filter(e=>e!==r):o=t,r=er(r)}return t.set(e,n),n}(t,this._c):[].concat(i),n],r=l[0],s=l.reduce((e,i)=>{let n=ew(t,i,o);return e.top=h(n.top,e.top),e.right=a(n.right,e.right),e.bottom=a(n.bottom,e.bottom),e.left=h(n.left,e.left),e},ew(t,r,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:eb,getElementRects:ex,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:i}=ea(e);return{width:t,height:i}},getScale:ed,isElement:F,isRTL:function(e){return"rtl"===eo(e).direction}},eO=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,n;let{x:o,y:l,placement:r,middlewareData:s}=t,a=await A(t,e);return r===(null==(i=s.offset)?void 0:i.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:o+a.x,y:l+a.y,data:{...a,placement:r}}}}},eR=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var i,n,o,l;let{rects:r,middlewareData:a,placement:h,platform:d,elements:u}=t,{crossAxis:f=!1,alignment:c,allowedPlacements:w=s,autoAlignment:v=!0,...y}=p(e,t),b=void 0!==c||w===s?((l=c||null)?[...w.filter(e=>g(e)===l),...w.filter(e=>g(e)!==l)]:w.filter(e=>m(e)===e)).filter(e=>!l||g(e)===l||!!v&&C(e)!==e):w,O=await d.detectOverflow(t,y),R=(null==(i=a.autoPlacement)?void 0:i.index)||0,S=b[R];if(null==S)return{};let T=x(S,r,await (null==d.isRTL?void 0:d.isRTL(u.floating)));if(h!==S)return{reset:{placement:b[0]}};let I=[O[m(S)],O[T[0]],O[T[1]]],D=[...(null==(n=a.autoPlacement)?void 0:n.overflows)||[],{placement:S,overflows:I}],E=b[R+1];if(E)return{data:{index:R+1,overflows:D},reset:{placement:E}};let H=D.map(e=>{let t=g(e.placement);return[e.placement,t&&f?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),U=(null==(o=H.filter(e=>e[2].slice(0,g(e[0])?2:3).every(e=>e<=0))[0])?void 0:o[0])||H[0][0];return U!==h?{data:{index:R+1,overflows:D},reset:{placement:U}}:{}}}},eS=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:i,y:n,placement:o,platform:l}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:d={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...u}=p(e,t),f={x:i,y:n},c=await l.detectOverflow(t,u),g=b(m(o)),v=w(g),y=f[v],x=f[g];if(r){let e="y"===v?"top":"left",t="y"===v?"bottom":"right",i=y+c[e],n=y-c[t];y=h(i,a(y,n))}if(s){let e="y"===g?"top":"left",t="y"===g?"bottom":"right",i=x+c[e],n=x-c[t];x=h(i,a(x,n))}let C=d.fn({...t,[v]:y,[g]:x});return{...C,data:{x:C.x-i,y:C.y-n,enabled:{[v]:r,[g]:s}}}}}},eT=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,n,o,l,r;let{placement:s,middlewareData:a,rects:h,initialPlacement:d,platform:u,elements:f}=t,{mainAxis:c=!0,crossAxis:w=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:D="none",flipAlignment:E=!0,...H}=p(e,t);if(null!=(i=a.arrow)&&i.alignmentOffset)return{};let U=m(s),$=b(d),z=m(d)===d,L=await (null==u.isRTL?void 0:u.isRTL(f.floating)),M=v||(z||!E?[I(d)]:function(e){let t=I(e);return[C(e),t,C(t)]}(d)),P="none"!==D;!v&&P&&M.push(...function(e,t,i,n){let o=g(e),l=function(e,t,i){switch(e){case"top":case"bottom":if(i)return t?R:O;return t?O:R;case"left":case"right":return t?S:T;default:return[]}}(m(e),"start"===i,n);return o&&(l=l.map(e=>e+"-"+o),t&&(l=l.concat(l.map(C)))),l}(d,E,D,L));let A=[d,...M],k=await u.detectOverflow(t,H),N=[],V=(null==(n=a.flip)?void 0:n.overflows)||[];if(c&&N.push(k[U]),w){let e=x(s,h,L);N.push(k[e[0]],k[e[1]])}if(V=[...V,{placement:s,overflows:N}],!N.every(e=>e<=0)){let e=((null==(o=a.flip)?void 0:o.index)||0)+1,t=A[e];if(t&&(!("alignment"===w&&$!==b(t))||V.every(e=>b(e.placement)!==$||e.overflows[0]>0)))return{data:{index:e,overflows:V},reset:{placement:t}};let i=null==(l=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>
1e.overflows[1]-t.overflows[1])[0])?void 0:l.placement;if(!i)switch(y){case"bestFit":{let e=null==(r=V.filter(e=>{if(P){let t=b(e.placement);return t===$||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:r[0];e&&(i=e);break}case"initialPlacement":i=d}if(s!==i)return{reset:{placement:i}}}return{}}}},eI=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,n;let o,l;let{placement:r,rects:s,platform:d,elements:u}=t,{apply:f=()=>{},...c}=p(e,t),w=await d.detectOverflow(t,c),v=m(r),y=g(r),x="y"===b(r),{width:C,height:O}=s.floating;"top"===v||"bottom"===v?(o=v,l=y===(await (null==d.isRTL?void 0:d.isRTL(u.floating))?"start":"end")?"left":"right"):(l=v,o="end"===y?"top":"bottom");let R=O-w.top-w.bottom,S=C-w.left-w.right,T=a(O-w[o],R),I=a(C-w[l],S),D=!t.middlewareData.shift,E=T,H=I;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(H=S),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(E=R),D&&!y){let e=h(w.left,0),t=h(w.right,0),i=h(w.top,0),n=h(w.bottom,0);x?H=C-2*(0!==e||0!==t?e+t:h(w.left,w.right)):E=O-2*(0!==i||0!==n?i+n:h(w.top,w.bottom))}await f({...t,availableWidth:H,availableHeight:E});let U=await d.getDimensions(u.floating);return C!==U.width||O!==U.height?{reset:{rects:!0}}:{}}}},eD=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:i,platform:n}=t,{strategy:o="referenceHidden",...l}=p(e,t);switch(o){case"referenceHidden":{let e=z(await n.detectOverflow(t,{...l,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:L(e)}}}case"escaped":{let e=z(await n.detectOverflow(t,{...l,altBoundary:!0}),i.floating);return{data:{escapedOffsets:e,escaped:L(e)}}}default:return{}}}}},eE=e=>({name:"arrow",options:e,async fn(t){let{x:i,y:n,placement:o,rects:l,platform:r,elements:s,middlewareData:d}=t,{element:u,padding:f=0}=p(e,t)||{};if(null==u)return{};let c=D(f),m={x:i,y:n},y=w(b(o)),x=v(y),C=await r.getDimensions(u),O="y"===y,R=O?"clientHeight":"clientWidth",S=l.reference[x]+l.reference[y]-m[y]-l.floating[x],T=m[y]-l.reference[y],I=await (null==r.getOffsetParent?void 0:r.getOffsetParent(u)),E=I?I[R]:0;
1E&&await (null==r.isElement?void 0:r.isElement(I))||(E=s.floating[R]||l.floating[x]);let H=E/2-C[x]/2-1,U=a(c[O?"top":"left"],H),$=a(c[O?"bottom":"right"],H),z=E-C[x]-$,L=E/2-C[x]/2+(S/2-T/2),M=h(U,a(L,z)),P=!d.arrow&&null!=g(o)&&L!==M&&l.reference[x]/2-(L<U?U:$)-C[x]/2<0,A=P?L<U?L-U:L-z:0;return{[y]:m[y]+A,data:{[y]:M,centerOffset:L-M-A,...P&&{alignmentOffset:A}},reset:P}}}),eH=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){let{placement:i,elements:n,rects:o,platform:l,strategy:r}=t,{padding:s=2,x:d,y:u}=p(e,t),f=Array.from(await (null==l.getClientRects?void 0:l.getClientRects(n.reference))||[]),c=function(e){let t=e.slice().sort((e,t)=>e.y-t.y),i=[],n=null;for(let e=0;e<t.length;e++){let o=t[e];!n||o.y-n.y>n.height/2?i.push([o]):i[i.length-1].push(o),n=o}return i.map(e=>E(M(e)))}(f),g=E(M(f)),w=D(s),v=await l.getElementRects({reference:{getBoundingClientRect:function(){if(2===c.length&&c[0].left>c[1].right&&null!=d&&null!=u)return c.find(e=>d>e.left-w.left&&d<e.right+w.right&&u>e.top-w.top&&u<e.bottom+w.bottom)||g;if(c.length>=2){if("y"===b(i)){let e=c[0],t=c[c.length-1],n="top"===m(i),o=e.top,l=t.bottom,r=n?e.left:t.left,s=n?e.right:t.right;return{top:o,bottom:l,left:r,right:s,width:s-r,height:l-o,x:r,y:o}}let e="left"===m(i),t=h(...c.map(e=>e.right)),n=a(...c.map(e=>e.left)),o=c.filter(i=>e?i.left===n:i.right===t),l=o[0].top,r=o[o.length-1].bottom;return{top:l,bottom:r,left:n,right:t,width:t-n,height:r-l,x:n,y:l}}return g}},floating:n.floating,strategy:r});return o.reference.x!==v.reference.x||o.reference.y!==v.reference.y||o.reference.width!==v.reference.width||o.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},eU=(e,t,i)=>{let n=new Map,o={platform:eC,...i},l={...o.platform,_c:n};return $(e,t,{...o,platform:l})};var e$=i(2376),ez=i(12806),eL=i(82696);if("undefined"!=typeof WeakMap){let e=new WeakMap;n=t=>e.get(t),o=(t,i)=>(e.set(t,i),i)}else{let e=[],t=0;n=t=>{for(let i=0;i<e.length;i+=2)if(e[i]==t)return e[i+1]},o=(i,n)=>(10==t&&(t=0),e[t++]=i,e[t++]=n)}var eM=class{constructor(e,t,i,n){this.width=e,this.height=t,this.map=i,this.problems=n}findCell(e){for(let t=0;t<this.map.length;t++){let i=this.map[t];if(i!=e)continue;let n=t%this.width,o=t/this.width|0,l=n+1,r=o+1;for(let e=1;l<this.width&&this.map[t+e]==i;e++)l++;for(let e=1;r<this.height&&this.map[t+this.width*e]==i;e++)r++;return{left:n,top:o,right:l,bottom:r}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,i){let{left:n,right:o,top:l,bottom:r}=this.findCell(e);return"horiz"==t?(i<0?0==n:o==this.width)?null:this.map[l*this.width+(i<0?n-1:o)]:(i<0?0==l:r==this.height)?null:this.map[n+this.width*(i<0?l-1:r)]}rectBetween(e,t){let{left:i,right:n,top:o,bottom:l}=this.findCell(e),{left:r,right:s,top:a,bottom:h}=this.findCell(t);return{left:Math.min(i,r),top:Math.min(o,a),right:Math.max(n,s),bottom:Math.max(l,h)}}cellsInRect(e){let t=[],i={};for(let n=e.top;n<e.bottom;n++)for(let o=e.left;o<e.right;o++){let l=n*this.width+o,r=this.map[l];!i[r]&&(i[r]=!0,o==e.left&&o&&this.map[l-1]==r||n==e.top&&n&&this.map[l-this.width]==r||t.push(r))}return t}positionAt(e,t,i){for(let n=0,o=0;;n++){let l=o+i.child(n).nodeSize;if(n==e){let i=t+e*this.width,n=(e+1)*this.width;for(;i<n&&this.map[i]<o;)i++;return i==n?l-1:this.map[i]}o=l}}static get(e){return n(e)||o(e,function(e){if("table"!=e.type.spec.tableRole)throw RangeError("Not a table node: "+e.type.name);let t=function(e){let t=-1,i=!1;for(let n=0;n<e.childCount;n++){let o=e.child(n),l=0;if(i)for(let t=0;t<n;t++){let i=e.child(t);for(let e=0;e<i.childCount;e++){let o=i.child(e);t+o.attrs.rowspan>n&&(l+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){let t=o.child(e);l+=t.attrs.colspan,t.attrs.rowspan>1&&(i=!0)}-1==t?t=l:t!=l&&(t=Math.max(t,l))}return t}(e),i=e.childCount,n=[],o=0,l=null,r=[];for(let e=0,o=t*i;e<o;e++)n[e]=0;for(let s=0,a=0;s<i;s++){let h=e.child(s);a++;for(let e=0;;e++){for(;o<n.length&&0!=n[o];)o++;if(e==h.childCount)break;let d=h.child(e),{colspan:u,rowspan:f,colwidth:c}=d.attrs;for(let e=0;e<f;e++){if(e+s>=i){(l||(l=[])).push({type:"overlong_rowspan",pos:a,n:f-e});break}let h=o+e*t;for(let e=0;e<u;e++){0==n[h+e]?n[h+e]=a:(l||(l=[])).push({type:"collision",row:s,pos:a,n:u-e});let i=c&&c[e];if(i){let n=(h+e)%t*2,o=r[n];null==o||o!=i&&1==r[n+1]?(r[n]=i,r[n+1]=1):o==i&&r[n+1]++}}}o+=u,a+=d.nodeSize}let d=(s+1)*t,u=0;for(;o<d;)0==n[o++]&&u++;u&&(l||(l=[])).push({type:"missing",row:s,n:u}),a++}(0===t||0===i)&&(l||(l=[])).push({type:"zero_sized"});let s=new eM(t,i,n,l),a=!1;for(let e=0;!a&&e<r.length;e+=2)null!=r[e]&&r[e+1]<i&&(a=!0);return a&&function(e,t,i){e.problems||(e.problems=[]);let n={};for(let o=0;o<e.map.length;o++){let l=e.map[o];if(n[l])continue;n[l]=!0;let r=i.nodeAt(l);if(!r)throw RangeError(`No cell with offset ${l}
1 found`);let s=null,a=r.attrs;for(let i=0;i<a.colspan;i++){let n=t[(o+i)%e.width*2];null==n||a.colwidth&&a.colwidth[i]==n||((s||(s=function(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let i=0;i<e.colspan;i++)t.push(0);return t}(a)))[i]=n)}s&&e.problems.unshift({type:"colwidth mismatch",pos:l,colwidth:s})}}(s,r,e),s}(e))}};function eP(e){let t=e.cached.tableNodeTypes;if(!t)for(let i in t=e.cached.tableNodeTypes={},e.nodes){let n=e.nodes[i],o=n.spec.tableRole;o&&(t[o]=n)}return t}function eA(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function ek(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function eN(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function eV(e,t,i){let n=e.node(-1),o=eM.get(n),l=e.start(-1),r=o.nextCell(e.pos-l,t,i);return null==r?null:e.node(0).resolve(l+r)}function eB(e,t,i=1){let n={...e,colspan:e.colspan-i};return n.colwidth&&(n.colwidth=n.colwidth.slice(),n.colwidth.splice(t,i),n.colwidth.some(e=>e>0)||(n.colwidth=null)),n}new e$.H$("selectingCells");var eW=class e extends e$.Y1{constructor(e,t=e){let i=e.node(-1),n=eM.get(i),o=e.start(-1),l=n.rectBetween(e.pos-o,t.pos-o),r=e.node(0),s=n.cellsInRect(l).filter(e=>e!=t.pos-o);s.unshift(t.pos-o);let a=s.map(e=>{let t=i.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let n=o+e+1;return new e$.xm(r.resolve(n),r.resolve(n+t.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=e,this.$headCell=t}map(t,i){let n=t.resolve(i.map(this.$anchorCell.pos)),o=t.resolve(i.map(this.$headCell.pos));if(ek(n)&&ek(o)&&eN(n,o)){let t=this.$anchorCell.node(-1)!=n.node(-1);return t&&this.isRowSelection()?e.rowSelection(n,o):t&&this.isColSelection()?e.colSelection(n,o):new e(n,o)}return e$.Bs.between(n,o)}content(){let e=this.$anchorCell.node(-1),t=eM.get(e),i=this.$anchorCell.start(-1),n=t.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},l=[];for(let i=n.top;i<n.bottom;i++){let r=[];for(let l=i*t.width+n.left,s=n.left;s<n.right;s++,l++){let i=t.map[l];if(o[i])continue;o[i]=!0;let s=t.findCell(i),a=e.nodeAt(i);if(!a)throw RangeError(`No cell with offset ${i} found`);let h=n.left-s.left,d=s.right-n.right;if(h>0||d>0){let e=a.attrs;if(h>0&&(e=eB(e,0,h)),d>0&&(e=eB(e,e.colspan-d,d)),s.left<n.left){if(!(a=a.type.createAndFill(e)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else a=a.type.create(e,a.content)}if(s.top<n.top||s.bottom>n.bottom){let e={...a.attrs,rowspan:Math.min(s.bottom,n.bottom)-Math.max(s.top,n.top)};a=s.top<n.top?a.type.createAndFill(e):a.type.create(e,a.content)}r.push(a)}l.push(e.child(i).copy(ez.HY.from(r)))}let r=this.isColSelection()&&this.isRowSelection()?e:l;return new ez.p2(ez.HY.from(r),1,1)}replace(e,t=ez.p2.empty){let i=e.steps.length,n=this.ranges;for(let o=0;o<n.length;o++){let{$from:l,$to:r}=n[o],s=e.mapping.slice(i);e.replace(s.map(l.pos),s.map(r.pos),o?ez.p2.empty:t)}let o=e$.Y1.findFrom(e.doc.resolve(e.mapping.slice(i).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new ez.p2(ez.HY.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),i=eM.get(t),n=this.$anchorCell.start(-1),o=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n));for(let i=0;i<o.length;i++)e(t.nodeAt(o[i]),n+o[i])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);return!(Math.min(e,t)>0)&&Math.max(e+this.$anchorCell.nodeAfter.attrs.rowspan,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(t,i=t){let n=t.node(-1),o=eM.get(n),l=t.start(-1),r=o.findCell(t.pos-l),s=o.findCell(i.pos-l),a=t.node(0);return r.top<=s.top?(r.top>0&&(t=a.resolve(l+o.map[r.left])),s.bottom<o.height&&(i=a.resolve(l+o.map[o.width*(o.height-1)+s.right-1]))):(s.top>0&&(i=a.resolve(l+o.map[s.left])),r.bottom<o.height&&(t=a.resolve(l+o.map[o.width*(o.height-1)+r.right-1]))),new e(t,i)}isRowSelection(){let e=this.$anchorCell.node(-1),t=eM.get(e),i=this.$anchorCell.start(-1),n=t.colCount(this.$anchorCell.pos-i),o=t.colCount(this.$headCell.pos-i);return!(Math.min(n,o)>0)&&Math.max(n+this.$anchorCell.nodeAfter.attrs.colspan,o+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,i=t){let n=t.node(-1),o=eM.get(n),l=t.start(-1),r=o.findCell(t.pos-l),s=o.findCell(i.pos-l),a=t.node(0);
1return r.left<=s.left?(r.left>0&&(t=a.resolve(l+o.map[r.top*o.width])),s.right<o.width&&(i=a.resolve(l+o.map[o.width*(s.top+1)-1]))):(s.left>0&&(i=a.resolve(l+o.map[s.top*o.width])),r.right<o.width&&(t=a.resolve(l+o.map[o.width*(r.top+1)-1]))),new e(t,i)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,i){return new e(t.resolve(i.anchor),t.resolve(i.head))}static create(t,i,n=i){return new e(t.resolve(i),t.resolve(n))}getBookmark(){return new eF(this.$anchorCell.pos,this.$headCell.pos)}};eW.prototype.visible=!1,e$.Y1.jsonID("cell",eW);var eF=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),i=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==i.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&i.index()<i.parent.childCount&&eN(t,i)?new eW(t,i):e$.Y1.near(i,1)}};function eK(e){let t=e.selection,i=function(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;let i=function(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}(t.$head)||function(e){for(let t=e.nodeAfter,i=e.pos;t;t=t.firstChild,i++){let n=t.type.spec.tableRole;if("cell"==n||"header_cell"==n)return e.doc.resolve(i)}for(let t=e.nodeBefore,i=e.pos;t;t=t.lastChild,i--){let n=t.type.spec.tableRole;if("cell"==n||"header_cell"==n)return e.doc.resolve(i-t.nodeSize)}}(t.$head);if(i)return i;throw RangeError(`No cell found around position ${t.head}`)}(e),n=i.node(-1),o=i.start(-1),l=eM.get(n);return{...t instanceof eW?l.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):l.findCell(i.pos-o),tableStart:o,map:l,table:n}}function e_(e,t,i){let n=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<n.length;e++){let o=t.table.nodeAt(n[e]);if(o&&o.type!==i.header_cell)return!1}return!0}function ej(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(t,i){if(!eA(t))return!1;if(i){let n=eP(t.schema),o=eK(t),l=t.tr,r=o.map.cellsInRect("column"==e?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==e?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),s=r.map(e=>o.table.nodeAt(e));for(let e=0;e<r.length;e++)s[e].type==n.header_cell&&l.setNodeMarkup(o.tableStart+r[e],n.cell,s[e].attrs);if(0===l.steps.length)for(let e=0;e<r.length;e++)l.setNodeMarkup(o.tableStart+r[e],n.header_cell,s[e].attrs);i(l)}return!0}:function(t,i){if(!eA(t))return!1;if(i){let n=eP(t.schema),o=eK(t),l=t.tr,r=e_("row",o,n),s=e_("column",o,n),a=("column"===e?r:"row"===e&&s)?1:0,h="column"==e?{left:0,top:a,right:1,bottom:o.map.height}:"row"==e?{left:a,top:0,right:o.map.width,bottom:1}:o,d="column"==e?s?n.cell:n.header_cell:"row"==e?r?n.cell:n.header_cell:n.cell;o.map.cellsInRect(h).forEach(e=>{let t=e+o.tableStart,i=l.doc.nodeAt(t);i&&l.setNodeMarkup(t,d,i.attrs)}),i(l)}return!0}}function eq(e,t){let i=e.selection;if(!(i instanceof eW))return!1;if(t){let n=e.tr,o=eP(e.schema).cell.createAndFill().content;
1i.forEachCell((e,t)=>{e.content.eq(o)||n.replace(n.mapping.map(t+1),n.mapping.map(t+e.nodeSize-1),new ez.p2(o,0,0))}),n.docChanged&&t(n)}return!0}function eY(e,t,i){return!i.eq(e.selection)&&(t&&t(e.tr.setSelection(i).scrollIntoView()),!0)}function eJ(e,t){return(i,n,o)=>{if(!o)return!1;let l=i.selection;if(l instanceof eW)return eY(i,n,e$.Y1.near(l.$headCell,t));if("horiz"!=e&&!l.empty)return!1;let r=eG(o,e,t);if(null==r)return!1;if("horiz"==e)return eY(i,n,e$.Y1.near(i.doc.resolve(l.head+t),t));{let o;let l=i.doc.resolve(r),s=eV(l,e,t);return o=s?e$.Y1.near(s,1):t<0?e$.Y1.near(i.doc.resolve(l.before(-1)),-1):e$.Y1.near(i.doc.resolve(l.after(-1)),1),eY(i,n,o)}}}function eZ(e,t){return(i,n,o)=>{let l;if(!o)return!1;let r=i.selection;if(r instanceof eW)l=r;else{let n=eG(o,e,t);if(null==n)return!1;l=new eW(i.doc.resolve(n))}let s=eV(l.$headCell,e,t);return!!s&&eY(i,n,new eW(l.$anchorCell,s))}}function eG(e,t,i){if(!(e.state.selection instanceof e$.Bs))return null;let{$head:n}=e.state.selection;for(let o=n.depth-1;o>=0;o--){let l=n.node(o);if((i<0?n.index(o):n.indexAfter(o))!=(i<0?0:l.childCount))break;if("cell"==l.type.spec.tableRole||"header_cell"==l.type.spec.tableRole){let l=n.before(o),r="vert"==t?i>0?"down":"up":i>0?"right":"left";return e.endOfTextblock(r)?l:null}}return null}new e$.H$("fix-tables"),ej("row",{useDeprecatedLogic:!0}),ej("column",{useDeprecatedLogic:!0}),ej("cell",{useDeprecatedLogic:!0}),(0,eL.$)({ArrowLeft:eJ("horiz",-1),ArrowRight:eJ("horiz",1),ArrowUp:eJ("vert",-1),ArrowDown:eJ("vert",1),"Shift-ArrowLeft":eZ("horiz",-1),"Shift-ArrowRight":eZ("horiz",1),"Shift-ArrowUp":eZ("vert",-1),"Shift-ArrowDown":eZ("vert",1),Backspace:eq,"Mod-Backspace":eq,Delete:eq,"Mod-Delete":eq}),new e$.H$("tableColumnResizing");var eQ=class{constructor({editor:e,element:t,view:i,pluginKey:n="bubbleMenu",updateDelay:o=250,resizeDelay:r=60,shouldShow:s,appendTo:a,getReferencedVirtualElement:h,options:d}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:e,state:t,from:i,to:n})=>{let{doc:o,selection:r}=t,{empty:s}=r,a=!o.textBetween(i,n).length&&(0,l.xh)(t.selection),h=this.element.contains(document.activeElement);return!!(e.hasFocus()||h)&&!s&&!a&&!!this.editor.isEditable},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{var t;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}(null==e?void 0:e.relatedTarget)&&(null==(t=this.element.parentNode)?void 0:t.contains(e.relatedTarget))||(null==e?void 0:e.relatedTarget)===this.editor.view.dom||this.hide()},this.handleDebouncedUpdate=(e,t)=>{let i=!(null==t?void 0:t.selection.eq(e.state.selection)),n=!(null==t?void 0:t.doc.eq(e.state.doc));(i||n)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(e,i,n,t)},this.updateDelay))},this.updateHandler=(e,t,i,n)=>{let{composing:o}=e;if(!o&&(t||i)){if(!this.getShouldShow(n)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);"updatePosition"===t?this.updatePosition():t&&"object"==typeof t&&"updateOptions"===t.type?this.updateOptions(t.options):"hide"===t?this.hide():"show"===t&&(this.updatePosition(),this.show())},this.editor=e,this.element=t,this.view=i,this.pluginKey=n,this.updateDelay=o,this.resizeDelay=r,this.appendTo=a,this.scrollTarget=null!=(u=null==d?void 0:d.scrollTarget)?u:window,this.getReferencedVirtualElement=h,this.floatingUIOptions={...this.floatingUIOptions,...d},this.element.tabIndex=0,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.get
1ShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(eT("boolean"!=typeof this.floatingUIOptions.flip?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(eS("boolean"!=typeof this.floatingUIOptions.shift?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(eO("boolean"!=typeof this.floatingUIOptions.offset?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(eE(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(eI("boolean"!=typeof this.floatingUIOptions.size?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(eR("boolean"!=typeof this.floatingUIOptions.autoPlacement?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(eD("boolean"!=typeof this.floatingUIOptions.hide?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(eH("boolean"!=typeof this.floatingUIOptions.inline?this.floatingUIOptions.inline:void 0)),e}get virtualElement(){var e,t,i;let{selection:n}=this.editor.state,o=null==(e=this.getReferencedVirtualElement)?void 0:e.call(this);if(o)return o;if(!(null==(i=null==(t=this.view)?void 0:t.dom)?void 0:i.parentNode))return;let r=(0,l.pr)(this.view,n.from,n.to),s={getBoundingClientRect:()=>r,getClientRects:()=>[r]};if(n instanceof e$.qv){let e=this.view.nodeDOM(n.from),t=e.dataset.nodeViewWrapper?e:e.querySelector("[data-node-view-wrapper]");t&&(e=t),e&&(s={getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>[e.getBoundingClientRect()]})}if(n instanceof eW){let{$anchorCell:e,$headCell:t}=n,i=e?e.pos:t.pos,o=t?t.pos:e.pos,l=this.view.nodeDOM(i),r=this.view.nodeDOM(o);if(!l||!r)return;let a=l===r?l.getBoundingClientRect():function(e,t){let i=Math.min(e.top,t.top),n=Math.max(e.bottom,t.bottom),o=Math.min(e.left,t.left);return new DOMRect(o,i,Math.max(e.right,t.right)-o,n-i)}(l.getBoundingClientRect(),r.getBoundingClientRect());s={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return s}updatePosition(){if(!this.isVisible)return;let e=this.virtualElement;e&&eU(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:i,middlewareData:n})=>{var o,l;if(this.isVisible&&!this.editor.isDestroyed&&this.element.isConnected){if((null==(o=n.hide)?void 0:o.referenceHidden)||(null==(l=n.hide)?void 0:l.escaped)){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=i,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(e,t){let{state:i}=e,n=i.selection.from!==i.selection.to;if(this.updateDelay>0&&n){this.handleDebouncedUpdate(e,t);return}let o=!(null==t?void 0:t.selection.eq(e.state.selection)),l=!(null==t?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,o,l,t)}getShouldShow(e){var t;let{state:i}=this.view,{selection:n}=i,{ranges:o}=n,l=Math.min(...o.map(e=>e.$from.pos)),r=Math.max(...o.map(e=>e.$to.pos));return(null==(t=this.shouldShow)?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:e,from:l,to:r}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t="function"==typeof this.appendTo?this.appendTo():this.appendTo;null==(e=null!=t?t:this.view.dom.parentElement)||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(e){var t;if(void 0!==e.updateDelay&&(this.updateDelay=e.updateDelay),void 0!==e.resizeDelay&&(this.resizeDelay=e.resizeDelay),void 0!==e.appendTo&&(this.appendTo=e.appendTo),void 0!==e.getReferencedVirtualElement&&(this.getReferencedVirtualElement=e.getReferencedVirtualElement),void 0!==e.shouldShow&&e.shouldShow&&(this.shouldShow=e.shouldShow),void 0!==e.options){let i=null!=(t=e.options.scrollTarget)?t:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},eX=e=>
1new e$.Sy({key:"string"==typeof e.pluginKey?new e$.H$(e.pluginKey):e.pluginKey,view:t=>new eQ({view:t,...e})});l.hj.create({name:"bubbleMenu",addOptions:()=>({element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[eX({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var e0=i(56066),e1=i(67294),e2=i(73935),e6=class{constructor({editor:e,element:t,view:i,pluginKey:n="floatingMenu",updateDelay:o=250,resizeDelay:l=60,options:r,appendTo:s,shouldShow:a}){var h;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:e,state:t})=>{let{selection:i}=t,{$anchor:n,empty:o}=i,l=1===n.depth,r=n.parent.isTextblock&&!n.parent.type.spec.code&&!n.parent.textContent&&0===n.parent.childCount&&!this.getTextContent(n.parent);return!!e.hasFocus()&&!!o&&!!l&&!!r&&!!this.editor.isEditable},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(e,t,i,n)=>{let{composing:o}=e;if(!o&&(t||i)){if(!this.getShouldShow(n)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{var t;if(this.preventHide){this.preventHide=!1;return}(null==e?void 0:e.relatedTarget)&&(null==(t=this.element.parentNode)?void 0:t.contains(e.relatedTarget))||(null==e?void 0:e.relatedTarget)===this.editor.view.dom||this.hide()},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);"updatePosition"===t?this.updatePosition():t&&"object"==typeof t&&"updateOptions"===t.type?this.updateOptions(t.options):"hide"===t?this.hide():"show"===t&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=e,this.element=t,this.view=i,this.pluginKey=n,this.updateDelay=o,this.resizeDelay=l,this.appendTo=s,this.scrollTarget=null!=(h=null==r?void 0:r.scrollTarget)?h:window,this.floatingUIOptions={...this.floatingUIOptions,...r},this.element.tabIndex=0,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return(0,l.Q)(e,{textSerializers:(0,l.Is)(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(eT("boolean"!=typeof this.floatingUIOptions.flip?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(eS("boolean"!=typeof this.floatingUIOptions.shift?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(eO("boolean"!=typeof this.floatingUIOptions.offset?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(eE(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(eI("boolean"!=typeof this.floatingUIOptions.size?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(eR("boolean"!=typeof this.floatingUIOptions.autoPlacement?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(eD("boolean"!=typeof this.floatingUIOptions.hide?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(eH("boolean"!=typeof this.floatingUIOptions.inline?this.floatingUIOptions.inline:void 0)),e}getShouldShow(e){var t;let{state:i}=this.view,{selection:n}=i,{ranges:o}=n,l=Math.min(...o.map(e=>e.$from.pos)),r=Math.max(...o.map(e=>e.$to.pos));return null==(t=this.shouldShow)?void 0:t.call(this,{editor:this.editor,view:this.view,state:i,oldState:e,from:l,to:r})}updateOptions(e){var t;if(void 0!==e.updateDelay&&(this.updateDelay=e.updateDelay),void 0!==e.resizeDelay&&(this.resizeDelay=e.resizeDelay),void 0!==e.appendTo&&(this.appendTo=e.appendTo),void 0!==e.shouldShow&&e.shouldShow&&(this.shouldShow=e.shouldShow),void 0!==e.options){let i=null!=(t=e.options.scrollTarget)?t:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}updatePosition(){let{selection:e}=this.editor.state,t=(0,l.pr)(this.view,e.from,e.to);eU({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:i,middlewareData:n})=>{var o,l;if((null==(o=n.hide)?void 0:o.referenceHidden)||(null==(l=n.hide)?void 0:l.escaped)){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=i,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let i=!(null==t?void 0:t.selection.eq(e.state.selection)),n=!(null==t?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,i,n,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t="function"==typeof this.appendTo?this.appendTo():this.appendTo;null==(e=null!=t?t:this.view.dom.parentElement)||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},e3=e=>new e$.Sy({key:"string"==typeof e.pluginKey?new e$.H$(e.pluginKey):e.pluginKey,view:t=>new e6({view:t,...e})});function e5(e,t){return null!=e?e:new e$.H$(t)}l.hj.create({name:"floatingMenu",addOptions:()=>({element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}),addCommands(){return{updateFloatingMenuPosition:()=>({tr:e,dispatch:t})=>(t&&e.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[e3({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});var e7="undefined"!=typeof window?e1.useLayoutEffect:e1.useEffect,e8=new Set(["left","opacity","position","top","visibility","width"]),e9=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","o
1pacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),e4=new Set(["children","className","style"]),te=new Set(["tabIndex"]),tt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),ti={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function tn(e,t){return/^on[A-Z]/.test(e)&&"function"==typeof t}function to(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function tl(e,t,i){if("tabIndex"===t){e.tabIndex=Number(i);return}e[t]=i}function tr(e,t){let i=(0,e1.useRef)({}),n=(0,e1.useRef)([]);e7(()=>{let o=i.current;return!function(e,t,i){if(t!==i){if(i){e.className=i;return}e.removeAttribute("class")}}(e,o.className,t.className),!function(e,t,i){let n=null!=t?t:{},o=null!=i?i:{};new Set([...Object.keys(n),...Object.keys(o)]).forEach(t=>{let i=n[t],l=o[t];if(i!==l){var r,s,a;if(null==l){e8.has(t)||e.style.removeProperty(to(t));return}r=e,s=t,a=l,e8.has(s)||r.style.setProperty(to(s),"number"!=typeof a||0===a||s.startsWith("--")||e9.has(s)?String(a):`${a}px`)}})}(e,o.style,t.style),!function(e,t,i){new Set([...Object.keys(t),...Object.keys(i)]).forEach(n=>{if(e4.has(n)||!(n.startsWith("aria-")||n.startsWith("data-")||tt.has(n))||tn(n,t[n])||tn(n,i[n]))return;let o=t[n],l=i[n];if(o===l)return;let r=(n.startsWith("aria-")||n.startsWith("data-"),n);if(null==l||!1===l){te.has(n)&&function(e,t){if("tabIndex"===t){e.removeAttribute("tabindex");return}let i=e[t];if("boolean"==typeof i){e[t]=!1;return}if("number"==typeof i){e[t]=0;return}e[t]=""}(e,n),e.removeAttribute(r);return}if(!0===l){te.has(n)&&tl(e,n,!0),e.setAttribute(r,"");return}if(te.has(n)){tl(e,n,l);return}e.setAttribute(r,String(l))})}(e,o,t),n.current=function(e,t,i){t.forEach(({eventName:t,listener:i,options:n})=>{e.removeEventListener(t,i,n)});let n=[];return Object.entries(i).forEach(([t,i])=>{if(!tn(t,i))return;let{eventName:o,options:l}=function(e){var t;let i=e.endsWith("Capture"),n=(i?e.slice(0,-7):e).slice(2);return{eventName:null!=(t=ti[n])?t:n.toLowerCase(),options:i?{capture:!0}:void 0}}(t),r=t=>{i(function(e,t){let i=t.defaultPrevented,n=!1,o=Object.create(t);return Object.defineProperties(o,{nativeEvent:{value:t},currentTarget:{value:e},target:{value:t.target},persist:{value:()=>void 0},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>n},preventDefault:{value:()=>{i=!0,t.preventDefault()}},stopPropagation:{value:()=>{n=!0,t.stopPropagation()}}}),o}(e,t))};e.addEventListener(o,r,l),n.push({eventName:o,listener:r,options:l})}),n}(e,n.current,t),i.current=t,()=>{n.current.forEach(({eventName:t,listener:i,options:n})=>{e.removeEventListener(t,i,n)}),n.current=[]}},[e,t])}var ts=e1.forwardRef(({pluginKey:e,editor:t,updateDelay:i,resizeDelay:n,appendTo:o,shouldShow:l=null,getReferencedVirtualElement:r,options:s,children:a,...h},d)=>{let u=(0,e1.useRef)(document.createElement("div")),f=(0,e1.useRef)(e5(e,"bubbleMenu")).current;tr(u.current,h),"function"==typeof d?d(u.current):d&&(d.current=u.current);let{editor:c}=(0,e0.fi)(),p=t||c,m={updateDelay:i,resizeDelay:n,appendTo:o,pluginKey:f,shouldShow:l,getReferencedVirtualElement:r,options:s},g=(0,e1.useRef)(m);g.current=m;let[w,v]=(0,e1.useState)(!1),y=(0,e1.useRef)(!0);return(0,e1.useEffect)(()=>{if(null==p?void 0:p.isDestroyed)return;if(!p){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}let e=u.current;e.style.visibility="hidden",e.style.position="absolute";let t=eX({...g.current,editor:p,element:e});p.registerPlugin(t);let i=g.current.pluginKey;return y.current=!0,v(!0),()=>{v(!1),p.unregisterPlugin(i),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[p]),(0,e1.useEffect)(()=>{if(w&&p&&!p.isDestroyed){if(y.current){y.current=!1;return}p.view.dispatch(p.state.tr.setMeta(f,{type:"updateOptions",options:g.current}))}},[w,p,i,n,l,s,o,r,f]),(0,e2.createPortal)(a,u.current)});e1.forwardRef(({pluginKey:e,editor:t,updateDelay:i,resizeDelay:n,appendTo:o,shouldShow:l=null,options:r,children:s,...a},h)=>{let d=(0,e1.useRef)(document.createElement("div")),u=(0,e1.useRef)(e5(e,"floatingMenu")).current;tr(d.current,a),"function"==typeof h?h(d.current):h&&(h.current=d.current);let{editor:f}=(0,e0.fi)(),c=t||f,p={updateDelay:i,resizeDelay:n,appendTo:o,pluginKey:u,shouldShow:l,options:r},m=(0,e1.useRef)(p);m.current=p;let[g,w]=(0,e1.useState)(!1),v=(0,e1.useRef)(!0);return(0,e1.useEffect)(()=>
1{if(null==c?void 0:c.isDestroyed)return;if(!c){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}let e=d.current;e.style.visibility="hidden",e.style.position="absolute";let t=e3({...m.current,editor:c,element:e});c.registerPlugin(t);let i=m.current.pluginKey;return v.current=!0,w(!0),()=>{w(!1),c.unregisterPlugin(i),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[c]),(0,e1.useEffect)(()=>{if(g&&c&&!c.isDestroyed){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(u,{type:"updateOptions",options:m.current}))}},[g,c,i,n,l,r,o,u]),(0,e2.createPortal)(s,d.current)})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.