@wangeditor-next/yjs-for-react 0.1.3 → 0.1.4
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.
- package/dist/hooks/useRemoteCursorEditor.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/utils/getOverlayPosition.d.ts +1 -1
- package/dist/utils/react-editor-to-dom-range-safe.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CursorEditor } from '@wangeditor-next/yjs';
|
|
2
1
|
import { IDomEditor } from '@wangeditor-next/editor';
|
|
2
|
+
import { CursorEditor } from '@wangeditor-next/yjs';
|
|
3
3
|
export declare function useRemoteCursorEditor<TCursorData extends Record<string, unknown> = Record<string, unknown>>(): CursorEditor<TCursorData> & IDomEditor;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { EditorContext, useEditorStatic } from './hooks/use-editor-static';
|
|
2
|
-
export {
|
|
2
|
+
export { CursorOverlayData, useRemoteCursorOverlayPositions, UseRemoteCursorOverlayPositionsOptions, } from './hooks/useRemoteCursorOverlayPositions';
|
|
3
|
+
export { useRemoteCursorStates, useRemoteCursorStatesSelector } from './hooks/useRemoteCursorStates';
|
|
3
4
|
export { getCursorRange } from './utils/getCursorRange';
|
|
4
|
-
export { CursorOverlayData, UseRemoteCursorOverlayPositionsOptions, useRemoteCursorOverlayPositions, } from './hooks/useRemoteCursorOverlayPositions';
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import t,{createContext as e,useContext as n,useReducer as r,useRef as o,useEffect as i,useCallback as u,useState as c,useLayoutEffect as a,useMemo as f}from"react";import{CursorEditor as s,relativeRangeToSlateRange as l}from"@wangeditor-next/yjs";import{Range as v,Editor as p,Text as h,Path as y}from"slate";import{DomEditor as d}from"@wangeditor-next/editor";var g=e(null),b=function(){var t=n(g);return t||console.warn("The `useEditorStatic` hook must be used inside the <EditorContext> component's context."),t},m=function(){return m=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},m.apply(this,arguments)};function w(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}"function"==typeof SuppressedError&&SuppressedError;var O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function S(t){var e={exports:{}};return t(e,e.exports),e.exports
|
|
1
|
+
import t,{createContext as e,useContext as n,useReducer as r,useRef as o,useEffect as i,useCallback as u,useState as c,useLayoutEffect as a,useMemo as f}from"react";import{relativeRangeToSlateRange as s,CursorEditor as l}from"@wangeditor-next/yjs";import{DomEditor as v}from"@wangeditor-next/editor";import{Range as p,Editor as h,Text as y,Path as d}from"slate";var g=e(null),b=function(){var t=n(g);return t||console.warn("The `useEditorStatic` hook must be used inside the <EditorContext> component's context."),t},m=function(t){try{return!!t()}catch(t){return!0}},w=!m((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),O=Function.prototype,S=O.call,j=w&&O.bind.bind(S,S),E=w?j:function(t){return function(){return S.apply(t,arguments)}},x=E({}.toString),A=E("".slice),P=function(t){return A(x(t),8,-1)},R=Object,T=E("".split),k=m((function(){return!R("z").propertyIsEnumerable(0)}))?function(t){return"String"===P(t)?T(t,""):R(t)}:R,z=function(t){return null==t},I=TypeError,L=function(t){if(z(t))throw new I("Can't call method on "+t);return t},C=function(t){return k(L(t))},M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function F(t){var e={exports:{}};return t(e,e.exports),e.exports}var _,D,N=function(t){return t&&t.Math===Math&&t},G=N("object"==typeof globalThis&&globalThis)||N("object"==typeof window&&window)||N("object"==typeof self&&self)||N("object"==typeof M&&M)||N("object"==typeof M&&M)||function(){return this}()||Function("return this")(),W=Object.defineProperty,V=function(t,e){try{W(G,t,{value:e,configurable:!0,writable:!0})}catch(n){G[t]=e}return e},B=F((function(t){var e="__core-js_shared__",n=t.exports=G[e]||V(e,{});(n.versions||(n.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),U=function(t,e){return B[t]||(B[t]=e||{})},q=Object,H=function(t){return q(L(t))},X=E({}.hasOwnProperty),K=Object.hasOwn||function(t,e){return X(H(t),e)},Y=0,$=Math.random(),J=E(1..toString),Q=function(t){return"Symbol("+(void 0===t?"":t)+")_"+J(++Y+$,36)},Z=G.navigator,tt=Z&&Z.userAgent,et=tt?String(tt):"",nt=G.process,rt=G.Deno,ot=nt&&nt.versions||rt&&rt.version,it=ot&&ot.v8;it&&(D=(_=it.split("."))[0]>0&&_[0]<4?1:+(_[0]+_[1])),!D&&et&&(!(_=et.match(/Edge\/(\d+)/))||_[1]>=74)&&(_=et.match(/Chrome\/(\d+)/))&&(D=+_[1]);var ut,ct=D,at=G.String,ft=!!Object.getOwnPropertySymbols&&!m((function(){var t=Symbol("symbol detection");return!at(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ct&&ct<41})),st=ft&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,lt=G.Symbol,vt=U("wks"),pt=st?lt.for||lt:lt&<.withoutSetter||Q,ht=function(t){return K(vt,t)||(vt[t]=ft&&K(lt,t)?lt[t]:pt("Symbol."+t)),vt[t]},yt="object"==typeof document&&document.all,dt=void 0===yt&&void 0!==yt?function(t){return"function"==typeof t||t===yt}:function(t){return"function"==typeof t},gt=function(t){return"object"==typeof t?null!==t:dt(t)},bt=String,mt=TypeError,wt=function(t){if(gt(t))return t;throw new mt(bt(t)+" is not an object")},Ot=!m((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),St=Ot&&m((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),jt=G.document,Et=gt(jt)&>(jt.createElement),xt=function(t){return Et?jt.createElement(t):{}},At=!Ot&&!m((function(){return 7!==Object.defineProperty(xt("div"),"a",{get:function(){return 7}}).a})),Pt=Function.prototype.call,Rt=w?Pt.bind(Pt):function(){return Pt.apply(Pt,arguments)},Tt=function(t,e){return arguments.length<2?(n=G[t],dt(n)?n:void 0):G[t]&&G[t][e];var n},kt=E({}.isPrototypeOf),zt=Object,It=st?function(t){return"symbol"==typeof t}:function(t){var e=Tt("Symbol");return dt(e)&&kt(e.prototype,zt(t))},Lt=String,Ct=function(t){try{return Lt(t)}catch(t){return"Object"}},Mt=TypeError,Ft=function(t){if(dt(t))return t;throw new Mt(Ct(t)+" is not a function")},_t=function(t,e){var n=t[e];return z(n)?void 0:Ft(n)},Dt=TypeError,Nt=TypeError,Gt=ht("toPrimitive"),Wt=function(t,e){if(!gt(t)||It(t))return t;var n,r=_t(t,Gt);if(r){if(void 0===e&&(e="default"),n=Rt(r,t,e),!gt(n)||It(n))return n;throw new Nt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&dt(n=t.toString)&&!gt(r=Rt(n,t)))return r;if(dt(n=t.valueOf)&&!gt(r=Rt(n,t)))return r;if("string"!==e&&dt(n=t.toString)&&!gt(r=Rt(n,t)))return r;throw new Dt("Can't convert object to primitive value")}(t,e)},Vt=function(t){var e=Wt(t,"string");return It(e)?e:e+""},Bt=TypeError,Ut=Object.defineProperty,qt=Object.getOwnPropertyDescriptor,Ht="enumerable",Xt="configurable",Kt="writable",Yt={f:Ot?St?function(t,e,n){if(wt(t),e=Vt(e),wt(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Kt in n&&!n[Kt]){var r=qt(t,e);r&&r[Kt]&&(t[e]=n.value,n={configurable:Xt in n?n[Xt]:r[Xt],enumerable:Ht in n?n[Ht]:r[Ht],writable:!1})}return Ut(t,e,n)}:Ut:function(t,e,n){if(wt(t),e=Vt(e),wt(n),At)try{return Ut(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new Bt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},$t=Math.ceil,Jt=Math.floor,Qt=Math.trunc||function(t){var e=+t;return(e>0?Jt:$t)(e)},Zt=function(t){var e=+t;return e!=e||0===e?0:Qt(e)},te=Math.max,ee=Math.min,ne=Math.min,re=function(t){return e=t.length,(n=Zt(e))>0?ne(n,9007199254740991):0;var e,n},oe=function(t){return function(e,n,r){var o=C(e),i=re(o);if(0===i)return!t&&-1;var u,c=function(t,e){var n=Zt(t);return n<0?te(n+e,0):ee(n,e)}(r,i);if(t&&n!=n){for(;i>c;)if((u=o[c++])!=u)return!0}else for(;i>c;c++)if((t||c in o)&&o[c]===n)return t||c||0;return!t&&-1}},ie={includes:oe(!0),indexOf:oe(!1)},ue={},ce=ie.indexOf,ae=E([].push),fe=function(t,e){var n,r=C(t),o=0,i=[];for(n in r)!K(ue,n)&&K(r,n)&&ae(i,n);for(;e.length>o;)K(r,n=e[o++])&&(~ce(i,n)||ae(i,n));return i},se=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],le=Object.keys||function(t){return fe(t,se)},ve=Ot&&!St?Object.defineProperties:function(t,e){wt(t);for(var n,r=C(e),o=le(e),i=o.length,u=0;i>u;)Yt.f(t,n=o[u++],r[n]);return t},pe={f:ve},he=Tt("document","documentElement"),ye=U("keys"),de=function(t){return ye[t]||(ye[t]=Q(t))},ge="prototype",be="script",me=de("IE_PROTO"),we=function(){},Oe=function(t){return"<"+be+">"+t+"</"+be+">"},Se=function(t){t.write(Oe("")),t.close();var e=t.parentWindow.Object;return t=null,e},je=function(){try{ut=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;je="undefined"!=typeof document?document.domain&&ut?Se(ut):(e=xt("iframe"),n="java"+be+":",e.style.display="none",he.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(Oe("document.F=Object")),t.close(),t.F):Se(ut);for(var r=se.length;r--;)delete je[ge][se[r]];return je()};ue[me]=!0;var Ee=Object.create||function(t,e){var n;return null!==t?(we[ge]=wt(t),n=new we,we[ge]=null,n[me]=t):n=je(),void 0===e?n:pe.f(n,e)},xe=Yt.f,Ae=ht("unscopables"),Pe=Array.prototype;void 0===Pe[Ae]&&xe(Pe,Ae,{configurable:!0,value:Ee(null)});var Re,Te,ke,ze=function(t){Pe[Ae][t]=!0},Ie={},Le=G.WeakMap,Ce=dt(Le)&&/native code/.test(String(Le)),Me=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Fe=Ot?function(t,e,n){return Yt.f(t,e,Me(1,n))}:function(t,e,n){return t[e]=n,t},_e="Object already initialized",De=G.TypeError,Ne=G.WeakMap;if(Ce||B.state){var Ge=B.state||(B.state=new Ne);Ge.get=Ge.get,Ge.has=Ge.has,Ge.set=Ge.set,Re=function(t,e){if(Ge.has(t))throw new De(_e);return e.facade=t,Ge.set(t,e),e},Te=function(t){return Ge.get(t)||{}},ke=function(t){return Ge.has(t)}}else{var We=de("state");ue[We]=!0,Re=function(t,e){if(K(t,We))throw new De(_e);return e.facade=t,Fe(t,We,e),e},Te=function(t){return K(t,We)?t[We]:{}},ke=function(t){return K(t,We)}}var Ve={set:Re,get:Te,has:ke,enforce:function(t){return ke(t)?Te(t):Re(t,{})},getterFor:function(t){return function(e){var n;if(!gt(e)||(n=Te(e)).type!==t)throw new De("Incompatible receiver, "+t+" required");return n}}},Be={}.propertyIsEnumerable,Ue=Object.getOwnPropertyDescriptor,qe={f:Ue&&!Be.call({1:2},1)?function(t){var e=Ue(this,t);return!!e&&e.enumerable}:Be},He=Object.getOwnPropertyDescriptor,Xe={f:Ot?He:function(t,e){if(t=C(t),e=Vt(e),At)try{return He(t,e)}catch(t){}if(K(t,e))return Me(!Rt(qe.f,t,e),t[e])}},Ke=Function.prototype,Ye=Ot&&Object.getOwnPropertyDescriptor,$e=K(Ke,"name"),Je={EXISTS:$e,PROPER:$e&&"something"===function(){}.name,CONFIGURABLE:$e&&(!Ot||Ot&&Ye(Ke,"name").configurable)},Qe=E(Function.toString);dt(B.inspectSource)||(B.inspectSource=function(t){return Qe(t)});var Ze,tn,en,nn=B.inspectSource,rn=F((function(t){var e=Je.CONFIGURABLE,n=Ve.enforce,r=Ve.get,o=String,i=Object.defineProperty,u=E("".slice),c=E("".replace),a=E([].join),f=Ot&&!m((function(){return 8!==i((function(){}),"length",{value:8}).length})),s=String(String).split("String"),l=t.exports=function(t,r,l){"Symbol("===u(o(r),0,7)&&(r="["+c(o(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),l&&l.getter&&(r="get "+r),l&&l.setter&&(r="set "+r),(!K(t,"name")||e&&t.name!==r)&&(Ot?i(t,"name",{value:r,configurable:!0}):t.name=r),f&&l&&K(l,"arity")&&t.length!==l.arity&&i(t,"length",{value:l.arity});try{l&&K(l,"constructor")&&l.constructor?Ot&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var v=n(t);return K(v,"source")||(v.source=a(s,"string"==typeof r?r:"")),t};Function.prototype.toString=l((function(){return dt(this)&&r(this).source||nn(this)}),"toString")})),on=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(dt(n)&&rn(n,i,r),r.global)o?t[e]=n:V(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Yt.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},un=se.concat("length","prototype"),cn={f:Object.getOwnPropertyNames||function(t){return fe(t,un)}},an={f:Object.getOwnPropertySymbols},fn=E([].concat),sn=Tt("Reflect","ownKeys")||function(t){var e=cn.f(wt(t)),n=an.f;return n?fn(e,n(t)):e},ln=function(t,e,n){for(var r=sn(e),o=Yt.f,i=Xe.f,u=0;u<r.length;u++){var c=r[u];K(t,c)||n&&K(n,c)||o(t,c,i(e,c))}},vn=/#|\.prototype\./,pn=function(t,e){var n=yn[hn(t)];return n===gn||n!==dn&&(dt(e)?m(e):!!e)},hn=pn.normalize=function(t){return String(t).replace(vn,".").toLowerCase()},yn=pn.data={},dn=pn.NATIVE="N",gn=pn.POLYFILL="P",bn=pn,mn=Xe.f,wn=function(t,e){var n,r,o,i,u,c=t.target,a=t.global,f=t.stat;if(n=a?G:f?G[c]||V(c,{}):G[c]&&G[c].prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=mn(n,r))&&u.value:n[r],!bn(a?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;ln(i,o)}(t.sham||o&&o.sham)&&Fe(i,"sham",!0),on(n,r,i,t)}},On=!m((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Sn=de("IE_PROTO"),jn=Object,En=jn.prototype,xn=On?jn.getPrototypeOf:function(t){var e=H(t);if(K(e,Sn))return e[Sn];var n=e.constructor;return dt(n)&&e instanceof n?n.prototype:e instanceof jn?En:null},An=ht("iterator"),Pn=!1;[].keys&&("next"in(en=[].keys())?(tn=xn(xn(en)))!==Object.prototype&&(Ze=tn):Pn=!0);var Rn=!gt(Ze)||m((function(){var t={};return Ze[An].call(t)!==t}));Rn&&(Ze={}),dt(Ze[An])||on(Ze,An,(function(){return this}));var Tn={IteratorPrototype:Ze,BUGGY_SAFARI_ITERATORS:Pn},kn=Yt.f,zn=ht("toStringTag"),In=function(t,e,n){t&&!n&&(t=t.prototype),t&&!K(t,zn)&&kn(t,zn,{configurable:!0,value:e})},Ln=Tn.IteratorPrototype,Cn=function(){return this},Mn=String,Fn=TypeError,_n=function(t){if(function(t){return gt(t)||null===t}(t))return t;throw new Fn("Can't set "+Mn(t)+" as a prototype")},Dn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=function(t,e,n){try{return E(Ft(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return L(n),_n(r),gt(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),Nn=Je.PROPER,Gn=Je.CONFIGURABLE,Wn=Tn.IteratorPrototype,Vn=Tn.BUGGY_SAFARI_ITERATORS,Bn=ht("iterator"),Un="keys",qn="values",Hn="entries",Xn=function(){return this},Kn=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=Ee(Ln,{next:Me(+!r,n)}),In(t,o,!1),Ie[o]=Cn}(n,e,r);var c,a,f,s=function(t){if(t===o&&y)return y;if(!Vn&&t&&t in p)return p[t];switch(t){case Un:case qn:case Hn:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",v=!1,p=t.prototype,h=p[Bn]||p["@@iterator"]||o&&p[o],y=!Vn&&h||s(o),d="Array"===e&&p.entries||h;if(d&&(c=xn(d.call(new t)))!==Object.prototype&&c.next&&(xn(c)!==Wn&&(Dn?Dn(c,Wn):dt(c[Bn])||on(c,Bn,Xn)),In(c,l,!0)),Nn&&o===qn&&h&&h.name!==qn&&(Gn?Fe(p,"name",qn):(v=!0,y=function(){return Rt(h,this)})),o)if(a={values:s(qn),keys:i?y:s(Un),entries:s(Hn)},u)for(f in a)(Vn||v||!(f in p))&&on(p,f,a[f]);else wn({target:e,proto:!0,forced:Vn||v},a);return p[Bn]!==y&&on(p,Bn,y,{name:o}),Ie[e]=y,a},Yn=function(t,e){return{value:t,done:e}},$n=Yt.f,Jn="Array Iterator",Qn=Ve.set,Zn=Ve.getterFor(Jn),tr=Kn(Array,"Array",(function(t,e){Qn(this,{type:Jn,target:C(t),index:0,kind:e})}),(function(){var t=Zn(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,Yn(void 0,!0);switch(t.kind){case"keys":return Yn(n,!1);case"values":return Yn(e[n],!1)}return Yn([n,e[n]],!1)}),"values"),er=Ie.Arguments=Ie.Array;if(ze("keys"),ze("values"),ze("entries"),Ot&&"values"!==er.name)try{$n(er,"name",{value:"values"})}catch(t){}var nr=function(t){if("Function"===P(t))return E(t)},rr=nr(nr.bind),or=function(t,e){return Ft(t),void 0===e?t:w?rr(t,e):function(){return t.apply(e,arguments)}},ir=Array.isArray||function(t){return"Array"===P(t)},ur={};ur[ht("toStringTag")]="z";var cr="[object z]"===String(ur),ar=ht("toStringTag"),fr=Object,sr="Arguments"===P(function(){return arguments}()),lr=cr?P:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=fr(t),ar))?n:sr?P(e):"Object"===(r=P(e))&&dt(e.callee)?"Arguments":r},vr=function(){},pr=Tt("Reflect","construct"),hr=/^\s*(?:class|function)\b/,yr=E(hr.exec),dr=!hr.test(vr),gr=function(t){if(!dt(t))return!1;try{return pr(vr,[],t),!0}catch(t){return!1}},br=function(t){if(!dt(t))return!1;switch(lr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return dr||!!yr(hr,nn(t))}catch(t){return!0}};br.sham=!0;var mr,wr=!pr||m((function(){var t;return gr(gr.call)||!gr(Object)||!gr((function(){t=!0}))||t}))?br:gr,Or=ht("species"),Sr=Array,jr=function(t,e){return new(function(t){var e;return ir(t)&&(e=t.constructor,(wr(e)&&(e===Sr||ir(e.prototype))||gt(e)&&null===(e=e[Or]))&&(e=void 0)),void 0===e?Sr:e}(t))(0===e?0:e)},Er=E([].push),xr=function(t){var e=1===t,n=2===t,r=3===t,o=4===t,i=6===t,u=7===t,c=5===t||i;return function(a,f,s,l){for(var v,p,h=H(a),y=k(h),d=re(y),g=or(f,s),b=0,m=l||jr,w=e?m(a,d):n||u?m(a,0):void 0;d>b;b++)if((c||b in y)&&(p=g(v=y[b],b,h),t))if(e)w[b]=p;else if(p)switch(t){case 3:return!0;case 5:return v;case 6:return b;case 2:Er(w,v)}else switch(t){case 4:return!1;case 7:Er(w,v)}return i?-1:r||o?o:w}},Ar={forEach:xr(0),map:xr(1),filter:xr(2),some:xr(3),every:xr(4),find:xr(5),findIndex:xr(6),filterReject:xr(7)},Pr=ht("species"),Rr=Ar.map,Tr=(mr="map",ct>=51||!m((function(){var t=[];return(t.constructor={})[Pr]=function(){return{foo:1}},1!==t[mr](Boolean).foo})));wn({target:"Array",proto:!0,forced:!Tr},{map:function(t){return Rr(this,t,arguments.length>1?arguments[1]:void 0)}});var kr=E(qe.f),zr=E([].push),Ir=Ot&&m((function(){var t=Object.create(null);return t[2]=2,!kr(t,2)})),Lr=function(t){return function(e){for(var n,r=C(e),o=le(r),i=Ir&&null===xn(r),u=o.length,c=0,a=[];u>c;)n=o[c++],Ot&&!(i?n in r:kr(r,n))||zr(a,t?[n,r[n]]:r[n]);return a}},Cr={entries:Lr(!0),values:Lr(!1)}.entries;wn({target:"Object",stat:!0},{entries:function(t){return Cr(t)}});var Mr=!m((function(){return Object.isExtensible(Object.preventExtensions({}))})),Fr=E([].slice),_r=cn.f,Dr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Nr={f:function(t){return Dr&&"Window"===P(t)?function(t){try{return _r(t)}catch(t){return Fr(Dr)}}(t):_r(C(t))}},Gr=m((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Wr=Object.isExtensible,Vr=m((function(){Wr(1)}))||Gr?function(t){return!!gt(t)&&((!Gr||"ArrayBuffer"!==P(t))&&(!Wr||Wr(t)))}:Wr,Br=F((function(t){var e=Yt.f,n=!1,r=Q("meta"),o=0,i=function(t){e(t,r,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},n=!0;var t=cn.f,e=E([].splice),o={};o[r]=1,t(o).length&&(cn.f=function(n){for(var o=t(n),i=0,u=o.length;i<u;i++)if(o[i]===r){e(o,i,1);break}return o},wn({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Nr.f}))},fastKey:function(t,e){if(!gt(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!K(t,r)){if(!Vr(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!K(t,r)){if(!Vr(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return Mr&&n&&Vr(t)&&!K(t,r)&&i(t),t}};ue[r]=!0})),Ur=Br.onFreeze,qr=Object.freeze,Hr=m((function(){qr(1)}));wn({target:"Object",stat:!0,forced:Hr,sham:!Mr},{freeze:function(t){return qr&>(t)?qr(Ur(t)):t}});var Xr=ht("iterator"),Kr=Array.prototype,Yr=ht("iterator"),$r=function(t){if(!z(t))return _t(t,Yr)||_t(t,"@@iterator")||Ie[lr(t)]},Jr=TypeError,Qr=function(t,e,n){var r,o;wt(t);try{if(!(r=_t(t,"return"))){if("throw"===e)throw n;return n}r=Rt(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return wt(r),n},Zr=TypeError,to=function(t,e){this.stopped=t,this.result=e},eo=to.prototype,no=function(t,e,n){var r,o,i,u,c,a,f,s,l=n&&n.that,v=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),y=!(!n||!n.INTERRUPTED),d=or(e,l),g=function(t){return r&&Qr(r,"normal",t),new to(!0,t)},b=function(t){return v?(wt(t),y?d(t[0],t[1],g):d(t[0],t[1])):y?d(t,g):d(t)};if(p)r=t.iterator;else if(h)r=t;else{if(!(o=$r(t)))throw new Zr(Ct(t)+" is not iterable");if(void 0!==(s=o)&&(Ie.Array===s||Kr[Xr]===s)){for(i=0,u=re(t);u>i;i++)if((c=b(t[i]))&&kt(eo,c))return c;return new to(!1)}r=function(t,e){var n=arguments.length<2?$r(t):e;if(Ft(n))return wt(Rt(n,t));throw new Jr(Ct(t)+" is not iterable")}(t,o)}for(a=p?t.next:r.next;!(f=Rt(a,r)).done;){try{c=b(f.value)}catch(t){Qr(r,"throw",t)}if("object"==typeof c&&c&&kt(eo,c))return c}return new to(!1)};wn({target:"Object",stat:!0},{fromEntries:function(t){var e={};return no(t,(function(t,n){var r,o,i;r=e,o=t,i=n,Ot?Yt.f(r,o,Me(0,i)):r[o]=i}),{AS_ENTRIES:!0}),e}});var ro=m((function(){le(1)}));wn({target:"Object",stat:!0,forced:ro},{keys:function(t){return le(H(t))}});var oo=cr?{}.toString:function(){return"[object "+lr(this)+"]"};cr||on(Object.prototype,"toString",oo,{unsafe:!0});var io=String,uo=function(t){if("Symbol"===lr(t))throw new TypeError("Cannot convert a Symbol value to a string");return io(t)},co=E("".charAt),ao=E("".charCodeAt),fo=E("".slice),so=function(t){return function(e,n){var r,o,i=uo(L(e)),u=Zt(n),c=i.length;return u<0||u>=c?t?"":void 0:(r=ao(i,u))<55296||r>56319||u+1===c||(o=ao(i,u+1))<56320||o>57343?t?co(i,u):r:t?fo(i,u,u+2):o-56320+(r-55296<<10)+65536}},lo={codeAt:so(!1),charAt:so(!0)}.charAt,vo="String Iterator",po=Ve.set,ho=Ve.getterFor(vo);Kn(String,"String",(function(t){po(this,{type:vo,string:uo(t),index:0})}),(function(){var t,e=ho(this),n=e.string,r=e.index;return r>=n.length?Yn(void 0,!0):(t=lo(n,r),e.index+=t.length,Yn(t,!1))}));var yo=function(t,e,n){for(var r in e)on(t,r,e[r],n);return t},go=TypeError,bo=function(t,e){if(kt(e,t))return t;throw new go("Incorrect invocation")},mo=ht("iterator"),wo=!1;try{var Oo=0,So={next:function(){return{done:!!Oo++}},return:function(){wo=!0}};So[mo]=function(){return this},Array.from(So,(function(){throw 2}))}catch(t){}var jo=function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",u=G[t],c=u&&u.prototype,a=u,f={},s=function(t){var e=E(c[t]);on(c,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!gt(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!gt(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!gt(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(bn(t,!dt(u)||!(o||c.forEach&&!m((function(){(new u).entries().next()})))))a=n.getConstructor(e,t,r,i),Br.enable();else if(bn(t,!0)){var l=new a,v=l[i](o?{}:-0,1)!==l,p=m((function(){l.has(1)})),h=function(t,e){try{if(!e&&!wo)return!1}catch(t){return!1}var n=!1;try{var r={};r[mo]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){new u(t)})),y=!o&&m((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));h||((a=e((function(t,e){bo(t,c);var n=function(t,e,n){var r,o;return Dn&&dt(r=e.constructor)&&r!==n&>(o=r.prototype)&&o!==n.prototype&&Dn(t,o),t}(new u,t,a);return z(e)||no(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=c,c.constructor=a),(p||y)&&(s("delete"),s("has"),r&&s("get")),(y||v)&&s(i),o&&c.clear&&delete c.clear}return f[t]=a,wn({global:!0,constructor:!0,forced:a!==u},f),In(a,t),o||n.setStrong(a,t,r),a},Eo=Br.getWeakData,xo=Ve.set,Ao=Ve.getterFor,Po=Ar.find,Ro=Ar.findIndex,To=E([].splice),ko=0,zo=function(t){return t.frozen||(t.frozen=new Io)},Io=function(){this.entries=[]},Lo=function(t,e){return Po(t.entries,(function(t){return t[0]===e}))};Io.prototype={get:function(t){var e=Lo(this,t);if(e)return e[1]},has:function(t){return!!Lo(this,t)},set:function(t,e){var n=Lo(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Ro(this.entries,(function(e){return e[0]===t}));return~e&&To(this.entries,e,1),!!~e}};var Co,Mo={getConstructor:function(t,e,n,r){var o=t((function(t,o){bo(t,i),xo(t,{type:e,id:ko++,frozen:null}),z(o)||no(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=Ao(e),c=function(t,e,n){var r=u(t),o=Eo(wt(e),!0);return!0===o?zo(r).set(e,n):o[r.id]=n,t};return yo(i,{delete:function(t){var e=u(this);if(!gt(t))return!1;var n=Eo(t);return!0===n?zo(e).delete(t):n&&K(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!gt(t))return!1;var n=Eo(t);return!0===n?zo(e).has(t):n&&K(n,e.id)}}),yo(i,n?{get:function(t){var e=u(this);if(gt(t)){var n=Eo(t);if(!0===n)return zo(e).get(t);if(n)return n[e.id]}},set:function(t,e){return c(this,t,e)}}:{add:function(t){return c(this,t,!0)}}),o}},Fo=Ve.enforce,_o=Object,Do=Array.isArray,No=_o.isExtensible,Go=_o.isFrozen,Wo=_o.isSealed,Vo=_o.freeze,Bo=_o.seal,Uo=!G.ActiveXObject&&"ActiveXObject"in G,qo=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Ho=jo("WeakMap",qo,Mo),Xo=Ho.prototype,Ko=E(Xo.set);if(Ce)if(Uo){Co=Mo.getConstructor(qo,"WeakMap",!0),Br.enable();var Yo=E(Xo.delete),$o=E(Xo.has),Jo=E(Xo.get);yo(Xo,{delete:function(t){if(gt(t)&&!No(t)){var e=Fo(this);return e.frozen||(e.frozen=new Co),Yo(this,t)||e.frozen.delete(t)}return Yo(this,t)},has:function(t){if(gt(t)&&!No(t)){var e=Fo(this);return e.frozen||(e.frozen=new Co),$o(this,t)||e.frozen.has(t)}return $o(this,t)},get:function(t){if(gt(t)&&!No(t)){var e=Fo(this);return e.frozen||(e.frozen=new Co),$o(this,t)?Jo(this,t):e.frozen.get(t)}return Jo(this,t)},set:function(t,e){if(gt(t)&&!No(t)){var n=Fo(this);n.frozen||(n.frozen=new Co),$o(this,t)?Ko(this,t,e):n.frozen.set(t,e)}else Ko(this,t,e);return this}})}else Mr&&m((function(){var t=Vo([]);return Ko(new Ho,t,1),!Go(t)}))&&yo(Xo,{set:function(t,e){var n;return Do(t)&&(Go(t)?n=Vo:Wo(t)&&(n=Bo)),Ko(this,t,e),n&&n(t),this}});var Qo={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Zo=xt("span").classList,ti=Zo&&Zo.constructor&&Zo.constructor.prototype,ei=ti===Object.prototype?void 0:ti,ni=ht("iterator"),ri=tr.values,oi=function(t,e){if(t){if(t[ni]!==ri)try{Fe(t,ni,ri)}catch(e){t[ni]=ri}if(In(t,e,!0),Qo[e])for(var n in tr)if(t[n]!==tr[n])try{Fe(t,n,tr[n])}catch(e){t[n]=tr[n]}}};for(var ii in Qo)oi(G[ii]&&G[ii].prototype,ii);oi(ei,"DOMTokenList");var ui=function(){return ui=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ui.apply(this,arguments)};function ci(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}"function"==typeof SuppressedError&&SuppressedError;var ai=new WeakMap;function fi(t,e){if(!e.relativeSelection)return null;var n=ai.get(t.children);n||(n=new WeakMap,ai.set(t.children,n));var r=n.get(e);if(void 0===r)try{r=s(t.sharedRoot,t,e.relativeSelection),n.set(e,r)}catch(t){return null}return r}function si(t,e,n){var r,o,i=n.yOffset,u=n.xOffset,c=n.shouldGenerateOverlay,a=ci(p.edges(e),2),f=a[0],s=a[1],l=function(t,e){try{return v.toDOMRange(t,e)}catch(t){return null}}(t,e);if(!l)return{caretPosition:null,selectionRects:[]};var g=[],b=h.nodes(t,{at:e,match:function(t,e){return y.isText(t)&&(!c||c(t,e))}}),m=null,w=p.isBackward(e);try{for(var O=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(b),S=O.next();!S.done;S=O.next()){var j=ci(S.value,2),E=j[0],x=j[1],A=v.toDOMNode(t,E),P=d.equals(x,f.path),R=d.equals(x,s.path),T=null;if(P||R){var k=document.createRange();k.selectNode(A),P&&k.setStart(l.startContainer,l.startOffset),R&&k.setEnd(l.endContainer,l.endOffset),T=k.getClientRects()}else T=A.getClientRects();for(var z=w?P:R,I=0;I<T.length;I+=1){var L=T.item(I);if(L){var C=z&&(w?0===I:I===T.length-1),M=L.top-i,F=L.left-u;C&&(m={height:L.height,top:M,left:F+(w||p.isCollapsed(e)?0:L.width)}),g.push({width:L.width,height:L.height,top:M,left:F})}}}}catch(t){r={error:t}}finally{try{S&&!S.done&&(o=O.return)&&o.call(O)}finally{if(r)throw r.error}}return{selectionRects:g,caretPosition:m}}function li(){var t=b();return l.isCursorEditor(t)||console.warn("Cannot use useSyncExternalStore outside the context of a RemoteCursorEditor"),t}
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* use-sync-external-store-shim.production.min.js
|
|
@@ -7,7 +7,7 @@ import t,{createContext as e,useContext as n,useReducer as r,useRef as o,useEffe
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/
|
|
10
|
+
*/var vi="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},pi=t.useState,hi=t.useEffect,yi=t.useLayoutEffect,di=t.useDebugValue;function gi(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!vi(t,n)}catch(t){return!0}}var bi="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),r=pi({inst:{value:n,getSnapshot:e}}),o=r[0].inst,i=r[1];return yi((function(){o.value=n,o.getSnapshot=e,gi(o)&&i({inst:o})}),[t,n,e]),hi((function(){return gi(o)&&i({inst:o}),t((function(){gi(o)&&i({inst:o})}))}),[t]),di(n),n},mi={useSyncExternalStore:void 0!==t.useSyncExternalStore?t.useSyncExternalStore:bi};
|
|
11
11
|
/**
|
|
12
12
|
* @license React
|
|
13
13
|
* use-sync-external-store-shim.development.js
|
|
@@ -17,7 +17,7 @@ import t,{createContext as e,useContext as n,useReducer as r,useRef as o,useEffe
|
|
|
17
17
|
* This source code is licensed under the MIT license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
F((function(t,e){}));var wi=F((function(t){t.exports=mi}));
|
|
21
21
|
/**
|
|
22
22
|
* @license React
|
|
23
23
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
@@ -26,7 +26,7 @@ S((function(t,e){}));var z=S((function(t){t.exports=k}));
|
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the MIT license found in the
|
|
28
28
|
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/var
|
|
29
|
+
*/var Oi="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},Si=wi.useSyncExternalStore,ji=t.useRef,Ei=t.useEffect,xi=t.useMemo,Ai=t.useDebugValue,Pi={useSyncExternalStoreWithSelector:function(t,e,n,r,o){var i=ji(null);if(null===i.current){var u={hasValue:!1,value:null};i.current=u}else u=i.current;i=xi((function(){function t(t){if(!a){if(a=!0,i=t,t=r(t),void 0!==o&&u.hasValue){var e=u.value;if(o(e,t))return c=e}return c=t}if(e=c,Oi(i,t))return e;var n=r(t);return void 0!==o&&o(e,n)?e:(i=t,c=n)}var i,c,a=!1,f=void 0===n?null:n;return[function(){return t(e())},null===f?void 0:function(){return t(f())}]}),[e,n,r,o]);var c=Si(t,i[0],i[1]);return Ei((function(){u.hasValue=!0,u.value=c}),[c]),Ai(c),c}};
|
|
30
30
|
/**
|
|
31
31
|
* @license React
|
|
32
32
|
* use-sync-external-store-shim/with-selector.development.js
|
|
@@ -36,5 +36,5 @@ S((function(t,e){}));var z=S((function(t){t.exports=k}));
|
|
|
36
36
|
* This source code is licensed under the MIT license found in the
|
|
37
37
|
* LICENSE file in the root directory of this source tree.
|
|
38
38
|
*/
|
|
39
|
-
S((function(t,e){}));var N,G,W=S((function(t){t.exports=D})),V=function(t){try{return!!t()}catch(t){return!0}},B=!V((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),U=Function.prototype,q=U.call,H=B&&U.bind.bind(q,q),X=B?H:function(t){return function(){return q.apply(t,arguments)}},K=X({}.toString),Y=X("".slice),$=function(t){return Y(K(t),8,-1)},J=Object,Q=X("".split),Z=V((function(){return!J("z").propertyIsEnumerable(0)}))?function(t){return"String"===$(t)?Q(t,""):J(t)}:J,tt=function(t){return null==t},et=TypeError,nt=function(t){if(tt(t))throw new et("Can't call method on "+t);return t},rt=function(t){return Z(nt(t))},ot=function(t){return t&&t.Math===Math&&t},it=ot("object"==typeof globalThis&&globalThis)||ot("object"==typeof window&&window)||ot("object"==typeof self&&self)||ot("object"==typeof O&&O)||ot("object"==typeof O&&O)||function(){return this}()||Function("return this")(),ut=Object.defineProperty,ct=function(t,e){try{ut(it,t,{value:e,configurable:!0,writable:!0})}catch(n){it[t]=e}return e},at=S((function(t){var e="__core-js_shared__",n=t.exports=it[e]||ct(e,{});(n.versions||(n.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),ft=function(t,e){return at[t]||(at[t]=e||{})},st=Object,lt=function(t){return st(nt(t))},vt=X({}.hasOwnProperty),pt=Object.hasOwn||function(t,e){return vt(lt(t),e)},ht=0,yt=Math.random(),dt=X(1..toString),gt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+dt(++ht+yt,36)},bt=it.navigator,mt=bt&&bt.userAgent,wt=mt?String(mt):"",Ot=it.process,St=it.Deno,jt=Ot&&Ot.versions||St&&St.version,Et=jt&&jt.v8;Et&&(G=(N=Et.split("."))[0]>0&&N[0]<4?1:+(N[0]+N[1])),!G&&wt&&(!(N=wt.match(/Edge\/(\d+)/))||N[1]>=74)&&(N=wt.match(/Chrome\/(\d+)/))&&(G=+N[1]);var xt,At=G,Pt=it.String,Rt=!!Object.getOwnPropertySymbols&&!V((function(){var t=Symbol("symbol detection");return!Pt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&At&&At<41})),Tt=Rt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,kt=it.Symbol,zt=ft("wks"),It=Tt?kt.for||kt:kt&&kt.withoutSetter||gt,Lt=function(t){return pt(zt,t)||(zt[t]=Rt&&pt(kt,t)?kt[t]:It("Symbol."+t)),zt[t]},Ct="object"==typeof document&&document.all,Mt=void 0===Ct&&void 0!==Ct?function(t){return"function"==typeof t||t===Ct}:function(t){return"function"==typeof t},Ft=function(t){return"object"==typeof t?null!==t:Mt(t)},_t=String,Dt=TypeError,Nt=function(t){if(Ft(t))return t;throw new Dt(_t(t)+" is not an object")},Gt=!V((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),Wt=Gt&&V((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Vt=it.document,Bt=Ft(Vt)&&Ft(Vt.createElement),Ut=function(t){return Bt?Vt.createElement(t):{}},qt=!Gt&&!V((function(){return 7!==Object.defineProperty(Ut("div"),"a",{get:function(){return 7}}).a})),Ht=Function.prototype.call,Xt=B?Ht.bind(Ht):function(){return Ht.apply(Ht,arguments)},Kt=function(t,e){return arguments.length<2?(n=it[t],Mt(n)?n:void 0):it[t]&&it[t][e];var n},Yt=X({}.isPrototypeOf),$t=Object,Jt=Tt?function(t){return"symbol"==typeof t}:function(t){var e=Kt("Symbol");return Mt(e)&&Yt(e.prototype,$t(t))},Qt=String,Zt=function(t){try{return Qt(t)}catch(t){return"Object"}},te=TypeError,ee=function(t){if(Mt(t))return t;throw new te(Zt(t)+" is not a function")},ne=function(t,e){var n=t[e];return tt(n)?void 0:ee(n)},re=TypeError,oe=TypeError,ie=Lt("toPrimitive"),ue=function(t,e){if(!Ft(t)||Jt(t))return t;var n,r=ne(t,ie);if(r){if(void 0===e&&(e="default"),n=Xt(r,t,e),!Ft(n)||Jt(n))return n;throw new oe("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&Mt(n=t.toString)&&!Ft(r=Xt(n,t)))return r;if(Mt(n=t.valueOf)&&!Ft(r=Xt(n,t)))return r;if("string"!==e&&Mt(n=t.toString)&&!Ft(r=Xt(n,t)))return r;throw new re("Can't convert object to primitive value")}(t,e)},ce=function(t){var e=ue(t,"string");return Jt(e)?e:e+""},ae=TypeError,fe=Object.defineProperty,se=Object.getOwnPropertyDescriptor,le="enumerable",ve="configurable",pe="writable",he={f:Gt?Wt?function(t,e,n){if(Nt(t),e=ce(e),Nt(n),"function"==typeof t&&"prototype"===e&&"value"in n&&pe in n&&!n[pe]){var r=se(t,e);r&&r[pe]&&(t[e]=n.value,n={configurable:ve in n?n[ve]:r[ve],enumerable:le in n?n[le]:r[le],writable:!1})}return fe(t,e,n)}:fe:function(t,e,n){if(Nt(t),e=ce(e),Nt(n),qt)try{return fe(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new ae("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},ye=Math.ceil,de=Math.floor,ge=Math.trunc||function(t){var e=+t;return(e>0?de:ye)(e)},be=function(t){var e=+t;return e!=e||0===e?0:ge(e)},me=Math.max,we=Math.min,Oe=Math.min,Se=function(t){return e=t.length,(n=be(e))>0?Oe(n,9007199254740991):0;var e,n},je=function(t){return function(e,n,r){var o=rt(e),i=Se(o);if(0===i)return!t&&-1;var u,c=function(t,e){var n=be(t);return n<0?me(n+e,0):we(n,e)}(r,i);if(t&&n!=n){for(;i>c;)if((u=o[c++])!=u)return!0}else for(;i>c;c++)if((t||c in o)&&o[c]===n)return t||c||0;return!t&&-1}},Ee={includes:je(!0),indexOf:je(!1)},xe={},Ae=Ee.indexOf,Pe=X([].push),Re=function(t,e){var n,r=rt(t),o=0,i=[];for(n in r)!pt(xe,n)&&pt(r,n)&&Pe(i,n);for(;e.length>o;)pt(r,n=e[o++])&&(~Ae(i,n)||Pe(i,n));return i},Te=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ke=Object.keys||function(t){return Re(t,Te)},ze=Gt&&!Wt?Object.defineProperties:function(t,e){Nt(t);for(var n,r=rt(e),o=ke(e),i=o.length,u=0;i>u;)he.f(t,n=o[u++],r[n]);return t},Ie={f:ze},Le=Kt("document","documentElement"),Ce=ft("keys"),Me=function(t){return Ce[t]||(Ce[t]=gt(t))},Fe="prototype",_e="script",De=Me("IE_PROTO"),Ne=function(){},Ge=function(t){return"<"+_e+">"+t+"</"+_e+">"},We=function(t){t.write(Ge("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ve=function(){try{xt=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Ve="undefined"!=typeof document?document.domain&&xt?We(xt):(e=Ut("iframe"),n="java"+_e+":",e.style.display="none",Le.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(Ge("document.F=Object")),t.close(),t.F):We(xt);for(var r=Te.length;r--;)delete Ve[Fe][Te[r]];return Ve()};xe[De]=!0;var Be=Object.create||function(t,e){var n;return null!==t?(Ne[Fe]=Nt(t),n=new Ne,Ne[Fe]=null,n[De]=t):n=Ve(),void 0===e?n:Ie.f(n,e)},Ue=he.f,qe=Lt("unscopables"),He=Array.prototype;void 0===He[qe]&&Ue(He,qe,{configurable:!0,value:Be(null)});var Xe,Ke,Ye,$e=function(t){He[qe][t]=!0},Je={},Qe=it.WeakMap,Ze=Mt(Qe)&&/native code/.test(String(Qe)),tn=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},en=Gt?function(t,e,n){return he.f(t,e,tn(1,n))}:function(t,e,n){return t[e]=n,t},nn="Object already initialized",rn=it.TypeError,on=it.WeakMap;if(Ze||at.state){var un=at.state||(at.state=new on);un.get=un.get,un.has=un.has,un.set=un.set,Xe=function(t,e){if(un.has(t))throw new rn(nn);return e.facade=t,un.set(t,e),e},Ke=function(t){return un.get(t)||{}},Ye=function(t){return un.has(t)}}else{var cn=Me("state");xe[cn]=!0,Xe=function(t,e){if(pt(t,cn))throw new rn(nn);return e.facade=t,en(t,cn,e),e},Ke=function(t){return pt(t,cn)?t[cn]:{}},Ye=function(t){return pt(t,cn)}}var an={set:Xe,get:Ke,has:Ye,enforce:function(t){return Ye(t)?Ke(t):Xe(t,{})},getterFor:function(t){return function(e){var n;if(!Ft(e)||(n=Ke(e)).type!==t)throw new rn("Incompatible receiver, "+t+" required");return n}}},fn={}.propertyIsEnumerable,sn=Object.getOwnPropertyDescriptor,ln={f:sn&&!fn.call({1:2},1)?function(t){var e=sn(this,t);return!!e&&e.enumerable}:fn},vn=Object.getOwnPropertyDescriptor,pn={f:Gt?vn:function(t,e){if(t=rt(t),e=ce(e),qt)try{return vn(t,e)}catch(t){}if(pt(t,e))return tn(!Xt(ln.f,t,e),t[e])}},hn=Function.prototype,yn=Gt&&Object.getOwnPropertyDescriptor,dn=pt(hn,"name"),gn={EXISTS:dn,PROPER:dn&&"something"===function(){}.name,CONFIGURABLE:dn&&(!Gt||Gt&&yn(hn,"name").configurable)},bn=X(Function.toString);Mt(at.inspectSource)||(at.inspectSource=function(t){return bn(t)});var mn,wn,On,Sn=at.inspectSource,jn=S((function(t){var e=gn.CONFIGURABLE,n=an.enforce,r=an.get,o=String,i=Object.defineProperty,u=X("".slice),c=X("".replace),a=X([].join),f=Gt&&!V((function(){return 8!==i((function(){}),"length",{value:8}).length})),s=String(String).split("String"),l=t.exports=function(t,r,l){"Symbol("===u(o(r),0,7)&&(r="["+c(o(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),l&&l.getter&&(r="get "+r),l&&l.setter&&(r="set "+r),(!pt(t,"name")||e&&t.name!==r)&&(Gt?i(t,"name",{value:r,configurable:!0}):t.name=r),f&&l&&pt(l,"arity")&&t.length!==l.arity&&i(t,"length",{value:l.arity});try{l&&pt(l,"constructor")&&l.constructor?Gt&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var v=n(t);return pt(v,"source")||(v.source=a(s,"string"==typeof r?r:"")),t};Function.prototype.toString=l((function(){return Mt(this)&&r(this).source||Sn(this)}),"toString")})),En=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(Mt(n)&&jn(n,i,r),r.global)o?t[e]=n:ct(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:he.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},xn=Te.concat("length","prototype"),An={f:Object.getOwnPropertyNames||function(t){return Re(t,xn)}},Pn={f:Object.getOwnPropertySymbols},Rn=X([].concat),Tn=Kt("Reflect","ownKeys")||function(t){var e=An.f(Nt(t)),n=Pn.f;return n?Rn(e,n(t)):e},kn=function(t,e,n){for(var r=Tn(e),o=he.f,i=pn.f,u=0;u<r.length;u++){var c=r[u];pt(t,c)||n&&pt(n,c)||o(t,c,i(e,c))}},zn=/#|\.prototype\./,In=function(t,e){var n=Cn[Ln(t)];return n===Fn||n!==Mn&&(Mt(e)?V(e):!!e)},Ln=In.normalize=function(t){return String(t).replace(zn,".").toLowerCase()},Cn=In.data={},Mn=In.NATIVE="N",Fn=In.POLYFILL="P",_n=In,Dn=pn.f,Nn=function(t,e){var n,r,o,i,u,c=t.target,a=t.global,f=t.stat;if(n=a?it:f?it[c]||ct(c,{}):it[c]&&it[c].prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=Dn(n,r))&&u.value:n[r],!_n(a?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;kn(i,o)}(t.sham||o&&o.sham)&&en(i,"sham",!0),En(n,r,i,t)}},Gn=!V((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Wn=Me("IE_PROTO"),Vn=Object,Bn=Vn.prototype,Un=Gn?Vn.getPrototypeOf:function(t){var e=lt(t);if(pt(e,Wn))return e[Wn];var n=e.constructor;return Mt(n)&&e instanceof n?n.prototype:e instanceof Vn?Bn:null},qn=Lt("iterator"),Hn=!1;[].keys&&("next"in(On=[].keys())?(wn=Un(Un(On)))!==Object.prototype&&(mn=wn):Hn=!0);var Xn=!Ft(mn)||V((function(){var t={};return mn[qn].call(t)!==t}));Xn&&(mn={}),Mt(mn[qn])||En(mn,qn,(function(){return this}));var Kn={IteratorPrototype:mn,BUGGY_SAFARI_ITERATORS:Hn},Yn=he.f,$n=Lt("toStringTag"),Jn=function(t,e,n){t&&!n&&(t=t.prototype),t&&!pt(t,$n)&&Yn(t,$n,{configurable:!0,value:e})},Qn=Kn.IteratorPrototype,Zn=function(){return this},tr=String,er=TypeError,nr=function(t){if(function(t){return Ft(t)||null===t}(t))return t;throw new er("Can't set "+tr(t)+" as a prototype")},rr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=function(t,e,n){try{return X(ee(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return nt(n),nr(r),Ft(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),or=gn.PROPER,ir=gn.CONFIGURABLE,ur=Kn.IteratorPrototype,cr=Kn.BUGGY_SAFARI_ITERATORS,ar=Lt("iterator"),fr="keys",sr="values",lr="entries",vr=function(){return this},pr=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=Be(Qn,{next:tn(+!r,n)}),Jn(t,o,!1),Je[o]=Zn}(n,e,r);var c,a,f,s=function(t){if(t===o&&y)return y;if(!cr&&t&&t in p)return p[t];switch(t){case fr:case sr:case lr:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",v=!1,p=t.prototype,h=p[ar]||p["@@iterator"]||o&&p[o],y=!cr&&h||s(o),d="Array"===e&&p.entries||h;if(d&&(c=Un(d.call(new t)))!==Object.prototype&&c.next&&(Un(c)!==ur&&(rr?rr(c,ur):Mt(c[ar])||En(c,ar,vr)),Jn(c,l,!0)),or&&o===sr&&h&&h.name!==sr&&(ir?en(p,"name",sr):(v=!0,y=function(){return Xt(h,this)})),o)if(a={values:s(sr),keys:i?y:s(fr),entries:s(lr)},u)for(f in a)(cr||v||!(f in p))&&En(p,f,a[f]);else Nn({target:e,proto:!0,forced:cr||v},a);return p[ar]!==y&&En(p,ar,y,{name:o}),Je[e]=y,a},hr=function(t,e){return{value:t,done:e}},yr=he.f,dr="Array Iterator",gr=an.set,br=an.getterFor(dr),mr=pr(Array,"Array",(function(t,e){gr(this,{type:dr,target:rt(t),index:0,kind:e})}),(function(){var t=br(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,hr(void 0,!0);switch(t.kind){case"keys":return hr(n,!1);case"values":return hr(e[n],!1)}return hr([n,e[n]],!1)}),"values"),wr=Je.Arguments=Je.Array;if($e("keys"),$e("values"),$e("entries"),Gt&&"values"!==wr.name)try{yr(wr,"name",{value:"values"})}catch(t){}var Or={};Or[Lt("toStringTag")]="z";var Sr="[object z]"===String(Or),jr=Lt("toStringTag"),Er=Object,xr="Arguments"===$(function(){return arguments}()),Ar=Sr?$:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Er(t),jr))?n:xr?$(e):"Object"===(r=$(e))&&Mt(e.callee)?"Arguments":r},Pr=Sr?{}.toString:function(){return"[object "+Ar(this)+"]"};Sr||En(Object.prototype,"toString",Pr,{unsafe:!0});var Rr=String,Tr=function(t){if("Symbol"===Ar(t))throw new TypeError("Cannot convert a Symbol value to a string");return Rr(t)},kr=function(){var t=Nt(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},zr=RegExp.prototype,Ir=gn.PROPER,Lr="toString",Cr=RegExp.prototype,Mr=Cr[Lr],Fr=V((function(){return"/a/b"!==Mr.call({source:"a",flags:"b"})})),_r=Ir&&Mr.name!==Lr;(Fr||_r)&&En(Cr,Lr,(function(){var t=Nt(this),e=Tr(t.source),n=Tr(function(t){var e=t.flags;return void 0!==e||"flags"in zr||pt(t,"flags")||!Yt(zr,t)?e:Xt(kr,t)}(t));return"/"+e+"/"+n}),{unsafe:!0});var Dr=X([].slice),Nr=An.f,Gr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Wr={f:function(t){return Gr&&"Window"===$(t)?function(t){try{return Nr(t)}catch(t){return Dr(Gr)}}(t):Nr(rt(t))}},Vr=V((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Br=Object.isExtensible,Ur=V((function(){Br(1)}))||Vr?function(t){return!!Ft(t)&&((!Vr||"ArrayBuffer"!==$(t))&&(!Br||Br(t)))}:Br,qr=!V((function(){return Object.isExtensible(Object.preventExtensions({}))})),Hr=S((function(t){var e=he.f,n=!1,r=gt("meta"),o=0,i=function(t){e(t,r,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},n=!0;var t=An.f,e=X([].splice),o={};o[r]=1,t(o).length&&(An.f=function(n){for(var o=t(n),i=0,u=o.length;i<u;i++)if(o[i]===r){e(o,i,1);break}return o},Nn({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Wr.f}))},fastKey:function(t,e){if(!Ft(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!pt(t,r)){if(!Ur(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!pt(t,r)){if(!Ur(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return qr&&n&&Ur(t)&&!pt(t,r)&&i(t),t}};xe[r]=!0})),Xr=function(t){if("Function"===$(t))return X(t)},Kr=Xr(Xr.bind),Yr=function(t,e){return ee(t),void 0===e?t:B?Kr(t,e):function(){return t.apply(e,arguments)}},$r=Lt("iterator"),Jr=Array.prototype,Qr=Lt("iterator"),Zr=function(t){if(!tt(t))return ne(t,Qr)||ne(t,"@@iterator")||Je[Ar(t)]},to=TypeError,eo=function(t,e,n){var r,o;Nt(t);try{if(!(r=ne(t,"return"))){if("throw"===e)throw n;return n}r=Xt(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Nt(r),n},no=TypeError,ro=function(t,e){this.stopped=t,this.result=e},oo=ro.prototype,io=function(t,e,n){var r,o,i,u,c,a,f,s,l=n&&n.that,v=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),y=!(!n||!n.INTERRUPTED),d=Yr(e,l),g=function(t){return r&&eo(r,"normal",t),new ro(!0,t)},b=function(t){return v?(Nt(t),y?d(t[0],t[1],g):d(t[0],t[1])):y?d(t,g):d(t)};if(p)r=t.iterator;else if(h)r=t;else{if(!(o=Zr(t)))throw new no(Zt(t)+" is not iterable");if(void 0!==(s=o)&&(Je.Array===s||Jr[$r]===s)){for(i=0,u=Se(t);u>i;i++)if((c=b(t[i]))&&Yt(oo,c))return c;return new ro(!1)}r=function(t,e){var n=arguments.length<2?Zr(t):e;if(ee(n))return Nt(Xt(n,t));throw new to(Zt(t)+" is not iterable")}(t,o)}for(a=p?t.next:r.next;!(f=Xt(a,r)).done;){try{c=b(f.value)}catch(t){eo(r,"throw",t)}if("object"==typeof c&&c&&Yt(oo,c))return c}return new ro(!1)},uo=TypeError,co=function(t,e){if(Yt(e,t))return t;throw new uo("Incorrect invocation")},ao=Lt("iterator"),fo=!1;try{var so=0,lo={next:function(){return{done:!!so++}},return:function(){fo=!0}};lo[ao]=function(){return this},Array.from(lo,(function(){throw 2}))}catch(t){}var vo=function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",u=it[t],c=u&&u.prototype,a=u,f={},s=function(t){var e=X(c[t]);En(c,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!Ft(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!Ft(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!Ft(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(_n(t,!Mt(u)||!(o||c.forEach&&!V((function(){(new u).entries().next()})))))a=n.getConstructor(e,t,r,i),Hr.enable();else if(_n(t,!0)){var l=new a,v=l[i](o?{}:-0,1)!==l,p=V((function(){l.has(1)})),h=function(t,e){try{if(!e&&!fo)return!1}catch(t){return!1}var n=!1;try{var r={};r[ao]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){new u(t)})),y=!o&&V((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));h||((a=e((function(t,e){co(t,c);var n=function(t,e,n){var r,o;return rr&&Mt(r=e.constructor)&&r!==n&&Ft(o=r.prototype)&&o!==n.prototype&&rr(t,o),t}(new u,t,a);return tt(e)||io(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=c,c.constructor=a),(p||y)&&(s("delete"),s("has"),r&&s("get")),(y||v)&&s(i),o&&c.clear&&delete c.clear}return f[t]=a,Nn({global:!0,constructor:!0,forced:a!==u},f),Jn(a,t),o||n.setStrong(a,t,r),a},po=function(t,e,n){return n.get&&jn(n.get,e,{getter:!0}),n.set&&jn(n.set,e,{setter:!0}),he.f(t,e,n)},ho=function(t,e,n){for(var r in e)En(t,r,e[r],n);return t},yo=Lt("species"),go=Hr.fastKey,bo=an.set,mo=an.getterFor,wo={getConstructor:function(t,e,n,r){var o=t((function(t,o){co(t,i),bo(t,{type:e,index:Be(null),first:null,last:null,size:0}),Gt||(t.size=0),tt(o)||io(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=mo(e),c=function(t,e,n){var r,o,i=u(t),c=a(t,e);return c?c.value=n:(i.last=c={index:o=go(e,!0),key:e,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=c),r&&(r.next=c),Gt?i.size++:t.size++,"F"!==o&&(i.index[o]=c)),t},a=function(t,e){var n,r=u(t),o=go(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===e)return n};return ho(i,{clear:function(){for(var t=u(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=Be(null),Gt?t.size=0:this.size=0},delete:function(t){var e=this,n=u(e),r=a(e,t);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first===r&&(n.first=o),n.last===r&&(n.last=i),Gt?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=u(this),r=Yr(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!a(this,t)}}),ho(i,n?{get:function(t){var e=a(this,t);return e&&e.value},set:function(t,e){return c(this,0===t?0:t,e)}}:{add:function(t){return c(this,t=0===t?0:t,t)}}),Gt&&po(i,"size",{configurable:!0,get:function(){return u(this).size}}),o},setStrong:function(t,e,n){var r=e+" Iterator",o=mo(e),i=mo(r);pr(t,e,(function(t,e){bo(this,{type:r,target:t,state:o(t),kind:e,last:null})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?hr("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=null,hr(void 0,!0))}),n?"entries":"values",!n,!0),function(t){var e=Kt(t);Gt&&e&&!e[yo]&&po(e,yo,{configurable:!0,get:function(){return this}})}(e)}};vo("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),wo);var Oo=X("".charAt),So=X("".charCodeAt),jo=X("".slice),Eo=function(t){return function(e,n){var r,o,i=Tr(nt(e)),u=be(n),c=i.length;return u<0||u>=c?t?"":void 0:(r=So(i,u))<55296||r>56319||u+1===c||(o=So(i,u+1))<56320||o>57343?t?Oo(i,u):r:t?jo(i,u,u+2):o-56320+(r-55296<<10)+65536}},xo={codeAt:Eo(!1),charAt:Eo(!0)}.charAt,Ao="String Iterator",Po=an.set,Ro=an.getterFor(Ao);pr(String,"String",(function(t){Po(this,{type:Ao,string:Tr(t),index:0})}),(function(){var t,e=Ro(this),n=e.string,r=e.index;return r>=n.length?hr(void 0,!0):(t=xo(n,r),e.index+=t.length,hr(t,!1))}));var To=Array.isArray||function(t){return"Array"===$(t)},ko=function(){},zo=Kt("Reflect","construct"),Io=/^\s*(?:class|function)\b/,Lo=X(Io.exec),Co=!Io.test(ko),Mo=function(t){if(!Mt(t))return!1;try{return zo(ko,[],t),!0}catch(t){return!1}},Fo=function(t){if(!Mt(t))return!1;switch(Ar(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Co||!!Lo(Io,Sn(t))}catch(t){return!0}};Fo.sham=!0;var _o=!zo||V((function(){var t;return Mo(Mo.call)||!Mo(Object)||!Mo((function(){t=!0}))||t}))?Fo:Mo,Do=Lt("species"),No=Array,Go=function(t,e){return new(function(t){var e;return To(t)&&(e=t.constructor,(_o(e)&&(e===No||To(e.prototype))||Ft(e)&&null===(e=e[Do]))&&(e=void 0)),void 0===e?No:e}(t))(0===e?0:e)},Wo=X([].push),Vo=function(t){var e=1===t,n=2===t,r=3===t,o=4===t,i=6===t,u=7===t,c=5===t||i;return function(a,f,s,l){for(var v,p,h=lt(a),y=Z(h),d=Se(y),g=Yr(f,s),b=0,m=l||Go,w=e?m(a,d):n||u?m(a,0):void 0;d>b;b++)if((c||b in y)&&(p=g(v=y[b],b,h),t))if(e)w[b]=p;else if(p)switch(t){case 3:return!0;case 5:return v;case 6:return b;case 2:Wo(w,v)}else switch(t){case 4:return!1;case 7:Wo(w,v)}return i?-1:r||o?o:w}},Bo={forEach:Vo(0),map:Vo(1),filter:Vo(2),some:Vo(3),every:Vo(4),find:Vo(5),findIndex:Vo(6),filterReject:Vo(7)},Uo=Hr.getWeakData,qo=an.set,Ho=an.getterFor,Xo=Bo.find,Ko=Bo.findIndex,Yo=X([].splice),$o=0,Jo=function(t){return t.frozen||(t.frozen=new Qo)},Qo=function(){this.entries=[]},Zo=function(t,e){return Xo(t.entries,(function(t){return t[0]===e}))};Qo.prototype={get:function(t){var e=Zo(this,t);if(e)return e[1]},has:function(t){return!!Zo(this,t)},set:function(t,e){var n=Zo(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Ko(this.entries,(function(e){return e[0]===t}));return~e&&Yo(this.entries,e,1),!!~e}};var ti,ei={getConstructor:function(t,e,n,r){var o=t((function(t,o){co(t,i),qo(t,{type:e,id:$o++,frozen:null}),tt(o)||io(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=Ho(e),c=function(t,e,n){var r=u(t),o=Uo(Nt(e),!0);return!0===o?Jo(r).set(e,n):o[r.id]=n,t};return ho(i,{delete:function(t){var e=u(this);if(!Ft(t))return!1;var n=Uo(t);return!0===n?Jo(e).delete(t):n&&pt(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!Ft(t))return!1;var n=Uo(t);return!0===n?Jo(e).has(t):n&&pt(n,e.id)}}),ho(i,n?{get:function(t){var e=u(this);if(Ft(t)){var n=Uo(t);if(!0===n)return Jo(e).get(t);if(n)return n[e.id]}},set:function(t,e){return c(this,t,e)}}:{add:function(t){return c(this,t,!0)}}),o}},ni=an.enforce,ri=Object,oi=Array.isArray,ii=ri.isExtensible,ui=ri.isFrozen,ci=ri.isSealed,ai=ri.freeze,fi=ri.seal,si=!it.ActiveXObject&&"ActiveXObject"in it,li=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},vi=vo("WeakMap",li,ei),pi=vi.prototype,hi=X(pi.set);if(Ze)if(si){ti=ei.getConstructor(li,"WeakMap",!0),Hr.enable();var yi=X(pi.delete),di=X(pi.has),gi=X(pi.get);ho(pi,{delete:function(t){if(Ft(t)&&!ii(t)){var e=ni(this);return e.frozen||(e.frozen=new ti),yi(this,t)||e.frozen.delete(t)}return yi(this,t)},has:function(t){if(Ft(t)&&!ii(t)){var e=ni(this);return e.frozen||(e.frozen=new ti),di(this,t)||e.frozen.has(t)}return di(this,t)},get:function(t){if(Ft(t)&&!ii(t)){var e=ni(this);return e.frozen||(e.frozen=new ti),di(this,t)?gi(this,t):e.frozen.get(t)}return gi(this,t)},set:function(t,e){if(Ft(t)&&!ii(t)){var n=ni(this);n.frozen||(n.frozen=new ti),di(this,t)?hi(this,t,e):n.frozen.set(t,e)}else hi(this,t,e);return this}})}else qr&&V((function(){var t=ai([]);return hi(new vi,t,1),!ui(t)}))&&ho(pi,{set:function(t,e){var n;return oi(t)&&(ui(t)?n=ai:ci(t)&&(n=fi)),hi(this,t,e),n&&n(t),this}});var bi,mi,wi={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Oi=Ut("span").classList,Si=Oi&&Oi.constructor&&Oi.constructor.prototype,ji=Si===Object.prototype?void 0:Si,Ei=Bo.forEach,xi=!!(mi=[]["forEach"])&&V((function(){mi.call(null,bi||function(){return 1},1)}))?[].forEach:function(t){return Ei(this,t,arguments.length>1?arguments[1]:void 0)},Ai=function(t){if(t&&t.forEach!==xi)try{en(t,"forEach",xi)}catch(e){t.forEach=xi}};for(var Pi in wi)wi[Pi]&&Ai(it[Pi]&&it[Pi].prototype);Ai(ji);var Ri=Lt("iterator"),Ti=mr.values,ki=function(t,e){if(t){if(t[Ri]!==Ti)try{en(t,Ri,Ti)}catch(e){t[Ri]=Ti}if(Jn(t,e,!0),wi[e])for(var n in mr)if(t[n]!==mr[n])try{en(t,n,mr[n])}catch(e){t[n]=mr[n]}}};for(var zi in wi)ki(it[zi]&&it[zi].prototype,zi);function Ii(){var t=b();return s.isCursorEditor(t)||console.warn("Cannot use useSyncExternalStore outside the context of a RemoteCursorEditor"),t}ki(ji,"DOMTokenList");var Li=new WeakMap;function Ci(t){var e=Li.get(t);if(e)return e;var n=function(t){var e={},n=new Set,r=n.add.bind(n),o=new Set,i=null;return[function(e){return o.add(e),i||(i=function(t){t.added.forEach(r),t.removed.forEach(r),t.updated.forEach(r),o.forEach((function(t){return t()}))},s.on(t,"change",i)),function(){o.delete(e),i&&0===o.size&&(s.off(t,"change",i),i=null)}},function(){return 0===n.size?e:(n.forEach((function(n){var r=s.cursorState(t,n);null!==r?e[n]=r:delete e[n.toString()]})),n.clear(),e=m({},e))}]}(t);return t&&Li.set(t,n),n}function Mi(){return Ci(Ii())}function Fi(){var t=w(Mi(),2),e=t[0],n=t[1];return z.useSyncExternalStore(e,n)}function _i(t,e){var n=w(Mi(),2),r=n[0],o=n[1];return W.useSyncExternalStoreWithSelector(r,o,null,t,e)}var Di=new WeakMap;function Ni(t,e){if(!e.relativeSelection)return null;var n=Di.get(t.children);n||(n=new WeakMap,Di.set(t.children,n));var r=n.get(e);if(void 0===r)try{r=l(t.sharedRoot,t,e.relativeSelection),n.set(e,r)}catch(t){return null}return r}var Gi=Lt("species"),Wi=Bo.map,Vi=function(t){return At>=51||!V((function(){var e=[];return(e.constructor={})[Gi]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("map");Nn({target:"Array",proto:!0,forced:!Vi},{map:function(t){return Wi(this,t,arguments.length>1?arguments[1]:void 0)}});var Bi=X(ln.f),Ui=X([].push),qi=Gt&&V((function(){var t=Object.create(null);return t[2]=2,!Bi(t,2)})),Hi=function(t){return function(e){for(var n,r=rt(e),o=ke(r),i=qi&&null===Un(r),u=o.length,c=0,a=[];u>c;)n=o[c++],Gt&&!(i?n in r:Bi(r,n))||Ui(a,t?[n,r[n]]:r[n]);return a}},Xi={entries:Hi(!0),values:Hi(!1)}.entries;Nn({target:"Object",stat:!0},{entries:function(t){return Xi(t)}});var Ki=Hr.onFreeze,Yi=Object.freeze,$i=V((function(){Yi(1)}));Nn({target:"Object",stat:!0,forced:$i,sham:!qr},{freeze:function(t){return Yi&&Ft(t)?Yi(Ki(t)):t}});Nn({target:"Object",stat:!0},{fromEntries:function(t){var e={};return io(t,(function(t,n){var r,o,i;r=e,o=t,i=n,Gt?he.f(r,o,tn(0,i)):r[o]=i}),{AS_ENTRIES:!0}),e}});var Ji=V((function(){ke(1)}));function Qi(t,e,n){var r,o,i=n.yOffset,u=n.xOffset,c=n.shouldGenerateOverlay,a=w(v.edges(e),2),f=a[0],s=a[1],l=function(t,e){try{return d.toDOMRange(t,e)}catch(t){return null}}(t,e);if(!l)return{caretPosition:null,selectionRects:[]};var g=[],b=p.nodes(t,{at:e,match:function(t,e){return h.isText(t)&&(!c||c(t,e))}}),m=null,O=v.isBackward(e);try{for(var S=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(b),j=S.next();!j.done;j=S.next()){var E=w(j.value,2),x=E[0],A=E[1],P=d.toDOMNode(t,x),R=y.equals(A,f.path),T=y.equals(A,s.path),k=null;if(R||T){var z=document.createRange();z.selectNode(P),R&&z.setStart(l.startContainer,l.startOffset),T&&z.setEnd(l.endContainer,l.endOffset),k=z.getClientRects()}else k=P.getClientRects();for(var I=O?R:T,L=0;L<k.length;L++){var C=k.item(L);if(C){var M=I&&(O?0===L:L===k.length-1),F=C.top-i,_=C.left-u;M&&(m={height:C.height,top:F,left:_+(O||v.isCollapsed(e)?0:C.width)}),g.push({width:C.width,height:C.height,top:F,left:_})}}}}catch(t){r={error:t}}finally{try{j&&!j.done&&(o=S.return)&&o.call(S)}finally{if(r)throw r.error}}return{selectionRects:g,caretPosition:m}}Nn({target:"Object",stat:!0,forced:Ji},{keys:function(t){return ke(lt(t))}});var Zi=Object.freeze([]);function tu(t){var e;void 0===t&&(t={});var n,s,l,v=t.containerRef,p=t.shouldGenerateOverlay,h=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(t,["containerRef","shouldGenerateOverlay"]),y=Ii(),d=Fi(),g=(n=w(r((function(t){return t+1}),0),2)[1],s=o(null),i(l=function(){s.current&&(cancelAnimationFrame(s.current),s.current=0)}),i((function(){return l}),[]),u((function(t){void 0===t&&(t=!1),t?n():s.current||(s.current=requestAnimationFrame(n))}),[])),b=o(new WeakMap),O=w(c({}),2),S=O[0],j=O[1],E=!("refreshOnResize"in h)||(null===(e=h.refreshOnResize)||void 0===e||e);!function(t,e){var n=o(e);n.current=e;var r=w(c((function(){return new ResizeObserver((function(){n.current()}))})),1)[0];i((function(){if(null==t?void 0:t.current){var e=t.current;return r.observe(e),function(){return r.unobserve(e)}}}),[r,t])}(E?v:void 0,(function(){b.current=new WeakMap,g("debounced"!==E)})),a((function(){var t,e,n;if(!v||v.current){var r=null===(t=null==v?void 0:v.current)||void 0===t?void 0:t.getBoundingClientRect(),o=null!==(e=null==r?void 0:r.x)&&void 0!==e?e:0,i=null!==(n=null==r?void 0:r.y)&&void 0!==n?n:0,u=Object.keys(S).length!==Object.keys(d).length,c=Object.fromEntries(Object.entries(d).map((function(t){var e=w(t,2),n=e[0],r=e[1],c=r.relativeSelection&&Ni(y,r);if(!c)return[n,Zi];var a=b.current.get(c);if(a)return[n,a];var f=Qi(y,c,{xOffset:o,yOffset:i,shouldGenerateOverlay:p});return u=!0,b.current.set(c,f),[n,f]})));u&&j(c)}}));var x=f((function(){return Object.entries(d).map((function(t){var e,n,r=w(t,2),o=r[0],i=r[1],u=i.relativeSelection&&Ni(y,i),c=S[o];return m(m({},i),{range:u,caretPosition:null!==(e=null==c?void 0:c.caretPosition)&&void 0!==e?e:null,selectionRects:null!==(n=null==c?void 0:c.selectionRects)&&void 0!==n?n:Zi})}))}),[d,y,S]);return[x,u((function(){b.current=new WeakMap,g(!0)}),[g])]}export{g as EditorContext,Ni as getCursorRange,b as useEditorStatic,tu as useRemoteCursorOverlayPositions,Fi as useRemoteCursorStates,_i as useRemoteCursorStatesSelector};
|
|
39
|
+
F((function(t,e){}));var Ri=F((function(t){t.exports=Pi})),Ti=function(){var t=wt(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},ki=RegExp.prototype,zi=Je.PROPER,Ii="toString",Li=RegExp.prototype,Ci=Li[Ii],Mi=m((function(){return"/a/b"!==Ci.call({source:"a",flags:"b"})})),Fi=zi&&Ci.name!==Ii;(Mi||Fi)&&on(Li,Ii,(function(){var t=wt(this),e=uo(t.source),n=uo(function(t){var e=t.flags;return void 0!==e||"flags"in ki||K(t,"flags")||!kt(ki,t)?e:Rt(Ti,t)}(t));return"/"+e+"/"+n}),{unsafe:!0});var _i=function(t,e,n){return n.get&&rn(n.get,e,{getter:!0}),n.set&&rn(n.set,e,{setter:!0}),Yt.f(t,e,n)},Di=ht("species"),Ni=Br.fastKey,Gi=Ve.set,Wi=Ve.getterFor,Vi={getConstructor:function(t,e,n,r){var o=t((function(t,o){bo(t,i),Gi(t,{type:e,index:Ee(null),first:null,last:null,size:0}),Ot||(t.size=0),z(o)||no(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=Wi(e),c=function(t,e,n){var r,o,i=u(t),c=a(t,e);return c?c.value=n:(i.last=c={index:o=Ni(e,!0),key:e,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=c),r&&(r.next=c),Ot?i.size++:t.size++,"F"!==o&&(i.index[o]=c)),t},a=function(t,e){var n,r=u(t),o=Ni(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===e)return n};return yo(i,{clear:function(){for(var t=u(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=Ee(null),Ot?t.size=0:this.size=0},delete:function(t){var e=this,n=u(e),r=a(e,t);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first===r&&(n.first=o),n.last===r&&(n.last=i),Ot?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=u(this),r=or(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!a(this,t)}}),yo(i,n?{get:function(t){var e=a(this,t);return e&&e.value},set:function(t,e){return c(this,0===t?0:t,e)}}:{add:function(t){return c(this,t=0===t?0:t,t)}}),Ot&&_i(i,"size",{configurable:!0,get:function(){return u(this).size}}),o},setStrong:function(t,e,n){var r=e+" Iterator",o=Wi(e),i=Wi(r);Kn(t,e,(function(t,e){Gi(this,{type:r,target:t,state:o(t),kind:e,last:null})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?Yn("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=null,Yn(void 0,!0))}),n?"entries":"values",!n,!0),function(t){var e=Tt(t);Ot&&e&&!e[Di]&&_i(e,Di,{configurable:!0,get:function(){return this}})}(e)}};jo("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),Vi);var Bi=Ar.forEach,Ui=function(t,e){var n=[][t];return!!n&&m((function(){n.call(null,e||function(){return 1},1)}))}("forEach"),qi=Ui?[].forEach:function(t){return Bi(this,t,arguments.length>1?arguments[1]:void 0)},Hi=function(t){if(t&&t.forEach!==qi)try{Fe(t,"forEach",qi)}catch(e){t.forEach=qi}};for(var Xi in Qo)Qo[Xi]&&Hi(G[Xi]&&G[Xi].prototype);Hi(ei);var Ki=new WeakMap;function Yi(t){var e=Ki.get(t);if(e)return e;var n=function(t){var e={},n=new Set,r=n.add.bind(n),o=new Set,i=null;return[function(e){return o.add(e),i||(i=function(t){t.added.forEach(r),t.removed.forEach(r),t.updated.forEach(r),o.forEach((function(t){return t()}))},l.on(t,"change",i)),function(){o.delete(e),i&&0===o.size&&(l.off(t,"change",i),i=null)}},function(){return 0===n.size?e:(n.forEach((function(n){var r=l.cursorState(t,n);null!==r?e[n]=r:delete e[n.toString()]})),n.clear(),e=ui({},e))}]}(t);return t&&Ki.set(t,n),n}function $i(){return Yi(li())}function Ji(){var t=ci($i(),2),e=t[0],n=t[1];return wi.useSyncExternalStore(e,n)}function Qi(t,e){var n=ci($i(),2),r=n[0],o=n[1];return Ri.useSyncExternalStoreWithSelector(r,o,null,t,e)}var Zi=Object.freeze([]);function tu(t){var e;void 0===t&&(t={});var n,s,l,v=t.containerRef,p=t.shouldGenerateOverlay,h=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(t,["containerRef","shouldGenerateOverlay"]),y=li(),d=Ji(),g=(n=ci(r((function(t){return t+1}),0),2)[1],s=o(null),i(l=function(){s.current&&(cancelAnimationFrame(s.current),s.current=0)}),i((function(){return l}),[]),u((function(t){void 0===t&&(t=!1),t?n():s.current||(s.current=requestAnimationFrame(n))}),[])),b=o(new WeakMap),m=ci(c({}),2),w=m[0],O=m[1],S=!("refreshOnResize"in h)||(null===(e=h.refreshOnResize)||void 0===e||e);!function(t,e){var n=o(e);n.current=e;var r=ci(c((function(){return new ResizeObserver((function(){n.current()}))})),1)[0];i((function(){if(null==t?void 0:t.current){var e=t.current;return r.observe(e),function(){return r.unobserve(e)}}}),[r,t])}(S?v:void 0,(function(){b.current=new WeakMap,g("debounced"!==S)})),a((function(){var t,e,n;if(!v||v.current){var r=null===(t=null==v?void 0:v.current)||void 0===t?void 0:t.getBoundingClientRect(),o=null!==(e=null==r?void 0:r.x)&&void 0!==e?e:0,i=null!==(n=null==r?void 0:r.y)&&void 0!==n?n:0,u=Object.keys(w).length!==Object.keys(d).length,c=Object.fromEntries(Object.entries(d).map((function(t){var e=ci(t,2),n=e[0],r=e[1],c=r.relativeSelection&&fi(y,r);if(!c)return[n,Zi];var a=b.current.get(c);if(a)return[n,a];var f=si(y,c,{xOffset:o,yOffset:i,shouldGenerateOverlay:p});return u=!0,b.current.set(c,f),[n,f]})));u&&O(c)}}));var j=f((function(){return Object.entries(d).map((function(t){var e,n,r=ci(t,2),o=r[0],i=r[1],u=i.relativeSelection&&fi(y,i),c=w[o];return ui(ui({},i),{range:u,caretPosition:null!==(e=null==c?void 0:c.caretPosition)&&void 0!==e?e:null,selectionRects:null!==(n=null==c?void 0:c.selectionRects)&&void 0!==n?n:Zi})}))}),[d,y,w]);return[j,u((function(){b.current=new WeakMap,g(!0)}),[g])]}export{g as EditorContext,fi as getCursorRange,b as useEditorStatic,tu as useRemoteCursorOverlayPositions,Ji as useRemoteCursorStates,Qi as useRemoteCursorStatesSelector};
|
|
40
40
|
//# sourceMappingURL=index.esm.js.map
|